Skip to content

Monitor

11 operations in the WP Waterfall API.

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

NameInTypeDescription
id requiredpathstring (uuid)The id of the environment.
Idempotency-KeyheaderstringOptional 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

NameTypeDescription
enabled requiredboolean
modestringOne of: window_2h, window_4h, window_12h, window_24h, always_on. Default: window_2h.

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.

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

NameInTypeDescription
id requiredpathstring (uuid)The id of the environment.
fromquerystring (date-time)
toquerystring (date-time)

Responses

StatusBodyDescription
200ApmOverviewThe overview
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
environment_id requiredstring (uuid)UUIDv7
from requiredstring (date-time)
to requiredstring (date-time)
enabled requiredboolean
available requiredboolean
note requiredstring or null
last_data_at requiredstring or null (date-time)
bucket_seconds requiredinteger
totals requiredobject
totals.requests requiredintegerRange: 0 to any.
totals.errors requiredintegerRange: 0 to any.
totals.client_errors requiredintegerRange: 0 to any.
totals.error_rate requirednumber or null5xx share of requests, 0 to 1. Null with no requests. Range: 0 to 1.
totals.throughput_per_min requirednumberRequests a minute over the window. Range: 0 to any.
totals.avg_ms requirednumber or nullRange: 0 to any.
totals.p95_ms requirednumber or nullAbout: read from a response time histogram, so it is the upper edge of a bucket. Range: 0 to any.
totals.max_ms requirednumber or nullRange: 0 to any.
totals.cache_hit_ratio requirednumber or nullPage cache hits over all requests, 0 to 1. Range: 0 to 1.
totals.php_requests requiredintegerRequests that reached PHP. Range: 0 to any.
totals.db_queries_avg requirednumber or nullRange: 0 to any.
totals.ext_calls_avg requirednumber or nullRange: 0 to any.
totals.breakdown requiredobject or null
totals.total_ms requirednumberSums of time over the window, for the chart legend. Range: 0 to any.
totals.php_total_ms requirednumberRange: 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the environment.
fromquerystring (date-time)
toquerystring (date-time)
by requiredquerystringOne of: plugin, hook, query, external, redis.
sortquerystringOne of: total, max, avg, calls. Default: total.
limitqueryintegerHow many rows to return in one page: at most 100, and 25 when left out. Default: 25. Range: 1 to 100.

Responses

StatusBodyDescription
200ApmSpansSpan table
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)

200 response fields

