Api session event editor chatchannel set tools
Jump to navigation
Jump to search
API Endpoint: api/session/event/editorchatchannel/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 | (Tool or multiple values in array [a, b, c]) | Tool[][] |
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/editorchatchannel/set_tools/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, [ [ "GET_SUMMARY", "VALIDATE_QUERY" ], [ "GET_SUMMARY", "EXECUTE_ENDPOINT" ], [ "VALIDATE_QUERY", "GET_SUMMARY" ] ] ]'Curl example multi item POST
curl 'https://engine.tygron.com/api/session/event/editorchatchannel/set_tools/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ [ 1, 2, 3 ], [ [ "SEARCH_PAGE", "GET_PAGE" ], [ "SEARCH_PAGE", "EXECUTE_ENDPOINT" ], [ "GET_PAGE", "SEARCH_PAGE" ] ] ]'JavaScript example POST
var options = {
method: "POST",
headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
body: '[ 1, [ [ "GET_SUMMARY", "VALIDATE_QUERY" ], [ "GET_SUMMARY", "EXECUTE_ENDPOINT" ], [ "VALIDATE_QUERY", "GET_SUMMARY" ] ] ]'
};
fetch("https://engine.tygron.com/api/session/event/editorchatchannel/set_tools/", options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));