Save a connection and its instances atomically
const url = 'https://api.adversarial.com/api/v1/integrations/example/save';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"connection":{"auth_method":null,"credentials":{},"display_name":null,"settings":{}},"connection_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","instances":[{"capability":"RISK_REGISTER","config":{},"display_name":"example","enabled":true,"instance_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.adversarial.com/api/v1/integrations/example/save \ --header 'Content-Type: application/json' \ --data '{ "connection": { "auth_method": null, "credentials": {}, "display_name": null, "settings": {} }, "connection_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "instances": [ { "capability": "RISK_REGISTER", "config": {}, "display_name": "example", "enabled": true, "instance_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ] }'Creates a connection when its identifier is omitted. Existing configurations are replaced by identifier; unlisted configurations remain. If any validation or write fails, none of the requested changes persist.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Provider slug
Request Bodyrequired
Section titled “Request Bodyrequired”Save a connection and its instances atomically.
object
Connection changes. Creation requires name, authentication method, settings, and credentials. Omit for an instance-only save.
Existing connection to update. Omit to create a connection.
Instances to create or replace. Unlisted instances are retained.
One complete instance in an atomic save.
object
Capability selected from the provider catalog. Must match an existing instance.
Complete configuration value. Omitted means an empty configuration.
object
Instance name, unique across the organization ignoring case.
Whether this configuration can execute.
Existing instance to replace. Omit to create an instance.
Responses
Section titled “Responses”Saved connection with all instances
One installed provider connection.
object
Safe authentication error, cleared after successful recovery.
Time of the most recent authentication failure.
Sequential authentication failures since the last accepted provider request.
Selected authentication method.
Creation time.
Whether encrypted credentials are present.
Operator-chosen connection name, unique per organization and provider.
Connection identifier.
Instances owned by this connection.
One instance under a connection.
object
Capability identifier.
Complete validated configuration value.
object
Connection whose credential this configuration runs with.
Creation time.
Instance name, unique across the organization ignoring case; the two halves of a ticket card share one. The instance’s integration user carries it, so it is what Opened by shows for imported records.
Whether the platform can execute this configuration.
Configuration identifier.
Service account this configuration acts as, named as the configuration. Both halves of a ticket card share one.
Last update time.
Canonical provider identifier.
Non-secret connection values.
object
Current lifecycle status.
Last update time.
Example
{ "auth_method": "api_key", "instances": [ { "capability": "RISK_REGISTER" } ]}Invalid connection or instance
Unknown provider, connection, or configuration
Concurrent change or a name already in use