Replication Web API

REST API

The REST API provides programmatic access to Reading and Write replication data. The REST API identifies the replication application and its users using OAUTH ; responses are available in json. We have used SWAGGER editor for the end users to make the API calls so that they can try out APIs exposed by our platform.

The link for accessing the API docs is http://localhost:8080/webapi/api-docs/repl-v4/ReplicationAPIDriver

Checklist Before Getting Started

  1. User should have the release of 4.6.1 or later.

  2. The on-premise instance should have Replication service running.

There is two API Methods list which is exposed for this release, we will be adding more methods in the upcoming releases. The order of the execution of API calls are as follows

  1. Replicate

  2. checkStatus

/replicate

The Replicate method is the actual API call used to invoke the replication process so that the Salesforce objects gets replicated to the Database. From this call, the process id is generated which is used in the checkStatus method to check the status of the replication process.

{
    "salesforce": {
        "soapEndpoint": "https://login.salesforce.com/services/Soap/u/32.0",
        "bulkApiEnable": false,
        "callbackUrl": "https://localhost:8443/DBSync/oauth/_callback",
        "consumerKey": "",
        "consumerSecret": "3Q/190VEz3BnIu6bMGO2sg\\\\=\\\\=",
        "password": "password@123",
        "username": "test@mydbsync.com"
    },
    "database": {
        "fileReplication": false,
        "fileVersion": false,
        "s3": false,
        "awsAccessKey": "",
        "awsBucketName": "",
        "awsRegion": "",
        "consumerSecret": "",
        "database": "ORCL",
        "filepath": "",
        "host": "10.0.0.9",
        "password": "Avankia1",
        "port": "1521",
        "schema": "dbsync",
        "type": "Oracle",
        "url": "jdbc:oracle:thin:@10.0.0.9:1521:ORCL",
        "username": "HR"
    },
    "objects": [
        {
            "excludes": [],
            "filter": "",
            "name": "Account"
        },
        {
            "excludes": [],
            "filter": "",
            "name": "Contact"
        }
    ],
    "log": {
        "emailError": false,
        "database": true,
        "dir": "",
        "emailRecipients": [
            "test@mydbsync.com"
        ],
        "emailSender": "ravindra.g@avankia.com",
        "callbackURL": "http://posttestserver.com/post.php"
    },
    "run": {
        "command": "cleancopy",
        "profile": "testprofile"
    }
}

Follow the below steps to retrieve the Consumer Key and Consumer Secret from Salesforce

The below tables explains the various model schema and attributes which form the model class

Replication params

Salesforce Params

Database Params

Table Params

Log Properties params

Run Properties Params

Below table gives the attribute list of the response class

Example

Curl

Request URL

Response Body

Response Code

Response Headers

/checkStatus

The Check status method is used to return the status of the replication process and to invoke this method user must have the process id attribute . The process id can be generated from the first method "Replicate", the check status method has two parts to it one is the request object and the other is the response object.

The below table explains the attributes and their description of this method. The process ID is the mandatory attribute used to invoke this call.

Example

Curl

Request URL

Response Body

Response Code

Response Headers

Last updated