Connections
A connection names the destination system and points to its stored credentials, so a flow step can call that system without holding any secret.
On this page
Configure a connection
Use a separate connection for each destination and environment. Put the connection identifier in the call step’s connectionId, and the destination operation in action. Keep the credential reference in the connection. Do not place passwords or bearer tokens in step input.
curl
curl -X POST "$RDC_BASE_URL/integrations/v1/connections" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "ERP",
"category": "erp",
"credentialRef": "credential-erp",
"operationId": "33a22ec0-f0af-4498-a388-123456789abc",
"expectedRevision": 0
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/integrations/v1/connections`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "ERP",
"category": "erp",
"credentialRef": "credential-erp",
"operationId": "33a22ec0-f0af-4498-a388-123456789abc",
"expectedRevision": 0
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/integrations/v1/connections',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'name': 'ERP',
'category': 'erp',
'credentialRef': 'credential-erp',
'operationId': '33a22ec0-f0af-4498-a388-123456789abc',
'expectedRevision': 0,
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"name": "ERP",
"category": "erp",
"credentialRef": "credential-erp",
"operationId": "33a22ec0-f0af-4498-a388-123456789abc",
"expectedRevision": 0
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/integrations/v1/connections');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/integrations/v1/connections");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"name": "ERP",
"category": "erp",
"credentialRef": "credential-erp",
"operationId": "33a22ec0-f0af-4498-a388-123456789abc",
"expectedRevision": 0
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "33a22ec0-f0af-4498-a388-123456789abc",
"status": "accepted",
"aggregateRevision": 1,
"aggregateId": "connection-erp"
} Inspect before enabling a trigger
Read the connection after the create operation completes. Confirm its identifier, destination and revision before wiring a trigger. A flow version does not make a revoked destination credential valid.
curl
curl "$RDC_BASE_URL/integrations/v1/connections/connection-erp" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/integrations/v1/connections/connection-erp`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/integrations/v1/connections/connection-erp',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/integrations/v1/connections/connection-erp');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/integrations/v1/connections/connection-erp");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"id": "connection-erp",
"name": "ERP",
"category": "erp",
"credentialRef": "credential-erp",
"status": "active",
"revision": 1
}