Create a connector

POST /api/actions/connector/{connectorId}

Headers

  • kbn-xsrf string Required

    Cross-site request forgery protection

Path parameters

  • connectorId string Required

    A UUID v1 or v4 identifier for the connector. If you omit this parameter, an identifier is randomly generated.

application/json; Elastic-Api-Version=2023-10-31

Body object Required

The properties vary depending on the connector type.

One of:

Responses

  • 200 application/json; Elastic-Api-Version=2023-10-31

    Indicates a successful call.

    The properties vary depending on the connector type.

    One of:
  • 401 application/json; Elastic-Api-Version=2023-10-31

    Authorization information is missing or invalid.

    Hide response attributes Show response attributes object
POST /api/actions/connector/{connectorId}
curl \
 -X POST https://localhost:5601/api/actions/connector/ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 \
 -H "Content-Type: application/json; Elastic-Api-Version=2023-10-31" \
 -H "kbn-xsrf: string"
Request example
{
  "name": "my-connector",
  "config": {
    "index": "test-index"
  },
  "connector_type_id": ".index"
}
Response examples (200)
{
  "id": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad",
  "name": "my-connector",
  "config": {
    "index": "test-index",
    "refresh": false,
    "executionTimeField": null
  },
  "is_deprecated": false,
  "is_preconfigured": false,
  "is_system_action": false,
  "connector_type_id": ".index",
  "is_missing_secrets": false
}
Response examples (401)
{
  "error": "Unauthorized",
  "message": "string",
  "statusCode": 401
}