post https://api.bigpanda.io/resources/v2.0/maintenance-plans
Creates a new schema definition for creating a new 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.
Plan Limit
Each organization can only have 3,500 maintenance plans at a time.
Condition Limitations
Maintenance plan conditions cannot be longer than 25,000 characters long.
All alert tags in maintenance plan conditions are case-insensitive.
Epoch Time Conversion
See the Epoch Converter to convert times to Unix epoch format.
Sample Call
curl -X POST -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},
"post_maintenance_action": "None"
}'
curl -X POST -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},
"post_maintenance_action": "None"
}'
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-.*" }]} |