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-07-25 22:02:52

mcesarpl
Member
Registered: 2021-07-25
Posts: 2

GLPi Rest Api Integration

Hi, I'm working in a integration with Glpi and my company plataform... and i'm passing some throubles

I would like to know how to list all tickets no closed of a certain user, preferably via their email... how could I do this using api call?

(i'm using nodejs)

Thanks to anyone who can help

Offline

#2 2021-07-26 09:41:40

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,287

Re: GLPi Rest Api Integration

first look for user ID : (using  /search/User)

myserver/glpi/apirest.php/search/User?is_deleted=0&as_map=0
&criteria[0][link]=AND&criteria[0][field]=5&criteria[0][searchtype]=contains&criteria[0][value]=^xxxx@domain.com$
&criteria[1][link]=AND&criteria[1][field]=8&criteria[1][searchtype]=equals&criteria[1][value]=1

then , once you have user ID

myserver/glpi/apirest.php/search/Ticket?is_deleted=0&as_map=0
&criteria[0][link]=AND&criteria[0][field]=12&criteria[0][searchtype]=equals&criteria[0][value]=notclosed
&criteria[1][link]=AND&criteria[1][field]=4&criteria[1][searchtype]=equals&criteria[1][value]=user ID


Trouver la panne avant de réparer...
GLPI10.0.16 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.3 reports 1.16.0 formcreator 2.13.9, datainjection 2.13.5 fields 1.21.9

Offline

Board footer

Powered by FluxBB