Api session event logic measurement item add: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 4: | Line 4: | ||
{|class=wikitable | {|class=wikitable | ||
! | !Index | ||
!Importance | !Importance | ||
!Type | !Type | ||
| Line 58: | Line 58: | ||
|} | |} | ||
===Example POST=== | ===Example POST=== | ||
Curl example POST | Curl example POST | ||
<syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/session/event/logic/measurement_item_add/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, "SETTINGS", 1, "Identifying Key", "Item measurement", true ]' | <syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/session/event/logic/measurement_item_add/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, "SETTINGS", 1, "Identifying Key", "Item measurement", true ]' | ||
</syntaxhighlight> | </syntaxhighlight> | ||
JavaScript example POST | JavaScript example POST | ||
<syntaxhighlight lang="text" copy>var options = { | <syntaxhighlight lang="text" copy>var options = { | ||
method: "POST", | method: "POST", | ||
Latest revision as of 12:07, 15 June 2026
API Endpoint: api/session/event/logic/measurement_item_add/
Description: Add a ItemMeasurement for an Overlay.
| Index | Importance | Type | Description | Values |
|---|---|---|---|---|
| 0 | REQUIRED | (OVERLAY Integer ID) | Overlay ID | |
| 1 | REQUIRED | (Enumeration) | Maplink ID | ACTION_LOGS, ACTION_MENUS, ADDRESSES, AREAS, ATTRIBUTE_ACTIONS, BUILDINGS, CHAT_CHANNELS, CHAT_MESSAGES, CINEMATIC_DATAS, CLIENT_WORDS, COSTS, CUSTOM_GEOMETRIES, DEFAULT_WORDS, ERROR_LOGS, EVENT_BUNDLES, EXCEL_SHEETS, FUNCTION_OVERRIDES, FUNCTIONS, GEO_LINKS, GEO_OPTIONS, GEO_PLUGINS, GEO_TIFFS, GLOBALS, HEIGHTS, INCOMES, INDICATORS, LEVEES, MEASUREMENTS, MEASURES, MODEL_DATAS, MODEL_SETS, MONEY_TRANSFERS, NEIGHBORHOODS, NET_CLUSTERS, NET_FUNCTIONS, NET_LINES, NET_LOADS, NET_NODES, NET_SETTINGS, NEURAL_NETWORKS, OVERLAYS, PANELS, PARAMETRIC_DESIGNS, PARAMETRIC_EXAMPLES, PARTICLE_EMITTERS, PLOTS, POPUPS, PROGRESS, PROJECT_ASSETS, RECORDINGS, SCENARIOS, SERVER_WORDS, SETTINGS, SOUNDS, SOURCES, SPECIAL_EFFECTS, SPECIAL_OPTIONS, STAKEHOLDERS, TERRAIN_TYPE_OVERRIDES, TERRAIN_TYPES, TERRAINS, TEXTURES, TIMES, TRIGGERS, UNIT_DATA_OVERRIDES, UNIT_DATAS, UPGRADE_TYPES, WATER_VALUES, WEATHERS, ZIP_CODES or ZONES |
| 2 | REQUIRED | (Integer number) | Item ID | |
| 3 | REQUIRED | (String) | Identifying Key | |
| 4 | REQUIRED | (String) | Name | |
| 5 | REQUIRED | (true, false) | Save Measurement | true or false |
Response Codes
| Response Code: | Description |
|---|---|
| 200 | Integer (Measurement ID) |
| 300-600 | Codes Overview |
Example POST
Curl example POST
curl 'https://engine.tygron.com/api/session/event/logic/measurement_item_add/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, "SETTINGS", 1, "Identifying Key", "Item measurement", true ]'JavaScript example POST
var options = {
method: "POST",
headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
body: '[ 1, "SETTINGS", 1, "Identifying Key", "Item measurement", true ]'
};
fetch("https://engine.tygron.com/api/session/event/logic/measurement_item_add/", options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));