Skip to main content
GET
Generate and download a project report PDF
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.
The endpoint returns the same PDF as a Quality trends report built in the app, with every default section, over the filters you pass. It is a preview: nothing is saved or sent, and the PDF has no cover page or table of contents. The first page reads Preview with this project's data as of <time>. Not saved. under the title.

Response format

Unlike every other endpoint, this returns binary content: Save the response body directly to a file rather than parsing it as JSON.
-OJ writes the response to the filename from Content-Disposition.

Errors

Errors return JSON, not a PDF. The code sits in 1 of 2 places: in error.code ({"success": false, "error": {"code": "...", "message": "..."}}), or in error as a string ({"success": false, "error": "...", "message": "..."}). The Code in column says which. A client that reads the code should check both places: typeof body.error === "string" ? body.error : body.error?.code.

Handling the rate limit

On 429, the response includes a Retry-After header (in seconds). A simple backoff:
For PDFs on a schedule, create a scheduled Quality trends report in Reports instead of polling this endpoint. It sends the PDF by email and Slack with no rate limit.

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

days
integer
default:7

Lookback period in days (1–30, default 7). Values outside 1 to 30 are clamped to the nearest limit, and a value that is not a number uses 7.

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.

Last modified on November 18, 2026