Reports - Export To File In Group
Exports the specified report from the specified 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
This API call can be called by a service principal profile. For more information see: Service principal profiles in Power BI Embedded.
All of the following:
- Report.ReadWrite.All or Report.Read.All
- Dataset.ReadWrite.All or Dataset.Read.All
Check the limitations in Export Power BI report to file and Export paginated report to file.
POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/ExportTo
Name | In | Required | Type | Description |
---|---|---|---|---|
group
|
path | True |
string uuid |
The workspace ID |
report
|
path | True |
string uuid |
The report ID |
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 |
Name | Type | Description |
---|---|---|
202 Accepted |
Accepted |
Name | Description |
---|---|
Effective |
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 |
Export |
A filter to be applied during the export operation |
Export |
A single page configuration for the export request |
Export |
The export to file request |
Export |
Export to file request settings |
Export |
The current state of the export to file job |
File |
The requested format for the exported file |
Identity |
A blob for specifying an identity. Only supported for datasets with a DirectQuery connection to Azure SQL |
Page |
The bookmark to apply on a single page. Provide name or state, but not both. |
Paginated |
The export to file configuration for a paginated report |
Parameter |
Data contract for paginated report parameters |
Power |
The export to file configuration for a Power BI report |
Defines the user identity and roles. For more information, see Row-level security with Power BI Embedded.
Name | Type | Description |
---|---|---|
auditableContext |
string |
The EffectiveIdentity auditable context. If this parameter is provided and isn't empty, it will enable auditing of the EffectiveIdentity and its value will be set to the username in the audit record. Otherwise, the EffectiveIdentity context will be omitted from the GenerateToken audit record. |
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 |
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 |
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 |
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. |
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. |
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 |
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 |
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 successfully |
Undefined |
string |
The state of the export to file job is undefined |
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) |
string |
|
|
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) |
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 |
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 |
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 |
Data contract for paginated report parameters
Name | Type | Description |
---|---|---|
name |
string |
The parameter name |
value |
string |
The parameter value |
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 |