Create web services to link Power BI and Business Central

Completed

You can configure Business Central integration with Power BI, so that you can use Business Central as a Power BI data source, and also so you can display Power BI reports and charts within Business Central.

Overview of data web services

Businesses capture a tremendous amount of data through daily activity. This data, which reflects such things as the organization's sales figures, purchases, operational expenses, employee salaries, and budgets, can become valuable information, or business intelligence, for decision makers. Business Central contains several features that help you gather, analyze, and share your company data.

Web services are a lightweight way to make application functionality available to various external systems and users. Business Central includes several objects that are exposed as web services by default due to integration with other Microsoft services, but you can also add other web services.

You can set up a web service manually. After creating the web service, you'll need to publish it so that it's available to service requests over your network. Users can discover web services by pointing a browser at the server location and requesting a list of available services. When you publish a web service, it's immediately available over the network for authenticated users. All authorized users can access metadata for web services, but only users who have enough permissions can access actual data.

To add a new webservice, follow these steps:

  1. Select the New action in the ribbon:

    Screenshot showing the +New action on the ribbon.

  2. Next select the ObjectType:

    Screenshot showing the object type menu options.

  3. For Power BI, the Object Type needs to be Page or Query.

  4. Next select or enter the Object ID of the Page/Query you want to publish as a web service.

  5. Enter a Service Name and select Published.

Verify that your web service is publicly available

After you publish a web service, it's available to external parties. You can verify the availability of your web service by using a browser, or you can choose the link in the OData URL, SOAP or URL fields on the Web Services page. Optionally, you can copy the value of the field and save it for later use.

To verify the availability of a web service, follow these steps:

  1. In your browser, enter the URL. The company name is case-sensitive.

  2. Review the information that is displayed in the browser.

  3. Verify that you can see the name of the web service that you have created.

When you access a web service, and you want to write data back to Business Central, you must specify the company name. You can specify the company as part of the URI as shown in the examples, or you can specify the company as part of the query parameters.

For example, the following URIs point to the same OData web service and are both valid URIs.

  • https://api.businesscentral.dynamics.com/v1.0/OData/Company('CRONUS International Ltd.')/Customer

  • https://api.businesscentral.dynamics.com/v1.0/OData/Customer?company='CRONUS International Ltd.'