Data Sync

Data synchronization API(s) establish consistency among data from a source to a target data storage.

Syncs data

post

This API is associated with synchnorization of data on the Sunbird Platform.

  • The endpoint for Syncs data is /sync
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Header parameters
Content-TypestringRequired

The Content Type entity is the media type of the resource.Possible media types can be:-

  • Application/json
  • Multipart/form-data
  • Application/x-www-form-urlencoded
tsstringRequired

Time Stamp at which data sync request was sent.

X-msgidstringRequired

This Id Uniquely identifies a request if the same API is executed multiple times.

X-Device-IDstringRequired

This Id Uniquely identifies the type of device (Mobile)(desktop) used to access Sunbird. 'The Registered User ID to execute the API.

AuthorizationstringRequired

All content APIs require authorization for use. Specify the authorization key received from the administrator when placing the request for use of the API.

Body
paramsobjectRequired
Responses
200
OK ! Successful operation."Data sync" operation was successfully executed.
application/json
Responseall of

Data sync response

and
post
POST /api/data/v1/index/sync HTTP/1.1
Host: staging.open-sunbird.org
Content-Type: application/json
ts: text
X-msgid: text
X-Device-ID: text
Authorization: text
Accept: */*
Content-Length: 66

{
  "params": {},
  "request": {
    "objectType": "text",
    "objectIds": [
      "text"
    ]
  }
}
{
  "result": {
    "node_id": "text"
  },
  "id": "text",
  "ver": "text",
  "ts": "text",
  "params": {
    "resmsgid": "text",
    "msgid": "text",
    "err": "text",
    "status": "text",
    "errmsg": "text"
  },
  "responseCode": {}
}

Last updated

Was this helpful?