---
type: api
title: List rule executions
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-get-alerting-v2-execution-history-rules
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-get-alerting-v2-execution-history-rules
products:
  - Kibana
---

# List rule executions

Availability:

- Server: `https://{kibana_url}`

## Paths

- `GET` `/api/alerting/v2/execution_history/rules`
- `GET` `/s/{space_id}/api/alerting/v2/execution_history/rules`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/authentication#apikeyauth)

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Get a paginated list of rule execution events.<br/><br/>[Required authorization] Route required privileges: read_alerting-v2-execution-history.

## Query String Parameters

- `rule_ids` ([] string · min: 1 · max: 50)
  Rule id filter.
- `outcomes` ([] enum  · min: 1 · max: 2)
  Outcome filter.
  Values: `success`, `failure`
- `from` (string · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$)
  Inclusive ISO datetime lower bound on event.start.
- `to` (string · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$)
  Inclusive ISO datetime upper bound on event.start.
- `sort_field` (enum  · default: started_at)
  Sort field. Defaults to started_at.
  Values: `started_at`, `duration_ms`
- `sort_order` (enum  · default: desc)
  Sort direction.
  Values: `asc`, `desc`
- `page` (integer · min: 1 · max: 10000 · default: 1)
  Page number.
- `per_page` (integer · min: 1 · max: 100 · default: 20)
  Number of results per page.

## Responses

#### `200`

Returns a paginated list of rule execution events.

`application/json`

- `items` ([] object)
  - `ended_at` (string · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$)
  - `error` (object)
    Failure details. Omitted on a successful run, or when the failure was unclassified.
    - `message` (string)
    - `stack_trace` (string)
      Omitted when the source recorded no trace.
  - `id` (string)
  - `outcome` (enum)
    Values: `success`, `failure`
  - `reason` (string)
    Why the run ended the way it did. Omitted when the source recorded no reason.
  - `rule` (object)
    - `id` (string)
    - `version` (integer · min: -9007199254740991 · max: 9007199254740991)
      The rule version this run executed. Omitted until the rule executor emits its own event; the `task-run` event does not carry one.
  - `space_id` (string)
  - `started_at` (string · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$)
  - `timings` (object)
    - `duration_ms` (integer · min: 0 · max: 9007199254740991)
      Wall-clock duration of the run, in milliseconds.
    - `scheduled_delay_ms` (integer · min: -9007199254740991 · max: 9007199254740991)
      Delay between the scheduled run time and the actual start, in milliseconds. Negative when the run started ahead of its scheduled time.
- `page` (integer · min: 1 · max: 9007199254740991)
- `per_page` (integer · min: 1 · max: 9007199254740991)
- `total` (integer · min: 0 · max: 9007199254740991)
  The number of rule executions matching the query. This count is an estimate: results above 10,000 may be reported as 10,000.
#### `400`

Indicates an invalid schema or parameters.

`application/json`

- `code` (string)
  Stable error code you can branch on, for example `INVALID_SCHEDULE` or `RULE_ALREADY_EXISTS`.
- `details` (map string to object)
  Optional extra information about the error, for example field validation issues or the `rule_id` when that ID already exists.
- `error` (string)
  A short human-readable summary of the error category (e.g., "Not Found", "Bad Request"). Subject to change without notice. Do not parse or rely on its content.
- `message` (string)
  A readable explanation of the error. The wording can change without notice. Do not parse this field.
#### `401`

Indicates the request was not authenticated.

`application/json`

- `code` (string)
  Stable error code you can branch on, for example `INVALID_SCHEDULE` or `RULE_ALREADY_EXISTS`.
- `details` (map string to object)
  Optional extra information about the error, for example field validation issues or the `rule_id` when that ID already exists.
- `error` (string)
  A short human-readable summary of the error category (e.g., "Not Found", "Bad Request"). Subject to change without notice. Do not parse or rely on its content.
- `message` (string)
  A readable explanation of the error. The wording can change without notice. Do not parse this field.
#### `403`

Indicates the user does not have the required privileges to perform the request.

`application/json`

- `code` (string)
  Stable error code you can branch on, for example `INVALID_SCHEDULE` or `RULE_ALREADY_EXISTS`.
- `details` (map string to object)
  Optional extra information about the error, for example field validation issues or the `rule_id` when that ID already exists.
- `error` (string)
  A short human-readable summary of the error category (e.g., "Not Found", "Bad Request"). Subject to change without notice. Do not parse or rely on its content.
- `message` (string)
  A readable explanation of the error. The wording can change without notice. Do not parse this field.
#### `500`

Indicates an unexpected server-side error.

`application/json`

- `code` (string)
  Stable error code you can branch on, for example `INVALID_SCHEDULE` or `RULE_ALREADY_EXISTS`.
- `details` (map string to object)
  Optional extra information about the error, for example field validation issues or the `rule_id` when that ID already exists.
- `error` (string)
  A short human-readable summary of the error category (e.g., "Not Found", "Bad Request"). Subject to change without notice. Do not parse or rely on its content.
- `message` (string)
  A readable explanation of the error. The wording can change without notice. Do not parse this field.
#### `503`

Indicates the alerting engine is disabled by the `alerting:v2:enabled` advanced setting.

`application/json`

- `code` (string)
  Stable error code you can branch on, for example `INVALID_SCHEDULE` or `RULE_ALREADY_EXISTS`.
- `details` (map string to object)
  Optional extra information about the error, for example field validation issues or the `rule_id` when that ID already exists.
- `error` (string)
  A short human-readable summary of the error category (e.g., "Not Found", "Bad Request"). Subject to change without notice. Do not parse or rely on its content.
- `message` (string)
  A readable explanation of the error. The wording can change without notice. Do not parse this field.
## Code Examples

#### Console

```console
GET /api/alerting/v2/execution_history/rules?sort_field={sort_field}&sort_order={sort_order}&page={page}&per_page={per_page}
```

#### curl

```curl
curl -X GET "https://{kibana_url}/api/alerting/v2/execution_history/rules?sort_field={sort_field}&sort_order={sort_order}&page={page}&per_page={per_page}"
```

## Response Examples

#### One successful rule execution

```json
{
  "items": [
    {
      "ended_at": "2026-01-15T12:00:01.250Z",
      "id": "execution-1",
      "outcome": "success",
      "rule": {
        "id": "rule-1",
        "version": 3
      },
      "space_id": "default",
      "started_at": "2026-01-15T12:00:00.000Z",
      "timings": {
        "duration_ms": 1250,
        "scheduled_delay_ms": 40
      }
    }
  ],
  "page": 1,
  "per_page": 20,
  "total": 1
}
```

#### Exceeds the max result window

```json
{
  "code": "BAD_REQUEST",
  "details": {
    "errors": {
      "page": [
        "page * per_page cannot exceed 10000."
      ]
    }
  },
  "error": "Bad Request",
  "message": "page * per_page cannot exceed 10000."
}
```

#### Request was not authenticated

```json
{
  "code": "UNAUTHORIZED",
  "error": "Unauthorized",
  "message": "Authentication required to access this API."
}
```

#### Caller lacks required privileges

```json
{
  "code": "FORBIDDEN",
  "error": "Forbidden",
  "message": "The current user does not have the required privileges for this request."
}
```

#### Unexpected server-side error

```json
{
  "code": "INTERNAL_SERVER_ERROR",
  "error": "Internal Server Error",
  "message": "An unexpected error occurred."
}
```

#### Alerting V2 is disabled

```json
{
  "code": "ALERTING_DISABLED",
  "error": "Service Unavailable",
  "message": "Alerting is disabled."
}
```

