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
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 | array | The values required to create a Connection of the Integration. Should mirror the ConnectionParams on the Integration. |
returns | IntegrationConnection | The 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;
Updated almost 3 years ago