Back to Top

This API is designed to aid the automated management and control of any installation of the Shield Security plugin on a WordPress site.

This is the documentation for version 1.0.0 of the API. Last update on Mar 20, 2022.

This API is provided under license Apache 2.0.

Base URL
https://virtserver.swaggerhub.com/Fernleaf-Systems/ShieldSecurity/1.0.0

Retrieve current pro-license state

GET /license

Get the current state of ShieldPRO license.

Responses
  • 200 object

    the current state of pro-license

    • license string

      the summary status of the license

    • item_name string

      the product name of the license

    • url string(url)

      the URL of the site to which the license is assigned

    • expires string(timestamp)

      the date of license expiration

    • expires_at integer(timestamp)

      the date of license expiration as unix epoch timestamp

    • is_trial boolean

      whether the current license is a trial license

    • install_id string(uuid)

      the unique installation ID

    • last_verified_at integer(timestamp)

      the date of license was last checked and verified

  • 400

    bad input parameter

GET /license
curl \
 -X GET https://virtserver.swaggerhub.com/Fernleaf-Systems/ShieldSecurity/1.0.0/license
Response example (200)
{
  "license": "valid",
  "item_name": "Shield Security Pro for WordPress",
  "url": "https://getshieldsecurity.com",
  "expires": "2022-09-16 14:49:32",
  "expires_at": 1663339772,
  "is_trial": false,
  "install_id": "22126021-0b41-4f87-90a7-5530daf74126",
  "last_verified_at": 1644601669
}

Force-check for license

POST /license

force re-check of pro-license status

Responses
  • 201 object

    the current state of pro-license

    • license string

      the summary status of the license

    • item_name string

      the product name of the license

    • url string(url)

      the URL of the site to which the license is assigned

    • expires string(timestamp)

      the date of license expiration

    • expires_at integer(timestamp)

      the date of license expiration as unix epoch timestamp

    • is_trial boolean

      whether the current license is a trial license

    • install_id string(uuid)

      the unique installation ID

    • last_verified_at integer(timestamp)

      the date of license was last checked and verified

  • 400

    invalid input, object invalid

POST /license
curl \
 -X POST https://virtserver.swaggerhub.com/Fernleaf-Systems/ShieldSecurity/1.0.0/license
Response example (201)
{
  "license": "valid",
  "item_name": "Shield Security Pro for WordPress",
  "url": "https://getshieldsecurity.com",
  "expires": "2022-09-16 14:49:32",
  "expires_at": 1663339772,
  "is_trial": false,
  "install_id": "22126021-0b41-4f87-90a7-5530daf74126",
  "last_verified_at": 1644601669
}

Retrieve entire options list and the current values

GET /options

Get entire set of all configuration options and their respective current values.

Responses
  • 200 array[object]

    all configuration options & values

  • 400

    bad input parameter

GET /options
curl \
 -X GET https://virtserver.swaggerhub.com/Fernleaf-Systems/ShieldSecurity/1.0.0/options
Response example (200)
[
  {
    "key": "enable_tracking",
    "module": "hack_guard"
  }
]

Set the value of multiple options

POST /options

Sets the value of multiple options

Query parameters
  • filter_keys string

    Comman-separated options keys to filter in the response

  • filter_fields string

    Comman-separated options fields to filter in the response

Body

Option item to update

Responses
  • 201

    options updated

  • 400

    invalid input, object invalid

POST /options
curl \
 -X POST https://virtserver.swaggerhub.com/Fernleaf-Systems/ShieldSecurity/1.0.0/options \
 -H "Content-Type: application/json" \
 -d '{"options":[{"key":"enable_tracking","module":"hack_guard"}]}'
Request example
{
  "options": [
    {
      "key": "enable_tracking",
      "module": "hack_guard"
    }
  ]
}

Retrieve a single option

GET /options/{key}

Retrieve the full definition of any single plugin option and its current value.

