cleanup.php¶
Cleanup and maintenance module for managing stalled deployments, system tasks, and automated cleanup processes.
cleanup/autodeploy_timeout¶
Checks for stalled deployments caused by autodeploy timeouts and returns the list of processed items.
HTTP method: POST|GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: autodeploy_timeout |
| - | - | - | No other parameter |
Request example
Success response example
Error examples
cleanup/check_email¶
Sends a test email from the system's debug address to verify that the SMTP connection is working correctly.
HTTP method: POST|GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: check_email |
| - | - | - | No other parameter |
Request example
Success response example
cleanup/check_vm¶
Checks the status of virtual machines based on specified filters like count, skip, and status.
HTTP method: GET|POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: check_vm |
| count | ❌ | integer | Number of VMs to process. |
| skip | ❌ | integer | Number of records to skip for pagination. |
| status | ❌ | string | Filter VMs by their current status. |
Request example
cleanup/cleanup_auth_attempts¶
Cleans up failed authentication attempts to prevent brute-force attacks.
HTTP method: POST|GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: cleanup_auth_attempts |
| - | - | - | No other parameter |
Request example
cleanup/cleanup_db¶
This endpoint is a no-op as cleanup is handled by the background scheduler.
HTTP method: POST|GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: cleanup_db |
| - | - | - | No other parameter |
Request example
Success response example
cleanup/cleanup_ipmi¶
Performs maintenance on IPMI IP addresses, cleans up NAT rules, NoVNC sessions, ISO mounts, and unblocks expired IP blocks.
HTTP method: POST|GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: cleanup_ipmi |
| - | - | - | No other parameter |
Request example
cleanup/cleanup_iso¶
Cleans up outdated ISO mounts based on the specified number of days.
HTTP method: GET|POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: cleanup_iso |
| days | ❌ | integer | Number of days to keep ISO mounts. Must be a positive integer. |
Request example
cleanup/cleanup_old_ip_ranges¶
Cleans up old IPv4 IP ranges that have been moved to old ranges and are older than 30 days.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: cleanup_old_ip_ranges |
| - | - | - | No other parameter |
Request example
Success response example
Error examples
cleanup/cleanup_s3_journal¶
Clears the S3 journal history nodes.
HTTP method: POST|GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: cleanup_s3_journal |
| - | - | - | No other parameter |
Request example
cleanup/cleanup_servers¶
Performs comprehensive maintenance on server data, including clearing unused tags, updating EQ height, cleaning RR records, and purging stalled TT servers.
HTTP method: GET|POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: cleanup_servers |
| - | - | - | No other parameter |
Request example
Success response example
cleanup/cleanup_traffic¶
Performs maintenance on traffic data by updating periods and cleaning up shaped traffic.
HTTP method: POST|GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: cleanup_traffic |
| - | - | - | No other parameter |
Request example
Success response example
cleanup/cleanup_upgrade_invoices¶
Searches for old upgrade invoices and cancels them. Returns a summary of processed invoices.
HTTP method: POST|GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: cleanup_upgrade_invoices |
| age | ❌ | integer | Maximum allowed invoice age in days. |
Request example
Success response example
cleanup/get_currency_rates¶
Returns the current exchange rates for EUR costs.
HTTP method: GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: get_currency_rates |
| - | - | - | No other parameter |
Request example
cleanup/reload_traffic_data¶
Reloads traffic data and updates counters for a specific entity.
HTTP method: POST|GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: reload_traffic_data |
| id | ✅ | integer | The ID of the entity for which traffic data should be reloaded. |
Request example
cleanup/sync_billing_status¶
Synchronizes component billing statuses by checking components that have upcoming due dates and matching them with WHMCS data.
HTTP method: GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: sync_billing_status |
| billing | ❌ | string | Specific billing type to filter by. If empty, all non-hand types are processed. |
Request example
Success response example
cleanup/update_billing_currency_rates¶
Updates WHMCS currency rates for a specific location or all locations if none is provided.
HTTP method: POST|GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: update_billing_currency_rates |
| location | ❌ | string | Billing location to update. If empty, all locations are updated. |
Request example
Success response example
Error examples
cleanup/update_components¶
Triggers the update of component locations in the system and returns the execution time.
HTTP method: POST|GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: update_components |
| - | - | - | No other parameter |
Request example
Success response example
cleanup/update_currency_rates¶
Updates EUR costs based on current exchange rates and cleans up server tags.
HTTP method: GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: update_currency_rates |
| - | - | - | No other parameter |
Request example
Success response example
cleanup/update_hw_config¶
Triggers an hourly update of hardware configurations for all servers.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: update_hw_config |
| - | - | - | No other parameter |
Request example
cleanup/update_jira_organizations¶
Synchronizes Jira organizations with the system data.
HTTP method: POST|GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: update_jira_organizations |
| - | - | - | No other parameter |
Request example
Success response example
Error examples
cleanup/update_rates¶
Updates pricing/costs for servers based on specific stages or a single server ID. Supports dry run and quiet modes.
HTTP method: GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: update_rates |
| server_id | ❌ | integer | Specific server ID to check/update price for. |
| stage | ❌ | integer | The stage of update process. 1: Sale servers, 2: NL rent, 3: US rent, 4: RU rent, 5: FI rent, 6: DE rent, 7: All infra, 8: IS rent, 9: TR rent, 10: UK rent, 11: FR rent, 12: ES rent, 13: IT rent, 14: PL rent. |
| dry_run | ❌ | boolean | If set to 1, performs a dry run without actual updates. |
| quiet | ❌ | integer | Quiet mode flag. Default is 1. |
| batch | ❌ | integer | Batch size for processing (overrides default if > 0). |
Request example
cleanup/update_traffic_rates¶
Performs actualization of cost_trafficIN and cost_traffic for active servers based on specified filters.
HTTP method: POST|GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: update_traffic_rates |
| dry_run | ❌ | boolean | If present, the operation is performed in dry-run mode (testing only). |
| location | ❌ | string | Location filter for traffic rate updates. |
| limit | ❌ | integer | Maximum number of records to process in this batch. |
| offset | ❌ | integer | Offset for pagination in the update process. |
Request example
Success response example
Error examples
cleanup/yookassa_check_pending_refunds¶
Triggers a Jenkins job to check for pending refunds in the Yookassa payment system.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: yookassa_check_pending_refunds |
| - | - | - | No other parameter |
Request example