Skip to content

Commit c778b0a

Browse files
committed
fix(cli): state the 100-row server cap in alert/alert-event --limit flag help
The alert list and alert-event list endpoints reject limit > 100 with InvalidParameter. incident list already documents the cap in its --limit flag help; mirror the same wording so the Flags section alone is enough to get the first call right (the long description mentions the cap, but --help readers who grep Flags never see it).
1 parent 824acfb commit c778b0a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

internal/cli/alert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func newAlertListCmd() *cobra.Command {
111111
cmd.Flags().BoolVar(&muted, "muted", false, "Show ever-muted only")
112112
cmd.Flags().StringVar(&since, "since", "24h", "Start time")
113113
cmd.Flags().StringVar(&until, "until", "now", "End time")
114-
cmd.Flags().IntVar(&limit, "limit", 20, "Max results")
114+
cmd.Flags().IntVar(&limit, "limit", 20, "Max results (max 100)")
115115
cmd.Flags().IntVar(&page, "page", 1, "Page number")
116116
cmd.Flags().StringVar(&fields, "fields", "", "Comma-separated fields to project in json/toon output (e.g. alert_id,title,alert_severity,created_at); ignored in table mode. Use to avoid dumping the full nested record.")
117117

internal/cli/alert_event.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func newAlertEventListCmd() *cobra.Command {
104104
cmd.Flags().StringVar(&integrationType, "integration-type", "", "Comma-separated integration types")
105105
cmd.Flags().StringVar(&since, "since", "1h", "Start time")
106106
cmd.Flags().StringVar(&until, "until", "now", "End time")
107-
cmd.Flags().IntVar(&limit, "limit", 20, "Max results")
107+
cmd.Flags().IntVar(&limit, "limit", 20, "Max results (max 100)")
108108
cmd.Flags().IntVar(&page, "page", 1, "Page number")
109109
cmd.Flags().StringVar(&fields, "fields", "", "Comma-separated fields to project in json/toon output (e.g. event_id,alert_id,event_severity,event_status,event_time,title); ignored in table mode. Defaults to these compact event fields. Long strings are truncated as needed to keep structured output below 16 KiB.")
110110

0 commit comments

Comments
 (0)