Product Documentation

FairCom Replication JSON RPC API

Previous Topic

Next Topic

ctMemphisGetDBEngines

int ctMemphisGetDBEngines( pRCESJson request, ppRCESJson result )

Description:

Retrieve all the DBEngines for a given OpSystem from the Replication Manager Database.

HTTP URL: <baseURL>/ctMemphisGetDBEngines/

HTTP Verb: POST

Note:

  • EngineStatus values: -1 = invalid status, 0 = inactive, 1 = active, 2 = stopping, 3 = starting, 4 = checking, 5 = active with warning, 6 = unavailable, 7 = switching AvailGroup to new primary, 8 = unmanaged

Parameters:

  • request [IN] - Get DBEngines request in JSON format. For example:

{

"id": 0, // optional, if passed, retrieve

the DBEngine by its identification

"opSystem": 0, // optional, if not passed, it will return

all the dbengines from all the

opsystems, otherwise filter by opSystem

"volume": 0, // optional, if passed filter list

by Volume (working and local ones)

"workingVolume": 0, // optional, if passed with opSystem and

workingDir, retrieve DBEngine by its

working directory

"workingDir": "FairCom", // optional, if passed with opSystem and

workingVolume, retrieve DBEngine by its

working directory

"basic": false // optional, if passed as true return only

the basic information for the DBEngines

list, default is false

"paging": true, // optional, see Note 1 - Paging Parameters

"limit": 100, // optional, see Note 1 - Paging Parameters

"start": 200 // optional, see Note 1 - Paging Parameters

}

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

{

"dbEngineList": [

{

"id": 1,

"logicalName": "FAIRCOMS1@hostName",

"opSystem": 0,

"workingVolume": 0,

"workingDir": "FairCom",

"name": "FAIRCOMS1",

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

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

"statusTime": "2015-11-05T10:00:00",

"lastCheckTime": "2015-11-17T11:35:00",

"description": "Faircoms 1 DBEngine description",

"authContent": "I/9EO8\150=+881v",

"isSQL": 1,

"portNbr": 5587,

"sqlPortNbr": 6587,

"localVolume": 0,

"localDir": "FairCom\data",

"users": 150,

"releaseVersion": "10.5.0.23948(Build-140411)",

"serial": "39000010",

"licenseOEM": 1,

"licenseType": "2",

"licenseCPUNbr": 0,

"licenseServerType": "ALL (Standard - SQL)",

"licenseUserNbr": 150,

"isAgent": 1,

"replNodeID": "1.1.1.1",

"acceptConn": 1,

"readOnly": false, // can be true, false, or never.

"never" means its status can't be changed

"isMemphis": 0,

"ipAddress": 192.168.1.32,

"configFilePath": "C:/temp/ctsrvr_temp.cfg",

"ipList": [

{

"ip": "10.0.0.1",

"type": "ipV4"

},

{

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

"type": "ipV6"

}

],

"databaseList": [

{

"id": 1,

"dbEngine": 1,

"name": "database1",

"dictFileName": "c:\server\databases\database1\SQL_SYS\database1.fdd",

"isSQL": true

},

{

"id": 2,

"dbEngine": 1,

"name": "database2",

"dictFileName": "c:\server\databases\database2\database2.fdd",

"isSQL": false

}

],

"WebServerConfig": {

"listening_http_port": 8080,

"listening_https_port": 8443,

"ssl_certificate": "./web/fccert.pem",

"document_root": "./web/apps",

"applications": [

"ctree;ctrest.dll",

"AceMonitor;ctmonitor.dll",

"SQLExplorer;ctsqlexplorer.dll",

"ISAMExplorer;ctisamexplorer.dll",

"ReplicationManager;ctReplicationManager.dll",

]

}

},

{

"id": 2,

"logicalName": "FairCom2@hostName2",

"opSystem": 0,

"workingVolume": 0,

"workingDir": "FairCom2",

"name": "FAIRCOMS2",

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

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

"statusTime": "2015-11-05T10:00:00",

"lastCheckTime": "2015-11-17T11:35:00",

"description": "Faircoms 2 DBEngine description",

"authContent": "I/9EO8\150=+881v",

"isSQL": 1,

"portNbr": 5587,

"sqlPortNbr": 6587,

"localVolume": 0,

"localDir": "FairCom2\data",

"users": 150,

"releaseVersion": "10.5.0.23948(Build-140411)",

"serial": "39000010",

"licenseOEM": 1,

"licenseType": "2",

"licenseCPUNbr": 0,

"licenseServerType": "ALL (Standard - SQL)",

"licenseUserNbr": 150,

"isAgent": 0,

"replNodeID": "1.1.1.2",

"acceptConn": 1,

"readOnly": false, // can be true, false, or never.

"never" means status cannot be changed

"isMemphis": 0,

"ipAddress": 192.168.1.32,

"configFilePath": "C:/temp/ctsrvr_temp.cfg",

"ipList": [

{

"ip": "10.0.0.1",

"type": "ipV4"

},

{

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

"type": "ipV6"

}

],

"databaseList": [

{

"id": 3,

"dbEngine": 2,

"name": "database1",

"dictFileName": "c:\server2\databases\database1\SQL_SYS\database1.fdd",

"isSQL": true

},

{

"id": 4,

"dbEngine": 2,

"name": "database2",

"dictFileName": "c:\server2\databases\database2\database2.fdd",

"isSQL": false

}

]

}

]

"success": true,

"error":

{

"errorCode": 0,

"message": "Success"

},

"total": 500 // total number of dbengines for the query -

// see Note 1 - Paging Parameters

}

