Reports - Export To File

Exports the specified report from My workspace to the requested file format.

The API is asynchronous. When the API is called, it triggers an export job. After triggering an export job, use GetExportToFileStatus API to track the job status. Read more about the entire flow: Export Power BI reports and Export Paginated reports

Required Scope

All of the following:

  • Report.ReadWrite.All or Report.Read.All
  • Dataset.ReadWrite.All or Dataset.Read.All

Limitations

Check the limitations in Export Power BI report to file and Export paginated report to file.

POST https://api.powerbi.com/v1.0/myorg/reports/{reportId}/ExportTo

URI Parameters

Name In Required Type Description
reportId
path True
  • string
uuid

The report ID

Request Body

Name Required Type Description
format True

The requested format for the exported file

paginatedReportConfiguration

The configuration used to export a paginated report

powerBIReportConfiguration

The configuration used to export a Power BI report

Responses

Name Type Description
202 Accepted

Accepted

Definitions

EffectiveIdentity

Defines the user identity and roles. For more information, see Row-level security with Power BI Embedded.

Export

An object describing the details and current state of an export to file job

ExportFilter

A filter to be applied during the export operation

ExportReportPage

A single page configuration for the export request

ExportReportRequest

The export to file request

ExportReportSettings

Export to file request settings

ExportState

The current state of the export to file job

FileFormat

The requested format for the exported file

IdentityBlob

A blob for specifying an identity. Only supported for datasets with a DirectQuery connection to Azure SQL

PageBookmark

The bookmark to apply on a single page. Provide name or state, but not both.

PaginatedReportExportConfiguration

The export to file configuration for a paginated report

ParameterValue

Data contract for paginated report parameters

PowerBIReportExportConfiguration

The export to file configuration for a Power BI report

EffectiveIdentity

Defines the user identity and roles. For more information, see Row-level security with Power BI Embedded.

Name Type Description
customData
  • string

Custom data that's used to apply row-level security rules. Supported for live connection to Azure Analysis Services models and cloud models only.

datasets
  • string[]

An array of datasets for which this identity applies

identityBlob

A blob that specifies an identity. Only supported for datasets with a DirectQuery connection to Azure SQL.

reports
  • string[]

An array of reports for which this identity applies. Only supported for paginated reports.

roles
  • string[]

An array of row-level security (RLS) roles within a token that applies RLS rules. An identity can contain up to 50 roles. A role can contain any character except ,, and its length must not exceed 50 characters.

username
  • string

The effective username within a token that applies row-level security rules. For an on-premises model, the username can contain alphanumeric or any of the following characters ., -, _, !, #, ^, ~, \\, @. For cloud models, the username can contain any ASCII character. For either model, the username length must not exceed 256 characters, and the username shouldn't contain spaces.

Export

An object describing the details and current state of an export to file job

Name Type Description
ResourceFileExtension
  • string

The extension of the exported file

createdDateTime
  • string

The start date and time of the export to file job

expirationTime
  • string

The expiration date and time of the retrieval URL

id
  • string

The export to file job ID

lastActionDateTime
  • string

The date and time of the last change to the export to file job

percentComplete
  • integer

Job progress as a percentage

reportId
  • string

The ID of the exported report

reportName
  • string

The name of the exported report

resourceLocation
  • string

The retrieval URL for the exported file

status

The current state of the export to file job

ExportFilter

A filter to be applied during the export operation

Name Type Description
filter
  • string

The filter to apply. For information about the filter syntax, see Filter a report.

ExportReportPage

A single page configuration for the export request

Name Type Description
bookmark

The bookmark to apply on the page

pageName
  • string

The page name

visualName
  • string

The name of the visual to export. Specify a name, in case only a single visual from this page is exported.

ExportReportRequest

The export to file request

Name Type Description
format

The requested format for the exported file

paginatedReportConfiguration

The configuration used to export a paginated report

powerBIReportConfiguration

The configuration used to export a Power BI report

ExportReportSettings

Export to file request settings

Name Type Description
includeHiddenPages
  • boolean

Whether to include hidden pages when exporting an entire report. If not provided, the default behavior is to exclude hidden pages. This property will be ignored when specific pages are exported.

locale
  • string

The locale to apply

ExportState

The current state of the export to file job

Name Type Description
Failed
  • string

The export to file job failed

NotStarted
  • string

The export to file job didn't start

Running
  • string

The export to file job is running

Succeeded
  • string

The export to file job finished succesfully

Undefined
  • string

The state of the export to file job is undefined

FileFormat

The requested format for the exported file

Name Type Description
ACCESSIBLEPDF
  • string

Accessible PDF (only supported for paginated reports)

CSV
  • string

CSV (only supported for paginated reports)

DOCX
  • string

Microsoft Word (only supported for paginated reports)

IMAGE
  • string

BMP, EMF, GIF, JPEG, PNG, or TIFF image formats (only supported for paginated reports)

MHTML
  • string

MHTML (only supported for paginated reports)

PDF
  • string

PDF

PNG
  • string

PNG (only supported for Power BI reports)

PPTX
  • string

Microsoft PowerPoint

XLSX
  • string

Microsoft Excel (only supported for paginated reports)

XML
  • string

XML (only supported for paginated reports)

IdentityBlob

A blob for specifying an identity. Only supported for datasets with a DirectQuery connection to Azure SQL

Name Type Description
value
  • string

An OAuth 2.0 access token for Azure SQL

PageBookmark

The bookmark to apply on a single page. Provide name or state, but not both.

Name Type Description
name
  • string

The bookmark name

state
  • string

The bookmark state

PaginatedReportExportConfiguration

The export to file configuration for a paginated report

Name Type Description
formatSettings
  • object

A dictionary of format settings. The keys are the device information property names for the requested file format.

identities

The single identity to use when exporting a report. Required when a report uses a Power BI dataset or an Azure Analysis Services data source.

parameterValues

A list of report parameters

ParameterValue

Data contract for paginated report parameters

Name Type Description
name
  • string

The parameter name

value
  • string

The parameter value

PowerBIReportExportConfiguration

The export to file configuration for a Power BI report

Name Type Description
datasetToBind
  • string

The dataset ID to export the report with. Only needed if exporting with a dataset other than the report's default dataset.

defaultBookmark

A default bookmark to apply on all pages that don't have a specific bookmark

identities

A list of identities to use for row-level security rules

pages

A list of pages to export and their properties. The same page may appear more than once with different visuals.

reportLevelFilters

A list of report level filters to apply. Currently, only one filter is supported.

settings

The settings to be applied for the export to file job