Get List of Assets

This API returns a list of assets deployed within a bounding box (bbox) that you define with GPS coordinates.

METHOD GET
Request URI <production url>/v1/assets/search?{q,bbox,page,size}
Sample Request URI
PARENT ASSET URI
<production url>/v1/assets/search?q=device-type:NODE&bbox=%32.123:-117,32.709443,-117.153821&size=20&page=1
CHILD ASSET URI:
<production url>/v1/assets/search?device-type=CAMERA&bbox=32.123:-117,32.714983:-117.158012&page=0&size=3

Query Parameters

Parameter Description Required? Filter Values
bbox The bounded area for your search, identified by GPS coordinates.For more information, see the Glossary section. Yes bbox=x1,y1, x2,y2

Replace x1:y1, x2:y2 with GPS coordinates, similar to the following:

32.711637:-117.157330, 32.709443:-117.153821

You can use Google Maps to obtain the latitude and longitude. To locate GPS coordinates for the area and identify the boundaries, place the cursor in the upper left location of the area, then right-click and select What’s here? to obtain the first set of coordinates. Right-click on the lower-right location and repeat this procedure to obtain the second set of coordinates.

q Identifies a "type" query. No Query to search by device type, media-type, or event-type.
device-type Filter by type of device.
Note: If you are using simulated data, use the device-type "DATASIM". If you are using real data from nodes that are installed inside the light fixtures, use the device-type "NODE".
No Insert one of the following enumeration codes to filter by a specific device type.
NODE
Parent asset.
When you filter by NODE and a bounding box, you receive a list of devices attached to each node within the boundaries, such as a camera or microphone.
CAMERA
If you filter by CAMERA, you receive a list of all cameras installed within the bounding box.
MIC
If you filter by MIC, you receive a list of all audio devices installed within the boundaries.
ENV
If you filter by ENV, you receive a list of all environmental sensors installed within the boundaries.
OTHERS
If you filter by OTHERS, you receive a list of non-standard or unknown devices.
DATASIM
If you filter by DATASIM, you receive a list of simulated assets.
media-type Filter by type of media.
Note: Get Media only works from the Public Safety tile. Subscribe to the Public Safety tile to get access to media.
No Insert one of the following enumeration codes for a specific media type.
IMAGE
If you filter by IMAGE, you receive a list of images in in JPG, PNG, or GIF formats.
VIDEO
If you filter by VIDEO, you receive a list of videos in MP4 format.
AUDIO
If you filter by AUDIO, you receive a list of audio files in MP3 or WAV format.
OTHERS
If you filtered by OTHERS, you receive a list of non-standard formats.
event-type Filter by type of event. No Insert one of the following enumeration codes for a specific event type.
PKIN
If you filter by PKIN, you receive a list of vehicles (identified by object-id) entering parking areas within the boundaries.
PKOUT
If you filter by PKOUT you receive a list of vehicles (identified by object-id) exiting parking areas within the boundaries.
SFIN
If you filter by SFIN, you receive a list of pedestrians (identified by object-id) entering monitored areas with within the boundaries.
SFOUT
f you filter by SFOUT, you receive a list of pedestrians (identified by object-id) exiting monitored areas with within the boundaries.
TFEVT
If you filter by TFEVT, you receive a list of traffic flow data.
ENCHG
If you filter by ENCHG, you receive a list of changed environmental conditions, such as temperature.
LIGHT_LEVEL
If you filter by LIGHT_LEVEL, you receive a list of assets that report illuminance sensor events within the specified bounded area.
OCCUPANCY
If you filter by OCCUPANCY, you receive a list of assets that report occupancy sensor events within the specified bounded area.
TEMP
If you filter by TEMP, you receive a list of assets that report temperature sensor events within the specified bounded area.
size Maximum number of records to return per page; if none specified, the default value of 2 is used automatically. No Numerical value, such as 20.
page Indicates the page number; default is 0. No Numerical value, such as 1.

Response Parameters

Parameter Data Type Required? Description
assets Array N/A N/A
coordinates String Yes The GPS coordinates (latitude, longitude) for the referenced device (identified by device-id), such as 32.711653,-117.157314 to identify where the camera is installed.
_links Array Yes The HREFs related to this specific asset.
self
Link to the asset details using the GE identifier. See the Get Asset Details section for information on obtaining additional data.
search-media
Additional query parameters:
  • media-type – IMAGE, AUDIO, VIDEO, OTHERS
  • start-ts – Start time recorded in EPOCH format.
  • end-ts – End time recorded in EPOCH format.
  • page – Pageable results, based on the search filter.
  • size – Maximum number of records per page.
search-events
Additional query parameters:
  • event-type – PKIN, PKOUT, SFIN, SFOUT, TFEVT, ENCHG, TEMP, OCCUPANCY, LIGHT_LEVEL
  • start-ts – Start time recorded in EPOCH format.
  • end-ts – End time recorded in EPOCH format.
  • size – Maximum number of records per page.
