As a result of this request, you will receive a response with a list of all cascades that were created earlier (in the request body, you need to have an empty JSON object in curly brackets {}). If the request is successful, the server returns a response with the code 200 that contains an array of JSON objects [{…}, {…}, {…}] with parameters described in the table below. If the request fails, a message with an error code is returned.
URL
To retrieve the cascades list, you need to send a POST request to the following URL address: POST https://app.edna.io/api/cascade/get-all/
Request Format
A JSON object is passed in the request body with the following parameters.
{ "offset":0, "limit":0 }
Response Example
[ { "id": 1000000, "name": "Reach out to the client", "status": "ACTIVE", "stagesCount": 3, "stages": [ { "order": 0, "uuid": "001-test001", "decision": null, "subject": { "id": 23215, "name": "test", "subject": "test_subject_WA", "description": null, "type": "WHATSAPP", "tenantId": 100000 }, "stages": [ { "order": 1, "uuid": "2ede9313-0539-463a-9ec3-898506f4937a", "decision": { "type": "TTL", "ttl": "00:00:40" }, "subject": { "id": 412365, "name": "test_twoway", "subject": "test_subject_twoway", "description": null, "type": "VIBER", "tenantId": 100000 }, "stages": [ { "order": 2, "uuid": "66cdf240-ef82-403e-931d-b3deaf180a1e", "decision": { "type": "TTL", "ttl": "00:01:00" }, "subject": { "id": 585698, "name": "SMS", "subject": "test_subject_SMS", "description": null, "type": "SMS", "tenantId": 100000 }, "stages": [] } ] } ] } ] } ]
Response Parameters
Parameter | Data type | Description |
id | long | Cascade identifier. You need to specify this ID in the cascadeId attribute when sending messages |
name | string | Cascade name (the name you set for it when creating the cascade) |
status | string | Cascade status (for example, ACTIVE) |
stagesCount | string | Number of the steps in the cascades |
stages | object | Cascades information. This array contains the description of the cascade steps |
order | long | Number of the step in the cascade |
uuid | string | Step’s identifier set by the system |
decision | object | Step’s description.Can either be null or contain the “type”: “TTL”, “ttl”: “00:00:40”, where ttl is the number of time units after which it is required to proceed to the described step if the message was not delivered at the previous step |
subject | object | Channel information |
subject.id | long | Subject identifier |
subject.name | string | Channel name (the name you set for it when creating the channel) |
subject.subject | string | Subject name |
subject.description | string | Additional channel information |
subject.type | string | Channel type (for example, SMS, VIBER, WHATSAPP) |
subject.tenantId | long | Your account identifier |