You are viewing documentation for the development version, it may be incomplete.
Join our translation project and help translate Zabbix documentation into your native language.

connector.update

Description

object connector.update(object/array connectors)

This method allows to update existing connectors.

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

Parameters

(object/array) Connector properties to be updated.

The connectorid property must be defined for each connector, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged.

Additionally to the standard connector properties, the method accepts the following parameters.

Parameter Type Description
tags array Connector tag filter to replace the current tag filter.

Return values

(object) Returns an object containing the IDs of the updated connectors under the connectorids property.

Examples

Changing HTTP authentication type

Change HTTP authentication type to Bearer for connector with ID "3".

Request:

{
           "jsonrpc": "2.0",
           "method": "connector.update",
           "params": {
               "connectorid": 3,
               "authtype": 5,
               "token": "{$DATA_EXPORT_BEARER_TOKEN}"
           },
           "id": 1
       }
Copy
✔ Copied

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "connectorids": [
                   "3"
               ]
           },
           "id": 1
       }
Copy
✔ Copied

Updating tag filter

Change tag filter for connector with ID "5".

Request:

{
           "jsonrpc": "2.0",
           "method": "connector.update",
           "params": [
               {
                   "connectorid": 5,
                   "tags_evaltype": 2,
                   "tags": [
                       {
                           "tag": "service",
                           "operator": 0,
                           "value": "mysqld"
                       },
                       {
                           "tag": "error",
                           "operator": 12,
                           "value": ""
                       }
                   ]
               }
           ],
           "id": 1
       }
Copy
✔ Copied

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "connectorids": [
                   "5"
               ]
           },
           "id": 1
       }
Copy
✔ Copied

Source

CConnector::update() in ui/include/classes/api/services/CConnector.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.