Files
5 operations in the WP Waterfall API.
- getList a folder or read a text file
- patchEdit a text file or rename a path
- deleteDelete a file or folder
- getDownload a file
- getDisk usage breakdown
List a folder or read a text file
get/environments/{id}/filesPermalink to List a folder or read a text file
- Scope:
sites:read - Permission:
files.read
With path set to a folder (default /, the site folder) it returns kind: directory and the entries. With a text file it returns kind: file and the content, and a file that is too large or not text is refused. Opening wp-config.php needs a signed-in person who may reveal credentials and a recent sign-in: an API key gets 403.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the environment. |
path | query | string | Default: /. |
Responses
| Status | Body | Description |
|---|---|---|
200 | FilesGetResponse | Directory or file |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
Edit a text file or rename a path
patch/environments/{id}/filesPermalink to Edit a text file or rename a path
- Scope:
sites:write - Permission:
files.write
Code folders are read-only on live in Git mode. Uploads stay writable.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the environment. |
Idempotency-Key | header | string | Optional on PUT and PATCH. When the call starts a job, a retry with the same key, path, and body within 24 hours returns that job instead of starting another. A different path or body starts a new job. |
Request body application/json, required, PatchFilesRequest
Responses
| Status | Body | Description |
|---|---|---|
202 | Job | Accepted. The body is the Job object. Follow GET /jobs/{id}/events or poll GET /jobs/{id}. |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
202 response fields
| Name | Type | Description |
|---|---|---|
id required | string (uuid) | UUIDv7 |
type required | string | A node job type or an edge job type. One of: provision_environment, delete_environment, set_php_version, set_php_performance, set_php_settings, restart_php, clear_server_cache, search_replace, run_wp_cli, rotate_credentials, apply_nginx_settings, db_import, cron_sync, build_release, activate_release, create_repository, create_node, drain_node, delete_node, purchase_cud, files_write, files_delete, files_rename, phpmyadmin_session, db_check, db_rows_write, db_sql_execute, ssh_update, sftp_account_change, tool_setting, wp_user_create, set_code_mode, env_var_set, env_var_delete, reset_site, set_webroot, set_wp_secrets_key, wp_admin_login_token, wp_login_user_ensure, wp_login_users_remove, repo_commit_read, create_preview_environment, clone_content, merge_branch, create_snapshot, restore_snapshot, set_apm, push_content, commit_branch, sync_working_tree, issue_certificate, register_hostname, unregister_hostname, object_cache_set, patchstack_credentials_write, patchstack_credentials_remove, patchstack_kill_switch, set_disk_quota, prepare_standby, start_replication, verify_replica, fence_site, resync_replica, set_site_suspension, clear_log, promote_environment, copy_into_live, auto_update_run, delete_snapshot, prune_snapshots, backup_download, configure_git_remote, import_git_push, pull_external_git, offsite_backup_test, offsite_backup_run, offsite_backup_list, offsite_backup_restore, restart_service, container_exec, set_network_domain, map_subsite_domain, reap_orphan_containers, migrate_container, migrate_control, migrate_export, migrate_import, migrate_precopy, migrate_delta, migrate_freeze, migrate_thaw, update_mu_plugin, import_site_files, wake_environment, set_sleep_policy, integrity_check, malware_scan, malware_restore, container_images, rebuild_container, update_runtime_image, node_reboot_status, schedule_node_reboot, reboot_node, core_update_commit, core_update_advance, core_update_run, takedown_environment, release_takedown, set_egress, set_standby_hold, copy_evidence, drop_evidence, transfer_site, relabel_environment, record_site_facts, attach_domain, remove_domain, set_primary_domain, apply_redirects, apply_ip_rules, apply_bot_protection, purge_cache, apply_edge_settings, provision_dns_zone, refresh_ssl, set_edge_certificate, remove_edge_certificate, rename_site, rename_temp_hostname, network_sync, migration_fetch, migration_inspect, migration_triage, migration_import, migration_move, export_company_data, export_user_data, export_audit_log, purge_company, reseal_secrets, run_pagespeed, patchstack_provision, patchstack_deprovision, patchstack_reconcile, wp_login_member_users_remove, provision_standby, failover_site, failback_site, accessibility_scan. |
status required | string | One of: queued, dispatched, running, succeeded, failed, cancelled. |
environment_id required | string or null (uuid) | UUIDv7 |
site_id required | string or null (uuid) | UUIDv7 |
node_id required | string or null (uuid) | UUIDv7 |
group_id required | string or null (uuid) | UUIDv7 |
progress required | integer | Range: 0 to 100. |
attempts required | integer | Range: 0 to any. |
error required | object or null | |
error.code required | string | |
error.message required | string | |
error.retryable required | boolean | Default: false. |
result required | object or null | |
description | string or null | What the job does, in one plain sentence, such as "Turn on the server cron on site Elric (staging)". It names the action and the place and never holds a secret, a value, or site content: a WP-CLI command shows its command words and the names that are safe to show, and a placeholder such as "(value hidden)" for the rest. Null on old servers. |
site_name | string or null | The name of the site the job belongs to, when it has one. |
environment_name | string or null | The name of the environment the job runs on, such as live or staging. |
quiet | boolean | True for background work and reads, such as a cron sync or a login link lookup. A customer screen leaves a quiet job out of its bell, its lists, and its toasts. Quiet jobs are still stored, audited, and retried. Absent on old servers, where nothing is quiet. |
parent_job_id | string or null (uuid) | The job this one works for: the job that ran it as a step, or that queued it as a follow-up. That job reads as done only once its follow-ups ended: it stays running until then, and its log names any follow-up that failed. Null for a job nobody started on another's behalf. Absent on old servers. |
requested_by required | object | |
requested_by.type required | string | One of: user, api_key, mcp_agent, system. |
requested_by.id required | string or null | |
requested_by.label required | string or null | |
requested_by.client_name | string or null | MCP client name and version from the handshake, for mcp_agent requests. |
Delete a file or folder
delete/environments/{id}/filesPermalink to Delete a file or folder
- Scope:
sites:write - Permission:
files.write
Deletes the file or folder at path and returns 202 with the Job. Set recursive=true for a folder and everything in it. The site folder itself answers 422. Code on a read-only release answers 409: there only the uploads and cache folders accept changes.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the environment. |
path required | query | string | |
recursive | query | string | One of: true, false. Default: false. |
Responses
| Status | Body | Description |
|---|---|---|
202 | Job | Accepted. The body is the Job object. Follow GET /jobs/{id}/events or poll GET /jobs/{id}. |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
202 response fields
| Name | Type | Description |
|---|---|---|
id required | string (uuid) | UUIDv7 |
type required | string | A node job type or an edge job type. One of: provision_environment, delete_environment, set_php_version, set_php_performance, set_php_settings, restart_php, clear_server_cache, search_replace, run_wp_cli, rotate_credentials, apply_nginx_settings, db_import, cron_sync, build_release, activate_release, create_repository, create_node, drain_node, delete_node, purchase_cud, files_write, files_delete, files_rename, phpmyadmin_session, db_check, db_rows_write, db_sql_execute, ssh_update, sftp_account_change, tool_setting, wp_user_create, set_code_mode, env_var_set, env_var_delete, reset_site, set_webroot, set_wp_secrets_key, wp_admin_login_token, wp_login_user_ensure, wp_login_users_remove, repo_commit_read, create_preview_environment, clone_content, merge_branch, create_snapshot, restore_snapshot, set_apm, push_content, commit_branch, sync_working_tree, issue_certificate, register_hostname, unregister_hostname, object_cache_set, patchstack_credentials_write, patchstack_credentials_remove, patchstack_kill_switch, set_disk_quota, prepare_standby, start_replication, verify_replica, fence_site, resync_replica, set_site_suspension, clear_log, promote_environment, copy_into_live, auto_update_run, delete_snapshot, prune_snapshots, backup_download, configure_git_remote, import_git_push, pull_external_git, offsite_backup_test, offsite_backup_run, offsite_backup_list, offsite_backup_restore, restart_service, container_exec, set_network_domain, map_subsite_domain, reap_orphan_containers, migrate_container, migrate_control, migrate_export, migrate_import, migrate_precopy, migrate_delta, migrate_freeze, migrate_thaw, update_mu_plugin, import_site_files, wake_environment, set_sleep_policy, integrity_check, malware_scan, malware_restore, container_images, rebuild_container, update_runtime_image, node_reboot_status, schedule_node_reboot, reboot_node, core_update_commit, core_update_advance, core_update_run, takedown_environment, release_takedown, set_egress, set_standby_hold, copy_evidence, drop_evidence, transfer_site, relabel_environment, record_site_facts, attach_domain, remove_domain, set_primary_domain, apply_redirects, apply_ip_rules, apply_bot_protection, purge_cache, apply_edge_settings, provision_dns_zone, refresh_ssl, set_edge_certificate, remove_edge_certificate, rename_site, rename_temp_hostname, network_sync, migration_fetch, migration_inspect, migration_triage, migration_import, migration_move, export_company_data, export_user_data, export_audit_log, purge_company, reseal_secrets, run_pagespeed, patchstack_provision, patchstack_deprovision, patchstack_reconcile, wp_login_member_users_remove, provision_standby, failover_site, failback_site, accessibility_scan. |
status required | string | One of: queued, dispatched, running, succeeded, failed, cancelled. |
environment_id required | string or null (uuid) | UUIDv7 |
site_id required | string or null (uuid) | UUIDv7 |
node_id required | string or null (uuid) | UUIDv7 |
group_id required | string or null (uuid) | UUIDv7 |
progress required | integer | Range: 0 to 100. |
attempts required | integer | Range: 0 to any. |
error required | object or null | |
error.code required | string | |
error.message required | string | |
error.retryable required | boolean | Default: false. |
result required | object or null | |
description | string or null | What the job does, in one plain sentence, such as "Turn on the server cron on site Elric (staging)". It names the action and the place and never holds a secret, a value, or site content: a WP-CLI command shows its command words and the names that are safe to show, and a placeholder such as "(value hidden)" for the rest. Null on old servers. |
site_name | string or null | The name of the site the job belongs to, when it has one. |
environment_name | string or null | The name of the environment the job runs on, such as live or staging. |
quiet | boolean | True for background work and reads, such as a cron sync or a login link lookup. A customer screen leaves a quiet job out of its bell, its lists, and its toasts. Quiet jobs are still stored, audited, and retried. Absent on old servers, where nothing is quiet. |
parent_job_id | string or null (uuid) | The job this one works for: the job that ran it as a step, or that queued it as a follow-up. That job reads as done only once its follow-ups ended: it stays running until then, and its log names any follow-up that failed. Null for a job nobody started on another's behalf. Absent on old servers. |
requested_by required | object | |
requested_by.type required | string | One of: user, api_key, mcp_agent, system. |
requested_by.id required | string or null | |
requested_by.label required | string or null | |
requested_by.client_name | string or null | MCP client name and version from the handshake, for mcp_agent requests. |
Download a file
get/environments/{id}/files/downloadPermalink to Download a file
- Scope:
sites:read - Permission:
files.read
Returns one file. A file of up to 1 MB comes back inline as content_base64, and a larger one comes back as a short lived url with expires_at. The site folder itself answers 422. Downloading wp-config.php needs a signed-in person who may reveal credentials and a recent sign-in: an API key gets 403.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the environment. |
path required | query | string |
Responses
| Status | Body | Description |
|---|---|---|
200 | FileDownload | Inline content or a short lived URL |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
filename required | string | |
size_bytes required | integer | Range: 0 to any. |
content_type required | string | |
content_base64 required | string or null | |
url required | string or null (uri) | |
expires_at required | string or null (date-time) |
Disk usage breakdown
get/environments/{id}/files/usagePermalink to Disk usage breakdown
- Scope:
sites:read - Permission:
files.read
Measures the disk the environment uses now: total_bytes, the quota in limit_bytes, a breakdown by category, and the largest folders and files (top sets how many, 1 to 50, default 10). warning is warn from 90% of the quota and full at 100%. overage is set while the environment uses more disk than it has.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the environment. |
top | query | integer | Default: 10. Range: 1 to 50. |
Responses
| Status | Body | Description |
|---|---|---|
200 | FilesUsage | Usage |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
total_bytes required | integer | Range: 0 to any. |
limit_bytes required | integer | The quota of this environment's container, from the plan entitlement. Range: 0 to any. |
breakdown required | array of object | |
breakdown[].category required | string | One of: wordpress_core, plugins, themes, uploads, database, logs, other. |
breakdown[].bytes required | integer | Range: 0 to any. |
largest_folders required | array of object | |
largest_folders[].path required | string | |
largest_folders[].size_bytes required | integer | Range: 0 to any. |
largest_files required | array of object | |
largest_files[].path required | string | |
largest_files[].size_bytes required | integer | Range: 0 to any. |
account_limit_bytes required | integer or null | The whole account allowance that bounds every container together. Null without a plan. Range: 0 to any. |
warning required | string | warn from 90 percent of the quota, full at 100 percent. One of: none, warn, full. |
overage | object or null | Set while this environment uses more disk than it has: the disk used, the disk it has, and whether the account gets more disk (pending) or the excess bills per GB (billing). Absent or null otherwise. |
overage.environment_id required | string (uuid) | |
overage.environment_name required | string | |
overage.used_bytes required | integer | Range: 0 to any. |
overage.allowance_bytes required | integer | Range: 0 to any. |
overage.state required | string | One of: pending, billing. |
overage.reason required | string or null | One of: no_payment_method, billing_details, account_standing, switch_off, uptime_guarantee, staff_managed, too_large, purchase_failed, limit_reached. |