Deprecated 7.x APIsedit

These APIs are deprecated and will be removed in a future release.

Legacy Get connector APIedit

Deprecated in 7.13.0.

Use Get connector instead.

Retrieves a connector by ID.

Requestedit

GET <kibana host>:<port>/api/actions/action/<id>

GET <kibana host>:<port>/s/<space_id>/api/actions/action/<id>

Path parametersedit

id
(Required, string) The ID of the action.
space_id
(Optional, string) An identifier for the space. If space_id is not provided in the URL, the default space is used.

Response codeedit

200
Indicates a successful call.

Exampleedit

$ curl -X GET api/actions/action/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad

The API returns the following:

{
  "id": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad",
  "actionTypeId": ".index",
  "name": "my-connector",
  "config": {
    "index": "test-index",
    "refresh": false,
    "executionTimeField": null
  },
  "isPreconfigured": false,
  "isDeprecated": false,
  "isMissingSecrets": false
}

Legacy Get all connector APIedit

Deprecated in 7.13.0.

Use Get all connectors instead.

Retrieves all connectors.

Requestedit

GET <kibana host>:<port>/api/actions

GET <kibana host>:<port>/s/<space_id>/api/actions

Path parametersedit

space_id
(Optional, string) An identifier for the space. If space_id is not provided in the URL, the default space is used.

Response codeedit

200
Indicates a successful call.

Exampleedit

$ curl -X GET api/actions

The API returns the following:

[
  {
    "id": "preconfigured-mail-action",
    "actionTypeId": ".email",
    "name": "email: preconfigured-mail-action",
    "isPreconfigured": true,
    "isDeprecated": false
  },
  {
    "id": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad",
    "actionTypeId": ".index",
    "name": "my-action",
    "config": {
      "index": "test-index",
      "refresh": false,
      "executionTimeField": null
    },
    "isPreconfigured": false,
    "isDeprecated": false,
    "isMissingSecrets": false
  }
]

Legacy List connector types APIedit

Deprecated in 7.13.0.

Use List all connector types instead.

Retrieves a list of all connector types.

Requestedit

GET <kibana host>:<port>/api/actions/list_action_types

GET <kibana host>:<port>/s/<space_id>/api/actions/list_action_types

Path parametersedit

space_id
(Optional, string) An identifier for the space. If space_id is not provided in the URL, the default space is used.

Response codeedit

200
Indicates a successful call.

Exampleedit

$ curl -X GET api/actions/list_action_types

The API returns the following:

[
  {
    "id": ".email", 
    "name": "Email", 
    "minimumLicenseRequired": "gold", 
    "enabled": false, 
    "enabledInConfig": true, 
    "enabledInLicense": false 
  },
  {
    "id": ".index",
    "name": "Index",
    "minimumLicenseRequired": "basic",
    "enabled": true,
    "enabledInConfig": true,
    "enabledInLicense": true
  }
]

id - The unique ID of the connector type.

name - The name of the connector type.

minimumLicenseRequired - The license required to use the connector type.

enabled - Specifies if the connector type is enabled or disabled in Kibana.

enabledInConfig - Specifies if the connector type is enabled or enabled in the Kibana .yml file.

enabledInLicense - Specifies if the connector type is enabled or disabled in the license.

Legacy Create connector APIedit

Deprecated in 7.13.0.

Use Create connector instead.

Creates a connector.

Requestedit

POST <kibana host>:<port>/api/actions/action

POST <kibana host>:<port>/s/<space_id>/api/actions/action

Path parametersedit

space_id
(Optional, string) An identifier for the space. If space_id is not provided in the URL, the default space is used.

Request bodyedit

name
(Required, string) The display name for the connector.
actionTypeId
(Required, string) The connector type ID for the connector.
config
(Required, object) The configuration for the connector. Configuration properties vary depending on the connector type. For information about the configuration properties, refer to Action and connector types.
secrets

(Required, object) The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type. For information about the secrets configuration properties, refer to Action and connector types.

