Skip to main content

Get segmentation queries list

Description

Retrieves segmentation queries list.

Request URL

Method: POST

https://example.com/api/v1.1/datatables/query_segments/list

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
formatstring"json"NoResponse data format.
By default – json
from_idint1NoFirst campaign in the list ID.
By default – 1
groups[]String[ "group1", "group2" ]NoList of access groups
groups_id[]int[ 0, 1 ]NoList of access groups IDs

Request example

{
"token": "abcdefghijklmnqrstuvwxyz"
}

Response example

{
"data": {
"id": 2,
"name": "QueryforextDB",
"shortname": "query",
"description": "External DB segment",
"sql": "SELECT * FROM table",
"connector_id": 1,
"parametrs": {
"name": "variable1",
"title": "var",
"default_value": "low"
},
"cache_time_min": 35
},
"error": 0,
"error_text": "Successful operation",
}

Response parameters

ParameterTypeDescription
errorintError code
error_textstringError text
idintQuery ID
namestringQuery name
shortnamestringQuery shortname
descriptionstringQuery description
connector_idintExternal DB ID
columnstringColumn used to search for profiles
sqlstringSQL query
cache_time_minint35
groups_id[]intList of group IDs to search for
default – []
parametersobjectParameters of user variables used in SQL queries