Update an Integration

Update an existing custom Integration by ID. Every update request must include the application authentication parameters (config).

Method Signature

update(id: string, updateRequest: IntegrationUpdateRequest): Promise<Integration>;
update(id: string, name: string, config: IntegrationConfiguration): Promise<Integration>;
update(id: string, updateRequest: IntegrationUpdateRequest, callback: ClientMethodCallback<Integration>): Promise<Integration>;
update(id: string, name: string, config: IntegrationConfiguration, callback: ClientMethodCallback<Integration>): Promise<Integration>;

Parameters

ParameterTypeDescription
idstringThe ID of the Integration to update
updateRequestIntegrationUpdateRequestThe request containing Integration configuration metadata
returnsIntegrationThe requested Integration

IntegrationUpdateRequest

NameTypeDescription
namestringThe display Name to apply to the Integration
configIntegrationConfigurationThe configuration settings for the Integration

IntegrationConfiguration

NameTypeDescription
clientIdstringClient ID of the OAuth Application
clientSecretstringClient Secret of the OAuth Application
tokenPathstringToken Path of the OAuth Application
revokePathstringToken Revocation Path of the OAuth Application
authorizeBaseUrlstringThe base URL of the OAuth Application
sitestringThe website of the OAuth Application
scopesstring[]The list of Scopes to apply to Connections using the Integration
useBodyAuthbooleanBoolean indicating whether auth params should be sent to OAuth app in body

Example

/*
 * This example demonstrates creating a custom Integration
 */

const { CatalyticClient } = require('@catalytic/sdk');

const catalytic = new CatalyticClient();

const name = 'My Updated Custom Integration';

const config = {
    clientID: 'MY_OAUTH_CLIENT_ID',
    clientSecret: 'MY_OAUTH_CLIENT_SECRET',
    tokenPath: '/oauth2/token',
    revokePath: '/oauth2/revoke',
    authorizeBaseUrl: 'https://example-oauth-app.com/oauth2/authorize',
    site: 'https://api.example-oauth-app.com',
    scopes: ['read', 'write', 'delete'],
    useBodyAuth: false
};

const integration = await catalytic.integration.update(name, config);
console.log(integration.id);