Get a CoreCluster's maintenance window
Answers the default window of the CoreCluster, where it comes from, and the sites that have a window of their own.
Path parameters
The id of a CoreCluster. Digits only. At least 1.
Returns
200 The window.
Fields of the 200 answer
A cluster by its id and name. A standalone CoreStack site reads CoreStack as the name.
Fields
Why the window cannot be changed. Sent only when editable is false.
window_scope_unavailableforbiddenwindow_lockedThe window in force, wherever it comes from.
Fields
The hour the window closes. 0 to 23.
The window in words, such as 00:00–04:00 UK time.
The level the window comes from. staff_lock is a window Corefinity has set, which cannot be changed here.
siteclusterstaff_lockcompanyplatformTrue when Corefinity has set the window.
The hour the window opens, in timezone. 0 to 23.
The window this level uses when it has none of its own.
Fields
websiteclustercompanyplatform0 to 23.
The sites of the CoreCluster that have a window of their own.
Fields
Fields of each item
At least 1.
0 to 23.
The start hour set at this level. Null when the level has none of its own and inherits.
Sent after a change: how many queued changes moved to the new window.
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. |
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/coreclusters/1017/maintenance-window \
-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/coreclusters/1017/maintenance-window');
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/coreclusters/1017/maintenance-window', {
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/coreclusters/1017/maintenance-window",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
)
data = res.json() if res.content else None{
"cluster": {
"id": 1017,
"name": "Northwind UK 1"
},
"editable": true,
"effective": {
"end_hour": 4,
"label": "00:00–04:00 UK time",
"length_hours": 4,
"source": "platform",
"source_label": "Corefinity default",
"staff_locked": false,
"start_hour": 0,
"timezone": "Europe/London"
},
"inherited": {
"level": "platform",
"name": "Corefinity default",
"start_hour": 0
},
"overrides": {
"count": 0,
"sites": []
},
"own": 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": "rate_limited",
"message": "Too many requests. Try again in 60 seconds.",
"reason": "rate_limited",
"retry_after_seconds": 60
}