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

# Read a run

> Read one run in full — console output, SDK calls, input/output, and the error stack trace.

Returns one [workflow](https://developers.zite.com/concepts/workflows.md) run in full: the event stream (console output, SDK
calls with request/response data, external fetches), the run's input and output, and the error
stack trace when it failed. Run ids come from [List runs](https://developers.zite.com/build-api/deployments/read-logs.md).

Large values are size-capped so the response stays manageable: an oversized input/output arrives
as a truncated preview string, and `eventsTruncated` reports how many events were dropped to fit.


## OpenAPI

````yaml build-api/openapi.json GET /apps/{appId}/logs/{runId}
openapi: 3.0.1
info:
  title: Zite Build API
  description: >-
    Create, build, and deploy Zite apps programmatically. The REST equivalent of
    the Zite MCP build tools. Use it from a script, a CI pipeline, or your own
    agent.


    ## Authentication


    All requests require a Bearer API key from your Developer settings:

    ```

    Authorization: Bearer YOUR_API_KEY

    ```

    The key acts as you, so it can only see and change workspaces you have
    access to, and every change is attributed to you.


    ## Base URL


    https://api.zite.com/v1


    ## Errors


    Errors return `{ "statusCode": 404, "error": "Not Found", "message":
    "Workspace not found" }`. Notable statuses: `401` (bad or missing key),
    `402` (the build tools aren't active: the free trial has ended, or the plan
    doesn't include them; publishing also returns it when your organization is
    over its monthly workflow run limit), `403` (your key can't access that
    workspace or app), `404`, `409` (a commit that git refused: unresolved
    conflicts in the session, or another commit landed on the same files; the
    message names the fix), `429` (rate limited), and `400` for validation
    failures and publishing before a build is green.
  version: 1.0.0
servers:
  - url: https://api.zite.com/v1
    description: Zite Build API
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: Create workspaces and inspect the apps in them.
  - name: Build sessions
    description: >-
      Open an isolated checkout of a workspace, create apps, edit files, check,
      and commit.
  - name: Deployments
    description: Publish built apps and read runtime logs.
paths:
  /apps/{appId}/logs/{runId}:
    get:
      tags:
        - Deployments
      summary: Read a run
      description: >-
        Returns one run in full — console output, SDK calls with
        request/response data, external fetches, the run's input and output, and
        the error stack trace. Run ids come from `GET /apps/{appId}/logs`.
      operationId: readLogDetail
      parameters:
        - $ref: '#/components/parameters/AppId'
        - name: runId
          in: path
          required: true
          description: A run id from the log listing.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The full run
          content:
            application/json:
              schema:
                type: object
                properties:
                  run:
                    $ref: '#/components/schemas/LogRunDetail'
              example:
                run:
                  runId: 3f0c8a4e-93e1-46f7-9d0a-6d5a1c2b7e90
                  workflowId: listTickets
                  mode: live
                  startedAt: '2026-07-13T18:04:11Z'
                  durationMs: 142
                  success: false
                  snapshotId: 6347
                  triggerSource: live
                  input:
                    status: open
                  output: null
                  error:
                    message: 'invalid input syntax for type timestamp: ""'
                    stack: |-
                      error: invalid input syntax for type timestamp: ""
                          at listTickets (endpoint.js:12:9)
                  events:
                    - type: console
                      timestamp: '2026-07-13T18:04:11.120Z'
                      data:
                        level: log
                        message: fetching tickets with status=open
                  eventsTotal: 1
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    AppId:
      name: appId
      in: path
      required: true
      description: The app ID.
      schema:
        type: string
      example: a1b2c3d4e5
  schemas:
    LogRunDetail:
      type: object
      description: >-
        One run in full. Large values are size-capped: an oversized input/output
        arrives as a truncated preview string, and eventsTruncated reports how
        many events were dropped to fit.
      properties:
        runId:
          type: string
          format: uuid
        workflowId:
          type: string
        mode:
          type: string
          enum:
            - live
            - preview
        startedAt:
          type: string
          format: date-time
        durationMs:
          type: integer
        success:
          type: boolean
        snapshotId:
          type: integer
        triggerSource:
          type: string
          enum:
            - cron
            - webhook
            - preview
            - live
            - manual
        input:
          description: The input the run received.
        output:
          description: The value the endpoint returned.
        error:
          type: object
          properties:
            message:
              type: string
            stack:
              type: string
        events:
          type: array
          description: >-
            The run's event stream in order: console output (`type: "console"`
            with `data.level` and `data.message`), SDK calls (`type: "sdk_call"`
            with request/response data), and external fetches (`type: "fetch"`).
          items:
            type: object
        eventsTotal:
          type: integer
        eventsTruncated:
          type: integer
          description: >-
            Events dropped to fit the size budget. Absent when nothing was
            dropped.
    Error:
      type: object
      properties:
        statusCode:
          type: integer
          example: 404
        error:
          type: string
          example: Not Found
        message:
          type: string
          example: Workspace not found
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 401
            error: Unauthorized
            message: API authorization header missing
    NotFound:
      description: The resource does not exist or your key cannot access it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 404
            error: Not Found
            message: Workspace not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Enter your Zite API key. Format: Bearer <api_key>'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.