Root endpoint will be http(s)://hostname/v1
Unauthorized access will result in 401 UnAuthorized response.
HTTP/1.1 401 Unauthorized
Content-Type: application/json
Content-Length: 26
{"message":"Unauthorized"}
Invalid JSON will result in a 400 Bad Request response.
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 35
{"message":"Problems parsing JSON"}
Invalid fields will result in a 422 Unprocessable Entity response.
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
Content-Length: 176
{
"message": "Invalid inputs",
"errors": [
{
"field": "name",
"code": "missing_field"
}
]
}
If all the inputs are valid but failed to execute the required Gluster commands
HTTP/1.1 500 Internal Server Error
Content-Type: application/json
Content-Length: 79
{"message":"Connection failed. Please check if gluster daemon is operational."}
Admin user can be created by running /register
. With this endpoint only first user can be created and first user will become Admin.
Only first user creation will work without authentication, Admin access required to create more users(Not Yet implemented)
PUT /users/:username
Parameters:
Name | Type | Description |
---|---|---|
password | string | Password |
groups | string | Add the user to Groups |
Registerd user can change password using this REST endpoint
POST /users/:username/passwd
Parameters:
Name | Type | Description |
---|---|---|
current_password | string | Current Password |
new_password | string | New Password |
PUT /peers/:hostname
Parameters:
None
Output:
HTTP/1.1 201 Created
{"id": "307b3c4b-63be-473e-ba6d-ea9c33ebefe6"}
DELETE /peers/:hostname
Parameters:
None
Output:
HTTP/1.1 204 No Content
PUT /volumes/:name
POST /volumes/:name/start
POST /volumes/:name/stop
POST /volumes/:name/restart
DELETE /volumes/:name
PUT /georep/:mastervol/:slaveurl/:slavevol
Parameters:
Name | Type | Description |
---|---|---|
force | bool | Optional. Force option to recreate the same session |
POST /georep/:mastervol/:slavehost/:slavevol/start
Parameters:
Name | Type | Description |
---|---|---|
force | bool | Optional. Force option to start the session |
POST /georep/:mastervol/:slavehost/:slavevol/stop
Parameters:
Name | Type | Description |
---|---|---|
force | bool | Optional. Force option to stop the session |
POST /georep/:mastervol/:slavehost/:slavevol/restart
Parameters:
Name | Type | Description |
---|---|---|
force | bool | Optional. Force option to restart the session |
GET /georep
Parameters:
Name | Type | Description |
---|---|---|
master_volume | string | Optional. Master Volume Name |
slave_url | string | Optional. Slave Host username@slavehost |
slave_volume | string | Optional. Slave Volume Name |
PUT /snapshot/:name
POST /snapshot/:name/clone
POST /snapshot/:name/restore
DELETE /snapshot/:name
POST /snapshot/:name/activate
POST /snapshot/:name/deactivate