# pub.chive.admin.getBackfillStatus

> 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.getBackfillStatus)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.admin.getBackfillStatus/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.admin.getBackfillStatus/examples)

## Definitions

### `pub.chive.admin.getBackfillStatus`

**Type**: `query`

Get status of backfill operations

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | No | Filter by specific operation ID |
| `status` | `string` | No | Filter by operation status |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `operation` | `ref` → `#backfillOperation` | No | Single operation (when filtered by ID) |
| `operations` | `array` | No | Backfill operations |

#### Errors

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

### `pub.chive.admin.getBackfillStatus#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 the operation |
| `completedAt` | `string` (datetime) | No | Operation completion time |
| `totalRecords` | `integer` | No | Total records to process (if known) |
| `recordsProcessed` | `integer` | Yes | Number of records processed so far |

## Raw Schema

```json
{
  "id": "pub.chive.admin.getBackfillStatus",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "AuthenticationRequired"
        },
        {
          "name": "AdminRequired"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "properties": {
            "operation": {
              "ref": "#backfillOperation",
              "type": "ref",
              "description": "Single operation (when filtered by ID)"
            },
            "operations": {
              "type": "array",
              "items": {
                "ref": "#backfillOperation",
                "type": "ref"
              },
              "description": "Backfill operations"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "properties": {
          "id": {
            "type": "string",
            "description": "Filter by specific operation ID"
          },
          "status": {
            "type": "string",
            "description": "Filter by operation status",
            "knownValues": [
              "running",
              "completed",
              "failed",
              "cancelled"
            ]
          }
        }
      },
      "description": "Get status of 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": [
            "running",
            "completed",
            "failed",
            "cancelled"
          ]
        },
        "startedAt": {
          "type": "string",
          "format": "datetime",
          "description": "Operation start time"
        },
        "startedBy": {
          "type": "string",
          "format": "did",
          "description": "DID of the admin who started the operation"
        },
        "completedAt": {
          "type": "string",
          "format": "datetime",
          "description": "Operation completion time"
        },
        "totalRecords": {
          "type": "integer",
          "description": "Total records to process (if known)"
        },
        "recordsProcessed": {
          "type": "integer",
          "description": "Number of records processed so far"
        }
      },
      "description": "A backfill operation record"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
