Api session query

From Tygron Support wiki
Revision as of 16:06, 20 November 2026 by Server@tygron.com (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

API Base URL: api/session/query/

GET {query}

API Endpoint: api/session/query/{query}

Parameters:

Name Location Type Default value
query Path String
value Query String 0.0
f Query Format JSON
validate Query boolean false
crs Query String EPSG:3857

Examples

SELECT_FLOORSIZE_WHERE_CATEGORY_IS_SHOPPING_AND_MAP_IS_MAQUETTE:

https://engine.tygron.com/api/session/query/SELECT_FLOORSIZE_WHERE_CATEGORY_IS_SHOPPING_AND_MAP_IS_MAQUETTE?crs=3857&f=JSON&token=API_TOKEN

POST query

API Endpoint: api/session/query/

Content-Type: application/x-www-form-urlencoded

Parameters:

Name Location Type Default value
f Query Format JSON
crs Query String EPSG:3857

POST query

API Endpoint: api/session/query/

Content-Type: application/json

Parameters:

Name Location Type Default value
f Query Format JSON
crs Query String EPSG:3857

Examples

Curl example POST:

curl 'https://engine.tygron.com/api/session/query/' -H 'Content-Type: application/json' -H 'Authorization: Basic <credentials> API_TOKEN' -d '"TQL Query 1"'

Curl example multi item POST:

curl 'https://engine.tygron.com/api/session/query/' -H 'Content-Type: application/json' -H 'Authorization: Basic <credentials> API_TOKEN' -d '[ "TQL Query 1", "TQL Query 2", "TQL Query 3" ]'

JavaScript example POST:

var options = {
 method: "POST",
 headers: { "Content-Type": "application/json", "Authorization": "Basic <credentials> API_TOKEN" },
 body: '"TQL Query 1"'
};
fetch("https://engine.tygron.com/api/session/query/", options)
 .then(response => response.text())
 .then(result => console.log(result))
 .catch(error => console.log('error', error));

See also