Api session event editor netsetting set boolean: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
API Endpoint: editornetsetting/set_boolean. | API Endpoint: editornetsetting/set_boolean. | ||
Description: Set Boolean | |||
{|class=wikitable | {|class=wikitable | ||
| Line 37: | Line 35: | ||
===Example POST=== | ===Example POST=== | ||
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", true ]' | |||
</syntaxhighlight> | |||
Curl example multi item 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", false ]' | <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 ]' | ||
| Line 45: | Line 47: | ||
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", true ]' | ||
}; | }; | ||
fetch("https://engine.tygron.com/api/session/event/editornetsetting/set_boolean/", options) | fetch("https://engine.tygron.com/api/session/event/editornetsetting/set_boolean/", options) | ||
Latest revision as of 13:38, 14 April 2026
API Endpoint: editornetsetting/set_boolean.
Description: 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", true ]'Curl example multi item 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", true ]'
};
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));