REST API Overview
Overview
This document provides an overview of the REST API provided by SENSR.
The REST API can be used to interact with SENSR in various ways, these are listed below. You can follow the links to access the details
How to use
The REST API is accessible from 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/commands/project
.
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/parameters
Control parameter 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 a new project, switch to a different project, etc.
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.