You are not logged in.
Pages: 1
Hello,
I have this Select that I would like to turn into Rest, could someone help me?
SELECT * FROM `glpi_tickets` WHERE entities_id = 9 AND itilcategories_id = 189 AND status = 2;
From what I've researched, it would be something along those lines below, only it's not working.
/search/Ticket/?entities_id=9&criteria[0][itilcategories_id]=189&criteria[0][status]=2
Offline
hello,
Pour trouver le bon filtre, aller sur la page "ticket.php" , appliquer vos filtre en direct et ensuite dans l'url vous retrouver les filtre a appliquer pour l'api
exemple avec le filtre "entité" et "statut" du ticket sur new :
url :
http://Url_de_glpi/ticket.php?is_deleted=0&as_map=0&browse=0&criteria[0][link]=AND&criteria[0][field]=80&criteria[0][searchtype]=equals&criteria[0][value]=0&criteria[1][link]=AND&criteria[1][field]=12&criteria[1][searchtype]=equals&criteria[1][value]=1&itemtype=Ticket&start=0&_glpi_csrf_token=........
filtre API :
/search/Ticket?&criteria[0][link]=AND&criteria[0][field]=80&criteria[0][searchtype]=equals&criteria[0][value]=0&criteria[1][link]=AND&criteria[1][field]=12&criteria[1][searchtype]=equals&criteria[1][value]=1&itemtype=Ticket&start=0
edit : (is_deleted=0 is important)
/search/Ticket?is_deleted=0&criteria[0][link]=AND&criteria[0][field]=80&criteria[0][searchtype]=equals&criteria[0][value]=0&criteria[1][link]=AND&criteria[1][field]=12&criteria[1][searchtype]=equals&criteria[1][value]=1
Last edited by LaDenrée (2023-08-28 12:02:47)
-- Any exchange not written in French comes from an automatic translation. --
Offline
Bonjour,
Merci Ladenrée, le "is_deleted=0" apporte quoi à la requête ?
-- Any exchange not written in French comes from an automatic translation. --
Offline
on n'a pas les tickets de la corbeille dans la réponse
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
Pages: 1