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_jsonexamples below - Patchstack 6.2 or later, active in MainWP Dashboard and connected to your Patchstack account
- An authenticated user with
manage_optionsand access to the Patchstack Add-on - Access to the selected site for site-specific calls
Available Abilities
Discover the full input and output schemas:
readonly: true, destructive: false, and idempotent: true.
Request Rules
All inputs reject extra properties. Site-specific abilities requiresite_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-v1Method: GET
Input: None
The response never includes the API key.
Read Account Totals
Ability:mainwp/get-patchstack-account-observation-v1Method: GET
Input: None
Read a Site’s Protection State
Ability:mainwp/get-site-patchstack-state-v1Method: GET
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-v1Method: GET
List a Site’s Vulnerabilities
Ability:mainwp/list-site-patchstack-vulnerabilities-v1Method: GET
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.
Related Resources
- Patchstack - Setup, site protection, and sync
- Abilities API Overview - Authentication and request formats
- Team Control - Grant access to the Patchstack Add-on
