Page 1 of 1

Problem with REST API

Posted: Tue Feb 23, 2016 8:16 am
by noweda
Hello,

I'm trying to implement an integration between Nagios XI and a JIRA ticket system. For that I would like to use the REST API, to let JIRA acknowledge service/host problems and/or schedule downtimes.

At the moment I'm trying to understand the usage of REST API. When I'm trying to call one of the examples URIs in the help section, I'm getting the following error message:

"The requested URL /nagiosxi/api/v1/objects/hoststatus was not found on this server."

Three questions:
1. Is it possible to use the new JSON REST API for my use case?
2. Any ideas about the failure message?
3. Is there any documentation in addition to the help section in our XI installation? (I just find docu about the old API, e.g. https://exchange.nagios.org/directory/D ... PI/details)

Find our Installation profile attached.

Best regards,
Christoph.

Re: Problem with REST API

Posted: Tue Feb 23, 2016 11:33 am
by lmiltchev
1. Is it possible to use the new JSON REST API for my use case?
I haven't tried integrating XI to (and using the REST API with) JIRA, but It should be possible. Unfortunately, we don't have it documented.
2. Any ideas about the failure message?
Are you using SSL on this server? What is the output of the following command?

Code: Select all

curl -XGET "http://<ip address>/nagiosxi/api/v1/objects/hoststatus?apikey=<your api key>&pretty=1"
3. Is there any documentation in addition to the help section in our XI installation? (I just find docu about the old API, e.g. https://exchange.nagios.org/directory/D ... PI/details)
Currently, the "Help" menu is all we have on the "new" REST API.

https://support.nagios.com/kb/article.php?id=176