DnyaneshSurya
DnyaneshSurya

Reputation: 207

How to get Job ID from Dynamics 365 Finance and Operations of Recurring Integration Job using Rest API call

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

enter image description here

Upvotes: 0

Views: 1147

Answers (2)

Andreas Paulsson
Andreas Paulsson

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>"
}

, see https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/recurring-integrations#api-for-getting-message-status

Upvotes: 0

Sairam Tadepalli
Sairam Tadepalli

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.

https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/data-management-api

Upvotes: 0

Related Questions