# Planned maintenances

## Get ongoing planned maintenances

> Get a list of ongoing maintenances

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Planned maintenances"}],"servers":[{"url":"https://statuspage.spike.sh","description":"Status page server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your API key. You can find this in your Spike dashboard under Settings > API."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"}}}}},"paths":{"/api/status-page/{status_page_id}/planned-maintenance":{"get":{"summary":"Get ongoing planned maintenances","description":"Get a list of ongoing maintenances","tags":["Planned maintenances"],"parameters":[{"name":"status_page_id","in":"path","required":true,"schema":{"type":"string"},"description":"status_page_id parameter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Get upcoming planned maintenances

> Get a list of upcoming maintenances

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Planned maintenances"}],"servers":[{"url":"https://statuspage.spike.sh","description":"Status page server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your API key. You can find this in your Spike dashboard under Settings > API."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"}}}}},"paths":{"/api/status-page/{status_page_id}/planned-maintenance/upcoming":{"get":{"summary":"Get upcoming planned maintenances","description":"Get a list of upcoming maintenances","tags":["Planned maintenances"],"parameters":[{"name":"status_page_id","in":"path","required":true,"schema":{"type":"string"},"description":"status_page_id parameter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Get a list of previous maintenances

> Get a list of all the previous maintenanecs

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Planned maintenances"}],"servers":[{"url":"https://statuspage.spike.sh","description":"Status page server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your API key. You can find this in your Spike dashboard under Settings > API."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"}}}}},"paths":{"/api/status-page/{status_page_id}/planned-maintenance/previous":{"get":{"summary":"Get a list of previous maintenances","description":"Get a list of all the previous maintenanecs","tags":["Planned maintenances"],"parameters":[{"name":"status_page_id","in":"path","required":true,"schema":{"type":"string"},"description":"status_page_id parameter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Get a planned maintenance

> Get a planned maintenance

