use API to delete User account
Posted: Thu May 26, 2016 2:17 pm
I am trying to use the API to delete a user from Nagios XI.
I can list the user by following the Nagios XI GUI help screen.
and the data is listed
then, trying to delete
returns this
I am logged in to the host using ssh.
The API Key I am using is for the nagiosadmin account.
So, what am I doing wrong?
Thanks
Steve B
I can list the user by following the Nagios XI GUI help screen.
Code: Select all
curl -XGET "http://localhost/nagiosxi/api/v1/system/user?apikey=[key]&pretty=1"Code: Select all
{
"user_id": "9",
"username": "blah",
"name": "blah 2",
"email": "blah 3 @ xxx.com",
"enabled": "1"
},
Code: Select all
curl -XDELETE "http://localhost/nagiosxi/api/v1/system/user?apikey=[key]&pretty=1&user_id=9"Code: Select all
{
"error": "User with ID does not exist."
}
The API Key I am using is for the nagiosadmin account.
So, what am I doing wrong?
Thanks
Steve B