object connector.create(object/array connectors)
This method allows to create new connector objects.
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.
(object/array)
Connector objects to create.
Additionally to the standard connector properties, the method accepts the following parameters.
Parameter | Type | Description |
---|---|---|
tags | array | Connector tag filter. |
(object)
Returns an object containing the IDs of the created connectors under the connectorids
property. The order of the returned IDs matches the order of the passed connectors.
Create a connector to export trigger events with a tag filter. HTTP authentication will be performed using Bearer token.
{
"jsonrpc": "2.0",
"method": "connector.create",
"params": [
{
"name": "Export of events",
"data_type": 1,
"url": "{$DATA_EXPORT_URL}",
"authtype": 5,
"token": "{$DATA_EXPORT_BEARER_TOKEN}",
"tags": [
{
"tag": "service",
"operator": 0,
"value": "mysqld"
}
]
}
],
"id": 1
}
Response:
CConnector::create() in ui/include/classes/api/services/CConnector.php.