Ad Widget

Collapse

API get hostid via inventory alias

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wamsterdam
    Member
    • Apr 2013
    • 34

    #1

    API get hostid via inventory alias

    Hi,

    I know how to retrieve host inventory info for a given hostid via the API using PHP:

    Code:
    $contacts = $api->hostGet(array(
    	'output' => 'shorten',
    	'filter' => array('hostid' => '10155',
    	'selectInventory' => array('contact', 'name', 'alias')
    ));
    but I haven't found out how to retrieve the hostid for a given inventory alias?

    TIA,
    Wouter
Working...