[ZBX-25693] Zabbix API not responding Created: 2024 Dec 06 Updated: 2024 Dec 09 Resolved: 2024 Dec 09 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | None |
Affects Version/s: | 7.0.6 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Trivial |
Reporter: | Mohammed CHARKI | Assignee: | Zabbix Development Team |
Resolution: | Won't fix | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
curl -X POST -H "Content-Type: application/json" -d '{ , |
Comments |
Comment by Mohammed CHARKI [ 2024 Dec 06 ] |
Hello,
Can you please help ? sudo tail -f /var/log/nginx/error.log
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "user.login", "params": {"user": "Admin", "password": "zabbix"}, "id": 1}' http://127.0.0.1/zabbix/api_jsonrpc.php {"jsonrpc":"2.0","error":\{"code":-32602,"message":"Invalid params.","data":"Invalid parameter \"/\": unexpected parameter \"user\"."},"id":1}root@mabssvppzabbixp01:/usr/share/nginx/html#
Kind Regards, |
Comment by Alexander Vladishev [ 2024 Dec 09 ] |
This is described in our documentation. The authorization request should look like this: { "jsonrpc": "2.0", "method": "user.login", "params": { "username": "Admin", "password": "zabbix" }, "id": 1 } |
Comment by Mohammed CHARKI [ 2024 Dec 09 ] |
indeed, we used the same request, the request should be using Postman, or Curl, so we used curl, and the ouput is this : Request :
curl -X POST -H "Content-Type: application/json" -d '{ "jsonrpc": "2.0", "method": "user.login", "params": { "user": "Admin", "password": "zabbix" }, "id": 1 }' http://10.30.19.46/zabbix/api_jsonrpc.php Output : File not found.
|