I have nagiosxi 5.10.0. (I can't upgrade until end of year)
I'm trying to use the api to list unconfigured objects then remove based on a filter. I've written a script and it is able to get the list of unconfigured objects but it gets a 403 when the delete is attempted.
I'm an admin and my token is working. I can't find manage api under admin menu to check the permissions for the token.
Can you help me find where I can check/change permissions for my token.
Manage unconfigured objects with api
Re: Manage unconfigured objects with api
I don't believe there are granular permissions like that for api tokens within Nagios. It's more of if you have admin or api access then you have a token that will work for api linked to the account.dslaughter wrote: ↑Wed Apr 16, 2025 9:19 am I have nagiosxi 5.10.0. (I can't upgrade until end of year)
I'm trying to use the api to list unconfigured objects then remove based on a filter. I've written a script and it is able to get the list of unconfigured objects but it gets a 403 when the delete is attempted.
I'm an admin and my token is working. I can't find manage api under admin menu to check the permissions for the token.
Can you help me find where I can check/change permissions for my token.
-
dslaughter
- Posts: 135
- Joined: Wed Feb 20, 2019 3:46 pm
Re: Manage unconfigured objects with api
Thank you for your quick response. Do you know if there is a log that might help identify what permissions are needed? I'm an admin. I get the list of unconfigured objects so the connect is good and the token works. I only get the 403 when I try to remove from unconfigured objects.
Re: Manage unconfigured objects with api
Hi @dslaughter,
I've included a link to our REST API documentation here: https://assets.nagios.com/downloads/nag ... ST-API.pdf
At this time, the Object API is read-only, and I'm not seeing any Core commands that are able to delete objects either.
I've included a link to our REST API documentation here: https://assets.nagios.com/downloads/nag ... ST-API.pdf
At this time, the Object API is read-only, and I'm not seeing any Core commands that are able to delete objects either.
-
dslaughter
- Posts: 135
- Joined: Wed Feb 20, 2019 3:46 pm
Re: Manage unconfigured objects with api
Thank you for your response. My problem is I have a lot of unconfigured objects. I have so many because I have traps that come in with a service name that I don't define so I have to configure only some of the unconfigured objects. I thought I found a way to delete unconfigured objects using the api based on a service name filter. My script works except that the delete doesn't work and your response explains why.
Do you know of a way to select individual unconfigured objects for configuration? I only see a a way to configure all unconfigured objects for a host when I only need few to config. As of now I have to delete as many as a thousand objects to configure 30. It's not optimal but until I can get the service name before I start receiving the unconfigured objects this is what I have to work with. Any ideas would be appreciated.
Thank you
Do you know of a way to select individual unconfigured objects for configuration? I only see a a way to configure all unconfigured objects for a host when I only need few to config. As of now I have to delete as many as a thousand objects to configure 30. It's not optimal but until I can get the service name before I start receiving the unconfigured objects this is what I have to work with. Any ideas would be appreciated.
Thank you
-
dslaughter
- Posts: 135
- Joined: Wed Feb 20, 2019 3:46 pm
Re: Manage unconfigured objects with api
If anyone is interested...
I wrote a selenium script to access unconfigured objects page. I was able to collect the objects, and delete the ones that didn't match my filter.
I wrote a selenium script to access unconfigured objects page. I was able to collect the objects, and delete the ones that didn't match my filter.