GlpigetObject » History » Version 3

yeti, 02/03/2011 05:36 PM

1 1 yeti
h1. [[En_devguide#Provided-Methods|Methods]] > glpi.getObject
2 2 yeti
3 2 yeti
!https://forge.indepnet.net/svn/webservices/authenticated.png! +@This method is only accessible by authenticated users@+
4 2 yeti
5 2 yeti
Retrieve information on a existing object if the authenticated user can view it.
6 2 yeti
7 2 yeti
*input* a hastable
8 2 yeti
9 3 yeti
* *help* option to get usage information *+OPTIONAL+*
10 3 yeti
* *itemtype* the object type *+MANDATORY+*
11 3 yeti
* *id* the ID of object *+MANDATORY+*
12 3 yeti
* *show_label* *+OPTIONAL+*
13 3 yeti
* *show_name* *+OPTIONAL+*
14 2 yeti
15 2 yeti
*Default Call* example
16 2 yeti
<pre>
17 2 yeti
$ php testxmlrpc.php --session=0ptega61kobcnhkv0vokbercv1 --method=glpi.getObject --itemtype=Computer --id=501
18 2 yeti
+ Calling 'glpi.getObject' on http://localhost/glpi/plugins/webservices/xmlrpc.php?session=0ptega61kobcnhkv0vokbercv1
19 2 yeti
+ Response: Array
20 2 yeti
(
21 2 yeti
    [name] => computers 0-1
22 2 yeti
    [id] => 501
23 2 yeti
    [locations_id] => 21
24 2 yeti
    [computertypes_id] => 1
25 2 yeti
    [computermodels_id] => 1
26 2 yeti
    [states_id] => 5
27 2 yeti
    [operatingsystems_id] => 1
28 2 yeti
    [operatingsystemversions_id] => 2
29 2 yeti
    [operatingsystemservicepacks_id] => 4
30 2 yeti
    [autoupdatesystems_id] => 3
31 2 yeti
    [os_license_number] => os sn 0
32 2 yeti
    [os_licenseid] => os id 0
33 2 yeti
    [serial] => m233a56mu6i
34 2 yeti
    [otherserial] => vqcfci7a8si
35 2 yeti
    [notepad] => note computer 0
36 2 yeti
    [contact] => contact 0
37 2 yeti
    [contact_num] => num 0
38 2 yeti
    [users_id] => 748
39 2 yeti
    [groups_id] => 3
40 2 yeti
    [date_mod] => 2011-01-26 10:39:52
41 2 yeti
    [networks_id] => 5
42 2 yeti
    [domains_id] => 3
43 2 yeti
    [manufacturers_id] => 1
44 2 yeti
    [users_id_tech] => 579
45 2 yeti
    [entities_id] => 1
46 2 yeti
    [is_ocs_import] => 0
47 2 yeti
)</pre>