Application Connections

List Application Connections

SDK Method

Files::ApplicationConnection.list

Return Object

List<ApplicationConnection>

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator or a Workspace Administrator for the relevant workspace.

Additional Arguments

Example Request

begin
  application_connections = Files::ApplicationConnection.list
  application_connections.auto_paging_each do |application_connection|
    # Operate on application_connection
  end
rescue Files::NotAuthenticatedError => e
  puts "Authentication Error Occurred (#{e.class.to_s}): " + e.message
rescue Files::Error => e
  puts "Unknown Error Occurred (#{e.class.to_s}): " + e.message
end

Show Application Connection

SDK Method

Files::ApplicationConnection.find

Return Object

ApplicationConnection

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator or a Workspace Administrator for the relevant workspace.

Method Arguments

ArgumentDescription
id
int64
Required
Application Connection ID.

Example Request

begin
  application_connection = Files::ApplicationConnection.find(id)
  # Operate on application_connection
rescue Files::NotAuthenticatedError => e
  puts "Authentication Error Occurred (#{e.class.to_s}): " + e.message
rescue Files::Error => e
  puts "Unknown Error Occurred (#{e.class.to_s}): " + e.message
end

Create Application Connection

SDK Method

Files::ApplicationConnection.create

Return Object

ApplicationConnection

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator or a Workspace Administrator for the relevant workspace.

Method Arguments

ArgumentDefaultDescription
name
string
Required
Connection display name.
secret_id
int64
ID of the credential in the Secret Store, if the connection uses a credential.
application_key
string
Required
Application key from the Automation applications list.
origin
string
Required
HTTPS origin for this connection.
workspace_id
int64
0Workspace that owns this connection.

Example Request

begin
  application_connection = Files::ApplicationConnection.create(
    name: "example",
    application_key: "example",
    origin: "example"
  )
  # Operate on application_connection
rescue Files::NotAuthenticatedError => e
  puts "Authentication Error Occurred (#{e.class.to_s}): " + e.message
rescue Files::Error => e
  puts "Unknown Error Occurred (#{e.class.to_s}): " + e.message
end

Update Application Connection

SDK Method

application_connection.update

Return Object

ApplicationConnection

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator or a Workspace Administrator for the relevant workspace.

Method Arguments

ArgumentDescription
name
string
Connection display name.
secret_id
int64
ID of the credential in the Secret Store, if the connection uses a credential.

Example Request

begin
  # Find the application_connection object by its id.
  application_connection = Files::ApplicationConnection.find(id)
  application_connection.update(
    name: "example"
  )
rescue Files::NotAuthenticatedError => e
  puts "Authentication Error Occurred (#{e.class.to_s}): " + e.message
rescue Files::Error => e
  puts "Unknown Error Occurred (#{e.class.to_s}): " + e.message
end

Delete Application Connection

SDK Method

application_connection.delete

Return Object

nil

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator or a Workspace Administrator for the relevant workspace.

Example Request

begin
  # Find the application_connection object by its id.
  application_connection = Files::ApplicationConnection.find(id)
  application_connection.delete
rescue Files::NotAuthenticatedError => e
  puts "Authentication Error Occurred (#{e.class.to_s}): " + e.message
rescue Files::Error => e
  puts "Unknown Error Occurred (#{e.class.to_s}): " + e.message
end

The ApplicationConnection Object

Some of the methods above return a ApplicationConnection object. The attributes of this object are listed below.

AttributeDescription
id
int64
Connection ID.
workspace_id
int64
Workspace that owns this connection.
name
string
Connection display name.
application_key
string
Application key from the Automation applications list.
origin
string
HTTPS origin for this connection.
secret_id
int64
ID of the credential in the Secret Store, if the connection uses a credential.
authentication
object
Current credential type and placement, without the secret value.
created_at
date-time
Time the connection was created.
updated_at
date-time
Time the connection was updated.