Translate

Sunday, July 1, 2018

Dynamics 365 Operations | Recurring integration - REST | Package API

First thing first, learn basics of Recurring integration from below URL:

Download data [Dequeue]

Setup recurring integration export project

  1. In the System administration workspace (not the System administration module), select the Data Management IT workspace.
  2. In the work space, on the Recurring data job tab, select the recurring job to view the details. The Manage scheduled data jobs page contains a grid that lists any messages that are waiting in the queue. Therefore, you can monitor messages and the processing status.

In code snippets below GUID for recurring integration means:

Activity ID, on the Manage scheduled data jobs page, ID field [GUID]

Export data

GET [Dynamics URI with https]/api/connector/dequeue/[GUID for recurring integration] HTTP/1.1
OData-Version: 4.0
OData-MaxVersion: 4.0
Content-Type: application/json;odata.metadata=minimal
Accept: application/json;odata.metadata=minimal
Accpet-Charset: UTF-8
Authorization: Bearer [access token]
Host: [Dynamics URI without https]

Download data package

GET [URI return from dequeue request] HTTP/1.1
OData-Version: 4.0
OData-MaxVersion: 4.0
Content-Type: application/json;odata.metadata=minimal
Accept: application/json;odata.metadata=minimal
Accpet-Charset: UTF-8
Authorization: Bearer [access token]
Host: [Dynamics URI without https]

Acknowledge data package download

POST [Dynamics URI with https]
/api/connector/ack/[GUID for recurring integration] HTTP/1.1
OData-Version: 4.0
OData-MaxVersion: 4.0
Content-Type: application/json;odata.metadata=minimal
Accept: application/json;odata.metadata=minimal
Accpet-Charset: UTF-8
Authorization: Bearer [access token]
Host: [Dynamics URI without https]
{
  "CorrelationId": "[return from dequeue]",
  "PopReceipt": "[return from dequeue]",
  "DownloadLocation": "[location from dequeue]"
}


Upload data [Enqueue]

POST [Dynamics URI with https]/api/connector/enqueue/[guid for recurring integration]?entity=General%20journal&company=usmf HTTP/1.1
OData-Version: 4.0
OData-MaxVersion: 4.0
Accept: application/json;odata.metadata=minimal
Accpet-Charset: UTF-8
Authorization: Bearer [access token]
Host: [Dynamics URI without https]

Request body {xml data}

Get message status

POST /data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.GetMessageStatus
BODY
{
    "messageId":""
}

No comments:

Post a Comment