Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello,
In an attempt to retrieve some information from the Power BI REST API (specifically, the GetDashboardsAsAdmin), we have run into an issue where the expand parameter is not accepted and will return a 400 Client Error: Bad request for url. Removal of the ?$expand=tiles returns the expected result, so it is not any other issue aside from the format of the GET request URL.
Link to referenced documentation (here)
Has anyone else run into this issue and found a way around it? The documentation provided may no longer be up to date. Thanks.
Solved! Go to Solution.
Hi @zhhorton,
WHen using $expand, a $top also needs to be specified.
In my enviornment:
GET https://api.powerbi.com/v1.0/myorg/admin/dashboards?%24expand=tilesreturns a 400 response with this body:
{
"error": {
"code": "InvalidRequest",
"message": "This API expects $top query option to be provided."
}
}
Where as this:
GET https://api.powerbi.com/v1.0/myorg/admin/dashboards?%24expand=tiles&%24top=10returns a 200 code with data
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, please mark this as the solution.
Proud to be a Super User! | |
Hi @zhhorton,
WHen using $expand, a $top also needs to be specified.
In my enviornment:
GET https://api.powerbi.com/v1.0/myorg/admin/dashboards?%24expand=tilesreturns a 400 response with this body:
{
"error": {
"code": "InvalidRequest",
"message": "This API expects $top query option to be provided."
}
}
Where as this:
GET https://api.powerbi.com/v1.0/myorg/admin/dashboards?%24expand=tiles&%24top=10returns a 200 code with data
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, please mark this as the solution.
Proud to be a Super User! | |
Thank you @tayloramy, that is very helpful.
I have found the $top parameter is necessary much more than the documentation mentions which causes some confusion. I appreciate your help!
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 7 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |