Product Documentation

FairCom Replication JSON RPC API

Previous Topic

Next Topic

ctMemphisGetHardwares

int ctMemphisGetHardwares( pRCESJson request, ppRCESJson result )

Description:

Retrieve all the hardware for a given Site from the Replication Manager Database.

HTTP URL: <baseURL>/ctMemphisGetHardwares/

HTTP Verb: POST

Parameters:

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

{

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

the Hardware by ID

"mac": "00-00-00-00-00-00", // optional, if passed, retrieve

the Hardware by MAC address

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

all the hardware from all the sites

"name": "hardware1", // optional, if passed with site,

retrieve the Hardware by Name

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

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

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

}

Note: If "site" is not provided, it will return all the hardware from the Replication Manager Database.

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

{

"hardwareList": [

{

"id": 1,

"site": 0,

"name": "hardware1",

"macList": [

{

"mac": "00-00-00-00-00-00",

"type": "ethernet"

},

{

"mac": "00-00-00-00-00-01",

"type": "ethernet"

}

],

"description": "hardware 1 description",

"memory": 16,

"diskSpace": 1000,

"cpu": 8

},

{

"id": 2,

"site": 0,

"name": "hardware2",

"macList": [

{

"mac": "11-11-11-11-11-11",

"type": "ethernet"

},

{

"mac": "11-11-11-11-11-12",

"type": "ethernet"

}

],

"description": "hardware 2 description",

"memory": 32,

"diskSpace": 8000,

"cpu": 32

}

]

"success": true,

"error":

{

"errorCode": 0,

"message": "Success"

},

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

see Note 1 - Paging Parameters

}

Return:

Error code

TOCIndex