Api session event participant net cluster set states
Jump to navigation
Jump to search
API Endpoint: api/session/event/participant/net_cluster_set_states/
Description: Set Timestate for all Net Loads of Net Cluster.
| Name | Importance | Type | Description | Values |
|---|---|---|---|---|
| 0 | REQUIRED | (STAKEHOLDER Integer ID) | Initiating Stakeholder ID | |
| 1 | REQUIRED | (NET_CLUSTER Integer ID) | Net Cluster ID | |
| 2 | REQUIRED | (NetType or multiple values in array [a, b, c]) | Net Type Array | |
| 3 | REQUIRED | (TimeState or multiple values in array [a, b, c]) | Timestate Array (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/participant/net_cluster_set_states/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, 1, "ELECTRICITY", "NOTHING" ]'Curl example multi item POST:
curl 'https://engine.tygron.com/api/session/event/participant/net_cluster_set_states/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, 1, [ "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, 1, "ELECTRICITY", "NOTHING" ]'
};
fetch("https://engine.tygron.com/api/session/event/participant/net_cluster_set_states/", options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));