Api session event editor netsetting set boolean: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
API Event to Set Boolean
API Endpoint to Set Boolean
{|class=wikitable
{|class=wikitable
!Name
!Name
Line 33: Line 33:
Curl Example POST:
Curl Example POST:


<syntaxhighlight lang="text" copy>curl 'https://development.tygron.com/api/session/event/editornetsetting/set_boolean/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ "CLUSTER_FRACTION_CONNECTED", true ]'
<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://development.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 46: Line 42:
 body: '[ "CLUSTER_FRACTION_CONNECTED", true ]'
 body: '[ "CLUSTER_FRACTION_CONNECTED", true ]'
};
};
fetch("https://development.tygron.com/api/session/event/editornetsetting/set_boolean/", options)
fetch("https://engine.tygron.com/api/session/event/editornetsetting/set_boolean/", options)
 .then(response => response.text())
 .then(response => response.text())
 .then(result => console.log(result))
 .then(result => console.log(result))

Revision as of 09:08, 10 April 2026

API 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", true ]'

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));