live-events
URL to a websocket. You must use a websocket client to retrieve this data.
device-id String Yes A unique identifier established by a customer or external resource. For example, HYP1040-75 to identify a camera.
media-type String Yes Media output. In the sample response data, the camera on the specified node is collecting video and audio to record when vehicles enter and exit a parking space.
IMAGE
If you filtered by IMAGE, you receive a list of images in in JPG, PNG, or GIF formats.
VIDEO
If you filtered by VIDEO, you receive a list of videos in MP4 format.
AUDIO
If you filtered by AUDIO, you receive a list of audio files in MP3 or WAV format.
OTHERS
If you filtered by OTHERS, you receive a list of non-standard formats.
event-type String Yes Event type recorded. In the sample response data, the camera on the specified node is collecting data on parking instances (vehicle in, vehicle out) and traffic flow in the parking area.
PKIN
If you filtered by PKIN, you receive a list of vehicles (identified by object-id) entering parking areas within the boundaries.
PKOUT
If you filtered by PKOUT you receive a list of vehicles (identified by object-id) exiting parking areas within the boundaries.
SFIN
If you filtered by SFIN, you receive a list of pedestrians (identified by object-id) entering monitored areas with within the boundaries.
SFOUT
If you filtered by SFOUT, you receive a list of pedestrians (identified by object-id) exiting monitored areas with within the boundaries.
TFEVT
If you filtered by TFEVT, you receive a list of traffic flow information.
ENCHG
If you filter by ENCHG, you receive a list of changed environmental conditions, such as temperature.
LIGHT_LEVEL
If you filtered by LIGHT_LEVEL, you receive a list of assets that report illuminance sensor events within the specified bounded area.
OCCUPANCY
If you filtered by OCCUPANCY, you receive a list of assets that report occupancy sensor events within the specified bounded area.
TEMP
If you filtered by TEMP, you receive a list of assets that report temperature sensor events within the specified bounded area.
device-type String Yes Type of device that is recording the events.
NODE
Parent asset.
CAMERA
If you filtered by CAMERA, you receive a list of all cameras installed within the bounding box.
MIC
If you filtered by MIC, you receive a list of all audio devices installed within the boundaries.
ENV
If you filtered by ENV, you receive a list of all environmental sensors installed within the boundaries.
OTHERS
If you filtered by OTHERS, you receive a list of non-standard or unknown devices.
_links Array Yes The HREFs to navigate the result using paging.
page Number Yes Pageable information satisfying the search filter.

Sample Response

{
  "_embedded": {
    "assets": [
      {
        "coordinates": {
          "P1": "32.711653,-117.157314"
        },
        "_links": {
          "self": {
            "href": "http://<production url>/v1/assets/1000000018"
          },
          "search-media": {
            "href": "http://<production url>/v1/assets/1000000018/media{?media-types,start-ts,end-ts,page,size,locationId}",
            "templated": true
          },
          "search-events": {
            "href": "http://<production url>/v1/assets/1000000018/events{?event-types,start-ts,end-ts,size}",
            "templated": true
          },
          "live-events": {
            "href": "http://<production url>/v1/assets/1000000018/live-events{?event-types}",
            "templated": true
          }
        },
        "device-id": "HYP1040-75",
        "event-type": "PKIN;PKOUT;TFEVT",
        "media-type": "IMAGE",
        "device-type": "CAMERA"
      },
      {
        "coordinates": {
          "P1": "32.712668,-117.157546"
        },
        "_links": {
          "self": {
            "href": "http://<production url>/v1/assets/1000000019"
          },
          "search-media": {
            "href": "http://<production url>/v1/assets/1000000019/media{?media-types,start-ts,end-ts,page,size,locationId}",
            "templated": true
          },
          "search-events": {
            "href": "http://<production url>/v1/assets/1000000019/events{?event-types,start-ts,end-ts,size}",
            "templated": true
          },
          "live-events": {
            "href": "http://<production url>/v1/assets/1000000019/live-events{?event-types}",
            "templated": true
          }
        },
        "device-id": "HYP1039-72",
        "event-type": "TFEVT;PKOUT;PKIN",
        "media-type": "IMAGE",
        "device-type": "CAMERA"
      },
      {
        "coordinates": {
          "P1": "32.711664,-117.156404"
        },
        "_links": {
          "self": {
            "href": "http://<production url>/v1/assets/1000000020"
          },
          "search-media": {
            "href": "http://<production url>/v1/assets/1000000020/media{?media-types,start-ts,end-ts,page,size,locationId}",
            "templated": true
          },
          "search-events": {
            "href": "http://<production url>/v1/assets/1000000020/events{?event-types,start-ts,end-ts,size}",
            "templated": true
          },
          "live-events": {
            "href": "http://<production url>/v1/assets/1000000020/live-events{?event-types}",
            "templated": true
          }
        },
        "device-id": "HYP1047-88",
        "event-type": "TFEVT;PKIN;PKOUT",
        "media-type": "IMAGE",
        "device-type": "CAMERA"
      }
    ]
  },
  "_links": {
    "first": {
      "href": "http://<production url>/v1/assets/search?device-type=CAMERA&bbox=32:-117,32.714983:-117.158012&page=0&size=3"
    },
    "self": {
      "href": "http://<production url>/v1/assets/search?device-type=CAMERA&bbox=32:-117,32.714983:-117.158012&page=0&size=3"
    },
    "next": {
      "href": "http://<production url>/v1/assets/search?device-type=CAMERA&bbox=32:-117,32.714983:-117.158012&page=1&size=3"
    },
    "last": {
      "href": "http://<production url>/v1/assets/search?device-type=CAMERA&bbox=32:-117,32.714983:-117.158012&page=2&size=3"
    }
  },
  "page": {
    "size": 3,
    "totalElements": 7,
    "totalPages": 3,
    "number": 0