Skip to main content

Sensor Things API

Standard: OGC SensorThings API v1.1 Two surfaces:

SurfaceBase URLWhen to use
OGC STAhttps://sta.<your-deployment>Any STA-conformant client (FROST, QGIS, custom OGC tooling). Standards-pure.
Main API proxyhttps://api.<your-deployment>When you are already calling the main API and want region-scoped convenience (sensors for a region, observations for a region).

Both surfaces sit in front of the same data store. Pick the one closer to your call-site.


OGC STA surface

Swagger UI: /api (append to your STA base URL).

All endpoints support the standard OGC STA query parameters: $filter, $orderby, $select, $expand, $top, $skip.

Things

MethodPathPurpose
GET/ThingsList Things
POST/ThingsCreate a Thing
GET/Things/{id}Get one Thing
PUT/Things/{id}Update a Thing
DELETE/Things/{id}Delete a Thing
GET/Things/{id}/DatastreamsDatastreams of a Thing
GET/Things/{id}/LocationsCurrent Locations of a Thing
GET/Things/{id}/HistoricalLocationsHistoricalLocations of a Thing

Sensors

MethodPathPurpose
GET/SensorsList Sensors
POST/SensorsCreate a Sensor
GET/Sensors/{id}Get one Sensor
PUT/Sensors/{id}Update a Sensor
DELETE/Sensors/{id}Delete a Sensor
GET/Sensors/{id}/DatastreamsDatastreams of a Sensor

Observed properties

MethodPathPurpose
GET/ObservedPropertiesList
POST/ObservedPropertiesCreate
GET/ObservedProperties/{id}Get one
PUT/ObservedProperties/{id}Update
DELETE/ObservedProperties/{id}Delete
GET/ObservedProperties/{id}/DatastreamsDatastreams using this property

Datastreams

MethodPathPurpose
GET/DatastreamsList
POST/DatastreamsCreate
GET/Datastreams/{id}Get one
PUT/Datastreams/{id}Update
DELETE/Datastreams/{id}Delete
GET/Datastreams/{id}/ObservationsObservations for this datastream

Observations

MethodPathPurpose
GET/ObservationsList
POST/ObservationsCreate
GET/Observations/{id}Get one
PUT/Observations/{id}Update
DELETE/Observations/{id}Delete

Locations & history

MethodPathPurpose
GET/LocationsList Locations
POST/LocationsCreate
GET/Locations/{id}Get one
PUT/Locations/{id}Update
DELETE/Locations/{id}Delete
GET/HistoricalLocationsList historical locations
POST/HistoricalLocationsCreate
GET/HistoricalLocations/{id}Get one
PUT/HistoricalLocations/{id}Update
DELETE/HistoricalLocations/{id}Delete

Features of Interest

MethodPathPurpose
GET/FeaturesOfInterestList
POST/FeaturesOfInterestCreate
GET/FeaturesOfInterest/{id}Get one
PUT/FeaturesOfInterest/{id}Update
DELETE/FeaturesOfInterest/{id}Delete
GET/FeaturesOfInterest/{id}/ObservationsObservations on this feature

Composite (non-OGC convenience)

These are AgriFoodData-specific helpers on the STA service that bundle several STA calls into one. They are not part of the OGC standard — use the plain endpoints above if portability matters.

MethodPathPurpose
POST/compositeCreate a Thing, Sensor, ObservedProperty and Datastream in one call
POST/composite/datastreamCreate a Datastream linked to a Sensor and a Field
GET/composite/field/{fieldId}/datastreamsDatastreams for a field
GET/composite/field/{fieldId}/sensorsSensors observing a field
GET/composite/field/{fieldId}/observationsObservations on a field

Health

MethodPathPurpose
GET/healthLiveness
GET/rabbitmq-test/{datastreamId}Internal RabbitMQ probe (dev / debug only)

Main-API proxy surface

Swagger UI: /swagger (append to your main API base URL).

Use these when you already hold a main-API Bearer token and want region-scoped helpers without switching base URLs.

MethodPathPurpose
GET/v1/sensorsAll sensors visible to the caller, optionally filtered by region
GET/v1/regions/{regionId}/sensorsSensors on a region
GET/v1/regions/{regionId}/sensors/datastreamsDatastreams on a region
GET/v1/regions/{regionId}/sensors/observationsObservations on a region
POST/v1/sensors/compositeCreate a sensor via the STA composite endpoint
POST/v1/sensors/composite/datastreamCreate a datastream via the STA composite endpoint
GET/v1/sensors/datastreams/{datastreamId}/observationsObservations on a datastream

Under the hood, the main API forwards these to the OGC STA service and joins them with the region tree from the Farm API. There is no separate data store.


MQTT

Sensor live-data ingest follows the standard OGC STA MQTT topics:

v1.1/Datastreams({id})/Observations

See Concepts · Sensor Things API and Quickstart · Push a sensor reading via MQTT.