Skip to main content
MainWP Maintenance registers two read-only abilities in the 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_json examples below
  • A MainWP Maintenance release with Abilities support, active on MainWP Dashboard
  • An authenticated user with manage_options and access to the Maintenance Add-on
Use an Application Password or the authentication methods in the Abilities API overview. The examples use an Application Password. The schedule detail ability also checks site access for each returned site. Sites you cannot access are omitted from sites and failed_sites.

Available Abilities

Discover the abilities and their schemas:

List Maintenance Schedules

Ability: mainwp/list-maintenance-schedules-v1
Method: GET
This ability accepts no input properties.
Example response:
schedules is always an array. It is empty when no schedules are stored.

Get One Maintenance Schedule

Ability: mainwp/get-maintenance-schedule-v1
Method: GET
The response contains every schedule field plus two site lists:
The example omits some schedule fields for brevity.
  • sites lists the sites the schedule targets, after MainWP expands selected tags and clients. It includes only sites you can access.
  • failed_sites lists 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.
Both lists are always arrays, even when empty.

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: