diff --git a/go.mod b/go.mod index 1166453..f135550 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/flashcatcloud/flashduty-cli go 1.26.0 require ( - github.com/flashcatcloud/go-flashduty v0.15.8 + github.com/flashcatcloud/go-flashduty v0.15.9 github.com/mattn/go-runewidth v0.0.30 github.com/spf13/cobra v1.10.2 github.com/spf13/pflag v1.0.10 diff --git a/go.sum b/go.sum index 5f41662..1bfebcc 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,8 @@ github.com/clipperhouse/uax29/v2 v2.2.0 h1:ChwIKnQN3kcZteTXMgb1wztSgaU+ZemkgWdohwgs8tY= github.com/clipperhouse/uax29/v2 v2.2.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= -github.com/flashcatcloud/go-flashduty v0.15.8 h1:F4eO4dZl7bwFDbH2YhovQVGhRF3jP43mUZsBEE/g/a0= -github.com/flashcatcloud/go-flashduty v0.15.8/go.mod h1:YpHiTYXR5NXBI/rGRZfUy537XMkhdCkwA8NW1QoRHwk= +github.com/flashcatcloud/go-flashduty v0.15.9 h1:EWO+IPnEWqH65lchYfiyLJsNe9NuuPhIpsNFE2WzDgs= +github.com/flashcatcloud/go-flashduty v0.15.9/go.mod h1:YpHiTYXR5NXBI/rGRZfUy537XMkhdCkwA8NW1QoRHwk= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/mattn/go-runewidth v0.0.30 h1:+KUuiDA4fF0R1p5FeueHefjDm+GIM+kWfFnDjybOPgk= diff --git a/internal/cli/zz_generated_applications.go b/internal/cli/zz_generated_applications.go index bb60b19..cafee33 100644 --- a/internal/cli/zz_generated_applications.go +++ b/internal/cli/zz_generated_applications.go @@ -332,6 +332,8 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le - custom (object) — Application-defined pass-through values handed to the host app verbatim. At most 5 keys, each key up to 64 bytes, each value up to 4 KB of JSON nested at most 3 levels, 16 KB in total. Anyone holding the public client token can read it. - default (object) — The SDK knobs a configuration can set. Every field is optional: a value absent from both rule and default is omitted from the SDK response, which tells the SDK to keep its init value. - defaultPrivacyLevel (string) — How Session Replay masks a page by default. [mask, mask-user-input, allow] + - sessionOnError (boolean) — Keep sessions the session sample rate did not draw when they report an error; applies only to sessions that rate missed, so it does nothing alongside a rate of 100. + - sessionReplayOnError (boolean) — The same switch for Session Replay: un-sampled sessions still record and upload their recording only when the session errors. - sessionReplaySampleRate (integer) — Session Replay sampling rate (0-100). (0-100) - sessionSampleRate (integer) — Session sampling rate (0-100). (0-100) - traceSampleRate (integer) — Trace sampling rate (0-100): which sessions inject trace headers into their requests. (0-100) @@ -341,6 +343,8 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le - match (object) (required) — Key/value conditions the SDK's config request must equal. Keys are limited to 'env', 'app_version' and 'sdk'; values are at most 256 bytes. - set (object) (required) — The SDK knobs a configuration can set. Every field is optional: a value absent from both rule and default is omitted from the SDK response, which tells the SDK to keep its init value. - defaultPrivacyLevel (string) — How Session Replay masks a page by default. [mask, mask-user-input, allow] + - sessionOnError (boolean) — Keep sessions the session sample rate did not draw when they report an error; applies only to sessions that rate missed, so it does nothing alongside a rate of 100. + - sessionReplayOnError (boolean) — The same switch for Session Replay: un-sampled sessions still record and upload their recording only when the session errors. - sessionReplaySampleRate (integer) — Session Replay sampling rate (0-100). (0-100) - sessionSampleRate (integer) — Session sampling rate (0-100). (0-100) - traceSampleRate (integer) — Trace sampling rate (0-100): which sessions inject trace headers into their requests. (0-100) @@ -413,6 +417,8 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; - custom (object) — Application-defined pass-through values handed to the host app verbatim. At most 5 keys, each key up to 64 bytes, each value up to 4 KB of JSON nested at most 3 levels, 16 KB in total. Anyone holding the public client token can read it. - default (object) — The SDK knobs a configuration can set. Every field is optional: a value absent from both rule and default is omitted from the SDK response, which tells the SDK to keep its init value. - defaultPrivacyLevel (string) — How Session Replay masks a page by default. [mask, mask-user-input, allow] + - sessionOnError (boolean) — Keep sessions the session sample rate did not draw when they report an error; applies only to sessions that rate missed, so it does nothing alongside a rate of 100. + - sessionReplayOnError (boolean) — The same switch for Session Replay: un-sampled sessions still record and upload their recording only when the session errors. - sessionReplaySampleRate (integer) — Session Replay sampling rate (0-100). (0-100) - sessionSampleRate (integer) — Session sampling rate (0-100). (0-100) - traceSampleRate (integer) — Trace sampling rate (0-100): which sessions inject trace headers into their requests. (0-100) @@ -508,6 +514,8 @@ Request fields: - custom (object) — Application-defined pass-through values handed to the host app verbatim. At most 5 keys, each key up to 64 bytes, each value up to 4 KB of JSON nested at most 3 levels, 16 KB in total. Anyone holding the public client token can read it. - default (object) — The SDK knobs a configuration can set. Every field is optional: a value absent from both rule and default is omitted from the SDK response, which tells the SDK to keep its init value. - defaultPrivacyLevel (string) — How Session Replay masks a page by default. [mask, mask-user-input, allow] + - sessionOnError (boolean) — Keep sessions the session sample rate did not draw when they report an error; applies only to sessions that rate missed, so it does nothing alongside a rate of 100. + - sessionReplayOnError (boolean) — The same switch for Session Replay: un-sampled sessions still record and upload their recording only when the session errors. - sessionReplaySampleRate (integer) — Session Replay sampling rate (0-100). (0-100) - sessionSampleRate (integer) — Session sampling rate (0-100). (0-100) - traceSampleRate (integer) — Trace sampling rate (0-100): which sessions inject trace headers into their requests. (0-100) @@ -517,6 +525,8 @@ Request fields: - match (object) (required) — Key/value conditions the SDK's config request must equal. Keys are limited to 'env', 'app_version' and 'sdk'; values are at most 256 bytes. - set (object) (required) — The SDK knobs a configuration can set. Every field is optional: a value absent from both rule and default is omitted from the SDK response, which tells the SDK to keep its init value. - defaultPrivacyLevel (string) — How Session Replay masks a page by default. [mask, mask-user-input, allow] + - sessionOnError (boolean) — Keep sessions the session sample rate did not draw when they report an error; applies only to sessions that rate missed, so it does nothing alongside a rate of 100. + - sessionReplayOnError (boolean) — The same switch for Session Replay: un-sampled sessions still record and upload their recording only when the session errors. - sessionReplaySampleRate (integer) — Session Replay sampling rate (0-100). (0-100) - sessionSampleRate (integer) — Session sampling rate (0-100). (0-100) - traceSampleRate (integer) — Trace sampling rate (0-100): which sessions inject trace headers into their requests. (0-100) @@ -525,6 +535,8 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le - hit_rule_index (integer) — 0-based index of the rule that decided the result, or -1 when only the default applied. - values (object) — The SDK knobs a configuration can set. Every field is optional: a value absent from both rule and default is omitted from the SDK response, which tells the SDK to keep its init value. - defaultPrivacyLevel (string) — How Session Replay masks a page by default. [mask, mask-user-input, allow] + - sessionOnError (boolean) — Keep sessions the session sample rate did not draw when they report an error; applies only to sessions that rate missed, so it does nothing alongside a rate of 100. + - sessionReplayOnError (boolean) — The same switch for Session Replay: un-sampled sessions still record and upload their recording only when the session errors. - sessionReplaySampleRate (integer) — Session Replay sampling rate (0-100). (0-100) - sessionSampleRate (integer) — Session sampling rate (0-100). (0-100) - traceSampleRate (integer) — Trace sampling rate (0-100): which sessions inject trace headers into their requests. (0-100) @@ -658,6 +670,8 @@ Request fields: - custom (object) — Application-defined pass-through values handed to the host app verbatim. At most 5 keys, each key up to 64 bytes, each value up to 4 KB of JSON nested at most 3 levels, 16 KB in total. Anyone holding the public client token can read it. - default (object) — The SDK knobs a configuration can set. Every field is optional: a value absent from both rule and default is omitted from the SDK response, which tells the SDK to keep its init value. - defaultPrivacyLevel (string) — How Session Replay masks a page by default. [mask, mask-user-input, allow] + - sessionOnError (boolean) — Keep sessions the session sample rate did not draw when they report an error; applies only to sessions that rate missed, so it does nothing alongside a rate of 100. + - sessionReplayOnError (boolean) — The same switch for Session Replay: un-sampled sessions still record and upload their recording only when the session errors. - sessionReplaySampleRate (integer) — Session Replay sampling rate (0-100). (0-100) - sessionSampleRate (integer) — Session sampling rate (0-100). (0-100) - traceSampleRate (integer) — Trace sampling rate (0-100): which sessions inject trace headers into their requests. (0-100) @@ -667,6 +681,8 @@ Request fields: - match (object) (required) — Key/value conditions the SDK's config request must equal. Keys are limited to 'env', 'app_version' and 'sdk'; values are at most 256 bytes. - set (object) (required) — The SDK knobs a configuration can set. Every field is optional: a value absent from both rule and default is omitted from the SDK response, which tells the SDK to keep its init value. - defaultPrivacyLevel (string) — How Session Replay masks a page by default. [mask, mask-user-input, allow] + - sessionOnError (boolean) — Keep sessions the session sample rate did not draw when they report an error; applies only to sessions that rate missed, so it does nothing alongside a rate of 100. + - sessionReplayOnError (boolean) — The same switch for Session Replay: un-sampled sessions still record and upload their recording only when the session errors. - sessionReplaySampleRate (integer) — Session Replay sampling rate (0-100). (0-100) - sessionSampleRate (integer) — Session sampling rate (0-100). (0-100) - traceSampleRate (integer) — Trace sampling rate (0-100): which sessions inject trace headers into their requests. (0-100) diff --git a/internal/cli/zz_generated_channels.go b/internal/cli/zz_generated_channels.go index 211d061..f7aeb54 100644 --- a/internal/cli/zz_generated_channels.go +++ b/internal/cli/zz_generated_channels.go @@ -1441,13 +1441,13 @@ Request fields: --search-after-ctx string --asc bool — When true, sort ascending; defaults to false (descending). --channel-ids []int — Filter by explicit channel IDs. - --channel-name string — Exact-match filter on channel name. Takes priority over 'query' for name filtering. + --channel-name string — Exact-match filter on channel name. Takes priority over 'query' for name filtering. Must be valid UTF-8 — invalid byte sequences are rejected with 'InvalidParameter'. --is-brief bool — When true, return only 'channel_id', 'channel_name', 'description' and 'status', and return all matches without pagination. --is-my-managed bool — When true, return only channels the caller manages. --is-my-starred bool — When true, return only channels the caller has starred. Mutually exclusive with 'is_my_team'. --is-my-team bool — When true, return channels owned by the caller's teams. Mutually exclusive with 'is_my_starred'. --orderby string — Field used to order results. Defaults to 'created_at'. [ranking, created_at, updated_at, channel_name, last_incident_at] - --query string — Case-insensitive regular expression matched against channel name and description; invalid regex syntax falls back to a literal match. + --query string — Case-insensitive regular expression matched against channel name and description; invalid regex syntax falls back to a literal match. Must be valid UTF-8 — invalid byte sequences are rejected with 'InvalidParameter'. --team-ids []int — Filter by team IDs. Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): @@ -1567,13 +1567,13 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") cmd.Flags().BoolVar(&fAsc, "asc", false, "When true, sort ascending; defaults to false (descending).") cmd.Flags().IntSliceVar(&fChannelIDs, "channel-ids", nil, "Filter by explicit channel IDs.") - cmd.Flags().StringVar(&fChannelName, "channel-name", "", "Exact-match filter on channel name. Takes priority over 'query' for name filtering.") + cmd.Flags().StringVar(&fChannelName, "channel-name", "", "Exact-match filter on channel name. Takes priority over 'query' for name filtering. Must be valid UTF-8 — invalid byte sequences are rejected with 'InvalidParameter'.") cmd.Flags().BoolVar(&fIsBrief, "is-brief", false, "When true, return only 'channel_id', 'channel_name', 'description' and 'status', and return all matches without pagination.") cmd.Flags().BoolVar(&fIsMyManaged, "is-my-managed", false, "When true, return only channels the caller manages.") cmd.Flags().BoolVar(&fIsMyStarred, "is-my-starred", false, "When true, return only channels the caller has starred. Mutually exclusive with 'is_my_team'.") cmd.Flags().BoolVar(&fIsMyTeam, "is-my-team", false, "When true, return channels owned by the caller's teams. Mutually exclusive with 'is_my_starred'.") cmd.Flags().StringVar(&fOrderby, "orderby", "", "Field used to order results. Defaults to 'created_at'. [ranking, created_at, updated_at, channel_name, last_incident_at]") - cmd.Flags().StringVar(&fQuery, "query", "", "Case-insensitive regular expression matched against channel name and description; invalid regex syntax falls back to a literal match.") + cmd.Flags().StringVar(&fQuery, "query", "", "Case-insensitive regular expression matched against channel name and description; invalid regex syntax falls back to a literal match. Must be valid UTF-8 — invalid byte sequences are rejected with 'InvalidParameter'.") cmd.Flags().IntSliceVar(&fTeamIDs, "team-ids", nil, "Filter by team IDs.") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd diff --git a/internal/cli/zz_generated_dashboards.go b/internal/cli/zz_generated_dashboards.go new file mode 100644 index 0000000..5cb105f --- /dev/null +++ b/internal/cli/zz_generated_dashboards.go @@ -0,0 +1,1869 @@ +// Code generated by internal/cmd/cligen; DO NOT EDIT. + +package cli + +import ( + "github.com/spf13/cobra" + + flashduty "github.com/flashcatcloud/go-flashduty" +) + +func genDashboardsPanelReadPreviewCmd() *cobra.Command { + var dataJSON string + var fMaxDataPoints int64 + cmd := &cobra.Command{ + Use: "dashboard-panel-preview", + Short: "Preview draft panel", + Long: `Preview draft panel. + +Execute a draft panel inline without saving a dashboard revision. + +API: POST /monit/dashboard/panel/preview (monit-dashboard-panel-read-preview) + +Request fields: + --max-data-points int — Downsampling target, 2–5000 points. (2-5000) + context (object, via --data) (required) — Where an unsaved draft panel or variable set belongs. 'existing' targets a stored dashboard, 'new' a folder that does not contain one yet — the two are mutually exclusive. + - dashboard_id (string) — Required for 'existing', forbidden for 'new'. + - folder_id (integer) — Required for 'new', forbidden for 'existing'. (min 1) + - kind (string) (required) — Draft context kind: 'existing' = targets a stored dashboard ('dashboard_id' required); 'new' = a folder that does not contain one yet ('folder_id' required). [existing, new] + panel (object, via --data) (required) — A single visualization. Panels must not overlap inside the same container; the 24-column grid is validated on save. + - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time. + - datasource_id (integer) — Datasource ID. Required when 'kind' is 'fixed', forbidden when 'kind' is 'variable'. (min 1) + - datasource_type (string) (required) — Datasource type identifier, e.g. 'prometheus' or 'victorialogs'. + - kind (string) (required) — 'fixed' uses 'datasource_id'; 'variable' resolves 'name' against a datasource variable. [fixed, variable] + - name (string) — Datasource variable name. Required when 'kind' is 'variable', forbidden when 'kind' is 'fixed'. + - description (string) — Optional panel description. (≤1024 chars) + - grid (object) (required) — 24-column grid placement. 'x' and 'y' are zero-based; 'x + w' must not exceed 24. + - h (integer) (required) — Height in grid rows, 1–100. (1-100) + - w (integer) (required) — Width in grid columns, 1–24. (1-24) + - x (integer) (required) — Zero-based column offset. (0-23) + - y (integer) (required) — Zero-based row offset. (min 0) + - id (string) (required) — Canonical UUIDv7 identifying the panel; unique across the definition. + - queries (array) (required) — Queries in the panel. 'time_series' accepts 1–26, 'text' accepts none, every other kind accepts exactly one. + - legend_alias (string) — Optional legend label; supports the same variable templates as 'expr'. (≤1024 chars) + - query (object) (required) — Query payload shared by dashboards and drill-down entries. + - args (object) (required) — Named query arguments; defaults to an empty object. Values are passed through verbatim and must not contain '{{ }}' templates. + - expr (string) (required) — Query expression in the target data source's language. May reference event labels through '{{ }}' templates. + - min_step_seconds (integer) — Minimum step, in seconds. Only accepted when 'mode' is 'range', and must be greater than zero; omit or pass null to let the server decide. (1-9007199254740) + - mode (string) (required) — Evaluation mode: 'instant' evaluates at a single timestamp, 'range' evaluates a stepped series, 'window' returns raw rows inside a time window. [instant, range, window] + - ref_id (string) (required) — Single uppercase letter (A–Z) naming the query inside its panel. + - title (string) (required) — Panel title. (1-189 chars) + - viz_config (object) (required) — Visualization configuration. 'kind' selects the arm and therefore which sibling config object is required; 'time_series' also carries the shared numeric options. + - category_field (string) — Field supplying the category axis. + - column_options (object) — Per-column display overrides keyed by field name, at most 100 entries. + - data_link (object) — Drill-down link from a table column or bar panel into another dashboard. The target dashboard must exist and the mapping sources must match the source panel's shape. + - dashboard_id (string) (required) — Target dashboard ID. + - pass_time (boolean) (required) — When true the current time range is forwarded to the target. + - target_id (string) — Optional tab, section or panel ID to focus in the target dashboard. + - variable_mappings (object) (required) — Maps target variable names to a source value such as a column or a source variable. + - decimals (integer) — Fixed decimal places; omit or send null to let the renderer decide. (min 0) + - display_fields (array) — Log fields rendered for each row. + - kind (string) (required) — Visualization kind discriminator; always 'time_series'. [time_series, table, stat, bar, gauge, logs, text] + - link_columns (array) — Drill-down links rendered as table columns. Together with per-column links a table allows at most 5. + - dashboard_id (string) (required) — Target dashboard ID. + - pass_time (boolean) (required) — When true the current time range is forwarded to the target. + - target_id (string) — Optional tab, section or panel ID to focus in the target dashboard. + - variable_mappings (object) (required) — Maps target variable names to a source value such as a column or a source variable. + - markdown (string) — Markdown body, at most 64 KiB. Only a restricted node set (headings, lists, tables, links, code) survives validation. (≤65536 chars) + - max (number) — Scale upper bound; must exceed 'min' when both are set. + - min (number) — Scale lower bound. + - options (object) (required) — Open options object for the chosen visualization kind; the only part of the definition that round-trips losslessly. Missing or null normalizes to '{}'. + - reducer (string) — Reduction applied across the returned rows: 'last_non_null' = most recent non-null value; 'min' = minimum; 'max' = maximum; 'mean' = average; 'sum' = sum. [last_non_null, min, max, mean, sum] + - sort (array) — Initial sort keys; fields must be unique. + - direction (string) (required) — Sort direction: 'asc' = ascending; 'desc' = descending. [asc, desc] + - field (string) (required) — Field name to sort by. (≥1 chars) + - threshold (object) — Colour threshold for a numeric value. At least one of 'warning'/'critical' is required, and with both set the pair must be ordered according to 'mode'. + - critical (number) — Critical bound; must be finite. + - mode (string) (required) — Direction of the comparison: 'higher_is_worse' = values at or above the bound breach it; 'lower_is_worse' = values at or below the bound breach it. [higher_is_worse, lower_is_worse] + - warning (number) — Warning bound; must be finite. + - unit (string) — Display unit for the panel's numeric values: 'unitless' = raw number; 'ratio' = fraction of 1; 'percent' = percentage; 'milliseconds' = duration in milliseconds; 'seconds' = duration in seconds; 'bytes' = size in bytes; 'bits' = size in bits; 'count_per_second' = per-second count; 'bytes_per_second' = bytes per second; 'bits_per_second' = bits per second. [unitless, ratio, percent, milliseconds, seconds, bytes, bits, count_per_second, bytes_per_second, bits_per_second] + - value_fields (array) — Fields reduced to the displayed values. + selections (object, via --data) (required) — Selections keyed by variable name. + time (object, via --data) (required) — Absolute evaluation window. Both bounds are Unix timestamps in milliseconds, 'from_ms' must be less than 'to_ms', and neither may exceed the JavaScript safe integer limit. + - from_ms (integer) (required) — Unix timestamp in milliseconds. (min 0) + - to_ms (integer) (required) — Unix timestamp in milliseconds. (min 1) + variables (array, via --data) (required) — Draft variables the panel may reference. + - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time. + - datasource_id (integer) — Datasource ID. Required when 'kind' is 'fixed', forbidden when 'kind' is 'variable'. (min 1) + - datasource_type (string) (required) — Datasource type identifier, e.g. 'prometheus' or 'victorialogs'. + - kind (string) (required) — 'fixed' uses 'datasource_id'; 'variable' resolves 'name' against a datasource variable. [fixed, variable] + - name (string) — Datasource variable name. Required when 'kind' is 'variable', forbidden when 'kind' is 'fixed'. + - datasource_type (string) — Datasource type the candidates are drawn from. + - default (object) — A concrete selection of variable values. An empty 'values' array is valid wire input and means unresolved — the server never substitutes a default for it. + - kind (string) (required) — 'values' selects the listed entries, 'all' selects everything (only allowed when 'include_all' is true). [values, all] + - values (array) — Selected values, unique and never '$__all'. Must be empty when 'kind' is 'all'. + - default_datasource_id (integer) — Default datasource ID. Without a usable default the runtime picks the first candidate by name, then ID. + - kind (string) (required) — Variable kind discriminator; always 'datasource', selecting a datasource. [datasource, custom, query] + - label (string) — Optional display label; falls back to 'name'. (≤189 chars) + - name (string) (required) — Variable name used in '{{ }}' templates, at most 64 characters. + - name_patterns (array) — Wildcard patterns narrowing the candidates; empty means every datasource of the type. + - options (array) — Candidate list, 1–1000 entries. Values must be non-empty, unique and must not be '$__all'. + - text (string) (required) — Label shown in the picker. (1-1024 chars) + - value (string) (required) — Value substituted into templates. (1-1024 chars) + - refresh (string) — When the candidates are recomputed: 'on_dashboard_load' = once when the dashboard loads; 'on_time_range_change' = every time the time range changes. [on_dashboard_load, on_time_range_change] + - selection (object) — Selection cardinality for a variable. + - include_all (boolean) (required) — When true the variable also offers an 'all' selection. + - mode (string) (required) — Selection cardinality: 'single' makes the resolved selection hold exactly one value; 'multi' allows multiple values. [single, multi] + - variable_query (object) — Variable query. Pick the arm with 'kind'; the arm must match the referenced datasource type. + - args (object) — Named query arguments; defaults to an empty object. + - expr (string) — SQL statement; may reference other variables through '{{ }}'. + - field (string) — Log field whose values become candidates. (≥1 chars) + - kind (string) (required) — Query kind discriminator; always 'prometheus', a label-values query against Prometheus. [prometheus, sql, logs] + - label (string) — Label whose values become candidates. + - label_filters (array) — Optional matchers narrowing the series before label values are read. + - label (string) (required) — Label name. + - op (string) (required) — Matcher operator: '=' = equals; '!=' = not equals; '=~' = regex match; '!~' = regex does-not-match. [=, !=, =~, !~] + - value (string) (required) — Matcher value; may reference other variables through '{{ }}'. (≥1 chars) + - metric (string) — Optional metric used to restrict the series considered. + - text_field (string) — Column used as the candidate label; defaults to the value column. + - value_field (string) — Column used as the candidate value. (≥1 chars) + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - budget (object) (required) — Execution accounting for a panel run. + - execution_count (integer) (required) — Number of queries launched. (min 0) + - max_concurrency (integer) (required) — Concurrency cap applied to the panel's queries. (min 1) + - display (object) (required) — Visualization configuration. 'kind' selects the arm and therefore which sibling config object is required; 'time_series' also carries the shared numeric options. + - category_field (string) — Field supplying the category axis. + - column_options (object) — Per-column display overrides keyed by field name, at most 100 entries. + - data_link (object) — Drill-down link from a table column or bar panel into another dashboard. The target dashboard must exist and the mapping sources must match the source panel's shape. + - dashboard_id (string) (required) — Target dashboard ID. + - pass_time (boolean) (required) — When true the current time range is forwarded to the target. + - target_id (string) — Optional tab, section or panel ID to focus in the target dashboard. + - variable_mappings (object) (required) — Maps target variable names to a source value such as a column or a source variable. + - decimals (integer) — Fixed decimal places; omit or send null to let the renderer decide. (min 0) + - display_fields (array) — Log fields rendered for each row. + - kind (string) (required) — Visualization kind discriminator; always 'time_series'. [time_series, table, stat, bar, gauge, logs, text] + - link_columns (array) — Drill-down links rendered as table columns. Together with per-column links a table allows at most 5. + - dashboard_id (string) (required) — Target dashboard ID. + - pass_time (boolean) (required) — When true the current time range is forwarded to the target. + - target_id (string) — Optional tab, section or panel ID to focus in the target dashboard. + - variable_mappings (object) (required) — Maps target variable names to a source value such as a column or a source variable. + - markdown (string) — Markdown body, at most 64 KiB. Only a restricted node set (headings, lists, tables, links, code) survives validation. (≤65536 chars) + - max (number) — Scale upper bound; must exceed 'min' when both are set. + - min (number) — Scale lower bound. + - options (object) (required) — Open options object for the chosen visualization kind; the only part of the definition that round-trips losslessly. Missing or null normalizes to '{}'. + - reducer (string) — Reduction applied across the returned rows: 'last_non_null' = most recent non-null value; 'min' = minimum; 'max' = maximum; 'mean' = average; 'sum' = sum. [last_non_null, min, max, mean, sum] + - sort (array) — Initial sort keys; fields must be unique. + - direction (string) (required) — Sort direction: 'asc' = ascending; 'desc' = descending. [asc, desc] + - field (string) (required) — Field name to sort by. (≥1 chars) + - threshold (object) — Colour threshold for a numeric value. At least one of 'warning'/'critical' is required, and with both set the pair must be ordered according to 'mode'. + - critical (number) — Critical bound; must be finite. + - mode (string) (required) — Direction of the comparison: 'higher_is_worse' = values at or above the bound breach it; 'lower_is_worse' = values at or below the bound breach it. [higher_is_worse, lower_is_worse] + - warning (number) — Warning bound; must be finite. + - unit (string) — Display unit for the panel's numeric values: 'unitless' = raw number; 'ratio' = fraction of 1; 'percent' = percentage; 'milliseconds' = duration in milliseconds; 'seconds' = duration in seconds; 'bytes' = size in bytes; 'bits' = size in bits; 'count_per_second' = per-second count; 'bytes_per_second' = bytes per second; 'bits_per_second' = bits per second. [unitless, ratio, percent, milliseconds, seconds, bytes, bits, count_per_second, bytes_per_second, bits_per_second] + - value_fields (array) — Fields reduced to the displayed values. + - panel_id (string) (required) — Panel ID. + - refs (array) (required) — One entry per query in the panel. + - child_request_id (string) — Request ID of the underlying datasource execution; use it when tracing a single query. + - error (object) — Per-variable or per-query failure. A failed arm does not fail the whole call. + - message (string) (required) — Human-readable detail for the failure. + - reason (string) (required) — Machine-readable failure reason. Observed values include 'invalid_request', 'variable_invalid', 'panel_missing', 'field_missing', 'datasource_permission_denied', 'timeout', 'panel_deadline', 'panel_canceled', 'canceled', 'overloaded', 'source_too_large', 'edge_unavailable', 'edge_upgrade_required', 'edge_version_unknown', 'mixed_edge_versions' and 'internal'. + - execution (object) — Datasource-specific execution payload, passed through unmodified. + - ref_id (string) (required) — Panel-local query reference. + - state (string) (required) — Per-query execution state: 'success' = the query executed; 'error' = the query failed; 'incompatible' = the datasource accepted the call but the query mode or field selection does not fit the datasource type. [success, error, incompatible] + - run_state (string) (required) — Aggregate state of the run: 'success' = all queries succeeded; 'partial' = some succeeded; 'incompatible' = at least one query is incompatible with its datasource; 'cancelled' = the run was cancelled; 'error' = all queries failed. [success, partial, incompatible, cancelled, error] + - time (object) (required) — Absolute evaluation window. Both bounds are Unix timestamps in milliseconds, 'from_ms' must be less than 'to_ms', and neither may exceed the JavaScript safe integer limit. + - from_ms (integer) (required) — Unix timestamp in milliseconds. (min 0) + - to_ms (integer) (required) — Unix timestamp in milliseconds. (min 1) + - variables (object) (required) — Selections that resolved successfully. +`, + Example: ` flashduty monit dashboard-panel-preview --data '{"context":{"dashboard_id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2101","kind":"existing"},"max_data_points":100,"panel":{"datasource_ref":{"datasource_id":10,"datasource_type":"prometheus","kind":"fixed"},"grid":{"h":8,"w":12,"x":0,"y":0},"id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2404","queries":[{"legend_alias":"{{env}} requests","query":{"args":{},"expr":"sum(rate(http_requests_total{env=\"{{env}}\"}[5m]))","min_step_seconds":30,"mode":"range"},"ref_id":"A"}],"title":"Request rate","viz_config":{"decimals":2,"kind":"time_series","options":{},"threshold":{"critical":2000,"mode":"higher_is_worse","warning":1000},"unit":"count_per_second"}},"selections":{"env":{"kind":"values","values":["prod"]}},"time":{"from_ms":1791100800000,"to_ms":1791104400000},"variables":[{"default":{"kind":"values","values":["prod"]},"kind":"custom","label":"Environment","name":"env","options":[{"text":"Production","value":"prod"},{"text":"Staging","value":"staging"}],"selection":{"include_all":false,"mode":"single"}}]}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if cmd.Flags().Changed("max-data-points") { + body["max_data_points"] = fMaxDataPoints + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.DashboardPanelPreviewRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Dashboards.PanelReadPreview(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().Int64Var(&fMaxDataPoints, "max-data-points", 0, "Downsampling target, 2–5000 points. (2-5000)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genDashboardsPanelReadRunCmd() *cobra.Command { + var dataJSON string + var fDashboardID string + var fMaxDataPoints int64 + var fPanelID string + var fRevision int64 + cmd := &cobra.Command{ + Use: "dashboard-panel-run", + Short: "Run dashboard panel", + Long: `Run dashboard panel. + +Execute one panel of a stored dashboard and return the datasource results. + +API: POST /monit/dashboard/panel/run (monit-dashboard-panel-read-run) + +Request fields: + --dashboard-id string (required) — Canonical UUIDv7 of the dashboard. + --max-data-points int — Downsampling target, 2–5000 points; omit or send null for the server default of 100. (2-5000) + --panel-id string (required) — Panel to execute. + --revision int — Revision guard; when set it must equal the current revision. (min 1) + time (object, via --data) (required) — Absolute evaluation window. Both bounds are Unix timestamps in milliseconds, 'from_ms' must be less than 'to_ms', and neither may exceed the JavaScript safe integer limit. + - from_ms (integer) (required) — Unix timestamp in milliseconds. (min 0) + - to_ms (integer) (required) — Unix timestamp in milliseconds. (min 1) + variables (object, via --data) (required) — Selections keyed by variable name, at most 20 entries. + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - budget (object) (required) — Execution accounting for a panel run. + - execution_count (integer) (required) — Number of queries launched. (min 0) + - max_concurrency (integer) (required) — Concurrency cap applied to the panel's queries. (min 1) + - dashboard_id (string) (required) — Dashboard ID. + - display (object) (required) — Visualization configuration. 'kind' selects the arm and therefore which sibling config object is required; 'time_series' also carries the shared numeric options. + - category_field (string) — Field supplying the category axis. + - column_options (object) — Per-column display overrides keyed by field name, at most 100 entries. + - data_link (object) — Drill-down link from a table column or bar panel into another dashboard. The target dashboard must exist and the mapping sources must match the source panel's shape. + - dashboard_id (string) (required) — Target dashboard ID. + - pass_time (boolean) (required) — When true the current time range is forwarded to the target. + - target_id (string) — Optional tab, section or panel ID to focus in the target dashboard. + - variable_mappings (object) (required) — Maps target variable names to a source value such as a column or a source variable. + - decimals (integer) — Fixed decimal places; omit or send null to let the renderer decide. (min 0) + - display_fields (array) — Log fields rendered for each row. + - kind (string) (required) — Visualization kind discriminator; always 'time_series'. [time_series, table, stat, bar, gauge, logs, text] + - link_columns (array) — Drill-down links rendered as table columns. Together with per-column links a table allows at most 5. + - dashboard_id (string) (required) — Target dashboard ID. + - pass_time (boolean) (required) — When true the current time range is forwarded to the target. + - target_id (string) — Optional tab, section or panel ID to focus in the target dashboard. + - variable_mappings (object) (required) — Maps target variable names to a source value such as a column or a source variable. + - markdown (string) — Markdown body, at most 64 KiB. Only a restricted node set (headings, lists, tables, links, code) survives validation. (≤65536 chars) + - max (number) — Scale upper bound; must exceed 'min' when both are set. + - min (number) — Scale lower bound. + - options (object) (required) — Open options object for the chosen visualization kind; the only part of the definition that round-trips losslessly. Missing or null normalizes to '{}'. + - reducer (string) — Reduction applied across the returned rows: 'last_non_null' = most recent non-null value; 'min' = minimum; 'max' = maximum; 'mean' = average; 'sum' = sum. [last_non_null, min, max, mean, sum] + - sort (array) — Initial sort keys; fields must be unique. + - direction (string) (required) — Sort direction: 'asc' = ascending; 'desc' = descending. [asc, desc] + - field (string) (required) — Field name to sort by. (≥1 chars) + - threshold (object) — Colour threshold for a numeric value. At least one of 'warning'/'critical' is required, and with both set the pair must be ordered according to 'mode'. + - critical (number) — Critical bound; must be finite. + - mode (string) (required) — Direction of the comparison: 'higher_is_worse' = values at or above the bound breach it; 'lower_is_worse' = values at or below the bound breach it. [higher_is_worse, lower_is_worse] + - warning (number) — Warning bound; must be finite. + - unit (string) — Display unit for the panel's numeric values: 'unitless' = raw number; 'ratio' = fraction of 1; 'percent' = percentage; 'milliseconds' = duration in milliseconds; 'seconds' = duration in seconds; 'bytes' = size in bytes; 'bits' = size in bits; 'count_per_second' = per-second count; 'bytes_per_second' = bytes per second; 'bits_per_second' = bits per second. [unitless, ratio, percent, milliseconds, seconds, bytes, bits, count_per_second, bytes_per_second, bits_per_second] + - value_fields (array) — Fields reduced to the displayed values. + - panel_id (string) (required) — Panel ID. + - refs (array) (required) — One entry per query in the panel. + - child_request_id (string) — Request ID of the underlying datasource execution; use it when tracing a single query. + - error (object) — Per-variable or per-query failure. A failed arm does not fail the whole call. + - message (string) (required) — Human-readable detail for the failure. + - reason (string) (required) — Machine-readable failure reason. Observed values include 'invalid_request', 'variable_invalid', 'panel_missing', 'field_missing', 'datasource_permission_denied', 'timeout', 'panel_deadline', 'panel_canceled', 'canceled', 'overloaded', 'source_too_large', 'edge_unavailable', 'edge_upgrade_required', 'edge_version_unknown', 'mixed_edge_versions' and 'internal'. + - execution (object) — Datasource-specific execution payload, passed through unmodified. + - ref_id (string) (required) — Panel-local query reference. + - state (string) (required) — Per-query execution state: 'success' = the query executed; 'error' = the query failed; 'incompatible' = the datasource accepted the call but the query mode or field selection does not fit the datasource type. [success, error, incompatible] + - revision (integer) (required) — Revision the run executed against. (min 1) + - run_state (string) (required) — Aggregate state of the run: 'success' = all queries succeeded; 'partial' = some succeeded; 'incompatible' = at least one query is incompatible with its datasource; 'cancelled' = the run was cancelled; 'error' = all queries failed. [success, partial, incompatible, cancelled, error] + - time (object) (required) — Absolute evaluation window. Both bounds are Unix timestamps in milliseconds, 'from_ms' must be less than 'to_ms', and neither may exceed the JavaScript safe integer limit. + - from_ms (integer) (required) — Unix timestamp in milliseconds. (min 0) + - to_ms (integer) (required) — Unix timestamp in milliseconds. (min 1) + - variables (object) (required) — Selections that resolved successfully. +`, + Example: ` flashduty monit dashboard-panel-run --data '{"dashboard_id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2101","max_data_points":100,"panel_id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2404","revision":7,"time":{"from_ms":1791100800000,"to_ms":1791104400000},"variables":{"env":{"kind":"values","values":["prod"]}}}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if cmd.Flags().Changed("dashboard-id") { + body["dashboard_id"] = fDashboardID + } + if cmd.Flags().Changed("max-data-points") { + body["max_data_points"] = fMaxDataPoints + } + if cmd.Flags().Changed("panel-id") { + body["panel_id"] = fPanelID + } + if cmd.Flags().Changed("revision") { + body["revision"] = fRevision + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.DashboardPanelRunRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Dashboards.PanelReadRun(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fDashboardID, "dashboard-id", "", "Canonical UUIDv7 of the dashboard. (required)") + cmd.Flags().Int64Var(&fMaxDataPoints, "max-data-points", 0, "Downsampling target, 2–5000 points; omit or send null for the server default of 100. (2-5000)") + cmd.Flags().StringVar(&fPanelID, "panel-id", "", "Panel to execute. (required)") + cmd.Flags().Int64Var(&fRevision, "revision", 0, "Revision guard; when set it must equal the current revision. (min 1)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genDashboardsQueryReadResolveCmd() *cobra.Command { + var dataJSON string + var fDashboardID string + var fPanelIDs []string + cmd := &cobra.Command{ + Use: "dashboard-runtime-queries-resolve [...]", + Short: "Resolve panel queries", + Long: `Resolve panel queries. + +Bind panel queries to datasources and substitute variables without executing them. + +API: POST /monit/dashboard/runtime/queries/resolve (monit-dashboard-query-read-resolve) + +Request fields: + --dashboard-id string (required) — Canonical UUIDv7 of the dashboard. + --panel-ids []string (required) — Panels to resolve, 1–100 unique IDs. A panel that does not exist yields an 'error' arm rather than failing the call. + time (object, via --data) (required) — Absolute evaluation window. Both bounds are Unix timestamps in milliseconds, 'from_ms' must be less than 'to_ms', and neither may exceed the JavaScript safe integer limit. + - from_ms (integer) (required) — Unix timestamp in milliseconds. (min 0) + - to_ms (integer) (required) — Unix timestamp in milliseconds. (min 1) + variables (object, via --data) (required) — Selections keyed by variable name, at most 20 entries. + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - dashboard_id (string) (required) — Dashboard ID. + - panels (array) (required) — Per-panel results. + - error (object) — Per-variable or per-query failure. A failed arm does not fail the whole call. + - message (string) (required) — Human-readable detail for the failure. + - reason (string) (required) — Machine-readable failure reason. Observed values include 'invalid_request', 'variable_invalid', 'panel_missing', 'field_missing', 'datasource_permission_denied', 'timeout', 'panel_deadline', 'panel_canceled', 'canceled', 'overloaded', 'source_too_large', 'edge_unavailable', 'edge_upgrade_required', 'edge_version_unknown', 'mixed_edge_versions' and 'internal'. + - panel_id (string) (required) — Panel ID. + - queries (array) (required) — Successfully resolved queries. + - args (object) (required) — Query arguments; empty object when none. + - datasource (object) (required) — The datasource a runtime query was bound to. + - id (integer) (required) — Datasource ID. (min 1) + - name (string) (required) — Datasource name. + - type (string) (required) — Datasource type identifier. + - expr (string) (required) — Expression with variable templates substituted. + - min_step_seconds (integer) — Minimum step in seconds; null when unset. (min 1) + - mode (string) (required) — Evaluation mode: 'range' = a stepped time series; 'instant' = a single point in time; 'window' = raw rows inside a bounded time window. [range, instant, window] + - ref_id (string) (required) — Panel-local query reference. + - state (string) (required) — Aggregate state of the panel's queries: 'success' = every query resolved; 'partial' = some resolved; 'error' = none resolved. [success, partial, error] + - revision (integer) (required) — Revision the resolution ran against. (min 1) + - time (object) (required) — Absolute evaluation window. Both bounds are Unix timestamps in milliseconds, 'from_ms' must be less than 'to_ms', and neither may exceed the JavaScript safe integer limit. + - from_ms (integer) (required) — Unix timestamp in milliseconds. (min 0) + - to_ms (integer) (required) — Unix timestamp in milliseconds. (min 1) + - variables (object) (required) — Selections that resolved successfully. +`, + Args: requireBodyFieldOrArgs("panel_ids", "panel-ids"), + Example: ` flashduty monit dashboard-runtime-queries-resolve --data '{"dashboard_id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2101","panel_ids":["01990d7a-9c5b-7ab0-9c18-33e38f6f2404"],"time":{"from_ms":1791100800000,"to_ms":1791104400000},"variables":{"env":{"kind":"values","values":["prod"]}}}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "panel_ids", "slice"); err != nil { + return err + } + if cmd.Flags().Changed("dashboard-id") { + body["dashboard_id"] = fDashboardID + } + if cmd.Flags().Changed("panel-ids") { + body["panel_ids"] = fPanelIDs + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.DashboardQueriesResolveRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Dashboards.QueryReadResolve(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fDashboardID, "dashboard-id", "", "Canonical UUIDv7 of the dashboard. (required)") + cmd.Flags().StringSliceVar(&fPanelIDs, "panel-ids", nil, "Panels to resolve, 1–100 unique IDs. A panel that does not exist yields an 'error' arm rather than failing the call. (required)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genDashboardsReadGetCmd() *cobra.Command { + var dataJSON string + var fDashboardID string + cmd := &cobra.Command{ + Use: "dashboard-get ", + Short: "Get dashboard detail", + Long: `Get dashboard detail. + +Fetch one dashboard with its full definition. + +API: POST /monit/dashboard/get (monit-dashboard-read-get) + +Request fields: + --dashboard-id string (required) — Canonical UUIDv7 of the dashboard. + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - created_at (string) (required) — Unix timestamp in seconds. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - created_by (object) (required) — Account member recorded as the creator, updater or revision author. + - id (integer) (required) — Member ID. + - name (string) (required) — Member display name. + - dashboard_id (string) (required) — Canonical UUIDv7 assigned by the caller at creation time. + - definition (object) (required) — Complete dashboard payload stored as a portable 'dashboard.v1' document. Unknown keys, duplicate keys, NaN/Inf, over-range numbers and trailing values are rejected; the serialized form must stay within 1 MiB. + - default_time_range (object) (required) — Relative time window. 'from' is one of the fixed presets the validator accepts; 'to' is always the literal string 'now'. + - from (string) (required) — Start offset relative to 'to': 'now-15m' = 15 minutes ago; 'now-30m' = 30 minutes ago; 'now-1h' = 1 hour ago; 'now-3h' = 3 hours ago; 'now-6h' = 6 hours ago; 'now-12h' = 12 hours ago; 'now-24h' = 24 hours ago; 'now-7d' = 7 days ago. [now-15m, now-30m, now-1h, now-3h, now-6h, now-12h, now-24h, now-7d] + - to (string) (required) — End of the window; only 'now' is accepted. [now] + - description (string) — Optional description, at most 1024 Unicode code points. (≤1024 chars) + - refresh_interval (string) (required) — Auto-refresh cadence applied by the console: 'off' disables auto-refresh; '30s' = every 30 seconds; '1m' = every minute; '5m' = every 5 minutes. [off, 30s, 1m, 5m] + - tabs (array) (required) — Tabs, 1–10. Every tab title is unique and every tab or section ID must be a canonical UUIDv7 used only once across the definition. + - description (string) — Optional tab description. (≤1024 chars) + - id (string) (required) — Canonical UUIDv7 identifying the tab; unique across the definition. + - sections (array) (required) — Sections on the tab, at most 10. + - collapsed (boolean) (required) — Whether the section renders collapsed by default. + - description (string) — Optional section description. (≤1024 chars) + - id (string) (required) — Canonical UUIDv7 identifying the section; unique across the definition. + - panels (array) (required) — Panels in the section, at most 30. + - title (string) (required) — Section title. (1-189 chars) + - title (string) (required) — Tab title, 1–189 Unicode code points. Unique among tabs. (1-189 chars) + - top_panels (array) (required) — Panels placed directly on the tab, at most 30. + - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time. + - description (string) — Optional panel description. (≤1024 chars) + - grid (object) (required) — 24-column grid placement. 'x' and 'y' are zero-based; 'x + w' must not exceed 24. + - id (string) (required) — Canonical UUIDv7 identifying the panel; unique across the definition. + - queries (array) (required) — Queries in the panel. 'time_series' accepts 1–26, 'text' accepts none, every other kind accepts exactly one. + - title (string) (required) — Panel title. (1-189 chars) + - viz_config (object) (required) — Visualization configuration. 'kind' selects the arm and therefore which sibling config object is required; 'time_series' also carries the shared numeric options. + - title (string) (required) — Dashboard title, 1–189 Unicode code points after trimming. (1-189 chars) + - variables (array) (required) — Dashboard variables, at most 20. Names must be unique within the definition and match the variable-name pattern. + - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time. + - datasource_id (integer) — Datasource ID. Required when 'kind' is 'fixed', forbidden when 'kind' is 'variable'. (min 1) + - datasource_type (string) (required) — Datasource type identifier, e.g. 'prometheus' or 'victorialogs'. + - kind (string) (required) — 'fixed' uses 'datasource_id'; 'variable' resolves 'name' against a datasource variable. [fixed, variable] + - name (string) — Datasource variable name. Required when 'kind' is 'variable', forbidden when 'kind' is 'fixed'. + - datasource_type (string) — Datasource type the candidates are drawn from. + - default (object) — A concrete selection of variable values. An empty 'values' array is valid wire input and means unresolved — the server never substitutes a default for it. + - kind (string) (required) — 'values' selects the listed entries, 'all' selects everything (only allowed when 'include_all' is true). [values, all] + - values (array) — Selected values, unique and never '$__all'. Must be empty when 'kind' is 'all'. + - default_datasource_id (integer) — Default datasource ID. Without a usable default the runtime picks the first candidate by name, then ID. + - kind (string) (required) — Variable kind discriminator; always 'datasource', selecting a datasource. [datasource, custom, query] + - label (string) — Optional display label; falls back to 'name'. (≤189 chars) + - name (string) (required) — Variable name used in '{{ }}' templates, at most 64 characters. + - name_patterns (array) — Wildcard patterns narrowing the candidates; empty means every datasource of the type. + - options (array) — Candidate list, 1–1000 entries. Values must be non-empty, unique and must not be '$__all'. + - text (string) (required) — Label shown in the picker. (1-1024 chars) + - value (string) (required) — Value substituted into templates. (1-1024 chars) + - refresh (string) — When the candidates are recomputed: 'on_dashboard_load' = once when the dashboard loads; 'on_time_range_change' = every time the time range changes. [on_dashboard_load, on_time_range_change] + - selection (object) — Selection cardinality for a variable. + - include_all (boolean) (required) — When true the variable also offers an 'all' selection. + - mode (string) (required) — Selection cardinality: 'single' makes the resolved selection hold exactly one value; 'multi' allows multiple values. [single, multi] + - variable_query (object) — Variable query. Pick the arm with 'kind'; the arm must match the referenced datasource type. + - args (object) — Named query arguments; defaults to an empty object. + - expr (string) — SQL statement; may reference other variables through '{{ }}'. + - field (string) — Log field whose values become candidates. (≥1 chars) + - kind (string) (required) — Query kind discriminator; always 'prometheus', a label-values query against Prometheus. [prometheus, sql, logs] + - label (string) — Label whose values become candidates. + - label_filters (array) — Optional matchers narrowing the series before label values are read. + - metric (string) — Optional metric used to restrict the series considered. + - text_field (string) — Column used as the candidate label; defaults to the value column. + - value_field (string) — Column used as the candidate value. (≥1 chars) + - folder_breadcrumb (array) (required) — Folder names from the root down to 'folder_id'. + - folder_id (integer) (required) — ID of the dashboard's folder. (min 1) + - revision (integer) (required) — Current revision number. (min 1) + - schema_version (string) (required) — Wire schema version of 'definition'; only 'dashboard.v1' is accepted. [dashboard.v1] + - updated_at (string) (required) — Unix timestamp in seconds. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - updated_by (object) (required) — Account member recorded as the creator, updater or revision author. + - id (integer) (required) — Member ID. + - name (string) (required) — Member display name. +`, + Args: requireBodyFieldOrExactArg("dashboard_id", "dashboard-id"), + Example: ` flashduty monit dashboard-get --data '{"dashboard_id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2101"}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "dashboard_id", "string"); err != nil { + return err + } + if cmd.Flags().Changed("dashboard-id") { + body["dashboard_id"] = fDashboardID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.DashboardIDRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Dashboards.ReadGet(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fDashboardID, "dashboard-id", "", "Canonical UUIDv7 of the dashboard. (required)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genDashboardsReadListCmd() *cobra.Command { + var dataJSON string + var fP int64 + var fLimit int64 + var fSearchAfterCtx string + var fFolderID int64 + var fQuery string + cmd := &cobra.Command{ + Use: "dashboard-list ", + Short: "List dashboards", + Long: `List dashboards. + +List the dashboards in one folder. + +API: POST /monit/dashboard/list (monit-dashboard-read-list) + +Request fields: + --page int — Page number, 1-based. Defaults to 1. (min 1) + --limit int — Page size, 1–100. Defaults to 20. (1-100) + --search-after-ctx string + --folder-id int (required) — Folder whose dashboards are listed. (min 1) + --query string — Optional space-separated search words matched against title and description; at most 128 Unicode code points. (≤128 chars) + sort (array, via --data) — Sort keys; defaults to 'updated_at' descending. + - direction (string) (required) — Sort direction: 'asc' = ascending; 'desc' = descending. [asc, desc] + - field (string) (required) — 'title' is available everywhere; 'updated_at' only on list/search, 'deleted_at' only on the trash listing. [title, updated_at, deleted_at] + +Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): + - items (array) (required) — Dashboards in this page. + - dashboard_id (string) (required) — Dashboard ID. + - description (string) — Dashboard description; empty when unset. + - folder_breadcrumb (array) (required) — Folder path from the root. + - folder_id (integer) (required) — Folder ID. (min 1) + - revision (integer) (required) — Current revision number. (min 1) + - title (string) (required) — Dashboard title. + - updated_at (string) (required) — Unix timestamp in seconds. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - updated_by (object) (required) — Account member recorded as the creator, updater or revision author. + - id (integer) (required) — Member ID. + - name (string) (required) — Member display name. + - total (integer) (required) — Total number of matching dashboards across all pages. +`, + Args: requireBodyFieldOrExactArg("folder_id", "folder-id"), + Example: ` flashduty monit dashboard-list --data '{"folder_id":12,"limit":20,"p":1,"query":"checkout","sort":[{"direction":"desc","field":"updated_at"}]}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "folder_id", "int"); err != nil { + return err + } + if cmd.Flags().Changed("page") { + body["p"] = fP + } + if cmd.Flags().Changed("limit") { + body["limit"] = fLimit + } + if cmd.Flags().Changed("search-after-ctx") { + body["search_after_ctx"] = fSearchAfterCtx + } + if cmd.Flags().Changed("folder-id") { + body["folder_id"] = fFolderID + } + if cmd.Flags().Changed("query") { + body["query"] = fQuery + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.DashboardListRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Dashboards.ReadList(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().Int64Var(&fP, "page", 0, "Page number, 1-based. Defaults to 1. (min 1)") + cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size, 1–100. Defaults to 20. (1-100)") + cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") + cmd.Flags().Int64Var(&fFolderID, "folder-id", 0, "Folder whose dashboards are listed. (required) (min 1)") + cmd.Flags().StringVar(&fQuery, "query", "", "Optional space-separated search words matched against title and description; at most 128 Unicode code points. (≤128 chars)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genDashboardsReadOutlineCmd() *cobra.Command { + var dataJSON string + var fDashboardID string + var fTargetID string + cmd := &cobra.Command{ + Use: "dashboard-outline ", + Short: "Get dashboard outline", + Long: `Get dashboard outline. + +Get a dashboard's structure without queries or definitions. + +API: POST /monit/dashboard/outline (monit-dashboard-read-outline) + +Request fields: + --dashboard-id string (required) — Canonical UUIDv7 of the dashboard. + --target-id string — Optional tab, section or panel ID. When set, the response keeps only the branch that contains it, and an unknown ID returns 'TargetNotFound'. + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - dashboard (object) (required) — Dashboard-level outline entry. + - dashboard_id (string) (required) — Dashboard ID. + - description (string) — Dashboard description; empty when unset. + - revision (integer) (required) — Current revision number. (min 1) + - title (string) (required) — Dashboard title. + - updated_at (string) (required) — Unix timestamp in seconds. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - folder (object) (required) — Folder placement in an outline. + - breadcrumb (array) (required) — Folder names from the root. + - folder_id (integer) (required) — Folder ID. (min 1) + - tabs (array) (required) — Tabs, narrowed by 'target_id' when supplied. + - breadcrumb (array) (required) — Dashboard title followed by the tab title. + - description (string) — Tab description; empty when unset. + - id (string) (required) — Tab ID. + - sections (array) (required) — Sections on the tab. + - breadcrumb (array) (required) — Dashboard, tab and section titles. + - description (string) — Section description; empty when unset. + - id (string) (required) — Section ID. + - panels (array) (required) — Panels in the section. + - breadcrumb (array) (required) — Full path of titles from the dashboard down to the panel. + - datasource_type (string) — Datasource type the panel queries; empty when the panel has no datasource (text panels). + - description (string) — Panel description; empty when unset. + - id (string) (required) — Panel ID. + - title (string) (required) — Panel title. + - viz_config (object) (required) — Visualization kind of an outlined panel. + - title (string) (required) — Section title. + - title (string) (required) — Tab title. + - top_panels (array) (required) — Panels placed directly on the tab. + - breadcrumb (array) (required) — Full path of titles from the dashboard down to the panel. + - datasource_type (string) — Datasource type the panel queries; empty when the panel has no datasource (text panels). + - description (string) — Panel description; empty when unset. + - id (string) (required) — Panel ID. + - title (string) (required) — Panel title. + - viz_config (object) (required) — Visualization kind of an outlined panel. + - kind (string) (required) — Visualization kind: 'time_series' = time series; 'table' = table; 'stat' = single value; 'bar' = bar chart; 'gauge' = gauge; 'logs' = log stream; 'text' = Markdown text. [time_series, table, stat, bar, gauge, logs, text] + - variables (array) (required) — Variable summaries. + - kind (string) (required) — Variable kind: 'datasource' = selects a datasource; 'custom' = fixed inline list; 'query' = resolved by running a query. [datasource, custom, query] + - label (string) — Display label; empty when unset. + - name (string) (required) — Variable name. + - selection (object) — Selection cardinality for a variable. + - include_all (boolean) (required) — When true the variable also offers an 'all' selection. + - mode (string) (required) — Selection cardinality: 'single' makes the resolved selection hold exactly one value; 'multi' allows multiple values. [single, multi] +`, + Args: requireBodyFieldOrExactArg("dashboard_id", "dashboard-id"), + Example: ` flashduty monit dashboard-outline --data '{"dashboard_id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2101","target_id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2404"}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "dashboard_id", "string"); err != nil { + return err + } + if cmd.Flags().Changed("dashboard-id") { + body["dashboard_id"] = fDashboardID + } + if cmd.Flags().Changed("target-id") { + body["target_id"] = fTargetID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.DashboardOutlineRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Dashboards.ReadOutline(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fDashboardID, "dashboard-id", "", "Canonical UUIDv7 of the dashboard. (required)") + cmd.Flags().StringVar(&fTargetID, "target-id", "", "Optional tab, section or panel ID. When set, the response keeps only the branch that contains it, and an unknown ID returns 'TargetNotFound'.") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genDashboardsReadSearchCmd() *cobra.Command { + var dataJSON string + var fP int64 + var fLimit int64 + var fSearchAfterCtx string + var fQuery string + cmd := &cobra.Command{ + Use: "dashboard-search", + Short: "Search dashboards", + Long: `Search dashboards. + +Search dashboards across every readable folder. + +API: POST /monit/dashboard/search (monit-dashboard-read-search) + +Request fields: + --page int — Page number, 1-based. Defaults to 1. (min 1) + --limit int — Page size, 1–100. Defaults to 20. (1-100) + --search-after-ctx string + --query string (required) — Space-separated search words; at least one word and at most 128 Unicode code points. (1-128 chars) + sort (array, via --data) — Sort keys; defaults to 'updated_at' descending. + - direction (string) (required) — Sort direction: 'asc' = ascending; 'desc' = descending. [asc, desc] + - field (string) (required) — 'title' is available everywhere; 'updated_at' only on list/search, 'deleted_at' only on the trash listing. [title, updated_at, deleted_at] + +Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): + - items (array) (required) — Dashboards in this page. + - dashboard_id (string) (required) — Dashboard ID. + - description (string) — Dashboard description; empty when unset. + - folder_breadcrumb (array) (required) — Folder path from the root. + - folder_id (integer) (required) — Folder ID. (min 1) + - revision (integer) (required) — Current revision number. (min 1) + - title (string) (required) — Dashboard title. + - updated_at (string) (required) — Unix timestamp in seconds. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - updated_by (object) (required) — Account member recorded as the creator, updater or revision author. + - id (integer) (required) — Member ID. + - name (string) (required) — Member display name. + - total (integer) (required) — Total number of matching dashboards across all pages. +`, + Example: ` flashduty monit dashboard-search --data '{"limit":20,"p":1,"query":"checkout latency","sort":[{"direction":"asc","field":"title"}]}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if cmd.Flags().Changed("page") { + body["p"] = fP + } + if cmd.Flags().Changed("limit") { + body["limit"] = fLimit + } + if cmd.Flags().Changed("search-after-ctx") { + body["search_after_ctx"] = fSearchAfterCtx + } + if cmd.Flags().Changed("query") { + body["query"] = fQuery + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.DashboardSearchRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Dashboards.ReadSearch(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().Int64Var(&fP, "page", 0, "Page number, 1-based. Defaults to 1. (min 1)") + cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size, 1–100. Defaults to 20. (1-100)") + cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") + cmd.Flags().StringVar(&fQuery, "query", "", "Space-separated search words; at least one word and at most 128 Unicode code points. (required) (1-128 chars)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genDashboardsRevisionReadGetCmd() *cobra.Command { + var dataJSON string + var fDashboardID string + var fRevision int64 + cmd := &cobra.Command{ + Use: "dashboard-revisions-get ", + Short: "Get dashboard revision", + Long: `Get dashboard revision. + +Fetch one historical revision with its full definition. + +API: POST /monit/dashboard/revisions/get (monit-dashboard-revision-read-get) + +Request fields: + --dashboard-id string (required) — Canonical UUIDv7 of the dashboard. + --revision int (required) — Revision number to fetch. (min 1) + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - actor (object) (required) — Account member recorded as the creator, updater or revision author. + - id (integer) (required) — Member ID. + - name (string) (required) — Member display name. + - created_at (string) (required) — Unix timestamp in seconds. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - dashboard_id (string) (required) — Dashboard ID. + - definition (object) (required) — Complete dashboard payload stored as a portable 'dashboard.v1' document. Unknown keys, duplicate keys, NaN/Inf, over-range numbers and trailing values are rejected; the serialized form must stay within 1 MiB. + - default_time_range (object) (required) — Relative time window. 'from' is one of the fixed presets the validator accepts; 'to' is always the literal string 'now'. + - from (string) (required) — Start offset relative to 'to': 'now-15m' = 15 minutes ago; 'now-30m' = 30 minutes ago; 'now-1h' = 1 hour ago; 'now-3h' = 3 hours ago; 'now-6h' = 6 hours ago; 'now-12h' = 12 hours ago; 'now-24h' = 24 hours ago; 'now-7d' = 7 days ago. [now-15m, now-30m, now-1h, now-3h, now-6h, now-12h, now-24h, now-7d] + - to (string) (required) — End of the window; only 'now' is accepted. [now] + - description (string) — Optional description, at most 1024 Unicode code points. (≤1024 chars) + - refresh_interval (string) (required) — Auto-refresh cadence applied by the console: 'off' disables auto-refresh; '30s' = every 30 seconds; '1m' = every minute; '5m' = every 5 minutes. [off, 30s, 1m, 5m] + - tabs (array) (required) — Tabs, 1–10. Every tab title is unique and every tab or section ID must be a canonical UUIDv7 used only once across the definition. + - description (string) — Optional tab description. (≤1024 chars) + - id (string) (required) — Canonical UUIDv7 identifying the tab; unique across the definition. + - sections (array) (required) — Sections on the tab, at most 10. + - collapsed (boolean) (required) — Whether the section renders collapsed by default. + - description (string) — Optional section description. (≤1024 chars) + - id (string) (required) — Canonical UUIDv7 identifying the section; unique across the definition. + - panels (array) (required) — Panels in the section, at most 30. + - title (string) (required) — Section title. (1-189 chars) + - title (string) (required) — Tab title, 1–189 Unicode code points. Unique among tabs. (1-189 chars) + - top_panels (array) (required) — Panels placed directly on the tab, at most 30. + - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time. + - description (string) — Optional panel description. (≤1024 chars) + - grid (object) (required) — 24-column grid placement. 'x' and 'y' are zero-based; 'x + w' must not exceed 24. + - id (string) (required) — Canonical UUIDv7 identifying the panel; unique across the definition. + - queries (array) (required) — Queries in the panel. 'time_series' accepts 1–26, 'text' accepts none, every other kind accepts exactly one. + - title (string) (required) — Panel title. (1-189 chars) + - viz_config (object) (required) — Visualization configuration. 'kind' selects the arm and therefore which sibling config object is required; 'time_series' also carries the shared numeric options. + - title (string) (required) — Dashboard title, 1–189 Unicode code points after trimming. (1-189 chars) + - variables (array) (required) — Dashboard variables, at most 20. Names must be unique within the definition and match the variable-name pattern. + - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time. + - datasource_id (integer) — Datasource ID. Required when 'kind' is 'fixed', forbidden when 'kind' is 'variable'. (min 1) + - datasource_type (string) (required) — Datasource type identifier, e.g. 'prometheus' or 'victorialogs'. + - kind (string) (required) — 'fixed' uses 'datasource_id'; 'variable' resolves 'name' against a datasource variable. [fixed, variable] + - name (string) — Datasource variable name. Required when 'kind' is 'variable', forbidden when 'kind' is 'fixed'. + - datasource_type (string) — Datasource type the candidates are drawn from. + - default (object) — A concrete selection of variable values. An empty 'values' array is valid wire input and means unresolved — the server never substitutes a default for it. + - kind (string) (required) — 'values' selects the listed entries, 'all' selects everything (only allowed when 'include_all' is true). [values, all] + - values (array) — Selected values, unique and never '$__all'. Must be empty when 'kind' is 'all'. + - default_datasource_id (integer) — Default datasource ID. Without a usable default the runtime picks the first candidate by name, then ID. + - kind (string) (required) — Variable kind discriminator; always 'datasource', selecting a datasource. [datasource, custom, query] + - label (string) — Optional display label; falls back to 'name'. (≤189 chars) + - name (string) (required) — Variable name used in '{{ }}' templates, at most 64 characters. + - name_patterns (array) — Wildcard patterns narrowing the candidates; empty means every datasource of the type. + - options (array) — Candidate list, 1–1000 entries. Values must be non-empty, unique and must not be '$__all'. + - text (string) (required) — Label shown in the picker. (1-1024 chars) + - value (string) (required) — Value substituted into templates. (1-1024 chars) + - refresh (string) — When the candidates are recomputed: 'on_dashboard_load' = once when the dashboard loads; 'on_time_range_change' = every time the time range changes. [on_dashboard_load, on_time_range_change] + - selection (object) — Selection cardinality for a variable. + - include_all (boolean) (required) — When true the variable also offers an 'all' selection. + - mode (string) (required) — Selection cardinality: 'single' makes the resolved selection hold exactly one value; 'multi' allows multiple values. [single, multi] + - variable_query (object) — Variable query. Pick the arm with 'kind'; the arm must match the referenced datasource type. + - args (object) — Named query arguments; defaults to an empty object. + - expr (string) — SQL statement; may reference other variables through '{{ }}'. + - field (string) — Log field whose values become candidates. (≥1 chars) + - kind (string) (required) — Query kind discriminator; always 'prometheus', a label-values query against Prometheus. [prometheus, sql, logs] + - label (string) — Label whose values become candidates. + - label_filters (array) — Optional matchers narrowing the series before label values are read. + - metric (string) — Optional metric used to restrict the series considered. + - text_field (string) — Column used as the candidate label; defaults to the value column. + - value_field (string) — Column used as the candidate value. (≥1 chars) + - folder_id (integer) (required) — Folder the dashboard sat in at that revision. (min 1) + - message (string) — Optional commit message. (≤1024 chars) + - revision (integer) (required) — Revision number. (min 1) + - schema_version (string) (required) — Wire schema version of 'definition'; only 'dashboard.v1' is accepted. [dashboard.v1] +`, + Args: requireBodyFieldOrExactArg("dashboard_id", "dashboard-id"), + Example: ` flashduty monit dashboard-revisions-get --data '{"dashboard_id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2101","revision":6}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "dashboard_id", "string"); err != nil { + return err + } + if cmd.Flags().Changed("dashboard-id") { + body["dashboard_id"] = fDashboardID + } + if cmd.Flags().Changed("revision") { + body["revision"] = fRevision + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.DashboardRevisionGetRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Dashboards.RevisionReadGet(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fDashboardID, "dashboard-id", "", "Canonical UUIDv7 of the dashboard. (required)") + cmd.Flags().Int64Var(&fRevision, "revision", 0, "Revision number to fetch. (required) (min 1)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genDashboardsRevisionReadListCmd() *cobra.Command { + var dataJSON string + var fDashboardID string + cmd := &cobra.Command{ + Use: "dashboard-revisions-list ", + Short: "List dashboard revisions", + Long: `List dashboard revisions. + +List a dashboard's revision history, newest first. + +API: POST /monit/dashboard/revisions/list (monit-dashboard-revision-read-list) + +Request fields: + --dashboard-id string (required) — Canonical UUIDv7 of the dashboard. + +Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): + - items (array) (required) — Revisions, at most 20. + - actor (object) (required) — Account member recorded as the creator, updater or revision author. + - id (integer) (required) — Member ID. + - name (string) (required) — Member display name. + - created_at (string) (required) — Unix timestamp in seconds. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - dashboard_id (string) (required) — Dashboard ID. + - folder_id (integer) (required) — Folder the dashboard sat in at that revision. (min 1) + - message (string) — Optional commit message; at most 1024 Unicode code points. (≤1024 chars) + - revision (integer) (required) — Revision number. (min 1) +`, + Args: requireBodyFieldOrExactArg("dashboard_id", "dashboard-id"), + Example: ` flashduty monit dashboard-revisions-list --data '{"dashboard_id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2101"}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "dashboard_id", "string"); err != nil { + return err + } + if cmd.Flags().Changed("dashboard-id") { + body["dashboard_id"] = fDashboardID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.DashboardIDRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Dashboards.RevisionReadList(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fDashboardID, "dashboard-id", "", "Canonical UUIDv7 of the dashboard. (required)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genDashboardsTrashReadListCmd() *cobra.Command { + var dataJSON string + var fP int64 + var fLimit int64 + var fSearchAfterCtx string + cmd := &cobra.Command{ + Use: "dashboard-trash-list", + Short: "List trashed dashboards", + Long: `List trashed dashboards. + +List deleted dashboards still inside the 30-day retention window. + +API: POST /monit/dashboard/trash/list (monit-dashboard-trash-read-list) + +Request fields: + --page int — Page number, 1-based. Defaults to 1. (min 1) + --limit int — Page size, 1–100. Defaults to 20. (1-100) + --search-after-ctx string + sort (array, via --data) — Sort keys; only 'title' and 'deleted_at' are accepted here. + - direction (string) (required) — Sort direction: 'asc' = ascending; 'desc' = descending. [asc, desc] + - field (string) (required) — 'title' is available everywhere; 'updated_at' only on list/search, 'deleted_at' only on the trash listing. [title, updated_at, deleted_at] + +Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): + - items (array) (required) — Deleted dashboards in this page. + - dashboard_id (string) (required) — Dashboard ID. + - deleted_at (string) (required) — Unix timestamp in seconds. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - deleted_by (object) (required) — Account member recorded as the creator, updater or revision author. + - id (integer) (required) — Member ID. + - name (string) (required) — Member display name. + - description (string) — Dashboard description; empty when unset. + - folder_breadcrumb (array) (required) — Folder path from the root. + - folder_id (integer) (required) — Folder the dashboard sat in when deleted. (min 1) + - revision (integer) (required) — Revision the dashboard had when deleted. (min 1) + - title (string) (required) — Dashboard title. + - total (integer) (required) — Total number of deleted dashboards. +`, + Example: ` flashduty monit dashboard-trash-list --data '{"limit":20,"p":1,"sort":[{"direction":"desc","field":"deleted_at"}]}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if cmd.Flags().Changed("page") { + body["p"] = fP + } + if cmd.Flags().Changed("limit") { + body["limit"] = fLimit + } + if cmd.Flags().Changed("search-after-ctx") { + body["search_after_ctx"] = fSearchAfterCtx + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.DashboardTrashListRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Dashboards.TrashReadList(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().Int64Var(&fP, "page", 0, "Page number, 1-based. Defaults to 1. (min 1)") + cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size, 1–100. Defaults to 20. (1-100)") + cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genDashboardsVariableReadPreviewCmd() *cobra.Command { + var dataJSON string + cmd := &cobra.Command{ + Use: "dashboard-runtime-variables-preview", + Short: "Preview draft variables", + Long: `Preview draft variables. + +Resolve a draft variable set that is not stored in any dashboard. + +API: POST /monit/dashboard/runtime/variables/preview (monit-dashboard-variable-read-preview) + +Request fields: + context (object, via --data) (required) — Where an unsaved draft panel or variable set belongs. 'existing' targets a stored dashboard, 'new' a folder that does not contain one yet — the two are mutually exclusive. + - dashboard_id (string) — Required for 'existing', forbidden for 'new'. + - folder_id (integer) — Required for 'new', forbidden for 'existing'. (min 1) + - kind (string) (required) — Draft context kind: 'existing' = targets a stored dashboard ('dashboard_id' required); 'new' = a folder that does not contain one yet ('folder_id' required). [existing, new] + selections (object, via --data) (required) — Selections keyed by variable name, at most 20 entries. + time (object, via --data) (required) — Absolute evaluation window. Both bounds are Unix timestamps in milliseconds, 'from_ms' must be less than 'to_ms', and neither may exceed the JavaScript safe integer limit. + - from_ms (integer) (required) — Unix timestamp in milliseconds. (min 0) + - to_ms (integer) (required) — Unix timestamp in milliseconds. (min 1) + variables (array, via --data) (required) — Draft variables, at most 20. + - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time. + - datasource_id (integer) — Datasource ID. Required when 'kind' is 'fixed', forbidden when 'kind' is 'variable'. (min 1) + - datasource_type (string) (required) — Datasource type identifier, e.g. 'prometheus' or 'victorialogs'. + - kind (string) (required) — 'fixed' uses 'datasource_id'; 'variable' resolves 'name' against a datasource variable. [fixed, variable] + - name (string) — Datasource variable name. Required when 'kind' is 'variable', forbidden when 'kind' is 'fixed'. + - datasource_type (string) — Datasource type the candidates are drawn from. + - default (object) — A concrete selection of variable values. An empty 'values' array is valid wire input and means unresolved — the server never substitutes a default for it. + - kind (string) (required) — 'values' selects the listed entries, 'all' selects everything (only allowed when 'include_all' is true). [values, all] + - values (array) — Selected values, unique and never '$__all'. Must be empty when 'kind' is 'all'. + - default_datasource_id (integer) — Default datasource ID. Without a usable default the runtime picks the first candidate by name, then ID. + - kind (string) (required) — Variable kind discriminator; always 'datasource', selecting a datasource. [datasource, custom, query] + - label (string) — Optional display label; falls back to 'name'. (≤189 chars) + - name (string) (required) — Variable name used in '{{ }}' templates, at most 64 characters. + - name_patterns (array) — Wildcard patterns narrowing the candidates; empty means every datasource of the type. + - options (array) — Candidate list, 1–1000 entries. Values must be non-empty, unique and must not be '$__all'. + - text (string) (required) — Label shown in the picker. (1-1024 chars) + - value (string) (required) — Value substituted into templates. (1-1024 chars) + - refresh (string) — When the candidates are recomputed: 'on_dashboard_load' = once when the dashboard loads; 'on_time_range_change' = every time the time range changes. [on_dashboard_load, on_time_range_change] + - selection (object) — Selection cardinality for a variable. + - include_all (boolean) (required) — When true the variable also offers an 'all' selection. + - mode (string) (required) — Selection cardinality: 'single' makes the resolved selection hold exactly one value; 'multi' allows multiple values. [single, multi] + - variable_query (object) — Variable query. Pick the arm with 'kind'; the arm must match the referenced datasource type. + - args (object) — Named query arguments; defaults to an empty object. + - expr (string) — SQL statement; may reference other variables through '{{ }}'. + - field (string) — Log field whose values become candidates. (≥1 chars) + - kind (string) (required) — Query kind discriminator; always 'prometheus', a label-values query against Prometheus. [prometheus, sql, logs] + - label (string) — Label whose values become candidates. + - label_filters (array) — Optional matchers narrowing the series before label values are read. + - label (string) (required) — Label name. + - op (string) (required) — Matcher operator: '=' = equals; '!=' = not equals; '=~' = regex match; '!~' = regex does-not-match. [=, !=, =~, !~] + - value (string) (required) — Matcher value; may reference other variables through '{{ }}'. (≥1 chars) + - metric (string) — Optional metric used to restrict the series considered. + - text_field (string) — Column used as the candidate label; defaults to the value column. + - value_field (string) — Column used as the candidate value. (≥1 chars) + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - selections (object) (required) — Effective selections keyed by variable name. + - variables (array) (required) — Resolved variables. + - candidates (array) (required) — Resolved candidates, at most 1000. + - text (string) (required) — Label shown in the picker. (1-1024 chars) + - value (string) (required) — Value substituted into templates. (1-1024 chars) + - datasource (object) — The datasource a runtime query was bound to. + - id (integer) (required) — Datasource ID. (min 1) + - name (string) (required) — Datasource name. + - type (string) (required) — Datasource type identifier. + - error (object) — Per-variable or per-query failure. A failed arm does not fail the whole call. + - message (string) (required) — Human-readable detail for the failure. + - reason (string) (required) — Machine-readable failure reason. Observed values include 'invalid_request', 'variable_invalid', 'panel_missing', 'field_missing', 'datasource_permission_denied', 'timeout', 'panel_deadline', 'panel_canceled', 'canceled', 'overloaded', 'source_too_large', 'edge_unavailable', 'edge_upgrade_required', 'edge_version_unknown', 'mixed_edge_versions' and 'internal'. + - kind (string) (required) — Variable kind: 'datasource' = selects a datasource; 'custom' = fixed inline list; 'query' = resolved by running a query. [datasource, custom, query] + - name (string) (required) — Variable name. + - selection (object) — A concrete selection of variable values. An empty 'values' array is valid wire input and means unresolved — the server never substitutes a default for it. + - kind (string) (required) — 'values' selects the listed entries, 'all' selects everything (only allowed when 'include_all' is true). [values, all] + - values (array) — Selected values, unique and never '$__all'. Must be empty when 'kind' is 'all'. +`, + Example: ` flashduty monit dashboard-runtime-variables-preview --data '{"context":{"folder_id":12,"kind":"new"},"selections":{"env":{"kind":"values","values":["prod"]}},"time":{"from_ms":1791100800000,"to_ms":1791104400000},"variables":[{"default":{"kind":"values","values":["prod"]},"kind":"custom","label":"Environment","name":"env","options":[{"text":"Production","value":"prod"},{"text":"Staging","value":"staging"}],"selection":{"include_all":false,"mode":"single"}}]}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + return nil + }) + if err != nil { + return err + } + req := new(flashduty.DashboardVariablesPreviewRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Dashboards.VariableReadPreview(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genDashboardsVariableReadResolveCmd() *cobra.Command { + var dataJSON string + var fDashboardID string + cmd := &cobra.Command{ + Use: "dashboard-runtime-variables-resolve ", + Short: "Resolve dashboard variables", + Long: `Resolve dashboard variables. + +Resolve every variable of a stored dashboard for a time range. + +API: POST /monit/dashboard/runtime/variables/resolve (monit-dashboard-variable-read-resolve) + +Request fields: + --dashboard-id string (required) — Canonical UUIDv7 of the dashboard. + time (object, via --data) (required) — Absolute evaluation window. Both bounds are Unix timestamps in milliseconds, 'from_ms' must be less than 'to_ms', and neither may exceed the JavaScript safe integer limit. + - from_ms (integer) (required) — Unix timestamp in milliseconds. (min 0) + - to_ms (integer) (required) — Unix timestamp in milliseconds. (min 1) + variables (object, via --data) (required) — Selections already made, keyed by variable name, at most 20 entries. Variables omitted here fall back to their stored defaults. + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - dashboard_id (string) (required) — Dashboard ID. + - revision (integer) (required) — Revision the resolution ran against. (min 1) + - selections (object) (required) — Effective selections keyed by variable name; only variables that resolved successfully appear. + - variables (array) (required) — Resolved variables, in definition order. + - candidates (array) (required) — Resolved candidates, at most 1000. + - text (string) (required) — Label shown in the picker. (1-1024 chars) + - value (string) (required) — Value substituted into templates. (1-1024 chars) + - datasource (object) — The datasource a runtime query was bound to. + - id (integer) (required) — Datasource ID. (min 1) + - name (string) (required) — Datasource name. + - type (string) (required) — Datasource type identifier. + - error (object) — Per-variable or per-query failure. A failed arm does not fail the whole call. + - message (string) (required) — Human-readable detail for the failure. + - reason (string) (required) — Machine-readable failure reason. Observed values include 'invalid_request', 'variable_invalid', 'panel_missing', 'field_missing', 'datasource_permission_denied', 'timeout', 'panel_deadline', 'panel_canceled', 'canceled', 'overloaded', 'source_too_large', 'edge_unavailable', 'edge_upgrade_required', 'edge_version_unknown', 'mixed_edge_versions' and 'internal'. + - kind (string) (required) — Variable kind: 'datasource' = selects a datasource; 'custom' = fixed inline list; 'query' = resolved by running a query. [datasource, custom, query] + - name (string) (required) — Variable name. + - selection (object) — A concrete selection of variable values. An empty 'values' array is valid wire input and means unresolved — the server never substitutes a default for it. + - kind (string) (required) — 'values' selects the listed entries, 'all' selects everything (only allowed when 'include_all' is true). [values, all] + - values (array) — Selected values, unique and never '$__all'. Must be empty when 'kind' is 'all'. +`, + Args: requireBodyFieldOrExactArg("dashboard_id", "dashboard-id"), + Example: ` flashduty monit dashboard-runtime-variables-resolve --data '{"dashboard_id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2101","time":{"from_ms":1791100800000,"to_ms":1791104400000},"variables":{"env":{"kind":"values","values":["prod"]}}}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "dashboard_id", "string"); err != nil { + return err + } + if cmd.Flags().Changed("dashboard-id") { + body["dashboard_id"] = fDashboardID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.DashboardVariablesResolveRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Dashboards.VariableReadResolve(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fDashboardID, "dashboard-id", "", "Canonical UUIDv7 of the dashboard. (required)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genDashboardsWriteCreateCmd() *cobra.Command { + var dataJSON string + var fDashboardID string + var fFolderID int64 + var fSchemaVersion string + cmd := &cobra.Command{ + Use: "dashboard-create", + Short: "Create dashboard", + Long: `Create dashboard. + +Create a dashboard from a full definition. + +API: POST /monit/dashboard/create (monit-dashboard-write-create) + +Request fields: + --dashboard-id string (required) — Canonical UUIDv7 of the dashboard. + --folder-id int (required) — Folder the dashboard is created in. Must be a folder the caller can write. (min 1) + --schema-version string (required) — Wire schema version; only 'dashboard.v1' is accepted. [dashboard.v1] + definition (object, via --data) (required) — Complete dashboard payload stored as a portable 'dashboard.v1' document. Unknown keys, duplicate keys, NaN/Inf, over-range numbers and trailing values are rejected; the serialized form must stay within 1 MiB. + - default_time_range (object) (required) — Relative time window. 'from' is one of the fixed presets the validator accepts; 'to' is always the literal string 'now'. + - from (string) (required) — Start offset relative to 'to': 'now-15m' = 15 minutes ago; 'now-30m' = 30 minutes ago; 'now-1h' = 1 hour ago; 'now-3h' = 3 hours ago; 'now-6h' = 6 hours ago; 'now-12h' = 12 hours ago; 'now-24h' = 24 hours ago; 'now-7d' = 7 days ago. [now-15m, now-30m, now-1h, now-3h, now-6h, now-12h, now-24h, now-7d] + - to (string) (required) — End of the window; only 'now' is accepted. [now] + - description (string) — Optional description, at most 1024 Unicode code points. (≤1024 chars) + - refresh_interval (string) (required) — Auto-refresh cadence applied by the console: 'off' disables auto-refresh; '30s' = every 30 seconds; '1m' = every minute; '5m' = every 5 minutes. [off, 30s, 1m, 5m] + - tabs (array) (required) — Tabs, 1–10. Every tab title is unique and every tab or section ID must be a canonical UUIDv7 used only once across the definition. + - description (string) — Optional tab description. (≤1024 chars) + - id (string) (required) — Canonical UUIDv7 identifying the tab; unique across the definition. + - sections (array) (required) — Sections on the tab, at most 10. + - collapsed (boolean) (required) — Whether the section renders collapsed by default. + - description (string) — Optional section description. (≤1024 chars) + - id (string) (required) — Canonical UUIDv7 identifying the section; unique across the definition. + - panels (array) (required) — Panels in the section, at most 30. + - title (string) (required) — Section title. (1-189 chars) + - title (string) (required) — Tab title, 1–189 Unicode code points. Unique among tabs. (1-189 chars) + - top_panels (array) (required) — Panels placed directly on the tab, at most 30. + - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time. + - description (string) — Optional panel description. (≤1024 chars) + - grid (object) (required) — 24-column grid placement. 'x' and 'y' are zero-based; 'x + w' must not exceed 24. + - id (string) (required) — Canonical UUIDv7 identifying the panel; unique across the definition. + - queries (array) (required) — Queries in the panel. 'time_series' accepts 1–26, 'text' accepts none, every other kind accepts exactly one. + - title (string) (required) — Panel title. (1-189 chars) + - viz_config (object) (required) — Visualization configuration. 'kind' selects the arm and therefore which sibling config object is required; 'time_series' also carries the shared numeric options. + - title (string) (required) — Dashboard title, 1–189 Unicode code points after trimming. (1-189 chars) + - variables (array) (required) — Dashboard variables, at most 20. Names must be unique within the definition and match the variable-name pattern. + - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time. + - datasource_id (integer) — Datasource ID. Required when 'kind' is 'fixed', forbidden when 'kind' is 'variable'. (min 1) + - datasource_type (string) (required) — Datasource type identifier, e.g. 'prometheus' or 'victorialogs'. + - kind (string) (required) — 'fixed' uses 'datasource_id'; 'variable' resolves 'name' against a datasource variable. [fixed, variable] + - name (string) — Datasource variable name. Required when 'kind' is 'variable', forbidden when 'kind' is 'fixed'. + - datasource_type (string) — Datasource type the candidates are drawn from. + - default (object) — A concrete selection of variable values. An empty 'values' array is valid wire input and means unresolved — the server never substitutes a default for it. + - kind (string) (required) — 'values' selects the listed entries, 'all' selects everything (only allowed when 'include_all' is true). [values, all] + - values (array) — Selected values, unique and never '$__all'. Must be empty when 'kind' is 'all'. + - default_datasource_id (integer) — Default datasource ID. Without a usable default the runtime picks the first candidate by name, then ID. + - kind (string) (required) — Variable kind discriminator; always 'datasource', selecting a datasource. [datasource, custom, query] + - label (string) — Optional display label; falls back to 'name'. (≤189 chars) + - name (string) (required) — Variable name used in '{{ }}' templates, at most 64 characters. + - name_patterns (array) — Wildcard patterns narrowing the candidates; empty means every datasource of the type. + - options (array) — Candidate list, 1–1000 entries. Values must be non-empty, unique and must not be '$__all'. + - text (string) (required) — Label shown in the picker. (1-1024 chars) + - value (string) (required) — Value substituted into templates. (1-1024 chars) + - refresh (string) — When the candidates are recomputed: 'on_dashboard_load' = once when the dashboard loads; 'on_time_range_change' = every time the time range changes. [on_dashboard_load, on_time_range_change] + - selection (object) — Selection cardinality for a variable. + - include_all (boolean) (required) — When true the variable also offers an 'all' selection. + - mode (string) (required) — Selection cardinality: 'single' makes the resolved selection hold exactly one value; 'multi' allows multiple values. [single, multi] + - variable_query (object) — Variable query. Pick the arm with 'kind'; the arm must match the referenced datasource type. + - args (object) — Named query arguments; defaults to an empty object. + - expr (string) — SQL statement; may reference other variables through '{{ }}'. + - field (string) — Log field whose values become candidates. (≥1 chars) + - kind (string) (required) — Query kind discriminator; always 'prometheus', a label-values query against Prometheus. [prometheus, sql, logs] + - label (string) — Label whose values become candidates. + - label_filters (array) — Optional matchers narrowing the series before label values are read. + - metric (string) — Optional metric used to restrict the series considered. + - text_field (string) — Column used as the candidate label; defaults to the value column. + - value_field (string) — Column used as the candidate value. (≥1 chars) + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - created_at (string) (required) — Unix timestamp in seconds. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - created_by (object) (required) — Account member recorded as the creator, updater or revision author. + - id (integer) (required) — Member ID. + - name (string) (required) — Member display name. + - dashboard_id (string) (required) — Canonical UUIDv7 assigned by the caller at creation time. + - definition (object) (required) — Complete dashboard payload stored as a portable 'dashboard.v1' document. Unknown keys, duplicate keys, NaN/Inf, over-range numbers and trailing values are rejected; the serialized form must stay within 1 MiB. + - default_time_range (object) (required) — Relative time window. 'from' is one of the fixed presets the validator accepts; 'to' is always the literal string 'now'. + - from (string) (required) — Start offset relative to 'to': 'now-15m' = 15 minutes ago; 'now-30m' = 30 minutes ago; 'now-1h' = 1 hour ago; 'now-3h' = 3 hours ago; 'now-6h' = 6 hours ago; 'now-12h' = 12 hours ago; 'now-24h' = 24 hours ago; 'now-7d' = 7 days ago. [now-15m, now-30m, now-1h, now-3h, now-6h, now-12h, now-24h, now-7d] + - to (string) (required) — End of the window; only 'now' is accepted. [now] + - description (string) — Optional description, at most 1024 Unicode code points. (≤1024 chars) + - refresh_interval (string) (required) — Auto-refresh cadence applied by the console: 'off' disables auto-refresh; '30s' = every 30 seconds; '1m' = every minute; '5m' = every 5 minutes. [off, 30s, 1m, 5m] + - tabs (array) (required) — Tabs, 1–10. Every tab title is unique and every tab or section ID must be a canonical UUIDv7 used only once across the definition. + - description (string) — Optional tab description. (≤1024 chars) + - id (string) (required) — Canonical UUIDv7 identifying the tab; unique across the definition. + - sections (array) (required) — Sections on the tab, at most 10. + - collapsed (boolean) (required) — Whether the section renders collapsed by default. + - description (string) — Optional section description. (≤1024 chars) + - id (string) (required) — Canonical UUIDv7 identifying the section; unique across the definition. + - panels (array) (required) — Panels in the section, at most 30. + - title (string) (required) — Section title. (1-189 chars) + - title (string) (required) — Tab title, 1–189 Unicode code points. Unique among tabs. (1-189 chars) + - top_panels (array) (required) — Panels placed directly on the tab, at most 30. + - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time. + - description (string) — Optional panel description. (≤1024 chars) + - grid (object) (required) — 24-column grid placement. 'x' and 'y' are zero-based; 'x + w' must not exceed 24. + - id (string) (required) — Canonical UUIDv7 identifying the panel; unique across the definition. + - queries (array) (required) — Queries in the panel. 'time_series' accepts 1–26, 'text' accepts none, every other kind accepts exactly one. + - title (string) (required) — Panel title. (1-189 chars) + - viz_config (object) (required) — Visualization configuration. 'kind' selects the arm and therefore which sibling config object is required; 'time_series' also carries the shared numeric options. + - title (string) (required) — Dashboard title, 1–189 Unicode code points after trimming. (1-189 chars) + - variables (array) (required) — Dashboard variables, at most 20. Names must be unique within the definition and match the variable-name pattern. + - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time. + - datasource_id (integer) — Datasource ID. Required when 'kind' is 'fixed', forbidden when 'kind' is 'variable'. (min 1) + - datasource_type (string) (required) — Datasource type identifier, e.g. 'prometheus' or 'victorialogs'. + - kind (string) (required) — 'fixed' uses 'datasource_id'; 'variable' resolves 'name' against a datasource variable. [fixed, variable] + - name (string) — Datasource variable name. Required when 'kind' is 'variable', forbidden when 'kind' is 'fixed'. + - datasource_type (string) — Datasource type the candidates are drawn from. + - default (object) — A concrete selection of variable values. An empty 'values' array is valid wire input and means unresolved — the server never substitutes a default for it. + - kind (string) (required) — 'values' selects the listed entries, 'all' selects everything (only allowed when 'include_all' is true). [values, all] + - values (array) — Selected values, unique and never '$__all'. Must be empty when 'kind' is 'all'. + - default_datasource_id (integer) — Default datasource ID. Without a usable default the runtime picks the first candidate by name, then ID. + - kind (string) (required) — Variable kind discriminator; always 'datasource', selecting a datasource. [datasource, custom, query] + - label (string) — Optional display label; falls back to 'name'. (≤189 chars) + - name (string) (required) — Variable name used in '{{ }}' templates, at most 64 characters. + - name_patterns (array) — Wildcard patterns narrowing the candidates; empty means every datasource of the type. + - options (array) — Candidate list, 1–1000 entries. Values must be non-empty, unique and must not be '$__all'. + - text (string) (required) — Label shown in the picker. (1-1024 chars) + - value (string) (required) — Value substituted into templates. (1-1024 chars) + - refresh (string) — When the candidates are recomputed: 'on_dashboard_load' = once when the dashboard loads; 'on_time_range_change' = every time the time range changes. [on_dashboard_load, on_time_range_change] + - selection (object) — Selection cardinality for a variable. + - include_all (boolean) (required) — When true the variable also offers an 'all' selection. + - mode (string) (required) — Selection cardinality: 'single' makes the resolved selection hold exactly one value; 'multi' allows multiple values. [single, multi] + - variable_query (object) — Variable query. Pick the arm with 'kind'; the arm must match the referenced datasource type. + - args (object) — Named query arguments; defaults to an empty object. + - expr (string) — SQL statement; may reference other variables through '{{ }}'. + - field (string) — Log field whose values become candidates. (≥1 chars) + - kind (string) (required) — Query kind discriminator; always 'prometheus', a label-values query against Prometheus. [prometheus, sql, logs] + - label (string) — Label whose values become candidates. + - label_filters (array) — Optional matchers narrowing the series before label values are read. + - metric (string) — Optional metric used to restrict the series considered. + - text_field (string) — Column used as the candidate label; defaults to the value column. + - value_field (string) — Column used as the candidate value. (≥1 chars) + - folder_breadcrumb (array) (required) — Folder names from the root down to 'folder_id'. + - folder_id (integer) (required) — ID of the dashboard's folder. (min 1) + - revision (integer) (required) — Current revision number. (min 1) + - schema_version (string) (required) — Wire schema version of 'definition'; only 'dashboard.v1' is accepted. [dashboard.v1] + - updated_at (string) (required) — Unix timestamp in seconds. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - updated_by (object) (required) — Account member recorded as the creator, updater or revision author. + - id (integer) (required) — Member ID. + - name (string) (required) — Member display name. +`, + Example: ` flashduty monit dashboard-create --data '{"dashboard_id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2101","definition":{"default_time_range":{"from":"now-1h","to":"now"},"description":"Traffic, errors and dependencies for the checkout service.","refresh_interval":"1m","tabs":[{"description":"Golden signals.","id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2202","sections":[{"collapsed":false,"description":"Request rate and latency.","id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2303","panels":[{"datasource_ref":{"datasource_id":10,"datasource_type":"prometheus","kind":"fixed"},"grid":{"h":8,"w":12,"x":0,"y":0},"id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2404","queries":[{"legend_alias":"{{env}} requests","query":{"args":{},"expr":"sum(rate(http_requests_total{env=\"{{env}}\"}[5m]))","min_step_seconds":30,"mode":"range"},"ref_id":"A"}],"title":"Request rate","viz_config":{"decimals":2,"kind":"time_series","options":{},"threshold":{"critical":2000,"mode":"higher_is_worse","warning":1000},"unit":"count_per_second"}}],"title":"Traffic"}],"title":"Overview","top_panels":[]}],"title":"Checkout service overview","variables":[{"default":{"kind":"values","values":["prod"]},"kind":"custom","label":"Environment","name":"env","options":[{"text":"Production","value":"prod"},{"text":"Staging","value":"staging"}],"selection":{"include_all":false,"mode":"single"}}]},"folder_id":12,"schema_version":"dashboard.v1"}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if cmd.Flags().Changed("dashboard-id") { + body["dashboard_id"] = fDashboardID + } + if cmd.Flags().Changed("folder-id") { + body["folder_id"] = fFolderID + } + if cmd.Flags().Changed("schema-version") { + body["schema_version"] = fSchemaVersion + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.DashboardCreateRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Dashboards.WriteCreate(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fDashboardID, "dashboard-id", "", "Canonical UUIDv7 of the dashboard. (required)") + cmd.Flags().Int64Var(&fFolderID, "folder-id", 0, "Folder the dashboard is created in. Must be a folder the caller can write. (required) (min 1)") + cmd.Flags().StringVar(&fSchemaVersion, "schema-version", "", "Wire schema version; only 'dashboard.v1' is accepted. (required) [dashboard.v1]") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genDashboardsWriteDeleteCmd() *cobra.Command { + var dataJSON string + var fDashboardID string + var fExpectedRevision int64 + cmd := &cobra.Command{ + Use: "dashboard-delete ", + Short: "Delete dashboard", + Long: `Delete dashboard. + +Move a dashboard to the trash. + +API: POST /monit/dashboard/delete (monit-dashboard-write-delete) + +Request fields: + --dashboard-id string (required) — Canonical UUIDv7 of the dashboard. + --expected-revision int (required) — Revision the caller last read. The write fails with 'DashboardRevisionConflict' unless it still matches the stored revision. (min 1) + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - dashboard_id (string) (required) — Dashboard ID. + - revision (integer) (required) — Revision recorded for the deletion. (min 1) +`, + Args: requireBodyFieldOrExactArg("dashboard_id", "dashboard-id"), + Example: ` flashduty monit dashboard-delete --data '{"dashboard_id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2101","expected_revision":7}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "dashboard_id", "string"); err != nil { + return err + } + if cmd.Flags().Changed("dashboard-id") { + body["dashboard_id"] = fDashboardID + } + if cmd.Flags().Changed("expected-revision") { + body["expected_revision"] = fExpectedRevision + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.DashboardDeleteRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Dashboards.WriteDelete(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fDashboardID, "dashboard-id", "", "Canonical UUIDv7 of the dashboard. (required)") + cmd.Flags().Int64Var(&fExpectedRevision, "expected-revision", 0, "Revision the caller last read. The write fails with 'DashboardRevisionConflict' unless it still matches the stored revision. (required) (min 1)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genDashboardsWriteMoveCmd() *cobra.Command { + var dataJSON string + var fDashboardID string + var fExpectedRevision int64 + var fFolderID int64 + cmd := &cobra.Command{ + Use: "dashboard-move", + Short: "Move dashboard", + Long: `Move dashboard. + +Move a dashboard to another folder without changing its definition. + +API: POST /monit/dashboard/move (monit-dashboard-write-move) + +Request fields: + --dashboard-id string (required) — Canonical UUIDv7 of the dashboard. + --expected-revision int (required) — Revision the caller last read. The write fails with 'DashboardRevisionConflict' unless it still matches the stored revision. (min 1) + --folder-id int (required) — Destination folder ID. (min 1) + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - changed (boolean) (required) — Whether the stored dashboard actually changed. + - resource (object) (required) — A stored dashboard: its identity, revision counter, placement and full definition. 'revision' increments on every accepted write and must be echoed back as 'expected_revision' for the next mutation. + - created_at (string) (required) — Unix timestamp in seconds. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - created_by (object) (required) — Account member recorded as the creator, updater or revision author. + - id (integer) (required) — Member ID. + - name (string) (required) — Member display name. + - dashboard_id (string) (required) — Canonical UUIDv7 assigned by the caller at creation time. + - definition (object) (required) — Complete dashboard payload stored as a portable 'dashboard.v1' document. Unknown keys, duplicate keys, NaN/Inf, over-range numbers and trailing values are rejected; the serialized form must stay within 1 MiB. + - default_time_range (object) (required) — Relative time window. 'from' is one of the fixed presets the validator accepts; 'to' is always the literal string 'now'. + - from (string) (required) — Start offset relative to 'to': 'now-15m' = 15 minutes ago; 'now-30m' = 30 minutes ago; 'now-1h' = 1 hour ago; 'now-3h' = 3 hours ago; 'now-6h' = 6 hours ago; 'now-12h' = 12 hours ago; 'now-24h' = 24 hours ago; 'now-7d' = 7 days ago. [now-15m, now-30m, now-1h, now-3h, now-6h, now-12h, now-24h, now-7d] + - to (string) (required) — End of the window; only 'now' is accepted. [now] + - description (string) — Optional description, at most 1024 Unicode code points. (≤1024 chars) + - refresh_interval (string) (required) — Auto-refresh cadence applied by the console: 'off' disables auto-refresh; '30s' = every 30 seconds; '1m' = every minute; '5m' = every 5 minutes. [off, 30s, 1m, 5m] + - tabs (array) (required) — Tabs, 1–10. Every tab title is unique and every tab or section ID must be a canonical UUIDv7 used only once across the definition. + - description (string) — Optional tab description. (≤1024 chars) + - id (string) (required) — Canonical UUIDv7 identifying the tab; unique across the definition. + - sections (array) (required) — Sections on the tab, at most 10. + - title (string) (required) — Tab title, 1–189 Unicode code points. Unique among tabs. (1-189 chars) + - top_panels (array) (required) — Panels placed directly on the tab, at most 30. + - title (string) (required) — Dashboard title, 1–189 Unicode code points after trimming. (1-189 chars) + - variables (array) (required) — Dashboard variables, at most 20. Names must be unique within the definition and match the variable-name pattern. + - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time. + - datasource_type (string) — Datasource type the candidates are drawn from. + - default (object) — A concrete selection of variable values. An empty 'values' array is valid wire input and means unresolved — the server never substitutes a default for it. + - default_datasource_id (integer) — Default datasource ID. Without a usable default the runtime picks the first candidate by name, then ID. + - kind (string) (required) — Variable kind discriminator; always 'datasource', selecting a datasource. [datasource, custom, query] + - label (string) — Optional display label; falls back to 'name'. (≤189 chars) + - name (string) (required) — Variable name used in '{{ }}' templates, at most 64 characters. + - name_patterns (array) — Wildcard patterns narrowing the candidates; empty means every datasource of the type. + - options (array) — Candidate list, 1–1000 entries. Values must be non-empty, unique and must not be '$__all'. + - refresh (string) — When the candidates are recomputed: 'on_dashboard_load' = once when the dashboard loads; 'on_time_range_change' = every time the time range changes. [on_dashboard_load, on_time_range_change] + - selection (object) — Selection cardinality for a variable. + - variable_query (object) — Variable query. Pick the arm with 'kind'; the arm must match the referenced datasource type. + - folder_breadcrumb (array) (required) — Folder names from the root down to 'folder_id'. + - folder_id (integer) (required) — ID of the dashboard's folder. (min 1) + - revision (integer) (required) — Current revision number. (min 1) + - schema_version (string) (required) — Wire schema version of 'definition'; only 'dashboard.v1' is accepted. [dashboard.v1] + - updated_at (string) (required) — Unix timestamp in seconds. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - updated_by (object) (required) — Account member recorded as the creator, updater or revision author. + - id (integer) (required) — Member ID. + - name (string) (required) — Member display name. +`, + Example: ` flashduty monit dashboard-move --data '{"dashboard_id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2101","expected_revision":7,"folder_id":15}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if cmd.Flags().Changed("dashboard-id") { + body["dashboard_id"] = fDashboardID + } + if cmd.Flags().Changed("expected-revision") { + body["expected_revision"] = fExpectedRevision + } + if cmd.Flags().Changed("folder-id") { + body["folder_id"] = fFolderID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.DashboardMoveRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Dashboards.WriteMove(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fDashboardID, "dashboard-id", "", "Canonical UUIDv7 of the dashboard. (required)") + cmd.Flags().Int64Var(&fExpectedRevision, "expected-revision", 0, "Revision the caller last read. The write fails with 'DashboardRevisionConflict' unless it still matches the stored revision. (required) (min 1)") + cmd.Flags().Int64Var(&fFolderID, "folder-id", 0, "Destination folder ID. (required) (min 1)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genDashboardsWriteRestoreCmd() *cobra.Command { + var dataJSON string + var fDashboardID string + var fExpectedRevision int64 + var fFolderID int64 + cmd := &cobra.Command{ + Use: "dashboard-restore ", + Short: "Restore dashboard", + Long: `Restore dashboard. + +Bring a trashed dashboard back, optionally into a different folder. + +API: POST /monit/dashboard/restore (monit-dashboard-write-restore) + +Request fields: + --dashboard-id string (required) — Canonical UUIDv7 of the dashboard. + --expected-revision int (required) — Revision the caller last read. The write fails with 'DashboardRevisionConflict' unless it still matches the stored revision. (min 1) + --folder-id int — Destination folder. Omit to restore to the original folder; when the original folder is no longer writable the call fails with 'RestoreFolderRequired' and you must pass one. (min 1) + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - created_at (string) (required) — Unix timestamp in seconds. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - created_by (object) (required) — Account member recorded as the creator, updater or revision author. + - id (integer) (required) — Member ID. + - name (string) (required) — Member display name. + - dashboard_id (string) (required) — Canonical UUIDv7 assigned by the caller at creation time. + - definition (object) (required) — Complete dashboard payload stored as a portable 'dashboard.v1' document. Unknown keys, duplicate keys, NaN/Inf, over-range numbers and trailing values are rejected; the serialized form must stay within 1 MiB. + - default_time_range (object) (required) — Relative time window. 'from' is one of the fixed presets the validator accepts; 'to' is always the literal string 'now'. + - from (string) (required) — Start offset relative to 'to': 'now-15m' = 15 minutes ago; 'now-30m' = 30 minutes ago; 'now-1h' = 1 hour ago; 'now-3h' = 3 hours ago; 'now-6h' = 6 hours ago; 'now-12h' = 12 hours ago; 'now-24h' = 24 hours ago; 'now-7d' = 7 days ago. [now-15m, now-30m, now-1h, now-3h, now-6h, now-12h, now-24h, now-7d] + - to (string) (required) — End of the window; only 'now' is accepted. [now] + - description (string) — Optional description, at most 1024 Unicode code points. (≤1024 chars) + - refresh_interval (string) (required) — Auto-refresh cadence applied by the console: 'off' disables auto-refresh; '30s' = every 30 seconds; '1m' = every minute; '5m' = every 5 minutes. [off, 30s, 1m, 5m] + - tabs (array) (required) — Tabs, 1–10. Every tab title is unique and every tab or section ID must be a canonical UUIDv7 used only once across the definition. + - description (string) — Optional tab description. (≤1024 chars) + - id (string) (required) — Canonical UUIDv7 identifying the tab; unique across the definition. + - sections (array) (required) — Sections on the tab, at most 10. + - collapsed (boolean) (required) — Whether the section renders collapsed by default. + - description (string) — Optional section description. (≤1024 chars) + - id (string) (required) — Canonical UUIDv7 identifying the section; unique across the definition. + - panels (array) (required) — Panels in the section, at most 30. + - title (string) (required) — Section title. (1-189 chars) + - title (string) (required) — Tab title, 1–189 Unicode code points. Unique among tabs. (1-189 chars) + - top_panels (array) (required) — Panels placed directly on the tab, at most 30. + - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time. + - description (string) — Optional panel description. (≤1024 chars) + - grid (object) (required) — 24-column grid placement. 'x' and 'y' are zero-based; 'x + w' must not exceed 24. + - id (string) (required) — Canonical UUIDv7 identifying the panel; unique across the definition. + - queries (array) (required) — Queries in the panel. 'time_series' accepts 1–26, 'text' accepts none, every other kind accepts exactly one. + - title (string) (required) — Panel title. (1-189 chars) + - viz_config (object) (required) — Visualization configuration. 'kind' selects the arm and therefore which sibling config object is required; 'time_series' also carries the shared numeric options. + - title (string) (required) — Dashboard title, 1–189 Unicode code points after trimming. (1-189 chars) + - variables (array) (required) — Dashboard variables, at most 20. Names must be unique within the definition and match the variable-name pattern. + - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time. + - datasource_id (integer) — Datasource ID. Required when 'kind' is 'fixed', forbidden when 'kind' is 'variable'. (min 1) + - datasource_type (string) (required) — Datasource type identifier, e.g. 'prometheus' or 'victorialogs'. + - kind (string) (required) — 'fixed' uses 'datasource_id'; 'variable' resolves 'name' against a datasource variable. [fixed, variable] + - name (string) — Datasource variable name. Required when 'kind' is 'variable', forbidden when 'kind' is 'fixed'. + - datasource_type (string) — Datasource type the candidates are drawn from. + - default (object) — A concrete selection of variable values. An empty 'values' array is valid wire input and means unresolved — the server never substitutes a default for it. + - kind (string) (required) — 'values' selects the listed entries, 'all' selects everything (only allowed when 'include_all' is true). [values, all] + - values (array) — Selected values, unique and never '$__all'. Must be empty when 'kind' is 'all'. + - default_datasource_id (integer) — Default datasource ID. Without a usable default the runtime picks the first candidate by name, then ID. + - kind (string) (required) — Variable kind discriminator; always 'datasource', selecting a datasource. [datasource, custom, query] + - label (string) — Optional display label; falls back to 'name'. (≤189 chars) + - name (string) (required) — Variable name used in '{{ }}' templates, at most 64 characters. + - name_patterns (array) — Wildcard patterns narrowing the candidates; empty means every datasource of the type. + - options (array) — Candidate list, 1–1000 entries. Values must be non-empty, unique and must not be '$__all'. + - text (string) (required) — Label shown in the picker. (1-1024 chars) + - value (string) (required) — Value substituted into templates. (1-1024 chars) + - refresh (string) — When the candidates are recomputed: 'on_dashboard_load' = once when the dashboard loads; 'on_time_range_change' = every time the time range changes. [on_dashboard_load, on_time_range_change] + - selection (object) — Selection cardinality for a variable. + - include_all (boolean) (required) — When true the variable also offers an 'all' selection. + - mode (string) (required) — Selection cardinality: 'single' makes the resolved selection hold exactly one value; 'multi' allows multiple values. [single, multi] + - variable_query (object) — Variable query. Pick the arm with 'kind'; the arm must match the referenced datasource type. + - args (object) — Named query arguments; defaults to an empty object. + - expr (string) — SQL statement; may reference other variables through '{{ }}'. + - field (string) — Log field whose values become candidates. (≥1 chars) + - kind (string) (required) — Query kind discriminator; always 'prometheus', a label-values query against Prometheus. [prometheus, sql, logs] + - label (string) — Label whose values become candidates. + - label_filters (array) — Optional matchers narrowing the series before label values are read. + - metric (string) — Optional metric used to restrict the series considered. + - text_field (string) — Column used as the candidate label; defaults to the value column. + - value_field (string) — Column used as the candidate value. (≥1 chars) + - folder_breadcrumb (array) (required) — Folder names from the root down to 'folder_id'. + - folder_id (integer) (required) — ID of the dashboard's folder. (min 1) + - revision (integer) (required) — Current revision number. (min 1) + - schema_version (string) (required) — Wire schema version of 'definition'; only 'dashboard.v1' is accepted. [dashboard.v1] + - updated_at (string) (required) — Unix timestamp in seconds. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - updated_by (object) (required) — Account member recorded as the creator, updater or revision author. + - id (integer) (required) — Member ID. + - name (string) (required) — Member display name. +`, + Args: requireBodyFieldOrExactArg("dashboard_id", "dashboard-id"), + Example: ` flashduty monit dashboard-restore --data '{"dashboard_id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2101","expected_revision":8,"folder_id":15}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "dashboard_id", "string"); err != nil { + return err + } + if cmd.Flags().Changed("dashboard-id") { + body["dashboard_id"] = fDashboardID + } + if cmd.Flags().Changed("expected-revision") { + body["expected_revision"] = fExpectedRevision + } + if cmd.Flags().Changed("folder-id") { + body["folder_id"] = fFolderID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.DashboardRestoreRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Dashboards.WriteRestore(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fDashboardID, "dashboard-id", "", "Canonical UUIDv7 of the dashboard. (required)") + cmd.Flags().Int64Var(&fExpectedRevision, "expected-revision", 0, "Revision the caller last read. The write fails with 'DashboardRevisionConflict' unless it still matches the stored revision. (required) (min 1)") + cmd.Flags().Int64Var(&fFolderID, "folder-id", 0, "Destination folder. Omit to restore to the original folder; when the original folder is no longer writable the call fails with 'RestoreFolderRequired' and you must pass one. (min 1)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genDashboardsWriteUpdateCmd() *cobra.Command { + var dataJSON string + var fDashboardID string + var fExpectedRevision int64 + var fMessage string + var fSchemaVersion string + cmd := &cobra.Command{ + Use: "dashboard-update ", + Short: "Update dashboard", + Long: `Update dashboard. + +Replace a dashboard definition with compare-and-swap on the revision counter. + +API: POST /monit/dashboard/update (monit-dashboard-write-update) + +Request fields: + --dashboard-id string (required) — Canonical UUIDv7 of the dashboard. + --expected-revision int (required) — Revision the caller last read. The write fails with 'DashboardRevisionConflict' unless it still matches the stored revision. (min 1) + --message string — Optional revision message, at most 1024 Unicode code points. Stored with the revision and never returned by this endpoint. (≤1024 chars) + --schema-version string (required) — Wire schema version; only 'dashboard.v1' is accepted. [dashboard.v1] + definition (object, via --data) (required) — Complete dashboard payload stored as a portable 'dashboard.v1' document. Unknown keys, duplicate keys, NaN/Inf, over-range numbers and trailing values are rejected; the serialized form must stay within 1 MiB. + - default_time_range (object) (required) — Relative time window. 'from' is one of the fixed presets the validator accepts; 'to' is always the literal string 'now'. + - from (string) (required) — Start offset relative to 'to': 'now-15m' = 15 minutes ago; 'now-30m' = 30 minutes ago; 'now-1h' = 1 hour ago; 'now-3h' = 3 hours ago; 'now-6h' = 6 hours ago; 'now-12h' = 12 hours ago; 'now-24h' = 24 hours ago; 'now-7d' = 7 days ago. [now-15m, now-30m, now-1h, now-3h, now-6h, now-12h, now-24h, now-7d] + - to (string) (required) — End of the window; only 'now' is accepted. [now] + - description (string) — Optional description, at most 1024 Unicode code points. (≤1024 chars) + - refresh_interval (string) (required) — Auto-refresh cadence applied by the console: 'off' disables auto-refresh; '30s' = every 30 seconds; '1m' = every minute; '5m' = every 5 minutes. [off, 30s, 1m, 5m] + - tabs (array) (required) — Tabs, 1–10. Every tab title is unique and every tab or section ID must be a canonical UUIDv7 used only once across the definition. + - description (string) — Optional tab description. (≤1024 chars) + - id (string) (required) — Canonical UUIDv7 identifying the tab; unique across the definition. + - sections (array) (required) — Sections on the tab, at most 10. + - collapsed (boolean) (required) — Whether the section renders collapsed by default. + - description (string) — Optional section description. (≤1024 chars) + - id (string) (required) — Canonical UUIDv7 identifying the section; unique across the definition. + - panels (array) (required) — Panels in the section, at most 30. + - title (string) (required) — Section title. (1-189 chars) + - title (string) (required) — Tab title, 1–189 Unicode code points. Unique among tabs. (1-189 chars) + - top_panels (array) (required) — Panels placed directly on the tab, at most 30. + - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time. + - description (string) — Optional panel description. (≤1024 chars) + - grid (object) (required) — 24-column grid placement. 'x' and 'y' are zero-based; 'x + w' must not exceed 24. + - id (string) (required) — Canonical UUIDv7 identifying the panel; unique across the definition. + - queries (array) (required) — Queries in the panel. 'time_series' accepts 1–26, 'text' accepts none, every other kind accepts exactly one. + - title (string) (required) — Panel title. (1-189 chars) + - viz_config (object) (required) — Visualization configuration. 'kind' selects the arm and therefore which sibling config object is required; 'time_series' also carries the shared numeric options. + - title (string) (required) — Dashboard title, 1–189 Unicode code points after trimming. (1-189 chars) + - variables (array) (required) — Dashboard variables, at most 20. Names must be unique within the definition and match the variable-name pattern. + - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time. + - datasource_id (integer) — Datasource ID. Required when 'kind' is 'fixed', forbidden when 'kind' is 'variable'. (min 1) + - datasource_type (string) (required) — Datasource type identifier, e.g. 'prometheus' or 'victorialogs'. + - kind (string) (required) — 'fixed' uses 'datasource_id'; 'variable' resolves 'name' against a datasource variable. [fixed, variable] + - name (string) — Datasource variable name. Required when 'kind' is 'variable', forbidden when 'kind' is 'fixed'. + - datasource_type (string) — Datasource type the candidates are drawn from. + - default (object) — A concrete selection of variable values. An empty 'values' array is valid wire input and means unresolved — the server never substitutes a default for it. + - kind (string) (required) — 'values' selects the listed entries, 'all' selects everything (only allowed when 'include_all' is true). [values, all] + - values (array) — Selected values, unique and never '$__all'. Must be empty when 'kind' is 'all'. + - default_datasource_id (integer) — Default datasource ID. Without a usable default the runtime picks the first candidate by name, then ID. + - kind (string) (required) — Variable kind discriminator; always 'datasource', selecting a datasource. [datasource, custom, query] + - label (string) — Optional display label; falls back to 'name'. (≤189 chars) + - name (string) (required) — Variable name used in '{{ }}' templates, at most 64 characters. + - name_patterns (array) — Wildcard patterns narrowing the candidates; empty means every datasource of the type. + - options (array) — Candidate list, 1–1000 entries. Values must be non-empty, unique and must not be '$__all'. + - text (string) (required) — Label shown in the picker. (1-1024 chars) + - value (string) (required) — Value substituted into templates. (1-1024 chars) + - refresh (string) — When the candidates are recomputed: 'on_dashboard_load' = once when the dashboard loads; 'on_time_range_change' = every time the time range changes. [on_dashboard_load, on_time_range_change] + - selection (object) — Selection cardinality for a variable. + - include_all (boolean) (required) — When true the variable also offers an 'all' selection. + - mode (string) (required) — Selection cardinality: 'single' makes the resolved selection hold exactly one value; 'multi' allows multiple values. [single, multi] + - variable_query (object) — Variable query. Pick the arm with 'kind'; the arm must match the referenced datasource type. + - args (object) — Named query arguments; defaults to an empty object. + - expr (string) — SQL statement; may reference other variables through '{{ }}'. + - field (string) — Log field whose values become candidates. (≥1 chars) + - kind (string) (required) — Query kind discriminator; always 'prometheus', a label-values query against Prometheus. [prometheus, sql, logs] + - label (string) — Label whose values become candidates. + - label_filters (array) — Optional matchers narrowing the series before label values are read. + - metric (string) — Optional metric used to restrict the series considered. + - text_field (string) — Column used as the candidate label; defaults to the value column. + - value_field (string) — Column used as the candidate value. (≥1 chars) + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - changed (boolean) (required) — Whether the stored dashboard actually changed. + - resource (object) (required) — A stored dashboard: its identity, revision counter, placement and full definition. 'revision' increments on every accepted write and must be echoed back as 'expected_revision' for the next mutation. + - created_at (string) (required) — Unix timestamp in seconds. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - created_by (object) (required) — Account member recorded as the creator, updater or revision author. + - id (integer) (required) — Member ID. + - name (string) (required) — Member display name. + - dashboard_id (string) (required) — Canonical UUIDv7 assigned by the caller at creation time. + - definition (object) (required) — Complete dashboard payload stored as a portable 'dashboard.v1' document. Unknown keys, duplicate keys, NaN/Inf, over-range numbers and trailing values are rejected; the serialized form must stay within 1 MiB. + - default_time_range (object) (required) — Relative time window. 'from' is one of the fixed presets the validator accepts; 'to' is always the literal string 'now'. + - from (string) (required) — Start offset relative to 'to': 'now-15m' = 15 minutes ago; 'now-30m' = 30 minutes ago; 'now-1h' = 1 hour ago; 'now-3h' = 3 hours ago; 'now-6h' = 6 hours ago; 'now-12h' = 12 hours ago; 'now-24h' = 24 hours ago; 'now-7d' = 7 days ago. [now-15m, now-30m, now-1h, now-3h, now-6h, now-12h, now-24h, now-7d] + - to (string) (required) — End of the window; only 'now' is accepted. [now] + - description (string) — Optional description, at most 1024 Unicode code points. (≤1024 chars) + - refresh_interval (string) (required) — Auto-refresh cadence applied by the console: 'off' disables auto-refresh; '30s' = every 30 seconds; '1m' = every minute; '5m' = every 5 minutes. [off, 30s, 1m, 5m] + - tabs (array) (required) — Tabs, 1–10. Every tab title is unique and every tab or section ID must be a canonical UUIDv7 used only once across the definition. + - description (string) — Optional tab description. (≤1024 chars) + - id (string) (required) — Canonical UUIDv7 identifying the tab; unique across the definition. + - sections (array) (required) — Sections on the tab, at most 10. + - title (string) (required) — Tab title, 1–189 Unicode code points. Unique among tabs. (1-189 chars) + - top_panels (array) (required) — Panels placed directly on the tab, at most 30. + - title (string) (required) — Dashboard title, 1–189 Unicode code points after trimming. (1-189 chars) + - variables (array) (required) — Dashboard variables, at most 20. Names must be unique within the definition and match the variable-name pattern. + - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time. + - datasource_type (string) — Datasource type the candidates are drawn from. + - default (object) — A concrete selection of variable values. An empty 'values' array is valid wire input and means unresolved — the server never substitutes a default for it. + - default_datasource_id (integer) — Default datasource ID. Without a usable default the runtime picks the first candidate by name, then ID. + - kind (string) (required) — Variable kind discriminator; always 'datasource', selecting a datasource. [datasource, custom, query] + - label (string) — Optional display label; falls back to 'name'. (≤189 chars) + - name (string) (required) — Variable name used in '{{ }}' templates, at most 64 characters. + - name_patterns (array) — Wildcard patterns narrowing the candidates; empty means every datasource of the type. + - options (array) — Candidate list, 1–1000 entries. Values must be non-empty, unique and must not be '$__all'. + - refresh (string) — When the candidates are recomputed: 'on_dashboard_load' = once when the dashboard loads; 'on_time_range_change' = every time the time range changes. [on_dashboard_load, on_time_range_change] + - selection (object) — Selection cardinality for a variable. + - variable_query (object) — Variable query. Pick the arm with 'kind'; the arm must match the referenced datasource type. + - folder_breadcrumb (array) (required) — Folder names from the root down to 'folder_id'. + - folder_id (integer) (required) — ID of the dashboard's folder. (min 1) + - revision (integer) (required) — Current revision number. (min 1) + - schema_version (string) (required) — Wire schema version of 'definition'; only 'dashboard.v1' is accepted. [dashboard.v1] + - updated_at (string) (required) — Unix timestamp in seconds. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - updated_by (object) (required) — Account member recorded as the creator, updater or revision author. + - id (integer) (required) — Member ID. + - name (string) (required) — Member display name. +`, + Args: requireBodyFieldOrExactArg("dashboard_id", "dashboard-id"), + Example: ` flashduty monit dashboard-update --data '{"dashboard_id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2101","definition":{"default_time_range":{"from":"now-1h","to":"now"},"description":"Traffic, errors and dependencies for the checkout service.","refresh_interval":"1m","tabs":[{"description":"Golden signals.","id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2202","sections":[{"collapsed":false,"description":"Request rate and latency.","id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2303","panels":[{"datasource_ref":{"datasource_id":10,"datasource_type":"prometheus","kind":"fixed"},"grid":{"h":8,"w":12,"x":0,"y":0},"id":"01990d7a-9c5b-7ab0-9c18-33e38f6f2404","queries":[{"legend_alias":"{{env}} requests","query":{"args":{},"expr":"sum(rate(http_requests_total{env=\"{{env}}\"}[5m]))","min_step_seconds":30,"mode":"range"},"ref_id":"A"}],"title":"Request rate","viz_config":{"decimals":2,"kind":"time_series","options":{},"threshold":{"critical":2000,"mode":"higher_is_worse","warning":1000},"unit":"count_per_second"}}],"title":"Traffic"}],"title":"Overview","top_panels":[]}],"title":"Checkout service overview","variables":[{"default":{"kind":"values","values":["prod"]},"kind":"custom","label":"Environment","name":"env","options":[{"text":"Production","value":"prod"},{"text":"Staging","value":"staging"}],"selection":{"include_all":false,"mode":"single"}}]},"expected_revision":7,"message":"Split the latency panel","schema_version":"dashboard.v1"}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "dashboard_id", "string"); err != nil { + return err + } + if cmd.Flags().Changed("dashboard-id") { + body["dashboard_id"] = fDashboardID + } + if cmd.Flags().Changed("expected-revision") { + body["expected_revision"] = fExpectedRevision + } + if cmd.Flags().Changed("message") { + body["message"] = fMessage + } + if cmd.Flags().Changed("schema-version") { + body["schema_version"] = fSchemaVersion + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.DashboardUpdateRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Dashboards.WriteUpdate(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fDashboardID, "dashboard-id", "", "Canonical UUIDv7 of the dashboard. (required)") + cmd.Flags().Int64Var(&fExpectedRevision, "expected-revision", 0, "Revision the caller last read. The write fails with 'DashboardRevisionConflict' unless it still matches the stored revision. (required) (min 1)") + cmd.Flags().StringVar(&fMessage, "message", "", "Optional revision message, at most 1024 Unicode code points. Stored with the revision and never returned by this endpoint. (≤1024 chars)") + cmd.Flags().StringVar(&fSchemaVersion, "schema-version", "", "Wire schema version; only 'dashboard.v1' is accepted. (required) [dashboard.v1]") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func registerGeneratedDashboards(root *cobra.Command) { + gMonit := genGroup(root, "monit", "Monitors API") + genAddLeaf(gMonit, genDashboardsPanelReadPreviewCmd()) + genAddLeaf(gMonit, genDashboardsPanelReadRunCmd()) + genAddLeaf(gMonit, genDashboardsQueryReadResolveCmd()) + genAddLeaf(gMonit, genDashboardsReadGetCmd()) + genAddLeaf(gMonit, genDashboardsReadListCmd()) + genAddLeaf(gMonit, genDashboardsReadOutlineCmd()) + genAddLeaf(gMonit, genDashboardsReadSearchCmd()) + genAddLeaf(gMonit, genDashboardsRevisionReadGetCmd()) + genAddLeaf(gMonit, genDashboardsRevisionReadListCmd()) + genAddLeaf(gMonit, genDashboardsTrashReadListCmd()) + genAddLeaf(gMonit, genDashboardsVariableReadPreviewCmd()) + genAddLeaf(gMonit, genDashboardsVariableReadResolveCmd()) + genAddLeaf(gMonit, genDashboardsWriteCreateCmd()) + genAddLeaf(gMonit, genDashboardsWriteDeleteCmd()) + genAddLeaf(gMonit, genDashboardsWriteMoveCmd()) + genAddLeaf(gMonit, genDashboardsWriteRestoreCmd()) + genAddLeaf(gMonit, genDashboardsWriteUpdateCmd()) +} diff --git a/internal/cli/zz_generated_integrations.go b/internal/cli/zz_generated_integrations.go index dba1b00..3c06dd5 100644 --- a/internal/cli/zz_generated_integrations.go +++ b/internal/cli/zz_generated_integrations.go @@ -59,6 +59,645 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le return cmd } +func genIntegrationsIntegrationAPIReadInfoCmd() *cobra.Command { + var dataJSON string + var fIntegrationID int64 + cmd := &cobra.Command{ + Use: "info ", + Short: "Get integration detail", + Long: `Get integration detail. + +Return one integration, including its settings with sensitive values masked. + +API: POST /integration/info (integration-api-read-info) + +Request fields: + --integration-id int (required) — Integration ID. (min 1) + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - category (any) (required) + - created_at (any) (required) + - description (any) (required) + - integration_id (any) (required) + - last_time (any) (required) + - name (any) (required) + - plugin_type (any) (required) + - plugin_type_name (any) (required) + - ref_id (any) (required) + - settings (object) (required) — Type-specific configuration. Sensitive values (endpoint, headers, secrets, passwords) are returned masked as '******'. + - status (any) (required) + - team_id (any) (required) + - updated_at (any) (required) +`, + Args: requireBodyFieldOrExactArg("integration_id", "integration-id"), + Example: ` flashduty integration info --data '{"integration_id":6113996590131}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "integration_id", "int"); err != nil { + return err + } + if cmd.Flags().Changed("integration-id") { + body["integration_id"] = fIntegrationID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.GetIntegrationRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Integrations.IntegrationAPIReadInfo(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().Int64Var(&fIntegrationID, "integration-id", 0, "Integration ID. (required) (min 1)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genIntegrationsIntegrationAPIReadListCmd() *cobra.Command { + var dataJSON string + var fP int64 + var fLimit int64 + var fSearchAfterCtx string + var fAsc bool + var fCategory string + var fIsMyTeam bool + var fName string + var fOrderby string + var fPluginType string + var fRefIDs []string + var fStatus string + var fTeamIDs []int + var fType string + cmd := &cobra.Command{ + Use: "list", + Short: "List integrations", + Long: `List integrations. + +List the account's alert-source and change-source integrations. + +API: POST /integration/list (integration-api-read-list) + +Request fields: + --page int — Page number, 1-based. (min 1) + --limit int — Page size. Defaults to 100, maximum 100. (1-100) + --search-after-ctx string + --asc bool — Sort ascending when true, descending when false. + --category string — Filter by category. Accepts a comma-separated list. + --is-my-team bool — Limit the result to integrations owned by your teams. + --name string — Filter by integration name. + --orderby string — Sort field. Defaults to 'created_at'; 'plugin_type' is sorted by the underlying plugin. [created_at, updated_at, name, plugin_type, status] + --plugin-type string — Filter by integration type. Accepts a comma-separated list. + --ref-ids []string — Filter by source reference IDs. Each value must start with 'c_' (channel), 'a_' (account) or 'w_'. + --status string — Filter by status. Accepts a comma-separated list. + --team-ids []int — Filter by team IDs. With 'is_my_team', the values narrow that set further. + --type string — Deprecated. Merged into 'plugin_type' when both are set. + +Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): + - items (array) (required) — Integrations on the current page. + - category (string) (required) — Category the integration belongs to: 'event.alert' alert events, 'event.change' change events, 'im' IM bots, 'webhook' custom webhooks. [event.alert, event.change, im, webhook] + - created_at (string) (required) — Unix timestamp in seconds when the integration was created. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - description (string) (required) — Free-form description. + - integration_id (integer) (required) — Integration ID. + - last_time (string) (required) — Unix timestamp in seconds of the most recent event received. '0' when no event has arrived yet. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - name (string) (required) — Integration name. + - plugin_type (string) (required) — Integration type, for example 'standard.alert' or 'zabbix.alert'. + - plugin_type_name (string) (required) — Display name of the integration type, in the language of the request. + - ref_id (string) (required) — Source reference ID: 'a_'-prefixed for an account-scoped integration, 'c_'-prefixed when it is shared into a channel, 'w_'-prefixed on legacy workspace-scoped integrations. + - status (string) (required) — Lifecycle status: 'enabled' while the integration accepts events, 'disabled' when it is paused. [enabled, disabled] + - team_id (integer) (required) — ID of the team that owns the integration. '0' when it is not assigned to a team. + - updated_at (string) (required) — Unix timestamp in seconds when the integration was last updated. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - limit (integer) (required) — Page size echoed back. + - p (integer) (required) — Page number echoed back. + - total (integer) (required) — Total number of matching integrations. +`, + Example: ` flashduty integration list --data '{"limit":20,"p":1,"status":"enabled"}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if cmd.Flags().Changed("page") { + body["p"] = fP + } + if cmd.Flags().Changed("limit") { + body["limit"] = fLimit + } + if cmd.Flags().Changed("search-after-ctx") { + body["search_after_ctx"] = fSearchAfterCtx + } + if cmd.Flags().Changed("asc") { + body["asc"] = fAsc + } + if cmd.Flags().Changed("category") { + body["category"] = fCategory + } + if cmd.Flags().Changed("is-my-team") { + body["is_my_team"] = fIsMyTeam + } + if cmd.Flags().Changed("name") { + body["name"] = fName + } + if cmd.Flags().Changed("orderby") { + body["orderby"] = fOrderby + } + if cmd.Flags().Changed("plugin-type") { + body["plugin_type"] = fPluginType + } + if cmd.Flags().Changed("ref-ids") { + body["ref_ids"] = fRefIDs + } + if cmd.Flags().Changed("status") { + body["status"] = fStatus + } + if cmd.Flags().Changed("team-ids") { + body["team_ids"] = fTeamIDs + } + if cmd.Flags().Changed("type") { + body["type"] = fType + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.ListIntegrationsRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Integrations.IntegrationAPIReadList(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().Int64Var(&fP, "page", 0, "Page number, 1-based. (min 1)") + cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size. Defaults to 100, maximum 100. (1-100)") + cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") + cmd.Flags().BoolVar(&fAsc, "asc", false, "Sort ascending when true, descending when false.") + cmd.Flags().StringVar(&fCategory, "category", "", "Filter by category. Accepts a comma-separated list.") + cmd.Flags().BoolVar(&fIsMyTeam, "is-my-team", false, "Limit the result to integrations owned by your teams.") + cmd.Flags().StringVar(&fName, "name", "", "Filter by integration name.") + cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort field. Defaults to 'created_at'; 'plugin_type' is sorted by the underlying plugin. [created_at, updated_at, name, plugin_type, status]") + cmd.Flags().StringVar(&fPluginType, "plugin-type", "", "Filter by integration type. Accepts a comma-separated list.") + cmd.Flags().StringSliceVar(&fRefIDs, "ref-ids", nil, "Filter by source reference IDs. Each value must start with 'c_' (channel), 'a_' (account) or 'w_'.") + cmd.Flags().StringVar(&fStatus, "status", "", "Filter by status. Accepts a comma-separated list.") + cmd.Flags().IntSliceVar(&fTeamIDs, "team-ids", nil, "Filter by team IDs. With 'is_my_team', the values narrow that set further.") + cmd.Flags().StringVar(&fType, "type", "", "Deprecated. Merged into 'plugin_type' when both are set.") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genIntegrationsIntegrationAPIReadTypeListCmd() *cobra.Command { + var dataJSON string + var fP int64 + var fLimit int64 + var fSearchAfterCtx string + var fAsc bool + var fCategory string + var fOrderby string + cmd := &cobra.Command{ + Use: "type-list", + Short: "List integration types", + Long: `List integration types. + +List the integration types the account can configure. + +API: POST /integration/type/list (integration-api-read-type-list) + +Request fields: + --page int — Page number, 1-based. (min 1) + --limit int — Page size. Defaults to 20, maximum 100. (1-100) + --search-after-ctx string + --asc bool — Sort ascending when 'true' (the default); descending when 'false'. + --category string — Filter by category. Accepts a comma-separated list, for example 'event.alert,event.change'. + --orderby string — Sort field. When omitted, types are returned in console ranking order. [id, created_at, updated_at, name, type] + +Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): + - items (array) (required) — Integration types on the current page. + - category (string) (required) — Category the type belongs to: 'event.alert' alert events, 'event.change' change events, 'im' IM bots, 'webhook' custom webhooks. [event.alert, event.change, im, webhook] + - plugin_type (string) (required) — Type identifier to pass as 'plugin_type' when creating an integration. + - plugin_type_logo_url (string) (required) — Logo URL of the type. + - plugin_type_name (string) (required) — Display name of the type. + - status (string) (required) — Platform status of the type. + - supports_api_create (boolean) (required) — Whether 'POST /integration/create' accepts this type. + - limit (integer) (required) — Page size echoed back. + - p (integer) (required) — Page number echoed back. + - total (integer) (required) — Total number of matching types. +`, + Example: ` flashduty integration type-list --data '{"category":"event.alert","limit":20,"p":1}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if cmd.Flags().Changed("page") { + body["p"] = fP + } + if cmd.Flags().Changed("limit") { + body["limit"] = fLimit + } + if cmd.Flags().Changed("search-after-ctx") { + body["search_after_ctx"] = fSearchAfterCtx + } + if cmd.Flags().Changed("asc") { + body["asc"] = fAsc + } + if cmd.Flags().Changed("category") { + body["category"] = fCategory + } + if cmd.Flags().Changed("orderby") { + body["orderby"] = fOrderby + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.IntegrationTypeListRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Integrations.IntegrationAPIReadTypeList(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().Int64Var(&fP, "page", 0, "Page number, 1-based. (min 1)") + cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size. Defaults to 20, maximum 100. (1-100)") + cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") + cmd.Flags().BoolVar(&fAsc, "asc", false, "Sort ascending when 'true' (the default); descending when 'false'.") + cmd.Flags().StringVar(&fCategory, "category", "", "Filter by category. Accepts a comma-separated list, for example 'event.alert,event.change'.") + cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort field. When omitted, types are returned in console ranking order. [id, created_at, updated_at, name, type]") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genIntegrationsIntegrationAPIWriteCreateCmd() *cobra.Command { + var dataJSON string + var fDescription string + var fName string + var fPluginType string + var fTeamID int64 + cmd := &cobra.Command{ + Use: "create", + Short: "Create integration", + Long: `Create integration. + +Create an integration for an alert source or change source. + +API: POST /integration/create (integration-api-write-create) + +Request fields: + --description string — Free-form description, at most 499 characters. (≤499 chars) + --name string — Integration name. 2–49 characters. (2-49 chars) + --plugin-type string (required) — Integration type. Must be one listed by 'POST /integration/type/list' with 'supports_api_create: true'. + --team-id int — Owning team ID. (min 1) + settings (object, via --data) — Type-specific configuration; the accepted keys depend on 'plugin_type'. + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - integration_id (integer) (required) — ID of the new integration. + - integration_key (string) (required) — Key used to authenticate inbound pushes to this integration. Returned here only; fetch a new one with 'POST /integration/key/rotate'. +`, + Example: ` flashduty integration create --data '{"description":"Alerts pushed by the production Prometheus stack","name":"Prod metrics alerts","plugin_type":"standard.alert","settings":{"severity_mapping":[{"P1":"Critical"}]},"team_id":1467226103121}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if cmd.Flags().Changed("description") { + body["description"] = fDescription + } + if cmd.Flags().Changed("name") { + body["name"] = fName + } + if cmd.Flags().Changed("plugin-type") { + body["plugin_type"] = fPluginType + } + if cmd.Flags().Changed("team-id") { + body["team_id"] = fTeamID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.CreateIntegrationRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Integrations.IntegrationAPIWriteCreate(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fDescription, "description", "", "Free-form description, at most 499 characters. (≤499 chars)") + cmd.Flags().StringVar(&fName, "name", "", "Integration name. 2–49 characters. (2-49 chars)") + cmd.Flags().StringVar(&fPluginType, "plugin-type", "", "Integration type. Must be one listed by 'POST /integration/type/list' with 'supports_api_create: true'. (required)") + cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Owning team ID. (min 1)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genIntegrationsIntegrationAPIWriteDeleteCmd() *cobra.Command { + var dataJSON string + var fIntegrationID int64 + cmd := &cobra.Command{ + Use: "delete ", + Short: "Delete integration", + Long: `Delete integration. + +Delete an integration that nothing else references. + +API: POST /integration/delete (integration-api-write-delete) + +Request fields: + --integration-id int (required) — Integration ID. (min 1) +`, + Args: requireBodyFieldOrExactArg("integration_id", "integration-id"), + Example: ` flashduty integration delete --data '{"integration_id":6113996590131}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "integration_id", "int"); err != nil { + return err + } + if cmd.Flags().Changed("integration-id") { + body["integration_id"] = fIntegrationID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.IntegrationLifecycleRequest) + if err := genBindBody(body, req); err != nil { + return err + } + resp, err := ctx.Client.Integrations.IntegrationAPIWriteDelete(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + if resp != nil && len(resp.Raw) > 0 { + return ctx.WriteRaw(resp.Raw) + } + ctx.WriteResult("OK: POST /integration/delete") + return nil + }) + }, + } + cmd.Flags().Int64Var(&fIntegrationID, "integration-id", 0, "Integration ID. (required) (min 1)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genIntegrationsIntegrationAPIWriteDisableCmd() *cobra.Command { + var dataJSON string + var fIntegrationID int64 + cmd := &cobra.Command{ + Use: "disable ", + Short: "Disable integration", + Long: `Disable integration. + +Disable an integration without deleting its configuration. + +API: POST /integration/disable (integration-api-write-disable) + +Request fields: + --integration-id int (required) — Integration ID. (min 1) +`, + Args: requireBodyFieldOrExactArg("integration_id", "integration-id"), + Example: ` flashduty integration disable --data '{"integration_id":6113996590131}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "integration_id", "int"); err != nil { + return err + } + if cmd.Flags().Changed("integration-id") { + body["integration_id"] = fIntegrationID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.IntegrationLifecycleRequest) + if err := genBindBody(body, req); err != nil { + return err + } + resp, err := ctx.Client.Integrations.IntegrationAPIWriteDisable(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + if resp != nil && len(resp.Raw) > 0 { + return ctx.WriteRaw(resp.Raw) + } + ctx.WriteResult("OK: POST /integration/disable") + return nil + }) + }, + } + cmd.Flags().Int64Var(&fIntegrationID, "integration-id", 0, "Integration ID. (required) (min 1)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genIntegrationsIntegrationAPIWriteEnableCmd() *cobra.Command { + var dataJSON string + var fIntegrationID int64 + cmd := &cobra.Command{ + Use: "enable ", + Short: "Enable integration", + Long: `Enable integration. + +Re-enable a disabled integration so it accepts events again. + +API: POST /integration/enable (integration-api-write-enable) + +Request fields: + --integration-id int (required) — Integration ID. (min 1) +`, + Args: requireBodyFieldOrExactArg("integration_id", "integration-id"), + Example: ` flashduty integration enable --data '{"integration_id":6113996590131}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "integration_id", "int"); err != nil { + return err + } + if cmd.Flags().Changed("integration-id") { + body["integration_id"] = fIntegrationID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.IntegrationLifecycleRequest) + if err := genBindBody(body, req); err != nil { + return err + } + resp, err := ctx.Client.Integrations.IntegrationAPIWriteEnable(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + if resp != nil && len(resp.Raw) > 0 { + return ctx.WriteRaw(resp.Raw) + } + ctx.WriteResult("OK: POST /integration/enable") + return nil + }) + }, + } + cmd.Flags().Int64Var(&fIntegrationID, "integration-id", 0, "Integration ID. (required) (min 1)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genIntegrationsIntegrationAPIWriteRotateKeyCmd() *cobra.Command { + var dataJSON string + var fIntegrationID int64 + cmd := &cobra.Command{ + Use: "key-rotate ", + Short: "Rotate integration key", + Long: `Rotate integration key. + +Issue a new integration key and invalidate the previous one. + +API: POST /integration/key/rotate (integration-api-write-rotate-key) + +Request fields: + --integration-id int (required) — Integration ID. (min 1) + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - integration_key (string) (required) — The new key. The previous key stops working immediately; this value cannot be read again later. +`, + Args: requireBodyFieldOrExactArg("integration_id", "integration-id"), + Example: ` flashduty integration key-rotate --data '{"integration_id":6113996590131}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "integration_id", "int"); err != nil { + return err + } + if cmd.Flags().Changed("integration-id") { + body["integration_id"] = fIntegrationID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.IntegrationLifecycleRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Integrations.IntegrationAPIWriteRotateKey(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().Int64Var(&fIntegrationID, "integration-id", 0, "Integration ID. (required) (min 1)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genIntegrationsIntegrationAPIWriteUpdateCmd() *cobra.Command { + var dataJSON string + var fDescription string + var fIntegrationID int64 + var fName string + var fTeamID int64 + cmd := &cobra.Command{ + Use: "update ", + Short: "Update integration", + Long: `Update integration. + +Update an integration's name, description, team, or settings. + +API: POST /integration/update (integration-api-write-update) + +Request fields: + --description string — New description, at most 499 characters. (≤499 chars) + --integration-id int (required) — Integration ID. (min 1) + --name string — New name, 2–49 characters. (2-49 chars) + --team-id int — New owning team ID; '0' clears the team assignment. (min 0) + settings (object, via --data) — Replacement configuration for the integration type. Sensitive entries left out, or sent back as the masked '******', keep their stored value. + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - category (any) (required) + - created_at (any) (required) + - description (any) (required) + - integration_id (any) (required) + - last_time (any) (required) + - name (any) (required) + - plugin_type (any) (required) + - plugin_type_name (any) (required) + - ref_id (any) (required) + - settings (object) (required) — Type-specific configuration. Sensitive values (endpoint, headers, secrets, passwords) are returned masked as '******'. + - status (any) (required) + - team_id (any) (required) + - updated_at (any) (required) +`, + Args: requireBodyFieldOrExactArg("integration_id", "integration-id"), + Example: ` flashduty integration update --data '{"integration_id":6113996590131,"name":"Prod metrics alerts (primary)","team_id":1467226103121}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "integration_id", "int"); err != nil { + return err + } + if cmd.Flags().Changed("description") { + body["description"] = fDescription + } + if cmd.Flags().Changed("integration-id") { + body["integration_id"] = fIntegrationID + } + if cmd.Flags().Changed("name") { + body["name"] = fName + } + if cmd.Flags().Changed("team-id") { + body["team_id"] = fTeamID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.UpdateIntegrationRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Integrations.IntegrationAPIWriteUpdate(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fDescription, "description", "", "New description, at most 499 characters. (≤499 chars)") + cmd.Flags().Int64Var(&fIntegrationID, "integration-id", 0, "Integration ID. (required) (min 1)") + cmd.Flags().StringVar(&fName, "name", "", "New name, 2–49 characters. (2-49 chars)") + cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "New owning team ID; '0' clears the team assignment. (min 0)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + func genIntegrationsDetailCmd() *cobra.Command { var dataJSON string var fEventID string @@ -253,6 +892,16 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; func registerGeneratedIntegrations(root *cobra.Command) { gDatasource := genGroup(root, "datasource", "On-call API") genAddLeaf(gDatasource, genIntegrationsDatasourceImPersonTryLinkCmd()) + gIntegration := genGroup(root, "integration", "On-call/Integrations API") + genAddLeaf(gIntegration, genIntegrationsIntegrationAPIReadInfoCmd()) + genAddLeaf(gIntegration, genIntegrationsIntegrationAPIReadListCmd()) + genAddLeaf(gIntegration, genIntegrationsIntegrationAPIReadTypeListCmd()) + genAddLeaf(gIntegration, genIntegrationsIntegrationAPIWriteCreateCmd()) + genAddLeaf(gIntegration, genIntegrationsIntegrationAPIWriteDeleteCmd()) + genAddLeaf(gIntegration, genIntegrationsIntegrationAPIWriteDisableCmd()) + genAddLeaf(gIntegration, genIntegrationsIntegrationAPIWriteEnableCmd()) + genAddLeaf(gIntegration, genIntegrationsIntegrationAPIWriteRotateKeyCmd()) + genAddLeaf(gIntegration, genIntegrationsIntegrationAPIWriteUpdateCmd()) gWebhook := genGroup(root, "webhook", "On-call/Integrations API") genAddLeaf(gWebhook, genIntegrationsDetailCmd()) genAddLeaf(gWebhook, genIntegrationsListCmd()) diff --git a/internal/cli/zz_generated_issues.go b/internal/cli/zz_generated_issues.go index b6fc5a9..052148d 100644 --- a/internal/cli/zz_generated_issues.go +++ b/internal/cli/zz_generated_issues.go @@ -205,7 +205,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le - reason (string) — Explanation for the cause determination, generated only by AI analysis; empty string when AI is disabled or analysis has not run. - source (string) — Origin of the cause: 'auto' for system-determined, 'user' for manually set. [auto, user] - value (string) — Suspected cause category. One of: | Value | Meaning | |---|---| | 'api.failed_request' | API request failure (e.g. HTTP 4xx/5xx responses) | | 'network.error' | Network connectivity error (offline, aborted requests, etc.) | | 'code.exception' | Code exception (Syntax/Reference/Range and similar runtime errors) | | 'code.invalid_object_access' | Invalid object access (e.g. reading a property of 'undefined'/'null') | | 'code.invalid_argument' | Invalid argument passed to a function | | 'unknown' | Cause could not be determined | [api.failed_request, network.error, code.exception, code.invalid_object_access, code.invalid_argument, unknown] - - team_id (integer) — ID of the team owning this issue, copied from the owning application's 'team_id' at issue creation. + - team_id (integer) — ID of the team owning this issue. For 'POST /rum/issue/info' this is the owning application's current 'team_id'; 'POST /rum/issue/list' and 'POST /rum/issue/export' report the team recorded when the issue was first seen, which differs once the application moves to another team. - updated_at (string) — Time the issue was last updated, Unix timestamp in milliseconds. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. - versions (array) — Deduplicated list of application versions in which this issue has occurred; may contain an empty string for events without version info. `, @@ -319,7 +319,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; - reason (string) — Explanation for the cause determination, generated only by AI analysis; empty string when AI is disabled or analysis has not run. - source (string) — Origin of the cause: 'auto' for system-determined, 'user' for manually set. [auto, user] - value (string) — Suspected cause category. One of: | Value | Meaning | |---|---| | 'api.failed_request' | API request failure (e.g. HTTP 4xx/5xx responses) | | 'network.error' | Network connectivity error (offline, aborted requests, etc.) | | 'code.exception' | Code exception (Syntax/Reference/Range and similar runtime errors) | | 'code.invalid_object_access' | Invalid object access (e.g. reading a property of 'undefined'/'null') | | 'code.invalid_argument' | Invalid argument passed to a function | | 'unknown' | Cause could not be determined | [api.failed_request, network.error, code.exception, code.invalid_object_access, code.invalid_argument, unknown] - - team_id (integer) — ID of the team owning this issue, copied from the owning application's 'team_id' at issue creation. + - team_id (integer) — ID of the team owning this issue. For 'POST /rum/issue/info' this is the owning application's current 'team_id'; 'POST /rum/issue/list' and 'POST /rum/issue/export' report the team recorded when the issue was first seen, which differs once the application moves to another team. - updated_at (string) — Time the issue was last updated, Unix timestamp in milliseconds. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. - versions (array) — Deduplicated list of application versions in which this issue has occurred; may contain an empty string for events without version info. - total (integer) — Total number of issues matching the filter conditions. diff --git a/internal/cli/zz_generated_knowledge.go b/internal/cli/zz_generated_knowledge.go index c98b62b..837f905 100644 --- a/internal/cli/zz_generated_knowledge.go +++ b/internal/cli/zz_generated_knowledge.go @@ -22,17 +22,17 @@ Return a knowledge file's metadata and its base64-encoded content. API: POST /safari/knowledge/file/get (knowledge-file-read-get) Request fields: - --pack-id string — Knowledge pack ID; defaults to the caller's account-scope pack. - --rel-path string (required) — Path of the file relative to the pack root. + --pack-id string — Knowledge ID; defaults to the caller's account-scope knowledge. + --rel-path string (required) — Path of the file relative to the knowledge root. Response fields ('data' envelope is unwrapped — these fields are at the top level): - content_b64 (string) (required) — Base64-encoded file content; decodes to UTF-8 text. - - file (object) (required) — Metadata of one file inside a knowledge pack. Content is fetched separately via file/get. + - file (object) (required) — Metadata of one knowledge file. Content is fetched separately via file/get. - checksum (string) (required) — SHA-256 hex digest of the file content. - content_type (string) (required) — MIME type; inferred from the file extension when not set on upload. - file_id (string) (required) — File ID ('kfl_' prefix). - - pack_id (string) (required) — ID of the knowledge pack that contains the file. - - rel_path (string) (required) — Path relative to the pack root, e.g. 'runbooks/restart.md'. + - pack_id (string) (required) — ID of the knowledge that contains the file. + - rel_path (string) (required) — Path relative to the knowledge root, e.g. 'runbooks/restart.md'. - size_bytes (integer) (required) — File size in bytes. - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the file was last modified. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. - updated_by (integer) (required) — Person ID of the member who last modified the file. @@ -64,8 +64,8 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fPackID, "pack-id", "", "Knowledge pack ID; defaults to the caller's account-scope pack.") - cmd.Flags().StringVar(&fRelPath, "rel-path", "", "Path of the file relative to the pack root. (required)") + cmd.Flags().StringVar(&fPackID, "pack-id", "", "Knowledge ID; defaults to the caller's account-scope knowledge.") + cmd.Flags().StringVar(&fRelPath, "rel-path", "", "Path of the file relative to the knowledge root. (required)") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -81,7 +81,7 @@ func genKnowledgeFileReadListCmd() *cobra.Command { Short: "List knowledge files", Long: `List knowledge files. -List the files in a knowledge pack with metadata such as size and checksum. +List knowledge files with metadata such as size and checksum. API: POST /safari/knowledge/file/list (knowledge-file-read-list) @@ -89,19 +89,19 @@ Request fields: --page int — Page number, 1-based. Accepted but currently ignored — the response always contains the full file list. --limit int — Page size. Accepted but currently ignored — the response always contains the full file list. --search-after-ctx string - --pack-id string — Knowledge pack ID; defaults to the caller's account-scope pack. + --pack-id string — Knowledge ID; defaults to the caller's account-scope knowledge. Response fields ('data' envelope is unwrapped — these fields are at the top level): - - files (array) (required) — Array of files in the specified knowledge pack; empty array when the pack has no files. + - files (array) (required) — Array of files in the specified knowledge; empty array when it has no files. - checksum (string) (required) — SHA-256 hex digest of the file content. - content_type (string) (required) — MIME type; inferred from the file extension when not set on upload. - file_id (string) (required) — File ID ('kfl_' prefix). - - pack_id (string) (required) — ID of the knowledge pack that contains the file. - - rel_path (string) (required) — Path relative to the pack root, e.g. 'runbooks/restart.md'. + - pack_id (string) (required) — ID of the knowledge that contains the file. + - rel_path (string) (required) — Path relative to the knowledge root, e.g. 'runbooks/restart.md'. - size_bytes (integer) (required) — File size in bytes. - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the file was last modified. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. - updated_by (integer) (required) — Person ID of the member who last modified the file. - - total (integer) (required) — Total number of files in the pack. + - total (integer) (required) — Total number of files in the knowledge. `, Example: ` flashduty safari knowledge-file-list --data '{"pack_id":"kpk_kE49k3FhecfJBwutbshEEc"}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -139,7 +139,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().Int64Var(&fP, "page", 0, "Page number, 1-based. Accepted but currently ignored — the response always contains the full file list.") cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size. Accepted but currently ignored — the response always contains the full file list.") cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") - cmd.Flags().StringVar(&fPackID, "pack-id", "", "Knowledge pack ID; defaults to the caller's account-scope pack.") + cmd.Flags().StringVar(&fPackID, "pack-id", "", "Knowledge ID; defaults to the caller's account-scope knowledge.") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -154,18 +154,18 @@ func genKnowledgeFileWriteDeleteCmd() *cobra.Command { Short: "Delete knowledge file", Long: `Delete knowledge file. -Delete a file from a knowledge pack by its relative path. +Delete a knowledge file by its relative path. API: POST /safari/knowledge/file/delete (knowledge-file-write-delete) Request fields: - --force bool — Delete even when other pack files reference this file; the referrers are then returned as warnings instead of blocking the delete. - --pack-id string — Knowledge pack ID; defaults to the caller's account-scope pack. - --rel-path string (required) — Path of the file relative to the pack root. + --force bool — Delete even when other knowledge files reference this file; the referrers are then returned as warnings instead of blocking the delete. + --pack-id string — Knowledge ID; defaults to the caller's account-scope knowledge. + --rel-path string (required) — Path of the file relative to the knowledge root. Response fields ('data' envelope is unwrapped — these fields are at the top level): - - warnings (array) — Non-blocking warnings after deletion; 'code=still_referenced_by' means the (force-)deleted file is still @ref-referenced by other files in the pack ('refs' lists the referrers). Absent when there are no warnings (omitempty). - - code (string) (required) — Warning code. One of: 'unresolved_reference' (an @ref in the written file's content points to a file that does not exist in the pack; 'ref' carries it), 'still_referenced_by' (the deleted file is still @ref-referenced by other files in the pack; 'refs' lists the referrers). [unresolved_reference, still_referenced_by] + - warnings (array) — Non-blocking warnings after deletion; 'code=still_referenced_by' means the (force-)deleted file is still @ref-referenced by other files in the knowledge ('refs' lists the referrers). Absent when there are no warnings (omitempty). + - code (string) (required) — Warning code. One of: 'unresolved_reference' (an @ref in the written file's content points to a file that does not exist in the knowledge; 'ref' carries it), 'still_referenced_by' (the deleted file is still @ref-referenced by other files in the knowledge; 'refs' lists the referrers). [unresolved_reference, still_referenced_by] - ref (string) — Single reference related to the warning. - refs (array) — Multiple references related to the warning. `, @@ -199,9 +199,9 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().BoolVar(&fForce, "force", false, "Delete even when other pack files reference this file; the referrers are then returned as warnings instead of blocking the delete.") - cmd.Flags().StringVar(&fPackID, "pack-id", "", "Knowledge pack ID; defaults to the caller's account-scope pack.") - cmd.Flags().StringVar(&fRelPath, "rel-path", "", "Path of the file relative to the pack root. (required)") + cmd.Flags().BoolVar(&fForce, "force", false, "Delete even when other knowledge files reference this file; the referrers are then returned as warnings instead of blocking the delete.") + cmd.Flags().StringVar(&fPackID, "pack-id", "", "Knowledge ID; defaults to the caller's account-scope knowledge.") + cmd.Flags().StringVar(&fRelPath, "rel-path", "", "Path of the file relative to the knowledge root. (required)") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -217,28 +217,28 @@ func genKnowledgeFileWritePutCmd() *cobra.Command { Short: "Upload knowledge file", Long: `Upload knowledge file. -Create or overwrite a file in a knowledge pack with base64-encoded content. +Create or overwrite a knowledge file with base64-encoded content. API: POST /safari/knowledge/file/put (knowledge-file-write-put) Request fields: --content-b64 string — Base64-encoded file content; must decode to valid UTF-8 text (binary is rejected). Per-file limit 1 MiB. --content-type string — MIME type; inferred from the file extension when omitted. - --pack-id string — Knowledge pack ID; defaults to the caller's account-scope pack. - --rel-path string (required) — Destination path relative to the pack root; existing files are overwritten. + --pack-id string — Knowledge ID; defaults to the caller's account-scope knowledge. + --rel-path string (required) — Destination path relative to the knowledge root; existing files are overwritten. Response fields ('data' envelope is unwrapped — these fields are at the top level): - - file (object) (required) — Metadata of one file inside a knowledge pack. Content is fetched separately via file/get. + - file (object) (required) — Metadata of one knowledge file. Content is fetched separately via file/get. - checksum (string) (required) — SHA-256 hex digest of the file content. - content_type (string) (required) — MIME type; inferred from the file extension when not set on upload. - file_id (string) (required) — File ID ('kfl_' prefix). - - pack_id (string) (required) — ID of the knowledge pack that contains the file. - - rel_path (string) (required) — Path relative to the pack root, e.g. 'runbooks/restart.md'. + - pack_id (string) (required) — ID of the knowledge that contains the file. + - rel_path (string) (required) — Path relative to the knowledge root, e.g. 'runbooks/restart.md'. - size_bytes (integer) (required) — File size in bytes. - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the file was last modified. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. - updated_by (integer) (required) — Person ID of the member who last modified the file. - - warnings (array) — Non-blocking warnings after a successful write; 'code=unresolved_reference' means an @ref in the file content points to a file that does not exist in the pack. Absent when there are no warnings (omitempty). - - code (string) (required) — Warning code. One of: 'unresolved_reference' (an @ref in the written file's content points to a file that does not exist in the pack; 'ref' carries it), 'still_referenced_by' (the deleted file is still @ref-referenced by other files in the pack; 'refs' lists the referrers). [unresolved_reference, still_referenced_by] + - warnings (array) — Non-blocking warnings after a successful write; 'code=unresolved_reference' means an @ref in the file content points to a file that does not exist in the knowledge. Absent when there are no warnings (omitempty). + - code (string) (required) — Warning code. One of: 'unresolved_reference' (an @ref in the written file's content points to a file that does not exist in the knowledge; 'ref' carries it), 'still_referenced_by' (the deleted file is still @ref-referenced by other files in the knowledge; 'refs' lists the referrers). [unresolved_reference, still_referenced_by] - ref (string) — Single reference related to the warning. - refs (array) — Multiple references related to the warning. `, @@ -277,8 +277,8 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le } cmd.Flags().StringVar(&fContentB64, "content-b64", "", "Base64-encoded file content; must decode to valid UTF-8 text (binary is rejected). Per-file limit 1 MiB.") cmd.Flags().StringVar(&fContentType, "content-type", "", "MIME type; inferred from the file extension when omitted.") - cmd.Flags().StringVar(&fPackID, "pack-id", "", "Knowledge pack ID; defaults to the caller's account-scope pack.") - cmd.Flags().StringVar(&fRelPath, "rel-path", "", "Destination path relative to the pack root; existing files are overwritten. (required)") + cmd.Flags().StringVar(&fPackID, "pack-id", "", "Knowledge ID; defaults to the caller's account-scope knowledge.") + cmd.Flags().StringVar(&fRelPath, "rel-path", "", "Destination path relative to the knowledge root; existing files are overwritten. (required)") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -287,37 +287,37 @@ func genKnowledgePackReadGetCmd() *cobra.Command { var dataJSON string cmd := &cobra.Command{ Use: "knowledge-get", - Short: "Get account knowledge pack", - Long: `Get account knowledge pack. + Short: "Get account knowledge", + Long: `Get account knowledge. -Return the account-scope knowledge pack metadata and its file list. +Return the metadata and file list of the account-scope knowledge. API: POST /safari/knowledge/get (knowledge-pack-read-get) Response fields ('data' envelope is unwrapped — these fields are at the top level): - - files (array) (required) — Array of files in this knowledge pack; empty array when the pack has no files. + - files (array) (required) — Array of files in this knowledge; empty array when it has no files. - checksum (string) (required) — SHA-256 hex digest of the file content. - content_type (string) (required) — MIME type; inferred from the file extension when not set on upload. - file_id (string) (required) — File ID ('kfl_' prefix). - - pack_id (string) (required) — ID of the knowledge pack that contains the file. - - rel_path (string) (required) — Path relative to the pack root, e.g. 'runbooks/restart.md'. + - pack_id (string) (required) — ID of the knowledge that contains the file. + - rel_path (string) (required) — Path relative to the knowledge root, e.g. 'runbooks/restart.md'. - size_bytes (integer) (required) — File size in bytes. - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the file was last modified. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. - updated_by (integer) (required) — Person ID of the member who last modified the file. - - pack (object) (required) — A knowledge pack — a versioned file tree staged into every AI SRE sandbox at session start. One pack exists per (account, scope, scope_id). - - account_id (integer) (required) — Account that owns the pack. - - can_edit (boolean) (required) — Whether the caller can edit this pack. - - created_at_ms (string) (required) — Unix timestamp in milliseconds when the pack was created. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. - - created_by (integer) (required) — Person ID of the member who created the pack. - - duty_version (integer) (required) — Pack version at which DUTY.md was last authored or re-affirmed. When 'version' is greater, DUTY.md no longer reflects every file in the pack. - - file_count (integer) (required) — Number of files in the pack. - - pack_id (string) (required) — Knowledge pack ID ('kpk_' prefix). - - scope (string) (required) — Pack scope. 'channel' is a legacy scope; new packs are 'account' or 'team'. [account, team, channel] + - pack (object) (required) — Knowledge — a versioned file tree staged into every AI SRE sandbox at session start. One knowledge exists per (account, scope, scope_id). + - account_id (integer) (required) — Account that owns the knowledge. + - can_edit (boolean) (required) — Whether the caller can edit this knowledge. + - created_at_ms (string) (required) — Unix timestamp in milliseconds when the knowledge was created. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - created_by (integer) (required) — Person ID of the member who created the knowledge. + - duty_version (integer) (required) — Knowledge version at which DUTY.md was last authored or re-affirmed. When 'version' is greater, DUTY.md no longer reflects every file in the knowledge. + - file_count (integer) (required) — Number of files in the knowledge. + - pack_id (string) (required) — Knowledge ID ('kpk_' prefix). + - scope (string) (required) — Knowledge scope. 'channel' is a legacy scope; new knowledge is 'account' or 'team' scope. [account, team, channel] - scope_id (integer) (required) — Scope owner: the account ID for 'account' scope, the team ID for 'team' scope. - team_name (string) — Display name of the owning team (team scope only). Omitted when empty (account scope, or the team name could not be resolved). - total_bytes (integer) (required) — Total size of all files in bytes. - - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the pack was last modified. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. - - version (integer) (required) — Pack version, incremented on every file change. + - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the knowledge was last modified. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - version (integer) (required) — Knowledge version, incremented on every file change. `, Example: ` flashduty safari knowledge-get --data '{}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -352,10 +352,10 @@ func genKnowledgePackReadListCmd() *cobra.Command { var fTeamIDs []int cmd := &cobra.Command{ Use: "knowledge-pack-list", - Short: "List knowledge packs", - Long: `List knowledge packs. + Short: "List knowledge", + Long: `List knowledge. -List knowledge packs visible to the caller across account and team scopes. +List the knowledge visible to the caller across account and team scopes. API: POST /safari/knowledge/pack/list (knowledge-pack-read-list) @@ -363,27 +363,27 @@ Request fields: --page int — Page number, 1-based; returns all results when both 'p' and 'limit' are unset. --limit int — Page size. --search-after-ctx string - --include-account bool — Include the account-scope pack; defaults to true. - --query string — Case-insensitive substring filter over pack ID, scope, scope ID/account ID, and team name. (≤128 chars) - --scope string — Restrict to one scope; 'all' (default) overrides 'include_account'. One of: 'all' (account scope plus visible team scopes), 'account' (account-level packs only), 'team' (team-level packs only, can be combined with 'team_ids'). [all, account, team] + --include-account bool — Include the account-scope knowledge; defaults to true. + --query string — Case-insensitive substring filter over knowledge ID, scope, scope ID/account ID, and team name. (≤128 chars) + --scope string — Restrict to one scope; 'all' (default) overrides 'include_account'. One of: 'all' (account scope plus visible team scopes), 'account' (account-level knowledge only), 'team' (team-level knowledge only, can be combined with 'team_ids'). [all, account, team] --team-ids []int — Restrict to these team IDs; for non-admins the list is intersected with their own teams. Response fields ('data' envelope is unwrapped — these fields are at the top level): - - packs (array) (required) — Array of visible knowledge packs after filtering (current page), used with 'total' for pagination. - - account_id (integer) (required) — Account that owns the pack. - - can_edit (boolean) (required) — Whether the caller can edit this pack. - - created_at_ms (string) (required) — Unix timestamp in milliseconds when the pack was created. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. - - created_by (integer) (required) — Person ID of the member who created the pack. - - duty_version (integer) (required) — Pack version at which DUTY.md was last authored or re-affirmed. When 'version' is greater, DUTY.md no longer reflects every file in the pack. - - file_count (integer) (required) — Number of files in the pack. - - pack_id (string) (required) — Knowledge pack ID ('kpk_' prefix). - - scope (string) (required) — Pack scope. 'channel' is a legacy scope; new packs are 'account' or 'team'. [account, team, channel] + - packs (array) (required) — Array of visible knowledge after filtering (current page), used with 'total' for pagination. + - account_id (integer) (required) — Account that owns the knowledge. + - can_edit (boolean) (required) — Whether the caller can edit this knowledge. + - created_at_ms (string) (required) — Unix timestamp in milliseconds when the knowledge was created. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - created_by (integer) (required) — Person ID of the member who created the knowledge. + - duty_version (integer) (required) — Knowledge version at which DUTY.md was last authored or re-affirmed. When 'version' is greater, DUTY.md no longer reflects every file in the knowledge. + - file_count (integer) (required) — Number of files in the knowledge. + - pack_id (string) (required) — Knowledge ID ('kpk_' prefix). + - scope (string) (required) — Knowledge scope. 'channel' is a legacy scope; new knowledge is 'account' or 'team' scope. [account, team, channel] - scope_id (integer) (required) — Scope owner: the account ID for 'account' scope, the team ID for 'team' scope. - team_name (string) — Display name of the owning team (team scope only). Omitted when empty (account scope, or the team name could not be resolved). - total_bytes (integer) (required) — Total size of all files in bytes. - - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the pack was last modified. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. - - version (integer) (required) — Pack version, incremented on every file change. - - total (integer) (required) — Total number of packs after filtering, before pagination. + - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the knowledge was last modified. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - version (integer) (required) — Knowledge version, incremented on every file change. + - total (integer) (required) — Total number of knowledge entries after filtering, before pagination. `, Example: ` flashduty safari knowledge-pack-list --data '{"include_account":true,"limit":20,"p":1,"scope":"all"}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -430,9 +430,9 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().Int64Var(&fP, "page", 0, "Page number, 1-based; returns all results when both 'p' and 'limit' are unset.") cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size.") cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") - cmd.Flags().BoolVar(&fIncludeAccount, "include-account", false, "Include the account-scope pack; defaults to true.") - cmd.Flags().StringVar(&fQuery, "query", "", "Case-insensitive substring filter over pack ID, scope, scope ID/account ID, and team name. (≤128 chars)") - cmd.Flags().StringVar(&fScope, "scope", "", "Restrict to one scope; 'all' (default) overrides 'include_account'. One of: 'all' (account scope plus visible team scopes), 'account' (account-level packs only), 'team' (team-level packs only, can be combined with 'team_ids'). [all, account, team]") + cmd.Flags().BoolVar(&fIncludeAccount, "include-account", false, "Include the account-scope knowledge; defaults to true.") + cmd.Flags().StringVar(&fQuery, "query", "", "Case-insensitive substring filter over knowledge ID, scope, scope ID/account ID, and team name. (≤128 chars)") + cmd.Flags().StringVar(&fScope, "scope", "", "Restrict to one scope; 'all' (default) overrides 'include_account'. One of: 'all' (account scope plus visible team scopes), 'account' (account-level knowledge only), 'team' (team-level knowledge only, can be combined with 'team_ids'). [all, account, team]") cmd.Flags().IntSliceVar(&fTeamIDs, "team-ids", nil, "Restrict to these team IDs; for non-admins the list is intersected with their own teams.") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd @@ -443,18 +443,18 @@ func genKnowledgePackWriteDeleteCmd() *cobra.Command { var fPackID string cmd := &cobra.Command{ Use: "knowledge-pack-delete ", - Short: "Delete knowledge pack", - Long: `Delete knowledge pack. + Short: "Delete knowledge", + Long: `Delete knowledge. -Delete a knowledge pack and all of its files. +Delete knowledge and all of its files. API: POST /safari/knowledge/pack/delete (knowledge-pack-write-delete) Request fields: - --pack-id string (required) — Knowledge pack ID to delete. + --pack-id string (required) — Knowledge ID to delete. Response fields ('data' envelope is unwrapped — these fields are at the top level): - - ok (boolean) (required) — True when the pack was deleted. + - ok (boolean) (required) — True when the knowledge was deleted. `, Args: requireBodyFieldOrExactArg("pack_id", "pack-id"), Example: ` flashduty safari knowledge-pack-delete --data '{"pack_id":"kpk_YqHXPTEUHQFGepUfRS7vsh"}'`, @@ -484,7 +484,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fPackID, "pack-id", "", "Knowledge pack ID to delete. (required)") + cmd.Flags().StringVar(&fPackID, "pack-id", "", "Knowledge ID to delete. (required)") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -495,31 +495,31 @@ func genKnowledgePackWriteEnsureCmd() *cobra.Command { var fScopeID int64 cmd := &cobra.Command{ Use: "knowledge-pack-ensure", - Short: "Ensure knowledge pack", - Long: `Ensure knowledge pack. + Short: "Ensure knowledge", + Long: `Ensure knowledge. -Idempotently create the knowledge pack at the given scope, or return the existing one. +Idempotently create the knowledge at the given scope, or return the existing one. API: POST /safari/knowledge/pack/ensure (knowledge-pack-write-ensure) Request fields: - --scope string (required) — Scope of the pack to ensure. One of: 'account' (account-level pack; scope_id is forced to the caller's account ID and only account admins may create it; first creation seeds a default DUTY.md), 'team' (team-level pack; the 'scope_id' team ID is required and the caller must belong to that team). [account, team] + --scope string (required) — Scope of the knowledge to ensure. One of: 'account' (account-level knowledge; scope_id is forced to the caller's account ID and only account admins may create it; first creation seeds a default DUTY.md), 'team' (team-level knowledge; the 'scope_id' team ID is required and the caller must belong to that team). [account, team] --scope-id int — Team ID; required for 'team' scope, ignored for 'account' scope. Response fields ('data' envelope is unwrapped — these fields are at the top level): - - account_id (integer) (required) — Account that owns the pack. - - can_edit (boolean) (required) — Whether the caller can edit this pack. - - created_at_ms (string) (required) — Unix timestamp in milliseconds when the pack was created. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. - - created_by (integer) (required) — Person ID of the member who created the pack. - - duty_version (integer) (required) — Pack version at which DUTY.md was last authored or re-affirmed. When 'version' is greater, DUTY.md no longer reflects every file in the pack. - - file_count (integer) (required) — Number of files in the pack. - - pack_id (string) (required) — Knowledge pack ID ('kpk_' prefix). - - scope (string) (required) — Pack scope. 'channel' is a legacy scope; new packs are 'account' or 'team'. [account, team, channel] + - account_id (integer) (required) — Account that owns the knowledge. + - can_edit (boolean) (required) — Whether the caller can edit this knowledge. + - created_at_ms (string) (required) — Unix timestamp in milliseconds when the knowledge was created. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - created_by (integer) (required) — Person ID of the member who created the knowledge. + - duty_version (integer) (required) — Knowledge version at which DUTY.md was last authored or re-affirmed. When 'version' is greater, DUTY.md no longer reflects every file in the knowledge. + - file_count (integer) (required) — Number of files in the knowledge. + - pack_id (string) (required) — Knowledge ID ('kpk_' prefix). + - scope (string) (required) — Knowledge scope. 'channel' is a legacy scope; new knowledge is 'account' or 'team' scope. [account, team, channel] - scope_id (integer) (required) — Scope owner: the account ID for 'account' scope, the team ID for 'team' scope. - team_name (string) — Display name of the owning team (team scope only). Omitted when empty (account scope, or the team name could not be resolved). - total_bytes (integer) (required) — Total size of all files in bytes. - - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the pack was last modified. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. - - version (integer) (required) — Pack version, incremented on every file change. + - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the knowledge was last modified. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - version (integer) (required) — Knowledge version, incremented on every file change. `, Example: ` flashduty safari knowledge-pack-ensure --data '{"scope":"team","scope_id":2477033058131}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -548,7 +548,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fScope, "scope", "", "Scope of the pack to ensure. One of: 'account' (account-level pack; scope_id is forced to the caller's account ID and only account admins may create it; first creation seeds a default DUTY.md), 'team' (team-level pack; the 'scope_id' team ID is required and the caller must belong to that team). (required) [account, team]") + cmd.Flags().StringVar(&fScope, "scope", "", "Scope of the knowledge to ensure. One of: 'account' (account-level knowledge; scope_id is forced to the caller's account ID and only account admins may create it; first creation seeds a default DUTY.md), 'team' (team-level knowledge; the 'scope_id' team ID is required and the caller must belong to that team). (required) [account, team]") cmd.Flags().Int64Var(&fScopeID, "scope-id", 0, "Team ID; required for 'team' scope, ignored for 'account' scope.") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd @@ -561,32 +561,32 @@ func genKnowledgePackWriteUpdateCmd() *cobra.Command { var fScopeID int64 cmd := &cobra.Command{ Use: "knowledge-pack-update ", - Short: "Update knowledge pack", - Long: `Update knowledge pack. + Short: "Update knowledge", + Long: `Update knowledge. -Move a knowledge pack to a different account or team scope. +Move knowledge to a different account or team scope. API: POST /safari/knowledge/pack/update (knowledge-pack-write-update) Request fields: - --pack-id string (required) — Knowledge pack ID to update. - --scope string — Destination scope; omit for a no-op that returns the current pack. [account, team] + --pack-id string (required) — Knowledge ID to update. + --scope string — Destination scope; omit for a no-op that returns the current knowledge. [account, team] --scope-id int — Destination team ID; required when 'scope' is 'team', set automatically for 'account'. Response fields ('data' envelope is unwrapped — these fields are at the top level): - - account_id (integer) (required) — Account that owns the pack. - - can_edit (boolean) (required) — Whether the caller can edit this pack. - - created_at_ms (string) (required) — Unix timestamp in milliseconds when the pack was created. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. - - created_by (integer) (required) — Person ID of the member who created the pack. - - duty_version (integer) (required) — Pack version at which DUTY.md was last authored or re-affirmed. When 'version' is greater, DUTY.md no longer reflects every file in the pack. - - file_count (integer) (required) — Number of files in the pack. - - pack_id (string) (required) — Knowledge pack ID ('kpk_' prefix). - - scope (string) (required) — Pack scope. 'channel' is a legacy scope; new packs are 'account' or 'team'. [account, team, channel] + - account_id (integer) (required) — Account that owns the knowledge. + - can_edit (boolean) (required) — Whether the caller can edit this knowledge. + - created_at_ms (string) (required) — Unix timestamp in milliseconds when the knowledge was created. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - created_by (integer) (required) — Person ID of the member who created the knowledge. + - duty_version (integer) (required) — Knowledge version at which DUTY.md was last authored or re-affirmed. When 'version' is greater, DUTY.md no longer reflects every file in the knowledge. + - file_count (integer) (required) — Number of files in the knowledge. + - pack_id (string) (required) — Knowledge ID ('kpk_' prefix). + - scope (string) (required) — Knowledge scope. 'channel' is a legacy scope; new knowledge is 'account' or 'team' scope. [account, team, channel] - scope_id (integer) (required) — Scope owner: the account ID for 'account' scope, the team ID for 'team' scope. - team_name (string) — Display name of the owning team (team scope only). Omitted when empty (account scope, or the team name could not be resolved). - total_bytes (integer) (required) — Total size of all files in bytes. - - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the pack was last modified. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. - - version (integer) (required) — Pack version, incremented on every file change. + - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the knowledge was last modified. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - version (integer) (required) — Knowledge version, incremented on every file change. `, Args: requireBodyFieldOrExactArg("pack_id", "pack-id"), Example: ` flashduty safari knowledge-pack-update --data '{"pack_id":"kpk_5qRL34nKtoWM4nQVT2kHzy","scope":"team","scope_id":2477033058131}'`, @@ -622,8 +622,8 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fPackID, "pack-id", "", "Knowledge pack ID to update. (required)") - cmd.Flags().StringVar(&fScope, "scope", "", "Destination scope; omit for a no-op that returns the current pack. [account, team]") + cmd.Flags().StringVar(&fPackID, "pack-id", "", "Knowledge ID to update. (required)") + cmd.Flags().StringVar(&fScope, "scope", "", "Destination scope; omit for a no-op that returns the current knowledge. [account, team]") cmd.Flags().Int64Var(&fScopeID, "scope-id", 0, "Destination team ID; required when 'scope' is 'team', set automatically for 'account'.") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd diff --git a/internal/cli/zz_generated_manifest.go b/internal/cli/zz_generated_manifest.go index 92784e8..1bb4a0e 100644 --- a/internal/cli/zz_generated_manifest.go +++ b/internal/cli/zz_generated_manifest.go @@ -145,6 +145,15 @@ var generatedOpIDs = []string{ "insightResponderExport", "insightTeamExport", "insightTopkAlertsByLabel", + "integration-api-read-info", + "integration-api-read-list", + "integration-api-read-type-list", + "integration-api-write-create", + "integration-api-write-delete", + "integration-api-write-disable", + "integration-api-write-enable", + "integration-api-write-rotate-key", + "integration-api-write-update", "knowledge-file-read-get", "knowledge-file-read-list", "knowledge-file-write-delete", @@ -185,6 +194,23 @@ var generatedOpIDs = []string{ "memberResetInfo", "memberRevokeRole", "memberUpdateRole", + "monit-dashboard-panel-read-preview", + "monit-dashboard-panel-read-run", + "monit-dashboard-query-read-resolve", + "monit-dashboard-read-get", + "monit-dashboard-read-list", + "monit-dashboard-read-outline", + "monit-dashboard-read-search", + "monit-dashboard-revision-read-get", + "monit-dashboard-revision-read-list", + "monit-dashboard-trash-read-list", + "monit-dashboard-variable-read-preview", + "monit-dashboard-variable-read-resolve", + "monit-dashboard-write-create", + "monit-dashboard-write-delete", + "monit-dashboard-write-move", + "monit-dashboard-write-restore", + "monit-dashboard-write-update", "monit-datasource-read-info", "monit-datasource-read-list", "monit-datasource-read-sls-logstores", @@ -193,6 +219,7 @@ var generatedOpIDs = []string{ "monit-datasource-write-create", "monit-datasource-write-delete", "monit-datasource-write-update", + "monit-folder-read-list", "monit-read-query-data", "monit-read-query-explore", "monit-rule-read-audit-detail", diff --git a/internal/cli/zz_generated_notification_templates.go b/internal/cli/zz_generated_notification_templates.go index b4934db..7a27e77 100644 --- a/internal/cli/zz_generated_notification_templates.go +++ b/internal/cli/zz_generated_notification_templates.go @@ -31,6 +31,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le - description (string) (required) — Free-form description. - dingtalk (string) (required) — DingTalk robot message template source. - dingtalk_app (string) (required) — DingTalk app message template source. + - dingtalk_app_war_room_enabled (boolean) (required) — Whether DingTalk app cards show the Create War Room button. Hidden for closed incidents and when the incident has no responders. - email (string) (required) — Email body template source (Go 'html/template' syntax). - feishu (string) (required) — Feishu robot message template source. - feishu_app (string) (required) — Feishu app message template source. @@ -41,6 +42,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le - incident_card_hidden_fields (object) (required) — Incident card fields hidden per IM app type; an empty object when none are configured. - slack (string) (required) — Slack robot message template source. - slack_app (string) (required) — Slack app message template source. + - slack_app_war_room_enabled (boolean) (required) — Whether Slack app cards show the Create War Room button. Hidden for closed incidents and when the incident has no responders. - sms (string) (required) — SMS template source (Go 'text/template' syntax). - status (string) (required) — Template lifecycle status. 'enabled' templates can be referenced by escalation policies for notifications; 'disabled' templates are no longer used for new notifications; 'deleted' templates are never returned by list endpoints. [enabled, disabled, deleted] - team_id (integer) (required) — ID of the team this template is scoped to, or 0 for account-wide. @@ -130,6 +132,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; - description (string) (required) — Free-form description. - dingtalk (string) (required) — DingTalk robot message template source. - dingtalk_app (string) (required) — DingTalk app message template source. + - dingtalk_app_war_room_enabled (boolean) (required) — Whether DingTalk app cards show the Create War Room button. Hidden for closed incidents and when the incident has no responders. - email (string) (required) — Email body template source (Go 'html/template' syntax). - feishu (string) (required) — Feishu robot message template source. - feishu_app (string) (required) — Feishu app message template source. @@ -140,6 +143,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; - incident_card_hidden_fields (object) (required) — Incident card fields hidden per IM app type; an empty object when none are configured. - slack (string) (required) — Slack robot message template source. - slack_app (string) (required) — Slack app message template source. + - slack_app_war_room_enabled (boolean) (required) — Whether Slack app cards show the Create War Room button. Hidden for closed incidents and when the incident has no responders. - sms (string) (required) — SMS template source (Go 'text/template' syntax). - status (string) (required) — Template lifecycle status. 'enabled' templates can be referenced by escalation policies for notifications; 'disabled' templates are no longer used for new notifications; 'deleted' templates are never returned by list endpoints. [enabled, disabled, deleted] - team_id (integer) (required) — ID of the team this template is scoped to, or 0 for account-wide. @@ -299,6 +303,7 @@ func genNotificationTemplatesWriteCreateCmd() *cobra.Command { var fDescription string var fDingtalk string var fDingtalkApp string + var fDingtalkAppWarRoomEnabled bool var fEmail string var fFeishu string var fFeishuApp string @@ -308,6 +313,7 @@ func genNotificationTemplatesWriteCreateCmd() *cobra.Command { var fIncidentCardClosedActionApps []string var fSlack string var fSlackApp string + var fSlackAppWarRoomEnabled bool var fSMS string var fTeamID int64 var fTeamsApp string @@ -331,6 +337,7 @@ Request fields: --description string — Free-form description. Up to 500 characters. (≤500 chars) --dingtalk string — DingTalk robot message template source. --dingtalk-app string — DingTalk app message template source. + --dingtalk-app-war-room-enabled bool — Show the Create War Room button on DingTalk app cards. --email string — Email body template source (Go 'html/template' syntax). --feishu string — Feishu robot message template source. --feishu-app string — Feishu app message template source. @@ -340,6 +347,7 @@ Request fields: --incident-card-closed-action-apps []string — IM apps whose closed-incident cards keep the custom action buttons. Supported values: 'feishu_app', 'dingtalk_app', 'wecom_app', 'slack_app', 'teams_app'. An empty list hides the buttons on every app. [feishu_app, dingtalk_app, wecom_app, slack_app, teams_app] --slack string — Slack robot message template source. --slack-app string — Slack app message template source. + --slack-app-war-room-enabled bool — Show the Create War Room button on Slack app cards. --sms string — SMS template source (Go 'text/template' syntax). --team-id int — Team scope. 0 for account-wide. --teams-app string — Microsoft Teams app message template source. @@ -369,6 +377,9 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le if cmd.Flags().Changed("dingtalk-app") { body["dingtalk_app"] = fDingtalkApp } + if cmd.Flags().Changed("dingtalk-app-war-room-enabled") { + body["dingtalk_app_war_room_enabled"] = fDingtalkAppWarRoomEnabled + } if cmd.Flags().Changed("email") { body["email"] = fEmail } @@ -396,6 +407,9 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le if cmd.Flags().Changed("slack-app") { body["slack_app"] = fSlackApp } + if cmd.Flags().Changed("slack-app-war-room-enabled") { + body["slack_app_war_room_enabled"] = fSlackAppWarRoomEnabled + } if cmd.Flags().Changed("sms") { body["sms"] = fSMS } @@ -446,6 +460,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().StringVar(&fDescription, "description", "", "Free-form description. Up to 500 characters. (≤500 chars)") cmd.Flags().StringVar(&fDingtalk, "dingtalk", "", "DingTalk robot message template source.") cmd.Flags().StringVar(&fDingtalkApp, "dingtalk-app", "", "DingTalk app message template source.") + cmd.Flags().BoolVar(&fDingtalkAppWarRoomEnabled, "dingtalk-app-war-room-enabled", false, "Show the Create War Room button on DingTalk app cards.") cmd.Flags().StringVar(&fEmail, "email", "", "Email body template source (Go 'html/template' syntax).") cmd.Flags().StringVar(&fFeishu, "feishu", "", "Feishu robot message template source.") cmd.Flags().StringVar(&fFeishuApp, "feishu-app", "", "Feishu app message template source.") @@ -455,6 +470,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().StringSliceVar(&fIncidentCardClosedActionApps, "incident-card-closed-action-apps", nil, "IM apps whose closed-incident cards keep the custom action buttons. Supported values: 'feishu_app', 'dingtalk_app', 'wecom_app', 'slack_app', 'teams_app'. An empty list hides the buttons on every app. [feishu_app, dingtalk_app, wecom_app, slack_app, teams_app]") cmd.Flags().StringVar(&fSlack, "slack", "", "Slack robot message template source.") cmd.Flags().StringVar(&fSlackApp, "slack-app", "", "Slack app message template source.") + cmd.Flags().BoolVar(&fSlackAppWarRoomEnabled, "slack-app-war-room-enabled", false, "Show the Create War Room button on Slack app cards.") cmd.Flags().StringVar(&fSMS, "sms", "", "SMS template source (Go 'text/template' syntax).") cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Team scope. 0 for account-wide.") cmd.Flags().StringVar(&fTeamsApp, "teams-app", "", "Microsoft Teams app message template source.") @@ -526,6 +542,7 @@ func genNotificationTemplatesWriteUpdateCmd() *cobra.Command { var fDescription string var fDingtalk string var fDingtalkApp string + var fDingtalkAppWarRoomEnabled bool var fEmail string var fFeishu string var fFeishuApp string @@ -535,6 +552,7 @@ func genNotificationTemplatesWriteUpdateCmd() *cobra.Command { var fIncidentCardClosedActionApps []string var fSlack string var fSlackApp string + var fSlackAppWarRoomEnabled bool var fSMS string var fTeamID int64 var fTeamsApp string @@ -559,6 +577,7 @@ Request fields: --description string — Free-form description. Up to 500 characters. Omit to keep the current content; send an empty string to clear it. (≤500 chars) --dingtalk string — DingTalk robot message template source. Omit to keep the current content; send an empty string to clear it. --dingtalk-app string — DingTalk app message template source. Omit to keep the current content; send an empty string to clear it. + --dingtalk-app-war-room-enabled bool — When set, show or hide the Create War Room button on DingTalk app cards. Omit to keep the existing setting. --email string — Email body template source (Go 'html/template' syntax). Omit to keep the current content; send an empty string to clear it. --feishu string — Feishu robot message template source. Omit to keep the current content; send an empty string to clear it. --feishu-app string — Feishu app message template source. Omit to keep the current content; send an empty string to clear it. @@ -568,6 +587,7 @@ Request fields: --incident-card-closed-action-apps []string — Replaces the retained-app list when sent. Supported values: 'feishu_app', 'dingtalk_app', 'wecom_app', 'slack_app', 'teams_app'. Omit the field to leave it unchanged. [feishu_app, dingtalk_app, wecom_app, slack_app, teams_app] --slack string — Slack robot message template source. Omit to keep the current content; send an empty string to clear it. --slack-app string — Slack app message template source. Omit to keep the current content; send an empty string to clear it. + --slack-app-war-room-enabled bool — When set, show or hide the Create War Room button on Slack app cards. Omit to keep the existing setting. --sms string — SMS template source (Go 'text/template' syntax). Omit to keep the current content; send an empty string to clear it. --team-id int — Team scope. 0 for account-wide. Omit to keep the template's current team. --teams-app string — Microsoft Teams app message template source. Omit to keep the current content; send an empty string to clear it. @@ -598,6 +618,9 @@ Request fields: if cmd.Flags().Changed("dingtalk-app") { body["dingtalk_app"] = fDingtalkApp } + if cmd.Flags().Changed("dingtalk-app-war-room-enabled") { + body["dingtalk_app_war_room_enabled"] = fDingtalkAppWarRoomEnabled + } if cmd.Flags().Changed("email") { body["email"] = fEmail } @@ -625,6 +648,9 @@ Request fields: if cmd.Flags().Changed("slack-app") { body["slack_app"] = fSlackApp } + if cmd.Flags().Changed("slack-app-war-room-enabled") { + body["slack_app_war_room_enabled"] = fSlackAppWarRoomEnabled + } if cmd.Flags().Changed("sms") { body["sms"] = fSMS } @@ -682,6 +708,7 @@ Request fields: cmd.Flags().StringVar(&fDescription, "description", "", "Free-form description. Up to 500 characters. Omit to keep the current content; send an empty string to clear it. (≤500 chars)") cmd.Flags().StringVar(&fDingtalk, "dingtalk", "", "DingTalk robot message template source. Omit to keep the current content; send an empty string to clear it.") cmd.Flags().StringVar(&fDingtalkApp, "dingtalk-app", "", "DingTalk app message template source. Omit to keep the current content; send an empty string to clear it.") + cmd.Flags().BoolVar(&fDingtalkAppWarRoomEnabled, "dingtalk-app-war-room-enabled", false, "When set, show or hide the Create War Room button on DingTalk app cards. Omit to keep the existing setting.") cmd.Flags().StringVar(&fEmail, "email", "", "Email body template source (Go 'html/template' syntax). Omit to keep the current content; send an empty string to clear it.") cmd.Flags().StringVar(&fFeishu, "feishu", "", "Feishu robot message template source. Omit to keep the current content; send an empty string to clear it.") cmd.Flags().StringVar(&fFeishuApp, "feishu-app", "", "Feishu app message template source. Omit to keep the current content; send an empty string to clear it.") @@ -691,6 +718,7 @@ Request fields: cmd.Flags().StringSliceVar(&fIncidentCardClosedActionApps, "incident-card-closed-action-apps", nil, "Replaces the retained-app list when sent. Supported values: 'feishu_app', 'dingtalk_app', 'wecom_app', 'slack_app', 'teams_app'. Omit the field to leave it unchanged. [feishu_app, dingtalk_app, wecom_app, slack_app, teams_app]") cmd.Flags().StringVar(&fSlack, "slack", "", "Slack robot message template source. Omit to keep the current content; send an empty string to clear it.") cmd.Flags().StringVar(&fSlackApp, "slack-app", "", "Slack app message template source. Omit to keep the current content; send an empty string to clear it.") + cmd.Flags().BoolVar(&fSlackAppWarRoomEnabled, "slack-app-war-room-enabled", false, "When set, show or hide the Create War Room button on Slack app cards. Omit to keep the existing setting.") cmd.Flags().StringVar(&fSMS, "sms", "", "SMS template source (Go 'text/template' syntax). Omit to keep the current content; send an empty string to clear it.") cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Team scope. 0 for account-wide. Omit to keep the template's current team.") cmd.Flags().StringVar(&fTeamsApp, "teams-app", "", "Microsoft Teams app message template source. Omit to keep the current content; send an empty string to clear it.") diff --git a/internal/cli/zz_generated_register.go b/internal/cli/zz_generated_register.go index 001feab..6cb459f 100644 --- a/internal/cli/zz_generated_register.go +++ b/internal/cli/zz_generated_register.go @@ -15,8 +15,10 @@ func registerGenerated(root *cobra.Command) { registerGeneratedSessions(root) registerGeneratedSkills(root) registerGeneratedAlertRules(root) + registerGeneratedDashboards(root) registerGeneratedDataSources(root) registerGeneratedDiagnostics(root) + registerGeneratedRuleFolders(root) registerGeneratedAlertEnrichment(root) registerGeneratedAlerts(root) registerGeneratedAnalytics(root) diff --git a/internal/cli/zz_generated_response_help.go b/internal/cli/zz_generated_response_help.go index 8fc3965..db2e961 100644 --- a/internal/cli/zz_generated_response_help.go +++ b/internal/cli/zz_generated_response_help.go @@ -49,9 +49,9 @@ var responseHelpBySDKMethod = map[string]string{ "Applications.ReadInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) — Account ID.\n - alerting (object) — Alerting configuration of the application.\n - channel_ids (array) — Channel IDs to send alerts to. Used only when `delivery_mode` is `oncall`.\n - delivery_mode (string) — Alert delivery channel: `oncall` routes alert events through Flashduty On-call, `webhook` POSTs them directly to `webhook_url`. An empty value is treated as `oncall`, and on create/update it is persisted as the deployment default (`webhook` on RUM-only on-premises deployments, `oncall` otherwise). Omitted when empty (legacy rows). [oncall, webhook]\n - enabled (boolean) (required) — Whether alerting is enabled.\n - integration_id (integer) — Associated on-call integration ID (read-only, auto-assigned on save when `delivery_mode` is `oncall`).\n - webhook_url (string) — URL that receives alert events when `delivery_mode` is `webhook`; required in that mode, ignored otherwise. Omitted when empty.\n - application_id (string) — Unique application ID.\n - application_name (string) — Application display name.\n - client_token (string) — Token used to initialize the RUM SDK.\n - created_at (string) — Creation timestamp, Unix epoch milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (integer) — Creator member ID.\n - is_private (boolean) — If `true`, the application is only accessible to team members.\n - links (object) — External-link integration configuration.\n - enabled (boolean) (required) — Whether external link integration is enabled.\n - systems (array) — External systems whose URL templates can be opened from matching RUM events.\n - enabled (boolean) (required) — Whether this external system link is enabled.\n - event_types (array) (required) — RUM event types where this external system link is shown; at least one is required. | Value | Meaning | |---|---| | `crash` | Crash events (errors flagged `is_crash`) | | `error` | Error events | | `view` | Page/screen view events | | `action` | User action events | | `resource` | Resource load events | | `session` | Session events | | `all` | All event types | [crash, error, view, action, resource, session, all]\n - icon_color (string) — Display color for the link icon.\n - icon_text (string) — Short text shown in the link icon.\n - id (string) — Stable client-side identifier for this external system.\n - name (string) (required) — Display name of the external system.\n - url (string) (required) — HTTP or HTTPS URL template. `${var}` tokens are resolved from the RUM event context.\n - no_geo (boolean) — If `true`, geographic location is not inferred from IP.\n - no_ip (boolean) — If `true`, IP addresses are not collected.\n - repositories (array) — Linked source code repositories, in order; the first entry is the primary repository. Linking grants no access by itself: AI sessions can only read repositories granted to the account's GitHub App installations.\n - repo (string) (required) — GitHub repository in `owner/name` form.\n - subdir (string) — Directory holding the application inside the repository, relative to the repository root. `.` is the repository root; an empty value is saved as `.`.\n - status (string) — Application status. One of `enabled` (active, receiving data), `disabled` (deactivated), `deleted` (soft-delete marker; every query filters it out, so it never actually appears in responses). [enabled, disabled, deleted]\n - team_id (integer) — Owning team ID.\n - tracing (object) — APM tracing integration configuration.\n - enabled (boolean) (required) — Whether tracing integration is enabled.\n - endpoint (string) (required) — Trace endpoint URL (http or https).\n - open_type (string) (required) — How to open the trace link. One of `popup` (open trace details in a popup) or `tab` (open in a new browser tab). [popup, tab]\n - type (string) — Platform identifier: | Value | Meaning | |---|---| | `browser` | Web browser application (JavaScript SDK) | | `ios` | Apple iOS application | | `android` | Android application | | `react-native` | React Native application | | `flutter` | Flutter application | | `kotlin-multiplatform` | Kotlin Multiplatform application | | `roku` | Roku channel application | | `unity` | Unity application | | `miniprogram` | WeChat mini program | | `harmony` | HarmonyOS application | | `electron` | Electron desktop application | [browser, ios, android, react-native, flutter, kotlin-multiplatform, roku, unity, miniprogram, harmony, electron]\n - updated_at (string) — Last update timestamp, Unix epoch milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) — Last updater member ID.\n", "Applications.ReadInfos": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) — Account ID.\n - alerting (object) — Alerting configuration of the application.\n - channel_ids (array) — Channel IDs to send alerts to. Used only when `delivery_mode` is `oncall`.\n - delivery_mode (string) — Alert delivery channel: `oncall` routes alert events through Flashduty On-call, `webhook` POSTs them directly to `webhook_url`. An empty value is treated as `oncall`, and on create/update it is persisted as the deployment default (`webhook` on RUM-only on-premises deployments, `oncall` otherwise). Omitted when empty (legacy rows). [oncall, webhook]\n - enabled (boolean) (required) — Whether alerting is enabled.\n - integration_id (integer) — Associated on-call integration ID (read-only, auto-assigned on save when `delivery_mode` is `oncall`).\n - webhook_url (string) — URL that receives alert events when `delivery_mode` is `webhook`; required in that mode, ignored otherwise. Omitted when empty.\n - application_id (string) — Unique application ID.\n - application_name (string) — Application display name.\n - client_token (string) — Token used to initialize the RUM SDK.\n - created_at (string) — Creation timestamp, Unix epoch milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (integer) — Creator member ID.\n - is_private (boolean) — If `true`, the application is only accessible to team members.\n - links (object) — External-link integration configuration.\n - enabled (boolean) (required) — Whether external link integration is enabled.\n - systems (array) — External systems whose URL templates can be opened from matching RUM events.\n - enabled (boolean) (required) — Whether this external system link is enabled.\n - event_types (array) (required) — RUM event types where this external system link is shown; at least one is required. | Value | Meaning | |---|---| | `crash` | Crash events (errors flagged `is_crash`) | | `error` | Error events | | `view` | Page/screen view events | | `action` | User action events | | `resource` | Resource load events | | `session` | Session events | | `all` | All event types | [crash, error, view, action, resource, session, all]\n - icon_color (string) — Display color for the link icon.\n - icon_text (string) — Short text shown in the link icon.\n - id (string) — Stable client-side identifier for this external system.\n - name (string) (required) — Display name of the external system.\n - url (string) (required) — HTTP or HTTPS URL template. `${var}` tokens are resolved from the RUM event context.\n - no_geo (boolean) — If `true`, geographic location is not inferred from IP.\n - no_ip (boolean) — If `true`, IP addresses are not collected.\n - repositories (array) — Linked source code repositories, in order; the first entry is the primary repository. Linking grants no access by itself: AI sessions can only read repositories granted to the account's GitHub App installations.\n - repo (string) (required) — GitHub repository in `owner/name` form.\n - subdir (string) — Directory holding the application inside the repository, relative to the repository root. `.` is the repository root; an empty value is saved as `.`.\n - status (string) — Application status. One of `enabled` (active, receiving data), `disabled` (deactivated), `deleted` (soft-delete marker; every query filters it out, so it never actually appears in responses). [enabled, disabled, deleted]\n - team_id (integer) — Owning team ID.\n - tracing (object) — APM tracing integration configuration.\n - enabled (boolean) (required) — Whether tracing integration is enabled.\n - endpoint (string) (required) — Trace endpoint URL (http or https).\n - open_type (string) (required) — How to open the trace link. One of `popup` (open trace details in a popup) or `tab` (open in a new browser tab). [popup, tab]\n - type (string) — Platform identifier: | Value | Meaning | |---|---| | `browser` | Web browser application (JavaScript SDK) | | `ios` | Apple iOS application | | `android` | Android application | | `react-native` | React Native application | | `flutter` | Flutter application | | `kotlin-multiplatform` | Kotlin Multiplatform application | | `roku` | Roku channel application | | `unity` | Unity application | | `miniprogram` | WeChat mini program | | `harmony` | HarmonyOS application | | `electron` | Electron desktop application | [browser, ios, android, react-native, flutter, kotlin-multiplatform, roku, unity, miniprogram, harmony, electron]\n - updated_at (string) — Last update timestamp, Unix epoch milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) — Last updater member ID.\n", "Applications.ReadList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) — Account ID.\n - alerting (object) — Alerting configuration of the application.\n - channel_ids (array) — Channel IDs to send alerts to. Used only when `delivery_mode` is `oncall`.\n - delivery_mode (string) — Alert delivery channel: `oncall` routes alert events through Flashduty On-call, `webhook` POSTs them directly to `webhook_url`. An empty value is treated as `oncall`, and on create/update it is persisted as the deployment default (`webhook` on RUM-only on-premises deployments, `oncall` otherwise). Omitted when empty (legacy rows). [oncall, webhook]\n - enabled (boolean) (required) — Whether alerting is enabled.\n - integration_id (integer) — Associated on-call integration ID (read-only, auto-assigned on save when `delivery_mode` is `oncall`).\n - webhook_url (string) — URL that receives alert events when `delivery_mode` is `webhook`; required in that mode, ignored otherwise. Omitted when empty.\n - application_id (string) — Unique application ID.\n - application_name (string) — Application display name.\n - client_token (string) — Token used to initialize the RUM SDK.\n - created_at (string) — Creation timestamp, Unix epoch milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (integer) — Creator member ID.\n - is_private (boolean) — If `true`, the application is only accessible to team members.\n - links (object) — External-link integration configuration.\n - enabled (boolean) (required) — Whether external link integration is enabled.\n - systems (array) — External systems whose URL templates can be opened from matching RUM events.\n - enabled (boolean) (required) — Whether this external system link is enabled.\n - event_types (array) (required) — RUM event types where this external system link is shown; at least one is required. | Value | Meaning | |---|---| | `crash` | Crash events (errors flagged `is_crash`) | | `error` | Error events | | `view` | Page/screen view events | | `action` | User action events | | `resource` | Resource load events | | `session` | Session events | | `all` | All event types | [crash, error, view, action, resource, session, all]\n - icon_color (string) — Display color for the link icon.\n - icon_text (string) — Short text shown in the link icon.\n - id (string) — Stable client-side identifier for this external system.\n - name (string) (required) — Display name of the external system.\n - url (string) (required) — HTTP or HTTPS URL template. `${var}` tokens are resolved from the RUM event context.\n - no_geo (boolean) — If `true`, geographic location is not inferred from IP.\n - no_ip (boolean) — If `true`, IP addresses are not collected.\n - repositories (array) — Linked source code repositories, in order; the first entry is the primary repository. Linking grants no access by itself: AI sessions can only read repositories granted to the account's GitHub App installations.\n - repo (string) (required) — GitHub repository in `owner/name` form.\n - subdir (string) — Directory holding the application inside the repository, relative to the repository root. `.` is the repository root; an empty value is saved as `.`.\n - status (string) — Application status. One of `enabled` (active, receiving data), `disabled` (deactivated), `deleted` (soft-delete marker; every query filters it out, so it never actually appears in responses). [enabled, disabled, deleted]\n - team_id (integer) — Owning team ID.\n - tracing (object) — APM tracing integration configuration.\n - enabled (boolean) (required) — Whether tracing integration is enabled.\n - endpoint (string) (required) — Trace endpoint URL (http or https).\n - open_type (string) (required) — How to open the trace link. One of `popup` (open trace details in a popup) or `tab` (open in a new browser tab). [popup, tab]\n - type (string) — Platform identifier: | Value | Meaning | |---|---| | `browser` | Web browser application (JavaScript SDK) | | `ios` | Apple iOS application | | `android` | Android application | | `react-native` | React Native application | | `flutter` | Flutter application | | `kotlin-multiplatform` | Kotlin Multiplatform application | | `roku` | Roku channel application | | `unity` | Unity application | | `miniprogram` | WeChat mini program | | `harmony` | HarmonyOS application | | `electron` | Electron desktop application | [browser, ios, android, react-native, flutter, kotlin-multiplatform, roku, unity, miniprogram, harmony, electron]\n - updated_at (string) — Last update timestamp, Unix epoch milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) — Last updater member ID.\n", - "Applications.RemoteConfigReadGet": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - config (object) — The whole per-application remote configuration. A change reaches an SDK asynchronously and is applied when that SDK creates its next session, so a running session never flips a decision mid-flight.\n - activation (string) — How a change lands on a client that is already running: `next_session` (the default, and what an empty value means) leaves running sessions untouched and applies the change to new sessions; `immediate` ends the running session as soon as the change arrives so a new session starts under the new configuration. [next_session, immediate]\n - custom (object) — Application-defined pass-through values handed to the host app verbatim. At most 5 keys, each key up to 64 bytes, each value up to 4 KB of JSON nested at most 3 levels, 16 KB in total. Anyone holding the public client token can read it.\n - default (object) — The SDK knobs a configuration can set. Every field is optional: a value absent from both rule and default is omitted from the SDK response, which tells the SDK to keep its init value.\n - defaultPrivacyLevel (string) — How Session Replay masks a page by default. [mask, mask-user-input, allow]\n - sessionReplaySampleRate (integer) — Session Replay sampling rate (0-100). (0-100)\n - sessionSampleRate (integer) — Session sampling rate (0-100). (0-100)\n - traceSampleRate (integer) — Trace sampling rate (0-100): which sessions inject trace headers into their requests. (0-100)\n - enabled (boolean) — Kill switch. When false the engine reports no values at all and SDKs fall back to their init values.\n - refresh_on_foreground (boolean) — Let clients re-check the configuration when they return to the foreground instead of waiting for the next poll.\n - rules (array) — Targeting rules, evaluated in order; at most 20 per application.\n - match (object) (required) — Key/value conditions the SDK's config request must equal. Keys are limited to `env`, `app_version` and `sdk`; values are at most 256 bytes.\n - set (object) (required) — The SDK knobs a configuration can set. Every field is optional: a value absent from both rule and default is omitted from the SDK response, which tells the SDK to keep its init value.\n - defaultPrivacyLevel (string) — How Session Replay masks a page by default. [mask, mask-user-input, allow]\n - sessionReplaySampleRate (integer) — Session Replay sampling rate (0-100). (0-100)\n - sessionSampleRate (integer) — Session sampling rate (0-100). (0-100)\n - traceSampleRate (integer) — Trace sampling rate (0-100): which sessions inject trace headers into their requests. (0-100)\n - updated_at (string) — Unix timestamp in milliseconds - when the current version was published. 0 when never configured. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - version (integer) — Version the live configuration is stored under. 0 means the application has never been configured.\n", - "Applications.RemoteConfigReadHistoryList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - config (object) — The whole per-application remote configuration. A change reaches an SDK asynchronously and is applied when that SDK creates its next session, so a running session never flips a decision mid-flight.\n - activation (string) — How a change lands on a client that is already running: `next_session` (the default, and what an empty value means) leaves running sessions untouched and applies the change to new sessions; `immediate` ends the running session as soon as the change arrives so a new session starts under the new configuration. [next_session, immediate]\n - custom (object) — Application-defined pass-through values handed to the host app verbatim. At most 5 keys, each key up to 64 bytes, each value up to 4 KB of JSON nested at most 3 levels, 16 KB in total. Anyone holding the public client token can read it.\n - default (object) — The SDK knobs a configuration can set. Every field is optional: a value absent from both rule and default is omitted from the SDK response, which tells the SDK to keep its init value.\n - defaultPrivacyLevel (string) — How Session Replay masks a page by default. [mask, mask-user-input, allow]\n - sessionReplaySampleRate (integer) — Session Replay sampling rate (0-100). (0-100)\n - sessionSampleRate (integer) — Session sampling rate (0-100). (0-100)\n - traceSampleRate (integer) — Trace sampling rate (0-100): which sessions inject trace headers into their requests. (0-100)\n - enabled (boolean) — Kill switch. When false the engine reports no values at all and SDKs fall back to their init values.\n - refresh_on_foreground (boolean) — Let clients re-check the configuration when they return to the foreground instead of waiting for the next poll.\n - rules (array) — Targeting rules, evaluated in order; at most 20 per application.\n - match (object) (required) — Key/value conditions the SDK's config request must equal. Keys are limited to `env`, `app_version` and `sdk`; values are at most 256 bytes.\n - set (object) (required) — The SDK knobs a configuration can set. Every field is optional: a value absent from both rule and default is omitted from the SDK response, which tells the SDK to keep its init value.\n - content_hash (string) — Hash of the configuration content; lets the console identify versions with identical content.\n - equivalent_to (integer) — Earliest version carrying the same content, when that is not this version itself.\n - reason (string) — Operator's note left when the version was published. Empty when none was given.\n - updated_at (string) — Unix timestamp in milliseconds - when the version was published. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) — ID of the member who published the version.\n - updated_by_name (string) — Name of the member who published the version.\n - version (integer) — Version number, unique within the application.\n", - "Applications.RemoteConfigReadPreview": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - hit_rule_index (integer) — 0-based index of the rule that decided the result, or -1 when only the default applied.\n - values (object) — The SDK knobs a configuration can set. Every field is optional: a value absent from both rule and default is omitted from the SDK response, which tells the SDK to keep its init value.\n - defaultPrivacyLevel (string) — How Session Replay masks a page by default. [mask, mask-user-input, allow]\n - sessionReplaySampleRate (integer) — Session Replay sampling rate (0-100). (0-100)\n - sessionSampleRate (integer) — Session sampling rate (0-100). (0-100)\n - traceSampleRate (integer) — Trace sampling rate (0-100): which sessions inject trace headers into their requests. (0-100)\n", + "Applications.RemoteConfigReadGet": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - config (object) — The whole per-application remote configuration. A change reaches an SDK asynchronously and is applied when that SDK creates its next session, so a running session never flips a decision mid-flight.\n - activation (string) — How a change lands on a client that is already running: `next_session` (the default, and what an empty value means) leaves running sessions untouched and applies the change to new sessions; `immediate` ends the running session as soon as the change arrives so a new session starts under the new configuration. [next_session, immediate]\n - custom (object) — Application-defined pass-through values handed to the host app verbatim. At most 5 keys, each key up to 64 bytes, each value up to 4 KB of JSON nested at most 3 levels, 16 KB in total. Anyone holding the public client token can read it.\n - default (object) — The SDK knobs a configuration can set. Every field is optional: a value absent from both rule and default is omitted from the SDK response, which tells the SDK to keep its init value.\n - defaultPrivacyLevel (string) — How Session Replay masks a page by default. [mask, mask-user-input, allow]\n - sessionOnError (boolean) — Keep sessions the session sample rate did not draw when they report an error; applies only to sessions that rate missed, so it does nothing alongside a rate of 100.\n - sessionReplayOnError (boolean) — The same switch for Session Replay: un-sampled sessions still record and upload their recording only when the session errors.\n - sessionReplaySampleRate (integer) — Session Replay sampling rate (0-100). (0-100)\n - sessionSampleRate (integer) — Session sampling rate (0-100). (0-100)\n - traceSampleRate (integer) — Trace sampling rate (0-100): which sessions inject trace headers into their requests. (0-100)\n - enabled (boolean) — Kill switch. When false the engine reports no values at all and SDKs fall back to their init values.\n - refresh_on_foreground (boolean) — Let clients re-check the configuration when they return to the foreground instead of waiting for the next poll.\n - rules (array) — Targeting rules, evaluated in order; at most 20 per application.\n - match (object) (required) — Key/value conditions the SDK's config request must equal. Keys are limited to `env`, `app_version` and `sdk`; values are at most 256 bytes.\n - set (object) (required) — The SDK knobs a configuration can set. Every field is optional: a value absent from both rule and default is omitted from the SDK response, which tells the SDK to keep its init value.\n - defaultPrivacyLevel (string) — How Session Replay masks a page by default. [mask, mask-user-input, allow]\n - sessionOnError (boolean) — Keep sessions the session sample rate did not draw when they report an error; applies only to sessions that rate missed, so it does nothing alongside a rate of 100.\n - sessionReplayOnError (boolean) — The same switch for Session Replay: un-sampled sessions still record and upload their recording only when the session errors.\n - sessionReplaySampleRate (integer) — Session Replay sampling rate (0-100). (0-100)\n - sessionSampleRate (integer) — Session sampling rate (0-100). (0-100)\n - traceSampleRate (integer) — Trace sampling rate (0-100): which sessions inject trace headers into their requests. (0-100)\n - updated_at (string) — Unix timestamp in milliseconds - when the current version was published. 0 when never configured. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - version (integer) — Version the live configuration is stored under. 0 means the application has never been configured.\n", + "Applications.RemoteConfigReadHistoryList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - config (object) — The whole per-application remote configuration. A change reaches an SDK asynchronously and is applied when that SDK creates its next session, so a running session never flips a decision mid-flight.\n - activation (string) — How a change lands on a client that is already running: `next_session` (the default, and what an empty value means) leaves running sessions untouched and applies the change to new sessions; `immediate` ends the running session as soon as the change arrives so a new session starts under the new configuration. [next_session, immediate]\n - custom (object) — Application-defined pass-through values handed to the host app verbatim. At most 5 keys, each key up to 64 bytes, each value up to 4 KB of JSON nested at most 3 levels, 16 KB in total. Anyone holding the public client token can read it.\n - default (object) — The SDK knobs a configuration can set. Every field is optional: a value absent from both rule and default is omitted from the SDK response, which tells the SDK to keep its init value.\n - defaultPrivacyLevel (string) — How Session Replay masks a page by default. [mask, mask-user-input, allow]\n - sessionOnError (boolean) — Keep sessions the session sample rate did not draw when they report an error; applies only to sessions that rate missed, so it does nothing alongside a rate of 100.\n - sessionReplayOnError (boolean) — The same switch for Session Replay: un-sampled sessions still record and upload their recording only when the session errors.\n - sessionReplaySampleRate (integer) — Session Replay sampling rate (0-100). (0-100)\n - sessionSampleRate (integer) — Session sampling rate (0-100). (0-100)\n - traceSampleRate (integer) — Trace sampling rate (0-100): which sessions inject trace headers into their requests. (0-100)\n - enabled (boolean) — Kill switch. When false the engine reports no values at all and SDKs fall back to their init values.\n - refresh_on_foreground (boolean) — Let clients re-check the configuration when they return to the foreground instead of waiting for the next poll.\n - rules (array) — Targeting rules, evaluated in order; at most 20 per application.\n - match (object) (required) — Key/value conditions the SDK's config request must equal. Keys are limited to `env`, `app_version` and `sdk`; values are at most 256 bytes.\n - set (object) (required) — The SDK knobs a configuration can set. Every field is optional: a value absent from both rule and default is omitted from the SDK response, which tells the SDK to keep its init value.\n - content_hash (string) — Hash of the configuration content; lets the console identify versions with identical content.\n - equivalent_to (integer) — Earliest version carrying the same content, when that is not this version itself.\n - reason (string) — Operator's note left when the version was published. Empty when none was given.\n - updated_at (string) — Unix timestamp in milliseconds - when the version was published. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) — ID of the member who published the version.\n - updated_by_name (string) — Name of the member who published the version.\n - version (integer) — Version number, unique within the application.\n", + "Applications.RemoteConfigReadPreview": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - hit_rule_index (integer) — 0-based index of the rule that decided the result, or -1 when only the default applied.\n - values (object) — The SDK knobs a configuration can set. Every field is optional: a value absent from both rule and default is omitted from the SDK response, which tells the SDK to keep its init value.\n - defaultPrivacyLevel (string) — How Session Replay masks a page by default. [mask, mask-user-input, allow]\n - sessionOnError (boolean) — Keep sessions the session sample rate did not draw when they report an error; applies only to sessions that rate missed, so it does nothing alongside a rate of 100.\n - sessionReplayOnError (boolean) — The same switch for Session Replay: un-sampled sessions still record and upload their recording only when the session errors.\n - sessionReplaySampleRate (integer) — Session Replay sampling rate (0-100). (0-100)\n - sessionSampleRate (integer) — Session sampling rate (0-100). (0-100)\n - traceSampleRate (integer) — Trace sampling rate (0-100): which sessions inject trace headers into their requests. (0-100)\n", "Applications.RemoteConfigWriteHistoryRevert": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - version (integer) — New version number created by the revert.\n", "Applications.RemoteConfigWriteUpdate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - version (integer) — New published version number.\n", "Applications.WebhookTest": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - message (string) (required) — `ok` on success, otherwise the delivery error message.\n - ok (boolean) (required) — Whether the webhook endpoint accepted the sample event.\n - status_code (integer) (required) — HTTP status code returned by the webhook endpoint. 0 when the request did not receive a response.\n", @@ -95,6 +95,23 @@ var responseHelpBySDKMethod = map[string]string{ "Channels.ChannelUpdate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - external_report_token (string) — Newly generated token for external reporters. Only returned when `is_external_report_enabled` is set to `true` in the request. Callers should store this value; it cannot be retrieved afterwards.\n", "Channels.RouteInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - cases (array) — Ordered list of case branches.\n - channel_ids (array) — Target channel IDs. Required when `routing_mode` is `standard` (or empty); returned as `null` for `name_mapping`.\n - fallthrough (boolean) — If `true`, evaluation continues to the next case after this one matches; otherwise matching stops at the first hit.\n - if (array) (required) — List of match conditions that are AND-ed together.\n - key (string) (required) — Field key to match against the alert event (e.g. `alert_severity`, `labels.service`).\n - oper (string) (required) — Match operator. `IN` matches when the field value is one of `vals`; `NOTIN` matches when it is not. [IN, NOTIN]\n - vals (array) (required) — Values to compare against. Each value may be a literal string, a wildcard (`*`, `?`), a regular expression wrapped in slashes (`/pattern/`), a CIDR (`cidr:10.0.0.0/8`), or a numeric comparison (`num:lt:100`).\n - name_mapping_label (string) — Label key whose value is used as the target channel name. Required when `routing_mode` is `name_mapping`.\n - routing_mode (string) — Routing mode. `standard` (default, also used when left empty) routes to the fixed channel IDs; `name_mapping` resolves channels by reading a label value from the alert event. [standard, name_mapping]\n - created_at (string) — Creation time, Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - creator_id (integer) (required) — ID of the person who created the rule.\n - default (object) — Default branch used when no case matches (or all matched cases yield no valid channels).\n - channel_ids (array) — Channel IDs to fall back to.\n - deleted_at (string) — Soft-delete timestamp, Unix seconds. Omitted when the rule is active. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - integration_id (integer) — Integration the rule belongs to.\n - sections (array) — Optional sections that visually group cases.\n - name (string) (required) — Section name. Must be unique within the rule.\n - position (integer) (required) — Index in `cases` where this section starts. Must be between 0 and the length of `cases`.\n - status (string) — Route status. `enabled` means active; `deleted` means removed, visible only in historical versions. [enabled, deleted]\n - updated_at (string) — Last update time, Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) (required) — ID of the person who performed the last update.\n - version (integer) (required) — Monotonic version number, incremented on each update. Use it for optimistic concurrency control.\n", "Channels.RouteList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - cases (array) — Ordered list of case branches.\n - channel_ids (array) — Target channel IDs. Required when `routing_mode` is `standard` (or empty); returned as `null` for `name_mapping`.\n - fallthrough (boolean) — If `true`, evaluation continues to the next case after this one matches; otherwise matching stops at the first hit.\n - if (array) (required) — List of match conditions that are AND-ed together.\n - key (string) (required) — Field key to match against the alert event (e.g. `alert_severity`, `labels.service`).\n - oper (string) (required) — Match operator. `IN` matches when the field value is one of `vals`; `NOTIN` matches when it is not. [IN, NOTIN]\n - vals (array) (required) — Values to compare against. Each value may be a literal string, a wildcard (`*`, `?`), a regular expression wrapped in slashes (`/pattern/`), a CIDR (`cidr:10.0.0.0/8`), or a numeric comparison (`num:lt:100`).\n - name_mapping_label (string) — Label key whose value is used as the target channel name. Required when `routing_mode` is `name_mapping`.\n - routing_mode (string) — Routing mode. `standard` (default, also used when left empty) routes to the fixed channel IDs; `name_mapping` resolves channels by reading a label value from the alert event. [standard, name_mapping]\n - created_at (string) — Creation time, Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - creator_id (integer) (required) — ID of the person who created the rule.\n - default (object) — Default branch used when no case matches (or all matched cases yield no valid channels).\n - channel_ids (array) — Channel IDs to fall back to.\n - deleted_at (string) — Soft-delete timestamp, Unix seconds. Omitted when the rule is active. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - integration_id (integer) — Integration the rule belongs to.\n - sections (array) — Optional sections that visually group cases.\n - name (string) (required) — Section name. Must be unique within the rule.\n - position (integer) (required) — Index in `cases` where this section starts. Must be between 0 and the length of `cases`.\n - status (string) — Route status. `enabled` means active; `deleted` means removed, visible only in historical versions. [enabled, deleted]\n - updated_at (string) — Last update time, Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) (required) — ID of the person who performed the last update.\n - version (integer) (required) — Monotonic version number, incremented on each update. Use it for optimistic concurrency control.\n", + "Dashboards.PanelReadPreview": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - budget (object) (required) — Execution accounting for a panel run.\n - execution_count (integer) (required) — Number of queries launched. (min 0)\n - max_concurrency (integer) (required) — Concurrency cap applied to the panel's queries. (min 1)\n - display (object) (required) — Visualization configuration. `kind` selects the arm and therefore which sibling config object is required; `time_series` also carries the shared numeric options.\n - category_field (string) — Field supplying the category axis.\n - column_options (object) — Per-column display overrides keyed by field name, at most 100 entries.\n - data_link (object) — Drill-down link from a table column or bar panel into another dashboard. The target dashboard must exist and the mapping sources must match the source panel's shape.\n - dashboard_id (string) (required) — Target dashboard ID.\n - pass_time (boolean) (required) — When true the current time range is forwarded to the target.\n - target_id (string) — Optional tab, section or panel ID to focus in the target dashboard.\n - variable_mappings (object) (required) — Maps target variable names to a source value such as a column or a source variable.\n - decimals (integer) — Fixed decimal places; omit or send null to let the renderer decide. (min 0)\n - display_fields (array) — Log fields rendered for each row.\n - kind (string) (required) — Visualization kind discriminator; always `time_series`. [time_series, table, stat, bar, gauge, logs, text]\n - link_columns (array) — Drill-down links rendered as table columns. Together with per-column links a table allows at most 5.\n - dashboard_id (string) (required) — Target dashboard ID.\n - pass_time (boolean) (required) — When true the current time range is forwarded to the target.\n - target_id (string) — Optional tab, section or panel ID to focus in the target dashboard.\n - variable_mappings (object) (required) — Maps target variable names to a source value such as a column or a source variable.\n - markdown (string) — Markdown body, at most 64 KiB. Only a restricted node set (headings, lists, tables, links, code) survives validation. (≤65536 chars)\n - max (number) — Scale upper bound; must exceed `min` when both are set.\n - min (number) — Scale lower bound.\n - options (object) (required) — Open options object for the chosen visualization kind; the only part of the definition that round-trips losslessly. Missing or null normalizes to `{}`.\n - reducer (string) — Reduction applied across the returned rows: `last_non_null` = most recent non-null value; `min` = minimum; `max` = maximum; `mean` = average; `sum` = sum. [last_non_null, min, max, mean, sum]\n - sort (array) — Initial sort keys; fields must be unique.\n - direction (string) (required) — Sort direction: `asc` = ascending; `desc` = descending. [asc, desc]\n - field (string) (required) — Field name to sort by. (≥1 chars)\n - threshold (object) — Colour threshold for a numeric value. At least one of `warning`/`critical` is required, and with both set the pair must be ordered according to `mode`.\n - critical (number) — Critical bound; must be finite.\n - mode (string) (required) — Direction of the comparison: `higher_is_worse` = values at or above the bound breach it; `lower_is_worse` = values at or below the bound breach it. [higher_is_worse, lower_is_worse]\n - warning (number) — Warning bound; must be finite.\n - unit (string) — Display unit for the panel's numeric values: `unitless` = raw number; `ratio` = fraction of 1; `percent` = percentage; `milliseconds` = duration in milliseconds; `seconds` = duration in seconds; `bytes` = size in bytes; `bits` = size in bits; `count_per_second` = per-second count; `bytes_per_second` = bytes per second; `bits_per_second` = bits per second. [unitless, ratio, percent, milliseconds, seconds, bytes, bits, count_per_second, bytes_per_second, bits_per_second]\n - value_fields (array) — Fields reduced to the displayed values.\n - panel_id (string) (required) — Panel ID.\n - refs (array) (required) — One entry per query in the panel.\n - child_request_id (string) — Request ID of the underlying datasource execution; use it when tracing a single query.\n - error (object) — Per-variable or per-query failure. A failed arm does not fail the whole call.\n - message (string) (required) — Human-readable detail for the failure.\n - reason (string) (required) — Machine-readable failure reason. Observed values include `invalid_request`, `variable_invalid`, `panel_missing`, `field_missing`, `datasource_permission_denied`, `timeout`, `panel_deadline`, `panel_canceled`, `canceled`, `overloaded`, `source_too_large`, `edge_unavailable`, `edge_upgrade_required`, `edge_version_unknown`, `mixed_edge_versions` and `internal`.\n - execution (object) — Datasource-specific execution payload, passed through unmodified.\n - ref_id (string) (required) — Panel-local query reference.\n - state (string) (required) — Per-query execution state: `success` = the query executed; `error` = the query failed; `incompatible` = the datasource accepted the call but the query mode or field selection does not fit the datasource type. [success, error, incompatible]\n - run_state (string) (required) — Aggregate state of the run: `success` = all queries succeeded; `partial` = some succeeded; `incompatible` = at least one query is incompatible with its datasource; `cancelled` = the run was cancelled; `error` = all queries failed. [success, partial, incompatible, cancelled, error]\n - time (object) (required) — Absolute evaluation window. Both bounds are Unix timestamps in milliseconds, `from_ms` must be less than `to_ms`, and neither may exceed the JavaScript safe integer limit.\n - from_ms (integer) (required) — Unix timestamp in milliseconds. (min 0)\n - to_ms (integer) (required) — Unix timestamp in milliseconds. (min 1)\n - variables (object) (required) — Selections that resolved successfully.\n", + "Dashboards.PanelReadRun": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - budget (object) (required) — Execution accounting for a panel run.\n - execution_count (integer) (required) — Number of queries launched. (min 0)\n - max_concurrency (integer) (required) — Concurrency cap applied to the panel's queries. (min 1)\n - dashboard_id (string) (required) — Dashboard ID.\n - display (object) (required) — Visualization configuration. `kind` selects the arm and therefore which sibling config object is required; `time_series` also carries the shared numeric options.\n - category_field (string) — Field supplying the category axis.\n - column_options (object) — Per-column display overrides keyed by field name, at most 100 entries.\n - data_link (object) — Drill-down link from a table column or bar panel into another dashboard. The target dashboard must exist and the mapping sources must match the source panel's shape.\n - dashboard_id (string) (required) — Target dashboard ID.\n - pass_time (boolean) (required) — When true the current time range is forwarded to the target.\n - target_id (string) — Optional tab, section or panel ID to focus in the target dashboard.\n - variable_mappings (object) (required) — Maps target variable names to a source value such as a column or a source variable.\n - decimals (integer) — Fixed decimal places; omit or send null to let the renderer decide. (min 0)\n - display_fields (array) — Log fields rendered for each row.\n - kind (string) (required) — Visualization kind discriminator; always `time_series`. [time_series, table, stat, bar, gauge, logs, text]\n - link_columns (array) — Drill-down links rendered as table columns. Together with per-column links a table allows at most 5.\n - dashboard_id (string) (required) — Target dashboard ID.\n - pass_time (boolean) (required) — When true the current time range is forwarded to the target.\n - target_id (string) — Optional tab, section or panel ID to focus in the target dashboard.\n - variable_mappings (object) (required) — Maps target variable names to a source value such as a column or a source variable.\n - markdown (string) — Markdown body, at most 64 KiB. Only a restricted node set (headings, lists, tables, links, code) survives validation. (≤65536 chars)\n - max (number) — Scale upper bound; must exceed `min` when both are set.\n - min (number) — Scale lower bound.\n - options (object) (required) — Open options object for the chosen visualization kind; the only part of the definition that round-trips losslessly. Missing or null normalizes to `{}`.\n - reducer (string) — Reduction applied across the returned rows: `last_non_null` = most recent non-null value; `min` = minimum; `max` = maximum; `mean` = average; `sum` = sum. [last_non_null, min, max, mean, sum]\n - sort (array) — Initial sort keys; fields must be unique.\n - direction (string) (required) — Sort direction: `asc` = ascending; `desc` = descending. [asc, desc]\n - field (string) (required) — Field name to sort by. (≥1 chars)\n - threshold (object) — Colour threshold for a numeric value. At least one of `warning`/`critical` is required, and with both set the pair must be ordered according to `mode`.\n - critical (number) — Critical bound; must be finite.\n - mode (string) (required) — Direction of the comparison: `higher_is_worse` = values at or above the bound breach it; `lower_is_worse` = values at or below the bound breach it. [higher_is_worse, lower_is_worse]\n - warning (number) — Warning bound; must be finite.\n - unit (string) — Display unit for the panel's numeric values: `unitless` = raw number; `ratio` = fraction of 1; `percent` = percentage; `milliseconds` = duration in milliseconds; `seconds` = duration in seconds; `bytes` = size in bytes; `bits` = size in bits; `count_per_second` = per-second count; `bytes_per_second` = bytes per second; `bits_per_second` = bits per second. [unitless, ratio, percent, milliseconds, seconds, bytes, bits, count_per_second, bytes_per_second, bits_per_second]\n - value_fields (array) — Fields reduced to the displayed values.\n - panel_id (string) (required) — Panel ID.\n - refs (array) (required) — One entry per query in the panel.\n - child_request_id (string) — Request ID of the underlying datasource execution; use it when tracing a single query.\n - error (object) — Per-variable or per-query failure. A failed arm does not fail the whole call.\n - message (string) (required) — Human-readable detail for the failure.\n - reason (string) (required) — Machine-readable failure reason. Observed values include `invalid_request`, `variable_invalid`, `panel_missing`, `field_missing`, `datasource_permission_denied`, `timeout`, `panel_deadline`, `panel_canceled`, `canceled`, `overloaded`, `source_too_large`, `edge_unavailable`, `edge_upgrade_required`, `edge_version_unknown`, `mixed_edge_versions` and `internal`.\n - execution (object) — Datasource-specific execution payload, passed through unmodified.\n - ref_id (string) (required) — Panel-local query reference.\n - state (string) (required) — Per-query execution state: `success` = the query executed; `error` = the query failed; `incompatible` = the datasource accepted the call but the query mode or field selection does not fit the datasource type. [success, error, incompatible]\n - revision (integer) (required) — Revision the run executed against. (min 1)\n - run_state (string) (required) — Aggregate state of the run: `success` = all queries succeeded; `partial` = some succeeded; `incompatible` = at least one query is incompatible with its datasource; `cancelled` = the run was cancelled; `error` = all queries failed. [success, partial, incompatible, cancelled, error]\n - time (object) (required) — Absolute evaluation window. Both bounds are Unix timestamps in milliseconds, `from_ms` must be less than `to_ms`, and neither may exceed the JavaScript safe integer limit.\n - from_ms (integer) (required) — Unix timestamp in milliseconds. (min 0)\n - to_ms (integer) (required) — Unix timestamp in milliseconds. (min 1)\n - variables (object) (required) — Selections that resolved successfully.\n", + "Dashboards.QueryReadResolve": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - dashboard_id (string) (required) — Dashboard ID.\n - panels (array) (required) — Per-panel results.\n - error (object) — Per-variable or per-query failure. A failed arm does not fail the whole call.\n - message (string) (required) — Human-readable detail for the failure.\n - reason (string) (required) — Machine-readable failure reason. Observed values include `invalid_request`, `variable_invalid`, `panel_missing`, `field_missing`, `datasource_permission_denied`, `timeout`, `panel_deadline`, `panel_canceled`, `canceled`, `overloaded`, `source_too_large`, `edge_unavailable`, `edge_upgrade_required`, `edge_version_unknown`, `mixed_edge_versions` and `internal`.\n - panel_id (string) (required) — Panel ID.\n - queries (array) (required) — Successfully resolved queries.\n - args (object) (required) — Query arguments; empty object when none.\n - datasource (object) (required) — The datasource a runtime query was bound to.\n - id (integer) (required) — Datasource ID. (min 1)\n - name (string) (required) — Datasource name.\n - type (string) (required) — Datasource type identifier.\n - expr (string) (required) — Expression with variable templates substituted.\n - min_step_seconds (integer) — Minimum step in seconds; null when unset. (min 1)\n - mode (string) (required) — Evaluation mode: `range` = a stepped time series; `instant` = a single point in time; `window` = raw rows inside a bounded time window. [range, instant, window]\n - ref_id (string) (required) — Panel-local query reference.\n - state (string) (required) — Aggregate state of the panel's queries: `success` = every query resolved; `partial` = some resolved; `error` = none resolved. [success, partial, error]\n - revision (integer) (required) — Revision the resolution ran against. (min 1)\n - time (object) (required) — Absolute evaluation window. Both bounds are Unix timestamps in milliseconds, `from_ms` must be less than `to_ms`, and neither may exceed the JavaScript safe integer limit.\n - from_ms (integer) (required) — Unix timestamp in milliseconds. (min 0)\n - to_ms (integer) (required) — Unix timestamp in milliseconds. (min 1)\n - variables (object) (required) — Selections that resolved successfully.\n", + "Dashboards.ReadGet": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - created_at (string) (required) — Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (object) (required) — Account member recorded as the creator, updater or revision author.\n - id (integer) (required) — Member ID.\n - name (string) (required) — Member display name.\n - dashboard_id (string) (required) — Canonical UUIDv7 assigned by the caller at creation time.\n - definition (object) (required) — Complete dashboard payload stored as a portable `dashboard.v1` document. Unknown keys, duplicate keys, NaN/Inf, over-range numbers and trailing values are rejected; the serialized form must stay within 1 MiB.\n - default_time_range (object) (required) — Relative time window. `from` is one of the fixed presets the validator accepts; `to` is always the literal string `now`.\n - from (string) (required) — Start offset relative to `to`: `now-15m` = 15 minutes ago; `now-30m` = 30 minutes ago; `now-1h` = 1 hour ago; `now-3h` = 3 hours ago; `now-6h` = 6 hours ago; `now-12h` = 12 hours ago; `now-24h` = 24 hours ago; `now-7d` = 7 days ago. [now-15m, now-30m, now-1h, now-3h, now-6h, now-12h, now-24h, now-7d]\n - to (string) (required) — End of the window; only `now` is accepted. [now]\n - description (string) — Optional description, at most 1024 Unicode code points. (≤1024 chars)\n - refresh_interval (string) (required) — Auto-refresh cadence applied by the console: `off` disables auto-refresh; `30s` = every 30 seconds; `1m` = every minute; `5m` = every 5 minutes. [off, 30s, 1m, 5m]\n - tabs (array) (required) — Tabs, 1–10. Every tab title is unique and every tab or section ID must be a canonical UUIDv7 used only once across the definition.\n - description (string) — Optional tab description. (≤1024 chars)\n - id (string) (required) — Canonical UUIDv7 identifying the tab; unique across the definition.\n - sections (array) (required) — Sections on the tab, at most 10.\n - collapsed (boolean) (required) — Whether the section renders collapsed by default.\n - description (string) — Optional section description. (≤1024 chars)\n - id (string) (required) — Canonical UUIDv7 identifying the section; unique across the definition.\n - panels (array) (required) — Panels in the section, at most 30.\n - title (string) (required) — Section title. (1-189 chars)\n - title (string) (required) — Tab title, 1–189 Unicode code points. Unique among tabs. (1-189 chars)\n - top_panels (array) (required) — Panels placed directly on the tab, at most 30.\n - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time.\n - description (string) — Optional panel description. (≤1024 chars)\n - grid (object) (required) — 24-column grid placement. `x` and `y` are zero-based; `x + w` must not exceed 24.\n - id (string) (required) — Canonical UUIDv7 identifying the panel; unique across the definition.\n - queries (array) (required) — Queries in the panel. `time_series` accepts 1–26, `text` accepts none, every other kind accepts exactly one.\n - title (string) (required) — Panel title. (1-189 chars)\n - viz_config (object) (required) — Visualization configuration. `kind` selects the arm and therefore which sibling config object is required; `time_series` also carries the shared numeric options.\n - title (string) (required) — Dashboard title, 1–189 Unicode code points after trimming. (1-189 chars)\n - variables (array) (required) — Dashboard variables, at most 20. Names must be unique within the definition and match the variable-name pattern.\n - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time.\n - datasource_id (integer) — Datasource ID. Required when `kind` is `fixed`, forbidden when `kind` is `variable`. (min 1)\n - datasource_type (string) (required) — Datasource type identifier, e.g. `prometheus` or `victorialogs`.\n - kind (string) (required) — `fixed` uses `datasource_id`; `variable` resolves `name` against a datasource variable. [fixed, variable]\n - name (string) — Datasource variable name. Required when `kind` is `variable`, forbidden when `kind` is `fixed`.\n - datasource_type (string) — Datasource type the candidates are drawn from.\n - default (object) — A concrete selection of variable values. An empty `values` array is valid wire input and means unresolved — the server never substitutes a default for it.\n - kind (string) (required) — `values` selects the listed entries, `all` selects everything (only allowed when `include_all` is true). [values, all]\n - values (array) — Selected values, unique and never `$__all`. Must be empty when `kind` is `all`.\n - default_datasource_id (integer) — Default datasource ID. Without a usable default the runtime picks the first candidate by name, then ID.\n - kind (string) (required) — Variable kind discriminator; always `datasource`, selecting a datasource. [datasource, custom, query]\n - label (string) — Optional display label; falls back to `name`. (≤189 chars)\n - name (string) (required) — Variable name used in `{{ }}` templates, at most 64 characters.\n - name_patterns (array) — Wildcard patterns narrowing the candidates; empty means every datasource of the type.\n - options (array) — Candidate list, 1–1000 entries. Values must be non-empty, unique and must not be `$__all`.\n - text (string) (required) — Label shown in the picker. (1-1024 chars)\n - value (string) (required) — Value substituted into templates. (1-1024 chars)\n - refresh (string) — When the candidates are recomputed: `on_dashboard_load` = once when the dashboard loads; `on_time_range_change` = every time the time range changes. [on_dashboard_load, on_time_range_change]\n - selection (object) — Selection cardinality for a variable.\n - include_all (boolean) (required) — When true the variable also offers an `all` selection.\n - mode (string) (required) — Selection cardinality: `single` makes the resolved selection hold exactly one value; `multi` allows multiple values. [single, multi]\n - variable_query (object) — Variable query. Pick the arm with `kind`; the arm must match the referenced datasource type.\n - args (object) — Named query arguments; defaults to an empty object.\n - expr (string) — SQL statement; may reference other variables through `{{ }}`.\n - field (string) — Log field whose values become candidates. (≥1 chars)\n - kind (string) (required) — Query kind discriminator; always `prometheus`, a label-values query against Prometheus. [prometheus, sql, logs]\n - label (string) — Label whose values become candidates.\n - label_filters (array) — Optional matchers narrowing the series before label values are read.\n - metric (string) — Optional metric used to restrict the series considered.\n - text_field (string) — Column used as the candidate label; defaults to the value column.\n - value_field (string) — Column used as the candidate value. (≥1 chars)\n - folder_breadcrumb (array) (required) — Folder names from the root down to `folder_id`.\n - folder_id (integer) (required) — ID of the dashboard's folder. (min 1)\n - revision (integer) (required) — Current revision number. (min 1)\n - schema_version (string) (required) — Wire schema version of `definition`; only `dashboard.v1` is accepted. [dashboard.v1]\n - updated_at (string) (required) — Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (object) (required) — Account member recorded as the creator, updater or revision author.\n - id (integer) (required) — Member ID.\n - name (string) (required) — Member display name.\n", + "Dashboards.ReadList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - dashboard_id (string) (required) — Dashboard ID.\n - description (string) — Dashboard description; empty when unset.\n - folder_breadcrumb (array) (required) — Folder path from the root.\n - folder_id (integer) (required) — Folder ID. (min 1)\n - revision (integer) (required) — Current revision number. (min 1)\n - title (string) (required) — Dashboard title.\n - updated_at (string) (required) — Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (object) (required) — Account member recorded as the creator, updater or revision author.\n - id (integer) (required) — Member ID.\n - name (string) (required) — Member display name.\n", + "Dashboards.ReadOutline": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - dashboard (object) (required) — Dashboard-level outline entry.\n - dashboard_id (string) (required) — Dashboard ID.\n - description (string) — Dashboard description; empty when unset.\n - revision (integer) (required) — Current revision number. (min 1)\n - title (string) (required) — Dashboard title.\n - updated_at (string) (required) — Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - folder (object) (required) — Folder placement in an outline.\n - breadcrumb (array) (required) — Folder names from the root.\n - folder_id (integer) (required) — Folder ID. (min 1)\n - tabs (array) (required) — Tabs, narrowed by `target_id` when supplied.\n - breadcrumb (array) (required) — Dashboard title followed by the tab title.\n - description (string) — Tab description; empty when unset.\n - id (string) (required) — Tab ID.\n - sections (array) (required) — Sections on the tab.\n - breadcrumb (array) (required) — Dashboard, tab and section titles.\n - description (string) — Section description; empty when unset.\n - id (string) (required) — Section ID.\n - panels (array) (required) — Panels in the section.\n - breadcrumb (array) (required) — Full path of titles from the dashboard down to the panel.\n - datasource_type (string) — Datasource type the panel queries; empty when the panel has no datasource (text panels).\n - description (string) — Panel description; empty when unset.\n - id (string) (required) — Panel ID.\n - title (string) (required) — Panel title.\n - viz_config (object) (required) — Visualization kind of an outlined panel.\n - title (string) (required) — Section title.\n - title (string) (required) — Tab title.\n - top_panels (array) (required) — Panels placed directly on the tab.\n - breadcrumb (array) (required) — Full path of titles from the dashboard down to the panel.\n - datasource_type (string) — Datasource type the panel queries; empty when the panel has no datasource (text panels).\n - description (string) — Panel description; empty when unset.\n - id (string) (required) — Panel ID.\n - title (string) (required) — Panel title.\n - viz_config (object) (required) — Visualization kind of an outlined panel.\n - kind (string) (required) — Visualization kind: `time_series` = time series; `table` = table; `stat` = single value; `bar` = bar chart; `gauge` = gauge; `logs` = log stream; `text` = Markdown text. [time_series, table, stat, bar, gauge, logs, text]\n - variables (array) (required) — Variable summaries.\n - kind (string) (required) — Variable kind: `datasource` = selects a datasource; `custom` = fixed inline list; `query` = resolved by running a query. [datasource, custom, query]\n - label (string) — Display label; empty when unset.\n - name (string) (required) — Variable name.\n - selection (object) — Selection cardinality for a variable.\n - include_all (boolean) (required) — When true the variable also offers an `all` selection.\n - mode (string) (required) — Selection cardinality: `single` makes the resolved selection hold exactly one value; `multi` allows multiple values. [single, multi]\n", + "Dashboards.ReadSearch": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - dashboard_id (string) (required) — Dashboard ID.\n - description (string) — Dashboard description; empty when unset.\n - folder_breadcrumb (array) (required) — Folder path from the root.\n - folder_id (integer) (required) — Folder ID. (min 1)\n - revision (integer) (required) — Current revision number. (min 1)\n - title (string) (required) — Dashboard title.\n - updated_at (string) (required) — Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (object) (required) — Account member recorded as the creator, updater or revision author.\n - id (integer) (required) — Member ID.\n - name (string) (required) — Member display name.\n", + "Dashboards.RevisionReadGet": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - actor (object) (required) — Account member recorded as the creator, updater or revision author.\n - id (integer) (required) — Member ID.\n - name (string) (required) — Member display name.\n - created_at (string) (required) — Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - dashboard_id (string) (required) — Dashboard ID.\n - definition (object) (required) — Complete dashboard payload stored as a portable `dashboard.v1` document. Unknown keys, duplicate keys, NaN/Inf, over-range numbers and trailing values are rejected; the serialized form must stay within 1 MiB.\n - default_time_range (object) (required) — Relative time window. `from` is one of the fixed presets the validator accepts; `to` is always the literal string `now`.\n - from (string) (required) — Start offset relative to `to`: `now-15m` = 15 minutes ago; `now-30m` = 30 minutes ago; `now-1h` = 1 hour ago; `now-3h` = 3 hours ago; `now-6h` = 6 hours ago; `now-12h` = 12 hours ago; `now-24h` = 24 hours ago; `now-7d` = 7 days ago. [now-15m, now-30m, now-1h, now-3h, now-6h, now-12h, now-24h, now-7d]\n - to (string) (required) — End of the window; only `now` is accepted. [now]\n - description (string) — Optional description, at most 1024 Unicode code points. (≤1024 chars)\n - refresh_interval (string) (required) — Auto-refresh cadence applied by the console: `off` disables auto-refresh; `30s` = every 30 seconds; `1m` = every minute; `5m` = every 5 minutes. [off, 30s, 1m, 5m]\n - tabs (array) (required) — Tabs, 1–10. Every tab title is unique and every tab or section ID must be a canonical UUIDv7 used only once across the definition.\n - description (string) — Optional tab description. (≤1024 chars)\n - id (string) (required) — Canonical UUIDv7 identifying the tab; unique across the definition.\n - sections (array) (required) — Sections on the tab, at most 10.\n - collapsed (boolean) (required) — Whether the section renders collapsed by default.\n - description (string) — Optional section description. (≤1024 chars)\n - id (string) (required) — Canonical UUIDv7 identifying the section; unique across the definition.\n - panels (array) (required) — Panels in the section, at most 30.\n - title (string) (required) — Section title. (1-189 chars)\n - title (string) (required) — Tab title, 1–189 Unicode code points. Unique among tabs. (1-189 chars)\n - top_panels (array) (required) — Panels placed directly on the tab, at most 30.\n - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time.\n - description (string) — Optional panel description. (≤1024 chars)\n - grid (object) (required) — 24-column grid placement. `x` and `y` are zero-based; `x + w` must not exceed 24.\n - id (string) (required) — Canonical UUIDv7 identifying the panel; unique across the definition.\n - queries (array) (required) — Queries in the panel. `time_series` accepts 1–26, `text` accepts none, every other kind accepts exactly one.\n - title (string) (required) — Panel title. (1-189 chars)\n - viz_config (object) (required) — Visualization configuration. `kind` selects the arm and therefore which sibling config object is required; `time_series` also carries the shared numeric options.\n - title (string) (required) — Dashboard title, 1–189 Unicode code points after trimming. (1-189 chars)\n - variables (array) (required) — Dashboard variables, at most 20. Names must be unique within the definition and match the variable-name pattern.\n - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time.\n - datasource_id (integer) — Datasource ID. Required when `kind` is `fixed`, forbidden when `kind` is `variable`. (min 1)\n - datasource_type (string) (required) — Datasource type identifier, e.g. `prometheus` or `victorialogs`.\n - kind (string) (required) — `fixed` uses `datasource_id`; `variable` resolves `name` against a datasource variable. [fixed, variable]\n - name (string) — Datasource variable name. Required when `kind` is `variable`, forbidden when `kind` is `fixed`.\n - datasource_type (string) — Datasource type the candidates are drawn from.\n - default (object) — A concrete selection of variable values. An empty `values` array is valid wire input and means unresolved — the server never substitutes a default for it.\n - kind (string) (required) — `values` selects the listed entries, `all` selects everything (only allowed when `include_all` is true). [values, all]\n - values (array) — Selected values, unique and never `$__all`. Must be empty when `kind` is `all`.\n - default_datasource_id (integer) — Default datasource ID. Without a usable default the runtime picks the first candidate by name, then ID.\n - kind (string) (required) — Variable kind discriminator; always `datasource`, selecting a datasource. [datasource, custom, query]\n - label (string) — Optional display label; falls back to `name`. (≤189 chars)\n - name (string) (required) — Variable name used in `{{ }}` templates, at most 64 characters.\n - name_patterns (array) — Wildcard patterns narrowing the candidates; empty means every datasource of the type.\n - options (array) — Candidate list, 1–1000 entries. Values must be non-empty, unique and must not be `$__all`.\n - text (string) (required) — Label shown in the picker. (1-1024 chars)\n - value (string) (required) — Value substituted into templates. (1-1024 chars)\n - refresh (string) — When the candidates are recomputed: `on_dashboard_load` = once when the dashboard loads; `on_time_range_change` = every time the time range changes. [on_dashboard_load, on_time_range_change]\n - selection (object) — Selection cardinality for a variable.\n - include_all (boolean) (required) — When true the variable also offers an `all` selection.\n - mode (string) (required) — Selection cardinality: `single` makes the resolved selection hold exactly one value; `multi` allows multiple values. [single, multi]\n - variable_query (object) — Variable query. Pick the arm with `kind`; the arm must match the referenced datasource type.\n - args (object) — Named query arguments; defaults to an empty object.\n - expr (string) — SQL statement; may reference other variables through `{{ }}`.\n - field (string) — Log field whose values become candidates. (≥1 chars)\n - kind (string) (required) — Query kind discriminator; always `prometheus`, a label-values query against Prometheus. [prometheus, sql, logs]\n - label (string) — Label whose values become candidates.\n - label_filters (array) — Optional matchers narrowing the series before label values are read.\n - metric (string) — Optional metric used to restrict the series considered.\n - text_field (string) — Column used as the candidate label; defaults to the value column.\n - value_field (string) — Column used as the candidate value. (≥1 chars)\n - folder_id (integer) (required) — Folder the dashboard sat in at that revision. (min 1)\n - message (string) — Optional commit message. (≤1024 chars)\n - revision (integer) (required) — Revision number. (min 1)\n - schema_version (string) (required) — Wire schema version of `definition`; only `dashboard.v1` is accepted. [dashboard.v1]\n", + "Dashboards.RevisionReadList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - actor (object) (required) — Account member recorded as the creator, updater or revision author.\n - id (integer) (required) — Member ID.\n - name (string) (required) — Member display name.\n - created_at (string) (required) — Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - dashboard_id (string) (required) — Dashboard ID.\n - folder_id (integer) (required) — Folder the dashboard sat in at that revision. (min 1)\n - message (string) — Optional commit message; at most 1024 Unicode code points. (≤1024 chars)\n - revision (integer) (required) — Revision number. (min 1)\n", + "Dashboards.TrashReadList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - dashboard_id (string) (required) — Dashboard ID.\n - deleted_at (string) (required) — Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - deleted_by (object) (required) — Account member recorded as the creator, updater or revision author.\n - id (integer) (required) — Member ID.\n - name (string) (required) — Member display name.\n - description (string) — Dashboard description; empty when unset.\n - folder_breadcrumb (array) (required) — Folder path from the root.\n - folder_id (integer) (required) — Folder the dashboard sat in when deleted. (min 1)\n - revision (integer) (required) — Revision the dashboard had when deleted. (min 1)\n - title (string) (required) — Dashboard title.\n", + "Dashboards.VariableReadPreview": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - selections (object) (required) — Effective selections keyed by variable name.\n - variables (array) (required) — Resolved variables.\n - candidates (array) (required) — Resolved candidates, at most 1000.\n - text (string) (required) — Label shown in the picker. (1-1024 chars)\n - value (string) (required) — Value substituted into templates. (1-1024 chars)\n - datasource (object) — The datasource a runtime query was bound to.\n - id (integer) (required) — Datasource ID. (min 1)\n - name (string) (required) — Datasource name.\n - type (string) (required) — Datasource type identifier.\n - error (object) — Per-variable or per-query failure. A failed arm does not fail the whole call.\n - message (string) (required) — Human-readable detail for the failure.\n - reason (string) (required) — Machine-readable failure reason. Observed values include `invalid_request`, `variable_invalid`, `panel_missing`, `field_missing`, `datasource_permission_denied`, `timeout`, `panel_deadline`, `panel_canceled`, `canceled`, `overloaded`, `source_too_large`, `edge_unavailable`, `edge_upgrade_required`, `edge_version_unknown`, `mixed_edge_versions` and `internal`.\n - kind (string) (required) — Variable kind: `datasource` = selects a datasource; `custom` = fixed inline list; `query` = resolved by running a query. [datasource, custom, query]\n - name (string) (required) — Variable name.\n - selection (object) — A concrete selection of variable values. An empty `values` array is valid wire input and means unresolved — the server never substitutes a default for it.\n - kind (string) (required) — `values` selects the listed entries, `all` selects everything (only allowed when `include_all` is true). [values, all]\n - values (array) — Selected values, unique and never `$__all`. Must be empty when `kind` is `all`.\n", + "Dashboards.VariableReadResolve": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - dashboard_id (string) (required) — Dashboard ID.\n - revision (integer) (required) — Revision the resolution ran against. (min 1)\n - selections (object) (required) — Effective selections keyed by variable name; only variables that resolved successfully appear.\n - variables (array) (required) — Resolved variables, in definition order.\n - candidates (array) (required) — Resolved candidates, at most 1000.\n - text (string) (required) — Label shown in the picker. (1-1024 chars)\n - value (string) (required) — Value substituted into templates. (1-1024 chars)\n - datasource (object) — The datasource a runtime query was bound to.\n - id (integer) (required) — Datasource ID. (min 1)\n - name (string) (required) — Datasource name.\n - type (string) (required) — Datasource type identifier.\n - error (object) — Per-variable or per-query failure. A failed arm does not fail the whole call.\n - message (string) (required) — Human-readable detail for the failure.\n - reason (string) (required) — Machine-readable failure reason. Observed values include `invalid_request`, `variable_invalid`, `panel_missing`, `field_missing`, `datasource_permission_denied`, `timeout`, `panel_deadline`, `panel_canceled`, `canceled`, `overloaded`, `source_too_large`, `edge_unavailable`, `edge_upgrade_required`, `edge_version_unknown`, `mixed_edge_versions` and `internal`.\n - kind (string) (required) — Variable kind: `datasource` = selects a datasource; `custom` = fixed inline list; `query` = resolved by running a query. [datasource, custom, query]\n - name (string) (required) — Variable name.\n - selection (object) — A concrete selection of variable values. An empty `values` array is valid wire input and means unresolved — the server never substitutes a default for it.\n - kind (string) (required) — `values` selects the listed entries, `all` selects everything (only allowed when `include_all` is true). [values, all]\n - values (array) — Selected values, unique and never `$__all`. Must be empty when `kind` is `all`.\n", + "Dashboards.WriteCreate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - created_at (string) (required) — Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (object) (required) — Account member recorded as the creator, updater or revision author.\n - id (integer) (required) — Member ID.\n - name (string) (required) — Member display name.\n - dashboard_id (string) (required) — Canonical UUIDv7 assigned by the caller at creation time.\n - definition (object) (required) — Complete dashboard payload stored as a portable `dashboard.v1` document. Unknown keys, duplicate keys, NaN/Inf, over-range numbers and trailing values are rejected; the serialized form must stay within 1 MiB.\n - default_time_range (object) (required) — Relative time window. `from` is one of the fixed presets the validator accepts; `to` is always the literal string `now`.\n - from (string) (required) — Start offset relative to `to`: `now-15m` = 15 minutes ago; `now-30m` = 30 minutes ago; `now-1h` = 1 hour ago; `now-3h` = 3 hours ago; `now-6h` = 6 hours ago; `now-12h` = 12 hours ago; `now-24h` = 24 hours ago; `now-7d` = 7 days ago. [now-15m, now-30m, now-1h, now-3h, now-6h, now-12h, now-24h, now-7d]\n - to (string) (required) — End of the window; only `now` is accepted. [now]\n - description (string) — Optional description, at most 1024 Unicode code points. (≤1024 chars)\n - refresh_interval (string) (required) — Auto-refresh cadence applied by the console: `off` disables auto-refresh; `30s` = every 30 seconds; `1m` = every minute; `5m` = every 5 minutes. [off, 30s, 1m, 5m]\n - tabs (array) (required) — Tabs, 1–10. Every tab title is unique and every tab or section ID must be a canonical UUIDv7 used only once across the definition.\n - description (string) — Optional tab description. (≤1024 chars)\n - id (string) (required) — Canonical UUIDv7 identifying the tab; unique across the definition.\n - sections (array) (required) — Sections on the tab, at most 10.\n - collapsed (boolean) (required) — Whether the section renders collapsed by default.\n - description (string) — Optional section description. (≤1024 chars)\n - id (string) (required) — Canonical UUIDv7 identifying the section; unique across the definition.\n - panels (array) (required) — Panels in the section, at most 30.\n - title (string) (required) — Section title. (1-189 chars)\n - title (string) (required) — Tab title, 1–189 Unicode code points. Unique among tabs. (1-189 chars)\n - top_panels (array) (required) — Panels placed directly on the tab, at most 30.\n - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time.\n - description (string) — Optional panel description. (≤1024 chars)\n - grid (object) (required) — 24-column grid placement. `x` and `y` are zero-based; `x + w` must not exceed 24.\n - id (string) (required) — Canonical UUIDv7 identifying the panel; unique across the definition.\n - queries (array) (required) — Queries in the panel. `time_series` accepts 1–26, `text` accepts none, every other kind accepts exactly one.\n - title (string) (required) — Panel title. (1-189 chars)\n - viz_config (object) (required) — Visualization configuration. `kind` selects the arm and therefore which sibling config object is required; `time_series` also carries the shared numeric options.\n - title (string) (required) — Dashboard title, 1–189 Unicode code points after trimming. (1-189 chars)\n - variables (array) (required) — Dashboard variables, at most 20. Names must be unique within the definition and match the variable-name pattern.\n - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time.\n - datasource_id (integer) — Datasource ID. Required when `kind` is `fixed`, forbidden when `kind` is `variable`. (min 1)\n - datasource_type (string) (required) — Datasource type identifier, e.g. `prometheus` or `victorialogs`.\n - kind (string) (required) — `fixed` uses `datasource_id`; `variable` resolves `name` against a datasource variable. [fixed, variable]\n - name (string) — Datasource variable name. Required when `kind` is `variable`, forbidden when `kind` is `fixed`.\n - datasource_type (string) — Datasource type the candidates are drawn from.\n - default (object) — A concrete selection of variable values. An empty `values` array is valid wire input and means unresolved — the server never substitutes a default for it.\n - kind (string) (required) — `values` selects the listed entries, `all` selects everything (only allowed when `include_all` is true). [values, all]\n - values (array) — Selected values, unique and never `$__all`. Must be empty when `kind` is `all`.\n - default_datasource_id (integer) — Default datasource ID. Without a usable default the runtime picks the first candidate by name, then ID.\n - kind (string) (required) — Variable kind discriminator; always `datasource`, selecting a datasource. [datasource, custom, query]\n - label (string) — Optional display label; falls back to `name`. (≤189 chars)\n - name (string) (required) — Variable name used in `{{ }}` templates, at most 64 characters.\n - name_patterns (array) — Wildcard patterns narrowing the candidates; empty means every datasource of the type.\n - options (array) — Candidate list, 1–1000 entries. Values must be non-empty, unique and must not be `$__all`.\n - text (string) (required) — Label shown in the picker. (1-1024 chars)\n - value (string) (required) — Value substituted into templates. (1-1024 chars)\n - refresh (string) — When the candidates are recomputed: `on_dashboard_load` = once when the dashboard loads; `on_time_range_change` = every time the time range changes. [on_dashboard_load, on_time_range_change]\n - selection (object) — Selection cardinality for a variable.\n - include_all (boolean) (required) — When true the variable also offers an `all` selection.\n - mode (string) (required) — Selection cardinality: `single` makes the resolved selection hold exactly one value; `multi` allows multiple values. [single, multi]\n - variable_query (object) — Variable query. Pick the arm with `kind`; the arm must match the referenced datasource type.\n - args (object) — Named query arguments; defaults to an empty object.\n - expr (string) — SQL statement; may reference other variables through `{{ }}`.\n - field (string) — Log field whose values become candidates. (≥1 chars)\n - kind (string) (required) — Query kind discriminator; always `prometheus`, a label-values query against Prometheus. [prometheus, sql, logs]\n - label (string) — Label whose values become candidates.\n - label_filters (array) — Optional matchers narrowing the series before label values are read.\n - metric (string) — Optional metric used to restrict the series considered.\n - text_field (string) — Column used as the candidate label; defaults to the value column.\n - value_field (string) — Column used as the candidate value. (≥1 chars)\n - folder_breadcrumb (array) (required) — Folder names from the root down to `folder_id`.\n - folder_id (integer) (required) — ID of the dashboard's folder. (min 1)\n - revision (integer) (required) — Current revision number. (min 1)\n - schema_version (string) (required) — Wire schema version of `definition`; only `dashboard.v1` is accepted. [dashboard.v1]\n - updated_at (string) (required) — Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (object) (required) — Account member recorded as the creator, updater or revision author.\n - id (integer) (required) — Member ID.\n - name (string) (required) — Member display name.\n", + "Dashboards.WriteDelete": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - dashboard_id (string) (required) — Dashboard ID.\n - revision (integer) (required) — Revision recorded for the deletion. (min 1)\n", + "Dashboards.WriteMove": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - changed (boolean) (required) — Whether the stored dashboard actually changed.\n - resource (object) (required) — A stored dashboard: its identity, revision counter, placement and full definition. `revision` increments on every accepted write and must be echoed back as `expected_revision` for the next mutation.\n - created_at (string) (required) — Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (object) (required) — Account member recorded as the creator, updater or revision author.\n - id (integer) (required) — Member ID.\n - name (string) (required) — Member display name.\n - dashboard_id (string) (required) — Canonical UUIDv7 assigned by the caller at creation time.\n - definition (object) (required) — Complete dashboard payload stored as a portable `dashboard.v1` document. Unknown keys, duplicate keys, NaN/Inf, over-range numbers and trailing values are rejected; the serialized form must stay within 1 MiB.\n - default_time_range (object) (required) — Relative time window. `from` is one of the fixed presets the validator accepts; `to` is always the literal string `now`.\n - from (string) (required) — Start offset relative to `to`: `now-15m` = 15 minutes ago; `now-30m` = 30 minutes ago; `now-1h` = 1 hour ago; `now-3h` = 3 hours ago; `now-6h` = 6 hours ago; `now-12h` = 12 hours ago; `now-24h` = 24 hours ago; `now-7d` = 7 days ago. [now-15m, now-30m, now-1h, now-3h, now-6h, now-12h, now-24h, now-7d]\n - to (string) (required) — End of the window; only `now` is accepted. [now]\n - description (string) — Optional description, at most 1024 Unicode code points. (≤1024 chars)\n - refresh_interval (string) (required) — Auto-refresh cadence applied by the console: `off` disables auto-refresh; `30s` = every 30 seconds; `1m` = every minute; `5m` = every 5 minutes. [off, 30s, 1m, 5m]\n - tabs (array) (required) — Tabs, 1–10. Every tab title is unique and every tab or section ID must be a canonical UUIDv7 used only once across the definition.\n - description (string) — Optional tab description. (≤1024 chars)\n - id (string) (required) — Canonical UUIDv7 identifying the tab; unique across the definition.\n - sections (array) (required) — Sections on the tab, at most 10.\n - title (string) (required) — Tab title, 1–189 Unicode code points. Unique among tabs. (1-189 chars)\n - top_panels (array) (required) — Panels placed directly on the tab, at most 30.\n - title (string) (required) — Dashboard title, 1–189 Unicode code points after trimming. (1-189 chars)\n - variables (array) (required) — Dashboard variables, at most 20. Names must be unique within the definition and match the variable-name pattern.\n - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time.\n - datasource_type (string) — Datasource type the candidates are drawn from.\n - default (object) — A concrete selection of variable values. An empty `values` array is valid wire input and means unresolved — the server never substitutes a default for it.\n - default_datasource_id (integer) — Default datasource ID. Without a usable default the runtime picks the first candidate by name, then ID.\n - kind (string) (required) — Variable kind discriminator; always `datasource`, selecting a datasource. [datasource, custom, query]\n - label (string) — Optional display label; falls back to `name`. (≤189 chars)\n - name (string) (required) — Variable name used in `{{ }}` templates, at most 64 characters.\n - name_patterns (array) — Wildcard patterns narrowing the candidates; empty means every datasource of the type.\n - options (array) — Candidate list, 1–1000 entries. Values must be non-empty, unique and must not be `$__all`.\n - refresh (string) — When the candidates are recomputed: `on_dashboard_load` = once when the dashboard loads; `on_time_range_change` = every time the time range changes. [on_dashboard_load, on_time_range_change]\n - selection (object) — Selection cardinality for a variable.\n - variable_query (object) — Variable query. Pick the arm with `kind`; the arm must match the referenced datasource type.\n - folder_breadcrumb (array) (required) — Folder names from the root down to `folder_id`.\n - folder_id (integer) (required) — ID of the dashboard's folder. (min 1)\n - revision (integer) (required) — Current revision number. (min 1)\n - schema_version (string) (required) — Wire schema version of `definition`; only `dashboard.v1` is accepted. [dashboard.v1]\n - updated_at (string) (required) — Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (object) (required) — Account member recorded as the creator, updater or revision author.\n - id (integer) (required) — Member ID.\n - name (string) (required) — Member display name.\n", + "Dashboards.WriteRestore": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - created_at (string) (required) — Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (object) (required) — Account member recorded as the creator, updater or revision author.\n - id (integer) (required) — Member ID.\n - name (string) (required) — Member display name.\n - dashboard_id (string) (required) — Canonical UUIDv7 assigned by the caller at creation time.\n - definition (object) (required) — Complete dashboard payload stored as a portable `dashboard.v1` document. Unknown keys, duplicate keys, NaN/Inf, over-range numbers and trailing values are rejected; the serialized form must stay within 1 MiB.\n - default_time_range (object) (required) — Relative time window. `from` is one of the fixed presets the validator accepts; `to` is always the literal string `now`.\n - from (string) (required) — Start offset relative to `to`: `now-15m` = 15 minutes ago; `now-30m` = 30 minutes ago; `now-1h` = 1 hour ago; `now-3h` = 3 hours ago; `now-6h` = 6 hours ago; `now-12h` = 12 hours ago; `now-24h` = 24 hours ago; `now-7d` = 7 days ago. [now-15m, now-30m, now-1h, now-3h, now-6h, now-12h, now-24h, now-7d]\n - to (string) (required) — End of the window; only `now` is accepted. [now]\n - description (string) — Optional description, at most 1024 Unicode code points. (≤1024 chars)\n - refresh_interval (string) (required) — Auto-refresh cadence applied by the console: `off` disables auto-refresh; `30s` = every 30 seconds; `1m` = every minute; `5m` = every 5 minutes. [off, 30s, 1m, 5m]\n - tabs (array) (required) — Tabs, 1–10. Every tab title is unique and every tab or section ID must be a canonical UUIDv7 used only once across the definition.\n - description (string) — Optional tab description. (≤1024 chars)\n - id (string) (required) — Canonical UUIDv7 identifying the tab; unique across the definition.\n - sections (array) (required) — Sections on the tab, at most 10.\n - collapsed (boolean) (required) — Whether the section renders collapsed by default.\n - description (string) — Optional section description. (≤1024 chars)\n - id (string) (required) — Canonical UUIDv7 identifying the section; unique across the definition.\n - panels (array) (required) — Panels in the section, at most 30.\n - title (string) (required) — Section title. (1-189 chars)\n - title (string) (required) — Tab title, 1–189 Unicode code points. Unique among tabs. (1-189 chars)\n - top_panels (array) (required) — Panels placed directly on the tab, at most 30.\n - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time.\n - description (string) — Optional panel description. (≤1024 chars)\n - grid (object) (required) — 24-column grid placement. `x` and `y` are zero-based; `x + w` must not exceed 24.\n - id (string) (required) — Canonical UUIDv7 identifying the panel; unique across the definition.\n - queries (array) (required) — Queries in the panel. `time_series` accepts 1–26, `text` accepts none, every other kind accepts exactly one.\n - title (string) (required) — Panel title. (1-189 chars)\n - viz_config (object) (required) — Visualization configuration. `kind` selects the arm and therefore which sibling config object is required; `time_series` also carries the shared numeric options.\n - title (string) (required) — Dashboard title, 1–189 Unicode code points after trimming. (1-189 chars)\n - variables (array) (required) — Dashboard variables, at most 20. Names must be unique within the definition and match the variable-name pattern.\n - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time.\n - datasource_id (integer) — Datasource ID. Required when `kind` is `fixed`, forbidden when `kind` is `variable`. (min 1)\n - datasource_type (string) (required) — Datasource type identifier, e.g. `prometheus` or `victorialogs`.\n - kind (string) (required) — `fixed` uses `datasource_id`; `variable` resolves `name` against a datasource variable. [fixed, variable]\n - name (string) — Datasource variable name. Required when `kind` is `variable`, forbidden when `kind` is `fixed`.\n - datasource_type (string) — Datasource type the candidates are drawn from.\n - default (object) — A concrete selection of variable values. An empty `values` array is valid wire input and means unresolved — the server never substitutes a default for it.\n - kind (string) (required) — `values` selects the listed entries, `all` selects everything (only allowed when `include_all` is true). [values, all]\n - values (array) — Selected values, unique and never `$__all`. Must be empty when `kind` is `all`.\n - default_datasource_id (integer) — Default datasource ID. Without a usable default the runtime picks the first candidate by name, then ID.\n - kind (string) (required) — Variable kind discriminator; always `datasource`, selecting a datasource. [datasource, custom, query]\n - label (string) — Optional display label; falls back to `name`. (≤189 chars)\n - name (string) (required) — Variable name used in `{{ }}` templates, at most 64 characters.\n - name_patterns (array) — Wildcard patterns narrowing the candidates; empty means every datasource of the type.\n - options (array) — Candidate list, 1–1000 entries. Values must be non-empty, unique and must not be `$__all`.\n - text (string) (required) — Label shown in the picker. (1-1024 chars)\n - value (string) (required) — Value substituted into templates. (1-1024 chars)\n - refresh (string) — When the candidates are recomputed: `on_dashboard_load` = once when the dashboard loads; `on_time_range_change` = every time the time range changes. [on_dashboard_load, on_time_range_change]\n - selection (object) — Selection cardinality for a variable.\n - include_all (boolean) (required) — When true the variable also offers an `all` selection.\n - mode (string) (required) — Selection cardinality: `single` makes the resolved selection hold exactly one value; `multi` allows multiple values. [single, multi]\n - variable_query (object) — Variable query. Pick the arm with `kind`; the arm must match the referenced datasource type.\n - args (object) — Named query arguments; defaults to an empty object.\n - expr (string) — SQL statement; may reference other variables through `{{ }}`.\n - field (string) — Log field whose values become candidates. (≥1 chars)\n - kind (string) (required) — Query kind discriminator; always `prometheus`, a label-values query against Prometheus. [prometheus, sql, logs]\n - label (string) — Label whose values become candidates.\n - label_filters (array) — Optional matchers narrowing the series before label values are read.\n - metric (string) — Optional metric used to restrict the series considered.\n - text_field (string) — Column used as the candidate label; defaults to the value column.\n - value_field (string) — Column used as the candidate value. (≥1 chars)\n - folder_breadcrumb (array) (required) — Folder names from the root down to `folder_id`.\n - folder_id (integer) (required) — ID of the dashboard's folder. (min 1)\n - revision (integer) (required) — Current revision number. (min 1)\n - schema_version (string) (required) — Wire schema version of `definition`; only `dashboard.v1` is accepted. [dashboard.v1]\n - updated_at (string) (required) — Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (object) (required) — Account member recorded as the creator, updater or revision author.\n - id (integer) (required) — Member ID.\n - name (string) (required) — Member display name.\n", + "Dashboards.WriteUpdate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - changed (boolean) (required) — Whether the stored dashboard actually changed.\n - resource (object) (required) — A stored dashboard: its identity, revision counter, placement and full definition. `revision` increments on every accepted write and must be echoed back as `expected_revision` for the next mutation.\n - created_at (string) (required) — Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (object) (required) — Account member recorded as the creator, updater or revision author.\n - id (integer) (required) — Member ID.\n - name (string) (required) — Member display name.\n - dashboard_id (string) (required) — Canonical UUIDv7 assigned by the caller at creation time.\n - definition (object) (required) — Complete dashboard payload stored as a portable `dashboard.v1` document. Unknown keys, duplicate keys, NaN/Inf, over-range numbers and trailing values are rejected; the serialized form must stay within 1 MiB.\n - default_time_range (object) (required) — Relative time window. `from` is one of the fixed presets the validator accepts; `to` is always the literal string `now`.\n - from (string) (required) — Start offset relative to `to`: `now-15m` = 15 minutes ago; `now-30m` = 30 minutes ago; `now-1h` = 1 hour ago; `now-3h` = 3 hours ago; `now-6h` = 6 hours ago; `now-12h` = 12 hours ago; `now-24h` = 24 hours ago; `now-7d` = 7 days ago. [now-15m, now-30m, now-1h, now-3h, now-6h, now-12h, now-24h, now-7d]\n - to (string) (required) — End of the window; only `now` is accepted. [now]\n - description (string) — Optional description, at most 1024 Unicode code points. (≤1024 chars)\n - refresh_interval (string) (required) — Auto-refresh cadence applied by the console: `off` disables auto-refresh; `30s` = every 30 seconds; `1m` = every minute; `5m` = every 5 minutes. [off, 30s, 1m, 5m]\n - tabs (array) (required) — Tabs, 1–10. Every tab title is unique and every tab or section ID must be a canonical UUIDv7 used only once across the definition.\n - description (string) — Optional tab description. (≤1024 chars)\n - id (string) (required) — Canonical UUIDv7 identifying the tab; unique across the definition.\n - sections (array) (required) — Sections on the tab, at most 10.\n - title (string) (required) — Tab title, 1–189 Unicode code points. Unique among tabs. (1-189 chars)\n - top_panels (array) (required) — Panels placed directly on the tab, at most 30.\n - title (string) (required) — Dashboard title, 1–189 Unicode code points after trimming. (1-189 chars)\n - variables (array) (required) — Dashboard variables, at most 20. Names must be unique within the definition and match the variable-name pattern.\n - datasource_ref (object) — Points a panel or query variable at a datasource — either a fixed ID or a datasource variable evaluated at render time.\n - datasource_type (string) — Datasource type the candidates are drawn from.\n - default (object) — A concrete selection of variable values. An empty `values` array is valid wire input and means unresolved — the server never substitutes a default for it.\n - default_datasource_id (integer) — Default datasource ID. Without a usable default the runtime picks the first candidate by name, then ID.\n - kind (string) (required) — Variable kind discriminator; always `datasource`, selecting a datasource. [datasource, custom, query]\n - label (string) — Optional display label; falls back to `name`. (≤189 chars)\n - name (string) (required) — Variable name used in `{{ }}` templates, at most 64 characters.\n - name_patterns (array) — Wildcard patterns narrowing the candidates; empty means every datasource of the type.\n - options (array) — Candidate list, 1–1000 entries. Values must be non-empty, unique and must not be `$__all`.\n - refresh (string) — When the candidates are recomputed: `on_dashboard_load` = once when the dashboard loads; `on_time_range_change` = every time the time range changes. [on_dashboard_load, on_time_range_change]\n - selection (object) — Selection cardinality for a variable.\n - variable_query (object) — Variable query. Pick the arm with `kind`; the arm must match the referenced datasource type.\n - folder_breadcrumb (array) (required) — Folder names from the root down to `folder_id`.\n - folder_id (integer) (required) — ID of the dashboard's folder. (min 1)\n - revision (integer) (required) — Current revision number. (min 1)\n - schema_version (string) (required) — Wire schema version of `definition`; only `dashboard.v1` is accepted. [dashboard.v1]\n - updated_at (string) (required) — Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (object) (required) — Account member recorded as the creator, updater or revision author.\n - id (integer) (required) — Member ID.\n - name (string) (required) — Member display name.\n", "DataSources.ReadInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Account ID.\n - address (string) (required) — Connection address. For Prometheus/Loki/VictoriaLogs: HTTP URL. For MySQL/Oracle/Postgres/ClickHouse: `host:port`. For SLS: endpoint without http/https prefix. Redis/MongoDB diagnostic types: one host:port, bracket IPv6; no URI, userinfo or query. Kafka: 1–32 unique comma-separated host:port bootstrap addresses; payload has no broker list. At most 4096 characters after normalization. (≤4096 chars)\n - alerting_enabled (boolean) (required) — Whether alert evaluation is allowed. Alerting also requires enabled=true and an alerting-capable type. Always false for diagnostic-only types; false does not block non-alerting queries or tools.\n - edge_cluster_name (string) (required) — Monitors edge cluster name responsible for evaluating rules using this datasource.\n - enabled (boolean) (required) — Whether business execution is enabled. Disabled datasources reject business queries and tools; enabling does not change alerting_enabled.\n - id (integer) (required) — Unique datasource ID.\n - name (string) (required) — Datasource display name.\n - note (string) (required) — Optional description.\n - payload (any) (required) — Type-specific configuration block; must contain the key matching `type_ident`. Always `null` in `/monit/datasource/list` responses (the list query does not read the payload column); populated in create/update/info responses. For `tencent_cls`, `secret_key` is masked to an empty string unless it is an `${env:...}` reference. For diagnostic types, password and Kafka tls_key are omitted from responses unless they are ${env:...} references. On update, omit those fields to preserve stored secrets; explicitly send an empty string to clear. Other configuration fields retain their existing behavior.\n - type_ident (string) (required) — Datasource type identifier. Allowed: `prometheus`, `loki`, `mysql`, `oracle`, `postgres`, `clickhouse`, `elasticsearch`, `sls`, `tencent_cls`, `victorialogs`, `redis_node`, `redis_sentinel`, `mongodb_mongod`, `mongodb_mongos`, `kafka`。\n - updated_at (string) (required) — Last update timestamp, Unix epoch seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n", "DataSources.ReadList": "Response fields (`data` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required) — Account ID.\n - address (string) (required) — Connection address. For Prometheus/Loki/VictoriaLogs: HTTP URL. For MySQL/Oracle/Postgres/ClickHouse: `host:port`. For SLS: endpoint without http/https prefix. Redis/MongoDB diagnostic types: one host:port, bracket IPv6; no URI, userinfo or query. Kafka: 1–32 unique comma-separated host:port bootstrap addresses; payload has no broker list. At most 4096 characters after normalization. (≤4096 chars)\n - alerting_enabled (boolean) (required) — Whether alert evaluation is allowed. Alerting also requires enabled=true and an alerting-capable type. Always false for diagnostic-only types; false does not block non-alerting queries or tools.\n - edge_cluster_name (string) (required) — Monitors edge cluster name responsible for evaluating rules using this datasource.\n - enabled (boolean) (required) — Whether business execution is enabled. Disabled datasources reject business queries and tools; enabling does not change alerting_enabled.\n - id (integer) (required) — Unique datasource ID.\n - name (string) (required) — Datasource display name.\n - note (string) (required) — Optional description.\n - payload (any) (required) — Type-specific configuration block; must contain the key matching `type_ident`. Always `null` in `/monit/datasource/list` responses (the list query does not read the payload column); populated in create/update/info responses. For `tencent_cls`, `secret_key` is masked to an empty string unless it is an `${env:...}` reference. For diagnostic types, password and Kafka tls_key are omitted from responses unless they are ${env:...} references. On update, omit those fields to preserve stored secrets; explicitly send an empty string to clear. Other configuration fields retain their existing behavior.\n - type_ident (string) (required) — Datasource type identifier. Allowed: `prometheus`, `loki`, `mysql`, `oracle`, `postgres`, `clickhouse`, `elasticsearch`, `sls`, `tencent_cls`, `victorialogs`, `redis_node`, `redis_sentinel`, `mongodb_mongod`, `mongodb_mongos`, `kafka`。\n - updated_at (string) (required) — Last update timestamp, Unix epoch seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n", "DataSources.ReadSLSProjects": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - count (integer) (required) — Number of projects in this page.\n - projects (array) (required) — Projects in the current page.\n - createTime (string) (required) — Creation time, Unix seconds rendered as a string, e.g. `\"1524539357\"`.\n - dataRedundancyType (string) — Data redundancy type: `LRS` = locally redundant storage, `ZRS` = zone-redundant storage. Omitted when not set. [LRS, ZRS]\n - description (string) (required) — Project description.\n - lastModifyTime (string) (required) — Last modification time, Unix seconds rendered as a string.\n - location (string) — Storage location, e.g. `cn-beijing-b`. Omitted when not set.\n - owner (string) (required) — Owner Aliyun account ID; empty when not returned by SLS.\n - projectName (string) (required) — Project name.\n - region (string) (required) — Region ID, e.g. `cn-shanghai`.\n - status (string) (required) — Project status, e.g. `Normal`.\n - total (integer) (required) — Total number of projects matching `query`, independent of pagination.\n", @@ -141,21 +158,27 @@ var responseHelpBySDKMethod = map[string]string{ "Incidents.WorkItemUpdate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - added_assignee_ids (array) — Assignee member IDs that were newly added (and notified).\n - idempotent_replay (boolean) — True when the call replayed an earlier request with the same idempotency key.\n - item (object) — A structured incident work item (action or post-mortem follow-up) with its assignees.\n - agent_session_id (string) — ID of the AI SRE session executing this item. Omitted when no session is recorded.\n - agent_session_venue (string) — Where that AI SRE session runs: `web` or `im`. Omitted when no session is recorded. [web, im]\n - assignee_ids (array) (required) — Member IDs of the current person assignees. AI SRE is not included. Never null; an empty array means no person assignee.\n - assignees (array) (required) — Current assignees. Each entry is `{type, id?}`. `type` is `person` or `ai_sre`; an `ai_sre` entry omits `id`. Never null; an empty array means unassigned. `assignee_ids` is the person-only subset of this list.\n - id (integer) — Member ID. Required when `type` is `person`. Omitted when `type` is `ai_sre`.\n - type (string) (required) — Assignee kind: `person` (a member) or `ai_sre` (the account AI SRE). [person, ai_sre]\n - converted_at_seconds (string) — Conversion time as a Unix timestamp in seconds. Present only after conversion. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - converted_by (integer) — Member ID of the operator who converted the action into a follow-up. Present only after conversion.\n - created_at_seconds (string) (required) — Creation time as a Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (integer) (required) — Member ID of the creator.\n - description (string) — Optional longer description (max 65,535 characters). (≤65535 chars)\n - incident_id (string) (required) — Incident ID (MongoDB ObjectID) the item is anchored to.\n - item_type (string) (required) — `action` for an item anchored to an active incident; `follow_up` for a post-mortem follow-up. [action, follow_up]\n - legacy_source_id (string) — Original identifier of the legacy follow-up this item was migrated from. Present only when `source_kind` is `legacy_follow_up`.\n - post_mortem_id (string) — Post-mortem ID (32-character hex string). Present on follow-up items once bound to a post-mortem.\n - priority (string) — Optional client-defined priority (max 64 characters). (≤64 chars)\n - source_kind (string) (required) — `native` for items created through this API; `legacy_follow_up` for items migrated from legacy post-mortem follow-ups. [native, legacy_follow_up]\n - status (string) (required) — Client-defined status (max 64 characters). There is no fixed state machine. (≤64 chars)\n - title (string) (required) — Item title (max 512 characters). (≤512 chars)\n - updated_at_seconds (string) (required) — Last update time as a Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) (required) — Member ID of the last updater.\n - version (integer) (required) — Optimistic-locking version, incremented on every mutation.\n - work_item_id (string) (required) — Work item ID (opaque string, max 128 characters). (≤128 chars)\n - removed_assignee_ids (array) — Assignee member IDs that were removed (never notified).\n", "Integrations.DatasourceImPersonTryLink": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - new_linked_person_ids (array) (required) — Person IDs newly linked during this call.\n", "Integrations.Detail": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - attempt (integer) (required) — Attempt sequence number.\n - channel_id (integer) — Channel ID when applicable.\n - channel_name (string) — Name of the associated channel, resolved at query time.\n - duration (integer) (required) — Total elapsed time of the attempt in milliseconds.\n - endpoint (string) (required) — Destination URL.\n - error_message (string) — Error message when delivery failed.\n - event_id (string) (required) — Event ID.\n - event_time (string) (required) — Event time formatted as `YYYY-MM-DD HH:MM:SS.ffffff`.\n - event_type (string) (required) — Event type code. `i_*` values are incident events (for example `i_new` = incident created); `a_*` values are alert events (for example `a_new` = alert triggered).\n - integration_id (integer) (required) — Integration ID.\n - ref_id (string) — Source object ID.\n - ref_title (string) — Title of the source incident or alert, resolved at query time.\n - request_body (string) — Outbound request body payload.\n - request_headers (string) — Serialized outbound request headers.\n - response_body (string) — Response body.\n - response_headers (string) — Serialized response headers.\n - status (string) (required) — Delivery outcome. [success, failed]\n - status_code (integer) (required) — HTTP status code.\n - webhook_type (string) (required) — Source object kind: `incident` or `alert`. [incident, alert]\n", + "Integrations.IntegrationAPIReadInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - category (any) (required)\n - created_at (any) (required)\n - description (any) (required)\n - integration_id (any) (required)\n - last_time (any) (required)\n - name (any) (required)\n - plugin_type (any) (required)\n - plugin_type_name (any) (required)\n - ref_id (any) (required)\n - settings (object) (required) — Type-specific configuration. Sensitive values (endpoint, headers, secrets, passwords) are returned masked as `******`.\n - status (any) (required)\n - team_id (any) (required)\n - updated_at (any) (required)\n", + "Integrations.IntegrationAPIReadList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - category (string) (required) — Category the integration belongs to: `event.alert` alert events, `event.change` change events, `im` IM bots, `webhook` custom webhooks. [event.alert, event.change, im, webhook]\n - created_at (string) (required) — Unix timestamp in seconds when the integration was created. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - description (string) (required) — Free-form description.\n - integration_id (integer) (required) — Integration ID.\n - last_time (string) (required) — Unix timestamp in seconds of the most recent event received. `0` when no event has arrived yet. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - name (string) (required) — Integration name.\n - plugin_type (string) (required) — Integration type, for example `standard.alert` or `zabbix.alert`.\n - plugin_type_name (string) (required) — Display name of the integration type, in the language of the request.\n - ref_id (string) (required) — Source reference ID: `a_`-prefixed for an account-scoped integration, `c_`-prefixed when it is shared into a channel, `w_`-prefixed on legacy workspace-scoped integrations.\n - status (string) (required) — Lifecycle status: `enabled` while the integration accepts events, `disabled` when it is paused. [enabled, disabled]\n - team_id (integer) (required) — ID of the team that owns the integration. `0` when it is not assigned to a team.\n - updated_at (string) (required) — Unix timestamp in seconds when the integration was last updated. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n", + "Integrations.IntegrationAPIReadTypeList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - category (string) (required) — Category the type belongs to: `event.alert` alert events, `event.change` change events, `im` IM bots, `webhook` custom webhooks. [event.alert, event.change, im, webhook]\n - plugin_type (string) (required) — Type identifier to pass as `plugin_type` when creating an integration.\n - plugin_type_logo_url (string) (required) — Logo URL of the type.\n - plugin_type_name (string) (required) — Display name of the type.\n - status (string) (required) — Platform status of the type.\n - supports_api_create (boolean) (required) — Whether `POST /integration/create` accepts this type.\n", + "Integrations.IntegrationAPIWriteCreate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - integration_id (integer) (required) — ID of the new integration.\n - integration_key (string) (required) — Key used to authenticate inbound pushes to this integration. Returned here only; fetch a new one with `POST /integration/key/rotate`.\n", + "Integrations.IntegrationAPIWriteRotateKey": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - integration_key (string) (required) — The new key. The previous key stops working immediately; this value cannot be read again later.\n", + "Integrations.IntegrationAPIWriteUpdate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - category (any) (required)\n - created_at (any) (required)\n - description (any) (required)\n - integration_id (any) (required)\n - last_time (any) (required)\n - name (any) (required)\n - plugin_type (any) (required)\n - plugin_type_name (any) (required)\n - ref_id (any) (required)\n - settings (object) (required) — Type-specific configuration. Sensitive values (endpoint, headers, secrets, passwords) are returned masked as `******`.\n - status (any) (required)\n - team_id (any) (required)\n - updated_at (any) (required)\n", "Integrations.List": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - attempt (integer) (required) — Attempt sequence number.\n - channel_id (integer) — Channel ID associated with the event, when applicable.\n - duration (integer) (required) — Total elapsed time of the attempt in milliseconds.\n - endpoint (string) (required) — Destination URL.\n - error_message (string) — Error message when delivery failed.\n - event_id (string) (required) — Unique event identifier for the delivery attempt.\n - event_time (string) (required) — Event time formatted as `YYYY-MM-DD HH:MM:SS.ffffff`.\n - event_type (string) (required) — Event type code. `i_*` values are incident events (for example `i_new` = incident created); `a_*` values are alert events (for example `a_new` = alert triggered).\n - integration_id (integer) (required) — Integration ID that triggered the webhook.\n - ref_id (string) — Source object ID (incident ID or alert ID).\n - request_body (string) — Outbound request body payload.\n - request_headers (string) — Serialized outbound request headers.\n - response_body (string) — Response body returned by the destination.\n - response_headers (string) — Serialized response headers from the destination.\n - status (string) (required) — Delivery outcome. [success, failed]\n - status_code (integer) (required) — HTTP status code returned by the destination.\n - webhook_type (string) (required) — Source object kind: `incident` or `alert`. [incident, alert]\n", "IssuePresetSeverityRules.Create": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - priority (integer) (required) — Evaluation order assigned to the new rule (always the current lowest precedence, i.e. current max + 1).\n - rule_id (string) (required) — ID of the newly created rule.\n - rule_name (string) (required) — Echo of the rule's display name.\n", "IssuePresetSeverityRules.HistoryList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - rules (array) (required) — Full rule set captured immediately before the mutation that produced this snapshot. Empty for the very first snapshot.\n - account_id (integer) (required) — Account ID the rule belongs to.\n - application_id (string) (required) — RUM application ID the rule belongs to.\n - created_at (string) (required) — Unix timestamp in milliseconds when the rule was created. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (integer) (required) — Member ID who originally created the rule.\n - deleted_at (string) (required) — Unix timestamp in milliseconds the rule was soft-deleted; `0` means not deleted. Always `0` in practice, since deleted rules are excluded before a snapshot is taken. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - description (string) (required) — Rule description. May be empty.\n - filters (array>) (required) — OR-of-ANDs filter structure: the outer array is OR'd, each inner array is AND'd. A rule matches an error when at least one inner AND-group fully matches.\n - key (string) (required) — Filter attribute key. Only these Error-level attributes are supported for preset severity rules. | Value | Meaning | |---|---| | `error.usr_id` | User ID | | `error.usr_email` | User email | | `error.view_url` | Full URL of the page where the error occurred | | `error.view_url_path` | URL path of the page where the error occurred | | `error.error_type` | Error type | | `error.error_message` | Error message | | `error.env` | Environment (e.g. production/staging) | | `error.service` | Service name | | `error.device_type` | Device type | | `error.os_name` | Operating system name | | `error.browser_name` | Browser name | | `error.is_crash` | Whether the error is a crash (boolean) | [error.usr_id, error.usr_email, error.view_url, error.view_url_path, error.error_type, error.error_message, error.env, error.service, error.device_type, error.os_name, error.browser_name, error.is_crash]\n - oper (string) (required) — Match semantics: `IN` matches when the field's value matches any of `vals`; `NOTIN` matches when it matches none of them (and matches when the field is absent). [IN, NOTIN]\n - vals (array) (required) — Values to match against. Each entry supports exact string match, wildcard (`*`/`?`), regex (wrap in `/.../`), CIDR (`cidr:10.0.0.0/8`) for IP-shaped values, or numeric comparison (`num:gt:100`, `num:le:50`, etc.).\n - id (integer) (required) — Internal auto-increment row ID. Not stable across a history revert — reverting reinserts rows with new IDs.\n - priority (integer) (required) — Evaluation order at snapshot time; `1` is highest precedence.\n - rule_id (string) (required) — Unique rule ID.\n - rule_name (string) (required) — Rule display name.\n - severity (string) (required) — Severity assigned to errors matching this rule. [Critical, Warning, Info]\n - status (string) (required) — Rule status at snapshot time. [enabled, disabled]\n - updated_at (string) (required) — Unix timestamp in milliseconds when the rule was last updated. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) (required) — Member ID who last updated the rule as of snapshot time.\n - updated_at (string) (required) — Unix timestamp in milliseconds when the snapshot was written. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) (required) — Member ID who triggered the mutation this snapshot precedes.\n - updated_by_name (string) (required) — Display name of `updated_by` at the time of the change.\n - version (integer) (required) — Monotonically increasing snapshot version number, starting at 1.\n", "IssuePresetSeverityRules.List": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - created_at (string) (required) — Unix timestamp in milliseconds when the rule was created. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - description (string) (required) — Rule description. May be empty.\n - filters (array>) (required) — OR-of-ANDs filter structure: the outer array is OR'd, each inner array is AND'd. A rule matches an error when at least one inner AND-group fully matches.\n - key (string) (required) — Filter attribute key. Only these Error-level attributes are supported for preset severity rules. | Value | Meaning | |---|---| | `error.usr_id` | User ID | | `error.usr_email` | User email | | `error.view_url` | Full URL of the page where the error occurred | | `error.view_url_path` | URL path of the page where the error occurred | | `error.error_type` | Error type | | `error.error_message` | Error message | | `error.env` | Environment (e.g. production/staging) | | `error.service` | Service name | | `error.device_type` | Device type | | `error.os_name` | Operating system name | | `error.browser_name` | Browser name | | `error.is_crash` | Whether the error is a crash (boolean) | [error.usr_id, error.usr_email, error.view_url, error.view_url_path, error.error_type, error.error_message, error.env, error.service, error.device_type, error.os_name, error.browser_name, error.is_crash]\n - oper (string) (required) — Match semantics: `IN` matches when the field's value matches any of `vals`; `NOTIN` matches when it matches none of them (and matches when the field is absent). [IN, NOTIN]\n - vals (array) (required) — Values to match against. Each entry supports exact string match, wildcard (`*`/`?`), regex (wrap in `/.../`), CIDR (`cidr:10.0.0.0/8`) for IP-shaped values, or numeric comparison (`num:gt:100`, `num:le:50`, etc.).\n - priority (integer) (required) — Evaluation order among the application's rules. `1` is evaluated first (highest precedence); the first enabled rule whose filters match wins.\n - rule_id (string) (required) — Unique rule ID.\n - rule_name (string) (required) — Rule display name.\n - severity (string) (required) — Severity assigned to errors matching this rule. [Critical, Warning, Info]\n - status (string) (required) — Only enabled rules are evaluated against incoming errors. [enabled, disabled]\n - updated_at (string) (required) — Unix timestamp in milliseconds when the rule was last updated. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n", - "Issues.ReadInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - age (integer) — Time span between the first and most recent occurrence, in seconds.\n - application_id (string) — ID of the RUM application this issue belongs to.\n - application_name (string) — Name of the owning application, resolved by `application_id` at query time (reflects the application's current name).\n - created_at (string) — Issue creation time (client time of the first error event), Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - error (object) — Representative error of this issue, taken from the error event that created it.\n - message (string) — Normalized error message, truncated to at most 512 characters.\n - type (string) — Error type, from the error event's `error_type` field as reported by the SDK.\n - error_count (integer) — Total error occurrences.\n - first_seen (object) — Information about the issue's first occurrence (time and application version).\n - timestamp (string) — Client time of the first error event, Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - version (string) — Application version at first occurrence; empty string when the event carries no version.\n - is_crash (boolean) — Whether the error caused an app crash.\n - issue_id (string) — Unique issue ID.\n - last_seen (object) — Information about the issue's most recent occurrence (time and application version).\n - timestamp (string) — Client time of the most recent error event, Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - version (string) — Application version at the most recent occurrence; empty string when the event carries no version.\n - regression (object) — Regression metadata. Present only when a previously resolved issue re-occurred.\n - regressed_at (string) — Time the regression was detected, Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - regressed_at_version (string) — Application version in which the regression was observed.\n - resolved_at (string) — When the issue was resolved before this regression, as a Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - resolved_at (string) — Time the issue was marked resolved, Unix timestamp in milliseconds; 0 while unresolved. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - resolved_by (integer) — Person ID of the user who marked the issue resolved; 0 while unresolved.\n - service (string) — Name of the service that produced this issue, taken from the error event's `service` field.\n - session_count (integer) — Affected user sessions.\n - severity (string) — Issue severity: `Critical`, `Warning`, or `Info`. Empty string on legacy issues created before severity existed. [Critical, Warning, Info]\n - status (string) — Triage status of the issue; soft-deleted (`deleted`) issues are never returned. | Value | Meaning | |---|---| | `for_review` | Pending triage | | `reviewed` | Reviewed | | `ignored` | Ignored | | `resolved` | Resolved | [for_review, reviewed, ignored, resolved]\n - suspected_cause (object) — Suspected root cause analysis, determined automatically (rules or AI) or set manually by a user.\n - person_id (integer) — Person ID of the user who manually set the cause; 0 when `source` is `auto`.\n - reason (string) — Explanation for the cause determination, generated only by AI analysis; empty string when AI is disabled or analysis has not run.\n - source (string) — Origin of the cause: `auto` for system-determined, `user` for manually set. [auto, user]\n - value (string) — Suspected cause category. One of: | Value | Meaning | |---|---| | `api.failed_request` | API request failure (e.g. HTTP 4xx/5xx responses) | | `network.error` | Network connectivity error (offline, aborted requests, etc.) | | `code.exception` | Code exception (Syntax/Reference/Range and similar runtime errors) | | `code.invalid_object_access` | Invalid object access (e.g. reading a property of `undefined`/`null`) | | `code.invalid_argument` | Invalid argument passed to a function | | `unknown` | Cause could not be determined | [api.failed_request, network.error, code.exception, code.invalid_object_access, code.invalid_argument, unknown]\n - team_id (integer) — ID of the team owning this issue, copied from the owning application's `team_id` at issue creation.\n - updated_at (string) — Time the issue was last updated, Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - versions (array) — Deduplicated list of application versions in which this issue has occurred; may contain an empty string for events without version info.\n", - "Issues.ReadList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - age (integer) — Time span between the first and most recent occurrence, in seconds.\n - application_id (string) — ID of the RUM application this issue belongs to.\n - application_name (string) — Name of the owning application, resolved by `application_id` at query time (reflects the application's current name).\n - created_at (string) — Issue creation time (client time of the first error event), Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - error (object) — Representative error of this issue, taken from the error event that created it.\n - message (string) — Normalized error message, truncated to at most 512 characters.\n - type (string) — Error type, from the error event's `error_type` field as reported by the SDK.\n - error_count (integer) — Total error occurrences.\n - first_seen (object) — Information about the issue's first occurrence (time and application version).\n - timestamp (string) — Client time of the first error event, Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - version (string) — Application version at first occurrence; empty string when the event carries no version.\n - is_crash (boolean) — Whether the error caused an app crash.\n - issue_id (string) — Unique issue ID.\n - last_seen (object) — Information about the issue's most recent occurrence (time and application version).\n - timestamp (string) — Client time of the most recent error event, Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - version (string) — Application version at the most recent occurrence; empty string when the event carries no version.\n - regression (object) — Regression metadata. Present only when a previously resolved issue re-occurred.\n - regressed_at (string) — Time the regression was detected, Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - regressed_at_version (string) — Application version in which the regression was observed.\n - resolved_at (string) — When the issue was resolved before this regression, as a Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - resolved_at (string) — Time the issue was marked resolved, Unix timestamp in milliseconds; 0 while unresolved. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - resolved_by (integer) — Person ID of the user who marked the issue resolved; 0 while unresolved.\n - service (string) — Name of the service that produced this issue, taken from the error event's `service` field.\n - session_count (integer) — Affected user sessions.\n - severity (string) — Issue severity: `Critical`, `Warning`, or `Info`. Empty string on legacy issues created before severity existed. [Critical, Warning, Info]\n - status (string) — Triage status of the issue; soft-deleted (`deleted`) issues are never returned. | Value | Meaning | |---|---| | `for_review` | Pending triage | | `reviewed` | Reviewed | | `ignored` | Ignored | | `resolved` | Resolved | [for_review, reviewed, ignored, resolved]\n - suspected_cause (object) — Suspected root cause analysis, determined automatically (rules or AI) or set manually by a user.\n - person_id (integer) — Person ID of the user who manually set the cause; 0 when `source` is `auto`.\n - reason (string) — Explanation for the cause determination, generated only by AI analysis; empty string when AI is disabled or analysis has not run.\n - source (string) — Origin of the cause: `auto` for system-determined, `user` for manually set. [auto, user]\n - value (string) — Suspected cause category. One of: | Value | Meaning | |---|---| | `api.failed_request` | API request failure (e.g. HTTP 4xx/5xx responses) | | `network.error` | Network connectivity error (offline, aborted requests, etc.) | | `code.exception` | Code exception (Syntax/Reference/Range and similar runtime errors) | | `code.invalid_object_access` | Invalid object access (e.g. reading a property of `undefined`/`null`) | | `code.invalid_argument` | Invalid argument passed to a function | | `unknown` | Cause could not be determined | [api.failed_request, network.error, code.exception, code.invalid_object_access, code.invalid_argument, unknown]\n - team_id (integer) — ID of the team owning this issue, copied from the owning application's `team_id` at issue creation.\n - updated_at (string) — Time the issue was last updated, Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - versions (array) — Deduplicated list of application versions in which this issue has occurred; may contain an empty string for events without version info.\n", - "Knowledge.FileReadGet": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - content_b64 (string) (required) — Base64-encoded file content; decodes to UTF-8 text.\n - file (object) (required) — Metadata of one file inside a knowledge pack. Content is fetched separately via file/get.\n - checksum (string) (required) — SHA-256 hex digest of the file content.\n - content_type (string) (required) — MIME type; inferred from the file extension when not set on upload.\n - file_id (string) (required) — File ID (`kfl_` prefix).\n - pack_id (string) (required) — ID of the knowledge pack that contains the file.\n - rel_path (string) (required) — Path relative to the pack root, e.g. `runbooks/restart.md`.\n - size_bytes (integer) (required) — File size in bytes.\n - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the file was last modified. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) (required) — Person ID of the member who last modified the file.\n", - "Knowledge.FileReadList": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - files (array) (required) — Array of files in the specified knowledge pack; empty array when the pack has no files.\n - checksum (string) (required) — SHA-256 hex digest of the file content.\n - content_type (string) (required) — MIME type; inferred from the file extension when not set on upload.\n - file_id (string) (required) — File ID (`kfl_` prefix).\n - pack_id (string) (required) — ID of the knowledge pack that contains the file.\n - rel_path (string) (required) — Path relative to the pack root, e.g. `runbooks/restart.md`.\n - size_bytes (integer) (required) — File size in bytes.\n - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the file was last modified. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) (required) — Person ID of the member who last modified the file.\n - total (integer) (required) — Total number of files in the pack.\n", - "Knowledge.FileWriteDelete": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - warnings (array) — Non-blocking warnings after deletion; `code=still_referenced_by` means the (force-)deleted file is still @ref-referenced by other files in the pack (`refs` lists the referrers). Absent when there are no warnings (omitempty).\n - code (string) (required) — Warning code. One of: `unresolved_reference` (an @ref in the written file's content points to a file that does not exist in the pack; `ref` carries it), `still_referenced_by` (the deleted file is still @ref-referenced by other files in the pack; `refs` lists the referrers). [unresolved_reference, still_referenced_by]\n - ref (string) — Single reference related to the warning.\n - refs (array) — Multiple references related to the warning.\n", - "Knowledge.FileWritePut": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - file (object) (required) — Metadata of one file inside a knowledge pack. Content is fetched separately via file/get.\n - checksum (string) (required) — SHA-256 hex digest of the file content.\n - content_type (string) (required) — MIME type; inferred from the file extension when not set on upload.\n - file_id (string) (required) — File ID (`kfl_` prefix).\n - pack_id (string) (required) — ID of the knowledge pack that contains the file.\n - rel_path (string) (required) — Path relative to the pack root, e.g. `runbooks/restart.md`.\n - size_bytes (integer) (required) — File size in bytes.\n - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the file was last modified. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) (required) — Person ID of the member who last modified the file.\n - warnings (array) — Non-blocking warnings after a successful write; `code=unresolved_reference` means an @ref in the file content points to a file that does not exist in the pack. Absent when there are no warnings (omitempty).\n - code (string) (required) — Warning code. One of: `unresolved_reference` (an @ref in the written file's content points to a file that does not exist in the pack; `ref` carries it), `still_referenced_by` (the deleted file is still @ref-referenced by other files in the pack; `refs` lists the referrers). [unresolved_reference, still_referenced_by]\n - ref (string) — Single reference related to the warning.\n - refs (array) — Multiple references related to the warning.\n", - "Knowledge.PackReadGet": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - files (array) (required) — Array of files in this knowledge pack; empty array when the pack has no files.\n - checksum (string) (required) — SHA-256 hex digest of the file content.\n - content_type (string) (required) — MIME type; inferred from the file extension when not set on upload.\n - file_id (string) (required) — File ID (`kfl_` prefix).\n - pack_id (string) (required) — ID of the knowledge pack that contains the file.\n - rel_path (string) (required) — Path relative to the pack root, e.g. `runbooks/restart.md`.\n - size_bytes (integer) (required) — File size in bytes.\n - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the file was last modified. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) (required) — Person ID of the member who last modified the file.\n - pack (object) (required) — A knowledge pack — a versioned file tree staged into every AI SRE sandbox at session start. One pack exists per (account, scope, scope_id).\n - account_id (integer) (required) — Account that owns the pack.\n - can_edit (boolean) (required) — Whether the caller can edit this pack.\n - created_at_ms (string) (required) — Unix timestamp in milliseconds when the pack was created. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (integer) (required) — Person ID of the member who created the pack.\n - duty_version (integer) (required) — Pack version at which DUTY.md was last authored or re-affirmed. When `version` is greater, DUTY.md no longer reflects every file in the pack.\n - file_count (integer) (required) — Number of files in the pack.\n - pack_id (string) (required) — Knowledge pack ID (`kpk_` prefix).\n - scope (string) (required) — Pack scope. `channel` is a legacy scope; new packs are `account` or `team`. [account, team, channel]\n - scope_id (integer) (required) — Scope owner: the account ID for `account` scope, the team ID for `team` scope.\n - team_name (string) — Display name of the owning team (team scope only). Omitted when empty (account scope, or the team name could not be resolved).\n - total_bytes (integer) (required) — Total size of all files in bytes.\n - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the pack was last modified. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - version (integer) (required) — Pack version, incremented on every file change.\n", - "Knowledge.PackReadList": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - packs (array) (required) — Array of visible knowledge packs after filtering (current page), used with `total` for pagination.\n - account_id (integer) (required) — Account that owns the pack.\n - can_edit (boolean) (required) — Whether the caller can edit this pack.\n - created_at_ms (string) (required) — Unix timestamp in milliseconds when the pack was created. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (integer) (required) — Person ID of the member who created the pack.\n - duty_version (integer) (required) — Pack version at which DUTY.md was last authored or re-affirmed. When `version` is greater, DUTY.md no longer reflects every file in the pack.\n - file_count (integer) (required) — Number of files in the pack.\n - pack_id (string) (required) — Knowledge pack ID (`kpk_` prefix).\n - scope (string) (required) — Pack scope. `channel` is a legacy scope; new packs are `account` or `team`. [account, team, channel]\n - scope_id (integer) (required) — Scope owner: the account ID for `account` scope, the team ID for `team` scope.\n - team_name (string) — Display name of the owning team (team scope only). Omitted when empty (account scope, or the team name could not be resolved).\n - total_bytes (integer) (required) — Total size of all files in bytes.\n - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the pack was last modified. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - version (integer) (required) — Pack version, incremented on every file change.\n - total (integer) (required) — Total number of packs after filtering, before pagination.\n", - "Knowledge.PackWriteDelete": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - ok (boolean) (required) — True when the pack was deleted.\n", - "Knowledge.PackWriteEnsure": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Account that owns the pack.\n - can_edit (boolean) (required) — Whether the caller can edit this pack.\n - created_at_ms (string) (required) — Unix timestamp in milliseconds when the pack was created. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (integer) (required) — Person ID of the member who created the pack.\n - duty_version (integer) (required) — Pack version at which DUTY.md was last authored or re-affirmed. When `version` is greater, DUTY.md no longer reflects every file in the pack.\n - file_count (integer) (required) — Number of files in the pack.\n - pack_id (string) (required) — Knowledge pack ID (`kpk_` prefix).\n - scope (string) (required) — Pack scope. `channel` is a legacy scope; new packs are `account` or `team`. [account, team, channel]\n - scope_id (integer) (required) — Scope owner: the account ID for `account` scope, the team ID for `team` scope.\n - team_name (string) — Display name of the owning team (team scope only). Omitted when empty (account scope, or the team name could not be resolved).\n - total_bytes (integer) (required) — Total size of all files in bytes.\n - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the pack was last modified. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - version (integer) (required) — Pack version, incremented on every file change.\n", - "Knowledge.PackWriteUpdate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Account that owns the pack.\n - can_edit (boolean) (required) — Whether the caller can edit this pack.\n - created_at_ms (string) (required) — Unix timestamp in milliseconds when the pack was created. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (integer) (required) — Person ID of the member who created the pack.\n - duty_version (integer) (required) — Pack version at which DUTY.md was last authored or re-affirmed. When `version` is greater, DUTY.md no longer reflects every file in the pack.\n - file_count (integer) (required) — Number of files in the pack.\n - pack_id (string) (required) — Knowledge pack ID (`kpk_` prefix).\n - scope (string) (required) — Pack scope. `channel` is a legacy scope; new packs are `account` or `team`. [account, team, channel]\n - scope_id (integer) (required) — Scope owner: the account ID for `account` scope, the team ID for `team` scope.\n - team_name (string) — Display name of the owning team (team scope only). Omitted when empty (account scope, or the team name could not be resolved).\n - total_bytes (integer) (required) — Total size of all files in bytes.\n - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the pack was last modified. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - version (integer) (required) — Pack version, incremented on every file change.\n", + "Issues.ReadInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - age (integer) — Time span between the first and most recent occurrence, in seconds.\n - application_id (string) — ID of the RUM application this issue belongs to.\n - application_name (string) — Name of the owning application, resolved by `application_id` at query time (reflects the application's current name).\n - created_at (string) — Issue creation time (client time of the first error event), Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - error (object) — Representative error of this issue, taken from the error event that created it.\n - message (string) — Normalized error message, truncated to at most 512 characters.\n - type (string) — Error type, from the error event's `error_type` field as reported by the SDK.\n - error_count (integer) — Total error occurrences.\n - first_seen (object) — Information about the issue's first occurrence (time and application version).\n - timestamp (string) — Client time of the first error event, Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - version (string) — Application version at first occurrence; empty string when the event carries no version.\n - is_crash (boolean) — Whether the error caused an app crash.\n - issue_id (string) — Unique issue ID.\n - last_seen (object) — Information about the issue's most recent occurrence (time and application version).\n - timestamp (string) — Client time of the most recent error event, Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - version (string) — Application version at the most recent occurrence; empty string when the event carries no version.\n - regression (object) — Regression metadata. Present only when a previously resolved issue re-occurred.\n - regressed_at (string) — Time the regression was detected, Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - regressed_at_version (string) — Application version in which the regression was observed.\n - resolved_at (string) — When the issue was resolved before this regression, as a Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - resolved_at (string) — Time the issue was marked resolved, Unix timestamp in milliseconds; 0 while unresolved. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - resolved_by (integer) — Person ID of the user who marked the issue resolved; 0 while unresolved.\n - service (string) — Name of the service that produced this issue, taken from the error event's `service` field.\n - session_count (integer) — Affected user sessions.\n - severity (string) — Issue severity: `Critical`, `Warning`, or `Info`. Empty string on legacy issues created before severity existed. [Critical, Warning, Info]\n - status (string) — Triage status of the issue; soft-deleted (`deleted`) issues are never returned. | Value | Meaning | |---|---| | `for_review` | Pending triage | | `reviewed` | Reviewed | | `ignored` | Ignored | | `resolved` | Resolved | [for_review, reviewed, ignored, resolved]\n - suspected_cause (object) — Suspected root cause analysis, determined automatically (rules or AI) or set manually by a user.\n - person_id (integer) — Person ID of the user who manually set the cause; 0 when `source` is `auto`.\n - reason (string) — Explanation for the cause determination, generated only by AI analysis; empty string when AI is disabled or analysis has not run.\n - source (string) — Origin of the cause: `auto` for system-determined, `user` for manually set. [auto, user]\n - value (string) — Suspected cause category. One of: | Value | Meaning | |---|---| | `api.failed_request` | API request failure (e.g. HTTP 4xx/5xx responses) | | `network.error` | Network connectivity error (offline, aborted requests, etc.) | | `code.exception` | Code exception (Syntax/Reference/Range and similar runtime errors) | | `code.invalid_object_access` | Invalid object access (e.g. reading a property of `undefined`/`null`) | | `code.invalid_argument` | Invalid argument passed to a function | | `unknown` | Cause could not be determined | [api.failed_request, network.error, code.exception, code.invalid_object_access, code.invalid_argument, unknown]\n - team_id (integer) — ID of the team owning this issue. For `POST /rum/issue/info` this is the owning application's current `team_id`; `POST /rum/issue/list` and `POST /rum/issue/export` report the team recorded when the issue was first seen, which differs once the application moves to another team.\n - updated_at (string) — Time the issue was last updated, Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - versions (array) — Deduplicated list of application versions in which this issue has occurred; may contain an empty string for events without version info.\n", + "Issues.ReadList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - age (integer) — Time span between the first and most recent occurrence, in seconds.\n - application_id (string) — ID of the RUM application this issue belongs to.\n - application_name (string) — Name of the owning application, resolved by `application_id` at query time (reflects the application's current name).\n - created_at (string) — Issue creation time (client time of the first error event), Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - error (object) — Representative error of this issue, taken from the error event that created it.\n - message (string) — Normalized error message, truncated to at most 512 characters.\n - type (string) — Error type, from the error event's `error_type` field as reported by the SDK.\n - error_count (integer) — Total error occurrences.\n - first_seen (object) — Information about the issue's first occurrence (time and application version).\n - timestamp (string) — Client time of the first error event, Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - version (string) — Application version at first occurrence; empty string when the event carries no version.\n - is_crash (boolean) — Whether the error caused an app crash.\n - issue_id (string) — Unique issue ID.\n - last_seen (object) — Information about the issue's most recent occurrence (time and application version).\n - timestamp (string) — Client time of the most recent error event, Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - version (string) — Application version at the most recent occurrence; empty string when the event carries no version.\n - regression (object) — Regression metadata. Present only when a previously resolved issue re-occurred.\n - regressed_at (string) — Time the regression was detected, Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - regressed_at_version (string) — Application version in which the regression was observed.\n - resolved_at (string) — When the issue was resolved before this regression, as a Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - resolved_at (string) — Time the issue was marked resolved, Unix timestamp in milliseconds; 0 while unresolved. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - resolved_by (integer) — Person ID of the user who marked the issue resolved; 0 while unresolved.\n - service (string) — Name of the service that produced this issue, taken from the error event's `service` field.\n - session_count (integer) — Affected user sessions.\n - severity (string) — Issue severity: `Critical`, `Warning`, or `Info`. Empty string on legacy issues created before severity existed. [Critical, Warning, Info]\n - status (string) — Triage status of the issue; soft-deleted (`deleted`) issues are never returned. | Value | Meaning | |---|---| | `for_review` | Pending triage | | `reviewed` | Reviewed | | `ignored` | Ignored | | `resolved` | Resolved | [for_review, reviewed, ignored, resolved]\n - suspected_cause (object) — Suspected root cause analysis, determined automatically (rules or AI) or set manually by a user.\n - person_id (integer) — Person ID of the user who manually set the cause; 0 when `source` is `auto`.\n - reason (string) — Explanation for the cause determination, generated only by AI analysis; empty string when AI is disabled or analysis has not run.\n - source (string) — Origin of the cause: `auto` for system-determined, `user` for manually set. [auto, user]\n - value (string) — Suspected cause category. One of: | Value | Meaning | |---|---| | `api.failed_request` | API request failure (e.g. HTTP 4xx/5xx responses) | | `network.error` | Network connectivity error (offline, aborted requests, etc.) | | `code.exception` | Code exception (Syntax/Reference/Range and similar runtime errors) | | `code.invalid_object_access` | Invalid object access (e.g. reading a property of `undefined`/`null`) | | `code.invalid_argument` | Invalid argument passed to a function | | `unknown` | Cause could not be determined | [api.failed_request, network.error, code.exception, code.invalid_object_access, code.invalid_argument, unknown]\n - team_id (integer) — ID of the team owning this issue. For `POST /rum/issue/info` this is the owning application's current `team_id`; `POST /rum/issue/list` and `POST /rum/issue/export` report the team recorded when the issue was first seen, which differs once the application moves to another team.\n - updated_at (string) — Time the issue was last updated, Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - versions (array) — Deduplicated list of application versions in which this issue has occurred; may contain an empty string for events without version info.\n", + "Knowledge.FileReadGet": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - content_b64 (string) (required) — Base64-encoded file content; decodes to UTF-8 text.\n - file (object) (required) — Metadata of one knowledge file. Content is fetched separately via file/get.\n - checksum (string) (required) — SHA-256 hex digest of the file content.\n - content_type (string) (required) — MIME type; inferred from the file extension when not set on upload.\n - file_id (string) (required) — File ID (`kfl_` prefix).\n - pack_id (string) (required) — ID of the knowledge that contains the file.\n - rel_path (string) (required) — Path relative to the knowledge root, e.g. `runbooks/restart.md`.\n - size_bytes (integer) (required) — File size in bytes.\n - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the file was last modified. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) (required) — Person ID of the member who last modified the file.\n", + "Knowledge.FileReadList": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - files (array) (required) — Array of files in the specified knowledge; empty array when it has no files.\n - checksum (string) (required) — SHA-256 hex digest of the file content.\n - content_type (string) (required) — MIME type; inferred from the file extension when not set on upload.\n - file_id (string) (required) — File ID (`kfl_` prefix).\n - pack_id (string) (required) — ID of the knowledge that contains the file.\n - rel_path (string) (required) — Path relative to the knowledge root, e.g. `runbooks/restart.md`.\n - size_bytes (integer) (required) — File size in bytes.\n - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the file was last modified. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) (required) — Person ID of the member who last modified the file.\n - total (integer) (required) — Total number of files in the knowledge.\n", + "Knowledge.FileWriteDelete": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - warnings (array) — Non-blocking warnings after deletion; `code=still_referenced_by` means the (force-)deleted file is still @ref-referenced by other files in the knowledge (`refs` lists the referrers). Absent when there are no warnings (omitempty).\n - code (string) (required) — Warning code. One of: `unresolved_reference` (an @ref in the written file's content points to a file that does not exist in the knowledge; `ref` carries it), `still_referenced_by` (the deleted file is still @ref-referenced by other files in the knowledge; `refs` lists the referrers). [unresolved_reference, still_referenced_by]\n - ref (string) — Single reference related to the warning.\n - refs (array) — Multiple references related to the warning.\n", + "Knowledge.FileWritePut": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - file (object) (required) — Metadata of one knowledge file. Content is fetched separately via file/get.\n - checksum (string) (required) — SHA-256 hex digest of the file content.\n - content_type (string) (required) — MIME type; inferred from the file extension when not set on upload.\n - file_id (string) (required) — File ID (`kfl_` prefix).\n - pack_id (string) (required) — ID of the knowledge that contains the file.\n - rel_path (string) (required) — Path relative to the knowledge root, e.g. `runbooks/restart.md`.\n - size_bytes (integer) (required) — File size in bytes.\n - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the file was last modified. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) (required) — Person ID of the member who last modified the file.\n - warnings (array) — Non-blocking warnings after a successful write; `code=unresolved_reference` means an @ref in the file content points to a file that does not exist in the knowledge. Absent when there are no warnings (omitempty).\n - code (string) (required) — Warning code. One of: `unresolved_reference` (an @ref in the written file's content points to a file that does not exist in the knowledge; `ref` carries it), `still_referenced_by` (the deleted file is still @ref-referenced by other files in the knowledge; `refs` lists the referrers). [unresolved_reference, still_referenced_by]\n - ref (string) — Single reference related to the warning.\n - refs (array) — Multiple references related to the warning.\n", + "Knowledge.PackReadGet": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - files (array) (required) — Array of files in this knowledge; empty array when it has no files.\n - checksum (string) (required) — SHA-256 hex digest of the file content.\n - content_type (string) (required) — MIME type; inferred from the file extension when not set on upload.\n - file_id (string) (required) — File ID (`kfl_` prefix).\n - pack_id (string) (required) — ID of the knowledge that contains the file.\n - rel_path (string) (required) — Path relative to the knowledge root, e.g. `runbooks/restart.md`.\n - size_bytes (integer) (required) — File size in bytes.\n - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the file was last modified. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) (required) — Person ID of the member who last modified the file.\n - pack (object) (required) — Knowledge — a versioned file tree staged into every AI SRE sandbox at session start. One knowledge exists per (account, scope, scope_id).\n - account_id (integer) (required) — Account that owns the knowledge.\n - can_edit (boolean) (required) — Whether the caller can edit this knowledge.\n - created_at_ms (string) (required) — Unix timestamp in milliseconds when the knowledge was created. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (integer) (required) — Person ID of the member who created the knowledge.\n - duty_version (integer) (required) — Knowledge version at which DUTY.md was last authored or re-affirmed. When `version` is greater, DUTY.md no longer reflects every file in the knowledge.\n - file_count (integer) (required) — Number of files in the knowledge.\n - pack_id (string) (required) — Knowledge ID (`kpk_` prefix).\n - scope (string) (required) — Knowledge scope. `channel` is a legacy scope; new knowledge is `account` or `team` scope. [account, team, channel]\n - scope_id (integer) (required) — Scope owner: the account ID for `account` scope, the team ID for `team` scope.\n - team_name (string) — Display name of the owning team (team scope only). Omitted when empty (account scope, or the team name could not be resolved).\n - total_bytes (integer) (required) — Total size of all files in bytes.\n - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the knowledge was last modified. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - version (integer) (required) — Knowledge version, incremented on every file change.\n", + "Knowledge.PackReadList": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - packs (array) (required) — Array of visible knowledge after filtering (current page), used with `total` for pagination.\n - account_id (integer) (required) — Account that owns the knowledge.\n - can_edit (boolean) (required) — Whether the caller can edit this knowledge.\n - created_at_ms (string) (required) — Unix timestamp in milliseconds when the knowledge was created. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (integer) (required) — Person ID of the member who created the knowledge.\n - duty_version (integer) (required) — Knowledge version at which DUTY.md was last authored or re-affirmed. When `version` is greater, DUTY.md no longer reflects every file in the knowledge.\n - file_count (integer) (required) — Number of files in the knowledge.\n - pack_id (string) (required) — Knowledge ID (`kpk_` prefix).\n - scope (string) (required) — Knowledge scope. `channel` is a legacy scope; new knowledge is `account` or `team` scope. [account, team, channel]\n - scope_id (integer) (required) — Scope owner: the account ID for `account` scope, the team ID for `team` scope.\n - team_name (string) — Display name of the owning team (team scope only). Omitted when empty (account scope, or the team name could not be resolved).\n - total_bytes (integer) (required) — Total size of all files in bytes.\n - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the knowledge was last modified. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - version (integer) (required) — Knowledge version, incremented on every file change.\n - total (integer) (required) — Total number of knowledge entries after filtering, before pagination.\n", + "Knowledge.PackWriteDelete": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - ok (boolean) (required) — True when the knowledge was deleted.\n", + "Knowledge.PackWriteEnsure": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Account that owns the knowledge.\n - can_edit (boolean) (required) — Whether the caller can edit this knowledge.\n - created_at_ms (string) (required) — Unix timestamp in milliseconds when the knowledge was created. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (integer) (required) — Person ID of the member who created the knowledge.\n - duty_version (integer) (required) — Knowledge version at which DUTY.md was last authored or re-affirmed. When `version` is greater, DUTY.md no longer reflects every file in the knowledge.\n - file_count (integer) (required) — Number of files in the knowledge.\n - pack_id (string) (required) — Knowledge ID (`kpk_` prefix).\n - scope (string) (required) — Knowledge scope. `channel` is a legacy scope; new knowledge is `account` or `team` scope. [account, team, channel]\n - scope_id (integer) (required) — Scope owner: the account ID for `account` scope, the team ID for `team` scope.\n - team_name (string) — Display name of the owning team (team scope only). Omitted when empty (account scope, or the team name could not be resolved).\n - total_bytes (integer) (required) — Total size of all files in bytes.\n - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the knowledge was last modified. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - version (integer) (required) — Knowledge version, incremented on every file change.\n", + "Knowledge.PackWriteUpdate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Account that owns the knowledge.\n - can_edit (boolean) (required) — Whether the caller can edit this knowledge.\n - created_at_ms (string) (required) — Unix timestamp in milliseconds when the knowledge was created. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (integer) (required) — Person ID of the member who created the knowledge.\n - duty_version (integer) (required) — Knowledge version at which DUTY.md was last authored or re-affirmed. When `version` is greater, DUTY.md no longer reflects every file in the knowledge.\n - file_count (integer) (required) — Number of files in the knowledge.\n - pack_id (string) (required) — Knowledge ID (`kpk_` prefix).\n - scope (string) (required) — Knowledge scope. `channel` is a legacy scope; new knowledge is `account` or `team` scope. [account, team, channel]\n - scope_id (integer) (required) — Scope owner: the account ID for `account` scope, the team ID for `team` scope.\n - team_name (string) — Display name of the owning team (team scope only). Omitted when empty (account scope, or the team name could not be resolved).\n - total_bytes (integer) (required) — Total size of all files in bytes.\n - updated_at_ms (string) (required) — Unix timestamp in milliseconds when the knowledge was last modified. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - version (integer) (required) — Knowledge version, incremented on every file change.\n", "Licenses.List": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - created_at (string) (required) — Unix timestamp when a fixed license was assigned. `0` for temporary licenses. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - person_id (integer) (required) — ID of the licensed person.\n - person_name (string) (required) — Display name of the licensed person.\n - type (string) (required) — License assignment type. `fixed` is explicitly assigned; `temporary` is held from the active license window. [fixed, temporary]\n - updated_at (string) (required) — Unix timestamp when a fixed license was last changed. `0` for temporary licenses. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) (required) — Person ID that last changed a fixed license. `0` for temporary licenses.\n", "McpServers.ReadServerGet": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Owning account ID.\n - ai_description (string) — LLM-generated description, preferred over `description` when present. Omitted when not yet generated.\n - allow_insecure_oauth_http (boolean) — Allow this server's OAuth token exchange over plaintext HTTP; testing use only. Omitted when false.\n - allow_insecure_tls_skip_verify (boolean) — Skip TLS certificate verification when connecting to this server; testing use only. Omitted when false.\n - args (array) — Command arguments (stdio transport).\n - auth_mode (string) — Authentication mode. One of: `shared` (a single static credential saved on the resource and shared by all callers in the account; the default — an empty value behaves the same), `per_user_secret` (each user stores their own secret per `secret_schema`, injected per user at runtime), `per_user_oauth` (each user completes their own OAuth grant; discovery and registration run lazily on first use). [shared, per_user_secret, per_user_oauth]\n - call_timeout (integer) (required) — Tool-call timeout in seconds (0 = server default, 60s).\n - can_edit (boolean) (required) — Whether the caller may edit this server.\n - command (string) — Executable command (stdio transport only).\n - connect_timeout (integer) (required) — Connection timeout in seconds (0 = server default, 10s).\n - created_at (string) (required) — Creation time. Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (integer) (required) — Member ID that created the server.\n - description (string) (required) — Server description.\n - env (object) — Environment variables (stdio transport). Secret values are masked.\n - environments (array) (required) — Execution environments this server is callable from (`cloud` and/or BYOC runner environment IDs). Always present; `[]` means all environments (also the value on legacy rows created before this field).\n - headers (object) — HTTP headers (sse / streamable-http). Secret values are masked.\n - oauth_metadata (string) — JSON-encoded OAuth metadata (per_user_oauth mode).\n - proxy_url (string) — Outbound proxy URL used to reach the server.\n - secret_schema (string) — JSON-encoded secret schema (per_user_secret mode).\n - server_id (string) (required) — Unique MCP server ID (prefix `mcp_`).\n - server_name (string) (required) — MCP server name, unique within its scope (account-wide or one team), case-insensitive.\n - source_template_name (string) — Marketplace template this connector was installed from; empty for user-authored.\n - status (string) (required) — Server status. [enabled, disabled]\n - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team.\n - transport (string) (required) — Transport protocol. One of: `stdio` (standard I/O to a local subprocess), `sse` (standalone SSE, the legacy MCP transport), `streamable-http` (the newer HTTP streaming transport). [stdio, sse, streamable-http]\n - updated_at (string) (required) — Last update time. Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - url (string) — Server URL (sse / streamable-http transport).\n", "McpServers.ReadServerList": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - servers (array) (required) — MCP servers on this page.\n - account_id (integer) (required) — Owning account ID.\n - ai_description (string) — LLM-generated description, preferred over `description` when present. Omitted when not yet generated.\n - allow_insecure_oauth_http (boolean) — Allow this server's OAuth token exchange over plaintext HTTP; testing use only. Omitted when false.\n - allow_insecure_tls_skip_verify (boolean) — Skip TLS certificate verification when connecting to this server; testing use only. Omitted when false.\n - args (array) — Command arguments (stdio transport).\n - auth_mode (string) — Authentication mode. One of: `shared` (a single static credential saved on the resource and shared by all callers in the account; the default — an empty value behaves the same), `per_user_secret` (each user stores their own secret per `secret_schema`, injected per user at runtime), `per_user_oauth` (each user completes their own OAuth grant; discovery and registration run lazily on first use). [shared, per_user_secret, per_user_oauth]\n - call_timeout (integer) (required) — Tool-call timeout in seconds (0 = server default, 60s).\n - can_edit (boolean) (required) — Whether the caller may edit this server.\n - command (string) — Executable command (stdio transport only).\n - connect_timeout (integer) (required) — Connection timeout in seconds (0 = server default, 10s).\n - created_at (string) (required) — Creation time. Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (integer) (required) — Member ID that created the server.\n - description (string) (required) — Server description.\n - env (object) — Environment variables (stdio transport). Secret values are masked.\n - environments (array) (required) — Execution environments this server is callable from (`cloud` and/or BYOC runner environment IDs). Always present; `[]` means all environments (also the value on legacy rows created before this field).\n - headers (object) — HTTP headers (sse / streamable-http). Secret values are masked.\n - oauth_metadata (string) — JSON-encoded OAuth metadata (per_user_oauth mode).\n - proxy_url (string) — Outbound proxy URL used to reach the server.\n - secret_schema (string) — JSON-encoded secret schema (per_user_secret mode).\n - server_id (string) (required) — Unique MCP server ID (prefix `mcp_`).\n - server_name (string) (required) — MCP server name, unique within its scope (account-wide or one team), case-insensitive.\n - source_template_name (string) — Marketplace template this connector was installed from; empty for user-authored.\n - status (string) (required) — Server status. [enabled, disabled]\n - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team.\n - transport (string) (required) — Transport protocol. One of: `stdio` (standard I/O to a local subprocess), `sse` (standalone SSE, the legacy MCP transport), `streamable-http` (the newer HTTP streaming transport). [stdio, sse, streamable-http]\n - updated_at (string) (required) — Last update time. Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - url (string) — Server URL (sse / streamable-http transport).\n - total (integer) (required) — Total number of matching servers.\n", @@ -166,8 +189,8 @@ var responseHelpBySDKMethod = map[string]string{ "Members.MemberList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required) — Account ID\n - account_role_ids (array) (required) — Role IDs\n - avatar (string) (required) — Avatar URL\n - country_code (string) (required) — ISO 3166-1 alpha-2 region code of the member's contact phone (e.g. \"CN\", \"US\", \"HK\").\n - created_at (string) (required) — Creation timestamp (Unix seconds) CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - email (string) (required) — Email address\n - email_verified (boolean) (required) — Email verified\n - is_external (boolean) (required) — Provisioned via SSO\n - locale (string) — Member's locale preference (e.g. `zh-CN`). Omitted when empty — the list endpoint does not populate it.\n - member_id (integer) (required) — Member ID\n - member_name (string) (required) — Display name\n - phone (string) (required) — Masked phone number\n - phone_verified (boolean) (required) — Phone verified\n - ref_id (string) (required) — External reference ID\n - status (string) (required) — Member status. `enabled` — active member; `pending` — invited but not yet accepted; `deleted` — removed from the organization. [enabled, pending, deleted]\n - time_zone (string) — Member's IANA time zone (e.g. `Asia/Shanghai`). Omitted when empty — the list endpoint does not populate it.\n - updated_at (string) (required) — Update timestamp (Unix seconds) CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n", "Members.MemberNotify": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - agent_instructions (string) — Present when the submitted HTML body does not follow the default email layout (no `max-width:600px` wrapper table): guidance telling the calling AI SRE agent how to conform. Advisory only — a format the caller deliberately chose needs no change.\n - recipients (array) — One result per resolved recipient, in the same order as the resolved recipient list.\n - person_id (integer) (required) — Recipient member ID.\n - reason (string) — Why the recipient was skipped. Only present when `status` is `skipped`. `not_member` — not an active member of the caller's account; `no_email` — the member has no email address on file; `email_disabled` — the member's notification preferences for this kind of message exclude email; `duplicate` — this recipient already received a message from the same AI SRE session turn; `rate_limited` — this recipient has already been sent 20 emails through this endpoint within the last hour; `send_failed` — enqueueing the email failed. [not_member, no_email, email_disabled, duplicate, rate_limited, send_failed]\n - status (string) (required) — Delivery status. `accepted` — the email was queued for asynchronous delivery; `skipped` — no email was queued, see `reason`. [accepted, skipped]\n", "Members.PersonInfos": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required) — Account ID\n - as (string) — Principal kind: `account` — the account owner principal; `member` — an organization member. [account, member]\n - avatar (string) — Avatar URL. Omitted when empty.\n - email (string) — Email address. Omitted when empty.\n - email_verified (boolean) (required) — Email verified\n - locale (string) — Locale. Omitted when empty.\n - person_id (integer) (required) — Person ID\n - person_name (string) — Display name. Omitted when empty.\n - phone (string) — Phone number. Omitted when empty — this endpoint never populates it.\n - phone_verified (boolean) (required) — Whether the phone is verified. Always false in this endpoint's response.\n - status (string) — Person status. `enabled` — active; `pending` — invited but not yet accepted; `deleted` — removed. Omitted when empty. [enabled, pending, deleted]\n - time_zone (string) — Time zone. Omitted when empty.\n", - "NotificationTemplates.ReadInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — ID of the owning account.\n - created_at (string) (required) — Unix epoch seconds the template was created. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - creator_id (integer) (required) — Member ID of the creator.\n - deleted_at (string) — Unix epoch seconds the template was soft-deleted. Absent (omitempty) when the template is live. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - description (string) (required) — Free-form description.\n - dingtalk (string) (required) — DingTalk robot message template source.\n - dingtalk_app (string) (required) — DingTalk app message template source.\n - email (string) (required) — Email body template source (Go `html/template` syntax).\n - feishu (string) (required) — Feishu robot message template source.\n - feishu_app (string) (required) — Feishu app message template source.\n - feishu_app_card_v2_preserve_blank_lines (boolean) (required) — Whether Feishu app card v2 messages keep blank lines in the body.\n - feishu_app_card_v2_table_enabled (boolean) (required) — Whether alert labels use table rendering in Feishu app cards.\n - feishu_app_war_room_enabled (boolean) (required) — Whether Feishu app cards show the Create War Room button. Hidden when the incident has no responders.\n - incident_card_closed_action_apps (array) (required) — IM apps whose closed-incident cards keep the custom action buttons. Supported values: `feishu_app`, `dingtalk_app`, `wecom_app`, `slack_app`, `teams_app`. An empty list hides the buttons on every app. [feishu_app, dingtalk_app, wecom_app, slack_app, teams_app]\n - incident_card_hidden_fields (object) (required) — Incident card fields hidden per IM app type; an empty object when none are configured.\n - slack (string) (required) — Slack robot message template source.\n - slack_app (string) (required) — Slack app message template source.\n - sms (string) (required) — SMS template source (Go `text/template` syntax).\n - status (string) (required) — Template lifecycle status. `enabled` templates can be referenced by escalation policies for notifications; `disabled` templates are no longer used for new notifications; `deleted` templates are never returned by list endpoints. [enabled, disabled, deleted]\n - team_id (integer) (required) — ID of the team this template is scoped to, or 0 for account-wide.\n - teams_app (string) (required) — Microsoft Teams app message template source.\n - telegram (string) (required) — Telegram bot message template source.\n - template_id (string) (required) — Template ID.\n - template_name (string) (required) — Unique template name within the account.\n - updated_at (string) (required) — Unix epoch seconds the template was last updated. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) (required) — Member ID of the last editor.\n - voice (string) (required) — Voice call script template source.\n - wecom (string) (required) — WeCom robot message template source.\n - wecom_app (string) (required) — WeCom app message template source.\n - wecom_markdown_v2_enabled (boolean) (required) — Whether WeCom robot notifications use the `markdown_v2` message format.\n - zoom (string) (required) — Zoom bot message template source.\n", - "NotificationTemplates.ReadList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required) — ID of the owning account.\n - created_at (string) (required) — Unix epoch seconds the template was created. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - creator_id (integer) (required) — Member ID of the creator.\n - deleted_at (string) — Unix epoch seconds the template was soft-deleted. Absent (omitempty) when the template is live. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - description (string) (required) — Free-form description.\n - dingtalk (string) (required) — DingTalk robot message template source.\n - dingtalk_app (string) (required) — DingTalk app message template source.\n - email (string) (required) — Email body template source (Go `html/template` syntax).\n - feishu (string) (required) — Feishu robot message template source.\n - feishu_app (string) (required) — Feishu app message template source.\n - feishu_app_card_v2_preserve_blank_lines (boolean) (required) — Whether Feishu app card v2 messages keep blank lines in the body.\n - feishu_app_card_v2_table_enabled (boolean) (required) — Whether alert labels use table rendering in Feishu app cards.\n - feishu_app_war_room_enabled (boolean) (required) — Whether Feishu app cards show the Create War Room button. Hidden when the incident has no responders.\n - incident_card_closed_action_apps (array) (required) — IM apps whose closed-incident cards keep the custom action buttons. Supported values: `feishu_app`, `dingtalk_app`, `wecom_app`, `slack_app`, `teams_app`. An empty list hides the buttons on every app. [feishu_app, dingtalk_app, wecom_app, slack_app, teams_app]\n - incident_card_hidden_fields (object) (required) — Incident card fields hidden per IM app type; an empty object when none are configured.\n - slack (string) (required) — Slack robot message template source.\n - slack_app (string) (required) — Slack app message template source.\n - sms (string) (required) — SMS template source (Go `text/template` syntax).\n - status (string) (required) — Template lifecycle status. `enabled` templates can be referenced by escalation policies for notifications; `disabled` templates are no longer used for new notifications; `deleted` templates are never returned by list endpoints. [enabled, disabled, deleted]\n - team_id (integer) (required) — ID of the team this template is scoped to, or 0 for account-wide.\n - teams_app (string) (required) — Microsoft Teams app message template source.\n - telegram (string) (required) — Telegram bot message template source.\n - template_id (string) (required) — Template ID.\n - template_name (string) (required) — Unique template name within the account.\n - updated_at (string) (required) — Unix epoch seconds the template was last updated. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) (required) — Member ID of the last editor.\n - voice (string) (required) — Voice call script template source.\n - wecom (string) (required) — WeCom robot message template source.\n - wecom_app (string) (required) — WeCom app message template source.\n - wecom_markdown_v2_enabled (boolean) (required) — Whether WeCom robot notifications use the `markdown_v2` message format.\n - zoom (string) (required) — Zoom bot message template source.\n", + "NotificationTemplates.ReadInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — ID of the owning account.\n - created_at (string) (required) — Unix epoch seconds the template was created. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - creator_id (integer) (required) — Member ID of the creator.\n - deleted_at (string) — Unix epoch seconds the template was soft-deleted. Absent (omitempty) when the template is live. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - description (string) (required) — Free-form description.\n - dingtalk (string) (required) — DingTalk robot message template source.\n - dingtalk_app (string) (required) — DingTalk app message template source.\n - dingtalk_app_war_room_enabled (boolean) (required) — Whether DingTalk app cards show the Create War Room button. Hidden for closed incidents and when the incident has no responders.\n - email (string) (required) — Email body template source (Go `html/template` syntax).\n - feishu (string) (required) — Feishu robot message template source.\n - feishu_app (string) (required) — Feishu app message template source.\n - feishu_app_card_v2_preserve_blank_lines (boolean) (required) — Whether Feishu app card v2 messages keep blank lines in the body.\n - feishu_app_card_v2_table_enabled (boolean) (required) — Whether alert labels use table rendering in Feishu app cards.\n - feishu_app_war_room_enabled (boolean) (required) — Whether Feishu app cards show the Create War Room button. Hidden when the incident has no responders.\n - incident_card_closed_action_apps (array) (required) — IM apps whose closed-incident cards keep the custom action buttons. Supported values: `feishu_app`, `dingtalk_app`, `wecom_app`, `slack_app`, `teams_app`. An empty list hides the buttons on every app. [feishu_app, dingtalk_app, wecom_app, slack_app, teams_app]\n - incident_card_hidden_fields (object) (required) — Incident card fields hidden per IM app type; an empty object when none are configured.\n - slack (string) (required) — Slack robot message template source.\n - slack_app (string) (required) — Slack app message template source.\n - slack_app_war_room_enabled (boolean) (required) — Whether Slack app cards show the Create War Room button. Hidden for closed incidents and when the incident has no responders.\n - sms (string) (required) — SMS template source (Go `text/template` syntax).\n - status (string) (required) — Template lifecycle status. `enabled` templates can be referenced by escalation policies for notifications; `disabled` templates are no longer used for new notifications; `deleted` templates are never returned by list endpoints. [enabled, disabled, deleted]\n - team_id (integer) (required) — ID of the team this template is scoped to, or 0 for account-wide.\n - teams_app (string) (required) — Microsoft Teams app message template source.\n - telegram (string) (required) — Telegram bot message template source.\n - template_id (string) (required) — Template ID.\n - template_name (string) (required) — Unique template name within the account.\n - updated_at (string) (required) — Unix epoch seconds the template was last updated. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) (required) — Member ID of the last editor.\n - voice (string) (required) — Voice call script template source.\n - wecom (string) (required) — WeCom robot message template source.\n - wecom_app (string) (required) — WeCom app message template source.\n - wecom_markdown_v2_enabled (boolean) (required) — Whether WeCom robot notifications use the `markdown_v2` message format.\n - zoom (string) (required) — Zoom bot message template source.\n", + "NotificationTemplates.ReadList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required) — ID of the owning account.\n - created_at (string) (required) — Unix epoch seconds the template was created. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - creator_id (integer) (required) — Member ID of the creator.\n - deleted_at (string) — Unix epoch seconds the template was soft-deleted. Absent (omitempty) when the template is live. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - description (string) (required) — Free-form description.\n - dingtalk (string) (required) — DingTalk robot message template source.\n - dingtalk_app (string) (required) — DingTalk app message template source.\n - dingtalk_app_war_room_enabled (boolean) (required) — Whether DingTalk app cards show the Create War Room button. Hidden for closed incidents and when the incident has no responders.\n - email (string) (required) — Email body template source (Go `html/template` syntax).\n - feishu (string) (required) — Feishu robot message template source.\n - feishu_app (string) (required) — Feishu app message template source.\n - feishu_app_card_v2_preserve_blank_lines (boolean) (required) — Whether Feishu app card v2 messages keep blank lines in the body.\n - feishu_app_card_v2_table_enabled (boolean) (required) — Whether alert labels use table rendering in Feishu app cards.\n - feishu_app_war_room_enabled (boolean) (required) — Whether Feishu app cards show the Create War Room button. Hidden when the incident has no responders.\n - incident_card_closed_action_apps (array) (required) — IM apps whose closed-incident cards keep the custom action buttons. Supported values: `feishu_app`, `dingtalk_app`, `wecom_app`, `slack_app`, `teams_app`. An empty list hides the buttons on every app. [feishu_app, dingtalk_app, wecom_app, slack_app, teams_app]\n - incident_card_hidden_fields (object) (required) — Incident card fields hidden per IM app type; an empty object when none are configured.\n - slack (string) (required) — Slack robot message template source.\n - slack_app (string) (required) — Slack app message template source.\n - slack_app_war_room_enabled (boolean) (required) — Whether Slack app cards show the Create War Room button. Hidden for closed incidents and when the incident has no responders.\n - sms (string) (required) — SMS template source (Go `text/template` syntax).\n - status (string) (required) — Template lifecycle status. `enabled` templates can be referenced by escalation policies for notifications; `disabled` templates are no longer used for new notifications; `deleted` templates are never returned by list endpoints. [enabled, disabled, deleted]\n - team_id (integer) (required) — ID of the team this template is scoped to, or 0 for account-wide.\n - teams_app (string) (required) — Microsoft Teams app message template source.\n - telegram (string) (required) — Telegram bot message template source.\n - template_id (string) (required) — Template ID.\n - template_name (string) (required) — Unique template name within the account.\n - updated_at (string) (required) — Unix epoch seconds the template was last updated. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) (required) — Member ID of the last editor.\n - voice (string) (required) — Voice call script template source.\n - wecom (string) (required) — WeCom robot message template source.\n - wecom_app (string) (required) — WeCom app message template source.\n - wecom_markdown_v2_enabled (boolean) (required) — Whether WeCom robot notifications use the `markdown_v2` message format.\n - zoom (string) (required) — Zoom bot message template source.\n", "NotificationTemplates.ReadPreview": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - content (string) (required) — Rendered template output, present when success is true.\n - fixed_fields (array) — Fixed incident-card fields returned for supported IM previews after the requested hiding rules are applied.\n - field (string) (required) — Incident-card field name. | Value | Meaning | |---|---| | `channel` | Name of the alert channel that produced the incident; returned only when non-empty. | | `snoozed_before` | Snooze-until timestamp formatted as `YYYY-MM-DD HH:MM:SS`; returned only while the incident is snoozed. | | `severity` | Incident severity label; returned only when non-empty. | | `responders` | Names of the current responders, separated by spaces; returned only when the incident has responders. | | `aggregate_alert_count` | Number of alerts aggregated into the incident; returned only when greater than 1. | [channel, snoozed_before, severity, responders, aggregate_alert_count]\n - value (string) (required) — Rendered display value for the fixed field.\n - message (string) (required) — Error message describing why rendering failed, present when success is false.\n - success (boolean) (required) — Whether the template rendered without errors.\n", "NotificationTemplates.WriteCreate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - template_id (string) (required) — Newly created template ID.\n - template_name (string) (required) — Template name echoed from the request.\n", "Resources.Info": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Account ID that owns this resource.\n - action.days (integer) (required) — Retention period in days for action (user interaction) data.\n - created_at (string) (required) — Unix timestamp in seconds when the resource was created. Also anchors the start of the first billing window. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - error.days (integer) (required) — Retention period in days for error data.\n - expired_at (string) — Unix timestamp in seconds when the on-premises license expires. Only present on on-premises deployments; omitted entirely for SaaS accounts. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - long_task.days (integer) (required) — Retention period in days for long-task data.\n - offering_id (integer) (required) — ID of the offering (SKU) this resource was provisioned from.\n - order_id (string) (required) — ID of the order that provisioned this resource. Empty for resources provisioned outside the order flow (e.g. on-premises).\n - product (string) (required) — Product code for this resource. Always `rum` for this endpoint. [rum]\n - resource.days (integer) (required) — Retention period in days for resource (network request) data.\n - resource_id (string) (required) — Unique resource identifier for the account's RUM resource.\n - resource_name (string) (required) — Display name of the resource.\n - session.days (integer) (required) — Retention period in days for session data.\n - session_investigate.free_cnt (integer) (required) — Free quota for investigate sessions per application, per billing window.\n - session_investigate.used_cnt (integer) (required) — Number of investigate (error tracking) sessions used in the current billing window.\n - session_limit_reached (boolean) (required) — `true` when a `version=free` account has exceeded its combined free session quota across all applications. Always `false` for non-free plans.\n - session_measure.free_cnt (integer) (required) — Free quota for measure sessions per application, per billing window.\n - session_measure.used_cnt (integer) (required) — Number of measure (performance) sessions used in the current billing window.\n - session_replay.free_cnt (integer) (required) — Free quota for session-replay sessions per application, per billing window.\n - session_replay.used_cnt (integer) (required) — Number of session-replay sessions used in the current billing window.\n - status (string) (required) — Status of the resource. A resource with status `deleted` or `destroyed` never reaches this field — the operation returns `ResourceNotFound` for those instead. [enabled, disabled]\n - updated_at (string) (required) — Unix timestamp in seconds when the resource was last updated. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - version (string) (required) — Plan version of this resource. One of `free` (free plan) or `professional` (professional plan). [free, professional]\n - view.days (integer) (required) — Retention period in days for view (page/screen) data.\n - window_end_time (string) (required) — Unix timestamp in seconds for the end of the current 30-day billing window. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - window_start_time (string) (required) — Unix timestamp in seconds for the start of the current 30-day billing window. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n", @@ -176,6 +199,7 @@ var responseHelpBySDKMethod = map[string]string{ "RolesPermissions.ReadListPermission": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) — Owning account ID. Omitted when 0, i.e. for system-level permissions.\n - class (string) (required) — Permission class (e.g., 'On-call', 'Organization').\n - description (string) (required) — Human-readable permission description.\n - id (integer) (required) — Unique permission ID.\n - is_granted (boolean) (required) — Whether this permission is granted to the roles given in `role_ids`. Always present in this endpoint's response; `false` entries only appear when `with_all` is true.\n - permission_name (string) (required) — Permission display name.\n - permission_type (string) (required) — Whether this is a read or manage permission. `read`: view-only permission (read/list/query); `manage`: administrative permission covering mutations (create, update, delete, configure). [read, manage]\n - scope (string) (required) — Functional scope the permission applies to. | value | meaning | | --- | --- | | `account` | Account settings and API keys | | `organization` | Members, teams, roles, audit | | `on-call` | On-call incident management | | `monit` | Monitoring | | `rum` | Real user monitoring | | `ai-sre` | AI SRE features | | `custom_menu` | Account-defined custom menu pages (on-premises only) | [account, organization, on-call, monit, rum, ai-sre, custom_menu]\n - source (string) (required) — Origin of the permission. `system` — seeded built-in permission; `account` — dynamic permission created for this account (e.g. custom menus). [system, account]\n - source_ref (string) — Primary key of the source object (e.g. the custom menu ID) for account-scoped permissions. Omitted when empty.\n - status (string) (required) — Permission status. `enabled` — active; `deleted` — removed (deleted permissions are filtered out and never returned). [enabled, deleted]\n", "RolesPermissions.ReadListPermissionFactor": "Response fields (`data` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - factor_name (string) (required) — Factor identifier (e.g., 'template:read:info').\n - factor_type (string) (required) — Factor type. `api`: backend API factor — `factor_name` is the API name (e.g. `skill:write:upload`), enforced at the gateway; `button`: UI action factor, used by the role-config page to render action toggles; `visit`: page-visit factor (custom menu pages use this type); `menu`: menu-visibility factor (legacy, no current seed data); `url`: page route-path factor (legacy, no current seed data). [api, button, visit, menu, url]\n - source (string) — Origin of the factor. `system` — seeded built-in factor; `account` — dynamic factor created for this account (e.g. custom menus). [system, account]\n - source_ref (string) — Primary key of the source object (e.g. the custom menu ID) for account-scoped factors. Omitted when empty.\n", "RolesPermissions.WriteUpsert": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - role_id (integer) (required) — Created or updated role ID.\n - role_name (string) (required) — Role name echoed from the request.\n", + "RuleFolders.List": "Response fields (`data` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required) — Owning account ID.\n - created_at (string) (required) — Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - creator_id (integer) (required) — Member ID of the creator.\n - creator_name (string) (required) — Name of the creator.\n - id (integer) (required) — Folder ID.\n - name (string) (required) — Folder name.\n - note (string) (required) — Free-form note.\n - parent_id (integer) (required) — Parent folder ID; 0 at the root.\n - parent_path (string) (required) — Comma-separated ancestor IDs from the root, excluding this folder; empty at the root.\n - team_id (integer) (required) — Team the folder is scoped to; 0 when account-wide.\n - updated_at (string) (required) — Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updater_id (integer) (required) — Member ID of the last updater.\n - updater_name (string) (required) — Name of the last updater.\n", "Schedules.ByPerson": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - current (object) — One on-call shift interval of a member.\n - end_at (string) — Unix timestamp in seconds - when the shift ends. Absent while the shift is ongoing. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - schedule_id (integer) — Owning schedule ID.\n - schedule_name (string) — Owning schedule name.\n - start_at (string) — Unix timestamp in seconds - when the shift starts. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - next (object) — One on-call shift interval of a member.\n - end_at (string) — Unix timestamp in seconds - when the shift ends. Absent while the shift is ongoing. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - schedule_id (integer) — Owning schedule ID.\n - schedule_name (string) — Owning schedule name.\n - start_at (string) — Unix timestamp in seconds - when the shift starts. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - schedules (array) (required) — All enabled schedules the member participates in.\n - schedule_id (integer) — Schedule ID.\n - schedule_name (string) — Schedule name.\n", "Schedules.Create": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - schedule_id (integer) (required) — ID of the newly created schedule.\n", "Schedules.Info": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Account ID.\n - create_at (string) (required) — Creation timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - create_by (integer) (required) — Creator person ID.\n - cur_oncall (object) (required) — Current on-call group, or null when nobody is on-call.\n - end (string) (required) — Shift end timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\n - members (array) (required) — Members of this group.\n - person_ids (array) (required) — Person IDs in this slot.\n - role_id (integer) (required) — Oncall role ID. (min 0)\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - update_at (string) (required) — Update timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - weight (integer) (required) — Layer weight the shift comes from.\n - description (string) (required) — Schedule description. null when returned from /schedule/preview.\n - disabled (integer) (required) — Disabled flag (0 = enabled, 1 = disabled). Deprecated. null when returned from /schedule/preview.\n - end (string) — Window end (Unix seconds). Omitted when 0 (no window requested). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - field (string) — Field name used by the legacy update-field endpoint.\n - final_schedule (object) (required) — Collapsed final schedule across all layers.\n - layer_name (string) (required) — Layer display name.\n - mode (integer) (required) — Layer mode: 0 = common rotation, 1 = override.\n - name (string) (required) — Layer internal name.\n - schedules (array) (required) — Computed shifts; null when the layer produces none.\n - end (string) (required) — Shift end timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\n - members (array) (required) — Members of this group.\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - group_id (integer) (required) — Legacy team/group ID. null when returned from /schedule/preview.\n - id (integer) (required) — Schedule ID. null when returned from /schedule/preview.\n - layer_schedules (array) (required) — Alias of schedule_layers returned for compatibility. Null when not computed.\n - layer_name (string) (required) — Layer display name.\n - mode (integer) (required) — Layer mode: 0 = common rotation, 1 = override.\n - name (string) (required) — Layer internal name.\n - schedules (array) (required) — Computed shifts; null when the layer produces none.\n - end (string) (required) — Shift end timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\n - members (array) (required) — Members of this group.\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - layers (array) (required) — Rotation layers defined on the schedule. Null when layers were not loaded (for example by `/schedule/infos`, or by `/schedule/list` without start/end).\n - account_id (integer) (required) — Account ID.\n - create_at (integer) (required) — Creation timestamp (Unix seconds).\n - create_by (integer) (required) — Creator person ID.\n - day_mask (object) (required) — Day-of-week mask.\n - repeat (array) — Weekday numbers (0 = Sunday) included in the rotation. Conflicts with restrict_mode = 2 (week).\n - enable_time (integer) (required) — When the layer becomes effective (Unix seconds).\n - expire_time (integer) (required) — When the layer expires (Unix seconds, 0 means never).\n - fair_rotation (boolean) (required) — Whether fair rotation is enabled.\n - groups (array) (required) — Oncall groups participating in the rotation. Null when not set.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\n - members (array) (required) — Members of this group.\n - person_ids (array) (required) — Person IDs in this slot.\n - role_id (integer) (required) — Oncall role ID. (min 0)\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - handoff_time (integer) (required) — Rotation handoff time as a weekly offset in seconds (weekday x 86400 + seconds since midnight), not an absolute Unix timestamp.\n - hidden (integer) (required) — Whether the layer is hidden in the UI (0 = no, 1 = yes).\n - layer_end (integer) — Layer end timestamp (Unix seconds). null means open-ended.\n - layer_name (string) — User-facing layer name. Null when not set.\n - layer_start (integer) — Layer effective start (Unix seconds). Null when not set.\n - mask_continuous_enabled (boolean) (required) — Whether continuous masking is enabled.\n - mode (integer) (required) — Layer mode: 0 = common rotation, 1 = override.\n - name (string) (required) — Layer internal name.\n - restrict_end (integer) (required) — Legacy end offset inside the restriction window (seconds).\n - restrict_mode (integer) (required) — Restriction mode: 0 = none, 1 = day, 2 = week.\n - restrict_periods (array) (required) — Restriction windows inside each rotation cycle. Null when not set.\n - restrict_end (integer) (required) — End offset inside the rotation cycle.\n - restrict_start (integer) (required) — Start offset inside the rotation cycle.\n - restrict_start (integer) (required) — Legacy start offset inside the restriction window (seconds).\n - rotation_duration (integer) (required) — Rotation duration in seconds.\n - rotation_unit (string) (required) — Rotation unit. On-call assignees rotate in turn by this unit. | Value | Meaning | |---|---| | `hour` | Rotates hourly. | | `day` | Rotates daily. | | `week` | Rotates weekly. | | `month` | Rotates monthly. | [hour, day, week, month]\n - rotation_value (integer) (required) — Rotation quantity (number of rotation_unit per cycle). (min 0)\n - schedule_id (integer) (required) — Parent schedule ID.\n - update_at (integer) (required) — Last update timestamp (Unix seconds).\n - update_by (integer) (required) — Last updater person ID.\n - weight (integer) (required) — Layer weight for ordering.\n - name (string) (required) — Schedule name (legacy field; mirrors schedule_name). null when returned from /schedule/preview.\n - next_oncall (object) (required) — Next on-call group, or null when unknown.\n - end (string) (required) — Shift end timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\n - members (array) (required) — Members of this group.\n - person_ids (array) (required) — Person IDs in this slot.\n - role_id (integer) (required) — Oncall role ID. (min 0)\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - update_at (string) (required) — Update timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - weight (integer) (required) — Layer weight the shift comes from.\n - notify (object) (required) — Notification configuration. Null when the schedule has none.\n - advance_in_time (integer) — Advance notification lead time in seconds. `0` notifies exactly at shift start; omitting disables advance notification.\n - by (object) (required) — Recipient notification preference; null when not configured.\n - follow_preference (boolean) (required) — Whether to follow each responder's personal notification preference.\n - personal_channels (array) (required) — Personal notification channel keys.\n - fixed_time (object) (required) — Fixed-time notification config; null when not configured.\n - cycle (string) (required) — Notification cycle; only `day` is supported. [day]\n - start (string) (required) — Time of day to send, format `HH:MM` (24-hour).\n - im (object) — Legacy IM-type to token map.\n - webhooks (array) (required) — IM webhook notification channels; null when not configured.\n - settings (object) (required) — Webhook channel settings.\n - alias (string) (required) — Channel alias.\n - chat_ids (array) (required) — Chat IDs.\n - data_source_id (integer) (required) — Data source ID.\n - sign_secret (string) (required) — Signature secret.\n - token (string) (required) — Webhook token.\n - verify_token (string) (required) — Verification token.\n - type (string) (required) — IM provider type (for example feishu_app, dingtalk_app, wecom_app, teams_app, slack_app).\n - schedule_id (integer) (required) — Schedule ID. Null when returned from `/schedule/preview`.\n - schedule_layers (array) (required) — Computed per-layer schedules for the requested window. Null when not computed.\n - layer_name (string) (required) — Layer display name.\n - mode (integer) (required) — Layer mode: 0 = common rotation, 1 = override.\n - name (string) (required) — Layer internal name.\n - schedules (array) (required) — Computed shifts; null when the layer produces none.\n - end (string) (required) — Shift end timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\n - members (array) (required) — Members of this group.\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - schedule_name (string) (required) — Schedule display name. null when returned from /schedule/preview.\n - start (string) — Window start (Unix seconds). Omitted when 0 (no window requested). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - status (integer) (required) — Legacy status flag. Deprecated. null when returned from /schedule/preview.\n - team_id (integer) (required) — Owning team ID. null when returned from /schedule/preview.\n - update_at (string) (required) — Last update timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - update_by (integer) (required) — Last updater person ID.\n", @@ -185,8 +209,8 @@ var responseHelpBySDKMethod = map[string]string{ "Schedules.Self": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required) — Account ID.\n - create_at (string) (required) — Creation timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - create_by (integer) (required) — Creator person ID.\n - cur_oncall (object) (required) — Current on-call group, or null when nobody is on-call.\n - end (string) (required) — Shift end timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\n - members (array) (required) — Members of this group.\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - update_at (string) (required) — Update timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - weight (integer) (required) — Layer weight the shift comes from.\n - description (string) (required) — Schedule description. null when returned from /schedule/preview.\n - disabled (integer) (required) — Disabled flag (0 = enabled, 1 = disabled). Deprecated. null when returned from /schedule/preview.\n - end (string) — Window end (Unix seconds). Omitted when 0 (no window requested). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - field (string) — Field name used by the legacy update-field endpoint.\n - final_schedule (object) (required) — Collapsed final schedule across all layers.\n - layer_name (string) (required) — Layer display name.\n - mode (integer) (required) — Layer mode: 0 = common rotation, 1 = override.\n - name (string) (required) — Layer internal name.\n - schedules (array) (required) — Computed shifts; null when the layer produces none.\n - end (string) (required) — Shift end timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - group_id (integer) (required) — Legacy team/group ID. null when returned from /schedule/preview.\n - id (integer) (required) — Schedule ID. null when returned from /schedule/preview.\n - layer_schedules (array) (required) — Alias of schedule_layers returned for compatibility. Null when not computed.\n - layer_name (string) (required) — Layer display name.\n - mode (integer) (required) — Layer mode: 0 = common rotation, 1 = override.\n - name (string) (required) — Layer internal name.\n - schedules (array) (required) — Computed shifts; null when the layer produces none.\n - end (string) (required) — Shift end timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - layers (array) (required) — Rotation layers defined on the schedule. Null when layers were not loaded (for example by `/schedule/infos`, or by `/schedule/list` without start/end).\n - account_id (integer) (required) — Account ID.\n - create_at (integer) (required) — Creation timestamp (Unix seconds).\n - create_by (integer) (required) — Creator person ID.\n - day_mask (object) (required) — Day-of-week mask.\n - repeat (array) — Weekday numbers (0 = Sunday) included in the rotation. Conflicts with restrict_mode = 2 (week).\n - enable_time (integer) (required) — When the layer becomes effective (Unix seconds).\n - expire_time (integer) (required) — When the layer expires (Unix seconds, 0 means never).\n - fair_rotation (boolean) (required) — Whether fair rotation is enabled.\n - groups (array) (required) — Oncall groups participating in the rotation. Null when not set.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\n - members (array) (required) — Members of this group.\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - handoff_time (integer) (required) — Rotation handoff time as a weekly offset in seconds (weekday x 86400 + seconds since midnight), not an absolute Unix timestamp.\n - hidden (integer) (required) — Whether the layer is hidden in the UI (0 = no, 1 = yes).\n - layer_end (integer) — Layer end timestamp (Unix seconds). null means open-ended.\n - layer_name (string) — User-facing layer name. Null when not set.\n - layer_start (integer) — Layer effective start (Unix seconds). Null when not set.\n - mask_continuous_enabled (boolean) (required) — Whether continuous masking is enabled.\n - mode (integer) (required) — Layer mode: 0 = common rotation, 1 = override.\n - name (string) (required) — Layer internal name.\n - restrict_end (integer) (required) — Legacy end offset inside the restriction window (seconds).\n - restrict_mode (integer) (required) — Restriction mode: 0 = none, 1 = day, 2 = week.\n - restrict_periods (array) (required) — Restriction windows inside each rotation cycle. Null when not set.\n - restrict_end (integer) (required) — End offset inside the rotation cycle.\n - restrict_start (integer) (required) — Start offset inside the rotation cycle.\n - restrict_start (integer) (required) — Legacy start offset inside the restriction window (seconds).\n - rotation_duration (integer) (required) — Rotation duration in seconds.\n - rotation_unit (string) (required) — Rotation unit. On-call assignees rotate in turn by this unit. | Value | Meaning | |---|---| | `hour` | Rotates hourly. | | `day` | Rotates daily. | | `week` | Rotates weekly. | | `month` | Rotates monthly. | [hour, day, week, month]\n - rotation_value (integer) (required) — Rotation quantity (number of rotation_unit per cycle). (min 0)\n - schedule_id (integer) (required) — Parent schedule ID.\n - update_at (integer) (required) — Last update timestamp (Unix seconds).\n - update_by (integer) (required) — Last updater person ID.\n - weight (integer) (required) — Layer weight for ordering.\n - name (string) (required) — Schedule name (legacy field; mirrors schedule_name). null when returned from /schedule/preview.\n - next_oncall (object) (required) — Next on-call group, or null when unknown.\n - end (string) (required) — Shift end timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\n - members (array) (required) — Members of this group.\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - update_at (string) (required) — Update timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - weight (integer) (required) — Layer weight the shift comes from.\n - notify (object) (required) — Notification configuration. Null when the schedule has none.\n - advance_in_time (integer) — Advance notification lead time in seconds. `0` notifies exactly at shift start; omitting disables advance notification.\n - by (object) (required) — Recipient notification preference; null when not configured.\n - follow_preference (boolean) (required) — Whether to follow each responder's personal notification preference.\n - personal_channels (array) (required) — Personal notification channel keys.\n - fixed_time (object) (required) — Fixed-time notification config; null when not configured.\n - cycle (string) (required) — Notification cycle; only `day` is supported. [day]\n - start (string) (required) — Time of day to send, format `HH:MM` (24-hour).\n - im (object) — Legacy IM-type to token map.\n - webhooks (array) (required) — IM webhook notification channels; null when not configured.\n - settings (object) (required) — Webhook channel settings.\n - type (string) (required) — IM provider type (for example feishu_app, dingtalk_app, wecom_app, teams_app, slack_app).\n - schedule_id (integer) (required) — Schedule ID. Null when returned from `/schedule/preview`.\n - schedule_layers (array) (required) — Computed per-layer schedules for the requested window. Null when not computed.\n - layer_name (string) (required) — Layer display name.\n - mode (integer) (required) — Layer mode: 0 = common rotation, 1 = override.\n - name (string) (required) — Layer internal name.\n - schedules (array) (required) — Computed shifts; null when the layer produces none.\n - end (string) (required) — Shift end timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - schedule_name (string) (required) — Schedule display name. null when returned from /schedule/preview.\n - start (string) — Window start (Unix seconds). Omitted when 0 (no window requested). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - status (integer) (required) — Legacy status flag. Deprecated. null when returned from /schedule/preview.\n - team_id (integer) (required) — Owning team ID. null when returned from /schedule/preview.\n - update_at (string) (required) — Last update timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - update_by (integer) (required) — Last updater person ID.\n", "SessionReplay.Metadata": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - application (object) — Application the session belongs to.\n - id (string) — RUM application ID the session belongs to.\n - device (object) — Device that recorded the session.\n - type (string) — Device type recorded for the session, e.g. `desktop`, `mobile`, `tablet`.\n - foreground_periods (array) — Foreground periods across the session (mobile sessions only; empty for web).\n - end (string) — Unix timestamp in milliseconds when the foreground period ended. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - start (string) — Unix timestamp in milliseconds when the foreground period started. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - view_id (string) — View ID active during this foreground period.\n - session (object) — Session bounds and state.\n - end (string) — Unix timestamp in milliseconds when the session ended (or was last updated, if still active). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - is_active (boolean) — Whether the session was still active as of the last recorded event.\n - server_time_delta (integer) — Clock skew in milliseconds between the client and Flashduty's servers, added to client timestamps for correction.\n - source (string) — SDK platform that recorded the session. Platform identifier: | Value | Meaning | |---|---| | `browser` | Web browser application (JavaScript SDK) | | `ios` | Apple iOS application | | `android` | Android application | | `react-native` | React Native application | | `flutter` | Flutter application | | `kotlin-multiplatform` | Kotlin Multiplatform application | | `roku` | Roku channel application | | `unity` | Unity application | | `miniprogram` | WeChat mini program | | `harmony` | HarmonyOS application | | `electron` | Electron desktop application | [browser, ios, android, react-native, flutter, kotlin-multiplatform, roku, unity, miniprogram, harmony, electron]\n - start (string) — Unix timestamp in milliseconds when the session started. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - views (array) — Every view recorded during the session, in chronological order.\n - container_source (string) — SDK platform of the container app, when this view is embedded (e.g. a WebView inside a native app). Omitted when the view is not embedded.\n - container_view_id (string) — View ID of the containing view, when this view is embedded. Omitted when the view is not embedded.\n - end (string) — Unix timestamp in milliseconds when the view ended. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - is_active (boolean) — Whether the view was still active as of the last recorded event.\n - loading_type (string) — How the view was entered, e.g. `initial_load`, `route_change`.\n - name (string) — View name, typically the route or screen name.\n - server_time_delta (integer) — Clock skew in milliseconds between the client and Flashduty's servers, added to client timestamps for correction.\n - source (string) — SDK platform that recorded the view. Platform identifier: | Value | Meaning | |---|---| | `browser` | Web browser application (JavaScript SDK) | | `ios` | Apple iOS application | | `android` | Android application | | `react-native` | React Native application | | `flutter` | Flutter application | | `kotlin-multiplatform` | Kotlin Multiplatform application | | `roku` | Roku channel application | | `unity` | Unity application | | `miniprogram` | WeChat mini program | | `harmony` | HarmonyOS application | | `electron` | Electron desktop application | [browser, ios, android, react-native, flutter, kotlin-multiplatform, roku, unity, miniprogram, harmony, electron]\n - start (string) — Unix timestamp in milliseconds when the view started. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - url (string) — URL (web) or screen identifier (mobile) associated with the view.\n - view_id (string) — Unique ID of the view within the session.\n", "SessionReplay.Segments": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - items (array) — Presigned, time-limited URLs (valid 1 hour) for downloading each segment's raw compressed bytes.\n - search_after_ctx (string) — Pagination cursor to pass as `search_after_ctx` on the next call. Empty when this page was the last one.\n", - "Sessions.ReadInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - events (array) (required) — Recent events, ascending by (created_at, event_id).\n - actions (object) — ADK actions envelope (state deltas, transfers, escalation).\n - author (string) — Event author (e.g. user, the agent name).\n - branch (string) — ADK branch path for nested agents.\n - content (object) — ADK content envelope {role, parts:[...]}.\n - created_at (string) (required) — Unix timestamp in milliseconds when the event was written. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - error_code (string) — Error code when the event represents a failure.\n - error_message (string) — Human-readable error message, when present.\n - event_id (string) (required) — Event identifier.\n - invocation_id (string) — ADK invocation id grouping a turn.\n - partial (boolean) (required) — True for a streaming partial chunk.\n - session_id (string) (required) — Owning session id.\n - status (string) — Event status. One of: `normal` (a live event included in the context fed to the model), `compressed` (folded into a compaction summary boundary event; no longer loaded for the model, kept as history only). [normal, compressed]\n - turn_complete (boolean) (required) — True on the terminal event of a turn.\n - usage_metadata (object) — Per-turn token usage metadata.\n - has_more_older (boolean) (required) — True when older events remain beyond this page.\n - pending_messages (array) (required) — Human messages queued but not yet picked up by the agent, in execution order. Always an array — empty when nothing is queued.\n - client_msg_id (string) — Client-supplied message ID, echoed back for de-duplication. Omitted when absent.\n - invocation_id (string) (required) — Invocation ID of the queued message.\n - parts (array) — Request parts passed through verbatim (text, file, ref, or skill entries). Omitted when the original message carried none.\n - person_id (integer) (required) — Person ID of the sender.\n - query (string) (required) — Message text.\n - steering (boolean) — True when the message was sent as a mid-turn steering instruction. Omitted when false.\n - search_after_ctx (string) — Opaque keyset cursor; pass back as search_after_ctx to fetch the next older page. Omitted when has_more_older is false.\n - session (object) (required) — One agent session row.\n - access_source (string) — How the caller received access to this session. Omitted when no access source is resolved. One of: | Value | Meaning | | --- | --- | | `owner` | Caller is the session creator (full access) | | `team_member` | Caller belongs to the session's bound team (full access) | | `manager` | Manager grant (reserved; never produced by the current version) | | `share_link` | Granted via a valid share link (view/fork only; cannot continue or manage) | | `participant` | Same-account non-member granted via a participable team session (view/continue/fork only) | [owner, team_member, manager, share_link, participant]\n - app_name (string) (required) — Agent app that owns the session.\n - archived_at (string) (required) — Unix timestamp in milliseconds when archived; 0 means not archived. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - bound_environment (object) — The runner or cloud sandbox the session is bound to. Null until the first message.\n - id (string) (required) — Environment identifier: a cloud sandbox ID for `cloud` bindings, a runner/environment ID for `byoc` bindings.\n - kind (string) (required) — Environment kind bound to the session: `cloud` (managed sandbox) or `byoc` (self-hosted runner). [cloud, byoc]\n - name (string) — Human-readable environment name; empty for cloud bindings using the default allowlist.\n - status (string) — Live binding health, namespaced by kind: BYOC uses online/pending/offline/deleted; cloud uses available/rebuilding/expired. [online, pending, offline, deleted, available, rebuilding, expired]\n - can_continue (boolean) (required) — True when the caller can add a new turn to this session.\n - can_fork (boolean) (required) — True when the caller can fork this session.\n - can_manage (boolean) (required) — True when the caller may rename/archive/delete the session; personal sessions are creator-only, team sessions allow the creator, account admin, or team member.\n - can_view (boolean) (required) — True when the caller can view this session.\n - context_resolved (object) — Snapshot of the three-tier knowledge-pack resolution for this session.\n - account_pack_id (string) — Resolved account-scoped pack id.\n - incident_id (string) — Bound incident id, when war-room originated.\n - resolved_at_ms (string) (required) — Unix timestamp in milliseconds when the packs were resolved. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - team_pack_id (string) — Resolved team-scoped pack id.\n - versions (object) — Per-pack resolved version map.\n - context_window (integer) (required) — The bound model's max context size in tokens. 0 means unknown.\n - created_at (string) (required) — Unix timestamp in milliseconds when the session was created. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - creator_name (string) — Display name of the session creator, resolved when the response is rendered. Omitted when the member lookup fails.\n - current_context_tokens (integer) (required) — Size in tokens of the LLM context window as of the most recent turn. 0 means no turn has completed.\n - current_turn_active_ms (integer) (required) — Active working duration in milliseconds for the current or most recent round, excluding time spent waiting on ask_user; resets to 0 at the start of each new round.\n - current_turn_started_at (string) (required) — Unix timestamp in milliseconds when the current or most recent round started; 0 if no round has started yet. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - current_turn_tokens (integer) (required) — Total tokens (input+output+reasoning) for the in-flight round across the parent and its subagents; only computed by session/get while the session is running, always 0 in session/list responses and when idle.\n - current_turn_wait_ms (integer) (required) — Accumulated ask_user human-wait duration in milliseconds for the current round; resets to 0 at the start of each new round.\n - entry_kind (string) — Surface that created the session. One of: | Value | Meaning | | --- | --- | | `web` | Created from the web console | | `im` | Created from an IM client (IM bot / IM H5) | | `api` | Created via the public API | | `automation` | Created by an automation rule (unattended run) | | `subagent` | Child session spawned by a parent's agent_dispatch (audit label; at runtime it executes on the web tool surface) | [web, im, api, automation, subagent]\n - has_unread (boolean) (required) — True when there is assistant output the caller has not yet viewed.\n - incognito (boolean) (required) — True for incognito (non-persisted-memory) sessions.\n - is_mine (boolean) (required) — True when the caller created this session.\n - is_running (boolean) (required) — True when an agent turn is currently in flight for this session.\n - last_event_at (string) — Unix timestamp in milliseconds of the most recent assistant-side event. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - parent_session_id (string) — Parent session id for subagent (child) sessions; empty otherwise.\n - person_id (string) (required) — Creator person id.\n - pinned_at (string) (required) — Caller's per-user pin time as a Unix timestamp in milliseconds; 0 means not pinned. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - session_id (string) (required) — Session identifier.\n - session_name (string) (required) — Session title; may be empty for untitled sessions.\n - share_enabled (boolean) (required) — True when the session's share link is active.\n - share_version (integer) (required) — Revision of the share link; it increases when sharing is revoked.\n - shared_at (string) (required) — Unix timestamp in milliseconds when sharing was last enabled; 0 if never shared. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - shared_by (integer) (required) — Person ID that most recently enabled sharing; 0 if never shared.\n - standing_tasks (integer) (required) — Number of process-type tasks (background shell or monitor) still alive when the response was rendered.\n - state (object) — Raw session-state bag (session-scoped keys). Omitted when empty.\n - status (string) (required) — Lifecycle status. One of: `enabled` (active), `deleted` (soft-deleted, no longer accessible). [enabled, deleted]\n - team_id (integer) (required) — Owning team id; 0 means no team is bound. Immutable after create.\n - team_name (string) — Resolved team name; empty for unbound rows or deleted teams.\n - template_staging_round_id (string) — Current save→validate round id (template-assistant only); empty otherwise.\n - token_usage (object) — Cumulative session-level token rollup across all turns. The account-billing source of truth.\n - cached_tokens (integer) (required) — Portion of input_tokens served from the prompt cache.\n - input_tokens (integer) (required) — Total prompt (input) tokens, including the cached portion.\n - output_tokens (integer) (required) — Total generated (output) tokens.\n - reasoning_tokens (integer) (required) — Total reasoning/thinking tokens.\n - updated_at (string) (required) — Unix timestamp in milliseconds of the last session update. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - suggest_init (boolean) (required) — Account-wide onboarding flag: true when the account has zero knowledge packs in any scope; not specific to this session.\n", - "Sessions.ReadList": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - sessions (array) (required) — The page of sessions.\n - access_source (string) — How the caller received access to this session. Omitted when no access source is resolved. One of: | Value | Meaning | | --- | --- | | `owner` | Caller is the session creator (full access) | | `team_member` | Caller belongs to the session's bound team (full access) | | `manager` | Manager grant (reserved; never produced by the current version) | | `share_link` | Granted via a valid share link (view/fork only; cannot continue or manage) | | `participant` | Same-account non-member granted via a participable team session (view/continue/fork only) | [owner, team_member, manager, share_link, participant]\n - app_name (string) (required) — Agent app that owns the session.\n - archived_at (string) (required) — Unix timestamp in milliseconds when archived; 0 means not archived. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - bound_environment (object) — The runner or cloud sandbox the session is bound to. Null until the first message.\n - id (string) (required) — Environment identifier: a cloud sandbox ID for `cloud` bindings, a runner/environment ID for `byoc` bindings.\n - kind (string) (required) — Environment kind bound to the session: `cloud` (managed sandbox) or `byoc` (self-hosted runner). [cloud, byoc]\n - name (string) — Human-readable environment name; empty for cloud bindings using the default allowlist.\n - status (string) — Live binding health, namespaced by kind: BYOC uses online/pending/offline/deleted; cloud uses available/rebuilding/expired. [online, pending, offline, deleted, available, rebuilding, expired]\n - can_continue (boolean) (required) — True when the caller can add a new turn to this session.\n - can_fork (boolean) (required) — True when the caller can fork this session.\n - can_manage (boolean) (required) — True when the caller may rename/archive/delete the session; personal sessions are creator-only, team sessions allow the creator, account admin, or team member.\n - can_view (boolean) (required) — True when the caller can view this session.\n - context_resolved (object) — Snapshot of the three-tier knowledge-pack resolution for this session.\n - account_pack_id (string) — Resolved account-scoped pack id.\n - incident_id (string) — Bound incident id, when war-room originated.\n - resolved_at_ms (string) (required) — Unix timestamp in milliseconds when the packs were resolved. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - team_pack_id (string) — Resolved team-scoped pack id.\n - versions (object) — Per-pack resolved version map.\n - context_window (integer) (required) — The bound model's max context size in tokens. 0 means unknown.\n - created_at (string) (required) — Unix timestamp in milliseconds when the session was created. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - creator_name (string) — Display name of the session creator, resolved when the response is rendered. Omitted when the member lookup fails.\n - current_context_tokens (integer) (required) — Size in tokens of the LLM context window as of the most recent turn. 0 means no turn has completed.\n - current_turn_active_ms (integer) (required) — Active working duration in milliseconds for the current or most recent round, excluding time spent waiting on ask_user; resets to 0 at the start of each new round.\n - current_turn_started_at (string) (required) — Unix timestamp in milliseconds when the current or most recent round started; 0 if no round has started yet. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - current_turn_tokens (integer) (required) — Total tokens (input+output+reasoning) for the in-flight round across the parent and its subagents; only computed by session/get while the session is running, always 0 in session/list responses and when idle.\n - current_turn_wait_ms (integer) (required) — Accumulated ask_user human-wait duration in milliseconds for the current round; resets to 0 at the start of each new round.\n - entry_kind (string) — Surface that created the session. One of: | Value | Meaning | | --- | --- | | `web` | Created from the web console | | `im` | Created from an IM client (IM bot / IM H5) | | `api` | Created via the public API | | `automation` | Created by an automation rule (unattended run) | | `subagent` | Child session spawned by a parent's agent_dispatch (audit label; at runtime it executes on the web tool surface) | [web, im, api, automation, subagent]\n - has_unread (boolean) (required) — True when there is assistant output the caller has not yet viewed.\n - incognito (boolean) (required) — True for incognito (non-persisted-memory) sessions.\n - is_mine (boolean) (required) — True when the caller created this session.\n - is_running (boolean) (required) — True when an agent turn is currently in flight for this session.\n - last_event_at (string) — Unix timestamp in milliseconds of the most recent assistant-side event. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - parent_session_id (string) — Parent session id for subagent (child) sessions; empty otherwise.\n - person_id (string) (required) — Creator person id.\n - pinned_at (string) (required) — Caller's per-user pin time as a Unix timestamp in milliseconds; 0 means not pinned. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - session_id (string) (required) — Session identifier.\n - session_name (string) (required) — Session title; may be empty for untitled sessions.\n - share_enabled (boolean) (required) — True when the session's share link is active.\n - share_version (integer) (required) — Revision of the share link; it increases when sharing is revoked.\n - shared_at (string) (required) — Unix timestamp in milliseconds when sharing was last enabled; 0 if never shared. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - shared_by (integer) (required) — Person ID that most recently enabled sharing; 0 if never shared.\n - standing_tasks (integer) (required) — Number of process-type tasks (background shell or monitor) still alive when the response was rendered.\n - state (object) — Raw session-state bag (session-scoped keys). Omitted when empty.\n - status (string) (required) — Lifecycle status. One of: `enabled` (active), `deleted` (soft-deleted, no longer accessible). [enabled, deleted]\n - team_id (integer) (required) — Owning team id; 0 means no team is bound. Immutable after create.\n - team_name (string) — Resolved team name; empty for unbound rows or deleted teams.\n - template_staging_round_id (string) — Current save→validate round id (template-assistant only); empty otherwise.\n - token_usage (object) — Cumulative session-level token rollup across all turns. The account-billing source of truth.\n - cached_tokens (integer) (required) — Portion of input_tokens served from the prompt cache.\n - input_tokens (integer) (required) — Total prompt (input) tokens, including the cached portion.\n - output_tokens (integer) (required) — Total generated (output) tokens.\n - reasoning_tokens (integer) (required) — Total reasoning/thinking tokens.\n - updated_at (string) (required) — Unix timestamp in milliseconds of the last session update. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - suggest_init (boolean) (required) — Account-wide onboarding flag: true when the account has zero knowledge packs in any scope; not dependent on this call's filters.\n - total (integer) (required) — Total number of sessions matching the filter (ignoring pagination).\n", + "Sessions.ReadInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - events (array) (required) — Recent events, ascending by (created_at, event_id).\n - actions (object) — ADK actions envelope (state deltas, transfers, escalation).\n - author (string) — Event author (e.g. user, the agent name).\n - branch (string) — ADK branch path for nested agents.\n - content (object) — ADK content envelope {role, parts:[...]}.\n - created_at (string) (required) — Unix timestamp in milliseconds when the event was written. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - error_code (string) — Error code when the event represents a failure.\n - error_message (string) — Human-readable error message, when present.\n - event_id (string) (required) — Event identifier.\n - invocation_id (string) — ADK invocation id grouping a turn.\n - partial (boolean) (required) — True for a streaming partial chunk.\n - session_id (string) (required) — Owning session id.\n - status (string) — Event status. One of: `normal` (a live event included in the context fed to the model), `compressed` (folded into a compaction summary boundary event; no longer loaded for the model, kept as history only). [normal, compressed]\n - turn_complete (boolean) (required) — True on the terminal event of a turn.\n - usage_metadata (object) — Per-turn token usage metadata.\n - has_more_older (boolean) (required) — True when older events remain beyond this page.\n - pending_messages (array) (required) — Human messages queued but not yet picked up by the agent, in execution order. Always an array — empty when nothing is queued.\n - client_msg_id (string) — Client-supplied message ID, echoed back for de-duplication. Omitted when absent.\n - invocation_id (string) (required) — Invocation ID of the queued message.\n - parts (array) — Request parts passed through verbatim (text, file, ref, or skill entries). Omitted when the original message carried none.\n - person_id (integer) (required) — Person ID of the sender.\n - query (string) (required) — Message text.\n - steering (boolean) — True when the message was sent as a mid-turn steering instruction. Omitted when false.\n - search_after_ctx (string) — Opaque keyset cursor; pass back as search_after_ctx to fetch the next older page. Omitted when has_more_older is false.\n - session (object) (required) — One agent session row.\n - access_source (string) — How the caller received access to this session. Omitted when no access source is resolved. One of: | Value | Meaning | | --- | --- | | `owner` | Caller is the session creator (full access) | | `team_member` | Caller belongs to the session's bound team (full access) | | `manager` | Manager grant (reserved; never produced by the current version) | | `share_link` | Granted via a valid share link (view/fork only; cannot continue or manage) | | `participant` | Same-account non-member granted via a participable team session (view/continue/fork only) | [owner, team_member, manager, share_link, participant]\n - app_name (string) (required) — Agent app that owns the session.\n - archived_at (string) (required) — Unix timestamp in milliseconds when archived; 0 means not archived. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - bound_environment (object) — The runner or cloud sandbox the session is bound to. Null until the first message.\n - id (string) (required) — Environment identifier: a cloud sandbox ID for `cloud` bindings, a runner/environment ID for `byoc` bindings.\n - kind (string) (required) — Environment kind bound to the session: `cloud` (managed sandbox) or `byoc` (self-hosted runner). [cloud, byoc]\n - name (string) — Human-readable environment name; empty for cloud bindings using the default allowlist.\n - status (string) — Live binding health, namespaced by kind: BYOC uses online/pending/offline/deleted; cloud uses available/rebuilding/expired. [online, pending, offline, deleted, available, rebuilding, expired]\n - can_continue (boolean) (required) — True when the caller can add a new turn to this session.\n - can_fork (boolean) (required) — True when the caller can fork this session.\n - can_manage (boolean) (required) — True when the caller may rename/archive/delete the session; personal sessions are creator-only, team sessions allow the creator, account admin, or team member.\n - can_view (boolean) (required) — True when the caller can view this session.\n - context_resolved (object) — Snapshot of the three-tier knowledge resolution for this session.\n - account_pack_id (string) — Resolved account-scope knowledge ID.\n - incident_id (string) — Bound incident id, when war-room originated.\n - resolved_at_ms (string) (required) — Unix timestamp in milliseconds when the knowledge was resolved. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - team_pack_id (string) — Resolved team-scope knowledge ID.\n - versions (object) — Resolved version map, one entry per knowledge.\n - context_window (integer) (required) — The bound model's max context size in tokens. 0 means unknown.\n - created_at (string) (required) — Unix timestamp in milliseconds when the session was created. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - creator_name (string) — Display name of the session creator, resolved when the response is rendered. Omitted when the member lookup fails.\n - current_context_tokens (integer) (required) — Size in tokens of the LLM context window as of the most recent turn. 0 means no turn has completed.\n - current_turn_active_ms (integer) (required) — Active working duration in milliseconds for the current or most recent round, excluding time spent waiting on ask_user; resets to 0 at the start of each new round.\n - current_turn_started_at (string) (required) — Unix timestamp in milliseconds when the current or most recent round started; 0 if no round has started yet. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - current_turn_tokens (integer) (required) — Total tokens (input+output+reasoning) for the in-flight round across the parent and its subagents; only computed by session/get while the session is running, always 0 in session/list responses and when idle.\n - current_turn_wait_ms (integer) (required) — Accumulated ask_user human-wait duration in milliseconds for the current round; resets to 0 at the start of each new round.\n - entry_kind (string) — Surface that created the session. One of: | Value | Meaning | | --- | --- | | `web` | Created from the web console | | `im` | Created from an IM client (IM bot / IM H5) | | `api` | Created via the public API | | `automation` | Created by an automation rule (unattended run) | | `subagent` | Child session spawned by a parent's agent_dispatch (audit label; at runtime it executes on the web tool surface) | [web, im, api, automation, subagent]\n - has_open_tasks (boolean) — Whether the session still has open tasks, used to tell a handed-off turn from a settled session. Best-effort: when the read fails the field is absent (`omitempty`), which callers must treat as \"unknown\", never as proof the session is idle.\n - has_unread (boolean) (required) — True when there is assistant output the caller has not yet viewed.\n - incognito (boolean) (required) — True for incognito (non-persisted-memory) sessions.\n - is_mine (boolean) (required) — True when the caller created this session.\n - is_running (boolean) (required) — True when an agent turn is currently in flight for this session.\n - last_event_at (string) — Unix timestamp in milliseconds of the most recent assistant-side event. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - parent_session_id (string) — Parent session id for subagent (child) sessions; empty otherwise.\n - person_id (string) (required) — Creator person id.\n - pinned_at (string) (required) — Caller's per-user pin time as a Unix timestamp in milliseconds; 0 means not pinned. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - session_id (string) (required) — Session identifier.\n - session_name (string) (required) — Session title; may be empty for untitled sessions.\n - share_enabled (boolean) (required) — True when the session's share link is active.\n - share_version (integer) (required) — Revision of the share link; it increases when sharing is revoked.\n - shared_at (string) (required) — Unix timestamp in milliseconds when sharing was last enabled; 0 if never shared. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - shared_by (integer) (required) — Person ID that most recently enabled sharing; 0 if never shared.\n - standing_tasks (integer) (required) — Number of process-type tasks (background shell or monitor) still alive when the response was rendered.\n - state (object) — Raw session-state bag (session-scoped keys). Omitted when empty.\n - status (string) (required) — Lifecycle status. One of: `enabled` (active), `deleted` (soft-deleted, no longer accessible). [enabled, deleted]\n - team_id (integer) (required) — Owning team id; 0 means no team is bound. Immutable after create.\n - team_name (string) — Resolved team name; empty for unbound rows or deleted teams.\n - template_staging_round_id (string) — Current save→validate round id (template-assistant only); empty otherwise.\n - token_usage (object) — Cumulative session-level token rollup across all turns. The account-billing source of truth.\n - cached_tokens (integer) (required) — Portion of input_tokens served from the prompt cache.\n - input_tokens (integer) (required) — Total prompt (input) tokens, including the cached portion.\n - output_tokens (integer) (required) — Total generated (output) tokens.\n - reasoning_tokens (integer) (required) — Total reasoning/thinking tokens.\n - updated_at (string) (required) — Unix timestamp in milliseconds of the last session update. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - suggest_init (boolean) (required) — Account-wide onboarding flag: true when the account has no knowledge in any scope; not specific to this session.\n", + "Sessions.ReadList": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - sessions (array) (required) — The page of sessions.\n - access_source (string) — How the caller received access to this session. Omitted when no access source is resolved. One of: | Value | Meaning | | --- | --- | | `owner` | Caller is the session creator (full access) | | `team_member` | Caller belongs to the session's bound team (full access) | | `manager` | Manager grant (reserved; never produced by the current version) | | `share_link` | Granted via a valid share link (view/fork only; cannot continue or manage) | | `participant` | Same-account non-member granted via a participable team session (view/continue/fork only) | [owner, team_member, manager, share_link, participant]\n - app_name (string) (required) — Agent app that owns the session.\n - archived_at (string) (required) — Unix timestamp in milliseconds when archived; 0 means not archived. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - bound_environment (object) — The runner or cloud sandbox the session is bound to. Null until the first message.\n - id (string) (required) — Environment identifier: a cloud sandbox ID for `cloud` bindings, a runner/environment ID for `byoc` bindings.\n - kind (string) (required) — Environment kind bound to the session: `cloud` (managed sandbox) or `byoc` (self-hosted runner). [cloud, byoc]\n - name (string) — Human-readable environment name; empty for cloud bindings using the default allowlist.\n - status (string) — Live binding health, namespaced by kind: BYOC uses online/pending/offline/deleted; cloud uses available/rebuilding/expired. [online, pending, offline, deleted, available, rebuilding, expired]\n - can_continue (boolean) (required) — True when the caller can add a new turn to this session.\n - can_fork (boolean) (required) — True when the caller can fork this session.\n - can_manage (boolean) (required) — True when the caller may rename/archive/delete the session; personal sessions are creator-only, team sessions allow the creator, account admin, or team member.\n - can_view (boolean) (required) — True when the caller can view this session.\n - context_resolved (object) — Snapshot of the three-tier knowledge resolution for this session.\n - account_pack_id (string) — Resolved account-scope knowledge ID.\n - incident_id (string) — Bound incident id, when war-room originated.\n - resolved_at_ms (string) (required) — Unix timestamp in milliseconds when the knowledge was resolved. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - team_pack_id (string) — Resolved team-scope knowledge ID.\n - versions (object) — Resolved version map, one entry per knowledge.\n - context_window (integer) (required) — The bound model's max context size in tokens. 0 means unknown.\n - created_at (string) (required) — Unix timestamp in milliseconds when the session was created. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - creator_name (string) — Display name of the session creator, resolved when the response is rendered. Omitted when the member lookup fails.\n - current_context_tokens (integer) (required) — Size in tokens of the LLM context window as of the most recent turn. 0 means no turn has completed.\n - current_turn_active_ms (integer) (required) — Active working duration in milliseconds for the current or most recent round, excluding time spent waiting on ask_user; resets to 0 at the start of each new round.\n - current_turn_started_at (string) (required) — Unix timestamp in milliseconds when the current or most recent round started; 0 if no round has started yet. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - current_turn_tokens (integer) (required) — Total tokens (input+output+reasoning) for the in-flight round across the parent and its subagents; only computed by session/get while the session is running, always 0 in session/list responses and when idle.\n - current_turn_wait_ms (integer) (required) — Accumulated ask_user human-wait duration in milliseconds for the current round; resets to 0 at the start of each new round.\n - entry_kind (string) — Surface that created the session. One of: | Value | Meaning | | --- | --- | | `web` | Created from the web console | | `im` | Created from an IM client (IM bot / IM H5) | | `api` | Created via the public API | | `automation` | Created by an automation rule (unattended run) | | `subagent` | Child session spawned by a parent's agent_dispatch (audit label; at runtime it executes on the web tool surface) | [web, im, api, automation, subagent]\n - has_open_tasks (boolean) — Whether the session still has open tasks, used to tell a handed-off turn from a settled session. Best-effort: when the read fails the field is absent (`omitempty`), which callers must treat as \"unknown\", never as proof the session is idle.\n - has_unread (boolean) (required) — True when there is assistant output the caller has not yet viewed.\n - incognito (boolean) (required) — True for incognito (non-persisted-memory) sessions.\n - is_mine (boolean) (required) — True when the caller created this session.\n - is_running (boolean) (required) — True when an agent turn is currently in flight for this session.\n - last_event_at (string) — Unix timestamp in milliseconds of the most recent assistant-side event. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - parent_session_id (string) — Parent session id for subagent (child) sessions; empty otherwise.\n - person_id (string) (required) — Creator person id.\n - pinned_at (string) (required) — Caller's per-user pin time as a Unix timestamp in milliseconds; 0 means not pinned. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - session_id (string) (required) — Session identifier.\n - session_name (string) (required) — Session title; may be empty for untitled sessions.\n - share_enabled (boolean) (required) — True when the session's share link is active.\n - share_version (integer) (required) — Revision of the share link; it increases when sharing is revoked.\n - shared_at (string) (required) — Unix timestamp in milliseconds when sharing was last enabled; 0 if never shared. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - shared_by (integer) (required) — Person ID that most recently enabled sharing; 0 if never shared.\n - standing_tasks (integer) (required) — Number of process-type tasks (background shell or monitor) still alive when the response was rendered.\n - state (object) — Raw session-state bag (session-scoped keys). Omitted when empty.\n - status (string) (required) — Lifecycle status. One of: `enabled` (active), `deleted` (soft-deleted, no longer accessible). [enabled, deleted]\n - team_id (integer) (required) — Owning team id; 0 means no team is bound. Immutable after create.\n - team_name (string) — Resolved team name; empty for unbound rows or deleted teams.\n - template_staging_round_id (string) — Current save→validate round id (template-assistant only); empty otherwise.\n - token_usage (object) — Cumulative session-level token rollup across all turns. The account-billing source of truth.\n - cached_tokens (integer) (required) — Portion of input_tokens served from the prompt cache.\n - input_tokens (integer) (required) — Total prompt (input) tokens, including the cached portion.\n - output_tokens (integer) (required) — Total generated (output) tokens.\n - reasoning_tokens (integer) (required) — Total reasoning/thinking tokens.\n - updated_at (string) (required) — Unix timestamp in milliseconds of the last session update. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - suggest_init (boolean) (required) — Account-wide onboarding flag: true when the account has no knowledge in any scope; not dependent on this call's filters.\n - total (integer) (required) — Total number of sessions matching the filter (ignoring pagination).\n", "Skills.ReadGet": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Owning account ID.\n - author (string) — Skill author.\n - can_edit (boolean) (required) — Whether the caller may edit this skill.\n - checksum (string) — SHA-256 checksum of the skill zip.\n - content (string) — Full SKILL.md content. Omitted in list responses.\n - created (boolean) — Set only on install-from-session responses: true = fresh install, false = in-place update.\n - created_at (string) (required) — Creation time. Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (integer) (required) — Member ID that created the skill.\n - description (string) (required) — Human-readable description from the SKILL.md frontmatter.\n - description_en (string) — Optional English description. English-locale UI responses prefer this over `description`; the skill catalog also uses it as a stable selection signal when `description` is localized for display.\n - is_modified (boolean) (required) — True when a marketplace-sourced skill was edited locally (auto-update skips it).\n - license (string) — Skill license.\n - s3_key (string) — Object-storage key of the skill zip.\n - skill_id (string) (required) — Unique skill ID (prefix `skill_`).\n - skill_name (string) (required) — Skill name, unique within its scope (account-wide or within one team).\n - source_template_name (string) — Marketplace template this skill was installed from; empty for user-authored.\n - source_template_version (string) — Template version at install time.\n - status (string) (required) — Skill status. Deleted skills are excluded from every API response, so only these two values are ever returned. [enabled, disabled]\n - tags (array) — Tags parsed from the frontmatter.\n - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team.\n - tools (array) — Required tools (builtin or `mcp:server/tool`).\n - update_available (boolean) (required) — True when the marketplace has a newer template version.\n - updated_at (string) (required) — Last update time. Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - venues (array) — Execution-environment kinds (EnvironmentKind strings, e.g. `byoc`) the skill is restricted to. Omitted when empty, which means the skill is available in all venues.\n - version (string) — Skill version from the frontmatter.\n", "Skills.ReadList": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - skills (array) (required) — Skills on this page.\n - account_id (integer) (required) — Owning account ID.\n - author (string) — Skill author.\n - can_edit (boolean) (required) — Whether the caller may edit this skill.\n - checksum (string) — SHA-256 checksum of the skill zip.\n - content (string) — Full SKILL.md content. Omitted in list responses.\n - created (boolean) — Set only on install-from-session responses: true = fresh install, false = in-place update.\n - created_at (string) (required) — Creation time. Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (integer) (required) — Member ID that created the skill.\n - description (string) (required) — Human-readable description from the SKILL.md frontmatter.\n - description_en (string) — Optional English description. English-locale UI responses prefer this over `description`; the skill catalog also uses it as a stable selection signal when `description` is localized for display.\n - is_modified (boolean) (required) — True when a marketplace-sourced skill was edited locally (auto-update skips it).\n - license (string) — Skill license.\n - s3_key (string) — Object-storage key of the skill zip.\n - skill_id (string) (required) — Unique skill ID (prefix `skill_`).\n - skill_name (string) (required) — Skill name, unique within its scope (account-wide or within one team).\n - source_template_name (string) — Marketplace template this skill was installed from; empty for user-authored.\n - source_template_version (string) — Template version at install time.\n - status (string) (required) — Skill status. Deleted skills are excluded from every API response, so only these two values are ever returned. [enabled, disabled]\n - tags (array) — Tags parsed from the frontmatter.\n - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team.\n - tools (array) — Required tools (builtin or `mcp:server/tool`).\n - update_available (boolean) (required) — True when the marketplace has a newer template version.\n - updated_at (string) (required) — Last update time. Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - venues (array) — Execution-environment kinds (EnvironmentKind strings, e.g. `byoc`) the skill is restricted to. Omitted when empty, which means the skill is available in all venues.\n - version (string) — Skill version from the frontmatter.\n - total (integer) (required) — Total number of matching skills.\n", "Skills.WriteUpdate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Owning account ID.\n - author (string) — Skill author.\n - can_edit (boolean) (required) — Whether the caller may edit this skill.\n - checksum (string) — SHA-256 checksum of the skill zip.\n - content (string) — Full SKILL.md content. Omitted in list responses.\n - created (boolean) — Set only on install-from-session responses: true = fresh install, false = in-place update.\n - created_at (string) (required) — Creation time. Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - created_by (integer) (required) — Member ID that created the skill.\n - description (string) (required) — Human-readable description from the SKILL.md frontmatter.\n - description_en (string) — Optional English description. English-locale UI responses prefer this over `description`; the skill catalog also uses it as a stable selection signal when `description` is localized for display.\n - is_modified (boolean) (required) — True when a marketplace-sourced skill was edited locally (auto-update skips it).\n - license (string) — Skill license.\n - s3_key (string) — Object-storage key of the skill zip.\n - skill_id (string) (required) — Unique skill ID (prefix `skill_`).\n - skill_name (string) (required) — Skill name, unique within its scope (account-wide or within one team).\n - source_template_name (string) — Marketplace template this skill was installed from; empty for user-authored.\n - source_template_version (string) — Template version at install time.\n - status (string) (required) — Skill status. Deleted skills are excluded from every API response, so only these two values are ever returned. [enabled, disabled]\n - tags (array) — Tags parsed from the frontmatter.\n - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team.\n - tools (array) — Required tools (builtin or `mcp:server/tool`).\n - update_available (boolean) (required) — True when the marketplace has a newer template version.\n - updated_at (string) (required) — Last update time. Unix timestamp in milliseconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - venues (array) — Execution-environment kinds (EnvironmentKind strings, e.g. `byoc`) the skill is restricted to. Omitted when empty, which means the skill is available in all venues.\n - version (string) — Skill version from the frontmatter.\n", diff --git a/internal/cli/zz_generated_rule_folders.go b/internal/cli/zz_generated_rule_folders.go new file mode 100644 index 0000000..b87d87d --- /dev/null +++ b/internal/cli/zz_generated_rule_folders.go @@ -0,0 +1,57 @@ +// Code generated by internal/cmd/cligen; DO NOT EDIT. + +package cli + +import "github.com/spf13/cobra" + +func genRuleFoldersListCmd() *cobra.Command { + var dataJSON string + cmd := &cobra.Command{ + Use: "folder-list", + Short: "List monitor folders", + Long: `List monitor folders. + +List every monitor folder the caller can read. + +API: POST /monit/folder/list (monit-folder-read-list) + +Response fields ('data' is a TOP-LEVEL array of these row objects — pipe 'jq '.[]'', NOT '.items[]'): + - account_id (integer) (required) — Owning account ID. + - created_at (string) (required) — Unix timestamp in seconds. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - creator_id (integer) (required) — Member ID of the creator. + - creator_name (string) (required) — Name of the creator. + - id (integer) (required) — Folder ID. + - name (string) (required) — Folder name. + - note (string) (required) — Free-form note. + - parent_id (integer) (required) — Parent folder ID; 0 at the root. + - parent_path (string) (required) — Comma-separated ancestor IDs from the root, excluding this folder; empty at the root. + - team_id (integer) (required) — Team the folder is scoped to; 0 when account-wide. + - updated_at (string) (required) — Unix timestamp in seconds. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - updater_id (integer) (required) — Member ID of the last updater. + - updater_name (string) (required) — Name of the last updater. +`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + return nil + }) + if err != nil { + return err + } + _ = body + out, _, err := ctx.Client.RuleFolders.List(cmdContext(ctx.Cmd)) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func registerGeneratedRuleFolders(root *cobra.Command) { + gMonit := genGroup(root, "monit", "Monitors API") + genAddLeaf(gMonit, genRuleFoldersListCmd()) +} diff --git a/internal/cli/zz_generated_sessions.go b/internal/cli/zz_generated_sessions.go index d7d2085..bb82d99 100644 --- a/internal/cli/zz_generated_sessions.go +++ b/internal/cli/zz_generated_sessions.go @@ -69,12 +69,12 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le - can_fork (boolean) (required) — True when the caller can fork this session. - can_manage (boolean) (required) — True when the caller may rename/archive/delete the session; personal sessions are creator-only, team sessions allow the creator, account admin, or team member. - can_view (boolean) (required) — True when the caller can view this session. - - context_resolved (object) — Snapshot of the three-tier knowledge-pack resolution for this session. - - account_pack_id (string) — Resolved account-scoped pack id. + - context_resolved (object) — Snapshot of the three-tier knowledge resolution for this session. + - account_pack_id (string) — Resolved account-scope knowledge ID. - incident_id (string) — Bound incident id, when war-room originated. - - resolved_at_ms (string) (required) — Unix timestamp in milliseconds when the packs were resolved. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. - - team_pack_id (string) — Resolved team-scoped pack id. - - versions (object) — Per-pack resolved version map. + - resolved_at_ms (string) (required) — Unix timestamp in milliseconds when the knowledge was resolved. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - team_pack_id (string) — Resolved team-scope knowledge ID. + - versions (object) — Resolved version map, one entry per knowledge. - context_window (integer) (required) — The bound model's max context size in tokens. 0 means unknown. - created_at (string) (required) — Unix timestamp in milliseconds when the session was created. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. - creator_name (string) — Display name of the session creator, resolved when the response is rendered. Omitted when the member lookup fails. @@ -84,6 +84,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le - current_turn_tokens (integer) (required) — Total tokens (input+output+reasoning) for the in-flight round across the parent and its subagents; only computed by session/get while the session is running, always 0 in session/list responses and when idle. - current_turn_wait_ms (integer) (required) — Accumulated ask_user human-wait duration in milliseconds for the current round; resets to 0 at the start of each new round. - entry_kind (string) — Surface that created the session. One of: | Value | Meaning | | --- | --- | | 'web' | Created from the web console | | 'im' | Created from an IM client (IM bot / IM H5) | | 'api' | Created via the public API | | 'automation' | Created by an automation rule (unattended run) | | 'subagent' | Child session spawned by a parent's agent_dispatch (audit label; at runtime it executes on the web tool surface) | [web, im, api, automation, subagent] + - has_open_tasks (boolean) — Whether the session still has open tasks, used to tell a handed-off turn from a settled session. Best-effort: when the read fails the field is absent ('omitempty'), which callers must treat as "unknown", never as proof the session is idle. - has_unread (boolean) (required) — True when there is assistant output the caller has not yet viewed. - incognito (boolean) (required) — True for incognito (non-persisted-memory) sessions. - is_mine (boolean) (required) — True when the caller created this session. @@ -110,7 +111,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le - output_tokens (integer) (required) — Total generated (output) tokens. - reasoning_tokens (integer) (required) — Total reasoning/thinking tokens. - updated_at (string) (required) — Unix timestamp in milliseconds of the last session update. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. - - suggest_init (boolean) (required) — Account-wide onboarding flag: true when the account has zero knowledge packs in any scope; not specific to this session. + - suggest_init (boolean) (required) — Account-wide onboarding flag: true when the account has no knowledge in any scope; not specific to this session. `, Args: requireBodyFieldOrExactArg("session_id", "session-id"), Example: ` flashduty safari session-get --data '{"num_recent_events":50,"session_id":"sess_f8oDvqiG64uur6sBNsTc4u"}'`, @@ -172,6 +173,7 @@ func genSessionsReadListCmd() *cobra.Command { var fIncludeSubagentSessions bool var fKeyword string var fOrderby string + var fPersonIDs []int var fScope string var fStatus string var fTeamIDs []int @@ -194,6 +196,7 @@ Request fields: --include-subagent-sessions bool — Include subagent-dispatched sessions in the list. --keyword string — Filter by session-name keyword. (≤64 chars) --orderby string — Sort field: 'created_at' by creation time, 'updated_at' by last update; defaults to 'updated_at' when omitted. [created_at, updated_at] + --person-ids []int — Filter by who started the session: returns only sessions started by these members (a session is kept when 'person_id' matches any of them). Intersects with 'scope' and 'team_ids', so it never widens what the caller is allowed to see. --scope string — Visibility scope: 'all' (own personal + accessible team sessions), 'personal', or 'team'; default 'all'. [all, personal, team] --status string — Archive bucket: active (default) returns un-archived, archived returns archived, all returns both. [active, archived, all] --team-ids []int — Optional explicit team filter; intersects with 'scope' and never expands access. @@ -212,12 +215,12 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le - can_fork (boolean) (required) — True when the caller can fork this session. - can_manage (boolean) (required) — True when the caller may rename/archive/delete the session; personal sessions are creator-only, team sessions allow the creator, account admin, or team member. - can_view (boolean) (required) — True when the caller can view this session. - - context_resolved (object) — Snapshot of the three-tier knowledge-pack resolution for this session. - - account_pack_id (string) — Resolved account-scoped pack id. + - context_resolved (object) — Snapshot of the three-tier knowledge resolution for this session. + - account_pack_id (string) — Resolved account-scope knowledge ID. - incident_id (string) — Bound incident id, when war-room originated. - - resolved_at_ms (string) (required) — Unix timestamp in milliseconds when the packs were resolved. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. - - team_pack_id (string) — Resolved team-scoped pack id. - - versions (object) — Per-pack resolved version map. + - resolved_at_ms (string) (required) — Unix timestamp in milliseconds when the knowledge was resolved. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. + - team_pack_id (string) — Resolved team-scope knowledge ID. + - versions (object) — Resolved version map, one entry per knowledge. - context_window (integer) (required) — The bound model's max context size in tokens. 0 means unknown. - created_at (string) (required) — Unix timestamp in milliseconds when the session was created. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. - creator_name (string) — Display name of the session creator, resolved when the response is rendered. Omitted when the member lookup fails. @@ -227,6 +230,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le - current_turn_tokens (integer) (required) — Total tokens (input+output+reasoning) for the in-flight round across the parent and its subagents; only computed by session/get while the session is running, always 0 in session/list responses and when idle. - current_turn_wait_ms (integer) (required) — Accumulated ask_user human-wait duration in milliseconds for the current round; resets to 0 at the start of each new round. - entry_kind (string) — Surface that created the session. One of: | Value | Meaning | | --- | --- | | 'web' | Created from the web console | | 'im' | Created from an IM client (IM bot / IM H5) | | 'api' | Created via the public API | | 'automation' | Created by an automation rule (unattended run) | | 'subagent' | Child session spawned by a parent's agent_dispatch (audit label; at runtime it executes on the web tool surface) | [web, im, api, automation, subagent] + - has_open_tasks (boolean) — Whether the session still has open tasks, used to tell a handed-off turn from a settled session. Best-effort: when the read fails the field is absent ('omitempty'), which callers must treat as "unknown", never as proof the session is idle. - has_unread (boolean) (required) — True when there is assistant output the caller has not yet viewed. - incognito (boolean) (required) — True for incognito (non-persisted-memory) sessions. - is_mine (boolean) (required) — True when the caller created this session. @@ -253,7 +257,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le - output_tokens (integer) (required) — Total generated (output) tokens. - reasoning_tokens (integer) (required) — Total reasoning/thinking tokens. - updated_at (string) (required) — Unix timestamp in milliseconds of the last session update. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. - - suggest_init (boolean) (required) — Account-wide onboarding flag: true when the account has zero knowledge packs in any scope; not dependent on this call's filters. + - suggest_init (boolean) (required) — Account-wide onboarding flag: true when the account has no knowledge in any scope; not dependent on this call's filters. - total (integer) (required) — Total number of sessions matching the filter (ignoring pagination). `, Example: ` flashduty safari session-list --data '{"app_name":"ai-sre","limit":2,"orderby":"updated_at","scope":"all"}'`, @@ -287,6 +291,9 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le if cmd.Flags().Changed("orderby") { body["orderby"] = fOrderby } + if cmd.Flags().Changed("person-ids") { + body["person_ids"] = fPersonIDs + } if cmd.Flags().Changed("scope") { body["scope"] = fScope } @@ -322,6 +329,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().BoolVar(&fIncludeSubagentSessions, "include-subagent-sessions", false, "Include subagent-dispatched sessions in the list.") cmd.Flags().StringVar(&fKeyword, "keyword", "", "Filter by session-name keyword. (≤64 chars)") cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort field: 'created_at' by creation time, 'updated_at' by last update; defaults to 'updated_at' when omitted. [created_at, updated_at]") + cmd.Flags().IntSliceVar(&fPersonIDs, "person-ids", nil, "Filter by who started the session: returns only sessions started by these members (a session is kept when 'person_id' matches any of them). Intersects with 'scope' and 'team_ids', so it never widens what the caller is allowed to see.") cmd.Flags().StringVar(&fScope, "scope", "", "Visibility scope: 'all' (own personal + accessible team sessions), 'personal', or 'team'; default 'all'. [all, personal, team]") cmd.Flags().StringVar(&fStatus, "status", "", "Archive bucket: active (default) returns un-archived, archived returns archived, all returns both. [active, archived, all]") cmd.Flags().IntSliceVar(&fTeamIDs, "team-ids", nil, "Optional explicit team filter; intersects with 'scope' and never expands access.") diff --git a/skills/flashduty/reference/monit.md b/skills/flashduty/reference/monit.md index e40a4ec..630ec84 100644 --- a/skills/flashduty/reference/monit.md +++ b/skills/flashduty/reference/monit.md @@ -20,6 +20,129 @@ Read verbs are free. Mutating verbs change state — confirm before running; eac +### dashboard-create +Create dashboard +- `--dashboard-id` string (required) — Canonical UUIDv7 of the dashboard. +- `--folder-id` int64 (required) — Folder the dashboard is created in. Must be a folder the caller can write. (min 1) +- `--schema-version` string (required) — Wire schema version; only 'dashboard.v1' is accepted. · enum: dashboard.v1 +- body-only (`--data`): definition (object) (required) +- response: single object (`data` unwrapped to the top level) — fields: created_at (string); created_by (object); dashboard_id (string); definition (object); folder_breadcrumb (array); folder_id (integer); revision (integer); schema_version (string); updated_at (string); updated_by (object) + +### dashboard-delete +Delete dashboard +- `` (positional, required) string — Canonical UUIDv7 of the dashboard. +- `--expected-revision` int64 (required) — Revision the caller last read. The write fails with 'DashboardRevisionConflict' unless it still matches the stored revision. (min 1) +- response: single object (`data` unwrapped to the top level) — fields: dashboard_id (string); revision (integer) + +### dashboard-get +Get dashboard detail +- `` (positional, required) string — Canonical UUIDv7 of the dashboard. +- response: same shape as `dashboard-create` above + +### dashboard-list +List dashboards +- `` (positional, required) int64 — Folder whose dashboards are listed. (min 1) +- `--limit` int64 — Page size, 1–100. Defaults to 20. (1-100) +- `--page` int64 — Page number, 1-based. Defaults to 1. (min 1) +- `--query` string — Optional space-separated search words matched against title and description; at most 128 Unicode code points. (≤128 chars) +- `--search-after-ctx` string +- body-only (`--data`): sort (array) +- response: `{items: [...], total}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: dashboard_id (string); description (string); folder_breadcrumb (array); folder_id (integer); revision (integer); title (string); updated_at (string); updated_by (object) + +### dashboard-move +Move dashboard +- `--dashboard-id` string (required) — Canonical UUIDv7 of the dashboard. +- `--expected-revision` int64 (required) — Revision the caller last read. The write fails with 'DashboardRevisionConflict' unless it still matches the stored revision. (min 1) +- `--folder-id` int64 (required) — Destination folder ID. (min 1) +- response: single object (`data` unwrapped to the top level) — fields: changed (boolean); resource (object) + +### dashboard-outline +Get dashboard outline +- `` (positional, required) string — Canonical UUIDv7 of the dashboard. +- `--target-id` string — Optional tab, section or panel ID. When set, the response keeps only the branch that contains it, and an unknown ID returns 'TargetNotFound'. +- response: single object (`data` unwrapped to the top level) — fields: dashboard (object); folder (object); tabs (array); variables (array) + +### dashboard-panel-preview +Preview draft panel +- `--max-data-points` int64 — Downsampling target, 2–5000 points. (2-5000) +- body-only (`--data`): context (object) (required); panel (object) (required); selections (object) (required); time (object) (required); variables (array) (required) +- response: single object (`data` unwrapped to the top level) — fields: budget (object); display (object); panel_id (string); refs (array); run_state (string); time (object); variables (object) + +### dashboard-panel-run +Run dashboard panel +- `--dashboard-id` string (required) — Canonical UUIDv7 of the dashboard. +- `--max-data-points` int64 — Downsampling target, 2–5000 points; omit or send null for the server default of 100. (2-5000) +- `--panel-id` string (required) — Panel to execute. +- `--revision` int64 — Revision guard; when set it must equal the current revision. (min 1) +- body-only (`--data`): time (object) (required); variables (object) (required) +- response: single object (`data` unwrapped to the top level) — fields: budget (object); dashboard_id (string); display (object); panel_id (string); refs (array); revision (integer); run_state (string); time (object); variables (object) + +### dashboard-restore +Restore dashboard +- `` (positional, required) string — Canonical UUIDv7 of the dashboard. +- `--expected-revision` int64 (required) — Revision the caller last read. The write fails with 'DashboardRevisionConflict' unless it still matches the stored revision. (min 1) +- `--folder-id` int64 — Destination folder. Omit to restore to the original folder; when the original folder is no longer writable the call fails with 'RestoreFolderRequired' and you must pass one. (min 1) +- response: same shape as `dashboard-create` above + +### dashboard-revisions-get +Get dashboard revision +- `` (positional, required) string — Canonical UUIDv7 of the dashboard. +- `--revision` int64 (required) — Revision number to fetch. (min 1) +- response: single object (`data` unwrapped to the top level) — fields: actor (object); created_at (string); dashboard_id (string); definition (object); folder_id (integer); message (string); revision (integer); schema_version (string) + +### dashboard-revisions-list +List dashboard revisions +- `` (positional, required) string — Canonical UUIDv7 of the dashboard. +- response: `{items: [...]}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: actor (object); created_at (string); dashboard_id (string); folder_id (integer); message (string); revision (integer) + +### dashboard-runtime-queries-resolve [...] +Resolve panel queries +- `--dashboard-id` string (required) — Canonical UUIDv7 of the dashboard. +- `` (positional, required) stringSlice — Panels to resolve, 1–100 unique IDs. A panel that does not exist yields an 'error' arm rather than failing the call. +- body-only (`--data`): time (object) (required); variables (object) (required) +- response: single object (`data` unwrapped to the top level) — fields: dashboard_id (string); panels (array); revision (integer); time (object); variables (object) + +### dashboard-runtime-variables-preview +Preview draft variables +- body-only (`--data`): context (object) (required); selections (object) (required); time (object) (required); variables (array) (required) +- response: single object (`data` unwrapped to the top level) — fields: selections (object); variables (array) + +### dashboard-runtime-variables-resolve +Resolve dashboard variables +- `` (positional, required) string — Canonical UUIDv7 of the dashboard. +- body-only (`--data`): time (object) (required); variables (object) (required) +- response: single object (`data` unwrapped to the top level) — fields: dashboard_id (string); revision (integer); selections (object); variables (array) + +### dashboard-search +Search dashboards +- `--limit` int64 — Page size, 1–100. Defaults to 20. (1-100) +- `--page` int64 — Page number, 1-based. Defaults to 1. (min 1) +- `--query` string (required) — Space-separated search words; at least one word and at most 128 Unicode code points. (1-128 chars) +- `--search-after-ctx` string +- body-only (`--data`): sort (array) +- response: same shape as `dashboard-list ` above + +### dashboard-trash-list +List trashed dashboards +- `--limit` int64 — Page size, 1–100. Defaults to 20. (1-100) +- `--page` int64 — Page number, 1-based. Defaults to 1. (min 1) +- `--search-after-ctx` string +- body-only (`--data`): sort (array) +- response: `{items: [...], total}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: dashboard_id (string); deleted_at (string); deleted_by (object); description (string); folder_breadcrumb (array); folder_id (integer); revision (integer); title (string) + +### dashboard-update +Update dashboard +- `` (positional, required) string — Canonical UUIDv7 of the dashboard. +- `--expected-revision` int64 (required) — Revision the caller last read. The write fails with 'DashboardRevisionConflict' unless it still matches the stored revision. (min 1) +- `--message` string — Optional revision message, at most 1024 Unicode code points. Stored with the revision and never returned by this endpoint. (≤1024 chars) +- `--schema-version` string (required) — Wire schema version; only 'dashboard.v1' is accepted. · enum: dashboard.v1 +- body-only (`--data`): definition (object) (required) +- response: same shape as `dashboard-move` above + +### folder-list +List monitor folders +- response: TOP-LEVEL array — pipe `--json | jq '.[]'` (NOT `.items[]`) — fields: account_id (integer); created_at (string); creator_id (integer); creator_name (string); id (integer); name (string); note (string); parent_id (integer); parent_path (string); team_id (integer); updated_at (string); updater_id (integer); updater_name (string) + ### prometheus-api-v1-label-{label_name}-values List Prometheus label values - `--data-source-id` int64 diff --git a/skills/flashduty/reference/safari.md b/skills/flashduty/reference/safari.md index a3db641..664ffb9 100644 --- a/skills/flashduty/reference/safari.md +++ b/skills/flashduty/reference/safari.md @@ -253,21 +253,21 @@ Fire an Automation HTTP POST trigger ### knowledge-file-delete Delete knowledge file -- `--force` bool — Delete even when other pack files reference this file; the referrers are then returned as warnings instead of blocking the delete. -- `--pack-id` string — Knowledge pack ID; defaults to the caller's account-scope pack. -- `--rel-path` string (required) — Path of the file relative to the pack root. +- `--force` bool — Delete even when other knowledge files reference this file; the referrers are then returned as warnings instead of blocking the delete. +- `--pack-id` string — Knowledge ID; defaults to the caller's account-scope knowledge. +- `--rel-path` string (required) — Path of the file relative to the knowledge root. - response: single object (`data` unwrapped to the top level) — fields: warnings (array) ### knowledge-file-get Get knowledge file -- `--pack-id` string — Knowledge pack ID; defaults to the caller's account-scope pack. -- `--rel-path` string (required) — Path of the file relative to the pack root. +- `--pack-id` string — Knowledge ID; defaults to the caller's account-scope knowledge. +- `--rel-path` string (required) — Path of the file relative to the knowledge root. - response: single object (`data` unwrapped to the top level) — fields: content_b64 (string); file (object) ### knowledge-file-list List knowledge files - `--limit` int64 — Page size. Accepted but currently ignored — the response always contains the full file list. -- `--pack-id` string — Knowledge pack ID; defaults to the caller's account-scope pack. +- `--pack-id` string — Knowledge ID; defaults to the caller's account-scope knowledge. - `--page` int64 — Page number, 1-based. Accepted but currently ignored — the response always contains the full file list. - `--search-after-ctx` string - response: single object (`data` unwrapped to the top level) — fields: files (array); total (integer) @@ -276,40 +276,40 @@ List knowledge files Upload knowledge file - `--content-b64` string — Base64-encoded file content; must decode to valid UTF-8 text (binary is rejected). Per-file limit 1 MiB. - `--content-type` string — MIME type; inferred from the file extension when omitted. -- `--pack-id` string — Knowledge pack ID; defaults to the caller's account-scope pack. -- `--rel-path` string (required) — Destination path relative to the pack root; existing files are overwritten. +- `--pack-id` string — Knowledge ID; defaults to the caller's account-scope knowledge. +- `--rel-path` string (required) — Destination path relative to the knowledge root; existing files are overwritten. - response: single object (`data` unwrapped to the top level) — fields: file (object); warnings (array) ### knowledge-get -Get account knowledge pack +Get account knowledge - response: single object (`data` unwrapped to the top level) — fields: files (array); pack (object) ### knowledge-pack-delete -Delete knowledge pack -- `` (positional, required) string — Knowledge pack ID to delete. +Delete knowledge +- `` (positional, required) string — Knowledge ID to delete. - response: single object (`data` unwrapped to the top level) — fields: ok (boolean) ### knowledge-pack-ensure -Ensure knowledge pack -- `--scope` string (required) — Scope of the pack to ensure. One of: 'account' (account-level pack; scope_id is forced to the caller's account ID and only account admins may create it; first creation seeds a default DUTY.md), 'team' (team-level pack; the 'scope_id' team ID is required and the caller must belong to that team). · enum: account | team +Ensure knowledge +- `--scope` string (required) — Scope of the knowledge to ensure. One of: 'account' (account-level knowledge; scope_id is forced to the caller's account ID and only account admins may create it; first creation seeds a default DUTY.md), 'team' (team-level knowledge; the 'scope_id' team ID is required and the caller must belong to that team). · enum: account | team - `--scope-id` int64 — Team ID; required for 'team' scope, ignored for 'account' scope. - response: single object (`data` unwrapped to the top level) — fields: account_id (integer); can_edit (boolean); created_at_ms (string); created_by (integer); duty_version (integer); file_count (integer); pack_id (string); scope (string); scope_id (integer); team_name (string); total_bytes (integer); updated_at_ms (string); version (integer) ### knowledge-pack-list -List knowledge packs -- `--include-account` bool — Include the account-scope pack; defaults to true. +List knowledge +- `--include-account` bool — Include the account-scope knowledge; defaults to true. - `--limit` int64 — Page size. - `--page` int64 — Page number, 1-based; returns all results when both 'p' and 'limit' are unset. -- `--query` string — Case-insensitive substring filter over pack ID, scope, scope ID/account ID, and team name. (≤128 chars) -- `--scope` string — Restrict to one scope; 'all' (default) overrides 'include_account'. One of: 'all' (account scope plus visible team scopes), 'account' (account-level packs only), 'team' (team-level packs only, can be combined with 'team_ids'). · enum: all | account | team +- `--query` string — Case-insensitive substring filter over knowledge ID, scope, scope ID/account ID, and team name. (≤128 chars) +- `--scope` string — Restrict to one scope; 'all' (default) overrides 'include_account'. One of: 'all' (account scope plus visible team scopes), 'account' (account-level knowledge only), 'team' (team-level knowledge only, can be combined with 'team_ids'). · enum: all | account | team - `--search-after-ctx` string - `--team-ids` intSlice — Restrict to these team IDs; for non-admins the list is intersected with their own teams. - response: single object (`data` unwrapped to the top level) — fields: packs (array); total (integer) ### knowledge-pack-update -Update knowledge pack -- `` (positional, required) string — Knowledge pack ID to update. -- `--scope` string — Destination scope; omit for a no-op that returns the current pack. · enum: account | team +Update knowledge +- `` (positional, required) string — Knowledge ID to update. +- `--scope` string — Destination scope; omit for a no-op that returns the current knowledge. · enum: account | team - `--scope-id` int64 — Destination team ID; required when 'scope' is 'team', set automatically for 'account'. - response: same shape as `knowledge-pack-ensure` above @@ -411,6 +411,7 @@ List sessions - `--limit` int64 — Page size, 1–100. (1-100) - `--orderby` string — Sort field: 'created_at' by creation time, 'updated_at' by last update; defaults to 'updated_at' when omitted. · enum: created_at | updated_at - `--page` int64 — Page number, 1-based. (min 1) +- `--person-ids` intSlice — Filter by who started the session: returns only sessions started by these members (a session is kept when 'person_id' matches any of them). Intersects with 'scope' and 'team_ids', so it never widens what the caller is allowed to see. - `--scope` string — Visibility scope: 'all' (own personal + accessible team sessions), 'personal', or 'team'; default 'all'. · enum: all | personal | team - `--search-after-ctx` string - `--status` string — Archive bucket: active (default) returns un-archived, archived returns archived, all returns both. · enum: active | archived | all diff --git a/skills/flashduty/reference/template.md b/skills/flashduty/reference/template.md index 56eefd8..41e440e 100644 --- a/skills/flashduty/reference/template.md +++ b/skills/flashduty/reference/template.md @@ -92,6 +92,7 @@ Create a template - `--description` string — Free-form description. Up to 500 characters. (≤500 chars) - `--dingtalk` string — DingTalk robot message template source. - `--dingtalk-app` string — DingTalk app message template source. +- `--dingtalk-app-war-room-enabled` bool — Show the Create War Room button on DingTalk app cards. - `--email` string — Email body template source (Go 'html/template' syntax). - `--feishu` string — Feishu robot message template source. - `--feishu-app` string — Feishu app message template source. @@ -101,6 +102,7 @@ Create a template - `--incident-card-closed-action-apps` stringSlice — IM apps whose closed-incident cards keep the custom action buttons. Supported values: 'feishu_app', 'dingtalk_app', 'wecom_app', 'slack_app', 'teams_app'. An empty list hides the buttons on every app. · enum: feishu_app | dingtalk_app | wecom_app | slack_app | teams_app - `--slack` string — Slack robot message template source. - `--slack-app` string — Slack app message template source. +- `--slack-app-war-room-enabled` bool — Show the Create War Room button on Slack app cards. - `--sms` string — SMS template source (Go 'text/template' syntax). - `--team-id` int64 — Team scope. 0 for account-wide. - `--teams-app` string — Microsoft Teams app message template source. @@ -125,7 +127,7 @@ List available template functions ### get-preset Get the preset template for a channel - `--channel` string -- response: single object (`data` unwrapped to the top level) — fields: account_id (integer); created_at (string); creator_id (integer); deleted_at (string); description (string); dingtalk (string); dingtalk_app (string); email (string); feishu (string); feishu_app (string); feishu_app_card_v2_preserve_blank_lines (boolean); feishu_app_card_v2_table_enabled (boolean); feishu_app_war_room_enabled (boolean); incident_card_closed_action_apps (array); incident_card_hidden_fields (object); slack (string); slack_app (string); sms (string); status (string); team_id (integer); teams_app (string); telegram (string); template_id (string); template_name (string); updated_at (string); updated_by (integer); voice (string); wecom (string); wecom_app (string); wecom_markdown_v2_enabled (boolean); zoom (string) +- response: single object (`data` unwrapped to the top level) — fields: account_id (integer); created_at (string); creator_id (integer); deleted_at (string); description (string); dingtalk (string); dingtalk_app (string); dingtalk_app_war_room_enabled (boolean); email (string); feishu (string); feishu_app (string); feishu_app_card_v2_preserve_blank_lines (boolean); feishu_app_card_v2_table_enabled (boolean); feishu_app_war_room_enabled (boolean); incident_card_closed_action_apps (array); incident_card_hidden_fields (object); slack (string); slack_app (string); slack_app_war_room_enabled (boolean); sms (string); status (string); team_id (integer); teams_app (string); telegram (string); template_id (string); template_name (string); updated_at (string); updated_by (integer); voice (string); wecom (string); wecom_app (string); wecom_markdown_v2_enabled (boolean); zoom (string) ### info Get template detail @@ -143,7 +145,7 @@ List templates - `--query` string — Regex or substring match on template_name. - `--search-after-ctx` string - `--team-ids` intSlice — Filter by specific team IDs. -- response: `{items: [...], has_next_page, total}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: account_id (integer); created_at (string); creator_id (integer); deleted_at (string); description (string); dingtalk (string); dingtalk_app (string); email (string); feishu (string); feishu_app (string); feishu_app_card_v2_preserve_blank_lines (boolean); feishu_app_card_v2_table_enabled (boolean); feishu_app_war_room_enabled (boolean); incident_card_closed_action_apps (array); incident_card_hidden_fields (object); slack (string); slack_app (string); sms (string); status (string); team_id (integer); teams_app (string); telegram (string); template_id (string); template_name (string); updated_at (string); updated_by (integer); voice (string); wecom (string); wecom_app (string); wecom_markdown_v2_enabled (boolean); zoom (string) +- response: `{items: [...], has_next_page, total}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: account_id (integer); created_at (string); creator_id (integer); deleted_at (string); description (string); dingtalk (string); dingtalk_app (string); dingtalk_app_war_room_enabled (boolean); email (string); feishu (string); feishu_app (string); feishu_app_card_v2_preserve_blank_lines (boolean); feishu_app_card_v2_table_enabled (boolean); feishu_app_war_room_enabled (boolean); incident_card_closed_action_apps (array); incident_card_hidden_fields (object); slack (string); slack_app (string); slack_app_war_room_enabled (boolean); sms (string); status (string); team_id (integer); teams_app (string); telegram (string); template_id (string); template_name (string); updated_at (string); updated_by (integer); voice (string); wecom (string); wecom_app (string); wecom_markdown_v2_enabled (boolean); zoom (string) ### preview Preview template @@ -160,6 +162,7 @@ Update a template - `--description` string — Free-form description. Up to 500 characters. Omit to keep the current content; send an empty string to clear it. (≤500 chars) - `--dingtalk` string — DingTalk robot message template source. Omit to keep the current content; send an empty string to clear it. - `--dingtalk-app` string — DingTalk app message template source. Omit to keep the current content; send an empty string to clear it. +- `--dingtalk-app-war-room-enabled` bool — When set, show or hide the Create War Room button on DingTalk app cards. Omit to keep the existing setting. - `--email` string — Email body template source (Go 'html/template' syntax). Omit to keep the current content; send an empty string to clear it. - `--feishu` string — Feishu robot message template source. Omit to keep the current content; send an empty string to clear it. - `--feishu-app` string — Feishu app message template source. Omit to keep the current content; send an empty string to clear it. @@ -169,6 +172,7 @@ Update a template - `--incident-card-closed-action-apps` stringSlice — Replaces the retained-app list when sent. Supported values: 'feishu_app', 'dingtalk_app', 'wecom_app', 'slack_app', 'teams_app'. Omit the field to leave it unchanged. · enum: feishu_app | dingtalk_app | wecom_app | slack_app | teams_app - `--slack` string — Slack robot message template source. Omit to keep the current content; send an empty string to clear it. - `--slack-app` string — Slack app message template source. Omit to keep the current content; send an empty string to clear it. +- `--slack-app-war-room-enabled` bool — When set, show or hide the Create War Room button on Slack app cards. Omit to keep the existing setting. - `--sms` string — SMS template source (Go 'text/template' syntax). Omit to keep the current content; send an empty string to clear it. - `--team-id` int64 — Team scope. 0 for account-wide. Omit to keep the template's current team. - `--teams-app` string — Microsoft Teams app message template source. Omit to keep the current content; send an empty string to clear it.