我在VM中运行centreon 21.04进行一些测试。
我像描述的那样将Centreon v2集合导入Postman。一些端点的工作方式如下:
POST /loginGET /logoutGET /configuration/iconsGET /monitoring/acknowledgementsGET /platform/topology但是,大多数其他端点返回一个错误500与“没有找到路由”。使用/centreon/api/latest/monitoring/hosts端点的响应示例:
$ 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'"}使用通过/login端点检索的令牌设置X报头.我正在使用默认的管理用户,我为其启用了Reach API配置,并通过Configuration > Users > Contacts/Users > admin > Centreon Authentication在web中实现了API。
知道为什么这不管用吗?
发布于 2021-06-02 07:13:11
因此,显然有些端点目前只在API的beta版本中工作,所以请确保在URL中使用/centreon/api/beta/路径。
https://stackoverflow.com/questions/67788936
复制相似问题