Skip to main content
MainWP Dashboard Lock registers two read-only abilities in the mainwp-dashboard-lock category. Both use the mainwp/ namespace and report the settings saved on your MainWP Dashboard site.
These abilities require the Dashboard Lock release that includes Abilities API support. Earlier builds do not register them. Check ability discovery on your Dashboard before using these examples.

What You’ll Learn

  • Check which Dashboard Lock protections have stored settings
  • Read the stored redirect URL, exclusions, and IP allowlists
  • Confirm whether HTTP Basic Authentication credentials are stored without exposing them
  • Understand what these reads do not verify

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 example below
  • Dashboard Lock with Abilities API support, active and enabled in MainWP Dashboard
  • An authenticated WordPress user with manage_options and access to the Dashboard Lock Add-on
Team Control restrictions apply. Authenticate with an Application Password or another method described in the Abilities API overview. The examples use an Application Password.

When to use these abilities

Use these reads to audit Dashboard Lock settings from scripts, monitoring tools, or AI assistants without opening MainWP > Add-ons > Security > Dashboard Lock. For example, you can confirm that a redirect URL and an IP allowlist are saved across several Dashboards. Both abilities only read the stored settings. They do not inspect .htaccess or .htpasswd files, so they cannot confirm that locks are applied on the server or that your server supports them. To change or remove locks, use the Dashboard Lock settings page.

Available Abilities

Both abilities are marked read-only, non-destructive, and idempotent. Discover their complete input and output schemas:
Neither ability takes parameters. Omit the input, send null, or send an empty object {}. Any input property, including site_id, is rejected. These abilities read Dashboard settings only and do not apply to Child sites.

Get Dashboard Lock Status

Ability: mainwp/get-dashboard-lock-status-v1
Method: GET
Example response:

Get Dashboard Lock Configuration

Ability: mainwp/get-dashboard-lock-configuration-v1
Method: GET
Example response:
List fields drop blank lines and surrounding whitespace. Each Basic Authentication object contains:
  • username_configured: a username is saved.
  • credential_configured: both a username and a password are saved.
Usernames and passwords are never returned, and stored passwords are not decrypted. Treat the redirect URL and IP allowlists as sensitive, because they reveal how your Dashboard is protected.

Errors

Other MainWP Dashboard permission errors can also be returned. See the Abilities API overview for details.