---
title: "Get Sensor Data"
method: GET
path: "/environment/v1/data"
tags: ["Data"]
---

# Get Sensor Data

`GET /environment/v1/data`

Returns all sensor readings for a particular sensor 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.

## Query parameters

- `device_id` string, required — The unique identifier of the device.
- `start_time` integer — The start of the time range for requested sensor data. Formatted as a Unix timestamp in seconds. Defaults to an hour from the current time.
- `end_time` integer — The end of the time range for requested sensor data. Formatted as a Unix timestamp in seconds. Defaults to the current time.
- `page_token` string — The pagination token used to fetch the next page of results.
- `page_size` integer — The number of items returned in a single response. Default is 100. Max is 200.
- `fields` string — One or multiple comma separated values from <code>humidity</code>, <code>motion</code>, <code>noise_level</code>, <code>pm_2_5</code>, <code>pm_4_0</code>, <code>pm_1_0_0</code>, <code>tamper</code>, <code>temperature</code>, <code>tvoc</code>(SV11), <code>usa_air_quality_index</code>, <code>vape_index</code>, <code>carbon_dioxide</code>, <code>carbon_monoxide</code>, <code>barometric_pressure</code>, <code>formaldehyde</code>, <code>ambient_light</code>, <code>tvoc_index</code>(SV23/SV25), <code>heat_index</code>. If blank, all sensor readings will be returned in the response.
- `interval` string — The time interval for the requested sensor data. Data is stored with 1 second intervals for 30 days, and with 5 minute intervals for data between 30 days and 365 days old. A valid value for this field is a number followed by a supported format. Supported formats are <code>s</code>, <code>m</code>, and <code>h</code> for seconds, minutes, and hours, respectively. For example, `5m` would specify a 5 minutes interval for the data. If left blank, a default resolution will be calculated based on time range.

## Response `200`

OK

- SensorDataResponseV1
  - `data` object[]
  - `device_id` string, uuid — The unique identifier of the device.
  - `device_name` string — The name of the device.
  - `device_serial` string — The serial number of the device.
  - `interval` string — The time interval of the requested sensor data.
  - `next_page_token` string — The pagination token used to fetch the next page of results.

---

[API](https://skmtc.net/verkada/apis/api-tokens.md) · [All operations](https://skmtc.net/verkada/apis/api-tokens/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/verkada/api-tokens/revisions/4a79d2d949a6/schema)
