As a result of this request, you will receive a response with a list of active 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
- The request was successful. All cascades are active.
[ { "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": [] } ] } ] } ] } ]
- The request was successful. The cascade is disabled.
[ { "id": 2533, "name": "whatsapp-conversation", "status": "DISABLED", "stagesCount": 1, "stages": [ { "order": 0, "uuid": "85e891e5-c6e4-430c-a687-c5beefd270b4", "subject": { "id": 18532, "name": "RETAIL2_WA_EM_temp", "subject": "RETAIL2_WA_EM_temp", "type": "WHATSAPP", "tenantId": 334, "testing": false, "locked": false, "approveStatus": "APPROVED" }, "stages": [] } ] }, ]
Response Parameters
Parameter | Data type | Description |
id | long | Cascade identifier. You must specify this ID in the cascade Id 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 or DISABLED |
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 |