Skip to main content
GET
Get a debug bundle for a run, suite, or test case
This endpoint returns a debug bundle for a run, suite, or test case.
WarningThis endpoint replaces GET /{projectId}/context, which now returns 404. The old query parameters format, detail, and maxLength return 400 VALIDATION_ERROR instead of being ignored. Update clients to the names below.

Quick Reference

Pick the scope

At least 1 of runId, suiteId, or caseId is required.
If multiple IDs are passed, the most-specific scope wins.

Parent ID rules

  • suiteId requires runId. The API returns 400 if suiteId is passed without runId.
  • caseId can be sent without runId. The service resolves the latest run for that case and returns it in data.meta.runId.

Response formats and view modes

Parameters that do not apply are rejected

A parameter that cannot take effect at the resolved scope returns 400 VALIDATION_ERROR rather than being ignored:
  • view other than full at run scope.
  • attempt without caseId.
  • page or limit with a non-default value at test scope.
  • budgetChars without as=markdown.
  • Any parameter sent more than once.
Sending a default value (view=full, page=1, limit=10) is accepted at every scope.

Response fields by scope

failureWindow contains the before, failed, and after steps around the failure. Each attemptHistory entry carries its own 0-based attempt index, so you can request that attempt directly with attempt=N. Each scope includes links.uiUrl and links.retryCommand.
Test-scope responses also include links.traceViewerUrl, or null when trace data is unavailable.

Authorizations

Authorization
string
header
required

User PAT (td_pat_) scoped to the target project

Path Parameters

projectId
string
required

The project identifier (e.g. project_abc123). Must match the project associated with your PAT.

Query Parameters

runId
string

Run ID. Required for run scope and required with suiteId.

suiteId
string

Suite ID. Requires runId.

caseId
string

Test case ID. runId is optional; when omitted, the latest run is resolved and echoed in data.meta.runId.

attempt
integer

Zero-indexed attempt number. Requires caseId; sending it at run or suite scope returns 400. Defaults to the latest attempt.

Required range: x >= 0
as
enum<string>
default:json

Response format: json (default) or markdown (text/markdown body).

Available options:
json,
markdown
view
enum<string>
default:full

Payload size mode. Test scope: brief drops steps[]; headline also drops stdout and stderr and caps artifacts.* arrays at 5 with a totals field. Suite scope: brief and headline set each item's failureWindow to null. Run scope: only full is accepted; any other value returns 400.

Available options:
full,
brief,
headline
page
integer
default:1

Pagination (run and suite scopes only). A non-default value with caseId returns 400. Out-of-range or non-integer values return 400.

Required range: 1 <= x <= 1000000
limit
integer
default:10

Pagination size (run and suite scopes only), 1 to 50. A non-default value with caseId returns 400. Out-of-range or non-integer values return 400.

Required range: 1 <= x <= 50
budgetChars
integer

Truncate the Markdown response to N characters, 1 to 50000. Requires as=markdown; sending it with a JSON response returns 400.

Required range: 1 <= x <= 50000

Response

Standard envelope: { success, data }. data is discriminated by data.scope:

  • "run": { scope, runId, runStatus, suites[], items[] (each with alsoFailedIn[]), count, total, nextPage, meta, environment, links }
  • "suite": { scope, spec, suiteStatus, items[] (each with failureWindow; null under view=brief or headline), count, total, nextPage, meta, environment, links }
  • "test": { scope, spec, test, error, attemptHistory[] (each with its own 0-based attempt index; the selected attempt is excluded), traceLink, failureWindow, steps[], stdout, stderr, artifacts, meta, environment, links }

failureWindow has before, failed, and after steps.

With ?as=markdown the body is a Markdown document whose sections depend on scope: run: Failing suites, Failing tests, Actions. Suite: Failing tests (each with Error and Failure window), Actions. Test: Error, Failure window, Steps, stdout, stderr, Attempt history, Artifacts, Actions.

success
boolean
data
object

Shape varies by scope. See the response description for per-scope fields.

Last modified on September 10, 2026