---
title: "Print a report"
method: POST
path: "/api/v2/reporting/print"
tags: ["Report Schedules"]
---

# Print a report

`POST /api/v2/reporting/print`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/reporting/print`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/reporting/print/post.ts> (a function with typed inputs; its response is checked against the schema)

Initiate a one-off, print-only report for a dashboard or integration dashboard.
The report is rendered as a PDF and made available for download through the URL returned in the response.
Requires a reporting permission appropriate to the targeted resource type.

## Request body

- PrintReportRequest: Request body for initiating a print-only report.
  - `data` PrintReportRequestData, required: The JSON:API data object for a print report request.
    - `attributes` PrintReportRequestAttributes, required: The configuration for a print-only report. Specify exactly one of `timeframe` (for a relative time window) or both `from_ts` and `to_ts` (for an absolute time range).
      - `from_ts` integer: The start of an absolute time range, as a Unix timestamp in milliseconds. Required when `timeframe` is omitted.
      - `resource_id` string, required: The identifier of the dashboard or integration dashboard to render.
      - `resource_type` 'dashboard' | 'integration_dashboard', required: The type of dashboard resource the report schedule targets.
      - `template_variables` ReportScheduleTemplateVariable[], required: The dashboard template variables applied when rendering the report.
        - `name` string, required: The name of the template variable.
        - `values` string[], required: The selected values for the template variable.
      - `timeframe` string: A relative time window (for example `1w` or `calendar_month`). Mutually exclusive with `from_ts` and `to_ts`.
      - `timezone` string, required: The IANA time zone identifier used to evaluate the time window.
      - `to_ts` integer: The end of an absolute time range, as a Unix timestamp in milliseconds. Required when `timeframe` is omitted.
    - `type` 'report', required: JSON:API resource type for a print-only report.

## Response `200`

OK

- PrintReportResponse: Response containing the initiated print-only report.
  - `data` PrintReportResponseData, required: The JSON:API data object for a print-only report.
    - `attributes` PrintReportResponseAttributes, required: The configuration and download URL for the initiated print-only report.
      - `download_url` string, required: The URL from which the rendered PDF report can be downloaded.
      - `from_ts` integer, required: The start of the rendered time range, as a Unix timestamp in milliseconds.
      - `resource_id` string, required: The identifier of the dashboard or integration dashboard.
      - `resource_type` 'dashboard' | 'integration_dashboard', required: The type of dashboard resource the report schedule targets.
      - `template_variables` ReportScheduleTemplateVariable[], required: The dashboard template variables applied when rendering the report.
        - `name` string, required: The name of the template variable.
        - `values` string[], required: The selected values for the template variable.
      - `timeframe` string: The relative time window used, if one was specified in the request.
      - `timezone` string, required: The IANA time zone identifier used when rendering the report.
      - `to_ts` integer, required: The end of the rendered time range, as a Unix timestamp in milliseconds.
    - `id` string, uuid, required: The unique identifier of the report.
    - `type` 'report', required: JSON:API resource type for a print-only report.

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Entity
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/3f70db624329?raw)
