You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2021-06-28 23:18:19

aziz
Member
Registered: 2021-03-30
Posts: 109

how to get all info needed in one api call

hello everyone
i wanna ask if there is a way to get all information i need in one api call like in my case i use this request to get ticket followup :

serveurGLPI/apirest.php/itilfollowup/

but in this  call response i get the user_id of the user who did the followup which make it hard for me to manipulate in my project cause i need to user name of the person who did the followup right now i'm struggling with this if there is a solution for this it will help me a lot

appreciate any suggestion.

Last edited by aziz (2021-06-28 23:18:36)

Offline

#2 2021-06-29 08:54:29

keepcool5283
Member
Registered: 2013-10-10
Posts: 158

Re: how to get all info needed in one api call

Hello;

As already said in your previous post, I don't think it's possible.
But with the user_id, you can do another API request to get the username : https://server/apirest.php/User/userid/


Apps Android GLPI Management : https://play.google.com/store/apps/deta … fr.dmn.app
Site Web : http://mdu-tech.fr/
GLPI 9.5.5 sur IIS 10 / PHP 8 / MySQL

Offline

#3 2021-06-29 10:00:11

Jean-Christophe
Moderator
Registered: 2007-08-22
Posts: 734

Re: how to get all info needed in one api call

did you try the "expand_dropdowns" parameter for your query ?

Offline

#4 2021-06-29 10:59:47

keepcool5283
Member
Registered: 2013-10-10
Posts: 158

Re: how to get all info needed in one api call

Jean-Christophe wrote:

did you try the "expand_dropdowns" parameter for your query ?

I don't think this is what he wants. If I well understand, he wants to have directly the user name when he make the api request :

https://server/apirest.php/itilfollowup/

Expand dropdowns give user_id too. Not the user_name wink

UserName is not in Itilfollowup Table, so you can't have it directly

PS : Sorry for my poor English


Apps Android GLPI Management : https://play.google.com/store/apps/deta … fr.dmn.app
Site Web : http://mdu-tech.fr/
GLPI 9.5.5 sur IIS 10 / PHP 8 / MySQL

Offline

Board footer

Powered by FluxBB