Product Documentation

FairCom Replication JSON RPC API

Next Topic

Introduction

Developer's Guide

FairCom Replication JSON RPC API

Audience:

Architects and Engineers

Subject:

Using the Replication Manager JSON / HTTP RPC API to manage the FairCom replication solution

Copyright:

© Copyright 2024, FairCom Corporation. All rights reserved. For full information, see the FairCom Copyright Notice.

 The JSON / HTTP RPC API controls all aspects of replicating data between FairCom DB FairCom DB Servers. It listens on an HTTP endpoint called /ReplicationManager/. By default the <baseURL> for a local computer connection is https://localhost:8443/ReplicationManager/.

To execute a Remote Procedure Call (RPC), an application uses HTTP to POST a JSON document to the <baseURL> plus the name of the procedure.

For example, on the computer running Replication Manager, to execute the function, ctMemphisGetReplPlans, an application uses the URL https://localhost:8443/ReplicationManager/ctMemphisGetReplPlans/.

Each RPC expects a JSON document to be posted with specific properties. These properties represent the arguments to the function.

For example, the ctMemphisGetReplPlans function expects the following JSON document to be posted to the https://localhost:8443/ReplicationManager/ctMemphisGetReplPlans/ endpoint:

{ "basic":true, "page":1, "start":0, "limit":25 }

Each RPC returns a JSON document with specific properties that represent the return results of the function. When the function returns an error, the results contain error information.

Note: FairCom supports all actively-supported LTS versions of the Oracle JDK, and the most recent release (non-beta) version of Oracle OpenJDK.

The example:

{

"replPlanList": [

{

"id": 0,

"name": "PLAN1",

"description": "Plan 1 description",

"sourceDBEngine": 0,

"targetDBEngine": 1,

"direction": "normal", // see "Direction" note for possible values

"status": "active",

"statusCode": 1, // see table "StatusCd" for possible values

"statusTime": "Thu Aug 23 14:55:02 2001",

"statusMsg": "",

"isDeployed": false,

"latency": 22, // how many seconds behind the Replication Plan

is at this moment

"latencyTime": "Thu Aug 23 14:55:02 2001", // when latency was last checked

"latencyRev": 22, // how many seconds behind the Replication Plan

reverse direction is at this moment

"latencyRevTime": "Thu Aug 23 14:55:02 2001", // when reverse direction latency

was last checked

}]

"success": true,

"error":

{

"errorCode": 0,

"message": "Success"

},

"total": 500 // total number of replication plan for the query

see Note 1 Paging Parameters

}

TOCIndex