IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Create action API
editCreate action API
editCreates an action.
Request
editPOST <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 action.
-
actionTypeId
- (Required, string) The action type ID for the action.
-
config
- (Required, object) The configuration for the action. Configuration properties vary depending on the action type. For information about the configuration properties, refer to Action and connector types.
-
secrets
-
(Required, object) The secrets configuration for the action. Secrets configuration properties vary depending on the action 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-action", "actionTypeId": ".index", "config": { "index": "test-index" } }'
The API returns the following:
{ "id": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad", "actionTypeId": ".index", "name": "my-action", "config": { "index": "test-index", "refresh": false, "executionTimeField": null }, "isPreconfigured": false }