NameTypeDescription
environment_id requiredstring (uuid)UUIDv7
from requiredstring (date-time)
to requiredstring (date-time)
enabled requiredboolean
available requiredboolean
note requiredstring or null
last_data_at requiredstring or null (date-time)
by requiredstringOne of: plugin, hook, query, external, redis.
source requiredstringOne of: totals, slow_requests, none.
considered requiredobject
considered.requests requiredintegerSlow requests read, from the 25 transactions that took the most time. Range: 0 to any.
considered.with_spans requiredintegerOf those, the ones that carry spans. Zero means the node reports no spans yet. Range: 0 to any.
data requiredarray of object
data[].name requiredstringThe plugin folder, hook, SQL, or outside URL. A plugin row for WordPress core is core.
data[].plugin requiredstring or nullThe owner of the code, for every table but plugins. Null for WordPress core.
data[].method requiredstring or nullThe HTTP method of an outside call, else null.
data[].calls requiredintegerSpans seen across the requests considered. Range: 0 to any.
data[].requests requiredinteger or nullRequests that held at least one such span. Null for a row from totals, which count calls only. Range: 0 to any.
data[].total_ms requirednumberRange: 0 to any.
data[].share requirednumber or nullShare of all span time in this table, 0 to 1 (Kinsta's "Total duration (%)"). Range: 0 to 1.
data[].avg_ms requirednumberRange: 0 to any.
data[].max_ms requirednumberRange: 0 to any.
data[].rate_per_min requirednumberCalls a minute over the window (Kinsta's "Rate Per Min."). Range: 0 to any.
data[].transactions requiredarray of stringUp 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the environment.

Responses

StatusBodyDescription
200ApmStatusPerformance data status
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
environment_id requiredstring (uuid)UUIDv7
enabled requiredbooleanTrue 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 requiredbooleanTrue while the APM tool is on in Tools: the APM tab shows and a collection can start. Default: false.
mode requiredstring or nullOne of: window_2h, window_4h, window_12h, window_24h, always_on.
sample_rate requirednumberRange: 0 to 1.
retention_days requiredinteger
available requiredboolean
note requiredstring or null
changed_at requiredstring or null (date-time)
untilstring or null (date-time)When a window mode turns APM off. Null for always on or when off.
last_data_atstring 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the environment.
fromquerystring (date-time)
toquerystring (date-time)
name requiredquerystring

Responses

StatusBodyDescription
200ApmUrlDetailThe URL group
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
environment_id requiredstring (uuid)UUIDv7
from requiredstring (date-time)
to requiredstring (date-time)
enabled requiredboolean
available requiredboolean
note requiredstring or null
last_data_at requiredstring or null (date-time)
name requiredstring
bucket_seconds requiredinteger
row requiredobject or nullNull when the group has no requests in the window.
row.name requiredstringThe URL group, such as /wp-admin/admin-ajax.php or /product/:id/.
row.count requiredintegerRange: 0 to any.
row.errors requiredintegerRange: 0 to any.
row.client_errors requiredintegerRange: 0 to any.
row.error_rate requirednumberRange: 0 to 1.
row.rate_per_min requirednumberRange: 0 to any.
row.total_ms requirednumberRange: 0 to any.
row.share requirednumber or nullShare of all time spent in the window, 0 to 1 (Kinsta's "Total duration (%)"). Range: 0 to 1.
row.avg_ms requirednumberRange: 0 to any.
row.p95_ms requirednumber or nullRange: 0 to any.
row.max_ms requirednumberRange: 0 to any.
row.cache_hit_ratio requirednumberRange: 0 to 1.
row.db_queries_avg requirednumber or nullRange: 0 to any.
row.mem_peak_kb requiredinteger or nullRange: 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the environment.
fromquerystring (date-time)
toquerystring (date-time)
qquerystringCase-insensitive text the URL group must contain.
sortquerystringOne of: impact, avg, max, count, errors. Default: impact.
filterquerystringOne of: all, errors, slow, uncached. Default: all.
limitqueryintegerHow many rows to return in one page: at most 500, and 100 when left out. Default: 100. Range: 1 to 500.

Responses

StatusBodyDescription
200ApmUrlListTransactions
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
environment_id requiredstring (uuid)UUIDv7
from requiredstring (date-time)
to requiredstring (date-time)
enabled requiredboolean
available requiredboolean
note requiredstring or null
last_data_at requiredstring or null (date-time)
total_rows requiredintegerRows that match before the limit. Range: 0 to any.
data requiredarray of object
data[].name requiredstringThe URL group, such as /wp-admin/admin-ajax.php or /product/:id/.
data[].count requiredintegerRange: 0 to any.
data[].errors requiredintegerRange: 0 to any.
data[].client_errors requiredintegerRange: 0 to any.
data[].error_rate requirednumberRange: 0 to 1.
data[].rate_per_min requirednumberRange: 0 to any.
data[].total_ms requirednumberRange: 0 to any.
data[].share requirednumber or nullShare of all time spent in the window, 0 to 1 (Kinsta's "Total duration (%)"). Range: 0 to 1.
data[].avg_ms requirednumberRange: 0 to any.
data[].p95_ms requirednumber or nullRange: 0 to any.
data[].max_ms requirednumberRange: 0 to any.
data[].cache_hit_ratio requirednumberRange: 0 to 1.
data[].db_queries_avg requirednumber or nullRange: 0 to any.
data[].mem_peak_kb requiredinteger or nullRange: 0 to any.
data[].breakdown requiredobject

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

NameInTypeDescription
id requiredpathstring (uuid)The id of the environment.

Responses

StatusBodyDescription
200PhpEngineThe PHP engine
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
version requiredstringOne of: 8.1, 8.2, 8.3, 8.4, 8.5.
available_versions requiredarray of string
tier requiredobject
tier.key requiredstring
tier.threads requiredintegerRange: 0 to any.
tier.pool_mb requiredintegerRange: 0 to any.
pool requiredobject
pool.pm requiredstring
pool.max_children requiredintegerRange: 0 to any.
pool.start_servers requiredinteger or nullRange: 0 to any.
pool.min_spare_servers requiredinteger or nullRange: 0 to any.
pool.max_spare_servers requiredinteger or nullRange: 0 to any.
pool.process_idle_timeout_s requiredinteger or nullRange: 0 to any.
pool.max_requests requiredintegerRange: 0 to any.
pool.request_terminate_timeout_s requiredintegerRange: 0 to any.
pool.slowlog_timeout_s requiredinteger or nullRange: 0 to any.
ini requiredobjectEffective values: the image ini, then the pool file on top.
opcache requiredobject
opcache.enabled requiredboolean
opcache.memory_mb requiredintegerRange: 0 to any.
opcache.interned_strings_mb requiredintegerRange: 0 to any.
opcache.max_accelerated_files requiredintegerRange: 0 to any.
opcache.validate_timestamps requiredboolean
opcache.jit requiredstring 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the environment.
Idempotency-KeyheaderstringOptional 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

NameTypeDescription
enabled requiredboolean

Responses

StatusBodyDescription
200ApmToolResultThe tool state
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)

200 response fields

NameTypeDescription
environment_id requiredstring (uuid)UUIDv7
tool_enabled requiredboolean
stopped_collection_job_id requiredstring or null (uuid)The set_apm job that stopped a running collection. Null when none was running.
message requiredstring

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

NameInTypeDescription
id requiredpathstring (uuid)The id of the site.
daysqueryintegerHow many days of history to return. Default: 30. Range: 1 to 90.
strategyquerystringOne of: mobile, desktop.

Responses

StatusBodyDescription
200PagespeedOverviewThe Lighthouse results
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
site_id requiredstring (uuid)UUIDv7
environment_id requiredstring or null (uuid)UUIDv7
available requiredboolean
tool_enabled requiredboolean
reason requiredstring or null
live_url requiredstring or null
report_url requiredstring or nullThe full report on PageSpeed Insights, or null without a live address.
latest requiredobjectThe newest finished run of each strategy.
latest.mobile requiredone of PagespeedRun, null
latest.desktop requiredone of PagespeedRun, null
active requiredarray of PagespeedRunRuns queued or running now.
active[].id requiredstring (uuid)UUIDv7
active[].site_id requiredstring (uuid)UUIDv7
active[].environment_id requiredstring (uuid)UUIDv7
active[].strategy requiredstringOne of: mobile, desktop.
active[].status requiredstringOne of: queued, running, done, failed.
active[].trigger requiredstringOne of: manual, scheduled.
active[].url requiredstringThe address that was tested.
active[].created_at requiredstring (date-time)
active[].started_at requiredstring or null (date-time)
active[].finished_at requiredstring or null (date-time)
active[].error requiredstring or nullA plain sentence when the run failed.
active[].error_code requiredstring or nullOne of: not_configured, unreachable, no_content, busy, unavailable, timeout, stuck, failed.
active[].job_id requiredstring 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the site.
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.

Request body application/json, required, StartPagespeedRunRequest

Fields

NameTypeDescription
strategystringThe device profile to test. both starts a mobile and a desktop test. One of: mobile, desktop, both. Default: both.

Responses

StatusBodyDescription
202PagespeedRunsStartedAccepted. The runs are queued.
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
runs requiredarray of PagespeedRun
runs[].id requiredstring (uuid)UUIDv7
runs[].site_id requiredstring (uuid)UUIDv7
runs[].environment_id requiredstring (uuid)UUIDv7
runs[].strategy requiredstringOne of: mobile, desktop.
runs[].status requiredstringOne of: queued, running, done, failed.
runs[].trigger requiredstringOne of: manual, scheduled.
runs[].url requiredstringThe address that was tested.
runs[].created_at requiredstring (date-time)
runs[].started_at requiredstring or null (date-time)
runs[].finished_at requiredstring or null (date-time)
runs[].error requiredstring or nullA plain sentence when the run failed.
runs[].error_code requiredstring or nullOne of: not_configured, unreachable, no_content, busy, unavailable, timeout, stuck, failed.
runs[].job_id requiredstring or null (uuid)
runs[].report requiredobject or nullThe result, once the run is done.
skipped requiredarray of objectStrategies left out because one was tested less than 10 minutes ago.
skipped[].strategy requiredstringOne of: mobile, desktop.
skipped[].retry_after_seconds requiredinteger

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

NameInTypeDescription
id requiredpathstring (uuid)The id of the site.
run_id requiredpathstring (uuid)The id of the run.

Responses

StatusBodyDescription
200PagespeedRunThe run
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
id requiredstring (uuid)UUIDv7
site_id requiredstring (uuid)UUIDv7
environment_id requiredstring (uuid)UUIDv7
strategy requiredstringOne of: mobile, desktop.
status requiredstringOne of: queued, running, done, failed.
trigger requiredstringOne of: manual, scheduled.
url requiredstringThe address that was tested.
created_at requiredstring (date-time)
started_at requiredstring or null (date-time)
finished_at requiredstring or null (date-time)
error requiredstring or nullA plain sentence when the run failed.
error_code requiredstring or nullOne of: not_configured, unreachable, no_content, busy, unavailable, timeout, stuck, failed.
job_id requiredstring or null (uuid)
report requiredobject or nullThe result, once the run is done.
report.lighthouse_version requiredstring or null
report.fetched_at requiredstring or null (date-time)When Google ran the test.
report.final_url requiredstring or nullThe address Google ended up on after redirects.
report.scores requiredobject
report.metrics requiredarray of object
report.field requiredobject
report.audits requiredarray of object
report.categories requiredarray of objectEvery 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.