Log out
Current signal
Signals
Menu
...
+
Clone signal
My Signals
Menu
Current panel
Panels
Menu
...
+
My Panels
Menu
Scheme
Timeline
Map
<
>
Concept
REST API
Libraries
Experiments
Things
Circus Of Things REST JSON commands
You need a token to be authenticated at Circus and access to your signals. Copy this token and paste it in your scripts when using the REST API directly or with libraries.
These are the commands you need to recursively feed and read dynamic data from signals. Below you can see the params used for the requests and the expected responses. You can test the API manually here filling the boxes and pressing "try" button for each command.
PUT
WriteValue
Refresh the instant value for the signal.
Request URI
circusofthings.com/WriteValue
Request parameters
Key
The public key that identifies the signal to feed
String
Value
The actual value written
Double
Lat
Value of the latitude.
Double
Lon
Value of the longitude.
Double
Alt
Value of the altitude.
Double
Request parameters must be JSON encoded in the body of the message.
If lat, lon or alt are not sent, position will be ignored.
If value is not sent it will be ignored.
Either value or position must be defined, otherwise an error "400" will be returned.
If position is not defined the signal will be considered "motionless".
If position is defined once, position will be stored, but still will be considered "motionless".
If position is changed for the second time, signal is considered as "mobile"
Response model
{
key[String]: The key of the signal written
Message[String]: Circus Server specific status message
}
Response status codes / messages
200
Success
400
The syntax of the query is wrong.
401
The API token is unknown or no longer available.
403
Insuficient permissions to write this signal.
404
Signal key not found.
Try!
GET
ReadValue
Get the actual value for the signal.
Request URI
circusofthings.com/ReadValue
Parameters
Key
The public key that identifies the signal to be read
String
Response model
{
key[String]: The key of the signal read
Value[Double]: Value read from signal
Lat[Double]: Latitude coordinate of the signal's location
Lon[Double]: Longitude coordinate of the signal's location
Alt[Double]: Altitude coordinate of the signal's location
IsMobile[Boolean]: True if signal is mobile, false if it's static
Message[String]: The server message about the query
}
Error status codes
200
Success
400
The syntax of the query is wrong.
403
Insuficient permissions to read this signal.
404
Signal key not found.
Try!