Created
October 17, 2019 21:05
-
-
Save double-p/c3de66a64e61c20d6290626441f2f555 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jo -p -- -s jsonrpc=2.0 id=1 method=user.login auth= params[user]=Admin params[password]=zabbix | curl -H "Content-Type: application/json" -X POST -s -d @- -o- http://10.211.55.101:9595/api_jsonrpc.php |jq .result | tr -d \" > token | |
jo -p -- -s jsonrpc=2.0 id=1 method=user.get params[output]=extend auth=`cat token` | curl -H "Content-Type: application/json" -X POST -s -d @- -o- http://10.211.55.101:9595/api_jsonrpc.php | jq . | |
# jo: https://github.com/jpmens/jo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment