Dynamics 365 Business Central also exposes APIs for automating tenant-related tasks, such as the following:
- Creating companies
- Managing users, groups, and permissions
- Handling extensions (the installation/uninstallation of per-tenant extensions)
- Importing and applying configuration packages
Automation APIs are under the /microsoft/automation namespace. For example, to create a company in a Dynamics 365 Business Central tenant, you can send an HTTP POST request to the following endpoint:
POST https://api.businesscentral.dynamics.com/v2.0/api/microsoft/automation/{apiVersion}/companies({companyId})/automationCompanies
Authorization: Bearer {token}
Content-type: application/json
{
"name": "PACKT PUB",
"displayName": "PACKT Publishing",
"evaluationCompany": false,
"...