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
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
id | int | 1 | Yes, if shortname is not specified | Query ID |
shortname | string | "query1" | Yes, if id is not specified` | Query shortname |
Request example
- JSON
- XML
{
"id": 2,
"token": "abcdefghijklmnqrstuvwxyz"
}
<xml>
<id>2</id>
<token>abcdefghijklmnqrstuvwxyz</token>
</xml>
Response example
- JSON
- XML
{
"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",
}
<xml>
<data>
<cache_time_min>35</cache_time_min>
<connector_id>1</connector_id>
<description>External DB segment</description>
<id>2</id>
<name>QueryforextDB</name>
<parametrs>
<default_value>low</default_value>
<name>variable1</name>
<title>var</title>
</parametrs>
<shortname>query</shortname>
<sql>SELECT * FROM table</sql>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>
Response example
Parameter | Type | Description |
---|---|---|
error | int | Error code |
error_text | string | Error text |
id | int | Query ID |
name | string | Query name |
shortname | string | Query shortname |
description | string | Query description |
connector_id | int | External DB ID |
column | string | Column used to search for profiles |
sql | string | SQL query |
cache_time_min | int | 35 |
groups_id | []int | List of group IDs to search for default – [] |
parameters | object | Parameters of user variables used in SQL queries |