Remember these values. You must provide them each time you call the update API.

Response codeedit

200
Indicates a successful call.

Exampleedit

$ curl -X POST api/actions/action  -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '
{
  "name": "my-connector",
  "actionTypeId": ".index",
  "config": {
    "index": "test-index"
  }
}'

The API returns the following:

{
  "id": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad",
  "actionTypeId": ".index",
  "name": "my-connector",
  "config": {
    "index": "test-index",
    "refresh": false,
    "executionTimeField": null
  },
  "isPreconfigured": false,
  "isDeprecated": false,
  "isMissingSecrets": false
}

Legacy Update connector APIedit

Deprecated in 7.13.0.

Use Update connector instead.

Updates the attributes for an existing connector.

Requestedit

PUT <kibana host>:<port>/api/actions/action/<id>

PUT <kibana host>:<port>/s/<space_id>/api/actions/action/<id>

Path parametersedit

id
(Required, string) The ID of the connector.
space_id
(Optional, string) An identifier for the space. If space_id is not provided in the URL, the default space is used.

Request bodyedit

name
(Required, string) The new name of the connector.
config
(Required, object) The new connector configuration. Configuration properties vary depending on the connector type. For information about the configuration properties, refer to Action and connector types.
secrets
(Required, object) The updated secrets configuration for the connector. Secrets properties vary depending on the connector type. For information about the secrets configuration properties, refer to Action and connector types.

Response codeedit

200
Indicates a successful call.

Exampleedit

$ curl -X PUT api/actions/action/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad  -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '
{
  "name": "updated-connector",
  "config": {
    "index": "updated-index"
  }
}'

The API returns the following:

{
  "id": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad",
  "actionTypeId": ".index",
  "name": "updated-connector",
  "config": {
    "index": "updated-index",
    "refresh": false,
    "executionTimeField": null
  },
  "isPreconfigured": false,
  "isDeprecated": false,
  "isMissingSecrets": false
}

Legacy Execute connector APIedit

Deprecated in 7.13.0.

Use Run connector instead.

Executes a connector by ID.

Requestedit

POST <kibana host>:<port>/api/actions/action/<id>/_execute

POST <kibana host>:<port>/s/<space_id>/api/actions/action/<id>/_execute

Path parametersedit

id
(Required, string) The ID of the connector.
space_id
(Optional, string) An identifier for the space. If space_id is not provided in the URL, the default space is used.

Request bodyedit

params
(Required, object) The parameters of the connector. Parameter properties vary depending on the connector type. For information about the parameter properties, refer to Action and connector types.

Response codeedit

200
Indicates a successful call.

Exampleedit

$ curl -X POST api/actions/action/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad/_execute  -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '
{
  "params": {
    "documents": [
      {
        "id": "test_doc_id",
        "name": "test_doc_name",
        "message": "hello, world"
      }
    ]
  }
}'

The API returns the following:

{
  "status": "ok",
  "data": {
    "took": 197,
    "errors": false,
    "items": [
      {
        "index": {
          "_index": "updated-index",
          "_id": "iKyijHcBKCsmXNFrQe3T",
          "_version": 1,
          "result": "created",
          "_shards": {
            "total": 2,
            "successful": 1,
            "failed": 0
          },
          "_seq_no": 0,
          "_primary_term": 1,
          "status": 201
        }
      }
    ]
  },
  "actionId": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad"
}

Legacy Delete connector APIedit

Deprecated in 7.13.0.

Use Delete connector instead.

Deletes a connector by ID.

When you delete an connector, it cannot be recovered.

Requestedit

DELETE <kibana host>:<port>/api/actions/action/<id>

DELETE <kibana host>:<port>/s/<space_id>/api/actions/action/<id>

Path parametersedit

id
(Required, string) The ID of the connector.
space_id
(Optional, string) An identifier for the space. If space_id is not provided in the URL, the default space is used.

Response codeedit

200
Indicates a successful call.

Exampleedit

$ curl -X DELETE api/actions/action/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad