I inherited a zabbix installation and want to collect some information using the API. however all I'm getting is 401s. for instance:
this obviously shouldn't happen, because this request shouldn't even need authentication.
following https://www.zabbix.com/documentation...rming_requests I also tried "user.login" without any success.
I'm wondering if the API needs to be activated first somehow... any ideas what might be going wrong, here?
Code:
curl --request POST \
--url https://server.com/api_jsonrpc.php \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "apiinfo.version",
"id": 1,
"auth": null,
"params": {}
}'
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Unauthorized</title>
</head><body>
<h1>Unauthorized</h1>
<p>This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
<hr>
<address>Apache/2.4.38 (Debian) Server at server.com Port 443</address>
</body></html>
following https://www.zabbix.com/documentation...rming_requests I also tried "user.login" without any success.
I'm wondering if the API needs to be activated first somehow... any ideas what might be going wrong, here?
Comment