Api session event editor netsetting set boolean: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 38: | Line 38: | ||
Curl example POST: | Curl example POST: | ||
<syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/session/event/editornetsetting/set_boolean/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ "CLUSTER_FRACTION_CONNECTED", | <syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/session/event/editornetsetting/set_boolean/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ "CLUSTER_FRACTION_CONNECTED", false ]' | ||
</syntaxhighlight> | </syntaxhighlight> | ||
JavaScript example POST: | JavaScript example POST: | ||
| Line 45: | Line 45: | ||
method: "POST", | method: "POST", | ||
headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" }, | headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" }, | ||
body: '[ "CLUSTER_FRACTION_CONNECTED", | body: '[ "CLUSTER_FRACTION_CONNECTED", false ]' | ||
}; | }; | ||
fetch("https://engine.tygron.com/api/session/event/editornetsetting/set_boolean/", options) | fetch("https://engine.tygron.com/api/session/event/editornetsetting/set_boolean/", options) | ||
| Line 53: | Line 53: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{article end|seealso=*[[Api session event editor netsetting]] | {{article end|seealso=*[[Api session event editor netsetting]] | ||
*[[Api session items netsettings]] | |||
}} | }} | ||
[[Category:API]] | [[Category:API]] | ||
Revision as of 11:56, 10 April 2026
API Endpoint: editornetsetting/set_boolean.
API Endpoint name is Api session event editor netsetting set boolean.
Use this endpoint to Set Boolean
| Name | Importance | Type | Description | Values |
|---|---|---|---|---|
| 0 | REQUIRED | (Enumeration) | Type | CLUSTER_FRACTION_CONNECTED, CLUSTER_MODELS_ENABLED, ELECTRICITY_ACTIVE, ELECTRICITY_FLOW_ATTRIBUTE, ELECTRICITY_NETWORK_OWNER_ID, FIRST_CONNECT_ACCEPT, GAS_ACTIVE, GAS_FLOW_ATTRIBUTE, GAS_NETWORK_OWNER_ID, HEAT_ACTIVE, HEAT_FLOW_ATTRIBUTE, HEAT_NETWORK_OWNER_ID, INTERNET_ACTIVE, INTERNET_FLOW_ATTRIBUTE, INTERNET_NETWORK_OWNER_ID, LOAD_TO_NODE_LINES_ENABLED, REQUIRE_UTILITY_CORPORATION_APPROVAL, RESTRICT_TO_NET_OVERLAY, SEWER_ACTIVE, SEWER_FLOW_ATTRIBUTE or SEWER_NETWORK_OWNER_ID |
| 1 | REQUIRED | (true, false) | Boolean | true or false |
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/editornetsetting/set_boolean/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ "CLUSTER_FRACTION_CONNECTED", false ]'JavaScript example POST:
var options = {
method: "POST",
headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
body: '[ "CLUSTER_FRACTION_CONNECTED", false ]'
};
fetch("https://engine.tygron.com/api/session/event/editornetsetting/set_boolean/", options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));