Page 1 of 1

Error: Unknown API endpoint

Posted: Wed May 01, 2019 1:28 pm
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

Re: Error: Unknown API endpoint

Posted: Wed May 01, 2019 1:42 pm
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"

Re: Error: Unknown API endpoint

Posted: Wed May 01, 2019 2:55 pm
by mbeebe
Scott,

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

-- Mike

Re: Error: Unknown API endpoint

Posted: Wed May 01, 2019 3:12 pm
by scottwilkerson
mbeebe wrote:Scott,

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

-- Mike
great!

Locking thread