> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.datalab.to/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Run Review

> The full-review manifest (plan A5): source pages via the EXISTING
thumbnail endpoint, the per-shape result payloads (INLINE from the run's own
stored result — no artifact or intermediates listing, so no workspace path
reaches a client), and the projected trace.



## OpenAPI

````yaml https://www.datalab.to/openapi.json get /api/v1/agent-studio/runs/{run_id}/review
openapi: 3.1.0
info:
  title: Datalab API
  version: 0.0.1
servers:
  - url: https://www.datalab.to
    description: Datalab API
security: []
paths:
  /api/v1/agent-studio/runs/{run_id}/review:
    get:
      tags:
        - agent-studio
      summary: Get Run Review
      description: >-
        The full-review manifest (plan A5): source pages via the EXISTING

        thumbnail endpoint, the per-shape result payloads (INLINE from the run's
        own

        stored result — no artifact or intermediates listing, so no workspace
        path

        reaches a client), and the projected trace.
      operationId: get_run_review_api_v1_agent_studio_runs__run_id__review_get
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: integer
            title: Run Id
        - name: wos-session
          in: cookie
          required: false
          schema:
            type: string
            title: Wos-Session
        - name: datalab_active_team
          in: cookie
          required: false
          schema:
            type: string
            title: Datalab Active Team
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReviewManifestResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    ReviewManifestResponse:
      properties:
        run:
          $ref: '#/components/schemas/RunResponse'
        pages:
          items:
            $ref: '#/components/schemas/RunPageResponse'
          type: array
          title: Pages
          description: >-
            Page surfaces (pdf/image docs). EMPTY for spreadsheet runs — no page
            images exist for xlsx, matching production; the source pane is
            `sheets`.
        sheets:
          items:
            $ref: '#/components/schemas/RunSheetResponse'
          type: array
          title: Sheets
          description: >-
            Sheet surfaces (spreadsheet docs): per-sheet block HTML + cell-range
            bounds for the sheet-tab source pane. EMPTY for page docs.
        output:
          $ref: '#/components/schemas/RunOutputResponse'
        trace:
          items:
            $ref: '#/components/schemas/TraceStepResponse'
          type: array
          title: Trace
        doc_aliases:
          additionalProperties:
            type: string
          type: object
          title: Doc Aliases
          description: >-
            Workspace filename → original input filename. The sandbox anonymizes
            the staged document to <uuid>.<ext>; this maps those names back for
            display.
      type: object
      required:
        - run
        - output
      title: ReviewManifestResponse
      description: |-
        Everything the full run review renders (frontend spec §4): chrome (the
        run card), the source surfaces (pages OR sheets — never both), the
        per-shape result pane payload, and the projected trace.

        Deliberately NOT here: any listing of the run's workspace files. The
        review shows the run's own output and derived views of it; raw workspace
        browsing would put storage paths in front of a customer.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RunResponse:
      properties:
        id:
          type: integer
          title: Id
        processor_id:
          type: string
          title: Processor Id
          description: Public processor id (slug).
        version:
          type: string
          title: Version
          description: Pinned version label.
        plane:
          type: string
          enum:
            - design
            - execution
          title: Plane
        status:
          type: string
          enum:
            - queued
            - running
            - done
            - error
          title: Status
        error:
          anyOf:
            - $ref: '#/components/schemas/RunErrorResponse'
            - type: 'null'
        doc_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Doc Name
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
          description: APIRequest lookup key for the underlying inference request.
        scorecard:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Scorecard
        check_results:
          items:
            $ref: '#/components/schemas/CheckResultResponse'
          type: array
          title: Check Results
        flag_ids:
          items:
            type: integer
          type: array
          title: Flag Ids
        token_usage:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Token Usage
        turns:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Turns
          description: >-
            Agent-loop turns the run took (the substrate result's turn count,
            persisted at ingest). None for runs that never reached the loop or
            predate the column.
        started:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started
        finished:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Finished
        created:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created
      type: object
      required:
        - id
        - processor_id
        - version
        - plane
        - status
      title: RunResponse
      description: 'RunCard-shaped (snake_case): the drawer/board consume this.'
    RunPageResponse:
      properties:
        index:
          type: integer
          minimum: 0
          title: Index
          description: 0-based page index.
        thumbnail_url:
          type: string
          title: Thumbnail Url
          description: >-
            Authenticated thumbnail URL for this page (the /thumbnails endpoint
            scoped to one page). NOTE: it returns ThumbnailResponse JSON —
            {thumbnails: [<base64 image>], success, error} — not raw image
            bytes; the adapter decodes thumbnails[0]. This is exactly what the
            existing PipelineWorkspace consumer expects.
      type: object
      required:
        - index
        - thumbnail_url
      title: RunPageResponse
      description: |-
        One source page of the full review. Served by the EXISTING thumbnail
        machinery (same team-checked endpoint PipelineWorkspace uses); clients
        fetch lazily/batched.
    RunSheetResponse:
      properties:
        index:
          type: integer
          minimum: 0
          title: Index
          description: 0-based sheet index (API boundary).
        name:
          type: string
          title: Name
        rows:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Rows
          description: Used row extent of the sheet.
        cols:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Cols
          description: Used column extent of the sheet.
        cells:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Cells
          description: Non-empty cell count.
        blocks:
          items:
            $ref: '#/components/schemas/SheetBlockResponse'
          type: array
          title: Blocks
      type: object
      required:
        - index
        - name
      title: RunSheetResponse
      description: >-
        One sheet of a SPREADSHEET run's source document (the sheet-mode

        review: sheet tabs instead of page thumbnails — spreadsheets have NO
        page

        images, matching production).
    RunOutputResponse:
      properties:
        shape:
          anyOf:
            - type: string
            - type: 'null'
          title: Shape
          description: The run's output shape (parse|json|jats|wcag|segment).
        markdown:
          anyOf:
            - type: string
            - type: 'null'
          title: Markdown
        html:
          anyOf:
            - type: string
            - type: 'null'
          title: Html
        blocks:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Blocks
          description: >-
            The chunks block index (UI name: 'blocks') — flat block list with
            ids/bboxes for locator resolution.
        json_tree:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Json Tree
          description: >-
            The hierarchical blocks TREE (the parse result's `json` view — pages
            → nested blocks). Complements `blocks` (the flat chunks index): the
            review's blocks tab renders this; locator resolution keys on chunks.
        extraction:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Extraction
          description: The filled schema (json shape).
        fields:
          anyOf:
            - items:
                $ref: '#/components/schemas/FieldResultResponse'
              type: array
            - type: 'null'
          title: Fields
        segments:
          anyOf:
            - items:
                $ref: '#/components/schemas/SegmentSpanResponse'
              type: array
            - type: 'null'
          title: Segments
        verdict:
          anyOf:
            - type: string
            - type: 'null'
          title: Verdict
          description: Typed conformance verdict for artifact-family shapes.
        jats_xml:
          anyOf:
            - type: string
            - type: 'null'
          title: Jats Xml
          description: The JATS article XML (jats shape).
        accessible_pdf:
          anyOf:
            - type: string
            - type: 'null'
          title: Accessible Pdf
          description: The tagged accessible PDF as base64 (wcag shape).
        images:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Images
          description: >-
            Run images as base64, keyed by the name the output references. Only
            present when the run requested them.
      type: object
      title: RunOutputResponse
      description: |-
        Per-shape result payloads for the review's result pane (frontend
        RunOutput). Only the fields the run's shape produced are populated.
    TraceStepResponse:
      properties:
        at:
          type: number
          title: At
          description: Seconds from run start.
        kind:
          type: string
          enum:
            - thought
            - tool
            - verify
            - finish
          title: Kind
        label:
          type: string
          title: Label
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
        args:
          anyOf:
            - type: string
            - type: 'null'
          title: Args
          description: Tool call arguments, JSON-formatted.
        status:
          anyOf:
            - type: string
              enum:
                - pass
                - fail
                - warn
                - na
            - type: 'null'
          title: Status
      type: object
      required:
        - at
        - kind
        - label
      title: TraceStepResponse
      description: |-
        One projected trace step (types.ts TraceStep) — a PROJECTION, never the
        raw trace.jsonl.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    RunErrorResponse:
      properties:
        kind:
          type: string
          enum:
            - input
            - system
            - contract
          title: Kind
        message:
          type: string
          title: Message
      type: object
      required:
        - kind
        - message
      title: RunErrorResponse
    CheckResultResponse:
      properties:
        check_id:
          type: string
          title: Check Id
        name:
          type: string
          title: Name
        status:
          type: string
          enum:
            - pass
            - fail
            - warn
            - na
          title: Status
        blocking:
          type: boolean
          title: Blocking
        message:
          type: string
          title: Message
        locators:
          items:
            $ref: '#/components/schemas/Locator'
          type: array
          title: Locators
      type: object
      required:
        - check_id
        - name
        - status
        - blocking
        - message
      title: CheckResultResponse
    SheetBlockResponse:
      properties:
        id:
          type: string
          title: Id
          description: >-
            Locator-grammar block id: /page/{sheetIndex}/{Type}/{i} with the
            0-based SHEET index in the numeric slot — what citations and flags
            reference.
        source_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Id
          description: >-
            The production spreadsheet render's id for the same block
            (/page/{SheetName}/{Type}/{i}) — matches ids inside
            output.json_tree.
        block_type:
          type: string
          title: Block Type
        html:
          anyOf:
            - type: string
            - type: 'null'
          title: Html
          description: >-
            The block's HTML, inline when small. None when large — fetch
            html_url instead (exactly one of html/html_url is set for table/text
            blocks; picture blocks have neither).
        html_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Html Url
          description: >-
            Authenticated files-proxy URL for oversized block HTML (the
            workspace spill file).
        bounds:
          anyOf:
            - $ref: '#/components/schemas/SheetCellBoundsResponse'
            - type: 'null'
      type: object
      required:
        - id
        - block_type
      title: SheetBlockResponse
      description: One block of a sheet (table / metadata text / picture).
    FieldResultResponse:
      properties:
        path:
          type: string
          title: Path
          description: JSON pointer, e.g. /analytes/0/value.
        label:
          type: string
          title: Label
        value:
          type: string
          title: Value
        verification:
          type: string
          enum:
            - PASS
            - FAIL_FIX
            - FAIL_CITATIONS
            - FAIL_UNRESOLVABLE
            - ITEMS_MISSING
            - PENDING
          title: Verification
          default: PENDING
        reasoning:
          anyOf:
            - type: string
            - type: 'null'
          title: Reasoning
        citations:
          items:
            $ref: '#/components/schemas/Locator'
          type: array
          title: Citations
      type: object
      required:
        - path
        - label
        - value
      title: FieldResultResponse
      description: |-
        One extracted field (json shape): value + SIX-state verification +
        citation Locators (frontend FieldResult). PENDING until the run carried
        the extraction-grounding verifier (plan A5 provenance honesty).
    SegmentSpanResponse:
      properties:
        name:
          type: string
          title: Name
        pages:
          items:
            type: integer
          type: array
          minItems: 1
          title: Pages
          description: 0-indexed pages this segment claims.
        confidence:
          anyOf:
            - type: string
              enum:
                - high
                - medium
                - low
            - type: 'null'
          title: Confidence
      type: object
      required:
        - name
        - pages
      title: SegmentSpanResponse
      description: |-
        Production /segment sense: one segment of a file split into documents
        — ``{name, pages[], confidence}`` (supports non-contiguous segments).
        Pages 0-indexed at the API boundary.
    Locator:
      properties:
        run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Run Id
        doc_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Doc Name
        surface:
          anyOf:
            - $ref: '#/components/schemas/LocatorSurface'
            - type: 'null'
        block_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Block Id
          description: 'Path-shaped block id, production convention: /page/{n}/{type}/{i}.'
        cell:
          anyOf:
            - $ref: '#/components/schemas/LocatorCell'
            - type: 'null'
        word_range:
          anyOf:
            - prefixItems:
                - type: integer
                - type: integer
              type: array
              maxItems: 2
              minItems: 2
            - type: 'null'
          title: Word Range
        bbox:
          anyOf:
            - prefixItems:
                - type: number
                - type: number
                - type: number
                - type: number
              type: array
              maxItems: 4
              minItems: 4
            - type: 'null'
          title: Bbox
        field_path:
          anyOf:
            - type: string
            - type: 'null'
          title: Field Path
          description: JSON pointer into the extraction result, e.g. /analytes/3/value.
        check_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Check Id
        rule_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Rule Id
        segment:
          anyOf:
            - type: string
            - type: 'null'
          title: Segment
        turn:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Turn
      additionalProperties: false
      type: object
      title: Locator
      description: |-
        The canonical reference shape (frontend spec §3, backend plan A3).

        Anchor (run_id/doc_name) → source chain (surface → block_id →
        cell/word_range/bbox) → semantic axis (field_path | check_id | rule_id |
        segment) → trace turn. Everything is optional; axes co-occur (an
        extraction citation = field_path + surface + block_id).
    SheetCellBoundsResponse:
      properties:
        min_row:
          type: integer
          minimum: 0
          title: Min Row
        min_col:
          type: integer
          minimum: 0
          title: Min Col
        max_row:
          type: integer
          minimum: 0
          title: Max Row
        max_col:
          type: integer
          minimum: 0
          title: Max Col
      type: object
      required:
        - min_row
        - min_col
        - max_row
        - max_col
      title: SheetCellBoundsResponse
      description: |-
        A block's cell-range bounds on its sheet — 1-based Excel coordinates
        (the spreadsheet pipeline's own geometry: bbox = [min_col, min_row,
        max_col, max_row]).
    LocatorSurface:
      properties:
        kind:
          type: string
          enum:
            - page
            - sheet
          title: Kind
        label:
          type: string
          title: Label
          description: Display label, e.g. 'page 3', 'Sheet1'.
        number:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Number
          description: >-
            0-indexed surface number at the API boundary (display convention is
            1-based — that belongs in `label`).
      additionalProperties: false
      type: object
      required:
        - kind
        - label
      title: LocatorSurface
      description: 'Source surface: a page (pdf/image) or a sheet (spreadsheet).'
    LocatorCell:
      properties:
        row:
          type: integer
          minimum: 0
          title: Row
        col:
          type: integer
          minimum: 0
          title: Col
      additionalProperties: false
      type: object
      required:
        - row
        - col
      title: LocatorCell
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````