Monitor
11 operations in the WP Waterfall API.
- putStart or stop collecting performance data
- getPerformance summary: throughput, average and p95 response time, error rate, and the time chart
- getThe WordPress, Database, and External tables: slowest plugins, hooks, queries, outside calls, and Redis calls
- getWhether performance data is being collected, whether Monitor's performance part is on, and the mode
- getOne URL group: its breakdown, chart, histogram, and slowest requests
- getThe transactions table: one row per URL group
- getWhat PHP-FPM really runs with, read back from the node
- putTurn Monitor's performance part on or off
- getRead the Lighthouse results of a site's live address
- postStart a Lighthouse test of the live site
- getRead one Lighthouse test
Start or stop collecting performance data
put/environments/{id}/monitorPermalink to Start or stop collecting performance data
- Scope:
sites:write - Permission:
environments.update
Queues set_apm (ADR 025). Start with enabled true and a mode: the node turns on a per request log for PHP requests (Nginx and the PHP prepend probe), checks the Nginx config with nginx -t, and reloads PHP-FPM. Modes: a 2, 4, 12, or 24 hour window, after which the node turns collecting off on its own, or always on. Every request is recorded while it is collecting. Stop with enabled false. Starting while Monitor's performance part is off turns it on first. The performance part itself, which only shows the Performance section of the Monitor tab, is PUT /environments/{id}/tools/monitor.
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, PutApmRequest
Fields
| Name | Type | Description |
|---|---|---|
enabled required | boolean | |
mode | string | One of: window_2h, window_4h, window_12h, window_24h, always_on. Default: window_2h. |
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. |
Performance summary: throughput, average and p95 response time, error rate, and the time chart
get/environments/{id}/monitor/overviewPermalink to Performance summary: throughput, average and p95 response time, error rate, and the time chart
- Scope:
sites:read - Permission:
sites.read
Read from the minute summaries the node keeps (ADR 025). The API pulls the newest finished minutes from the node first. Times are milliseconds; the breakdown splits each request into PHP, MySQL, outside calls, and the rest. p95 is read from a histogram, so it is the upper edge of a bucket. Retention is 7 days.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the environment. |
from | query | string (date-time) | |
to | query | string (date-time) |
Responses
| Status | Body | Description |
|---|---|---|
200 | ApmOverview | The overview |
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 |
|---|---|---|
environment_id required | string (uuid) | UUIDv7 |
from required | string (date-time) | |
to required | string (date-time) | |
enabled required | boolean | |
available required | boolean | |
note required | string or null | |
last_data_at required | string or null (date-time) | |
bucket_seconds required | integer | |
totals required | object | |
totals.requests required | integer | Range: 0 to any. |
totals.errors required | integer | Range: 0 to any. |
totals.client_errors required | integer | Range: 0 to any. |
totals.error_rate required | number or null | 5xx share of requests, 0 to 1. Null with no requests. Range: 0 to 1. |
totals.throughput_per_min required | number | Requests a minute over the window. Range: 0 to any. |
totals.avg_ms required | number or null | Range: 0 to any. |
totals.p95_ms required | number or null | About: read from a response time histogram, so it is the upper edge of a bucket. Range: 0 to any. |
totals.max_ms required | number or null | Range: 0 to any. |
totals.cache_hit_ratio required | number or null | Page cache hits over all requests, 0 to 1. Range: 0 to 1. |
totals.php_requests required | integer | Requests that reached PHP. Range: 0 to any. |
totals.db_queries_avg required | number or null | Range: 0 to any. |
totals.ext_calls_avg required | number or null | Range: 0 to any. |
totals.breakdown required | object or null | |
totals.total_ms required | number | Sums of time over the window, for the chart legend. Range: 0 to any. |
totals.php_total_ms required | number | Range: 0 to any. |
The WordPress, Database, and External tables: slowest plugins, hooks, queries, outside calls, and Redis calls
get/environments/{id}/monitor/spansPermalink to The WordPress, Database, and External tables: slowest plugins, hooks, queries, outside calls, and Redis calls
- Scope:
sites:read - Permission:
sites.read
The time every PHP request spent in each plugin or theme, hook, database table and verb (for example wp_posts SELECT), outside host and method (for example api.sendgrid.com POST), or Redis command (by), summed from the totals the node keeps each minute (source totals). A node that sends no totals falls back to the spans of the slow requests it kept (source slow_requests, with considered saying how many requests were read); source none means nothing was collected. No SQL text, path, or query string is ever stored. Rows carry total, max, and average duration, share of the table, and calls a minute. Retention is 7 days. When by is plugin or hook, this needs WordPress on the environment: without it the answer is 409 with the code wordpress_not_installed.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the environment. |
from | query | string (date-time) | |
to | query | string (date-time) | |
by required | query | string | One of: plugin, hook, query, external, redis. |
sort | query | string | One of: total, max, avg, calls. Default: total. |
limit | query | integer | How many rows to return in one page: at most 100, and 25 when left out. Default: 25. Range: 1 to 100. |
Responses
| Status | Body | Description |
|---|---|---|
200 | ApmSpans | Span table |
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) |
200 response fields
| Name | Type | Description |
|---|---|---|
environment_id required | string (uuid) | UUIDv7 |
from required | string (date-time) | |
to required | string (date-time) | |
enabled required | boolean | |
available required | boolean | |
note required | string or null | |
last_data_at required | string or null (date-time) | |
by required | string | One of: plugin, hook, query, external, redis. |
source required | string | One of: totals, slow_requests, none. |
considered required | object | |
considered.requests required | integer | Slow requests read, from the 25 transactions that took the most time. Range: 0 to any. |
considered.with_spans required | integer | Of those, the ones that carry spans. Zero means the node reports no spans yet. Range: 0 to any. |
data required | array of object | |
data[].name required | string | The plugin folder, hook, SQL, or outside URL. A plugin row for WordPress core is core. |
data[].plugin required | string or null | The owner of the code, for every table but plugins. Null for WordPress core. |
data[].method required | string or null | The HTTP method of an outside call, else null. |
data[].calls required | integer | Spans seen across the requests considered. Range: 0 to any. |
data[].requests required | integer or null | Requests that held at least one such span. Null for a row from totals, which count calls only. Range: 0 to any. |
data[].total_ms required | number | Range: 0 to any. |
data[].share required | number or null | Share of all span time in this table, 0 to 1 (Kinsta's "Total duration (%)"). Range: 0 to 1. |
data[].avg_ms required | number | Range: 0 to any. |
data[].max_ms required | number | Range: 0 to any. |
data[].rate_per_min required | number | Calls a minute over the window (Kinsta's "Rate Per Min."). Range: 0 to any. |
data[].transactions required | array of string | Up to 3 URL groups that held it, the one with the most time first. |
Whether performance data is being collected, whether Monitor's performance part is on, and the mode
get/environments/{id}/monitor/statusPermalink to Whether performance data is being collected, whether Monitor's performance part is on, and the mode
- Scope:
sites:read - Permission:
sites.read
Returns enabled (data is being collected now), tool_enabled (Monitor's performance part is switched on), the mode (a window of 2, 4, 12, or 24 hours, or always on), until (when a window ends), and last_data_at. The data is kept for 7 days (retention_days).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the environment. |
Responses
| Status | Body | Description |
|---|---|---|
200 | ApmStatus | Performance data status |
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 |
|---|---|---|
environment_id required | string (uuid) | UUIDv7 |
enabled required | boolean | True while APM is collecting (a set_apm window is running, or always on). Starting and stopping a collection is PUT /v1/environments/{id}/monitor. Whether the APM tool is on, which only shows the APM tab, is tool_enabled. |
tool_enabled required | boolean | True while the APM tool is on in Tools: the APM tab shows and a collection can start. Default: false. |
mode required | string or null | One of: window_2h, window_4h, window_12h, window_24h, always_on. |
sample_rate required | number | Range: 0 to 1. |
retention_days required | integer | |
available required | boolean | |
note required | string or null | |
changed_at required | string or null (date-time) | |
until | string or null (date-time) | When a window mode turns APM off. Null for always on or when off. |
last_data_at | string or null (date-time) | The newest minute of APM data stored. Null when nothing was ever collected. |
One URL group: its breakdown, chart, histogram, and slowest requests
get/environments/{id}/monitor/urlPermalink to One URL group: its breakdown, chart, histogram, and slowest requests
- Scope:
sites:read - Permission:
sites.read
Slow samples hold the path without the query string.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the environment. |
from | query | string (date-time) | |
to | query | string (date-time) | |
name required | query | string |
Responses
| Status | Body | Description |
|---|---|---|
200 | ApmUrlDetail | The URL group |
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 |
|---|---|---|
environment_id required | string (uuid) | UUIDv7 |
from required | string (date-time) | |
to required | string (date-time) | |
enabled required | boolean | |
available required | boolean | |
note required | string or null | |
last_data_at required | string or null (date-time) | |
name required | string | |
bucket_seconds required | integer | |
row required | object or null | Null when the group has no requests in the window. |
row.name required | string | The URL group, such as /wp-admin/admin-ajax.php or /product/:id/. |
row.count required | integer | Range: 0 to any. |
row.errors required | integer | Range: 0 to any. |
row.client_errors required | integer | Range: 0 to any. |
row.error_rate required | number | Range: 0 to 1. |
row.rate_per_min required | number | Range: 0 to any. |
row.total_ms required | number | Range: 0 to any. |
row.share required | number or null | Share of all time spent in the window, 0 to 1 (Kinsta's "Total duration (%)"). Range: 0 to 1. |
row.avg_ms required | number | Range: 0 to any. |
row.p95_ms required | number or null | Range: 0 to any. |
row.max_ms required | number | Range: 0 to any. |
row.cache_hit_ratio required | number | Range: 0 to 1. |
row.db_queries_avg required | number or null | Range: 0 to any. |
row.mem_peak_kb required | integer or null | Range: 0 to any. |
The transactions table: one row per URL group
get/environments/{id}/monitor/urlsPermalink to The transactions table: one row per URL group
- Scope:
sites:read - Permission:
sites.read
URL groups replace number, UUID, and long hex path segments with placeholders and drop the query string. Sort by impact (share of all time), average, max, count, or errors. Filter to errors, slow (average over 1 second), or uncached rows, and search with q.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the environment. |
from | query | string (date-time) | |
to | query | string (date-time) | |
q | query | string | Case-insensitive text the URL group must contain. |
sort | query | string | One of: impact, avg, max, count, errors. Default: impact. |
filter | query | string | One of: all, errors, slow, uncached. Default: all. |
limit | query | integer | How many rows to return in one page: at most 500, and 100 when left out. Default: 100. Range: 1 to 500. |
Responses
| Status | Body | Description |
|---|---|---|
200 | ApmUrlList | Transactions |
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 |
|---|---|---|
environment_id required | string (uuid) | UUIDv7 |
from required | string (date-time) | |
to required | string (date-time) | |
enabled required | boolean | |
available required | boolean | |
note required | string or null | |
last_data_at required | string or null (date-time) | |
total_rows required | integer | Rows that match before the limit. Range: 0 to any. |
data required | array of object | |
data[].name required | string | The URL group, such as /wp-admin/admin-ajax.php or /product/:id/. |
data[].count required | integer | Range: 0 to any. |
data[].errors required | integer | Range: 0 to any. |
data[].client_errors required | integer | Range: 0 to any. |
data[].error_rate required | number | Range: 0 to 1. |
data[].rate_per_min required | number | Range: 0 to any. |
data[].total_ms required | number | Range: 0 to any. |
data[].share required | number or null | Share of all time spent in the window, 0 to 1 (Kinsta's "Total duration (%)"). Range: 0 to 1. |
data[].avg_ms required | number | Range: 0 to any. |
data[].p95_ms required | number or null | Range: 0 to any. |
data[].max_ms required | number | Range: 0 to any. |
data[].cache_hit_ratio required | number | Range: 0 to 1. |
data[].db_queries_avg required | number or null | Range: 0 to any. |
data[].mem_peak_kb required | integer or null | Range: 0 to any. |
data[].breakdown required | object |
What PHP-FPM really runs with, read back from the node
get/environments/{id}/php/enginePermalink to What PHP-FPM really runs with, read back from the node
- Scope:
sites:read - Permission:
sites.read
The PHP version, the worker pool from the plan tier (process manager, workers, idle timeout, request limits), the effective ini values (memory_limit, max_execution_time, and more), OPcache, the live pool status, and the watchdog's recent restarts. Read from the files in the container, never from what the control plane asked for. Change them with PUT /environments/{id}/tools/php-settings and PUT /environments/{id}/php-performance.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the environment. |
Responses
| Status | Body | Description |
|---|---|---|
200 | PhpEngine | The PHP engine |
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 |
|---|---|---|
version required | string | One of: 8.1, 8.2, 8.3, 8.4, 8.5. |
available_versions required | array of string | |
tier required | object | |
tier.key required | string | |
tier.threads required | integer | Range: 0 to any. |
tier.pool_mb required | integer | Range: 0 to any. |
pool required | object | |
pool.pm required | string | |
pool.max_children required | integer | Range: 0 to any. |
pool.start_servers required | integer or null | Range: 0 to any. |
pool.min_spare_servers required | integer or null | Range: 0 to any. |
pool.max_spare_servers required | integer or null | Range: 0 to any. |
pool.process_idle_timeout_s required | integer or null | Range: 0 to any. |
pool.max_requests required | integer | Range: 0 to any. |
pool.request_terminate_timeout_s required | integer | Range: 0 to any. |
pool.slowlog_timeout_s required | integer or null | Range: 0 to any. |
ini required | object | Effective values: the image ini, then the pool file on top. |
opcache required | object | |
opcache.enabled required | boolean | |
opcache.memory_mb required | integer | Range: 0 to any. |
opcache.interned_strings_mb required | integer | Range: 0 to any. |
opcache.max_accelerated_files required | integer | Range: 0 to any. |
opcache.validate_timestamps required | boolean | |
opcache.jit required | string or null |
Turn Monitor's performance part on or off
put/environments/{id}/tools/monitorPermalink to Turn Monitor's performance part on or off
- Scope:
sites:write - Permission:
environments.update
On shows the Performance section of the Monitor tab and lets a person start collecting. It holds no duration and does no node work. Off hides the section's reports, and stops a running collection first with a set_apm job (its id is stopped_collection_job_id). Reversible, so no confirm. Collecting is started and stopped with PUT /environments/{id}/monitor.
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, PutApmToolRequest
Fields
| Name | Type | Description |
|---|---|---|
enabled required | boolean |
Responses
| Status | Body | Description |
|---|---|---|
200 | ApmToolResult | The tool state |
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) |
200 response fields
| Name | Type | Description |
|---|---|---|
environment_id required | string (uuid) | UUIDv7 |
tool_enabled required | boolean | |
stopped_collection_job_id required | string or null (uuid) | The set_apm job that stopped a running collection. Null when none was running. |
message required | string |
Read the Lighthouse results of a site's live address
get/sites/{id}/pagespeedPermalink to Read the Lighthouse results of a site's live address
- Scope:
sites:read - Permission:
sites.read
The newest finished Lighthouse test of the live site for mobile and for desktop, from Google PageSpeed Insights: the scores for performance, accessibility, best practices, and SEO from 0 to 100, the lab metrics (First Contentful Paint, Largest Contentful Paint, Total Blocking Time, Cumulative Layout Shift, Speed Index, and Time to Interactive) with Lighthouse's rating, the largest opportunities and diagnostics, and the Chrome UX Report field data when Google has it, for the page or for the whole origin. It also lists the runs that are queued or running, the newest failure of each device, the earliest time a manual test may start again, and a history of finished runs for the chart (days, up to 90). It tests only the live environment's own address. When the Uptime part of Monitor is off, nothing runs and the lists are empty. available is false when this deployment has no Google key, and reason says why. Reads the database only.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the site. |
days | query | integer | How many days of history to return. Default: 30. Range: 1 to 90. |
strategy | query | string | One of: mobile, desktop. |
Responses
| Status | Body | Description |
|---|---|---|
200 | PagespeedOverview | The Lighthouse results |
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 |
|---|---|---|
site_id required | string (uuid) | UUIDv7 |
environment_id required | string or null (uuid) | UUIDv7 |
available required | boolean | |
tool_enabled required | boolean | |
reason required | string or null | |
live_url required | string or null | |
report_url required | string or null | The full report on PageSpeed Insights, or null without a live address. |
latest required | object | The newest finished run of each strategy. |
latest.mobile required | one of PagespeedRun, null | |
latest.desktop required | one of PagespeedRun, null | |
active required | array of PagespeedRun | Runs queued or running now. |
active[].id required | string (uuid) | UUIDv7 |
active[].site_id required | string (uuid) | UUIDv7 |
active[].environment_id required | string (uuid) | UUIDv7 |
active[].strategy required | string | One of: mobile, desktop. |
active[].status required | string | One of: queued, running, done, failed. |
active[].trigger required | string | One of: manual, scheduled. |
active[].url required | string | The address that was tested. |
active[].created_at required | string (date-time) | |
active[].started_at required | string or null (date-time) | |
active[].finished_at required | string or null (date-time) | |
active[].error required | string or null | A plain sentence when the run failed. |
active[].error_code required | string or null | One of: not_configured, unreachable, no_content, busy, unavailable, timeout, stuck, failed. |
active[].job_id required | string or null (uuid) |
Start a Lighthouse test of the live site
post/sites/{id}/pagespeed/runsPermalink to Start a Lighthouse test of the live site
- Scope:
sites:write - Permission:
tools.run
Starts a Lighthouse test of the live site's public address through Google PageSpeed Insights, for mobile, desktop, or both (the default). Each test is a run_pagespeed job that takes 10 to 40 seconds, and it ends as done or failed with a plain reason. It cannot be cancelled. Read the result with GET /sites/{id}/pagespeed or GET /sites/{id}/pagespeed/runs/{run_id}. A device tested less than 10 minutes ago is left out and listed in skipped; when every device is left out, the call answers 429 with Retry-After. The call answers 409 when the site has no live address or Monitor's Uptime part is off, 429 when the company or the platform has reached its limit, and 503 when this deployment has no Google key. Answers 202.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the site. |
Idempotency-Key required | header | string | Send 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. |
Request body application/json, required, StartPagespeedRunRequest
Fields
| Name | Type | Description |
|---|---|---|
strategy | string | The device profile to test. both starts a mobile and a desktop test. One of: mobile, desktop, both. Default: both. |
Responses
| Status | Body | Description |
|---|---|---|
202 | PagespeedRunsStarted | Accepted. The runs are queued. |
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 |
|---|---|---|
runs required | array of PagespeedRun | |
runs[].id required | string (uuid) | UUIDv7 |
runs[].site_id required | string (uuid) | UUIDv7 |
runs[].environment_id required | string (uuid) | UUIDv7 |
runs[].strategy required | string | One of: mobile, desktop. |
runs[].status required | string | One of: queued, running, done, failed. |
runs[].trigger required | string | One of: manual, scheduled. |
runs[].url required | string | The address that was tested. |
runs[].created_at required | string (date-time) | |
runs[].started_at required | string or null (date-time) | |
runs[].finished_at required | string or null (date-time) | |
runs[].error required | string or null | A plain sentence when the run failed. |
runs[].error_code required | string or null | One of: not_configured, unreachable, no_content, busy, unavailable, timeout, stuck, failed. |
runs[].job_id required | string or null (uuid) | |
runs[].report required | object or null | The result, once the run is done. |
skipped required | array of object | Strategies left out because one was tested less than 10 minutes ago. |
skipped[].strategy required | string | One of: mobile, desktop. |
skipped[].retry_after_seconds required | integer |
Read one Lighthouse test
get/sites/{id}/pagespeed/runs/{run_id}Permalink to Read one Lighthouse test
- Scope:
sites:read - Permission:
sites.read
One run: its status (queued, running, done, or failed), the address tested, the times, the plain reason when it failed, and the stored result when it is done.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the site. |
run_id required | path | string (uuid) | The id of the run. |
Responses
| Status | Body | Description |
|---|---|---|
200 | PagespeedRun | The run |
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 |
|---|---|---|
id required | string (uuid) | UUIDv7 |
site_id required | string (uuid) | UUIDv7 |
environment_id required | string (uuid) | UUIDv7 |
strategy required | string | One of: mobile, desktop. |
status required | string | One of: queued, running, done, failed. |
trigger required | string | One of: manual, scheduled. |
url required | string | The address that was tested. |
created_at required | string (date-time) | |
started_at required | string or null (date-time) | |
finished_at required | string or null (date-time) | |
error required | string or null | A plain sentence when the run failed. |
error_code required | string or null | One of: not_configured, unreachable, no_content, busy, unavailable, timeout, stuck, failed. |
job_id required | string or null (uuid) | |
report required | object or null | The result, once the run is done. |
report.lighthouse_version required | string or null | |
report.fetched_at required | string or null (date-time) | When Google ran the test. |
report.final_url required | string or null | The address Google ended up on after redirects. |
report.scores required | object | |
report.metrics required | array of object | |
report.field required | object | |
report.audits required | array of object | |
report.categories required | array of object | Every audit of each category, for the full report on the page. A run stored before this was kept has none, so the page shows its scores and metrics alone. |