Comparison of the API for Business Central on-premise and Business Central on Cloud

Introduction:

This blog is to give an introduction regarding how to integrate the data from Business Central to an API and also gives a comparison of the API integration in Business Central on-premise and Business Central on Cloud. I will demonstrate it with an example for Sales Order Entity.

Pre-requisites:

1. Microsoft Dynamics 365 Business Central (on-premise)
2. Microsoft Dynamics 365 Business Central (Cloud)

Demonstration:

For Business Central on-premise:

1. Add the page whose data has to be integrated to the page API Setup (5469) and click on Integrate APIs.

2. Go to Business Central Administration and to the Server Instance properties and in the OData properties check the “Max Page Size” parameter and set it to the number of records you want to integrate. (Note: Enable API Services and Enable OData Services checkboxes should also be ticked.)

3. Now go to the browser and enter the URL to get the list of 44 standard APIs. (Format of the URL for Business Central on-premise is given as follows:   

“http:<<Server Name>>:<<Odata Port>>/<<Service Name>>/api/beta/”

4. Now you can get to the sales order using the following URL.
“http:<<Server Name>>:<<Odata Port>>/<<Service Name>>/api/beta/companies(company id)/salesOrders”.

This data is available in JSON format and further can be confirmed that there are 1500 records. Thus, the number of records integrated here depends on the Max Page Size parameter.

For Business Central on Cloud :

1. First add the page whose data has to be integrated is added to the API Setup Page similar as above. Use the following URL “https://api.businesscentral.dynamics.com/v1.0/<tenant domain>/api/beta to access the API for getting the data from the Business Central on Cloud. Enter the username of the user in the Business Central and the Password will be the user’s WebServiceAccessKey.

2. When you click on Sign in, you will get a list of all of the standard 44 APIs.

3. Similar to the Business Central on-premise you can navigate to the SalesOrder. URL Format is as follows:   
https://api.businesscentral.dynamics.com/v1.0/<tenantdomain>/api/beta/companies(company id)/salesOrders”. It can be seen from the images below that only 1000 records have been integrated from the SalesOrder in Business Central to the API. Here, as there is no administration this number of records integrated cannot be changed and they remain as the standard defined for OData.

Conclusion:

This is the difference in the API integration in Business Central on-premise and Business Central on Cloud. It also shows the number of records that can be integrated in Business Central on-premise and Business Central on Cloud. As we will find the solution as to how to alter the number of records that can be integrated in Business Central on Cloud we will post the blog.


Share Story :