Error: Unknown API endpoint

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mbeebe
Posts: 144
Joined: Thu Dec 20, 2018 5:12 pm

Error: Unknown API endpoint

Post by mbeebe »

Hello,

We're trying to schedule downtime via an API call. However, when we submit the call, we're getting an error:

{
"error": "Unknown API endpoint."
}

Here's the call:

"http://somesystem/nagiosxi/api/v1/syste ... =localhost"

Any idea what we're doing wrong?

We're running the latest version of Nagios XI on RHEL 7.x.

Thanks,


-- Mike Beebe
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Error: Unknown API endpoint

Post by scottwilkerson »

It isn't a GET endpoint it need to be a POST such as

Code: Select all

curl -XPOST "http://somesystem/nagiosxi/api/v1/system/scheduleddowntime?apikey=somekey&pretty=1" -d "comment=Test&start=1556732252&end=1556732852&hosts[]=localhost"
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mbeebe
Posts: 144
Joined: Thu Dec 20, 2018 5:12 pm

Re: Error: Unknown API endpoint

Post by mbeebe »

Scott,

Thanks -- I believe this is the information we need.

-- Mike
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Error: Unknown API endpoint

Post by scottwilkerson »

mbeebe wrote:Scott,

Thanks -- I believe this is the information we need.

-- Mike
great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked