Data Event Formats - Levels
Summary
CWMS needs an message structure to notify clients of location level-related events.
Opinions
Opinion 1
Summary: Use the structures described below for location level-related events.
All messages will be published to the appropriate REALTIME_OPS topic. Subscribers can set up appropriate filters to receive the desired messages.
Author: Mike Perryman
Specified Levels
Only values necessary to uniquely identify a specified level (“type”, “specified_level_id”) are required for SpecifiedLevelCreated, SpecifiedLevelUpdated, and SpecifiedLevelDeleted messages.
SpecifiedLevelCreated Message Structure
Message Type |
Structure |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SpecifiedLevelCreated |
|
Example SpecifiedLevelCreated message
{
"type": "specified_level_created",
"specified_level_id": {
"office_id": "SWT",
"name": "24-hr Surveilance"
},
"description": "Level at which 24-hour surveillance is required"
}
SpecifiedLevelUpdated Message Structure
Message Type |
Structure |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SpecifiedLevelUpdated |
|
Example SpecifiedLevelUpdated message
{
"type": "specified_level_updated",
"specified_level_id": {
"office_id": "SWT",
"name": "24-hr Surveilance"
},
"description": "Lowest level at which 24-hour surveillance is required"
}
SpecifiedLevelDeleted Message Structure
Message Type |
Structure |
|||||||||
|---|---|---|---|---|---|---|---|---|---|---|
SpecifiedLevelDeleted |
|
Example SpecifiedLevelDeleted message
{
"type": "specified_level_deleted",
"specified_level_id": {
"office_id": "SWT",
"name": "24-hr Surveilance"
},
}
Location Levels
Only values necessary to uniquely identify a location level (“type”, “location_level_id”, “effective_time”, and “virtual”) are required for LocationLevelCreated, LocationLevelUpdated, and LocationLevelDeleted messages.
If the location level has an attribute, “attribute_id”, “attribute_value”, and “attribute_name” are also required.
LocationLevelCreated Message Structure
Message Type |
Structure |
|||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
LocationLevelCreated |
|
Example LocationLevelCreated message
{
"type": "location_level_created",
"location_level_id": {
"office_id": "SWT",
"name": "Keystone.Elev.Inst.0.24-hr Surveillance"
},
"effective_time": 1782190800000,
"virtual": false,
"constant_value": 727.4,
"constant_value_unit": "ft"
}
LocationLevelUpdated Message Structure
Message Type |
Structure |
|||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
LocationLevelUpdated |
|
Example LocationLevelUpdated message
{
"type": "location_level_updated",
"location_level_id": {
"office_id": "SWT",
"name": "Keystone.Elev.Inst.0.24-hr Surveillance"
},
"effective_time": 1782190800000,
"virtual": false,
"constant_value": 727.4,
"constant_value_unit": "ft",
"level_comment": "Updated after embankment remediation"
}
LocationLevelDeleted Message Structure
Message Type |
Structure |
||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
LocationLevelDeleted |
|
Example LocationLevelDeleted message
{
"type": "location_level_deleted",
"location_level_id": {
"office_id": "SWT",
"name": "Keystone.Elev.Inst.0.24-hr Surveillance"
},
"effective_time": 1782190800000,
"virtual": false
}
Decision Status
Status: request for comments