community postIntegration & APIscommunity - not Microsoftreviewed - checked by Opus

Step-by-Step Guide to Business Central API Queries

This post explains how to create Query objects configured as APIs in Business Central to expose data for external systems like Power BI and Power Automate. It demonstrates building a Vendor Ledger API and connecting it to Power BI for reporting, highlighting advantages like handling related records and enforcing read-only access.

post Aardvark Labs

Marcel Chabot · 2025-07-11 · 674 words · about 3 min

Key points

  • Query objects configured with API settings (APIGroup, APIPublisher, APIVersion, QueryType = API) automatically expose data to external systems
  • Query-based APIs handle related records easily and can nest several layers deep without requiring separate list parts
  • Query APIs are read-only by nature, preventing accidental write operations and protecting data integrity when shared with reporting teams
  • Query APIs can be directly connected to Power BI using the Dynamics 365 Business Central connector to build reports

AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

  • query “ARD_VendorLedgerAPI”

Not found in BC28-30: query “ARD_VendorLedgerAPI”.

Context

  • Features: API Query objects, API data exposure, related data handling, read-only APIs, Power BI integration, vendor ledger reporting

Source: Aardvark Labs, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.