Update maintenance window
curl --request PATCH \
--url http://localhost:8080/api/v1/maintenance/schedules/{maintenanceWindow} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"providers": [],
"is_active": true,
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"cron_expression": "<string>",
"duration_minutes": 720,
"notes": "<string>"
}
'import requests
url = "http://localhost:8080/api/v1/maintenance/schedules/{maintenanceWindow}"
payload = {
"label": "<string>",
"providers": [],
"is_active": True,
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"cron_expression": "<string>",
"duration_minutes": 720,
"notes": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: '<string>',
providers: [],
is_active: true,
starts_at: '2023-11-07T05:31:56Z',
ends_at: '2023-11-07T05:31:56Z',
cron_expression: '<string>',
duration_minutes: 720,
notes: '<string>'
})
};
fetch('http://localhost:8080/api/v1/maintenance/schedules/{maintenanceWindow}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/maintenance/schedules/{maintenanceWindow}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'label' => '<string>',
'providers' => [
],
'is_active' => true,
'starts_at' => '2023-11-07T05:31:56Z',
'ends_at' => '2023-11-07T05:31:56Z',
'cron_expression' => '<string>',
'duration_minutes' => 720,
'notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/api/v1/maintenance/schedules/{maintenanceWindow}"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"providers\": [],\n \"is_active\": true,\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"ends_at\": \"2023-11-07T05:31:56Z\",\n \"cron_expression\": \"<string>\",\n \"duration_minutes\": 720,\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://localhost:8080/api/v1/maintenance/schedules/{maintenanceWindow}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"providers\": [],\n \"is_active\": true,\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"ends_at\": \"2023-11-07T05:31:56Z\",\n \"cron_expression\": \"<string>\",\n \"duration_minutes\": 720,\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/maintenance/schedules/{maintenanceWindow}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"<string>\",\n \"providers\": [],\n \"is_active\": true,\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"ends_at\": \"2023-11-07T05:31:56Z\",\n \"cron_expression\": \"<string>\",\n \"duration_minutes\": 720,\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"label": "<string>",
"type": "<string>",
"type_label": "Indefinite",
"is_active": true,
"providers": [
"<string>"
],
"covers_all": true,
"starts_at": "<string>",
"ends_at": "<string>",
"cron_expression": "<string>",
"duration_minutes": 123,
"notes": "<string>",
"is_currently_active": true,
"created_at": "<string>"
},
"success": true,
"code": 200,
"message": "Maintenance window updated successfully."
}{
"success": false,
"code": 401,
"message": "<string>"
}{
"success": false,
"code": 404,
"message": "<string>"
}{
"success": false,
"code": 405,
"message": "<string>"
}{
"success": false,
"code": 422,
"message": "<string>",
"errors": "<string>"
}{
"success": false,
"code": 429,
"message": "<string>"
}{
"success": false,
"code": 500,
"message": "<string>"
}Maintenance
Update maintenance window
Update a maintenance window.
PATCH
/
v1
/
maintenance
/
schedules
/
{maintenanceWindow}
Update maintenance window
curl --request PATCH \
--url http://localhost:8080/api/v1/maintenance/schedules/{maintenanceWindow} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"providers": [],
"is_active": true,
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"cron_expression": "<string>",
"duration_minutes": 720,
"notes": "<string>"
}
'import requests
url = "http://localhost:8080/api/v1/maintenance/schedules/{maintenanceWindow}"
payload = {
"label": "<string>",
"providers": [],
"is_active": True,
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"cron_expression": "<string>",
"duration_minutes": 720,
"notes": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: '<string>',
providers: [],
is_active: true,
starts_at: '2023-11-07T05:31:56Z',
ends_at: '2023-11-07T05:31:56Z',
cron_expression: '<string>',
duration_minutes: 720,
notes: '<string>'
})
};
fetch('http://localhost:8080/api/v1/maintenance/schedules/{maintenanceWindow}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/maintenance/schedules/{maintenanceWindow}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'label' => '<string>',
'providers' => [
],
'is_active' => true,
'starts_at' => '2023-11-07T05:31:56Z',
'ends_at' => '2023-11-07T05:31:56Z',
'cron_expression' => '<string>',
'duration_minutes' => 720,
'notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/api/v1/maintenance/schedules/{maintenanceWindow}"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"providers\": [],\n \"is_active\": true,\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"ends_at\": \"2023-11-07T05:31:56Z\",\n \"cron_expression\": \"<string>\",\n \"duration_minutes\": 720,\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://localhost:8080/api/v1/maintenance/schedules/{maintenanceWindow}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"providers\": [],\n \"is_active\": true,\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"ends_at\": \"2023-11-07T05:31:56Z\",\n \"cron_expression\": \"<string>\",\n \"duration_minutes\": 720,\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/maintenance/schedules/{maintenanceWindow}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"<string>\",\n \"providers\": [],\n \"is_active\": true,\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"ends_at\": \"2023-11-07T05:31:56Z\",\n \"cron_expression\": \"<string>\",\n \"duration_minutes\": 720,\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"label": "<string>",
"type": "<string>",
"type_label": "Indefinite",
"is_active": true,
"providers": [
"<string>"
],
"covers_all": true,
"starts_at": "<string>",
"ends_at": "<string>",
"cron_expression": "<string>",
"duration_minutes": 123,
"notes": "<string>",
"is_currently_active": true,
"created_at": "<string>"
},
"success": true,
"code": 200,
"message": "Maintenance window updated successfully."
}{
"success": false,
"code": 401,
"message": "<string>"
}{
"success": false,
"code": 404,
"message": "<string>"
}{
"success": false,
"code": 405,
"message": "<string>"
}{
"success": false,
"code": 422,
"message": "<string>",
"errors": "<string>"
}{
"success": false,
"code": 429,
"message": "<string>"
}{
"success": false,
"code": 500,
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The maintenance window ID
Body
application/json
Maximum string length:
100Available options:
indefinite, one_time, recurring Minimum array length:
1Available options:
all, ookla, librespeed, netflix, cloudflare One-time fields — required only when type = one_time
Recurring fields — required only when type = recurring
Required range:
1 <= x <= 1440Maximum string length:
500Response
MaintenanceWindowResource
Hide child attributes
Hide child attributes
Available options:
Indefinite, One-time, Recurring Allowed value:
"Maintenance window updated successfully."⌘I