Skip to main content

Get segmentation query information

Description

Retrieves detailed segmentation query information.

Request URL

Method: POST

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

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
idint1Yes, if shortname is not specifiedQuery ID
shortnamestring"query1"Yes, if id is not specified`Query shortname

Request example

{
"id": 2,
"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 example

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