# network.bsky.jetstream.getImportStatus

> Published by [bsky-lexicons.bsky.social](https://lexicon.garden/identity/did:plc:4v4y5r3lwsbtmsxhile2ljac)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:4v4y5r3lwsbtmsxhile2ljac/network.bsky.jetstream.getImportStatus)
- [Documentation](https://lexicon.garden/lexicon/did:plc:4v4y5r3lwsbtmsxhile2ljac/network.bsky.jetstream.getImportStatus/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:4v4y5r3lwsbtmsxhile2ljac/network.bsky.jetstream.getImportStatus/examples)

## Definitions

### `network.bsky.jetstream.getImportStatus`

**Type**: `query`

Report the status of a timestamp-import job: lifecycle state, current phase, per-phase progress, and (on completion) the parse/mutation totals. With no job parameter, reports the current or most recent job. Bearer-token gated: without a configured token the endpoint always returns 401.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `job` | `string` | No | Job id returned by importTimestamps. When omitted, the current or most recent job is reported. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `job` | `string` | Yes | Job id. |
| `error` | `string` | No | Failure detail; present only when state is failed. |
| `phase` | `string` | No | Current phase: parse_bucket (Phase A+B) or apply (Phase C). |
| `state` | `string` | Yes | Lifecycle state. |
| `bucketed` | `boolean` | No | Whether Phase A+B completed (the offset files are durable). |
| `rowsTotal` | `integer` | No |  |
| `rowsValid` | `integer` | No |  |
| `finishedAt` | `string` (datetime) | No | Present only for a terminal job. |
| `rowsMutated` | `integer` | No |  |
| `submittedAt` | `string` (datetime) | No |  |
| `rowsRejected` | `integer` | No |  |
| `segmentsApplied` | `integer` | No | Segments processed so far in Phase C. |
| `segmentsPatched` | `integer` | No |  |
| `segmentsToApply` | `integer` | No | Segments Phase C will process (after resume-skips). |
| `segmentsExamined` | `integer` | No |  |
| `rowsCorruptOffset` | `integer` | No |  |
| `rowsMatchedSpecific` | `integer` | No |  |
| `specificCidsUnmatched` | `integer` | No |  |
| `rowsMatchedAllVersions` | `integer` | No |  |

#### Errors

- **JobNotFound**: No import job matches the supplied id, or no job has ever run when the id is omitted.

## Raw Schema

```json
{
  "id": "network.bsky.jetstream.getImportStatus",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "JobNotFound",
          "description": "No import job matches the supplied id, or no job has ever run when the id is omitted."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "job",
            "state"
          ],
          "properties": {
            "job": {
              "type": "string",
              "description": "Job id."
            },
            "error": {
              "type": "string",
              "description": "Failure detail; present only when state is failed."
            },
            "phase": {
              "type": "string",
              "description": "Current phase: parse_bucket (Phase A+B) or apply (Phase C).",
              "knownValues": [
                "parse_bucket",
                "apply"
              ]
            },
            "state": {
              "type": "string",
              "description": "Lifecycle state.",
              "knownValues": [
                "running",
                "complete",
                "failed"
              ]
            },
            "bucketed": {
              "type": "boolean",
              "description": "Whether Phase A+B completed (the offset files are durable)."
            },
            "rowsTotal": {
              "type": "integer",
              "minimum": 0
            },
            "rowsValid": {
              "type": "integer",
              "minimum": 0
            },
            "finishedAt": {
              "type": "string",
              "format": "datetime",
              "description": "Present only for a terminal job."
            },
            "rowsMutated": {
              "type": "integer",
              "minimum": 0
            },
            "submittedAt": {
              "type": "string",
              "format": "datetime"
            },
            "rowsRejected": {
              "type": "integer",
              "minimum": 0
            },
            "segmentsApplied": {
              "type": "integer",
              "minimum": 0,
              "description": "Segments processed so far in Phase C."
            },
            "segmentsPatched": {
              "type": "integer",
              "minimum": 0
            },
            "segmentsToApply": {
              "type": "integer",
              "minimum": 0,
              "description": "Segments Phase C will process (after resume-skips)."
            },
            "segmentsExamined": {
              "type": "integer",
              "minimum": 0
            },
            "rowsCorruptOffset": {
              "type": "integer",
              "minimum": 0
            },
            "rowsMatchedSpecific": {
              "type": "integer",
              "minimum": 0
            },
            "specificCidsUnmatched": {
              "type": "integer",
              "minimum": 0
            },
            "rowsMatchedAllVersions": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "properties": {
          "job": {
            "type": "string",
            "description": "Job id returned by importTimestamps. When omitted, the current or most recent job is reported."
          }
        }
      },
      "description": "Report the status of a timestamp-import job: lifecycle state, current phase, per-phase progress, and (on completion) the parse/mutation totals. With no job parameter, reports the current or most recent job. Bearer-token gated: without a configured token the endpoint always returns 401."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
