hostinterface.get
The method allows to retrieve host interfaces according to the given parameters.
This method is available to users of any type. Permissions to call the method can be revoked in user role settings. See for more information.
Parameters
The method supports the following parameters.
(integer/array)
Returns either:
- an array of objects;
- the count of retrieved objects, if the
countOutput
parameter has been used.
Examples
Retrieve host interfaces
Response:
{
"jsonrpc": "2.0",
"result": [
{
"interfaceid": "50039",
"hostid": "30057",
"useip": "1",
"ip": "::1",
"dns": "",
"port": "10050",
"available": "0",
"error": "",
"errors_from": "0",
"disable_until": "0",
"details": []
},
{
"interfaceid": "55082",
"hostid": "30057",
"main": "0",
"useip": "1",
"dns": "",
"port": "10051",
"available": "0",
"error": "",
"errors_from": "0",
"disable_until": "0",
"details": {
"version": "2",
"bulk": "0",
"community": "{$SNMP_COMMUNITY}"
}
}
],
}