Client API: Container Apps: Databases
The 6 Client API operations for databases.
Part of Container Apps.
Operations
Section titled Operations| Method | Path | Summary |
|---|---|---|
| GET | /api/v1/client/servers/{uuid}/databases |
List databases for a server |
| POST | /api/v1/client/servers/{uuid}/databases |
Create a new database |
| DELETE | /api/v1/client/servers/{uuid}/databases/{db_id} |
Delete a database |
| GET | /api/v1/client/servers/{uuid}/databases/{db_id}/credentials |
Reveal the stored password for a database on this server |
| POST | /api/v1/client/servers/{uuid}/databases/{db_id}/retry |
Retry a failed or stuck database operation |
| POST | /api/v1/client/servers/{uuid}/databases/{db_id}/rotate-password |
Rotate database password |
List databases for a server
Section titled List databases for a serverGET /api/v1/client/servers/{uuid}/databases
List databases for a server.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
A 200 response is a list; each item has these fields:
| Field | Type |
|---|---|
[].id |
integer |
[].uuid |
string or null |
[].server_id |
integer or null |
[].database_host_id |
integer |
[].name |
string |
[].username |
string |
[].password |
string or null |
[].remote |
string or null |
[].remote_connect_string |
string or null |
[].max_connections |
integer |
[].host |
string or null |
[].port |
integer or null |
[].host_name |
string or null |
[].uri |
string or null |
[].jdbc |
string or null |
[].status |
string |
[].status_message |
string or null |
[].last_error |
string or null |
[].operation |
string or null |
[].busy |
boolean |
[].colocated |
boolean or null |
[].db_name |
string or null |
[].created_at |
string (date-time) or null |
[].updated_at |
string (date-time) or null |
Create a new database
Section titled Create a new databasePOST /api/v1/client/servers/{uuid}/databases
Create a new database.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
Idempotency-Key |
header | string or null | no |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
database_host_id |
integer or null | no |
name_suffix |
string | no |
remote |
string | no |
idempotency_key |
string or null | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
201 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Fields of a 201 response:
| Field | Type |
|---|---|
id |
integer |
uuid |
string or null |
server_id |
integer or null |
database_host_id |
integer |
name |
string |
username |
string |
password |
string or null |
remote |
string or null |
remote_connect_string |
string or null |
max_connections |
integer |
host |
string or null |
port |
integer or null |
host_name |
string or null |
uri |
string or null |
jdbc |
string or null |
status |
string |
status_message |
string or null |
last_error |
string or null |
operation |
string or null |
busy |
boolean |
colocated |
boolean or null |
db_name |
string or null |
created_at |
string (date-time) or null |
updated_at |
string (date-time) or null |
Delete a database
Section titled Delete a databaseDELETE /api/v1/client/servers/{uuid}/databases/{db_id}
Delete a database.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
db_id |
path | integer | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Reveal the stored password for a database on this server
Section titled Reveal the stored password for a database on this serverGET /api/v1/client/servers/{uuid}/databases/{db_id}/credentials
Reveal the stored password for a database on this server.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
db_id |
path | integer | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Fields of a 200 response:
| Field | Type |
|---|---|
id |
integer |
uuid |
string or null |
server_id |
integer or null |
database_host_id |
integer |
name |
string |
username |
string |
password |
string or null |
remote |
string or null |
remote_connect_string |
string or null |
max_connections |
integer |
host |
string or null |
port |
integer or null |
host_name |
string or null |
uri |
string or null |
jdbc |
string or null |
status |
string |
status_message |
string or null |
last_error |
string or null |
operation |
string or null |
busy |
boolean |
colocated |
boolean or null |
db_name |
string or null |
created_at |
string (date-time) or null |
updated_at |
string (date-time) or null |
Retry a failed or stuck database operation
Section titled Retry a failed or stuck database operationPOST /api/v1/client/servers/{uuid}/databases/{db_id}/retry
Retry a failed or stuck database operation.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
db_id |
path | integer | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Rotate database password
Section titled Rotate database passwordPOST /api/v1/client/servers/{uuid}/databases/{db_id}/rotate-password
Rotate database password.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
db_id |
path | integer | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |