Methods > glpi.listTickets¶
This method is only accessible by authenticated users
Version | Comments |
1.5.0 | chan,ge value of approval |
1.2.0 | output reviewed for multi-actors, add satisfaction, "approval and approver options |
0.2.0 | Method added |
List the Tickets the current authenticated user can view
input hashtable of optional criteria
- count , start, limit (optional)
- order : allowed key name : 'id', 'date', 'closedate', 'date_mod', 'status', 'users_id', 'groups_id', 'entities_id', 'priority'
- id2name : option to enable id to name translation of dropdown fields
- help option to get usage information
- user : ID of the victim : person concerned by the ticket (must have show_all_ticket or show_group_ticket right)
- recipient : ID of the requester : person who create the ticket
- mine : list tickets of user OR recipient
- group : ID of the requester group (must have show_all_ticket or show_group_ticket right)
- mygroups : list of groups of current user
- category : ID of the category of the ticket (include child categories)
- status : of the ticket, must be from : 1 (new), 2 (assign), 3 (plan), 4 (waiting), 5 (solved), 'notold','old','process','all', notclosed
- startdate : start of period where ticket is active (close date after this)
- enddate : end of period where ticket is active (open date before this)
- itemtype : ID of the type of the item (see glpi.listHelpdeskTypes)
- item : ID if the item (requires itemtype)
- entity : ID of the entity of the ticket (version 0.4.0)
- satisfaction : only closed tickets with a satisfaction survey (0:all, 1:waiting, 2:answered), see glpi.setTicketSatisfaction
- approval : only tickets with a validation request (value in 1 (none), 2 (waiting), 3 (accepted), 4 (refused)), see glpi.setTicketValidation
- approver : only tickets with a validation request send to this user.
- id : of the ticket
- entities_id : ID of the entity
- name : short description of the ticket
- date : open date of the ticket
- closedate : close date of the ticket
- date_mod : date of last update
- status : 'waiting','old_done','new','old_notdone','assign','plan'
- users_id_recipient : id of the recipient
- urgence : from 1 to 5 (is priority)
- impact : from 1 to 5 (is priority)
- priority : from 1 to 5
- ticketscategories_id : ID
- itemtype : type of item
- items_id : ID of the item
- requesttypes_id : ID of the request's type
- others fields from glpi_tickets table (see call example)
- users_name
- users_name_recipient
- entities_name
- status_name
- items_name
- itemtype_name
- ticketscategories_name
- requesttypes_name
- etc
Call example 0.80
$ php testxmlrpc.php --session=dbf309u56bjnclv7jcuu9ddjk1 --method=glpi.listTickets \ --enddate=2009-05-30 --startdate=2009-05-01 --order=priority + Calling 'glpi.listTickets' on http://localhost//glpi080/plugins/webservices/xmlrpc.php?session=dbf309u56bjnclv7jcuu9ddjk1 + Response: Array ( [0] => Array ( [id] => 269 [entities_id] => 1 [name] => coucou [date] => 2011-06-09 18:00:00 [closedate] => [solvedate] => [date_mod] => 2011-07-18 14:26:26 [users_id_lastupdater] => 6 [status] => 4 [users_id_recipient] => 6 [requesttypes_id] => 1 [suppliers_id_assign] => 895 [itemtype] => Software [items_id] => 256253 [content] => lmdkvssldkjvn [urgency] => 3 [impact] => 3 [priority] => 5 [ticketcategories_id] => 4 [type] => 1 [cost_time] => 12.2500 [cost_fixed] => 1034.5600 [cost_material] => 78.9000 [ticketsolutiontypes_id] => 1 [solution] => Solution from KB ... ... [global_validation] => 3 [due_date] => 2011-06-09 20:15:45 [begin_waiting_date] => 2011-07-05 13:14:19 [sla_waiting_duration] => 0 [ticket_waiting_duration] => 45817 [close_delay_stat] => -45817 [solve_delay_stat] => -45817 [takeintoaccount_delay_stat] => 2655 [actiontime] => 13020 [slas_id] => 0 [slalevels_id] => 0 [users] => Array ( [requester] => Array ( [0] => Array ( [id] => 6 ) ) [observer] => Array ( [0] => Array ( [id] => 2018 ) ) [assign] => Array ( [0] => Array ( [id] => 8 ) ) ) [groups] => Array ( [requester] => Array ( [0] => Array ( [id] => 314 ) ) [observer] => Array ( [0] => Array ( [id] => 316 ) ) [assign] => Array ( [0] => Array ( [id] => 11 ) [1] => Array ( [id] => 308 ) ) ) ) )
Call example 0.72
$ php testxmlrpc.php --session=dbf309u56bjnclv7jcuu9ddjk1 --method=glpi.listTickets \ --id2name --enddate=2009-05-30 --startdate=2009-05-01 --order=priority + Calling 'glpi.listTickets' on http://localhost//glpi072/plugins/webservices/xmlrpc.php?session=dbf309u56bjnclv7jcuu9ddjk1 + Response: Array ( [0] => Array ( [ID] => 4 [entities_id] => 1 [name] => Test [date] => 2009-05-11 14:40:00 [closedate] => 2009-05-29 13:55:32 [date_mod] => 2009-05-29 13:55:32 [status] => old_done [users_id] => 6 [users_id_recipient] => 6 [groups_id] => 1 [urgence] => 3 [impact] => 3 [priority] => 3 [ticketscategories_id] => 3 [itemtype] => 1 [items_id] => 1 [requesttypes_id] => 1 [users_name] => LASSON NELLY [users_name_recipient] => LASSON NELLY [entities_name] => CompleteName of the first entity [status_name] => Closed (resolved) [items_name] => Computer's Name [itemtype_name] => Computer(s) [groups_name] => Direction [ticketscategories_name] => Request for service > PC transfer [requesttypes_name] => Helpdesk ) )