Skip to content

Instantly share code, notes, and snippets.

@lloydroc
Created July 7, 2016 18:40
Show Gist options
  • Save lloydroc/349ef6a99c3b16a500f2cd50224396ef to your computer and use it in GitHub Desktop.
Save lloydroc/349ef6a99c3b16a500f2cd50224396ef to your computer and use it in GitHub Desktop.
JSON RPC
curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{
"jsonrpc":"2.0",
"id":1,
"method":"login",
"params":{
"user":"admin",
"passwd":"admin"
}
}' "http://localhost:8080/jsonrpc/"
curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{
"jsonrpc": "2.0",
"id": 1,
"method": "new_trans",
"params": {
"db": "running",
"mode": "read_write"
}
}' "http://localhost:8080/jsonrpc/"
curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{
"jsonrpc":"2.0",
"id":10,
"method":"run_action",
"params":{
"th":1,
"path": "/devices/check-sync",
"params": {"supress-positive-result":""},
"format": "normal"
}
}' "http://localhost:8080/jsonrpc/start_query"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment