One of the most interesting features announced for the Wave 2 release of Dynamics 365 Business Central is the possibility to create multiple production environments for each tenant (this will include the option for environments to be on different country-specific or region-specific versions of Dynamics 365 Business Central).
In order to support this upcoming feature, endpoints of all web services (SOAP, OData, APIs) are actually updated to version 2.0.
The endpoints with version 1.0 (that many of you are still using now) will continue to work and they will permit you always to work with a single production environment (called Production) and with a single sandbox environment.
The 1.0 endpoints have the following format:
https://api.businesscentral.dynamics.com/v1.0/<Tenant ID>/api/v1.0/<entity>
Instead, the newly introduced 2.0 endpoints now supports a new environment name parameter, that must always be specified in order to redirect the call to the right Dynamics 365 Business Central environment.
The new 2.0 endpoint format is as follows:
https://api.businesscentral.dynamics.com/v2.0/<Tenant ID>/<Environment Name>/api/v1.0/<entity>
You can start using the new endpoint just now and the recommendation (if you have external applications that talks with a Dynamics 365 Business Central tenant) is to update your service endpoints now in order to be ready to support the new changes.
As an example, you can use a 2.0 endpoint now to retrieve customers for a specific company in the production environment (actually only 1 and called Production) by sending a GET request to the following url:
https://api.businesscentral.dynamics.com/v2.0/<Tenant ID>/production/api/v1.0/companies(<CompanyID>)/customers
Please use the new endpoints as soon as possible if you want to be prepared for the upcoming future 🙂
Thanks for the info, Great Article! very helpful, I was going to give up and now I see what should I do!
if you don’t mind, I got one question, I set up 3 sandbox environments in the cloud then I try to access one of the API as below (using basic authentication wit Web service Access Key) and it works:
* Test1 is the name of my environment
https://api.businesscentral.dynamics.com/v2.0//Test1/api/v1.0/
https://api.businesscentral.dynamics.com/v2.0//Test1/api/v1.0/#metadata
everything is fine so far, but if I try to get the list of companies I get the below error although I’m superuser in all environments/companies:
https://api.businesscentral.dynamics.com/v2.0//Test1/api/v1.0/companies
the response:
{
error: {
code: “Authentication_InvalidCredentials”,
message: “The server has rejected the client credentials. CorrelationId: f32a193e-5426-44f9-ab18-4e331950fe63.”
}
}
FYI:
I’m sure my credentials are correct, because if I change them then I can’t get the #metadata.
any idea?
LikeLike