In basic mode:

{

"dbEngineList": [

{

"id": 1,

"logicalName": "FAIRCOMS1@hostName",

"opSystem": 0,

"name": "FAIRCOMS1",

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

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

"statusTime": "2015-11-05T10:00:00",

"lastCheckTime": "2015-11-17T11:35:00",

"localVolume": 0,

"localVolumeName": "C:",

"localDir": "FairCom1\data",

"replNodeID": "1.1.1.1",

"acceptConn": 1,

"readOnly": false, // can be true, false, or never.

The last case means status cannot be changed

"isMemphis": 0,

"configFilePath": "C:/temp/ctsrvr_temp.cfg",

"databaseList": [

{

"id": 3,

"dbEngine": 1,

"name": "database1",

"dictFileName": "c:\server2\databases\database1\SQL_SYS\database1.fdd",

"isSQL": true

},

{

"id": 4,

"dbEngine": 1,

"name": "database2",

"dictFileName": "c:\server2\databases\database2\database2.fdd",

"isSQL": false

}

],

"WebServerConfig": {

"listening_http_port": 8080,

"listening_https_port": 8443,

"ssl_certificate": "./web/fccert.pem",

"document_root": "./web/apps",

"applications": [

"ctree;ctrest.dll",

"AceMonitor;ctmonitor.dll",

"SQLExplorer;ctsqlexplorer.dll",

"ISAMExplorer;ctisamexplorer.dll",

"ReplicationManager;ctReplicationManager.dll",

]

}

},

{

"id": 2,

"logicalName": "FairCom2@hostName2",

"opSystem": 0,

"name": "FAIRCOMS2",

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

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

"statusTime": "2015-11-05T10:00:00",

"lastCheckTime": "2015-11-17T11:35:00",

"localVolume": 0,

"localVolumeName": "C:",

"localDir": "FairCom2\data",

"replNodeID": "1.1.1.2",

"acceptConn": 1,

"readOnly": false, // can be true, false, or never.

In the last case its status cannot be changed

"isMemphis": 0,

"configFilePath": "C:/temp/ctsrvr_temp.cfg",

"databaseList": [

{

"id": 1,

"dbEngine": 2,

"name": "database1",

"dictFileName": "c:\server\databases\database1\SQL_SYS\database1.fdd",

"isSQL": true

},

{

"id": 2,

"dbEngine": 2,

"name": "database2",

"dictFileName": "c:\server\databases\database2\database2.fdd",

"isSQL": false

}

]

}

]

"success": true,

"error":

{

"errorCode": 0,

"message": "Success"

},

"total": 500 // total number of dbengines for the query - see Note 1

}

Return:

Error code

TOCIndex