/hosts
GET /api/v1/hosts
GET /api/v1/hosts/{hostId}
PATCH /api/v1/hosts/{hostId}
POST /api/v1/hosts/{hostId}?cmd=
- GET /api/v1/hosts
Retrieve the list of current hosts.
Example request:
curl -X GET "http://localhost:4000/api/v1/hosts" -H "accept: application/json"
GET /api/v1/hosts HTTP/1.1 Host: localhost:4000 Accept: application/json, text/javascript
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json [ { "hostId": "10.0.0.175", "isLocal": true, "status": "Active" } ]
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – The host information was retrieved successfully
- Response JSON Array of Objects
hostId (string) – The ID of that particular host
isLocal (boolean) – Whether the host is local (if false, the host is remote).
status (string) – Current store status (Active, Not Ready, Inactive, Unknown)
- GET /api/v1/hosts/{hostId}
Retrieve information about a particular host.
Example request:
curl -X GET "http://localhost:4000/hosts/10.0.0.175" -H "accept: application/json"
GET /api/v1/hosts/10.0.0.175 HTTP/1.1 Host: localhost:4000 Accept: application/json, text/javascript
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "netInterface": "10.0.0.0", "subnetMask": "255.255.255.0", "multicastIP": "224.0.0.17", "useMulticast": true, "interconnectPort": 722, "serverPort": 721, "managementPort": 720, "sslServerPort": 724, "sslManagementPort": 723, "licenseKey": "XXXXXXXXXXXXXXXXXXXX", "acceptSSL": false, "queryIndexMode": 2, "useAutoNPF": true, "gatewayIP": "255.255.255.255", "netPerfFactor": 10, "autoJoin": false, "startupDelay": 5, "peerIPs": [ "10.0.0.175" ], "localStoreName": "NULL", "hostId": "10.0.0.175", "status": "Active", "isLocal": true, "apiEnabled": true, "maxLicensedSUL": 64, "maxRemoteClients": 64, "maintenanceDate": null, "keyDate": 1593500400000, "licensedVer": "5.0", "licensedGeos": "Full", "licensedHServer": false, "maxLicensedHostCount": 64, "maxReplicas": 1, "gridComputingEnabled": 2, "maxStoreMemoryMB": 100, "localSULsConsumed": 1, "networkInterfaces": [ "10.0.0.0", "10.4.0.0", "172.12.81.0" ], "numObjs": 0, "objMem": 0, "createRate": 0, "readRate": 0, "updateRate": 0, "deleteRate": 0, "numTimedObjs": 0, "numUntimedObjs": 3, "maxTimeout": 2, "serverVer": "5.8.18.349", "maxMemory": 0, "maxServerCache": 0, "compatVer": 202, "mgtPackEnabled": true, "maxEventTries": 1, "lruThreshold": 100, "replThreshold": 60, "maxClientCacheKB": 100000, "eventHandlerIP": "0.0.0.0", "keyPairTime": 1453017600000, "numSULsInUse": 1 }
- Response Headers
Content-Type – application/json
- Parameters
hostId – the ID of the host you want to retrieve information about
- Status Codes
200 OK – The information about the host has been retrieved successfully.
400 Bad Request – Bad request, see more information in the JSON response object.
400 Bad Request – We could not find a host with that ID, see more information in the JSON response object.
- Response JSON Object
code (string) – Error code
subcode (string) – Error subcode
message (string) – Description of the error
- PATCH /api/v1/hosts/{hostId}
Update the configuration on a given host.
Example request:
curl -X PATCH "http://localhost:4000/api/v1/hosts/10.0.0.75" -H "accept: application/json"
PATCH /api/v1/hosts/10.0.0.75 HTTP/1.1 Host: localhost:4000 Accept: application/json, text/javascript { "netInterface": "10.0.0.0", "subnetMask": "255.255.255.0", "multicastIP": "224.0.0.17", "useMulticast": true, "interconnectPort": 722, "serverPort": 721, "managementPort": 720, "sslServerPort": 724, "sslManagementPort": 723, "licenseKey": "XXXXXXXXXXXXXXXXXXXX", "acceptSSL": true, "queryIndexMode": 1, "useAutoNPF": false, "gatewayIP": "10.0.0.175", "netPerfFactor": "", "autoJoin": true, "startupDelay": 0, "peerIPs": [], "localStoreName": "local" }
Example response:
HTTP/1.1 204 OK Vary: Accept Content-Type: application/json
- Response Headers
Content-Type – application/json
- Parameters
hostId – the ID of the host you want to retrieve information about
- JSON Parameters
config – the new configuration to apply to the host, passed in the request body as JSON
- Status Codes
204 No Content – The command was run successfully
500 Internal Server Error – Internal error, see more information in the JSON response object.
- Response JSON Object
code (string) – Error code
subcode (string) – Error subcode
message (string) – Description of the error
- POST /api/v1/hosts/{hostId}?cmd=
Execute a command on a given host.
Example request:
curl -X POST "http://localhost:4000/api/v1/hosts/10.0.0.75?cmd=join" -H "accept: application/json"
POST /api/v1/hosts/10.0.0.75?cmd=join HTTP/1.1 Host: localhost:4000 Accept: application/json, text/javascript
Example response:
HTTP/1.1 204 OK Vary: Accept Content-Type: application/json
- Response Headers
Content-Type – application/json
- Parameters
hostId – the ID of the host you want to retrieve information about
- Query Parameters
cmd – the command you want to run on the host. One of
join
,leave
,restart
,restartnow
,logstats
,connectcreate
,connect
,create
,disconnect
,createkeypair
- Status Codes
204 No Content – The command was run successfully
400 Bad Request – Unknown command, see more information in the JSON response object.
- Response JSON Object
code (string) – Error code
subcode (string) – Error subcode
message (string) – Description of the error