Product Documentation

FairCom Replication JSON RPC API

Previous Topic

Next Topic

ctMemphisPersistOS

int ctMemphisPersistOS( pRCESJson request, ppRCESJson result )

Description:

Persist a OpSystem 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; the update will be done by the ID.

HTTP URL: <baseURL>/ctMemphisPersistOS/

HTTP Verb: POST

Constraints:

  • "hardware" must be an existing Hardware ID;
  • "name" is not NULL, not EMPTY and Unique per Hardware;
  • "hostname" is not NULL, not EMPTY and Unique;

Parameters:

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

{

"opSystem": {

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

existing ID for update

"hardware": 0, // required

"name": "name3", // required

"hostname": "host3", // required

"platform": "MacOSX" // required

"ipList": [ // optional

{

"ip": "10.0.0.3",

"type": "ipV4"

},

{

"ip": "0000:0000:0000:0000:0000:0000:0000:0003",

"type": "ipV6"

}

],

"description": "OpSystem 3 description", // optional

"memory": 16, // optional

"diskSpace": 1000, // optional

"cpu": 8, // optional

"type": "MacOSX", // optional

"edition": "Mavericks" // optional

}

}

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

{

"success": true,

"error":

{

"errorCode": 0,

"message": "Success"

},

"id": 1

}

Return:

Error code

TOCIndex