Introduction:
In this blog, we'll walk through the process of importing a D365FO package using Postman. We will focus on how to use the Data Management Package REST API, providing the necessary steps to configure and send your requests. Additionally, we will explain how to access container files stored in Azure Blob Storage using Postman.
1. D365FO Package Import Using Postman
To import a package in Dynamics 365 for Finance and Operations (D365FO), we utilize the Data Management Package REST API. Here's how you can do it:
API Endpoint
The endpoint to use for importing a package is:
2. Authorization
Before you can interact with the API, you'll need to authenticate your requests. The authentication is done via a Bearer Token.
Authorization Header
-
Key:
Authorization
-
Value:
Bearer <YourToken>
You can obtain the token by registering your app in Azure Active Directory and using the OAuth 2.0 flow to retrieve the token.
3. HTTP Request Headers
You need to set the following headers for your HTTP request:
-
Content-Type:
application/json
4. Body of the Request
In the body of your request, you need to provide the necessary details in JSON format. Here is an example:
"packageUrl": "https://BALIBlob.blob.core.windows.net/saleslines/%74297-B72F-814249C6D103%7D%20",
"definitionGroupId": "imp salesline",
"execute": true,
"overwrite": true,
"legalEntityId": "BALI"
}
Parameters Explained:
packageUrl: The URL of the package file stored in your Azure Blob Storage. This is the URL where your package file is located.
definitionGroupId: The ID of the Data Management Definition Group you are importing.
execute: A boolean flag indicating whether to execute the import after uploading.
overwrite: A boolean flag indicating whether to overwrite existing data during the import.
-
legalEntityId: The ID of the legal entity associated with the data import
5. Accessing the Package URL from Azure Blob Storage
The Package URL refers to the location of the package file that is stored in Azure Blob Storage. Here’s how to retrieve it:
-
Log in to Azure Portal.
-
Navigate to your Storage Account: Go to the Azure Storage account where your package file is stored.
-
Select your Blob Storage: Choose the "Blob Service" and navigate to the container where the package is stored.
-
Access the Container: Click on your container, and you’ll see a list of files.
-
Select the Package File: Click on the package file you want to import.
its this is D365FO datapackage (exported from d365FO do
needfull changes in data package and upload it to container)
Conclusion
By following the steps outlined above, you can easily import data packages into Dynamics 365 for Finance and Operations using Postman and the Data Management Package REST API. With the flexibility of Azure Blob Storage for storing your files, this process streamlines data management in D365FO.
For more detailed guidance on using the Data Management API in D365FO, visit the official Microsoft documentation.