List a site's platform tools
Answers the tools the site's platform offers, such as clearing a cache, with whether each can run now and the inputs it takes.
GET/ api/ corestack/ sites/ {site}/ functions
Path parameters
siteintegerRequired
The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.
Returns
200 The tools.
Fields of the 200 answer
functionsarray of objectsRequired
Fields of each item
availabilityobjectRequired
Whether something can be done now and, when it cannot, why not.
Fields
availablebooleanRequired
reasonstring or nullRequired
confirmbooleanRequired
True when a run must send "confirm": true.
descriptionstringRequired
effectstring
groupstring or null
group_labelstring or null
inputsarray of objectsRequired
The inputs a run takes, each with its name and type.
keystringRequired
The {function} to run it with.
labelstringRequired
lastobject or null
The last run, in short.
limitsobject
Fields
per_hourinteger or null
syncboolean
groupsarray of objects
Fields of each item
keystring
labelstring
maintenanceobject or null
The site's maintenance page state.
platformstringRequired
runningany
A command that is running now, if any.
If it is refused
| Status | Reason | What to do |
|---|---|---|
401 | none | Send a valid token as Authorization: Bearer <token>. |
403 | scope_required | Use a token with the scope named in scope. |
404 | feature_off | This feature is not on for your organisation yet. |
409 | deleted | The site, environment or copy has been deleted, or is being deleted. Nothing can be changed on it. Restore a deleted site first if it can still be restored. |
409 | provisioning | The site is still being created. Try again in a few minutes. |
429 | rate_limited | Wait for the seconds in Retry-After. |
Reasons are listed by name in Errors and refusals.
The same task elsewhere
curl https://manage.corefinity.com/api/corestack/sites/1042/functions \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json"use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->get('https://manage.corefinity.com/api/corestack/sites/1042/functions');
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/functions', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
},
});
// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);import os
import requests
res = requests.get(
"https://manage.corefinity.com/api/corestack/sites/1042/functions",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
)
data = res.json() if res.content else None{
"functions": [
{
"availability": {
"available": true,
"reason": null
},
"confirm": false,
"description": "Clears the WordPress object cache. Pages rebuild their cache on the next visit.",
"effect": "none",
"group": "cache",
"group_label": "Cache",
"inputs": [],
"key": "flush_cache",
"label": "Flush cache",
"last": {
"blocked_until_verified": false,
"finished_at": "2026-11-19T09:30:01Z",
"id": 5120,
"kind": "flush_cache",
"label": "Flush cache",
"requested_by": {
"id": 2012,
"name": "Daniel Reyes"
},
"status": "succeeded",
"status_label": "Done"
},
"limits": {
"per_hour": null
},
"sync": false
},
{
"availability": {
"available": true,
"reason": null
},
"confirm": false,
"description": "Clears PHP's compiled-code cache with a graceful PHP reload. Requests in progress finish first.",
"effect": "none",
"group": "cache",
"group_label": "Cache",
"inputs": [],
"key": "reset_opcache",
"label": "Reset OPcache",
"last": null,
"limits": {
"per_hour": null
},
"sync": false
}
],
"groups": [
{
"key": "cache",
"label": "Cache"
}
],
"maintenance": {
"by": null,
"bypass_corefinity": 1,
"bypass_ips": [],
"command": null,
"enabled": false,
"page": "default",
"retry_after_seconds": 300,
"since": null
},
"platform": "wordpress",
"running": null
}{
"message": "Unauthenticated."
}{
"code": "scope_required",
"message": "This access token does not have the destructive scope this needs. Use a token with the destructive scope.",
"reason": "scope_required",
"scope": "destructive"
}{
"code": "feature_off",
"message": "Not found.",
"reason": "feature_off"
}{
"code": "deleted",
"message": "This site is deleted and waiting to be purged. Restore it first.",
"reason": "deleted"
}{
"code": "rate_limited",
"message": "Too many requests. Try again in 60 seconds.",
"reason": "rate_limited",
"retry_after_seconds": 60
}Try it
Was this helpful?