Pași
Citește încercările, intrările și rezultatele și decide aprobările în așteptare.
Pe această pagină
Listează pașii rulării
GET /integrations/v1/runs/{runId}/steps
Parametri
| Nume | În | Tip | Obligatoriu | Descriere |
|---|---|---|---|---|
runId | path | string | Daobligatoriu | Identificator: runId. |
limit | query | integer | Nuopțional | Mărimea paginii. Implicit 100 Interval 1 – 500 |
cursor | query | string | Nuopțional | Cursor opac din pagina precedentă. |
Răspunsuri
| Stare | Descriere | Corp |
|---|---|---|
200 | Înregistrarea curentă. | StepPage |
400 | Cerere refuzată: invalid_request. | Error |
401 | Cerere refuzată: unauthorized. | Error |
403 | Cerere refuzată: forbidden. | Error |
404 | Cerere refuzată: resource_not_found. | Error |
409 | Cerere refuzată: revision_conflict. | Error |
422 | Cerere refuzată: invalid‑settings. | Error |
429 | Cerere refuzată: rate_limited. | Error |
503 | Cerere refuzată: unavailable. | Error |
Cerere
curl
curl "$RDC_BASE_URL/integrations/v1/runs/run-b73a02/steps?limit=100" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/integrations/v1/runs/run-b73a02/steps?limit=100`, {
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/runs/run-b73a02/steps?limit=100',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/integrations/v1/runs/run-b73a02/steps?limit=100');
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/runs/run-b73a02/steps?limit=100");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Răspuns 200
{
"items": [
{
"id": "trigger",
"status": "pending",
"attempts": 0,
"started": null,
"ended": null,
"retryAt": null,
"input": {
"order": {
"number": "CV-1046",
"currency": "RON",
"netTotal": "2818.41"
}
},
"output": {},
"attemptLog": []
},
{
"id": "erp",
"status": "pending",
"attempts": 0,
"started": null,
"ended": null,
"retryAt": null,
"input": {
"order": {
"number": "CV-1046",
"currency": "RON",
"netTotal": "2818.41"
}
},
"output": {},
"attemptLog": []
},
{
"id": "parallel",
"status": "pending",
"attempts": 0,
"started": null,
"ended": null,
"retryAt": null,
"input": {
"order": {
"number": "CV-1046",
"currency": "RON",
"netTotal": "2818.41"
}
},
"output": {},
"attemptLog": []
},
{
"id": "crm",
"status": "pending",
"attempts": 0,
"started": null,
"ended": null,
"retryAt": null,
"input": {
"order": {
"number": "CV-1046",
"currency": "RON",
"netTotal": "2818.41"
}
},
"output": {},
"attemptLog": []
},
{
"id": "wms",
"status": "pending",
"attempts": 0,
"started": null,
"ended": null,
"retryAt": null,
"input": {
"order": {
"number": "CV-1046",
"currency": "RON",
"netTotal": "2818.41"
}
},
"output": {},
"attemptLog": []
},
{
"id": "branch",
"status": "pending",
"attempts": 0,
"started": null,
"ended": null,
"retryAt": null,
"input": {
"order": {
"number": "CV-1046",
"currency": "RON",
"netTotal": "2818.41"
}
},
"output": {},
"attemptLog": []
},
{
"id": "approval",
"status": "pending",
"attempts": 0,
"started": null,
"ended": null,
"retryAt": null,
"input": {
"order": {
"number": "CV-1046",
"currency": "RON",
"netTotal": "2818.41"
}
},
"output": {},
"attemptLog": []
},
{
"id": "wait",
"status": "pending",
"attempts": 0,
"started": null,
"ended": null,
"retryAt": null,
"input": {
"order": {
"number": "CV-1046",
"currency": "RON",
"netTotal": "2818.41"
}
},
"output": {},
"attemptLog": []
},
{
"id": "end",
"status": "pending",
"attempts": 0,
"started": null,
"ended": null,
"retryAt": null,
"input": {
"order": {
"number": "CV-1046",
"currency": "RON",
"netTotal": "2818.41"
}
},
"output": {},
"attemptLog": []
}
],
"nextCursor": null
} Citește pasul
GET /integrations/v1/runs/{runId}/steps/{stepId}
Parametri
| Nume | În | Tip | Obligatoriu | Descriere |
|---|---|---|---|---|
runId | path | string | Daobligatoriu | Identificator: runId. |
stepId | path | string | Daobligatoriu | Identificator: stepId. |
Răspunsuri
| Stare | Descriere | Corp |
|---|---|---|
200 | Înregistrarea curentă. | Step |
400 | Cerere refuzată: invalid_request. | Error |
401 | Cerere refuzată: unauthorized. | Error |
403 | Cerere refuzată: forbidden. | Error |
404 | Cerere refuzată: resource_not_found. | Error |
409 | Cerere refuzată: revision_conflict. | Error |
422 | Cerere refuzată: invalid‑settings. | Error |
429 | Cerere refuzată: rate_limited. | Error |
503 | Cerere refuzată: unavailable. | Error |
Cerere
curl
curl "$RDC_BASE_URL/integrations/v1/runs/run-b73a02/steps/trigger" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/integrations/v1/runs/run-b73a02/steps/trigger`, {
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/runs/run-b73a02/steps/trigger',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/integrations/v1/runs/run-b73a02/steps/trigger');
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/runs/run-b73a02/steps/trigger");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Răspuns 200
{
"id": "trigger",
"status": "pending",
"attempts": 0,
"started": null,
"ended": null,
"retryAt": null,
"input": {
"order": {
"number": "CV-1046",
"currency": "RON",
"netTotal": "2818.41"
}
},
"output": {},
"attemptLog": []
} Decide o aprobare
POST /integrations/v1/runs/{runId}/steps/{stepId}/approval
Păstrează comanda și returnează confirmarea operației. Citește rezultatul operației înainte de a o considera încheiată. Refolosirea unui operationId cu alt conținut returnează operation_reused.
Parametri
| Nume | În | Tip | Obligatoriu | Descriere |
|---|---|---|---|---|
runId | path | string | Daobligatoriu | Identificator: runId. |
stepId | path | string | Daobligatoriu | Identificator: stepId. |
Corpul cererii
| Câmp | Tip | Obligatoriu | Descriere |
|---|---|---|---|
operationId | string (uuid) | Daobligatoriu | UUID ales de client; refolosește‑l numai cu aceeași cerere. |
expectedRevision | integer | Daobligatoriu | Revizia citită înaintea modificării; zero pentru o resursă nouă. |
decision | string | Daobligatoriu | Decizia unui utilizator al contului cu drept de aprobare. Una dintre approve, reject |
Răspunsuri
| Stare | Descriere | Corp |
|---|---|---|
202 | Operație acceptată. | OperationResult |
400 | Cerere refuzată: invalid_request. | Error |
401 | Cerere refuzată: unauthorized. | Error |
403 | Cerere refuzată: forbidden. | Error |
404 | Cerere refuzată: resource_not_found. | Error |
409 | Cerere refuzată: revision_conflict. | Error |
422 | Cerere refuzată: invalid‑settings. | Error |
429 | Cerere refuzată: rate_limited. | Error |
503 | Cerere refuzată: unavailable. | Error |
Cerere
curl
curl -X POST "$RDC_BASE_URL/integrations/v1/runs/run-b73a02/steps/approval/approval" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "33a22ec0-f0af-4498-a388-123456789abc",
"expectedRevision": 1,
"decision": "approve"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/integrations/v1/runs/run-b73a02/steps/approval/approval`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "33a22ec0-f0af-4498-a388-123456789abc",
"expectedRevision": 1,
"decision": "approve"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/integrations/v1/runs/run-b73a02/steps/approval/approval',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '33a22ec0-f0af-4498-a388-123456789abc',
'expectedRevision': 1,
'decision': 'approve',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "33a22ec0-f0af-4498-a388-123456789abc",
"expectedRevision": 1,
"decision": "approve"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/integrations/v1/runs/run-b73a02/steps/approval/approval');
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/runs/run-b73a02/steps/approval/approval");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "33a22ec0-f0af-4498-a388-123456789abc",
"expectedRevision": 1,
"decision": "approve"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Răspuns 202
{
"operationId": "33a22ec0-f0af-4498-a388-123456789abc",
"status": "accepted",
"aggregateRevision": 1,
"aggregateId": "run-b73a02"
}