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

createConnection(integrationId: string, name: string, connectionParams: FieldInput[]): Promise<IntegrationConnection>;
createConnection(integrationId: string, name: string, connectionParams: FieldInput[], callback: ClientMethodCallback<IntegrationConnection>): void;

Parameters

ParameterTypeDescription
integrationIdstringThe Id of the Integration for which a Connection should be created
namestringThe display name to apply to the new Integration connection
connectionParamsFieldInput[]The values required to create a Connection of the Integration. Should mirror the ConnectionParams on the Integration.
returnsIntegrationConnectionThe created Integration Connection

FieldInput

PropertyDescription
nameThe name or reference name of the Field on the Instance
valueThe string-serialized value of the Field

Example

/*
 * This example demonstrates creating a new SFTP Integration Connection
 */
const { CatalyticClient } = require('@catalytic/sdk');

const catalytic = new CatalyticClient();

const integrationId = 'sftp/non-oauth/v1';
const name = 'My New SFTP Connection';
const params = [
    { name: 'username', value: 'alice' },
    { name: 'password', value: 'p@$$w0rd' },
    { name: 'urls', value: 'sftp://my-sftp-site.com' },
];

var connection = await catalytic.integrations.createConnection(integrationId, name, params);
console.log(connection.id);