登入
获取authtoken
Payload:
{
"jsonrpc": "2.0",
"method": "user.login",
"params": {
"user": "Admin",
"password": "zabbix"
},
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"result": "54ec7f0d103f635ada0a76147d8a93a5",
"id": 1
}
后面所有的API请求都需要加上Authtoken返回值
登出
Payload:
{
"jsonrpc": "2.0",
"method": "user.logout",
"params": [],
"id": 1,
"auth": "60d183c3afd42dfbe63da08fe5074b5a"
}
Response:
{
"jsonrpc": "2.0",
"result": true,
"id": 1
}