Client — Databases
Bu sayfa henüz Türkçeye çevrilmedi. İngilizce sürüm gösteriliyor.
GET /api/v1/client/databases
List databases (client)
Return all databases owned by the authenticated client account.
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_list_dict_str__Any___ |
Successful Response |
Response example (200):
{
"data": [
{}
],
"message": "",
"status": "success",
"warnings": [
"string"
]
}
cURL example:
curl -X GET \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
https://your-server:2000/api/v1/client/databases
POST /api/v1/client/databases
Create database (client)
Create a database for the authenticated client account. Plan limit enforced.
Body fields:
| Field | Type | Required | Notes |
|---|---|---|---|
charset |
string | no | default utf8mb4 |
collation |
string | no | default utf8mb4_unicode_ci |
name |
string | yes | minLength=1; maxLength=47; pattern=^[a-z][a-z0-9_]{0,46}$ |
Request body example:
{
"charset": "utf8mb4",
"collation": "utf8mb4_unicode_ci",
"name": "string"
}
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_dict_str__Any__ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {},
"message": "",
"status": "success",
"warnings": [
"string"
]
}
cURL example:
curl -X POST \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
-H "Content-Type: application/json" \
-d @body.json \
https://your-server:2000/api/v1/client/databases
GET /api/v1/client/databases/phpmyadmin-url
Get phpMyAdmin SSO URL (client)
Mint an ephemeral phpMyAdmin SSO token bound to a tenant-scoped MariaDB user (5-minute TTL, scoped to the client's own databases).
Query parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
db |
string | no | — |
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_dict_str__Any__ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {},
"message": "",
"status": "success",
"warnings": [
"string"
]
}
cURL example:
curl -X GET \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
https://your-server:2000/api/v1/client/databases/phpmyadmin-url
DELETE /api/v1/client/databases/{db_name}
Delete database (client)
Delete a database owned by the authenticated client account.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
db_name |
string | yes | — |
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
MessageResponse |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"message": "string",
"status": "success"
}
cURL example:
curl -X DELETE \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
https://your-server:2000/api/v1/client/databases/{db_name}
GET /api/v1/client/databases/{db_name}/remote-hosts
List database remote hosts (client)
Return all allowed remote hosts for a database owned by the authenticated client account.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
db_name |
string | yes | — |
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_list_dict_str__Any___ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": [
{}
],
"message": "",
"status": "success",
"warnings": [
"string"
]
}
cURL example:
curl -X GET \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
https://your-server:2000/api/v1/client/databases/{db_name}/remote-hosts
POST /api/v1/client/databases/{db_name}/remote-hosts
Add database remote host (client)
Add an allowed remote host to a database owned by the authenticated client account.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
db_name |
string | yes | — |
Body fields:
| Field | Type | Required | Notes |
|---|---|---|---|
host |
string | yes | — |
note |
string | no | default `` |
Request body example:
{
"host": "string",
"note": ""
}
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_dict_str__Any__ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {},
"message": "",
"status": "success",
"warnings": [
"string"
]
}
cURL example:
curl -X POST \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
-H "Content-Type: application/json" \
-d @body.json \
https://your-server:2000/api/v1/client/databases/{db_name}/remote-hosts
DELETE /api/v1/client/databases/{db_name}/remote-hosts/{host}
Remove database remote host (client)
Remove an allowed remote host from a database owned by the authenticated client account.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
db_name |
string | yes | — |
host |
string | yes | — |
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
MessageResponse |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"message": "string",
"status": "success"
}
cURL example:
curl -X DELETE \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
https://your-server:2000/api/v1/client/databases/{db_name}/remote-hosts/{host}
POST /api/v1/client/databases/{db_name}/users
Create database user (client)
Create a MariaDB user with privileges on the given database, owned by the authenticated client account.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
db_name |
string | yes | — |
Body fields:
| Field | Type | Required | Notes |
|---|---|---|---|
host |
string | no | default localhost |
password |
string | yes | — |
privileges |
array |
no | — |
username |
string | yes | minLength=1; maxLength=15; pattern=^[a-z][a-z0-9_]{0,14}$ |
Request body example:
{
"host": "localhost",
"password": "REPLACE_ME",
"privileges": [
"string"
],
"username": "alice"
}
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_dict_str__Any__ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {},
"message": "",
"status": "success",
"warnings": [
"string"
]
}
cURL example:
curl -X POST \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
-H "Content-Type: application/json" \
-d @body.json \
https://your-server:2000/api/v1/client/databases/{db_name}/users
DELETE /api/v1/client/databases/{db_name}/users/{db_user}
Delete database user (client)
Delete a database user owned by the authenticated client account.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
db_name |
string | yes | — |
db_user |
string | yes | — |
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
MessageResponse |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"message": "string",
"status": "success"
}
cURL example:
curl -X DELETE \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
https://your-server:2000/api/v1/client/databases/{db_name}/users/{db_user}
PUT /api/v1/client/databases/{db_name}/users/{db_user}
Update database user (client)
Update a database user (e.g. change password) owned by the authenticated client account.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
db_name |
string | yes | — |
db_user |
string | yes | — |
Body fields:
| Field | Type | Required | Notes |
|---|---|---|---|
password |
string | no | — |
Request body example:
{
"password": "string"
}
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
MessageResponse |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"message": "string",
"status": "success"
}
cURL example:
curl -X PUT \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
-H "Content-Type: application/json" \
-d @body.json \
https://your-server:2000/api/v1/client/databases/{db_name}/users/{db_user}
Yukarıda bulamadığınız her şey için destek ekibimiz her zaman yanınızda.