Getting started
The Smart Sea Level Sensors API provides an easy way to retrieve measurements and metadata from sea level sensors deployed in Chatham County, GA. The API is built according to the OGC SensorThings API standard, which makes use of REST semantics and JSON encoding.
Quickstart
GET
all sensors
$ curl 'https://api.sealevelsensors.org/v1.0/Things'
Example response
{
"value": [
{
"name": "esp32-rfm95-scott-1",
"description": "Skidaway Dock environmental sensors",
"properties": {
"sslsId": "esp32-rfm95-scott-1",
"elevationNAVD88": "3.103"
},
"Datastreams@iot.navigationLink": "https://api.sealevelsensors.org/v1.0/Things(3)/Datastreams",
"MultiDatastreams@iot.navigationLink": "https://api.sealevelsensors.org/v1.0/Things(3)/MultiDatastreams",
"Locations@iot.navigationLink": "https://api.sealevelsensors.org/v1.0/Things(3)/Locations",
"HistoricalLocations@iot.navigationLink": "https://api.sealevelsensors.org/v1.0/Things(3)/HistoricalLocations",
"@iot.id": 1,
"@iot.selfLink": "https://api.sealevelsensors.org/v1.0/Things(3)"
},
{ ... }
]
}
GET
a specific sensor
$ curl 'https://api.sealevelsensors.org/v1.0/Things(3)'
Example response
{
"name" : "gt-envsense-004",
"description" : "Kilkenny Creek environmental sensors",
"properties" : {
"sslsId" : "gt-envsense-004",
"elevationNAVD88" : "2.7"
},
"Datastreams@iot.navigationLink" : "https://api.sealevelsensors.org/v1.0/Things(3)/Datastreams",
"MultiDatastreams@iot.navigationLink" : "https://api.sealevelsensors.org/v1.0/Things(3)/MultiDatastreams",
"Locations@iot.navigationLink" : "https://api.sealevelsensors.org/v1.0/Things(3)/Locations",
"HistoricalLocations@iot.navigationLink" : "https://api.sealevelsensors.org/v1.0/Things(3)/HistoricalLocations",
"@iot.id" : 3,
"@iot.selfLink" : "https://api.sealevelsensors.org/v1.0/Things(3)"
}
GET
all measurements recorded by a specific sensor, sorted oldest to newest
$ curl 'https://api.sealevelsensors.org/v1.0/Datastreams(2)/Observations'
The first 100 measurements recorded by the sensor will return. The @iot.nextLink
key gives next 100 measurements recorded by the sensor.
Example response
{
"@iot.nextLink": "https://api.sealevelsensors.org/v1.0/Datastreams(2)/Observations?$skip=100",
"value": [
{
"phenomenonTime": "2019-01-07T23:45:50.345Z",
"resultTime": "2019-01-07T23:45:50.345Z",
"result": 4.247,
"Datastream@iot.navigationLink": "https://api.sealevelsensors.org/v1.0/Observations(1)/Datastream",
"FeatureOfInterest@iot.navigationLink": "https://api.sealevelsensors.org/v1.0/Observations(1)/FeatureOfInterest",
"@iot.id": 1,
"@iot.selfLink": "https://api.sealevelsensors.org/v1.0/Observations(1)"
},
{ ... }
]
}
Alternatively, the $select
query option can be used to select only the result
and resultTime
fields, and the $resultFormat
query option can be used to return Observations in a more compact array format.
$ curl 'https://api.sealevelsensors.org/v1.0/Datastreams(2)/Observations?$select=resultTime,result&$resultFormat=dataArray'
Example response
{
"@iot.nextLink": "https://api.sealevelsensors.org/v1.0/Datastreams(2)/Observations?$skip=100&$select=result,Datastream,resultTime&$resultFormat=dataArray",
"value": [{
"Datastream@iot.navigationLink": "https://api.sealevelsensors.org/v1.0/Datastreams(2)",
"components": ["result", "resultTime"],
"dataArray@iot.count": 100,
"dataArray": [
[4.247, "2019-01-07T23:45:50.345Z"],
[4.314, "2019-01-07T23:50:52.668Z"],
[4.33, "2019-01-07T23:55:54.370Z"],
...
]
}]
}