---
type: api
title: Find backfills for rules
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-alerting-rules-backfill-find
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-alerting-rules-backfill-find
products:
  - Kibana
---

# Find backfills for rules

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

## Paths

- `POST` `/api/alerting/rules/backfill/_find`
- `POST` `/s/{space_id}/api/alerting/rules/backfill/_find`

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

## Description

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

## Query String Parameters

- `end` (string)
  The end date for filtering backfills.
- `page` (number · min: 1 · default: 1)
  The page number to return.
- `per_page` (number · min: 0 · default: 10)
  The number of backfills to return per page.
- `rule_ids` (string)
  A comma-separated list of rule identifiers.
- `initiator` (enum)
  The initiator of the backfill, either `user` for manual backfills or `system` for automatic gap fills.
  Values: `user`, `system`
- `start` (string)
  The start date for filtering backfills.
- `sort_field` (enum)
  The field to sort backfills by.
  Values: `createdAt`, `start`
- `sort_order` (enum)
  The sort order.
  Values: `asc`, `desc`

## Responses

#### `200`

Indicates a successful call.

`application/json`

- `data` ([] object)
  - `created_at` (string)
  - `duration` (string)
  - `enabled` (boolean)
  - `end` (string)
  - `id` (string)
  - `initiator` (enum)
    Values: `user`, `system`
  - `initiator_id` (string)
  - `rule` (object)
    - `api_key_created_by_user` (boolean) — nullable
    - `api_key_owner` (string · default: null) — nullable
    - `consumer` (string)
    - `created_at` (string)
    - `created_by` (string · default: null) — nullable
    - `enabled` (boolean)
    - `id` (string)
    - `name` (string)
    - `params` (map string to object)
      The parameters for the rule.
    - `revision` (number)
    - `rule_type_id` (string)
    - `schedule` (object)
      - `interval` (string)
    - `tags` ([] string)
    - `updated_at` (string)
    - `updated_by` (string · default: null) — nullable
  - `schedule` ([] object)
    - `interval` (string)
    - `run_at` (string)
    - `status` (enum)
      Values: `complete`, `pending`, `running`, `error`, `timeout`
  - `space_id` (string)
  - `start` (string)
  - `status` (enum)
    Values: `complete`, `pending`, `running`, `error`, `timeout`
- `page` (number)
- `per_page` (number)
- `total` (number)
#### `400`

Indicates an invalid schema or parameters.

#### `403`

Indicates that this call is forbidden.

## Code Examples

#### Console

```console
POST /api/alerting/rules/backfill/_find
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/alerting/rules/backfill/_find" \
  -H "kbn-xsrf: true"
```

## Response Examples

#### Find backfills response

```json
{
  "data": [
    {
      "created_at": "2024-01-30T00:00:00.000Z",
      "duration": "12h",
      "enabled": true,
      "id": "85bdf571-f4fb-4666-a8d2-e05e1220ebc6",
      "initiator": "user",
      "rule": {
        "api_key_owner": "elastic",
        "consumer": "alerts",
        "created_at": "2022-12-05T23:40:33.132Z",
        "created_by": "elastic",
        "enabled": true,
        "id": "3583a470-74f6-11ed-9801-35303b735aef",
        "name": "my alert",
        "params": {
          "aggField": "sheet.version",
          "aggType": "avg",
          "groupBy": "top",
          "index": [
            "test-index"
          ],
          "termField": "name.keyword",
          "termSize": 6,
          "threshold": [
            1000
          ],
          "thresholdComparator": "\u003E",
          "timeField": "@timestamp",
          "timeWindowSize": 5,
          "timeWindowUnit": "m"
        },
        "revision": 0,
        "rule_type_id": ".index-threshold",
        "schedule": {
          "interval": "1m"
        },
        "tags": [
          "cpu"
        ],
        "updated_at": "2022-12-05T23:40:33.132Z",
        "updated_by": "elastic"
      },
      "schedule": [
        {
          "interval": "12h",
          "run_at": "2024-01-01T12:00:00.000Z",
          "status": "pending"
        },
        {
          "interval": "12h",
          "run_at": "2024-01-02T00:00:00.000Z",
          "status": "pending"
        }
      ],
      "space_id": "default",
      "start": "2024-01-01T00:00:00.000Z",
      "status": "pending"
    }
  ],
  "page": 1,
  "per_page": 10,
  "total": 1
}
```

