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 2024-11-26 20:48:55

NiceATC
Member
Registered: 2024-11-19
Posts: 9

Get Tickets

I'm making a request to /apirest.php/search/Ticket to get all open tickets for a user based on the userID. It's working but I'm having a problem, only tickets from the root entity appear, if I hear a ticket for that user in another entity and displays nothing

Offline

#2 2024-11-27 14:41:34

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

Re: Get Tickets

I guess than active profile is not recursive when login.

get apirest.php/getActiveProfile/ and see entities in response, you probalbly only have root

then change entity to root (recursive);

$ curl -X POST \
-H 'Content-Type: application/json' \
-H "Session-Token: 83af7e620c83a50a18d3eac2f6ed05a3ca0bea62" \
-H "App-Token: f7g3csp8mgatg5ebc5elnazakw20i9fyev1qopya7" \
-d '{"entities_id": 0, "is_recursive": true}' \
'http://path/to/glpi/apirest.php/changeActiveEntities'


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 2024-11-28 19:56:58

NiceATC
Member
Registered: 2024-11-19
Posts: 9

Re: Get Tickets

At first it didn't work, he already had recursive supervisor permission on the root entity, but I managed to resolve it by manually placing him as supervisor on all entities

Offline

#4 2024-11-28 19:57:35

NiceATC
Member
Registered: 2024-11-19
Posts: 9

Re: Get Tickets

thanks for the help

Offline

Board footer

Powered by FluxBB