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.
Clearing site cache in progress
No or invalid API key provided to the request
Error occurred while trying to clear cache
{- "environment_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1"
}
{- "operation_id": "cache:clear-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "message": "Clearing site cache in progress",
- "status": 202
}
Restarting PHP in progress
No or invalid API key provided to the request
Error occurred while trying to restart the PHP engine
{- "environment_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1"
}
{- "operation_id": "php:restart-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "message": "Restarting PHP in progress",
- "status": 202
}
Modifying PHP version in progress
No or invalid API key provided to the request
Error occurred while trying to modify PHP version
{- "environment_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "php_version": "8.1"
}
{- "operation_id": "php:modify-version-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "message": "Modifying PHP version in progress",
- "status": 202
}
Returns list of denied IPs
No or invalid API key provided to the request
Error occurred while trying to get list of denied IPs
{- "environment_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1"
}
{- "environment": {
- "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "ip_list": [
- "127.0.0.1"
]
}
}
List of denied IPs was updated
No or invalid API key provided to the request
Error occurred while trying to update list of denied IPs
{- "environment_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "ip_list": [
- "127.0.0.1"
]
}
{- "result": null
}