Skip to main content
The Jetpack Protect Integration registers ten abilities in the mainwp-jetpack-protect category. All use the mainwp/ namespace on your MainWP Dashboard. Two fleet-level read abilities list stored summaries and scans. Eight site-level abilities add live control state, stored observations, findings, history, queued refreshes, and previewed connection and visibility changes.

What You’ll Learn

  • List stored Jetpack Protect summaries for your sites
  • Read one site’s stored scan, findings, and scan history
  • Read live connection and visibility state from a child site
  • Request a fresh scan read and track the queued operation
  • Preview and confirm Jetpack connection or plugin visibility changes
  • Handle stale revisions, conflicts, and unknown outcomes

Prerequisites

  • WordPress 6.9 or later on the MainWP Dashboard site
  • MainWP Dashboard with Abilities API support; use version 6.2 or later for the input_json and DELETE examples
  • Jetpack Protect Integration active in MainWP Dashboard
  • Jetpack Protect plugin installed on the child site
  • MainWP Child 6.4 or later for live control reads, connection and visibility changes, and refresh execution
  • An authenticated user with access to the Jetpack Protect Add-on and to the selected site
  • A working WordPress scheduled-task runner (WP-Cron or a system cron) on the Dashboard site for refresh, connection, and visibility requests
Use an Application Password or the authentication methods in the Abilities API overview. The examples use an Application Password.
On Child versions older than 6.4, live control reads and connection or visibility requests return unsupported_version. A refresh can be queued but then fails when it reaches the incompatible Child. Stored observation, findings, history, and operation reads do not contact the Child. The Hide, Unhide, Connect, and Disconnect actions on the Jetpack Protect page keep working on those sites.

Available Abilities

Discover the full input and output schemas:
The eight site-level abilities register only after the integration’s database tables are ready. If they are missing, open wp-admin on the Dashboard so the integration can finish its database update.

Permissions

Every call checks the Dashboard Abilities API permission, the Jetpack Protect extension right, and access to the selected site. The two fleet-level abilities also require manage_options. Team Control site restrictions apply. Operation status is available only to the user who made the request, for the same site.

Request Rules

Site-level inputs use site_id_or_domain, such as 1, "1", or "example.com". All inputs reject extra properties. revision, if_match, and finding_ref values are opaque 64-character lowercase hexadecimal strings returned by the abilities. Use the returned values instead of constructing them. Each write requires a UUID request_ref. Reuse it only to retry the identical request. A retry returns the stored result instead of acting twice. Reusing a request_ref with different inputs returns request_conflict. Connection and visibility changes also require JSON booleans for dry_run and confirm: Setting both flags to true returns mainwp_protect_invalid_input. Setting both to false returns confirmation_required.

List Jetpack Protect Sites

Ability: mainwp/list-jetpack-protect-sites-v1
Method: GET
Input: site_id, page, and per_page (all optional)
List all accessible sites:
Request a specific page:
Example response:
The list includes only sites you can access that have stored Jetpack Protect data. total is the number of those sites. Increase page until you have read total sites. A page beyond the last result returns an empty sites array.

Get a Site’s Latest Scan

Ability: mainwp/get-jetpack-protect-site-scan-v1
Method: GET
Input: site_id (required)
Example response:
The response includes at most 100 vulnerability summaries. When more findings are stored, truncated is true. counts still reports the full stored totals, so use the Jetpack Protect page to review the complete list. If the site has no stored scan, the response returns scanned_at: null, zero counts, an empty vulnerabilities array, and truncated: false.

Read the Live Control State

Ability: mainwp/get-site-jetpack-protect-control-state-v1
Method: GET
This ability contacts the child site. Read the control state immediately before each change.

Read the Stored Observation

Ability: mainwp/get-site-jetpack-protect-observation-v1
Method: GET
Required input is site_id_or_domain. This reads stored data and does not contact the child site. no_snapshot means the site is connected but no scan has been stored yet. not_configured means the site has no Jetpack Protect connection data. Request a refresh to store a new scan.

