Methods > glpi.getNetworkEquipment

This method is only accessible by authenticated users

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

input a hastable

  • help option to get usage information
  • id : computer ID
  • id2name : option to enable id to name translation of dropdown fields
  • infocoms : return infocoms assiciated with the computer
  • contracts : return contracts associated with the computer
  • networkports : return informations about computer's network ports (available since plugin version 1.1.0)
return a hashtable
  • fields of glpi_networkequipments
  • fields of glpi_infocoms if option infocoms is enabled
  • fields of glpi_contracts if option contracts is enabled
  • fields of glpi_networkports, glpi_netpoints and glpi_vlans, if option is enabled

Call example

php testxmlrpc.php --url=glpi078/plugins/webservices/xmlrpc.php --method=glpi.getNetworkEquipment --host=localhost --session=19fd3d05b1ebae82b286a712180c56b0 --help
+ Calling 'glpi.getNetworkEquipment' on http://localhost/glpi078/plugins/webservices/xmlrpc.php?session=19fd3d05b1ebae82b286a712180c56b0
+ Response: Array
(
    [id] => integer, mandatory
    [id2name] => bool,optional
    [infocoms] => bool,optional
    [contracts] => bool,optional
    [networkports] => bool,optionnal
    [help] => bool,optional

php testxmlrpc.php --method=glpi.getNetworkEquipment --computer=1 --session=5b1fd5f8ac3615fa56651beea0d4994c --infocoms 
+ Calling 'glpi.getNetworkEquipment' on http://localhost/glpi078/plugins/webservices/xmlrpc.php?session=19fd3d05b1ebae82b286a712180c56b0
+ Response: Array
(
    [id] => 1
    [entities_id] => 0
    [is_recursive] => 1
    [name] => Router 1
    [ram] => 20
    [serial] => 
    [otherserial] => 
    [contact] => 
    [contact_num] => 
    [users_id_tech] => 0
    [date_mod] => 2010-05-03 08:07:48
    [comment] => 
    [locations_id] => 11
    [domains_id] => 0
    [networks_id] => 0
    [networkequipmenttypes_id] => 0
    [networkequipmentmodels_id] => 0
    [networkequipmentfirmwares_id] => 0
    [manufacturers_id] => -1
    [is_deleted] => 0
    [is_template] => 0
    [template_name] => 
    [mac] => 00:11:32:43:56:75
    [ip] => 10.0.1.254
    [notepad] => 
    [users_id] => 0
    [groups_id] => 0
    [states_id] => 1
    [ticket_tco] => 0.0000
    [networks_name] => 
    [domains_name] => 
    [manufacturers_name] => 
    [states_name] => En production
    [networkequipmentmodels_name] => 
    [networkequipmenttypes_name] => 
    [networkequipmentfirmwares_name] => 
    [groups_name] => 
    [contracts] => Array
        (
            [0] => Array
                (
                    [id] => 1
                    [entities_id] => 0
                    [is_recursive] => 0
                    [name] => Contrat 1
                    [num] => 
                    [cost] => 0.0000
                    [contracttypes_id] => 0
                    [begin_date] => 2009-03-10
                    [duration] => 12
                    [notice] => 2
                    [periodicity] => 0
                    [billing] => 0
                    [comment] => 
                    [accounting_number] => 
                    [is_deleted] => 0
                    [week_begin_hour] => 00:00:00
                    [week_end_hour] => 00:00:00
                    [saturday_begin_hour] => 00:00:00
                    [saturday_end_hour] => 00:00:00
                    [use_saturday] => 0
                    [monday_begin_hour] => 00:00:00
                    [monday_end_hour] => 00:00:00
                    [use_monday] => 0
                    [max_links_allowed] => 0
                    [notepad] => 
                    [alert] => 12
                    [renewal] => 0
                    [contracttypes_name] => 
                )

        )

)