---
title: "Get playtable run"
method: GET
path: "/api/playtable-runs/{sid}"
tags: ["playtable_runs"]
---

# Get playtable run

`GET /api/playtable-runs/{sid}`

## Request

- Base URL: `https://beta.getsales.io/playtables/v1`
- URL: `https://beta.getsales.io/playtables/v1/api/playtable-runs/{sid}`
- Auth: HTTP bearer and API key in header `Team-SID`

Poll one run after create: include progress for derived state, job counters and spent_credits; file_url lands when an export finishes (presigned, 15-min TTL - re-get for a fresh link).

Contract:
- MCP tool `get_playtable_run`, registry package `mcp.playtables/playtable_runs`, mount `playtables.columns`.
- Operation `get`, response envelope `get`.
- Flags: read only.

## Path parameters

- `sid` string, required: The pt_rn_* sid of the row to read.

## Query parameters

- `include[]` string[]: Relations to attach to the row; omit for the bare row.

## Response `200`

`get` success envelope.

- GetPlaytableRunResponse
  - `success` true, required
  - `operation` 'get', required
  - `item` object, required
    - `sid` string, required
    - `team_sid` string, required
    - `playtable_sid` string, required
    - `object_type` 'people' | 'company', required
    - `type` 'enrich' | 'export' | 'import' | 'bulk', required
    - `field_sids` string[], nullable, required
    - `scope` object, nullable, required
      - `object_sids` string[], nullable, required
      - `view_sid` string, nullable, required
      - `filter` union, required: Filter AST: and/or/not/any nodes (depth <= 5, root counts) over {field, op} leaves; op = >=1 of the §4.18 atoms; atoms AND.
        - object
          - `and` object[], required
        - object
          - `or` object[], required
        - object
          - `not` object, required: Recursive node: the same object shape repeats here. A static OpenAPI document cannot express the cycle, so this level is documented as an open object.
        - object
          - `any` object, required
            - `path` string, required: Array-valued path - the only way to reach inside an array.
            - `where` object, required: Recursive node: the same object shape repeats here. A static OpenAPI document cannot express the cycle, so this level is documented as an open object.
        - object
          - `field` string, required: Namespaced path: record.<slug> or a built-in object attribute; element-relative inside any.where.
          - `op` object, required
            - `eq` union
              - …
            - `ne` union
              - …
            - `in` union[]
              - …
            - `nin` union[]
              - …
            - `gt` union
              - …
            - `gte` union
              - …
            - `lt` union
              - …
            - `lte` union
              - …
            - `is_null` boolean
            - `contains` string
            - `not_contains` string
            - `contains_any` string[]
            - `not_contains_any` string[]
            - `starts_with` string
        - unknown
    - `params_snapshot` object, nullable, required
    - `max_budget` number, nullable, required
    - `estimated_cost` number, nullable, required
    - `file_url` string, nullable, required
    - `created_by` object, required
      - `actor_type` 'user' | 'support' | 'api_key' | 'system' | 'agent', required
      - `actor_sid` string, nullable, required
      - `team_sid` string, required
      - `actor_name` string, nullable: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
      - `oauth_client_sid` string, nullable: The acting OAuth client (id_oc_*); null off the OAuth path.
      - `reason` string, nullable: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
      - `permissions` object, required: Internal audit context: the grant set the actor held at write time. Not a contract.
      - `cluster_id` integer, nullable: Internal audit context: the cluster that served the write.
      - `trace_id` string, nullable: Internal audit context: the trace id of the request that wrote the row.
    - `created_at` string, required
    - `finished_at` string, nullable, required
  - `included` object, required
    - `progress` object: 1:1 derived progress (include[]=progress): state (queued|running|finished|cancelled), job counters from the Laravel batch, spent_credits from the ledger.
      - `state` 'waiting' | 'resolving' | 'queued' | 'running' | 'finished' | 'cancelled', required: Derived - precedence: cancelled > finished > running > queued. Terminal: finished, cancelled.
      - `total_jobs` number, required
      - `pending_jobs` number, required
      - `processed_jobs` number, required
      - `failed_jobs` number, required
      - `cancelled_at` string, nullable, required
      - `spent_credits` number, required
  - `includes` string[], required
  - `meta` object, required
    - `trace_id` string, required: UUID v7; same 128-bit value as the X-Trace-Id header.
    - `span_id` string, required: 16 hex chars, root span of this request.
    - `timestamp` string, required: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
    - `duration_ms` integer, required: Server-side wall clock.
    - `team_sid` string, nullable: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
    - `actor_type` string, nullable: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.

## Other responses

- `4XX`: MCP error envelope. `error.code` is one of validation_failed, nothing_to_update, not_found, relation_not_found, invalid_transition, limit_exceeded, payment_required, duplicate_rejected, conflict, delete_blocked, unauthorized, forbidden, rate_limited, not_implemented.
- `5XX`: MCP error envelope with `error.code` internal_error or service_unavailable.

---

[API](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-playtables.md) - [All operations](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-playtables/llms.txt) - [OpenAPI document](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-playtables/revisions/aa394506515d?raw)
