# pub.chive.admin.getBackfillHistory

> Published by [chive.pub](https://lexicon.garden/identity/did:plc:7natp5xae72bddaqlkef2t4e)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.admin.getBackfillHistory)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.admin.getBackfillHistory/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.admin.getBackfillHistory/examples)

## Definitions

### `pub.chive.admin.getBackfillHistory`

**Type**: `query`

Get history of completed, failed, and cancelled backfill operations

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `operations` | `array` | Yes | Historical backfill operations |

#### Errors

- **AuthenticationRequired**
- **AdminRequired**

### `pub.chive.admin.getBackfillHistory#backfillOperation`

**Type**: `object`

A backfill operation record

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | Yes | Operation ID |
| `type` | `string` | Yes | Backfill operation type |
| `error` | `string` | No | Error message if failed |
| `status` | `string` | Yes | Operation status |
| `startedAt` | `string` (datetime) | Yes | Operation start time |
| `startedBy` | `string` (did) | No | DID of the admin who started it |
| `completedAt` | `string` (datetime) | No | Operation completion time |
| `totalRecords` | `integer` | No | Total records to process |
| `recordsProcessed` | `integer` | Yes | Number of records processed |

## Raw Schema

```json
{
  "id": "pub.chive.admin.getBackfillHistory",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "AuthenticationRequired"
        },
        {
          "name": "AdminRequired"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "operations"
          ],
          "properties": {
            "operations": {
              "type": "array",
              "items": {
                "ref": "#backfillOperation",
                "type": "ref"
              },
              "description": "Historical backfill operations"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "properties": {}
      },
      "description": "Get history of completed, failed, and cancelled backfill operations"
    },
    "backfillOperation": {
      "type": "object",
      "required": [
        "id",
        "type",
        "status",
        "startedAt",
        "recordsProcessed"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Operation ID"
        },
        "type": {
          "type": "string",
          "description": "Backfill operation type",
          "knownValues": [
            "pds-scan",
            "freshness-scan",
            "citation-extraction",
            "full-reindex",
            "governance-sync",
            "did-sync"
          ]
        },
        "error": {
          "type": "string",
          "description": "Error message if failed"
        },
        "status": {
          "type": "string",
          "description": "Operation status",
          "knownValues": [
            "completed",
            "failed",
            "cancelled"
          ]
        },
        "startedAt": {
          "type": "string",
          "format": "datetime",
          "description": "Operation start time"
        },
        "startedBy": {
          "type": "string",
          "format": "did",
          "description": "DID of the admin who started it"
        },
        "completedAt": {
          "type": "string",
          "format": "datetime",
          "description": "Operation completion time"
        },
        "totalRecords": {
          "type": "integer",
          "description": "Total records to process"
        },
        "recordsProcessed": {
          "type": "integer",
          "description": "Number of records processed"
        }
      },
      "description": "A backfill operation record"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
