Skip to main content

Update segmentation query

Description

Update segmentation query.

Request URL

Method: POST

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

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
idint1YesQuery ID
namestring"Main query"YesQuery name
shortnamestring"query1"YesQuery shortname
descriptionstring"query to the DB"NoQuery description
connector_idint2YesExternal DB ID
columnstring"author"YesColumn used to search for profiles
sqlstring"SELECT * FROM table"NoSQL query
cache_time_minint35NoResult caching time
groups_id[]int[ 0, 1 ]NoList of group IDs to search for<br/>default – []<br/>
parametersobject
{
"name": "CITY",
"type": "string",
"title": "head",
"options_type": "query"
}
NoParameters of user variables used in SQL queries

Request example

{
"token": "abcdefghijklmnqrstuvwxyz",
"id": 1,
"name": "Main Query",
"shortname": "query1",
"sql": "SELECT * FROM table",
"connector_id": 1,
"column": "price"
}

Response example

{
"data": {
"saved_id": 1
},
"error": 0,
"error_text": "Successful operation",
}

Response parameters

ParameterTypeDescription
errorintError code
error_textstringError text
saved_idintUpdated query ID