v53

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-076771,7565.2 MB
Security Detections API

Import detection rules

Spaces method and path for this operation:

<div><span class="operation-verb post">post</span>&nbsp;<span class="operation-path">/s/{space_id}/api/detection_engine/rules/_import</span></div>

Refer to Spaces for more information.

Import detection rules from an .ndjson file, including actions and exception lists. The request must include:

  • The Content-Type: multipart/form-data HTTP header.
  • A link to the .ndjson file containing the rules.

warn 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.

info 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.

post/api/detection_engine/rules/_import

Query parameters

overwriteboolean

Determines whether existing rules with the same rule_id are overwritten.

overwrite_exceptionsboolean

Determines whether existing exception lists with the same list_id are overwritten. Both the exception list container and its items are overwritten.

overwrite_action_connectorsboolean

Determines whether existing actions with the same kibana.alert.rule.actions.id are overwritten.

as_new_listboolean

Generates a new list ID for each imported exception list.

Response

Indicates a successful call.

action_connectors_successboolean required
action_connectors_success_countinteger required
exceptions_successboolean required
exceptions_success_countinteger required
rules_countinteger required
successboolean required
success_countinteger required