Retrieving Details of Cascades

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

ParameterData typeDescription
idlongCascade identifier. You must specify this ID in the cascade Id attribute when sending messages
namestringCascade name (the name you set for it when creating the cascade)
statusstringCascade status, for example, ACTIVE or DISABLED
stagesCountstringNumber of the steps in the cascades
stagesobject Cascades information. This array contains the description of the cascade steps
orderlongNumber of the step in the cascade
uuidstringStep’s identifier set by the system
decisionobject 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
subjectobject Channel information
subject.idlongSubject identifier
subject.namestringChannel name (the name you set for it when creating the channel)
subject.subjectstringSubject name
subject.descriptionstringAdditional channel information
subject.typestringChannel type (for example, SMS, VIBER, WHATSAPP)
subject.tenantIdlongYour account identifier