Calling API issues

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
lucas.shearer
Posts: 17
Joined: Fri Nov 19, 2021 12:00 pm

Calling API issues

Post by lucas.shearer »

I can successfully call an API when I'm connected to the VPN that has access to the VM which NagiosXI is installed, but when I am not connected the API calls fail without reaching the endpoint. Is there a way to call this API from any computer? Thanks for any and all help!
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: Calling API issues

Post by gsmith »

Hi

You will need to ask your network administrator to open a hole in the firewall.

If the URL for the Nagios server starts with http:// they will have to allow traffic to port 80
of your Nagios server. If the URL starts with https:// they will have to allow traffic to port 443
of your Nagios server.

Thanks
lucas.shearer
Posts: 17
Joined: Fri Nov 19, 2021 12:00 pm

Re: Calling API issues

Post by lucas.shearer »

gsmith wrote:Hi

You will need to ask your network administrator to open a hole in the firewall.

If the URL for the Nagios server starts with http:// they will have to allow traffic to port 80
of your Nagios server. If the URL starts with https:// they will have to allow traffic to port 443
of your Nagios server.

Thanks
So the external machine needs to allow traffic to port 80? or the nagios machine needs to allow traffic in to port 80? sorry for the confusion.
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: Calling API issues

Post by gsmith »

Hi

The external machine (the one that wants to call the API) needs to get to port 80 on your Nagios XI server,
so if your Nagios XI server is behind a firewall then the firewall needs port 80 open.

If you are doing this on a network that uses NAT (like a home network) then you will need to have
your router forward the request from your network's internet-facing IP address to the internal address
that your Nagios XI server has.

Thanks
Locked