Create a connector Deprecated

POST /api/actions

Deprecated in 7.13.0. Use the create connector API instead.

Headers

  • kbn-xsrf string Required

    Cross-site request forgery protection

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

Body Required

  • The connector type identifier.

  • config object

    The configuration for the connector. Configuration properties vary depending on the connector type.

  • name string

    The display name for the connector.

  • secrets object

    The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type. NOTE: Remember these values. You must provide them each time you update the connector.

Responses

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

    Indicates a successful call.

    Hide response attributes Show response attributes object

    The properties vary depending on the action type.

  • 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
curl \
 -X POST https://localhost:5601/api/actions \
 -H "Content-Type: application/json; Elastic-Api-Version=2023-10-31" \
 -H "kbn-xsrf: string"
Request examples
# Headers
kbn-xsrf: string

# Payload
{
  "actionTypeId": "string",
  "config": {},
  "name": "string",
  "secrets": {}
}
Response examples (200)
{
  "actionTypeId": "string",
  "config": {},
  "id": "string",
  "isDeprecated": true,
  "isMissingSecrets": true,
  "isPreconfigured": true,
  "name": "string"
}
Response examples (401)
{
  "error": "Unauthorized",
  "message": "string",
  "statusCode": 401
}