Deprecated 7.x APIs

edit

These APIs are deprecated and will be removed as of 8.0.

Legacy Get connector API

edit

Deprecated in 7.13.0.

Use Get connector instead.

Retrieves a connector by ID.

Request

edit

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

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

Path parameters

edit
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 code

edit
200
Indicates a successful call.

Example

edit
$ 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
}

Legacy Get all connector API

edit

Deprecated in 7.13.0.

Use Get all connectors instead.

Retrieves all connectors.

Request

edit

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

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

Path parameters

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

Response code

edit
200
Indicates a successful call.

Example

edit
$ curl -X GET api/actions

The API returns the following:

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

Legacy List connector types API

edit

Deprecated in 7.13.0.

Use List all connector types instead.

Retrieves a list of all connector types.

Request

edit

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

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

Path parameters

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

Response code

edit
200
Indicates a successful call.

Example

edit
$ 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 API

edit

Deprecated in 7.13.0.

Use Create connector instead.

Creates a connector.

Request

edit

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

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

Path parameters

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

Request body

edit
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 code

edit
200
Indicates a successful call.

Example

edit
$ 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
}

Legacy Update connector API

edit

Deprecated in 7.13.0.

Use Update connector instead.

Updates the attributes for an existing connector.

Request

edit

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

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

Path parameters

edit
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 body

edit
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 code

edit
200
Indicates a successful call.

Example

edit
$ 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
}

Legacy Execute connector API

edit

Deprecated in 7.13.0.

Use Execute connector instead.

Executes a connector by ID.

Request

edit

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

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

Path parameters

edit
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 body

edit
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 code

edit
200
Indicates a successful call.

Example

edit
$ 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 API

edit

Deprecated in 7.13.0.

Use Delete connector instead.

Deletes a connector by ID.

When you delete an connector, it cannot be recovered.

Request

edit

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

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

Path parameters

edit
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 code

edit
200
Indicates a successful call.

Example

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