/remstores
GET /api/v1/remstores
POST /api/v1/remstores
GET /api/v1/remstores/{uriName}
PATCH /api/v1/remstores/{uriName}
DELETE /api/v1/remstores/{uriName}
POST /api/v1/remstores/{uriName}?cmd=
- GET /api/v1/remstores
Retrieve the list of current remote stores.
Example request:
curl -X GET "http://localhost:4000/api/v1/remstores" -H "accept: application/json"
GET /api/v1/remstores HTTP/1.1 Host: localhost:4000 Accept: application/json, text/javascript
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json [ { "uriName": "10.0.0.74", "status": "Active", "requestRateFromInfo": "", "activeGatewayCount": 1, "isSyncing": true, "requestRateFromStats": 124, "requestQueueLength": 21 } ]
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – The remote hosts information was retrieved successfully
- Response JSON Array of Objects
uriName (string) – The URI-safe name to use in
/remstores/{uriName}
status (string) – Current status of the store(Active, Not Ready, Inactive, Unknown)
requestRateFromInfo (string) – DO NOT USE - This number is inaccurate. Use RequestRateFromStats instead.
activeGatewayCount (integer) –
isSyncing (boolean) – This is a read-only status property
requestRateFromStats (integer) – This is the preferred and accurate Remote Store Request Rate value (compared to
requestRateFromInfo
)requestQueueLength (integer) –
- POST /api/v1/remstores
Create a new Remote store.
Example request:
curl -X POST "http://localhost:4000/api/v1/remstores" -H "accept: application/json"
POST /api/v1/remstores HTTP/1.1 Host: localhost:4000 Accept: application/json, text/javascript { "name": "10.0.0.175", "managementPort": 723, "autoStart": true, "accessMode": "", "useSSL": true, "gateways": ["10.0.0.0"] }
Example response:
HTTP/1.1 204 OK Vary: Accept Content-Type: application/json
- Response Headers
Content-Type – application/json
- JSON Parameters
config – Remote store config. No uriName is necessary but the Store name must be set in the JSON object passed in the request body.
- Status Codes
204 No Content – The remote host was created successfully.
400 Bad Request – Invalid request. See more information in the JSON response.
- Response JSON Object
code (string) – Error code
subcode (string) – Error subcode
message (string) – Description of the error
- GET /api/v1/remstores/{uriName}
Retrieve information about a particular remote store.
Example request:
curl -X GET "http://localhost:4000/api/v1/remstores/10.0.0.175" -H "accept: application/json"
GET /api/v1/remstores/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 { "name": "10.0.0.175", "managementPort": 723, "autoStart": true, "accessMode": "", "useSSL": true, "gateways": ["10.0.0.0"] }
- Response Headers
Content-Type – application/json
- Parameters
uriName – 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/remstores/{uriName}
Update the configuration on a given remote store.
Example request:
curl -X PATCH "http://localhost:4000/api/v1/remstores/10.0.0.75" -H "accept: application/json"
PATCH /api/v1/remstores/10.0.0.75 HTTP/1.1 Host: localhost:4000 Accept: application/json, text/javascript { "name": "10.0.0.175", "managementPort": 723, "autoStart": true, "accessMode": "", "useSSL": true, "gateways": ["10.0.0.0"] }
Example response:
HTTP/1.1 204 OK Vary: Accept Content-Type: application/json
- Response Headers
Content-Type – application/json
- Parameters
uriName – the ID of the store you want to update.
- JSON Parameters
config – the new configuration to apply to the host, passed in the request body as JSON. The Store Name in the DTO is optional, but must match the Remote Store referenced by the uriName if present. We do not support renaming Remotes yet.
- 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
- DELETE /api/v1/remstores/{uriName}
Delete a given remote store.
Example request:
curl -X DELETE "http://localhost:4000/api/v1/remstores/10.0.0.75" -H "accept: application/json"
DELETE /api/v1/remstores/10.0.0.75 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
uriName – the ID of the host you want to retrieve information about
- Status Codes
204 No Content – The command was run successfully
400 Bad Request – Bad request, see more information in the JSON response object.
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/remstores/{uriName}?cmd=
Execute a command on the given store.
Example request:
curl -X POST "http://localhost:4000/api/v1/remstores?cmd=start" -H "accept: application/json"
POST /api/v1/remstores?cmd=start 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
uriName – A string representation of the IP address of the remote host.
- Query Parameters
cmd – Command to execute on the remote store. One of
start
,sync
,stop
,populate
,test
.
- Status Codes
204 No Content – The command was executed successfully.
404 Not Found – Remote store was not found.
400 Bad Request – Invalid request. See more information in the JSON response.
- Response JSON Object
code (string) – Error code
subcode (string) – Error subcode
message (string) – Description of the error