Forum Discussion
Is there an API to get possible filter values (for buiding custom filter UI)?
- 4 years ago
Hi Lumpie,
AMO-TOM gives you full access to the tabular object model, including the table names, column names & data types.
Alternatively, you can use AMO-TOM to query DMVs (e.g. select * from $SYSTEM.TMSCHEMA_TABLES).
In the Power BI APIs front, you can use the scanner APIs.
However, those are probably not suited for your use case (asynchronous, the metadata may not be up to date etc.).
Thank you SpartaBI for the quick reply! I'm pretty new to power BI, and have some general questions.
1. Is AMO-TMO based on sql-server? we are not really using sql-server.
2.The embedded SKD looks like based on JS, I'm curious if there are something similar in the rest APIs?
3. I guess my previous question was not very clear. I'd like to pull all the metadata of the dashboards and reports. In a report, I'd like to know what are the pages, in each page what are the visuals, and what data source table and columns are used in the visuals etc. I was following this https://docs.microsoft.com/en-us/power-bi/admin/service-admin-metadata-scanning-setup to call the admin scanner APIs, but I don't see any table/column/measure data at all.
Thanks a lot!
Thanks a lot!
Hi xhan,
1. Power BI uses "Analysis Services" as its analytical engine. AMO-TOM enables you to connect to an Analysis Services instance using its XMLA endpoint. If you are using Power BI Premium, you can allow access to the XMLA endpoint and use AMO-TOM. Analysis Services is also included as part of SQL Server (SSAS = SQL Server Analysis Services), but that should not concern you.
2. This functionality is not exposed as part of the documented Power BI REST APIs.
3. AFAIK, the scanner APIs do not return metadata at the page or visual granularity. If you set both tenant settings in the doc & performed a refresh, You should be able to get table/column/measure. See this doc regarding limitations.
This is an area in which Power BI lacks functionality. There are APIs to get some details for the pages & dashboards. See
get-pages-in-group
get-dashboards-in-group
get-tiles-in-group
You also have the option to get the structure directly from PBIX files by using 3-party (unsupported) tools like PBI Tools
Those parse the pages & visuals metadata. See, for example here (19:00).
If you need to export reports to PBIX files you can use
export-report-in-group