GlpigetObject » History » Version 3

« Previous - Version 3/11 (diff) - Next » - Current version
yeti, 02/03/2011 05:36 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 OPTIONAL
  • show_name OPTIONAL

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
)