As continue Inpart 3 here I am not going to list down all possible export RSET API which Microsoft standard solution offers.
ExportToPackage && ExportToPackageAsync
The ExportToPackage API is used to initiate an export of a data package. This API is applicable to both cloud deployments and on-premises deployments.
ExportToPackageAsync version of export to package will help you work with larger data. Request and response is same as ExportToPackage .
It will be required to capture the execution id returned and the later call the GetExecutionSummaryStatus API to determine when the execution has completed.
- The export data project must be created before you call this API. If the project doesn’t exist, a call to the API returns an error.
- If change tracking has been turned on, only records that have been created or updated since the last run are exported. (In other words, only the delta is returned.)
Request : POST /data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.ExportToPackage
BODY
{
“definitionGroupId”:””,
“packageName”:””,
“executionId”:””,
“reExecute”:,
“legalEntityId”:””
}
Response : HTTP/1.1 200 OK
{
“@odata.context”:”https:///data/$metadata#Edm.String”,
“value”:{
“value”:””
}
}
ExportToPackagePreview && ExportToPackagePreviewAsync
The ExportToPackagePreview API is used to preview an export of a data package with a large number of records. This API is applicable to both cloud deployments and on-premises deployments.
Additionally you can assign preview count for Number of Retry in case of failure.
Request : POST /data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.ExportToPackagePreview
BODY
{
“definitionGroupId”:””,
“packageName”:””,
“executionId”:””,
“reExecute”:,
“legalEntityId”:””,
“exportPreviewCount”:””
}
Response : HTTP/1.1 200 OK
{
“@odata.context”:”https:///data/$metadata#Edm.String”,
“value”:{
“value”:””
}
}
ExportToPackageDelta && ExportToPackageDeltaAsync
The ExportToPackageDelta and ExportToPackageDeltaAsync API is used to preview an export of a delta data package with a large number of records. This API is applicable to both cloud deployments and on-premises deployments.
Additionally you can list of data entity for which you need delta and which you need full data.
Request : POST /data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.ExportToPackageDelta
BODY
{
“definitionGroupId”:””,
“packageName”:””,
“executionId”:””,
“reExecute”:,
“legalEntityId”:””,
“entityList”:”” ( List of data entity)
}
Response : HTTP/1.1 200 OK
{
“@odata.context”:”https:///data/$metadata#Edm.String”,
“value”:{
“value”:””
}
}
ExportFromPackage
ExportFromPackage API help you create export package based on manifest file added in input package.
It create data project in system and then export.
Request : POST /data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.ExportFromPackage
BODY
{
“packageUrl”:”Input Package URL “
“definitionGroupId”:””,
“packageName”:””,
“executionId”:””,
“reExecute”:,
“legalEntityId”:””,
}
Response : HTTP/1.1 200 OK
{
“@odata.context”:”https:///data/$metadata#Edm.String”,
“value”:{
“value”:””
}
}
GetExportedPackageUrl
The GetExportedPackageUrl API is used to get the URL of the data package that was exported by a call to ExportToPackage. This API is applicable to both cloud deployments and on-premises deployments.
POST /data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.GetExportedPackageUrl BODY
{“executionId”:”<Execution Id>”}
HTTP/1.1 200 OK
{
“@odata.context”:”https:///data/$metadata#Edm.String”,
“value”:{
“value”:”https://.blob.core.windows.net/dmf/?”
}
}
GetExportedFileUrl
The GetExportedFileURL API is used to get the URL of the data file that was exported by a call to ExportToPackage,ExportToPackageDelta and ExportToPackageReview and Asynch version . This API is applicable to both cloud deployments and on-premises deployments.
POST /data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.GetExportedPackageUrl BODY
{“executionId”:”<Execution Id>”
“entityName”:”<Data entity Name>”}
HTTP/1.1 200 OK
{
“@odata.context”:”https:///data/$metadata#Edm.String”,
“value”:{
“value”:”https://.blob.core.windows.net/dmf/?”
}
}
ExportTemplateToPackage
Export Template to Package help you get manifest and package header file to use in import API API
POST /data/DataManagementTemplates/Microsoft.Dynamics.DataEntities.ExportTemplateToPackage
BODY
{“templateId“:”<Template Name>”
“packageName“:”<Package Name>”}
HTTP/1.1 200 OK
{
“@odata.context”:”https:///data/$metadata#Edm.String”,
“value”:{
“value”:”https://.blob.core.windows.net/dmf/?”
}
}
Leave a comment