Update an existing custom Integration by ID. Every update request must include the application authentication parameters.
Integration Update(string id, IntegrationUpdateRequest updateRequest);
async Task<Integration> UpdateAsync(string id, IntegrationUpdateRequest updateRequest);
Parameter | Type | Description |
---|
id | string | The Id of the custom Integration to update |
updateRequest | IntegrationUpdateRequest | The request containing Integration configuration metadata |
returns | Integration | The requested Integration |
Name | Type | Description |
---|
Name | string | The display Name to apply to the Integration |
Type | IntegrationType | The Type of the Integration. Currently only OAuth2 is supported |
Config | IntegrationConfiguration | The configuration settings for the Integration |
Name | Type | Description |
---|
ClientId | string | Client ID of the OAuth Application |
ClientSecret | string | Client Secret of the OAuth Application |
TokenPath | string | Token Path of the OAuth Application |
RevokePath | string | Token Revocation Path of the OAuth Application |
AuthorizeBaseUrl | Uri | The base URL of the OAuth Application |
Site | Uri | The website of the OAuth Application |
Scopes | List<string> | The list of Scopes to apply to Connections using the Integration |
UseBodyAuth | bool | Boolean indicating whether auth params should be sent to OAuth app in body |
/*
* This example demonstrates updating an existing custom Integration
*/
using Catalytic.Sdk.Entities;
namespace Catalytic.Sdk.Examples
{
class Program
{
static void Main(string[] args)
{
var catalytic = new Catalytic.Sdk.CatalyticClient(AccessToken.Default);
var request = new IntegrationUpdateRequest {
Name = "My Updated Integration Name",
Type = IntegrationType.OAuth2,
Config = new IntegrationConfiguration {
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 = new List<string> { "read", "write" },
UseBodyAuth = false
}
};
var integration = await catalytic.Integrations.UpdateAsync("EXISTING_INTEGRATION_ID", request);
Console.WriteLine(integration.Name);
}
}
}