mainwp-advanced-uptime-monitor category. They cover the four providers the extension supports: UptimeRobot, Site24x7, NodePing, and Better Uptime/Better Stack.
These abilities only appear when the Advanced Uptime Monitor extension is installed and activated on the Dashboard, and calls against a provider only succeed once that provider’s credentials are saved in the extension settings. The abilities index paginates at 50 entries per page, so add ?category=mainwp-advanced-uptime-monitor when discovering them:
What You’ll Learn
- Reading cached monitor mappings and events for a site
- Reading live uptime percentages from the provider
- Creating monitors, pausing them, and deleting them
- Running a paginated provider synchronization
Service Values
Every ability takes aservice parameter naming the provider to talk to:
Monitors are addressed by
local_monitor_id, the Dashboard’s own mapping row ID. Provider-side monitor IDs are never accepted as input and never returned.
Access Control
Six of the seven abilities are site-scoped: the caller needs MainWP extension access to Advanced Uptime Monitor and access to the specific site insite_id. Team Control role restrictions apply here the same way they do in the Dashboard UI, including for requests authenticated with an API key.
mainwp/sync-uptime-monitors-v1 works across the whole provider inventory rather than one site, so it requires manage_options plus unrestricted access to all sites. A role limited to a subset of child sites cannot run it.
mainwp/list-uptime-monitors-v1
List the Dashboard’s cached monitor mappings for one site and provider. No provider request is made. Method: GET (readonly)
Response:
administrative_state is active, paused, or unknown. observed_status is up, down, degraded, pending, or unknown.
mainwp/list-uptime-monitor-events-v1
List cached events for one monitor. Values are redacted down to timing and status; provider event IDs and payloads are not exposed. Method: GET (readonly)
Response:
status is one of up, down, degraded, paused, resolved, open, unknown. duration_seconds and response_time_ms are null when the provider did not report them.
mainwp/get-site-uptime-summary-v1
Read live uptime percentages from the provider for one site. This call reaches the provider but does not import events or write to the Dashboard cache. Method: GET (readonly)
Response:
null. Site24x7 and Better Stack cap all_time at the last 365 days rather than the full monitor history.
mainwp/create-site-uptime-monitor-v1
Create one monitor for a site using the provider’s default check settings, then store the confirmed mapping on the Dashboard. Method: POSTmainwp/delete-uptime-monitor-v1 with the returned local_monitor_id after confirming the exact monitor with the user.
Input Parameters:
There are no check-interval, alert-contact, or monitor-type parameters. The monitor is created with provider defaults against the site’s own URL. Adjust it afterward in the extension UI or in the provider’s own dashboard.
Response:
stored_http_credentials_forwarded reports whether HTTP basic auth credentials already stored for the site were sent to the provider so the monitor can reach a protected site. The credential values are never returned.
A site that already has a monitor for the same provider returns mainwp_aum_monitor_exists (409). If the provider creates the monitor but the Dashboard write then fails, the call returns mainwp_aum_database_failure (500) with a message telling you to run a provider synchronization before retrying, so a blind retry does not create a second remote monitor.
mainwp/set-uptime-monitor-state-v1
Pause or resume one monitor. The Dashboard cache is reconciled only after the provider confirms the change. Method: POSTstate value.
Input Parameters:
Response:
"status": "unchanged" with local_cache_updated set to false.
mainwp/delete-uptime-monitor-v1
Delete one monitor at the provider, then remove its Dashboard mapping and cached events. Method: POST (destructive)
Response:
mainwp/sync-uptime-monitors-v1
Pull the provider’s monitor inventory into the Dashboard one page at a time and reconcile mappings. Method: POST (destructive) Start a run with this request outline:
Response:
sync_token and next_cursor until status is complete and next_cursor is null.
skipped_unassigned counts provider monitors whose address does not match any child site on this Dashboard. Those monitors are left alone.
Run state lives in a transient that expires after 15 minutes. A token that has expired, or a cursor that does not match where the run left off, returns mainwp_aum_sync_expired (409). Starting a second run for the same provider while one is still open returns mainwp_aum_operation_locked (409).
Site24x7 and NodePing return their whole inventory on the first call, so a cursor above 0 for those two providers is rejected as invalid input.
Error Reference
These codes come from the extension in addition to the framework errors listed in the Abilities API Overview.
A
mainwp_aum_remote_outcome_unknown response means the write may or may not have landed at the provider. Run mainwp/sync-uptime-monitors-v1 to find out before retrying.
Related Resources
- Abilities API Overview - API basics and authentication
- Advanced Uptime Monitor - Extension setup and provider credentials
- Sites Abilities - Site management abilities
- Team Control - Role-based access to sites and monitors
