Methods > glpi.getNetworkports

This method is only accessible by authenticated users

Version Comments
1.0.0 Method added

Retrieve object's network ports, netpoints & vlans

input a hastable

  • help option to get usage information
  • id : object ID
  • itemtype : object type identifier. Value can be : Computer, Peripheral, NetworkEquipment, Phone, Printer
  • id2name : option to enable id to name translation of dropdown fields
return a hashtable
  • fields of glpi_networkports, glpi_netpoints and glpi_vlans

Call example

$ php testsoap.php --method=glpi.getNetworkports --help
+ Calling 'glpi.getNetworkports' on http://localhost/0.72-bugfixes/plugins/webservices/soap.php
+ Response: Array
(
    [id] => integer, mandatory
    [id2name] => bool,optional
    [itemtype] => string, mandatory
    [help] => bool,optional
)

$ php testsoap.php --method=glpi.getNetworkports --id=23 --itemtype=Computer --id2name --session=928a89fc6562e8f26b23fb33c489cfd7
+ Calling 'glpi.getComputerNetworkports' on http://localhost/0.72-bugfixes/plugins/webservices/soap.php
+ Response: Array                                                                                                            
(                                                                                                                            
    [0] => Array                                                                                                             
        (                                                                                                                    
            [id] => 31
            [items_id] => 23
            [itemtype] => Computer
            [logical_number] => 0
            [name] => E100B6 Intel(R) PRO/100 VM Network Connection
            [ip] => xxx.xxx.xxx.xxx
            [mac] => AA:AA:AA:AA:AA:AA
            [networkinterfaces_id] => 1
            [netpoints_id] => 0
            [netmask] => 255.255.255.0
            [gateway] => zzz.zzz.zzz.zzz
            [subnet] => zzz.zzz.zzz.zzz
            [networkinterfaces_name] => Ethernet
        )

)