Parking Planning

You can use two methods to retrieve Parking Planning data.
  1. Via WebSocket to retrieve near-real-time data based on:
    • AssetUid
    • Locations
    • LocationUid
  2. Via REST APIs to retrieve historical data based on:
    • AssetUid
    • Locations
    • LocationUid
    Note: You can only retrieve one event type - either PKIN or PKOUT - when retrieving historical data.

Near-Real-Time Data

The WebSocket URL provides a link to near-real-time data for vehicle parking at the specified monitored location. You must use a WebSocket client to retrieve this data.

Retrieve Near-Real-Time Data by AssetUid

WebSocket URL wss://<production url>/events
JSON Request Parameters {“assetUid":"<assetUID>","eventTypes":["<eventType1>","<eventType2>”]}
Sample JSON Request {“assetUid":"CAMERA-HYP1083-CAM-L","eventTypes":["PKIN","PKOUT”]}

JSON Request Parameters

Parameter Description Required? Filter Values
assetUid GE identifier for the device. Yes Value such as "CAMERA-HYP1083-CAM-L".
eventType Filter for parking events. Yes Insert the following enumeration codes to identify vehicles entering and exiting parking spaces:
PKIN
Receive a list of vehicles (identified by objectUid) entering parking areas within the boundaries.
PKOUT
Receive a list of vehicles (identified by objectUid) exiting parking areas within the boundaries.

Retrieve Near-Real-Time Data by Locations

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

JSON Request Parameters

Parameter Description Required? Filter Values
bbox The GPS-defined area containing the asset No GPS values that define the bounding box area
eventTypes Filter for parking events. Yes Insert the following enumeration codes to identify vehicles entering and exiting parking spaces:
PKIN
Receive a list of vehicles (identified by objectUid) entering parking areas within the boundaries.
PKOUT
Receive a list of vehicles (identified by objectUid) exiting parking areas within the boundaries.

Retrieve Near-Real-Time Data by LocationUid

