Product Documentation

FairCom Replication JSON RPC API

Previous Topic

Next Topic

ctMemphisPersistAvailGroup

int ctMemphisPersistAvailGroup( pRCESJson request, ppRCESJson result )

Description:

Persist an Availability Group into the Replication Manager Database. If it doesn't exist, create it, otherwise update it. To create a new one, the ID must be -1 or not passed. And the update will be done by the ID.

HTTP URL: <baseURL>/ctMemphisPersistAvailGroup/

HTTP Verb: POST

Constraints:

  • name is not NULL, not EMPTY, and Unique

Parameters:

  • request [IN] - Persist DBEngine group request in JSON format. For example:

{

"availGroup": {

"id": -1, // optional, must be existing ID for update

"name": "availGroup3", // required

"description": "General availability group", // optional

"canFailoverToAsyncReplica": true, // optional, flag indicating to failover

to an asynchronous replica if no

synchronous is available. Or it should

fail in this scenario. Default is true.

"heartbeatFrequency": 2, // optional, default is 2 seconds.

Heartbeat frequency in seconds for

checking the replicas

"heartbeatTimeout": 5 // optional, default is 5 seconds.

Number of seconds to wait with no answer

before assuming it is down

}

}

  • result [OUT] - Result in JSON format. For example:

{

"success": true,

"error":

{

"errorCode": 0,

"message": "Success"

},

"id": 3

}

Return:

Error code

TOCIndex