You are not logged in.
Pages: 1
Hi all,
I'm new to glpi and Web API and im trying to search for tickets with a certain parameter.
So let's say i wanted to get all the tickets with urgency = 5, How could i do that?
Using C#, I think it's something like this but i dont know how to add the parameters in the URL:
client.GetAsync("apirest.php/search/Ticket/.......");
Thank you in advance.
Offline
criteria are passed in a array.
try this :
tickets not deleted, not solved, with urgency=5
apirest.php/search/Ticket?is_deleted=0&criteria[0][field]=12&criteria[0][searchtype]=equals&criteria[0][value]=notold&criteria[1][link]=AND&criteria[1][field]=10&criteria[1][searchtype]=equals&criteria[1][value]=5
to get fields id either you use apirest.php/listSearchOptions/Ticket
or you filter in glpi helpdesk interface an copy url (that's what I Have done)
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
That's it, Thank you
Offline
Hi, how do i search for tickets that are between a closingdate???
ex: between: 31/03/2018 00:00:00 and 02/04/2018 00:00:00
Last edited by NicolasSousa (2018-04-02 15:24:31)
Offline
Nevermind, I managed to do it
Offline
Pages: 1