SensorThings API is an
Open Geospatial Consortium
The Open Geospatial Consortium (OGC) is an international voluntary consensus standards organization that develops and maintains international standards for geospatial content and location-based services, sensor web, Internet of Things, Geographi ...
(OGC) standard providing an open and unified framework to interconnect
IoT sensing devices, data, and applications over the Web. It is an open standard addressing the
syntactic interoperability and
semantic interoperability
Semantic interoperability is the ability of computer systems to exchange data with unambiguous, shared meaning. Semantic interoperability is a requirement to enable machine computable Logic in computer science, logic, inferencing, knowledge discove ...
of the Internet of Things. It complements the existing IoT networking protocols such
CoAP,
MQTT
MQTT is a lightweight, publish–subscribe, machine-to-machine network protocol for message queue/ message queuing service. It is designed for connections with remote locations that have devices with resource constraints or limited network b ...
,
HTTP
HTTP (Hypertext Transfer Protocol) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, wher ...
,
6LowPAN. While the above-mentioned IoT networking protocols are addressing the ability for different IoT systems to exchange information, OGC SensorThings API is addressing the ability for different IoT systems to use and understand the exchanged information. As an OGC standard, SensorThings API also allows easy integration into existing
Spatial Data Infrastructure A spatial data infrastructure (SDI), also called geospatial data infrastructure, is a data infrastructure implementing a framework of geographic data, metadata, users and tools that are interactively connected in order to use spatial data in an eff ...
s or
Geographic Information Systems
A geographic information system (GIS) consists of integrated computer hardware and software that store, manage, analyze, edit, output, and visualize geographic data. Much of this often happens within a spatial database; however, this is not ...
.
OGC SensorThings API has two parts: (1) Part I - Sensing and (2) Part II - Tasking. OGC SensorThings API Part I - Sensing was released for public comment on June 18, 2015. The OGC Technical Committee (TC) approves start of electronic vote on December 3, 2015, and the SensorThings API Part I - Sensing passed the TC vote on February 1, 2016. Th
official OGC standard specificationwas published online on July 26, 2016. In 2019 the SensorThings API was also published as a United Nation's ITU-T Technical Specification.
OGC SensorThings API Part II - Tasking Core was released for public comment on February 20, 2018, and it passed the TC vote on June 1, 2018. Th
for the SensorThings API Part II - Tasking Core was published online on January 8, 2019.
In order to offer a better developer experience
the SensorThings API Part II - Tasking Core Discussion Paperwas published online on December 18, 2018. The Tasking Core Discussion paper provides 15 JSON examples showing how SensorThings API Part II - Tasking Core can be used.
Design
SensorThings API is designed specifically for resource-constrained IoT devices and the Web developer community. It follows
REST
REST (Representational State Transfer) is a software architectural style that was created to describe the design and guide the development of the architecture for the World Wide Web. REST defines a set of constraints for how the architecture of ...
principles, the
JSON
JSON (JavaScript Object Notation, pronounced or ) is an open standard file format and electronic data interchange, data interchange format that uses Human-readable medium and data, human-readable text to store and transmit data objects consi ...
encoding, and the OASIS
OData protocol and URL conventions. Also, it has an
MQTT
MQTT is a lightweight, publish–subscribe, machine-to-machine network protocol for message queue/ message queuing service. It is designed for connections with remote locations that have devices with resource constraints or limited network b ...
extension allowing users/devices to publish and subscribe updates from devices, and can use
CoAP in addition to HTTP.

