Ad Widget

Collapse

API: How to retrieve interfaceids?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • marcherren
    Junior Member
    • Mar 2011
    • 28

    #1

    API: How to retrieve interfaceids?

    Hi,

    Can someone tell me how to retrieve interfaceids from a host?
    (Apparently I need it to create an item)

    Using host.get() with output 'extend' doesn't show anything regarding this.

    Example::

    'result' => [
    {
    'status' => '0',
    'maintenances' => [],
    'lastaccess' => '0',
    'ipmi_errors_from' => '0',
    'hostid' => '200100000000012',
    'ipmi_available' => '0',
    'disable_until' => '0',
    'proxy_hostid' => '0',
    'error' => '',
    'jmx_available' => '0',
    'jmx_errors_from' => '0',
    'snmp_error' => 'Timeout while connecting to [[10.0.2.109]:10050]',
    'maintenance_from' => '0',
    'snmp_disable_until' => '0',
    'jmx_disable_until' => '0',
    'ipmi_authtype' => '0',
    'available' => '0',
    'ipmi_username' => '',
    'jmx_error' => '',
    'snmp_available' => '2',
    'name' => 'bFAEGTB101',
    'ipmi_error' => '',
    'maintenanceid' => '0',
    'host' => 'bFAEGTB101',
    'errors_from' => '0',
    'ipmi_password' => '',
    'snmp_errors_from' => '0',
    'ipmi_privilege' => '2',
    'ipmi_disable_until' => '0',
    'maintenance_type' => '0',
    'maintenance_status' => '0'
    }
    ]
  • marcherren
    Junior Member
    • Mar 2011
    • 28

    #2
    my fault...

    you need to add the "selectInterfaces" parameter in the request. Without no interface is returned.

    Comment

    Working...