Skip to main content
Solved

appel api centreon_realtime_services

  • April 26, 2022
  • 6 replies
  • 276 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.

6 replies

fgbetokpanou
Centreonian
Forum|alt.badge.img+11
  • Centreonian
  • April 26, 2022

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 *
  • April 26, 2022

 


Forum|alt.badge.img+16
  • Steward **
  • April 27, 2022

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 *
  • April 27, 2022

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
  • Steward **
  • Answer
  • April 27, 2022

Not possible too.

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


Forum|alt.badge.img+3
  • Author
  • Steward *
  • April 27, 2022

ok thank you