Path parameters
  • key Required / string

    the option key from from within the plugin

Responses
  • 200 array[object]

    all configuration options & values

  • 400

    bad input parameter

GET /options/{key}
curl \
 -X GET https://virtserver.swaggerhub.com/Fernleaf-Systems/ShieldSecurity/1.0.0/options/{key}
Response example (200)
[
  {
    "key": "enable_tracking",
    "module": "hack_guard"
  }
]

Set any single option

POST /options/{key}

Sets the value of any single option

Path parameters
  • key Required / string

    the option key from from within the plugin

Query parameters
  • value Required / string | integer | array

    the new value for the option

Body
Responses
  • 200 array[object]

    updated option reflecting new value

  • 400

    invalid input, object invalid

POST /options/{key}
curl \
 -X POST https://virtserver.swaggerhub.com/Fernleaf-Systems/ShieldSecurity/1.0.0/options/{key}?value=string \
 -H "Content-Type: application/json"
Request example
{}
Response example (200)
[
  {
    "key": "enable_tracking",
    "module": "hack_guard"
  }
]

Retrieve latest scan results

GET /scan_results

Get latest scan results.

Responses
  • 200 array[object]

    the latest scan results

    • enqueued_count integer

      the total number of enqueued scans

    • the status of the current scans

    • current_slug string

      the slug of the currently running scan

    • current_name string

      the name of the currently running scan

    • progress number

      the overall progress (as a percentage) of completion of all scans in the current queue

  • 400

    bad input parameter

GET /scan_results
curl \
 -X GET https://virtserver.swaggerhub.com/Fernleaf-Systems/ShieldSecurity/1.0.0/scan_results
Response example (200)
[
  {
    "enqueued_count": 1,
    "enqueued_status": {
      "afs": true,
      "apc": false,
      "wpv": false
    },
    "current_slug": "afs",
    "current_name": "afs",
    "progress": 0.641028
  }
]

Retrieve current state of all scans

GET /scans

Get the current state of scans running (if they are) on the site and any current progress.

Responses
  • 200 array[object]

    the current state of all scans

    • enqueued_count integer

      the total number of enqueued scans

    • the status of the current scans

    • current_slug string

      the slug of the currently running scan

    • current_name string

      the name of the currently running scan

    • progress number

      the overall progress (as a percentage) of completion of all scans in the current queue

  • 400

    bad input parameter

GET /scans
curl \
 -X GET https://virtserver.swaggerhub.com/Fernleaf-Systems/ShieldSecurity/1.0.0/scans
Response example (200)
[
  {
    "enqueued_count": 1,
    "enqueued_status": {
      "afs": true,
      "apc": false,
      "wpv": false
    },
    "current_slug": "afs",
    "current_name": "afs",
    "progress": 0.641028
  }
]

Initiate new scans

POST /scans

Initiate new scans to run asynchronously from the request

Query parameters
  • scan_slugs array[string]

    a comma-separated list of scan slugs for scans to initiate

Body

Option item to update

Responses
  • 201 array[object]

    the current state of all scans

    • enqueued_count integer

      the total number of enqueued scans

    • the status of the current scans

    • current_slug string

      the slug of the currently running scan

    • current_name string

      the name of the currently running scan

    • progress number

      the overall progress (as a percentage) of completion of all scans in the current queue

  • 400

    invalid input, object invalid

  • 500

    scans already running

POST /scans
curl \
 -X POST https://virtserver.swaggerhub.com/Fernleaf-Systems/ShieldSecurity/1.0.0/scans \
 -H "Content-Type: application/json" \
 -d '{"enqueued_count":1}'
Request example
{
  "enqueued_count": 1
}
Response example (201)
[
  {
    "enqueued_count": 1,
    "enqueued_status": {
      "afs": true,
      "apc": false,
      "wpv": false
    },
    "current_slug": "afs",
    "current_name": "afs",
    "progress": 0.641028
  }
]