Table of Contents
GET List Devices
Discover the devices your API key can access with GET /v5/devices — query parameters, response fields, organization filtering, pagination, and the expand option.
Table of Contents
GET /v5/devices
Returns a list of every device the authenticated API key can access — so you can discover device IDs without knowing any of them in advance. Use this endpoint to build a device picker, or to gather the device_id values you'll pass to other v5 endpoints (for example, when pulling readings with Get Device Readings).
The list reflects your memberships: it includes devices from organizations you belong to as well as devices shared with you through individual workspaces. You can optionally scope the list to a single organization, page through large result sets, and opt in to extra per-device detail — measurement dates, logging settings, ports, hardware, connectivity, and subscription status.
Authentication
Authenticated with your API key in the X-API-Key header; the user is resolved from the key. See Authentication in the Overview.
Request
Query parameters
Parameter | Type | Required | Default | Description |
| string | No | - | Restricts the list to a single organization. If omitted, the response includes devices across every organization and workspace you can access. See Filtering by organization below. |
| integer | No |
| The page of results to return. 1-indexed; must be ≥ 1. |
| integer | No |
| The maximum number of devices per page. Must be between 1 and 1000. |
| string | No | - | Attaches extra data to each device. Supplied as a single comma-separated list (repeated |
units | string | No |
| Unit system for dimensioned fields, currently a port's |
Example requests
Basic list:
curl "https://api.zentracloud.io/v5/devices" \
-H "X-API-Key: YOUR_API_KEY"
Filter to one organization:
curl "https://api.zentracloud.io/v5/devices?organization_id=c042f395-8466-459b-8b61-7b26557851da" \
-H "X-API-Key: YOUR_API_KEY"
Request a second page of 100 devices:
curl "https://api.zentracloud.io/v5/devices?page_num=2&limit=100" \
-H "X-API-Key: YOUR_API_KEY"
Include each device's measurement range:
curl "https://api.zentracloud.io/v5/devices?expand=max_min_timestamp" \
-H "X-API-Key: YOUR_API_KEY"
Include several expanded objects at once:
curl "https://api.zentracloud.io/v5/devices?expand=max_min_timestamp,settings,hardware,connectivity,subscription" \
-H "X-API-Key: YOUR_API_KEY"
Response
A 200 OK response contains a devices array and a pagination object.
devices[ ]
Each item represents one device. Devices are ordered by device ID (serial number) ascending.
Base fields (always present):
Field | Type | Description |
| string | The unique identifier (serial) for the device. Use this value when calling other v5 endpoints. |
| string | The device's display name. When no custom name has been set, this defaults to the |
| string (UUID) | The organization the device belongs to. |
| string | The display name of the organization the device belongs to. An empty string |
| integer | Numeric code identifying the specific device version. A single model can have more than one |
| string | null | Human-readable model name derived from |
Expanded fields An expand group's key appears only when you request it.
Field | Type | Present when | Description |
| object |
| First and last measurement timestamps. See max_min_timestamp below. |
| object |
| Logging and upload configuration. See settings below. |
| object |
| Firmware and hardware revision. See hardware below. |
| object |
| Communications module and host server. See connectivity below. |
| object |
| Subscription status and expiration. See subscription below. |
| array |
| Per-port sensor configuration. See ports below. |
pagination
Field | Type | Description |
| integer | The page number you requested. The response always echoes the requested page. |
| integer | The maximum number of devices per page. |
| integer | The number of devices returned on this page. |
| integer | The total number of pages available for your full accessible set at the current |
num_devices is the count for the current page, not a total across all pages. The endpoint does not return an exact total device count; use total_pages to iterate.Example response
A base response (no expand).
{
"devices": [
{
"device_id": "A4100001",
"name": "A4100001",
"organization_id": "c042f395-8466-459b-8b61-7b26557851da",
"organization_name": "Forks",
"device_type": 181,
"model": "ATMOS 41W"
},
{
"device_id": "A4100002",
"name": "Butterriver",
"organization_id": "c042f395-8466-459b-8b61-7b26557851da",
"organization_name": "Forks",
"device_type": 181,
"model": "ATMOS 41W"
}
// ... additional devices omitted for brevity
],
"pagination": {
"page_num": 1,
"limit": 50,
"num_devices": 13,
"total_pages": 1
}
}A fully expanded response
(expand=max_min_timestamp,settings,hardware,connectivity,subscription):
{
"devices": [
{
"device_id": "A4100110",
"name": "A4100110",
"organization_id": "1ee7f222-e5d8-4ace-ba71-039143727293",
"organization_name": "Forks",
"device_type": 181,
"model": "ATMOS 41W",
"data_range": {
"first_measurement": 1670611500,
"last_measurement": 1784664000
},
"settings": {
"logging_interval": 10,
"upload_frequency": 60,
"upload_hours": {
"enabled_count": 24,
"all_hours": true
}
},
"hardware": {
"firmware_version": 1.17,
"hardware_revision": null
},
"connectivity": {
"connectivity_type": "cellular",
"module": "4G LTE-M and NB-IoT (SARA-R410M)",
"module_code": "SARA-R410M",
"sim": "89148000007474115272",
"host_server": "in.zentracloud.io",
"pending_host_server": null
},
"subscription": {
"status": "exempt",
"exempt_reason": "dev",
"expiration_date": 1779346800,
"auto_renew": false,
"high_data": false
}
}
// ... additional devices omitted for brevity
],
"pagination": {
"page_num": 1,
"limit": 50,
"num_devices": 4,
"total_pages": 1
}
}Empty result
If your memberships grant access to no devices (or no devices in a filtered organization), the response is still 200 with an empty array and a valid pagination block:
{
"devices": [],
"pagination": {
"page_num": 1,
"limit": 50,
"num_devices": 0,
"total_pages": 0
}
}Filtering by organization
Pass organization_id to restrict the list to a single organization.
- If you are a member of that organization, the response is
200and every returned device belongs to it. - If you have only workspace-level access in that organization (no full-organization membership), the response is still
200, restricted to the devices shared with you through your workspace(s) there. Workspace access counts as membership. - If you are not a member of the organization at all, the response is
403 Forbidden— never a silently empty200. This lets you distinguish "you don't have access" from "you have access, but there are no devices."
Pagination
The list is paginated with page_num and limit, ordered by device ID ascending across your entire accessible set. Because the ordering is stable, iterating page_num=1, 2, 3, … at a fixed limit neither skips nor repeats devices.
page_numis 1-indexed and defaults to1.limitdefaults to50and can be set from 1 to 1000.- Requesting
page_numbelow 1,limitbelow 1, orlimitabove 1000 returns422before any device lookup runs. - To page through everything, start at
page_num=1and continue until you reachtotal_pages.
The expand parameter
By default the response contains only the base device fields. Add one or more expand values to attach extra objects to each device. Multiple values are supplied as a single comma-separated list (?expand=max_min_timestamp,settings); repeated expand parameters are not supported. Unrecognized values return 422 and identify the offending value.
Supported values: max_min_timestamp, settings, hardware, connectivity, subscription , ports.
null. That way you can tell "not requested" apart from "no data".max_min_timestamp
Attaches a data_range object describing when the device first and last produced a measurement.
Field | Type | Description |
first_measurement | integer | null | Unix timestamp (whole seconds since the epoch, UTC) of the device's first measurement, or |
last_measurement | integer | null | Unix timestamp (whole seconds since the epoch, UTC) of the device's most recent measurement, or |
Timestamps are seconds since the Unix epoch (UTC). For example, 1643390100 is January 28, 2022 at 17:15 UTC. A device that has never produced a measurement returns data_range with both values null.
settings
Attaches a settings object describing the device's logging and upload configuration.
Field | Type | Description |
logging_interval | integer | How often the device records a measurement, in minutes. |
upload_frequency | integer | How often the device uploads recorded data, in minutes. |
upload_hours | object | Which hours of the day the device is permitted to upload. See below. |
upload_hours.enabled_count | integer | The number of hours per day during which uploads are enabled (0–24). |
upload_hours.all_hours | boolean |
|
hardware
Attaches a hardware object describing the device's firmware and hardware revision.
Field | Type | Description |
| number | null | The firmware version currently running on the device. |
| string | null | Reserved. Currently always |
connectivity
Attaches a connectivity object describing how the device communicates and where it sends data.
Field | Type | Description |
| string | null | The device's connectivity method: |
| string | null | Human-readable description of the communications module (e.g. |
| string | null | Short identifier for the communications module (e.g. |
| string | null | The device's SIM identifier (ICCID) for cellular devices, or |
| string | null | The hostname the device currently uploads to (e.g. |
| string | null | The hostname of a pending host-server change, or |
subscription
Attaches a subscription object describing the device's data-subscription status.
Field | Type | Description |
| string | The subscription status: |
| string | null | When |
| integer | null | Unix timestamp (whole seconds since the epoch, UTC) when the subscription expires, or |
| boolean | Whether the subscription is set to renew automatically. |
| boolean |
|
ports
Attaches a ports array, one entry per configured port
Field | Type | Description |
| integer | The port number on the device. |
| integer | Numeric identifier for the sensor on that port. |
| string | The sensor model, e.g. |
| object/null | Object with |
| string/null | Name of the soil water content calibration applied to this port's data, e.g. |
Notes on expand
- When
expandis not supplied, all expanded objects are omitted from every device and no extra computation is performed. expandaccepts multiple values as a single comma-separated list (e.g.?expand=max_min_timestamp,settings). Repeatedexpandparameters are not supported.- Passing an unrecognized
expandvalue returns422and identifies the offending value.
Rate limiting
Rate limited per user, not per device. Requests beyond your limit return 429. See Rate Limiting for the burst and steady-state figures.
HTTP Status Codes
Status | Endpoint-specific cause |
| Passing an |
|
|
See HTTP Status Codes for the full model, including 401 and 429.
Notes
- Results are scoped to your memberships, so the same request made by two different users can return different devices.
device_idis the value to carry into other v5 API calls;nameis for display only and may change.
How did we do?
Device & Sensor Error Codes
GET Device Readings