WordPress Site Tools

With the tools endpoint, you can perform actions on sites like:

Most of these tool endpoints will trigger longer tasks (from a few seconds to around a minute) on your environments. This is why they provide 202 Accepted response, with an operation_id in the body. To check the progress, you can use the /operations endpoint.

Clear Site Cache

SecuritybearerAuth
Request
Request Body schema: application/json
required
environment_id
required
string
Responses
202

Clearing site cache in progress

401

No or invalid API key provided to the request

500

Error occurred while trying to clear cache

post/sites/tools/clear-cache
Request samples
application/json
{
  • "environment_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1"
}
Response samples
application/json
{
  • "operation_id": "cache:clear-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  • "message": "Clearing site cache in progress",
  • "status": 202
}

Restart an Environment's PHP Engine

SecuritybearerAuth
Request
Request Body schema: application/json
required
environment_id
required
string
Responses
202

Restarting PHP in progress

401

No or invalid API key provided to the request

500

Error occurred while trying to restart the PHP engine

post/sites/tools/restart-php
Request samples
application/json
{
  • "environment_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1"
}
Response samples
application/json
{
  • "operation_id": "php:restart-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  • "message": "Restarting PHP in progress",
  • "status": 202
}

Modify an Environment's PHP Version

SecuritybearerAuth
Request
Request Body schema: application/json
required
environment_id
required
string
php_version
required
string
Responses
202

Modifying PHP version in progress

401

No or invalid API key provided to the request

500

Error occurred while trying to modify PHP version

put/sites/tools/modify-php-version
Request samples
application/json
{
  • "environment_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  • "php_version": "8.1"
}
Response samples
application/json
{
  • "operation_id": "php:modify-version-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  • "message": "Modifying PHP version in progress",
  • "status": 202
}

Get list of denied IPs

SecuritybearerAuth
Request
Request Body schema: application/json
required
environment_id
required
string
Responses
200

Returns list of denied IPs

401

No or invalid API key provided to the request

500

Error occurred while trying to get list of denied IPs

get/sites/tools/denied-ips
Request samples
application/json
{
  • "environment_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1"
}
Response samples
application/json
{
  • "environment": {
    }
}

Update denied IP list

SecuritybearerAuth
Request
Request Body schema: application/json
required
environment_id
required
string
ip_list
required
Array of strings
Responses
200

List of denied IPs was updated

401

No or invalid API key provided to the request

500

Error occurred while trying to update list of denied IPs

put/sites/tools/denied-ips
Request samples
application/json
{
  • "environment_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  • "ip_list": [
    ]
}
Response samples
application/json
{
  • "result": null
}