Application Connections

List Application Connections

SDK Function

ApplicationConnection.list()

Return Object

ListIterator<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

import com.files.ListIterator;
import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.ApplicationConnection;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  ListIterator<ApplicationConnection> applicationConnections = ApplicationConnection.list(parameters);
  for (ApplicationConnection applicationConnection : applicationConnections.listAutoPaging()) {
    // Operate on applicationConnection
  }
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Show Application Connection

SDK Function

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.

Function Arguments

ArgumentDescription
id
int64
Required
Application Connection ID.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.ApplicationConnection;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  ApplicationConnection applicationConnection = ApplicationConnection.find(id, parameters);
  // Operate on applicationConnection
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Create Application Connection

SDK Function

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.

Function 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

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.ApplicationConnection;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  parameters.put("name", "example");
  parameters.put("application_key", "example");
  parameters.put("origin", "example");
  
  ApplicationConnection applicationConnection = ApplicationConnection.create(parameters);
  // Operate on applicationConnection
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Update Application Connection

SDK Function

applicationConnection.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.

Attribute Setters

SetterDescription
setName
string
Connection display name.
setSecretId
int64
ID of the credential in the Secret Store, if the connection uses a credential.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.ApplicationConnection;

try {
  // Find the applicationConnection object by its id.
  ApplicationConnection applicationConnection = ApplicationConnection.find(id, null);
  HashMap<String, Object> parameters = new HashMap<>();
  parameters.put("name", "example");
  applicationConnection.update(parameters);
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Delete Application Connection

SDK Function

applicationConnection.delete();

Return Object

No return value.

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

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.ApplicationConnection;

try {
  // Find the applicationConnection object by its id.
  ApplicationConnection applicationConnection = ApplicationConnection.find(id, null);
  applicationConnection.delete(null);
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

The ApplicationConnection Object

Some of the functions 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.