Returns all occupancy trends data for a particular camera over a specified time range.
Responses will include the start and end time of the data requested and device information (ID, serial number) alongside the readings.
The GET Occupancy Trend Data endpoint allows users to programmatically retrieve the Occupancy Trends data from their Command organization. This enables the use of Verkada analytics data within 3rd party systems for further analysis or cross-referencing with other databases.
To retrieve the Occupancy Trends data using this endpoint, users will need to input the camera_id
from which they are looking to retrieve the data. The specified camera_id
must already have Occupancy Trends enabled in Command for the GET request to be successful.
The GET Occupancy Trends Data endpoint has 3 optional parameters that can be used for more targeted queries:
- Time interval - users can input a
start_time
and anend_time
to query the data from a specific time range. If no time range is specified, the endpoint will retrieve the object counts for the past hour. Additionally, the default time interval for the returned results will be 1 hour but this can be changed to 15 minutes, 6 hours, 12 hours, 1 day, or 30 days. - Object type - users can specify the
type
, which can either bepeople
to retrieve people occupancy counts orvehicle
for vehicle occupancy counts. - Preset ID - users can retrieve Occupancy Trends data tied to a unique
preset_id
for a more isolated query. Presets are collections of Occupancy Trends lines configured in Command, which allows users to get single line counts or aggregated counts, depending on the preset configuration.
Note: Depending on the specified time range used, the returned JSON may be paginated. See the Pagination page for more information.