Get template queries list
Description
Retrieves template queries list.
Request URL
Method: POST
https://example.com/api/v1.1/datatables/query_templates/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 | First campaign in the list ID. By default – 1 |
groups | []String | [ "group1", "group2" ] | No | List of access groups |
groups_id | []int | [ 0, 1 ] | No | List of access groups IDs |
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz"
}
<xml>
<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
},
"error": 0,
"error_text": "Successful operation",
}
<xml>
<data>
<connector_id>1</connector_id>
<description>External DB segment</description>
<id>2</id>
<name>QueryforextDB</name>
<shortname>query</shortname>
<sql>SELECT * FROM table</sql>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>
Response parameters
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 |
sql | string | SQL query |
groups_id | []int | List of group IDs to search for default – [] |