Forum Discussion
Export to file API with Current Values
- 5 years ago
Hi Anonymous
The option won't prompt automatically when you use the API, did you specify the export content in the JSON body?
Note that:
You can use the
exportToFileAPI to programmatically export a report in a specific state, after applying filters to it. This is done using Bookmarks capabilities. To export a report using bookmarks, use the bookmarks JavaScript API.For example, you can use the bookmark's
capturedBookmark.statemethod to capture the changes a specific user made to a report, and then export it in its current state.Personal bookmarks and persistent filters are not supported.
Here're blogs for your reference:
Hi,
I'm trying below mentioned request for export report with current values but API is throwing error, I appreciate if somebody help me to solved this, i need to fix this ASAP.
API Endpoint:
https://api.powerbi.com/v1.0/myorg/groups/{groupid}/reports/{reportid}/ExportTo
Request:
{
"format": "PDF",
"powerBIReportConfiguration": {
"settings": {
"locale": "en-US",
"excludeHiddenPages": "false"
},
"defaultBookmark": "H4sIAAAAAAAAA+1deW8bR5b/KgSB3cwASlD3.."
}
}
Response:
{
"error": {
"code": "BadRequest",
"message": "Bad Request",
"details": [
{
"message": "Error converting value \"H4sIAAAAAAAAA+1deW8bR5...",
"target": "request.powerBIReportConfiguration.defaultBookmark"
}
]
}
}