I run centreon 21.04 in a VM for some tests.
I imported the Centreon REST API v2 collection into Postman as described here. Some endpoints work like:
POST /login
GET /logout
GET /configuration/icons
GET /monitoring/acknowledgements
GET /platform/topology
but most other endpoints return an error 500 with "No route found".
Example of response with the /centreon/api/latest/monitoring/hosts
endpoint:
$ curl --location --request GET 'http://<VM_IP>:80/centreon/api/latest/monitoring/hosts' --header 'X-AUTH-TOKEN: mytoken'
{"code":500,"message":"No route found for 'GET /monitoring/hosts'"}
The X-AUTH-TOKEN header is set with the token retrieved via the /login
endpoint.
I'm using the default admin user for which I enabled Reach API Configuration and Reach API Realtime in the web UI via Configuration > Users > Contacts/Users > admin > Centreon Authentication
.
Any idea why this is not working ?