Product Documentation

FairCom Replication JSON RPC API

Previous Topic

Next Topic

ctMemphisPersistDatabase

int ctMemphisPersistDatabase( pRCESJson request, ppRCESJson result )

Description:

Persist a Database into the Replication Manager Database. If it doesn't exist, create it, otherwise updated 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>/ctMemphisPersistDatabase/

HTTP Verb: POST

Constraints:

  • "dbEngine" must be an existing DBEngine ID;
  • "name" is not NULL, not EMPTY and Unique per DBEngine;
  • "dictFileName" is not NULL and not EMPTY;

Parameters:

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

{

"database": {

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

"dbEngine": 0, // required

"name": "database3", // required

"dictFileName": "c:\server\databases\database3\SQL_SYS\database3.fdd", // required

"isSQL": true // optional

}

}

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

{

"success": true,

"error":

{

"errorCode": 0,

"message": "Success"

},

"id": 2

}

Return:

Error code

TOCIndex