Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
tejaswi_464
Regular Visitor

Power BI scanner API

Until mid-2024, the Scanner API primarily returned metadata about workspaces, datasets, tables, columns, measures, mashup queries, etc.

Now (in Enhanced version), Microsoft has extended it to include report schema — meaning you can extract:

Which reports exist in each workspace

What pages they contain

What visuals exist on each page

What fields/measures each visual references

 

But I will not found any Microsoft documention on that - could you please suggest your ideas

1 ACCEPTED SOLUTION
johnbasha33
Super User
Super User

Hi  ,Short answer: there isn’t (yet) a Microsoft Scanner API doc that says “we now return full report schema (pages → visuals → fields)”. The public, official docs still describe Scanner as tenant/workspace inventory + semantic-model “sub-artifact” metadata (tables, columns, measures, M/expressions, lineage, RLS, refresh, etc.).

 

What is documented today is a workable combo:

Use Scanner for inventory & dataset/lineage details

Set up metadata scanning and run GetModifiedWorkspaces → PostWorkspaceInfo → GetScanStatus → GetScanResult.

This returns workspaces, reports (IDs, names, types, ownership), datasets (tables/columns/measures, DAX/M, RLS, data sources), and more—assuming the Admin portal → “Enhance admin APIs responses with detailed metadata” switch is enabled. GitHub+3Microsoft Learn+3Microsoft Learn+3

Use the regular Reports REST/JS APIs for report schema
There are two places Microsoft documents page/visual info:

REST (Reports) → list pages in a report (GET /reports/{reportId}/pages). Microsoft Learn

Power BI JavaScript (embedded/authoring APIs) → enumerate pages and visuals (report.getPages(), then page.getVisuals()), get visual descriptors, export visual data, and even inspect/assign data fields via the authoring APIs. Microsoft Learn+3Microsoft Learn+3Microsoft Learn+3

So if your goal is “Which reports → which pages → which visuals → which fields/measures each visual uses?”, the supported pattern today is:

Discover scope with Scanner (workspaces, report IDs, dataset lineage). Microsoft Learn+1

For each report ID, call Reports REST for pages. Microsoft Learn

For each page, use JavaScript client to get visuals and their data fields (authoring APIs).

Why this split?

  • The Scanner API is an admin/tenant-governance surface designed to scale and expose content inventory and model metadata. It has been enhanced over time (RLS, refresh, more dataset sub-artifacts), but Microsoft hasn’t published docs saying it returns full report layout/schema (pages/visuals/field bindings). Microsoft Learn+1

  • The Reports and Embedded/Authoring APIs are the documented way to traverse pages/visuals and read or manipulate data fields. Microsoft Learn+1

    Practical blueprint (works today)

    1. Run Scanner across your tenant; store report↔dataset mapping. Microsoft Learn

    2. Iterate reports; call GET /reports/{id}/pages. Microsoft Learn

    3. For each page, in a headless/automation context where you can use the JS client, call page.getVisuals(); then use authoring APIs to read data fields/targets per visual. (You can also visual.exportData() if you need the summarized rows behind a visual.) Microsoft Learn+2Microsoft Learn+2

      If you specifically need “fields/measures each visual references” in a pure REST/admin flow (no JS), that’s not documented as available via Scanner today. The closest admin surfaces remain dataset-level sub-artifacts (measures, columns, M queries) and lineage; per-visual bindings are in the embedded/authoring layer.

      Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! @tejaswi_464

View solution in original post

2 REPLIES 2
tejaswi_464
Regular Visitor

Thank you so much for your valuable suggestions 

johnbasha33
Super User
Super User

Hi  ,Short answer: there isn’t (yet) a Microsoft Scanner API doc that says “we now return full report schema (pages → visuals → fields)”. The public, official docs still describe Scanner as tenant/workspace inventory + semantic-model “sub-artifact” metadata (tables, columns, measures, M/expressions, lineage, RLS, refresh, etc.).

 

What is documented today is a workable combo:

Use Scanner for inventory & dataset/lineage details

Set up metadata scanning and run GetModifiedWorkspaces → PostWorkspaceInfo → GetScanStatus → GetScanResult.

This returns workspaces, reports (IDs, names, types, ownership), datasets (tables/columns/measures, DAX/M, RLS, data sources), and more—assuming the Admin portal → “Enhance admin APIs responses with detailed metadata” switch is enabled. GitHub+3Microsoft Learn+3Microsoft Learn+3

Use the regular Reports REST/JS APIs for report schema
There are two places Microsoft documents page/visual info:

REST (Reports) → list pages in a report (GET /reports/{reportId}/pages). Microsoft Learn

Power BI JavaScript (embedded/authoring APIs) → enumerate pages and visuals (report.getPages(), then page.getVisuals()), get visual descriptors, export visual data, and even inspect/assign data fields via the authoring APIs. Microsoft Learn+3Microsoft Learn+3Microsoft Learn+3

So if your goal is “Which reports → which pages → which visuals → which fields/measures each visual uses?”, the supported pattern today is:

Discover scope with Scanner (workspaces, report IDs, dataset lineage). Microsoft Learn+1

For each report ID, call Reports REST for pages. Microsoft Learn

For each page, use JavaScript client to get visuals and their data fields (authoring APIs).

Why this split?

  • The Scanner API is an admin/tenant-governance surface designed to scale and expose content inventory and model metadata. It has been enhanced over time (RLS, refresh, more dataset sub-artifacts), but Microsoft hasn’t published docs saying it returns full report layout/schema (pages/visuals/field bindings). Microsoft Learn+1

  • The Reports and Embedded/Authoring APIs are the documented way to traverse pages/visuals and read or manipulate data fields. Microsoft Learn+1

    Practical blueprint (works today)

    1. Run Scanner across your tenant; store report↔dataset mapping. Microsoft Learn

    2. Iterate reports; call GET /reports/{id}/pages. Microsoft Learn

    3. For each page, in a headless/automation context where you can use the JS client, call page.getVisuals(); then use authoring APIs to read data fields/targets per visual. (You can also visual.exportData() if you need the summarized rows behind a visual.) Microsoft Learn+2Microsoft Learn+2

      If you specifically need “fields/measures each visual references” in a pure REST/admin flow (no JS), that’s not documented as available via Scanner today. The closest admin surfaces remain dataset-level sub-artifacts (measures, columns, M queries) and lineage; per-visual bindings are in the embedded/authoring layer.

      Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! @tejaswi_464

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.