---
title: Print a report
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Report Schedules
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Print a report{% #print-a-report %}
Copy pageCopied
{% tab title="v2" %}

| Datadog site      | API endpoint                                              |
| ----------------- | --------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/reporting/print |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/reporting/print |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/reporting/print      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/reporting/print      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/reporting/print  |
| uk1.datadoghq.com | POST https://api.uk1.datadoghq.com/api/v2/reporting/print |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/reporting/print     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/reporting/print |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/reporting/print |

### Overview

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 Data (required)



{% tab title="Model" %}

| Parent field       | Field                                | Type     | Description                                                                                                                                                            |
| ------------------ | ------------------------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                    | data [*required*]               | object   | The JSON:API data object for a print report request.                                                                                                                   |
| data               | attributes [*required*]         | object   | 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). |
| attributes         | from_ts                              | int64    | The start of an absolute time range, as a Unix timestamp in milliseconds. Required when `timeframe` is omitted.                                                        |
| attributes         | resource_id [*required*]        | string   | The identifier of the dashboard or integration dashboard to render.                                                                                                    |
| attributes         | resource_type [*required*]      | enum     | The type of dashboard resource the report schedule targets. Allowed enum values: `dashboard,integration_dashboard`                                                     |
| attributes         | template_variables [*required*] | [object] | The dashboard template variables applied when rendering the report.                                                                                                    |
| template_variables | name [*required*]               | string   | The name of the template variable.                                                                                                                                     |
| template_variables | values [*required*]             | [string] | The selected values for the template variable.                                                                                                                         |
| attributes         | timeframe                            | string   | A relative time window (for example `1w` or `calendar_month`). Mutually exclusive with `from_ts` and `to_ts`.                                                          |
| attributes         | timezone [*required*]           | string   | The IANA time zone identifier used to evaluate the time window.                                                                                                        |
| attributes         | to_ts                                | int64    | The end of an absolute time range, as a Unix timestamp in milliseconds. Required when `timeframe` is omitted.                                                          |
| data               | type [*required*]               | enum     | JSON:API resource type for a print-only report. Allowed enum values: `report`                                                                                          |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "from_ts": 1780318800000,
      "resource_id": "abc-def-ghi",
      "resource_type": "dashboard",
      "template_variables": [
        {
          "name": "env",
          "values": [
            "prod"
          ]
        }
      ],
      "timeframe": "1w",
      "timezone": "America/New_York",
      "to_ts": 1780923600000
    },
    "type": "report"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing the initiated print-only report.

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

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "download_url": "https://app.datadoghq.com/...",
      "from_ts": 1780318800000,
      "resource_id": "abc-def-ghi",
      "resource_type": "dashboard",
      "template_variables": [
        {
          "name": "env",
          "values": [
            "prod"
          ]
        }
      ],
      "timeframe": "1w",
      "timezone": "America/New_York",
      "to_ts": 1780923600000
    },
    "id": "11111111-2222-3333-4444-555555555555",
    "type": "report"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="422" %}
Unprocessable Entity
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
 \# Curl command curl -X POST "https://api.datadoghq.com/api/v2/reporting/print" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "resource_id": "abc-def-ghi",
      "resource_type": "dashboard",
      "template_variables": [
        {
          "name": "env",
          "values": [
            "prod"
          ]
        }
      ],
      "timeframe": "1w",
      "timezone": "America/New_York"
    },
    "type": "report"
  }
}
EOF 
                
{% /tab %}
