Product Documentation

FairCom Replication JSON RPC API

Previous Topic

Next Topic

ctMemphisPersistSubscription

int ctMemphisPersistSubscription( pRCESJson request, ppRCESJson result )

Description:

Persist a Subscription into the Replication Manager Database. If it doesn't exist, create it, otherwise update it. In order 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>/ctMemphisPersistSubscription/

HTTP Verb: POST

Constraints:

  • "name" is not NULL, not EMPTY and unique per DBEngine.
  • "replPlan" must be an existing Replication Plan ID.
  • "publication" must be an existing Publication ID.
  • "dbEngine" must be an existing DBEngine ID.
  • If "database" is provided, it must be an existing Database ID.

Parameters:

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

{

"subscription": {

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

for update

"name": "subscription3", // required

"description": "General subscription", // optional

"replPlan": 0, // required

"publication": 3, // required

"dbEngine": 3, // required

"redirectionList": [ // optional - if not provided assumes

no redirection

{

"sourcePath": "C:\sourcePath1",

"targetPath": "C:\targetPath1"

},

{

"sourcePath": "C:\sourcePath2",

"targetPath": "C:\targetPath2"

}

],

"isBiDirectional": // optional, if not provided, default is false

}

}

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

{

"success": true,

"error":

{

"errorCode": 0,

"message": "Success"

},

"id": 3

}

Return:

Error code

TOCIndex