List Findings

Ability: mainwp/list-site-jetpack-protect-findings-v1
Method: GET
The response contains site_id, observed_at, findings, next_after_finding_ref, truncated, and revision. Each finding includes finding_ref, kind, title, component_name, and remediation (core_update_available, component_update_available, component_delete_available, or none). File paths and raw provider details are not returned. Continue with next_after_finding_ref while truncated is true. A missing or partial stored scan returns invalid_snapshot.

List Scan History

Ability: mainwp/list-site-jetpack-protect-history-v1
Method: GET
The response contains site_id, observations, next_before_observed_at, next_before_generation_id, and truncated. Each observation includes observed_at, availability (available or partial), total (null for partial scans), and revision. To page, pass both cursor fields from the previous response. Sending only before_observed_at with a timestamp that matches a stored scan returns history_cursor_restart. Restart from the first page in that case. Older scan history is pruned after about 90 days; the latest stored result for each site is retained.

Request a Refresh

Ability: mainwp/request-site-jetpack-protect-refresh-v1
Method: POST
Required inputs are site_id_or_domain and request_ref. The response contains operation_ref, site_id, type (refresh), status, and accepted_at. Use operation_ref to check the operation. The refresh reads the latest scan data from the child site. It does not start a new Jetpack scan. Only one refresh can be active per site; another request returns lock_busy.

Change Connection or Visibility

Abilities: mainwp/replace-site-jetpack-protect-connection-v1, mainwp/replace-site-jetpack-protect-visibility-v1
Method: DELETE
1

Read the control state

Call mainwp/get-site-jetpack-protect-control-state-v1 and copy revision.
2

Preview the change

Review would_change, current_state, and desired_state. A preview does not queue work.
3

Confirm the change

Send the same request with "dry_run":false and "confirm":true. The response has mode: accepted, an operation_ref, and status queued. If the site is already in the desired state, status is succeeded and nothing is sent to the child site.
4

Check the operation

Poll mainwp/get-site-jetpack-protect-operation-v1 until the status is terminal.
If the live state changed since you read it, the call returns stale_revision. Read the control state again and repeat the preview.
Connecting a site registers it with WordPress.com.

Check an Operation

Ability: mainwp/get-site-jetpack-protect-operation-v1
Method: GET
Required inputs are site_id_or_domain and operation_ref. The response contains operation_ref, site_id, type (refresh, connection, or visibility), status, accepted_at, started_at, finished_at, outcome, and retryable. unknown is final. The integration does not retry or reconcile it. Read the control state and send a new request with a new request_ref if needed. Queued work runs through WordPress scheduled tasks. If an operation stays queued, check that WP-Cron or a system cron runs on the Dashboard site. Finished operations are kept for 7 days.

Privacy and Redaction

The two stored summary abilities return an explicit set of fields. They never return raw stored scan data, Jetpack account details, credentials, source URLs, or server file paths. Before returning a stored summary response, the add-on checks every text value:
  • Query strings and fragments are removed from URL-like text.
  • Text containing a Basic or Bearer authentication marker is replaced with [redacted]. This also applies to site names and component names that contain these words followed by more text, such as Basic Auth.
  • Common API keys, JWTs, PEM blocks, and password=, token:, or similar assignments are replaced with [redacted].
  • Text containing links, slashes, or @ is returned as an empty string.
  • Text values are limited to 200 characters.
This is a bounded masking policy, not a guarantee that any arbitrary string is safe to share. The site-level abilities retain only validated scan fields. Finding titles are limited to 160 characters and component names to 120. File and database findings have no component name. Text containing control characters or angle brackets is rejected.

Error Handling

Standard authentication, schema, and method errors follow the Abilities API error reference. The two stored summary abilities return:

Site-Level Errors