```json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Planned maintenances"}],"servers":[{"url":"https://statuspage.spike.sh","description":"Status page server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your API key. You can find this in your Spike dashboard under Settings > API."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"}}}}},"paths":{"/api/status-page/{status_page_id}/planned-maintenance/{pm_id}":{"get":{"summary":"Get a planned maintenance","description":"Get a planned maintenance","tags":["Planned maintenances"],"parameters":[{"name":"status_page_id","in":"path","required":true,"schema":{"type":"string"},"description":"status_page_id parameter"},{"name":"pm_id","in":"path","required":true,"schema":{"type":"string"},"description":"pm_id parameter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Create a new planned maintenance

> Create a new planned maintenance\
> \`\`\`\
> {\
> &#x9;"title": "planned maintenance title",\
> &#x9;"desc": "Write a message to your subscribers.",\
> &#x9;"startDate": "10/03/2023",\
> &#x9;"endDate": "13/03/2023",\
> &#x9;"startTime": "10:00",\
> &#x9;"endTime": "05:00",\
> &#x9;"notify": true,\
> &#x9;"components": \["{{ \_.component\_id }}"],\
> &#x9;"notifyNow": true,\
> &#x9;"notifyOnEnd": true,\
> &#x9;"reminders": \[\
> &#x9;	{\
> &#x9;		"time": 2,\
> &#x9;		"unit": "days"\
> &#x9;	}\
> &#x9;]\
> }\
> \`\`\`\
> \### \\\* ALL THE TIMESTAMPS SHOULD BE IN UTC\
> \
> \### Params:\
> \`title\`: Title of the planned maintenanace\
> \
> \`desc\`: Write a message to your subscribers.\
> \
> \
> \`startDate\`: Start date is mandatory. Strict form is DD/MM/YYYY.\
> \
> \`endDate\`: End date is mandatory. Strict form is DD/MM/YYYY.\
> \
> \`startTime\`: Start time format is HH:MM in 24-hour format. Please do not add AM or PM.\
> \
> \`endTime\`: End time format is HH:MM in 24-hour format. Please do not add AM or PM.\
> \
> \`notify\`: You can specify to notify the subscribers about the planned maintenance when planned maintenance starts. \`Type: Boolean\`\
> \
> \`components\`: Components is the array of component ids which are going into planned maintenance.\
> \
> \`notifyNow\`: Send a notification to you subscribers about planned maintenance schedule. \`Type: Boolean\`\
> \
> \`notifyOnEnd\`: Send a notification on the end of planned maintenance. \`Type: Boolean\`\
> \
> \`reminders\`: You can provide a list of reminders that will be sent before the planned maintenance starts. you can choose to send reminder \`days\`, \`hours\` or \`minutes\` before planned maintenance starts. all the units have a max limit of 30 days.<br>

````json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Planned maintenances"}],"servers":[{"url":"https://statuspage.spike.sh","description":"Status page server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your API key. You can find this in your Spike dashboard under Settings > API."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"}}}}},"paths":{"/api/status-page/{status_page_id}/planned-maintenance/create":{"post":{"summary":"Create a new planned maintenance","description":"Create a new planned maintenance\n```\n{\n\t\"title\": \"planned maintenance title\",\n\t\"desc\": \"Write a message to your subscribers.\",\n\t\"startDate\": \"10/03/2023\",\n\t\"endDate\": \"13/03/2023\",\n\t\"startTime\": \"10:00\",\n\t\"endTime\": \"05:00\",\n\t\"notify\": true,\n\t\"components\": [\"{{ _.component_id }}\"],\n\t\"notifyNow\": true,\n\t\"notifyOnEnd\": true,\n\t\"reminders\": [\n\t\t{\n\t\t\t\"time\": 2,\n\t\t\t\"unit\": \"days\"\n\t\t}\n\t]\n}\n```\n### \\* ALL THE TIMESTAMPS SHOULD BE IN UTC\n\n### Params:\n`title`: Title of the planned maintenanace\n\n`desc`: Write a message to your subscribers.\n\n\n`startDate`: Start date is mandatory. Strict form is DD/MM/YYYY.\n\n`endDate`: End date is mandatory. Strict form is DD/MM/YYYY.\n\n`startTime`: Start time format is HH:MM in 24-hour format. Please do not add AM or PM.\n\n`endTime`: End time format is HH:MM in 24-hour format. Please do not add AM or PM.\n\n`notify`: You can specify to notify the subscribers about the planned maintenance when planned maintenance starts. `Type: Boolean`\n\n`components`: Components is the array of component ids which are going into planned maintenance.\n\n`notifyNow`: Send a notification to you subscribers about planned maintenance schedule. `Type: Boolean`\n\n`notifyOnEnd`: Send a notification on the end of planned maintenance. `Type: Boolean`\n\n`reminders`: You can provide a list of reminders that will be sent before the planned maintenance starts. you can choose to send reminder `days`, `hours` or `minutes` before planned maintenance starts. all the units have a max limit of 30 days.\n","tags":["Planned maintenances"],"parameters":[{"name":"status_page_id","in":"path","required":true,"schema":{"type":"string"},"description":"status_page_id parameter"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"desc":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"startTime":{"type":"string"},"endTime":{"type":"string"},"notify":{"type":"boolean"},"components":{"type":"array","items":{"type":"string"}},"notifyNow":{"type":"boolean"},"notifyOnEnd":{"type":"boolean"},"reminders":{"type":"array","items":{"type":"object","properties":{"time":{"type":"integer"},"unit":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
````

## Edit a planned maintenance

> Edit a planned maintenance\
> \`\`\`\
> {\
> &#x9;"title": "planned maintenance title",\
> &#x9;"desc": "Write a message to your subscribers.",\
> &#x9;"startDate": "10/03/2023",\
> &#x9;"endDate": "13/03/2023",\
> &#x9;"startTime": "10:00",\
> &#x9;"endTime": "05:00",\
> &#x9;"notify": true,\
> &#x9;"components": \["{{ \_.component\_id }}"],\
> &#x9;"notifyNow": true,\
> &#x9;"notifyOnEnd": true,\
> &#x9;"reminders": \[\
> &#x9;		{\
> &#x9;				"time": 2,\
> &#x9;				"unit": "days"\
> &#x9;		}\
> &#x9;]\
> }\
> \`\`\`\
> \### \\\* ALL THE TIMESTAMPS SHOULD BE IN UTC\
> \
> \### Params:\
> \`title\`: Title of the planned maintenanace\
> \
> \`desc\`: Write a message to your subscribers.\
> \
> \`startDate\`: Start date is mandatory. Strict form is DD/MM/YYYY.\
> \
> \`endDate\`: End date is mandatory. Strict form is DD/MM/YYYY.\
> \
> \`startTime\`: Start time format is HH:MM in 24-hour format. Please do not add AM or PM.\
> \
> \`endTime\`: End time format is HH:MM in 24-hour format. Please do not add AM or PM.\
> \
> \`notify\`: You can specify to notify the subscribers about the planned maintenance when planned maintenance starts. \`Type: Boolean\`\
> \
> \`components\`: Components is the array of component ids which are going into planned maintenance.\
> \
> \`notifyNow\`: Send a notification to you subscribers about planned maintenance schedule. \`Type: Boolean\`\
> \
> \`notifyOnEnd\`: Send a notification on the end of planned maintenance. \`Type: Boolean\`\
> \
> \`reminders\`: You can provide a list of reminders that will be sent before the planned maintenance starts. you can choose to send reminder \`days\`, \`hours\` or \`minutes\` before planned maintenance starts. all the units have a max limit of 30 days.<br>

````json
{"openapi":"3.1.0","info":{"title":"Spike API","version":"1.0.0"},"tags":[{"name":"Planned maintenances"}],"servers":[{"url":"https://statuspage.spike.sh","description":"Status page server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your API key. You can find this in your Spike dashboard under Settings > API."}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the problem"},"error":{"type":"string","description":"Error type or code"}}}}},"paths":{"/api/status-page/{status_page_id}/planned-maintenance/{pm_id}/update":{"post":{"summary":"Edit a planned maintenance","description":"Edit a planned maintenance\n```\n{\n\t\"title\": \"planned maintenance title\",\n\t\"desc\": \"Write a message to your subscribers.\",\n\t\"startDate\": \"10/03/2023\",\n\t\"endDate\": \"13/03/2023\",\n\t\"startTime\": \"10:00\",\n\t\"endTime\": \"05:00\",\n\t\"notify\": true,\n\t\"components\": [\"{{ _.component_id }}\"],\n\t\"notifyNow\": true,\n\t\"notifyOnEnd\": true,\n\t\"reminders\": [\n\t\t\t{\n\t\t\t\t\t\"time\": 2,\n\t\t\t\t\t\"unit\": \"days\"\n\t\t\t}\n\t]\n}\n```\n### \\* ALL THE TIMESTAMPS SHOULD BE IN UTC\n\n### Params:\n`title`: Title of the planned maintenanace\n\n`desc`: Write a message to your subscribers.\n\n`startDate`: Start date is mandatory. Strict form is DD/MM/YYYY.\n\n`endDate`: End date is mandatory. Strict form is DD/MM/YYYY.\n\n`startTime`: Start time format is HH:MM in 24-hour format. Please do not add AM or PM.\n\n`endTime`: End time format is HH:MM in 24-hour format. Please do not add AM or PM.\n\n`notify`: You can specify to notify the subscribers about the planned maintenance when planned maintenance starts. `Type: Boolean`\n\n`components`: Components is the array of component ids which are going into planned maintenance.\n\n`notifyNow`: Send a notification to you subscribers about planned maintenance schedule. `Type: Boolean`\n\n`notifyOnEnd`: Send a notification on the end of planned maintenance. `Type: Boolean`\n\n`reminders`: You can provide a list of reminders that will be sent before the planned maintenance starts. you can choose to send reminder `days`, `hours` or `minutes` before planned maintenance starts. all the units have a max limit of 30 days.\n","tags":["Planned maintenances"],"parameters":[{"name":"status_page_id","in":"path","required":true,"schema":{"type":"string"},"description":"status_page_id parameter"},{"name":"pm_id","in":"path","required":true,"schema":{"type":"string"},"description":"pm_id parameter"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"desc":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"startTime":{"type":"string"},"endTime":{"type":"string"},"notify":{"type":"boolean"},"components":{"type":"array","items":{"type":"string"}},"notifyNow":{"type":"boolean"},"notifyOnEnd":{"type":"boolean"},"reminders":{"type":"array","items":{"type":"object","properties":{"time":{"type":"integer"},"unit":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
````


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.spike.sh/spike-api-docs/planned-maintenances.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
