patch https://api.bigpanda.io/resources/v2.0/maintenance-plans/
Updates a specific maintenance plan.
Authentication
All BigPanda APIs require Bearer Token Authorization in the call headers.
This API uses the User API Key type of Authorization token.
Note
In planned plans, any field can be updated.
In running plans, only the plan's End field can be updated.
Condition Limitations
Maintenance plan conditions cannot be longer than 25,000 characters long.
All alert tags in maintenance plan conditions are case-insensitive.
Sample Call
curl -X PATCH -H 'Content-Type: application/json' \
-H 'Authorization: Bearer <User API Key>' \
https://api.bigpanda.io/resources/v2.0/maintenance-plans \
-d '{
"name": "host1 maintenance",
"condition": {"=": ["host", "prod-api-1"]},
"start": 1733904622,
"end": 1734768622,
"time_zone": "UTC",
"description": "this is a description",
"custom_tags": [ { "name" : "app", "value" : "esp"} ],
"frequency": "Daily",
"frequency_data": {
"relativity": "First",
"duration": 10800}
}'
curl -X PATCH -H 'Content-Type: application/json' \
-H 'Authorization: Bearer <User API Key>' \
https://eu-api.bigpanda.io/resources/v2.0/maintenance-plans \
-d '{
"name": "host1 maintenance",
"condition": {"=": ["host", "prod-api-1"]},
"start": 1733904622,
"end": 1734768622,
"time_zone": "UTC",
"description": "this is a description",
"custom_tags": [ { "name" : "app", "value" : "esp"} ],
"frequency": "Daily",
"frequency_data": {
"relativity": "First",
"duration": 10800}
}'
BPQL Object Formatting
The condition
body parameter uses special BPQL object formatting. See BPQL Object Syntax for more information.
Example BPQL Objects:
Command | BPQL String | BPQL Object |
---|---|---|
Wildcard * | host = prod-api-* | { "=": [ "host", { "type": "regex", "value": "prod-api-*" }]} |
Formal Regex Search | host = /prod-api-.*/ | { "=": [ "host", { "type": "formal-regex", "value": "prod-api-.*" }]} |