GlpigetObject » History » Version 4

« Previous - Version 4/11 (diff) - Next » - Current version
yeti, 02/03/2011 06:18 PM


Methods > glpi.getObject

This method is only accessible by authenticated users

Retrieve information on a existing object if the authenticated user can view it.

input a hastable

  • help option to get usage information OPTIONAL
  • itemtype the object type MANDATORY
  • id the ID of object MANDATORY
  • show_label option to show the lang label for each return field OPTIONAL
  • show_name option to show the dropdown name value for each ID field OPTIONAL

Other input hastable options

The following options are available depending on the type that was defines in the "itemtype" option bellow.

  • with_infocom option to show infocom informations in the output result
  • with_networkport option to show network ports in the output result
  • with_phone option to show connected phones in the output result (only for Computer itemtype)
  • with_printer option to show connected printers in the output result (only for Computer itemtype) *

Default Call example

$ php testxmlrpc.php --session=0ptega61kobcnhkv0vokbercv1 --method=glpi.getObject --itemtype=Computer --id=501
+ Calling 'glpi.getObject' on http://localhost/glpi/plugins/webservices/xmlrpc.php?session=0ptega61kobcnhkv0vokbercv1
+ Response: Array
(
    [name] => computers 0-1
    [id] => 501
    [locations_id] => 21
    [computertypes_id] => 1
    [computermodels_id] => 1
    [states_id] => 5
    [operatingsystems_id] => 1
    [operatingsystemversions_id] => 2
    [operatingsystemservicepacks_id] => 4
    [autoupdatesystems_id] => 3
    [os_license_number] => os sn 0
    [os_licenseid] => os id 0
    [serial] => m233a56mu6i
    [otherserial] => vqcfci7a8si
    [notepad] => note computer 0
    [contact] => contact 0
    [contact_num] => num 0
    [users_id] => 748
    [groups_id] => 3
    [date_mod] => 2011-01-26 10:39:52
    [networks_id] => 5
    [domains_id] => 3
    [manufacturers_id] => 1
    [users_id_tech] => 579
    [entities_id] => 1
    [is_ocs_import] => 0
)