Api key auth (http_api_key)
These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: Authorization: ApiKey base64AccessApiKey
The API accepts 2 different authentication methods:
These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: Authorization: ApiKey base64AccessApiKey
Basic auth tokens are constructed with the Basic
keyword, followed by a space, followed by a base64-encoded string of your username:password
(separated by a :
colon).
Example: send a Authorization: Basic aGVsbG86aGVsbG8=
HTTP header with your requests to authenticate with the API.
WARNING: When you delete a connector, it cannot be recovered.
An identifier for the connector.
curl \
--request DELETE 'https://localhost:5601/api/actions/connector/{id}' \
--header "Authorization: $API_KEY" \
--header "kbn-xsrf: true"
[Required authorization] Route required privileges: fleet-agents-read.
Value is CPU
.
curl \
--request POST 'https://localhost:5601/api/fleet/agents/{agentId}/request_diagnostics' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"additional_metrics":["CPU"]}'
[Required authorization] Route required privileges: fleet-agents-all.
curl \
--request POST 'https://localhost:5601/api/fleet/agents/actions/{actionId}/cancel' \
--header "Authorization: $API_KEY" \
--header "kbn-xsrf: true"
Get a full agent policy by ID.
[Required authorization] Route required privileges: fleet-agent-policies-read.
curl \
--request GET 'https://localhost:5601/api/fleet/agent_policies/{agentPolicyId}/full' \
--header "Authorization: $API_KEY"
Delete an agent by ID.
[Required authorization] Route required privileges: fleet-agents-all.
curl \
--request DELETE 'https://localhost:5601/api/fleet/agents/{agentId}' \
--header "Authorization: $API_KEY" \
--header "kbn-xsrf: true"
Delete output by ID.
[Required authorization] Route required privileges: fleet-settings-all.
curl \
--request DELETE 'https://localhost:5601/api/fleet/outputs/{outputId}' \
--header "Authorization: $API_KEY" \
--header "kbn-xsrf: true"
Values are simplified
or legacy
.
curl \
--request GET 'https://localhost:5601/api/fleet/package_policies/{packagePolicyId}' \
--header "Authorization: $API_KEY"
[Required authorization] Route required privileges: write-maintenance-window.
The identifier for the maintenance window to be archived.
curl \
--request POST 'https://localhost:5601/api/maintenance_window/{id}/_archive' \
--header "Authorization: $API_KEY" \
--header "kbn-xsrf: true"
Update an existing conversation using the conversation ID. This endpoint allows users to modify the details of an existing conversation.
The conversation's id
value.
Minimum length is 1
.
LLM API configuration.
The conversation category.
Values are assistant
or insights
.
Exclude from last conversation storage.
The ID of the anonymization field.
Minimum length is 1
.
The conversation messages.
AI assistant conversation message.
Replacements object used to anonymize/deanonymize messages
The conversation title.
curl \
--request PUT 'https://localhost:5601/api/security_ai_assistant/current_user/conversations/abc123' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"title":"Updated Security Discussion","category":"insights","messages":[{"role":"assistant","content":"The issue was resolved.","timestamp":"2023-10-31T12:30:00Z"}],"apiConfig":{"connectorId":"54321","actionTypeId":"09876"},"replacements":{},"excludeFromLastConversationStorage":true}'
{
"title": "Updated Security Discussion",
"category": "insights",
"messages": [
{
"role": "assistant",
"content": "The issue was resolved.",
"timestamp": "2023-10-31T12:30:00Z"
}
],
"apiConfig": {
"connectorId": "54321",
"actionTypeId": "09876"
},
"replacements": {},
"excludeFromLastConversationStorage": true
}
{
"id": "abc123",
"title": "Updated Security Discussion",
"users": [
{
"id": "user1",
"name": "John Doe"
}
],
"category": "insights",
"messages": [
{
"role": "assistant",
"content": "The issue was resolved.",
"timestamp": "2023-10-31T12:30:00Z"
}
],
"apiConfig": {
"connectorId": "54321",
"actionTypeId": "09876"
},
"createdAt": "2023-10-31T12:01:00Z",
"updatedAt": "2023-10-31T12:31:00Z",
"replacements": {},
"excludeFromLastConversationStorage": true
}
Get the details of a response action using the action ID.
The ID of the action to retrieve.
curl \
--request GET 'https://localhost:5601/api/endpoint/action/fr518850-681a-4y60-aa98-e22640cae2b8' \
--header "Authorization: $API_KEY"
{
"data": {
"id": "b3d6de74-36b0-4fa8-be46-c375bf1771bf",
"agents": [
"afdc366c-e2e0-4cdb-ae1d-94575bd2d8e0"
],
"command": "running-processes",
"outputs": {
"afdc366c-e2e0-4cdb-ae1d-94575bd2d8e0": {
"type": "json",
"content": {
"entries": [
{
"pid": "822",
"user": "Dexter",
"command": "/opt/cmd1",
"entity_id": "fk2ym7bl3oiu3okjcik0xosc0i0m75x3eh49nu3uaqt4dqanjt"
},
{
"pid": "984",
"user": "Jada",
"command": "/opt/cmd3/opt/cmd3/opt/cmd3/opt/cmd3",
"entity_id": "pwvz91m48wpj9j7ov9gtw8fp7u2rat4eu5ipte37hnhdcbi2pt"
}
]
}
}
},
"agentType": "endpoint",
"createdBy": "elastic",
"isExpired": false,
"startedAt": "2022-08-08T15:24:57.402Z",
"completedAt": "2022-08-08T09:50:47.672Z",
"isCompleted": true,
"wasSuccessful": true
}
}
curl \
--request PUT 'https://localhost:5601/api/entity_analytics/monitoring/users/{id}' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"@timestamp":"2025-05-04T09:42:00Z","entity_analytics_monitoring":{"labels":[{"field":"string","source":"string","value":"string"}]},"event":{"ingested":"2025-05-04T09:42:00Z"},"id":"string","labels":{"monitoring":{"privileged_users":"monitored"},"source_indices":["string"],"source_integrations":["string"],"sources":["csv"]},"user":{"name":"string"}}'
The entity type of the engine (either 'user' or 'host').
Values are user
, host
, service
, or generic
.
Schema for the engine initialization
The delay before the transform will run.
Format should match the following pattern: [smdh]$
. Default value is 1m
.
The number of documents per second to process.
Interval in which enrich policy runs. For example, "1h"
means the rule runs every hour. Must be less than or equal to half the duration of the lookback period,
Format should match the following pattern: ^[1-9]\d*[smh]$
.
The number of historical values to keep for each field.
Default value is 10
.
The frequency at which the transform will run.
Format should match the following pattern: [smdh]$
. Default value is 1m
.
The amount of time the transform looks back to calculate the aggregations.
Format should match the following pattern: [smdh]$
. Default value is 24h
.
The timeout for initializing the aggregating transform.
Format should match the following pattern: [smdh]$
. Default value is 180s
.
The field to use as the timestamp for the entity type.
Default value is @timestamp
.
curl \
--request POST 'https://localhost:5601/api/entity_store/engines/{entityType}/init' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"delay":"1m","docsPerSecond":42,"enrichPolicyExecutionInterval":"1h","fieldHistoryLength":10,"filter":"string","frequency":"1m","indexPattern":"string","lookbackPeriod":"24h","timeout":"180s","timestampField":"@timestamp"}'
Exceptions are associated with detection and endpoint rules, and are used to prevent a rule from generating an alert from incoming events, even when the rule's other criteria are met. They can help reduce the number of false positives and prevent trusted processes and network activity from generating unnecessary alerts.
Exceptions are made up of:
true
, the rule does not generate an alert.For detection rules, you can also use lists to define rule exceptions. A list holds multiple values of the same Elasticsearch data type, such as IP addresses. These values are used to determine when an exception prevents an alert from being generated.
You cannot use lists with endpoint rule exceptions.
Only exception containers can be associated with rules. You cannot directly associate an exception item or a list container with a rule. To use list exceptions, create an exception item that references the relevant list container.
Before you can start working with exceptions that use value lists, you must create the .lists
and .items
data streams for the relevant Kibana space. To do this, use the Create list data streams endpoint. Once these data streams are created, your role needs privileges to manage rules. For a complete list of requirements, refer to Enable and access detections.
Delete one or more Timelines or Timeline templates.
The IDs of the Timelines or Timeline templates to delete.
The list of IDs of the Timelines or Timeline templates to delete
Saved search IDs that should be deleted alongside the timelines
curl \
--request DELETE 'https://localhost:5601/api/timeline' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"savedObjectIds":["15c1929b-0af7-42bd-85a8-56e234cc7c4e"],"searchIds":["23f3-43g34g322-e5g5hrh6h-45454","6ce1b592-84e3-4b4a-9552-f189d4b82075"]}'
Retrieve the status of the bulk deletion operation for SLOs. This endpoint returns the status of the bulk deletion operation, including whether it is completed and the results of the operation.
curl \
--request GET 'https://localhost:5601/s/default/api/observability/slos/_bulk_delete/8853df00-ae2e-11ed-90af-09bb6422b258' \
--header "Authorization: $API_KEY" \
--header "kbn-xsrf: string"
Fetches the ingest settings of an ingest stream definition
[Required authorization] Route required privileges: read_stream.
curl \
--request GET 'https://localhost:5601/api/streams/{name}/_ingest' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json"
The ID of the monitor.
curl \
--request GET 'https://localhost:5601/api/synthetics/monitors/{id}' \
--header "Authorization: $API_KEY"
{
"type": "http",
"enabled": true,
"alert": {
"status": {
"enabled": true
},
"tls": {
"enabled": true
}
},
"schedule": {
"number": "3",
"unit": "m"
},
"config_id": "a8188705-d01e-4bb6-87a1-64fa5e4b07ec",
"timeout": "16",
"name": "am i something",
"locations": [
{
"id": "us_central",
"label": "North America - US Central",
"geo": {
"lat": 41.25,
"lon": -95.86
},
"isServiceManaged": true
}
],
"namespace": "default",
"origin": "ui",
"id": "a8188705-d01e-4bb6-87a1-64fa5e4b07ec",
"max_attempts": 2,
"__ui": {
"is_tls_enabled": false
},
"max_redirects": "0",
"response.include_body": "on_error",
"response.include_headers": true,
"check.request.method": "GET",
"mode": "any",
"response.include_body_max_bytes": "1024",
"ipv4": true,
"ipv6": true,
"ssl.verification_mode": "full",
"ssl.supported_protocols": [
"TLSv1.1",
"TLSv1.2",
"TLSv1.3"
],
"revision": 13,
"created_at": "2023-11-08T08:45:29.334Z",
"updated_at": "2023-12-18T20:31:44.770Z",
"url": "https://fast.com"
}