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 2020-10-28 23:38:28

leolage
Member
Registered: 2020-10-28
Posts: 6

Searching Ticket by status via API

Hello,

How can I search tickets by status? For example, all tickets with status 6?

I try this search, but dont work:

myglpisite.com/apirest.php/Ticket?searchText[status]=6

Thanks

Leo

Offline

#2 2020-10-29 22:45:54

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

Re: Searching Ticket by status via API

once you init session then use this url :

myglpisite.com/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]=6


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

#3 2020-10-29 23:48:28

leolage
Member
Registered: 2020-10-28
Posts: 6

Re: Searching Ticket by status via API

Thanks LaDenrée, you saved my life!

Have a nice day

LaDenrée wrote:

once you init session then use this url :

myglpisite.com/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]=6

Offline

Board footer

Powered by FluxBB