Product Documentation

FairCom Replication JSON RPC API

Previous Topic

Next Topic

ctMemphisGetReplicaStatusList

int ctMemphisGetReplicaStatusList( pRCESJson request, ppRCESJson result )

Description:

Retrieve the current status of all replicas for the given Availability group.

HTTP URL: <baseURL>/ctMemphisGetReplicaStatusList/

HTTP Verb: POST

Constraints:

  • "id" or "name" must be provided.

Notes:

  • Status values can be: "inactive", "active", "stopping", "starting", "deploying" and "paused"
  • StatusCd values can be: 0 = "inactive", 1 = "active", 2 = "stopping", 3 = "starting", 4 = "deploying" and 5 = "paused"
  • recoverOrder show that the replica was a primary and has been switched
  • transactionID log position where the failover occurred to be used as an option for a primary node restore later

Parameters:

  • request [IN] - Retrieve Replica Status List request in JSON format. For example:

{

"id": 1, // optional, Availability Group identification.

"name": "availGroup1" // optional, Availability Group name.

}

  • result [OUT] - Result in JSON format. For example in case "checkConnection" is FALSE or the ID is provided:

{

"availGroupStatus":

{

"id": 1,

"name": "availGroup1",

"status": "active", // see observation "Status" for possible values

"statusCode": 1, // see "EngineStatus" note for possible values

"replicaStatusList": [

{

"dbEngine": 2, // dbEngine identification

"status": "active", // see "Status" note for values

"statusCode": 1, // see "ReplicationStatus" note for values

"isPrimary": true, // indicates if replica is primary or secondary

"name": "FAIRCOMS",

"hostname": "localhost",

"ipList": [

{

"ip": "10.0.0.1",

"type": "ipV4"

},

{

"ip": "0000:0000:0000:0000:0000:0000:0000:0001",

"type": "ipV6"

}

],

"isSQL": 1,

"portNbr": 5587,

"sqlPortNbr": 6587,

"acceptConn": 1, // Flag indicating server accepts

external connections

"readOnly": false // Flag indicating server is ReadOnly.

Can be true, false, or never

(cannot be changed).

},

{

"dbEngine": 3,

"status": "active",

"statusCode": 1,

"isPrimary": false,

"isSync": true, // type of replication for replica

"name": "FAIRCOM1",

"hostname": "localhost",

"ipList": [

{

"ip": "10.0.0.1",

"type": "ipV4"

},

{

"ip": "0000:0000:0000:0000:0000:0000:0000:0001",

"type": "ipV6"

}

],

"isSQL": 1,

"portNbr": 5588,

"sqlPortNbr": 6588,

"acceptConn": 1,

"readOnly": true

},

{

"dbEngine": 4,

"status": "inactive",

"statusCode": 1,

"isPrimary": false,

"isSync": false,

"recoverOrder": 0,

"transactionID": 132135,

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

"name": "FAIRCOM2",

"hostname": "localhost",

"ipList": [

{

"ip": "10.0.0.1",

"type": "ipV4"

},

{

"ip": "0000:0000:0000:0000:0000:0000:0000:0001",

"type": "ipV6"

}

],

"isSQL": 1,

"portNbr": 5587,

"sqlPortNbr": 6587,

"acceptConn": 1,

"readOnly": true

},

]

}

"success": true,

"error":

{

"errorCode": 0,

"message": "Success"

}

}

Return:

Error code

TOCIndex