Is it possible to manually input User API Key?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
meganwilliford
Posts: 101
Joined: Tue Aug 06, 2019 7:49 am

Is it possible to manually input User API Key?

Post by meganwilliford »

Is it possible to manually input a user's API Key? For example, if we want the API key to be the same for a user on multiple Nagios XI instances. In the interface the only option seems to be to generate a new key.
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: Is it possible to manually input User API Key?

Post by jbrunkow »

It is not currently possible to manually input an API key in the XI interface.

We may also be able to find a workaround for adding a specific API key. I can look to see if there is a way to manipulate that information in the XI database.

However, I don't think you're the first to ask about a feature like this. If you believe there is enough of a need to do this, we could submit a feature request for it to be added to a future release.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
meganwilliford
Posts: 101
Joined: Tue Aug 06, 2019 7:49 am

Re: Is it possible to manually input User API Key?

Post by meganwilliford »

Please let me know if its possible via the database.

I think submitting it as a feature request makes sense. It would be especially useful in disaster recovery situations to be able to manage the API Key so integrations using the API are not broken.
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: Is it possible to manually input User API Key?

Post by jbrunkow »

I believe that the solution provided in topic 42467 may prove useful in your situation as well.
...you can do it in the database directly on a per-user basis:

Code: Select all

echo "UPDATE nagiosxi.xi_users SET api_key='mycoolkey' WHERE  username='nagiosadmin';" | mysql -uroot -pnagiosxi
-mcapra

Otherwise, it looks like the solution in topic 44024 may also be relevant.
You could set the Backend Ticket to the same on your server and use that for your API ticket number.

Code: Select all

mysql -u root -pnagiosxi nagiosxi -e "UPDATE xi_users SET backend_ticket = '< API key >' WHERE username='nagiosadmin'";
-tgriep
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked