VITALAgronomics
Asset Endpoints

Locations Endpoint

Location (sensor hub) metadata with coordinates, assignment, and status.

Endpoints: GET /api/v1/locations, GET /api/v1/locations/{location_id}

Returns location (sensor hub) metadata with coordinates, assignment, and status. Use these when listing active sensors, assigning devices to zones, or building location selectors. For time-series sensor data by location, see the Data Endpoint.


Authentication

Requires authentication via Bearer token (Authorization: Bearer <JWT>) or API key (x-api-key header). API keys are organization-scoped; Bearer tokens use all organizations the user can access.


List Locations

GET /api/v1/locations

Query Parameters

ParameterTypeRequiredDescription
organization_idintegerNoFilter by organization. Omit to use all organizations the user can access. Must belong to user's orgs or returns 403.
skipintegerNoRecords to skip for pagination. Default: 0.
limitintegerNoMax records to return (1–10,000). Default: 200.
statusstringNoFilter by status: active or archived. Default: active.

Response

Returns an array of objects (not wrapped in a container). Each object includes:

FieldTypeDescription
location_idstring (UUID)Location identifier.
device_idintegerAssociated device ID.
namestringLocation display name.
application_zone_idstring | nullAssigned zone UUID, if any.
latitudenumberLatitude (from InfluxDB).
longitudenumberLongitude (from InfluxDB).
timezonestringIANA timezone derived from coordinates.
organization_idintegerOrganization ID.
volumetric_water_content_fcnumber | nullField capacity (VWC).
statusstringactive or archived.
created_atstringISO 8601.
updated_atstringISO 8601.
last_poststring | nullISO 8601 of last telemetry.
zone_assigned_atstring | nullISO 8601 when zone was assigned.

Returns [] when no locations match.


Get Location by ID

GET /api/v1/locations/{location_id}

Returns a single location by UUID. Returns 404 if not found or outside the user's organization scope.

Path Parameters

ParameterTypeDescription
location_idstring (UUID)Location identifier.

On this page