Get a step
Returns one step of a workflow, with its stored options redacted and the workflow's current revision.
- Method
- GET
- Path
https://api.returning.ai / v1/ workflow-builder/ data-workflows/ {workflowId}/ nodes/ {nodeId} - Permission
- workflowBuilder
- Retries
- Safe to retry: nothing is written.
When to use this
Use it when you need one step's configuration without reading every step of a large workflow.
Authentication#
- Header
Authorization: Bearer <API_KEY>- Permission
- workflowBuilder
Authorization: Bearer <API_KEY> with workflowBuilder, for the community that owns the workflow. The step is looked up inside that workflow, so a step id from another workflow or another community answers 404 NODE_NOT_FOUND.
| Failure | Meaning | Recovery |
|---|---|---|
403 API_KEY_PERMISSION_DENIED | No workflowBuilder | Grant the permission. |
404 WORKFLOW_NOT_FOUND | The workflow id is unknown in this community | Use an id from the list. |
404 NODE_NOT_FOUND | The step id is not in this workflow | Read the workflow for its step ids. |
Behaviour#
It does not return run results. Step results belong to a run, which GET /runs/{runId} returns.
Request#
Path parameters#
Headers#
Bearer <API_KEY>.EgBearer <API_KEY>
Watch for
statuson a step is run state from the last execution, not part of the configuration, and it is not covered by the revision.- Credentials are replaced by
["__REDACTED__"]and listed inredactedPaths. - The route needs both ids. A step id alone is not addressable, because the lookup is scoped to the workflow.
- A router's branches live in its own options; read the router step to see
branchName,branchType,conditionsandworkflowNodeIds.
More examples and details
A platform-action step, with the trigger reference it carries:
{
"data": {
"node": {
"_id": "65f1a2b3c4d5e6f708192a3c",
"name": "Read member XP",
"type": "platform-action",
"order": 1,
"continueOnFailure": false,
"retryOnFailure": false,
"options": {
"action": "get-user-fields",
"selectUser": { "type": "email", "value": ["{{65f1a2b3c4d5e6f708192a41.email}}"] },
"fields": [{ "label": "Total XP", "field": "total_xp" }]
},
"status": "success"
},
"revision": "162af81f5de4ff2b557a4087de9a9a73a0ed4e621f737787e35a93614cb50d1c",
"redactedPaths": []
}
}
curl --request GET \
--url 'https://api.returning.ai/v1/workflow-builder/data-workflows/<workflowId>/nodes/<nodeId>' \
--header 'Authorization: Bearer <API_KEY>'
Response#
HTTP 200 with { node, revision, redactedPaths } and the revision in the ETag header. The revision is the workflow's, not the step's: it is the value to send as If-Match on the next write.
A step inside a router branch is returned the same way as a main-line step. Its order is its position in the authored order, and its branch membership is visible on the router, not here.
Eg{ ... }
Eg{ ... }
Eg"65f1a2b3c4d5e6f708192a3c"
Eg"Read member XP"
Eg"platform-action"
Eg1
Egfalse
Egfalse
["__REDACTED__"].RuleNullable
Eg{ ... }
Eg"success"
workflowNodeIds and nestedNodes.Eg"162af81f5de4ff2b557a4087de9a9a73a0ed4e621f737787e35a93614cb50d1c"
Eg[]
{
"data": {
"node": {
"_id": "65f1a2b3c4d5e6f708192a3c",
"name": "Read member XP",
"type": "platform-action",
"order": 1,
"continueOnFailure": false,
"retryOnFailure": false,
"options": {
"action": "get-user-fields",
"selectUser": {
"type": "email",
"value": ["{{65f1a2b3c4d5e6f708192a41.email}}"]
},
"fields": [
{
"label": "Total XP",
"field": "total_xp"
}
]
}
},
"revision": "162af81f5de4ff2b557a4087de9a9a73a0ed4e621f737787e35a93614cb50d1c",
"redactedPaths": []
}
}
Errors#
Fix the request04
VALIDATION_FAILEDFix the requestAUTHENTICATION_REQUIREDFix the requestAPI_KEY_REQUIREDFix the requestAPI_KEY_PERMISSION_DENIEDFix the requestworkflowBuilder. Grant the permission.Fix the data02
WORKFLOW_NOT_FOUNDFix the dataNODE_NOT_FOUNDFix the dataRetry with backoff02
RATE_LIMITEDRetry with backoffINTERNAL_ERRORRetry with backoffRetries
Safe to retry: nothing is written. The step's status can change between reads because of a run, but revision changes only when authored configuration changes.
{
"meta": {
"status": "error",
"statusCode": 400,
"code": "VALIDATION_FAILED",
"errors": [
{
"path": "params.workflowId",
"message": "Id must be a 24 character hex string"
}
],
"requestId": "3f4d0e8b-7a6c-4f1e-9b2d-5a7c8e1f0a3b"
},
"message": "API request rejected error.",
"detail": "The request body is not valid.",
"solution": "Read error detail and try again."
}