Question

Centreon 22 rest api activate

  • 9 October 2023
  • 0 replies
  • 160 views

Badge +3

Hi guys,

I enabled Reach API Configuration and Reach API Realtime for some users but I can’t access to neither.

I don’t find api configuration menu on centreon Wui and my test through curl query doesn’t work (while working through clapi)

Is rest api is activated by default ? I am struggling in the documentation to find information.

Here is an output on my actual conf :

/etc/centreon-gorgone/config.d/31-centreon-api.yaml
gorgone:
  tpapi:
    - name: centreonv2
      base_url: "http://127.0.0.1/centreon/api/latest/"
      username: "centreon-gorgone"
      password: "xxxxx"
    - name: clapi
      username: "centreon-gorgone"
      password: "xxxxx"

 

 centreon -u centreon-gorgone -p xxxxxx -o HOST -a show

id;name;alias;address;activate

….

success output

 

curl -u centreon-gorgone:xxx -X GET http://127.0.0.1/centreon/api
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access this resource.</p>
</body></html>

 

chatgpt says I need to add $centreon_conf['centreon_api_activate'] = 1; parameter in centreon.conf.php conf file (on centreon version 20.04) but I find nothing relevant in the 22.04 documentation

 

Anyone may please share any idea with me ?

 

Thanks,

Regards,

Jules.

 


0 replies

Be the first to reply!

Reply