# social.colibri.beta.bridge.reportBackfill

> Published by [colibri.social](https://lexicon.garden/identity/did:plc:mprdjqjluoswa7awzggaggj3)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.bridge.reportBackfill)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.bridge.reportBackfill/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.bridge.reportBackfill/examples)

## Definitions

### `social.colibri.beta.bridge.reportBackfill`

**Type**: `procedure`

Reports how far a history import has got, so admins can follow it.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `channel` | `string` (space-ref) | Yes | The linked channel being filled. |
| `community` | `string` (did) | Yes | The community the registration belongs to. |
| `from` | `string` (datetime) | Yes | The start of the time range being imported. |
| `imported` | `integer` | Yes | How many messages the bridge has imported so far. |
| `reached` | `string` (datetime) | No | When the newest imported message in the channel was sent. |
| `registration` | `string` (tid) | Yes | Record key of the registration. |
| `requestedAt` | `string` (datetime) | Yes | The request the report belongs to, as it appears on the link. |
| `state` | `string` | Yes | How far the import is. |
| `until` | `string` (datetime) | Yes | The end of the time range being imported. |

#### Output

**Encoding**: `application/json`

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

#### Errors

- **AuthRequired**: The request is missing, malformed, or unverifiable service auth.
- **CommunityNotFound**: No community exists at the given DID.
- **RegistrationNotFound**: The community has no bridge registration with that id.
- **Forbidden**: The caller is not the bridge this registration belongs to.
- **ChannelNotLinked**: The channel is not linked to this registration.
- **RateLimited**: The bridge sent too many requests. Retry after the interval in the response headers.
- **BackfillNotRequested**: No admin has asked for a history import on this channel.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Reports how far a history import has got, so admins can follow it.",
      "errors": [
        {
          "description": "The request is missing, malformed, or unverifiable service auth.",
          "name": "AuthRequired"
        },
        {
          "description": "No community exists at the given DID.",
          "name": "CommunityNotFound"
        },
        {
          "description": "The community has no bridge registration with that id.",
          "name": "RegistrationNotFound"
        },
        {
          "description": "The caller is not the bridge this registration belongs to.",
          "name": "Forbidden"
        },
        {
          "description": "The channel is not linked to this registration.",
          "name": "ChannelNotLinked"
        },
        {
          "description": "The bridge sent too many requests. Retry after the interval in the response headers.",
          "name": "RateLimited"
        },
        {
          "description": "No admin has asked for a history import on this channel.",
          "name": "BackfillNotRequested"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "channel": {
              "description": "The linked channel being filled.",
              "format": "space-ref",
              "type": "string"
            },
            "community": {
              "description": "The community the registration belongs to.",
              "format": "did",
              "type": "string"
            },
            "from": {
              "description": "The start of the time range being imported.",
              "format": "datetime",
              "type": "string"
            },
            "imported": {
              "description": "How many messages the bridge has imported so far.",
              "minimum": 0,
              "type": "integer"
            },
            "reached": {
              "description": "When the newest imported message in the channel was sent.",
              "format": "datetime",
              "type": "string"
            },
            "registration": {
              "description": "Record key of the registration.",
              "format": "tid",
              "type": "string"
            },
            "requestedAt": {
              "description": "The request the report belongs to, as it appears on the link.",
              "format": "datetime",
              "type": "string"
            },
            "state": {
              "description": "How far the import is.",
              "knownValues": [
                "running",
                "done",
                "failed"
              ],
              "type": "string"
            },
            "until": {
              "description": "The end of the time range being imported.",
              "format": "datetime",
              "type": "string"
            }
          },
          "required": [
            "community",
            "registration",
            "channel",
            "requestedAt",
            "state",
            "imported",
            "from",
            "until"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {},
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "social.colibri.beta.bridge.reportBackfill",
  "lexicon": 1
}
```
