mainwp-maintenance category. Both use the mainwp/ namespace on your MainWP Dashboard.
Use them to audit cleanup schedules, check which schedules are paused or failing, and find the sites a schedule targets. They read schedules stored on MainWP Dashboard only. They do not run cleanup, contact child sites, or create, edit, pause, resume, or delete schedules. Use the Maintenance schedules screen for those actions.
What You’ll Learn
- List all stored maintenance schedules
- Read one schedule with its target sites and last-run failed sites
- Interpret schedule fields, statuses, and timestamps
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 - A MainWP Maintenance release with Abilities support, active on MainWP Dashboard
- An authenticated user with
manage_optionsand access to the Maintenance Add-on
sites and failed_sites.
Available Abilities
Discover the abilities and their schemas:
List Maintenance Schedules
Ability:mainwp/list-maintenance-schedules-v1Method: GET This ability accepts no input properties.
schedules is always an array. It is empty when no schedules are stored.
Get One Maintenance Schedule
Ability:mainwp/get-maintenance-schedule-v1Method: GET
siteslists the sites the schedule targets, after MainWP expands selected tags and clients. It includes only sites you can access.failed_siteslists the sites that failed during the last run. It includes only sites you can access. It does not include the recorded error text; review failure details on the Schedules screen.
Schedule Fields
Timestamps are Unix seconds in UTC.
In
frequency, schedule is the period (daily, weekly, monthly, or yearly) and perform is how many times the schedule runs per period. recurring_day and recurring_hour are the stored run day and hour for schedules that run once per week, month, or year.
target_counts counts the selected sites, tags, and clients. It does not count the total sites those tags and clients contain. Use the sites list from the detail ability for the expanded site list.
Task Values
See Maintenance Options for what each task does.
Statuses
status uses the same states as the Status column on the Schedules screen: paused, running, failed, unscheduled, scheduled, due, delayed, or missed. See Schedule Statuses for their meanings.
Error Handling
Standard authentication, schema, and method errors follow the Abilities API error reference. Maintenance can also return:Related Resources
- Maintenance - Create, run, and manage maintenance schedules
- Abilities API Overview - Authentication, input formats, discovery, and errors
- Sites Abilities - Look up site details by
site_id
