Api session event editor chat set tools: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
Created page with "API Endpoint: api/session/event/editorchat/set_tools/ Description: Set Tools {|class=wikitable !Index !Importance !Type !Description !Values |- | 0 | REQUIRED | (CHAT_CHANNEL Integer ID or multiple integer values in array [1, 2, 3]) | Chat Channels | |- | 1 | REQUIRED | (Tool or multiple values in array [a, b, c]) | Tool[][] | |} ===Response Codes=== {|class=wikitable !Response Code: !Description |- | 200 | Boolean (Content was updated) |- | 300-600 | Codes O..."
 
No edit summary
 
Line 18: Line 18:
| 1
| 1
| REQUIRED
| REQUIRED
| (Tool or multiple values in array [a, b, c])
| (AgentTool or multiple values in array [a, b, c])
| Tool[][]
| AgentTool[][]
|  
|  
|}
|}
Line 35: Line 35:
===Example POST===
===Example POST===
Curl example POST
Curl example POST
<syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/session/event/editorchat/set_tools/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, [ [ "VALIDATE_ENDPOINT", "SEARCH_PAGE" ], [ "VALIDATE_ENDPOINT", "EXECUTE_QUERY" ], [ "SEARCH_PAGE", "VALIDATE_ENDPOINT" ] ] ]'
<syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/session/event/editorchat/set_tools/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, [ [ "EXECUTE_ENDPOINT", "VALIDATE_QUERY" ], [ "EXECUTE_ENDPOINT", "GET_IMAGE" ], [ "VALIDATE_QUERY", "EXECUTE_ENDPOINT" ] ] ]'
</syntaxhighlight>
</syntaxhighlight>
Curl example multi item POST
Curl example multi item POST
<syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/session/event/editorchat/set_tools/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ [ 1, 2, 3 ], [ [ "GET_SUMMARY", "GET_SCREEN" ], [ "GET_SUMMARY", "EXECUTE_QUERY" ], [ "GET_SCREEN", "GET_SUMMARY" ] ] ]'
<syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/session/event/editorchat/set_tools/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ [ 1, 2, 3 ], [ [ "EXECUTE_QUERY", "GET_SUMMARY" ], [ "EXECUTE_QUERY", "GO_TO_LOCATION" ], [ "GET_SUMMARY", "EXECUTE_QUERY" ] ] ]'
</syntaxhighlight>
</syntaxhighlight>
JavaScript example POST
JavaScript example POST
Line 44: Line 44:
 method: "POST",
 method: "POST",
 headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
 headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
 body: '[ 1, [ [ "VALIDATE_ENDPOINT", "SEARCH_PAGE" ], [ "VALIDATE_ENDPOINT", "EXECUTE_QUERY" ], [ "SEARCH_PAGE", "VALIDATE_ENDPOINT" ] ] ]'
 body: '[ 1, [ [ "EXECUTE_ENDPOINT", "VALIDATE_QUERY" ], [ "EXECUTE_ENDPOINT", "GET_IMAGE" ], [ "VALIDATE_QUERY", "EXECUTE_ENDPOINT" ] ] ]'
};
};
fetch("https://engine.tygron.com/api/session/event/editorchat/set_tools/", options)
fetch("https://engine.tygron.com/api/session/event/editorchat/set_tools/", options)

Latest revision as of 08:43, 13 October 2026

API Endpoint: api/session/event/editorchat/set_tools/

Description: Set Tools

Index Importance Type Description Values
0 REQUIRED (CHAT_CHANNEL Integer ID or multiple integer values in array [1, 2, 3]) Chat Channels
1 REQUIRED (AgentTool or multiple values in array [a, b, c]) AgentTool[][]

Response Codes

Response Code: Description
200 Boolean (Content was updated)
300-600 Codes Overview

Example POST

Curl example POST

curl 'https://engine.tygron.com/api/session/event/editorchat/set_tools/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, [ [ "EXECUTE_ENDPOINT", "VALIDATE_QUERY" ], [ "EXECUTE_ENDPOINT", "GET_IMAGE" ], [ "VALIDATE_QUERY", "EXECUTE_ENDPOINT" ] ] ]'

Curl example multi item POST

curl 'https://engine.tygron.com/api/session/event/editorchat/set_tools/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ [ 1, 2, 3 ], [ [ "EXECUTE_QUERY", "GET_SUMMARY" ], [ "EXECUTE_QUERY", "GO_TO_LOCATION" ], [ "GET_SUMMARY", "EXECUTE_QUERY" ] ] ]'

JavaScript example POST

var options = {
 method: "POST",
 headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
 body: '[ 1, [ [ "EXECUTE_ENDPOINT", "VALIDATE_QUERY" ], [ "EXECUTE_ENDPOINT", "GET_IMAGE" ], [ "VALIDATE_QUERY", "EXECUTE_ENDPOINT" ] ] ]'
};
fetch("https://engine.tygron.com/api/session/event/editorchat/set_tools/", options)
 .then(response => response.text())
 .then(result => console.log(result))
 .catch(error => console.log('error', error));