Client — FTP
Bu sayfa henüz Türkçeye çevrilmedi. İngilizce sürüm gösteriliyor.
GET /api/v1/client/ftp
List FTP accounts (client)
Return all FTP accounts owned by the authenticated client.
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/ftp
POST /api/v1/client/ftp
Create FTP account (client)
Create a new FTP account under the authenticated client. Plan limit enforced server-side.
Body fields:
| Field | Type | Required | Notes |
|---|---|---|---|
directory |
string | no | default /; minLength=1; maxLength=255; pattern=^/[a-zA-Z0-9/_.\-]*$ |
password |
string | yes | minLength=8; maxLength=128 |
quota_mb |
integer | no | default 0; minimum=0.0; maximum=999999.0 |
username |
string | yes | minLength=1; maxLength=32 |
Request body example:
{
"directory": "/",
"password": "REPLACE_ME",
"quota_mb": 0,
"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/ftp
DELETE /api/v1/client/ftp/{ftp_user}
Delete FTP account (client)
Delete an FTP account owned by the authenticated client.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
ftp_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/ftp/{ftp_user}
PUT /api/v1/client/ftp/{ftp_user}
Update FTP account (client)
Update an FTP account (password, directory, or quota) owned by the authenticated client. Fields equal to the stored values are not a change; a request that changes nothing writes no audit entry.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
ftp_user |
string | yes | — |
Body fields:
| Field | Type | Required | Notes |
|---|---|---|---|
directory |
string | no | — |
password |
string | no | — |
quota_mb |
integer | no | — |
Request body example:
{
"directory": "string",
"password": "string",
"quota_mb": 0
}
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 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/ftp/{ftp_user}
Yukarıda bulamadığınız her şey için destek ekibimiz her zaman yanınızda.