Api session event editor global add query: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
API Endpoint: api/session/event/editorglobal/add_query/ | API Endpoint: api/session/event/editorglobal/add_query/ | ||
Description: Add Query | Description: Add a new [[Global]] with a [[Tygron Query Language|TQL Query]] | ||
{|class=wikitable | {|class=wikitable | ||
| Line 13: | Line 13: | ||
| REQUIRED | | REQUIRED | ||
| (String) | | (String) | ||
| | | [[Tygron Query Language|TQL Query]] | ||
| | | | ||
|} | |} | ||
| Line 22: | Line 22: | ||
|- | |- | ||
| 200 | | 200 | ||
| Integer ( | | Integer (Global) | ||
|- | |- | ||
| 300-600 | | 300-600 | ||
| Line 29: | Line 29: | ||
===Example POST=== | ===Example POST=== | ||
Curl example POST | Curl example POST | ||
<syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/session/event/editorglobal/add_query/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '" | <syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/session/event/editorglobal/add_query/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '"TQL Query"' | ||
</syntaxhighlight> | </syntaxhighlight> | ||
JavaScript example POST | JavaScript example POST | ||
| Line 35: | Line 35: | ||
method: "POST", | method: "POST", | ||
headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" }, | headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" }, | ||
body: '" | body: '"TQL Query"' | ||
}; | }; | ||
fetch("https://engine.tygron.com/api/session/event/editorglobal/add_query/", options) | fetch("https://engine.tygron.com/api/session/event/editorglobal/add_query/", options) | ||
Latest revision as of 15:29, 10 November 2026
API Endpoint: api/session/event/editorglobal/add_query/
Description: Add a new Global with a TQL Query
| Index | Importance | Type | Description | Values |
|---|---|---|---|---|
| 0 | REQUIRED | (String) | TQL Query |
Response Codes
| Response Code: | Description |
|---|---|
| 200 | Integer (Global) |
| 300-600 | Codes Overview |
Example POST
Curl example POST
curl 'https://engine.tygron.com/api/session/event/editorglobal/add_query/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '"TQL Query"'JavaScript example POST
var options = {
method: "POST",
headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
body: '"TQL Query"'
};
fetch("https://engine.tygron.com/api/session/event/editorglobal/add_query/", options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));