Reputation: 207
I want to fetch job details from Dynamics 365 Finance and Operations for that I need Job Id I am unbale to find out way how to get Job Id from Dynamics 365 Finance and Operations using any Rest API
Upvotes: 0
Views: 1147
Reputation: 7813
Are these jobs that you have created? I think (I cannot find the reference documentation for this, strange?) that you get the message id back from Dynamics when you call the /api/connector/enqueue/ endpoint.
If you are not the party that creates the job, I do not think that you can get the id. What should the call look like that gets the id of a message that you cannot id?
You can then use the message id to get more information about the message by calling the /data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.GetMessageStatus:
POST /data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.GetMessageStatus
BODY
{
"messageId":"<string>"
}
Upvotes: 0
Reputation: 1683
Programmatically the following code block can retrieve the Job ID
POST /data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.ImportFromPackage
BODY
{
"packageUrl":"<string>",
"definitionGroupId":"<string>",
"executionId":"<string>",
"execute":<bool>,
"overwrite":<bool>,
"legalEntityId":"<string>"
}
The following link consists of the official documentation, that can help to retrieve and manage the Job ID.
Upvotes: 0