HTTP JSON-RPC: Difference between revisions

From Monocle Security
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== Retrieve all recording tokens ==
== 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
curl -X POST --user "admin:password" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":"id","method":"getRecordingTokens"}' -s http://localhost:9854/json


<- <code>{"result":["2334007959136872822","3191928883051777765","3271420254935038039"],"error":null,"id":"id"}</code>
<code>{"result":["2334007959136872822","3191928883051777765","3271420254935038039"],"error":null,"id":"id"}</code>


== Retrieve all current objects on a set of recordings ==
== 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"]}' -s http://localhost:9854/json
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


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

Latest revision as of 19:09, 26 November 2023

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"}