Sync
Sync Service APIs
Allows the sync of health campaign data for offline applications.
Body
The request object, containing all necessary information for file sync and the request body metadata
Responses
200
Sync Request created successfully.
application/json
400
Bad request
application/json
500
Internal server error
application/json
post
POST /sync/file/v1/_create HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 259
{
"requestInfo": {
"apiId": "text",
"ver": "text",
"ts": 1,
"action": "text",
"did": "text",
"key": "text",
"msgId": "text",
"requesterId": "text",
"authToken": "text"
},
"sync": {
"campaignId": "CAMP-ID",
"tenantId": "tenantA",
"file": "https://fileserver-url.com/id",
"auditDetails": {}
}
}
{
"responseInfo": {
"apiId": "text",
"ver": "text",
"ts": 1,
"resMsgId": "text",
"msgId": "text",
"status": "SUCCESSFUL"
},
"sync": {
"createdAt": 1663646897,
"modifiedAt": 1663646897,
"campaignId": "CAMP-ID",
"tenantId": "tenantA",
"syncId": "GUID",
"status": "COMPLETED",
"file": "https://fileserver-url.com/id",
"createdBy": "guid",
"modifiedBy": "guid"
}
}
Body
Responses
200
Fetched Sync Status.
application/json
400
Bad request
application/json
500
Internal server error
application/json
post
POST /sync/file/status/v1/_search HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 218
{
"requestInfo": {
"apiId": "text",
"ver": "text",
"ts": 1,
"action": "text",
"did": "text",
"key": "text",
"msgId": "text",
"requesterId": "text",
"authToken": "text"
},
"sync": {
"campaignId": "CAMP-ID",
"tenantId": "tenantA",
"syncId": "GUID"
}
}
{
"responseInfo": {
"apiId": "text",
"ver": "text",
"ts": 1,
"resMsgId": "text",
"msgId": "text",
"status": "SUCCESSFUL"
},
"sync": {
"createdAt": 1663646897,
"modifiedAt": 1663646897,
"campaignId": "CAMP-ID",
"tenantId": "tenantA",
"syncId": "GUID",
"status": "COMPLETED",
"file": "https://fileserver-url.com/id",
"createdBy": "guid",
"modifiedBy": "guid"
}
}
Latest Forms are fetched.
Body
The request object, containing all necessary information for form sync and the request body metadata
Responses
200
Forms Fetched successfully.
application/json
400
Bad request
application/json
500
Internal server error
application/json
post
POST /sync/forms/v1/_search HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 273
{
"requestInfo": {
"apiId": "text",
"ver": "text",
"ts": 1,
"action": "text",
"did": "text",
"key": "text",
"msgId": "text",
"requesterId": "text",
"authToken": "text"
},
"sync": {
"campaignId": "CAMP-ID",
"tenantId": "tenantA",
"syncAll": true,
"forms": [
{
"schemaId": "householdDetails",
"version": "1"
}
]
}
}
{
"responseInfo": {
"apiId": "text",
"ver": "text",
"ts": 1,
"resMsgId": "text",
"msgId": "text",
"status": "SUCCESSFUL"
},
"forms": [
{
"campaignId": "CAMP-1",
"tenantId": "tenantA",
"version": 2,
"submitButtonText": "SUBMIT_FORM",
"nextPageRoute": "/home",
"submitPath": "/egov-rn-service/registration/v1/_create",
"schema": "householdDetails",
"elements": [
{
"type": "dataElement",
"name": "First Name",
"key": "firstName",
"dataType": "text",
"uiElementType": "text",
"value": "null",
"hint": "Enter First name",
"validations": [
{
"name": "max",
"attribute": 20
}
]
}
]
}
]
}
Last updated
Was this helpful?