Generated from the SDK route registry and public SDK types by
scripts/generate-play-sdk-reference.ts. Do not edit this file manually.scripts/generate-play-sdk-reference.ts. Do not edit this file manually. Field tables cover current authoring. The SDK retains deprecated compatibility properties, but these tables omit them.
Version And Coverage
| Field | Value |
|---|---|
| SDK version | 0.3.90 |
| SDK HTTP API | v3 |
| Minimum supported SDK | 0.1.53 |
| Deprecated below | 0.3.1 |
| Generated sources | apps/deepline-api/src/lib/sdk/api-routes.tspackages/sdk/src/types.tspackages/sdk/src/client.tspackages/sdk/src/tool-calls.tspackages/sdk/src/release.ts |
| Coverage | HTTP and SDK calls for runtime health, tool discovery, and tool execution. Also covers customer data, Plays, artifacts, files, and run inspection. |
| Not covered | Excludes provider schemas, dashboard-only routes, billing and authentication guides, and tutorials. Generated tool-description routes return the provider schemas. |
Quick Call Flow
Submit a saved or prebuiltname and JSON input to POST /api/v2/plays/run. Save run.id and URL-encode it for endpoint paths. Poll GET /api/v2/runs/:runId or stream /tail until run.status is completed, failed, or cancelled. Read final outputs from the compact package and dataset rows through their paginated endpoints.
Tool And Provider Call Flow
GET /api/v2/tools/search?q=...to discover ranked provider/tool candidates.GET /api/v2/integrations/:toolId/getto inspect input schema, pricing, extractors, and examples.POST /api/v2/integrations/:toolId/executewithpayloadto execute the provider-backed tool.- Read normalized values from declared
extractedValuesandextractedListsgetters. For provider-specific fields, inspect the complete parsed and scrubbed response attoolResponse.rawV2before selecting a nested path. Do not expose provider spend. Customer billing shows only Deepline credits or USD.
ctx.tools.execute(...) so calls are durable, at-least-once, and recorded in run progress. From a regular SDK process, use Deepline.connect().tools.execute(...) or client.executeTool(...).
Authentication
Use a workspace API key from a trusted backend. Every request requiresAuthorization: Bearer <DEEPLINE_API_KEY>.
export DEEPLINE_HOST_URL="${DEEPLINE_HOST_URL:-https://code.deepline.com}"
export DEEPLINE_API_KEY="dl_workspace_key"
Start A Named Or Prebuilt Play
curl -X POST "$DEEPLINE_HOST_URL/api/v2/plays/run" \
-H "Authorization: Bearer $DEEPLINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "prebuilt/person-linkedin-to-email",
"input": {
"linkedin_url": "https://www.linkedin.com/in/example-person/"
}
}'
{
"run": {
"id": "play/prebuilt/person-linkedin-to-email/run/example",
"playName": "person-linkedin-to-email",
"status": "running"
},
"outputs": {}
}
Poll Status
Save the launch response aslaunch.json. Encode the run ID before interpolating it into a path:
ENCODED_RUN_ID=$(jq -er '.run.id | @uri' launch.json)
curl "$DEEPLINE_HOST_URL/api/v2/runs/$ENCODED_RUN_ID" \
-H "Authorization: Bearer $DEEPLINE_API_KEY"
run.status and outputs. With explicit ?full=true, the detail wrapper uses top-level status, result, and nested package.run.status / package.outputs.
Stream Events
curl -N "$DEEPLINE_HOST_URL/api/v2/runs/$ENCODED_RUN_ID/tail?mode=cli" \
-H "Authorization: Bearer $DEEPLINE_API_KEY" \
-H "Accept: text/event-stream"
Stop A Run
curl -X POST "$DEEPLINE_HOST_URL/api/v2/runs/$ENCODED_RUN_ID/stop" \
-H "Authorization: Bearer $DEEPLINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reason":"caller cancelled"}'
Python Caller
Source:docs-examples/sdk-v2/http-python/run_prebuilt.py
import os
import time
import json
import requests
from pathlib import Path
from urllib.parse import quote
def load_deepline_env(path=".env.deepline"):
values = {}
if not os.path.exists(path):
return values
with open(path) as env_file:
for line in env_file:
stripped = line.strip()
if not stripped or stripped.startswith("#") or "=" not in stripped:
continue
key, value = stripped.split("=", 1)
values[key.strip()] = value.strip().strip('"').strip("'")
return values
deepline_env = load_deepline_env()
BASE_URL = os.environ.get(
"DEEPLINE_HOST_URL",
deepline_env.get("DEEPLINE_HOST_URL", "https://code.deepline.com"),
)
API_KEY = os.environ.get("DEEPLINE_API_KEY", deepline_env.get("DEEPLINE_API_KEY"))
if not API_KEY:
raise RuntimeError("Missing DEEPLINE_API_KEY in .env.deepline")
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
}
# Reuse this file only with the same workspace authorization and input.
run_file = Path("person-email-run.json")
if run_file.exists():
saved = json.loads(run_file.read_text())
if saved["base_url"] != BASE_URL:
raise RuntimeError("Saved run belongs to another Deepline origin")
run_id = saved["run_id"]
if run_id is None:
raise RuntimeError("Prior submission outcome is unknown; investigate before starting new work")
else:
# A lost launch response must not cause automatic resubmission.
run_file.write_text(json.dumps({"base_url": BASE_URL, "run_id": None}))
start = requests.post(
f"{BASE_URL}/api/v2/plays/run",
headers=headers,
json={
"name": "prebuilt/person-linkedin-to-email",
"input": {
# Replace this illustrative URL before starting provider work.
"linkedin_url": "https://www.linkedin.com/in/example-person/",
},
},
timeout=30,
)
start.raise_for_status()
run_id = start.json()["run"]["id"]
if not isinstance(run_id, str) or not run_id:
raise RuntimeError("Launch response has no nonempty run ID")
run_file.write_text(json.dumps({"base_url": BASE_URL, "run_id": run_id}))
if not isinstance(run_id, str) or not run_id:
raise RuntimeError("The saved response must contain a nonempty run ID")
deadline = time.monotonic() + 600
while True:
response = requests.get(
f"{BASE_URL}/api/v2/runs/{quote(run_id, safe='')}",
headers=headers,
timeout=30,
)
response.raise_for_status()
body = response.json()
run_status = body["run"]["status"]
if run_status in {"completed", "failed", "cancelled"}:
Path("person-email-result.json").write_text(json.dumps(body, indent=2))
print(f"Run {run_id}: {run_status}; saved person-email-result.json")
if run_status != "completed":
raise RuntimeError(f"Run ended with {run_status}; inspect the saved result")
break
if time.monotonic() >= deadline:
raise TimeoutError(
f"Local wait ended for {run_id}; remote work was not cancelled. "
"Resume with the same saved run file and workspace authorization."
)
time.sleep(min(2, max(0, deadline - time.monotonic())))
Generated Route Tables
Runtime Health
| Method | Path | SDK/client surface | Purpose | Source |
|---|---|---|---|---|
GET | /api/v2/health | health | Check API availability and SDK target health. | apps/deepline-api/src/app/api/v2/health/route.ts |
Tool And Provider Calls
| Method | Path | SDK/client surface | Purpose | Source |
|---|---|---|---|---|
GET | /api/v2/executions/by-key/:key | executions.getByKey | Observe or retrieve the retained response for a workspace-scoped tool execution key. | apps/deepline-api/src/app/api/v2/executions/by-key/[key]/route.ts |
GET | /api/v2/integrations/:toolId | getTool | Describe one provider-backed tool by integration id. | apps/deepline-api/src/app/api/v2/integrations/[toolId]/route.ts |
POST | /api/v2/integrations/:toolId/execute | executeToolexecuteToolRaw | Execute one provider-backed tool call through Deepline. | apps/deepline-api/src/app/api/v2/integrations/[toolId]/execute/route.tsapps/deepline-api/src/app/api/v2/integrations/execute/route.ts |
GET | /api/v2/integrations/:toolId/get | getTool | Describe one provider-backed tool, including schema, pricing, guidance, and extractors. | apps/deepline-api/src/app/api/v2/integrations/get/route.ts |
POST | /api/v2/integrations/:toolId/quote | quoteInferenceTool | SDK-facing route. | apps/deepline-api/src/app/api/v2/integrations/[toolId]/quote/route.tsapps/deepline-api/src/lib/deeplineagent/quote-service.tsapps/deepline-api/src/lib/deeplineagent/quote.ts |
POST | /api/v2/integrations/connect | connectNotificationSlack | SDK-facing route. | apps/deepline-api/src/app/api/v2/integrations/connect/route.ts |
GET | /api/v2/integrations/list | searchTools | Compatibility discovery route for integration/tool listing. | apps/deepline-api/src/app/api/v2/integrations/list/route.ts |
GET | /api/v2/tools | listTools | List callable provider/tool definitions. | apps/deepline-api/src/app/api/v2/tools/route.ts |
GET | /api/v2/tools/providers | listProviders | SDK-facing route. | apps/deepline-api/src/app/api/v2/tools/providers/route.ts |
GET | /api/v2/tools/search | searchTools | Search callable provider/tool definitions with ranked metadata search. | apps/deepline-api/src/app/api/v2/tools/search/route.tsapps/deepline-api/src/lib/search/search-handler.ts |
Customer Data
| Method | Path | SDK/client surface | Purpose | Source |
|---|---|---|---|---|
POST | /api/v2/db/query | db.queryqueryCustomerDb | Run a bounded query against the customer data plane. | apps/deepline-api/src/app/api/v2/db/query/route.ts |
Play Runs
| Method | Path | SDK/client surface | Purpose | Source |
|---|---|---|---|---|
GET | /api/v2/plays/:name/runs | listPlayRuns | List recent runs for one play. | apps/deepline-api/src/app/api/v2/plays/[name]/runs/route.ts |
GET | /api/v2/plays/:name/sheet | runs.exportDatasetRowsgetPlaySheetRows | Read/export runtime sheet rows for a run dataset. | apps/deepline-api/src/app/api/v2/plays/[name]/sheet/route.ts |
POST | /api/v2/plays/run | startPlayRunstartPlayRunFromBundlerunPlay | Start a saved, prebuilt, or artifact-backed play run. | apps/deepline-api/src/app/api/v2/plays/run/route.ts |
GET | /api/v2/runs | runs.listlistRuns | List runs with filters such as play name and status. | apps/deepline-api/src/app/api/v2/runs/route.ts |
GET | /api/v2/runs/:runId | runs.getruns.watchgetRunStatusgetPlayStatus | Read canonical status, result, outputs, and run package, including Runs identified by ctx.runPlayAsync. | apps/deepline-api/src/app/api/v2/runs/[runId]/route.ts |
GET | /api/v2/runs/:runId/children | runs.childrenruns children | SDK-facing route. | apps/deepline-api/src/app/api/v2/runs/[runId]/children/route.tsapps/deepline-api/src/lib/plays/run-route-handlers.ts |
GET | /api/v2/runs/:runId/input | runs.inputgetRunInput | SDK-facing route. | apps/deepline-api/src/app/api/v2/runs/[runId]/input/route.ts |
GET | /api/v2/runs/:runId/logs | runs.logsgetRunLogs | SDK-facing route. | apps/deepline-api/src/app/api/v2/runs/[runId]/logs/route.ts |
POST | /api/v2/runs/:runId/receipts/results | runs.getReceiptsgetRunReceipts | Read a batch of retained tool responses by receipt key, scoped to the authenticated workspace and run. Never executes tools. | apps/deepline-api/src/app/api/v2/runs/[runId]/receipts/results/route.tsapps/deepline-api/src/lib/plays/tool-receipt-results.tsapps/deepline-api/src/lib/plays/work-receipt-read-model.ts |
POST | /api/v2/runs/:runId/rerun | runs.rerunrerun | SDK-facing route. | apps/deepline-api/src/app/api/v2/runs/[runId]/rerun/route.tsapps/deepline-api/src/lib/plays/rerun-admission-read.tsapps/deepline-api/src/lib/plays/rerun-idempotency.tsapps/deepline-api/src/lib/plays/scheduler-admission-read.ts |
GET | /api/v2/runs/:runId/status | runs.statusruns status | Legacy scalar-only read retained for compatibility. New clients should use GET /api/v2/runs/:runId (runs.get) for status, results, and progress. | apps/deepline-api/src/app/api/v2/runs/[runId]/status/route.ts |
POST | /api/v2/runs/:runId/stop | runs.stopstopRuncancelPlaystopPlay | Stop a running or waiting play run. | apps/deepline-api/src/app/api/v2/runs/[runId]/stop/route.ts |
GET | /api/v2/runs/:runId/tail | legacy SDK watch fallback | Stream canonical run events over SSE. | apps/deepline-api/src/app/api/v2/runs/[runId]/tail/route.ts |
GET | /api/v2/runs/events | runs.searchEventssearchRunEventsruns logs | Search accepted run events, log lines, and receipt outcomes. The run logs and events reference describes kinds, filters, payloads, and pagination. | apps/deepline-api/src/app/api/v2/runs/events/route.tsapps/deepline-api/src/lib/plays/runtime-event-reader.ts |
POST | /api/v2/runs/events | runs.logs.queryruns.logs.countruns.logs.summarizeruns.logs.fieldsruns.events.listruns.events.countruns.events.summarizeruns.events.fieldsruns logsruns events | Search accepted run events, log lines, and receipt outcomes. The run logs and events reference describes kinds, filters, payloads, and pagination. | apps/deepline-api/src/app/api/v2/runs/events/route.tsapps/deepline-api/src/lib/plays/runtime-event-reader.tspackages/play-runtime/run-event-query.tspackages/play-runtime/scheduler-backends/runtime-event-search.ts |
POST | /api/v2/runs/stop-all | runs.stopAllstopAllRuns | SDK-facing route. | apps/deepline-api/src/app/api/v2/runs/stop-all/route.ts |
Play Definitions
| Method | Path | SDK/client surface | Purpose | Source |
|---|---|---|---|---|
GET | /api/v2/plays | listPlayssearchPlays | List or search callable plays. | apps/deepline-api/src/app/api/v2/plays/route.ts |
DELETE | /api/v2/plays/:name | deletePlay | Delete a saved org-owned play. | apps/deepline-api/src/app/api/v2/plays/[name]/route.ts |
GET | /api/v2/plays/:name | getPlaydescribePlay | Describe a saved, shared, or prebuilt play. | apps/deepline-api/src/app/api/v2/plays/[name]/route.ts |
POST | /api/v2/plays/:name/history/clear | clearPlayHistory | SDK-facing route. | apps/deepline-api/src/app/api/v2/plays/[name]/history/clear/route.ts |
POST | /api/v2/plays/:name/live | publishPlayVersion | Promote a revision as the live named play. | apps/deepline-api/src/app/api/v2/plays/[name]/live/route.ts |
GET | /api/v2/plays/:name/versions | listPlayVersions | List saved play revisions. | apps/deepline-api/src/app/api/v2/plays/[name]/versions/route.ts |
Play Artifacts
| Method | Path | SDK/client surface | Purpose | Source |
|---|---|---|---|---|
POST | /api/v2/plays/artifacts | registerPlayArtifact | Register a bundled play artifact for ad hoc runs. | apps/deepline-api/src/app/api/v2/plays/artifacts/route.ts |
POST | /api/v2/plays/check | checkPlayArtifact | Validate a play bundle before storing or running it. | apps/deepline-api/src/app/api/v2/plays/check/route.ts |
POST | /api/v2/plays/files/stage | stagePlayFilesresolveStagedPlayFiles | Stage CSV or packaged files used by play runs. | apps/deepline-api/src/app/api/v2/plays/files/stage/route.ts |
Management And CLI
| Method | Path | SDK/client surface | Purpose | Source | |
|---|---|---|---|---|---|
POST | /api/v2/auth/cli/org-create | org create | SDK-facing route. | apps/deepline-api/src/app/api/v2/auth/cli/org-create/route.ts | |
POST | /api/v2/auth/cli/organizations | org list | SDK-facing route. | apps/deepline-api/src/app/api/v2/auth/cli/organizations/route.ts | |
POST | /api/v2/auth/cli/register | auth register | SDK-facing route. | apps/deepline-api/src/app/api/v2/auth/cli/register/route.ts | |
POST | /api/v2/auth/cli/status | auth status | SDK-facing route. | apps/deepline-api/src/app/api/v2/auth/cli/status/route.ts | |
POST | /api/v2/auth/cli/switch | org setorg switch | SDK-facing route. | apps/deepline-api/src/app/api/v2/auth/cli/switch/route.ts | |
GET | /api/v2/billing/auto-recharge | billing.autoRecharge.getgetTargetAutoRechargebilling auto-recharge status | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/auto-recharge/route.ts | |
PUT | /api/v2/billing/auto-recharge | billing.autoRecharge.updateupdateTargetAutoRecharge`billing auto-recharge set | off` | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/auto-recharge/route.ts |
POST | /api/v2/billing/auto-recharge/trigger | billing.autoRecharge.triggerbilling auto-recharge trigger | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/auto-recharge/trigger/route.ts | |
GET | /api/v2/billing/balance | billing balance | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/balance/route.ts | |
GET | /api/v2/billing/catalog/current | billing.plansgetBillingPlansbilling plans | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/catalog/current/route.ts | |
POST | /api/v2/billing/checkout | billing checkout | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/checkout/route.ts | |
POST | /api/v2/billing/checkout/verify | billing redeem | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/checkout/verify/route.ts | |
POST | /api/v2/billing/credit-purchases | purchaseTargetBillingCredits | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/credit-purchases/route.ts | |
POST | /api/v2/billing/credit-purchases/recover | billing.recoverCreditPurchasebilling top-up-recover | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/credit-purchases/recover/route.ts | |
GET | /api/v2/billing/entitlements | billing.entitlementsbilling entitlements | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/entitlements/route.ts | |
GET | /api/v2/billing/invoices | billing.invoices.listlistBillingInvoicesbilling invoices | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/invoices/route.ts | |
GET | /api/v2/billing/ledger | billing history | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/ledger/route.ts | |
DELETE | /api/v2/billing/limit | billing limit off | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/limit/route.ts | |
GET | /api/v2/billing/limit | billing limit | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/limit/route.ts | |
POST | /api/v2/billing/limit | billing limit set | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/limit/route.ts | |
POST | /api/v2/billing/plan-transitions | transitionTargetBillingPlan | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/plan-transitions/route.ts | |
GET | /api/v2/billing/plans | getTargetBillingPlans | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/plans/route.ts | |
POST | /api/v2/billing/portal-sessions | createTargetBillingPortalSession | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/portal-sessions/route.ts | |
GET | /api/v2/billing/status | getTargetBillingStatus | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/status/route.ts | |
POST | /api/v2/billing/subscription/cancel | billing.subscription.cancelcancelBillingSubscriptionbilling subscription cancel | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/subscription/cancel/route.ts | |
POST | /api/v2/billing/subscription/checkout | billing subscribe | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/subscription/checkout/route.ts | |
GET | /api/v2/billing/subscription/status | billing.subscription.statusgetBillingSubscriptionStatusbilling subscription status | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/subscription/status/route.ts | |
POST | /api/v2/billing/top-up | billing.topUptopUpBillingBalancebilling top-up | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/top-up/route.ts | |
GET | /api/v2/billing/usage | billing usage | SDK-facing route. | apps/deepline-api/src/app/api/v2/billing/usage/route.ts | |
POST | /api/v2/cli/feedback | feedback | SDK-facing route. | apps/deepline-api/src/app/api/v2/cli/feedback/route.ts | |
POST | /api/v2/cli/send-session | sessions send | SDK-facing route. | apps/deepline-api/src/app/api/v2/cli/send-session/route.ts | |
POST | /api/v2/cli/send-session/chunk | sessions send | SDK-facing route. | apps/deepline-api/src/app/api/v2/cli/send-session/chunk/route.ts | |
POST | /api/v2/cli/send-session/finalize | sessions send | SDK-facing route. | apps/deepline-api/src/app/api/v2/cli/send-session/finalize/route.ts | |
GET | /api/v2/dashboard/runs-history | getRunsHistoryruns.historyruns history | SDK-facing route. | apps/deepline-api/src/app/api/v2/dashboard/runs-history/route.ts | |
POST | /api/v2/ingestion/repair | repairIngestionStorage | SDK-facing route. | apps/deepline-api/src/app/api/v2/ingestion/repair/route.ts | |
GET | /api/v2/models/describe | describeModel | SDK-facing route. | apps/deepline-api/src/app/api/v2/models/describe/route.tsapps/deepline-api/src/lib/deeplineagent/model-options.tspackages/integrations/deeplineagent/generated/provider-options.ts | |
GET | /api/v2/monitors/access | monitors status | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/access/route.ts | |
POST | /api/v2/monitors/audit | monitors audit | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/audit/route.ts | |
POST | /api/v2/monitors/batch | monitors batch submit | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/batch/route.ts | |
GET | /api/v2/monitors/batch/:runId | monitors batch get | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/batch/[runId]/route.ts | |
POST | /api/v2/monitors/batch/deploy | monitors batch deploy | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/batch/deploy/route.ts | |
GET | /api/v2/monitors/batches | monitors named batch resource paths | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/batches/[batchId]/route.ts | |
DELETE | /api/v2/monitors/batches/:batchId | monitors named batch stop | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/batches/[batchId]/route.ts | |
GET | /api/v2/monitors/batches/:batchId | monitors named batch get | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/batches/[batchId]/route.ts | |
PUT | /api/v2/monitors/batches/:batchId | monitors named batch sync | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/batches/[batchId]/route.ts | |
POST | /api/v2/monitors/batches/:batchId/start | monitors named batch start | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/batches/[batchId]/start/route.ts | |
POST | /api/v2/monitors/check | monitors check | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/check/route.ts | |
POST | /api/v2/monitors/deploy | monitors deploy | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/deploy/route.ts | |
GET | /api/v2/monitors/deployed | monitors list | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/deployed/route.ts | |
DELETE | /api/v2/monitors/deployed/:key | monitors delete | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/deployed/[key]/route.ts | |
GET | /api/v2/monitors/deployed/:key | monitors get | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/deployed/[key]/route.ts | |
PATCH | /api/v2/monitors/deployed/:key | monitors update | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/deployed/[key]/route.ts | |
POST | /api/v2/monitors/deployed/:key/reactivate | monitors reactivate | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/deployed/[key]/reactivate/route.ts | |
POST | /api/v2/monitors/deployed/:key/test | monitors test | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/deployed/[key]/test/route.ts | |
POST | /api/v2/monitors/deployed/:key/validate | monitors validate | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/deployed/[key]/validate/route.ts | |
GET | /api/v2/monitors/fleets | monitors fleets get (no id) | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/fleets/route.ts | |
DELETE | /api/v2/monitors/fleets/:fleetId | monitors fleets deactivate | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/fleets/[fleetId]/route.ts | |
GET | /api/v2/monitors/fleets/:fleetId | monitors fleets get | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/fleets/[fleetId]/route.ts | |
PUT | /api/v2/monitors/fleets/:fleetId | monitors fleets sync | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/fleets/[fleetId]/route.ts | |
POST | /api/v2/monitors/fleets/:fleetId/reactivate | monitors fleets reactivate | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/fleets/[fleetId]/reactivate/route.ts | |
POST | /api/v2/monitors/fleets/check | retained fleet definition check for installed clients (no CLI command) | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/fleets/check/route.ts | |
GET | /api/v2/monitors/health | monitors healthmonitors audit --watch | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/health/route.ts | |
GET | /api/v2/monitors/jobs | monitors jobs resource paths | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/jobs/[jobId]/route.ts | |
GET | /api/v2/monitors/jobs/:jobId | monitors jobs getmonitors jobs wait | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/jobs/[jobId]/route.ts | |
POST | /api/v2/monitors/jobs/:jobId/cancel | monitors jobs cancel | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/jobs/[jobId]/cancel/route.ts | |
GET | /api/v2/monitors/jobs/:jobId/logs | monitors jobs logs | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/jobs/[jobId]/logs/route.ts | |
POST | /api/v2/monitors/repair | monitors repair | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/repair/route.ts | |
POST | /api/v2/monitors/setup | monitors deploy (provider-specific post-deploy readback) | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/setup/[tool]/route.ts | |
POST | /api/v2/monitors/sync | monitors sync scalar | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/sync/route.ts | |
GET | /api/v2/monitors/tools | monitors available | SDK-facing route. | apps/deepline-api/src/app/api/v2/monitors/tools/route.ts | |
GET | /api/v2/notifications | getNotifications | SDK-facing route. | apps/deepline-api/src/app/api/v2/notifications/route.ts | |
POST | /api/v2/notifications | createNotification | SDK-facing route. | apps/deepline-api/src/app/api/v2/notifications/route.ts | |
DELETE | /api/v2/notifications/:notificationId | deleteNotification | SDK-facing route. | apps/deepline-api/src/app/api/v2/notifications/[notificationId]/route.ts | |
PATCH | /api/v2/notifications/:notificationId | updateNotification | SDK-facing route. | apps/deepline-api/src/app/api/v2/notifications/[notificationId]/route.ts | |
POST | /api/v2/notifications/:notificationId/test | testNotification | SDK-facing route. | apps/deepline-api/src/app/api/v2/notifications/[notificationId]/test/route.ts | |
GET | /api/v2/notifications/slack/channels | listNotificationChannels | SDK-facing route. | apps/deepline-api/src/app/api/v2/notifications/slack/channels/route.ts | |
POST | /api/v2/plays/:name/pin | setPlayPinned | SDK-facing route. | apps/deepline-api/src/app/api/v2/plays/[name]/pin/route.ts | |
POST | /api/v2/plays/:name/restore | restorePlay | SDK-facing route. | apps/deepline-api/src/app/api/v2/plays/[name]/restore/route.ts | |
GET | /api/v2/plays/:name/settings | getPlaySettings | SDK-facing route. | apps/deepline-api/src/app/api/v2/plays/[name]/settings/route.ts | |
PATCH | /api/v2/plays/:name/settings | updatePlaySettings | SDK-facing route. | apps/deepline-api/src/app/api/v2/plays/[name]/settings/route.ts | |
DELETE | /api/v2/plays/:name/share | unpublishSharePage | SDK-facing route. | apps/deepline-api/src/app/api/v2/plays/[name]/share/route.ts | |
GET | /api/v2/plays/:name/share | getSharePage | SDK-facing route. | apps/deepline-api/src/app/api/v2/plays/[name]/share/route.ts | |
PATCH | /api/v2/plays/:name/share | updateSharePage | SDK-facing route. | apps/deepline-api/src/app/api/v2/plays/[name]/share/route.ts | |
POST | /api/v2/plays/:name/share | publishSharePage | SDK-facing route. | apps/deepline-api/src/app/api/v2/plays/[name]/share/route.ts | |
POST | /api/v2/plays/:name/share/regenerate | regenerateSharePage | SDK-facing route. | apps/deepline-api/src/app/api/v2/plays/[name]/share/regenerate/route.ts | |
GET | /api/v2/plays/:name/sheet/history | runs.rowHistorygetPlayRunRowHistory | SDK-facing route. | apps/deepline-api/src/app/api/v2/plays/[name]/sheet/history/route.ts | |
GET | /api/v2/plays/:name/triggers | getPlayTriggerConfig | SDK-facing route. | apps/deepline-api/src/app/api/v2/plays/[name]/triggers/route.ts | |
PUT | /api/v2/plays/:name/triggers | updatePlayTriggerConfig | SDK-facing route. | apps/deepline-api/src/app/api/v2/plays/[name]/triggers/route.ts | |
POST | /api/v2/plays/activity | getPlaysActivity | SDK-facing route. | apps/deepline-api/src/app/api/v2/plays/activity/route.ts | |
POST | /api/v2/plays/artifacts/immutable | registerPlayArtifact | SDK-facing route. | apps/deepline-api/src/app/api/v2/plays/artifacts/immutable/route.ts | |
POST | /api/v2/plays/files/stage/mint | stagePlayFilesmintStagedPlayFileUploads | SDK-facing route. | apps/deepline-api/src/app/api/v2/plays/files/stage/mint/route.ts | |
POST | /api/v2/plays/run/cli | plays run --json | SDK-facing route. | apps/deepline-api/src/app/api/v2/plays/run/cli/route.ts | |
GET | /api/v2/plays/settings/paths | listPlaySettingsPaths | SDK-facing route. | apps/deepline-api/src/app/api/v2/plays/settings/paths/route.ts | |
GET | /api/v2/sdk/compat | compat check | SDK-facing route. | apps/deepline-api/src/app/api/v2/sdk/compat/route.ts | |
GET | /api/v2/search | search | SDK-facing route. | apps/deepline-api/src/app/api/v2/search/route.tsapps/deepline-api/src/lib/search/search-handler.ts | |
GET | /api/v2/secrets | secrets listsecrets checklistSecrets | SDK-facing route. | apps/deepline-api/src/app/api/v2/secrets/route.ts | |
POST | /api/v2/secrets | secrets setsecrets set --note | SDK-facing route. | apps/deepline-api/src/app/api/v2/secrets/route.ts | |
DELETE | /api/v2/secrets/:id | secrets delete | SDK-facing route. | apps/deepline-api/src/app/api/v2/secrets/[id]/route.ts | |
PATCH | /api/v2/secrets/:id | secrets noteupdateSecretNote | SDK-facing route. | apps/deepline-api/src/app/api/v2/secrets/[id]/route.ts | |
POST | /api/v2/secrets/:id/test | secrets test | SDK-facing route. | apps/deepline-api/src/app/api/v2/secrets/[id]/test/route.ts | |
DELETE | /api/v2/settings/notifications | disableNotificationSlack | SDK-facing route. | apps/deepline-api/src/app/api/v2/settings/notifications/route.ts | |
GET | /api/v2/settings/notifications | getNotificationSettings | SDK-facing route. | apps/deepline-api/src/app/api/v2/settings/notifications/route.ts | |
PUT | /api/v2/settings/notifications | setNotificationSlack | SDK-facing route. | apps/deepline-api/src/app/api/v2/settings/notifications/route.ts | |
GET | /api/v2/settings/notifications/channels | listNotificationSlackChannels | SDK-facing route. | apps/deepline-api/src/app/api/v2/settings/notifications/channels/route.ts | |
GET | /api/v2/settings/notifications/dlq | listNotificationDlq | SDK-facing route. | apps/deepline-api/src/app/api/v2/settings/notifications/dlq/route.ts | |
GET | /api/v2/settings/notifications/dlq/:deliveryId | getNotificationDlqDelivery | SDK-facing route. | apps/deepline-api/src/app/api/v2/settings/notifications/dlq/[deliveryId]/route.ts | |
POST | /api/v2/settings/notifications/dlq/:deliveryId | updateNotificationDlqDelivery | SDK-facing route. | apps/deepline-api/src/app/api/v2/settings/notifications/dlq/[deliveryId]/route.ts | |
PATCH | /api/v2/settings/notifications/subscriptions | setNotificationSubscriptions | SDK-facing route. | apps/deepline-api/src/app/api/v2/settings/notifications/subscriptions/route.ts | |
POST | /api/v2/settings/notifications/test | testNotificationSlack | SDK-facing route. | apps/deepline-api/src/app/api/v2/settings/notifications/test/route.ts | |
GET | /api/v2/usage/events | billing.usageEventgetBillingUsageEvent | SDK-facing route. | apps/deepline-api/src/app/api/v2/usage/events/route.ts | |
POST | /api/v2/workspaces | workspaces.createorg create | SDK-facing route. | apps/deepline-api/src/app/api/v2/workspaces/route.tsapps/deepline-api/src/lib/workspaces/create-additional-workspace.ts |
Recent Compatible API Changes
These entries come from the compatible SDK/API change ledger and explain additive changes that did not require an SDK API-contract bump. Each change lives inapps/deepline-api/src/lib/sdk/compatible-changes/ so concurrent PRs do not edit a shared ledger file.
| Change | Reason |
|---|---|
2026-10-inline-cli-play-admission | Adds POST /api/v2/plays/run/cli as a compatibility-checking adapter over canonical Play admission. JSON-wait CLI invocations use it without a separate compatibility GET and may request ?stream=true for a short terminal observation. Imported publication and file staging still check before writing. Normal SDK, dashboard, human-output and early-run-id stream callers retain POST /api/v2/plays/run. Legacy admission is allowed only after an unmarked 404 or 405. Authoritative or ambiguous outcomes never launch again. Existing bodies, response packages, authentication, billing and durable run identity remain compatible. |
2026-10-prebuilt-observed-cost | This change adds optional observedCost to prebuilt Play results from GET /api/v2/search and GET /api/v2/plays/:name?include=guidance. The CLI displays the field in deepline search and deepline plays describe.The field reports Deepline credits per output row or per run. It includes an average, a maximum, and a median after five runs exist. These figures use recent successful runs across all workspaces. The field can report that no runs were observed. The change preserves route paths, methods, query parameters, existing response fields, and authentication. It also preserves SDK methods, CLI commands and flags, run execution, and billing semantics. Installed clients ignore the new field. The figures contain only aggregate Deepline credits. They expose no provider spend, workspace identity, or run data. |
2026-10-unified-search | This change adds GET /api/v2/search, client.search(), deepline search, and the deepline_search MCP tool. One ranked search covers tools, monitor types, Deepline prebuilt Plays, and workspace-owned Plays. Optional types and exclude filters select tools, monitors, prebuilts, custom, or plays.The integration catalog indexes prebuilt Plays and monitor types with tools. One query ranks all these documents. Existing GET /api/v2/tools/search and GET /api/v2/plays retain their paths, methods, query parameters, authentication, and response envelopes. Installed SDK and CLI clients continue to work. Tools search uses the same search system with a kind restriction. Its results gain an additional kind field.New CLIs retain deepline tools search and deepline plays search as deprecated aliases. Each alias calls deepline search with the matching --type. The alias prints a deprecation notice on stderr and returns the unified results envelope. Billing semantics and redaction of provider spend remain unchanged.Workspace-owned Plays use the same relevance model with a small ranking boost. Only each Play’s name and description go to that third-party AI model. The model never receives Play code, inputs, or run data. |
2026-08-monitor-fleets-beta | The Monitor Fleets beta adds an SDK, API, and CLI namespace. It includes canonical helpers for tagged-JSON authoring, client.monitors.fleets, and deepline monitors fleets. Authenticated /api/v2/monitors/fleets routes support definition sync, reads, lifecycle controls, and sync status.Ordinary Monitor routes, commands, definitions, and provider resources remain unchanged. Billing semantics and customer-facing Deepline credit units also remain unchanged. Fleet mutations require explicit idempotency keys and optimistic versions. Dry runs have no side effects. Durable sync execution remains an internal detail, not a second public workflow. |
2026-08-play-catalog-metadata | This change adds POST /api/v2/plays/:name/pin, the setPlayPinned SDK method, and CLI plays pin|unpin commands. Play catalog reads expose derived canonical tool categories and an optional categories filter. These additions preserve existing Play routes, authentication, and execution behavior. Billing semantics and redaction of provider spend remain unchanged. |
2026-08-play-run-input-replay | This change adds authenticated GET /api/v2/runs/:runId/input and POST /api/v2/runs/:runId/rerun routes. It also adds SDK runs.input, getRunInput, runs.rerun, and rerun methods. CLI additions are deepline runs get --input and deepline runs rerun.Callers can read the exact launch payload retained in Convex and start a fresh run from that payload. Existing run routes, response envelopes, authentication, billing semantics, and redaction of provider spend remain unchanged. Installed SDK and CLI clients retain their behavior. New clients can explicitly read and replay runs created after input retention shipped. |
2026-07-sdk-enrich-compiler-source-imports | The shared enrich-plan compiler now resolves imports through TypeScript source paths. Server-side MCP callers can reuse this compiler without built JavaScript artifacts. Only internal build resolution changes. Installed CLI commands, accepted flags and inputs, and generated Play semantics remain unchanged. SDK and API routes, response envelopes, and authentication also remain unchanged. Billing semantics and redaction of provider spend remain unchanged. |
2026-07-play-detached-runtime-progress | This change corrects status and CLI progress text for a Play that executes in a detached runtime receipt. The status reports running instead of waiting. The progress text identifies active execution instead of incorrectly requesting external approval.The fix preserves route paths, methods, request and response shapes, command names and flags, and authentication. Billing semantics and redaction of provider spend remain unchanged. Existing clients may continue to handle the same run-status values and progress fields. Only the inaccurate waiting value and misleading hint change while work executes. |
Public Types
ToolDefinition
Summary definition of a callable provider-backed tool.
Returned by DeeplineClient.listTools and ranked tool search. Use
getTool(toolId) or the matching HTTP describe route for provider-specific
schema, examples, pricing, extraction guidance, and execution metadata.
| Name | Type | Required | Description |
|---|---|---|---|
toolId | string | Yes | Unique tool identifier used in API calls (e.g. "dropleads_search_people"). |
provider | string | Yes | Provider that backs this tool (e.g. "hunter", "dropleads", "test"). |
displayName | string | Yes | Human-readable name for display. |
description | string | Yes | What this tool does — suitable for LLM tool descriptions. |
categories | DeeplineToolCategory[] | Yes | Categorization tags (e.g. ["people", "enrichment"]). |
tags | string[] | No | Searchable provider and account-signal tags. |
operation | string | No | Operation slug within the provider. |
operationId | string | No | Normalized operation identifier. |
operationAliases | string[] | No | Alternative names that resolve to this tool. |
playReference | prebuilt/${string} | No | Explicit globally runnable play reference for play-backed catalog entries. |
hasInputSchema | boolean | No | Whether detailed input schema is available from describe. |
hasOutputSchema | boolean | No | Whether detailed output schema is available from describe. |
inputSchema | Record<string, unknown> | No | JSON Schema describing the tool’s input parameters. |
outputSchema | Record<string, unknown> | No | JSON Schema describing the tool’s output shape. |
responseSchema | Record<string, unknown> | No | JSON Schema for the Deepline API execution response, including toolResponse.rawV2. |
examples | Array<{ input: Record<string, unknown>; inputSource: 'sample' | 'schema'; responseSource: 'sample' | 'schema' | 'no_result'; description: string; response: { job_id: string; status: string; toolResponse: { rawV2: unknown; view: 'data' | 'rawV2'; responseMeta?: Record<string, unknown>; }; }; }> | No | Illustrative input and full API response examples, separate from schemas. |
pricing | ToolPricingSummary | null | No | User-facing pricing summary. Internal provider/settlement costs are intentionally omitted. |
guidance | { provider?: string; tool?: string } | No | How to use the tool well: the provider’s summary and the tool’s own notes. |
usageGuidance | { execute?: string; prefer?: string[]; access?: { extractedLists?: { expression?: string; meaning?: string; }; extractedValues?: { expression?: string; meaning?: string; }; canonicalToolResponse?: { expression?: string; meaning?: string; }; invalidGetterHint?: string; }; toolExecutionResult?: { type?: 'ToolExecutionResult'; toolResponse?: { rawV2?: string; view?: string; responseMeta?: string; meta?: string; }; meta?: string; extractedLists?: Array<{ name: string; expression: string; details?: { strategy?: string; rawToolOutputPaths?: string[]; candidatePaths?: string[]; }; }> | Record< string, { expression: string; details?: { strategy?: string; rawToolOutputPaths?: string[]; candidatePaths?: string[]; }; } >; extractedValues?: Array<{ name: string; expression: string; details?: { strategy?: string; rawToolOutputPaths?: string[]; candidatePaths?: string[]; }; }> | Record< string, { expression: string; details?: { strategy?: string; rawToolOutputPaths?: string[]; candidatePaths?: string[]; }; } >; [key: string]: unknown; }; } | No | Copyable play-runtime guidance for V2 tool execution results. |
search_score | number | No | Search relevance score returned by ranked tool search. |
search_matches | Array<{ field: string; value: string; term?: string; }> | No | Search match snippets returned by ranked tool search. |
connected | boolean | No | Whether this tool is callable in the current workspace. false when arequired customer credential is missing or a managed provider is temporarily unavailable. |
callable | boolean | No | Whether the tool can be executed. Exact lookup may return non-callable deprecated aliases. |
deprecated | boolean | No | True when callers should migrate this exact tool id to its replacement. |
deprecation | { replacementToolId: string; message: string; execution?: 'terminal' | 'forward'; } | No | Deprecation reason, replacement, and compatibility execution behavior. |
requestWarnings | readonly ToolRequestWarningRule[] | No | Ordered server-authored request warnings. The CLI prints the first match before dispatch. |
credentialStatus | | 'managed' | 'connected' | 'requires_connection' | 'deprecated' | No | Connection status for discovery: managed (Deepline-run credentials),connected (your own credential is connected), or requires_connection(BYO provider not yet connected in this workspace). deprecated meansconnecting credentials will not make the tool callable. |
requiresOwnCredential | boolean | No | True when the tool requires a customer-provided credential to run. |
connectionMessage | string | No | Actionable message shown when a connection is required. |
ToolSearchOptions
Query options for ranked tool/provider discovery.
| Name | Type | Required | Description |
|---|---|---|---|
query | string | No | Free-text search query. |
limit | number | No | Maximum number of ranked tools to return (1-50. Defaults to 20). |
offset | number | No | Zero-based offset into the ranked result set. |
categories | string | No | Comma-separated category filter such as company_search or email_finder. |
searchTerms | string | No | Optional explicit search terms used by agent/CLI callers. |
task | string | No | One sentence: the input you have and the result you need (not the query restated). |
searchMode | 'v1' | 'v2' | No | Search algorithm/version. Defaults to the current ranked mode. |
includeSearchDebug | boolean | No | Include backend debug metadata in the search response. |
ToolSearchResult
Ranked tool/provider discovery response.
Includes matching tools plus render/action hints used by the CLI and agents.
| Name | Type | Required | Description |
|---|---|---|---|
tools | ToolDefinition[] | Yes | Ranked matching tools. |
search_ref | string | No | Identifies this search. pass it as searchRef when executing a tool it found. |
count | number | No | Count included in this response when available. |
total | number | No | Matching count within the selected retrieval set. Check total_is_exact. |
offset | number | No | Zero-based offset used for this page. |
limit | number | No | Maximum number of ranked tools requested for this page. |
next_offset | number | No | Offset to pass for the next page, when more results are in this result set. |
total_is_exact | boolean | No | False when indexed retrieval uses a bounded candidate set. |
may_have_more | boolean | No | True when indexed retrieval may have additional matching tools. |
truncated | boolean | No | Whether results were truncated by server-side limits. |
query | string | No | Echoed query. |
categories | string[] | No | Parsed category filters. |
search_terms | string[] | No | Parsed search terms. |
search_mode | 'v1' | 'v2' | No | Search mode used. |
search_fallback_to_category | boolean | No | Whether search fell back to category matching. |
unknown_categories | string[] | No | Requested categories no tool has, left out of the filter. |
emptyResult | { reason: string; message: string; suggestions: Array<{ label: string; command: string; }>; } | No | Explanation and next commands when filters/search succeed but match zero tools. |
omitted_plays_hint | string | No | Hint explaining omitted play results when searching tools only. |
commandTemplates | { describe?: string; execute?: string; } | No | Copyable CLI command templates for follow-up discovery/execution. |
render | { sections?: Array<{ title: string; lines: string[]; }>; actions?: Array<{ label: string; command: string; }>; } | No | Pre-rendered sections and actions for CLI/agent display. |
ToolExecution
Standard provider/tool execution envelope returned by low-level SDK calls.
toolResponse.rawV2 contains the complete scrubbed provider response.
extractedValues and
extractedLists contain Deepline-normalized getters when the tool exposes
them. Billing fields are Deepline-facing and must not expose provider spend.
| Name | Type | Required | Description |
|---|---|---|---|
status | string | Yes | |
job_id | string | No | |
meta | Record<string, unknown> | No | |
toolResponse | { rawV2?: unknown; view?: 'data' | 'rawV2'; meta?: TMeta; responseMeta?: TMeta; } | Yes | |
extractedLists | Record<string, unknown> | No | |
extractedValues | Record<string, unknown> | No | |
billing | ToolResultBilling | No |
ExecutionRecovery
Durable state returned for a keyed tool execution.
| Name | Type | Required | Description |
|---|---|---|---|
idempotencyKey | string | Yes | Stable caller key used to resume or replay this execution. |
state | 'running' | 'completed' | 'outcome_unknown' | Yes | Whether the execution is still running, completed, or has an unknown provider outcome. |
replayed | boolean | Yes | Whether this response came from an existing durable execution. |
expiresAt | string | No | ISO timestamp after which the completed execution can no longer be replayed. |
ExecutionByKeyResult
Durable lookup result for a keyed tool execution.
| Name | Type | Required | Description |
|---|---|---|---|
executionRecovery | ExecutionRecovery | Yes | Recovery state and the key that owns the execution. |
toolId | string | Yes | Provider tool associated with the execution. |
requestId | string | No | Original server-owned billing request ID, allocated before provider dispatch. |
responseStatus | number | No | HTTP status saved with the original response, when it was terminal. |
response | unknown | No | Saved execution response, when one is available for replay. |
StartPlayRunRequest
Request body for starting a play run via DeeplineClient.startPlayRun.
Internal/advanced request shape for low-level submission primitives.
Most callers should prefer deepline plays run, DeeplineClient.runPlay,
or Deepline.connect.
Either name (for live plays) or artifactStorageKey (for packaged ad hoc runs) is required.
| Name | Type | Required | Description |
|---|---|---|---|
admissionOrgId | string | No | Tenant pin supplied by admission capability discovery. recovery must preserve it. |
workflowId | string | No | Caller-owned canonical run ID. Reuse it to reconcile or replay an ambiguous start. |
name | string | No | Play name for registered revisions. |
revisionId | string | No | Explicit revision ID when the caller wants a specific saved version. |
artifactStorageKey | string | No | R2 artifact key for ad hoc artifact-backed runs. |
sourceCode | string | No | Source snapshot already validated while registering this artifact. |
sourceFiles | Record<string, string> | No | Source graph snapshots for local helper files included in cloud preflight. |
description | string | No | Human-readable one-line description for the revision created by file-backed runs. |
staticPipeline | unknown | No | Static pipeline already produced while registering this artifact. |
artifactHash | string | No | Artifact content hash already validated while registering this artifact. |
graphHash | string | No | Static graph hash already validated while registering this artifact. |
runtimeArtifact | Record<string, unknown> | No | Optional preloaded artifact snapshot for immediate ad hoc execution. |
compilerManifest | PlayCompilerManifest | No | Compiler manifest for ad hoc graph runs, including imported play dependencies. |
inputFileUpload | unknown | No | Primary input file bytes for one-shot server-side staging. |
packagedFileUploads | unknown[] | No | Packaged file bytes for one-shot server-side staging. |
input | Record<string, unknown> | No | Runtime input passed to the play function as its second argument. |
inputFile | unknown | No | Staged file reference for the primary input file (e.g. CSV). |
packagedFiles | unknown[] | No | Additional staged file references (dependencies, data files). |
force | boolean | No | Compatibility flag. active sibling runs are allowed. |
forceToolRefresh | boolean | No | Explicit cache-bypass flag for durable dataset and tool-call reuse. |
maxConcurrentExternalCalls | number | No | Per-run ceiling for concurrently resident provider-tool executions and direct ctx.fetch calls. The server validates the supported range. |
maxConcurrentRows | number | No | Run-wide default and ceiling for live dataset-map row resolvers. |
maxCredits | number | No | Deepline-credit cap for this run only, enforced by the runtime. It replaces the play’s declared billing.maxCreditsPerRun, lower or higher. |
waitForCompletionMsterminalStatus | number'full' | No No | Optionally let the start request wait briefly and return a terminal result. Request full terminal status within an optional start completion wait. |
profile | string | No | Per-run execution profile override. The server defaults to absurd. The Only absurd is accepted. most callers should leave this unset. |
integrationMode | 'live' | 'eval_stub' | 'fixture' | No | Optional per-run provider execution mode for eval/smoke runs. |
fixtureBehavior | FixtureBehavior | No | Fixture-only provider response timing and outcome simulation. |
runtime | PlayRuntimeSelection | No | Internal runtime estate selection. The app host remains unchanged. |
testPolicyOverrides | Record<string, unknown> | No | Internal/dev-only runtime policy overrides for black-box durability tests. |
PlayRunStart
Response from starting a play run.
Internal/advanced payload returned by low-level play submission primitives.
Most callers should prefer deepline plays run, DeeplineClient.runPlay,
or PlayJob.get.
| Name | Type | Required | Description |
|---|---|---|---|
workflowId | string | Yes | Public Deepline play-run id for tracking this execution. |
apiVersion | number | No | Public Deepline play-run API version. |
name | string | No | Play name (echoed back from the request). |
status | string | No | Initial status (typically 'RUNNING'). |
runtimeBackend | string | No | Resolved runtime backend used for this run. |
contract | Record<string, unknown> | null | No | Canonical run contract compatibility metadata. |
dashboardUrl | string | No | Dashboard URL for the named play. |
finalStatusfinalStatusView | unknown'full' | No No | Terminal status returned when the start request used a short completion wait. Explicit full representation assembled by the canonical status reader. |
package | PlayRunPackage | No | Canonical compact run package returned by current SDK/API responses. |
PlayStatus
Current status of a play execution, returned by DeeplineClient.getPlayStatus.
Poll this until status reaches a terminal state:
'completed' | 'failed' | 'cancelled'.
| Name | Type | Required | Description |
|---|---|---|---|
runId | string | Yes | Public play-run identifier. |
overview | RunLifecycleStatus | No | Legacy status evidence returned by older servers. |
runStatus | RunGetStatus | No | Additive bounded evidence when returned by the current server. |
apiVersion | number | No | Public Deepline play-run API version. |
name | string | No | Saved play name for this run, when available. |
revisionId | string | No | Exact saved revision launched for this run, when applicable. |
playName | string | No | Alias for name used by run/result APIs. |
dashboardUrl | string | No | Dashboard URL for inspecting the play and its run output in the app. |
status | | 'queued' | 'running' | 'waiting' | 'completed' | 'failed' | 'cancelled' | Yes | Product-level play-run state. |
outcome | PlayRunOutcome | No | How this run was admitted or recovered, when the server can prove it. |
recovery | { mode: 'replayed' | 'forced' | 'recovered' | 'joined'; sourceRunId?: string; } | No | |
progress | PlayProgressStatus | No | Execution progress with logs and error details. |
result | unknown | No | Partial or final result. Available once the play returns. |
rowOutcomes | { completedRows: number; failedRows: number; totalRows: number; hasRowFailures: boolean; supersededRows?: number; } | No | Terminal row outcome truth. A completed run may still contain failed rows when row-level failure isolation persisted those rows for retry. |
package | PlayRunPackage | No | Compact typed run package returned by current run status endpoints. |
outputs | PlayRunPackage['outputs'] | No | Compact typed output summaries, mirrored from the run package when present. |
run | { id?: string; startTime?: string | null; closeTime?: string | null; [key: string]: unknown; } | null | No | Scheduler-backed run metadata when returned by the status endpoint. |
resultView | unknown | No | Server-rendered result view metadata for CLI/UI summaries. |
contract | Record<string, unknown> | null | No | Canonical run contract snapshot metadata, when available. |
wait | { kind: 'integration_event' | 'sleep'; boundaryId?: string; eventKey?: string; until?: number; } | null | No | If the run is blocked on a durable boundary, expose the public wait state. |
next | PlayRunPackage['next'] | Record<string, unknown> | No | Structured follow-up actions for inspect/query/export. |
failedLogs | { runId: string; totalCount: number; returnedCount: number; firstSequence: number | null; lastSequence: number | null; truncated: boolean; hasMore: boolean; entries: string[]; view?: 'failed'; association?: 'terminal_failure_window' | 'retained_before_truncation'; warning?: string; next?: { logs: string }; logsTruncated?: boolean; } | No | Bounded terminal-failure log window requested by runs.get. |
rerunCommand | string | No | Exact ordinary plays run command that can rerun a failed execution. |
billing | RunBillingSummary | No | Projected settled-charge billing for the run. Returned by runs.get.totalCredits/providerEvents describe THIS run only. rollup (presentwith --full) carries the true subtree cost including independentlyexecuting ctx.runPlayAsync descendants. Deepline credits only — provider spend is never exposed. |
billingTotalCreditsRollup | number | No | True subtree cost in Deepline credits (this run + every descendant run), mirrored to the top level for convenience. Present only with --full. |
billingChildCredits | number | No | Deepline credits attributable to descendant runs only. Present with --full. |
billingRollupIncomplete | boolean | No | True when the child-run billing rollup could not be fully resolved. |
childRuns | ChildRunSummary[] | No | Durable summaries of ctx.runPlayAsync children, returned by runs.get --full. |
childRunProjection | AsyncChildRunProjection | No | Child Runs grouped by the authored ctx.runPlayAsync launch key. completeis false when the bounded response is a lower bound rather than the full direct-child set. Use each opaque runId to retrieve a child Run. |
PlayRunPackage
Compact canonical run package for SDK/CLI consumers: stable metadata,
output handles and follow-up actions without dashboard internals.
| Name | Type | Required | Description |
|---|---|---|---|
schemaVersion | 1 | Yes | Package schema version. |
kind | 'play_run' | Yes | Package discriminator. |
result | unknown | No | Retained return structure with dataset references, not flattened output previews. |
resultState | | 'available' | 'available_in_full' | 'not_returned' | 'unavailable' | No | Full-only values are omitted as a whole, never replaced with partial authored data. |
source | { ledgerNextSeq: number | null } | No | Ledger position of the detailed snapshot, when provided by this server. |
overview | RunLifecycleStatus | No | Legacy status evidence returned by older servers. |
runStatus | RunGetStatus | No | Optional bounded live evidence from the existing run status projection. |
rowOutcomes | PlayStatus['rowOutcomes'] | No | Terminal scalar row outcomes shared with full status and watch snapshots. |
run | { id: string; revisionId?: string; playName: string; requestedBy?: { name: string }; status: string; dashboardUrl?: string; acceptedAt?: number | null; updatedAt?: number | null; startedAt?: number | null; finishedAt?: number | null; durationMs?: number | null; outcome?: PlayRunOutcome; recovery?: { mode: 'replayed' | 'forced' | 'recovered' | 'joined'; sourceRunId?: string; }; error?: string; activity?: PlayRunActivityProjection | null; } | Yes | Run identity, status, timing, and dashboard metadata. |
warnings | string[] | No | Bounded customer-safe warnings about output projection or availability. |
stepsstepsExpected | Array<Record<string, unknown>>boolean | Yes No | Step-level summaries emitted by the runtime. Whether the admitted graph or observed ledger expects public steps. |
outputs | Record<string, Record<string, unknown>> | Yes | Named output summaries, including dataset handles and scalar outputs. |
datasets | Array<{ kind: 'dataset'; datasetId?: string; path: string; aliases?: string[]; tableNamespace?: string; rowCount?: number; lifecycle?: { phase: 'registered' | 'available' | 'failed'; complete: boolean; persistedRowsAtLeast: number; succeededRowsAtLeast: number; failedRowsAtLeast: number; }; sqlTableName?: string; sqlQualifiedTableName?: string; recovered?: true; exportUnavailable?: { reason: 'empty_dataset' | 'shared_table_namespace' | 'ambiguous_selector' | 'returned_dataset_not_persisted'; message: string; }; preview?: Record<string, unknown>; actions?: PlayRunDatasetActions; }> | No | Every durable Dataset Handle explicitly registered by this run. |
logs | { tail: string[]; totalCount: number; returnedCount: number; truncated?: boolean; } | No | Small retained tail of customer and runtime logs. fetch the full stream through runs.logs. |
next | { inspect?: PlayRunActionPackage; full?: PlayRunActionPackage; billing?: PlayRunActionPackage; export?: PlayRunActionPackage; query?: PlayRunActionPackage; logs?: PlayRunActionPackage; } | No | Follow-up actions a caller can perform against the run. |
PlayRunListItem
Summary of a single play run, returned by DeeplineClient.listPlayRuns.
| Name | Type | Required | Description |
|---|---|---|---|
workflowId | string | Yes | Public Deepline play-run id. |
playName | string | null | No | Saved play name for this run, when available. |
runId | string | Yes | Backend run attempt id, when exposed. |
parentRunId | string | null | No | Parent play-run id when this run was launched through ctx.runPlay. |
rootRunId | string | null | No | Root play-run id for nested ctx.runPlay descendants. |
type | string | Yes | Workflow type (typically 'Workflow'). |
status | string | Yes | Human-readable status (e.g. 'Completed', 'Failed'). |
startTime | string | null | No | ISO 8601 timestamp when the run started. |
startedAt | number | string | null | No | Unix epoch milliseconds when the run started, returned by normalized V2 run summaries. |
createdAt | number | string | null | No | Unix epoch milliseconds when the run was created. |
closeTime | string | null | No | ISO 8601 timestamp when the run finished. |
finishedAt | number | string | null | No | Unix epoch milliseconds when the run finished, returned by normalized V2 run summaries. |
executionTime | string | null | Yes | Duration string (e.g. '2.5s'). |
billingTotalCredits | number | No | Total Deepline credits charged for the run, when available. |
billingMaxCreditsPerRun | number | null | No | Configured per-run Deepline credit cap, when available. |
nodeObservation | { attempt: number; status: 'completed' | 'failed'; inputs: Record<string, unknown> | null; outputs: Record<string, unknown> | null; error: string | null; inputsTruncated: boolean; outputsTruncated: boolean; } | null | No | Latest settled Mermaid-node invocation when runs.list is filtered by node. |
memo | { orgId: string; playName: string; userId: string | null; } | Yes | Metadata attached to the workflow. |
StopPlayRunResult
Result returned by DeeplineClient.stopPlay.
| Name | Type | Required | Description |
|---|---|---|---|
runId | string | Yes | Public play-run identifier the stop request targeted. |
state | 'stopped' | 'cancelling' | 'failed' | No | Typed stop outcome: stopped (terminal), cancelling (cancellationdurably queued. cleanup and the final run update are pending, not an error), or failed (the stop was not confirmed). Absent on older servers. |
stopped | boolean | Yes | Whether the server confirmed the run was stopped. |
cancelling | boolean | No | True when the durable cancellation lane accepted the request and is draining. |
hitlCancelledCount | number | Yes | Number of run-scoped HITL waits cancelled by the stop request. |
hitlCancellationPending | boolean | No | True if HITL state or its same-message Slack card still needs retrying. |
staleSchedulerState | boolean | No | True only when the scheduler and the canonical run ledger disagree and the server could not confirm the stop. For example, the scheduler can report a terminal run while the ledger projection is pending. This field is never true for a queued cancellation. |
error | string | No | Server-side error detail when the stop failed (state: 'failed'). |
RunsNamespace
Use client.runs to watch, stop, query logs/events, and export durable dataset rows.
| Name | Type | Required | Description |
|---|---|---|---|
getReceipts | ( runId: string, options: { keys: string[] }, ) => Promise<import('./runs/receipts').RunToolReceiptsResponse> | Yes | Read retained tool results in supplied key order. Use keys returned in exported evidence or execution metadata. search does not expose receipt keys. Never executes tools. |
get | (runId: string, options?: RunsGetOptions) => Promise<PlayStatus> | Yes | Get current run status by public run id. |
children | ( parentRunId: string, options: RunsChildrenOptions, ) => Promise<RunChildrenPage> | Yes | Read one bounded page of direct children for an async launch. |
input | (runId: string) => Promise<{ runId: string; input: Record<string, unknown> | unknown[]; bytes: number; sha256: string | null; replayedFromRunId: string | null; }> | Yes | Explicitly read the retained original input (may include customer data). |
rerun | (runId: string, options?: RerunOptions) => Promise<RerunPlayRunResult> | Yes | Start a fresh run from a prior run’s retained input and pinned revision. |
list | (options: RunsListOptions) => Promise<PlayRunListItem[]> | Yes | List runs for one play, optionally filtered by status. |
listPage | (options: RunsListOptions) => Promise<RunsListPage> | Yes | Read one run page with total, offset, limit and completeness metadata. |
history | (options?: RunsHistoryOptions) => Promise<RunsHistoryPage> | Yes | Search/page workspace run history newest first. follow empty continuing pages. |
watch | (runId: string, options?: RunsWatchOptions) => Promise<PlayStatus> | Yes | Poll run snapshots every two seconds until terminal status. |
logs | RunsLogsNamespace | Yes | Call for the retained text tail, full stream (all) or terminal failure window (failed). Use logs.query/count/summarize/fields for structured filters and exact aggregates. See run logs and events. |
events | RunsEventsNamespace | Yes | Use events.list/count/summarize/fields for lifecycle, receipt and organization-wide events. See run logs and events. |
searchEvents | ( options?: RunsEventSearchOptions, ) => Promise<RunsEventSearchResult> | Yes | Search existing events across the active organization. default last hour, up to 200 events per page (ten with payloads). See run logs and events for the catalog, query fields and response types. |
exportDatasetRows | (input: { playName: string; tableNamespace: string; runId?: string; limit?: number; offset?: number; rowMode?: 'output' | 'all' | 'live'; signal?: AbortSignal; }) => Promise<PlaySheetRowsResult> | Yes | Export persisted rows for a runtime-sheet dataset/table namespace. |
rowHistory | ( input: PlayRunRowHistoryOptions, ) => Promise<RuntimeSheetRunRowMembershipPage> | Yes | One immutable history page. incomplete legacy coverage stays explicit. |
stop | ( runId: string, options?: { reason?: string }, ) => Promise<StopPlayRunResult> | Yes | Stop a running/waiting run. |
stopAll | { ( options: StopAllRunsOptions & { dryRun: true }, ): Promise<StopAllPlayRunsDryRunResult>; ( options?: StopAllRunsOptions & { dryRun?: false }, ): Promise<StopAllPlayRunsStopResult>; (options?: StopAllRunsOptions): Promise<StopAllPlayRunsResult>; } | Yes | Stop active runs across the current workspace, or with dryRun: trueenumerate the exact candidates without cancelling anything. |
CustomerDbQueryResult
Result returned by DeeplineClient.db.query.
Rows are intentionally untyped because the schema depends on the caller’s SQL
query and selected customer tables.
| Name | Type | Required | Description |
|---|---|---|---|
operation | { operation_key: string; completed_at_ms: number; source: 'executed' | 'operation_recovery'; } | No | Present for explicitly keyed SQL. recovery keeps the original completion time. |
scope | { kind: 'database'; mutability: 'current' } | No | This query reads the current mutable customer database, not one run snapshot. |
command | string | Yes | Database command executed by the query endpoint. |
row_count | number | null | Yes | Total affected row count when reported by the database. |
row_count_returned | number | Yes | Number of rows included in this response. |
truncated | boolean | Yes | Whether server-side row limits truncated the result. |
columns | CustomerDbColumn[] | Yes | Column metadata for the returned rows. |
rows | unknown[] | Yes | Result rows. |