Skip to main content

Get template query information

Description

Retrieves detailed template query information.

Request URL

Method: POST

https://example.com/api/v1.1/datatables/query_templates/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
},
"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
sqlstringSQL query
groups_id[]intList of group IDs to search for
default – []