Get scenarios list
Description
Retrieves all created scenarios list.
Request URL
Method: POST
https://example.com/api/v1.1/workflows/list
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
format | string | "json" | No | Response data format By default – json |
from_id | int | 1 | No | The first ID in the response By default – 1 |
limit | int | 1 | No | Resources list limit By default – 1000 |
groups | []string | [ "group1", "group2" ] | No | List of access groups By default – [] |
groups_id | []int | [ 0, 1 ] | No | List of access groups IDs By default – [] |
ui_tags | []string | ["tag1", "tag2"] | No | List of tags By default – [] |
Request example
- JSON
- XML
{
"token": "2fefb577533d4cae919350c450755239",
"from_id": 10,
"limit": 1,
"ui_tags": [
"B2C"
]
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<from_id>10</from_id>
<limit>1</limit>
<ui_tags array='true'>B2C</ui_tags>
</xml>
Response example
- JSON
- XML
{
"data": [
{
"id": 10,
"name": "Government tip",
"list_id": 1,
"is_active": true,
"ui_tags": [
"B2C"
],
"mode": "skip",
"groups": [
{
"ID": 2,
"title": "Sales and promotion"
}
],
"nodes": [
{
"name": "DEFAULT_START_NODE_TITLE",
"type": "start"
},
{
"name": "ANY_IMPORT_START_NODE_TITLE",
"type": "start"
},
{
"name": "Node 1",
"type": "campaign"
},
{
"name": "1 d.0 h.0 m.",
"type": "delay".
},
{
"name": "Approved the offer?",
"type": "condition"
},
{
"name": "Did you receive an SMS message?",
"type": "condition"
},
{
"name": "SMS acquaintance",
"type": "campaign".
},
{
"name": "1 d.0 h.0 m.",
"type": "delay".
},
{
"name": "Application to a call center or other product ",
"type": "feedback"
},
{
"title": "Guidelines",
"type": "feedback"
},
{
"name": "Specify code",
"type": "promo_attach"
},
{
"title": "Offer",
"type": "campaign"
}
]
}
],
"error": 0,
"error text": "Operation completed successfully",
"next_from_id": 11,
"total": 3
}
<xml>
<data>
<groups>
<id>2</id>
<name>Sales and promotion</name>
</groups>
<id>10</id>
<is_active>true</is_active>
<list_id>1</list_id>
<mode>skip</mode>
<name>Administrative chain</name>
<nodes>
<name>Trigger email</title>
<type>campaign</type>
</nodes>
<nodes>
<name>1 d.0 h.0 m.</name>
<type>delay</type>
</nodes>
<nodes>
<name>Have you confirmed your subscription?</name>
<type>condition</type>
</nodes>
<nodes>
<name>Did you get a text message?</name>
<type>condition</type>
</nodes>
<nodes>
<name>SMS message</name>
<type>campaign</type>
</nodes>
<nodes>
<name>1 d.0 h.0 m.</name>
<type>delay</type>
</nodes>
<nodes>
<name>Stop at a call center or other place </name>
<type>feedback</type>
</nodes>
<nodes>
<name>Public organizations</name>
<type>feedback</type>
</nodes>
<nodes>
<name>Specify the promo code</name>
<type>promo_attach</type>
</nodes>
<nodes>
<name>Advertising campaign</title>
<type>campaign</type>
</nodes>
<ui_tags>B2C</ui_tags>
</data>
<error>0</error>
<error text>The operation was completed successfully</error_text>
<next line ID>11</next line ID>
<total number>3</total number>
</xml>
Response parameters
Parameter | Type | description |
---|---|---|
error | int | Error code |
error_text | string | Error text |
id | int | Resource ID |
name | string | Resource name |
list_id | int | Database ID |
is_active | bool | Active or inactive scenario |
mode | string | Mode if the profile is recaptured by the scenario |
ui_tags | array | List of tags |
groups | array of objects | List of groups |
nodes | array of objects | List of nodes |
total_count | int | Total resources count |