Create an IntegrationConnection
Create a Connection to an existing Integration.
Learn More about Integrations
https://help.catalytic.com/docs/general-integration-information/#how-integrations-work
Method Signature
IntegrationConnection createIntegrationConnection(String integrationId, String name, List<Field> connectionParams);
Parameters
Parameter | Type | Description |
---|---|---|
integrationId | String | The id of the Integration for which a Connection should be created |
name | String | The display name to apply to the new Integration Connection |
connectionParams | List<Field> | The values required to create a Connection of the Integration. Should mirror the ConnectionParams on the Integration. |
returns | IntegrationConnection | The created Integration Connection |
Example
/*
* This example demonstrates creating a new SFTP Integration Connection
*/
import org.catalytic.sdk.CatalyticClient;
import org.catalytic.sdk.entities.IntegrationConnection;
public class Program {
public static void main(String[] args) throws Exception {
// Create and initialize the Catalytic SDK Client
CatalyticClient catalytic = new CatalyticClient();
List<Field> connectionParams = new ArrayList<>();
connectionParams.add(new Field("identifier", "my-username"));
connectionParams.add(new Field("secret", "my-password"));
// Create a new IntegrationConnection
IntegrationConnection integrationConnection = catalytic.integrations().createIntegrationConnection("My example connection", "my-integration", connectionParams);
System.out.println("IntegrationConnection name: " + integrationConnection.getName());
}
}
Updated about 3 years ago