mainwp-staging category. Both use the mainwp/ namespace on your MainWP Dashboard.
Use them to find which Child Sites have staging clones, check whether each clone is connected to your Dashboard, and review the Staging settings that apply to a site. They are available in the Abilities-enabled Staging release.
What You’ll Learn
- List Child Sites that have stored staging clones
- Read one site’s clones and effective saved settings
- Tell whether a site overrides the general settings
- Interpret clone-to-Dashboard mappings
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_jsonexample below - An Abilities-enabled release of the Staging Add-on, active in MainWP Dashboard
- An authenticated WordPress user with
manage_optionsand access to the Staging Add-on - Access to the selected MainWP site for site-specific calls
mainwp_site_not_found with HTTP 404.
Use an Application Password or the authentication methods in the Abilities API overview. The examples use an Application Password.
Available Abilities
Discover the abilities and their full input and output schemas:
List Staging Sites
Ability:mainwp/list-staging-sites-v1Method: GET
Input: None
sites is an empty array.
Each clone contains:
A
staging_site_exists value of false with a non-null staging_site_id means the mapped staging site was removed from your Dashboard.
Get Site Staging
Ability:mainwp/get-site-staging-v1Method: GET
site_id is required and must be a positive integer. No other input properties are accepted.
Example response:
override and settings. A site without clones returns clone_count: 0 and an empty clones array.
override is true when the site has Override General Settings enabled. In that case, settings contains the site’s own saved settings. Otherwise, settings contains the saved general settings.
settings includes only values that were saved. Missing values are omitted rather than filled with the defaults shown in the Dashboard. When no settings were saved, settings is an empty object ({}).
Responses never include passwords, keys, tokens, database prefixes, or other stored settings.
Errors
Unauthenticated requests return HTTP 401. MainWP Dashboard can also return its standard authentication and site-access errors.
These abilities do not create, update, or delete staging sites. They also do not save settings or refresh clone data from Child Sites. Use the Staging Add-on in your Dashboard for those tasks.
Related Resources
- Staging Add-on - Create, update, and delete staging sites
- Abilities API Overview - Authentication and request formats
- Clone Abilities - Read and manage stored Clone policy
