Results
note
This resource demonstrates how to query detailed information of an object or a zone. It provides Object Shape, Object History, and Zone Configuration.
GET
/[SENSR version]/results/object/shape
Return point clouds of an object at a specific timestamp. SENSR only saves previous 10 frames. So if you put huge difference in
time
parameter, regardless of your parameter, SENSR will return the oldest results it has.- Parameters
- id : Object Id
- time : Approx. timestamp when the event occurred. Format(e.g. 2020-12-04T06:40.125Z)
- Return code
- 200 OK
- 400 BAD REQ
Example
$ curl -X GET 'http://localhost:9080/[SENSR version]/results/object/shape?id=0&time=2020-12-04T06:40.125000000Z'
** Respond **
{ "id" : 0,
"time" : "2020-12-04T06:40.125000000Z",
"point" : ".............." }
/[SENSR version]/results/object/history
Return trail histories of an object. Max histories are 100.
- Parameters
- id : Object Id
- length : History length. (-1 = all)
- Return code
- 200 OK
- 400 BAD REQ
Example
$ curl -X GET 'http://localhost:9080/[SENSR version]/results/object/history?id=0&length=-1'
** Respond **
{ "id" : 0,
"time" : "2020-12-04T06:40.125000000Z",
"locations" : [[0.0, 0.0, 0.0]...] }
/[SENSR version]/results/zone
Return the detailed status of a specific event zone. The response has the list of object IDs that are inside the zone at a certain timing.
- Parameters
- id : Zone id
- Return code
- 200 OK
Example
$ curl -X GET 'http://localhost:9080/[SENSR version]/results/zone?id=1001'
** Respond **
{ "zones" : [{"id" : 1001,
"time" : "2020-12-04T06:40.125000000Z",
"name" : "food1",
"type" : 0,
"shape" : [[1.0,1.0,1.0],...],
"objects" :[0,...]}
/[SENSR version]/results/health
Return the current system health.
- Parameters
- Return code
- 200 OK
Example
$ curl -X GET 'http://localhost:9080/[SENSR version]/results/health'
** Respond **
{ "master" : "OK",
"nodes" : { "algo_0000": { "status" : "OK",
"sensors": {}
}
}
}