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

createIntegrationConnection(string $integrationId, string $name, array $connectionParams): IntegrationConnection

Parameters

ParameterTypeDescription
integrationIdstringThe id of the Integration for which a Connection should be created
namestringThe display name to apply to the new Integration Connection
connectionParamsarrayThe values required to create a Connection of the Integration. Should mirror the ConnectionParams on the Integration.
returnsIntegrationConnectionThe created Integration Connection

Example

<?php

/*
 * This example demonstrates creating a new SFTP Integration Connection 
 */

require_once(__DIR__ . './vendor/autoload.php');

use Catalytic\SDK\CatalyticClient;

$catalytic = new CatalyticClient();
$integration = $catalytic->integrations()->get('sftp/non-oauth/v1');

$connectionParams = array('identifier' => 'my-username', 'secret' => 'my-password', 'urls' => 'sftp://example.com');
$connection = $catalytic->integrations()->createIntegrationConnection($integration->getId(), 'My sftp connection', $connectionParams);

echo $connection->getName() . ":" . PHP_EOL;