Client — Cron
Bu sayfa henüz Türkçeye çevrilmedi. İngilizce sürüm gösteriliyor.
GET /api/v1/client/cron
List cron jobs (client)
Return all cron jobs 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/cron
POST /api/v1/client/cron
Create cron job (client)
Create a new cron job for the authenticated client account.
Body fields:
| Field | Type | Required | Notes |
|---|---|---|---|
command |
string | yes | maxLength=1024 |
day |
string | no | default *; maxLength=120 |
enabled |
boolean | no | default True |
hour |
string | no | default *; maxLength=120 |
minute |
string | no | default *; maxLength=120 |
month |
string | no | default *; maxLength=120 |
weekday |
string | no | default *; maxLength=120 |
Request body example:
{
"command": "string",
"day": "*",
"enabled": true,
"hour": "*",
"minute": "*",
"month": "*",
"weekday": "*"
}
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/cron
DELETE /api/v1/client/cron/{cron_id}
Delete cron job (client)
Delete a cron job owned by the authenticated client account.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
cron_id |
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/cron/{cron_id}
PUT /api/v1/client/cron/{cron_id}
Update cron job (client)
Update a cron job (schedule, command, or enabled flag) owned by the authenticated client account.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
cron_id |
string | yes | — |
Body fields:
| Field | Type | Required | Notes |
|---|---|---|---|
command |
string | no | — |
day |
string | no | — |
enabled |
boolean | no | — |
hour |
string | no | — |
minute |
string | no | — |
month |
string | no | — |
weekday |
string | no | — |
Request body example:
{
"command": "string",
"day": "string",
"enabled": false,
"hour": "string",
"minute": "string",
"month": "string",
"weekday": "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 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/cron/{cron_id}
POST /api/v1/client/cron/{cron_id}/run
Run cron job now (client)
Execute a cron job immediately for the authenticated client account; returns exit status.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
cron_id |
string | yes | — |
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)" \
https://your-server:2000/api/v1/client/cron/{cron_id}/run
Yukarıda bulamadığınız her şey için destek ekibimiz her zaman yanınızda.