Any idea why I can't access the API?
getting <title>404 Not Found</title>
nagiosxi.conf
<Directory "/usr/local/nagiosxi/html">
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
# AuthName "Nagios XI"
# AuthType Basic
# AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
# Require valid-user
</Directory>
Alias /nagiosxi "/usr/local/nagiosxi/html"
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule nagiosxi/api/v1/(.*)$ /usr/local/nagiosxi/html/api/v1/index.php?request=$1 [QSA,NC,L]
</IfModule>
can't access api
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: can't access api
Hello @scheived,
Just to verify, do you have API access enabled for your user account? Go to Admin > Users > Manage Users and click on your username to check.
If so, can you post the error message to the following API Call ( fill in your IP address/hostaname and API key )? Thanks.
Just to verify, do you have API access enabled for your user account? Go to Admin > Users > Manage Users and click on your username to check.
If so, can you post the error message to the following API Call ( fill in your IP address/hostaname and API key )? Thanks.
Code: Select all
curl -XGET "<http://ipaddress/nagiosxi/api/v1/system/status?apikey=#abc123#&pretty=1"
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: can't access api
I was using https, change it to http and got it working now.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: can't access api
great!scheived wrote:I was using https, change it to http and got it working now.
Locking