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 |
|
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.
|
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.
|
event-type | Filter by type of event. | No | Insert one of the following enumeration codes for a specific event type.
|
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. |
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.
|
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.
|
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.
|
device-type | String | Yes | Type of device that is recording the events.
|
_links | Array | Yes | The HREFs to navigate the result using paging. |
page | Number | Yes | Pageable information satisfying the search filter. |
{ "_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