Api key auth (http_api_key)
You must create an API key and use the encoded value in the request header. To learn about creating keys, go to API keys.
You must create an API key and use the encoded value in the request header. To learn about creating keys, go to API keys.
Alerting enables you to define rules, which detect complex conditions within your data. When a condition is met, the rule tracks it as an alert and runs the actions that are defined in the rule. Actions typically involve the use of connectors to interact with Kibana services or third party integrations.
curl \
--request POST 'https://<KIBANA_URL>/api/alerting/rule/{rule_id}/alert/{alert_id}/_unmute' \
--header "Authorization: $API_KEY" \
--header "kbn-xsrf: true"
The version of the API to use
Value is 2023-10-31
. Default value is 2023-10-31
.
A required header to protect against CSRF attacks
If the config exists ?overwrite=true is required
The agent name is used by the UI to determine which settings to display.
Service
Agent configuration settings
curl \
--request PUT 'https://<KIBANA_URL>/api/apm/settings/agent-configuration' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "elastic-api-version: 2023-10-31" \
--header "kbn-xsrf: true" \
--data '"{\n \"service\": {\n \"name\": \"frontend\",\n \"environment\": \"production\"\n },\n \"settings\": {\n \"transaction_sample_rate\": \"0.4\",\n \"capture_body\": \"off\",\n \"transaction_max_spans\": \"500\"\n },\n \"agent_name\": \"nodejs\"\n}\n"'
{
"service": {
"name": "frontend",
"environment": "production"
},
"settings": {
"transaction_sample_rate": "0.4",
"capture_body": "off",
"transaction_max_spans": "500"
},
"agent_name": "nodejs"
}
Search for annotations related to a specific service.
The version of the API to use
Value is 2023-10-31
. Default value is 2023-10-31
.
The name of the service
The environment to filter annotations by
The start date for the search
The end date for the search
curl \
--request GET 'https://<KIBANA_URL>/api/apm/services/{serviceName}/annotation/search' \
--header "Authorization: $API_KEY" \
--header "elastic-api-version: 2023-10-31"
[Required authorization] Route required privileges: fleet-settings-read AND integrations-read.
curl \
--request GET 'https://<KIBANA_URL>/api/fleet/remote_synced_integrations/status' \
--header "Authorization: $API_KEY"
You do not need any Kibana feature privileges to run this API.
A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases).
curl \
--request GET 'https://<KIBANA_URL>/api/actions/connector_types' \
--header "Authorization: $API_KEY"
[
{
"id": ".gen-ai",
"name": "OpenAI",
"enabled": true,
"enabled_in_config": true,
"enabled_in_license": true,
"is_system_action_type": false,
"supported_feature_ids": [
"generativeAIForSecurity",
"generativeAIForObservability",
"generativeAIForSearchPlayground"
],
"minimum_license_required": "enterprise"
},
{
"id": ".bedrock",
"name": "AWS Bedrock",
"enabled": true,
"enabled_in_config": true,
"enabled_in_license": true,
"is_system_action_type": false,
"supported_feature_ids": [
"generativeAIForSecurity",
"generativeAIForObservability",
"generativeAIForSearchPlayground"
],
"minimum_license_required": "enterprise"
},
{
"id": ".gemini",
"name": "Google Gemini",
"enabled": true,
"enabled_in_config": true,
"enabled_in_license": true,
"is_system_action_type": false,
"supported_feature_ids": [
"generativeAIForSecurity"
],
"minimum_license_required": "enterprise"
}
]
This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
curl \
--request GET 'https://<KIBANA_URL>/api/dashboards/dashboard' \
--header "Authorization: $API_KEY"
[Required authorization] Route required privileges: fleet-agents-all AND fleet-agent-policies-all AND fleet-settings-all.
curl \
--request GET 'https://<KIBANA_URL>/api/fleet/data_streams' \
--header "Authorization: $API_KEY"
[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.
Values are logs
, metrics
, traces
, synthetics
, or profiling
.
Values are asc
or desc
. Default value is asc
.
Default value is false
.
curl \
--request GET 'https://<KIBANA_URL>/api/fleet/epm/data_streams' \
--header "Authorization: $API_KEY"
The ID of the data view fields you want to update.
The name for a runtime field.
The runtime field definition object.
curl \
--request PUT 'https://<KIBANA_URL>/api/data_views/data_view/{viewId}/runtime_field' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: string" \
--data '{"name":"runtimeFoo","runtimeField":{"type":"long","script":{"source":"emit(doc[\"foo\"].value)"}}}'
{
"name": "runtimeFoo",
"runtimeField": {
"type": "long",
"script": {
"source": "emit(doc[\"foo\"].value)"
}
}
}
An identifier for the data view.
The name for a runtime field.
The runtime field definition object.
curl \
--request POST 'https://<KIBANA_URL>/api/data_views/data_view/ff959d40-b880-11e8-a6d9-e546fe2bba5f/runtime_field' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: string" \
--data '{"name":"runtimeFoo","runtimeField":{"type":"long","script":{"source":"emit(doc[\"foo\"].value)"}}}'
{
"name": "runtimeFoo",
"runtimeField": {
"type": "long",
"script": {
"source": "emit(doc[\"foo\"].value)"
}
}
}
[Required authorization] Route required privileges: fleet-agents-all.
curl \
--request POST 'https://<KIBANA_URL>/api/fleet/agents/{agentId}/reassign' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"policy_id":"string"}'
[Required authorization] Route required privileges: fleet-agents-all.
Default value is false
.
curl \
--request POST 'https://<KIBANA_URL>/api/fleet/agents/bulk_reassign' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"agents":["string"],"batchSize":42.0,"includeInactive":false,"policy_id":"string"}'
[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-agents-read OR fleet-setup.
Values are desc
or asc
.
use withAgentCount instead
get policies with agent count
get full policies with package policies populated
Values are simplified
or legacy
.
curl \
--request GET 'https://<KIBANA_URL>/api/fleet/agent_policies' \
--header "Authorization: $API_KEY"
Get auto upgrade agent status
[Required authorization] Route required privileges: fleet-agents-read.
curl \
--request GET 'https://<KIBANA_URL>/api/fleet/agent_policies/{agentPolicyId}/auto_upgrade_agents_status' \
--header "Authorization: $API_KEY"
Download an agent policy by ID.
[Required authorization] Route required privileges: fleet-agent-policies-read AND fleet-setup.
curl \
--request GET 'https://<KIBANA_URL>/api/fleet/agent_policies/{agentPolicyId}/download' \
--header "Authorization: $API_KEY"
Get a list of outputs associated with agent policies.
[Required authorization] Route required privileges: fleet-agent-policies-read AND fleet-settings-read.
curl \
--request POST 'https://<KIBANA_URL>/api/fleet/agent_policies/outputs' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"ids":["string"]}'
[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.
curl \
--request PUT 'https://<KIBANA_URL>/api/fleet/epm/packages/{pkgName}/{pkgVersion}' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"keepPoliciesUpToDate":true}'
[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.
Default value is false
.
Default value is false
.
Default value is false
.
Default value is false
.
curl \
--request POST 'https://<KIBANA_URL>/api/fleet/epm/packages/{pkgName}/{pkgVersion}' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"force":false,"ignore_constraints":false}'
[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.
curl \
--request GET 'https://<KIBANA_URL>/api/fleet/epm/packages/{pkgName}/stats' \
--header "Authorization: $API_KEY"
[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.
Values are logs
, metrics
, traces
, synthetics
, or profiling
.
Default value is 15
.
Values are asc
or desc
. Default value is asc
.
curl \
--request GET 'https://<KIBANA_URL>/api/fleet/epm/packages/installed' \
--header "Authorization: $API_KEY"
[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.
curl \
--request GET 'https://<KIBANA_URL>/api/fleet/epm/packages/limited' \
--header "Authorization: $API_KEY"
[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.
Values are json
, yml
, or yaml
. Default value is json
.
curl \
--request GET 'https://<KIBANA_URL>/api/fleet/epm/templates/{pkgName}/{pkgVersion}/inputs' \
--header "Authorization: $API_KEY"
[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.
curl \
--request GET 'https://<KIBANA_URL>/api/fleet/epm/verification_key_id' \
--header "Authorization: $API_KEY"
Values are simplified
or legacy
.
curl \
--request GET 'https://<KIBANA_URL>/api/fleet/package_policies/{packagePolicyId}' \
--header "Authorization: $API_KEY"
Delete a package policy by ID.
[Required authorization] Route required privileges: fleet-agent-policies-all AND integrations-all.
curl \
--request DELETE 'https://<KIBANA_URL>/api/fleet/package_policies/{packagePolicyId}' \
--header "Authorization: $API_KEY" \
--header "kbn-xsrf: true"
[Required authorization] Route required privileges: fleet-settings-read.
curl \
--request GET 'https://<KIBANA_URL>/api/fleet/proxies' \
--header "Authorization: $API_KEY"
Update a proxy by ID.
[Required authorization] Route required privileges: fleet-settings-all.
curl \
--request PUT 'https://<KIBANA_URL>/api/fleet/proxies/{itemId}' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"certificate":"string","certificate_authorities":"string","certificate_key":"string","name":"string","proxy_headers":{},"url":"string"}'
Update a Fleet Server host by ID.
[Required authorization] Route required privileges: fleet-settings-all.
At least 1
element.
Additional properties are NOT allowed.
Additional properties are NOT allowed.
curl \
--request PUT 'https://<KIBANA_URL>/api/fleet/fleet_server_hosts/{itemId}' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"host_urls":["string"],"is_default":true,"is_internal":true,"name":"string","proxy_id":"string","secrets":{"ssl":{"es_key":{"id":"string"},"key":{"id":"string"}}},"ssl":{"certificate":"string","certificate_authorities":["string"],"client_auth":"optional","es_certificate":"string","es_certificate_authorities":["string"],"es_key":"string","key":"string"}}'
Apply a bulk action to multiple prompts. The bulk action is applied to all prompts that match the filter or to the list of prompts by their IDs.
curl \
--request POST 'https://<KIBANA_URL>/api/security_ai_assistant/prompts/_bulk_action' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"create":[{"categories":["string"],"color":"string","consumer":"string","content":"string","isDefault":true,"isNewConversationDefault":true,"name":"string","promptType":"system"}],"delete":{"ids":["string"],"query":"string"},"update":[{"categories":["string"],"color":"string","consumer":"string","content":"string","id":"string","isDefault":true,"isNewConversationDefault":true}]}'
Import detection rules from an .ndjson
file, including actions and exception lists. The request must include:
Content-Type: multipart/form-data
HTTP header..ndjson
file containing the rules.
When used with API key authentication, the user's key gets assigned to the affected rules. If the user's key gets deleted or the user becomes inactive, the rules will stop running.
If the API key that is used for authorization has different privileges than the key that created or most recently updated the rule, the rule behavior might change.
info To import rules with actions, you need at least Read privileges for the Action and Connectors feature. To overwrite or add new connectors, you need All privileges for the Actions and Connectors feature. To import rules without actions, you don’t need Actions and Connectors privileges. Refer to Enable and access detections for more information.
Rule actions and connectors are included in the exported file, but sensitive information about the connector (such as authentication credentials) is not included. You must re-add missing connector details after importing detection rules.
You can use Kibana’s Saved Objects UI (Stack Management → Kibana → Saved Objects) or the Saved Objects APIs (experimental) to export and import any necessary connectors before importing detection rules.
Similarly, any value lists used for rule exceptions are not included in rule exports or imports. Use the Manage value lists UI (Rules → Detection rules (SIEM) → Manage value lists) to export and import value lists separately.
Determines whether existing rules with the same rule_id
are overwritten.
Default value is false
.
Determines whether existing exception lists with the same list_id
are overwritten. Both the exception list container and its items are overwritten.
Default value is false
.
Determines whether existing actions with the same kibana.alert.rule.actions.id
are overwritten.
Default value is false
.
Generates a new list ID for each imported exception list.
Default value is false
.
curl -X POST "<KibanaURL>/api/detection_engine/rules/_import"
-u <username>:<password> -H 'kbn-xsrf: true'
-H 'Content-Type: multipart/form-data'
--form "file=@<link to file>"
{
"errors": [],
"success": true,
"rules_count": 1,
"success_count": 1,
"exceptions_errors": [],
"exceptions_success": true,
"exceptions_success_count": 0
}
Get the status of response actions for the specified agent IDs.
curl \
--request GET 'https://<KIBANA_URL>/api/endpoint/action_status?query=%7B%7D' \
--header "Authorization: $API_KEY"
Isolate an endpoint from the network. The endpoint remains isolated until it's released.
List of agent types to retrieve. Defaults to endpoint
.
Values are endpoint
, sentinel_one
, crowdstrike
, or microsoft_defender_endpoint
.
A list of alerts id
s.
At least 1
element. Minimum length of each is 1
.
Case IDs to be updated (cannot contain empty strings)
At least 1
element. Minimum length of each is 1
.
Optional comment
List of endpoint IDs (cannot contain empty strings)
At least 1
element. Minimum length of each is 1
.
Optional parameters object
curl \
--request POST 'https://<KIBANA_URL>/api/endpoint/action/isolate' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"comment":"Locked down, pending further investigation","endpoint_ids":["9972d10e-4b9e-41aa-a534-a85e2a28ea42","bc0e4f0c-3bca-4633-9fee-156c0b505d16","fa89271b-b9d4-43f2-a684-307cffddeb5a"]}'
{
"comment": "Locked down, pending further investigation",
"endpoint_ids": [
"9972d10e-4b9e-41aa-a534-a85e2a28ea42",
"bc0e4f0c-3bca-4633-9fee-156c0b505d16",
"fa89271b-b9d4-43f2-a684-307cffddeb5a"
]
}
{
"endpoint_ids": [
"ed518850-681a-4d60-bb98-e22640cae2a8"
]
}
{
"comment": "Isolating as initial response",
"case_ids": [
"4976be38-c134-4554-bd5e-0fd89ce63667"
],
"endpoint_ids": [
"1aa1f8fd-0fb0-4fe4-8c30-92068272d3f0",
"b30a11bf-1395-4707-b508-fbb45ef9793e"
]
}
{
"data": {
"id": "233db9ea-6733-4849-9226-5a7039c7161d",
"agents": [
"ed518850-681a-4d60-bb98-e22640cae2a8"
],
"errors": [],
"command": "suspend-process",
"comment": "suspend the process",
"outputs": {
"ed518850-681a-4d60-bb98-e22640cae2a8": {
"type": "json",
"content": {
"key": "value"
}
}
},
"agentType": "endpoint",
"createdBy": "myuser",
"isExpired": false,
"startedAt": "2022-07-29T19:08:49.126Z",
"parameters": {
"entity_id": "abc123"
},
"completedAt": "2022-07-29T19:09:44.961Z",
"isCompleted": true,
"wasSuccessful": true
},
"action": "233db9ea-6733-4849-9226-5a7039c7161d"
}
Release an isolated endpoint, allowing it to rejoin a network.
List of agent types to retrieve. Defaults to endpoint
.
Values are endpoint
, sentinel_one
, crowdstrike
, or microsoft_defender_endpoint
.
A list of alerts id
s.
At least 1
element. Minimum length of each is 1
.
Case IDs to be updated (cannot contain empty strings)
At least 1
element. Minimum length of each is 1
.
Optional comment
List of endpoint IDs (cannot contain empty strings)
At least 1
element. Minimum length of each is 1
.
Optional parameters object
curl \
--request POST 'https://<KIBANA_URL>/api/endpoint/action/unisolate' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"comment":"Benign process identified, releasing group","endpoint_ids":["9972d10e-4b9e-41aa-a534-a85e2a28ea42","bc0e4f0c-3bca-4633-9fee-156c0b505d16","fa89271b-b9d4-43f2-a684-307cffddeb5a"]}'
{
"comment": "Benign process identified, releasing group",
"endpoint_ids": [
"9972d10e-4b9e-41aa-a534-a85e2a28ea42",
"bc0e4f0c-3bca-4633-9fee-156c0b505d16",
"fa89271b-b9d4-43f2-a684-307cffddeb5a"
]
}
{
"endpoint_ids": [
"ed518850-681a-4d60-bb98-e22640cae2a8"
]
}
{
"comment": "Remediation complete, restoring network",
"case_ids": [
"4976be38-c134-4554-bd5e-0fd89ce63667"
],
"endpoint_ids": [
"1aa1f8fd-0fb0-4fe4-8c30-92068272d3f0",
"b30a11bf-1395-4707-b508-fbb45ef9793e"
]
}
{
"data": {
"id": "233db9ea-6733-4849-9226-5a7039c7161d",
"agents": [
"ed518850-681a-4d60-bb98-e22640cae2a8"
],
"errors": [],
"command": "suspend-process",
"comment": "suspend the process",
"outputs": {
"ed518850-681a-4d60-bb98-e22640cae2a8": {
"type": "json",
"content": {
"key": "value"
}
}
},
"agentType": "endpoint",
"createdBy": "myuser",
"isExpired": false,
"startedAt": "2022-07-29T19:08:49.126Z",
"parameters": {
"entity_id": "abc123"
},
"completedAt": "2022-07-29T19:09:44.961Z",
"isCompleted": true,
"wasSuccessful": true
},
"action": "233db9ea-6733-4849-9226-5a7039c7161d"
}
curl \
--request GET 'https://<KIBANA_URL>/api/endpoint/protection_updates_note/{package_policy_id}' \
--header "Authorization: $API_KEY"
Create or update an asset criticality record for a specific entity.
If a record already exists for the specified entity, that record is overwritten with the specified value. If a record doesn't exist for the specified entity, a new record is created.
Values are host.name
, user.name
, service.name
, or entity.id
.
The ID value of the asset.
The criticality level of the asset.
Values are low_impact
, medium_impact
, high_impact
, or extreme_impact
.
If 'wait_for' the request will wait for the index refresh.
Value is wait_for
.
curl \
--request POST 'https://<KIBANA_URL>/api/asset_criticality' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"id_field":"host.name","id_value":"my_host","criticality_level":"high_impact"}'
{
"id_field": "host.name",
"id_value": "my_host",
"criticality_level": "high_impact"
}
{
"host": {
"name": "my_host",
"asset": {
"criticality": "high_impact"
}
},
"asset": {
"criticality": "high_impact"
},
"id_field": "host.name",
"id_value": "my_host",
"@timestamp": "2024-08-02T11:15:34.290Z",
"criticality_level": "high_impact"
}
curl \
--request GET 'https://<KIBANA_URL>/api/entity_analytics/monitoring/privileges/health' \
--header "Authorization: $API_KEY"
Schedule the risk scoring engine to run as soon as possible. You can use this to recalculate entity risk scores after updating their asset criticality.
curl \
--request POST 'https://<KIBANA_URL>/api/risk_score/engine/schedule_now' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json"
Get the details of an exception list using the id
or list_id
field.
Exception list's identifier. Either id
or list_id
must be specified.
Minimum length is 1
.
Human readable exception list string identifier, e.g. trusted-linux-processes
. Either id
or list_id
must be specified.
Minimum length is 1
.
Determines whether the exception container is available in all Kibana spaces or just the space in which it is created, where:
single
: Only available in the Kibana space in which it is created.agnostic
: Available in all Kibana spaces.Values are agnostic
or single
. Default value is single
.
Successful response
Invalid input data response
Unsuccessful authentication response
Not enough privileges response
Exception list item not found response
Internal server error response
curl \
--request GET 'https://<KIBANA_URL>/api/exception_lists' \
--header "Authorization: $API_KEY"
{
"id": "9e5fc75a-a3da-46c5-96e3-a2ec59c6bb85",
"name": "Sample Detection Exception List",
"tags": [
"malware"
],
"type": "detection",
"list_id": "simple_list",
"version": 1,
"_version": "WzIsMV0=",
"os_types": [
"linux"
],
"immutable": false,
"created_at": "2025-01-07T19:34:27.942Z",
"created_by": "elastic",
"updated_at": "2025-01-07T19:34:27.942Z",
"updated_by": "elastic",
"description": "This is a sample detection type exception list.",
"namespace_type": "single",
"tie_breaker_id": "78f1aca1-f8ee-4eb5-9ceb-f5c3ee656cb3"
}
{
"error": "Bad Request",
"message": "[request query]: namespace_type.0: Invalid enum value. Expected 'agnostic' | 'single', received 'blob'",
"statusCode": 400
}
{
"error": "Unauthorized",
"message": "[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]",
"statusCode": 401
}
{
"error": "Forbidden",
"message": "API [GET /api/exception_lists?list_id=simple_list&namespace_type=single] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]",
"statusCode": 403
}
{
"message\"": "exception list id: \"foo\" does not exist",
"status_code\"": 404
}
{
"message": "Internal Server Error",
"status_code": 500
}
Delete an exception list using the id
or list_id
field.
Exception list's identifier. Either id
or list_id
must be specified.
Minimum length is 1
.
Human readable exception list string identifier, e.g. trusted-linux-processes
. Either id
or list_id
must be specified.
Minimum length is 1
.
Determines whether the exception container is available in all Kibana spaces or just the space in which it is created, where:
single
: Only available in the Kibana space in which it is created.agnostic
: Available in all Kibana spaces.Values are agnostic
or single
. Default value is single
.
Successful response
Invalid input data response
Unsuccessful authentication response
Not enough privileges response
Exception list not found response
Internal server error response
curl \
--request DELETE 'https://<KIBANA_URL>/api/exception_lists' \
--header "Authorization: $API_KEY"
{
"id": "9e5fc75a-a3da-46c5-96e3-a2ec59c6bb85",
"name": "Sample Detection Exception List",
"tags": [
"malware"
],
"type": "detection",
"list_id": "simple_list",
"version": 1,
"_version": "WzIsMV0=",
"os_types": [
"linux"
],
"immutable": false,
"created_at": "2025-01-07T19:34:27.942Z",
"created_by": "elastic",
"updated_at": "2025-01-07T19:34:27.942Z",
"updated_by": "elastic",
"description": "This is a sample detection type exception list.",
"namespace_type": "single",
"tie_breaker_id": "78f1aca1-f8ee-4eb5-9ceb-f5c3ee656cb3"
}
{
"error": "Bad Request",
"message": "[request query]: namespace_type.0: Invalid enum value. Expected 'agnostic' | 'single', received 'blob'",
"statusCode": 400
}
{
"error": "Unauthorized",
"message": "[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]",
"statusCode": 401
}
{
"error": "Forbidden",
"message": "API [DELETE /api/exception_lists?list_id=simple_list&namespace_type=single] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]",
"statusCode": 403
}
{
"message": "exception list list_id: \"foo\" does not exist",
"status_code": 404
}
{
"message": "Internal Server Error",
"status_code": 500
}
Update an exception list item using the id
or item_id
field.
Exception list item's properties
The version id, normally returned by the API when the item was retrieved. Use it ensure updates are done against the latest version.
Default value is []
(empty).
Describes the exception list.
The exception item’s expiration date, in ISO format. This field is only available for regular exception items, not endpoint exceptions.
Exception's identifier.
Minimum length is 1
.
Human readable string identifier, e.g. trusted-linux-processes
Minimum length is 1
.
Exception list's human readable string identifier, e.g. trusted-linux-processes
.
Minimum length is 1
.
Additional properties are allowed.
Exception list name.
Minimum length is 1
.
Determines whether the exception container is available in all Kibana spaces or just the space in which it is created, where:
single
: Only available in the Kibana space in which it is created.agnostic
: Available in all Kibana spaces.Values are agnostic
or single
. Default value is single
.
Use this field to specify the operating system.
Values are linux
, macos
, or windows
. Default value is []
(empty).
Value is simple
.
Successful response
Invalid input data response
Unsuccessful authentication response
Not enough privileges response
Exception list item not found response
Internal server error response
curl \
--request PUT 'https://<KIBANA_URL>/api/exception_lists/items' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"name":"Updated name","tags":[],"type":"simple","entries":[{"type":"match","field":"host.name","value":"rock01","operator":"included"}],"item_id":"simple_list_item","comments":[],"description":"Updated description","namespace_type":"single"}'
{
"name": "Updated name",
"tags": [],
"type": "simple",
"entries": [
{
"type": "match",
"field": "host.name",
"value": "rock01",
"operator": "included"
}
],
"item_id": "simple_list_item",
"comments": [],
"description": "Updated description",
"namespace_type": "single"
}
{
"id": "459c5e7e-f8b2-4f0b-b136-c1fc702f72da",
"name": "Updated name",
"tags": [],
"type": "simple",
"entries": [
{
"type": "match",
"field": "host.name",
"value": "rock01",
"operator": "included"
}
],
"item_id": "simple_list_item",
"list_id": "simple_list",
"_version": "WzEyLDFd",
"comments": [],
"os_types": [],
"created_at": "2025-01-07T21:12:25.512Z",
"created_by": "elastic",
"updated_at": "2025-01-07T21:34:50.233Z",
"updated_by": "elastic",
"description": "Updated description",
"namespace_type": "single",
"tie_breaker_id": "ad0754ff-7b19-49ca-b73e-e6aff6bfa2d0"
}
{
"error": "Bad Request",
"message": "[request body]: item_id: Expected string, received number",
"statusCode": 400
}
{
"error": "Unauthorized",
"message": "[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]",
"statusCode": 401
}
{
"error": "Forbidden",
"message": "API [PUT /api/exception_lists/items] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]",
"statusCode": 403
}
{
"message": "exception list item item_id: \\\"foo\\\" does not exist",
"status_code": 404
}
{
"message": "Internal Server Error",
"status_code": 500
}
Update specific fields of an existing value list item using the item id
.
Value list item's properties
The version id, normally returned by the API when the document is retrieved. Use it ensure updates are done against the latest version.
Value list item's identifier.
Minimum length is 1
.
Placeholder for metadata about the value list item.
Additional properties are allowed.
Determines when changes made by the request are made visible to search.
Values are true
, false
, or wait_for
.
The value used to evaluate exceptions.
Minimum length is 1
.
Successful response
Invalid input data response
Unsuccessful authentication response
Not enough privileges response
List item not found response
Internal server error response
curl \
--request PATCH 'https://<KIBANA_URL>/api/lists/items' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"id":"pd1WRJQBs4HAK3VQeHFI","value":"255.255.255.255"}'
{
"id": "pd1WRJQBs4HAK3VQeHFI",
"value": "255.255.255.255"
}
{
"id": "pd1WRJQBs4HAK3VQeHFI",
"type": "ip",
"value": "255.255.255.255",
"list_id": "ip_list",
"_version": "WzE5LDFd",
"@timestamp": "2025-01-08T05:15:05.159Z",
"created_at": "2025-01-08T05:15:05.159Z",
"created_by": "elastic",
"updated_at": "2025-01-08T05:23:37.602Z",
"updated_by": "elastic",
"tie_breaker_id": "eee41dc7-1666-4876-982f-8b0f7b59eca3"
}
{
"message": "{\"took\":15,\"timed_out\":false,\"total\":1,\"updated\":0,\"deleted\":0,\"batches\":1,\"version_conflicts\":0,\"noops\":0,\"retries\":{\"bulk\":0,\"search\":0},\"throttled_millis\":0,\"requests_per_second\":-1,\"throttled_until_millis\":0,\"failures\":[{\"index\":\".ds-.items-default-2025.01.09-000001\",\"id\":\"ip_item\",\"cause\":{\"type\":\"document_parsing_exception\",\"reason\":\"[1:107] failed to parse field [ip] of type [ip] in document with id ip_item. Preview of fields value: 2\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"2 is not an IP string literal.\"}},\"status\":400}]}",
"status_code": 400
}
{
"error": "Unauthorized",
"message": "[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]",
"statusCode": 401
}
{
"error": "Forbidden",
"message": "API [PATCH /api/lists/items] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]",
"statusCode": 403
}
{
"message": "list item id: \\\"foo\\\" not found",
"status_code": 404
}
{
"message": "Internal Server Error",
"status_code": 500
}
Import value list items from a TXT or CSV file. The maximum file size is 9 million bytes.
You can import items to a new or existing list.
List's id.
Required when importing to an existing list.
Minimum length is 1
.
Type of the importing list.
Required when importing a new list whose list id
is not specified.
Values are binary
, boolean
, byte
, date
, date_nanos
, date_range
, double
, double_range
, float
, float_range
, geo_point
, geo_shape
, half_float
, integer
, integer_range
, ip
, ip_range
, keyword
, long
, long_range
, shape
, short
, or text
.
Determines how uploaded list item values are parsed. By default, list items are parsed using these named regex groups:
(?<value>.+)
- Single value item types, such as ip, long, date, keyword, and text.(?<gte>.+)-(?<lte>.+)|(?<value>.+)
- Range value item types, such as date_range
, ip_range
, double_range
, float_range
, integer_range
, and long_range
.Determines how retrieved list item values are presented. By default list items are presented using these Handelbar expressions:
{{{value}}}
- Single value item types, such as ip
, long
, date
, keyword
, and text
.{{{gte}}}-{{{lte}}}
- Range value item types, such as ip_range
, double_range
, float_range
, integer_range
, and long_range
.{{{gte}}},{{{lte}}}
- Date range values.Determines when changes made by the request are made visible to search.
Values are true
, false
, or wait_for
.
Successful response
Invalid input data response
Unsuccessful authentication response
Not enough privileges response
List with specified list_id does not exist response
Internal server error response
curl \
--request POST 'https://<KIBANA_URL>/api/lists/items/_import' \
--header "Authorization: $API_KEY" \
--header "Content-Type: multipart/form-data" \
--form "file=127.0.0.1
127.0.0.2
127.0.0.3
127.0.0.4
127.0.0.5
127.0.0.6
127.0.0.7
127.0.0.8
127.0.0.9
"
{
"id": "ip_list",
"name": "Simple list with an ip",
"type": "ip",
"version": 1,
"_version": "WzAsMV0=",
"immutable": false,
"@timestamp": "2025-01-08T04:47:34.273Z",
"created_at": "2025-01-08T04:47:34.273Z",
"created_by": "elastic",
"updated_at": "2025-01-08T04:47:34.273Z",
"updated_by": "elastic",
"description": "This list describes bad internet ip",
"tie_breaker_id": "f5508188-b1e9-4e6e-9662-d039a7d89899"
}
{
"message": "Either type or list_id need to be defined in the query",
"status_code": 400
}
{
"error": "Unauthorized",
"message": "[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]",
"statusCode": 401
}
{
"error": "Forbidden",
"message": "API [POST /api/lists/items/_import?list_id=ip_list] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]",
"statusCode": 403
}
{
"message": "Internal Server Error",
"status_code": 500
}
Run live queries, manage packs and saved queries.
You can create Timelines and Timeline templates via the API, as well as import new Timelines from an ndjson file.
SLO APIs enable you to define, manage and track service-level objectives