|
Tags: Blanking Manual revert |
| Line 1: |
Line 1: |
| API Endpoint: api/session/query/
| |
|
| |
|
| ===GET===
| |
| API Endpoint: api/session/query/
| |
|
| |
| '''Parameters:'''
| |
| {|class=wikitable
| |
| !Name
| |
| !Location
| |
| !Type
| |
| !Default value
| |
| |-
| |
| | f
| |
| | Query
| |
| | [[Format]]
| |
| | JSON
| |
| |-
| |
| | crs
| |
| | Query
| |
| | String
| |
| | EPSG:3857
| |
| |}
| |
|
| |
| ===='''Examples====
| |
| '''Pseudo-Mercator''':
| |
| <syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/?crs=3857&token=API_TOKEN</syntaxhighlight>
| |
|
| |
|
| |
|
| |
| '''Degrees''':
| |
| <syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/?crs=4326&token=API_TOKEN</syntaxhighlight>
| |
|
| |
|
| |
|
| |
| '''Amersfoort / RD New''':
| |
| <syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/?crs=28992&token=API_TOKEN</syntaxhighlight>
| |
|
| |
|
| |
|
| |
| '''Local Coordinates''':
| |
| <syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/?crs=LOCAL&token=API_TOKEN</syntaxhighlight>
| |
|
| |
|
| |
|
| |
| ===GET /{query}===
| |
| API Endpoint: api/session/query/{query}
| |
|
| |
| '''Parameters:'''
| |
| {|class=wikitable
| |
| !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====
| |
| '''Pseudo-Mercator''':
| |
| <syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/?crs=3857&token=API_TOKEN</syntaxhighlight>
| |
|
| |
|
| |
|
| |
| '''Degrees''':
| |
| <syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/?crs=4326&token=API_TOKEN</syntaxhighlight>
| |
|
| |
|
| |
|
| |
| '''Amersfoort / RD New''':
| |
| <syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/?crs=28992&token=API_TOKEN</syntaxhighlight>
| |
|
| |
|
| |
|
| |
| '''Local Coordinates''':
| |
| <syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/?crs=LOCAL&token=API_TOKEN</syntaxhighlight>
| |
|
| |
|
| |
|
| |
| '''SELECT_NAME_WHERE_CATEGORY_IS_STUDENT''':
| |
| <syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/query/SELECT_NAME_WHERE_CATEGORY_IS_STUDENT?crs=3857&f=JSON&token=API_TOKEN</syntaxhighlight>
| |
|
| |
| SELECT_NAME_WHERE_CATEGORY_IS_STUDENT
| |
|
| |
| ===POST===
| |
| API Endpoint: api/session/query/
| |
|
| |
| Consumes: application/x-www-form-urlencoded
| |
|
| |
| '''Parameters:'''
| |
| {|class=wikitable
| |
| !Name
| |
| !Location
| |
| !Type
| |
| !Default value
| |
| |-
| |
| | f
| |
| | Query
| |
| | [[Format]]
| |
| | JSON
| |
| |-
| |
| | crs
| |
| | Query
| |
| | String
| |
| | EPSG:3857
| |
| |}
| |
|
| |
| ===='''Examples====
| |
| '''Curl example POST''':
| |
| <syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/session/query/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '"TQL Query 1"'
| |
| </syntaxhighlight>
| |
|
| |
| '''Curl example multi item POST''':
| |
| <syntaxhighlight lang="text" copy>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" ]'
| |
| </syntaxhighlight>
| |
|
| |
| '''JavaScript example POST''':
| |
| <syntaxhighlight lang="text" copy>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));
| |
| </syntaxhighlight>
| |
|
| |
| ===POST===
| |
| API Endpoint: api/session/query/
| |
|
| |
| '''Parameters:'''
| |
| {|class=wikitable
| |
| !Name
| |
| !Location
| |
| !Type
| |
| !Default value
| |
| |-
| |
| | f
| |
| | Query
| |
| | [[Format]]
| |
| | JSON
| |
| |-
| |
| | crs
| |
| | Query
| |
| | String
| |
| | EPSG:3857
| |
| |}
| |
|
| |
| ===='''Examples====
| |
| '''Curl example POST''':
| |
| <syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/session/query/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '"TQL Query 1"'
| |
| </syntaxhighlight>
| |
|
| |
| '''Curl example multi item POST''':
| |
| <syntaxhighlight lang="text" copy>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" ]'
| |
| </syntaxhighlight>
| |
|
| |
| '''JavaScript example POST''':
| |
| <syntaxhighlight lang="text" copy>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));
| |
| </syntaxhighlight>
| |
|
| |
| {{article end
| |
| |seealso=
| |
| *[[Endpoints]]
| |
| }}
| |
|
| |
| [[Category:API]]
| |