Get diagnostic evidence for a grouped test execution
const url = 'https://testperch.com/api/public/v1/projects/example/test-runs/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://testperch.com/api/public/v1/projects/example/test-runs/example \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”ID of a project visible to the authenticated credential.
ID of a project visible to the authenticated credential.
Per-run test ID returned as the grouped execution id.
Per-run test ID returned as the grouped execution id.
Responses
Section titled “Responses”Diagnostic evidence for every attempt of one grouped test execution, fitted toward 256 KiB with a 1 MiB hard response ceiling.
Grouped execution with evidence for every attempt, fitted toward 256 KiB with a 1 MiB hard ceiling. Attempt entries, focus steps, and retrieval links are retained.
object
Run-level diagnostic retention state. Expired diagnostics are not evidence that the run reported no logs, steps, or attachments.
object
Per-run test ID (run_test_id), grouping all attempts of one test in one run and Playwright project.
Actual terminal status, with flaky for an execution that recovered from an unexpected attempt to an expected result and ended successfully. Passed excludes flaky; failed filtering uses the raw status and includes expected failures, including recovered expected failures.
Expected status stored for this test in the containing run. Compare with actual status: failed/failed met expectations; passed/failed did not.
Whether the stored execution result is unexpected: includes unexpected passes, failures, timeouts, interruptions, and unreported results. Running, skipped, expected failures, and executions recovered to an expected result are false. Unreported means missing evidence, not a confirmed assertion failure. Does not inspect attempt history.
Number of recorded attempts, including the initial attempt; matches attempts.data.length.
Maximum number of retries configured for this test in the run; 0 means no retries.
Stored per-run test start time, normalized to UTC.
Stored per-run test finish time in UTC, or null while unfinished or unreported.
Stored per-run test duration in milliseconds, or null when unavailable; not recomputed from attempts.
Playwright project recorded for this execution, or null.
Browser URL for this test within its run; may require a TestPerch user session.
Execution-wide context for the reporter run that contains the test execution.
object
Source-control branch reported for the run, or null.
CI provider’s build identifier, or null when not reported.
CI provider name reported for the run, or null.
Reported duration of the entire run in milliseconds, or null when unavailable.
Project environment matched to the run, or null when none was assigned.
object
Display label of the matched environment.
Configured name of the matched environment.
Configured environment matching type.
RFC 3339 timestamp reported when the entire run finished, normalized to UTC; null while unfinished or unreported.
Source-control commit SHA reported for the run, or null.
Reporter-run ID. The run is the execution container for many per-run tests, attempts, and shards.
Whether the reporter marked this run as partial, meaning the run may intentionally omit tests or shards.
Pull-request context reported for the run, or null.
object
Head commit SHA reported for the pull request, or null.
Pull-request number reported for the run.
Pull-request target branch, or null when not reported.
Source repository URL reported for the run, or null.
RFC 3339 timestamp reported when the entire run started, normalized to UTC.
Current or terminal aggregate outcome of the entire run, not the test execution; running is unfinished and unreported means no terminal result was reported.
Stable test identity, latest observed title and file, and current health metadata. Shared by /tests and embedded test definitions.
object
Current unresolved issue types for the test, or null when none are active. Does not determine an execution’s status.
Creation time of the active quarantine, or null when no quarantine is active. Branch allowances do not change this value.
object
object
Individual attempt ID, used as attempt_id in evidence URLs.
Zero-based attempt number; the initial attempt is 0.
Expected status for this attempt. A failed attempt is successful when failed was expected; a passed attempt is unexpected when failure was expected.
ANSI-cleaned errors reported for this attempt.
object
object
Up to 100 attachments ordered by sequence then ID, retaining the error-context attachment when present.
Artifact attached to the test execution.
object
Exact artifact payload length in bytes, encoded as a decimal string so values larger than JavaScript’s safe integer remain lossless.
Reporter-supplied SHA-256 checksum of the artifact payload, preserved verbatim; null when none was reported.
Attachment event ID for this test attempt; distinct from run, test, per-run test, and attempt IDs.
Reported media type of the artifact payload.
Reporter-provided attachment name.
RFC 3339 timestamp of the attachment event as reported, normalized to UTC.
Reporter event sequence used to order attachments within the containing run.
Path-signed direct artifact download URL. It does not require X-API-Key; possession grants access to that artifact, so treat the full URL as sensitive.
True when additional attachments were omitted by the per-attempt attachment limit.
Inline, ANSI-cleaned view of the attempt’s error-context attachment and its fetch state.
object
ID of the attempt’s attachment named error-context, or null when no such attachment exists.
Available means text was fetched; missing means no error-context attachment was reported; unavailable means an attachment exists but could not be fetched.
UTF-8 error-context text with ANSI escape sequences removed, or null unless status is available.
True when inline text was shortened by its read limit or the overall diagnostic response budget; url still addresses the complete artifact.
Path-signed direct URL for the complete error-context artifact, or null when missing. It does not require X-API-Key; possession grants artifact access, so treat it as sensitive.
Bounded decoded and ANSI-cleaned logs for the attempt, plus a link to the raw paginated API.
object
Chronological bounded tail of decoded diagnostic output for the attempt. Older chunks can be omitted when truncated is true.
One decoded, ANSI-cleaned diagnostic output chunk; use raw_url when original bytes and encoding are required.
object
UTF-8 diagnostic text with ANSI escape sequences removed. Base64 raw chunks are decoded; malformed base64 is replaced with an explanatory placeholder.
ID of the attempt that owns this output chunk.
Decoded means chunk contains decoded, ANSI-cleaned text; malformed_base64 means invalid raw base64 was replaced by a placeholder.
Reporter output-event ID; distinct from the owning attempt ID.
RFC 3339 timestamp of the output event as reported, normalized to UTC.
Reporter event sequence used with id to order output within the containing run.
Output stream that produced this chunk: stdout or stderr.
Public API URL for paginating original stdout/stderr chunks with their raw encoding; null after diagnostic removal starts. Send an X-API-Key authorized for the same project.
Available means inline log storage was read successfully, even when data is empty; unavailable means authoritative storage could not be read and data is empty; expired means the workspace retention policy removed access to diagnostics.
True when older inline chunks were omitted by the diagnostic log limit or overall response budget; retrieve the complete paginated representation from raw_url.
Curated, potentially non-contiguous step evidence centered on a deterministic focus selection.
object
ID of the selected diagnostic focus node. Normally this is the earliest completed errored step, preferring the deepest step on a timestamp tie; for timeouts or no completed error it is the latest-started step. Null means no focus step is available, including after diagnostic expiration.
Public API URL for the complete chronological paginated step list; null after diagnostic removal starts. Send an X-API-Key authorized for the same project.
Curated chronological diagnostic subset containing the focus step, its title-path ancestors, nearby preceding context, and up to 25 following steps. The subset can be non-contiguous; use full_url for every step.
One Playwright step belonging to a single test attempt, ordered by started_at and then id.
object
Playwright step category as reported, or null when absent.
Reporter-provided nesting depth; 0 denotes a top-level step.
Reported step duration in milliseconds, or null when the step has not finished.
ANSI-cleaned step error message, or null when no step error was reported.
RFC 3339 reporter timestamp for step completion, normalized to UTC; null when no finish was reported.
Step ID within this test attempt. It is also the value referenced by steps.focus_step_id.
Playwright-reported source location for the step, not a parsed stack-frame location; null when no file was reported.
object
Source column reported by Playwright, preserving Playwright’s coordinate semantics; null when omitted.
Reporter-provided source-file path for the step, which may be relative to the test workspace.
Source line reported by Playwright, preserving Playwright’s coordinate semantics; null when omitted.
RFC 3339 reporter timestamp for step start, normalized to UTC.
ID of the individual test attempt that owns this step; it matches the attempt_id path parameter.
Reporter-provided display title for the step.
Reporter-provided hierarchical title segments from the outermost group through this step.
Total number of steps reported for the attempt before curation.
True when data omits any reported step because of diagnostic curation or response-size fitting; data is not guaranteed to be one contiguous range.
Example
{ "diagnostics": { "status": "available" }, "status": "running", "expected_status": "passed", "run": { "status": "running" }, "attempts": { "data": [ { "status": "running", "expected_status": "passed", "error_context": { "status": "available" }, "logs": { "data": [ { "decode_status": "decoded", "stream": "stdout" } ], "status": "available" } } ] }}Invalid parameters, query, or cursor.
object
object
object
Example
{ "error": { "code": "invalid_request" }}Missing or invalid OAuth bearer token or API key.
object
object
object
Example
{ "error": { "code": "invalid_request" }}The project workspace does not have product access.
object
object
object
Example
{ "error": { "code": "invalid_request" }}The credential lacks the required permission; configuration writes require a Read + write project key.
object
object
object
Example
{ "error": { "code": "invalid_request" }}The resource does not exist, belongs to a different project, or the attempt does not belong to the requested group.
object
object
object
Example
{ "error": { "code": "invalid_request" }}Configuration conflicts with an existing resource or integration requirements.
object
object
object
Example
{ "error": { "code": "invalid_request" }}Credential or workspace rate limit exceeded.
object
object
object
Example
{ "error": { "code": "invalid_request" }}Headers
Section titled “Headers”Seconds before retrying.
Seconds before retrying.
Internal server error.
object
object
object
Example
{ "error": { "code": "invalid_request" }}