-
Print
-
DarkLight
-
PDF
Creation of basic nodes for adding various node types via the API
Creating basic nodes via the API
Before adding various nodes to your process via the API, you need to create 4 nodes first:
- common node (type 0) - for common logic;
- escalation node (type 3) - for the Condition logic, intended for redistributing the errors occurring in the main node across a process: forwarding errors to a final node or to reprocessing;
- common node (type 0) - for the Delay logic, intended for processing the errors occurring in the main logic, for which the processing can be performed again in 30 seconds;
- final node (type 2) - intended for processing the errors occurring in the main logic, for which the processing can't be performed again;
Request example of creating the nodes for adding API Call logic to the 125892 process
{
"ops": [
{
"id": "1",
"type": "create",
"obj": "node",
"conv_id": 125892,
"title": "API Call",
"description": "",
"obj_type": 0,
"version": 1487321422
},
{
"id": "2",
"type": "create",
"obj": "node",
"conv_id": 125892,
"title": "Escalation node for API Call",
"description": "",
"obj_type": 3,
"version": 1487321422
},
{
"id": "3",
"type": "create",
"obj": "node",
"conv_id": 125892,
"title": "Delay for API Call",
"description": "",
"obj_type": 0,
"version": 1487321422
},
{
"id": "4",
"type": "create",
"obj": "node",
"conv_id": 125892,
"title": "Final errors for API Call",
"description": "",
"obj_type": 2,
"version": 1487321422
}
]
}
Response
{
"request_proc": "ok",
"ops": [
{
"id": "1",
"proc": "ok",
"obj": "node",
"obj_id": "963852",
"version": 1487321422
},
{
"id": "2",
"proc": "ok",
"obj": "node",
"obj_id": "741852",
"version": 1487321422
},
{
"id": "3",
"proc": "ok",
"obj": "node",
"obj_id": "852123",
"version": 1487321422
},
{
"id": "4",
"proc": "ok",
"obj": "node",
"obj_id": "632547",
"version": 1487321422
}
]
}