{"openapi":"3.1.1","info":{"title":"Deepline Runtime API","version":"v2","description":"Discover typed GTM tools and callable Plays, then execute a tool or start and inspect a durable Deepline Play run. Use the MCP endpoint when your client supports Model Context Protocol.","contact":{"name":"Deepline support","email":"team@deepline.com","url":"https://deepline.com/contact"}},"externalDocs":{"description":"Deepline Runtime API reference","url":"https://deepline.com/docs/sdk-v2/api-reference"},"servers":[{"url":"https://code.deepline.com","description":"Deepline production runtime API"}],"tags":[{"name":"Health","description":"Availability checks."},{"name":"Billing","description":"Safe recovery of existing purchase intent."},{"name":"Tools","description":"Discover and execute typed provider tools."},{"name":"Plays","description":"Discover, start, and inspect durable Play runs."}],"paths":{"/api/v2/health":{"get":{"operationId":"getRuntimeHealth","tags":["Health"],"summary":"Check Runtime API availability","description":"Returns the current Deepline Runtime status. This endpoint does not require authentication.","responses":{"200":{"description":"A successful Runtime API response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}},"x-deepline-sdk-client-methods":["health"],"x-deepline-contract-source-files":["apps/deepline-api/src/app/api/v2/health/route.ts"]}},"/api/v2/tools":{"get":{"operationId":"listTools","tags":["Tools"],"summary":"List callable provider tools","description":"Lists the current callable provider-backed tools. Set compact=false to include each tool input and output schema.","parameters":[{"name":"categories","in":"query","required":false,"description":"Comma-separated tool categories to include.","schema":{"type":"string"}},{"name":"tags","in":"query","required":false,"description":"Comma-separated tool tags to include.","schema":{"type":"string"}},{"name":"grep","in":"query","required":false,"description":"Literal terms to match against tool metadata.","schema":{"type":"string"}},{"name":"compact","in":"query","required":false,"description":"Set false to include input and output schemas.","schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"A successful Runtime API response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalog"}}}},"400":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-deepline-sdk-client-methods":["listTools"],"x-deepline-contract-source-files":["apps/deepline-api/src/app/api/v2/tools/route.ts"]}},"/api/v2/tools/search":{"get":{"operationId":"searchTools","tags":["Tools"],"summary":"Search callable provider tools","description":"Searches the tool catalog by intent and returns ranked typed tool candidates.","security":[{"bearerAuth":[]}],"parameters":[{"name":"q","in":"query","required":false,"description":"The task or capability to search for. Omit when filtering only by categories or search_terms.","schema":{"type":"string"}},{"name":"categories","in":"query","required":false,"description":"Comma-separated tool categories to filter.","schema":{"type":"string"}},{"name":"search_terms","in":"query","required":false,"description":"Comma-separated capability terms to rank and filter by, including when q is empty.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Maximum ranked tools to return.","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"offset","in":"query","required":false,"description":"Zero-based offset into the ranked result set.","schema":{"type":"integer","minimum":0,"default":0}},{"name":"task","in":"query","required":false,"description":"Optional. What the caller is trying to accomplish, in one sentence: the input it has and the result it needs, not a restatement of q. Used to rank candidates; up to 300 characters are used.","schema":{"type":"string"}}],"responses":{"200":{"description":"A successful Runtime API response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSearch"}}}},"400":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-deepline-sdk-client-methods":["searchTools"],"x-deepline-contract-source-files":["apps/deepline-api/src/app/api/v2/tools/search/route.ts","apps/deepline-api/src/lib/search/search-handler.ts"]}},"/api/v2/search":{"get":{"operationId":"search","tags":["Tools"],"summary":"Search tools, monitor types, and plays","description":"One ranked search across everything Deepline can run, deploy, or explain. Each result carries a kind: tool, monitor_type, prebuilt_play, or custom_play. The workspace’s own (custom) plays are ranked with a small boost. Ranking uses a third-party AI relevance model, which is sent only each custom play’s name and description; play code, inputs, and run data are never shared with it.","security":[{"bearerAuth":[]}],"parameters":[{"name":"q","in":"query","required":false,"description":"The task or capability to search for. Omit when filtering only by categories or search_terms.","schema":{"type":"string"}},{"name":"types","in":"query","required":false,"description":"Comma-separated kinds to search: tools, monitors, prebuilts, custom, or plays (prebuilts and custom). Omit to search everything.","schema":{"type":"string"}},{"name":"exclude","in":"query","required":false,"description":"Comma-separated kinds to leave out, using the same names as types. Applied after types.","schema":{"type":"string"}},{"name":"categories","in":"query","required":false,"description":"Comma-separated tool categories to filter.","schema":{"type":"string"}},{"name":"search_terms","in":"query","required":false,"description":"Comma-separated capability terms to rank and filter by, including when q is empty.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Maximum ranked results to return.","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"offset","in":"query","required":false,"description":"Zero-based offset into the ranked result set.","schema":{"type":"integer","minimum":0,"default":0}},{"name":"task","in":"query","required":false,"description":"Optional. What the caller is trying to accomplish, in one sentence: the input it has and the result it needs, not a restatement of q. Used to rank candidates; up to 300 characters are used.","schema":{"type":"string"}}],"responses":{"200":{"description":"A successful Runtime API response.","content":{"application/json":{"schema":{"type":"object","description":"The route-owned response envelope. Dynamic tool and Play fields are described by the discovery endpoint returned before execution.","additionalProperties":true}}}},"400":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-deepline-sdk-client-methods":["search"],"x-deepline-contract-source-files":["apps/deepline-api/src/app/api/v2/search/route.ts","apps/deepline-api/src/lib/search/search-handler.ts"]}},"/api/v2/integrations/{toolId}/get":{"get":{"operationId":"getTool","tags":["Tools"],"summary":"Describe one provider-backed tool","description":"Returns the tool input schema, output schema, pricing guidance, and execution metadata. Read this before executing an unfamiliar tool.","security":[{"bearerAuth":[]}],"parameters":[{"name":"toolId","in":"path","required":true,"description":"The toolId returned by the related Deepline API call.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"A successful Runtime API response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolDescription"}}}},"400":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-deepline-sdk-client-methods":["getTool"],"x-deepline-contract-source-files":["apps/deepline-api/src/app/api/v2/integrations/get/route.ts"]}},"/api/v2/integrations/{toolId}/execute":{"post":{"operationId":"executeTool","tags":["Tools"],"summary":"Execute one provider-backed tool","description":"Executes the named tool with a JSON payload. Authenticate with a Deepline workspace API key and inspect the tool description first. Optional Idempotency-Key binds one workspace-scoped execution to this request and caller identity; repeat the same key and input to recover or replay it. New keys authorize new executions. Keyed async calls require a declared recoverable lifecycle and completion-waiting mode; unsupported launch-only modes return 422 before dispatch.","security":[{"bearerAuth":[]}],"parameters":[{"name":"toolId","in":"path","required":true,"description":"The toolId returned by the related Deepline API call.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional caller-owned execution key. Case-sensitive, 1–200 ASCII letters, digits, period, underscore, colon, or hyphen. Persist before dispatch. Changed input conflicts; expired keys cannot be reused.","schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"description":"Input matching the selected tool input schema.","content":{"application/json":{"schema":{"type":"object","required":["payload"],"properties":{"payload":{"type":"object","description":"Input matching the selected tool input schema.","additionalProperties":true}}}}}},"responses":{"200":{"description":"A successful Runtime API response.","content":{"application/json":{"schema":{"type":"object","description":"The route-owned response envelope. Dynamic tool and Play fields are described by the discovery endpoint returned before execution.","additionalProperties":true}}}},"400":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-deepline-sdk-client-methods":["executeTool","executeToolRaw"],"x-deepline-contract-source-files":["apps/deepline-api/src/app/api/v2/integrations/[toolId]/execute/route.ts","apps/deepline-api/src/app/api/v2/integrations/execute/route.ts"]}},"/api/v2/executions/by-key/{key}":{"get":{"operationId":"getToolExecutionByKey","tags":["Tools"],"summary":"Recover a tool execution by its idempotency key","description":"Observe a keyed execution in the authenticated workspace. Completed records include the original response. This lookup does not launch paid work. An unused key returns EXECUTION_NOT_FOUND (404); an expired result returns IDEMPOTENCY_KEY_EXPIRED (410). X-Deepline-Idempotency-Supported: true identifies servers that support this contract, including on a recognized unused-key response.","security":[{"bearerAuth":[]}],"parameters":[{"name":"key","in":"path","required":true,"description":"The key returned by the related Deepline API call.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"A successful Runtime API response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolExecutionLookup"}}}},"400":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A temporary runtime dependency is unavailable. Retry after the Retry-After response header when present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Minimum whole seconds to wait before retrying the request.","schema":{"type":"integer","minimum":1}}}}},"x-deepline-sdk-client-methods":["executions.getByKey"],"x-deepline-contract-source-files":["apps/deepline-api/src/app/api/v2/executions/by-key/[key]/route.ts"]}},"/api/v2/enrich/compile":{"post":{"operationId":"compileEnrichPlan","tags":["Plays"],"summary":"Compile a legacy enrich plan for older clients","description":"Retained for compatibility with older installed SDK/CLI clients. New CLI versions block `deepline enrich` locally; use Deepline Plays for new workflows. This endpoint only compiles a plan and does not start a run.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"A successful Runtime API response.","content":{"application/json":{"schema":{"type":"object","description":"The route-owned response envelope. Dynamic tool and Play fields are described by the discovery endpoint returned before execution.","additionalProperties":true}}}},"400":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-deepline-sdk-client-methods":["compileEnrichPlan"],"x-deepline-contract-source-files":["apps/deepline-api/src/app/api/v2/enrich/compile/route.ts"]}},"/api/v2/plays/run":{"post":{"operationId":"startPlayRun","tags":["Plays"],"summary":"Start a saved or prebuilt Play run","description":"Starts a durable Play run for a saved or prebuilt play name. Read run.id from the response, then poll getRun until run.status is terminal.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"description":"A saved or prebuilt Play reference with its typed input.","content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Saved or prebuilt Play reference."},"input":{"type":"object","description":"Input matching the selected Play schema.","additionalProperties":true}}}}}},"responses":{"200":{"description":"A successful Runtime API response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayRunPackage"}}}},"400":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A temporary runtime dependency is unavailable. Retry after the Retry-After response header when present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Minimum whole seconds to wait before retrying the request.","schema":{"type":"integer","minimum":1}}}}},"x-deepline-sdk-client-methods":["startPlayRun","startPlayRunFromBundle","runPlay"],"x-deepline-contract-source-files":["apps/deepline-api/src/app/api/v2/plays/run/route.ts"]}},"/api/v2/plays":{"get":{"operationId":"listPlays","tags":["Plays"],"summary":"List and search callable Plays","description":"Lists saved and prebuilt Plays available to the authenticated workspace. Use search or grep to narrow by capability before starting a run.","security":[{"bearerAuth":[]}],"parameters":[{"name":"search","in":"query","required":false,"description":"Text to match against callable Play metadata and contracts.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Maximum Plays to return.","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"responses":{"200":{"description":"A successful Runtime API response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayCatalog"}}}},"401":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-deepline-sdk-client-methods":["listPlays","searchPlays"],"x-deepline-contract-source-files":["apps/deepline-api/src/app/api/v2/plays/route.ts"]}},"/api/v2/plays/activity":{"post":{"operationId":"getPlaysActivity","tags":["Plays"],"summary":"Count Play runs and delivered Monitor findings by day","description":"Returns bounded, tenant-scoped daily counts from durable Play runs and delivered Monitor receipts. Each bucket reports source coverage; incomplete history is never a zero claim.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"description":"Calendar window and grouping.","content":{"application/json":{"schema":{"type":"object","properties":{"timeZone":{"type":"string","default":"UTC"},"days":{"type":"integer","minimum":1,"maximum":45,"default":30},"endDate":{"type":"string","format":"date"},"groupBy":{"type":"string","enum":["kind","trigger_source"]}}}}}},"responses":{"200":{"description":"A successful Runtime API response.","content":{"application/json":{"schema":{"type":"object","description":"The route-owned response envelope. Dynamic tool and Play fields are described by the discovery endpoint returned before execution.","additionalProperties":true}}}},"400":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-deepline-sdk-client-methods":["getPlaysActivity"],"x-deepline-contract-source-files":["apps/deepline-api/src/app/api/v2/plays/activity/route.ts"]}},"/api/v2/dashboard/runs-history":{"get":{"operationId":"getRunsHistory","tags":["Plays"],"summary":"Search and page workspace run history","description":"Returns runs newest first. Search matches Play/workflow names, run IDs and statuses. Follow nextCursor while hasMore is true, including pages with no matching runs; only a completed search establishes that no matches exist.","security":[{"bearerAuth":[]}],"parameters":[{"name":"search","in":"query","required":false,"description":"Case-insensitive substring, at most 200 characters.","schema":{"type":"string","maxLength":200}},{"name":"cursor","in":"query","required":false,"description":"Opaque continuation bound to the same workspace and search.","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"Search all, Play or Monitor runs by recorded trigger metadata; requires search.","schema":{"type":"string","enum":["all","plays","monitors"]}},{"name":"limit","in":"query","required":false,"description":"Maximum indexed history entries examined in this page.","schema":{"type":"integer","minimum":1,"maximum":30,"default":20}}],"responses":{"200":{"description":"A successful Runtime API response.","content":{"application/json":{"schema":{"type":"object","description":"The route-owned response envelope. Dynamic tool and Play fields are described by the discovery endpoint returned before execution.","additionalProperties":true}}}},"400":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-deepline-sdk-client-methods":["getRunsHistory","runs.history","runs history"],"x-deepline-contract-source-files":["apps/deepline-api/src/app/api/v2/dashboard/runs-history/route.ts"]}},"/api/v2/plays/{name}":{"get":{"operationId":"getPlay","tags":["Plays"],"summary":"Describe one callable Play","description":"Returns the selected Play and its callable input and output contract. Read this before starting a Play with unfamiliar input.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"description":"The name returned by the related Deepline API call.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"A successful Runtime API response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Play"}}}},"401":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-deepline-sdk-client-methods":["getPlay","describePlay"],"x-deepline-contract-source-files":["apps/deepline-api/src/app/api/v2/plays/[name]/route.ts"]}},"/api/v2/plays/{name}/sheet/history":{"get":{"operationId":"listPlayRunRowHistory","tags":["Plays"],"summary":"Read one page of immutable Play Run row history","description":"Reads retained admitted and terminal row generations for a dataset owned by the requested Play Run in the authenticated workspace. Pass nextCursor as cursor to continue. Coverage explicitly reports legacy, unavailable, or in-progress capture; mutable sheet rows are never presented as historical snapshots.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"description":"The name returned by the related Deepline API call.","schema":{"type":"string","minLength":1}},{"name":"runId","in":"query","required":true,"description":"Required Play Run identity owning the dataset.","schema":{"type":"string","minLength":1}},{"name":"tableNamespace","in":"query","required":true,"description":"Required dataset table namespace within the Play Run.","schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"description":"Page size from 1 through 1000; defaults to 200.","schema":{"type":"integer","minimum":1,"maximum":1000,"default":200}},{"name":"cursor","in":"query","required":false,"description":"Opaque nextCursor from the preceding history page.","schema":{"type":"string"}}],"responses":{"200":{"description":"A successful Runtime API response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunRowHistoryPage"}}}},"400":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A temporary runtime dependency is unavailable. Retry after the Retry-After response header when present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Minimum whole seconds to wait before retrying the request.","schema":{"type":"integer","minimum":1}}}}},"x-deepline-sdk-client-methods":["runs.rowHistory","getPlayRunRowHistory"],"x-deepline-contract-source-files":["apps/deepline-api/src/app/api/v2/plays/[name]/sheet/history/route.ts"]}},"/api/v2/runs/{runId}":{"get":{"operationId":"getRun","tags":["Plays"],"summary":"Get one Play run status","description":"Returns the canonical status and completed output for one Play run. The additive watchSnapshot=true query returns the bounded no-store snapshot polled by SDK watch.","security":[{"bearerAuth":[]}],"parameters":[{"name":"runId","in":"path","required":true,"description":"The runId returned by the related Deepline API call.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"A successful Runtime API response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayRunPackage"}}}},"401":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-deepline-sdk-client-methods":["runs.get","runs.watch","getRunStatus","getPlayStatus"],"x-deepline-contract-source-files":["apps/deepline-api/src/app/api/v2/runs/[runId]/route.ts"]}},"/api/v2/runs/{runId}/children":{"get":{"operationId":"listRunChildren","tags":["Plays"],"summary":"List one page of async child Runs","description":"Returns a bounded page of direct child Runs for one authored async launch key. Pass nextCursor as cursor to retrieve the next page.","security":[{"bearerAuth":[]}],"parameters":[{"name":"runId","in":"path","required":true,"description":"The runId returned by the related Deepline API call.","schema":{"type":"string","minLength":1}},{"name":"launchKey","in":"query","required":true,"description":"Authored ctx.runPlayAsync launch key.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor returned by the previous page.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Page size from 1 through 50; defaults to 50.","schema":{"type":"integer","minimum":1,"maximum":50,"default":50}}],"responses":{"200":{"description":"A successful Runtime API response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunChildrenPage"}}}},"400":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-deepline-sdk-client-methods":["runs.children","runs children"],"x-deepline-contract-source-files":["apps/deepline-api/src/app/api/v2/runs/[runId]/children/route.ts","apps/deepline-api/src/lib/plays/run-route-handlers.ts"]}},"/api/v2/billing/entitlements":{"get":{"operationId":"getBillingEntitlements","tags":["Billing"],"summary":"Read current workspace provider benefits","description":"Returns retained plan terms and paid provider benefit availability. Execution rechecks admission.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"A successful Runtime API response.","content":{"application/json":{"schema":{"type":"object","description":"The route-owned response envelope. Dynamic tool and Play fields are described by the discovery endpoint returned before execution.","additionalProperties":true}}}},"401":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A temporary runtime dependency is unavailable. Retry after the Retry-After response header when present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Minimum whole seconds to wait before retrying the request.","schema":{"type":"integer","minimum":1}}}}},"x-deepline-sdk-client-methods":["billing.entitlements","billing entitlements"],"x-deepline-contract-source-files":["apps/deepline-api/src/app/api/v2/billing/entitlements/route.ts"]}},"/api/v2/billing/credit-purchases/recover":{"post":{"operationId":"recoverCreditPurchase","tags":["Billing"],"summary":"Safely retire a credit purchase that never started","description":"Use the original workspace, credit amount and idempotency key. Atomically retire an absent original intent or return the existing operation unchanged. This endpoint never submits or reconciles a payment. Retry uncertain responses with the same identity; a fresh purchase requires separate explicit approval.","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"The original purchase idempotency key; never generate a replacement for recovery.","schema":{"type":"string","minLength":1,"maxLength":200}}],"requestBody":{"required":true,"description":"The original purchase identity; org_id must match the authenticated workspace.","content":{"application/json":{"schema":{"type":"object","required":["credits","org_id"],"properties":{"credits":{"type":"integer","minimum":1,"maximum":9007199254740991},"org_id":{"type":"string","minLength":1}}}}}},"responses":{"200":{"description":"A successful Runtime API response.","content":{"application/json":{"schema":{"type":"object","description":"The route-owned response envelope. Dynamic tool and Play fields are described by the discovery endpoint returned before execution.","additionalProperties":true}}}},"400":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"A machine-readable error with a safe recovery instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A temporary runtime dependency is unavailable. Retry after the Retry-After response header when present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Minimum whole seconds to wait before retrying the request.","schema":{"type":"integer","minimum":1}}}}},"x-deepline-sdk-client-methods":["billing.recoverCreditPurchase","billing top-up-recover"],"x-deepline-contract-source-files":["apps/deepline-api/src/app/api/v2/billing/credit-purchases/recover/route.ts"]}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Deepline workspace API key","description":"Create a workspace API key in the Deepline dashboard before calling authenticated endpoints."}},"schemas":{"ToolExecutionLookup":{"type":"object","required":["executionRecovery","toolId"],"properties":{"toolId":{"type":"string"},"requestId":{"type":"string","description":"The original execution request id. Pass this to billing.usageEvent() when inspecting the retained execution charge."},"executionRecovery":{"type":"object","required":["idempotencyKey","state","replayed"],"properties":{"idempotencyKey":{"type":"string"},"state":{"type":"string","enum":["running","completed","outcome_unknown"]},"replayed":{"type":"boolean"},"expiresAt":{"type":"string","format":"date-time"}},"additionalProperties":true},"response":{"type":"object","description":"The retained execution response, including Deepline billing.","additionalProperties":true},"responseStatus":{"type":"integer","description":"Original execute HTTP status. A retained failed execution remains a failure."}},"additionalProperties":true},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"oneOf":[{"type":"string","description":"Route-specific error message."},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"resolution":{"type":"string"}},"additionalProperties":true}]}}},"Health":{"type":"object","required":["status","version","timestamp"],"properties":{"status":{"type":"string","const":"ok"},"version":{"type":"string","const":"v2"},"timestamp":{"type":"string","format":"date-time"}}},"ToolCatalog":{"type":"object","properties":{"tools":{"type":"array","items":{"$ref":"#/components/schemas/Tool"}}},"additionalProperties":true},"ToolSearch":{"type":"object","properties":{"tools":{"type":"array","items":{"$ref":"#/components/schemas/SearchTool"}}},"additionalProperties":true},"Tool":{"type":"object","required":["toolId","provider","operationId","description"],"properties":{"toolId":{"type":"string"},"provider":{"type":"string"},"operationId":{"type":"string"},"description":{"type":"string"},"inputSchema":{"type":"object","additionalProperties":true},"outputSchema":{"type":"object","additionalProperties":true}},"additionalProperties":true},"MonitorTool":{"type":"object","required":["toolId","provider","description","kind","callable"],"properties":{"toolId":{"type":"string"},"provider":{"type":"string"},"description":{"type":"string"},"kind":{"type":"string","enum":["monitor_type","monitor_variant_index"]},"callable":{"type":"boolean","const":false},"payload_schema":{"type":"object","additionalProperties":true},"streams":{"type":"array","items":{"type":"object"}},"variants":{"type":"array","items":{"type":"object"}}},"additionalProperties":true},"ToolDescription":{"oneOf":[{"$ref":"#/components/schemas/Tool"},{"$ref":"#/components/schemas/MonitorTool"}]},"SearchTool":{"type":"object","required":["toolId","provider","operation","description"],"properties":{"toolId":{"type":"string"},"provider":{"type":"string"},"operation":{"type":"string"},"description":{"type":"string"},"inputFields":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"PlayCatalog":{"type":"object","properties":{"plays":{"type":"array","items":{"$ref":"#/components/schemas/Play"}}},"additionalProperties":true},"Play":{"type":"object","additionalProperties":true},"PlayRunPackage":{"type":"object","required":["schemaVersion","kind","run","steps","outputs","datasets","next"],"properties":{"schemaVersion":{"type":"integer","const":1},"kind":{"type":"string","const":"play_run"},"run":{"type":"object","required":["id","playName","status"],"properties":{"id":{"type":"string"},"playName":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","completed","failed","cancelled"]},"dashboardUrl":{"type":"string","format":"uri"}},"additionalProperties":true},"steps":{"type":"array","items":{"type":"object","additionalProperties":true}},"outputs":{"type":"object","additionalProperties":true},"datasets":{"type":"array","items":{"type":"object","additionalProperties":true}},"next":{"type":"object","additionalProperties":true}},"additionalProperties":true},"RunChildrenPage":{"type":"object","required":["children","nextCursor","hasMore"],"properties":{"children":{"type":"array","items":{"type":"object","required":["runId","status"],"properties":{"runId":{"type":"string"},"playName":{"type":["string","null"]},"launchKey":{"type":["string","null"]},"status":{"type":"string"}},"additionalProperties":true}},"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}}},"RunRowHistoryPage":{"type":"object","required":["entries","nextCursor","coverage"],"properties":{"entries":{"type":"array","maxItems":1000,"items":{"type":"object","required":["runId","datasetId","rowKey","phase","generation","attemptSeq","rowVersion","inputIndex","inputDigest","status","data","source","recordedAt"],"properties":{"runId":{"type":"string"},"datasetId":{"type":"string"},"rowKey":{"type":"string"},"phase":{"type":"string","enum":["admitted","terminal"]},"generation":{"type":"string","description":"Immutable admission or terminal generation, including distinct same-run repair versions."},"attemptSeq":{"type":["integer","null"]},"rowVersion":{"type":["integer","null"]},"inputIndex":{"type":["integer","null"]},"inputDigest":{"type":"string"},"status":{"type":"string","enum":["pending","enriched","failed","cancelled"]},"data":{"type":"object","additionalProperties":true},"source":{"type":"object","additionalProperties":true},"recordedAt":{"type":"string","format":"date-time"}}}},"nextCursor":{"type":["string","null"]},"coverage":{"type":"object","required":["complete","expectedRows","captureStartedAt","captureCompletedAt","reason"],"properties":{"complete":{"type":"boolean"},"expectedRows":{"type":["integer","null"]},"captureStartedAt":{"type":["string","null"],"format":"date-time"},"captureCompletedAt":{"type":["string","null"],"format":"date-time"},"reason":{"type":"string","enum":["storage_not_expanded","legacy_or_capture_not_enabled","capture_in_progress","complete"]}}}}}}}}