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 2022-10-14 12:12:26

liftoff
Member
Registered: 2022-10-11
Posts: 3

Get users stats information

Hello guys,
Is there an API request to get the stats of users (how many tickets opened resolved closed ,followup added ...):https://imgur.com/a/2qYtJx0
if there is no specific API to get those informations what is the best way to do it.
Hope someone can help me, I really appreciate TY.

Offline

#2 2022-10-16 18:32:25

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,809
Website

Re: Get users stats information

You would need to use the "search" endpoint with the related search criteria.

A trick to make that easier is to make the search in the web interface and then copy the query parameters (The ? and everything after it) from the URL and use them in your API search.
You can then use a script or something else to group the results as you want.


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#3 2022-10-17 11:51:46

liftoff
Member
Registered: 2022-10-11
Posts: 3

Re: Get users stats information

I tried : http://glpiserver/glpi/apirest.php/search?itemtype=Ticket&type=user&date1=2021-10-17&submit=Afficher+le+rapport&date2=2022-10-17&value2=0&showgraph=0

for this stats data but it didn't work : imgur.com/a/2qYtJx0
Hope you can help me with this one I really need it

Offline

#4 2022-10-19 21:19:38

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,809
Website

Re: Get users stats information

You have to use the search engine for tickets, not the reports to reuse the criteria in the API.


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

Board footer

Powered by FluxBB