Skip to content

gsn services API documentation

Julien Eberle edited this page Oct 14, 2016 · 4 revisions

This API was previously referred to as the API v3.

Values such as ::sensorid:: and ::fieldid:: are respectively the virtual sensor name and the field name. Possible output formats are "csv", "json", "xml", "shp" for Shapefile and "asc" for EsriAscii.

Method Endpoint Payload / Parameters Description
POST /oauth2/token grant_type, redirect_uri, client_id, client_secret see https://oauth.net/2/ for all details about the various grant types. Gsn-services supports client_credentials, password and authorization_code.
GET /api/user Returns some infos about the user currently connected
POST /api/sensors/download Not implemented yet.
GET /api/sensors format, latestValues, timeFormat get the list of all available sensors and optionaly their latest values
GET /api/sensors/search vsnames, size, fields, filter, from, to, timeFormat, format
GET /api/sensors/::sensorid:: format, latestValues, timeFormat
GET /api/sensors/::sensorid::/data format, timeFormat, size, fields, filter, from, to, period, agg, aggPeriod Retrieve sensor data
POST /api/sensors/::sensorid::/data request body is a JSON encoded stream element Push data to GSN
GET /api/sensors/::sensorid::/field/::fieldid:: format get the lastest value of a specific field
GET /api/sensors/::sensorid::/field/::fieldid::/process size, from, to, timeFormat, op, params
GET /api/sensors/::sensorid::/grid size, fields, from, to, timeFormat, box, agg, format
GET /api/sensors/::sensorid::/grid/timeseries size, fields, from, to, timeFormat, box, agg, format
GET /api/sensors/::sensorid::/stream Upgrade to a websocket for a real time stream of stream elements
Clone this wiki locally