Skip to main content
GET
/
{projectId}
/
context
Get failure context
curl --request GET \
  --url https://api.testdino.com/api/public/v1/{projectId}/context \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": {
    "level": "run",
    "runId": "test_run_abc123",
    "runStatus": "completed",
    "suites": [
      {
        "suiteId": "test_suite_abc123",
        "spec": "tests/checkout.spec.ts",
        "status": "failed",
        "durationMs": 18432,
        "groupId": null
      }
    ],
    "list": [
      {
        "caseId": "test_case_abc123",
        "title": [
          "Checkout",
          "applies discount"
        ],
        "status": "failed",
        "attempt": 1,
        "totalAttempts": 2,
        "duration": 3210,
        "error": {
          "message": "Expected element to be visible",
          "stack": "Error: ...",
          "location": {
            "file": "tests/checkout.spec.ts",
            "line": 42,
            "column": 5
          },
          "snippet": "await expect(page.locator('#submit')).toBeVisible();"
        },
        "suiteId": "test_suite_abc123",
        "spec": "tests/checkout.spec.ts",
        "groupId": "0",
        "alsoFailedIn": [
          {
            "caseId": "test_case_def456",
            "suiteId": "test_suite_def456",
            "groupId": "1",
            "title": [
              "Checkout",
              "applies discount"
            ]
          }
        ]
      }
    ],
    "count": 10,
    "total": 27,
    "nextPage": 2,
    "meta": {
      "projectId": "project_abc123",
      "runId": "test_run_abc123"
    },
    "environment": {
      "framework": {
        "type": "playwright",
        "version": "1.48.0"
      },
      "platform": {
        "osName": "Linux",
        "osVersion": null,
        "browserName": null,
        "browserVersion": null
      },
      "project": "/path/to/project"
    }
  }
}

Authorizations

Authorization
string
header
required

Project PAT (tdp_) token with public-api scope

Path Parameters

projectId
string
required

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

Query Parameters

runId
string

TestRun ID (e.g. test_run_abc123). Selects run level when sent alone. Optional when suiteId or caseId is present.

suiteId
string

TestSuite ID (e.g. test_suite_abc123). Selects suite level. Sufficient on its own — runId is resolved server-side.

caseId
string

TestCase ID (e.g. test_case_abc123). Selects test level. Sufficient on its own — suiteId and runId are resolved server-side.

attempt
integer

Zero-indexed attempt number. Test level only. Defaults to the latest attempt; returns INVALID_ATTEMPT if out of range.

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

Response format. json (default) returns the standard envelope. md returns a plain text/markdown body — useful for LLM prompts.

Available options:
json,
md
detail
enum<string>
default:default

Payload density. summary drops steps[]. compact also drops stdout/stderr and caps each assets.* array at 5 entries (a totals object is included).

Available options:
default,
compact,
summary
page
integer
default:1

1-indexed page number. Applies to run and suite levels only.

Required range: x >= 1
limit
integer
default:10

Items per page (1–50, default 10). Applies to run and suite levels only.

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

Truncate the markdown output to N characters (1–50000). Only meaningful with format=md.

Required range: 1 <= x <= 50000

Response

Failure context at the resolved level

success
boolean
data
object

Returned when only runId is supplied.