Environmental Planning

Environmental Planning

This API provides details on localized environmental conditions, such as acceleration, humidity, pressure, and temperature.

There are three ways to retrieve near-real-time data:
  • By AssetUid
  • By eventTypes
  • By LocationUid
There are three ways to retrieve historical data:
  • By AssetUid
  • By eventTypes
  • By LocationUid
Note: the timestamp returned is the end of the averaging interval; for environmental data, this interval begins 15 minutes earlier. For example, if you are trying to capture environmental data on May 28th as of 11:00:00, you will need to include data from the beginning of the interval at 10:45:00.
Note: EPOCH format is a 13 digit format.

Retrieve Near-Real-Time Data by AssetUid (Websocket)

WebSocket URL wss://<production url>/events
JSON Request Parameters {“assetUid":"<assetUID>","eventTypes":["<eventType1>”]}
Sample JSON Request {“assetUid":"ENV-STG-HYP1065","eventTypes":["TEMPERATURE”]}

JSON Request Parameters

Parameter Description Required? Filter Values
assetUid GE identifier for the device. Yes Value such as "ENV-STG-HYP1065".
eventTypes Type of event. Yes Provides values for enumeration codes:
  • HUMIDITY
  • ORIENTATION
  • PRESSURE
  • TEMPERATURE

Retrieve Near-Real-Time Data by EventTypes

WebSocket URL wss://<production url>/events
JSON Request Parameters {"bbox":"<lat1:long1>,<lat2:long2 >","eventTypes":[“ <eventType1>”]}
Sample JSON Request {"bbox":"32.715675:-117.161230,32.708498:-117.151681","eventTypes":[“PRESSURE”]}

JSON Request Parameters

Parameter Description Required? Filter Values
bbox GPS location of the asset Yes Value such as "32.715675:-117.161230,32.708498:-117.151681".
eventTypes Filter for ENVIRONMENTAL events. Yes Receive a list of environmental nodes or events.

Retrieve Near-Real-Time Data by LocationUid

WebSocket URL wss://<production url>/events
JSON Request Parameters {“locationUid":"<location-UID>","eventTypes":[“ <eventType1>”]}
Sample JSON Request {“locationUid":"ENVIRONMENTAL_NODE_LOCATION","eventTypes":["ACCELERATION"]}

JSON Request Parameters

Parameter Description Required? Filter Values
locationUid The unique identifier assigned to a given location. Yes Value such as "ENVIRONMENTAL_NODE_LOCATION_282".
eventTypes Filter for traffic events. Yes Receive a list of environmental nodes or events.

Retrieve Historical Data by AssetUid

METHOD GET
URI <production url>/v2/assets/{assetUid}events?eventTypes=TEMPERATURE&(startTime,endTime)
Sample Request URI <production url>/v2/assets/ENV-STG-HYP1065-internal/events?eventType=TEMPERATURE&startTime=1485824591000&endTime=1485835391000
Table 1. Query Parameters
Parameter Description Required? Filter Values
assetUid GE identifier for the device. Yes For example, ENV-STG-HYP1065.
eventTypes Type of event. Yes Receive a list of environmental nodes or events.
startTime Start time (timestamp) recorded in EPOCH format. Yes Numerical value, such as 1453766705577.
endTime End time (timestamp) recorded in EPOCH format. Yes Numerical value, such as 1463776715579.

Retrieve Historical Data by Locations

Query Parameters

Parameter Description Required? Filter Values
bbox The GPS-defined area containing the asset Yes For example, 32.715675:-117.161230,32.708498:-117.151681
eventTypes Type of event. Yes Receive a list of environmental nodes or events.
startTime Start time (timestamp) recorded in EPOCH format. Yes Numerical value, such as 1453766605577.
Note: If you use the same timestamp for startTime and endTime, a single result will be returned.
endTime End time (timestamp) recorded in EPOCH format. Yes Numerical value, such as 1453772603879.

Retrieve Historical Data by LocationUid

METHOD GET
URI <production url>/v2/locations/{locationUid}/events?eventTypes=&{startTime,endTime}
Sample Request URL <production url>/v2/locations/ENVIRONMENTAL_NODE_LOCATION_282/events?eventTypes=TEMPERATURE&startTime=1473897230802&endTime=1473898239338

Query Parameters

Parameter Description Required? Filter Values
locationUid GE identifier for the location. Yes For example, ENVIRONMENTAL_NODE_LOCATION_282
events? Query for historical data Yes eventTypes
eventTypes Type of event. Yes Receive a list of environmental nodes or events.
startTime Start time (timestamp) recorded in EPOCH format. Yes Numerical value, such as 1453766605577.
Note: If you use the same timestamp for startTime and endTime, a single result will be returned.
endTime End time (timestamp) recorded in EPOCH format. Yes Numerical value, such as 1453772603879.

Response Parameters

Parameter Data Type Description
locationUid String A unique identifier established by a customer or external resource for locating environmental assets.
assetUid String A unique identifier established by a customer or external resource for the environmental assets.
eventTypes String Identifies the Environmental event types.
timestamp Number Timestamp recorded in EPOCH format.

Sample Response


{
  "content": [
    {
      "locationUid": "ENVIRONMENTAL_NODE_LOCATION",
      "assetUid": "ENV-STG-HYP1065-internal",
      "eventType": "TEMPERATURE",
      "timestamp": 1485824607146,
      "properties": {
        "unit": "KELVIN",
        "powerOf10": "-1"
      },
      "measures": {
        "max": 2700,
        "mean": 2699,
        "median": 2699,
        "min": 2692
      }
    }