WebSocket URL wss://<production url>/events
JSON Request Parameters {“locationUid":"<location-UID>","eventTypes":[" <eventType1>","< eventType2>"]}
Sample JSON Request {“locationUid":"LOCATION-282","eventTypes":["PKIN,PKOUT"]}

JSON Request Parameters

Parameter Description Required? Filter Values
locationUid The identifier assigned to this location Yes Value such as "LOCATION-282"
eventType Filter for pedestrian events. Yes Insert the following enumeration codes to identify vehicles entering and exiting parking spaces:
PKIN
Receive a list of vehicles (identified by objectUid) entering parking areas within the boundaries.
PKOUT
Receive a list of vehicles (identified by objectUid) exiting parking areas within the boundaries.

Sample Response

Note: You must use a WebSocket client to retrieve this data.
{
"locationUid": "LOCATION-282",
"assetUid": "CAMERA-HYP1070-CAM-R",
"eventType": "PKIN",
"timestamp": 1474479726251,
"properties": {
"pixelCoordinates": "33:-117,33:-117,33:-117,33:-117",
"eventUid": "Q0FNRVJBLUhZUDEwNzAtQ0FNLVIsMTQ3NDQ3OTcyNjI1MQ==",
"objectUid": "1474479726",
      "geoCoordinates": "32.7134021:-117.1575105,32.7133999:-117.1574874,32.7133482:-117.1574878,32.7133504:-117.1575100",
      "imageAssetUid": "CAMERA-HYP1070-CAM-R"
},
"measures": {}
}
Note: The above example shows the "timestamp" interval in seconds, but the PARKING simulation interval is shown in minutes.

Retrieve Historical Data by AssetUid

METHOD GET
URI for PKIN <production url>/v2/assets/{assetUid}/events?eventType=PKIN{startTime,endTime}
URI for PKOUT <production url>/v2/assets/{assetUid}/events?eventType=PKOUT{startTime,endTime}
Sample Request URI for PKIN <production url>/v2/assets/CAMERA-HYP1070-CAM-F/events?eventType=PKIN&startTime=1473897230802&endTime=1473898239338
Sample Request URI for PKOUT <production url>/v2/assets/CAMERA-HYP1070-CAM-F/events?eventType=PKOUT&startTime=1473897230802&endTime=1473898239338

Query Parameters

Parameter Description Required? Filter Values
assetUid GE identifier for the device. Yes Value such as CAMERA-HYP1070-CAM-F.
events? Query for historical data Yes eventTypes
eventTypes Filter for parking events. Yes Insert the following enumeration codes to identify vehicles entering and exiting parking spaces:
PKIN
Receive a list of vehicles (identified by objectUid) entering parking areas within the boundaries.
PKOUT
Receive a list of vehicles (identified by objectUid) exiting parking areas within the boundaries.
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 Locations

METHOD GET
URI for PKIN <production url>/v2/locations/events?bbox={lat,long}&locationType=PARKING_ZONE&eventTypes=PKIN{startTime,endTime}
URI for PKOUT <production url>/v2/locations/events?eventTypes=PKOUT&bbox={lat,long}&locationType=PARKING_ZONE&{startTime,endTime}
Sample Request URI for PKIN <production url>/v2/locations/events?bbox=32.715675:-117.161230,32.708498:-117.151681&locationType=PARKING_ZONE&eventTypes=PKIN&startTime=1473897230802&endTime=1473898239338
Sample Request URI for PKOUT <production url>/v2/assets/CAMERA-HYP1070-CAM-F/events?eventTypes=PKOUT&startTime=1473897230802&endTime=1473898239338

Query Parameters

Parameter Description Required? Filter Values
bbox GPS location for the event. Yes Value such as 32.715675:-117.161230,32.708498:-117.151681.
events? Query for historical data   eventTypes
locationType Filter by type of location. No See the enumeration codes for locationType in the Glossary for Intelligent Cities.
eventTypes Filter for parking events. Yes Insert the following enumeration codes to identify vehicles entering and exiting parking spaces:
PKIN
Receive a list of vehicles (identified by objectUid) entering parking areas within the boundaries.
PKOUT
Receive a list of vehicles (identified by objectUid) exiting parking areas within the boundaries.
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 for PKIN <production url>/v2/locations/{LocationUid}/events?eventTypes=PKIN{startTime,endTime,size,page}
URI for PKOUT <productionurl>/v2/locations/{LocationUid}/events?eventTypes=PKOUT&{startTime,endTime,size,page}
Sample Request URI for PKIN <production url>/v2/locations/LOCATION-282/events?eventTypes=PKIN&startTime=1473897230802&endTime=1473898239338
Sample Request URI for PKOUT <production url>/v2//locations/LOCATION-282/events?eventTypes=PKOUT&startTime=1473897230802&endTime=1473898239338

Query Parameters

Parameter Description Required? Filter Values
locationUid Location of a specific asset. Yes Value such as LOCATION-282.
events? Query for historical data Yes eventTypes
eventTypes Filter for parking events. Yes Insert the following enumeration codes to identify vehicles entering and exiting parking spaces:
PKIN
Receive a list of vehicles (identified by objectUid) entering parking areas within the boundaries.
PKOUT
Receive a list of vehicles (identified by objectUid) exiting parking areas within the boundaries.
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 Unique, customer-defined identifier, for a specific location within the monitored area.
assetUid String The customer-defined identifier for a specific asset at this location.
eventTypes String Identifies this type of event:
PKIN
Vehicle entering parking space.
PKOUT
Vehicle exiting parking space.
timestamp Number Actual timestamp records when an event occurred. Timestamps are in EPOCH format.
properties String
pixelCoordinates
Local coordinates of the identified vehicle in the image. The coordinates of the four corners of the vehicle are provided.
eventUid
The unique identifier assigned to a specific parking event.
objectUid
The unique identifier of a specific vehicle.
geoCoordinates
The GPS coordinates of a vehicle.
imageAssetUid
The unique identifier of the camera that provided the image.
Note: To retrieve the image, use the Media-on-Demand API by providing the imageAssetUid and timestamp from this response.
measures String There is no content for this field.

Sample Response

{
  "content": [
    {
      "locationUid": "LOCATION-282",
      "assetUid": "CAMERA-HYP1070-CAM-R",
      "eventTypes": "PKOUT",
      "timestamp": 1473897364055,
      "properties": {
        "pixelCoordinates": "33:-117,33:-117,33:-117,33:-117",
          "objectUid": "1473897356",
        "geoCoordinates": "32.7134562:-117.1575102,32.7134535:-117.1574876,32.7133999:-117.1574874,32.7134021:-117.1575105",
        "imageAssetUid": "CAMERA-HYP1070-CAM-R"
      },
      "measures": {}
    }