Api session event logic measurement item add: Difference between revisions
Jump to navigation
Jump to search
Created page with "API Endpoint: api/session/event/logic/measurement_item_add/ Description: Add a ItemMeasurement for an Overlay. {|class=wikitable !Name !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_..." |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 4: | Line 4: | ||
{|class=wikitable | {|class=wikitable | ||
! | !Index | ||
!Importance | !Importance | ||
!Type | !Type | ||
| Line 10: | Line 10: | ||
!Values | !Values | ||
|- | |- | ||
|0 | | 0 | ||
|REQUIRED | | REQUIRED | ||
|(OVERLAY Integer ID) | | (OVERLAY Integer ID) | ||
|[[Overlay]] ID | | [[Overlay]] ID | ||
| | | | ||
|- | |- | ||
|1 | | 1 | ||
|REQUIRED | | REQUIRED | ||
|(Enumeration) | | (Enumeration) | ||
|[[Maplink]] ID | | [[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 | | 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 | | 2 | ||
|REQUIRED | | REQUIRED | ||
|(Integer number) | | (Integer number) | ||
|[[Item]] ID | | [[Item]] ID | ||
| | | | ||
|- | |- | ||
|3 | | 3 | ||
|REQUIRED | | REQUIRED | ||
|(String) | | (String) | ||
|Identifying Key | | Identifying Key | ||
| | | | ||
|- | |- | ||
|4 | | 4 | ||
|REQUIRED | | REQUIRED | ||
|(String) | | (String) | ||
|Name | | Name | ||
| | | | ||
|- | |- | ||
|5 | | 5 | ||
|REQUIRED | | REQUIRED | ||
|(true, false) | | (true, false) | ||
|Save [[Measurement]] | | Save [[Measurement]] | ||
|true or false | | true or false | ||
|} | |} | ||
===Response Codes=== | ===Response Codes=== | ||
| Line 51: | Line 51: | ||
!Description | !Description | ||
|- | |- | ||
|200 | | 200 | ||
|Integer (Measurement ID) | | Integer (Measurement ID) | ||
|- | |- | ||
|300-600 | | 300-600 | ||
|Codes Overview | | Codes Overview | ||
|} | |} | ||
===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));