This is the documentation page for an unsupported version of Zabbix.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

hostinterface.update

Description

object hostinterface.update(object/array hostInterfaces)

This method allows to update existing host interfaces.

This method is only available to Admin and Super admin user types. Permissions to call the method can be revoked in user role settings. See User roles for more information.

Parameters

(object/array) Host interface properties to be updated.

The interfaceid property must be defined for each host interface, all other properties are optional. Only the given properties will be updated, all others will remain unchanged.

Повернуті значення

(object) Повертає об’єкт, що містить ідентифікатори оновлених інтерфейсів хостів у властивості interfaceids.

Приклади

Зміна порту інтерфейсу хоста

Змініть порт інтерфейсу хоста.

Запит:

{
           "jsonrpc": "2.0",
           "method": "hostinterface.update",
           "params": {
               "interfaceid": "30048",
               "port": "30050"
           },
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 1
       }
Copy
✔ Copied

Відповідь:

{
           "jsonrpc": "2.0",
           "result": {
               "interfaceids": [
                   "30048"
               ]
           },
           "id": 1
       }
Copy
✔ Copied

Джерело

CHostInterface::update() в ui/include/classes/api/services/CHostInterface.php.

To toggle search highlight, press Ctrl+Alt+H
Have an improvement suggestion for this page? Select the text that could be improved and press Ctrl+Enter to send it to the editors.