The foundation of the SensorThings API is its data model that is based on the
ISO 19156 (ISO/OGC
Observations and Measurements Observations and Measurements (O&M) is an international standard which defines a conceptual schema encoding for observations, and for features involved in sampling when making observations. While the O&M standard was developed in the context of geog ...
), that defines a conceptual model for observations, and for features involved in sampling when making observations. In the context of the SensorThings, the features are modelled as ''Things'', ''Sensors'' (''i.e.'', Procedures in O&M), and ''Feature of Interests''. As a result, the SensorThings API provides an interoperable Observation-focus view, that is particularly useful to reconcile the differences between heterogeneous sensing systems (e.g., ''in-situ'' sensors and remote sensors).
An IoT device or system is modelled as a ''Thing''. A ''Thing'' has an arbitrary number of ''Location''s (including 0 ''Location''s) and an arbitrary number of ''Datastreams'' (including 0 ''Datastream''s). Each ''Datastream'' observes one ''ObservedProperty'' with one ''Sensor'' and has many ''Observations'' collected by the ''Sensor''. Each ''Observation'' observes one particular ''FeatureOfInterest''. The O&M based model allows SensorThings to accommodate heterogeneous IoT devices and the data collected by the devices.
SensorThings API provides two main functionalities, each handled by a part. The two profiles are the Sensing part and the Tasking part. The Sensing part provides a standard way to manage and retrieve observations and metadata from heterogeneous IoT sensor systems, and the Sensing part functions are similar to the OGC
Sensor Observation Service The Sensor Observation Service (SOS) is a web service to query real-time sensor data and sensor data time series and is part of the Sensor Web. The offered sensor data consists of data directly from the sensors, which are encoded in the Sensor Mode ...
. The Tasking part provides a standard way for parameterizing - also called tasking - of task-able IoT devices, such as sensors or actuators. The Tasking part functions are similar to the OG
Sensor Planning Service The Sensing part is designed based on the ISO/OGC
Observations and Measurements Observations and Measurements (O&M) is an international standard which defines a conceptual schema encoding for observations, and for features involved in sampling when making observations. While the O&M standard was developed in the context of geog ...
(O&M) model, and allows IoT devices and applications to CREATE, READ, UPDATE, and DELETE (''i.e.'', HTTP POST, GET, PATCH, and DELETE) IoT data and metadata in a SensorThings service.
Entities (resources)
SensorThings API Part I - Sensing defines the following resources. As SensorThings is a RESTful web service, each entity can be CREATE, READ, UPDATE, and DELETE with standard
HTTP verbs (
POST
Post, POST, or posting may refer to:
Postal services
* Mail, the postal system, especially in Commonwealth of Nations countries
**An Post, the Irish national postal service
**Canada Post, Canadian postal service
**Deutsche Post, German postal s ...
,
GET, PATCH, and DELETE):
*
Thing
: An object of the physical world (physical things) or the information world (virtual things) that is capable of being identified and integrated into communication networks.
*
Locations
: Locates the ''Thing'' or the ''Things'' it associated with.
*
HistoricalLocations
: Set provides the current (i.e., last known) and previous locations of the ''Thing'' with their time.
*
Datastream
: A collection of Observations and the Observations in a ''Datastream'' measure the same ''ObservedProperty'' and are produced by the same ''Sensor''.
*
ObservedProperty
: Specifies the phenomenon of an ''Observation''.
*
Sensor
: An instrument that observes a property or phenomenon with the goal of producing an estimate of the value of the property.
*
Observation
: Act of measuring or otherwise determining the value of a property.
*
FeatureOfInterest
: An ''Observation'' results in a value being assigned to a phenomenon.The phenomenon is a property of a feature, the latter being the ''FeatureOfInterest'' of the ''Observation''.
In addition to the above sensing resources, SensorThings API Part II - Tasking Core defines the following resources:
*
TaskingCapabilities
: Specifies the task-able parameters of an actuator.
*
Tasks
: A collection of Tasks that has been created.
*
Actuator
: A type of transducer that converts a signal to some real-world action or phenomenon.
Example payload
http://example.org/v1.0/Datastream(id)/Observations
Data array extensions
In order to reduce the data size transmitted over the network, SensorThings API data array extension allows users to request for multiple Observation entities and format the entities in the dataArray format. When a SensorThings service returns a dataArray response, the service groups Observation entities by Datastream or MultiDatastream, which means the Observation entities that link to the same Datastream or the same MultiDatastream are aggregated in one dataArray.
Example request for data array
http://example.org/v1.0/Observations?$resultFormat=dataArray
Example data array response
Evaluation
Interoperability between OpenIoT and SensorThings
"''We believe that the implementation of the SensorThing API will be a major improvement for the OpenIoT middleware. It will give OpenIoT a standardized and truly easy to use interface to sensor values.This will complement the rich semantic reasoning services with a simple resource based interface. And the consistent data model mapping gives both a common context to describe the internet of things''".
Efficiency of SensorThings API
A comprehensive evaluation of the SensorThings API is published i
Jazayeri, Mohammad Ali, Steve HL Liang, and Chih-Yuan Huang. "Implementation and Evaluation of Four Interoperable Open Standards for the Internet of Things." ''Sensors'' 15.9 (2015): 24343-24373
Quotes
SensorThings API was demonstrated in a pilot project sponsored by the
Department of Homeland Security
The United States Department of Homeland Security (DHS) is the U.S. federal executive department responsible for public security, roughly comparable to the interior, home, or public security ministries in other countries. Its missions invol ...
Science and Technology Directorate. Dr. Reginald Brothers, the Undersecretary of the Homeland Security Science and Technology, was "impressed with the ‘state of the practical’ where these various industry sensors can be integrated today using open standards that remove the stovepipe limitations of one-off technologies. "
OGC SensorThings API standard specification
* '
OGC® SensorThings API Part 1: Sensing''
** Internal reference number of this OGC® document: 15-078r6
** Submission Date: 2015-06-18
** Publication Date: 2016-07-26
** Editor: Steve Liang (
University of Calgary
{{Infobox university
, name = University of Calgary
, image = University of Calgary coat of arms without motto scroll.svg
, image_size = 150px
, caption = Coat of arms
, former ...
/
SensorUp)
** Co-Editors: Chih-Yuan Huang (
National Central University
National Central University (; abbreviated NCU; ) is a public research university based in Taiwan. It was founded in 1902 in Nanjing; initially located in Miaoli after moving to Taiwan, it relocated to Zhongli in 1962 and developed into a com ...
) / Tania Khalafbeigi (
University of Calgary
{{Infobox university
, name = University of Calgary
, image = University of Calgary coat of arms without motto scroll.svg
, image_size = 150px
, caption = Coat of arms
, former ...
/
SensorUp)
* '
OGC® SensorThings API Part 2: Tasking Core''
** Internal reference number of this OGC® document: 17-079r1
** Submission Date: 2017-10-13
** Publication Date: 2019-01-08
** Editor: Steve Liang (
University of Calgary
{{Infobox university
, name = University of Calgary
, image = University of Calgary coat of arms without motto scroll.svg
, image_size = 150px
, caption = Coat of arms
, former ...
/
SensorUp)
** Co-Editors: Tania Khalafbeigi (
University of Calgary
{{Infobox university
, name = University of Calgary
, image = University of Calgary coat of arms without motto scroll.svg
, image_size = 150px
, caption = Coat of arms
, former ...
/
SensorUp)
* Developer API Documentation
** '
Part I - Sensing''
** '
Part II - Tasking''
SensorThings API Sandbox
* '
SensorThings Compliance Test Suite''
Free and open source SensorThings API implementations
Whiskers
In March 2016
SensorUp and the GeoSensorWeb Lab at the University of Calgary submitted an open source software project proposal to the Eclipse Foundation and has been approved. The project is calle
Whiskers Whiskers is an OGC SensorThings API framework. It will have a
JavaScript
JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior.
Web browsers have ...
client and a light-weight server for IoT gateway devices (e.g., Raspberry Pi or BeagleBone). Whiskers aim to foster a healthy and open IoT ecosystem, as opposed to one dominated by proprietary information silos. Whiskers aims to make SensorThings development easy for the large and growing world of IoT developers.
GOST
GOST is an open source implementation of the SensorThings API in the
Go programming language initiated by Geodan. It contains easily deployable server software and a JavaScript client. Currently (June 2016) it is in development but a first version can already be downloaded and deployed. The software can be installed on any device supporting Docker or Go (e.g. Windows, Linux, Mac OS and Raspberry Pi). By default sensor data is stored in a
PostgreSQL
PostgreSQL ( ) also known as Postgres, is a free and open-source software, free and open-source relational database management system (RDBMS) emphasizing extensibility and SQL compliance. PostgreSQL features transaction processing, transactions ...
database.
FROST
FROST-Server is an Open Source server implementation of the OGC SensorThings API. FROST-Server implements the entire specification, including all extensions. It is written in Java and can run in Tomcat or Wildfly and is available as a Docker image. Among its many features is the ability to use String or UUID based entity IDs.
FROST-Client is a Java client library for communicating with a SensorThings API compatible server.
SensorThings HcDT Charting SDK
SensorThings HcDT is a JavaScript charting library for the OGC SensorThings API. It is based on the open source
Highcharts
Highcharts is a software library for charting written in pure JavaScript, first released in 2009. The license is proprietary. It is free for personal/non-commercial uses and paid for commercial applications.
It was created by Highsoft in Vik, N ...
library an
DataTables It is a front-end charting library enable developers to connect to datastreams from any OGC SensorThings API service, and display the sensor observations in charts, tables, or dashboard widgets for web applications.
Mozilla STA
Mozilla
Mozilla is a free software community founded in 1998 by members of Netscape. The Mozilla community uses, develops, publishes and supports Mozilla products, thereby promoting free software and open standards. The community is supported institution ...
developed a node implementation of the OGC SensorThings API.
52°North STA
52N SensorThingsAPI is an open source implementation of the OGC SensorThings API. Its core features are the interoperability with th
52N SOSimplementing the
OGC Sensor Observation Service, customizable database mappings and several convenience extensions. It can be deployed as a Docker container, inside an
Apache Tomcat
Apache Tomcat (called "Tomcat" for short) is a free and open-source implementation of the Jakarta Servlet, Jakarta Expression Language, and WebSocket technologies. It provides a "pure Java" HTTP web server environment in which Java code can also ...
or as a standalone application.
Example applications
Department of Homeland Security S&T
Shaken Fury Operational Experiment
In 2019 the Shaken Fury operational experiment for the DHS Next Generation First Responder program depicts a scenario of an earthquake causing partial structural collapse and HAZMAT leak at a stadium. OGC SensorThings API is used as the standard interface that interconnects multiple sensors and offers an IoT enabled real-time situational awareness.
Smart Citizens for Smart Cities YYC - crowd-sourced air quality sensing
On Oct 8th 2016, a group of volunteers (smart citizens) in Calgary gathered together, assembled their own sensors, installed at their houses, and formed a crowd-sourced air quality sensor network. All data are publicly available via OGC SensorThings API. This citizen sensing efforts increased the number of Calgary's air quality sensors from 3 to more than 50.
Smart Emission Project in Nijmegen, NL
Smart emission is an air quality monitoring project in the city of Nijmegen, NL. The project deployed multiple air quality sensors throughout the city. Data are published with open standards, including OGC SensorThings API. Part of the project is an open source ETL engine to load the project sensor data into an OGC SensorThings API.
SensorThings Dashboard
Thi
dashboardprovides easy-to-use client-side visualisation of Internet-of-Things sensor data from OGC SensorThings API compatible servers. Various types of widgets can be arranged and configured on the dashboard. It is a web application and can be embedded into any website. A live demo is available on th
project page
https://github.com/SensorThings-Dashboard/SensorThings-Dashboard
GOST Dashboard v2
GOST Dashboard v2is an open source library of custom HTML elements (web components) supporting SensorThings API. These elements facilitate the development of HTML applications integrating functionality and data from SensorThings API compatible services. The components are developed wit
Predix-UIan
Polymer
AFarCloud project OGC Connector
The connector enables interoperability between OGC-compliant data sources and the semantic middleware developed in the Horizon 2020 ECSE
project AFarCloud It is a modular Java application with Docker-based deployment, implemented according to the 15-078r6 OGC SensorThings API 1.0 Implementation Standard.
Comparison between OGC SensorThings API and OGC Sensor Observation Services
SensorThings API provides functions similar to the OGC
Sensor Observation Service The Sensor Observation Service (SOS) is a web service to query real-time sensor data and sensor data time series and is part of the Sensor Web. The offered sensor data consists of data directly from the sensors, which are encoded in the Sensor Mode ...
, an OGC specification approved in 2005. Both standard specifications are under the OGC
Sensor Web Enablement standard suite. The following table summarizes the technical difference between the two specifications.
External links
SensorThings API - GitHub* Presentation
Sensor up your connected applications with OGC SensorThings API (FOSS4G)* Chapter:''
Mapping the OGC SensorThings API onto the OpenIoT Middleware* Tutorial in YouTube
Getting Started Series #1SensorThings Tutorial Series #2 an
SensorThings Tutorial Series #3
* Application
SensorThings Playground{{Webarchive, url=https://web.archive.org/web/20160203124857/https://pg.sensorup.com/ , date=2016-02-03 allows interested people and organizations to experiment with a SensorThings system via a friendly, step-by-step process.
References
Geographic information systems
Internet of things
Open Geospatial Consortium
Open standards
Web services