Skip to main content
GET
/
{projectId}
/
reports
/
pdf
Generate PDF report
curl --request GET \
  --url https://api.testdino.com/api/public/v1/{projectId}/reports/pdf \
  --header 'Authorization: Bearer <token>'
"<string>"
Strict rate limit — 1 request per minute per tokenPDF generation is resource-intensive and is rate-limited separately from other endpoints. Calling it more than once per minute returns 429 with a Retry-After header.

Response format

Unlike every other endpoint, this returns binary content:
HeaderValue
Content-Typeapplication/pdf
Content-Dispositionattachment; filename="TestDino-Report-<project>-<days>d-<date>.pdf"
Save the response body directly to a file rather than parsing it as JSON.
curl "$BASE/${PROJECT_ID}/reports/pdf?days=7" \
  -H "Authorization: Bearer $TESTDINO_API_TOKEN" \
  -OJ
-OJ writes the response to the filename from Content-Disposition.

Handling the rate limit

On 429, the response includes a Retry-After header (in seconds). A simple backoff:
async function downloadWithRetry(url, attempts = 3) {
  for (let i = 0; i < attempts; i++) {
    const res = await fetch(url, { headers: { Authorization: `Bearer ${TOKEN}` } });
    if (res.ok) return Buffer.from(await res.arrayBuffer());
    if (res.status !== 429) throw new Error(`PDF failed: ${res.status}`);
    const retry = Number(res.headers.get("Retry-After") ?? 60);
    await new Promise(r => setTimeout(r, retry * 1000));
  }
  throw new Error("PDF generation exhausted retries");
}
If you need scheduled PDF reports, use TestDino’s built-in Automated Reports instead of polling this endpoint — they run on a cron with no rate-limit concern.

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

days
integer
default:7

Lookback period in days (1–30, default 7). Determines how far back the report covers.

Required range: 1 <= x <= 30
branch
string

Filter report data to a specific git branch.

environment
string

Filter results by environment name (e.g. production, staging). Use the /filters endpoint to discover available environments.

tags
string

Comma-separated run tags to filter report data (e.g. smoke,regression).

Response

PDF binary stream

The response is of type file.