List database users on a server.
GET /api/server/{id}/database-users
Example request :
curl "https://cloud.boxydev.com/api/server/1/database-users" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
Example response :
{
"data": [
{
"id": 1,
"name": "fiorella",
"status": "installed",
"databases": [1],
"created_at": "2022-08-17T18:10:37.000000Z"
}
],
"links": {
"first": "https://cloud.boxydev.com/api/server/1/database-users?page=1",
"last": "https://cloud.boxydev.com/api/server/1/database-users?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://cloud.boxydev.com/api/server/1/database-users",
"per_page": 20,
"to": 1,
"total": 1
}
}
Show a database user.
GET /api/database-user/{id}
Example request :
curl "https://cloud.boxydev.com/api/database-user/1" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
Example response :
{
"id": 1,
"name": "fiorella",
"status": "installed",
"databases": [1],
"created_at": "2022-08-17T18:10:37.000000Z"
}
Create a database user.
POST /api/server/{id}/database-users
Parameters :
Parameter | Description |
---|---|
name | The user name. |
password | The user password. |
databases | The databases the user has access to. [1, 2, 3] for instance. |
Example request :
curl "https://cloud.boxydev.com/api/server/1/database-user" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "fiorella",
"password": "password",
"databases": [1]
}'
Example response :
{
"id": 1,
"name": "fiorella",
"status": "installing",
"databases": [1],
"created_at": "2022-08-20T06:07:22.000000Z"
}
Update a database user.
PUT /api/database-user/{id}
Parameters :
Parameter | Description |
---|---|
password | The user password. |
databases | The databases the user has access to. [1, 2, 3] for instance. |
Example request :
curl -X PUT "https://cloud.boxydev.com/api/database-user/1" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"password": "new-password",
"databases": [2]
}'
Example response :
{
"id": 1,
"name": "fiorella",
"status": "updating",
"databases": [2],
"created_at": "2022-08-20T06:12:42.000000Z"
}
Delete a database user.
DELETE /api/database-user/{id}
Example request :
curl -X DELETE "https://cloud.boxydev.com/api/database-user/1" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"