Api session event editor netnode set location
API Endpoint: editornetnode/set_location.
Description: Set Location
| Name | Importance | Type | Description | Values |
|---|---|---|---|---|
| 0 | REQUIRED | (Enumeration) | Network type | ELECTRICITY, GAS, HEAT, INTERNET or SEWER |
| 1 | REQUIRED | (NET_NODE Integer ID) | Net Node ID | |
| 2 | REQUIRED | (Point 3D with crs: EPSG:3857) | Location Point | |
| 3 | OPTIONAL | (Floating point number) | Node merge distance (optional, default: 1.0m) |
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/editornetnode/set_location/?crs=3857' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '
[ "ELECTRICITY", 1, {
"type" : "Point",
"coordinates" : [ 658654.633845108, 6799345.575040983, -1.4 ]
}, 1.0 ]
'Curl example multi item POST:
curl 'https://engine.tygron.com/api/session/event/editornetnode/set_location/?crs=3857' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '
[ "ELECTRICITY", 1, {
"type" : "Point",
"coordinates" : [ 658776.1176007917, 6799333.787239198, -1.22 ]
}, 1.0 ]
'JavaScript example POST:
var options = {
method: "POST",
headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
body: '[ "ELECTRICITY", 1, { "type" : "Point", "coordinates" : [ 658654.633845108, 6799345.575040983, -1.4 ]}, 1.0 ]'
};
fetch("https://engine.tygron.com/api/session/event/editornetnode/set_location/?crs=3857", options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));