Circuits
Catalyst Circuits enable you to systematically define and organize a sequence of tasks to be carried out automatically in Catalyst. You can orchestrate tasks and automate workflows, and additionally include conditions, data, and paths in the workflow, to define a repeatable pattern of activities that achieves a business outcome using Circuits.
Catalyst offers support for automating the execution of Basic I/O functions of your application using a circuit.
Execute a Circuit
Description
This API enables you to execute a Catalyst circuit configured in the console by referring to its unique Circuit ID. You can pass the input to the circuit in the request JSON as described below.
Request Details
Request URL
{api-domain}/baas/v1/project/{project_id}/circuit/{circuit_id}/execute
Request Headers
Authorization: Zoho-oauthtoken {oauth_token}
Optional Headers
CATALYST-ORG: {org_id}
Environment: Development
Scope
ZohoCatalyst.circuits.EXECUTE
Request JSON Format
You must send the input to the circuit as key-value pairs in the JSON format like this:
{
“key_1”: “value_1”,
“key_2”: “value_2”,
“key_3”: “value_3”,
.
.
}
Response Details
The response contains the result and the details of the executed circuit, such as the circuit_name, the start_time and end_time of the execution, the instance_id, along with the details of the input that was passed to the circuit and the output generated from the circuit’s execution.
curl -X POST
https://api.catalyst.zoho.com/baas/v1/project/4000000006007/circuit/105000000180234/execute
-H “Authorization: Zoho-oauthtoken 1000.910*************************16.2f*************************57”
-d ‘[
{
“email”:“j.parker@zylker.com”,
“count”:“20”,
“traveller_type”:“Single”,
“rating”:“5”,
“location”:“New York”,
“suite”:“Executive”
}
]’
{
"status": "success",
"data": {
"id": "b3c91799-5c18-4626-9983-a2d6af237e20",
"name": "Case 1",
"start_time": "Aug 24, 2020 02:24 PM",
"end_time": "Aug 24, 2020 02:24 PM",
"status": "success",
"status_code": 6,
"execution_meta": {},
"circuit_details": {
"name": "StayFinder",
"ref_name": "StayFinder",
"description": "",
"instance_id": "ef9644a5-123a-438c-94d9-01b1bade8817"
},
"input": {
"email":"j.parker@zylker.com",
"count":"20",
"traveller_type":"Single",
"rating":"5",
"location":"New York",
"suite":"Executive"
},
"output": {
"result": {
"stay_list":{
"message":"Email has been sent successfully to j.parker@zylker.com",
"status":"success"
}
}
}
}
}
Yes
No
Send your feedback to us