Scenario:-Export data package through postman
Step1:-Create a data export in d365fo
Step2:-Open postman generate bearer token by giving all credentials
Get :-https://login.microsoftonline.com/tenantid/oauth2/token
Body:- formdata
a) tenant_id –
b) client_id –
c) client_secret –
d) grant_type – client_credentials
e) resource – enter D365FO environment URL (note it should not end with /)
Output:-
{
"token_type": "Bearer",
"expires_in": "3599",
"ext_expires_in": "3599",
"expires_on": "1723463000",
"not_before": "1723459100",
"resource": "https://trial-zpgyvk.trial.operations.dynamics.com/",
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IktRMnRBY3JFN2xCYVZWR0JtYzVGb2JnZEpvNCIsImtpZCI6IktRMnRBY3JFN2xCYVZWR0JtYzVGb2JnZEpvNCJ9.eyJhdWQiOiJodHRwczovL3RyaWFsLXpwZ3l2ay50cmlhbC5vcGVyYXRpb25zLmR5bmFtaWNzLmNvbS8iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC9jYTA2YTExMC1mYzMwLTQ3ZTUtOWRkNC03MThkNWQ0YzQyNDQvIiwiaWF0IjoxNzIzNDU5MTAwLCJuYmYiOjE3MjM0NTkxMDAsImV4cCI6MTcyMzQ2MzAwMCwiYWlvIjoiRTJkZ1lEaW5WelN6T2o1LzZaSHN2Y212UHA0eEFnQT0iLCJhcHBpZCI6IjQ5ZjAxNWI5LWQ1MzMtNDdlNi1iYTI2LTc3MGZlMTU3Y2NjMyIsImFwcGlkYWNyIjoiMSIsImlkcCI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0L2NhMDZhMTEwLWZjMzAtNDdlNS05ZGQ0LTcxOGQ1ZDRjNDI0NC8iLCJpZHR5cCI6ImFwcCIsIm9pZCI6IjYyNGE1MDBiLTk3ODItNDk1ZC1hMWQ1LTc4YTNkYTg2MTg2OSIsInJoIjoiMC5BU29BRUtFR3lqRDg1VWVkMUhHTlhVeENSQlVBQUFBQUFBQUF3QUFBQUFBQUFBQXFBQUEuIiwic3ViIjoiNjI0YTUwMGItOTc4Mi00OTVkLWExZDUtNzhhM2RhODYxODY5IiwidGlkIjoiY2EwNmExMTAtZmMzMC00N2U1LTlkZDQtNzE4ZDVkNGM0MjQ0IiwidXRpIjoiZXdQWWU3S2hoVXllS0dURGgtS1VBQSIsInZlciI6IjEuMCIsInhtc19pZHJlbCI6IjcgMiJ9.kNDAndZRZgwN-78gPl3aSHW-A7am5hSALHrqDJpwJBITgXePf2BtbqkyMYV6H_T_vlCp2nCymEFrSbJJFihGQ1f5xiuth9vjLasSm1sH5mK2Gr8t7Y78YEdjYnABI0NIIrHBug__aEGdB-eAd7zBmI_rZ9f1ca4UBHxlrjskZCB6hoEjO44v0_eisWTwU5o6no6GI8ZrpAbDiNkqpiZMwwfh6JJfm9SQwq1k_rTFhyGQ8lg19zofxy4l29IMw4-kwTqQYN5_JeEiZCxVbsJ2WjUJpLzKNpabyDe859Vr9HQe1MwSAZHfgvvPF3020po9hrhznewHkOGmKKOGZyzrNQ"
Step3:-Use import from package and export package and in authorization choose bearer token and give token which generated in previous step
Post:-https://trial-cgxwlr.trial.operations.dynamics.com/data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.ExportToPackage
Body:-
Step4:-Now use exportpackageurl Api to get datapackageurl and in authorization choose bearer token and give token which generated in previous step
Note:-Pass exeution id in body from the previous response
Post:-https://trial-cgxwlr.trial.operations.dynamics.com/data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.GetExportedPackageUrl
Body:-
{
}
Step5:-Paste the URL which is generated in previous step response in browser and enter a file will be downloaded
Step6:-You can see downloaded zip Data Package in local desktop
Step7:-Open file a see the data
No comments:
Post a Comment