Api session event logic net clusters set state
Jump to navigation
Jump to search
API Endpoint: api/session/event/logic/net_clusters_set_state/
Description: Per Net Cluster, set all its Net Loads of the provided Net Type to the given Timestate.
| Name | Importance | Type | Description | Values |
|---|---|---|---|---|
| 0 | REQUIRED | (NET_CLUSTER Integer ID or multiple values in array [1, 2, 3]) | Net Cluster IDs | |
| 1 | REQUIRED | (NetType or multiple values in array [a, b, c]) | Net Type of loads to be changed. | |
| 2 | REQUIRED | (TimeState or multiple values in array [a, b, c]) | Timestate (NOTHING, Request_CONSTRUCTION_APPROVAL, Request_ZONING_APPROVAL, READY) |
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/logic/net_clusters_set_state/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, "ELECTRICITY", "NOTHING" ]'Curl example multi item POST:
curl 'https://engine.tygron.com/api/session/event/logic/net_clusters_set_state/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ [ 1, 2, 3 ], [ "ELECTRICITY", "GAS", "HEAT" ], [ "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, "ELECTRICITY", "NOTHING" ]'
};
fetch("https://engine.tygron.com/api/session/event/logic/net_clusters_set_state/", options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));