SENSR REST API
Overview
This document gives an overview of the REST API provided by SENSR.
The REST API can be used to interract with SENSR in various ways, these are all listed in more detail on the documentation for each resource.
How to use
The REST API is accessible from the port 9080 while SENSR is running. It can be accessed via http://{your-ip-here}:9080/
(usually this will be http://localhost:9080/
).
The REST API resources that SENSR provides can largely be split into two groups, "versioned" and "unversioned".
Versioned resources require the SENSR version to be prepended to the resource path. This means that to access these resources we need to do http://localhost:9080/3.0.0/commands/project
(specifying only the major and minor versions will also work http://localhost:9080/3.0/commands/project
). SENSR guarantees the same REST API interface within the same major-minor version (e.g.. SENSR 3.0.1 will be fully compatible with SENSR 3.0.5).
Unversioned resources are resources that can be called without prepending any version (e.g. http://localhost:9080/version
).
Versioned Resources
SENSR implements the following versioned APIs. To learn more click on a resource to be redirected to its documentation.
/settings/algorithm
Control algorithm settings
/settings/sensor-ext
Control sensor settings
/settings/node
Control algo node settings
/settings/zone
Control zone settings
/commands
This resource takes a general command and SENSR will perform a specific action based on the command
/commands/project
Commands to create new project, switch to a different project, etc.
/commands/record
Commands for controlling recording of SENSR data.
Unversioned Resources
SENSR implements the following unversioned APIs. To learn more click on a resource to be redirected to its documentation.
/version
Get the version of SENSR
/results
This resource returns formatted data (JSON) containing details of an object, zone or the health status of SENSR. We suggest taking a look at the SENSR SDK first to see if it fits your needs, it provides a more convenient and accurate interface for most use-cases.