Skip to content

Feature request: create scheduled maintenance incidents (--kind, --scheduled-for/--scheduled-until) #63

Description

@minkimipt

Use case

Scheduling a planned maintenance (a phased extension upgrade across a fleet) from a script, the same way the UI's Plan Maintenance dialog does.

What's missing

incidents create / incidents update can't set the incident kind or the maintenance window. The API client already reads these fields in internal/api/client.go:

Kind           string  `json:"kind"`
ScheduledFor   *string `json:"scheduled_for"`
ScheduledUntil *string `json:"scheduled_until"`

but none of them are exposed as flags, so every incident the CLI creates is a normal incident starting now.

Why it matters

A maintenance has to be created as a scheduled incident with a window — that's what the status page renders as "Scheduled maintenance" and what subscribers are notified about. Without it, the create step can only be done in the UI, and the rest of the lifecycle (status-page events, which the CLI now supports) has nothing to attach to until someone clicks through the dialog.

Proposed

rootly incidents create --title="..." --kind=scheduled \
  --scheduled-for=2026-10-05T08:00:00Z --scheduled-until=2026-10-26T08:00:00Z \
  --services=database
rootly incidents update <id> --scheduled-until=2026-10-27T08:00:00Z

RFC3339 timestamps, consistent with status-pages events create --started-at.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions