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)
Renvoie un objet contenant les IDs des connecteurs créés sous la propriété connectorids
. L’ordre des IDs renvoyés correspond à l’ordre des connecteurs transmis.
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() dans ui/include/classes/api/services/CConnector.php.