Api session query: Difference between revisions
No edit summary |
No edit summary |
||
| Line 21: | Line 21: | ||
| EPSG:3857 | | EPSG:3857 | ||
|} | |} | ||
===GET /{query}=== | ===GET /{query}=== | ||
| Line 72: | Line 59: | ||
===='''Examples==== | ===='''Examples==== | ||
''' | '''SELECT_FLOORSIZE_WHERE_CATEGORY_IS_ROAD_AND_MAP_IS_MAQUETTE''': | ||
<syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/?crs=3857&token=API_TOKEN</syntaxhighlight> | <syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/SELECT_FLOORSIZE_WHERE_CATEGORY_IS_ROAD_AND_MAP_IS_MAQUETTE?crs=3857&f=JSON&token=API_TOKEN</syntaxhighlight> | ||
'''SELECT_NAME_WHERE_CATEGORY_IS_OFFICES''': | |||
<syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/SELECT_NAME_WHERE_CATEGORY_IS_OFFICES?crs=3857&f=JSON&token=API_TOKEN</syntaxhighlight> | |||
'''SELECT_FLOORSIZE_WHERE_CATEGORY_IS_STUDENT_AND_MAP_IS_CURRENT''': | |||
<syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/SELECT_FLOORSIZE_WHERE_CATEGORY_IS_STUDENT_AND_MAP_IS_CURRENT?crs=4326&f=JSON&token=API_TOKEN</syntaxhighlight> | |||
'''SELECT_NAME_WHERE_CATEGORY_IS_OFFICES''': | |||
<syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/SELECT_NAME_WHERE_CATEGORY_IS_OFFICES?crs=28992&f=JSON&token=API_TOKEN</syntaxhighlight> | |||
''' | '''SELECT_COLOR_WHERE_CATEGORY_IS_PAVED_AREA''': | ||
<syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/?crs= | <syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/SELECT_COLOR_WHERE_CATEGORY_IS_PAVED_AREA?crs=LOCAL&f=JSON&token=API_TOKEN</syntaxhighlight> | ||
''' | '''SELECT_NAME_WHERE_CATEGORY_IS_LUXE''': | ||
<syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/?crs= | <syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/SELECT_NAME_WHERE_CATEGORY_IS_LUXE?crs=3857&f=JSON&token=API_TOKEN</syntaxhighlight> | ||
''' | '''SELECT_FLOORSIZE_WHERE_CATEGORY_IS_PARK_AND_MAP_IS_CURRENT''': | ||
<syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/?crs= | <syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/SELECT_FLOORSIZE_WHERE_CATEGORY_IS_PARK_AND_MAP_IS_CURRENT?crs=4326&f=JSON&token=API_TOKEN</syntaxhighlight> | ||
''' | '''SELECT_COLOR_WHERE_CATEGORY_IS_HEALTHCARE''': | ||
<syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/ | <syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/SELECT_COLOR_WHERE_CATEGORY_IS_HEALTHCARE?crs=28992&f=JSON&token=API_TOKEN</syntaxhighlight> | ||
'''SELECT_NAME_WHERE_CATEGORY_IS_LUXE''': | |||
<syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/SELECT_NAME_WHERE_CATEGORY_IS_LUXE?crs=LOCAL&f=JSON&token=API_TOKEN</syntaxhighlight> | |||
===POST=== | ===POST=== | ||
Revision as of 12:48, 15 June 2026
API Endpoint: api/session/query/
GET
API Endpoint: api/session/query/
Parameters:
| Name | Location | Type | Default value |
|---|---|---|---|
| f | Query | Format | JSON |
| crs | Query | String | EPSG:3857 |
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_ROAD_AND_MAP_IS_MAQUETTE:
https://engine.tygron.com/api/session/query/SELECT_FLOORSIZE_WHERE_CATEGORY_IS_ROAD_AND_MAP_IS_MAQUETTE?crs=3857&f=JSON&token=API_TOKENSELECT_NAME_WHERE_CATEGORY_IS_OFFICES:
https://engine.tygron.com/api/session/query/SELECT_NAME_WHERE_CATEGORY_IS_OFFICES?crs=3857&f=JSON&token=API_TOKENSELECT_FLOORSIZE_WHERE_CATEGORY_IS_STUDENT_AND_MAP_IS_CURRENT:
https://engine.tygron.com/api/session/query/SELECT_FLOORSIZE_WHERE_CATEGORY_IS_STUDENT_AND_MAP_IS_CURRENT?crs=4326&f=JSON&token=API_TOKENSELECT_NAME_WHERE_CATEGORY_IS_OFFICES:
https://engine.tygron.com/api/session/query/SELECT_NAME_WHERE_CATEGORY_IS_OFFICES?crs=28992&f=JSON&token=API_TOKENSELECT_COLOR_WHERE_CATEGORY_IS_PAVED_AREA:
https://engine.tygron.com/api/session/query/SELECT_COLOR_WHERE_CATEGORY_IS_PAVED_AREA?crs=LOCAL&f=JSON&token=API_TOKENSELECT_NAME_WHERE_CATEGORY_IS_LUXE:
https://engine.tygron.com/api/session/query/SELECT_NAME_WHERE_CATEGORY_IS_LUXE?crs=3857&f=JSON&token=API_TOKENSELECT_FLOORSIZE_WHERE_CATEGORY_IS_PARK_AND_MAP_IS_CURRENT:
https://engine.tygron.com/api/session/query/SELECT_FLOORSIZE_WHERE_CATEGORY_IS_PARK_AND_MAP_IS_CURRENT?crs=4326&f=JSON&token=API_TOKENSELECT_COLOR_WHERE_CATEGORY_IS_HEALTHCARE:
https://engine.tygron.com/api/session/query/SELECT_COLOR_WHERE_CATEGORY_IS_HEALTHCARE?crs=28992&f=JSON&token=API_TOKENSELECT_NAME_WHERE_CATEGORY_IS_LUXE:
https://engine.tygron.com/api/session/query/SELECT_NAME_WHERE_CATEGORY_IS_LUXE?crs=LOCAL&f=JSON&token=API_TOKENPOST
API Endpoint: api/session/query/
Consumes: application/x-www-form-urlencoded
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: Bearer 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: Bearer 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": "Bearer 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));POST
API Endpoint: api/session/query/
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: Bearer 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: Bearer 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": "Bearer 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));