HTTP JSON-RPC

From Monocle Security
Jump to navigation Jump to search

Retrieve all recording tokens

curl -X POST --user "admin:password" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":"id","method":"getRecordingTokens"}' -s http://localhost:9854/json

{"result":["2334007959136872822","3191928883051777765","3271420254935038039"],"error":null,"id":"id"}

Retrieve all current objects on a set of recordings

curl -X POST --user "admin:password" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":"id","method":"getRecordingObjects","params":["3271420254935038039","2334007959136872822"]}' -s http://localhost:9854/json

{"result":[{"id":1,"objectClass":"Handbag","x":0.301338,"y":0.89906,"width":0.234911,"height":0.10094}],"error":null,"id":"id"}