---
title: "Get the session log"
method: GET
path: "/migrations/{migration_id}/log"
tags: ["Log"]
---

# Get the session log

`GET /migrations/{migration_id}/log`

## Request

- Base URL: `https://app.vern.so/api/v1`
- URL: `https://app.vern.so/api/v1/migrations/{migration_id}/log`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/vern-so/apis/vern-api/docs/migrations/:migration_id/log/get.ts> (a function with typed inputs; its response is checked against the schema)

The settled record of a migration: what was planned, which files went
in, who approved what, how many rows were written, and whether existing
rows were replaced.

Intended to be fetched once and stored, so you can explain a migration
to your own customer later. It does **not** include the conversation
transcript — that is `/thread` — and it does not include individual row
values.

Available once nothing is in flight, including for migrations that
failed: a run can write rows and then fail, which is exactly when this
matters. While a run is active the endpoint returns `409`.

Pass `?format=md` for the same record as a readable Markdown report.

A migration can be imported again later, so the log always covers every
run to date — a re-fetch is a superset of an earlier one. Use
`generated_at` to tell snapshots apart.

## Query parameters

- `format` 'json' | 'md' | 'markdown'

## Response `200`

The session log.

- SessionLog
  - `migration_id` string
  - `generated_at` string
  - `status` 'awaiting_files' | 'ready' | 'awaiting_approval' | 'completed': - `awaiting_files` — no files uploaded and no source connection - `ready` — inputs present, no plan yet - `awaiting_approval` — a preview is waiting to be executed - `completed` — an import has run successfully
  - `covers` object
    - `runs` integer
    - `from` string, nullable
    - `to` string, nullable
  - `runs` SessionLogRun[]
    - `run_id` string
    - `kind` string: `generate`, `update`, `reuse`, `clarify` or `execute`.
    - `status` string
    - `started_at` string, nullable
    - `completed_at` string, nullable
    - `started_by` string, nullable: Null when the run was started through this API.
    - `files` string[]
    - `plan` string, nullable
    - `questions` object[]
    - `answers` object
    - `outcome` object, nullable
      - `ok` boolean, nullable
      - `rows_written` integer, nullable
      - `per_sheet` object[]
        - `sheet` string, nullable
        - `rows` integer, nullable
      - `invalid_rows` integer, nullable
      - `error` string, nullable
      - `replaced_existing_data` boolean: True when this run emptied its destination sheets before writing — it replaced the previous import rather than adding to it.
    - `audit` object[]: Who did what, in order.
      - `at` string
      - `event` 'started' | 'resumed' | 'templates_adjusted' | 'plan_approved' | 'unknown'
      - `actor` string, nullable
      - `mode` string
      - `answers_excerpt` string
      - `changes` object[]
      - `plan` string

## Other responses

- `401`: API key missing, malformed, or revoked.
- `404`: No migration with this id in your organisation. Returned rather than `403` so the existence of another organisation's migration is not disclosed.
- `409`: The migration is still in progress. Body carries the current `status` and `retry_after_seconds`.
- `429`: Rate limit hit. Counted per account, not per API key. Creating a migration and starting a `generate` run are limited to 30/hour each; answering a run is limited to 30/hour; reads allow 30/minute and writes 30/minute. `Retry-After` gives the seconds until the window resets, alongside `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`.
- `500`: Unexpected server error.
- `503`: The log could not be assembled. Retryable.

## Changes

- **2026-08-21** `f23b9ff77f72`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/vern-so/apis/vern-api/changes/migrations/:migration_id/log/get.md)

---

[API](https://skmtc.dev/vern-so/apis/vern-api.md) - [All operations](https://skmtc.dev/vern-so/apis/vern-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vern-so/apis/vern-api/revisions/6ae61af2db81?raw)
