# network.bsky.jetstream.importTimestamps

> 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.importTimestamps)
- [Documentation](https://lexicon.garden/lexicon/did:plc:4v4y5r3lwsbtmsxhile2ljac/network.bsky.jetstream.importTimestamps/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:4v4y5r3lwsbtmsxhile2ljac/network.bsky.jetstream.importTimestamps/examples)

## Definitions

### `network.bsky.jetstream.importTimestamps`

**Type**: `procedure`

Submit a timestamp-import job. The referenced CSV is staged server-local out-of-band and named by a path confined to the server's configured import directory (paths escaping it via .. or a symlink are rejected). The job runs asynchronously and shares the segment-rewrite lock with delete-compaction, so only one import runs at a time; a concurrent submit is rejected. Bearer-token gated: without a configured token the endpoint always returns 401.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `path` | `string` | Yes | Server-local path to the plain (uncompressed) import CSV, resolved within the configured import directory. May be relative to that directory or an absolute path inside it. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `job` | `string` | Yes | Opaque job id. Poll getImportStatus with this id to observe progress and the terminal result. |

#### Errors

- **ImportInProgress**: Another import job is already running; only one runs at a time.
- **ImportNotReady**: Timestamp import requires the server to be in steady state with the live writer running.
- **InvalidPath**: The path is empty, escapes the import directory, does not exist, or is not a regular file.

## Raw Schema

```json
{
  "id": "network.bsky.jetstream.importTimestamps",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "path"
          ],
          "properties": {
            "path": {
              "type": "string",
              "description": "Server-local path to the plain (uncompressed) import CSV, resolved within the configured import directory. May be relative to that directory or an absolute path inside it."
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "ImportInProgress",
          "description": "Another import job is already running; only one runs at a time."
        },
        {
          "name": "ImportNotReady",
          "description": "Timestamp import requires the server to be in steady state with the live writer running."
        },
        {
          "name": "InvalidPath",
          "description": "The path is empty, escapes the import directory, does not exist, or is not a regular file."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "job"
          ],
          "properties": {
            "job": {
              "type": "string",
              "description": "Opaque job id. Poll getImportStatus with this id to observe progress and the terminal result."
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Submit a timestamp-import job. The referenced CSV is staged server-local out-of-band and named by a path confined to the server's configured import directory (paths escaping it via .. or a symlink are rejected). The job runs asynchronously and shares the segment-rewrite lock with delete-compaction, so only one import runs at a time; a concurrent submit is rejected. Bearer-token gated: without a configured token the endpoint always returns 401."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
