Skip to main content
Patchstack 6.2 registers five read-only abilities in the mainwp-patchstack category. All use the mainwp/ namespace on your MainWP Dashboard. Use these abilities when an AI assistant, script, or other tool needs Patchstack status without opening the Patchstack screens. They read data that MainWP Dashboard has already saved. They do not contact Patchstack or the Child site.

What You’ll Learn

  • Check whether the Patchstack connection is configured and syncing
  • Read one site’s protection state and cached vulnerability counts
  • List cached vulnerability summaries for a site
  • Read account-wide site and vulnerability totals

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 examples below
  • Patchstack 6.2 or later, active in MainWP Dashboard and connected to your Patchstack account
  • An authenticated user with manage_options and access to the Patchstack Add-on
  • Access to the selected site for site-specific calls
Team Control restrictions apply. Every ability requires the Patchstack extension permission. Site-specific abilities also check the user’s access to the exact requested site. Use an Application Password or the authentication methods in the Abilities API overview. The examples use an Application Password.

Available Abilities

Discover the full input and output schemas:
All five abilities are marked readonly: true, destructive: false, and idempotent: true.

Request Rules

All inputs reject extra properties. Site-specific abilities require site_id, a positive MainWP site ID such as 1. Integer strings such as "1" are also accepted. Domains and URLs are not accepted. Times are returned as UTC strings in YYYY-MM-DDTHH:MM:SSZ format. A time is null when MainWP has no saved value.
These abilities return the data from the last Patchstack sync. To get newer data, click Sync Patchstack Data or Sync API Data in MainWP > Sites > Security > Patchstack Integration, or wait for the scheduled sync. Then read the ability again.

Read the Connection

Ability: mainwp/get-patchstack-connection-v1
Method: GET
Input: None
Example response:
The response never includes the API key.

Read Account Totals

Ability: mainwp/get-patchstack-account-observation-v1
Method: GET
Input: None

Read a Site’s Protection State

Ability: mainwp/get-site-patchstack-state-v1
Method: GET
Example response:
A site that was never added to Patchstack returns false for every flag.

Read a Site’s Vulnerability Counts

Ability: mainwp/get-site-patchstack-observation-v1
Method: GET
Example response:

List a Site’s Vulnerabilities

Ability: mainwp/list-site-patchstack-vulnerabilities-v1
Method: GET
Example response:
total is the number of cached vulnerabilities for the site. Increase page until you have read total items.

Handle Errors

MainWP Dashboard supplies its own authentication, site-not-found, and site-access errors, including HTTP 401 for unauthenticated requests. WordPress can also reject input that does not match the schema before the Add-on runs.