Api session event editor netload set state
Jump to navigation
Jump to search
API Endpoint: editornetload/set_state.
Description: Set State
| Name | Importance | Type | Description | Values |
|---|---|---|---|---|
| 0 | REQUIRED | (NET_LOAD Integer ID or multiple values in array [1, 2, 3]) | Net Load | |
| 1 | REQUIRED | (TimeState or multiple values in array [a, b, c]) | TimeState[] |
Response Codes
| Response Code: | Description |
|---|---|
| 204 | No Content |
| 300-600 | Codes Overview |
Example POST
Curl example POST:
curl 'https://engine.tygron.com/api/session/event/editornetload/set_state/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, "NOTHING" ]'Curl example multi item POST:
curl 'https://engine.tygron.com/api/session/event/editornetload/set_state/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ [ 1, 2, 3 ], [ "NOTHING", "WAITING_FOR_DATE", "REQUEST_PLOT_OWNER_APPROVAL" ] ]'JavaScript example POST:
var options = {
method: "POST",
headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
body: '[ 1, "NOTHING" ]'
};
fetch("https://engine.tygron.com/api/session/event/editornetload/set_state/", options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));