Skip to main content
Solved

appel api centreon_realtime_services

  • Apr 26, 2022 2:56 PM UTC
  • 6 replies
  • 325 views

Forum|alt.badge.img+3

Bonjour ;
 Je cherche à faire un appel api "action=list&object=centreon_realtime_services" en utilisant un user configurer en autologin.
du coup mon url ressemble à ceci:
 https://xxxxxxx/centreon/api/index.php?action=list&object=centreon_realtime_services&viewType=all&fields=state&search=xxxxx&searchHost=xxxxxxxx&autologin=1&useralias=xxxxxxxx&token=xxxxxxx mais j'obtiens un retour "unauthorized".

avez-vous une solution sans passer par le token?

Best answer by Kriko

Not possible too.

You can use both api v1 and v2, but both require auth and token.

View original

6 replies

fgbetokpanou
Centreonian
Forum|alt.badge.img+12
  • Centreonian
  • Apr 26, 2022 3:06 PM UTC

Hi @idi, 
I suggest you add a screenshot to your post instead of a url link. This would help the community members to better understand your problem, in order to help you find solutions 😉
Regards, 


Forum|alt.badge.img+3
  • Author
  • Steward ***
  • Apr 26, 2022 3:20 PM UTC

 


Forum|alt.badge.img+16
  • Ranger **
  • Apr 27, 2022 6:47 AM UTC

Hello @idi ,

It’s mandatory to use the call for authentication:

https://docs.centreon.com/docs/api/rest-api-v1/#authentication

And so use the AuthToken


Forum|alt.badge.img+3
  • Author
  • Steward ***
  • Apr 27, 2022 9:02 AM UTC

Bonjour @Kriko 

 

possible de passer par api gorgone pour éviter authenken?

mon besoin d’afficher l’état d’un service en temps réel (centreon_realtime_services) 


Forum|alt.badge.img+16
  • Ranger **
  • Answer
  • Apr 27, 2022 3:15 PM UTC

Not possible too.

You can use both api v1 and v2, but both require auth and token.


Forum|alt.badge.img+3
  • Author
  • Steward ***
  • Apr 27, 2022 3:59 PM UTC

ok thank you