Skip to main content
Maintenance window CLI commands are coming soon. The commands below describe the planned interface. For now, manage maintenance windows through the dashboard or REST API.
Schedule planned downtime to suppress alerts during deployments and maintenance.

Planned commands

CommandDescription
devhelm maintenance-windows listList all maintenance windows
devhelm maintenance-windows get <id>Get window details
devhelm maintenance-windows createCreate a maintenance window
devhelm maintenance-windows update <id>Update a window
devhelm maintenance-windows delete <id>Delete a window

Planned flags for create

FlagTypeRequiredDescription
--namestringYesWindow display name
--starts-atstringYesStart time in ISO 8601 format
--ends-atstringYesEnd time in ISO 8601 format
--reasonstringReason for the maintenance window

In the meantime

REST API

Create maintenance windows via the API:
curl -X POST https://api.devhelm.io/api/v1/maintenance-windows \
  -H "Authorization: Bearer $DEVHELM_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Deploy v2.1",
    "startsAt": "2025-03-15T02:00:00Z",
    "endsAt": "2025-03-15T03:00:00Z",
    "reason": "Database migration"
  }'

CI/CD usage

In GitHub Actions, combine the API with your deploy workflow:
- name: Create maintenance window
  run: |
    curl -X POST https://api.devhelm.io/api/v1/maintenance-windows \
      -H "Authorization: Bearer ${{ secrets.DEVHELM_API_TOKEN }}" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "CI deploy ${{ github.sha }}",
        "startsAt": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'",
        "endsAt": "'$(date -u -d '+15 minutes' +%Y-%m-%dT%H:%M:%SZ)'"
      }'

Next steps

Maintenance windows

Understanding maintenance window behavior and scheduling.

Maintenance windows guide

Step-by-step guide for planned downtime.