Skip to content

Push

3 operations in the WP Waterfall API.

Push tables and uploads to another environment

post/environments/{id}/pushPermalink to Push tables and uploads to another environment

  • Scope: sites:write
  • Permission: environments.update
  • Needs a confirmation

Takes a restore point of the target first, then copies the chosen tables and uploads folders, and runs a search and replace to the target's primary hostname. Code never moves by push. Undo works for 48 hours. Live is never the target: that answers 409 (use_copy_into_live) and points at POST /environments/{id}/copy-into-live.

Parameters

NameInTypeDescription
id requiredpathstring (uuid)The id of the environment.
Idempotency-Key requiredheaderstringSend a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422.
confirmquerystringAn API key must say yes to this change: confirm=true here, or confirm: true in the JSON body. Without it the call answers 422 and changes nothing. One of: true.

Request body application/json, required, PushRequest

Fields

NameTypeDescription
target_env_id requiredstring (uuid)UUIDv7
tablesone of string, string, array of stringDefault: all.
uploadsone of string, string, array of stringDefault: all.
search_replacebooleanReplace the source hostname with the target's primary hostname in the database. Default: true.
confirm requiredboolean

Responses

StatusBodyDescription
202JobAccepted. The body is the Job object. Follow GET /jobs/{id}/events or poll GET /jobs/{id}.
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

202 response fields

NameTypeDescription
id requiredstring (uuid)UUIDv7
type requiredstringA 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 requiredstringOne of: queued, dispatched, running, succeeded, failed, cancelled.
environment_id requiredstring or null (uuid)UUIDv7
site_id requiredstring or null (uuid)UUIDv7
node_id requiredstring or null (uuid)UUIDv7
group_id requiredstring or null (uuid)UUIDv7
progress requiredintegerRange: 0 to 100.
attempts requiredintegerRange: 0 to any.
error requiredobject or null
error.code requiredstring
error.message requiredstring
error.retryable requiredbooleanDefault: false.
result requiredobject or null
descriptionstring or nullWhat 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_namestring or nullThe name of the site the job belongs to, when it has one.
environment_namestring or nullThe name of the environment the job runs on, such as live or staging.
quietbooleanTrue 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_idstring 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 requiredobject
requested_by.type requiredstringOne of: user, api_key, mcp_agent, system.
requested_by.id requiredstring or null
requested_by.label requiredstring or null
requested_by.client_namestring or nullMCP client name and version from the handshake, for mcp_agent requests.

Pushes into an environment

get/environments/{id}/pushesPermalink to Pushes into an environment

  • Scope: sites:read
  • Permission: sites.read

Lists the jobs that pushed content into this environment, each as a Job, in pages of up to 200 (default 50).

Parameters

NameInTypeDescription
id requiredpathstring (uuid)The id of the environment.
limitqueryintegerHow many rows to return in one page: 1 to 200, and 50 when left out. Default: 50. Range: 1 to 200.
cursorquerystringThe next_cursor of the page before. Leave it out for the first page.

Responses

StatusBodyDescription
200JobListPushes
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
data requiredarray of JobThe rows of this page.
data[].id requiredstring (uuid)UUIDv7
data[].type requiredstringA 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.
data[].status requiredstringOne of: queued, dispatched, running, succeeded, failed, cancelled.
data[].environment_id requiredstring or null (uuid)UUIDv7
data[].site_id requiredstring or null (uuid)UUIDv7
data[].node_id requiredstring or null (uuid)UUIDv7
data[].group_id requiredstring or null (uuid)UUIDv7
data[].progress requiredintegerRange: 0 to 100.
data[].attempts requiredintegerRange: 0 to any.
data[].error requiredobject or null
data[].result requiredobject or null
data[].descriptionstring or nullWhat 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.
data[].site_namestring or nullThe name of the site the job belongs to, when it has one.
data[].environment_namestring or nullThe name of the environment the job runs on, such as live or staging.
data[].quietbooleanTrue 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.
data[].parent_job_idstring 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.
data[].requested_by requiredobject
data[].idempotency_key requiredstring or null
data[].created_at requiredstring (date-time)
data[].started_at requiredstring or null (date-time)
data[].finished_at requiredstring or null (date-time)
data[].updated_at requiredstring (date-time)
next_cursor requiredstring or nullSend it as cursor to get the next page. Null on the last page.

Undo a push

post/pushes/{id}/undoPermalink to Undo a push

  • Scope: sites:write
  • Permission: environments.update
  • Needs a confirmation

Restores the target's restore point from before the push. Works for 48 hours and only once.

Parameters

NameInTypeDescription
id requiredpathstring (uuid)The id of the push.
Idempotency-Key requiredheaderstringSend a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422.
confirmquerystringAn API key must say yes to this change: confirm=true here, or confirm: true in the JSON body. Without it the call answers 422 and changes nothing. One of: true.

Request body application/json, required, UndoPushRequest

Fields

NameTypeDescription
confirm requiredboolean

Responses

StatusBodyDescription
202JobAccepted. The body is the Job object. Follow GET /jobs/{id}/events or poll GET /jobs/{id}.
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

202 response fields

NameTypeDescription
id requiredstring (uuid)UUIDv7
type requiredstringA 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 requiredstringOne of: queued, dispatched, running, succeeded, failed, cancelled.
environment_id requiredstring or null (uuid)UUIDv7
site_id requiredstring or null (uuid)UUIDv7
node_id requiredstring or null (uuid)UUIDv7
group_id requiredstring or null (uuid)UUIDv7
progress requiredintegerRange: 0 to 100.
attempts requiredintegerRange: 0 to any.
error requiredobject or null
error.code requiredstring
error.message requiredstring
error.retryable requiredbooleanDefault: false.
result requiredobject or null
descriptionstring or nullWhat 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_namestring or nullThe name of the site the job belongs to, when it has one.
environment_namestring or nullThe name of the environment the job runs on, such as live or staging.
quietbooleanTrue 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_idstring 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 requiredobject
requested_by.type requiredstringOne of: user, api_key, mcp_agent, system.
requested_by.id requiredstring or null
requested_by.label requiredstring or null
requested_by.client_namestring or nullMCP client name and version from the handshake, for mcp_agent requests.