Methods > glpi.listDropdownValues

This method is only accessible by authenticated users

Version Comments
1.3.0 Only return some (minimal) fields : id, name, completename, ...
Add criteria option
1.2.1 Add options start and limit
1.2.0 Prefer class name for dropdown (end of table name still work for compatibility), add 'helpdesk' option, manage special dropdown
0.2.0 Method added

Search for values in a dropdown table.

input : a hashtable with optional search cirterias

  • help option to get usage information
  • dropdown : name of the dropdown (mandatory). Must a GLPI class name or a Special dropdown name (see below)
  • id : of the entry
  • parent : for tree dropdown, ID of the parent entry
  • name : a optional string (MySQL joker % allowed)
  • helpdesk : to filter on 'is_helpdeskvisible' attribute (TicketCategory) (deprecated, use criteria=helpdeskvisible)
  • criteria : to filter on a boolean attribute (is_xxx)
  • count , start, limit (optional)

special dropdown are : ticketstatus, ticketurgency, ticketimpact, tickettype, ticketpriority, ticketglobalvalidation, ticketvalidationstatus

return a array of hashtable

  • fields for the table

Call Example

$ php testxmlrpc.php --session=e0797sn66djmq2vciqa7n7ls02  --method=glpi.listDropdownValues --dropdown=TicketType
+ Calling 'glpi.listDropdownValues' on http://localhost//glpi080/plugins/webservices/xmlrpc.php?session=e0797sn66djmq2vciqa7n7ls02
+ Response: Array
(
    [0] => Array
        (
            [id] => 1
            [name] => Incident
        )
    [1] => Array
        (
            [id] => 2
            [name] => Request
        )
)

$ php testxmlrpc.php --session=bld5kadncmt9ph1pfp8mf1oeo3 --method=glpi.listDropdownValues --dropdown=Location "--name=Reims > Stock%" 
+ Calling 'glpi.listDropdownValues' on http://localhost//glpi072/plugins/webservices/xmlrpc.php?session=bld5kadncmt9ph1pfp8mf1oeo3
+ Response: Array
(
    [0] => Array
        (
            [id] => 4995
            [entities_id] => 1
            [is_recursive] => 0
            [name] => Stock -1 (Neuf)
            [locations_id] => 26
            [completename] => Reims > Stock -1 (Neuf)
            [comment] => Matériel neuf entreposé au -1
        )
    [1] => Array
        (
            [id] => 4996
            [entities_id] => 1
            [is_recursive] => 0
            [name] => Stock -2 (H.S.)
            [locations_id] => 26
            [completename] => Reims > Stock -2 (H.S.)
            [comment] => Matériel H.S. entreposé au -2
        )
)