List databases on a server.
GET /api/server/{id}/databases
Example request :
curl "https://cloud.boxydev.com/api/server/1/databases" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
Example response :
{
"data": [
{
"id": 1,
"name": "cloud",
"status": "installed",
"created_at": "2022-08-17T18:10:37.000000Z"
}
],
"links": {
"first": "https://cloud.boxydev.com/api/server/1/databases?page=1",
"last": "https://cloud.boxydev.com/api/server/1/databases?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://cloud.boxydev.com/api/server/1/databases",
"per_page": 20,
"to": 1,
"total": 1
}
}
Show a database.
GET /api/database/{id}
Example request :
curl "https://cloud.boxydev.com/api/database/1" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
Example response :
{
"id": 1,
"name": "cloud",
"status": "installed",
"created_at": "2022-08-17T18:10:37.000000Z"
}
Create a database.
POST /api/server/{id}/database
Parameters :
Parameter | Description |
---|---|
name | The database name. |
Example request :
curl "https://cloud.boxydev.com/api/server/1/database" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "fiofio"
}'
Example response :
{
"id": 1,
"name": "fiofio",
"status": "installing",
"created_at": "2022-08-19T22:01:19.000000Z"
}
Delete a database.
DELETE /api/database/{id}
Example request :
curl -X DELETE "https://cloud.boxydev.com/api/database/1" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"