---
schema_version: "1"
id: 29b19c67a222b77e96314f1dbcd31700de007b0720876db45ac15951abbb888e
title: Analytics Download
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/api_analytics/guides/reference/download/analytics-api-download-reference-download.md
canonical_url: https://developer.salesforce.com/docs/analytics/salesforce-analytics-rest-api/guide/analytics-api-download-reference-download.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: bc6d6b319a8703968313bfa71f439aded54381a12f058d75aec0f8c29ec91e1c
products:
  - Salesforce Reports and Dashboards REST API Developer Guide
  - analytics
---

# Analytics Download

Download a `.png` image of a CRM Analytics dashboard or lens, or Lightning Experience dashboard or report. Download a `.pdf` file of a CRM Analytics dashboard or lens. Request downloads via browser calls.

## Syntax

**URI:** `domain/analytics/download/assetType/assetId.downloadType`

**note:** To request a download, enter the URI in a browser address bar.

We don't support the use of this API from Apex.

**Formats:** `.png` or `.pdf`

**Parameters**

| Parameter      | Description                                                                                                                                                                |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `assetType`    | Required. Specifies what type of Analytics asset to download. Valid values are:<ul><li>`dashboard`</li><li>`lens`</li><li>`lightning-dashboard`</li><li>`report`</li></ul> |
| `assetId`      | Required. Specifies the Analytics asset id to download.                                                                                                                    |
| `downloadType` | Required. Specifies what file type to download the Analytics asset as. Valid values are:<ul><li>`png`</li><li>`pdf`</li></ul>                                              |

**note:** For Lightning Experience reports, the request works only with `png` and only if the report has a chart. If you use `pdf` or if the report doesn’t have a chart, the request returns an error.

**Query Parameters**

| Parameter     | Description                                                                                                                      |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `includeData` | Optional. Indicates whether to include that tabular widget data (`true`) or not(`false`).                                        |
| `pageId`      | Optional. Specifies the Id for a dashboard page to download.                                                                     |
| `pageSize`    | Optional. Specifies page size to download. Valid values are:<ul><li>`A3`</li><li>`A4`</li><li>`LEGAL`</li><li>`LETTER`</li></ul> |
| `savedviewId` | Optional. Specifies the Id for a dashboard saved view to download.                                                               |

**note:** For Lightning Experience reports, the request works only with `png` and only if the report has a chart. If you use `pdf` or if the report doesn’t have a chart, the request returns an error.

## Response Body

The response body is binary data of the `.png` or `.pdf` representation of the Analytics asset.

For limits on columns and pages in `.pdf` files, see [Analytics Download Limits](https://help.salesforce.com/apex/HTViewHelpDoc?id=bi_limits.htm&language=en_US#AnalyticsDownloadLimits).
