Methods > glpi.listHelpdeskItems

This method is only accessible by authenticated users

Version Comments
1.2.0 add locations_id in result (locations_name and states_name with id2name)
1.0.0 itemtype is a string (previously an integer), drop itemsubtype option
0.4.0 entity option added
0.2.0 Method added

List allowed items for the authenticated user (from user's right) to open a helpdesk ticket on

input a hastable

  • itemtype : mandatory (see glpi.listHelpdeskTypes). my means "My devices" (and Items of my group if allowed in user's profil), empty means "General" (so, always return an empty array)
  • count , start, limit (optional)
  • help option to get usage information
  • id2name : option to enable id to name translation of dropdown fields
if itemtype is not "my" you can set some optional criterias
  • entity : ID of the entity of the item
  • group : integer, only item of this group ID
  • name : string, (MySQL joker % allowed)
  • state : integer, the state ID, if specified, of the item

return a array of hashtable

If the user's profil don't give enough right, the return will be an empty array.

  • itemtype
  • id
  • name
And, if defined for this itemtype
  • users_id : ID of the user
  • groups_id : ID of the group
  • locations_id : ID of the group
  • serial number
  • otherserial : asset number
  • states_id ID

Call example:

$ php testxmlrpc.php  --session=au4jva758pjna1pba1fitk3f70  \
    --method=glpi.listHelpdeskItems \
    --itemtype=Software \
    --name=Mozilla%
+ Calling 'glpi.listHelpdeskItems' on http://localhost//glpi080/plugins/webservices/xmlrpc.php?session=au4jva758pjna1pba1fitk3f70
+ Response: Array
(
    [0] => Array
        (
            [itemtype] => Software
            [id] => 223125
            [name] => Mozilla Thunderbird
            [locations_id] => 0
            [users_id] => 0
            [groups_id] => 0
        )
    [1] => Array
        (
            [itemtype] => Software
            [id] => 262150
            [name] => Mozilla Firefox
            [locations_id] => 0
            [users_id] => 0
            [groups_id] => 0
        )
)