From dbf563d62277e856001624806d139a8b382a3fce Mon Sep 17 00:00:00 2001 From: ysyneu Date: Tue, 11 Aug 2026 07:59:35 -0700 Subject: [PATCH] feat(safari): add AI SRE knowledge commands via go-flashduty v0.12.0 Bump go-flashduty to v0.12.0 and regenerate the command tree: the new KnowledgeService surfaces 9 knowledge endpoints as 'flashduty safari knowledge-*' commands (pack list/get/ensure/update/delete, file list/get/put/delete). Regeneration also picks up help-text drift from the current public OpenAPI spec, and gen-cards refreshes the skill reference docs accordingly. --- go.mod | 2 +- go.sum | 4 +- internal/cli/zz_generated_a2a_agents.go | 24 +- internal/cli/zz_generated_alert_enrichment.go | 16 +- internal/cli/zz_generated_alert_rules.go | 372 +++++----- internal/cli/zz_generated_alerts.go | 28 +- internal/cli/zz_generated_applications.go | 76 +-- internal/cli/zz_generated_audit_logs.go | 4 +- internal/cli/zz_generated_automations.go | 32 +- internal/cli/zz_generated_calendars.go | 28 +- internal/cli/zz_generated_changes.go | 4 +- internal/cli/zz_generated_channels.go | 142 ++-- internal/cli/zz_generated_data_sources.go | 40 +- internal/cli/zz_generated_diagnostics.go | 2 +- .../cli/zz_generated_error_ingestion_rules.go | 72 +- internal/cli/zz_generated_facets.go | 4 +- internal/cli/zz_generated_incidents.go | 114 ++-- internal/cli/zz_generated_integrations.go | 20 +- ...z_generated_issue_preset_severity_rules.go | 80 ++- internal/cli/zz_generated_issues.go | 52 +- internal/cli/zz_generated_knowledge.go | 639 ++++++++++++++++++ internal/cli/zz_generated_manifest.go | 9 + internal/cli/zz_generated_mcp_servers.go | 46 +- internal/cli/zz_generated_members.go | 58 +- .../cli/zz_generated_monitor_utilities.go | 2 +- .../zz_generated_notification_templates.go | 14 +- internal/cli/zz_generated_register.go | 1 + internal/cli/zz_generated_response_help.go | 23 +- .../cli/zz_generated_roles_permissions.go | 32 +- internal/cli/zz_generated_rule_sets.go | 8 +- internal/cli/zz_generated_schedules.go | 42 +- internal/cli/zz_generated_session_replay.go | 8 +- internal/cli/zz_generated_sessions.go | 16 +- internal/cli/zz_generated_skills.go | 20 +- internal/cli/zz_generated_sourcemaps.go | 4 +- internal/cli/zz_generated_status_pages.go | 144 ++-- internal/cli/zz_generated_teams.go | 40 +- skills/flashduty/reference/alert.md | 4 +- skills/flashduty/reference/calendar.md | 14 +- skills/flashduty/reference/channel.md | 18 +- skills/flashduty/reference/enrichment.md | 6 +- skills/flashduty/reference/escalation.md | 12 +- skills/flashduty/reference/field.md | 2 +- skills/flashduty/reference/incident.md | 18 +- skills/flashduty/reference/member.md | 26 +- skills/flashduty/reference/monit.md | 126 ++-- skills/flashduty/reference/noise.md | 30 +- skills/flashduty/reference/postmortem.md | 18 +- skills/flashduty/reference/role.md | 16 +- skills/flashduty/reference/rum.md | 132 ++-- skills/flashduty/reference/safari.md | 130 +++- skills/flashduty/reference/schedule.md | 18 +- skills/flashduty/reference/sourcemap.md | 2 +- skills/flashduty/reference/status-page.md | 66 +- skills/flashduty/reference/team.md | 10 +- skills/flashduty/reference/template.md | 4 +- 56 files changed, 1817 insertions(+), 1057 deletions(-) create mode 100644 internal/cli/zz_generated_knowledge.go diff --git a/go.mod b/go.mod index c93d09f..1cf55f0 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/flashcatcloud/flashduty-cli go 1.25.1 require ( - github.com/flashcatcloud/go-flashduty v0.11.0 + github.com/flashcatcloud/go-flashduty v0.12.0 github.com/mattn/go-runewidth v0.0.27 github.com/spf13/cobra v1.10.2 github.com/spf13/pflag v1.0.10 diff --git a/go.sum b/go.sum index cf3a93f..52f735b 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.11.0 h1:LqGFys4JR5xzJtnU2x7cove72R0f6MVjvEYqaiezF7s= -github.com/flashcatcloud/go-flashduty v0.11.0/go.mod h1:aA0RtZEs0AYOwwdNKdtVeD8YMOdnmVY1zAlVD+9Ovx8= +github.com/flashcatcloud/go-flashduty v0.12.0 h1:2jjQsTB212XvwpRcX8W6uQ+Zjzmlu857T7YtTs5nH8Q= +github.com/flashcatcloud/go-flashduty v0.12.0/go.mod h1:aA0RtZEs0AYOwwdNKdtVeD8YMOdnmVY1zAlVD+9Ovx8= 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.27 h1:Feg/Oou5zI/wnpgDF6omIU0OokC9GxLC/WRknhVlIR0= diff --git a/internal/cli/zz_generated_a2a_agents.go b/internal/cli/zz_generated_a2a_agents.go index 1d7a130..9dd42b5 100644 --- a/internal/cli/zz_generated_a2a_agents.go +++ b/internal/cli/zz_generated_a2a_agents.go @@ -21,7 +21,7 @@ Get one A2A agent by ID. API: POST /safari/a2a-agent/get (remote-agent-read-get) Request fields: - --agent-id string (required) — Target agent ID. + --agent-id string (required) — Target agent ID, from the list returned by 'POST /safari/a2a-agent/list'. Response fields ('data' envelope is unwrapped — these fields are at the top level): - account_id (integer) (required) — Owning account ID. @@ -78,7 +78,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fAgentID, "agent-id", "", "Target agent ID. (required)") + cmd.Flags().StringVar(&fAgentID, "agent-id", "", "Target agent ID, from the list returned by 'POST /safari/a2a-agent/list'. (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 } @@ -103,7 +103,7 @@ API: POST /safari/a2a-agent/list (remote-agent-read-list) Request fields: --include-account bool — Include account-scoped (team_id=0) rows. Defaults to true. --limit int — Page size. - --offset int — Row offset for pagination. + --offset int — Pagination offset — number of rows to skip, starting from 0. --query string — Case-insensitive substring search across agent name, instructions, card URL, agent ID, and the resolved card name. (≤128 chars) --scope string — Visibility scope: 'all' (account-scope plus the caller's visible teams), 'account' (account-scope only), or 'team' (team-scoped rows across the caller's visible teams). [all, account, team] --team-ids []int — Filter to these team IDs; empty = the caller's visible set. @@ -178,7 +178,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; } cmd.Flags().BoolVar(&fIncludeAccount, "include-account", false, "Include account-scoped (team_id=0) rows. Defaults to true.") cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size.") - cmd.Flags().Int64Var(&fOffset, "offset", 0, "Row offset for pagination.") + cmd.Flags().Int64Var(&fOffset, "offset", 0, "Pagination offset — number of rows to skip, starting from 0.") cmd.Flags().StringVar(&fQuery, "query", "", "Case-insensitive substring search across agent name, instructions, card URL, agent ID, and the resolved card name. (≤128 chars)") cmd.Flags().StringVar(&fScope, "scope", "", "Visibility scope: 'all' (account-scope plus the caller's visible teams), 'account' (account-scope only), or 'team' (team-scoped rows across the caller's visible teams). [all, account, team]") cmd.Flags().IntSliceVar(&fTeamIDs, "team-ids", nil, "Filter to these team IDs; empty = the caller's visible set.") @@ -319,7 +319,7 @@ Soft-delete an A2A agent by ID. API: POST /safari/a2a-agent/delete (remote-agent-write-delete) Request fields: - --agent-id string (required) — Target agent ID. + --agent-id string (required) — Target agent ID, from the list returned by 'POST /safari/a2a-agent/list'. `, Args: requireBodyFieldOrExactArg("agent_id", "agent-id"), Example: ` flashduty safari a2a-agent-delete --data '{"agent_id":"a2a_6mWqZ2pK9nLcR3tY8uVb4D"}'`, @@ -349,7 +349,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fAgentID, "agent-id", "", "Target agent ID. (required)") + cmd.Flags().StringVar(&fAgentID, "agent-id", "", "Target agent ID, from the list returned by 'POST /safari/a2a-agent/list'. (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 } @@ -367,7 +367,7 @@ Disable an enabled A2A agent. API: POST /safari/a2a-agent/disable (remote-agent-write-disable) Request fields: - --agent-id string (required) — Target agent ID. + --agent-id string (required) — Target agent ID, from the list returned by 'POST /safari/a2a-agent/list'. `, Args: requireBodyFieldOrExactArg("agent_id", "agent-id"), Example: ` flashduty safari a2a-agent-disable --data '{"agent_id":"a2a_6mWqZ2pK9nLcR3tY8uVb4D"}'`, @@ -397,7 +397,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fAgentID, "agent-id", "", "Target agent ID. (required)") + cmd.Flags().StringVar(&fAgentID, "agent-id", "", "Target agent ID, from the list returned by 'POST /safari/a2a-agent/list'. (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 } @@ -415,7 +415,7 @@ Enable a disabled A2A agent. API: POST /safari/a2a-agent/enable (remote-agent-write-enable) Request fields: - --agent-id string (required) — Target agent ID. + --agent-id string (required) — Target agent ID, from the list returned by 'POST /safari/a2a-agent/list'. `, Args: requireBodyFieldOrExactArg("agent_id", "agent-id"), Example: ` flashduty safari a2a-agent-enable --data '{"agent_id":"a2a_6mWqZ2pK9nLcR3tY8uVb4D"}'`, @@ -445,7 +445,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fAgentID, "agent-id", "", "Target agent ID. (required)") + cmd.Flags().StringVar(&fAgentID, "agent-id", "", "Target agent ID, from the list returned by 'POST /safari/a2a-agent/list'. (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 } @@ -476,7 +476,7 @@ Apply a partial update to an A2A agent. Omit a field to leave it unchanged. API: POST /safari/a2a-agent/update (remote-agent-write-update) Request fields: - --agent-id string (required) — Target agent ID. + --agent-id string (required) — Target agent ID, from the list returned by 'POST /safari/a2a-agent/list'. --agent-name string — New display name. Omit to leave unchanged. (≤128 chars) --allow-insecure-oauth-http bool — Toggle non-loopback HTTP OAuth discovery for this agent. Omit to leave unchanged. --allow-insecure-tls-skip-verify bool — Toggle TLS certificate verification skipping for this agent. Omit to leave unchanged. @@ -559,7 +559,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fAgentID, "agent-id", "", "Target agent ID. (required)") + cmd.Flags().StringVar(&fAgentID, "agent-id", "", "Target agent ID, from the list returned by 'POST /safari/a2a-agent/list'. (required)") cmd.Flags().StringVar(&fAgentName, "agent-name", "", "New display name. Omit to leave unchanged. (≤128 chars)") cmd.Flags().BoolVar(&fAllowInsecureOauthHTTP, "allow-insecure-oauth-http", false, "Toggle non-loopback HTTP OAuth discovery for this agent. Omit to leave unchanged.") cmd.Flags().BoolVar(&fAllowInsecureTlsSkipVerify, "allow-insecure-tls-skip-verify", false, "Toggle TLS certificate verification skipping for this agent. Omit to leave unchanged.") diff --git a/internal/cli/zz_generated_alert_enrichment.go b/internal/cli/zz_generated_alert_enrichment.go index d3ee62c..15894e3 100644 --- a/internal/cli/zz_generated_alert_enrichment.go +++ b/internal/cli/zz_generated_alert_enrichment.go @@ -393,7 +393,7 @@ Request fields: --description string — Optional free-text description. (≤499 chars) --display-name string (required) — Human-readable name. Must be unique within the account. (≤39 chars) --field-name string (required) — Machine name. Must start with a letter or underscore; 1–40 chars of '[a-zA-Z0-9_]'. Immutable after creation. (≤39 chars) - --field-type string (required) — Field input type. Immutable after creation. [checkbox, multi_select, single_select, text] + --field-type string (required) — Field type, immutable after creation: 'text', 'single_select', 'multi_select' or 'checkbox'. [checkbox, multi_select, single_select, text] --options []string — Required and non-empty for 'single_select'/'multi_select' (unique strings, each 1–200 chars). Must be omitted or empty for 'checkbox'/'text'. --value-type string (required) — Stored value type. 'checkbox' requires 'bool'; 'single_select'/'multi_select'/'text' require 'string'. Immutable after creation. [string, bool, float] default_value (any, via --data) — Optional default value. Type must match 'field_type': 'bool' for checkbox; one of 'options' for single_select; subset of 'options' for multi_select; string ≤3000 chars for text. @@ -444,7 +444,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().StringVar(&fDescription, "description", "", "Optional free-text description. (≤499 chars)") cmd.Flags().StringVar(&fDisplayName, "display-name", "", "Human-readable name. Must be unique within the account. (required) (≤39 chars)") cmd.Flags().StringVar(&fFieldName, "field-name", "", "Machine name. Must start with a letter or underscore; 1–40 chars of '[a-zA-Z0-9_]'. Immutable after creation. (required) (≤39 chars)") - cmd.Flags().StringVar(&fFieldType, "field-type", "", "Field input type. Immutable after creation. (required) [checkbox, multi_select, single_select, text]") + cmd.Flags().StringVar(&fFieldType, "field-type", "", "Field type, immutable after creation: 'text', 'single_select', 'multi_select' or 'checkbox'. (required) [checkbox, multi_select, single_select, text]") cmd.Flags().StringSliceVar(&fOptions, "options", nil, "Required and non-empty for 'single_select'/'multi_select' (unique strings, each 1–200 chars). Must be omitted or empty for 'checkbox'/'text'.") cmd.Flags().StringVar(&fValueType, "value-type", "", "Stored value type. 'checkbox' requires 'bool'; 'single_select'/'multi_select'/'text' require 'string'. Immutable after creation. (required) [string, bool, float]") 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.") @@ -712,7 +712,7 @@ Request fields: --description string — Optional description. --insecure-skip-verify bool — Skip TLS certificate verification. Default 'false'. --retry-count int — Number of retries on failure (0–1). Default 0. - --team-id int — Owning team ID. + --team-id int — Owning team ID; obtain it from 'POST /team/list'. --timeout int — Request timeout in seconds (1–3). Default 2. --url string (required) — HTTP/HTTPS endpoint URL (max 500 chars). (≤500 chars) headers (object, via --data) — Custom HTTP request headers. @@ -767,7 +767,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().StringVar(&fDescription, "description", "", "Optional description.") cmd.Flags().BoolVar(&fInsecureSkipVerify, "insecure-skip-verify", false, "Skip TLS certificate verification. Default 'false'.") cmd.Flags().Int64Var(&fRetryCount, "retry-count", 0, "Number of retries on failure (0–1). Default 0.") - cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Owning team ID.") + cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Owning team ID; obtain it from 'POST /team/list'.") cmd.Flags().Int64Var(&fTimeout, "timeout", 0, "Request timeout in seconds (1–3). Default 2.") cmd.Flags().StringVar(&fURL, "url", "", "HTTP/HTTPS endpoint URL (max 500 chars). (required) (≤500 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.") @@ -851,7 +851,7 @@ Request fields: --description string — New description. --insecure-skip-verify bool — New TLS skip-verify setting. --retry-count int — New retry count. - --team-id int — New owning team ID. + --team-id int — New owning team ID; obtain it from 'POST /team/list'. --timeout int — New timeout in seconds. --url string — New endpoint URL (max 500 chars). (≤500 chars) headers (object, via --data) — New headers map (replaces existing). @@ -914,7 +914,7 @@ Request fields: cmd.Flags().StringVar(&fDescription, "description", "", "New description.") cmd.Flags().BoolVar(&fInsecureSkipVerify, "insecure-skip-verify", false, "New TLS skip-verify setting.") cmd.Flags().Int64Var(&fRetryCount, "retry-count", 0, "New retry count.") - cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "New owning team ID.") + cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "New owning team ID; obtain it from 'POST /team/list'.") cmd.Flags().Int64Var(&fTimeout, "timeout", 0, "New timeout in seconds.") cmd.Flags().StringVar(&fURL, "url", "", "New endpoint URL (max 500 chars). (≤500 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.") @@ -1183,7 +1183,7 @@ API: POST /enrichment/mapping/data/upload (mapping-data-write-upload) Request fields: --file string — CSV file to upload. - --schema-id string — Mapping schema ID (query parameter). + --schema-id string — Mapping schema ID (passed as a query parameter); obtain it from 'POST /enrichment/mapping/schema/list'. `, Example: ` flashduty enrichment mapping-data-upload --data '{"schema_id":"665f1a2b3c4d5e6f7a8b9c01"}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -1217,7 +1217,7 @@ Request fields: }, } cmd.Flags().StringVar(&fFile, "file", "", "CSV file to upload.") - cmd.Flags().StringVar(&fSchemaID, "schema-id", "", "Mapping schema ID (query parameter).") + cmd.Flags().StringVar(&fSchemaID, "schema-id", "", "Mapping schema ID (passed as a query parameter); obtain it from 'POST /enrichment/mapping/schema/list'.") 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_alert_rules.go b/internal/cli/zz_generated_alert_rules.go index 927389b..ae1c366 100644 --- a/internal/cli/zz_generated_alert_rules.go +++ b/internal/cli/zz_generated_alert_rules.go @@ -75,7 +75,7 @@ Return the change history (audit records) for an alert rule. API: POST /monit/rule/audits (monit-rule-read-audits) Request fields: - --id int (required) — Rule ID. + --id int (required) — Alert rule ID. Obtainable per folder via 'POST /monit/rule/list/basic'. Response fields ('data' is a TOP-LEVEL array of these row objects — pipe 'jq '.[]'', NOT '.items[]'): - account_id (integer) (required) @@ -111,7 +111,7 @@ Response fields ('data' is a TOP-LEVEL array of these row objects — pipe 'jq ' }) }, } - cmd.Flags().Int64Var(&fID, "id", 0, "Rule ID. (required)") + cmd.Flags().Int64Var(&fID, "id", 0, "Alert rule ID. Obtainable per folder via 'POST /monit/rule/list/basic'. (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 } @@ -417,35 +417,35 @@ Return the full configuration of an alert rule by its ID, including rule queries API: POST /monit/rule/info (monit-rule-read-info) Request fields: - --id int (required) — Rule ID. + --id int (required) — Alert rule ID. Obtainable per folder via 'POST /monit/rule/list/basic'. Response fields ('data' envelope is unwrapped — these fields are at the top level): - - account_id (integer) (required) - - annotations (object) + - account_id (integer) (required) — Account ID. Filled by the server from the authenticated identity; do not provide. + - annotations (object) — Annotation key-value pairs delivered with alert events; keys must not start with '$' (reserved for query fields). - channel_ids (array) — Channel IDs to send alerts to. - - created_at (integer) (required) - - creator_id (integer) (required) - - creator_name (string) (required) - - cron_pattern (string) (required) — 5-field cron schedule. Must not start with 'CRON_TZ=' or 'TZ='; use the 'timezone' field instead. - - debug_log_enabled (boolean) (required) - - delay_seconds (integer) (required) - - description (string) + - created_at (integer) (required) — Creation time as a Unix timestamp in seconds. Generated by the server; do not provide. + - creator_id (integer) (required) — Creator user ID. Filled by the server from the current user; do not provide. + - creator_name (string) (required) — Creator name. Filled by the server; do not provide. + - cron_pattern (string) (required) — Schedule expression: a 6-field cron (with seconds) or an '@every 30s' interval descriptor. Must not start with 'CRON_TZ=' or 'TZ='; use the 'timezone' field instead. + - debug_log_enabled (boolean) (required) — Whether to enable debug logging; the edge emits detailed evaluation logs, useful for troubleshooting rules that do not trigger as expected. + - delay_seconds (integer) (required) — Seconds to shift the evaluation query window backward, compensating for data ingestion latency. + - description (string) — Rule description, in Markdown. - description_type (string) — Format for the description. Defaults to 'text' when omitted or empty. [text, markdown] - - ds_ids (array) — Specific data source IDs. + - ds_ids (array) — Datasource IDs, merged with 'ds_list' to decide which datasources the rule monitors; IDs survive datasource renames. At least one of 'ds_list' and 'ds_ids' must be provided. - ds_list (array) — Data source name patterns (supports wildcards). - - ds_type (string) (required) — Data source type. - - enabled (boolean) (required) + - ds_type (string) (required) — Datasource type identifier; allowed values are listed by 'POST /monit/rule/dstypes' (e.g. 'prometheus', 'elasticsearch'). + - enabled (boolean) (required) — Whether the rule is enabled. Updating to 'false' makes the server clean up the rule's active alerts. - enabled_times (array) — Time windows when the rule is active. Defaults to all days from 00:00 to 23:59 when omitted or empty. - days (array) — Days of week (0=Sunday). - etime (string) — End time, e.g. '18:00'. - stime (string) — Start time, e.g. '09:00'. - - folder_id (integer) (required) — Folder the rule belongs to. - - id (integer) (required) + - folder_id (integer) (required) — ID of the folder the rule belongs to. Obtainable via 'POST /monit/folder/list'. + - id (integer) (required) — Rule ID. Required for update; omit for create (assigned by the server). - labels (object) — Custom labels. - - name (string) (required) — Rule name. + - name (string) (required) — Rule name. Must be unique within the same folder. - repeat_interval (integer) — Notification repeat interval in seconds. - repeat_total (integer) — Max number of repeat notifications. - - rule_configs (object) — Rule evaluation configuration. + - rule_configs (object) — Check configuration: query list plus trigger/recovery conditions. Structure see 'RuleConfigs'. - check_anydata (object) — Any-data check configuration. Fires when the query returns any data rows. - alerting_check_times (integer) - enabled (boolean) @@ -485,9 +485,9 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le - expr (string) — Query expression. - name (string) — Relate-query identifier. - timezone (string) — Timezone in which the rule executes. Determines how the cron schedule and effective time windows are interpreted. Only IANA timezone names are accepted (e.g. 'Asia/Shanghai', 'UTC', 'Europe/London'); shortcuts and offsets such as 'Local', 'UTC+8', or 'CST' are rejected. Treated as 'Asia/Shanghai' if empty. - - updated_at (integer) (required) - - updater_id (integer) (required) - - updater_name (string) (required) + - updated_at (integer) (required) — Last update time as a Unix timestamp in seconds. Generated by the server; do not provide. + - updater_id (integer) (required) — Last updater user ID. Filled by the server; do not provide. + - updater_name (string) (required) — Last updater name. Filled by the server; do not provide. `, Example: ` flashduty monit rule-info --data '{"id":50001}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -513,7 +513,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().Int64Var(&fID, "id", 0, "Rule ID. (required)") + cmd.Flags().Int64Var(&fID, "id", 0, "Alert rule ID. Obtainable per folder via 'POST /monit/rule/list/basic'. (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 } @@ -586,7 +586,7 @@ func genAlertRulesWriteCreateCmd() *cobra.Command { var dataJSON string var fAccountID int64 var fChannelIDs []int - var fCreatedAt int64 + var fCreatedAt string var fCreatorID int64 var fCreatorName string var fCronPattern string @@ -604,7 +604,7 @@ func genAlertRulesWriteCreateCmd() *cobra.Command { var fRepeatInterval int64 var fRepeatTotal int64 var fTimezone string - var fUpdatedAt int64 + var fUpdatedAt string var fUpdaterID int64 var fUpdaterName string cmd := &cobra.Command{ @@ -617,36 +617,36 @@ Create a new alert rule. Returns the created rule with its assigned ID. API: POST /monit/rule/create (monit-rule-write-create) Request fields: - --account-id int + --account-id int — Account ID. Filled by the server from the authenticated identity; do not provide. --channel-ids []int — Channel IDs to send alerts to. - --created-at int - --creator-id int - --creator-name string - --cron-pattern string — 5-field cron schedule. Must not start with 'CRON_TZ=' or 'TZ='; use the 'timezone' field instead. - --debug-log-enabled bool - --delay-seconds int - --description string + --created-at string — Creation time as a Unix timestamp in seconds. Generated by the server; do not provide. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. + --creator-id int — Creator user ID. Filled by the server from the current user; do not provide. + --creator-name string — Creator name. Filled by the server; do not provide. + --cron-pattern string — Schedule expression: a 6-field cron (with seconds) or an '@every 30s' interval descriptor. Must not start with 'CRON_TZ=' or 'TZ='; use the 'timezone' field instead. + --debug-log-enabled bool — Whether to enable debug logging; the edge emits detailed evaluation logs, useful for troubleshooting rules that do not trigger as expected. + --delay-seconds int — Seconds to shift the evaluation query window backward, compensating for data ingestion latency. + --description string — Rule description, in Markdown. --description-type string — Format for the description. Defaults to 'text' when omitted or empty. [text, markdown] - --ds-ids []int — Specific data source IDs. + --ds-ids []int — Datasource IDs, merged with 'ds_list' to decide which datasources the rule monitors; IDs survive datasource renames. At least one of 'ds_list' and 'ds_ids' must be provided. --ds-list []string — Data source name patterns (supports wildcards). - --ds-type string — Data source type. - --enabled bool - --folder-id int — Folder the rule belongs to. - --id int - --name string — Rule name. + --ds-type string — Datasource type identifier; allowed values are listed by 'POST /monit/rule/dstypes' (e.g. 'prometheus', 'elasticsearch'). + --enabled bool — Whether the rule is enabled. Updating to 'false' makes the server clean up the rule's active alerts. + --folder-id int — ID of the folder the rule belongs to. Obtainable via 'POST /monit/folder/list'. + --id int — Rule ID. Required for update; omit for create (assigned by the server). + --name string — Rule name. Must be unique within the same folder. --repeat-interval int — Notification repeat interval in seconds. --repeat-total int — Max number of repeat notifications. --timezone string — Timezone in which the rule executes. Determines how the cron schedule and effective time windows are interpreted. Only IANA timezone names are accepted (e.g. 'Asia/Shanghai', 'UTC', 'Europe/London'); shortcuts and offsets such as 'Local', 'UTC+8', or 'CST' are rejected. Treated as 'Asia/Shanghai' if empty. - --updated-at int - --updater-id int - --updater-name string - annotations (object, via --data) + --updated-at string — Last update time as a Unix timestamp in seconds. Generated by the server; do not provide. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. + --updater-id int — Last updater user ID. Filled by the server; do not provide. + --updater-name string — Last updater name. Filled by the server; do not provide. + annotations (object, via --data) — Annotation key-value pairs delivered with alert events; keys must not start with '$' (reserved for query fields). enabled_times (array, via --data) — Time windows when the rule is active. Defaults to all days from 00:00 to 23:59 when omitted or empty. - days (array) — Days of week (0=Sunday). - etime (string) — End time, e.g. '18:00'. - stime (string) — Start time, e.g. '09:00'. labels (object, via --data) — Custom labels. - rule_configs (object, via --data) — Rule evaluation configuration. + rule_configs (object, via --data) — Check configuration: query list plus trigger/recovery conditions. Structure see 'RuleConfigs'. - check_anydata (object) — Any-data check configuration. Fires when the query returns any data rows. - alerting_check_times (integer) - enabled (boolean) @@ -687,32 +687,32 @@ Request fields: - name (string) — Relate-query identifier. Response fields ('data' envelope is unwrapped — these fields are at the top level): - - account_id (integer) - - annotations (object) + - account_id (integer) — Account ID. Filled by the server from the authenticated identity; do not provide. + - annotations (object) — Annotation key-value pairs delivered with alert events; keys must not start with '$' (reserved for query fields). - channel_ids (array) — Channel IDs to send alerts to. - - created_at (integer) - - creator_id (integer) - - creator_name (string) - - cron_pattern (string) — 5-field cron schedule. Must not start with 'CRON_TZ=' or 'TZ='; use the 'timezone' field instead. - - debug_log_enabled (boolean) - - delay_seconds (integer) - - description (string) + - created_at (integer) — Creation time as a Unix timestamp in seconds. Generated by the server; do not provide. + - creator_id (integer) — Creator user ID. Filled by the server from the current user; do not provide. + - creator_name (string) — Creator name. Filled by the server; do not provide. + - cron_pattern (string) — Schedule expression: a 6-field cron (with seconds) or an '@every 30s' interval descriptor. Must not start with 'CRON_TZ=' or 'TZ='; use the 'timezone' field instead. + - debug_log_enabled (boolean) — Whether to enable debug logging; the edge emits detailed evaluation logs, useful for troubleshooting rules that do not trigger as expected. + - delay_seconds (integer) — Seconds to shift the evaluation query window backward, compensating for data ingestion latency. + - description (string) — Rule description, in Markdown. - description_type (string) — Format for the description. Defaults to 'text' when omitted or empty. [text, markdown] - - ds_ids (array) — Specific data source IDs. + - ds_ids (array) — Datasource IDs, merged with 'ds_list' to decide which datasources the rule monitors; IDs survive datasource renames. At least one of 'ds_list' and 'ds_ids' must be provided. - ds_list (array) — Data source name patterns (supports wildcards). - - ds_type (string) — Data source type. - - enabled (boolean) + - ds_type (string) — Datasource type identifier; allowed values are listed by 'POST /monit/rule/dstypes' (e.g. 'prometheus', 'elasticsearch'). + - enabled (boolean) — Whether the rule is enabled. Updating to 'false' makes the server clean up the rule's active alerts. - enabled_times (array) — Time windows when the rule is active. Defaults to all days from 00:00 to 23:59 when omitted or empty. - days (array) — Days of week (0=Sunday). - etime (string) — End time, e.g. '18:00'. - stime (string) — Start time, e.g. '09:00'. - - folder_id (integer) — Folder the rule belongs to. - - id (integer) + - folder_id (integer) — ID of the folder the rule belongs to. Obtainable via 'POST /monit/folder/list'. + - id (integer) — Rule ID. Required for update; omit for create (assigned by the server). - labels (object) — Custom labels. - - name (string) — Rule name. + - name (string) — Rule name. Must be unique within the same folder. - repeat_interval (integer) — Notification repeat interval in seconds. - repeat_total (integer) — Max number of repeat notifications. - - rule_configs (object) — Rule evaluation configuration. + - rule_configs (object) — Check configuration: query list plus trigger/recovery conditions. Structure see 'RuleConfigs'. - check_anydata (object) — Any-data check configuration. Fires when the query returns any data rows. - alerting_check_times (integer) - enabled (boolean) @@ -752,13 +752,21 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le - expr (string) — Query expression. - name (string) — Relate-query identifier. - timezone (string) — Timezone in which the rule executes. Determines how the cron schedule and effective time windows are interpreted. Only IANA timezone names are accepted (e.g. 'Asia/Shanghai', 'UTC', 'Europe/London'); shortcuts and offsets such as 'Local', 'UTC+8', or 'CST' are rejected. Treated as 'Asia/Shanghai' if empty. - - updated_at (integer) - - updater_id (integer) - - updater_name (string) + - updated_at (integer) — Last update time as a Unix timestamp in seconds. Generated by the server; do not provide. + - updater_id (integer) — Last updater user ID. Filled by the server; do not provide. + - updater_name (string) — Last updater name. Filled by the server; do not provide. `, Example: ` flashduty monit rule-create --data '{"channel_ids":[20001],"cron_pattern":"* * * * *","ds_list":["prometheus*"],"ds_type":"prometheus","enabled":true,"folder_id":100,"name":"CPU High","rule_configs":{"check_threshold":{"alerting_check_times":1,"critical":"A","enabled":true,"push_recovery_event":true,"recovery":{"mode":"invert"},"recovery_check_times":1},"queries":[{"expr":"avg(cpu_usage_idle) \u003c 10","name":"A"}]}}'`, RunE: func(cmd *cobra.Command, args []string) error { return runCommand(cmd, args, func(ctx *RunContext) error { + vCreatedAt, okCreatedAt, err := genParseTimeFlag(cmd, "created-at", fCreatedAt) + if err != nil { + return err + } + vUpdatedAt, okUpdatedAt, err := genParseTimeFlag(cmd, "updated-at", fUpdatedAt) + if err != nil { + return err + } body, err := genAssembleBody(dataJSON, func(body map[string]any) error { if cmd.Flags().Changed("account-id") { body["account_id"] = fAccountID @@ -766,8 +774,8 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le if cmd.Flags().Changed("channel-ids") { body["channel_ids"] = fChannelIDs } - if cmd.Flags().Changed("created-at") { - body["created_at"] = fCreatedAt + if okCreatedAt { + body["created_at"] = vCreatedAt } if cmd.Flags().Changed("creator-id") { body["creator_id"] = fCreatorID @@ -820,8 +828,8 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le if cmd.Flags().Changed("timezone") { body["timezone"] = fTimezone } - if cmd.Flags().Changed("updated-at") { - body["updated_at"] = fUpdatedAt + if okUpdatedAt { + body["updated_at"] = vUpdatedAt } if cmd.Flags().Changed("updater-id") { body["updater_id"] = fUpdaterID @@ -846,29 +854,29 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().Int64Var(&fAccountID, "account-id", 0, "Request field account_id") + cmd.Flags().Int64Var(&fAccountID, "account-id", 0, "Account ID. Filled by the server from the authenticated identity; do not provide.") cmd.Flags().IntSliceVar(&fChannelIDs, "channel-ids", nil, "Channel IDs to send alerts to.") - cmd.Flags().Int64Var(&fCreatedAt, "created-at", 0, "Request field created_at") - cmd.Flags().Int64Var(&fCreatorID, "creator-id", 0, "Request field creator_id") - cmd.Flags().StringVar(&fCreatorName, "creator-name", "", "Request field creator_name") - cmd.Flags().StringVar(&fCronPattern, "cron-pattern", "", "5-field cron schedule. Must not start with 'CRON_TZ=' or 'TZ='; use the 'timezone' field instead.") - cmd.Flags().BoolVar(&fDebugLogEnabled, "debug-log-enabled", false, "Request field debug_log_enabled") - cmd.Flags().Int64Var(&fDelaySeconds, "delay-seconds", 0, "Request field delay_seconds") - cmd.Flags().StringVar(&fDescription, "description", "", "Request field description") + cmd.Flags().StringVar(&fCreatedAt, "created-at", "", "Creation time as a Unix timestamp in seconds. Generated by the server; do not provide. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") + cmd.Flags().Int64Var(&fCreatorID, "creator-id", 0, "Creator user ID. Filled by the server from the current user; do not provide.") + cmd.Flags().StringVar(&fCreatorName, "creator-name", "", "Creator name. Filled by the server; do not provide.") + cmd.Flags().StringVar(&fCronPattern, "cron-pattern", "", "Schedule expression: a 6-field cron (with seconds) or an '@every 30s' interval descriptor. Must not start with 'CRON_TZ=' or 'TZ='; use the 'timezone' field instead.") + cmd.Flags().BoolVar(&fDebugLogEnabled, "debug-log-enabled", false, "Whether to enable debug logging; the edge emits detailed evaluation logs, useful for troubleshooting rules that do not trigger as expected.") + cmd.Flags().Int64Var(&fDelaySeconds, "delay-seconds", 0, "Seconds to shift the evaluation query window backward, compensating for data ingestion latency.") + cmd.Flags().StringVar(&fDescription, "description", "", "Rule description, in Markdown.") cmd.Flags().StringVar(&fDescriptionType, "description-type", "", "Format for the description. Defaults to 'text' when omitted or empty. [text, markdown]") - cmd.Flags().IntSliceVar(&fDsIDs, "ds-ids", nil, "Specific data source IDs.") + cmd.Flags().IntSliceVar(&fDsIDs, "ds-ids", nil, "Datasource IDs, merged with 'ds_list' to decide which datasources the rule monitors; IDs survive datasource renames. At least one of 'ds_list' and 'ds_ids' must be provided.") cmd.Flags().StringSliceVar(&fDsList, "ds-list", nil, "Data source name patterns (supports wildcards).") - cmd.Flags().StringVar(&fDsType, "ds-type", "", "Data source type.") - cmd.Flags().BoolVar(&fEnabled, "enabled", false, "Request field enabled") - cmd.Flags().Int64Var(&fFolderID, "folder-id", 0, "Folder the rule belongs to.") - cmd.Flags().Int64Var(&fID, "id", 0, "Request field id") - cmd.Flags().StringVar(&fName, "name", "", "Rule name.") + cmd.Flags().StringVar(&fDsType, "ds-type", "", "Datasource type identifier; allowed values are listed by 'POST /monit/rule/dstypes' (e.g. 'prometheus', 'elasticsearch').") + cmd.Flags().BoolVar(&fEnabled, "enabled", false, "Whether the rule is enabled. Updating to 'false' makes the server clean up the rule's active alerts.") + cmd.Flags().Int64Var(&fFolderID, "folder-id", 0, "ID of the folder the rule belongs to. Obtainable via 'POST /monit/folder/list'.") + cmd.Flags().Int64Var(&fID, "id", 0, "Rule ID. Required for update; omit for create (assigned by the server).") + cmd.Flags().StringVar(&fName, "name", "", "Rule name. Must be unique within the same folder.") cmd.Flags().Int64Var(&fRepeatInterval, "repeat-interval", 0, "Notification repeat interval in seconds.") cmd.Flags().Int64Var(&fRepeatTotal, "repeat-total", 0, "Max number of repeat notifications.") cmd.Flags().StringVar(&fTimezone, "timezone", "", "Timezone in which the rule executes. Determines how the cron schedule and effective time windows are interpreted. Only IANA timezone names are accepted (e.g. 'Asia/Shanghai', 'UTC', 'Europe/London'); shortcuts and offsets such as 'Local', 'UTC+8', or 'CST' are rejected. Treated as 'Asia/Shanghai' if empty.") - cmd.Flags().Int64Var(&fUpdatedAt, "updated-at", 0, "Request field updated_at") - cmd.Flags().Int64Var(&fUpdaterID, "updater-id", 0, "Request field updater_id") - cmd.Flags().StringVar(&fUpdaterName, "updater-name", "", "Request field updater_name") + cmd.Flags().StringVar(&fUpdatedAt, "updated-at", "", "Last update time as a Unix timestamp in seconds. Generated by the server; do not provide. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") + cmd.Flags().Int64Var(&fUpdaterID, "updater-id", 0, "Last updater user ID. Filled by the server; do not provide.") + cmd.Flags().StringVar(&fUpdaterName, "updater-name", "", "Last updater name. Filled by the server; do not provide.") 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 } @@ -886,7 +894,7 @@ Delete a single alert rule by its ID. API: POST /monit/rule/delete (monit-rule-write-delete) Request fields: - --id int (required) — Rule ID. + --id int (required) — Alert rule ID. Obtainable per folder via 'POST /monit/rule/list/basic'. `, Example: ` flashduty monit rule-delete --data '{"id":50001}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -916,7 +924,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fID, "id", 0, "Rule ID. (required)") + cmd.Flags().Int64Var(&fID, "id", 0, "Alert rule ID. Obtainable per folder via 'POST /monit/rule/list/basic'. (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 } @@ -995,26 +1003,26 @@ Update specific fields across multiple alert rules at once. Only the fields list API: POST /monit/rule/update/fields (monit-rule-write-fields-update) Request fields: - --channel-ids []int - --cron-pattern string - --debug-log-enabled bool - --delay-seconds int - --description string - --ds-ids []int - --ds-list []string - --ds-type string - --enabled bool - --fields []string (required) — Field names to update. + --channel-ids []int — IDs of the collaboration spaces alerts are sent to; may be empty. Effective only when 'fields' includes 'channel_ids'. + --cron-pattern string — Schedule expression: a 6-field cron (with seconds) or an '@every 30s' interval descriptor; 'CRON_TZ='/'TZ=' prefixes are not allowed. Effective only when 'fields' includes 'cron_pattern'. + --debug-log-enabled bool — Whether to enable debug logging; the edge emits detailed evaluation logs for troubleshooting. Effective only when 'fields' includes 'debug_log_enabled'. + --delay-seconds int — Seconds to shift the evaluation query window backward, compensating for data ingestion latency. Effective only when 'fields' includes 'delay_seconds'. + --description string — Rule description (Markdown). Effective only when 'fields' includes 'description'. + --ds-ids []int — Datasource IDs, merged with 'ds_list' to decide which datasources the rule monitors; IDs survive datasource renames. Effective only when 'fields' includes 'ds_ids'. + --ds-list []string — Datasource name match patterns; wildcards supported. Effective only when 'fields' includes 'ds_list'. + --ds-type string — Datasource type identifier; allowed values are listed by 'POST /monit/rule/dstypes'. Effective only when 'fields' includes 'ds_type'. + --enabled bool — Whether the rule is enabled. Setting it to 'false' makes the server clean up the rule's active alerts. Effective only when 'fields' includes 'enabled'. + --fields []string (required) — Field names to update. Only listed fields are updated, taking new values from the same-named request fields; values for unlisted fields are silently ignored. [labels, ds_type, ds_list, ds_ids, enabled, debug_log_enabled, cron_pattern, timezone, delay_seconds, enabled_times, annotations, description, channel_ids, repeat_interval, repeat_total] --ids []int (required) — Rule IDs to update. - --repeat-interval int - --repeat-total int + --repeat-interval int — Interval in seconds between repeated alert notifications. Effective only when 'fields' includes 'repeat_interval'. + --repeat-total int — Maximum number of repeated notifications. Effective only when 'fields' includes 'repeat_total'. --timezone string — Timezone in which the rule executes. IANA timezone name; defaults to 'Asia/Shanghai'. - annotations (object, via --data) - enabled_times (array, via --data) + annotations (object, via --data) — Annotation key-value pairs delivered with alert events; keys must not start with '$' (reserved for query fields). Effective only when 'fields' includes 'annotations'. + enabled_times (array, via --data) — Time windows during which the rule is in effect; element structure see 'EnabledTime'. Effective only when 'fields' includes 'enabled_times'. - days (array) — Days of week, 0 = Sunday. - etime (string) — End time, e.g. '18:00'. - stime (string) — Start time, e.g. '09:00'. - labels (object, via --data) + labels (object, via --data) — Custom label key-value pairs; replaces existing labels as a whole. Effective only when 'fields' includes 'labels'. Response fields ('data' is a TOP-LEVEL array of these row objects — pipe 'jq '.[]'', NOT '.items[]'): - message (string) (required) — Empty on success, error message on failure. @@ -1083,19 +1091,19 @@ Response fields ('data' is a TOP-LEVEL array of these row objects — pipe 'jq ' }) }, } - cmd.Flags().IntSliceVar(&fChannelIDs, "channel-ids", nil, "Request field channel_ids") - cmd.Flags().StringVar(&fCronPattern, "cron-pattern", "", "Request field cron_pattern") - cmd.Flags().BoolVar(&fDebugLogEnabled, "debug-log-enabled", false, "Request field debug_log_enabled") - cmd.Flags().Int64Var(&fDelaySeconds, "delay-seconds", 0, "Request field delay_seconds") - cmd.Flags().StringVar(&fDescription, "description", "", "Request field description") - cmd.Flags().IntSliceVar(&fDsIDs, "ds-ids", nil, "Request field ds_ids") - cmd.Flags().StringSliceVar(&fDsList, "ds-list", nil, "Request field ds_list") - cmd.Flags().StringVar(&fDsType, "ds-type", "", "Request field ds_type") - cmd.Flags().BoolVar(&fEnabled, "enabled", false, "Request field enabled") - cmd.Flags().StringSliceVar(&fFields, "fields", nil, "Field names to update. (required)") + cmd.Flags().IntSliceVar(&fChannelIDs, "channel-ids", nil, "IDs of the collaboration spaces alerts are sent to; may be empty. Effective only when 'fields' includes 'channel_ids'.") + cmd.Flags().StringVar(&fCronPattern, "cron-pattern", "", "Schedule expression: a 6-field cron (with seconds) or an '@every 30s' interval descriptor; 'CRON_TZ='/'TZ=' prefixes are not allowed. Effective only when 'fields' includes 'cron_pattern'.") + cmd.Flags().BoolVar(&fDebugLogEnabled, "debug-log-enabled", false, "Whether to enable debug logging; the edge emits detailed evaluation logs for troubleshooting. Effective only when 'fields' includes 'debug_log_enabled'.") + cmd.Flags().Int64Var(&fDelaySeconds, "delay-seconds", 0, "Seconds to shift the evaluation query window backward, compensating for data ingestion latency. Effective only when 'fields' includes 'delay_seconds'.") + cmd.Flags().StringVar(&fDescription, "description", "", "Rule description (Markdown). Effective only when 'fields' includes 'description'.") + cmd.Flags().IntSliceVar(&fDsIDs, "ds-ids", nil, "Datasource IDs, merged with 'ds_list' to decide which datasources the rule monitors; IDs survive datasource renames. Effective only when 'fields' includes 'ds_ids'.") + cmd.Flags().StringSliceVar(&fDsList, "ds-list", nil, "Datasource name match patterns; wildcards supported. Effective only when 'fields' includes 'ds_list'.") + cmd.Flags().StringVar(&fDsType, "ds-type", "", "Datasource type identifier; allowed values are listed by 'POST /monit/rule/dstypes'. Effective only when 'fields' includes 'ds_type'.") + cmd.Flags().BoolVar(&fEnabled, "enabled", false, "Whether the rule is enabled. Setting it to 'false' makes the server clean up the rule's active alerts. Effective only when 'fields' includes 'enabled'.") + cmd.Flags().StringSliceVar(&fFields, "fields", nil, "Field names to update. Only listed fields are updated, taking new values from the same-named request fields; values for unlisted fields are silently ignored. (required) [labels, ds_type, ds_list, ds_ids, enabled, debug_log_enabled, cron_pattern, timezone, delay_seconds, enabled_times, annotations, description, channel_ids, repeat_interval, repeat_total]") cmd.Flags().IntSliceVar(&fIDs, "ids", nil, "Rule IDs to update. (required)") - cmd.Flags().Int64Var(&fRepeatInterval, "repeat-interval", 0, "Request field repeat_interval") - cmd.Flags().Int64Var(&fRepeatTotal, "repeat-total", 0, "Request field repeat_total") + cmd.Flags().Int64Var(&fRepeatInterval, "repeat-interval", 0, "Interval in seconds between repeated alert notifications. Effective only when 'fields' includes 'repeat_interval'.") + cmd.Flags().Int64Var(&fRepeatTotal, "repeat-total", 0, "Maximum number of repeated notifications. Effective only when 'fields' includes 'repeat_total'.") cmd.Flags().StringVar(&fTimezone, "timezone", "", "Timezone in which the rule executes. IANA timezone name; defaults to 'Asia/Shanghai'.") 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 @@ -1155,7 +1163,7 @@ Move one or more alert rules to a different folder. API: POST /monit/rule/move (monit-rule-write-move) Request fields: - --dest-folder-id int (required) — Destination folder ID. + --dest-folder-id int (required) — Destination folder ID. Obtainable via 'POST /monit/folder/list'. --ids []int (required) — Rule IDs to move. Response fields ('data' is a TOP-LEVEL array of these row objects — pipe 'jq '.[]'', NOT '.items[]'): @@ -1189,7 +1197,7 @@ Response fields ('data' is a TOP-LEVEL array of these row objects — pipe 'jq ' }) }, } - cmd.Flags().Int64Var(&fDestFolderID, "dest-folder-id", 0, "Destination folder ID. (required)") + cmd.Flags().Int64Var(&fDestFolderID, "dest-folder-id", 0, "Destination folder ID. Obtainable via 'POST /monit/folder/list'. (required)") cmd.Flags().IntSliceVar(&fIDs, "ids", nil, "Rule IDs to move. (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 @@ -1208,7 +1216,7 @@ Return the rule trigger summary for all rules under a folder node and its descen API: POST /monit/rule/status (monit-rule-write-status) Request fields: - --folder-id int — Folder ID. 0 for all. + --folder-id int — Folder ID to summarize. Obtainable via 'POST /monit/folder/list'. Trigger statistics are returned grouped by direct child folder. Response fields ('data' is a TOP-LEVEL array of these row objects — pipe 'jq '.[]'', NOT '.items[]'): - folder_id (integer) (required) @@ -1240,7 +1248,7 @@ Response fields ('data' is a TOP-LEVEL array of these row objects — pipe 'jq ' }) }, } - cmd.Flags().Int64Var(&fFolderID, "folder-id", 0, "Folder ID. 0 for all.") + cmd.Flags().Int64Var(&fFolderID, "folder-id", 0, "Folder ID to summarize. Obtainable via 'POST /monit/folder/list'. Trigger statistics are returned grouped by direct child folder.") 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 } @@ -1249,7 +1257,7 @@ func genAlertRulesWriteUpdateCmd() *cobra.Command { var dataJSON string var fAccountID int64 var fChannelIDs []int - var fCreatedAt int64 + var fCreatedAt string var fCreatorID int64 var fCreatorName string var fCronPattern string @@ -1267,7 +1275,7 @@ func genAlertRulesWriteUpdateCmd() *cobra.Command { var fRepeatInterval int64 var fRepeatTotal int64 var fTimezone string - var fUpdatedAt int64 + var fUpdatedAt string var fUpdaterID int64 var fUpdaterName string cmd := &cobra.Command{ @@ -1280,36 +1288,36 @@ Replace the full configuration of an existing alert rule. All fields are overwri API: POST /monit/rule/update (monit-rule-write-update) Request fields: - --account-id int + --account-id int — Account ID. Filled by the server from the authenticated identity; do not provide. --channel-ids []int — Channel IDs to send alerts to. - --created-at int - --creator-id int - --creator-name string - --cron-pattern string — 5-field cron schedule. Must not start with 'CRON_TZ=' or 'TZ='; use the 'timezone' field instead. - --debug-log-enabled bool - --delay-seconds int - --description string + --created-at string — Creation time as a Unix timestamp in seconds. Generated by the server; do not provide. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. + --creator-id int — Creator user ID. Filled by the server from the current user; do not provide. + --creator-name string — Creator name. Filled by the server; do not provide. + --cron-pattern string — Schedule expression: a 6-field cron (with seconds) or an '@every 30s' interval descriptor. Must not start with 'CRON_TZ=' or 'TZ='; use the 'timezone' field instead. + --debug-log-enabled bool — Whether to enable debug logging; the edge emits detailed evaluation logs, useful for troubleshooting rules that do not trigger as expected. + --delay-seconds int — Seconds to shift the evaluation query window backward, compensating for data ingestion latency. + --description string — Rule description, in Markdown. --description-type string — Format for the description. Defaults to 'text' when omitted or empty. [text, markdown] - --ds-ids []int — Specific data source IDs. + --ds-ids []int — Datasource IDs, merged with 'ds_list' to decide which datasources the rule monitors; IDs survive datasource renames. At least one of 'ds_list' and 'ds_ids' must be provided. --ds-list []string — Data source name patterns (supports wildcards). - --ds-type string — Data source type. - --enabled bool - --folder-id int — Folder the rule belongs to. - --id int - --name string — Rule name. + --ds-type string — Datasource type identifier; allowed values are listed by 'POST /monit/rule/dstypes' (e.g. 'prometheus', 'elasticsearch'). + --enabled bool — Whether the rule is enabled. Updating to 'false' makes the server clean up the rule's active alerts. + --folder-id int — ID of the folder the rule belongs to. Obtainable via 'POST /monit/folder/list'. + --id int — Rule ID. Required for update; omit for create (assigned by the server). + --name string — Rule name. Must be unique within the same folder. --repeat-interval int — Notification repeat interval in seconds. --repeat-total int — Max number of repeat notifications. --timezone string — Timezone in which the rule executes. Determines how the cron schedule and effective time windows are interpreted. Only IANA timezone names are accepted (e.g. 'Asia/Shanghai', 'UTC', 'Europe/London'); shortcuts and offsets such as 'Local', 'UTC+8', or 'CST' are rejected. Treated as 'Asia/Shanghai' if empty. - --updated-at int - --updater-id int - --updater-name string - annotations (object, via --data) + --updated-at string — Last update time as a Unix timestamp in seconds. Generated by the server; do not provide. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. + --updater-id int — Last updater user ID. Filled by the server; do not provide. + --updater-name string — Last updater name. Filled by the server; do not provide. + annotations (object, via --data) — Annotation key-value pairs delivered with alert events; keys must not start with '$' (reserved for query fields). enabled_times (array, via --data) — Time windows when the rule is active. Defaults to all days from 00:00 to 23:59 when omitted or empty. - days (array) — Days of week (0=Sunday). - etime (string) — End time, e.g. '18:00'. - stime (string) — Start time, e.g. '09:00'. labels (object, via --data) — Custom labels. - rule_configs (object, via --data) — Rule evaluation configuration. + rule_configs (object, via --data) — Check configuration: query list plus trigger/recovery conditions. Structure see 'RuleConfigs'. - check_anydata (object) — Any-data check configuration. Fires when the query returns any data rows. - alerting_check_times (integer) - enabled (boolean) @@ -1350,32 +1358,32 @@ Request fields: - name (string) — Relate-query identifier. Response fields ('data' envelope is unwrapped — these fields are at the top level): - - account_id (integer) - - annotations (object) + - account_id (integer) — Account ID. Filled by the server from the authenticated identity; do not provide. + - annotations (object) — Annotation key-value pairs delivered with alert events; keys must not start with '$' (reserved for query fields). - channel_ids (array) — Channel IDs to send alerts to. - - created_at (integer) - - creator_id (integer) - - creator_name (string) - - cron_pattern (string) — 5-field cron schedule. Must not start with 'CRON_TZ=' or 'TZ='; use the 'timezone' field instead. - - debug_log_enabled (boolean) - - delay_seconds (integer) - - description (string) + - created_at (integer) — Creation time as a Unix timestamp in seconds. Generated by the server; do not provide. + - creator_id (integer) — Creator user ID. Filled by the server from the current user; do not provide. + - creator_name (string) — Creator name. Filled by the server; do not provide. + - cron_pattern (string) — Schedule expression: a 6-field cron (with seconds) or an '@every 30s' interval descriptor. Must not start with 'CRON_TZ=' or 'TZ='; use the 'timezone' field instead. + - debug_log_enabled (boolean) — Whether to enable debug logging; the edge emits detailed evaluation logs, useful for troubleshooting rules that do not trigger as expected. + - delay_seconds (integer) — Seconds to shift the evaluation query window backward, compensating for data ingestion latency. + - description (string) — Rule description, in Markdown. - description_type (string) — Format for the description. Defaults to 'text' when omitted or empty. [text, markdown] - - ds_ids (array) — Specific data source IDs. + - ds_ids (array) — Datasource IDs, merged with 'ds_list' to decide which datasources the rule monitors; IDs survive datasource renames. At least one of 'ds_list' and 'ds_ids' must be provided. - ds_list (array) — Data source name patterns (supports wildcards). - - ds_type (string) — Data source type. - - enabled (boolean) + - ds_type (string) — Datasource type identifier; allowed values are listed by 'POST /monit/rule/dstypes' (e.g. 'prometheus', 'elasticsearch'). + - enabled (boolean) — Whether the rule is enabled. Updating to 'false' makes the server clean up the rule's active alerts. - enabled_times (array) — Time windows when the rule is active. Defaults to all days from 00:00 to 23:59 when omitted or empty. - days (array) — Days of week (0=Sunday). - etime (string) — End time, e.g. '18:00'. - stime (string) — Start time, e.g. '09:00'. - - folder_id (integer) — Folder the rule belongs to. - - id (integer) + - folder_id (integer) — ID of the folder the rule belongs to. Obtainable via 'POST /monit/folder/list'. + - id (integer) — Rule ID. Required for update; omit for create (assigned by the server). - labels (object) — Custom labels. - - name (string) — Rule name. + - name (string) — Rule name. Must be unique within the same folder. - repeat_interval (integer) — Notification repeat interval in seconds. - repeat_total (integer) — Max number of repeat notifications. - - rule_configs (object) — Rule evaluation configuration. + - rule_configs (object) — Check configuration: query list plus trigger/recovery conditions. Structure see 'RuleConfigs'. - check_anydata (object) — Any-data check configuration. Fires when the query returns any data rows. - alerting_check_times (integer) - enabled (boolean) @@ -1415,13 +1423,21 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le - expr (string) — Query expression. - name (string) — Relate-query identifier. - timezone (string) — Timezone in which the rule executes. Determines how the cron schedule and effective time windows are interpreted. Only IANA timezone names are accepted (e.g. 'Asia/Shanghai', 'UTC', 'Europe/London'); shortcuts and offsets such as 'Local', 'UTC+8', or 'CST' are rejected. Treated as 'Asia/Shanghai' if empty. - - updated_at (integer) - - updater_id (integer) - - updater_name (string) + - updated_at (integer) — Last update time as a Unix timestamp in seconds. Generated by the server; do not provide. + - updater_id (integer) — Last updater user ID. Filled by the server; do not provide. + - updater_name (string) — Last updater name. Filled by the server; do not provide. `, Example: ` flashduty monit rule-update --data '{"cron_pattern":"* * * * *","ds_list":["prometheus*"],"ds_type":"prometheus","enabled":true,"folder_id":100,"id":50001,"name":"CPU High v2","rule_configs":{"queries":[{"expr":"avg(cpu_usage_idle) \u003c 5","name":"A"}]}}'`, RunE: func(cmd *cobra.Command, args []string) error { return runCommand(cmd, args, func(ctx *RunContext) error { + vCreatedAt, okCreatedAt, err := genParseTimeFlag(cmd, "created-at", fCreatedAt) + if err != nil { + return err + } + vUpdatedAt, okUpdatedAt, err := genParseTimeFlag(cmd, "updated-at", fUpdatedAt) + if err != nil { + return err + } body, err := genAssembleBody(dataJSON, func(body map[string]any) error { if cmd.Flags().Changed("account-id") { body["account_id"] = fAccountID @@ -1429,8 +1445,8 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le if cmd.Flags().Changed("channel-ids") { body["channel_ids"] = fChannelIDs } - if cmd.Flags().Changed("created-at") { - body["created_at"] = fCreatedAt + if okCreatedAt { + body["created_at"] = vCreatedAt } if cmd.Flags().Changed("creator-id") { body["creator_id"] = fCreatorID @@ -1483,8 +1499,8 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le if cmd.Flags().Changed("timezone") { body["timezone"] = fTimezone } - if cmd.Flags().Changed("updated-at") { - body["updated_at"] = fUpdatedAt + if okUpdatedAt { + body["updated_at"] = vUpdatedAt } if cmd.Flags().Changed("updater-id") { body["updater_id"] = fUpdaterID @@ -1509,29 +1525,29 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().Int64Var(&fAccountID, "account-id", 0, "Request field account_id") + cmd.Flags().Int64Var(&fAccountID, "account-id", 0, "Account ID. Filled by the server from the authenticated identity; do not provide.") cmd.Flags().IntSliceVar(&fChannelIDs, "channel-ids", nil, "Channel IDs to send alerts to.") - cmd.Flags().Int64Var(&fCreatedAt, "created-at", 0, "Request field created_at") - cmd.Flags().Int64Var(&fCreatorID, "creator-id", 0, "Request field creator_id") - cmd.Flags().StringVar(&fCreatorName, "creator-name", "", "Request field creator_name") - cmd.Flags().StringVar(&fCronPattern, "cron-pattern", "", "5-field cron schedule. Must not start with 'CRON_TZ=' or 'TZ='; use the 'timezone' field instead.") - cmd.Flags().BoolVar(&fDebugLogEnabled, "debug-log-enabled", false, "Request field debug_log_enabled") - cmd.Flags().Int64Var(&fDelaySeconds, "delay-seconds", 0, "Request field delay_seconds") - cmd.Flags().StringVar(&fDescription, "description", "", "Request field description") + cmd.Flags().StringVar(&fCreatedAt, "created-at", "", "Creation time as a Unix timestamp in seconds. Generated by the server; do not provide. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") + cmd.Flags().Int64Var(&fCreatorID, "creator-id", 0, "Creator user ID. Filled by the server from the current user; do not provide.") + cmd.Flags().StringVar(&fCreatorName, "creator-name", "", "Creator name. Filled by the server; do not provide.") + cmd.Flags().StringVar(&fCronPattern, "cron-pattern", "", "Schedule expression: a 6-field cron (with seconds) or an '@every 30s' interval descriptor. Must not start with 'CRON_TZ=' or 'TZ='; use the 'timezone' field instead.") + cmd.Flags().BoolVar(&fDebugLogEnabled, "debug-log-enabled", false, "Whether to enable debug logging; the edge emits detailed evaluation logs, useful for troubleshooting rules that do not trigger as expected.") + cmd.Flags().Int64Var(&fDelaySeconds, "delay-seconds", 0, "Seconds to shift the evaluation query window backward, compensating for data ingestion latency.") + cmd.Flags().StringVar(&fDescription, "description", "", "Rule description, in Markdown.") cmd.Flags().StringVar(&fDescriptionType, "description-type", "", "Format for the description. Defaults to 'text' when omitted or empty. [text, markdown]") - cmd.Flags().IntSliceVar(&fDsIDs, "ds-ids", nil, "Specific data source IDs.") + cmd.Flags().IntSliceVar(&fDsIDs, "ds-ids", nil, "Datasource IDs, merged with 'ds_list' to decide which datasources the rule monitors; IDs survive datasource renames. At least one of 'ds_list' and 'ds_ids' must be provided.") cmd.Flags().StringSliceVar(&fDsList, "ds-list", nil, "Data source name patterns (supports wildcards).") - cmd.Flags().StringVar(&fDsType, "ds-type", "", "Data source type.") - cmd.Flags().BoolVar(&fEnabled, "enabled", false, "Request field enabled") - cmd.Flags().Int64Var(&fFolderID, "folder-id", 0, "Folder the rule belongs to.") - cmd.Flags().Int64Var(&fID, "id", 0, "Request field id") - cmd.Flags().StringVar(&fName, "name", "", "Rule name.") + cmd.Flags().StringVar(&fDsType, "ds-type", "", "Datasource type identifier; allowed values are listed by 'POST /monit/rule/dstypes' (e.g. 'prometheus', 'elasticsearch').") + cmd.Flags().BoolVar(&fEnabled, "enabled", false, "Whether the rule is enabled. Updating to 'false' makes the server clean up the rule's active alerts.") + cmd.Flags().Int64Var(&fFolderID, "folder-id", 0, "ID of the folder the rule belongs to. Obtainable via 'POST /monit/folder/list'.") + cmd.Flags().Int64Var(&fID, "id", 0, "Rule ID. Required for update; omit for create (assigned by the server).") + cmd.Flags().StringVar(&fName, "name", "", "Rule name. Must be unique within the same folder.") cmd.Flags().Int64Var(&fRepeatInterval, "repeat-interval", 0, "Notification repeat interval in seconds.") cmd.Flags().Int64Var(&fRepeatTotal, "repeat-total", 0, "Max number of repeat notifications.") cmd.Flags().StringVar(&fTimezone, "timezone", "", "Timezone in which the rule executes. Determines how the cron schedule and effective time windows are interpreted. Only IANA timezone names are accepted (e.g. 'Asia/Shanghai', 'UTC', 'Europe/London'); shortcuts and offsets such as 'Local', 'UTC+8', or 'CST' are rejected. Treated as 'Asia/Shanghai' if empty.") - cmd.Flags().Int64Var(&fUpdatedAt, "updated-at", 0, "Request field updated_at") - cmd.Flags().Int64Var(&fUpdaterID, "updater-id", 0, "Request field updater_id") - cmd.Flags().StringVar(&fUpdaterName, "updater-name", "", "Request field updater_name") + cmd.Flags().StringVar(&fUpdatedAt, "updated-at", "", "Last update time as a Unix timestamp in seconds. Generated by the server; do not provide. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") + cmd.Flags().Int64Var(&fUpdaterID, "updater-id", 0, "Last updater user ID. Filled by the server; do not provide.") + cmd.Flags().StringVar(&fUpdaterName, "updater-name", "", "Last updater name. Filled by the server; do not provide.") 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_alerts.go b/internal/cli/zz_generated_alerts.go index 4eb3fd0..ec97f2b 100644 --- a/internal/cli/zz_generated_alerts.go +++ b/internal/cli/zz_generated_alerts.go @@ -35,13 +35,13 @@ API: POST /alert-event/list (alert-event-read-list) Request fields: --page int — Page number, starting at 1. Used when 'search_after_ctx' is not provided. --limit int — Page size, max 100, default 20. - --search-after-ctx string — Opaque cursor for the next page. + --search-after-ctx string — Pagination cursor: leave empty for the first page, then pass the 'search_after_ctx' returned by the previous response. --asc bool — Sort ascending when 'true'. --channel-ids []int — Filter by channel IDs. Max 100. --end-time string — End of search window, Unix epoch seconds. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. --integration-ids []int — Filter by integration IDs. --integration-types []string — Filter by integration types (plugin keys). - --orderby string — Sort field (ES field name). [event_time] + --orderby string — Sort field; only 'event_time' is supported. [event_time] --severities string — Comma-separated severity filter, e.g. 'Critical,Warning'. --start-time string — Start of search window, Unix epoch seconds. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. @@ -137,14 +137,14 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; } cmd.Flags().Int64Var(&fP, "page", 0, "Page number, starting at 1. Used when 'search_after_ctx' is not provided.") cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size, max 100, default 20.") - cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Opaque cursor for the next page.") + cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Pagination cursor: leave empty for the first page, then pass the 'search_after_ctx' returned by the previous response.") cmd.Flags().BoolVar(&fAsc, "asc", false, "Sort ascending when 'true'.") cmd.Flags().IntSliceVar(&fChannelIDs, "channel-ids", nil, "Filter by channel IDs. Max 100.") cmd.Flags().StringVar(&fEndTime, "end-time", "", "End of search window, Unix epoch seconds. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. (alias: --until)") cmd.Flags().StringVar(&fUntil, "until", "", "Alias for --end-time. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") cmd.Flags().IntSliceVar(&fIntegrationIDs, "integration-ids", nil, "Filter by integration IDs.") cmd.Flags().StringSliceVar(&fIntegrationTypes, "integration-types", nil, "Filter by integration types (plugin keys).") - cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort field (ES field name). [event_time]") + cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort field; only 'event_time' is supported. [event_time]") cmd.Flags().StringVar(&fSeverities, "severities", "", "Comma-separated severity filter, e.g. 'Critical,Warning'.") cmd.Flags().StringVar(&fStartTime, "start-time", "", "Start of search window, Unix epoch seconds. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. (alias: --since)") cmd.Flags().StringVar(&fSince, "since", "", "Alias for --start-time. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") @@ -273,9 +273,9 @@ Request fields: --page int — Page number, starting at 1. --limit int — Page size, max 100, default 20. --search-after-ctx string - --alert-id string (required) — Alert ID. + --alert-id string (required) — Alert ID; obtain it from 'POST /alert/list'. --asc bool — Sort ascending. - --types []string — Filter by feed types. + --types []string — Filter by feed type codes (e.g. 'a_new', 'a_close', 'a_ack'). Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): - has_next_page (boolean) @@ -337,9 +337,9 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; cmd.Flags().Int64Var(&fP, "page", 0, "Page number, starting at 1.") cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size, max 100, default 20.") cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") - cmd.Flags().StringVar(&fAlertID, "alert-id", "", "Alert ID. (required)") + cmd.Flags().StringVar(&fAlertID, "alert-id", "", "Alert ID; obtain it from 'POST /alert/list'. (required)") cmd.Flags().BoolVar(&fAsc, "asc", false, "Sort ascending.") - cmd.Flags().StringSliceVar(&fTypes, "types", nil, "Filter by feed types.") + cmd.Flags().StringSliceVar(&fTypes, "types", nil, "Filter by feed type codes (e.g. 'a_new', 'a_close', 'a_ack').") 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 } @@ -931,10 +931,10 @@ Associate one or more alerts with an existing incident. If a source alert previo API: POST /alert/merge (alert-write-merge) Request fields: - --alert-ids []string (required) — Alert IDs to merge. + --alert-ids []string (required) — Alert IDs to merge; obtain them from 'POST /alert/list'. --comment string — Optional comment on the merge action. - --incident-id string (required) — Target incident ID. - --owner-id int — Optional new owner for the target incident. + --incident-id string (required) — Target incident ID; obtain it from 'POST /incident/list'. + --owner-id int — Member ID of the new owner for the target incident; obtain it from 'POST /member/list'. --title string — Optional new title for the target incident. `, Args: requireBodyFieldOrArgs("alert_ids", "alert-ids"), @@ -981,10 +981,10 @@ Request fields: }) }, } - cmd.Flags().StringSliceVar(&fAlertIDs, "alert-ids", nil, "Alert IDs to merge. (required)") + cmd.Flags().StringSliceVar(&fAlertIDs, "alert-ids", nil, "Alert IDs to merge; obtain them from 'POST /alert/list'. (required)") cmd.Flags().StringVar(&fComment, "comment", "", "Optional comment on the merge action.") - cmd.Flags().StringVar(&fIncidentID, "incident-id", "", "Target incident ID. (required)") - cmd.Flags().Int64Var(&fOwnerID, "owner-id", 0, "Optional new owner for the target incident.") + cmd.Flags().StringVar(&fIncidentID, "incident-id", "", "Target incident ID; obtain it from 'POST /incident/list'. (required)") + cmd.Flags().Int64Var(&fOwnerID, "owner-id", 0, "Member ID of the new owner for the target incident; obtain it from 'POST /member/list'.") cmd.Flags().StringVar(&fTitle, "title", "", "Optional new title for the target incident.") 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_applications.go b/internal/cli/zz_generated_applications.go index 0acd8bc..f09a2c4 100644 --- a/internal/cli/zz_generated_applications.go +++ b/internal/cli/zz_generated_applications.go @@ -21,7 +21,7 @@ Retrieve full details of a single RUM application by 'application_id'. API: POST /rum/application/info (rum-application-read-info) Request fields: - --application-id string (required) — RUM application ID. + --application-id string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. Response fields ('data' envelope is unwrapped — these fields are at the top level): - account_id (integer) — Account ID. @@ -78,7 +78,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. (required)") + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. Get application IDs via 'POST /rum/application/list'. (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 } @@ -96,7 +96,7 @@ Retrieve details for multiple RUM applications by their IDs in one request. API: POST /rum/application/infos (rum-application-read-infos) Request fields: - --application-ids []string (required) — Up to 200 application IDs. + --application-ids []string (required) — Up to 200 application IDs. Get IDs via 'POST /rum/application/list'. Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): - items (array) @@ -154,7 +154,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; }) }, } - cmd.Flags().StringSliceVar(&fApplicationIDs, "application-ids", nil, "Up to 200 application IDs. (required)") + cmd.Flags().StringSliceVar(&fApplicationIDs, "application-ids", nil, "Up to 200 application IDs. Get IDs via 'POST /rum/application/list'. (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 } @@ -184,9 +184,9 @@ Request fields: --search-after-ctx string --asc bool — Sort ascending if 'true'. --is-my-team bool — If 'true', return only applications belonging to the current user's teams. - --orderby string — Sort field. [created_at, updated_at] - --query string — Search query to filter by application name. - --team-id int — Filter by team ID. + --orderby string — Sort field; defaults to 'updated_at' when omitted. [created_at, updated_at] + --query string — Substring match on the application name. + --team-id int — Filter by team ID. Get team IDs via 'POST /team/list'. Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): - has_next_page (boolean) @@ -268,9 +268,9 @@ 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, "Sort ascending if 'true'.") cmd.Flags().BoolVar(&fIsMyTeam, "is-my-team", false, "If 'true', return only applications belonging to the current user's teams.") - cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort field. [created_at, updated_at]") - cmd.Flags().StringVar(&fQuery, "query", "", "Search query to filter by application name.") - cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Filter by team ID.") + cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort field; defaults to 'updated_at' when omitted. [created_at, updated_at]") + cmd.Flags().StringVar(&fQuery, "query", "", "Substring match on the application name.") + cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Filter by team ID. Get team IDs via 'POST /team/list'.") 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 } @@ -289,7 +289,7 @@ Send a sample RUM alert event to verify an application's webhook URL. API: POST /rum/application/webhook/test (rum-application-webhook-test) Request fields: - --application-id string (required) — RUM application ID. + --application-id string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. --webhook-url string (required) — Webhook URL to receive the sample alert event. Response fields ('data' envelope is unwrapped — these fields are at the top level): @@ -328,7 +328,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. (required)") + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. Get application IDs via 'POST /rum/application/list'. (required)") cmd.Flags().StringVar(&fWebhookURL, "webhook-url", "", "Webhook URL to receive the sample alert event. (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 @@ -356,16 +356,16 @@ Request fields: --is-private bool — Restrict access to team members only. --no-geo bool — Do not infer geographic location. --no-ip bool — Do not collect IP addresses. - --team-id int (required) — Owning team ID. - --type string (required) — Application type. [browser, ios, android, react-native, flutter, kotlin-multiplatform, roku, unity] - alerting (object, via --data) — Alert settings for the application. + --team-id int (required) — Owning team ID. Get team IDs via 'POST /team/list'. + --type string (required) — Application type. [browser, ios, android, react-native, flutter, kotlin-multiplatform, roku, unity, miniprogram, harmony, electron] + alerting (object, via --data) — Alerting configuration; defaults to disabled ('enabled: false') when omitted. - channel_ids (array) — Channel IDs to send alerts to. - enabled (boolean) — Whether alerting is enabled. - integration_id (integer) — Associated on-call integration ID (read-only, auto-assigned). - links (object, via --data) — External link integration settings for the application. + links (object, via --data) — Optional external-link integration configuration. - enabled (boolean) — Whether external link integration is enabled. - systems (any) — External systems whose URL templates can be opened from matching RUM events. - tracing (object, via --data) — APM tracing integration settings. + tracing (object, via --data) — Optional APM tracing integration configuration. - enabled (boolean) — Whether tracing integration is enabled. - endpoint (string) — Trace endpoint URL (http or https). - open_type (string) — How to open the trace link. [popup, tab] @@ -422,8 +422,8 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().BoolVar(&fIsPrivate, "is-private", false, "Restrict access to team members only.") cmd.Flags().BoolVar(&fNoGeo, "no-geo", false, "Do not infer geographic location.") cmd.Flags().BoolVar(&fNoIP, "no-ip", false, "Do not collect IP addresses.") - cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Owning team ID. (required)") - cmd.Flags().StringVar(&fType, "type", "", "Application type. (required) [browser, ios, android, react-native, flutter, kotlin-multiplatform, roku, unity]") + cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Owning team ID. Get team IDs via 'POST /team/list'. (required)") + cmd.Flags().StringVar(&fType, "type", "", "Application type. (required) [browser, ios, android, react-native, flutter, kotlin-multiplatform, roku, unity, miniprogram, harmony, electron]") 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 } @@ -441,7 +441,7 @@ Delete a RUM application by 'application_id'. API: POST /rum/application/delete (rum-application-write-delete) Request fields: - --application-id string (required) — RUM application ID. + --application-id string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. `, Args: requireBodyFieldOrExactArg("application_id", "application-id"), Example: ` flashduty rum application-delete --data '{"application_id":"qLpu24Dz4CAzWsESPbJYWA"}'`, @@ -475,7 +475,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. (required)") + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. Get application IDs via 'POST /rum/application/list'. (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 } @@ -499,21 +499,21 @@ Update an existing RUM application. All fields except 'application_id' are optio API: POST /rum/application/update (rum-application-write-update) Request fields: - --application-id string (required) — Application ID to update. - --application-name string — New application name. - --is-private bool - --no-geo bool - --no-ip bool - --team-id int - --type string [browser, ios, android, react-native, flutter, kotlin-multiplatform, roku, unity] - alerting (object, via --data) — Alert settings for the application. + --application-id string (required) — Application ID to update. Get application IDs via 'POST /rum/application/list'. + --application-name string — New application name, 1–40 characters. Omit to leave unchanged. + --is-private bool — Restrict access to members of the owning team. Omit to leave unchanged. + --no-geo bool — When 'true', stop inferring geographic location from IP. Omit to leave unchanged. + --no-ip bool — When 'true', stop collecting user IP addresses. Omit to leave unchanged. + --team-id int — Owning team ID. Get team IDs via 'POST /team/list'. Omit to leave unchanged. + --type string — Application type. Omit to leave unchanged. [browser, ios, android, react-native, flutter, kotlin-multiplatform, roku, unity, miniprogram, harmony, electron] + alerting (object, via --data) — Alerting configuration. Omit to leave unchanged. - channel_ids (array) — Channel IDs to send alerts to. - enabled (boolean) — Whether alerting is enabled. - integration_id (integer) — Associated on-call integration ID (read-only, auto-assigned). - links (object, via --data) — External link integration settings for the application. + links (object, via --data) — External-link integration configuration. Omit to leave unchanged. - enabled (boolean) — Whether external link integration is enabled. - systems (any) — External systems whose URL templates can be opened from matching RUM events. - tracing (object, via --data) — APM tracing integration settings. + tracing (object, via --data) — APM tracing integration configuration. Omit to leave unchanged. - enabled (boolean) — Whether tracing integration is enabled. - endpoint (string) — Trace endpoint URL (http or https). - open_type (string) — How to open the trace link. [popup, tab] @@ -568,13 +568,13 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fApplicationID, "application-id", "", "Application ID to update. (required)") - cmd.Flags().StringVar(&fApplicationName, "application-name", "", "New application name.") - cmd.Flags().BoolVar(&fIsPrivate, "is-private", false, "Request field is_private") - cmd.Flags().BoolVar(&fNoGeo, "no-geo", false, "Request field no_geo") - cmd.Flags().BoolVar(&fNoIP, "no-ip", false, "Request field no_ip") - cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Request field team_id") - cmd.Flags().StringVar(&fType, "type", "", "Request field type [browser, ios, android, react-native, flutter, kotlin-multiplatform, roku, unity]") + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "Application ID to update. Get application IDs via 'POST /rum/application/list'. (required)") + cmd.Flags().StringVar(&fApplicationName, "application-name", "", "New application name, 1–40 characters. Omit to leave unchanged.") + cmd.Flags().BoolVar(&fIsPrivate, "is-private", false, "Restrict access to members of the owning team. Omit to leave unchanged.") + cmd.Flags().BoolVar(&fNoGeo, "no-geo", false, "When 'true', stop inferring geographic location from IP. Omit to leave unchanged.") + cmd.Flags().BoolVar(&fNoIP, "no-ip", false, "When 'true', stop collecting user IP addresses. Omit to leave unchanged.") + cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Owning team ID. Get team IDs via 'POST /team/list'. Omit to leave unchanged.") + cmd.Flags().StringVar(&fType, "type", "", "Application type. Omit to leave unchanged. [browser, ios, android, react-native, flutter, kotlin-multiplatform, roku, unity, miniprogram, harmony, electron]") 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_audit_logs.go b/internal/cli/zz_generated_audit_logs.go index 1371d77..3c69389 100644 --- a/internal/cli/zz_generated_audit_logs.go +++ b/internal/cli/zz_generated_audit_logs.go @@ -74,7 +74,7 @@ Request fields: --is-write bool — When true, return only write operations; when false, return only read operations. --limit int — Page size. Minimum 0, maximum 99. (0-99) --operations []string — Filter to specific operation names. Use 'POST /audit/operation/list' to get the valid set. - --person-id int — Filter by the member who performed the action. + --person-id int — Filter by the operator's member ID (get IDs from 'POST /member/list'). Pass the account ID to match actions performed by the account principal itself. --request-id string — Filter to a single request by its unique request ID. --search-after-ctx string — Opaque pagination cursor returned by the previous response. Leave empty for the first page. --start-time string (required) — Start of the search window, Unix epoch seconds. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. @@ -160,7 +160,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; cmd.Flags().BoolVar(&fIsWrite, "is-write", false, "When true, return only write operations; when false, return only read operations.") cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size. Minimum 0, maximum 99. (0-99)") cmd.Flags().StringSliceVar(&fOperations, "operations", nil, "Filter to specific operation names. Use 'POST /audit/operation/list' to get the valid set.") - cmd.Flags().Int64Var(&fPersonID, "person-id", 0, "Filter by the member who performed the action.") + cmd.Flags().Int64Var(&fPersonID, "person-id", 0, "Filter by the operator's member ID (get IDs from 'POST /member/list'). Pass the account ID to match actions performed by the account principal itself.") cmd.Flags().StringVar(&fRequestID, "request-id", "", "Filter to a single request by its unique request ID.") cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Opaque pagination cursor returned by the previous response. Leave empty for the first page.") cmd.Flags().StringVar(&fStartTime, "start-time", "", "Start of the search window, Unix epoch seconds. (required) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. (alias: --since)") diff --git a/internal/cli/zz_generated_automations.go b/internal/cli/zz_generated_automations.go index 8644ee0..16d7b5d 100644 --- a/internal/cli/zz_generated_automations.go +++ b/internal/cli/zz_generated_automations.go @@ -21,7 +21,7 @@ Get one Automation rule by ID. API: POST /safari/automation/rule/get (automation-rule-read-get) Request fields: - --rule-id string (required) — Rule ID. + --rule-id string (required) — Rule ID, from the list returned by 'POST /safari/automation/rule/list'. Response fields ('data' envelope is unwrapped — these fields are at the top level): - account_id (integer) (required) — Account ID. @@ -79,7 +79,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID. (required)") + cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID, from the list returned by 'POST /safari/automation/rule/list'. (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 } @@ -107,7 +107,7 @@ Request fields: --page int — Page number, 1-based. --limit int — Page size. (max 100) --search-after-ctx string - --enabled bool — Filter by enabled status. + --enabled bool — Filter by enabled state: 'true' returns only enabled rules, 'false' only disabled; omit or pass null for no filter. --include-person bool — Compatibility field; when scope is empty and this is false, behaves like team scope. --keyword string — Filter by name keyword. (≤64 chars) --scope string — Scope filter: 'all' (own personal + accessible team rules), 'personal', or 'team'; default 'all'. [all, personal, team] @@ -191,7 +191,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().Int64Var(&fP, "page", 0, "Page number, 1-based.") cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size. (max 100)") cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") - cmd.Flags().BoolVar(&fEnabled, "enabled", false, "Filter by enabled status.") + cmd.Flags().BoolVar(&fEnabled, "enabled", false, "Filter by enabled state: 'true' returns only enabled rules, 'false' only disabled; omit or pass null for no filter.") cmd.Flags().BoolVar(&fIncludePerson, "include-person", false, "Compatibility field; when scope is empty and this is false, behaves like team scope.") cmd.Flags().StringVar(&fKeyword, "keyword", "", "Filter by name keyword. (≤64 chars)") cmd.Flags().StringVar(&fScope, "scope", "", "Scope filter: 'all' (own personal + accessible team rules), 'personal', or 'team'; default 'all'. [all, personal, team]") @@ -357,7 +357,7 @@ Delete an Automation rule. API: POST /safari/automation/rule/delete (automation-rule-write-delete) Request fields: - --rule-id string (required) — Rule ID. + --rule-id string (required) — Rule ID, from the list returned by 'POST /safari/automation/rule/list'. `, Args: requireBodyFieldOrExactArg("rule_id", "rule-id"), Example: ` flashduty safari automation-rule-delete --data '{"rule_id":"arule_7NnLzY2Qp8xS4kUaV3mR6b"}'`, @@ -387,7 +387,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID. (required)") + cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID, from the list returned by 'POST /safari/automation/rule/list'. (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 } @@ -405,7 +405,7 @@ Manually run an Automation rule immediately, outside its schedule. API: POST /safari/automation/rule/run (automation-rule-write-run) Request fields: - --rule-id string (required) — Rule ID. + --rule-id string (required) — Rule ID, from the list returned by 'POST /safari/automation/rule/list'. Response fields ('data' envelope is unwrapped — these fields are at the top level): - preflight (object) (required) — Readiness checks computed before a manual run is allowed to start. @@ -450,7 +450,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID. (required)") + cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID, from the list returned by 'POST /safari/automation/rule/list'. (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 } @@ -481,7 +481,7 @@ Update mutable Automation rule fields, including HTTP POST and On-call incident API: POST /safari/automation/rule/update (automation-rule-write-update) Request fields: - --rule-id string (required) — Target rule ID. + --rule-id string (required) — Target rule ID, from the list returned by 'POST /safari/automation/rule/list'. --name string — New rule name. (≤255 chars) --team-id int — Only the current value is accepted; personal/team scope is immutable after creation. (min 0) --enabled bool — Whether the rule is enabled. @@ -591,7 +591,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Target rule ID. (required)") + cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Target rule ID, from the list returned by 'POST /safari/automation/rule/list'. (required)") cmd.Flags().StringVar(&fName, "name", "", "New rule name. (≤255 chars)") cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Only the current value is accepted; personal/team scope is immutable after creation. (min 0)") cmd.Flags().BoolVar(&fEnabled, "enabled", false, "Whether the rule is enabled.") @@ -632,11 +632,11 @@ Request fields: --page int — Page number, 1-based. --limit int — Page size. (max 100) --search-after-ctx string - --rule-id string (required) — Target rule ID. + --rule-id string (required) — Target rule ID, from the list returned by 'POST /safari/automation/rule/list'. --started-after-ms int — Start-time lower bound, Unix milliseconds. --started-before-ms int — Start-time upper bound, Unix milliseconds. - --status string — Run status filter. [queued, running, retrying, succeeded, partial, failed, skipped, abandoned] - --trigger-kind string — Trigger kind filter. [schedule, debug, manual, http_post, oncall_incident] + --status string — Run status filter: 'queued', 'running', 'retrying', 'succeeded', 'partial' (partially succeeded), 'failed', 'skipped' (e.g. rule or trigger no longer valid), 'abandoned' (stale run terminated by the system); omit for no filter. [queued, running, retrying, succeeded, partial, failed, skipped, abandoned] + --trigger-kind string — Trigger source filter: 'schedule' cron trigger, 'debug' debug run, 'manual' manual run, 'http_post' HTTP POST trigger, 'oncall_incident' on-call incident trigger; omit for no filter. [schedule, debug, manual, http_post, oncall_incident] Response fields ('data' envelope is unwrapped — these fields are at the top level): - runs (array) (required) @@ -711,11 +711,11 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().Int64Var(&fP, "page", 0, "Page number, 1-based.") cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size. (max 100)") cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") - cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Target rule ID. (required)") + cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Target rule ID, from the list returned by 'POST /safari/automation/rule/list'. (required)") cmd.Flags().Int64Var(&fStartedAfterMs, "started-after-ms", 0, "Start-time lower bound, Unix milliseconds.") cmd.Flags().Int64Var(&fStartedBeforeMs, "started-before-ms", 0, "Start-time upper bound, Unix milliseconds.") - cmd.Flags().StringVar(&fStatus, "status", "", "Run status filter. [queued, running, retrying, succeeded, partial, failed, skipped, abandoned]") - cmd.Flags().StringVar(&fTriggerKind, "trigger-kind", "", "Trigger kind filter. [schedule, debug, manual, http_post, oncall_incident]") + cmd.Flags().StringVar(&fStatus, "status", "", "Run status filter: 'queued', 'running', 'retrying', 'succeeded', 'partial' (partially succeeded), 'failed', 'skipped' (e.g. rule or trigger no longer valid), 'abandoned' (stale run terminated by the system); omit for no filter. [queued, running, retrying, succeeded, partial, failed, skipped, abandoned]") + cmd.Flags().StringVar(&fTriggerKind, "trigger-kind", "", "Trigger source filter: 'schedule' cron trigger, 'debug' debug run, 'manual' manual run, 'http_post' HTTP POST trigger, 'oncall_incident' on-call incident trigger; omit for no filter. [schedule, debug, manual, http_post, oncall_incident]") 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_calendars.go b/internal/cli/zz_generated_calendars.go index e3e0a75..c81c1c6 100644 --- a/internal/cli/zz_generated_calendars.go +++ b/internal/cli/zz_generated_calendars.go @@ -22,7 +22,7 @@ Delete a calendar event by calendar ID and event ID. API: POST /calendar/event/delete (calEventDelete) Request fields: - --cal-id string (required) — Calendar ID. + --cal-id string (required) — Calendar ID; obtain it from 'POST /calendar/list'. --event-id string (required) — Event ID. `, Example: ` flashduty calendar event-delete --data '{"cal_id":"cal.QiNvtdKs4Wj52kZhT3LafM","event_id":"cale.KyG9XWTCU5CucbwukEVBQ4"}'`, @@ -56,7 +56,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fCalID, "cal-id", "", "Calendar ID. (required)") + cmd.Flags().StringVar(&fCalID, "cal-id", "", "Calendar ID; obtain it from 'POST /calendar/list'. (required)") cmd.Flags().StringVar(&fEventID, "event-id", "", "Event ID. (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 @@ -78,7 +78,7 @@ Return events for a personal calendar within a year/month/day scope. When month API: POST /calendar/event/list (calEventList) Request fields: - --cal-id string (required) — Calendar ID. + --cal-id string (required) — Calendar ID; obtain it from 'POST /calendar/list'. --day int — Day (1-31). 0 means no day filter. (0-31) --month int — Month (1-12). 0 means no month filter. (0-12) --year int — Year. Defaults to the current year when omitted. (min 2023) @@ -135,7 +135,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; }) }, } - cmd.Flags().StringVar(&fCalID, "cal-id", "", "Calendar ID. (required)") + cmd.Flags().StringVar(&fCalID, "cal-id", "", "Calendar ID; obtain it from 'POST /calendar/list'. (required)") cmd.Flags().Int64Var(&fDay, "day", 0, "Day (1-31). 0 means no day filter. (0-31)") cmd.Flags().Int64Var(&fMonth, "month", 0, "Month (1-12). 0 means no month filter. (0-12)") cmd.Flags().Int64Var(&fYear, "year", 0, "Year. Defaults to the current year when omitted. (min 2023)") @@ -162,7 +162,7 @@ Create or update a calendar event (holiday or workday override). Omit event_id t API: POST /calendar/event/upsert (calEventUpsert) Request fields: - --cal-id string (required) — Calendar ID. + --cal-id string (required) — Calendar ID; obtain it from 'POST /calendar/list'. --description string — Event description. (≤499 chars) --end-at string (required) — Event end date in YYYY-MM-DD (exclusive). --event-id string — Event ID. Omit when creating. (≤63 chars) @@ -221,7 +221,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fCalID, "cal-id", "", "Calendar ID. (required)") + cmd.Flags().StringVar(&fCalID, "cal-id", "", "Calendar ID; obtain it from 'POST /calendar/list'. (required)") cmd.Flags().StringVar(&fDescription, "description", "", "Event description. (≤499 chars)") cmd.Flags().StringVar(&fEndAt, "end-at", "", "Event end date in YYYY-MM-DD (exclusive). (required)") cmd.Flags().StringVar(&fEventID, "event-id", "", "Event ID. Omit when creating. (≤63 chars)") @@ -323,7 +323,7 @@ Delete a personal service calendar. The call fails when referenced by escalation API: POST /calendar/delete (calendarDelete) Request fields: - --cal-id string (required) — Calendar ID. + --cal-id string (required) — Calendar ID; obtain it from 'POST /calendar/list'. `, Args: requireBodyFieldOrExactArg("cal_id", "cal-id"), Example: ` flashduty calendar delete --data '{"cal_id":"cal.QiNvtdKs4Wj52kZhT3LafM"}'`, @@ -357,7 +357,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fCalID, "cal-id", "", "Calendar ID. (required)") + cmd.Flags().StringVar(&fCalID, "cal-id", "", "Calendar ID; obtain it from 'POST /calendar/list'. (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 } @@ -375,7 +375,7 @@ Return details of a service calendar. API: POST /calendar/info (calendarInfo) Request fields: - --cal-id string (required) — Calendar ID. + --cal-id string (required) — Calendar ID; obtain it from 'POST /calendar/list'. Response fields ('data' envelope is unwrapped — these fields are at the top level): - account_id (integer) (required) — Account ID. @@ -421,7 +421,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fCalID, "cal-id", "", "Calendar ID. (required)") + cmd.Flags().StringVar(&fCalID, "cal-id", "", "Calendar ID; obtain it from 'POST /calendar/list'. (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 } @@ -513,11 +513,11 @@ Update a personal service calendar. Only non-null fields are updated. API: POST /calendar/update (calendarUpdate) Request fields: - --cal-id string (required) — Calendar ID. + --cal-id string (required) — Calendar ID; obtain it from 'POST /calendar/list'. --cal-name string — New calendar name. (1-39 chars) --description string — New description. (≤499 chars) --extra-cal-ids []string — Additional public-holiday calendar IDs to inherit events from. - --team-id int — New owning team ID. + --team-id int — New owning team ID; obtain it from 'POST /team/list'. --timezone string — New IANA timezone. --workdays []int — Workday numbers (0 = Sunday, 6 = Saturday). `, @@ -571,11 +571,11 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fCalID, "cal-id", "", "Calendar ID. (required)") + cmd.Flags().StringVar(&fCalID, "cal-id", "", "Calendar ID; obtain it from 'POST /calendar/list'. (required)") cmd.Flags().StringVar(&fCalName, "cal-name", "", "New calendar name. (1-39 chars)") cmd.Flags().StringVar(&fDescription, "description", "", "New description. (≤499 chars)") cmd.Flags().StringSliceVar(&fExtraCalIDs, "extra-cal-ids", nil, "Additional public-holiday calendar IDs to inherit events from.") - cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "New owning team ID.") + cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "New owning team ID; obtain it from 'POST /team/list'.") cmd.Flags().StringVar(&fTimezone, "timezone", "", "New IANA timezone.") cmd.Flags().IntSliceVar(&fWorkdays, "workdays", nil, "Workday numbers (0 = Sunday, 6 = Saturday).") 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.") diff --git a/internal/cli/zz_generated_changes.go b/internal/cli/zz_generated_changes.go index 9cd1238..68f0b1b 100644 --- a/internal/cli/zz_generated_changes.go +++ b/internal/cli/zz_generated_changes.go @@ -37,7 +37,7 @@ Request fields: --limit int — Number of items per page. (1-100) --search-after-ctx string --asc bool — Sort in ascending order when true. - --channel-ids []int — Filter by collaboration channel IDs. + --channel-ids []int — Filter by channel IDs. --end-time string — Unix timestamp in seconds for the end of the query window. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. --include-events bool — Include the underlying change events for each change when true. --integration-ids []int — Filter by reporting integration IDs. @@ -147,7 +147,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; cmd.Flags().Int64Var(&fLimit, "limit", 0, "Number of items per page. (1-100)") cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") cmd.Flags().BoolVar(&fAsc, "asc", false, "Sort in ascending order when true.") - cmd.Flags().IntSliceVar(&fChannelIDs, "channel-ids", nil, "Filter by collaboration channel IDs.") + cmd.Flags().IntSliceVar(&fChannelIDs, "channel-ids", nil, "Filter by channel IDs.") cmd.Flags().StringVar(&fEndTime, "end-time", "", "Unix timestamp in seconds for the end of the query window. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. (alias: --until)") cmd.Flags().StringVar(&fUntil, "until", "", "Alias for --end-time. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") cmd.Flags().BoolVar(&fIncludeEvents, "include-events", false, "Include the underlying change events for each change when true.") diff --git a/internal/cli/zz_generated_channels.go b/internal/cli/zz_generated_channels.go index d89290d..e90d5dc 100644 --- a/internal/cli/zz_generated_channels.go +++ b/internal/cli/zz_generated_channels.go @@ -31,7 +31,7 @@ Create a new channel for incident management. API: POST /channel/create (channelCreate) Request fields: - --auto-resolve-mode string — Auto-resolve timer reset mode. [trigger, update] + --auto-resolve-mode string — Auto-resolve timing mode: 'trigger' starts the timer when the incident triggers, 'update' restarts it on every alert update. [trigger, update] --auto-resolve-timeout int — Auto-resolve timeout in seconds. 0 disables auto-resolve. Max 30 days. (0-2592000) --channel-name string (required) — Channel name. 1 to 59 characters. (1-59 chars) --description string — Free-form description. Up to 500 characters. (≤500 chars) @@ -41,7 +41,7 @@ Request fields: --is-private bool — When true, the channel is visible only to its managing teams. --managing-team-ids []int — Additional teams that can manage the channel. Up to 3 entries. --plugin-ids []int — IDs of plugins (integrations) subscribed to this channel. - --team-id int (required) — Owning team ID. + --team-id int (required) — Owning team ID; obtain it from 'POST /team/list'. escalate_rule (object, via --data) — Default escalation rule applied to the channel. Omit to skip default escalation. - aggr_window (integer) — Delay window in seconds. 0 disables delay. (0-3600) - target (object) (required) — Notification target. At least one of 'person_ids', 'team_ids', 'schedule_to_role_ids', or 'emails' must be set, together with either 'by' or 'webhooks'. @@ -51,9 +51,9 @@ Request fields: - info (array) — Channels for Info events. - warning (array) — Channels for Warning events. - emails (array) — Email addresses to notify (push-only scenarios). - - person_ids (array) — Member IDs to notify directly. + - person_ids (array) — Member IDs to notify directly; obtain member IDs from 'POST /member/list'. - schedule_to_role_ids (object) — Map of schedule ID to the role IDs on that schedule to notify. - - team_ids (array) — Team IDs to notify. + - team_ids (array) — Team IDs to notify; obtain team IDs from 'POST /team/list'. - webhooks (array) — Group chat / webhook targets. Required unless 'by' is provided. - settings (object) (required) — Type-specific settings (chat IDs, URLs, etc.). - type (string) (required) — Webhook type (e.g. 'feishu', 'dingtalk_app', 'wecom_app', 'slack', 'teams', 'custom'). @@ -134,7 +134,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fAutoResolveMode, "auto-resolve-mode", "", "Auto-resolve timer reset mode. [trigger, update]") + cmd.Flags().StringVar(&fAutoResolveMode, "auto-resolve-mode", "", "Auto-resolve timing mode: 'trigger' starts the timer when the incident triggers, 'update' restarts it on every alert update. [trigger, update]") cmd.Flags().Int64Var(&fAutoResolveTimeout, "auto-resolve-timeout", 0, "Auto-resolve timeout in seconds. 0 disables auto-resolve. Max 30 days. (0-2592000)") cmd.Flags().StringVar(&fChannelName, "channel-name", "", "Channel name. 1 to 59 characters. (required) (1-59 chars)") cmd.Flags().StringVar(&fDescription, "description", "", "Free-form description. Up to 500 characters. (≤500 chars)") @@ -144,7 +144,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().BoolVar(&fIsPrivate, "is-private", false, "When true, the channel is visible only to its managing teams.") cmd.Flags().IntSliceVar(&fManagingTeamIDs, "managing-team-ids", nil, "Additional teams that can manage the channel. Up to 3 entries.") cmd.Flags().IntSliceVar(&fPluginIDs, "plugin-ids", nil, "IDs of plugins (integrations) subscribed to this channel.") - cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Owning team ID. (required)") + cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Owning team ID; obtain it from 'POST /team/list'. (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 } @@ -162,7 +162,7 @@ Delete a channel and all associated configuration. API: POST /channel/delete (channelDelete) Request fields: - --channel-id int (required) — Channel ID. + --channel-id int (required) — Channel ID; obtain it from 'POST /channel/list'. `, Args: requireBodyFieldOrExactArg("channel_id", "channel-id"), Example: ` flashduty channel delete --data '{"channel_id":3521074710131}'`, @@ -196,7 +196,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel ID. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel ID; obtain it from 'POST /channel/list'. (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 } @@ -214,7 +214,7 @@ Disable a channel to stop incident routing without deleting it. API: POST /channel/disable (channelDisable) Request fields: - --channel-id int (required) — Channel ID. + --channel-id int (required) — Channel ID; obtain it from 'POST /channel/list'. `, Args: requireBodyFieldOrExactArg("channel_id", "channel-id"), Example: ` flashduty channel disable --data '{"channel_id":3521074710131}'`, @@ -248,7 +248,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel ID. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel ID; obtain it from 'POST /channel/list'. (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 } @@ -266,7 +266,7 @@ Enable a disabled channel to resume incident routing. API: POST /channel/enable (channelEnable) Request fields: - --channel-id int (required) — Channel ID. + --channel-id int (required) — Channel ID; obtain it from 'POST /channel/list'. `, Args: requireBodyFieldOrExactArg("channel_id", "channel-id"), Example: ` flashduty channel enable --data '{"channel_id":3521074710131}'`, @@ -300,7 +300,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel ID. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel ID; obtain it from 'POST /channel/list'. (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 } @@ -324,7 +324,7 @@ API: POST /channel/escalate/rule/create (channelEscalateRuleCreate) Request fields: --aggr-window int — Delay window in seconds. 0 disables delay. (0-3600) - --channel-id int (required) — Channel the rule belongs to. + --channel-id int (required) — Owning channel ID; obtain it from 'POST /channel/list'. --description string — Rule description, up to 500 characters. (≤500 chars) --priority int — Evaluation priority. Lower runs first. (0-200) --rule-name string (required) — Rule name, 1 to 39 characters. (1-39 chars) @@ -345,9 +345,9 @@ Request fields: - info (array) — Channels for Info events. - warning (array) — Channels for Warning events. - emails (array) — Email addresses to notify (push-only scenarios). - - person_ids (array) — Member IDs to notify directly. + - person_ids (array) — Member IDs to notify directly; obtain member IDs from 'POST /member/list'. - schedule_to_role_ids (object) — Map of schedule ID to the role IDs on that schedule to notify. - - team_ids (array) — Team IDs to notify. + - team_ids (array) — Team IDs to notify; obtain team IDs from 'POST /team/list'. - webhooks (array) — Group chat / webhook targets. Required unless 'by' is provided. - settings (object) (required) — Type-specific settings (chat IDs, URLs, etc.). - type (string) (required) — Webhook type (e.g. 'feishu', 'dingtalk_app', 'wecom_app', 'slack', 'teams', 'custom'). @@ -402,7 +402,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }, } cmd.Flags().Int64Var(&fAggrWindow, "aggr-window", 0, "Delay window in seconds. 0 disables delay. (0-3600)") - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel the rule belongs to. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Owning channel ID; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fDescription, "description", "", "Rule description, up to 500 characters. (≤500 chars)") cmd.Flags().Int64Var(&fPriority, "priority", 0, "Evaluation priority. Lower runs first. (0-200)") cmd.Flags().StringVar(&fRuleName, "rule-name", "", "Rule name, 1 to 39 characters. (required) (1-39 chars)") @@ -425,7 +425,7 @@ Delete an escalation rule. API: POST /channel/escalate/rule/delete (channelEscalateRuleDelete) Request fields: - --channel-id int (required) — Channel the rule belongs to. + --channel-id int (required) — Owning channel ID; obtain it from 'POST /channel/list'. --rule-id string (required) — Rule ID (MongoDB ObjectID). `, Example: ` flashduty channel escalate-rule-delete --data '{"channel_id":3521074710131,"rule_id":"6621b23f4a2c5e0012ab34cd"}'`, @@ -459,7 +459,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel the rule belongs to. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Owning channel ID; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID (MongoDB ObjectID). (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 @@ -479,7 +479,7 @@ Disable an escalation rule without deleting it. API: POST /channel/escalate/rule/disable (channelEscalateRuleDisable) Request fields: - --channel-id int (required) — Channel the rule belongs to. + --channel-id int (required) — Owning channel ID; obtain it from 'POST /channel/list'. --rule-id string (required) — Rule ID (MongoDB ObjectID). `, Example: ` flashduty channel escalate-rule-disable --data '{"channel_id":3521074710131,"rule_id":"6621b23f4a2c5e0012ab34cd"}'`, @@ -513,7 +513,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel the rule belongs to. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Owning channel ID; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID (MongoDB ObjectID). (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 @@ -533,7 +533,7 @@ Enable a disabled escalation rule. API: POST /channel/escalate/rule/enable (channelEscalateRuleEnable) Request fields: - --channel-id int (required) — Channel the rule belongs to. + --channel-id int (required) — Owning channel ID; obtain it from 'POST /channel/list'. --rule-id string (required) — Rule ID (MongoDB ObjectID). `, Example: ` flashduty channel escalate-rule-enable --data '{"channel_id":3521074710131,"rule_id":"6621b23f4a2c5e0012ab34cd"}'`, @@ -567,7 +567,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel the rule belongs to. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Owning channel ID; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID (MongoDB ObjectID). (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 @@ -587,7 +587,7 @@ Retrieve detailed information for a specific escalation rule. API: POST /channel/escalate/rule/info (channelEscalateRuleInfo) Request fields: - --channel-id int (required) — Channel the rule belongs to. + --channel-id int (required) — Owning channel ID; obtain it from 'POST /channel/list'. --rule-id string (required) — Rule ID (MongoDB ObjectID). Response fields ('data' envelope is unwrapped — these fields are at the top level): @@ -658,7 +658,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel the rule belongs to. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Owning channel ID; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID (MongoDB ObjectID). (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 @@ -768,13 +768,13 @@ API: POST /channel/escalate/rule/update (channelEscalateRuleUpdate) Request fields: --aggr-window int — Delay window in seconds. 0 disables delay. - --channel-id int (required) — Channel the rule belongs to. + --channel-id int (required) — Owning channel ID; obtain it from 'POST /channel/list'. --description string — Rule description, up to 500 characters. (≤500 chars) --priority int — Evaluation priority. Lower runs first. --rule-id string (required) — Escalation rule ID (MongoDB ObjectID). --rule-name string (required) — Rule name, 1 to 39 characters. (1-39 chars) --template-id string (required) — Notification template ID (MongoDB ObjectID). - filters (object, via --data) + filters (object, via --data) — Match conditions for alerts this rule applies to; omit to apply it to all alerts in the channel. layers (array, via --data) (required) — Escalation levels in order. At least one level is required. - escalate_window (integer) — Wait before moving to the next level, in minutes. (0-720) - force_escalate (boolean) — When true, always escalate regardless of acknowledgement. @@ -847,7 +847,7 @@ Request fields: }, } cmd.Flags().Int64Var(&fAggrWindow, "aggr-window", 0, "Delay window in seconds. 0 disables delay.") - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel the rule belongs to. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Owning channel ID; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fDescription, "description", "", "Rule description, up to 500 characters. (≤500 chars)") cmd.Flags().Int64Var(&fPriority, "priority", 0, "Evaluation priority. Lower runs first.") cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Escalation rule ID (MongoDB ObjectID). (required)") @@ -870,7 +870,7 @@ Retrieve detailed information for a specific channel. API: POST /channel/info (channelInfo) Request fields: - --channel-id int (required) — Channel ID to fetch. + --channel-id int (required) — ID of the channel to query; obtain it from 'POST /channel/list'. Response fields ('data' envelope is unwrapped — these fields are at the top level): - account_id (integer) — Owning account ID. @@ -945,7 +945,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel ID to fetch. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "ID of the channel to query; obtain it from 'POST /channel/list'. (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 } @@ -1022,7 +1022,7 @@ Create an inhibit rule to suppress lower-priority alerts when higher-priority on API: POST /channel/inhibit/rule/create (channelInhibitRuleCreate) Request fields: - --channel-id int (required) — Channel the rule belongs to. + --channel-id int (required) — Owning channel ID; obtain it from 'POST /channel/list'. --description string — Rule description, up to 500 characters. (≤500 chars) --equals []string (required) — Label keys used to pair source and target alerts. --is-directly-discard bool — When true, suppressed target alerts are dropped instead of merged. @@ -1084,7 +1084,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel the rule belongs to. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Owning channel ID; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fDescription, "description", "", "Rule description, up to 500 characters. (≤500 chars)") cmd.Flags().StringSliceVar(&fEquals, "equals", nil, "Label keys used to pair source and target alerts. (required)") cmd.Flags().BoolVar(&fIsDirectlyDiscard, "is-directly-discard", false, "When true, suppressed target alerts are dropped instead of merged.") @@ -1108,7 +1108,7 @@ Delete an inhibit rule. API: POST /channel/inhibit/rule/delete (channelInhibitRuleDelete) Request fields: - --channel-id int (required) — Channel the rule belongs to. + --channel-id int (required) — Owning channel ID; obtain it from 'POST /channel/list'. --rule-id string (required) — Rule ID (MongoDB ObjectID). `, Example: ` flashduty channel inhibit-rule-delete --data '{"channel_id":3521074710131,"rule_id":"6621b23f4a2c5e0012ab34cd"}'`, @@ -1142,7 +1142,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel the rule belongs to. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Owning channel ID; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID (MongoDB ObjectID). (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 @@ -1162,7 +1162,7 @@ Disable an inhibit rule without deleting it. API: POST /channel/inhibit/rule/disable (channelInhibitRuleDisable) Request fields: - --channel-id int (required) — Channel the rule belongs to. + --channel-id int (required) — Owning channel ID; obtain it from 'POST /channel/list'. --rule-id string (required) — Rule ID (MongoDB ObjectID). `, Example: ` flashduty channel inhibit-rule-disable --data '{"channel_id":3521074710131,"rule_id":"6621b23f4a2c5e0012ab34cd"}'`, @@ -1196,7 +1196,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel the rule belongs to. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Owning channel ID; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID (MongoDB ObjectID). (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 @@ -1216,7 +1216,7 @@ Enable a disabled inhibit rule. API: POST /channel/inhibit/rule/enable (channelInhibitRuleEnable) Request fields: - --channel-id int (required) — Channel the rule belongs to. + --channel-id int (required) — Owning channel ID; obtain it from 'POST /channel/list'. --rule-id string (required) — Rule ID (MongoDB ObjectID). `, Example: ` flashduty channel inhibit-rule-enable --data '{"channel_id":3521074710131,"rule_id":"6621b23f4a2c5e0012ab34cd"}'`, @@ -1250,7 +1250,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel the rule belongs to. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Owning channel ID; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID (MongoDB ObjectID). (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 @@ -1341,15 +1341,15 @@ Update an existing inhibit rule configuration. API: POST /channel/inhibit/rule/update (channelInhibitRuleUpdate) Request fields: - --channel-id int (required) — Channel the rule belongs to. + --channel-id int (required) — Owning channel ID; obtain it from 'POST /channel/list'. --description string — Rule description, up to 500 characters. (≤500 chars) --equals []string (required) — Label keys used to pair source and target alerts. --is-directly-discard bool — When true, suppressed target alerts are dropped instead of merged. --priority int — Evaluation priority. Lower runs first. --rule-id string (required) — Inhibit rule ID (MongoDB ObjectID). --rule-name string (required) — Rule name, 1 to 39 characters. (1-39 chars) - source_filters (object, via --data) - target_filters (object, via --data) + source_filters (object, via --data) — Match conditions for source alerts; together with 'equals', determines which target alerts are suppressed. + target_filters (object, via --data) — Match conditions for target (suppressed) alerts. `, Example: ` flashduty channel inhibit-rule-update --data '{"channel_id":1001,"equals":["labels.cluster"],"rule_id":"6621b23f4a2c5e0012ab34ce","rule_name":"Suppress downstream"}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -1397,7 +1397,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel the rule belongs to. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Owning channel ID; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fDescription, "description", "", "Rule description, up to 500 characters. (≤500 chars)") cmd.Flags().StringSliceVar(&fEquals, "equals", nil, "Label keys used to pair source and target alerts. (required)") cmd.Flags().BoolVar(&fIsDirectlyDiscard, "is-directly-discard", false, "When true, suppressed target alerts are dropped instead of merged.") @@ -1590,7 +1590,7 @@ Create a silence rule to suppress notifications matching specified conditions. API: POST /channel/silence/rule/create (channelSilenceRuleCreate) Request fields: - --channel-id int (required) — Channel the rule belongs to. + --channel-id int (required) — Owning channel ID; obtain it from 'POST /channel/list'. --description string — Rule description, up to 500 characters. (≤500 chars) --from-incident-id string — Source incident ID when the silence was created from an incident. --is-auto-delete bool — When true, the silence rule is automatically deleted after its time window expires. Defaults to false. @@ -1661,7 +1661,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel the rule belongs to. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Owning channel ID; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fDescription, "description", "", "Rule description, up to 500 characters. (≤500 chars)") cmd.Flags().StringVar(&fFromIncidentID, "from-incident-id", "", "Source incident ID when the silence was created from an incident.") cmd.Flags().BoolVar(&fIsAutoDelete, "is-auto-delete", false, "When true, the silence rule is automatically deleted after its time window expires. Defaults to false.") @@ -1686,7 +1686,7 @@ Delete a silence rule. API: POST /channel/silence/rule/delete (channelSilenceRuleDelete) Request fields: - --channel-id int (required) — Channel the rule belongs to. + --channel-id int (required) — Owning channel ID; obtain it from 'POST /channel/list'. --rule-id string (required) — Rule ID (MongoDB ObjectID). `, Example: ` flashduty channel silence-rule-delete --data '{"channel_id":3521074710131,"rule_id":"6621b23f4a2c5e0012ab34cd"}'`, @@ -1720,7 +1720,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel the rule belongs to. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Owning channel ID; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID (MongoDB ObjectID). (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 @@ -1740,7 +1740,7 @@ Disable a silence rule without deleting it. API: POST /channel/silence/rule/disable (channelSilenceRuleDisable) Request fields: - --channel-id int (required) — Channel the rule belongs to. + --channel-id int (required) — Owning channel ID; obtain it from 'POST /channel/list'. --rule-id string (required) — Rule ID (MongoDB ObjectID). `, Example: ` flashduty channel silence-rule-disable --data '{"channel_id":3521074710131,"rule_id":"6621b23f4a2c5e0012ab34cd"}'`, @@ -1774,7 +1774,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel the rule belongs to. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Owning channel ID; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID (MongoDB ObjectID). (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 @@ -1794,7 +1794,7 @@ Enable a disabled silence rule. API: POST /channel/silence/rule/enable (channelSilenceRuleEnable) Request fields: - --channel-id int (required) — Channel the rule belongs to. + --channel-id int (required) — Owning channel ID; obtain it from 'POST /channel/list'. --rule-id string (required) — Rule ID (MongoDB ObjectID). `, Example: ` flashduty channel silence-rule-enable --data '{"channel_id":3521074710131,"rule_id":"6621b23f4a2c5e0012ab34cd"}'`, @@ -1828,7 +1828,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel the rule belongs to. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Owning channel ID; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID (MongoDB ObjectID). (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 @@ -1929,15 +1929,15 @@ Update an existing silence rule configuration. API: POST /channel/silence/rule/update (channelSilenceRuleUpdate) Request fields: - --channel-id int (required) — Channel the rule belongs to. + --channel-id int (required) — Owning channel ID; obtain it from 'POST /channel/list'. --description string — Rule description, up to 500 characters. (≤500 chars) --is-auto-delete bool — When true, the silence rule is automatically deleted after its time window expires. Defaults to false. --is-directly-discard bool — When true, silenced alerts are dropped instead of suppressed into incidents. --priority int — Evaluation priority. Lower runs first. --rule-id string (required) — Silence rule ID (MongoDB ObjectID). --rule-name string (required) — Rule name, 1 to 39 characters. (1-39 chars) - filters (object, via --data) - time_filter (object, via --data) — One-off time window defined by unix seconds. + filters (object, via --data) — Match conditions for the alerts to silence; required and must not be empty. + time_filter (object, via --data) — One-off silence window. Mutually exclusive with 'time_filters'; exactly one of the two must be set. - end_time (integer) (required) — Window end (unix seconds). Must be > 0. - start_time (integer) (required) — Window start (unix seconds). Must be > 0 and less than 'end_time'. time_filters (array, via --data) — Recurring time windows. Mutually exclusive with 'time_filter'. @@ -1993,7 +1993,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel the rule belongs to. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Owning channel ID; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fDescription, "description", "", "Rule description, up to 500 characters. (≤500 chars)") cmd.Flags().BoolVar(&fIsAutoDelete, "is-auto-delete", false, "When true, the silence rule is automatically deleted after its time window expires. Defaults to false.") cmd.Flags().BoolVar(&fIsDirectlyDiscard, "is-directly-discard", false, "When true, silenced alerts are dropped instead of suppressed into incidents.") @@ -2020,7 +2020,7 @@ Create a drop rule to filter out unwanted alerts before they become incidents. API: POST /channel/unsubscribe/rule/create (channelUnsubscribeRuleCreate) Request fields: - --channel-id int (required) — Channel the rule belongs to. + --channel-id int (required) — Owning channel ID; obtain it from 'POST /channel/list'. --description string — Rule description, up to 500 characters. (≤500 chars) --priority int — Evaluation priority. Lower runs first. --rule-name string (required) — Rule name, 1 to 39 characters. (1-39 chars) @@ -2070,7 +2070,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel the rule belongs to. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Owning channel ID; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fDescription, "description", "", "Rule description, up to 500 characters. (≤500 chars)") cmd.Flags().Int64Var(&fPriority, "priority", 0, "Evaluation priority. Lower runs first.") cmd.Flags().StringVar(&fRuleName, "rule-name", "", "Rule name, 1 to 39 characters. (required) (1-39 chars)") @@ -2092,7 +2092,7 @@ Delete a drop rule. API: POST /channel/unsubscribe/rule/delete (channelUnsubscribeRuleDelete) Request fields: - --channel-id int (required) — Channel the rule belongs to. + --channel-id int (required) — Owning channel ID; obtain it from 'POST /channel/list'. --rule-id string (required) — Rule ID (MongoDB ObjectID). `, Example: ` flashduty channel unsubscribe-rule-delete --data '{"channel_id":3521074710131,"rule_id":"6621b23f4a2c5e0012ab34cd"}'`, @@ -2126,7 +2126,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel the rule belongs to. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Owning channel ID; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID (MongoDB ObjectID). (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 @@ -2146,7 +2146,7 @@ Disable a drop rule without deleting it. API: POST /channel/unsubscribe/rule/disable (channelUnsubscribeRuleDisable) Request fields: - --channel-id int (required) — Channel the rule belongs to. + --channel-id int (required) — Owning channel ID; obtain it from 'POST /channel/list'. --rule-id string (required) — Rule ID (MongoDB ObjectID). `, Example: ` flashduty channel unsubscribe-rule-disable --data '{"channel_id":3521074710131,"rule_id":"6621b23f4a2c5e0012ab34cd"}'`, @@ -2180,7 +2180,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel the rule belongs to. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Owning channel ID; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID (MongoDB ObjectID). (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 @@ -2200,7 +2200,7 @@ Enable a disabled drop rule. API: POST /channel/unsubscribe/rule/enable (channelUnsubscribeRuleEnable) Request fields: - --channel-id int (required) — Channel the rule belongs to. + --channel-id int (required) — Owning channel ID; obtain it from 'POST /channel/list'. --rule-id string (required) — Rule ID (MongoDB ObjectID). `, Example: ` flashduty channel unsubscribe-rule-enable --data '{"channel_id":3521074710131,"rule_id":"6621b23f4a2c5e0012ab34cd"}'`, @@ -2234,7 +2234,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel the rule belongs to. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Owning channel ID; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID (MongoDB ObjectID). (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 @@ -2320,12 +2320,12 @@ Update an existing drop rule configuration. API: POST /channel/unsubscribe/rule/update (channelUnsubscribeRuleUpdate) Request fields: - --channel-id int (required) — Channel the rule belongs to. + --channel-id int (required) — Owning channel ID; obtain it from 'POST /channel/list'. --description string — Rule description, up to 500 characters. (≤500 chars) --priority int — Evaluation priority. Lower runs first. --rule-id string (required) — Drop rule ID (MongoDB ObjectID). --rule-name string (required) — Rule name, 1 to 39 characters. (1-39 chars) - filters (object, via --data) + filters (object, via --data) — Matching alerts are dropped and generate no notification. `, Example: ` flashduty channel unsubscribe-rule-update --data '{"channel_id":1001,"filters":[[{"key":"labels.env","oper":"IN","vals":["test"]}]],"rule_id":"6621b23f4a2c5e0012ab34cf","rule_name":"Drop test alerts"}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -2367,7 +2367,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel the rule belongs to. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Owning channel ID; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fDescription, "description", "", "Rule description, up to 500 characters. (≤500 chars)") cmd.Flags().Int64Var(&fPriority, "priority", 0, "Evaluation priority. Lower runs first.") cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Drop rule ID (MongoDB ObjectID). (required)") @@ -2399,9 +2399,9 @@ Update an existing channel's configuration and settings. API: POST /channel/update (channelUpdate) Request fields: - --auto-resolve-mode string — Auto-resolve timer reset mode. [trigger, update] + --auto-resolve-mode string — Auto-resolve timing mode: 'trigger' starts the timer when the incident triggers, 'update' restarts it on every alert update. [trigger, update] --auto-resolve-timeout int — Auto-resolve timeout in seconds. 0 disables auto-resolve. Max 30 days. (0-2592000) - --channel-id int (required) — Channel ID to update. + --channel-id int (required) — ID of the channel to update; obtain it from 'POST /channel/list'. --channel-name string — New channel name. 1 to 59 characters. (1-59 chars) --description string — New description. Up to 500 characters. (≤500 chars) --disable-auto-close bool — Disable automatic incident closing. @@ -2409,7 +2409,7 @@ Request fields: --is-external-report-enabled bool — Allow external reporters to file incidents into this channel. --is-private bool — When true, the channel is visible only to its managing teams. --managing-team-ids []int — Additional teams that can manage the channel. Up to 3 entries. - --team-id int — New owning team ID. + --team-id int — New owning team ID; obtain it from 'POST /team/list'. flapping (object, via --data) — Flapping detection configuration. - in_mins (integer) — Observation window in minutes. (1-1440) - is_disabled (boolean) — Disable flapping detection. @@ -2488,9 +2488,9 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fAutoResolveMode, "auto-resolve-mode", "", "Auto-resolve timer reset mode. [trigger, update]") + cmd.Flags().StringVar(&fAutoResolveMode, "auto-resolve-mode", "", "Auto-resolve timing mode: 'trigger' starts the timer when the incident triggers, 'update' restarts it on every alert update. [trigger, update]") cmd.Flags().Int64Var(&fAutoResolveTimeout, "auto-resolve-timeout", 0, "Auto-resolve timeout in seconds. 0 disables auto-resolve. Max 30 days. (0-2592000)") - cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel ID to update. (required)") + cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "ID of the channel to update; obtain it from 'POST /channel/list'. (required)") cmd.Flags().StringVar(&fChannelName, "channel-name", "", "New channel name. 1 to 59 characters. (1-59 chars)") cmd.Flags().StringVar(&fDescription, "description", "", "New description. Up to 500 characters. (≤500 chars)") cmd.Flags().BoolVar(&fDisableAutoClose, "disable-auto-close", false, "Disable automatic incident closing.") @@ -2498,7 +2498,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().BoolVar(&fIsExternalReportEnabled, "is-external-report-enabled", false, "Allow external reporters to file incidents into this channel.") cmd.Flags().BoolVar(&fIsPrivate, "is-private", false, "When true, the channel is visible only to its managing teams.") cmd.Flags().IntSliceVar(&fManagingTeamIDs, "managing-team-ids", nil, "Additional teams that can manage the channel. Up to 3 entries.") - cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "New owning team ID.") + cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "New owning team ID; obtain it from 'POST /team/list'.") 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 } @@ -2673,7 +2673,7 @@ Request fields: - 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'). - name_mapping_label (string) — Label key whose value is used as the target channel name. Required when 'routing_mode' is 'name_mapping'. - 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] - default (object, via --data) — Default branch used when no case matches (or all matched cases yield no valid channels). + default (object, via --data) — Fallback branch used when no case matches. - channel_ids (array) — Channel IDs to fall back to. sections (array, via --data) — Optional sections that group consecutive cases for display. - name (string) (required) — Section name. Must be unique within the rule. diff --git a/internal/cli/zz_generated_data_sources.go b/internal/cli/zz_generated_data_sources.go index beb3a5b..40d35a8 100644 --- a/internal/cli/zz_generated_data_sources.go +++ b/internal/cli/zz_generated_data_sources.go @@ -21,7 +21,7 @@ Retrieve full details of a single data source by its ID, including the 'payload' API: POST /monit/datasource/info (monit-datasource-read-info) Request fields: - --id int (required) — Resource ID. + --id int (required) — Numeric ID of the target resource; the exact meaning depends on the API being called (e.g. datasource ID, ruleset ID). Response fields ('data' envelope is unwrapped — these fields are at the top level): - account_id (integer) (required) — Account ID. @@ -165,7 +165,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().Int64Var(&fID, "id", 0, "Resource ID. (required)") + cmd.Flags().Int64Var(&fID, "id", 0, "Numeric ID of the target resource; the exact meaning depends on the API being called (e.g. datasource ID, ruleset ID). (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 } @@ -348,10 +348,10 @@ List logstores within an SLS project for the specified SLS datasource. API: POST /monit/datasource/sls/logstores (monit-datasource-read-sls-logstores) Request fields: - --id int — SLS datasource ID. + --id int — ID of an SLS-type datasource. Obtainable via 'POST /monit/datasource/list'. --offset int — Pagination offset. - --project string — SLS project name. - --size int — Page size. + --project string — SLS project name. Obtainable via 'POST /monit/datasource/sls/projects'. + --size int — Page size. Defaults to 200 server-side when 0. `, Example: ` flashduty monit datasource-sls-logstores --data '{"id":10,"offset":0,"project":"project-a","size":50}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -386,10 +386,10 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fID, "id", 0, "SLS datasource ID.") + cmd.Flags().Int64Var(&fID, "id", 0, "ID of an SLS-type datasource. Obtainable via 'POST /monit/datasource/list'.") cmd.Flags().Int64Var(&fOffset, "offset", 0, "Pagination offset.") - cmd.Flags().StringVar(&fProject, "project", "", "SLS project name.") - cmd.Flags().Int64Var(&fSize, "size", 0, "Page size.") + cmd.Flags().StringVar(&fProject, "project", "", "SLS project name. Obtainable via 'POST /monit/datasource/sls/projects'.") + cmd.Flags().Int64Var(&fSize, "size", 0, "Page size. Defaults to 200 server-side when 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 } @@ -410,10 +410,10 @@ List Alibaba Cloud SLS (Simple Log Service) projects available in the specified API: POST /monit/datasource/sls/projects (monit-datasource-read-sls-projects) Request fields: - --id int — SLS datasource ID. + --id int — ID of an SLS-type datasource. Obtainable via 'POST /monit/datasource/list'. --offset int — Pagination offset. - --query string — Name prefix filter. - --size int — Page size. + --query string — Fuzzy filter on project description (maps to the 'description' parameter of Aliyun SLS ListProject). Leave empty to return all. + --size int — Page size. Defaults to 200 server-side when 0. `, Example: ` flashduty monit datasource-sls-projects --data '{"id":10,"offset":0,"query":"","size":50}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -448,10 +448,10 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fID, "id", 0, "SLS datasource ID.") + cmd.Flags().Int64Var(&fID, "id", 0, "ID of an SLS-type datasource. Obtainable via 'POST /monit/datasource/list'.") cmd.Flags().Int64Var(&fOffset, "offset", 0, "Pagination offset.") - cmd.Flags().StringVar(&fQuery, "query", "", "Name prefix filter.") - cmd.Flags().Int64Var(&fSize, "size", 0, "Page size.") + cmd.Flags().StringVar(&fQuery, "query", "", "Fuzzy filter on project description (maps to the 'description' parameter of Aliyun SLS ListProject). Leave empty to return all.") + cmd.Flags().Int64Var(&fSize, "size", 0, "Page size. Defaults to 200 server-side when 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 } @@ -477,7 +477,7 @@ Request fields: --address string — Connection address. For Prometheus/Loki/VictoriaLogs: HTTP URL. For MySQL/Oracle/Postgres/ClickHouse: 'host:port'. For SLS: endpoint without http/https prefix. Not required for Elasticsearch cloud deployment. --edge-cluster-name string (required) — Monitors edge cluster name responsible for evaluating rules using this datasource. --id int — Datasource ID. Required for update; omit for create. - --name string (required) — Datasource display name. + --name string (required) — Datasource display name. This is the name referenced as 'ds_name' in query and diagnose APIs. --note string — Optional description. --type-ident string (required) — Datasource type identifier. Allowed: 'prometheus', 'loki', 'mysql', 'oracle', 'postgres', 'clickhouse', 'elasticsearch', 'sls', 'victorialogs'. payload (object, via --data) (required) — Type-specific configuration block. Must include the key matching 'type_ident'. @@ -748,7 +748,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().StringVar(&fAddress, "address", "", "Connection address. For Prometheus/Loki/VictoriaLogs: HTTP URL. For MySQL/Oracle/Postgres/ClickHouse: 'host:port'. For SLS: endpoint without http/https prefix. Not required for Elasticsearch cloud deployment.") cmd.Flags().StringVar(&fEdgeClusterName, "edge-cluster-name", "", "Monitors edge cluster name responsible for evaluating rules using this datasource. (required)") cmd.Flags().Int64Var(&fID, "id", 0, "Datasource ID. Required for update; omit for create.") - cmd.Flags().StringVar(&fName, "name", "", "Datasource display name. (required)") + cmd.Flags().StringVar(&fName, "name", "", "Datasource display name. This is the name referenced as 'ds_name' in query and diagnose APIs. (required)") cmd.Flags().StringVar(&fNote, "note", "", "Optional description.") cmd.Flags().StringVar(&fTypeIdent, "type-ident", "", "Datasource type identifier. Allowed: 'prometheus', 'loki', 'mysql', 'oracle', 'postgres', 'clickhouse', 'elasticsearch', 'sls', 'victorialogs'. (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.") @@ -768,7 +768,7 @@ Delete a data source by ID. Alert rules referencing this datasource must be upda API: POST /monit/datasource/delete (monit-datasource-write-delete) Request fields: - --id int (required) — Resource ID. + --id int (required) — Numeric ID of the target resource; the exact meaning depends on the API being called (e.g. datasource ID, ruleset ID). `, Example: ` flashduty monit datasource-delete --data '{"id":10}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -798,7 +798,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fID, "id", 0, "Resource ID. (required)") + cmd.Flags().Int64Var(&fID, "id", 0, "Numeric ID of the target resource; the exact meaning depends on the API being called (e.g. datasource ID, ruleset ID). (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 } @@ -824,7 +824,7 @@ Request fields: --address string — Connection address. For Prometheus/Loki/VictoriaLogs: HTTP URL. For MySQL/Oracle/Postgres/ClickHouse: 'host:port'. For SLS: endpoint without http/https prefix. Not required for Elasticsearch cloud deployment. --edge-cluster-name string (required) — Monitors edge cluster name responsible for evaluating rules using this datasource. --id int — Datasource ID. Required for update; omit for create. - --name string (required) — Datasource display name. + --name string (required) — Datasource display name. This is the name referenced as 'ds_name' in query and diagnose APIs. --note string — Optional description. --type-ident string (required) — Datasource type identifier. Allowed: 'prometheus', 'loki', 'mysql', 'oracle', 'postgres', 'clickhouse', 'elasticsearch', 'sls', 'victorialogs'. payload (object, via --data) (required) — Type-specific configuration block. Must include the key matching 'type_ident'. @@ -1095,7 +1095,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().StringVar(&fAddress, "address", "", "Connection address. For Prometheus/Loki/VictoriaLogs: HTTP URL. For MySQL/Oracle/Postgres/ClickHouse: 'host:port'. For SLS: endpoint without http/https prefix. Not required for Elasticsearch cloud deployment.") cmd.Flags().StringVar(&fEdgeClusterName, "edge-cluster-name", "", "Monitors edge cluster name responsible for evaluating rules using this datasource. (required)") cmd.Flags().Int64Var(&fID, "id", 0, "Datasource ID. Required for update; omit for create.") - cmd.Flags().StringVar(&fName, "name", "", "Datasource display name. (required)") + cmd.Flags().StringVar(&fName, "name", "", "Datasource display name. This is the name referenced as 'ds_name' in query and diagnose APIs. (required)") cmd.Flags().StringVar(&fNote, "note", "", "Optional description.") cmd.Flags().StringVar(&fTypeIdent, "type-ident", "", "Datasource type identifier. Allowed: 'prometheus', 'loki', 'mysql', 'oracle', 'postgres', 'clickhouse', 'elasticsearch', 'sls', 'victorialogs'. (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.") diff --git a/internal/cli/zz_generated_diagnostics.go b/internal/cli/zz_generated_diagnostics.go index a8ee6e4..cd2e5a2 100644 --- a/internal/cli/zz_generated_diagnostics.go +++ b/internal/cli/zz_generated_diagnostics.go @@ -28,7 +28,7 @@ Request fields: --ds-name string (required) — Data source name configured under the tenant. --ds-type string (required) — Data source type. 'log_patterns' supports 'loki' and 'victorialogs'; 'metric_trends' supports 'prometheus'. --operation string — Diagnostic operation. When omitted, inferred from 'ds_type' (loki / victorialogs → 'log_patterns', prometheus → 'metric_trends'). Other sources must specify explicitly. [log_patterns, metric_trends] - input (object, via --data) (required) + input (object, via --data) (required) — Diagnose input. 'query' is required: LogQL / VictoriaLogs query syntax for 'log_patterns'; PromQL for 'metric_trends'. - query (string) (required) — Query expression. LogQL / VictoriaLogs query syntax for 'log_patterns'; PromQL for 'metric_trends'. methods (array, via --data) — Diagnostic methods to run. When omitted, 'log_patterns' defaults to 'pattern_snapshot + pattern_compare(previous_window)' and 'metric_trends' defaults to 'single_window_shape + window_compare(previous_window)'. - baseline (string) — Only meaningful for compare-style methods. Defaults to 'previous_window'. [previous_window, same_window_yesterday, same_window_last_week] diff --git a/internal/cli/zz_generated_error_ingestion_rules.go b/internal/cli/zz_generated_error_ingestion_rules.go index 84accaa..fa71753 100644 --- a/internal/cli/zz_generated_error_ingestion_rules.go +++ b/internal/cli/zz_generated_error_ingestion_rules.go @@ -23,10 +23,13 @@ Create a new error ingestion rule that filters which errors are stored. API: POST /rum/error-ingestion/rules/create (rum-error-ingestion-rules-create) Request fields: - --application-id string (required) — RUM application ID. + --application-id string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. --description string — Rule description, up to 512 characters. (≤512 chars) --rule-name string (required) — Rule name, 1-128 characters. (1-128 chars) - filters (array, via --data) (required) — Filter conditions the rule matches errors against. + filters (array>, via --data) (required) — Filter conditions (OR-of-ANDs) to match errors; matched errors are dropped and not ingested. + - key (string) (required) — Field key. One of 'error.usr_id', 'error.usr_email', 'error.error_type', 'error.error_message', 'error.error_stack', 'error.view_url', 'error.env', 'error.version', 'error.service', 'error.browser_name', 'error.browser_version', 'error.fingerprint', 'error.is_crash', or a 'context.'-prefixed custom context path (up to 3 levels deep). + - oper (string) (required) — Match mode: 'IN' matches when the field value matches any entry in 'vals'; 'NOTIN' matches when it matches none. [IN, NOTIN] + - vals (array) (required) — Values to match against, at least 1 entry. Each entry is an exact string, or a special pattern using wildcards ('*'/'?'), a regexp wrapped in '/', a 'cidr:'-prefixed CIDR match, or a 'num:lt|le|gt|ge:'-prefixed numeric comparison. Response fields ('data' envelope is unwrapped — these fields are at the top level): - rule_id (string) (required) — ID assigned to the new rule. @@ -66,7 +69,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. (required)") + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. Get application IDs via 'POST /rum/application/list'. (required)") cmd.Flags().StringVar(&fDescription, "description", "", "Rule description, up to 512 characters. (≤512 chars)") cmd.Flags().StringVar(&fRuleName, "rule-name", "", "Rule name, 1-128 characters. (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.") @@ -87,8 +90,8 @@ Delete an error ingestion rule from a RUM application. API: POST /rum/error-ingestion/rules/delete (rum-error-ingestion-rules-delete) Request fields: - --application-id string (required) — RUM application ID. - --rule-id string (required) — Rule ID. + --application-id string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. + --rule-id string (required) — Rule ID. Get rule IDs via 'POST /rum/error-ingestion/rules/list'. `, Example: ` flashduty rum error-ingestion-rules-delete --data '{"application_id":"WoyQQ3BohkdtPivubEvE8o","rule_id":"9spXEVoMeZWujjz25yrgTe"}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -121,8 +124,8 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. (required)") - cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID. (required)") + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. Get application IDs via 'POST /rum/application/list'. (required)") + cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID. Get rule IDs via 'POST /rum/error-ingestion/rules/list'. (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 } @@ -141,8 +144,8 @@ Disable an error ingestion rule without deleting it. API: POST /rum/error-ingestion/rules/disable (rum-error-ingestion-rules-disable) Request fields: - --application-id string (required) — RUM application ID. - --rule-id string (required) — Rule ID. + --application-id string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. + --rule-id string (required) — Rule ID. Get rule IDs via 'POST /rum/error-ingestion/rules/list'. `, Example: ` flashduty rum error-ingestion-rules-disable --data '{"application_id":"WoyQQ3BohkdtPivubEvE8o","rule_id":"9spXEVoMeZWujjz25yrgTe"}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -175,8 +178,8 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. (required)") - cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID. (required)") + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. Get application IDs via 'POST /rum/application/list'. (required)") + cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID. Get rule IDs via 'POST /rum/error-ingestion/rules/list'. (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 } @@ -195,8 +198,8 @@ Re-enable a previously disabled error ingestion rule. API: POST /rum/error-ingestion/rules/enable (rum-error-ingestion-rules-enable) Request fields: - --application-id string (required) — RUM application ID. - --rule-id string (required) — Rule ID. + --application-id string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. + --rule-id string (required) — Rule ID. Get rule IDs via 'POST /rum/error-ingestion/rules/list'. `, Example: ` flashduty rum error-ingestion-rules-enable --data '{"application_id":"WoyQQ3BohkdtPivubEvE8o","rule_id":"9spXEVoMeZWujjz25yrgTe"}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -229,8 +232,8 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. (required)") - cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID. (required)") + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. Get application IDs via 'POST /rum/application/list'. (required)") + cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID. Get rule IDs via 'POST /rum/error-ingestion/rules/list'. (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 } @@ -256,7 +259,7 @@ Request fields: --page int — Zero-based page number. Default 0. (min 0) --limit int — Page size. Default 20, capped at 100; values ≤ 0 fall back to the default. (max 100) --search-after-ctx string - --application-id string (required) — RUM application ID. + --application-id string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. --asc bool — Sort ascending instead of the default descending order. --orderby string — Sort column: 'updated_at' or 'version'. Unrecognized values fall back to 'updated_at'. @@ -270,7 +273,10 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; - created_by (integer) (required) — Member ID who created the rule. - deleted_at (integer) (required) — Unix timestamp in milliseconds when the row was soft-deleted; '0' when not deleted. - description (string) (required) — Rule description. - - filters (array) (required) — The rule's filter conditions as of this snapshot version. + - filters (array>) (required) — The rule's filter conditions as of this snapshot version. + - key (string) (required) — Field key. One of 'error.usr_id', 'error.usr_email', 'error.error_type', 'error.error_message', 'error.error_stack', 'error.view_url', 'error.env', 'error.version', 'error.service', 'error.browser_name', 'error.browser_version', 'error.fingerprint', 'error.is_crash', or a 'context.'-prefixed custom context path (up to 3 levels deep). + - oper (string) (required) — Match mode: 'IN' matches when the field value matches any entry in 'vals'; 'NOTIN' matches when it matches none. [IN, NOTIN] + - vals (array) (required) — Values to match against, at least 1 entry. Each entry is an exact string, or a special pattern using wildcards ('*'/'?'), a regexp wrapped in '/', a 'cidr:'-prefixed CIDR match, or a 'num:lt|le|gt|ge:'-prefixed numeric comparison. - id (integer) (required) — Internal row ID. - rule_id (string) (required) — Rule ID. - rule_name (string) (required) — Rule name. @@ -329,7 +335,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; cmd.Flags().Int64Var(&fP, "page", 0, "Zero-based page number. Default 0. (min 0)") cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size. Default 20, capped at 100; values ≤ 0 fall back to the default. (max 100)") cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") - cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. (required)") + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. Get application IDs via 'POST /rum/application/list'. (required)") cmd.Flags().BoolVar(&fAsc, "asc", false, "Sort ascending instead of the default descending order.") cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort column: 'updated_at' or 'version'. Unrecognized values fall back to 'updated_at'.") 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.") @@ -350,8 +356,8 @@ Restore an application's entire rule set to a prior history version. API: POST /rum/error-ingestion/rules/history/revert (rum-error-ingestion-rules-history-revert) Request fields: - --application-id string (required) — RUM application ID. - --version int (required) — History version number to revert to. (min 1) + --application-id string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. + --version int (required) — History version number to revert to. Get versions via 'POST /rum/error-ingestion/rules/history/list'. (min 1) `, Args: requireBodyFieldOrExactArg("application_id", "application-id"), Example: ` flashduty rum error-ingestion-rules-history-revert --data '{"application_id":"WoyQQ3BohkdtPivubEvE8o","version":2}'`, @@ -388,8 +394,8 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. (required)") - cmd.Flags().Int64Var(&fVersion, "version", 0, "History version number to revert to. (required) (min 1)") + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. Get application IDs via 'POST /rum/application/list'. (required)") + cmd.Flags().Int64Var(&fVersion, "version", 0, "History version number to revert to. Get versions via 'POST /rum/error-ingestion/rules/history/list'. (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 } @@ -407,13 +413,16 @@ Return every error ingestion rule configured for a RUM application. API: POST /rum/error-ingestion/rules/list (rum-error-ingestion-rules-list) Request fields: - --application-id string (required) — RUM application ID. + --application-id string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): - items (array) (required) — Rules, newest-created first. - created_at (integer) (required) — Unix timestamp in milliseconds when the rule was created. - description (string) (required) — Rule description, up to 512 characters. - - filters (array) (required) — The rule's filter conditions. + - filters (array>) (required) — The rule's filter conditions. + - key (string) (required) — Field key. One of 'error.usr_id', 'error.usr_email', 'error.error_type', 'error.error_message', 'error.error_stack', 'error.view_url', 'error.env', 'error.version', 'error.service', 'error.browser_name', 'error.browser_version', 'error.fingerprint', 'error.is_crash', or a 'context.'-prefixed custom context path (up to 3 levels deep). + - oper (string) (required) — Match mode: 'IN' matches when the field value matches any entry in 'vals'; 'NOTIN' matches when it matches none. [IN, NOTIN] + - vals (array) (required) — Values to match against, at least 1 entry. Each entry is an exact string, or a special pattern using wildcards ('*'/'?'), a regexp wrapped in '/', a 'cidr:'-prefixed CIDR match, or a 'num:lt|le|gt|ge:'-prefixed numeric comparison. - rule_id (string) (required) — Rule ID. - rule_name (string) (required) — Rule name, 1-128 characters. Not required to be unique within the application. - status (string) (required) — Current status of the rule. [enabled, disabled] @@ -447,7 +456,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; }) }, } - cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. (required)") + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. Get application IDs via 'POST /rum/application/list'. (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 } @@ -468,11 +477,14 @@ Update the name, description, or filters of an error ingestion rule. API: POST /rum/error-ingestion/rules/update (rum-error-ingestion-rules-update) Request fields: - --application-id string (required) — RUM application ID. + --application-id string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. --description string — New rule description, up to 512 characters. Omit to leave unchanged. (≤512 chars) - --rule-id string (required) — Rule ID to update. + --rule-id string (required) — Rule ID to update. Get rule IDs via 'POST /rum/error-ingestion/rules/list'. --rule-name string — New rule name, 1-128 characters. Omit to leave unchanged. (1-128 chars) - filters (array, via --data) — New filter conditions. Omit to leave unchanged. + filters (array>, via --data) — New filter conditions. Omit to leave unchanged. + - key (string) (required) — Field key. One of 'error.usr_id', 'error.usr_email', 'error.error_type', 'error.error_message', 'error.error_stack', 'error.view_url', 'error.env', 'error.version', 'error.service', 'error.browser_name', 'error.browser_version', 'error.fingerprint', 'error.is_crash', or a 'context.'-prefixed custom context path (up to 3 levels deep). + - oper (string) (required) — Match mode: 'IN' matches when the field value matches any entry in 'vals'; 'NOTIN' matches when it matches none. [IN, NOTIN] + - vals (array) (required) — Values to match against, at least 1 entry. Each entry is an exact string, or a special pattern using wildcards ('*'/'?'), a regexp wrapped in '/', a 'cidr:'-prefixed CIDR match, or a 'num:lt|le|gt|ge:'-prefixed numeric comparison. `, Example: ` flashduty rum error-ingestion-rules-update --data '{"application_id":"WoyQQ3BohkdtPivubEvE8o","description":"Now also excludes staging traffic.","rule_id":"9spXEVoMeZWujjz25yrgTe"}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -511,9 +523,9 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. (required)") + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. Get application IDs via 'POST /rum/application/list'. (required)") cmd.Flags().StringVar(&fDescription, "description", "", "New rule description, up to 512 characters. Omit to leave unchanged. (≤512 chars)") - cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID to update. (required)") + cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID to update. Get rule IDs via 'POST /rum/error-ingestion/rules/list'. (required)") cmd.Flags().StringVar(&fRuleName, "rule-name", "", "New rule name, 1-128 characters. Omit to leave unchanged. (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 diff --git a/internal/cli/zz_generated_facets.go b/internal/cli/zz_generated_facets.go index 21d333a..ecdce64 100644 --- a/internal/cli/zz_generated_facets.go +++ b/internal/cli/zz_generated_facets.go @@ -29,7 +29,7 @@ API: POST /rum/facet/count (rum-read-facet-count) Request fields: --dql string — RUM DQL filter expression applied before counting. --end-time int (required) — End of the time range, Unix epoch milliseconds. Maximum 31-day span. - --facet-key string (required) — The field key to count value distribution for. + --facet-key string (required) — Field key whose value distribution to count; must be a registered field of the given 'scope'. List available fields via 'POST /rum/field/list'. --limit int — Maximum number of top values to return. Default 100, maximum 100. (max 100) --scope string (required) — RUM data scope to query. [session, view, action, error, resource, long_task, vital, issue, sourcemap] --sql string — SQL WHERE clause (no SELECT) for additional filtering. @@ -85,7 +85,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; } cmd.Flags().StringVar(&fDql, "dql", "", "RUM DQL filter expression applied before counting.") cmd.Flags().Int64Var(&fEndTime, "end-time", 0, "End of the time range, Unix epoch milliseconds. Maximum 31-day span. (required)") - cmd.Flags().StringVar(&fFacetKey, "facet-key", "", "The field key to count value distribution for. (required)") + cmd.Flags().StringVar(&fFacetKey, "facet-key", "", "Field key whose value distribution to count; must be a registered field of the given 'scope'. List available fields via 'POST /rum/field/list'. (required)") cmd.Flags().Int64Var(&fLimit, "limit", 0, "Maximum number of top values to return. Default 100, maximum 100. (max 100)") cmd.Flags().StringVar(&fScope, "scope", "", "RUM data scope to query. (required) [session, view, action, error, resource, long_task, vital, issue, sourcemap]") cmd.Flags().StringVar(&fSql, "sql", "", "SQL WHERE clause (no SELECT) for additional filtering.") diff --git a/internal/cli/zz_generated_incidents.go b/internal/cli/zz_generated_incidents.go index 018e1ee..0339b75 100644 --- a/internal/cli/zz_generated_incidents.go +++ b/internal/cli/zz_generated_incidents.go @@ -27,7 +27,7 @@ Request fields: --expected-revision int (required) — Current content revision expected by the caller. Pass 0 for the first write to a document that has never been saved. (min 0) --idempotency-key string (required) — Non-blank key for safely retrying this exact reset request. (1-128 chars) --markdown string (required) — Replacement Markdown content. Limited to 4 MiB. - --post-mortem-id string (required) — Post-mortem ID to reset. + --post-mortem-id string (required) — ID of the post-mortem to reset; obtain it from 'POST /incident/post-mortem/list'. Response fields ('data' envelope is unwrapped — these fields are at the top level): - generation (integer) (required) — New collaboration document generation after the reset. @@ -78,7 +78,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().Int64Var(&fExpectedRevision, "expected-revision", 0, "Current content revision expected by the caller. Pass 0 for the first write to a document that has never been saved. (required) (min 0)") cmd.Flags().StringVar(&fIdempotencyKey, "idempotency-key", "", "Non-blank key for safely retrying this exact reset request. (required) (1-128 chars)") cmd.Flags().StringVar(&fMarkdown, "markdown", "", "Replacement Markdown content. Limited to 4 MiB. (required)") - cmd.Flags().StringVar(&fPostMortemID, "post-mortem-id", "", "Post-mortem ID to reset. (required)") + cmd.Flags().StringVar(&fPostMortemID, "post-mortem-id", "", "ID of the post-mortem to reset; obtain it from 'POST /incident/post-mortem/list'. (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 } @@ -171,7 +171,7 @@ API: POST /incident/sdp/request/list (incident-service-desk-plus-request-read-li Request fields: --page int — Page number starting at 1. Ignored when 'search_after_ctx' is set. (min 0) --limit int — Page size. Defaults to 20; maximum 100. (0-100) - --search-after-ctx string — Cursor returned by the previous page. + --search-after-ctx string — Pagination cursor: leave empty for the first page, then pass the 'search_after_ctx' returned by the previous response. --asc bool — When 'true', sort by internal record ID ascending; otherwise descending. --channel-ids []int — Channel IDs to filter by. --end-time string — Window end, Unix seconds. Must be greater than or equal to 'start_time'. Optional when 'incident_id' is provided. (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. @@ -179,7 +179,7 @@ Request fields: --integration-id int — ServiceDeskPlus integration ID. (min 0) --request-id string — ServiceDeskPlus request ID. (≤64 chars) --start-time string — Window start, Unix seconds. Optional when 'incident_id' is provided. (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. - --status string — Synchronization status filter. [success, failed] + --status string — Filter by sync status: 'success' or 'failed'. [success, failed] Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): - has_next_page (boolean) (required) — True when more results are available. @@ -261,7 +261,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; } cmd.Flags().Int64Var(&fP, "page", 0, "Page number starting at 1. Ignored when 'search_after_ctx' is set. (min 0)") cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size. Defaults to 20; maximum 100. (0-100)") - cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Cursor returned by the previous page.") + cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Pagination cursor: leave empty for the first page, then pass the 'search_after_ctx' returned by the previous response.") cmd.Flags().BoolVar(&fAsc, "asc", false, "When 'true', sort by internal record ID ascending; otherwise descending.") cmd.Flags().IntSliceVar(&fChannelIDs, "channel-ids", nil, "Channel IDs to filter by.") cmd.Flags().StringVar(&fEndTime, "end-time", "", "Window end, Unix seconds. Must be greater than or equal to 'start_time'. Optional when 'incident_id' is provided. (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. (alias: --until)") @@ -271,7 +271,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; cmd.Flags().StringVar(&fRequestID, "request-id", "", "ServiceDeskPlus request ID. (≤64 chars)") cmd.Flags().StringVar(&fStartTime, "start-time", "", "Window start, Unix seconds. Optional when 'incident_id' is provided. (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. (alias: --since)") cmd.Flags().StringVar(&fSince, "since", "", "Alias for --start-time. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") - cmd.Flags().StringVar(&fStatus, "status", "", "Synchronization status filter. [success, failed]") + cmd.Flags().StringVar(&fStatus, "status", "", "Filter by sync status: 'success' or 'failed'. [success, failed]") 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 } @@ -292,7 +292,7 @@ API: POST /incident/war-room/add-member (incident-write-add-war-room-member) Request fields: --chat-id string (required) — Chat ID of the war room within the IM platform. - --integration-id int (required) — IM integration that hosts the war room. + --integration-id int (required) — ID of the IM integration hosting the war room; obtain it from 'POST /datasource/im/war-room-enabled/list'. --member-ids []int (required) — Person IDs to add to the war room. `, Args: requireBodyFieldOrExactArg("chat_id", "chat-id"), @@ -330,7 +330,7 @@ Request fields: }, } cmd.Flags().StringVar(&fChatID, "chat-id", "", "Chat ID of the war room within the IM platform. (required)") - cmd.Flags().Int64Var(&fIntegrationID, "integration-id", 0, "IM integration that hosts the war room. (required)") + cmd.Flags().Int64Var(&fIntegrationID, "integration-id", 0, "ID of the IM integration hosting the war room; obtain it from 'POST /datasource/im/war-room-enabled/list'. (required)") cmd.Flags().IntSliceVar(&fMemberIDs, "member-ids", nil, "Person IDs to add to the war room. (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 @@ -557,8 +557,8 @@ API: POST /incident/assign (incidentAssign) Request fields: --incident-id string — Single incident ID. Ignored when 'incident_ids' is also provided. - --incident-ids []string — Batch incident IDs. - assigned_to (object, via --data) (required) — Incident assignment target. Either 'person_ids' or 'escalate_rule_id' must be provided. + --incident-ids []string — Incident IDs to assign in bulk; obtain them from 'POST /incident/list'. + assigned_to (object, via --data) (required) — Assign target; at least one of 'person_ids' and 'escalate_rule_id' must be set. - assigned_at (integer) — Unix timestamp (seconds) when the assignment was made. - emails (array) — Email recipients, used by integrations such as ServiceNow. - escalate_rule_id (string) — Escalation rule ID (MongoDB ObjectID) to drive assignment. @@ -600,7 +600,7 @@ Request fields: }, } cmd.Flags().StringVar(&fIncidentID, "incident-id", "", "Single incident ID. Ignored when 'incident_ids' is also provided.") - cmd.Flags().StringSliceVar(&fIncidentIDs, "incident-ids", nil, "Batch incident IDs.") + cmd.Flags().StringSliceVar(&fIncidentIDs, "incident-ids", nil, "Incident IDs to assign in bulk; obtain them from 'POST /incident/list'.") 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 } @@ -969,18 +969,18 @@ API: POST /incident/create (incidentCreate) Request fields: --channel-id int — Channel to file the incident into. Optional; leave unset for a standalone incident. --description string — Incident description, up to 1024 characters. (≤1024 chars) - --incident-severity string (required) — Incident severity. [Info, Warning, Critical] + --incident-severity string (required) — Incident severity: 'Info', 'Warning' or 'Critical' (most severe). [Info, Warning, Critical] --title string — Incident title, up to 512 characters. (≤512 chars) - assigned_to (object, via --data) — Incident assignment target. Either 'person_ids' or 'escalate_rule_id' must be provided. - - emails (array) — Email recipients, used for ServiceNow-style integrations. - - escalate_rule_id (string) — Escalation rule ID (MongoDB ObjectID) to drive assignment. - - layer_idx (integer) — Starting layer index when using an escalation rule. + assigned_to (object, via --data) — Incident assignment target. May be omitted entirely: when unset or empty, the channel's default assignment applies; required when the account's create form is in effect. 'person_ids', 'escalate_rule_id', and 'emails' can be combined — responders are the union. + - emails (array) — Recipients to assign by email (1–100): resolved to account members and merged into 'person_ids'; emails with no matching member are ignored. + - escalate_rule_id (string) — Escalation rule ID (MongoDB ObjectID); assigns the people at the rule's 'layer_idx' layer. + - layer_idx (integer) — Zero-based starting layer index of the escalation rule (default 0, the first layer); an out-of-range value returns an error. Only takes effect with 'escalate_rule_id'. - notify (object) — Override the notification channels used for this assignment. - follow_preference (boolean) — When true, fall back to each responder's personal preference. - personal_channels (array) — Channels to use (e.g. 'voice', 'sms', 'email'). - template_id (string) — Notification template ID (MongoDB ObjectID). - - person_ids (array) — Member IDs to assign directly. - - type (string) — Assignment type. + - person_ids (array) — Member IDs to assign directly (1–100). Can be combined with 'escalate_rule_id'. + - type (string) — Assignment type, derived by the server — callers should omit it: 'assign' on manual create, 'reassign' on reassignment, 'escalate' when driven by escalation. [assign, reassign, escalate, reopen] fields (object, via --data) — Custom field values keyed by field name. When a create form applies, only its visible fields are accepted. Response fields ('data' envelope is unwrapped — these fields are at the top level): @@ -1022,7 +1022,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le } cmd.Flags().Int64Var(&fChannelID, "channel-id", 0, "Channel to file the incident into. Optional; leave unset for a standalone incident.") cmd.Flags().StringVar(&fDescription, "description", "", "Incident description, up to 1024 characters. (≤1024 chars)") - cmd.Flags().StringVar(&fIncidentSeverity, "incident-severity", "", "Incident severity. (required) [Info, Warning, Critical]") + cmd.Flags().StringVar(&fIncidentSeverity, "incident-severity", "", "Incident severity: 'Info', 'Warning' or 'Critical' (most severe). (required) [Info, Warning, Critical]") cmd.Flags().StringVar(&fTitle, "title", "", "Incident title, up to 512 characters. (≤512 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 @@ -1609,7 +1609,7 @@ Request fields: --page int — Page number starting at 1. (min 0) --limit int — Page size, at most 100. (0-100) --search-after-ctx string — Cursor from a previous response for forward pagination. - --acker-ids []int — Acknowledger member IDs. + --acker-ids []int — Filter by acker member IDs; obtain member IDs from 'POST /member/list'. --asc bool — Ascending order when true. --channel-ids []int — Channel IDs to filter by. Use 0 for standalone (global) incidents. --closer-ids []int — Closer member IDs. Use 0 for automatically closed incidents. @@ -1622,11 +1622,11 @@ Request fields: --is-my-team bool — When true, restrict to incidents in channels owned by the user's teams. --is-rare bool — When true, include only outlier (rare) incidents. --is-snoozed bool — When true, include only snoozed incidents. - --nums []string — Restrict to the given short display identifiers. + --nums []string — Filter by incident short numbers (the numbers shown before incident titles in the console). --progress string — Comma-separated list of progress states to match (e.g. 'Triggered,Processing'). --query string — Full-text search query. - --responder-ids []int — Responder member IDs. - --start-time string (required) — Window start, Unix seconds. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. + --responder-ids []int — Filter by responder member IDs; obtain member IDs from 'POST /member/list'. + --start-time string (required) — Start of the time window (Unix timestamp in seconds). The window with 'end_time' may span at most 31 days and filters by incident start time. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. --team-ids []int — Team IDs; resolved to channels via channel ownership. Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): @@ -1884,7 +1884,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; cmd.Flags().Int64Var(&fP, "page", 0, "Page number starting at 1. (min 0)") cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size, at most 100. (0-100)") cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Cursor from a previous response for forward pagination.") - cmd.Flags().IntSliceVar(&fAckerIDs, "acker-ids", nil, "Acknowledger member IDs.") + cmd.Flags().IntSliceVar(&fAckerIDs, "acker-ids", nil, "Filter by acker member IDs; obtain member IDs from 'POST /member/list'.") cmd.Flags().BoolVar(&fAsc, "asc", false, "Ascending order when true.") cmd.Flags().IntSliceVar(&fChannelIDs, "channel-ids", nil, "Channel IDs to filter by. Use 0 for standalone (global) incidents.") cmd.Flags().IntSliceVar(&fCloserIDs, "closer-ids", nil, "Closer member IDs. Use 0 for automatically closed incidents.") @@ -1898,11 +1898,11 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; cmd.Flags().BoolVar(&fIsMyTeam, "is-my-team", false, "When true, restrict to incidents in channels owned by the user's teams.") cmd.Flags().BoolVar(&fIsRare, "is-rare", false, "When true, include only outlier (rare) incidents.") cmd.Flags().BoolVar(&fIsSnoozed, "is-snoozed", false, "When true, include only snoozed incidents.") - cmd.Flags().StringSliceVar(&fNums, "nums", nil, "Restrict to the given short display identifiers.") + cmd.Flags().StringSliceVar(&fNums, "nums", nil, "Filter by incident short numbers (the numbers shown before incident titles in the console).") cmd.Flags().StringVar(&fProgress, "progress", "", "Comma-separated list of progress states to match (e.g. 'Triggered,Processing').") cmd.Flags().StringVar(&fQuery, "query", "", "Full-text search query.") - cmd.Flags().IntSliceVar(&fResponderIDs, "responder-ids", nil, "Responder member IDs.") - cmd.Flags().StringVar(&fStartTime, "start-time", "", "Window start, Unix seconds. (required) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. (alias: --since)") + cmd.Flags().IntSliceVar(&fResponderIDs, "responder-ids", nil, "Filter by responder member IDs; obtain member IDs from 'POST /member/list'.") + cmd.Flags().StringVar(&fStartTime, "start-time", "", "Start of the time window (Unix timestamp in seconds). The window with 'end_time' may span at most 31 days and filters by incident start time. (required) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. (alias: --since)") cmd.Flags().StringVar(&fSince, "since", "", "Alias for --start-time. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") cmd.Flags().IntSliceVar(&fTeamIDs, "team-ids", nil, "Team IDs; resolved to channels via channel ownership.") 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.") @@ -1922,7 +1922,7 @@ Retrieve multiple incidents by their IDs in a single request. API: POST /incident/list-by-ids (incidentListByIds) Request fields: - --incident-ids []string (required) — Incident IDs to fetch. + --incident-ids []string (required) — Incident IDs to query; obtain them from 'POST /incident/list'. Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): - has_next_page (boolean) (required) — True when more results are available beyond this page. @@ -2109,7 +2109,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; }) }, } - cmd.Flags().StringSliceVar(&fIncidentIDs, "incident-ids", nil, "Incident IDs to fetch. (required)") + cmd.Flags().StringSliceVar(&fIncidentIDs, "incident-ids", nil, "Incident IDs to query; obtain them from 'POST /incident/list'. (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 } @@ -2136,7 +2136,7 @@ Request fields: --owner-id int — Optional new owner member ID for the target incident. --remove-source-incidents bool — When true, soft-delete the source incidents after merging instead of closing them. --source-incident-ids []string (required) — Source incident IDs. The target incident is removed from this set automatically. - --target-incident-id string (required) — Target incident ID that source incidents will be merged into. + --target-incident-id string (required) — Target incident ID of the merge; obtain it from 'POST /incident/list'. --title string — Optional new title for the target incident. (≤512 chars) `, Args: requireBodyFieldOrExactArg("target_incident_id", "target-incident-id"), @@ -2190,7 +2190,7 @@ Request fields: cmd.Flags().Int64Var(&fOwnerID, "owner-id", 0, "Optional new owner member ID for the target incident.") cmd.Flags().BoolVar(&fRemoveSourceIncidents, "remove-source-incidents", false, "When true, soft-delete the source incidents after merging instead of closing them.") cmd.Flags().StringSliceVar(&fSourceIncidentIDs, "source-incident-ids", nil, "Source incident IDs. The target incident is removed from this set automatically. (required)") - cmd.Flags().StringVar(&fTargetIncidentID, "target-incident-id", "", "Target incident ID that source incidents will be merged into. (required)") + cmd.Flags().StringVar(&fTargetIncidentID, "target-incident-id", "", "Target incident ID of the merge; obtain it from 'POST /incident/list'. (required)") cmd.Flags().StringVar(&fTitle, "title", "", "Optional new title for the target incident. (≤512 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 @@ -2418,7 +2418,7 @@ Delete a post-mortem report. API: POST /incident/post-mortem/delete (incidentPostMortemDelete) Request fields: - --post-mortem-id string (required) — Post-mortem ID. + --post-mortem-id string (required) — Post-mortem report ID; obtain it from 'POST /incident/post-mortem/list'. `, Args: requireBodyFieldOrExactArg("post_mortem_id", "post-mortem-id"), Example: ` flashduty incident post-mortem-delete --data '{"post_mortem_id":"8104935102bf89dc01ac638a5261fe7e"}'`, @@ -2452,7 +2452,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fPostMortemID, "post-mortem-id", "", "Post-mortem ID. (required)") + cmd.Flags().StringVar(&fPostMortemID, "post-mortem-id", "", "Post-mortem report ID; obtain it from 'POST /incident/post-mortem/list'. (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 } @@ -2565,8 +2565,8 @@ Request fields: --search-after-ctx string — Cursor from a previous response for forward pagination. --asc bool — Ascending order when true. --channel-ids []int — Channel IDs to restrict the query to. - --created-at-end-seconds string — Filter by creation time: upper bound in seconds. (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. - --created-at-start-seconds string — Filter by creation time: lower bound in seconds. (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. + --created-at-end-seconds string — Upper bound of post-mortem creation time (Unix timestamp in seconds). (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. + --created-at-start-seconds string — Lower bound of post-mortem creation time (Unix timestamp in seconds). (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. --order-by string — Field used to order results. [created_at_seconds, updated_at_seconds] --status string — Report status. Defaults to 'published' on the server when omitted. [drafting, published] --team-ids []int — Team IDs to restrict the query to. @@ -2657,8 +2657,8 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Cursor from a previous response for forward pagination.") cmd.Flags().BoolVar(&fAsc, "asc", false, "Ascending order when true.") cmd.Flags().IntSliceVar(&fChannelIDs, "channel-ids", nil, "Channel IDs to restrict the query to.") - cmd.Flags().StringVar(&fCreatedAtEndSeconds, "created-at-end-seconds", "", "Filter by creation time: upper bound in seconds. (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") - cmd.Flags().StringVar(&fCreatedAtStartSeconds, "created-at-start-seconds", "", "Filter by creation time: lower bound in seconds. (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") + cmd.Flags().StringVar(&fCreatedAtEndSeconds, "created-at-end-seconds", "", "Upper bound of post-mortem creation time (Unix timestamp in seconds). (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") + cmd.Flags().StringVar(&fCreatedAtStartSeconds, "created-at-start-seconds", "", "Lower bound of post-mortem creation time (Unix timestamp in seconds). (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") cmd.Flags().StringVar(&fOrderBy, "order-by", "", "Field used to order results. [created_at_seconds, updated_at_seconds]") cmd.Flags().StringVar(&fStatus, "status", "", "Report status. Defaults to 'published' on the server when omitted. [drafting, published]") cmd.Flags().IntSliceVar(&fTeamIDs, "team-ids", nil, "Team IDs to restrict the query to.") @@ -2798,7 +2798,7 @@ Request fields: --description string — New description. (3-6144 chars) --impact string — New impact description. (3-6144 chars) --incident-id string (required) — Incident ID (MongoDB ObjectID). - --incident-severity string — New severity. [Info, Warning, Critical] + --incident-severity string — New severity: 'Info', 'Warning' or 'Critical' (most severe). [Info, Warning, Critical] --resolution string — New resolution notes. (3-6144 chars) --root-cause string — New root cause analysis. (3-6144 chars) --title string — New incident title. (3-200 chars) @@ -2856,7 +2856,7 @@ Request fields: cmd.Flags().StringVar(&fDescription, "description", "", "New description. (3-6144 chars)") cmd.Flags().StringVar(&fImpact, "impact", "", "New impact description. (3-6144 chars)") cmd.Flags().StringVar(&fIncidentID, "incident-id", "", "Incident ID (MongoDB ObjectID). (required)") - cmd.Flags().StringVar(&fIncidentSeverity, "incident-severity", "", "New severity. [Info, Warning, Critical]") + cmd.Flags().StringVar(&fIncidentSeverity, "incident-severity", "", "New severity: 'Info', 'Warning' or 'Critical' (most severe). [Info, Warning, Critical]") cmd.Flags().StringVar(&fResolution, "resolution", "", "New resolution notes. (3-6144 chars)") cmd.Flags().StringVar(&fRootCause, "root-cause", "", "New root cause analysis. (3-6144 chars)") cmd.Flags().StringVar(&fTitle, "title", "", "New incident title. (3-200 chars)") @@ -3251,7 +3251,7 @@ API: POST /incident/war-room/delete (incidentWarRoomDelete) Request fields: --incident-id string (required) — Incident ID (MongoDB ObjectID). - --integration-id int (required) — IM integration ID. + --integration-id int (required) — IM integration ID; obtain it from 'POST /datasource/im/war-room-enabled/list'. `, Example: ` flashduty incident war-room-delete --data '{"incident_id":"69da451ef77b1b51f40e83ee","integration_id":2490562293131}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -3285,7 +3285,7 @@ Request fields: }, } cmd.Flags().StringVar(&fIncidentID, "incident-id", "", "Incident ID (MongoDB ObjectID). (required)") - cmd.Flags().Int64Var(&fIntegrationID, "integration-id", 0, "IM integration ID. (required)") + cmd.Flags().Int64Var(&fIntegrationID, "integration-id", 0, "IM integration ID; obtain it from 'POST /datasource/im/war-room-enabled/list'. (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 } @@ -3304,7 +3304,7 @@ Retrieve the war room configuration and members for an incident. API: POST /incident/war-room/detail (incidentWarRoomDetail) Request fields: - --chat-id string (required) — Chat/group ID on the IM side. + --chat-id string (required) — Chat ID of the IM group hosting the war room; obtain it from 'POST /incident/war-room/list'. --integration-id int (required) — IM integration ID that hosts the war room. Response fields ('data' envelope is unwrapped — these fields are at the top level): @@ -3343,7 +3343,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fChatID, "chat-id", "", "Chat/group ID on the IM side. (required)") + cmd.Flags().StringVar(&fChatID, "chat-id", "", "Chat ID of the IM group hosting the war room; obtain it from 'POST /incident/war-room/list'. (required)") cmd.Flags().Int64Var(&fIntegrationID, "integration-id", 0, "IM integration ID that hosts the war room. (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 @@ -3872,7 +3872,7 @@ Request fields: --assignee-id int — Restrict results to items assigned to this member ID. Listing by assignee alone requires being that assignee or an account admin. --cursor string — Pagination cursor from a previous response's 'next_cursor'. --incident-id string — Incident ID (MongoDB ObjectID). Also returns follow-ups anchored on the incident's post-mortem. - --item-type string — Restrict results to one item type. [action, follow_up] + --item-type string — Filter by work item type: 'action' action item, 'follow_up' post-mortem follow-up. [action, follow_up] --limit int — Page size, at most 200. Defaults to 50. (1-200) --post-mortem-id string — Post-mortem ID (32-character hex string). Returns follow-ups bound to this post-mortem. @@ -3942,7 +3942,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; cmd.Flags().Int64Var(&fAssigneeID, "assignee-id", 0, "Restrict results to items assigned to this member ID. Listing by assignee alone requires being that assignee or an account admin.") cmd.Flags().StringVar(&fCursor, "cursor", "", "Pagination cursor from a previous response's 'next_cursor'.") cmd.Flags().StringVar(&fIncidentID, "incident-id", "", "Incident ID (MongoDB ObjectID). Also returns follow-ups anchored on the incident's post-mortem.") - cmd.Flags().StringVar(&fItemType, "item-type", "", "Restrict results to one item type. [action, follow_up]") + cmd.Flags().StringVar(&fItemType, "item-type", "", "Filter by work item type: 'action' action item, 'follow_up' post-mortem follow-up. [action, follow_up]") cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size, at most 200. Defaults to 50. (1-200)") cmd.Flags().StringVar(&fPostMortemID, "post-mortem-id", "", "Post-mortem ID (32-character hex string). Returns follow-ups bound to this post-mortem.") 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.") @@ -4289,7 +4289,7 @@ Delete a custom post-mortem template. API: POST /incident/post-mortem/template/delete (postmortem-write-delete-template) Request fields: - --template-id string (required) — Template ID. + --template-id string (required) — Template ID; obtain it from 'POST /incident/post-mortem/template/list'. `, Args: requireBodyFieldOrExactArg("template_id", "template-id"), Example: ` flashduty incident post-mortem-template-delete --data '{"template_id":"post_mortem_custom_tmpl_01"}'`, @@ -4323,7 +4323,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fTemplateID, "template-id", "", "Template ID. (required)") + cmd.Flags().StringVar(&fTemplateID, "template-id", "", "Template ID; obtain it from 'POST /incident/post-mortem/template/list'. (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 } @@ -4438,7 +4438,7 @@ Request fields: --incidents-highest-severity string (required) — Highest severity among linked incidents. --incidents-latest-close-seconds string — Unix timestamp in seconds for the latest linked incident close time. 0 when still open. (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. --incidents-total-duration-seconds int — Total incident duration in seconds. (min 0) - --post-mortem-id string (required) — Post-mortem ID. + --post-mortem-id string (required) — Post-mortem ID; obtain it from 'POST /incident/post-mortem/list'. --responder-ids []int — Responder member IDs to store on the report. `, Args: requireBodyFieldOrExactArg("post_mortem_id", "post-mortem-id"), @@ -4500,7 +4500,7 @@ Request fields: cmd.Flags().StringVar(&fIncidentsHighestSeverity, "incidents-highest-severity", "", "Highest severity among linked incidents. (required)") cmd.Flags().StringVar(&fIncidentsLatestCloseSeconds, "incidents-latest-close-seconds", "", "Unix timestamp in seconds for the latest linked incident close time. 0 when still open. (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") cmd.Flags().Int64Var(&fIncidentsTotalDurationSeconds, "incidents-total-duration-seconds", 0, "Total incident duration in seconds. (min 0)") - cmd.Flags().StringVar(&fPostMortemID, "post-mortem-id", "", "Post-mortem ID. (required)") + cmd.Flags().StringVar(&fPostMortemID, "post-mortem-id", "", "Post-mortem ID; obtain it from 'POST /incident/post-mortem/list'. (required)") cmd.Flags().IntSliceVar(&fResponderIDs, "responder-ids", nil, "Responder member IDs to store on the report.") 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 @@ -4521,7 +4521,7 @@ API: POST /incident/post-mortem/follow-ups/reset (postmortem-write-reset-follow- Request fields: --follow-ups string — Follow-up action items as free text. - --post-mortem-id string (required) — Post-mortem ID. + --post-mortem-id string (required) — Post-mortem ID; obtain it from 'POST /incident/post-mortem/list'. `, Args: requireBodyFieldOrExactArg("post_mortem_id", "post-mortem-id"), Example: ` flashduty incident post-mortem-follow-ups-reset --data '{"follow_ups":"- Add database saturation alert\n- Review cache TTL rollout","post_mortem_id":"8104935102bf89dc01ac638a5261fe7e"}'`, @@ -4559,7 +4559,7 @@ Request fields: }, } cmd.Flags().StringVar(&fFollowUps, "follow-ups", "", "Follow-up action items as free text.") - cmd.Flags().StringVar(&fPostMortemID, "post-mortem-id", "", "Post-mortem ID. (required)") + cmd.Flags().StringVar(&fPostMortemID, "post-mortem-id", "", "Post-mortem ID; obtain it from 'POST /incident/post-mortem/list'. (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 } @@ -4578,8 +4578,8 @@ Set a post-mortem report to drafting or published. API: POST /incident/post-mortem/status/reset (postmortem-write-reset-status) Request fields: - --post-mortem-id string (required) — Post-mortem ID. - --status string (required) — Target report status. [drafting, published] + --post-mortem-id string (required) — Post-mortem ID; obtain it from 'POST /incident/post-mortem/list'. + --status string (required) — Target report status: 'drafting' draft, 'published' published. [drafting, published] `, Args: requireBodyFieldOrExactArg("post_mortem_id", "post-mortem-id"), Example: ` flashduty incident post-mortem-status-reset --data '{"post_mortem_id":"8104935102bf89dc01ac638a5261fe7e","status":"published"}'`, @@ -4616,8 +4616,8 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fPostMortemID, "post-mortem-id", "", "Post-mortem ID. (required)") - cmd.Flags().StringVar(&fStatus, "status", "", "Target report status. (required) [drafting, published]") + cmd.Flags().StringVar(&fPostMortemID, "post-mortem-id", "", "Post-mortem ID; obtain it from 'POST /incident/post-mortem/list'. (required)") + cmd.Flags().StringVar(&fStatus, "status", "", "Target report status: 'drafting' draft, 'published' published. (required) [drafting, published]") 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 } @@ -4636,7 +4636,7 @@ Replace the title of a post-mortem report. API: POST /incident/post-mortem/title/reset (postmortem-write-reset-title) Request fields: - --post-mortem-id string (required) — Post-mortem ID. + --post-mortem-id string (required) — Post-mortem ID; obtain it from 'POST /incident/post-mortem/list'. --title string (required) — New report title. `, Args: requireBodyFieldOrExactArg("post_mortem_id", "post-mortem-id"), @@ -4674,7 +4674,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fPostMortemID, "post-mortem-id", "", "Post-mortem ID. (required)") + cmd.Flags().StringVar(&fPostMortemID, "post-mortem-id", "", "Post-mortem ID; obtain it from 'POST /incident/post-mortem/list'. (required)") cmd.Flags().StringVar(&fTitle, "title", "", "New report title. (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 diff --git a/internal/cli/zz_generated_integrations.go b/internal/cli/zz_generated_integrations.go index 9d000eb..b390963 100644 --- a/internal/cli/zz_generated_integrations.go +++ b/internal/cli/zz_generated_integrations.go @@ -21,7 +21,7 @@ Try to automatically link unbound members to their IM accounts for one integrati API: POST /datasource/im/person/try-link (datasourceImPersonTryLink) Request fields: - --integration-id int (required) — IM integration ID. + --integration-id int (required) — IM integration ID; obtain it from 'POST /datasource/im/war-room-enabled/list'. Response fields ('data' envelope is unwrapped — these fields are at the top level): - new_linked_person_ids (array) (required) — Person IDs newly linked during this call. @@ -54,7 +54,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().Int64Var(&fIntegrationID, "integration-id", 0, "IM integration ID. (required)") + cmd.Flags().Int64Var(&fIntegrationID, "integration-id", 0, "IM integration ID; obtain it from 'POST /datasource/im/war-room-enabled/list'. (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 } @@ -74,7 +74,7 @@ API: POST /webhook/history/detail (webhookHistoryDetail) Request fields: --event-id string (required) — Event ID returned by 'ListWebhookHistory'. - --integration-id int (required) — Integration ID the event belongs to. (min 1) + --integration-id int (required) — Integration ID the event belongs to; available in the items returned by 'POST /webhook/history/list'. (min 1) Response fields ('data' envelope is unwrapped — these fields are at the top level): - attempt (integer) (required) — Attempt sequence number. @@ -125,7 +125,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }, } cmd.Flags().StringVar(&fEventID, "event-id", "", "Event ID returned by 'ListWebhookHistory'. (required)") - cmd.Flags().Int64Var(&fIntegrationID, "integration-id", 0, "Integration ID the event belongs to. (required) (min 1)") + cmd.Flags().Int64Var(&fIntegrationID, "integration-id", 0, "Integration ID the event belongs to; available in the items returned by 'POST /webhook/history/list'. (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 } @@ -154,14 +154,14 @@ API: POST /webhook/history/list (webhookHistoryList) Request fields: --asc bool — Ascending order by 'event_time' when true; otherwise descending. --end-time int (required) — Window end time in Unix milliseconds. Must be greater than 'start_time'. (1000000000000-9999999999999) - --event-types []string — Filter by event type values. - --integration-id int — Filter by integration ID. (min 0) + --event-types []string — Filter by event type codes (e.g. 'i_new' incident created, 'a_new' alert triggered). + --integration-id int — Filter by webhook integration ID. (min 0) --limit int (required) — Page size. (1-100) --orderby string — Sort field. Currently only 'event_time' is supported. [event_time] --ref-id string — Reference ID filter (incident or alert ID). (≤128 chars) --search-after-ctx string — Opaque cursor returned by a previous call for fetching the next page. --start-time int (required) — Window start time in Unix milliseconds. (1000000000000-9999999999999) - --status string — Filter by delivery status. [success, failed] + --status string — Filter by delivery status: 'success' or 'failed'. [success, failed] Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): - items (array) (required) @@ -238,14 +238,14 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; } cmd.Flags().BoolVar(&fAsc, "asc", false, "Ascending order by 'event_time' when true; otherwise descending.") cmd.Flags().Int64Var(&fEndTime, "end-time", 0, "Window end time in Unix milliseconds. Must be greater than 'start_time'. (required) (1000000000000-9999999999999)") - cmd.Flags().StringSliceVar(&fEventTypes, "event-types", nil, "Filter by event type values.") - cmd.Flags().Int64Var(&fIntegrationID, "integration-id", 0, "Filter by integration ID. (min 0)") + cmd.Flags().StringSliceVar(&fEventTypes, "event-types", nil, "Filter by event type codes (e.g. 'i_new' incident created, 'a_new' alert triggered).") + cmd.Flags().Int64Var(&fIntegrationID, "integration-id", 0, "Filter by webhook integration ID. (min 0)") cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size. (required) (1-100)") cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort field. Currently only 'event_time' is supported. [event_time]") cmd.Flags().StringVar(&fRefID, "ref-id", "", "Reference ID filter (incident or alert ID). (≤128 chars)") cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Opaque cursor returned by a previous call for fetching the next page.") cmd.Flags().Int64Var(&fStartTime, "start-time", 0, "Window start time in Unix milliseconds. (required) (1000000000000-9999999999999)") - cmd.Flags().StringVar(&fStatus, "status", "", "Filter by delivery status. [success, failed]") + cmd.Flags().StringVar(&fStatus, "status", "", "Filter by delivery status: 'success' or 'failed'. [success, failed]") 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_issue_preset_severity_rules.go b/internal/cli/zz_generated_issue_preset_severity_rules.go index 6b226bb..b6b41c2 100644 --- a/internal/cli/zz_generated_issue_preset_severity_rules.go +++ b/internal/cli/zz_generated_issue_preset_severity_rules.go @@ -24,11 +24,14 @@ Create a new preset severity rule for a RUM application. API: POST /rum/issue/preset-severity/rules/create (rum-issue-preset-severity-rules-create) Request fields: - --application-id string (required) — RUM application ID. + --application-id string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. --description string — Optional description, up to 512 characters. (≤512 chars) --rule-name string (required) — Rule display name, 1-128 characters. (1-128 chars) --severity string (required) — Severity to assign to errors matching this rule. [Critical, Warning, Info] - filters (array, via --data) (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. + filters (array>, via --data) (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. + - key (string) (required) — Filter attribute key. Only these Error-level attributes are supported for preset severity rules. [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] + - 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] + - 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.). Response fields ('data' envelope is unwrapped — these fields are at the top level): - priority (integer) (required) — Evaluation order assigned to the new rule (always the current lowest precedence, i.e. current max + 1). @@ -72,7 +75,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. (required)") + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. Get application IDs via 'POST /rum/application/list'. (required)") cmd.Flags().StringVar(&fDescription, "description", "", "Optional description, up to 512 characters. (≤512 chars)") cmd.Flags().StringVar(&fRuleName, "rule-name", "", "Rule display name, 1-128 characters. (required) (1-128 chars)") cmd.Flags().StringVar(&fSeverity, "severity", "", "Severity to assign to errors matching this rule. (required) [Critical, Warning, Info]") @@ -94,8 +97,8 @@ Delete a preset severity rule. API: POST /rum/issue/preset-severity/rules/delete (rum-issue-preset-severity-rules-delete) Request fields: - --application-id string (required) — RUM application ID. - --rule-id string (required) — Rule ID. + --application-id string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. + --rule-id string (required) — Rule ID. Get rule IDs via 'POST /rum/issue/preset-severity/rules/list'. `, Example: ` flashduty rum issue-preset-severity-rules-delete --data '{"application_id":"WoyQQ3BohkdtPivubEvE8o","rule_id":"n8mZQ2VbXk4wPRs6DfC9Ay"}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -128,8 +131,8 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. (required)") - cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID. (required)") + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. Get application IDs via 'POST /rum/application/list'. (required)") + cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID. Get rule IDs via 'POST /rum/issue/preset-severity/rules/list'. (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 } @@ -148,8 +151,8 @@ Disable a preset severity rule. API: POST /rum/issue/preset-severity/rules/disable (rum-issue-preset-severity-rules-disable) Request fields: - --application-id string (required) — RUM application ID. - --rule-id string (required) — Rule ID. + --application-id string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. + --rule-id string (required) — Rule ID. Get rule IDs via 'POST /rum/issue/preset-severity/rules/list'. `, Example: ` flashduty rum issue-preset-severity-rules-disable --data '{"application_id":"WoyQQ3BohkdtPivubEvE8o","rule_id":"TAHUYnQmXKzgMS4TFVUKvz"}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -182,8 +185,8 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. (required)") - cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID. (required)") + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. Get application IDs via 'POST /rum/application/list'. (required)") + cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID. Get rule IDs via 'POST /rum/issue/preset-severity/rules/list'. (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 } @@ -202,8 +205,8 @@ Enable a preset severity rule. API: POST /rum/issue/preset-severity/rules/enable (rum-issue-preset-severity-rules-enable) Request fields: - --application-id string (required) — RUM application ID. - --rule-id string (required) — Rule ID. + --application-id string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. + --rule-id string (required) — Rule ID. Get rule IDs via 'POST /rum/issue/preset-severity/rules/list'. `, Example: ` flashduty rum issue-preset-severity-rules-enable --data '{"application_id":"WoyQQ3BohkdtPivubEvE8o","rule_id":"TAHUYnQmXKzgMS4TFVUKvz"}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -236,8 +239,8 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. (required)") - cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID. (required)") + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. Get application IDs via 'POST /rum/application/list'. (required)") + cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID. Get rule IDs via 'POST /rum/issue/preset-severity/rules/list'. (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 } @@ -263,7 +266,7 @@ Request fields: --page int — Zero-based page number. (min 0) --limit int — Page size. Values <= 0 default to 20; values above 100 are capped at 100. (max 100) --search-after-ctx string - --application-id string (required) — RUM application ID. + --application-id string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. --asc bool — Sort ascending when true; results are descending by default. --orderby string — Sort column. Any other value (including omitted) falls back to 'updated_at'. [updated_at, version] @@ -277,7 +280,10 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; - created_by (integer) (required) — Member ID who originally created the rule. - deleted_at (integer) (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. - description (string) (required) — Rule description. May be empty. - - 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. + - 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. + - key (string) (required) — Filter attribute key. Only these Error-level attributes are supported for preset severity rules. [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] + - 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] + - 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.). - id (integer) (required) — Internal auto-increment row ID. Not stable across a history revert — reverting reinserts rows with new IDs. - priority (integer) (required) — Evaluation order at snapshot time; '1' is highest precedence. - rule_id (string) (required) — Unique rule ID. @@ -338,7 +344,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; cmd.Flags().Int64Var(&fP, "page", 0, "Zero-based page number. (min 0)") cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size. Values <= 0 default to 20; values above 100 are capped at 100. (max 100)") cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") - cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. (required)") + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. Get application IDs via 'POST /rum/application/list'. (required)") cmd.Flags().BoolVar(&fAsc, "asc", false, "Sort ascending when true; results are descending by default.") cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort column. Any other value (including omitted) falls back to 'updated_at'. [updated_at, version]") 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.") @@ -359,8 +365,8 @@ Roll back preset severity rules to the state captured in a specific history snap API: POST /rum/issue/preset-severity/rules/history/revert (rum-issue-preset-severity-rules-history-revert) Request fields: - --application-id string (required) — RUM application ID. - --version int (required) — Version number of the snapshot to revert to. (min 1) + --application-id string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. + --version int (required) — Snapshot version number to revert to. Get versions via 'POST /rum/issue/preset-severity/rules/history/list'. (min 1) `, Args: requireBodyFieldOrExactArg("application_id", "application-id"), Example: ` flashduty rum issue-preset-severity-rules-history-revert --data '{"application_id":"WoyQQ3BohkdtPivubEvE8o","version":2}'`, @@ -397,8 +403,8 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. (required)") - cmd.Flags().Int64Var(&fVersion, "version", 0, "Version number of the snapshot to revert to. (required) (min 1)") + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. Get application IDs via 'POST /rum/application/list'. (required)") + cmd.Flags().Int64Var(&fVersion, "version", 0, "Snapshot version number to revert to. Get versions via 'POST /rum/issue/preset-severity/rules/history/list'. (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 } @@ -416,13 +422,16 @@ Return all preset severity rules configured for a RUM application. API: POST /rum/issue/preset-severity/rules/list (rum-issue-preset-severity-rules-list) Request fields: - --application-id string (required) — RUM application ID. + --application-id string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): - items (array) (required) — Rules ordered by evaluation order ('priority' ascending, then 'created_at' ascending). - created_at (integer) (required) — Unix timestamp in milliseconds when the rule was created. - description (string) (required) — Rule description. May be empty. - - 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. + - 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. + - key (string) (required) — Filter attribute key. Only these Error-level attributes are supported for preset severity rules. [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] + - 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] + - 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.). - priority (integer) (required) — Evaluation order among the application's rules. '1' is evaluated first (highest precedence); the first enabled rule whose filters match wins. - rule_id (string) (required) — Unique rule ID. - rule_name (string) (required) — Rule display name. @@ -458,7 +467,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; }) }, } - cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. (required)") + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. Get application IDs via 'POST /rum/application/list'. (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 } @@ -478,8 +487,8 @@ Move one preset severity rule to another rule's position in evaluation order. API: POST /rum/issue/preset-severity/rules/reorder (rum-issue-preset-severity-rules-reorder) Request fields: - --application-id string (required) — RUM application ID. - --drag-rule-id string (required) — ID of the rule being moved. + --application-id string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. + --drag-rule-id string (required) — ID of the rule being moved. Get rule IDs via 'POST /rum/issue/preset-severity/rules/list'. --target-rule-id string (required) — ID of the rule whose evaluation position 'drag_rule_id' moves to. `, Example: ` flashduty rum issue-preset-severity-rules-reorder --data '{"application_id":"WoyQQ3BohkdtPivubEvE8o","drag_rule_id":"n8mZQ2VbXk4wPRs6DfC9Ay","target_rule_id":"TAHUYnQmXKzgMS4TFVUKvz"}'`, @@ -516,8 +525,8 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. (required)") - cmd.Flags().StringVar(&fDragRuleID, "drag-rule-id", "", "ID of the rule being moved. (required)") + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. Get application IDs via 'POST /rum/application/list'. (required)") + cmd.Flags().StringVar(&fDragRuleID, "drag-rule-id", "", "ID of the rule being moved. Get rule IDs via 'POST /rum/issue/preset-severity/rules/list'. (required)") cmd.Flags().StringVar(&fTargetRuleID, "target-rule-id", "", "ID of the rule whose evaluation position 'drag_rule_id' moves to. (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 @@ -540,12 +549,15 @@ Update the name, description, filters, or severity of a preset severity rule. API: POST /rum/issue/preset-severity/rules/update (rum-issue-preset-severity-rules-update) Request fields: - --application-id string (required) — RUM application ID. + --application-id string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. --description string — New description, up to 512 characters. Omit to leave unchanged. (≤512 chars) - --rule-id string (required) — Rule ID to update. + --rule-id string (required) — Rule ID to update. Get rule IDs via 'POST /rum/issue/preset-severity/rules/list'. --rule-name string — New display name, 1-128 characters. Omit to leave unchanged. (1-128 chars) --severity string — New severity. Omit to leave unchanged. [Critical, Warning, Info] - filters (array, via --data) — 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. + filters (array>, via --data) — 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. + - key (string) (required) — Filter attribute key. Only these Error-level attributes are supported for preset severity rules. [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] + - 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] + - 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.). `, Example: ` flashduty rum issue-preset-severity-rules-update --data '{"application_id":"WoyQQ3BohkdtPivubEvE8o","rule_id":"TAHUYnQmXKzgMS4TFVUKvz","rule_name":"Critical crash spikes (updated)","severity":"Critical"}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -587,9 +599,9 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. (required)") + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. Get application IDs via 'POST /rum/application/list'. (required)") cmd.Flags().StringVar(&fDescription, "description", "", "New description, up to 512 characters. Omit to leave unchanged. (≤512 chars)") - cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID to update. (required)") + cmd.Flags().StringVar(&fRuleID, "rule-id", "", "Rule ID to update. Get rule IDs via 'POST /rum/issue/preset-severity/rules/list'. (required)") cmd.Flags().StringVar(&fRuleName, "rule-name", "", "New display name, 1-128 characters. Omit to leave unchanged. (1-128 chars)") cmd.Flags().StringVar(&fSeverity, "severity", "", "New severity. Omit to leave unchanged. [Critical, Warning, Info]") 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.") diff --git a/internal/cli/zz_generated_issues.go b/internal/cli/zz_generated_issues.go index a407dce..4006cbf 100644 --- a/internal/cli/zz_generated_issues.go +++ b/internal/cli/zz_generated_issues.go @@ -21,7 +21,7 @@ Retrieve full details of a single issue by 'issue_id'. API: POST /rum/issue/info (rum-issue-read-info) Request fields: - --issue-id string (required) — Issue ID. + --issue-id string (required) — Issue ID. Get issue IDs via 'POST /rum/issue/list'. Response fields ('data' envelope is unwrapped — these fields are at the top level): - age (integer) @@ -87,7 +87,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fIssueID, "issue-id", "", "Issue ID. (required)") + cmd.Flags().StringVar(&fIssueID, "issue-id", "", "Issue ID. Get issue IDs via 'POST /rum/issue/list'. (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 } @@ -119,21 +119,21 @@ Return a paginated list of RUM error tracking issues matching the given filters. API: POST /rum/issue/list (rum-issue-read-list) Request fields: - --page int — Page number. Default: 1. + --page int — Page number (1-based). Default: 1. --limit int — Page size. Range: 1–100. Default: 20. --search-after-ctx string - --application-ids []string — Filter by application IDs. - --asc bool - --by-intersection bool + --application-ids []string — Filter by application IDs. Get IDs via 'POST /rum/application/list'. + --asc bool — Sort ascending when 'true'; descending by default. + --by-intersection bool — When 'true', match by time-range overlap: return issues still active within the window ('last_seen_timestamp' >= 'start_time') even if created before it. Default 'false' returns only issues created inside the window. --dql string — DQL query for advanced filtering. Cannot be used with 'sql'. --end-time int (required) — End of time range, millisecond timestamp. Maximum range: 183 days. --error-required bool — If 'true', only return issues with at least one associated error event. - --orderby string [created_at, updated_at, session_count, error_count] + --orderby string — Sort field; defaults to 'updated_at' when omitted. [created_at, updated_at, session_count, error_count] --sql string — SQL-style query for advanced filtering. Cannot be used with 'dql'. - --start-time int (required) — Start of time range, millisecond timestamp. - --statuses []string — Filter by statuses. [for_review, reviewed, ignored, resolved] - --suspected-causes []string — Filter by suspected causes. - --team-ids []int — Filter by team IDs. + --start-time int (required) — Start of the time range, Unix epoch milliseconds. + --statuses []string — Filter by status; only the enum values are accepted — any other value is rejected with a parameter error. [for_review, reviewed, ignored, resolved] + --suspected-causes []string — Filter by suspected cause; see the enum for valid values. [api.failed_request, network.error, code.exception, code.invalid_object_access, code.invalid_argument, unknown] + --team-ids []int — Filter by team IDs. Get team IDs via 'POST /team/list'. Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): - has_next_page (boolean) @@ -240,21 +240,21 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; }) }, } - cmd.Flags().Int64Var(&fP, "page", 0, "Page number. Default: 1.") + cmd.Flags().Int64Var(&fP, "page", 0, "Page number (1-based). Default: 1.") cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size. Range: 1–100. Default: 20.") cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") - cmd.Flags().StringSliceVar(&fApplicationIDs, "application-ids", nil, "Filter by application IDs.") - cmd.Flags().BoolVar(&fAsc, "asc", false, "Request field asc") - cmd.Flags().BoolVar(&fByIntersection, "by-intersection", false, "Request field by_intersection") + cmd.Flags().StringSliceVar(&fApplicationIDs, "application-ids", nil, "Filter by application IDs. Get IDs via 'POST /rum/application/list'.") + cmd.Flags().BoolVar(&fAsc, "asc", false, "Sort ascending when 'true'; descending by default.") + cmd.Flags().BoolVar(&fByIntersection, "by-intersection", false, "When 'true', match by time-range overlap: return issues still active within the window ('last_seen_timestamp' >= 'start_time') even if created before it. Default 'false' returns only issues created inside the window.") cmd.Flags().StringVar(&fDql, "dql", "", "DQL query for advanced filtering. Cannot be used with 'sql'.") cmd.Flags().Int64Var(&fEndTime, "end-time", 0, "End of time range, millisecond timestamp. Maximum range: 183 days. (required)") cmd.Flags().BoolVar(&fErrorRequired, "error-required", false, "If 'true', only return issues with at least one associated error event.") - cmd.Flags().StringVar(&fOrderby, "orderby", "", "Request field orderby [created_at, updated_at, session_count, error_count]") + cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort field; defaults to 'updated_at' when omitted. [created_at, updated_at, session_count, error_count]") cmd.Flags().StringVar(&fSql, "sql", "", "SQL-style query for advanced filtering. Cannot be used with 'dql'.") - cmd.Flags().Int64Var(&fStartTime, "start-time", 0, "Start of time range, millisecond timestamp. (required)") - cmd.Flags().StringSliceVar(&fStatuses, "statuses", nil, "Filter by statuses. [for_review, reviewed, ignored, resolved]") - cmd.Flags().StringSliceVar(&fSuspectedCauses, "suspected-causes", nil, "Filter by suspected causes.") - cmd.Flags().IntSliceVar(&fTeamIDs, "team-ids", nil, "Filter by team IDs.") + cmd.Flags().Int64Var(&fStartTime, "start-time", 0, "Start of the time range, Unix epoch milliseconds. (required)") + cmd.Flags().StringSliceVar(&fStatuses, "statuses", nil, "Filter by status; only the enum values are accepted — any other value is rejected with a parameter error. [for_review, reviewed, ignored, resolved]") + cmd.Flags().StringSliceVar(&fSuspectedCauses, "suspected-causes", nil, "Filter by suspected cause; see the enum for valid values. [api.failed_request, network.error, code.exception, code.invalid_object_access, code.invalid_argument, unknown]") + cmd.Flags().IntSliceVar(&fTeamIDs, "team-ids", nil, "Filter by team IDs. Get team IDs via 'POST /team/list'.") 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 } @@ -274,9 +274,9 @@ Update the status or suspected cause of an issue. API: POST /rum/issue/update (rum-issue-write-update) Request fields: - --issue-id string (required) — Issue ID to update. - --status string — New status. [for_review, reviewed, ignored, resolved] - --suspected-cause string — Suspected cause. [api.failed_request, network.error, code.exception, code.invalid_object_access, code.invalid_argument, unknown] + --issue-id string (required) — Issue ID to update. Get issue IDs via 'POST /rum/issue/list'. + --status string — New status. Setting 'resolved' records the resolution time and operator; switching away from 'resolved' clears them. [for_review, reviewed, ignored, resolved] + --suspected-cause string — New suspected cause; setting it marks the cause source as 'user', overriding the automatic classification. [api.failed_request, network.error, code.exception, code.invalid_object_access, code.invalid_argument, unknown] `, Args: requireBodyFieldOrExactArg("issue_id", "issue-id"), Example: ` flashduty rum issue-update --data '{"issue_id":"NHEacQHi2DhXqobr9qPQz9","status":"resolved"}'`, @@ -316,9 +316,9 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fIssueID, "issue-id", "", "Issue ID to update. (required)") - cmd.Flags().StringVar(&fStatus, "status", "", "New status. [for_review, reviewed, ignored, resolved]") - cmd.Flags().StringVar(&fSuspectedCause, "suspected-cause", "", "Suspected cause. [api.failed_request, network.error, code.exception, code.invalid_object_access, code.invalid_argument, unknown]") + cmd.Flags().StringVar(&fIssueID, "issue-id", "", "Issue ID to update. Get issue IDs via 'POST /rum/issue/list'. (required)") + cmd.Flags().StringVar(&fStatus, "status", "", "New status. Setting 'resolved' records the resolution time and operator; switching away from 'resolved' clears them. [for_review, reviewed, ignored, resolved]") + cmd.Flags().StringVar(&fSuspectedCause, "suspected-cause", "", "New suspected cause; setting it marks the cause source as 'user', overriding the automatic classification. [api.failed_request, network.error, code.exception, code.invalid_object_access, code.invalid_argument, unknown]") 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_knowledge.go b/internal/cli/zz_generated_knowledge.go new file mode 100644 index 0000000..a14c7bb --- /dev/null +++ b/internal/cli/zz_generated_knowledge.go @@ -0,0 +1,639 @@ +// Code generated by internal/cmd/cligen; DO NOT EDIT. + +package cli + +import ( + "github.com/spf13/cobra" + + flashduty "github.com/flashcatcloud/go-flashduty" +) + +func genKnowledgeFileReadGetCmd() *cobra.Command { + var dataJSON string + var fPackID string + var fRelPath string + cmd := &cobra.Command{ + Use: "knowledge-file-get", + Short: "Get knowledge file", + Long: `Get knowledge file. + +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. + +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. + - 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'. + - size_bytes (integer) (required) — File size in bytes. + - updated_at_ms (integer) (required) — Unix timestamp in milliseconds when the file was last modified. + - updated_by (integer) (required) — Person ID of the member who last modified the file. +`, + Example: ` flashduty safari knowledge-file-get --data '{"rel_path":"tmp/openapi-example.md"}'`, + 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("pack-id") { + body["pack_id"] = fPackID + } + if cmd.Flags().Changed("rel-path") { + body["rel_path"] = fRelPath + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.KnowledgeFileGetRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Knowledge.FileReadGet(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + 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(&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 genKnowledgeFileReadListCmd() *cobra.Command { + var dataJSON string + var fP int64 + var fLimit int64 + var fSearchAfterCtx string + var fPackID string + cmd := &cobra.Command{ + Use: "knowledge-file-list", + Short: "List knowledge files", + Long: `List knowledge files. + +List the files in a knowledge pack with metadata such as size and checksum. + +API: POST /safari/knowledge/file/list (knowledge-file-read-list) + +Request fields: + --page int — Page number, 1-based. + --limit int — Page size. + --search-after-ctx string + --pack-id string — Knowledge pack ID; defaults to the caller's account-scope pack. + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - files (array) (required) + - 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'. + - size_bytes (integer) (required) — File size in bytes. + - updated_at_ms (integer) (required) — Unix timestamp in milliseconds when the file was last modified. + - updated_by (integer) (required) — Person ID of the member who last modified the file. + - total (integer) (required) — Total number of files in the pack. +`, + Example: ` flashduty safari knowledge-file-list --data '{"pack_id":"kpk_kE49k3FhecfJBwutbshEEc"}'`, + 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("pack-id") { + body["pack_id"] = fPackID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.KnowledgeFileListRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Knowledge.FileReadList(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().Int64Var(&fP, "page", 0, "Page number, 1-based.") + cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size.") + 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(&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 genKnowledgeFileWriteDeleteCmd() *cobra.Command { + var dataJSON string + var fForce bool + var fPackID string + var fRelPath string + cmd := &cobra.Command{ + Use: "knowledge-file-delete", + Short: "Delete knowledge file", + Long: `Delete knowledge file. + +Delete a file from a knowledge pack 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. + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - warnings (array) + - code (string) (required) — Warning code. [unresolved_reference, still_referenced_by] + - ref (string) — Single reference related to the warning. + - refs (array) — Multiple references related to the warning. +`, + Example: ` flashduty safari knowledge-file-delete --data '{"rel_path":"tmp/openapi-delete-example.md"}'`, + 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("force") { + body["force"] = fForce + } + if cmd.Flags().Changed("pack-id") { + body["pack_id"] = fPackID + } + if cmd.Flags().Changed("rel-path") { + body["rel_path"] = fRelPath + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.KnowledgeFileDeleteRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Knowledge.FileWriteDelete(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + 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().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 genKnowledgeFileWritePutCmd() *cobra.Command { + var dataJSON string + var fContentB64 string + var fContentType string + var fPackID string + var fRelPath string + cmd := &cobra.Command{ + Use: "knowledge-file-put", + Short: "Upload knowledge file", + Long: `Upload knowledge file. + +Create or overwrite a file in a knowledge pack 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. + --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. + +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. + - 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'. + - size_bytes (integer) (required) — File size in bytes. + - updated_at_ms (integer) (required) — Unix timestamp in milliseconds when the file was last modified. + - updated_by (integer) (required) — Person ID of the member who last modified the file. + - warnings (array) + - code (string) (required) — Warning code. [unresolved_reference, still_referenced_by] + - ref (string) — Single reference related to the warning. + - refs (array) — Multiple references related to the warning. +`, + Example: ` flashduty safari knowledge-file-put --data '{"content_b64":"IyBPcGVuQVBJIGV4YW1wbGUKVGVtcCBmaWxlIGZvciBBUEkgZG9jcyBleGFtcGxlLgo=","content_type":"text/markdown","rel_path":"tmp/openapi-example.md"}'`, + 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("content-b64") { + body["content_b64"] = fContentB64 + } + if cmd.Flags().Changed("content-type") { + body["content_type"] = fContentType + } + if cmd.Flags().Changed("pack-id") { + body["pack_id"] = fPackID + } + if cmd.Flags().Changed("rel-path") { + body["rel_path"] = fRelPath + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.KnowledgeFilePutRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Knowledge.FileWritePut(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fContentB64, "content-b64", "", "Base64-encoded file content; must decode to valid UTF-8 text.") + 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(&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 genKnowledgePackReadGetCmd() *cobra.Command { + var dataJSON string + cmd := &cobra.Command{ + Use: "knowledge-get", + Short: "Get account knowledge pack", + Long: `Get account knowledge pack. + +Return the account-scope knowledge pack metadata and its file list. + +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) + - 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'. + - size_bytes (integer) (required) — File size in bytes. + - updated_at_ms (integer) (required) — Unix timestamp in milliseconds when the file was last modified. + - 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 (integer) (required) — Unix timestamp in milliseconds when the pack was created. + - created_by (integer) (required) — Person ID of the member who created 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] + - 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); empty for account scope. + - total_bytes (integer) (required) — Total size of all files in bytes. + - updated_at_ms (integer) (required) — Unix timestamp in milliseconds when the pack was last modified. + - version (integer) (required) — Pack version, incremented on every file change. +`, + Example: ` flashduty safari knowledge-get --data '{}'`, + 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.Knowledge.PackReadGet(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 genKnowledgePackReadListCmd() *cobra.Command { + var dataJSON string + var fP int64 + var fLimit int64 + var fSearchAfterCtx string + var fIncludeAccount bool + var fQuery string + var fScope string + var fTeamIDs []int + cmd := &cobra.Command{ + Use: "knowledge-pack-list", + Short: "List knowledge packs", + Long: `List knowledge packs. + +List knowledge packs visible to the caller across account and team scopes. + +API: POST /safari/knowledge/pack/list (knowledge-pack-read-list) + +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, and team name. (≤128 chars) + --scope string — Restrict to one scope; 'all' (default) overrides 'include_account'. [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) + - account_id (integer) (required) — Account that owns the pack. + - can_edit (boolean) (required) — Whether the caller can edit this pack. + - created_at_ms (integer) (required) — Unix timestamp in milliseconds when the pack was created. + - created_by (integer) (required) — Person ID of the member who created 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] + - 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); empty for account scope. + - total_bytes (integer) (required) — Total size of all files in bytes. + - updated_at_ms (integer) (required) — Unix timestamp in milliseconds when the pack was last modified. + - version (integer) (required) — Pack version, incremented on every file change. + - total (integer) (required) — Total number of packs 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 { + 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("include-account") { + body["include_account"] = fIncludeAccount + } + if cmd.Flags().Changed("query") { + body["query"] = fQuery + } + if cmd.Flags().Changed("scope") { + body["scope"] = fScope + } + if cmd.Flags().Changed("team-ids") { + body["team_ids"] = fTeamIDs + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.KnowledgePackListRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Knowledge.PackReadList(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + 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, and team name. (≤128 chars)") + cmd.Flags().StringVar(&fScope, "scope", "", "Restrict to one scope; 'all' (default) overrides 'include_account'. [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 +} + +func genKnowledgePackWriteDeleteCmd() *cobra.Command { + var dataJSON string + var fPackID string + cmd := &cobra.Command{ + Use: "knowledge-pack-delete ", + Short: "Delete knowledge pack", + Long: `Delete knowledge pack. + +Delete a knowledge pack 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. + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - ok (boolean) (required) — True when the pack was deleted. +`, + Args: requireBodyFieldOrExactArg("pack_id", "pack-id"), + Example: ` flashduty safari knowledge-pack-delete --data '{"pack_id":"kpk_YqHXPTEUHQFGepUfRS7vsh"}'`, + 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, "pack_id", "string"); err != nil { + return err + } + if cmd.Flags().Changed("pack-id") { + body["pack_id"] = fPackID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.KnowledgePackDeleteRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Knowledge.PackWriteDelete(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fPackID, "pack-id", "", "Knowledge pack 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 +} + +func genKnowledgePackWriteEnsureCmd() *cobra.Command { + var dataJSON string + var fScope string + var fScopeID int64 + cmd := &cobra.Command{ + Use: "knowledge-pack-ensure", + Short: "Ensure knowledge pack", + Long: `Ensure knowledge pack. + +Idempotently create the knowledge pack 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. [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 (integer) (required) — Unix timestamp in milliseconds when the pack was created. + - created_by (integer) (required) — Person ID of the member who created 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] + - 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); empty for account scope. + - total_bytes (integer) (required) — Total size of all files in bytes. + - updated_at_ms (integer) (required) — Unix timestamp in milliseconds when the pack was last modified. + - version (integer) (required) — Pack 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 { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if cmd.Flags().Changed("scope") { + body["scope"] = fScope + } + if cmd.Flags().Changed("scope-id") { + body["scope_id"] = fScopeID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.KnowledgePackEnsureRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Knowledge.PackWriteEnsure(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fScope, "scope", "", "Scope of the pack to ensure. (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 +} + +func genKnowledgePackWriteUpdateCmd() *cobra.Command { + var dataJSON string + var fPackID string + var fScope string + var fScopeID int64 + cmd := &cobra.Command{ + Use: "knowledge-pack-update ", + Short: "Update knowledge pack", + Long: `Update knowledge pack. + +Move a knowledge pack 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] + --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 (integer) (required) — Unix timestamp in milliseconds when the pack was created. + - created_by (integer) (required) — Person ID of the member who created 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] + - 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); empty for account scope. + - total_bytes (integer) (required) — Total size of all files in bytes. + - updated_at_ms (integer) (required) — Unix timestamp in milliseconds when the pack was last modified. + - version (integer) (required) — Pack 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}'`, + 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, "pack_id", "string"); err != nil { + return err + } + if cmd.Flags().Changed("pack-id") { + body["pack_id"] = fPackID + } + if cmd.Flags().Changed("scope") { + body["scope"] = fScope + } + if cmd.Flags().Changed("scope-id") { + body["scope_id"] = fScopeID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.KnowledgePackUpdateRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Knowledge.PackWriteUpdate(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + 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().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 +} + +func registerGeneratedKnowledge(root *cobra.Command) { + gSafari := genGroup(root, "safari", "AI SRE API") + genAddLeaf(gSafari, genKnowledgeFileReadGetCmd()) + genAddLeaf(gSafari, genKnowledgeFileReadListCmd()) + genAddLeaf(gSafari, genKnowledgeFileWriteDeleteCmd()) + genAddLeaf(gSafari, genKnowledgeFileWritePutCmd()) + genAddLeaf(gSafari, genKnowledgePackReadGetCmd()) + genAddLeaf(gSafari, genKnowledgePackReadListCmd()) + genAddLeaf(gSafari, genKnowledgePackWriteDeleteCmd()) + genAddLeaf(gSafari, genKnowledgePackWriteEnsureCmd()) + genAddLeaf(gSafari, genKnowledgePackWriteUpdateCmd()) +} diff --git a/internal/cli/zz_generated_manifest.go b/internal/cli/zz_generated_manifest.go index 96ef7cb..40c66b7 100644 --- a/internal/cli/zz_generated_manifest.go +++ b/internal/cli/zz_generated_manifest.go @@ -134,6 +134,15 @@ var generatedOpIDs = []string{ "insightResponderExport", "insightTeamExport", "insightTopkAlertsByLabel", + "knowledge-file-read-get", + "knowledge-file-read-list", + "knowledge-file-write-delete", + "knowledge-file-write-put", + "knowledge-pack-read-get", + "knowledge-pack-read-list", + "knowledge-pack-write-delete", + "knowledge-pack-write-ensure", + "knowledge-pack-write-update", "mapping-api-read-info", "mapping-api-read-list", "mapping-api-write-create", diff --git a/internal/cli/zz_generated_mcp_servers.go b/internal/cli/zz_generated_mcp_servers.go index d2fd9ae..1da72d8 100644 --- a/internal/cli/zz_generated_mcp_servers.go +++ b/internal/cli/zz_generated_mcp_servers.go @@ -21,7 +21,7 @@ Get one MCP server and run a live probe of its tool list. API: POST /safari/mcp/server/get (mcp-read-server-get) Request fields: - --server-id string (required) — Target MCP server ID. + --server-id string (required) — Target MCP server ID, from the list returned by 'POST /safari/mcp/server/list'. Response fields ('data' envelope is unwrapped — these fields are at the top level): - account_id (integer) (required) — Owning account ID. @@ -87,7 +87,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fServerID, "server-id", "", "Target MCP server ID. (required)") + cmd.Flags().StringVar(&fServerID, "server-id", "", "Target MCP server ID, from the list returned by 'POST /safari/mcp/server/list'. (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 } @@ -254,9 +254,9 @@ Request fields: --secret-schema string — JSON secret schema; required when auth_mode=per_user_secret. --server-name string (required) — MCP server name, unique within the account. (1-255 chars) --source-template-name string — Marketplace template name when created from a connector template. - --status string — Initial status. [enabled, disabled] + --status string — Initial status: 'enabled' (default) or 'disabled' (created but kept off). [enabled, disabled] --team-id int — Team scope: 0 = account-wide; >0 = team. - --transport string (required) — Transport protocol. [stdio, sse, streamable-http] + --transport string (required) — Transport protocol: 'stdio' launches a local process via 'command'/'args'/'env', 'sse' / 'streamable-http' connects to a remote service via 'url'/'headers'. [stdio, sse, streamable-http] --url string — Server URL (sse / streamable-http transport). env (object, via --data) — Environment variables (stdio transport). headers (object, via --data) — HTTP headers (sse / streamable-http). @@ -386,9 +386,9 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().StringVar(&fSecretSchema, "secret-schema", "", "JSON secret schema; required when auth_mode=per_user_secret.") cmd.Flags().StringVar(&fServerName, "server-name", "", "MCP server name, unique within the account. (required) (1-255 chars)") cmd.Flags().StringVar(&fSourceTemplateName, "source-template-name", "", "Marketplace template name when created from a connector template.") - cmd.Flags().StringVar(&fStatus, "status", "", "Initial status. [enabled, disabled]") + cmd.Flags().StringVar(&fStatus, "status", "", "Initial status: 'enabled' (default) or 'disabled' (created but kept off). [enabled, disabled]") cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Team scope: 0 = account-wide; >0 = team.") - cmd.Flags().StringVar(&fTransport, "transport", "", "Transport protocol. (required) [stdio, sse, streamable-http]") + cmd.Flags().StringVar(&fTransport, "transport", "", "Transport protocol: 'stdio' launches a local process via 'command'/'args'/'env', 'sse' / 'streamable-http' connects to a remote service via 'url'/'headers'. (required) [stdio, sse, streamable-http]") cmd.Flags().StringVar(&fURL, "url", "", "Server URL (sse / streamable-http transport).") 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 @@ -407,7 +407,7 @@ Delete an MCP server by ID. API: POST /safari/mcp/server/delete (mcp-write-server-delete) Request fields: - --server-id string (required) — Target MCP server ID. + --server-id string (required) — Target MCP server ID, from the list returned by 'POST /safari/mcp/server/list'. `, Args: requireBodyFieldOrExactArg("server_id", "server-id"), Example: ` flashduty safari mcp-server-delete --data '{"server_id":"mcp_4kP9wQ2nLceRtY7uVb3xA1"}'`, @@ -437,7 +437,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fServerID, "server-id", "", "Target MCP server ID. (required)") + cmd.Flags().StringVar(&fServerID, "server-id", "", "Target MCP server ID, from the list returned by 'POST /safari/mcp/server/list'. (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 } @@ -455,7 +455,7 @@ Disable an enabled MCP server. API: POST /safari/mcp/server/disable (mcp-write-server-disable) Request fields: - --server-id string (required) — Target MCP server ID. + --server-id string (required) — Target MCP server ID, from the list returned by 'POST /safari/mcp/server/list'. `, Args: requireBodyFieldOrExactArg("server_id", "server-id"), Example: ` flashduty safari mcp-server-disable --data '{"server_id":"mcp_4kP9wQ2nLceRtY7uVb3xA1"}'`, @@ -485,7 +485,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fServerID, "server-id", "", "Target MCP server ID. (required)") + cmd.Flags().StringVar(&fServerID, "server-id", "", "Target MCP server ID, from the list returned by 'POST /safari/mcp/server/list'. (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 } @@ -503,7 +503,7 @@ Enable a disabled MCP server. API: POST /safari/mcp/server/enable (mcp-write-server-enable) Request fields: - --server-id string (required) — Target MCP server ID. + --server-id string (required) — Target MCP server ID, from the list returned by 'POST /safari/mcp/server/list'. `, Args: requireBodyFieldOrExactArg("server_id", "server-id"), Example: ` flashduty safari mcp-server-enable --data '{"server_id":"mcp_4kP9wQ2nLceRtY7uVb3xA1"}'`, @@ -533,7 +533,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fServerID, "server-id", "", "Target MCP server ID. (required)") + cmd.Flags().StringVar(&fServerID, "server-id", "", "Target MCP server ID, from the list returned by 'POST /safari/mcp/server/list'. (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 } @@ -569,22 +569,22 @@ API: POST /safari/mcp/server/update (mcp-write-server-update) Request fields: --allow-insecure-oauth-http bool — Allow OAuth token exchange over plaintext HTTP. Omit to leave unchanged. --allow-insecure-tls-skip-verify bool — Skip TLS certificate verification. Omit to leave unchanged. - --args []string — Command arguments (stdio transport). + --args []string — Command arguments ('stdio' transport); replaces the whole list — pass '[]' to clear, omit to leave unchanged. --auth-mode string — Authentication mode: shared (default), per_user_secret, or per_user_oauth. --call-timeout int — Tool-call timeout in seconds. 0 = default (60s). --command string — Executable command (stdio transport). --connect-timeout int — Connection timeout in seconds. 0 = default (10s). - --description string — New description. (1-1024 chars) + --description string — New description; omitted or empty leaves it unchanged. (1-1024 chars) --environment-id string — Runner ID paired with environment_kind=byoc. Omit (null) to leave the current binding unchanged. --environment-kind string — Reassign the runner binding: 'byoc' (with environment_id) or empty string to reset to automatic selection. Omit (null) to leave the current binding unchanged. --oauth-metadata string — JSON OAuth metadata; reserved for per_user_oauth. --secret-schema string — JSON secret schema; required when auth_mode=per_user_secret. - --server-id string (required) — Target MCP server ID. - --server-name string — New name. (1-255 chars) + --server-id string (required) — Target MCP server ID, from the list returned by 'POST /safari/mcp/server/list'. + --server-name string — New name; omitted or empty leaves it unchanged. (1-255 chars) --team-id int — Reassign team scope: 0 = account-wide; >0 = team. Omit to leave unchanged. - --transport string — Transport protocol. [stdio, sse, streamable-http] + --transport string — Transport protocol; when switching, also supply the matching fields ('command'/'args'/'env' for 'stdio', 'url'/'headers' for 'sse' / 'streamable-http'); omitted or empty leaves it unchanged. [stdio, sse, streamable-http] --url string — Server URL (sse / streamable-http transport). - env (object, via --data) — Environment variables (stdio transport). + env (object, via --data) — Environment variables ('stdio' transport); replaces the whole map, but masked secret values sent back as-is keep their stored values; omit to leave unchanged. headers (object, via --data) — HTTP headers (sse / streamable-http). Response fields ('data' envelope is unwrapped — these fields are at the top level): @@ -701,20 +701,20 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le } cmd.Flags().BoolVar(&fAllowInsecureOauthHTTP, "allow-insecure-oauth-http", false, "Allow OAuth token exchange over plaintext HTTP. Omit to leave unchanged.") cmd.Flags().BoolVar(&fAllowInsecureTlsSkipVerify, "allow-insecure-tls-skip-verify", false, "Skip TLS certificate verification. Omit to leave unchanged.") - cmd.Flags().StringSliceVar(&fArgs, "args", nil, "Command arguments (stdio transport).") + cmd.Flags().StringSliceVar(&fArgs, "args", nil, "Command arguments ('stdio' transport); replaces the whole list — pass '[]' to clear, omit to leave unchanged.") cmd.Flags().StringVar(&fAuthMode, "auth-mode", "", "Authentication mode: shared (default), per_user_secret, or per_user_oauth.") cmd.Flags().Int64Var(&fCallTimeout, "call-timeout", 0, "Tool-call timeout in seconds. 0 = default (60s).") cmd.Flags().StringVar(&fCommand, "command", "", "Executable command (stdio transport).") cmd.Flags().Int64Var(&fConnectTimeout, "connect-timeout", 0, "Connection timeout in seconds. 0 = default (10s).") - cmd.Flags().StringVar(&fDescription, "description", "", "New description. (1-1024 chars)") + cmd.Flags().StringVar(&fDescription, "description", "", "New description; omitted or empty leaves it unchanged. (1-1024 chars)") cmd.Flags().StringVar(&fEnvironmentID, "environment-id", "", "Runner ID paired with environment_kind=byoc. Omit (null) to leave the current binding unchanged.") cmd.Flags().StringVar(&fEnvironmentKind, "environment-kind", "", "Reassign the runner binding: 'byoc' (with environment_id) or empty string to reset to automatic selection. Omit (null) to leave the current binding unchanged.") cmd.Flags().StringVar(&fOauthMetadata, "oauth-metadata", "", "JSON OAuth metadata; reserved for per_user_oauth.") cmd.Flags().StringVar(&fSecretSchema, "secret-schema", "", "JSON secret schema; required when auth_mode=per_user_secret.") - cmd.Flags().StringVar(&fServerID, "server-id", "", "Target MCP server ID. (required)") - cmd.Flags().StringVar(&fServerName, "server-name", "", "New name. (1-255 chars)") + cmd.Flags().StringVar(&fServerID, "server-id", "", "Target MCP server ID, from the list returned by 'POST /safari/mcp/server/list'. (required)") + cmd.Flags().StringVar(&fServerName, "server-name", "", "New name; omitted or empty leaves it unchanged. (1-255 chars)") cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Reassign team scope: 0 = account-wide; >0 = team. Omit to leave unchanged.") - cmd.Flags().StringVar(&fTransport, "transport", "", "Transport protocol. [stdio, sse, streamable-http]") + cmd.Flags().StringVar(&fTransport, "transport", "", "Transport protocol; when switching, also supply the matching fields ('command'/'args'/'env' for 'stdio', 'url'/'headers' for 'sse' / 'streamable-http'); omitted or empty leaves it unchanged. [stdio, sse, streamable-http]") cmd.Flags().StringVar(&fURL, "url", "", "Server URL (sse / streamable-http transport).") 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_members.go b/internal/cli/zz_generated_members.go index 6ebbfe5..7950ccb 100644 --- a/internal/cli/zz_generated_members.go +++ b/internal/cli/zz_generated_members.go @@ -28,12 +28,12 @@ API: POST /member/delete (memberDelete) Request fields: --country-code string — Phone country code, used with phone - --email string — Email address + --email string — Email address. Only used when neither 'member_id' nor 'member_name' is provided --is-force bool — Force delete. Defaults to false, which checks for references from escalation rules, schedules, etc. Set to true to skip the reference check and delete immediately - --member-id int — Member ID - --member-name string — Member name - --phone string — Phone number - --ref-id string — External reference ID + --member-id int — Member ID. When several lookup fields are provided, the first non-empty one wins in the order 'member_id' > 'member_name' > 'email' > 'phone' > 'ref_id' + --member-name string — Member name. Only used when 'member_id' is not provided + --phone string — Phone number. Only used when 'member_id', 'member_name', and 'email' are all absent + --ref-id string — External reference ID. Only used when all other lookup fields are absent `, Example: ` flashduty member delete --data '{"member_id":5068740052131}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -82,12 +82,12 @@ Request fields: }, } cmd.Flags().StringVar(&fCountryCode, "country-code", "", "Phone country code, used with phone") - cmd.Flags().StringVar(&fEmail, "email", "", "Email address") + cmd.Flags().StringVar(&fEmail, "email", "", "Email address. Only used when neither 'member_id' nor 'member_name' is provided") cmd.Flags().BoolVar(&fIsForce, "is-force", false, "Force delete. Defaults to false, which checks for references from escalation rules, schedules, etc. Set to true to skip the reference check and delete immediately") - cmd.Flags().Int64Var(&fMemberID, "member-id", 0, "Member ID") - cmd.Flags().StringVar(&fMemberName, "member-name", "", "Member name") - cmd.Flags().StringVar(&fPhone, "phone", "", "Phone number") - cmd.Flags().StringVar(&fRefID, "ref-id", "", "External reference ID") + cmd.Flags().Int64Var(&fMemberID, "member-id", 0, "Member ID. When several lookup fields are provided, the first non-empty one wins in the order 'member_id' > 'member_name' > 'email' > 'phone' > 'ref_id'") + cmd.Flags().StringVar(&fMemberName, "member-name", "", "Member name. Only used when 'member_id' is not provided") + cmd.Flags().StringVar(&fPhone, "phone", "", "Phone number. Only used when 'member_id', 'member_name', and 'email' are all absent") + cmd.Flags().StringVar(&fRefID, "ref-id", "", "External reference ID. Only used when all other lookup fields are absent") 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 } @@ -218,7 +218,7 @@ Batch invite new members to the organization by email or phone. API: POST /member/invite (memberInvite) Request fields: - --from string — Invite source context + --from string — Invite source. Only takes effect when the account has member invites disabled and the value is 'api': members are created directly in the enabled state with email/phone marked verified and no invitation sent. Any other value follows the normal invite flow members (array, via --data) (required) — Members to invite (max 20) - country_code (string) — Country code - email (string) — Email address @@ -258,7 +258,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; }) }, } - cmd.Flags().StringVar(&fFrom, "from", "", "Invite source context") + cmd.Flags().StringVar(&fFrom, "from", "", "Invite source. Only takes effect when the account has member invites disabled and the value is 'api': members are created directly in the enabled state with email/phone marked verified and no invitation sent. Any other value follows the normal invite flow") 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 } @@ -282,13 +282,13 @@ Return a paginated list of organization members. API: POST /member/list (memberList) Request fields: - --page int — Page number (min 1) - --limit int — Page size (1-100) + --page int — Page number, 1-based (min 1) + --limit int — Page size. Defaults to 100 on the server when omitted or 0 (1-100) --search-after-ctx string - --asc bool — Ascending order - --orderby string — Sort field [created_at, updated_at] - --query string — Search keyword - --role-id int — Filter by role ID + --asc bool — Ascending order. Default: false (descending) + --orderby string — Sort field. Default: 'updated_at' [created_at, updated_at] + --query string — Substring match on member name or email; if the keyword parses as a phone number, an exact phone match is also applied + --role-id int — Filter by role ID. Get role IDs from 'POST /role/list' (built-in roles: 2=Admin, 6=Responder, 8=Viewer) Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): - items (array) — Member items @@ -355,13 +355,13 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; }) }, } - cmd.Flags().Int64Var(&fP, "page", 0, "Page number (min 1)") - cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size (1-100)") + cmd.Flags().Int64Var(&fP, "page", 0, "Page number, 1-based (min 1)") + cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size. Defaults to 100 on the server when omitted or 0 (1-100)") cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") - cmd.Flags().BoolVar(&fAsc, "asc", false, "Ascending order") - cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort field [created_at, updated_at]") - cmd.Flags().StringVar(&fQuery, "query", "", "Search keyword") - cmd.Flags().Int64Var(&fRoleID, "role-id", 0, "Filter by role ID") + cmd.Flags().BoolVar(&fAsc, "asc", false, "Ascending order. Default: false (descending)") + cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort field. Default: 'updated_at' [created_at, updated_at]") + cmd.Flags().StringVar(&fQuery, "query", "", "Substring match on member name or email; if the keyword parses as a phone number, an exact phone match is also applied") + cmd.Flags().Int64Var(&fRoleID, "role-id", 0, "Filter by role ID. Get role IDs from 'POST /role/list' (built-in roles: 2=Admin, 6=Responder, 8=Viewer)") 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 } @@ -392,7 +392,7 @@ Request fields: --member-name string — Member name used to identify the member. --phone string — Phone number used to identify the member. Include country_code when the number is not in E.164 format. --ref-id string — External reference ID used to identify the member. - updates (object, via --data) (required) — Member profile fields to write. Omitted fields remain unchanged. + updates (object, via --data) (required) — New profile values to write. Must include at least one field. - avatar (string) — New avatar URL. (≤499 chars) - country_code (string) — Country or region code for the new phone number. - email (string) — New email address. @@ -533,7 +533,7 @@ API: POST /member/role/update (memberUpdateRole) Request fields: --member-id int (required) — Member ID - --role-ids []int (required) — New set of role IDs + --role-ids []int (required) — New role ID set. Replaces the member's existing roles entirely (not additive); get IDs from 'POST /role/list'. Leave empty to reset to the built-in Viewer role (ID 8) `, Args: requireBodyFieldOrArgs("role_ids", "role-ids"), Example: ` flashduty member role-update --data '{"member_id":5068740052131,"role_ids":[2,6]}'`, @@ -571,7 +571,7 @@ Request fields: }, } cmd.Flags().Int64Var(&fMemberID, "member-id", 0, "Member ID (required)") - cmd.Flags().IntSliceVar(&fRoleIDs, "role-ids", nil, "New set of role IDs (required)") + cmd.Flags().IntSliceVar(&fRoleIDs, "role-ids", nil, "New role ID set. Replaces the member's existing roles entirely (not additive); get IDs from 'POST /role/list'. Leave empty to reset to the built-in Viewer role (ID 8) (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 } @@ -589,7 +589,7 @@ Return profile information for a batch of person IDs (members or accounts). API: POST /person/infos (personInfos) Request fields: - --person-ids []int (required) — List of person IDs + --person-ids []int (required) — Person IDs to look up — these are member IDs (get them from 'POST /member/list'). Passing the account ID returns the account principal; unknown IDs are ignored Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): - items (array) — Person profiles @@ -634,7 +634,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; }) }, } - cmd.Flags().IntSliceVar(&fPersonIDs, "person-ids", nil, "List of person IDs (required)") + cmd.Flags().IntSliceVar(&fPersonIDs, "person-ids", nil, "Person IDs to look up — these are member IDs (get them from 'POST /member/list'). Passing the account ID returns the account principal; unknown IDs are ignored (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 } diff --git a/internal/cli/zz_generated_monitor_utilities.go b/internal/cli/zz_generated_monitor_utilities.go index b6fd5e5..1208054 100644 --- a/internal/cli/zz_generated_monitor_utilities.go +++ b/internal/cli/zz_generated_monitor_utilities.go @@ -28,7 +28,7 @@ Request fields: --ds-name string (required) — Datasource display name as configured in the account. --ds-type string (required) — Datasource type, e.g. 'prometheus', 'loki', 'elasticsearch'. --expr string (required) — Query expression. Format depends on 'ds_type' (PromQL for Prometheus, LogQL for Loki, etc.). - args (object, via --data) — Additional type-specific query arguments. + args (object, via --data) — Additional datasource-type-specific query arguments (string keys and values), e.g. 'sls.project' and 'sls.logstore' for SLS, 'es.type' for Elasticsearch, 'loki.type' and 'loki.limit' for Loki. `, Example: ` flashduty monit preview-sync --data '{"delay_seconds":0,"ds_name":"Prometheus Prod","ds_type":"prometheus","expr":"rate(http_requests_total[5m])"}'`, RunE: func(cmd *cobra.Command, args []string) error { diff --git a/internal/cli/zz_generated_notification_templates.go b/internal/cli/zz_generated_notification_templates.go index d2e95e1..597bb5d 100644 --- a/internal/cli/zz_generated_notification_templates.go +++ b/internal/cli/zz_generated_notification_templates.go @@ -110,7 +110,7 @@ Request fields: --limit int — Page size. Capped at 100. (1-100) --search-after-ctx string --asc bool — Ascending sort order. - --creator-id int — Filter by creator member ID. + --creator-id int — Filter by creator member ID; obtain member IDs from 'POST /member/list'. --is-my-team bool — When true, only return templates scoped to teams the caller belongs to. --orderby string — Sort field. [created_at, updated_at] --query string — Regex or substring match on template_name. @@ -200,7 +200,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size. Capped at 100. (1-100)") cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") cmd.Flags().BoolVar(&fAsc, "asc", false, "Ascending sort order.") - cmd.Flags().Int64Var(&fCreatorID, "creator-id", 0, "Filter by creator member ID.") + cmd.Flags().Int64Var(&fCreatorID, "creator-id", 0, "Filter by creator member ID; obtain member IDs from 'POST /member/list'.") cmd.Flags().BoolVar(&fIsMyTeam, "is-my-team", false, "When true, only return templates scoped to teams the caller belongs to.") cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort field. [created_at, updated_at]") cmd.Flags().StringVar(&fQuery, "query", "", "Regex or substring match on template_name.") @@ -227,7 +227,7 @@ Request fields: --content string (required) — Template content to render. --incident-id string — Incident ID whose data is used to render the template; mock data is used when omitted. A MongoDB ObjectID hex string. --type string (required) — Template channel type that selects the rendering engine. - incident_card_hidden_fields (object, via --data) — Incident-card fields to hide, keyed by IM app type. Only supported IM app types and field names are accepted. + incident_card_hidden_fields (object, via --data) — Incident card fields to hide per IM app when previewing. Response fields ('data' envelope is unwrapped — these fields are at the top level): - content (string) — Rendered template output, present when success is true. @@ -322,7 +322,7 @@ Request fields: --wecom string — WeCom robot message template source. --wecom-app string — WeCom app message template source. --zoom string — Zoom bot message template source. - incident_card_hidden_fields (object, via --data) — Incident-card fields to hide, keyed by IM app type. Only supported IM app types and field names are accepted. + incident_card_hidden_fields (object, via --data) — Incident card fields hidden per IM app type. Response fields ('data' envelope is unwrapped — these fields are at the top level): - template_id (string) (required) — Newly created template ID. @@ -521,13 +521,13 @@ Request fields: --team-id int — Team scope. 0 for account-wide. --teams-app string — Microsoft Teams app message template source. --telegram string — Telegram bot message template source. - --template-id string (required) — Target template ID. + --template-id string (required) — Target template ID; obtain it from 'POST /template/list'. --template-name string (required) — Template name. 1–39 characters. (1-39 chars) --voice string — Voice call script template source. --wecom string — WeCom robot message template source. --wecom-app string — WeCom app message template source. --zoom string — Zoom bot message template source. - incident_card_hidden_fields (object, via --data) — Incident-card fields to hide, keyed by IM app type. Only supported IM app types and field names are accepted. + incident_card_hidden_fields (object, via --data) — Incident card fields hidden per IM app type. `, Args: requireBodyFieldOrExactArg("template_id", "template-id"), Example: ` flashduty template update --data '{"description":"Updated description.","email":"Incident {{ .IncidentName }} on {{ .Severity }}","sms":"[Flashduty] {{ .IncidentName }} — {{ .Severity }}","template_id":"6605a1b2c3d4e5f6a7b8c9d0","template_name":"Prod incident default"}'`, @@ -628,7 +628,7 @@ Request fields: 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.") cmd.Flags().StringVar(&fTelegram, "telegram", "", "Telegram bot message template source.") - cmd.Flags().StringVar(&fTemplateID, "template-id", "", "Target template ID. (required)") + cmd.Flags().StringVar(&fTemplateID, "template-id", "", "Target template ID; obtain it from 'POST /template/list'. (required)") cmd.Flags().StringVar(&fTemplateName, "template-name", "", "Template name. 1–39 characters. (required) (1-39 chars)") cmd.Flags().StringVar(&fVoice, "voice", "", "Voice call script template source.") cmd.Flags().StringVar(&fWecom, "wecom", "", "WeCom robot message template source.") diff --git a/internal/cli/zz_generated_register.go b/internal/cli/zz_generated_register.go index bd9ce7c..fc99dfb 100644 --- a/internal/cli/zz_generated_register.go +++ b/internal/cli/zz_generated_register.go @@ -9,6 +9,7 @@ import "github.com/spf13/cobra" func registerGenerated(root *cobra.Command) { registerGeneratedA2aAgents(root) registerGeneratedAutomations(root) + registerGeneratedKnowledge(root) registerGeneratedMcpServers(root) registerGeneratedSessions(root) registerGeneratedSkills(root) diff --git a/internal/cli/zz_generated_response_help.go b/internal/cli/zz_generated_response_help.go index e01a904..9b249b8 100644 --- a/internal/cli/zz_generated_response_help.go +++ b/internal/cli/zz_generated_response_help.go @@ -29,14 +29,14 @@ var responseHelpBySDKMethod = map[string]string{ "AlertRules.ReadCounterTotal": "Response fields (`data` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required)\n - clock (integer) (required) — Sample timestamp, Unix epoch seconds.\n - id (integer) (required)\n - num (integer) (required) — Rule count at the sample time.\n", "AlertRules.ReadDstypes": "Response fields (`data` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required) — Owning account ID. `0` for global types.\n - id (integer) (required)\n - ident (string) (required) — Identifier used as the `ds_type` of rules, e.g. `prometheus`.\n - name (string) (required) — Display name, e.g. `Prometheus`.\n - weight (integer) (required) — Display order weight; higher appears first.\n", "AlertRules.ReadExport": "Response fields (`data` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - annotations (object)\n - cron_pattern (string) (required)\n - debug_log_enabled (boolean) (required)\n - delay_seconds (integer)\n - description (string)\n - description_type (string) [text, markdown]\n - ds_ids (array)\n - ds_list (array)\n - ds_type (string) (required)\n - enabled (boolean) (required)\n - enabled_times (array)\n - days (array) — Days of week, 0 = Sunday.\n - etime (string) — End time, e.g. `18:00`.\n - stime (string) — Start time, e.g. `09:00`.\n - labels (object)\n - name (string) (required)\n - repeat_interval (integer)\n - repeat_total (integer)\n - rule_configs (object) — Rule evaluation configuration.\n - check_anydata (object) — Any-data check configuration. Fires when the query returns any data rows.\n - alerting_check_times (integer)\n - enabled (boolean)\n - push_recovery_event (boolean)\n - recovery (object) — Recovery condition for any-data check. If omitted or `mode` is empty, treated as `nodata`.\n - args (object)\n - condition (string) — Recovery expression. Required when `mode` is `ql`.\n - mode (string) — `nodata` = recover when the query returns no data; `ql` = recover when the `condition` expression evaluates to true. When `mode` is `ql`, only a single query (`name=A`) is permitted. [nodata, ql]\n - recovery_check_times (integer)\n - severity (string) [Critical, Warning, Info]\n - check_nodata (object) — No-data check configuration.\n - alerting_check_times (integer)\n - enabled (boolean)\n - push_recovery_event (boolean)\n - recovery_check_times (integer)\n - resolve_timeout (integer) — Auto-resolve after N seconds.\n - severity (string) [Critical, Warning, Info]\n - check_threshold (object) — Threshold check configuration.\n - alerting_check_times (integer)\n - critical (string)\n - enabled (boolean)\n - info (string)\n - push_recovery_event (boolean)\n - recovery (object)\n - condition (string)\n - mode (string) [invert, threshold, ql]\n - recovery_check_times (integer)\n - warning (string)\n - queries (array)\n - args (object)\n - expr (string) — Query expression.\n - label_fields (array)\n - name (string) — Query identifier (letter, e.g. `A`). The name `R` is reserved and must not be used.\n - value_fields (array)\n - relate_queries (array) — Optional auxiliary queries whose results are attached to alert events as context. Each entry must have a unique `name` (not duplicating any query name) and a non-empty `expr`.\n - args (object)\n - expr (string) — Query expression.\n - name (string) — Relate-query identifier.\n - timezone (string) — Timezone in which the rule executes. IANA timezone name; defaults to `Asia/Shanghai`.\n", - "AlertRules.ReadInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required)\n - annotations (object)\n - channel_ids (array) — Channel IDs to send alerts to.\n - created_at (integer) (required)\n - creator_id (integer) (required)\n - creator_name (string) (required)\n - cron_pattern (string) (required) — 5-field cron schedule. Must not start with `CRON_TZ=` or `TZ=`; use the `timezone` field instead.\n - debug_log_enabled (boolean) (required)\n - delay_seconds (integer) (required)\n - description (string)\n - description_type (string) — Format for the description. Defaults to `text` when omitted or empty. [text, markdown]\n - ds_ids (array) — Specific data source IDs.\n - ds_list (array) — Data source name patterns (supports wildcards).\n - ds_type (string) (required) — Data source type.\n - enabled (boolean) (required)\n - enabled_times (array) — Time windows when the rule is active. Defaults to all days from 00:00 to 23:59 when omitted or empty.\n - days (array) — Days of week (0=Sunday).\n - etime (string) — End time, e.g. `18:00`.\n - stime (string) — Start time, e.g. `09:00`.\n - folder_id (integer) (required) — Folder the rule belongs to.\n - id (integer) (required)\n - labels (object) — Custom labels.\n - name (string) (required) — Rule name.\n - repeat_interval (integer) — Notification repeat interval in seconds.\n - repeat_total (integer) — Max number of repeat notifications.\n - rule_configs (object) — Rule evaluation configuration.\n - check_anydata (object) — Any-data check configuration. Fires when the query returns any data rows.\n - alerting_check_times (integer)\n - enabled (boolean)\n - push_recovery_event (boolean)\n - recovery (object) — Recovery condition for any-data check. If omitted or `mode` is empty, treated as `nodata`.\n - args (object)\n - condition (string) — Recovery expression. Required when `mode` is `ql`.\n - mode (string) — `nodata` = recover when the query returns no data; `ql` = recover when the `condition` expression evaluates to true. When `mode` is `ql`, only a single query (`name=A`) is permitted. [nodata, ql]\n - recovery_check_times (integer)\n - severity (string) [Critical, Warning, Info]\n - check_nodata (object) — No-data check configuration.\n - alerting_check_times (integer)\n - enabled (boolean)\n - push_recovery_event (boolean)\n - recovery_check_times (integer)\n - resolve_timeout (integer) — Auto-resolve after N seconds.\n - severity (string) [Critical, Warning, Info]\n - check_threshold (object) — Threshold check configuration.\n - alerting_check_times (integer)\n - critical (string)\n - enabled (boolean)\n - info (string)\n - push_recovery_event (boolean)\n - recovery (object)\n - condition (string)\n - mode (string) [invert, threshold, ql]\n - recovery_check_times (integer)\n - warning (string)\n - queries (array)\n - args (object)\n - expr (string) — Query expression.\n - label_fields (array)\n - name (string) — Query identifier (letter, e.g. `A`). The name `R` is reserved and must not be used.\n - value_fields (array)\n - relate_queries (array) — Optional auxiliary queries whose results are attached to alert events as context. Each entry must have a unique `name` (not duplicating any query name) and a non-empty `expr`.\n - args (object)\n - expr (string) — Query expression.\n - name (string) — Relate-query identifier.\n - timezone (string) — Timezone in which the rule executes. Determines how the cron schedule and effective time windows are interpreted. Only IANA timezone names are accepted (e.g. `Asia/Shanghai`, `UTC`, `Europe/London`); shortcuts and offsets such as `Local`, `UTC+8`, or `CST` are rejected. Treated as `Asia/Shanghai` if empty.\n - updated_at (integer) (required)\n - updater_id (integer) (required)\n - updater_name (string) (required)\n", + "AlertRules.ReadInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Account ID. Filled by the server from the authenticated identity; do not provide.\n - annotations (object) — Annotation key-value pairs delivered with alert events; keys must not start with `$` (reserved for query fields).\n - channel_ids (array) — Channel IDs to send alerts to.\n - created_at (integer) (required) — Creation time as a Unix timestamp in seconds. Generated by the server; do not provide.\n - creator_id (integer) (required) — Creator user ID. Filled by the server from the current user; do not provide.\n - creator_name (string) (required) — Creator name. Filled by the server; do not provide.\n - cron_pattern (string) (required) — Schedule expression: a 6-field cron (with seconds) or an `@every 30s` interval descriptor. Must not start with `CRON_TZ=` or `TZ=`; use the `timezone` field instead.\n - debug_log_enabled (boolean) (required) — Whether to enable debug logging; the edge emits detailed evaluation logs, useful for troubleshooting rules that do not trigger as expected.\n - delay_seconds (integer) (required) — Seconds to shift the evaluation query window backward, compensating for data ingestion latency.\n - description (string) — Rule description, in Markdown.\n - description_type (string) — Format for the description. Defaults to `text` when omitted or empty. [text, markdown]\n - ds_ids (array) — Datasource IDs, merged with `ds_list` to decide which datasources the rule monitors; IDs survive datasource renames. At least one of `ds_list` and `ds_ids` must be provided.\n - ds_list (array) — Data source name patterns (supports wildcards).\n - ds_type (string) (required) — Datasource type identifier; allowed values are listed by `POST /monit/rule/dstypes` (e.g. `prometheus`, `elasticsearch`).\n - enabled (boolean) (required) — Whether the rule is enabled. Updating to `false` makes the server clean up the rule's active alerts.\n - enabled_times (array) — Time windows when the rule is active. Defaults to all days from 00:00 to 23:59 when omitted or empty.\n - days (array) — Days of week (0=Sunday).\n - etime (string) — End time, e.g. `18:00`.\n - stime (string) — Start time, e.g. `09:00`.\n - folder_id (integer) (required) — ID of the folder the rule belongs to. Obtainable via `POST /monit/folder/list`.\n - id (integer) (required) — Rule ID. Required for update; omit for create (assigned by the server).\n - labels (object) — Custom labels.\n - name (string) (required) — Rule name. Must be unique within the same folder.\n - repeat_interval (integer) — Notification repeat interval in seconds.\n - repeat_total (integer) — Max number of repeat notifications.\n - rule_configs (object) — Check configuration: query list plus trigger/recovery conditions. Structure see `RuleConfigs`.\n - check_anydata (object) — Any-data check configuration. Fires when the query returns any data rows.\n - alerting_check_times (integer)\n - enabled (boolean)\n - push_recovery_event (boolean)\n - recovery (object) — Recovery condition for any-data check. If omitted or `mode` is empty, treated as `nodata`.\n - args (object)\n - condition (string) — Recovery expression. Required when `mode` is `ql`.\n - mode (string) — `nodata` = recover when the query returns no data; `ql` = recover when the `condition` expression evaluates to true. When `mode` is `ql`, only a single query (`name=A`) is permitted. [nodata, ql]\n - recovery_check_times (integer)\n - severity (string) [Critical, Warning, Info]\n - check_nodata (object) — No-data check configuration.\n - alerting_check_times (integer)\n - enabled (boolean)\n - push_recovery_event (boolean)\n - recovery_check_times (integer)\n - resolve_timeout (integer) — Auto-resolve after N seconds.\n - severity (string) [Critical, Warning, Info]\n - check_threshold (object) — Threshold check configuration.\n - alerting_check_times (integer)\n - critical (string)\n - enabled (boolean)\n - info (string)\n - push_recovery_event (boolean)\n - recovery (object)\n - condition (string)\n - mode (string) [invert, threshold, ql]\n - recovery_check_times (integer)\n - warning (string)\n - queries (array)\n - args (object)\n - expr (string) — Query expression.\n - label_fields (array)\n - name (string) — Query identifier (letter, e.g. `A`). The name `R` is reserved and must not be used.\n - value_fields (array)\n - relate_queries (array) — Optional auxiliary queries whose results are attached to alert events as context. Each entry must have a unique `name` (not duplicating any query name) and a non-empty `expr`.\n - args (object)\n - expr (string) — Query expression.\n - name (string) — Relate-query identifier.\n - timezone (string) — Timezone in which the rule executes. Determines how the cron schedule and effective time windows are interpreted. Only IANA timezone names are accepted (e.g. `Asia/Shanghai`, `UTC`, `Europe/London`); shortcuts and offsets such as `Local`, `UTC+8`, or `CST` are rejected. Treated as `Asia/Shanghai` if empty.\n - updated_at (integer) (required) — Last update time as a Unix timestamp in seconds. Generated by the server; do not provide.\n - updater_id (integer) (required) — Last updater user ID. Filled by the server; do not provide.\n - updater_name (string) (required) — Last updater name. Filled by the server; do not provide.\n", "AlertRules.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 - created_at (integer) (required)\n - creator_id (integer) (required)\n - creator_name (string) (required)\n - cron_pattern (string) (required) — 5-field cron schedule, e.g. `* * * * *`. Must not start with `CRON_TZ=` or `TZ=`; use the `timezone` field instead.\n - debug_log_enabled (boolean) (required) — Whether debug logging is enabled.\n - delay_seconds (integer) (required) — Evaluation delay in seconds.\n - ds_type (string) (required) — Data source type, e.g. `prometheus`.\n - enabled (boolean) (required) — Whether the rule is enabled.\n - folder_id (integer) (required) — Folder ID.\n - id (integer) (required) — Unique rule ID.\n - labels (object) — Custom labels.\n - name (string) (required) — Rule name.\n - timezone (string) — Timezone in which the rule executes. Determines how the cron schedule and effective time windows are interpreted. Only IANA timezone names are accepted (e.g. `Asia/Shanghai`, `UTC`, `Europe/London`); shortcuts and offsets such as `Local`, `UTC+8`, or `CST` are rejected. Treated as `Asia/Shanghai` if empty.\n - triggered (boolean) (required) — True if the rule currently has active alerts.\n - updated_at (integer) (required)\n - updater_id (integer) (required)\n - updater_name (string) (required)\n", - "AlertRules.WriteCreate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer)\n - annotations (object)\n - channel_ids (array) — Channel IDs to send alerts to.\n - created_at (integer)\n - creator_id (integer)\n - creator_name (string)\n - cron_pattern (string) — 5-field cron schedule. Must not start with `CRON_TZ=` or `TZ=`; use the `timezone` field instead.\n - debug_log_enabled (boolean)\n - delay_seconds (integer)\n - description (string)\n - description_type (string) — Format for the description. Defaults to `text` when omitted or empty. [text, markdown]\n - ds_ids (array) — Specific data source IDs.\n - ds_list (array) — Data source name patterns (supports wildcards).\n - ds_type (string) — Data source type.\n - enabled (boolean)\n - enabled_times (array) — Time windows when the rule is active. Defaults to all days from 00:00 to 23:59 when omitted or empty.\n - days (array) — Days of week (0=Sunday).\n - etime (string) — End time, e.g. `18:00`.\n - stime (string) — Start time, e.g. `09:00`.\n - folder_id (integer) — Folder the rule belongs to.\n - id (integer)\n - labels (object) — Custom labels.\n - name (string) — Rule name.\n - repeat_interval (integer) — Notification repeat interval in seconds.\n - repeat_total (integer) — Max number of repeat notifications.\n - rule_configs (object) — Rule evaluation configuration.\n - check_anydata (object) — Any-data check configuration. Fires when the query returns any data rows.\n - alerting_check_times (integer)\n - enabled (boolean)\n - push_recovery_event (boolean)\n - recovery (object) — Recovery condition for any-data check. If omitted or `mode` is empty, treated as `nodata`.\n - args (object)\n - condition (string) — Recovery expression. Required when `mode` is `ql`.\n - mode (string) — `nodata` = recover when the query returns no data; `ql` = recover when the `condition` expression evaluates to true. When `mode` is `ql`, only a single query (`name=A`) is permitted. [nodata, ql]\n - recovery_check_times (integer)\n - severity (string) [Critical, Warning, Info]\n - check_nodata (object) — No-data check configuration.\n - alerting_check_times (integer)\n - enabled (boolean)\n - push_recovery_event (boolean)\n - recovery_check_times (integer)\n - resolve_timeout (integer) — Auto-resolve after N seconds.\n - severity (string) [Critical, Warning, Info]\n - check_threshold (object) — Threshold check configuration.\n - alerting_check_times (integer)\n - critical (string)\n - enabled (boolean)\n - info (string)\n - push_recovery_event (boolean)\n - recovery (object)\n - condition (string)\n - mode (string) [invert, threshold, ql]\n - recovery_check_times (integer)\n - warning (string)\n - queries (array)\n - args (object)\n - expr (string) — Query expression.\n - label_fields (array)\n - name (string) — Query identifier (letter, e.g. `A`). The name `R` is reserved and must not be used.\n - value_fields (array)\n - relate_queries (array) — Optional auxiliary queries whose results are attached to alert events as context. Each entry must have a unique `name` (not duplicating any query name) and a non-empty `expr`.\n - args (object)\n - expr (string) — Query expression.\n - name (string) — Relate-query identifier.\n - timezone (string) — Timezone in which the rule executes. Determines how the cron schedule and effective time windows are interpreted. Only IANA timezone names are accepted (e.g. `Asia/Shanghai`, `UTC`, `Europe/London`); shortcuts and offsets such as `Local`, `UTC+8`, or `CST` are rejected. Treated as `Asia/Shanghai` if empty.\n - updated_at (integer)\n - updater_id (integer)\n - updater_name (string)\n", + "AlertRules.WriteCreate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) — Account ID. Filled by the server from the authenticated identity; do not provide.\n - annotations (object) — Annotation key-value pairs delivered with alert events; keys must not start with `$` (reserved for query fields).\n - channel_ids (array) — Channel IDs to send alerts to.\n - created_at (integer) — Creation time as a Unix timestamp in seconds. Generated by the server; do not provide.\n - creator_id (integer) — Creator user ID. Filled by the server from the current user; do not provide.\n - creator_name (string) — Creator name. Filled by the server; do not provide.\n - cron_pattern (string) — Schedule expression: a 6-field cron (with seconds) or an `@every 30s` interval descriptor. Must not start with `CRON_TZ=` or `TZ=`; use the `timezone` field instead.\n - debug_log_enabled (boolean) — Whether to enable debug logging; the edge emits detailed evaluation logs, useful for troubleshooting rules that do not trigger as expected.\n - delay_seconds (integer) — Seconds to shift the evaluation query window backward, compensating for data ingestion latency.\n - description (string) — Rule description, in Markdown.\n - description_type (string) — Format for the description. Defaults to `text` when omitted or empty. [text, markdown]\n - ds_ids (array) — Datasource IDs, merged with `ds_list` to decide which datasources the rule monitors; IDs survive datasource renames. At least one of `ds_list` and `ds_ids` must be provided.\n - ds_list (array) — Data source name patterns (supports wildcards).\n - ds_type (string) — Datasource type identifier; allowed values are listed by `POST /monit/rule/dstypes` (e.g. `prometheus`, `elasticsearch`).\n - enabled (boolean) — Whether the rule is enabled. Updating to `false` makes the server clean up the rule's active alerts.\n - enabled_times (array) — Time windows when the rule is active. Defaults to all days from 00:00 to 23:59 when omitted or empty.\n - days (array) — Days of week (0=Sunday).\n - etime (string) — End time, e.g. `18:00`.\n - stime (string) — Start time, e.g. `09:00`.\n - folder_id (integer) — ID of the folder the rule belongs to. Obtainable via `POST /monit/folder/list`.\n - id (integer) — Rule ID. Required for update; omit for create (assigned by the server).\n - labels (object) — Custom labels.\n - name (string) — Rule name. Must be unique within the same folder.\n - repeat_interval (integer) — Notification repeat interval in seconds.\n - repeat_total (integer) — Max number of repeat notifications.\n - rule_configs (object) — Check configuration: query list plus trigger/recovery conditions. Structure see `RuleConfigs`.\n - check_anydata (object) — Any-data check configuration. Fires when the query returns any data rows.\n - alerting_check_times (integer)\n - enabled (boolean)\n - push_recovery_event (boolean)\n - recovery (object) — Recovery condition for any-data check. If omitted or `mode` is empty, treated as `nodata`.\n - args (object)\n - condition (string) — Recovery expression. Required when `mode` is `ql`.\n - mode (string) — `nodata` = recover when the query returns no data; `ql` = recover when the `condition` expression evaluates to true. When `mode` is `ql`, only a single query (`name=A`) is permitted. [nodata, ql]\n - recovery_check_times (integer)\n - severity (string) [Critical, Warning, Info]\n - check_nodata (object) — No-data check configuration.\n - alerting_check_times (integer)\n - enabled (boolean)\n - push_recovery_event (boolean)\n - recovery_check_times (integer)\n - resolve_timeout (integer) — Auto-resolve after N seconds.\n - severity (string) [Critical, Warning, Info]\n - check_threshold (object) — Threshold check configuration.\n - alerting_check_times (integer)\n - critical (string)\n - enabled (boolean)\n - info (string)\n - push_recovery_event (boolean)\n - recovery (object)\n - condition (string)\n - mode (string) [invert, threshold, ql]\n - recovery_check_times (integer)\n - warning (string)\n - queries (array)\n - args (object)\n - expr (string) — Query expression.\n - label_fields (array)\n - name (string) — Query identifier (letter, e.g. `A`). The name `R` is reserved and must not be used.\n - value_fields (array)\n - relate_queries (array) — Optional auxiliary queries whose results are attached to alert events as context. Each entry must have a unique `name` (not duplicating any query name) and a non-empty `expr`.\n - args (object)\n - expr (string) — Query expression.\n - name (string) — Relate-query identifier.\n - timezone (string) — Timezone in which the rule executes. Determines how the cron schedule and effective time windows are interpreted. Only IANA timezone names are accepted (e.g. `Asia/Shanghai`, `UTC`, `Europe/London`); shortcuts and offsets such as `Local`, `UTC+8`, or `CST` are rejected. Treated as `Asia/Shanghai` if empty.\n - updated_at (integer) — Last update time as a Unix timestamp in seconds. Generated by the server; do not provide.\n - updater_id (integer) — Last updater user ID. Filled by the server; do not provide.\n - updater_name (string) — Last updater name. Filled by the server; do not provide.\n", "AlertRules.WriteFieldsUpdate": "Response fields (`data` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - message (string) (required) — Empty on success, error message on failure.\n - name (string) (required) — Rule name.\n", "AlertRules.WriteImport": "Response fields (`data` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - message (string) (required) — Empty on success, error message on failure.\n - name (string) (required) — Rule name.\n", "AlertRules.WriteMove": "Response fields (`data` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - message (string) (required) — Empty on success, error message on failure.\n - name (string) (required) — Rule name.\n", "AlertRules.WriteStatus": "Response fields (`data` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - folder_id (integer) (required)\n - folder_name (string)\n - rule_total (integer) (required) — Total rules in the folder family.\n - triggered_rule_count (integer) (required) — Rules with active alerts.\n", - "AlertRules.WriteUpdate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer)\n - annotations (object)\n - channel_ids (array) — Channel IDs to send alerts to.\n - created_at (integer)\n - creator_id (integer)\n - creator_name (string)\n - cron_pattern (string) — 5-field cron schedule. Must not start with `CRON_TZ=` or `TZ=`; use the `timezone` field instead.\n - debug_log_enabled (boolean)\n - delay_seconds (integer)\n - description (string)\n - description_type (string) — Format for the description. Defaults to `text` when omitted or empty. [text, markdown]\n - ds_ids (array) — Specific data source IDs.\n - ds_list (array) — Data source name patterns (supports wildcards).\n - ds_type (string) — Data source type.\n - enabled (boolean)\n - enabled_times (array) — Time windows when the rule is active. Defaults to all days from 00:00 to 23:59 when omitted or empty.\n - days (array) — Days of week (0=Sunday).\n - etime (string) — End time, e.g. `18:00`.\n - stime (string) — Start time, e.g. `09:00`.\n - folder_id (integer) — Folder the rule belongs to.\n - id (integer)\n - labels (object) — Custom labels.\n - name (string) — Rule name.\n - repeat_interval (integer) — Notification repeat interval in seconds.\n - repeat_total (integer) — Max number of repeat notifications.\n - rule_configs (object) — Rule evaluation configuration.\n - check_anydata (object) — Any-data check configuration. Fires when the query returns any data rows.\n - alerting_check_times (integer)\n - enabled (boolean)\n - push_recovery_event (boolean)\n - recovery (object) — Recovery condition for any-data check. If omitted or `mode` is empty, treated as `nodata`.\n - args (object)\n - condition (string) — Recovery expression. Required when `mode` is `ql`.\n - mode (string) — `nodata` = recover when the query returns no data; `ql` = recover when the `condition` expression evaluates to true. When `mode` is `ql`, only a single query (`name=A`) is permitted. [nodata, ql]\n - recovery_check_times (integer)\n - severity (string) [Critical, Warning, Info]\n - check_nodata (object) — No-data check configuration.\n - alerting_check_times (integer)\n - enabled (boolean)\n - push_recovery_event (boolean)\n - recovery_check_times (integer)\n - resolve_timeout (integer) — Auto-resolve after N seconds.\n - severity (string) [Critical, Warning, Info]\n - check_threshold (object) — Threshold check configuration.\n - alerting_check_times (integer)\n - critical (string)\n - enabled (boolean)\n - info (string)\n - push_recovery_event (boolean)\n - recovery (object)\n - condition (string)\n - mode (string) [invert, threshold, ql]\n - recovery_check_times (integer)\n - warning (string)\n - queries (array)\n - args (object)\n - expr (string) — Query expression.\n - label_fields (array)\n - name (string) — Query identifier (letter, e.g. `A`). The name `R` is reserved and must not be used.\n - value_fields (array)\n - relate_queries (array) — Optional auxiliary queries whose results are attached to alert events as context. Each entry must have a unique `name` (not duplicating any query name) and a non-empty `expr`.\n - args (object)\n - expr (string) — Query expression.\n - name (string) — Relate-query identifier.\n - timezone (string) — Timezone in which the rule executes. Determines how the cron schedule and effective time windows are interpreted. Only IANA timezone names are accepted (e.g. `Asia/Shanghai`, `UTC`, `Europe/London`); shortcuts and offsets such as `Local`, `UTC+8`, or `CST` are rejected. Treated as `Asia/Shanghai` if empty.\n - updated_at (integer)\n - updater_id (integer)\n - updater_name (string)\n", + "AlertRules.WriteUpdate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) — Account ID. Filled by the server from the authenticated identity; do not provide.\n - annotations (object) — Annotation key-value pairs delivered with alert events; keys must not start with `$` (reserved for query fields).\n - channel_ids (array) — Channel IDs to send alerts to.\n - created_at (integer) — Creation time as a Unix timestamp in seconds. Generated by the server; do not provide.\n - creator_id (integer) — Creator user ID. Filled by the server from the current user; do not provide.\n - creator_name (string) — Creator name. Filled by the server; do not provide.\n - cron_pattern (string) — Schedule expression: a 6-field cron (with seconds) or an `@every 30s` interval descriptor. Must not start with `CRON_TZ=` or `TZ=`; use the `timezone` field instead.\n - debug_log_enabled (boolean) — Whether to enable debug logging; the edge emits detailed evaluation logs, useful for troubleshooting rules that do not trigger as expected.\n - delay_seconds (integer) — Seconds to shift the evaluation query window backward, compensating for data ingestion latency.\n - description (string) — Rule description, in Markdown.\n - description_type (string) — Format for the description. Defaults to `text` when omitted or empty. [text, markdown]\n - ds_ids (array) — Datasource IDs, merged with `ds_list` to decide which datasources the rule monitors; IDs survive datasource renames. At least one of `ds_list` and `ds_ids` must be provided.\n - ds_list (array) — Data source name patterns (supports wildcards).\n - ds_type (string) — Datasource type identifier; allowed values are listed by `POST /monit/rule/dstypes` (e.g. `prometheus`, `elasticsearch`).\n - enabled (boolean) — Whether the rule is enabled. Updating to `false` makes the server clean up the rule's active alerts.\n - enabled_times (array) — Time windows when the rule is active. Defaults to all days from 00:00 to 23:59 when omitted or empty.\n - days (array) — Days of week (0=Sunday).\n - etime (string) — End time, e.g. `18:00`.\n - stime (string) — Start time, e.g. `09:00`.\n - folder_id (integer) — ID of the folder the rule belongs to. Obtainable via `POST /monit/folder/list`.\n - id (integer) — Rule ID. Required for update; omit for create (assigned by the server).\n - labels (object) — Custom labels.\n - name (string) — Rule name. Must be unique within the same folder.\n - repeat_interval (integer) — Notification repeat interval in seconds.\n - repeat_total (integer) — Max number of repeat notifications.\n - rule_configs (object) — Check configuration: query list plus trigger/recovery conditions. Structure see `RuleConfigs`.\n - check_anydata (object) — Any-data check configuration. Fires when the query returns any data rows.\n - alerting_check_times (integer)\n - enabled (boolean)\n - push_recovery_event (boolean)\n - recovery (object) — Recovery condition for any-data check. If omitted or `mode` is empty, treated as `nodata`.\n - args (object)\n - condition (string) — Recovery expression. Required when `mode` is `ql`.\n - mode (string) — `nodata` = recover when the query returns no data; `ql` = recover when the `condition` expression evaluates to true. When `mode` is `ql`, only a single query (`name=A`) is permitted. [nodata, ql]\n - recovery_check_times (integer)\n - severity (string) [Critical, Warning, Info]\n - check_nodata (object) — No-data check configuration.\n - alerting_check_times (integer)\n - enabled (boolean)\n - push_recovery_event (boolean)\n - recovery_check_times (integer)\n - resolve_timeout (integer) — Auto-resolve after N seconds.\n - severity (string) [Critical, Warning, Info]\n - check_threshold (object) — Threshold check configuration.\n - alerting_check_times (integer)\n - critical (string)\n - enabled (boolean)\n - info (string)\n - push_recovery_event (boolean)\n - recovery (object)\n - condition (string)\n - mode (string) [invert, threshold, ql]\n - recovery_check_times (integer)\n - warning (string)\n - queries (array)\n - args (object)\n - expr (string) — Query expression.\n - label_fields (array)\n - name (string) — Query identifier (letter, e.g. `A`). The name `R` is reserved and must not be used.\n - value_fields (array)\n - relate_queries (array) — Optional auxiliary queries whose results are attached to alert events as context. Each entry must have a unique `name` (not duplicating any query name) and a non-empty `expr`.\n - args (object)\n - expr (string) — Query expression.\n - name (string) — Relate-query identifier.\n - timezone (string) — Timezone in which the rule executes. Determines how the cron schedule and effective time windows are interpreted. Only IANA timezone names are accepted (e.g. `Asia/Shanghai`, `UTC`, `Europe/London`); shortcuts and offsets such as `Local`, `UTC+8`, or `CST` are rejected. Treated as `Asia/Shanghai` if empty.\n - updated_at (integer) — Last update time as a Unix timestamp in seconds. Generated by the server; do not provide.\n - updater_id (integer) — Last updater user ID. Filled by the server; do not provide.\n - updater_name (string) — Last updater name. Filled by the server; do not provide.\n", "Alerts.EventReadList": "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 - alert_id (string) — Parent alert ID (MongoDB ObjectID).\n - alert_key (string) — Deduplication key used to merge events into an alert.\n - channel_id (integer) — Channel ID the event is routed to.\n - created_at (integer) — Record creation time, Unix epoch seconds.\n - data_source_id (integer) — Deprecated. Use `integration_id` instead.\n - deleted_at (integer) — Soft-delete timestamp (seconds). Zero if not deleted.\n - description (string) — Event description.\n - event_id (string) — Event ID (MongoDB ObjectID).\n - event_severity (string) — Severity of this event. [Critical, Warning, Info, Ok]\n - event_status (string) — Status of this event. [Critical, Warning, Info, Ok]\n - event_time (integer) — Event timestamp, Unix epoch seconds.\n - images (array) — Images attached to the event.\n - alt (string) — Alt text.\n - href (string) — Optional link URL when the image is clicked.\n - src (string) (required) — Image source URL or internal image reference (starts with `img_` or `http`).\n - integration_id (integer) — Integration that produced this event.\n - integration_type (string) — Type/plugin key of the integration that produced this event.\n - labels (object) — Label key-value pairs.\n - title (string) — Event title.\n - title_rule (string) — Title template used to derive `title` from labels.\n - updated_at (integer) — Record update time, Unix epoch seconds.\n", "Alerts.ReadEventList": "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 - alert_id (string) — Parent alert ID (MongoDB ObjectID).\n - alert_key (string) — Deduplication key used to merge events into an alert.\n - channel_id (integer) — Channel ID the event is routed to.\n - created_at (integer) — Record creation time, Unix epoch seconds.\n - data_source_id (integer) — Deprecated. Use `integration_id` instead.\n - deleted_at (integer) — Soft-delete timestamp (seconds). Zero if not deleted.\n - description (string) — Event description.\n - event_id (string) — Event ID (MongoDB ObjectID).\n - event_severity (string) — Severity of this event. [Critical, Warning, Info, Ok]\n - event_status (string) — Status of this event. [Critical, Warning, Info, Ok]\n - event_time (integer) — Event timestamp, Unix epoch seconds.\n - images (array) — Images attached to the event.\n - alt (string) — Alt text.\n - href (string) — Optional link URL when the image is clicked.\n - src (string) (required) — Image source URL or internal image reference (starts with `img_` or `http`).\n - integration_id (integer) — Integration that produced this event.\n - integration_type (string) — Type/plugin key of the integration that produced this event.\n - labels (object) — Label key-value pairs.\n - title (string) — Event title.\n - title_rule (string) — Title template used to derive `title` from labels.\n - updated_at (integer) — Record update time, Unix epoch seconds.\n", "Alerts.ReadFeed": "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 - created_at (integer) (required) — Creation timestamp in Unix epoch milliseconds.\n - creator_id (integer) (required) — Member ID of the creator. 0 for system-generated entries.\n - detail (object) (required) — Type-specific payload. The concrete shape is determined by `type`.\n - comment (string) — Comment body.\n - severity (string) — Severity level. [Ok, Critical, Warning, Info]\n - status (string) — Severity level. [Ok, Critical, Warning, Info]\n - ref_id (string) (required) — ObjectID of the alert this entry references.\n - type (string) (required) — Alert activity feed entry type. Each value identifies one alert lifecycle event; the matching `detail` payload shape is determined by this field. | Type | Meaning | |---|---| | `a_new` | Alert triggered. | | `a_comm` | Comment added on the alert. | | `a_close` | Alert closed. | [a_new, a_comm, a_close]\n - updated_at (integer) (required) — Last update timestamp in Unix epoch milliseconds.\n", @@ -97,8 +97,8 @@ var responseHelpBySDKMethod = map[string]string{ "Diagnostics.ToolsCatalog": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - error (object) — Request-level business error. Omitted on success. Returned with HTTP 200 — do not rely on the status code alone.\n - code (string) [target_unavailable, timeout, forward_failed, invalid_tool_result, ambiguous_target_kind]\n - message (string)\n - target_kinds (array) — Returned for `ambiguous_target_kind`; lists the candidate kinds.\n - target (object) — Resolved target. Omitted when `target_kind` was not supplied and the locator could not be uniquely inferred.\n - kind (string)\n - locator (string)\n - tools (array) — Tool metadata advertised by the target's agent. Always present; an empty array when `error` is set.\n - description (string) — Tool capability description for UI / AI-SRE consumption.\n - input_schema (object) — JSON Schema for `tools[].params`.\n - name (string) — Tool name; pass into `/monit/tools/invoke` as `tools[].tool`.\n - target_kind (string) — Target kind this tool applies to.\n", "Diagnostics.ToolsInvoke": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - error (object) — Request-level business error. Omitted on success. Returned with HTTP 200 — do not rely on the status code alone.\n - code (string) [target_unavailable, forward_failed, ambiguous_target_kind]\n - message (string)\n - target_kinds (array)\n - results (array) — Per-tool results, aligned with the request `tools[]` order. Empty when a request-level `error` is present.\n - data (object) — Tool business payload. Present only on success. Webapi already unwraps the monit-agent result envelope, so there is no nested `data.data`.\n - error (object) — Per-tool failure. Present only on failure, and mutually exclusive with `data` / `summary` / `truncated`.\n - code (string) — Common WebAPI codes: `timeout`, `target_unavailable`, `invalid_tool_result`, `internal`, `invalid_args`, `unsupported_syntax`, `path_not_found`, and `catalog_changed`. Agent-specific tool errors may also be returned unchanged.\n - message (string)\n - params (object) — Request params echoed back by webapi. Normalized to `{}` when the request omitted them or sent null.\n - summary (string) — Human/LLM-readable one-line distillation of the result. Present only when non-empty.\n - tool (string) — Tool name, aligned one-to-one with the request `tools[]` order.\n - tool_version (string) — Agent-executed tool version. Omitted when the failure occurred before the agent picked a version.\n - truncated (object) — Present only when the result was actually truncated — the field's presence is the signal, so there is no redundant `truncated: true`.\n - reason (string) — Why the result was truncated.\n - target (object) — Resolved target. Omitted when `target_kind` was not supplied and the locator could not be uniquely inferred.\n - kind (string)\n - locator (string)\n", "ErrorIngestionRules.Create": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - rule_id (string) (required) — ID assigned to the new rule.\n - rule_name (string) (required) — Echo of the created rule's name.\n", - "ErrorIngestionRules.HistoryList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - rules (array) (required) — The application's complete rule list as of this version.\n - account_id (integer) (required) — Account ID.\n - application_id (string) (required) — RUM application ID the rule belongs to.\n - created_at (integer) (required) — Unix timestamp in milliseconds when the row was created.\n - created_by (integer) (required) — Member ID who created the rule.\n - deleted_at (integer) (required) — Unix timestamp in milliseconds when the row was soft-deleted; `0` when not deleted.\n - description (string) (required) — Rule description.\n - filters (array) (required) — The rule's filter conditions as of this snapshot version.\n - id (integer) (required) — Internal row ID.\n - rule_id (string) (required) — Rule ID.\n - rule_name (string) (required) — Rule name.\n - status (string) (required) — The rule's status as of this snapshot version. [enabled, disabled]\n - updated_at (integer) (required) — Unix timestamp in milliseconds when the row was last updated.\n - updated_by (integer) (required) — Member ID who last updated the rule.\n - updated_at (integer) (required) — Unix timestamp in milliseconds when this snapshot was recorded.\n - updated_by (integer) (required) — Member ID whose action triggered this snapshot.\n - updated_by_name (string) (required) — Display name of the member whose action triggered this snapshot.\n - version (integer) (required) — History version number, incrementing from 1.\n", - "ErrorIngestionRules.List": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - created_at (integer) (required) — Unix timestamp in milliseconds when the rule was created.\n - description (string) (required) — Rule description, up to 512 characters.\n - filters (array) (required) — The rule's filter conditions.\n - rule_id (string) (required) — Rule ID.\n - rule_name (string) (required) — Rule name, 1-128 characters. Not required to be unique within the application.\n - status (string) (required) — Current status of the rule. [enabled, disabled]\n - updated_at (integer) (required) — Unix timestamp in milliseconds when the rule was last updated.\n", + "ErrorIngestionRules.HistoryList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - rules (array) (required) — The application's complete rule list as of this version.\n - account_id (integer) (required) — Account ID.\n - application_id (string) (required) — RUM application ID the rule belongs to.\n - created_at (integer) (required) — Unix timestamp in milliseconds when the row was created.\n - created_by (integer) (required) — Member ID who created the rule.\n - deleted_at (integer) (required) — Unix timestamp in milliseconds when the row was soft-deleted; `0` when not deleted.\n - description (string) (required) — Rule description.\n - filters (array>) (required) — The rule's filter conditions as of this snapshot version.\n - key (string) (required) — Field key. One of `error.usr_id`, `error.usr_email`, `error.error_type`, `error.error_message`, `error.error_stack`, `error.view_url`, `error.env`, `error.version`, `error.service`, `error.browser_name`, `error.browser_version`, `error.fingerprint`, `error.is_crash`, or a `context.`-prefixed custom context path (up to 3 levels deep).\n - oper (string) (required) — Match mode: `IN` matches when the field value matches any entry in `vals`; `NOTIN` matches when it matches none. [IN, NOTIN]\n - vals (array) (required) — Values to match against, at least 1 entry. Each entry is an exact string, or a special pattern using wildcards (`*`/`?`), a regexp wrapped in `/`, a `cidr:`-prefixed CIDR match, or a `num:lt|le|gt|ge:`-prefixed numeric comparison.\n - id (integer) (required) — Internal row ID.\n - rule_id (string) (required) — Rule ID.\n - rule_name (string) (required) — Rule name.\n - status (string) (required) — The rule's status as of this snapshot version. [enabled, disabled]\n - updated_at (integer) (required) — Unix timestamp in milliseconds when the row was last updated.\n - updated_by (integer) (required) — Member ID who last updated the rule.\n - updated_at (integer) (required) — Unix timestamp in milliseconds when this snapshot was recorded.\n - updated_by (integer) (required) — Member ID whose action triggered this snapshot.\n - updated_by_name (string) (required) — Display name of the member whose action triggered this snapshot.\n - version (integer) (required) — History version number, incrementing from 1.\n", + "ErrorIngestionRules.List": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - created_at (integer) (required) — Unix timestamp in milliseconds when the rule was created.\n - description (string) (required) — Rule description, up to 512 characters.\n - filters (array>) (required) — The rule's filter conditions.\n - key (string) (required) — Field key. One of `error.usr_id`, `error.usr_email`, `error.error_type`, `error.error_message`, `error.error_stack`, `error.view_url`, `error.env`, `error.version`, `error.service`, `error.browser_name`, `error.browser_version`, `error.fingerprint`, `error.is_crash`, or a `context.`-prefixed custom context path (up to 3 levels deep).\n - oper (string) (required) — Match mode: `IN` matches when the field value matches any entry in `vals`; `NOTIN` matches when it matches none. [IN, NOTIN]\n - vals (array) (required) — Values to match against, at least 1 entry. Each entry is an exact string, or a special pattern using wildcards (`*`/`?`), a regexp wrapped in `/`, a `cidr:`-prefixed CIDR match, or a `num:lt|le|gt|ge:`-prefixed numeric comparison.\n - rule_id (string) (required) — Rule ID.\n - rule_name (string) (required) — Rule name, 1-128 characters. Not required to be unique within the application.\n - status (string) (required) — Current status of the rule. [enabled, disabled]\n - updated_at (integer) (required) — Unix timestamp in milliseconds when the rule was last updated.\n", "Facets.FacetCount": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - count (integer) (required) — Number of events with this facet value in the time range.\n - facet_value (any) (required) — The facet value. Type matches the field's `value_type`.\n", "Facets.FieldList": "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. 0 for built-in fields.\n - description (string) (required) — Description of what this field captures.\n - edit_able (boolean) (required) — True if this is a custom field that can be edited by the user.\n - enum_values (array) (required) — Predefined enumerable values for this field. Element type matches the field's `value_type`: string for `string`, number for `number`, boolean for `boolean`. Empty when the field has no fixed set of values.\n - field_key (string) (required) — Unique field key, e.g. `error.type`.\n - field_name (string) (required) — Human-readable field name.\n - group (string) (required) — Display group for this field.\n - is_facet (boolean) (required) — True if value distribution counting is supported for this field.\n - queryable (boolean) (required) — True if this field can be used in DQL/SQL queries.\n - scopes (array) (required) — RUM scopes this field appears in.\n - show_type (string) (required) — Display type in the analytics UI. [list, range]\n - status (string) (required) — Field status, e.g. `active`.\n - unit_family (string) (required) — Measurement unit family, e.g. `time`, `bytes`. Empty for dimensionless fields.\n - unit_name (string) (required) — Specific measurement unit, e.g. `millisecond`, `byte`.\n - value_type (string) (required) — Data type of the field value. [string, number, boolean, array, array, array]\n", "ImIntegrations.List": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) — Account this integration belongs to.\n - category (string) — Category of the integration plugin.\n - created_at (integer) — Unix timestamp in seconds when the integration was created.\n - creator_id (integer) — Person who created the integration.\n - data_source_id (integer) — Integration ID.\n - description (string) — Integration description.\n - exclusive_data_source_id (integer) — Exclusive integration ID associated with this integration.\n - integration_id (integer) — Integration ID, alias of data_source_id.\n - integration_key (string) — Push key used by alert sources to send to this integration.\n - last_time (integer) — Unix timestamp in seconds of the most recent activity on the integration.\n - name (string) — Integration name.\n - no_editable (boolean) — Whether the integration is read-only.\n - plugin_id (integer) — Plugin ID backing this integration.\n - plugin_type (string) — Type identifier of the integration plugin.\n - plugin_type_name (string) — Localized display name of the integration plugin type.\n - ref_id (string) — External reference ID of the integration.\n - settings (object) — Plugin-specific configuration of the integration.\n - status (string) — Current status of the integration.\n - team_id (integer) — Team that owns this integration.\n - updated_at (integer) — Unix timestamp in seconds when the integration was last updated.\n - updated_by (integer) — Person who last updated the integration.\n", @@ -135,10 +135,19 @@ var responseHelpBySDKMethod = map[string]string{ "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 as a formatted timestamp string.\n - event_type (string) (required) — Event type.\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`.\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 as a formatted timestamp string.\n - event_type (string) (required) — Event type (e.g. `created`, `acknowledged`, `closed`).\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`.\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 (integer) (required) — Unix timestamp in milliseconds when the rule was created.\n - created_by (integer) (required) — Member ID who originally created the rule.\n - deleted_at (integer) (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.\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 - 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 (integer) (required) — Unix timestamp in milliseconds when the rule was last updated.\n - updated_by (integer) (required) — Member ID who last updated the rule as of snapshot time.\n - updated_at (integer) (required) — Unix timestamp in milliseconds when the snapshot was written.\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 (integer) (required) — Unix timestamp in milliseconds when the rule was created.\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 - 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 (integer) (required) — Unix timestamp in milliseconds when the rule was last updated.\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 (integer) (required) — Unix timestamp in milliseconds when the rule was created.\n - created_by (integer) (required) — Member ID who originally created the rule.\n - deleted_at (integer) (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.\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. [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 (integer) (required) — Unix timestamp in milliseconds when the rule was last updated.\n - updated_by (integer) (required) — Member ID who last updated the rule as of snapshot time.\n - updated_at (integer) (required) — Unix timestamp in milliseconds when the snapshot was written.\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 (integer) (required) — Unix timestamp in milliseconds when the rule was created.\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. [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 (integer) (required) — Unix timestamp in milliseconds when the rule was last updated.\n", "Issues.ReadInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - age (integer)\n - application_id (string)\n - application_name (string)\n - created_at (integer)\n - error (object)\n - message (string)\n - type (string)\n - error_count (integer) — Total error occurrences.\n - first_seen (object)\n - timestamp (integer)\n - version (string)\n - is_crash (boolean) — Whether the error caused an app crash.\n - issue_id (string) — Unique issue ID.\n - last_seen (object)\n - timestamp (integer)\n - version (string)\n - regression (object) — Regression metadata. Present only when a previously resolved issue re-occurred.\n - regressed_at (integer) — Timestamp when the regression was detected.\n - regressed_at_version (string) — Application version in which the regression was observed.\n - resolved_at (integer) — Timestamp of the previous resolution before the regression.\n - resolved_at (integer)\n - resolved_by (integer)\n - service (string)\n - session_count (integer) — Affected user sessions.\n - severity (string) — Issue severity level.\n - status (string) [for_review, reviewed, ignored, resolved]\n - suspected_cause (object)\n - person_id (integer)\n - reason (string)\n - source (string) [auto, user]\n - value (string) [api.failed_request, network.error, code.exception, code.invalid_object_access, code.invalid_argument, unknown]\n - team_id (integer)\n - updated_at (integer)\n - versions (array)\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)\n - application_id (string)\n - application_name (string)\n - created_at (integer)\n - error (object)\n - message (string)\n - type (string)\n - error_count (integer) — Total error occurrences.\n - first_seen (object)\n - timestamp (integer)\n - version (string)\n - is_crash (boolean) — Whether the error caused an app crash.\n - issue_id (string) — Unique issue ID.\n - last_seen (object)\n - timestamp (integer)\n - version (string)\n - regression (object) — Regression metadata. Present only when a previously resolved issue re-occurred.\n - regressed_at (integer) — Timestamp when the regression was detected.\n - regressed_at_version (string) — Application version in which the regression was observed.\n - resolved_at (integer) — Timestamp of the previous resolution before the regression.\n - resolved_at (integer)\n - resolved_by (integer)\n - service (string)\n - session_count (integer) — Affected user sessions.\n - severity (string) — Issue severity level.\n - status (string) [for_review, reviewed, ignored, resolved]\n - suspected_cause (object)\n - person_id (integer)\n - reason (string)\n - source (string) [auto, user]\n - value (string) [api.failed_request, network.error, code.exception, code.invalid_object_access, code.invalid_argument, unknown]\n - team_id (integer)\n - updated_at (integer)\n - versions (array)\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 (integer) (required) — Unix timestamp in milliseconds when the file was last modified.\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)\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 (integer) (required) — Unix timestamp in milliseconds when the file was last modified.\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)\n - code (string) (required) — Warning code. [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 (integer) (required) — Unix timestamp in milliseconds when the file was last modified.\n - updated_by (integer) (required) — Person ID of the member who last modified the file.\n - warnings (array)\n - code (string) (required) — Warning code. [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)\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 (integer) (required) — Unix timestamp in milliseconds when the file was last modified.\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 (integer) (required) — Unix timestamp in milliseconds when the pack was created.\n - created_by (integer) (required) — Person ID of the member who created 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); empty for account scope.\n - total_bytes (integer) (required) — Total size of all files in bytes.\n - updated_at_ms (integer) (required) — Unix timestamp in milliseconds when the pack was last modified.\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)\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 (integer) (required) — Unix timestamp in milliseconds when the pack was created.\n - created_by (integer) (required) — Person ID of the member who created 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); empty for account scope.\n - total_bytes (integer) (required) — Total size of all files in bytes.\n - updated_at_ms (integer) (required) — Unix timestamp in milliseconds when the pack was last modified.\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 (integer) (required) — Unix timestamp in milliseconds when the pack was created.\n - created_by (integer) (required) — Person ID of the member who created 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); empty for account scope.\n - total_bytes (integer) (required) — Total size of all files in bytes.\n - updated_at_ms (integer) (required) — Unix timestamp in milliseconds when the pack was last modified.\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 (integer) (required) — Unix timestamp in milliseconds when the pack was created.\n - created_by (integer) (required) — Person ID of the member who created 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); empty for account scope.\n - total_bytes (integer) (required) — Total size of all files in bytes.\n - updated_at_ms (integer) (required) — Unix timestamp in milliseconds when the pack was last modified.\n - version (integer) (required) — Pack 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 (integer) (required) — Unix timestamp when a fixed license was assigned. `0` for temporary licenses.\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 (integer) (required) — Unix timestamp when a fixed license was last changed. `0` for temporary licenses.\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.\n - allow_insecure_oauth_http (boolean) — Allow this server's OAuth token exchange over plaintext HTTP; testing use only.\n - allow_insecure_tls_skip_verify (boolean) — Skip TLS certificate verification when connecting to this server; testing use only.\n - args (array) — Command arguments (stdio transport).\n - auth_mode (string) — Authentication mode. [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 (integer) (required) — Creation time. Unix timestamp in milliseconds.\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 - environment_id (string) (required) — Runner ID when environment_kind is byoc; empty otherwise.\n - environment_kind (string) (required) — Runtime environment kind: empty for automatic selection, or `byoc` when pinned to a specific runner. `cloud` cannot be bound to an MCP server. [byoc]\n - headers (object) — HTTP headers (sse / streamable-http). Secret values are masked.\n - list_error (string) — Error message when the live tool list failed.\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 the account.\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 - tool_count (integer) — Number of tools in the live list.\n - tools (array) — Live tool list; populated by the get/test endpoints.\n - description (string) (required) — Tool description.\n - input_schema (object) — JSON Schema describing the tool's input parameters.\n - name (string) (required) — Tool name.\n - transport (string) (required) — Transport protocol. [stdio, sse, streamable-http]\n - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds.\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.\n - allow_insecure_oauth_http (boolean) — Allow this server's OAuth token exchange over plaintext HTTP; testing use only.\n - allow_insecure_tls_skip_verify (boolean) — Skip TLS certificate verification when connecting to this server; testing use only.\n - args (array) — Command arguments (stdio transport).\n - auth_mode (string) — Authentication mode. [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 (integer) (required) — Creation time. Unix timestamp in milliseconds.\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 - environment_id (string) (required) — Runner ID when environment_kind is byoc; empty otherwise.\n - environment_kind (string) (required) — Runtime environment kind: empty for automatic selection, or `byoc` when pinned to a specific runner. `cloud` cannot be bound to an MCP server. [byoc]\n - headers (object) — HTTP headers (sse / streamable-http). Secret values are masked.\n - list_error (string) — Error message when the live tool list failed.\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 the account.\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 - tool_count (integer) — Number of tools in the live list.\n - tools (array) — Live tool list; populated by the get/test endpoints.\n - description (string) (required) — Tool description.\n - input_schema (object) — JSON Schema describing the tool's input parameters.\n - name (string) (required) — Tool name.\n - transport (string) (required) — Transport protocol. [stdio, sse, streamable-http]\n - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds.\n - url (string) — Server URL (sse / streamable-http transport).\n - total (integer) (required) — Total number of matching servers.\n", diff --git a/internal/cli/zz_generated_roles_permissions.go b/internal/cli/zz_generated_roles_permissions.go index 8e6ef58..e202645 100644 --- a/internal/cli/zz_generated_roles_permissions.go +++ b/internal/cli/zz_generated_roles_permissions.go @@ -21,7 +21,7 @@ Return the detail of a single role by its ID. API: POST /role/info (role-read-info) Request fields: - --role-id int (required) — Role ID. + --role-id int (required) — Role ID to query. Get IDs from 'POST /role/list' (built-in roles: 2=Admin, 6=Responder, 8=Viewer). Response fields ('data' envelope is unwrapped — these fields are at the top level): - created_at (integer) (required) — Unix epoch seconds the role was created. @@ -61,7 +61,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().Int64Var(&fRoleID, "role-id", 0, "Role ID. (required)") + cmd.Flags().Int64Var(&fRoleID, "role-id", 0, "Role ID to query. Get IDs from 'POST /role/list' (built-in roles: 2=Admin, 6=Responder, 8=Viewer). (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 } @@ -80,8 +80,8 @@ Return all custom and built-in roles for the current account. API: POST /role/list (role-read-list) Request fields: - --asc bool — Ascending sort order. - --orderby string — Sort field. [created_at, updated_at] + --asc bool — Ascending sort order. Default: false (descending). + --orderby string — Sort field. Default: 'updated_at'. [created_at, updated_at] Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): - items (array) (required) @@ -122,8 +122,8 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; }) }, } - cmd.Flags().BoolVar(&fAsc, "asc", false, "Ascending sort order.") - cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort field. [created_at, updated_at]") + cmd.Flags().BoolVar(&fAsc, "asc", false, "Ascending sort order. Default: false (descending).") + cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort field. Default: 'updated_at'. [created_at, updated_at]") 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 } @@ -250,7 +250,7 @@ Permanently delete a custom role and revoke it from all members. API: POST /role/delete (role-write-delete) Request fields: - --role-id int (required) — Role ID. + --role-id int (required) — Role ID to operate on. Get IDs from 'POST /role/list' (built-in roles: 2=Admin, 6=Responder, 8=Viewer). `, Args: requireBodyFieldOrExactArg("role_id", "role-id"), Example: ` flashduty role delete --data '{"role_id":150}'`, @@ -284,7 +284,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fRoleID, "role-id", 0, "Role ID. (required)") + cmd.Flags().Int64Var(&fRoleID, "role-id", 0, "Role ID to operate on. Get IDs from 'POST /role/list' (built-in roles: 2=Admin, 6=Responder, 8=Viewer). (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 } @@ -302,7 +302,7 @@ Disable a custom role to prevent it from granting permissions. API: POST /role/disable (role-write-disable) Request fields: - --role-id int (required) — Role ID. + --role-id int (required) — Role ID to operate on. Get IDs from 'POST /role/list' (built-in roles: 2=Admin, 6=Responder, 8=Viewer). `, Args: requireBodyFieldOrExactArg("role_id", "role-id"), Example: ` flashduty role disable --data '{"role_id":150}'`, @@ -336,7 +336,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fRoleID, "role-id", 0, "Role ID. (required)") + cmd.Flags().Int64Var(&fRoleID, "role-id", 0, "Role ID to operate on. Get IDs from 'POST /role/list' (built-in roles: 2=Admin, 6=Responder, 8=Viewer). (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 } @@ -354,7 +354,7 @@ Re-enable a previously disabled custom role. API: POST /role/enable (role-write-enable) Request fields: - --role-id int (required) — Role ID. + --role-id int (required) — Role ID to operate on. Get IDs from 'POST /role/list' (built-in roles: 2=Admin, 6=Responder, 8=Viewer). `, Args: requireBodyFieldOrExactArg("role_id", "role-id"), Example: ` flashduty role enable --data '{"role_id":150}'`, @@ -388,7 +388,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fRoleID, "role-id", 0, "Role ID. (required)") + cmd.Flags().Int64Var(&fRoleID, "role-id", 0, "Role ID to operate on. Get IDs from 'POST /role/list' (built-in roles: 2=Admin, 6=Responder, 8=Viewer). (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 } @@ -408,7 +408,7 @@ API: POST /role/member/grant (role-write-grant-role) Request fields: --member-ids []int (required) — Member IDs to grant/revoke the role. Max 100. - --role-id int (required) — Role ID to grant or revoke. + --role-id int (required) — Role ID to grant or revoke. Get IDs from 'POST /role/list'. `, Args: requireBodyFieldOrArgs("member_ids", "member-ids"), Example: ` flashduty role member-grant --data '{"member_ids":[80011,80012],"role_id":150}'`, @@ -446,7 +446,7 @@ Request fields: }, } cmd.Flags().IntSliceVar(&fMemberIDs, "member-ids", nil, "Member IDs to grant/revoke the role. Max 100. (required)") - cmd.Flags().Int64Var(&fRoleID, "role-id", 0, "Role ID to grant or revoke. (required)") + cmd.Flags().Int64Var(&fRoleID, "role-id", 0, "Role ID to grant or revoke. Get IDs from 'POST /role/list'. (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 } @@ -466,7 +466,7 @@ API: POST /role/member/revoke (role-write-revoke-role) Request fields: --member-ids []int (required) — Member IDs to grant/revoke the role. Max 100. - --role-id int (required) — Role ID to grant or revoke. + --role-id int (required) — Role ID to grant or revoke. Get IDs from 'POST /role/list'. `, Args: requireBodyFieldOrArgs("member_ids", "member-ids"), Example: ` flashduty role member-revoke --data '{"member_ids":[80011],"role_id":150}'`, @@ -504,7 +504,7 @@ Request fields: }, } cmd.Flags().IntSliceVar(&fMemberIDs, "member-ids", nil, "Member IDs to grant/revoke the role. Max 100. (required)") - cmd.Flags().Int64Var(&fRoleID, "role-id", 0, "Role ID to grant or revoke. (required)") + cmd.Flags().Int64Var(&fRoleID, "role-id", 0, "Role ID to grant or revoke. Get IDs from 'POST /role/list'. (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 } diff --git a/internal/cli/zz_generated_rule_sets.go b/internal/cli/zz_generated_rule_sets.go index ccb14cf..9988cf3 100644 --- a/internal/cli/zz_generated_rule_sets.go +++ b/internal/cli/zz_generated_rule_sets.go @@ -95,7 +95,7 @@ Delete a ruleset from the rule repository by ID. API: POST /monit/store/ruleset/delete (monit-store-ruleset-delete) Request fields: - --id int (required) — Resource ID. + --id int (required) — Numeric ID of the target resource; the exact meaning depends on the API being called (e.g. datasource ID, ruleset ID). `, Example: ` flashduty monit store-ruleset-delete --data '{"id":1}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -125,7 +125,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fID, "id", 0, "Resource ID. (required)") + cmd.Flags().Int64Var(&fID, "id", 0, "Numeric ID of the target resource; the exact meaning depends on the API being called (e.g. datasource ID, ruleset ID). (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 } @@ -143,7 +143,7 @@ Retrieve the full details of a ruleset including its 'payload' (the alert rule d API: POST /monit/store/ruleset/info (monit-store-ruleset-info) Request fields: - --id int (required) — Resource ID. + --id int (required) — Numeric ID of the target resource; the exact meaning depends on the API being called (e.g. datasource ID, ruleset ID). Response fields ('data' envelope is unwrapped — these fields are at the top level): - created_at (integer) (required) — Creation timestamp, Unix epoch seconds. @@ -181,7 +181,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().Int64Var(&fID, "id", 0, "Resource ID. (required)") + cmd.Flags().Int64Var(&fID, "id", 0, "Numeric ID of the target resource; the exact meaning depends on the API being called (e.g. datasource ID, ruleset ID). (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 } diff --git a/internal/cli/zz_generated_schedules.go b/internal/cli/zz_generated_schedules.go index f51a601..adb905d 100644 --- a/internal/cli/zz_generated_schedules.go +++ b/internal/cli/zz_generated_schedules.go @@ -30,10 +30,10 @@ Request fields: --description string — Schedule description. Max 500 characters. (≤500 chars) --end string — Preview window end (Unix seconds, 10 digits). Required for /schedule/preview. Max 45 days after start. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. --name string — Legacy schedule name field. Used when schedule_name is empty. (≤40 chars) - --schedule-id int — Schedule ID. Required on update. + --schedule-id int — Schedule ID, required on update; obtain it from 'POST /schedule/list'. --schedule-name string — Schedule display name. Max 40 characters. (≤40 chars) --start string — Preview window start (Unix seconds, 10 digits). Required for /schedule/preview. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. - --team-id int — Owning team ID. + --team-id int — Owning team ID; obtain it from 'POST /team/list'. layers (array, via --data) — Rotation layers. - account_id (integer) (required) — Account ID. - create_at (integer) (required) — Creation timestamp (Unix seconds). @@ -72,7 +72,7 @@ Request fields: - update_at (integer) (required) — Last update timestamp (Unix seconds). - update_by (integer) (required) — Last updater person ID. - weight (integer) (required) — Layer weight for ordering. - notify (object, via --data) — Notification configuration attached to a schedule. + notify (object, via --data) — Rotation notification configuration. - advance_in_time (integer) — Advance notification lead time (seconds). - by (object) (required) — Per-recipient notification preference. - follow_preference (boolean) (required) — Whether to follow each responder's personal notification preference. @@ -147,10 +147,10 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().StringVar(&fDescription, "description", "", "Schedule description. Max 500 characters. (≤500 chars)") cmd.Flags().StringVar(&fEnd, "end", "", "Preview window end (Unix seconds, 10 digits). Required for /schedule/preview. Max 45 days after start. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") cmd.Flags().StringVar(&fName, "name", "", "Legacy schedule name field. Used when schedule_name is empty. (≤40 chars)") - cmd.Flags().Int64Var(&fScheduleID, "schedule-id", 0, "Schedule ID. Required on update.") + cmd.Flags().Int64Var(&fScheduleID, "schedule-id", 0, "Schedule ID, required on update; obtain it from 'POST /schedule/list'.") cmd.Flags().StringVar(&fScheduleName, "schedule-name", "", "Schedule display name. Max 40 characters. (≤40 chars)") cmd.Flags().StringVar(&fStart, "start", "", "Preview window start (Unix seconds, 10 digits). Required for /schedule/preview. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") - cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Owning team ID.") + cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Owning team ID; obtain it from 'POST /team/list'.") 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 } @@ -168,7 +168,7 @@ Delete one or more on-call schedules by ID. API: POST /schedule/delete (scheduleDelete) Request fields: - --schedule-ids []int (required) — Schedule IDs to operate on. + --schedule-ids []int (required) — Schedule IDs to operate on; obtain them from 'POST /schedule/list'. `, Args: requireBodyFieldOrArgs("schedule_ids", "schedule-ids"), Example: ` flashduty schedule delete --data '{"schedule_ids":[2001]}'`, @@ -202,7 +202,7 @@ Request fields: }) }, } - cmd.Flags().IntSliceVar(&fScheduleIDs, "schedule-ids", nil, "Schedule IDs to operate on. (required)") + cmd.Flags().IntSliceVar(&fScheduleIDs, "schedule-ids", nil, "Schedule IDs to operate on; obtain them from 'POST /schedule/list'. (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 } @@ -223,7 +223,7 @@ API: POST /schedule/info (scheduleInfo) Request fields: --end string (required) — Preview end timestamp (Unix seconds, 10 digits). Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. - --schedule-id int (required) — Schedule ID. + --schedule-id int (required) — Schedule ID; obtain it from 'POST /schedule/list'. --start string (required) — Preview start timestamp (Unix seconds, 10 digits). Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. Response fields ('data' envelope is unwrapped — these fields are at the top level): @@ -414,7 +414,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }, } cmd.Flags().StringVar(&fEnd, "end", "", "Preview end timestamp (Unix seconds, 10 digits). (required) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") - cmd.Flags().Int64Var(&fScheduleID, "schedule-id", 0, "Schedule ID. (required)") + cmd.Flags().Int64Var(&fScheduleID, "schedule-id", 0, "Schedule ID; obtain it from 'POST /schedule/list'. (required)") cmd.Flags().StringVar(&fStart, "start", "", "Preview start timestamp (Unix seconds, 10 digits). (required) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") 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 @@ -433,7 +433,7 @@ Return details of multiple on-call schedules by their IDs. API: POST /schedule/infos (scheduleInfos) Request fields: - --schedule-ids []int (required) — Schedule ID list. + --schedule-ids []int (required) — Schedule ID list; obtain IDs from 'POST /schedule/list'. Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): - items (array) (required) — Schedules assigned to the current user (or matching the requested IDs). @@ -582,7 +582,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; }) }, } - cmd.Flags().IntSliceVar(&fScheduleIDs, "schedule-ids", nil, "Schedule ID list. (required)") + cmd.Flags().IntSliceVar(&fScheduleIDs, "schedule-ids", nil, "Schedule ID list; obtain IDs from 'POST /schedule/list'. (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 } @@ -829,10 +829,10 @@ Request fields: --description string — Schedule description. Max 500 characters. (≤500 chars) --end string — Preview window end (Unix seconds, 10 digits). Required for /schedule/preview. Max 45 days after start. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. --name string — Legacy schedule name field. Used when schedule_name is empty. (≤40 chars) - --schedule-id int — Schedule ID. Required on update. + --schedule-id int — Schedule ID, required on update; obtain it from 'POST /schedule/list'. --schedule-name string — Schedule display name. Max 40 characters. (≤40 chars) --start string — Preview window start (Unix seconds, 10 digits). Required for /schedule/preview. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. - --team-id int — Owning team ID. + --team-id int — Owning team ID; obtain it from 'POST /team/list'. layers (array, via --data) — Rotation layers. - account_id (integer) (required) — Account ID. - create_at (integer) (required) — Creation timestamp (Unix seconds). @@ -871,7 +871,7 @@ Request fields: - update_at (integer) (required) — Last update timestamp (Unix seconds). - update_by (integer) (required) — Last updater person ID. - weight (integer) (required) — Layer weight for ordering. - notify (object, via --data) — Notification configuration attached to a schedule. + notify (object, via --data) — Rotation notification configuration. - advance_in_time (integer) — Advance notification lead time (seconds). - by (object) (required) — Per-recipient notification preference. - follow_preference (boolean) (required) — Whether to follow each responder's personal notification preference. @@ -1088,10 +1088,10 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().StringVar(&fDescription, "description", "", "Schedule description. Max 500 characters. (≤500 chars)") cmd.Flags().StringVar(&fEnd, "end", "", "Preview window end (Unix seconds, 10 digits). Required for /schedule/preview. Max 45 days after start. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") cmd.Flags().StringVar(&fName, "name", "", "Legacy schedule name field. Used when schedule_name is empty. (≤40 chars)") - cmd.Flags().Int64Var(&fScheduleID, "schedule-id", 0, "Schedule ID. Required on update.") + cmd.Flags().Int64Var(&fScheduleID, "schedule-id", 0, "Schedule ID, required on update; obtain it from 'POST /schedule/list'.") cmd.Flags().StringVar(&fScheduleName, "schedule-name", "", "Schedule display name. Max 40 characters. (≤40 chars)") cmd.Flags().StringVar(&fStart, "start", "", "Preview window start (Unix seconds, 10 digits). Required for /schedule/preview. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") - cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Owning team ID.") + cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Owning team ID; obtain it from 'POST /team/list'.") 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 } @@ -1295,10 +1295,10 @@ Request fields: --description string — Schedule description. Max 500 characters. (≤500 chars) --end string — Preview window end (Unix seconds, 10 digits). Required for /schedule/preview. Max 45 days after start. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. --name string — Legacy schedule name field. Used when schedule_name is empty. (≤40 chars) - --schedule-id int — Schedule ID. Required on update. + --schedule-id int — Schedule ID, required on update; obtain it from 'POST /schedule/list'. --schedule-name string — Schedule display name. Max 40 characters. (≤40 chars) --start string — Preview window start (Unix seconds, 10 digits). Required for /schedule/preview. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. - --team-id int — Owning team ID. + --team-id int — Owning team ID; obtain it from 'POST /team/list'. layers (array, via --data) — Rotation layers. - account_id (integer) (required) — Account ID. - create_at (integer) (required) — Creation timestamp (Unix seconds). @@ -1337,7 +1337,7 @@ Request fields: - update_at (integer) (required) — Last update timestamp (Unix seconds). - update_by (integer) (required) — Last updater person ID. - weight (integer) (required) — Layer weight for ordering. - notify (object, via --data) — Notification configuration attached to a schedule. + notify (object, via --data) — Rotation notification configuration. - advance_in_time (integer) — Advance notification lead time (seconds). - by (object) (required) — Per-recipient notification preference. - follow_preference (boolean) (required) — Whether to follow each responder's personal notification preference. @@ -1413,10 +1413,10 @@ Request fields: cmd.Flags().StringVar(&fDescription, "description", "", "Schedule description. Max 500 characters. (≤500 chars)") cmd.Flags().StringVar(&fEnd, "end", "", "Preview window end (Unix seconds, 10 digits). Required for /schedule/preview. Max 45 days after start. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") cmd.Flags().StringVar(&fName, "name", "", "Legacy schedule name field. Used when schedule_name is empty. (≤40 chars)") - cmd.Flags().Int64Var(&fScheduleID, "schedule-id", 0, "Schedule ID. Required on update.") + cmd.Flags().Int64Var(&fScheduleID, "schedule-id", 0, "Schedule ID, required on update; obtain it from 'POST /schedule/list'.") cmd.Flags().StringVar(&fScheduleName, "schedule-name", "", "Schedule display name. Max 40 characters. (≤40 chars)") cmd.Flags().StringVar(&fStart, "start", "", "Preview window start (Unix seconds, 10 digits). Required for /schedule/preview. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") - cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Owning team ID.") + cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Owning team ID; obtain it from 'POST /team/list'.") 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_session_replay.go b/internal/cli/zz_generated_session_replay.go index 02f7956..ab95983 100644 --- a/internal/cli/zz_generated_session_replay.go +++ b/internal/cli/zz_generated_session_replay.go @@ -22,7 +22,7 @@ Return the application, device, session bounds, and views recorded for a replaya API: POST /rum/session-replay/metadata (rum-session-replay-read-metadata) Request fields: - --session-id string (required) — RUM session ID. + --session-id string (required) — RUM session ID (the 'session.id' attribute on RUM events). --ts int — Unix timestamp in milliseconds of the session start time. Optional; disambiguates when a session ID has been reused across different time windows. Response fields ('data' envelope is unwrapped — these fields are at the top level): @@ -84,7 +84,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fSessionID, "session-id", "", "RUM session ID. (required)") + cmd.Flags().StringVar(&fSessionID, "session-id", "", "RUM session ID (the 'session.id' attribute on RUM events). (required)") cmd.Flags().Int64Var(&fTS, "ts", 0, "Unix timestamp in milliseconds of the session start time. Optional; disambiguates when a session ID has been reused across different time windows.") 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 @@ -110,7 +110,7 @@ API: POST /rum/session-replay/segments (rum-session-replay-read-segments) Request fields: --limit int — Maximum number of segments to return. 1-99, default 20. (1-99) --search-after-ctx string — Pagination cursor from a previous call. Take it from the 'search_after_ctx' field (URL mode) or the 'X-Search-After-Ctx' response header (streaming mode). - --session-id string (required) — RUM session ID. + --session-id string (required) — RUM session ID (the 'session.id' attribute on RUM events). --ts int — Unix timestamp in milliseconds. When set (and 'search_after_ctx' is empty), seeks to the most recent full-snapshot segment at or before this time instead of starting from the beginning. --url-mode bool — When 'true', return presigned download URLs as a JSON envelope instead of streaming segment bytes. Defaults to 'false'. --view-id string — Restrict results to segments belonging to this view. Omit to page through the entire session. @@ -164,7 +164,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le } cmd.Flags().Int64Var(&fLimit, "limit", 0, "Maximum number of segments to return. 1-99, default 20. (1-99)") cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Pagination cursor from a previous call. Take it from the 'search_after_ctx' field (URL mode) or the 'X-Search-After-Ctx' response header (streaming mode).") - cmd.Flags().StringVar(&fSessionID, "session-id", "", "RUM session ID. (required)") + cmd.Flags().StringVar(&fSessionID, "session-id", "", "RUM session ID (the 'session.id' attribute on RUM events). (required)") cmd.Flags().Int64Var(&fTS, "ts", 0, "Unix timestamp in milliseconds. When set (and 'search_after_ctx' is empty), seeks to the most recent full-snapshot segment at or before this time instead of starting from the beginning.") cmd.Flags().BoolVar(&fURLMode, "url-mode", false, "When 'true', return presigned download URLs as a JSON envelope instead of streaming segment bytes. Defaults to 'false'.") cmd.Flags().StringVar(&fViewID, "view-id", "", "Restrict results to segments belonging to this view. Omit to page through the entire session.") diff --git a/internal/cli/zz_generated_sessions.go b/internal/cli/zz_generated_sessions.go index a0d3adc..ddd4667 100644 --- a/internal/cli/zz_generated_sessions.go +++ b/internal/cli/zz_generated_sessions.go @@ -28,7 +28,7 @@ Request fields: --limit int — Page size for events; takes precedence over 'num_recent_events'. 0 uses the server default (100). (0-1000) --num-recent-events int — Legacy page size: number of most-recent events to return. Superseded by 'limit' when both are set; 0 uses the server default (100). (0-1000) --search-after-ctx string — Opaque keyset cursor from a previous response; pass it back to fetch the next older page. (≤4096 chars) - --session-id string (required) — Target session ID. (≥1 chars) + --session-id string (required) — Target session ID, from the list returned by 'POST /safari/session/list'. (≥1 chars) --share-token string — Share token for accessing a session through its share link. Omit it for normal account-authorized access. (≤512 chars) Response fields ('data' envelope is unwrapped — these fields are at the top level): @@ -146,7 +146,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size for events; takes precedence over 'num_recent_events'. 0 uses the server default (100). (0-1000)") cmd.Flags().Int64Var(&fNumRecentEvents, "num-recent-events", 0, "Legacy page size: number of most-recent events to return. Superseded by 'limit' when both are set; 0 uses the server default (100). (0-1000)") cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Opaque keyset cursor from a previous response; pass it back to fetch the next older page. (≤4096 chars)") - cmd.Flags().StringVar(&fSessionID, "session-id", "", "Target session ID. (required) (≥1 chars)") + cmd.Flags().StringVar(&fSessionID, "session-id", "", "Target session ID, from the list returned by 'POST /safari/session/list'. (required) (≥1 chars)") cmd.Flags().StringVar(&fShareToken, "share-token", "", "Share token for accessing a session through its share link. Omit it for normal account-authorized access. (≤512 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 @@ -180,11 +180,11 @@ Request fields: --limit int — Page size, 1–100. (1-100) --search-after-ctx string --app-name string (required) — Agent app whose sessions to list. [ask-ai, support, support-website, support-flashcat, ai-sre, template-assistant, swe] - --asc bool — Ascending order when true; applies only when 'orderby' is set. + --asc bool — Ascending order when true, descending when false; also applies when 'orderby' is omitted (sorted by 'updated_at'). --entry-kinds []string — Restrict to sessions produced by these surfaces; empty returns every kind. [web, im, api, automation] --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, updated_at] + --orderby string — Sort field: 'created_at' by creation time, 'updated_at' by last update; defaults to 'updated_at' when omitted. [created_at, updated_at] --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. @@ -306,11 +306,11 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size, 1–100. (1-100)") cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") cmd.Flags().StringVar(&fAppName, "app-name", "", "Agent app whose sessions to list. (required) [ask-ai, support, support-website, support-flashcat, ai-sre, template-assistant, swe]") - cmd.Flags().BoolVar(&fAsc, "asc", false, "Ascending order when true; applies only when 'orderby' is set.") + cmd.Flags().BoolVar(&fAsc, "asc", false, "Ascending order when true, descending when false; also applies when 'orderby' is omitted (sorted by 'updated_at').") cmd.Flags().StringSliceVar(&fEntryKinds, "entry-kinds", nil, "Restrict to sessions produced by these surfaces; empty returns every kind. [web, im, api, automation]") 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, updated_at]") + 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().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.") @@ -331,7 +331,7 @@ Delete a session by ID. API: POST /safari/session/delete (session-write-delete) Request fields: - --session-id string (required) — Target session ID. (≥1 chars) + --session-id string (required) — Target session ID, from the list returned by 'POST /safari/session/list'. (≥1 chars) `, Args: requireBodyFieldOrExactArg("session_id", "session-id"), Example: ` flashduty safari session-delete --data '{"session_id":"sess_f8oDvqiG64uur6sBNsTc4u"}'`, @@ -361,7 +361,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fSessionID, "session-id", "", "Target session ID. (required) (≥1 chars)") + cmd.Flags().StringVar(&fSessionID, "session-id", "", "Target session ID, from the list returned by 'POST /safari/session/list'. (required) (≥1 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 } diff --git a/internal/cli/zz_generated_skills.go b/internal/cli/zz_generated_skills.go index 62d8d2a..2321af4 100644 --- a/internal/cli/zz_generated_skills.go +++ b/internal/cli/zz_generated_skills.go @@ -21,7 +21,7 @@ Enable a disabled skill so the agent can load it. API: POST /safari/skill/enable (skill-read-enable) Request fields: - --skill-id string (required) — Target skill ID. + --skill-id string (required) — Target skill ID, from the list returned by 'POST /safari/skill/list'. `, Args: requireBodyFieldOrExactArg("skill_id", "skill-id"), Example: ` flashduty safari skill-enable --data '{"skill_id":"skill_8s7Hn2kLpQ3xYbVc4Wd2m"}'`, @@ -51,7 +51,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fSkillID, "skill-id", "", "Target skill ID. (required)") + cmd.Flags().StringVar(&fSkillID, "skill-id", "", "Target skill ID, from the list returned by 'POST /safari/skill/list'. (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 } @@ -69,7 +69,7 @@ Get one skill including its full SKILL.md content. API: POST /safari/skill/get (skill-read-get) Request fields: - --skill-id string (required) — Target skill ID. + --skill-id string (required) — Target skill ID, from the list returned by 'POST /safari/skill/list'. Response fields ('data' envelope is unwrapped — these fields are at the top level): - account_id (integer) (required) — Owning account ID. @@ -125,7 +125,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fSkillID, "skill-id", "", "Target skill ID. (required)") + cmd.Flags().StringVar(&fSkillID, "skill-id", "", "Target skill ID, from the list returned by 'POST /safari/skill/list'. (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 } @@ -251,7 +251,7 @@ Delete a skill by ID. API: POST /safari/skill/delete (skill-write-delete) Request fields: - --skill-id string (required) — Target skill ID. + --skill-id string (required) — Target skill ID, from the list returned by 'POST /safari/skill/list'. `, Args: requireBodyFieldOrExactArg("skill_id", "skill-id"), Example: ` flashduty safari skill-delete --data '{"skill_id":"skill_8s7Hn2kLpQ3xYbVc4Wd2m"}'`, @@ -281,7 +281,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fSkillID, "skill-id", "", "Target skill ID. (required)") + cmd.Flags().StringVar(&fSkillID, "skill-id", "", "Target skill ID, from the list returned by 'POST /safari/skill/list'. (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 } @@ -299,7 +299,7 @@ Disable an enabled skill so the agent stops loading it. API: POST /safari/skill/disable (skill-write-disable) Request fields: - --skill-id string (required) — Target skill ID. + --skill-id string (required) — Target skill ID, from the list returned by 'POST /safari/skill/list'. `, Args: requireBodyFieldOrExactArg("skill_id", "skill-id"), Example: ` flashduty safari skill-disable --data '{"skill_id":"skill_8s7Hn2kLpQ3xYbVc4Wd2m"}'`, @@ -329,7 +329,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fSkillID, "skill-id", "", "Target skill ID. (required)") + cmd.Flags().StringVar(&fSkillID, "skill-id", "", "Target skill ID, from the list returned by 'POST /safari/skill/list'. (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 } @@ -352,7 +352,7 @@ API: POST /safari/skill/update (skill-write-update) Request fields: --description string — New description. Cannot contain '<' or '>'. Sending an empty string leaves the current value unchanged — there is no way to clear it via this field. (≤1024 chars) --description-en string — New English description. Cannot contain '<' or '>'. Omit to leave unchanged; send an empty string to explicitly clear it. (≤1024 chars) - --skill-id string (required) — Target skill ID. + --skill-id string (required) — Target skill ID, from the list returned by 'POST /safari/skill/list'. --team-id int — Reassign team scope: 0 = account-wide; >0 = team. Omit to leave unchanged. Response fields ('data' envelope is unwrapped — these fields are at the top level): @@ -420,7 +420,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le } cmd.Flags().StringVar(&fDescription, "description", "", "New description. Cannot contain '<' or '>'. Sending an empty string leaves the current value unchanged — there is no way to clear it via this field. (≤1024 chars)") cmd.Flags().StringVar(&fDescriptionEn, "description-en", "", "New English description. Cannot contain '<' or '>'. Omit to leave unchanged; send an empty string to explicitly clear it. (≤1024 chars)") - cmd.Flags().StringVar(&fSkillID, "skill-id", "", "Target skill ID. (required)") + cmd.Flags().StringVar(&fSkillID, "skill-id", "", "Target skill ID, from the list returned by 'POST /safari/skill/list'. (required)") cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Reassign team scope: 0 = account-wide; >0 = team. Omit to leave unchanged.") 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_sourcemaps.go b/internal/cli/zz_generated_sourcemaps.go index 2f3079f..dd7794c 100644 --- a/internal/cli/zz_generated_sourcemaps.go +++ b/internal/cli/zz_generated_sourcemaps.go @@ -39,7 +39,7 @@ Request fields: --asc bool — Sort ascending. Default false (descending). --build-id string — Android only. Filter by Gradle plugin build identifier. Max 200 characters. --end-time int (required) — End of upload time range, Unix epoch milliseconds. Maximum window: 365 days. - --orderby string — Sort field. [created_at, updated_at] + --orderby string — Sort field; defaults to 'created_at' descending when omitted. [created_at, updated_at] --query string — Substring match on the minified URL (browser) or build ID (android). Max 200 characters. --services []string — Filter by service names. Up to 100 values. --start-time int (required) — Start of upload time range, Unix epoch milliseconds. Must be > 0 and before 'end_time'. @@ -127,7 +127,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; cmd.Flags().BoolVar(&fAsc, "asc", false, "Sort ascending. Default false (descending).") cmd.Flags().StringVar(&fBuildID, "build-id", "", "Android only. Filter by Gradle plugin build identifier. Max 200 characters.") cmd.Flags().Int64Var(&fEndTime, "end-time", 0, "End of upload time range, Unix epoch milliseconds. Maximum window: 365 days. (required)") - cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort field. [created_at, updated_at]") + cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort field; defaults to 'created_at' descending when omitted. [created_at, updated_at]") cmd.Flags().StringVar(&fQuery, "query", "", "Substring match on the minified URL (browser) or build ID (android). Max 200 characters.") cmd.Flags().StringSliceVar(&fServices, "services", nil, "Filter by service names. Up to 100 values.") cmd.Flags().Int64Var(&fStartTime, "start-time", 0, "Start of upload time range, Unix epoch milliseconds. Must be > 0 and before 'end_time'. (required)") diff --git a/internal/cli/zz_generated_status_pages.go b/internal/cli/zz_generated_status_pages.go index 766c764..21dbcce 100644 --- a/internal/cli/zz_generated_status_pages.go +++ b/internal/cli/zz_generated_status_pages.go @@ -196,16 +196,16 @@ Request fields: --is-retrospective bool — Mark this event as a retrospective (historical) one. --linked-changes []string — Linked change IDs (related incidents, deployments, etc.). --notify-subscribers bool — Notify subscribers about this event and all its updates. - --page-id int (required) — Status page ID. - --responders []int — Member IDs responsible for this event. + --page-id int (required) — Status page ID; obtain it from 'POST /status-page/list'. + --responders []int — Member IDs responsible for the change; obtain member IDs from 'POST /member/list'. --start-at-seconds string — Event start time in unix seconds. Defaults to now when omitted. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. --status string (required) — Initial event status. 'investigating'/'identified'/'monitoring'/'resolved' apply to incidents; 'scheduled'/'ongoing'/'completed' apply to maintenances. [investigating, identified, monitoring, resolved, scheduled, ongoing, completed] --title string (required) — Event title, up to 255 characters. (≤255 chars) - --type string (required) — Event type. [incident, maintenance] + --type string (required) — Change type: 'incident' unplanned incident, 'maintenance' planned maintenance. [incident, maintenance] updates (array, via --data) (required) — Timeline updates. Immediate events normally pass one update; retrospective events must pass all historical updates. - at_seconds (integer) — Update timestamp in unix seconds. - component_changes (array) — Component status transitions applied by this update. - - component_id (string) (required) — Component ID. + - component_id (string) (required) — Component ID; obtain it from 'POST /status-page/info'. - status (string) (required) — New component status. 'operational'/'degraded'/'partial_outage'/'full_outage' apply to incidents; 'operational'/'under_maintenance' apply to maintenances. [operational, degraded, partial_outage, full_outage, under_maintenance] - description (string) — Update description (Markdown). - status (string) — Change status after this update. Omit if the overall status does not change. [investigating, identified, monitoring, resolved, scheduled, ongoing, completed] @@ -290,12 +290,12 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().BoolVar(&fIsRetrospective, "is-retrospective", false, "Mark this event as a retrospective (historical) one.") cmd.Flags().StringSliceVar(&fLinkedChanges, "linked-changes", nil, "Linked change IDs (related incidents, deployments, etc.).") cmd.Flags().BoolVar(&fNotifySubscribers, "notify-subscribers", false, "Notify subscribers about this event and all its updates.") - cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") - cmd.Flags().IntSliceVar(&fResponders, "responders", nil, "Member IDs responsible for this event.") + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID; obtain it from 'POST /status-page/list'. (required)") + cmd.Flags().IntSliceVar(&fResponders, "responders", nil, "Member IDs responsible for the change; obtain member IDs from 'POST /member/list'.") cmd.Flags().StringVar(&fStartAtSeconds, "start-at-seconds", "", "Event start time in unix seconds. Defaults to now when omitted. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") cmd.Flags().StringVar(&fStatus, "status", "", "Initial event status. 'investigating'/'identified'/'monitoring'/'resolved' apply to incidents; 'scheduled'/'ongoing'/'completed' apply to maintenances. (required) [investigating, identified, monitoring, resolved, scheduled, ongoing, completed]") cmd.Flags().StringVar(&fTitle, "title", "", "Event title, up to 255 characters. (required) (≤255 chars)") - cmd.Flags().StringVar(&fType, "type", "", "Event type. (required) [incident, maintenance]") + cmd.Flags().StringVar(&fType, "type", "", "Change type: 'incident' unplanned incident, 'maintenance' planned maintenance. (required) [incident, maintenance]") 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 } @@ -314,8 +314,8 @@ Delete a status page event. API: POST /status-page/change/delete (statusPageChangeDelete) Request fields: - --change-id int (required) — Target event ID. - --page-id int (required) — Status page ID. + --change-id int (required) — Target change ID; obtain it from 'POST /status-page/change/list'. + --page-id int (required) — Status page ID; obtain it from 'POST /status-page/list'. `, Example: ` flashduty status-page change-delete --data '{"change_id":5821693893131,"page_id":5750613685214}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -348,8 +348,8 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fChangeID, "change-id", 0, "Target event ID. (required)") - cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") + cmd.Flags().Int64Var(&fChangeID, "change-id", 0, "Target change ID; obtain it from 'POST /status-page/change/list'. (required)") + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID; obtain it from 'POST /status-page/list'. (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 } @@ -569,12 +569,12 @@ API: POST /status-page/change/timeline/create (statusPageChangeTimelineCreate) Request fields: --at-seconds string — Update timestamp in unix seconds. Defaults to now when omitted. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. - --change-id int (required) — Target event ID. + --change-id int (required) — Target change ID; obtain it from 'POST /status-page/change/list'. --description string — Update description (Markdown). Required. - --page-id int (required) — Status page ID. + --page-id int (required) — Status page ID; obtain it from 'POST /status-page/list'. --status string (required) — New event status. Must match the event type. When the status transitions to 'resolved' or 'completed', all referenced components must become 'operational'. [investigating, identified, monitoring, resolved, scheduled, ongoing, completed] component_changes (array, via --data) — Component status transitions applied by this update. Component IDs must be unique. - - component_id (string) (required) — Component ID. + - component_id (string) (required) — Component ID; obtain it from 'POST /status-page/info'. - status (string) (required) — New component status. 'operational'/'degraded'/'partial_outage'/'full_outage' apply to incidents; 'operational'/'under_maintenance' apply to maintenances. [operational, degraded, partial_outage, full_outage, under_maintenance] Response fields ('data' envelope is unwrapped — these fields are at the top level): @@ -621,9 +621,9 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }, } cmd.Flags().StringVar(&fAtSeconds, "at-seconds", "", "Update timestamp in unix seconds. Defaults to now when omitted. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") - cmd.Flags().Int64Var(&fChangeID, "change-id", 0, "Target event ID. (required)") + cmd.Flags().Int64Var(&fChangeID, "change-id", 0, "Target change ID; obtain it from 'POST /status-page/change/list'. (required)") cmd.Flags().StringVar(&fDescription, "description", "", "Update description (Markdown). Required.") - cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID; obtain it from 'POST /status-page/list'. (required)") cmd.Flags().StringVar(&fStatus, "status", "", "New event status. Must match the event type. When the status transitions to 'resolved' or 'completed', all referenced components must become 'operational'. (required) [investigating, identified, monitoring, resolved, scheduled, ongoing, completed]") 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 @@ -644,9 +644,9 @@ Delete a timeline entry from a status page event. API: POST /status-page/change/timeline/delete (statusPageChangeTimelineDelete) Request fields: - --change-id int (required) — Parent event ID. - --page-id int (required) — Status page ID. - --update-id string (required) — Timeline update ID to delete. + --change-id int (required) — Owning change ID; obtain it from 'POST /status-page/change/list'. + --page-id int (required) — Status page ID; obtain it from 'POST /status-page/list'. + --update-id string (required) — Timeline update ID to delete; obtain it from 'POST /status-page/change/info'. `, Example: ` flashduty status-page change-timeline-delete --data '{"change_id":5821693893131,"page_id":5750613685214,"update_id":"01KP0311872NVYFRRQ82FWXAP4"}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -682,9 +682,9 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fChangeID, "change-id", 0, "Parent event ID. (required)") - cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") - cmd.Flags().StringVar(&fUpdateID, "update-id", "", "Timeline update ID to delete. (required)") + cmd.Flags().Int64Var(&fChangeID, "change-id", 0, "Owning change ID; obtain it from 'POST /status-page/change/list'. (required)") + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID; obtain it from 'POST /status-page/list'. (required)") + cmd.Flags().StringVar(&fUpdateID, "update-id", "", "Timeline update ID to delete; obtain it from 'POST /status-page/change/info'. (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 } @@ -707,10 +707,10 @@ API: POST /status-page/change/timeline/update (statusPageChangeTimelineUpdate) Request fields: --at-seconds string — New update timestamp in unix seconds. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. - --change-id int (required) — Parent event ID. + --change-id int (required) — Owning change ID; obtain it from 'POST /status-page/change/list'. --description string — New update description (Markdown). - --page-id int (required) — Status page ID. - --update-id string (required) — Target timeline update ID. + --page-id int (required) — Status page ID; obtain it from 'POST /status-page/list'. + --update-id string (required) — Target timeline update ID; obtain it from 'POST /status-page/change/info'. `, Example: ` flashduty status-page change-timeline-update --data '{"at_seconds":1712003600,"change_id":5821693893131,"description":"Corrected description: root cause identified in database layer.","page_id":5750613685214,"update_id":"01KP0311872NVYFRRQ82FWXAP4"}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -757,10 +757,10 @@ Request fields: }, } cmd.Flags().StringVar(&fAtSeconds, "at-seconds", "", "New update timestamp in unix seconds. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") - cmd.Flags().Int64Var(&fChangeID, "change-id", 0, "Parent event ID. (required)") + cmd.Flags().Int64Var(&fChangeID, "change-id", 0, "Owning change ID; obtain it from 'POST /status-page/change/list'. (required)") cmd.Flags().StringVar(&fDescription, "description", "", "New update description (Markdown).") - cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") - cmd.Flags().StringVar(&fUpdateID, "update-id", "", "Target timeline update ID. (required)") + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID; obtain it from 'POST /status-page/list'. (required)") + cmd.Flags().StringVar(&fUpdateID, "update-id", "", "Target timeline update ID; obtain it from 'POST /status-page/change/info'. (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 } @@ -782,9 +782,9 @@ Update an existing status page event. API: POST /status-page/change/update (statusPageChangeUpdate) Request fields: - --change-id int (required) — Target event ID. + --change-id int (required) — Target change ID; obtain it from 'POST /status-page/change/list'. --linked-changes []string — Linked event IDs. Pass the full replacement list. - --page-id int (required) — Status page ID. + --page-id int (required) — Status page ID; obtain it from 'POST /status-page/list'. --responders []int — Member IDs responsible for this event. Pass the full replacement list. --title string — New event title, up to 255 characters. Omit to keep the existing value. (≤255 chars) `, @@ -828,9 +828,9 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fChangeID, "change-id", 0, "Target event ID. (required)") + cmd.Flags().Int64Var(&fChangeID, "change-id", 0, "Target change ID; obtain it from 'POST /status-page/change/list'. (required)") cmd.Flags().StringSliceVar(&fLinkedChanges, "linked-changes", nil, "Linked event IDs. Pass the full replacement list.") - cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID; obtain it from 'POST /status-page/list'. (required)") cmd.Flags().IntSliceVar(&fResponders, "responders", nil, "Member IDs responsible for this event. Pass the full replacement list.") cmd.Flags().StringVar(&fTitle, "title", "", "New event title, up to 255 characters. Omit to keep the existing value. (≤255 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.") @@ -851,8 +851,8 @@ Delete a service component from a status page. API: POST /status-page/component/delete (statusPageComponentDelete) Request fields: - --component-ids []string (required) — IDs of components to delete. - --page-id int (required) — Status page ID. + --component-ids []string (required) — Component IDs to delete; obtain them from 'POST /status-page/info'. + --page-id int (required) — Status page ID; obtain it from 'POST /status-page/list'. `, Args: requireBodyFieldOrArgs("component_ids", "component-ids"), Example: ` flashduty status-page component-delete --data '{"component_ids":["01KP032KMN9YFBMPWANJMFZFG1"],"page_id":5750613685214}'`, @@ -889,8 +889,8 @@ Request fields: }) }, } - cmd.Flags().StringSliceVar(&fComponentIDs, "component-ids", nil, "IDs of components to delete. (required)") - cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") + cmd.Flags().StringSliceVar(&fComponentIDs, "component-ids", nil, "Component IDs to delete; obtain them from 'POST /status-page/info'. (required)") + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID; obtain it from 'POST /status-page/list'. (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 } @@ -908,7 +908,7 @@ Create or update a service component on a status page. API: POST /status-page/component/upsert (statusPageComponentUpsert) Request fields: - --page-id int (required) — Status page ID. + --page-id int (required) — Status page ID; obtain it from 'POST /status-page/list'. components (array, via --data) (required) — Components to create or update. - component_id (string) — Component ID. Omit to create a new component; supply to update an existing one. - description (string) — Component description. @@ -949,7 +949,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID; obtain it from 'POST /status-page/list'. (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 } @@ -978,16 +978,16 @@ API: POST /status-page/create (statusPageCreate) Request fields: --contact-info string — Get-in-touch contact, such as a mailto or website URL. --custom-domain string — Custom domain for a public status page. (≤255 chars) - --date-view string (required) — How event dates are displayed. [calendar, list] - --display-uptime-mode string (required) — How uptime is displayed. [chart_and_percentage, chart, none] + --date-view string (required) — How change dates are displayed: 'calendar' calendar view, 'list' list view. [calendar, list] + --display-uptime-mode string (required) — Uptime display mode: 'chart_and_percentage' chart plus percentage, 'chart' chart only, 'none' hidden. [chart_and_percentage, chart, none] --name string (required) — Display name of the status page. (≤255 chars) --page-footer string — Footer content shown on the status page. --page-header string — Header content shown on the status page. --page-title string — Browser title shown for the status page. - --type string (required) — Visibility type of the status page. [public, internal] + --type string (required) — Visibility type: 'public' accessible to anyone, 'internal' restricted to logged-in members of this account. [public, internal] --url-name string (required) — URL-safe slug, unique per account and page type. (≤255 chars) custom_links (array, via --data) — Custom navigation links shown on the status page. - subscription (object, via --data) + subscription (object, via --data) — Subscription channel toggles. - email (boolean) — Whether email subscription is enabled. - im (boolean) — Whether IM subscription is enabled. @@ -1049,13 +1049,13 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le } cmd.Flags().StringVar(&fContactInfo, "contact-info", "", "Get-in-touch contact, such as a mailto or website URL.") cmd.Flags().StringVar(&fCustomDomain, "custom-domain", "", "Custom domain for a public status page. (≤255 chars)") - cmd.Flags().StringVar(&fDateView, "date-view", "", "How event dates are displayed. (required) [calendar, list]") - cmd.Flags().StringVar(&fDisplayUptimeMode, "display-uptime-mode", "", "How uptime is displayed. (required) [chart_and_percentage, chart, none]") + cmd.Flags().StringVar(&fDateView, "date-view", "", "How change dates are displayed: 'calendar' calendar view, 'list' list view. (required) [calendar, list]") + cmd.Flags().StringVar(&fDisplayUptimeMode, "display-uptime-mode", "", "Uptime display mode: 'chart_and_percentage' chart plus percentage, 'chart' chart only, 'none' hidden. (required) [chart_and_percentage, chart, none]") cmd.Flags().StringVar(&fName, "name", "", "Display name of the status page. (required) (≤255 chars)") cmd.Flags().StringVar(&fPageFooter, "page-footer", "", "Footer content shown on the status page.") cmd.Flags().StringVar(&fPageHeader, "page-header", "", "Header content shown on the status page.") cmd.Flags().StringVar(&fPageTitle, "page-title", "", "Browser title shown for the status page.") - cmd.Flags().StringVar(&fType, "type", "", "Visibility type of the status page. (required) [public, internal]") + cmd.Flags().StringVar(&fType, "type", "", "Visibility type: 'public' accessible to anyone, 'internal' restricted to logged-in members of this account. (required) [public, internal]") cmd.Flags().StringVar(&fURLName, "url-name", "", "URL-safe slug, unique per account and page type. (required) (≤255 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 @@ -1074,7 +1074,7 @@ Delete a status page. API: POST /status-page/delete (statusPageDelete) Request fields: - --page-id int (required) — Status page ID. + --page-id int (required) — Status page ID; obtain it from 'POST /status-page/list'. `, Args: requireBodyFieldOrExactArg("page_id", "page-id"), Example: ` flashduty status-page delete --data '{"page_id":5750613685214}'`, @@ -1108,7 +1108,7 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID; obtain it from 'POST /status-page/list'. (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 } @@ -1332,7 +1332,7 @@ Cancel an in-progress status page migration job. Only jobs currently in the 'run API: POST /status-page/migration/cancel (statusPageMigrationCancel) Request fields: - --job-id string (required) — Migration job ID. + --job-id string (required) — Migration job ID, returned when the migration job is created; check progress via 'POST /status-page/migration/status'. `, Args: requireBodyFieldOrExactArg("job_id", "job-id"), Example: ` flashduty status-page migration-cancel --data '{"job_id":"01KP0311872NVYFRRQ82FW0001"}'`, @@ -1366,7 +1366,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fJobID, "job-id", "", "Migration job ID. (required)") + cmd.Flags().StringVar(&fJobID, "job-id", "", "Migration job ID, returned when the migration job is created; check progress via 'POST /status-page/migration/status'. (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 } @@ -1454,8 +1454,8 @@ Delete a section from a status page. API: POST /status-page/section/delete (statusPageSectionDelete) Request fields: - --page-id int (required) — Status page ID. - --section-ids []string (required) — IDs of sections to delete. + --page-id int (required) — Status page ID; obtain it from 'POST /status-page/list'. + --section-ids []string (required) — Section IDs to delete; obtain them from 'POST /status-page/info'. `, Args: requireBodyFieldOrArgs("section_ids", "section-ids"), Example: ` flashduty status-page section-delete --data '{"page_id":5750613685214,"section_ids":["01KP032J1FV2H8DDGN0QSJ1CAR"]}'`, @@ -1492,8 +1492,8 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") - cmd.Flags().StringSliceVar(&fSectionIDs, "section-ids", nil, "IDs of sections to delete. (required)") + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID; obtain it from 'POST /status-page/list'. (required)") + cmd.Flags().StringSliceVar(&fSectionIDs, "section-ids", nil, "Section IDs to delete; obtain them from 'POST /status-page/info'. (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 } @@ -1511,7 +1511,7 @@ Create or update a section on a status page. API: POST /status-page/section/upsert (statusPageSectionUpsert) Request fields: - --page-id int (required) — Status page ID. + --page-id int (required) — Status page ID; obtain it from 'POST /status-page/list'. sections (array, via --data) (required) — Sections to create or update. - description (string) — Section description. - hide_all (boolean) — When true, the entire section is hidden from summary endpoints. @@ -1551,7 +1551,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID; obtain it from 'POST /status-page/list'. (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 } @@ -1571,7 +1571,7 @@ API: POST /status-page/subscriber/export (statusPageSubscriberExport) Request fields: --component-ids []string — Optional component IDs to filter subscribers by. - --page-id int (required) — Status page ID. + --page-id int (required) — Status page ID; obtain it from 'POST /status-page/list'. `, Args: requireBodyFieldOrExactArg("page_id", "page-id"), Example: ` flashduty status-page subscriber-export --data '{"page_id":5750613685214}'`, @@ -1605,7 +1605,7 @@ Request fields: }, } cmd.Flags().StringSliceVar(&fComponentIDs, "component-ids", nil, "Optional component IDs to filter subscribers by.") - cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID; obtain it from 'POST /status-page/list'. (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 } @@ -1625,7 +1625,7 @@ API: POST /status-page/subscriber/import (statusPageSubscriberImport) Request fields: --method string (required) — Subscription method. 'email' is only valid for public pages; 'im' is only valid for internal pages. [email, im] - --page-id int (required) — Target status page ID. + --page-id int (required) — Target status page ID; obtain it from 'POST /status-page/list'. subscribers (array, via --data) — Subscribers to import. - all (boolean) — When true, the subscriber receives notifications for all components. Must be true when 'component_ids' and 'change_ids' are both empty. - change_ids (array) — Specific event IDs the subscriber should receive notifications for. @@ -1669,7 +1669,7 @@ Request fields: }, } cmd.Flags().StringVar(&fMethod, "method", "", "Subscription method. 'email' is only valid for public pages; 'im' is only valid for internal pages. (required) [email, im]") - cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Target status page ID. (required)") + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Target status page ID; obtain it from 'POST /status-page/list'. (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 } @@ -1772,9 +1772,9 @@ Delete an event template from a status page. API: POST /status-page/template/delete (statusPageTemplateDelete) Request fields: - --page-id int (required) — Status page ID. - --template-id string (required) — Template ID to delete. - --type string (required) — Template category. [pre_defined, message] + --page-id int (required) — Status page ID; obtain it from 'POST /status-page/list'. + --template-id string (required) — ID of the template to delete; obtain it from 'POST /status-page/template/list'. + --type string (required) — Template kind: 'pre_defined' predefined template, 'message' message template. [pre_defined, message] `, Example: ` flashduty status-page template-delete --data '{"page_id":5720156736380,"template_id":"01KP0339G5XDEPM4R86T2B23EP","type":"pre_defined"}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -1810,9 +1810,9 @@ Request fields: }) }, } - cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") - cmd.Flags().StringVar(&fTemplateID, "template-id", "", "Template ID to delete. (required)") - cmd.Flags().StringVar(&fType, "type", "", "Template category. (required) [pre_defined, message]") + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID; obtain it from 'POST /status-page/list'. (required)") + cmd.Flags().StringVar(&fTemplateID, "template-id", "", "ID of the template to delete; obtain it from 'POST /status-page/template/list'. (required)") + cmd.Flags().StringVar(&fType, "type", "", "Template kind: 'pre_defined' predefined template, 'message' message template. (required) [pre_defined, message]") 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 } @@ -1888,12 +1888,12 @@ Create or update an event template for a status page. API: POST /status-page/template/upsert (statusPageTemplateUpsert) Request fields: - --page-id int (required) — Status page ID. + --page-id int (required) — Status page ID; obtain it from 'POST /status-page/list'. --type string (required) — Template category. 'pre_defined' for predefined event templates; 'message' for notification message templates. [pre_defined, message] template (object, via --data) (required) — Template content. - description (string) — Template body text (Markdown). - - event_type (string) (required) — Event type this template applies to. [incident, maintenance] - - status (string) (required) — Event status this template represents. [investigating, identified, monitoring, resolved, scheduled, ongoing, completed] + - event_type (string) (required) — Change type this template applies to: 'incident' unplanned incident, 'maintenance' planned maintenance. [incident, maintenance] + - status (string) (required) — Change status this template maps to. Incidents use 'investigating'/'identified'/'monitoring'/'resolved'; maintenances use 'scheduled'/'ongoing'/'completed'. [investigating, identified, monitoring, resolved, scheduled, ongoing, completed] - template_id (string) — Template ID. Omit to create; supply to update. - title (string) (required) — Template title. @@ -1931,7 +1931,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID; obtain it from 'POST /status-page/list'. (required)") cmd.Flags().StringVar(&fType, "type", "", "Template category. 'pre_defined' for predefined event templates; 'message' for notification message templates. (required) [pre_defined, message]") 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 @@ -1975,12 +1975,12 @@ Request fields: --name string — Display name of the status page. Omit to keep the existing value. (≤255 chars) --page-footer string — Footer content shown on the status page. Omit to keep the existing value. --page-header string — Header content shown on the status page. Omit to keep the existing value. - --page-id int (required) — Status page ID. + --page-id int (required) — Status page ID; obtain it from 'POST /status-page/list'. --page-title string — Browser title shown for the status page. Omit to keep the existing value. --template-preference string — Preferred change-event template type. Omit to keep the existing value. --url-name string — URL-safe slug, unique per account and page type. Omit to keep the existing value. (≤255 chars) custom_links (array, via --data) — Custom navigation links shown on the status page. Omit to keep the existing value. - subscription (object, via --data) + subscription (object, via --data) — Subscription channel toggles. - email (boolean) — Whether email subscription is enabled. - im (boolean) — Whether IM subscription is enabled. `, @@ -2069,7 +2069,7 @@ Request fields: cmd.Flags().StringVar(&fName, "name", "", "Display name of the status page. Omit to keep the existing value. (≤255 chars)") cmd.Flags().StringVar(&fPageFooter, "page-footer", "", "Footer content shown on the status page. Omit to keep the existing value.") cmd.Flags().StringVar(&fPageHeader, "page-header", "", "Header content shown on the status page. Omit to keep the existing value.") - cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID; obtain it from 'POST /status-page/list'. (required)") cmd.Flags().StringVar(&fPageTitle, "page-title", "", "Browser title shown for the status page. Omit to keep the existing value.") cmd.Flags().StringVar(&fTemplatePreference, "template-preference", "", "Preferred change-event template type. Omit to keep the existing value.") cmd.Flags().StringVar(&fURLName, "url-name", "", "URL-safe slug, unique per account and page type. Omit to keep the existing value. (≤255 chars)") diff --git a/internal/cli/zz_generated_teams.go b/internal/cli/zz_generated_teams.go index a1c70f0..633bf0f 100644 --- a/internal/cli/zz_generated_teams.go +++ b/internal/cli/zz_generated_teams.go @@ -23,9 +23,9 @@ Return a single team by ID, name, or external reference ID. API: POST /team/info (team-read-info) Request fields: - --ref-id string — External reference ID. - --team-id int — Team ID. - --team-name string — Team name. + --ref-id string — External reference ID. When provided, takes precedence over 'team_name' and 'team_id'. + --team-id int — Team ID. At least one of the three lookup fields is required; lowest priority — only used when neither 'ref_id' nor 'team_name' is provided. + --team-name string — Team name. Only used when 'ref_id' is not provided; takes precedence over 'team_id'. Response fields ('data' envelope is unwrapped — these fields are at the top level): - account_id (integer) (required) — Owning account ID. @@ -72,9 +72,9 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fRefID, "ref-id", "", "External reference ID.") - cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Team ID.") - cmd.Flags().StringVar(&fTeamName, "team-name", "", "Team name.") + cmd.Flags().StringVar(&fRefID, "ref-id", "", "External reference ID. When provided, takes precedence over 'team_name' and 'team_id'.") + cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Team ID. At least one of the three lookup fields is required; lowest priority — only used when neither 'ref_id' nor 'team_name' is provided.") + cmd.Flags().StringVar(&fTeamName, "team-name", "", "Team name. Only used when 'ref_id' is not provided; takes precedence over 'team_id'.") 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 } @@ -155,8 +155,8 @@ Request fields: --page int — Page number. Default: 1. (min 1) --limit int — Page size. Max: 100. Default: 20. (1-100) --search-after-ctx string - --asc bool — Ascending sort order. - --orderby string — Sort field. [created_at, updated_at, team_name] + --asc bool — Ascending sort order. Default: false (descending). + --orderby string — Sort field. Default: 'updated_at'. [created_at, updated_at, team_name] --person-id int — Filter by member ID — return only teams this person belongs to. --query string — Substring match on team name. @@ -224,8 +224,8 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; cmd.Flags().Int64Var(&fP, "page", 0, "Page number. Default: 1. (min 1)") cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size. Max: 100. Default: 20. (1-100)") cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") - cmd.Flags().BoolVar(&fAsc, "asc", false, "Ascending sort order.") - cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort field. [created_at, updated_at, team_name]") + cmd.Flags().BoolVar(&fAsc, "asc", false, "Ascending sort order. Default: false (descending).") + cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort field. Default: 'updated_at'. [created_at, updated_at, team_name]") cmd.Flags().Int64Var(&fPersonID, "person-id", 0, "Filter by member ID — return only teams this person belongs to.") cmd.Flags().StringVar(&fQuery, "query", "", "Substring match on team name.") 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.") @@ -247,9 +247,9 @@ Permanently delete a team by ID, name, or external reference ID. API: POST /team/delete (team-write-delete) Request fields: - --ref-id string — External reference ID. - --team-id int — Team ID. - --team-name string — Team name. + --ref-id string — External reference ID. Only used when neither 'team_id' nor 'team_name' is provided. + --team-id int — Team ID. At least one of the three lookup fields is required; when several are provided, 'team_id' wins. + --team-name string — Team name. Only used when 'team_id' is not provided. `, Example: ` flashduty team delete --data '{"team_id":1001}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -285,9 +285,9 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fRefID, "ref-id", "", "External reference ID.") - cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Team ID.") - cmd.Flags().StringVar(&fTeamName, "team-name", "", "Team name.") + cmd.Flags().StringVar(&fRefID, "ref-id", "", "External reference ID. Only used when neither 'team_id' nor 'team_name' is provided.") + cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Team ID. At least one of the three lookup fields is required; when several are provided, 'team_id' wins.") + cmd.Flags().StringVar(&fTeamName, "team-name", "", "Team name. Only used when 'team_id' is not provided.") 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 } @@ -315,9 +315,9 @@ API: POST /team/upsert (team-write-upsert) Request fields: --country-code string — Default country code applied to any 'phones' entries that are not in E.164 format. --description string — Free-form description. (≤500 chars) - --emails []string — Email addresses to invite as members. + --emails []string — Add existing members to the team by email. Addresses that don't match an existing member are silently ignored — no invitation is sent. --person-ids []int — Member IDs to set as team members. Replaces the existing member list. - --phones []string — Phone numbers to invite as members. + --phones []string — Add existing members to the team by phone number. Numbers that don't match an existing member are silently ignored; non-E.164 numbers are parsed with 'countryCode'. --ref-id string — External reference ID for HR system integration. --reset-if-name-exist bool — If true and a team with the same name already exists, reset its membership to the provided person_ids. --team-id int — Team ID. Omit or set to 0 to create a new team. @@ -377,9 +377,9 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le } cmd.Flags().StringVar(&fCountryCode, "country-code", "", "Default country code applied to any 'phones' entries that are not in E.164 format.") cmd.Flags().StringVar(&fDescription, "description", "", "Free-form description. (≤500 chars)") - cmd.Flags().StringSliceVar(&fEmails, "emails", nil, "Email addresses to invite as members.") + cmd.Flags().StringSliceVar(&fEmails, "emails", nil, "Add existing members to the team by email. Addresses that don't match an existing member are silently ignored — no invitation is sent.") cmd.Flags().IntSliceVar(&fPersonIDs, "person-ids", nil, "Member IDs to set as team members. Replaces the existing member list.") - cmd.Flags().StringSliceVar(&fPhones, "phones", nil, "Phone numbers to invite as members.") + cmd.Flags().StringSliceVar(&fPhones, "phones", nil, "Add existing members to the team by phone number. Numbers that don't match an existing member are silently ignored; non-E.164 numbers are parsed with 'countryCode'.") cmd.Flags().StringVar(&fRefID, "ref-id", "", "External reference ID for HR system integration.") cmd.Flags().BoolVar(&fResetIfNameExist, "reset-if-name-exist", false, "If true and a team with the same name already exists, reset its membership to the provided person_ids.") cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Team ID. Omit or set to 0 to create a new team.") diff --git a/skills/flashduty/reference/alert.md b/skills/flashduty/reference/alert.md index f0a5399..59bf756 100644 --- a/skills/flashduty/reference/alert.md +++ b/skills/flashduty/reference/alert.md @@ -68,12 +68,12 @@ List alert events ### feed List alert activity feed -- `` (positional, required) string — Alert ID. +- `` (positional, required) string — Alert ID; obtain it from 'POST /alert/list'. - `--asc` bool — Sort ascending. - `--limit` int64 — Page size, max 100, default 20. - `--page` int64 — Page number, starting at 1. - `--search-after-ctx` string -- `--types` stringSlice — Filter by feed types. +- `--types` stringSlice — Filter by feed type codes (e.g. 'a_new', 'a_close', 'a_ack'). - response: `{items: [...], has_next_page}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: account_id (integer); created_at (integer); creator_id (integer); detail (object); ref_id (string); type (string); updated_at (integer) ### get diff --git a/skills/flashduty/reference/calendar.md b/skills/flashduty/reference/calendar.md index 433531a..2d88697 100644 --- a/skills/flashduty/reference/calendar.md +++ b/skills/flashduty/reference/calendar.md @@ -70,16 +70,16 @@ Create calendar ### delete Delete calendar -- `` (positional, required) string — Calendar ID. +- `` (positional, required) string — Calendar ID; obtain it from 'POST /calendar/list'. ### event-delete Delete calendar event -- `--cal-id` string (required) — Calendar ID. +- `--cal-id` string (required) — Calendar ID; obtain it from 'POST /calendar/list'. - `--event-id` string (required) — Event ID. ### event-list List calendar events -- `` (positional, required) string — Calendar ID. +- `` (positional, required) string — Calendar ID; obtain it from 'POST /calendar/list'. - `--day` int64 — Day (1-31). 0 means no day filter. (0-31) - `--month` int64 — Month (1-12). 0 means no month filter. (0-12) - `--year` int64 — Year. Defaults to the current year when omitted. (min 2023) @@ -87,7 +87,7 @@ List calendar events ### event-upsert Upsert calendar event -- `` (positional, required) string — Calendar ID. +- `` (positional, required) string — Calendar ID; obtain it from 'POST /calendar/list'. - `--description` string — Event description. (≤499 chars) - `--end-at` string (required) — Event end date in YYYY-MM-DD (exclusive). - `--event-id` string — Event ID. Omit when creating. (≤63 chars) @@ -98,7 +98,7 @@ Upsert calendar event ### info Get calendar info -- `` (positional, required) string — Calendar ID. +- `` (positional, required) string — Calendar ID; obtain it from 'POST /calendar/list'. - response: single object (`data` unwrapped to the top level) — fields: account_id (integer); cal_id (string); cal_name (string); created_at (integer); creator_id (integer); description (string); extra_cal_ids (array); kind (string); status (string); team_id (integer); timezone (string); updated_at (integer); updated_by (integer); workdays (array) ### list @@ -109,11 +109,11 @@ List calendars ### update Update calendar -- `` (positional, required) string — Calendar ID. +- `` (positional, required) string — Calendar ID; obtain it from 'POST /calendar/list'. - `--cal-name` string — New calendar name. (1-39 chars) - `--description` string — New description. (≤499 chars) - `--extra-cal-ids` stringSlice — Additional public-holiday calendar IDs to inherit events from. -- `--team-id` int64 — New owning team ID. +- `--team-id` int64 — New owning team ID; obtain it from 'POST /team/list'. - `--timezone` string — New IANA timezone. - `--workdays` intSlice — Workday numbers (0 = Sunday, 6 = Saturday). diff --git a/skills/flashduty/reference/channel.md b/skills/flashduty/reference/channel.md index 58e54cf..f2cf17b 100644 --- a/skills/flashduty/reference/channel.md +++ b/skills/flashduty/reference/channel.md @@ -40,7 +40,7 @@ fduty channel create --channel-name "production-api" --team-id \ ### create Create channel -- `--auto-resolve-mode` string — Auto-resolve timer reset mode. · enum: trigger | update +- `--auto-resolve-mode` string — Auto-resolve timing mode: 'trigger' starts the timer when the incident triggers, 'update' restarts it on every alert update. · enum: trigger | update - `--auto-resolve-timeout` int64 — Auto-resolve timeout in seconds. 0 disables auto-resolve. Max 30 days. (0-2592000) - `--channel-name` string (required) — Channel name. 1 to 59 characters. (1-59 chars) - `--description` string — Free-form description. Up to 500 characters. (≤500 chars) @@ -50,25 +50,25 @@ Create channel - `--is-private` bool — When true, the channel is visible only to its managing teams. - `--managing-team-ids` intSlice — Additional teams that can manage the channel. Up to 3 entries. - `--plugin-ids` intSlice — IDs of plugins (integrations) subscribed to this channel. -- `--team-id` int64 (required) — Owning team ID. +- `--team-id` int64 (required) — Owning team ID; obtain it from 'POST /team/list'. - body-only (`--data`): escalate_rule (object); flapping (object); group (object) - response: single object (`data` unwrapped to the top level) — fields: channel_id (integer); channel_name (string); external_report_token (string) ### delete Delete channel -- `` (positional, required) int64 — Channel ID. +- `` (positional, required) int64 — Channel ID; obtain it from 'POST /channel/list'. ### disable Disable channel -- `` (positional, required) int64 — Channel ID. +- `` (positional, required) int64 — Channel ID; obtain it from 'POST /channel/list'. ### enable Enable channel -- `` (positional, required) int64 — Channel ID. +- `` (positional, required) int64 — Channel ID; obtain it from 'POST /channel/list'. ### info Get channel detail -- `` (positional, required) int64 — Channel ID to fetch. +- `` (positional, required) int64 — ID of the channel to query; obtain it from 'POST /channel/list'. - response: single object (`data` unwrapped to the top level) — fields: account_id (integer); active_incident_highest_severity (string); auto_resolve_mode (string); auto_resolve_timeout (integer); channel_id (integer); channel_name (string); created_at (integer); creator_id (integer); creator_name (string); deleted_at (integer); description (string); disable_auto_close (boolean); disable_outlier_detection (boolean); external_report_token (string); flapping (object); group (object); is_external_report_enabled (boolean); is_private (boolean); is_starred (boolean); last_incident_at (integer); managing_team_ids (array); progress_to_incident_cnts (object); status (string); team_id (integer); team_name (string); updated_at (integer) ### infos [...] @@ -84,9 +84,9 @@ List channels ### update Update channel -- `--auto-resolve-mode` string — Auto-resolve timer reset mode. · enum: trigger | update +- `--auto-resolve-mode` string — Auto-resolve timing mode: 'trigger' starts the timer when the incident triggers, 'update' restarts it on every alert update. · enum: trigger | update - `--auto-resolve-timeout` int64 — Auto-resolve timeout in seconds. 0 disables auto-resolve. Max 30 days. (0-2592000) -- `` (positional, required) int64 — Channel ID to update. +- `` (positional, required) int64 — ID of the channel to update; obtain it from 'POST /channel/list'. - `--channel-name` string — New channel name. 1 to 59 characters. (1-59 chars) - `--description` string — New description. Up to 500 characters. (≤500 chars) - `--disable-auto-close` bool — Disable automatic incident closing. @@ -94,7 +94,7 @@ Update channel - `--is-external-report-enabled` bool — Allow external reporters to file incidents into this channel. - `--is-private` bool — When true, the channel is visible only to its managing teams. - `--managing-team-ids` intSlice — Additional teams that can manage the channel. Up to 3 entries. -- `--team-id` int64 — New owning team ID. +- `--team-id` int64 — New owning team ID; obtain it from 'POST /team/list'. - body-only (`--data`): flapping (object); group (object) - response: single object (`data` unwrapped to the top level) — fields: external_report_token (string) diff --git a/skills/flashduty/reference/enrichment.md b/skills/flashduty/reference/enrichment.md index f986c15..7a3bf35 100644 --- a/skills/flashduty/reference/enrichment.md +++ b/skills/flashduty/reference/enrichment.md @@ -88,7 +88,7 @@ Create mapping API - `--description` string — Optional description. - `--insecure-skip-verify` bool — Skip TLS certificate verification. Default 'false'. - `--retry-count` int64 — Number of retries on failure (0–1). Default 0. -- `--team-id` int64 — Owning team ID. +- `--team-id` int64 — Owning team ID; obtain it from 'POST /team/list'. - `--timeout` int64 — Request timeout in seconds (1–3). Default 2. - `--url` string (required) — HTTP/HTTPS endpoint URL (max 500 chars). (≤500 chars) - body-only (`--data`): headers (object) @@ -114,7 +114,7 @@ Update mapping API - `--description` string — New description. - `--insecure-skip-verify` bool — New TLS skip-verify setting. - `--retry-count` int64 — New retry count. -- `--team-id` int64 — New owning team ID. +- `--team-id` int64 — New owning team ID; obtain it from 'POST /team/list'. - `--timeout` int64 — New timeout in seconds. - `--url` string — New endpoint URL (max 500 chars). (≤500 chars) - body-only (`--data`): headers (object) @@ -146,7 +146,7 @@ Truncate mapping data ### mapping-data-upload Upload mapping data via CSV - `--file` string — CSV file to upload. -- `--schema-id` string — Mapping schema ID (query parameter). +- `--schema-id` string — Mapping schema ID (passed as a query parameter); obtain it from 'POST /enrichment/mapping/schema/list'. ### mapping-data-upsert Upsert mapping data rows diff --git a/skills/flashduty/reference/escalation.md b/skills/flashduty/reference/escalation.md index b38820a..06cfcff 100644 --- a/skills/flashduty/reference/escalation.md +++ b/skills/flashduty/reference/escalation.md @@ -43,7 +43,7 @@ fduty channel escalate-rule-create \ ### escalate-rule-create Create escalation rule - `--aggr-window` int64 — Delay window in seconds. 0 disables delay. (0-3600) -- `--channel-id` int64 (required) — Channel the rule belongs to. +- `--channel-id` int64 (required) — Owning channel ID; obtain it from 'POST /channel/list'. - `--description` string — Rule description, up to 500 characters. (≤500 chars) - `--priority` int64 — Evaluation priority. Lower runs first. (0-200) - `--rule-name` string (required) — Rule name, 1 to 39 characters. (1-39 chars) @@ -53,22 +53,22 @@ Create escalation rule ### escalate-rule-delete Delete escalation rule -- `--channel-id` int64 (required) — Channel the rule belongs to. +- `--channel-id` int64 (required) — Owning channel ID; obtain it from 'POST /channel/list'. - `--rule-id` string (required) — Rule ID (MongoDB ObjectID). ### escalate-rule-disable Disable escalation rule -- `--channel-id` int64 (required) — Channel the rule belongs to. +- `--channel-id` int64 (required) — Owning channel ID; obtain it from 'POST /channel/list'. - `--rule-id` string (required) — Rule ID (MongoDB ObjectID). ### escalate-rule-enable Enable escalation rule -- `--channel-id` int64 (required) — Channel the rule belongs to. +- `--channel-id` int64 (required) — Owning channel ID; obtain it from 'POST /channel/list'. - `--rule-id` string (required) — Rule ID (MongoDB ObjectID). ### escalate-rule-info Get escalation rule detail -- `--channel-id` int64 (required) — Channel the rule belongs to. +- `--channel-id` int64 (required) — Owning channel ID; obtain it from 'POST /channel/list'. - `--rule-id` string (required) — Rule ID (MongoDB ObjectID). - response: single object (`data` unwrapped to the top level) — fields: account_id (integer); aggr_window (integer); channel_id (integer); channel_name (string); created_at (integer); deleted_at (integer); description (string); filters (object); layers (array); priority (integer); rule_id (string); rule_name (string); status (string); template_id (string); time_filters (array); updated_at (integer); updated_by (integer) @@ -80,7 +80,7 @@ List escalation rules ### escalate-rule-update Update escalation rule - `--aggr-window` int64 — Delay window in seconds. 0 disables delay. -- `--channel-id` int64 (required) — Channel the rule belongs to. +- `--channel-id` int64 (required) — Owning channel ID; obtain it from 'POST /channel/list'. - `--description` string — Rule description, up to 500 characters. (≤500 chars) - `--priority` int64 — Evaluation priority. Lower runs first. - `--rule-id` string (required) — Escalation rule ID (MongoDB ObjectID). diff --git a/skills/flashduty/reference/field.md b/skills/flashduty/reference/field.md index c6166a0..4d90fa8 100644 --- a/skills/flashduty/reference/field.md +++ b/skills/flashduty/reference/field.md @@ -46,7 +46,7 @@ Create field - `--description` string — Optional free-text description. (≤499 chars) - `--display-name` string (required) — Human-readable name. Must be unique within the account. (≤39 chars) - `--field-name` string (required) — Machine name. Must start with a letter or underscore; 1–40 chars of '[a-zA-Z0-9_]'. Immutable after creation. (≤39 chars) -- `--field-type` string (required) — Field input type. Immutable after creation. · enum: checkbox | multi_select | single_select | text +- `--field-type` string (required) — Field type, immutable after creation: 'text', 'single_select', 'multi_select' or 'checkbox'. · enum: checkbox | multi_select | single_select | text - `--options` stringSlice — Required and non-empty for 'single_select'/'multi_select' (unique strings, each 1–200 chars). Must be omitted or empty for 'checkbox'/'text'. - `--value-type` string (required) — Stored value type. 'checkbox' requires 'bool'; 'single_select'/'multi_select'/'text' require 'string'. Immutable after creation. · enum: string | bool | float - body-only (`--data`): default_value (any) diff --git a/skills/flashduty/reference/incident.md b/skills/flashduty/reference/incident.md index 4ac7438..6cfe730 100644 --- a/skills/flashduty/reference/incident.md +++ b/skills/flashduty/reference/incident.md @@ -153,7 +153,7 @@ View incident alerts ### assign Assign incident - `--incident-id` string — Single incident ID. Ignored when 'incident_ids' is also provided. -- `--incident-ids` stringSlice — Batch incident IDs. +- `--incident-ids` stringSlice — Incident IDs to assign in bulk; obtain them from 'POST /incident/list'. - body-only (`--data`): assigned_to (object) (required) ### close [ ...] @@ -249,7 +249,7 @@ List incidents ### list-by-ids [...] List incidents by IDs -- `` (positional, required) stringSlice — Incident IDs to fetch. +- `` (positional, required) stringSlice — Incident IDs to query; obtain them from 'POST /incident/list'. - response: `{items: [...], has_next_page, search_after_ctx, total}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: account_id (integer); account_locale (string); account_name (string); account_time_zone (string); ack_time (integer); active_alert_cnt (integer); ai_summary (string); alert_cnt (integer); alert_event_cnt (integer); alerts (array); assigned_to (object); channel_id (integer); channel_name (string); channel_status (string); close_time (integer); closer (object); closer_id (integer); created_at (integer); creator (object); creator_id (integer); data_source_id (integer); data_source_ids (array); data_source_type (string); data_source_types (array); dedup_key (string); deleted_at (integer); description (string); detail_url (string); end_time (integer); equals_md5 (string); ever_muted (boolean); fields (object); frequency (string); group_method (string); images (array); impact (string); incident_id (string); incident_severity (string); incident_status (string); integration_id (integer); integration_ids (array); integration_type (string); integration_types (array); labels (object); last_time (integer); links (array); manual_overrides (array); num (string); owner (object); owner_id (integer); post_mortem_id (string); progress (string); reporter_email (string); resolution (string); responders (array); root_cause (string); silence_url (string); snoozed_before (integer); start_time (integer); title (string); updated_at (integer) ### merge @@ -280,7 +280,7 @@ Update incident fields - `--description` string — New description. (3-6144 chars) - `--impact` string — New impact description. (3-6144 chars) - `` (positional, required) string — Incident ID (MongoDB ObjectID). -- `--incident-severity` string — New severity. · enum: Info | Warning | Critical +- `--incident-severity` string — New severity: 'Info', 'Warning' or 'Critical' (most severe). · enum: Info | Warning | Critical - `--resolution` string — New resolution notes. (3-6144 chars) - `--root-cause` string — New root cause analysis. (3-6144 chars) - `--title` string — New incident title. (3-200 chars) @@ -310,10 +310,10 @@ Get ServiceDeskPlus linked incidents - `--limit` int64 — Page size. Defaults to 20; maximum 100. (0-100) - `--page` int64 — Page number starting at 1. Ignored when 'search_after_ctx' is set. (min 0) - `--request-id` string — ServiceDeskPlus request ID. (≤64 chars) -- `--search-after-ctx` string — Cursor returned by the previous page. +- `--search-after-ctx` string — Pagination cursor: leave empty for the first page, then pass the 'search_after_ctx' returned by the previous response. - `--since` string - `--start-time` string — Window start, Unix seconds. Optional when 'incident_id' is provided. (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. -- `--status` string — Synchronization status filter. · enum: success | failed +- `--status` string — Filter by sync status: 'success' or 'failed'. · enum: success | failed - `--until` string - response: `{items: [...], has_next_page, search_after_ctx, total}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: channel_id (integer); channel_name (string); created_at (integer); error_message (string); incident_id (string); incident_title (string); integration_id (integer); request_id (string); request_link (string); status (string) @@ -379,7 +379,7 @@ List incident war rooms ### war-room-add-member Add war-room member - `` (positional, required) string — Chat ID of the war room within the IM platform. -- `--integration-id` int64 (required) — IM integration that hosts the war room. +- `--integration-id` int64 (required) — ID of the IM integration hosting the war room; obtain it from 'POST /datasource/im/war-room-enabled/list'. - `--member-ids` intSlice (required) — Person IDs to add to the war room. ### war-room-create @@ -398,11 +398,11 @@ Get war-room default observers ### war-room-delete Delete war room - `--incident-id` string (required) — Incident ID (MongoDB ObjectID). -- `--integration-id` int64 (required) — IM integration ID. +- `--integration-id` int64 (required) — IM integration ID; obtain it from 'POST /datasource/im/war-room-enabled/list'. ### war-room-detail Get war room detail -- `` (positional, required) string — Chat/group ID on the IM side. +- `` (positional, required) string — Chat ID of the IM group hosting the war room; obtain it from 'POST /incident/war-room/list'. - `--integration-id` int64 (required) — IM integration ID that hosts the war room. - response: same shape as `get ` above @@ -458,7 +458,7 @@ List work items - `--assignee-id` int64 — Restrict results to items assigned to this member ID. Listing by assignee alone requires being that assignee or an account admin. - `--cursor` string — Pagination cursor from a previous response's 'next_cursor'. - `--incident-id` string — Incident ID (MongoDB ObjectID). Also returns follow-ups anchored on the incident's post-mortem. -- `--item-type` string — Restrict results to one item type. · enum: action | follow_up +- `--item-type` string — Filter by work item type: 'action' action item, 'follow_up' post-mortem follow-up. · enum: action | follow_up - `--limit` int64 — Page size, at most 200. Defaults to 50. (1-200) - `--post-mortem-id` string — Post-mortem ID (32-character hex string). Returns follow-ups bound to this post-mortem. - response: `{items: [...], has_more, idempotent_replay, next_cursor}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: assignee_ids (array); converted_at_seconds (integer); converted_by (integer); created_at_seconds (integer); created_by (integer); description (string); incident_id (string); item_type (string); legacy_source_id (string); post_mortem_id (string); priority (string); source_kind (string); status (string); title (string); updated_at_seconds (integer); updated_by (integer); version (integer); work_item_id (string) diff --git a/skills/flashduty/reference/member.md b/skills/flashduty/reference/member.md index 29ace88..b7c783f 100644 --- a/skills/flashduty/reference/member.md +++ b/skills/flashduty/reference/member.md @@ -56,12 +56,12 @@ fduty member list --query "alice" --output-format toon ### delete Delete member - `--country-code` string — Phone country code, used with phone -- `--email` string — Email address +- `--email` string — Email address. Only used when neither 'member_id' nor 'member_name' is provided - `--is-force` bool — Force delete. Defaults to false, which checks for references from escalation rules, schedules, etc. Set to true to skip the reference check and delete immediately -- `--member-id` int64 — Member ID -- `--member-name` string — Member name -- `--phone` string — Phone number -- `--ref-id` string — External reference ID +- `--member-id` int64 — Member ID. When several lookup fields are provided, the first non-empty one wins in the order 'member_id' > 'member_name' > 'email' > 'phone' > 'ref_id' +- `--member-name` string — Member name. Only used when 'member_id' is not provided +- `--phone` string — Phone number. Only used when 'member_id', 'member_name', and 'email' are all absent +- `--ref-id` string — External reference ID. Only used when all other lookup fields are absent ### info Get current member info @@ -80,18 +80,18 @@ Reset member info ### invite Invite members -- `--from` string — Invite source context +- `--from` string — Invite source. Only takes effect when the account has member invites disabled and the value is 'api': members are created directly in the enabled state with email/phone marked verified and no invitation sent. Any other value follows the normal invite flow - body-only (`--data`): members (array) (required) - response: `{items: [...]}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: member_id (integer); member_name (string) ### list List members -- `--asc` bool — Ascending order -- `--limit` int64 — Page size (1-100) -- `--orderby` string — Sort field · enum: created_at | updated_at -- `--page` int64 — Page number (min 1) -- `--query` string — Search keyword -- `--role-id` int64 — Filter by role ID +- `--asc` bool — Ascending order. Default: false (descending) +- `--limit` int64 — Page size. Defaults to 100 on the server when omitted or 0 (1-100) +- `--orderby` string — Sort field. Default: 'updated_at' · enum: created_at | updated_at +- `--page` int64 — Page number, 1-based (min 1) +- `--query` string — Substring match on member name or email; if the keyword parses as a phone number, an exact phone match is also applied +- `--role-id` int64 — Filter by role ID. Get role IDs from 'POST /role/list' (built-in roles: 2=Admin, 6=Responder, 8=Viewer) - `--search-after-ctx` string - response: `{items: [...], limit, p, total}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: account_id (integer); account_role_ids (array); avatar (string); country_code (string); created_at (integer); email (string); email_verified (boolean); is_external (boolean); locale (string); member_id (integer); member_name (string); phone (string); phone_verified (boolean); ref_id (string); status (string); time_zone (string); updated_at (integer) @@ -108,7 +108,7 @@ Revoke role from member ### role-update [...] Update member roles - `--member-id` int64 (required) — Member ID -- `` (positional, required) intSlice — New set of role IDs +- `` (positional, required) intSlice — New role ID set. Replaces the member's existing roles entirely (not additive); get IDs from 'POST /role/list'. Leave empty to reset to the built-in Viewer role (ID 8) diff --git a/skills/flashduty/reference/monit.md b/skills/flashduty/reference/monit.md index 78a4fae..f554480 100644 --- a/skills/flashduty/reference/monit.md +++ b/skills/flashduty/reference/monit.md @@ -94,7 +94,7 @@ Create datasource - `--address` string — Connection address. For Prometheus/Loki/VictoriaLogs: HTTP URL. For MySQL/Oracle/Postgres/ClickHouse: 'host:port'. For SLS: endpoint without http/https prefix. Not required for Elasticsearch cloud deployment. - `--edge-cluster-name` string (required) — Monitors edge cluster name responsible for evaluating rules using this datasource. - `--id` int64 — Datasource ID. Required for update; omit for create. -- `--name` string (required) — Datasource display name. +- `--name` string (required) — Datasource display name. This is the name referenced as 'ds_name' in query and diagnose APIs. - `--note` string — Optional description. - `--type-ident` string (required) — Datasource type identifier. Allowed: 'prometheus', 'loki', 'mysql', 'oracle', 'postgres', 'clickhouse', 'elasticsearch', 'sls', 'victorialogs'. - body-only (`--data`): payload (object) (required) @@ -102,11 +102,11 @@ Create datasource ### datasource-delete Delete datasource -- `--id` int64 (required) — Resource ID. +- `--id` int64 (required) — Numeric ID of the target resource; the exact meaning depends on the API being called (e.g. datasource ID, ruleset ID). ### datasource-info Get datasource detail -- `--id` int64 (required) — Resource ID. +- `--id` int64 (required) — Numeric ID of the target resource; the exact meaning depends on the API being called (e.g. datasource ID, ruleset ID). - response: same shape as `datasource-create` above ### datasource-list @@ -116,24 +116,24 @@ List datasources ### datasource-sls-logstores List SLS logstores -- `--id` int64 — SLS datasource ID. +- `--id` int64 — ID of an SLS-type datasource. Obtainable via 'POST /monit/datasource/list'. - `--offset` int64 — Pagination offset. -- `--project` string — SLS project name. -- `--size` int64 — Page size. +- `--project` string — SLS project name. Obtainable via 'POST /monit/datasource/sls/projects'. +- `--size` int64 — Page size. Defaults to 200 server-side when 0. ### datasource-sls-projects List SLS projects -- `--id` int64 — SLS datasource ID. +- `--id` int64 — ID of an SLS-type datasource. Obtainable via 'POST /monit/datasource/list'. - `--offset` int64 — Pagination offset. -- `--query` string — Name prefix filter. -- `--size` int64 — Page size. +- `--query` string — Fuzzy filter on project description (maps to the 'description' parameter of Aliyun SLS ListProject). Leave empty to return all. +- `--size` int64 — Page size. Defaults to 200 server-side when 0. ### datasource-update Update datasource - `--address` string — Connection address. For Prometheus/Loki/VictoriaLogs: HTTP URL. For MySQL/Oracle/Postgres/ClickHouse: 'host:port'. For SLS: endpoint without http/https prefix. Not required for Elasticsearch cloud deployment. - `--edge-cluster-name` string (required) — Monitors edge cluster name responsible for evaluating rules using this datasource. - `--id` int64 — Datasource ID. Required for update; omit for create. -- `--name` string (required) — Datasource display name. +- `--name` string (required) — Datasource display name. This is the name referenced as 'ds_name' in query and diagnose APIs. - `--note` string — Optional description. - `--type-ident` string (required) — Datasource type identifier. Allowed: 'prometheus', 'loki', 'mysql', 'oracle', 'postgres', 'clickhouse', 'elasticsearch', 'sls', 'victorialogs'. - body-only (`--data`): payload (object) (required) @@ -173,7 +173,7 @@ Get rule audit snapshot ### rule-audits List rule change history -- `--id` int64 (required) — Rule ID. +- `--id` int64 (required) — Alert rule ID. Obtainable per folder via 'POST /monit/rule/list/basic'. - response: TOP-LEVEL array — pipe `--json | jq '.[]'` (NOT `.items[]`) — fields: account_id (integer); action (string); alert_rule_id (integer); content (string); created_at (integer); creator_id (integer); creator_name (string); id (integer) ### rule-counter-channel @@ -192,35 +192,35 @@ Get rule counter time series ### rule-create Create alert rule -- `--account-id` int64 +- `--account-id` int64 — Account ID. Filled by the server from the authenticated identity; do not provide. - `--channel-ids` intSlice — Channel IDs to send alerts to. -- `--created-at` int64 -- `--creator-id` int64 -- `--creator-name` string -- `--cron-pattern` string — 5-field cron schedule. Must not start with 'CRON_TZ=' or 'TZ='; use the 'timezone' field instead. -- `--debug-log-enabled` bool -- `--delay-seconds` int64 -- `--description` string +- `--created-at` string — Creation time as a Unix timestamp in seconds. Generated by the server; do not provide. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. +- `--creator-id` int64 — Creator user ID. Filled by the server from the current user; do not provide. +- `--creator-name` string — Creator name. Filled by the server; do not provide. +- `--cron-pattern` string — Schedule expression: a 6-field cron (with seconds) or an '@every 30s' interval descriptor. Must not start with 'CRON_TZ=' or 'TZ='; use the 'timezone' field instead. +- `--debug-log-enabled` bool — Whether to enable debug logging; the edge emits detailed evaluation logs, useful for troubleshooting rules that do not trigger as expected. +- `--delay-seconds` int64 — Seconds to shift the evaluation query window backward, compensating for data ingestion latency. +- `--description` string — Rule description, in Markdown. - `--description-type` string — Format for the description. Defaults to 'text' when omitted or empty. · enum: text | markdown -- `--ds-ids` intSlice — Specific data source IDs. +- `--ds-ids` intSlice — Datasource IDs, merged with 'ds_list' to decide which datasources the rule monitors; IDs survive datasource renames. At least one of 'ds_list' and 'ds_ids' must be provided. - `--ds-list` stringSlice — Data source name patterns (supports wildcards). -- `--ds-type` string — Data source type. -- `--enabled` bool -- `--folder-id` int64 — Folder the rule belongs to. -- `--id` int64 -- `--name` string — Rule name. +- `--ds-type` string — Datasource type identifier; allowed values are listed by 'POST /monit/rule/dstypes' (e.g. 'prometheus', 'elasticsearch'). +- `--enabled` bool — Whether the rule is enabled. Updating to 'false' makes the server clean up the rule's active alerts. +- `--folder-id` int64 — ID of the folder the rule belongs to. Obtainable via 'POST /monit/folder/list'. +- `--id` int64 — Rule ID. Required for update; omit for create (assigned by the server). +- `--name` string — Rule name. Must be unique within the same folder. - `--repeat-interval` int64 — Notification repeat interval in seconds. - `--repeat-total` int64 — Max number of repeat notifications. - `--timezone` string — Timezone in which the rule executes. Determines how the cron schedule and effective time windows are interpreted. Only IANA timezone names are accepted (e.g. 'Asia/Shanghai', 'UTC', 'Europe/London'); shortcuts and offsets such as 'Local', 'UTC+8', or 'CST' are rejected. Treated as 'Asia/Shanghai' if empty. -- `--updated-at` int64 -- `--updater-id` int64 -- `--updater-name` string +- `--updated-at` string — Last update time as a Unix timestamp in seconds. Generated by the server; do not provide. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. +- `--updater-id` int64 — Last updater user ID. Filled by the server; do not provide. +- `--updater-name` string — Last updater name. Filled by the server; do not provide. - body-only (`--data`): annotations (object); enabled_times (array); labels (object); rule_configs (object) - response: single object (`data` unwrapped to the top level) — fields: account_id (integer); annotations (object); channel_ids (array); created_at (integer); creator_id (integer); creator_name (string); cron_pattern (string); debug_log_enabled (boolean); delay_seconds (integer); description (string); description_type (string); ds_ids (array); ds_list (array); ds_type (string); enabled (boolean); enabled_times (array); folder_id (integer); id (integer); labels (object); name (string); repeat_interval (integer); repeat_total (integer); rule_configs (object); timezone (string); updated_at (integer); updater_id (integer); updater_name (string) ### rule-delete Delete alert rule -- `--id` int64 (required) — Rule ID. +- `--id` int64 (required) — Alert rule ID. Obtainable per folder via 'POST /monit/rule/list/basic'. ### rule-delete-batch Batch delete alert rules @@ -241,7 +241,7 @@ Import alert rules ### rule-info Get alert rule detail -- `--id` int64 (required) — Rule ID. +- `--id` int64 (required) — Alert rule ID. Obtainable per folder via 'POST /monit/rule/list/basic'. - response: same shape as `rule-create` above ### rule-list-basic @@ -251,58 +251,58 @@ List alert rules ### rule-move Move alert rules to folder -- `--dest-folder-id` int64 (required) — Destination folder ID. +- `--dest-folder-id` int64 (required) — Destination folder ID. Obtainable via 'POST /monit/folder/list'. - `--ids` intSlice (required) — Rule IDs to move. - response: same shape as `rule-import` above ### rule-status Get rule trigger status under folder -- `--folder-id` int64 — Folder ID. 0 for all. +- `--folder-id` int64 — Folder ID to summarize. Obtainable via 'POST /monit/folder/list'. Trigger statistics are returned grouped by direct child folder. - response: same shape as `rule-counter-status` above ### rule-update Update alert rule -- `--account-id` int64 +- `--account-id` int64 — Account ID. Filled by the server from the authenticated identity; do not provide. - `--channel-ids` intSlice — Channel IDs to send alerts to. -- `--created-at` int64 -- `--creator-id` int64 -- `--creator-name` string -- `--cron-pattern` string — 5-field cron schedule. Must not start with 'CRON_TZ=' or 'TZ='; use the 'timezone' field instead. -- `--debug-log-enabled` bool -- `--delay-seconds` int64 -- `--description` string +- `--created-at` string — Creation time as a Unix timestamp in seconds. Generated by the server; do not provide. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. +- `--creator-id` int64 — Creator user ID. Filled by the server from the current user; do not provide. +- `--creator-name` string — Creator name. Filled by the server; do not provide. +- `--cron-pattern` string — Schedule expression: a 6-field cron (with seconds) or an '@every 30s' interval descriptor. Must not start with 'CRON_TZ=' or 'TZ='; use the 'timezone' field instead. +- `--debug-log-enabled` bool — Whether to enable debug logging; the edge emits detailed evaluation logs, useful for troubleshooting rules that do not trigger as expected. +- `--delay-seconds` int64 — Seconds to shift the evaluation query window backward, compensating for data ingestion latency. +- `--description` string — Rule description, in Markdown. - `--description-type` string — Format for the description. Defaults to 'text' when omitted or empty. · enum: text | markdown -- `--ds-ids` intSlice — Specific data source IDs. +- `--ds-ids` intSlice — Datasource IDs, merged with 'ds_list' to decide which datasources the rule monitors; IDs survive datasource renames. At least one of 'ds_list' and 'ds_ids' must be provided. - `--ds-list` stringSlice — Data source name patterns (supports wildcards). -- `--ds-type` string — Data source type. -- `--enabled` bool -- `--folder-id` int64 — Folder the rule belongs to. -- `--id` int64 -- `--name` string — Rule name. +- `--ds-type` string — Datasource type identifier; allowed values are listed by 'POST /monit/rule/dstypes' (e.g. 'prometheus', 'elasticsearch'). +- `--enabled` bool — Whether the rule is enabled. Updating to 'false' makes the server clean up the rule's active alerts. +- `--folder-id` int64 — ID of the folder the rule belongs to. Obtainable via 'POST /monit/folder/list'. +- `--id` int64 — Rule ID. Required for update; omit for create (assigned by the server). +- `--name` string — Rule name. Must be unique within the same folder. - `--repeat-interval` int64 — Notification repeat interval in seconds. - `--repeat-total` int64 — Max number of repeat notifications. - `--timezone` string — Timezone in which the rule executes. Determines how the cron schedule and effective time windows are interpreted. Only IANA timezone names are accepted (e.g. 'Asia/Shanghai', 'UTC', 'Europe/London'); shortcuts and offsets such as 'Local', 'UTC+8', or 'CST' are rejected. Treated as 'Asia/Shanghai' if empty. -- `--updated-at` int64 -- `--updater-id` int64 -- `--updater-name` string +- `--updated-at` string — Last update time as a Unix timestamp in seconds. Generated by the server; do not provide. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. +- `--updater-id` int64 — Last updater user ID. Filled by the server; do not provide. +- `--updater-name` string — Last updater name. Filled by the server; do not provide. - body-only (`--data`): annotations (object); enabled_times (array); labels (object); rule_configs (object) - response: same shape as `rule-create` above ### rule-update-fields Batch update rule fields -- `--channel-ids` intSlice -- `--cron-pattern` string -- `--debug-log-enabled` bool -- `--delay-seconds` int64 -- `--description` string -- `--ds-ids` intSlice -- `--ds-list` stringSlice -- `--ds-type` string -- `--enabled` bool -- `--fields` stringSlice (required) — Field names to update. +- `--channel-ids` intSlice — IDs of the collaboration spaces alerts are sent to; may be empty. Effective only when 'fields' includes 'channel_ids'. +- `--cron-pattern` string — Schedule expression: a 6-field cron (with seconds) or an '@every 30s' interval descriptor; 'CRON_TZ='/'TZ=' prefixes are not allowed. Effective only when 'fields' includes 'cron_pattern'. +- `--debug-log-enabled` bool — Whether to enable debug logging; the edge emits detailed evaluation logs for troubleshooting. Effective only when 'fields' includes 'debug_log_enabled'. +- `--delay-seconds` int64 — Seconds to shift the evaluation query window backward, compensating for data ingestion latency. Effective only when 'fields' includes 'delay_seconds'. +- `--description` string — Rule description (Markdown). Effective only when 'fields' includes 'description'. +- `--ds-ids` intSlice — Datasource IDs, merged with 'ds_list' to decide which datasources the rule monitors; IDs survive datasource renames. Effective only when 'fields' includes 'ds_ids'. +- `--ds-list` stringSlice — Datasource name match patterns; wildcards supported. Effective only when 'fields' includes 'ds_list'. +- `--ds-type` string — Datasource type identifier; allowed values are listed by 'POST /monit/rule/dstypes'. Effective only when 'fields' includes 'ds_type'. +- `--enabled` bool — Whether the rule is enabled. Setting it to 'false' makes the server clean up the rule's active alerts. Effective only when 'fields' includes 'enabled'. +- `--fields` stringSlice (required) — Field names to update. Only listed fields are updated, taking new values from the same-named request fields; values for unlisted fields are silently ignored. · enum: labels | ds_type | ds_list | ds_ids | enabled | debug_log_enabled | cron_pattern | timezone | delay_seconds | enabled_times | annotations | description | channel_ids | repeat_interval | repeat_total - `--ids` intSlice (required) — Rule IDs to update. -- `--repeat-interval` int64 -- `--repeat-total` int64 +- `--repeat-interval` int64 — Interval in seconds between repeated alert notifications. Effective only when 'fields' includes 'repeat_interval'. +- `--repeat-total` int64 — Maximum number of repeated notifications. Effective only when 'fields' includes 'repeat_total'. - `--timezone` string — Timezone in which the rule executes. IANA timezone name; defaults to 'Asia/Shanghai'. - body-only (`--data`): annotations (object); enabled_times (array); labels (object) - response: same shape as `rule-import` above @@ -363,11 +363,11 @@ Create ruleset ### store-ruleset-delete Delete ruleset -- `--id` int64 (required) — Resource ID. +- `--id` int64 (required) — Numeric ID of the target resource; the exact meaning depends on the API being called (e.g. datasource ID, ruleset ID). ### store-ruleset-info Get ruleset detail -- `--id` int64 (required) — Resource ID. +- `--id` int64 (required) — Numeric ID of the target resource; the exact meaning depends on the API being called (e.g. datasource ID, ruleset ID). - response: same shape as `store-ruleset-create` above ### store-ruleset-list diff --git a/skills/flashduty/reference/noise.md b/skills/flashduty/reference/noise.md index 9a03281..8ada375 100644 --- a/skills/flashduty/reference/noise.md +++ b/skills/flashduty/reference/noise.md @@ -56,7 +56,7 @@ fduty channel silence-rule-list --output-format toon ### inhibit-rule-create Create inhibit rule -- `` (positional, required) int64 — Channel the rule belongs to. +- `` (positional, required) int64 — Owning channel ID; obtain it from 'POST /channel/list'. - `--description` string — Rule description, up to 500 characters. (≤500 chars) - `--equals` stringSlice (required) — Label keys used to pair source and target alerts. - `--is-directly-discard` bool — When true, suppressed target alerts are dropped instead of merged. @@ -67,17 +67,17 @@ Create inhibit rule ### inhibit-rule-delete Delete inhibit rule -- `--channel-id` int64 (required) — Channel the rule belongs to. +- `--channel-id` int64 (required) — Owning channel ID; obtain it from 'POST /channel/list'. - `--rule-id` string (required) — Rule ID (MongoDB ObjectID). ### inhibit-rule-disable Disable inhibit rule -- `--channel-id` int64 (required) — Channel the rule belongs to. +- `--channel-id` int64 (required) — Owning channel ID; obtain it from 'POST /channel/list'. - `--rule-id` string (required) — Rule ID (MongoDB ObjectID). ### inhibit-rule-enable Enable inhibit rule -- `--channel-id` int64 (required) — Channel the rule belongs to. +- `--channel-id` int64 (required) — Owning channel ID; obtain it from 'POST /channel/list'. - `--rule-id` string (required) — Rule ID (MongoDB ObjectID). ### inhibit-rule-list @@ -87,7 +87,7 @@ List inhibit rules ### inhibit-rule-update Update inhibit rule -- `--channel-id` int64 (required) — Channel the rule belongs to. +- `--channel-id` int64 (required) — Owning channel ID; obtain it from 'POST /channel/list'. - `--description` string — Rule description, up to 500 characters. (≤500 chars) - `--equals` stringSlice (required) — Label keys used to pair source and target alerts. - `--is-directly-discard` bool — When true, suppressed target alerts are dropped instead of merged. @@ -98,7 +98,7 @@ Update inhibit rule ### silence-rule-create Create silence rule -- `` (positional, required) int64 — Channel the rule belongs to. +- `` (positional, required) int64 — Owning channel ID; obtain it from 'POST /channel/list'. - `--description` string — Rule description, up to 500 characters. (≤500 chars) - `--from-incident-id` string — Source incident ID when the silence was created from an incident. - `--is-auto-delete` bool — When true, the silence rule is automatically deleted after its time window expires. Defaults to false. @@ -110,17 +110,17 @@ Create silence rule ### silence-rule-delete Delete silence rule -- `--channel-id` int64 (required) — Channel the rule belongs to. +- `--channel-id` int64 (required) — Owning channel ID; obtain it from 'POST /channel/list'. - `--rule-id` string (required) — Rule ID (MongoDB ObjectID). ### silence-rule-disable Disable silence rule -- `--channel-id` int64 (required) — Channel the rule belongs to. +- `--channel-id` int64 (required) — Owning channel ID; obtain it from 'POST /channel/list'. - `--rule-id` string (required) — Rule ID (MongoDB ObjectID). ### silence-rule-enable Enable silence rule -- `--channel-id` int64 (required) — Channel the rule belongs to. +- `--channel-id` int64 (required) — Owning channel ID; obtain it from 'POST /channel/list'. - `--rule-id` string (required) — Rule ID (MongoDB ObjectID). ### silence-rule-list @@ -130,7 +130,7 @@ List silence rules ### silence-rule-update Update silence rule -- `--channel-id` int64 (required) — Channel the rule belongs to. +- `--channel-id` int64 (required) — Owning channel ID; obtain it from 'POST /channel/list'. - `--description` string — Rule description, up to 500 characters. (≤500 chars) - `--is-auto-delete` bool — When true, the silence rule is automatically deleted after its time window expires. Defaults to false. - `--is-directly-discard` bool — When true, silenced alerts are dropped instead of suppressed into incidents. @@ -141,7 +141,7 @@ Update silence rule ### unsubscribe-rule-create Create drop rule -- `` (positional, required) int64 — Channel the rule belongs to. +- `` (positional, required) int64 — Owning channel ID; obtain it from 'POST /channel/list'. - `--description` string — Rule description, up to 500 characters. (≤500 chars) - `--priority` int64 — Evaluation priority. Lower runs first. - `--rule-name` string (required) — Rule name, 1 to 39 characters. (1-39 chars) @@ -150,17 +150,17 @@ Create drop rule ### unsubscribe-rule-delete Delete drop rule -- `--channel-id` int64 (required) — Channel the rule belongs to. +- `--channel-id` int64 (required) — Owning channel ID; obtain it from 'POST /channel/list'. - `--rule-id` string (required) — Rule ID (MongoDB ObjectID). ### unsubscribe-rule-disable Disable drop rule -- `--channel-id` int64 (required) — Channel the rule belongs to. +- `--channel-id` int64 (required) — Owning channel ID; obtain it from 'POST /channel/list'. - `--rule-id` string (required) — Rule ID (MongoDB ObjectID). ### unsubscribe-rule-enable Enable drop rule -- `--channel-id` int64 (required) — Channel the rule belongs to. +- `--channel-id` int64 (required) — Owning channel ID; obtain it from 'POST /channel/list'. - `--rule-id` string (required) — Rule ID (MongoDB ObjectID). ### unsubscribe-rule-list @@ -170,7 +170,7 @@ List drop rules ### unsubscribe-rule-update Update drop rule -- `--channel-id` int64 (required) — Channel the rule belongs to. +- `--channel-id` int64 (required) — Owning channel ID; obtain it from 'POST /channel/list'. - `--description` string — Rule description, up to 500 characters. (≤500 chars) - `--priority` int64 — Evaluation priority. Lower runs first. - `--rule-id` string (required) — Drop rule ID (MongoDB ObjectID). diff --git a/skills/flashduty/reference/postmortem.md b/skills/flashduty/reference/postmortem.md index ba8eb02..51b0ad0 100644 --- a/skills/flashduty/reference/postmortem.md +++ b/skills/flashduty/reference/postmortem.md @@ -60,7 +60,7 @@ Update post-mortem basics - `--incidents-highest-severity` string (required) — Highest severity among linked incidents. - `--incidents-latest-close-seconds` string — Unix timestamp in seconds for the latest linked incident close time. 0 when still open. (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. - `--incidents-total-duration-seconds` int64 — Total incident duration in seconds. (min 0) -- `` (positional, required) string — Post-mortem ID. +- `` (positional, required) string — Post-mortem ID; obtain it from 'POST /incident/post-mortem/list'. - `--responder-ids` intSlice — Responder member IDs to store on the report. ### post-mortem-content-reset @@ -72,12 +72,12 @@ Reset post-mortem Markdown content ### post-mortem-delete Delete post-mortem -- `` (positional, required) string — Post-mortem ID. +- `` (positional, required) string — Post-mortem report ID; obtain it from 'POST /incident/post-mortem/list'. ### post-mortem-follow-ups-reset Update post-mortem follow-ups - `--follow-ups` string — Follow-up action items as free text. -- `` (positional, required) string — Post-mortem ID. +- `` (positional, required) string — Post-mortem ID; obtain it from 'POST /incident/post-mortem/list'. ### post-mortem-info Get post-mortem @@ -94,8 +94,8 @@ Initialize post-mortem List post-mortems - `--asc` bool — Ascending order when true. - `--channel-ids` intSlice — Channel IDs to restrict the query to. -- `--created-at-end-seconds` string — Filter by creation time: upper bound in seconds. (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. -- `--created-at-start-seconds` string — Filter by creation time: lower bound in seconds. (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. +- `--created-at-end-seconds` string — Upper bound of post-mortem creation time (Unix timestamp in seconds). (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. +- `--created-at-start-seconds` string — Lower bound of post-mortem creation time (Unix timestamp in seconds). (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. - `--limit` int64 — Page size, at most 100. (0-100) - `--order-by` string — Field used to order results. · enum: created_at_seconds | updated_at_seconds - `--page` int64 — Page number starting at 1. (min 0) @@ -106,12 +106,12 @@ List post-mortems ### post-mortem-status-reset Update post-mortem status -- `` (positional, required) string — Post-mortem ID. -- `--status` string (required) — Target report status. · enum: drafting | published +- `` (positional, required) string — Post-mortem ID; obtain it from 'POST /incident/post-mortem/list'. +- `--status` string (required) — Target report status: 'drafting' draft, 'published' published. · enum: drafting | published ### post-mortem-template-delete Delete post-mortem template -- `` (positional, required) string — Template ID. +- `` (positional, required) string — Template ID; obtain it from 'POST /incident/post-mortem/template/list'. ### post-mortem-template-info Get post-mortem template detail @@ -139,7 +139,7 @@ Create or update post-mortem template ### post-mortem-title-reset Update post-mortem title -- `` (positional, required) string — Post-mortem ID. +- `` (positional, required) string — Post-mortem ID; obtain it from 'POST /incident/post-mortem/list'. - `--title` string (required) — New report title. diff --git a/skills/flashduty/reference/role.md b/skills/flashduty/reference/role.md index 45c309b..5418ed4 100644 --- a/skills/flashduty/reference/role.md +++ b/skills/flashduty/reference/role.md @@ -62,36 +62,36 @@ fduty role upsert --role-id --role-name "Incident Responder" \ ### delete Delete a role -- `` (positional, required) int64 — Role ID. +- `` (positional, required) int64 — Role ID to operate on. Get IDs from 'POST /role/list' (built-in roles: 2=Admin, 6=Responder, 8=Viewer). ### disable Disable a role -- `` (positional, required) int64 — Role ID. +- `` (positional, required) int64 — Role ID to operate on. Get IDs from 'POST /role/list' (built-in roles: 2=Admin, 6=Responder, 8=Viewer). ### enable Enable a role -- `` (positional, required) int64 — Role ID. +- `` (positional, required) int64 — Role ID to operate on. Get IDs from 'POST /role/list' (built-in roles: 2=Admin, 6=Responder, 8=Viewer). ### info Get role detail -- `` (positional, required) int64 — Role ID. +- `` (positional, required) int64 — Role ID to query. Get IDs from 'POST /role/list' (built-in roles: 2=Admin, 6=Responder, 8=Viewer). - response: single object (`data` unwrapped to the top level) — fields: created_at (integer); description (string); editable (boolean); permission_ids (array); role_id (integer); role_name (string); status (string); updated_at (integer) ### list List roles -- `--asc` bool — Ascending sort order. -- `--orderby` string — Sort field. · enum: created_at | updated_at +- `--asc` bool — Ascending sort order. Default: false (descending). +- `--orderby` string — Sort field. Default: 'updated_at'. · enum: created_at | updated_at - response: `{items: [...], total}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: created_at (integer); description (string); editable (boolean); permission_ids (array); role_id (integer); role_name (string); status (string); updated_at (integer) ### member-grant [...] Grant role to members - `` (positional, required) intSlice — Member IDs to grant/revoke the role. Max 100. -- `--role-id` int64 (required) — Role ID to grant or revoke. +- `--role-id` int64 (required) — Role ID to grant or revoke. Get IDs from 'POST /role/list'. ### member-revoke [...] Revoke role from members - `` (positional, required) intSlice — Member IDs to grant/revoke the role. Max 100. -- `--role-id` int64 (required) — Role ID to grant or revoke. +- `--role-id` int64 (required) — Role ID to grant or revoke. Get IDs from 'POST /role/list'. ### permission-factor-list List permission factors diff --git a/skills/flashduty/reference/rum.md b/skills/flashduty/reference/rum.md index 73cc112..f985a15 100644 --- a/skills/flashduty/reference/rum.md +++ b/skills/flashduty/reference/rum.md @@ -67,23 +67,23 @@ Create application - `--is-private` bool — Restrict access to team members only. - `--no-geo` bool — Do not infer geographic location. - `--no-ip` bool — Do not collect IP addresses. -- `` (positional, required) int64 — Owning team ID. -- `--type` string (required) — Application type. · enum: browser | ios | android | react-native | flutter | kotlin-multiplatform | roku | unity +- `` (positional, required) int64 — Owning team ID. Get team IDs via 'POST /team/list'. +- `--type` string (required) — Application type. · enum: browser | ios | android | react-native | flutter | kotlin-multiplatform | roku | unity | miniprogram | harmony | electron - body-only (`--data`): alerting (object); links (object); tracing (object) - response: single object (`data` unwrapped to the top level) — fields: application_id (string); application_name (string); client_token (string) ### application-delete Delete application -- `` (positional, required) string — RUM application ID. +- `` (positional, required) string — RUM application ID. Get application IDs via 'POST /rum/application/list'. ### application-info Get application detail -- `` (positional, required) string — RUM application ID. +- `` (positional, required) string — RUM application ID. Get application IDs via 'POST /rum/application/list'. - response: single object (`data` unwrapped to the top level) — fields: account_id (integer); alerting (object); application_id (string); application_name (string); client_token (string); created_at (integer); created_by (integer); is_private (boolean); links (object); no_geo (boolean); no_ip (boolean); status (string); team_id (integer); tracing (object); type (string); updated_at (integer); updated_by (integer) ### application-infos [...] Batch get applications -- `` (positional, required) stringSlice — Up to 200 application IDs. +- `` (positional, required) stringSlice — Up to 200 application IDs. Get IDs via 'POST /rum/application/list'. - response: `{items: [...]}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: account_id (integer); alerting (object); application_id (string); application_name (string); client_token (string); created_at (integer); created_by (integer); is_private (boolean); links (object); no_geo (boolean); no_ip (boolean); status (string); team_id (integer); tracing (object); type (string); updated_at (integer); updated_by (integer) ### application-list @@ -91,27 +91,27 @@ List applications - `--asc` bool — Sort ascending if 'true'. - `--is-my-team` bool — If 'true', return only applications belonging to the current user's teams. - `--limit` int64 — Page size. Range: 1–100. Default: 20. -- `--orderby` string — Sort field. · enum: created_at | updated_at +- `--orderby` string — Sort field; defaults to 'updated_at' when omitted. · enum: created_at | updated_at - `--page` int64 — Page number (1-based). Default: 1. -- `--query` string — Search query to filter by application name. +- `--query` string — Substring match on the application name. - `--search-after-ctx` string -- `--team-id` int64 — Filter by team ID. +- `--team-id` int64 — Filter by team ID. Get team IDs via 'POST /team/list'. - response: `{items: [...], has_next_page, total}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: account_id (integer); alerting (object); application_id (string); application_name (string); client_token (string); created_at (integer); created_by (integer); is_private (boolean); links (object); no_geo (boolean); no_ip (boolean); status (string); team_id (integer); tracing (object); type (string); updated_at (integer); updated_by (integer) ### application-update Update application -- `` (positional, required) string — Application ID to update. -- `--application-name` string — New application name. -- `--is-private` bool -- `--no-geo` bool -- `--no-ip` bool -- `--team-id` int64 -- `--type` string — enum: browser | ios | android | react-native | flutter | kotlin-multiplatform | roku | unity +- `` (positional, required) string — Application ID to update. Get application IDs via 'POST /rum/application/list'. +- `--application-name` string — New application name, 1–40 characters. Omit to leave unchanged. +- `--is-private` bool — Restrict access to members of the owning team. Omit to leave unchanged. +- `--no-geo` bool — When 'true', stop inferring geographic location from IP. Omit to leave unchanged. +- `--no-ip` bool — When 'true', stop collecting user IP addresses. Omit to leave unchanged. +- `--team-id` int64 — Owning team ID. Get team IDs via 'POST /team/list'. Omit to leave unchanged. +- `--type` string — Application type. Omit to leave unchanged. · enum: browser | ios | android | react-native | flutter | kotlin-multiplatform | roku | unity | miniprogram | harmony | electron - body-only (`--data`): alerting (object); links (object); tracing (object) ### application-webhook-test Test application webhook -- `` (positional, required) string — RUM application ID. +- `` (positional, required) string — RUM application ID. Get application IDs via 'POST /rum/application/list'. - `--webhook-url` string (required) — Webhook URL to receive the sample alert event. - response: single object (`data` unwrapped to the top level) — fields: message (string); ok (boolean); status_code (integer) @@ -123,30 +123,30 @@ Query RUM data ### error-ingestion-rules-create Create an error ingestion rule -- `` (positional, required) string — RUM application ID. +- `` (positional, required) string — RUM application ID. Get application IDs via 'POST /rum/application/list'. - `--description` string — Rule description, up to 512 characters. (≤512 chars) - `--rule-name` string (required) — Rule name, 1-128 characters. (1-128 chars) -- body-only (`--data`): filters (array) (required) +- body-only (`--data`): filters (array>) (required) - response: single object (`data` unwrapped to the top level) — fields: rule_id (string); rule_name (string) ### error-ingestion-rules-delete Delete an error ingestion rule -- `--application-id` string (required) — RUM application ID. -- `--rule-id` string (required) — Rule ID. +- `--application-id` string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. +- `--rule-id` string (required) — Rule ID. Get rule IDs via 'POST /rum/error-ingestion/rules/list'. ### error-ingestion-rules-disable Disable an error ingestion rule -- `--application-id` string (required) — RUM application ID. -- `--rule-id` string (required) — Rule ID. +- `--application-id` string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. +- `--rule-id` string (required) — Rule ID. Get rule IDs via 'POST /rum/error-ingestion/rules/list'. ### error-ingestion-rules-enable Enable an error ingestion rule -- `--application-id` string (required) — RUM application ID. -- `--rule-id` string (required) — Rule ID. +- `--application-id` string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. +- `--rule-id` string (required) — Rule ID. Get rule IDs via 'POST /rum/error-ingestion/rules/list'. ### error-ingestion-rules-history-list List error ingestion rule history -- `` (positional, required) string — RUM application ID. +- `` (positional, required) string — RUM application ID. Get application IDs via 'POST /rum/application/list'. - `--asc` bool — Sort ascending instead of the default descending order. - `--limit` int64 — Page size. Default 20, capped at 100; values ≤ 0 fall back to the default. (max 100) - `--orderby` string — Sort column: 'updated_at' or 'version'. Unrecognized values fall back to 'updated_at'. @@ -156,27 +156,27 @@ List error ingestion rule history ### error-ingestion-rules-history-revert Revert error ingestion rules to a history version -- `` (positional, required) string — RUM application ID. -- `--version` int64 (required) — History version number to revert to. (min 1) +- `` (positional, required) string — RUM application ID. Get application IDs via 'POST /rum/application/list'. +- `--version` int64 (required) — History version number to revert to. Get versions via 'POST /rum/error-ingestion/rules/history/list'. (min 1) ### error-ingestion-rules-list List error ingestion rules -- `` (positional, required) string — RUM application ID. -- response: `{items: [...]}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: created_at (integer); description (string); filters (array); rule_id (string); rule_name (string); status (string); updated_at (integer) +- `` (positional, required) string — RUM application ID. Get application IDs via 'POST /rum/application/list'. +- response: `{items: [...]}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: created_at (integer); description (string); filters (array>); rule_id (string); rule_name (string); status (string); updated_at (integer) ### error-ingestion-rules-update Update an error ingestion rule -- `--application-id` string (required) — RUM application ID. +- `--application-id` string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. - `--description` string — New rule description, up to 512 characters. Omit to leave unchanged. (≤512 chars) -- `--rule-id` string (required) — Rule ID to update. +- `--rule-id` string (required) — Rule ID to update. Get rule IDs via 'POST /rum/error-ingestion/rules/list'. - `--rule-name` string — New rule name, 1-128 characters. Omit to leave unchanged. (1-128 chars) -- body-only (`--data`): filters (array) +- body-only (`--data`): filters (array>) ### facet-count Count facet value distribution - `--dql` string — RUM DQL filter expression applied before counting. - `--end-time` int64 (required) — End of the time range, Unix epoch milliseconds. Maximum 31-day span. -- `--facet-key` string (required) — The field key to count value distribution for. +- `--facet-key` string (required) — Field key whose value distribution to count; must be a registered field of the given 'scope'. List available fields via 'POST /rum/field/list'. - `--limit` int64 — Maximum number of top values to return. Default 100, maximum 100. (max 100) - `--scope` string (required) — RUM data scope to query. · enum: session | view | action | error | resource | long_task | vital | issue | sourcemap - `--sql` string — SQL WHERE clause (no SELECT) for additional filtering. @@ -192,55 +192,55 @@ List RUM fields ### issue-info Get issue detail -- `` (positional, required) string — Issue ID. +- `` (positional, required) string — Issue ID. Get issue IDs via 'POST /rum/issue/list'. - response: single object (`data` unwrapped to the top level) — fields: age (integer); application_id (string); application_name (string); created_at (integer); error (object); error_count (integer); first_seen (object); is_crash (boolean); issue_id (string); last_seen (object); regression (object); resolved_at (integer); resolved_by (integer); service (string); session_count (integer); severity (string); status (string); suspected_cause (object); team_id (integer); updated_at (integer); versions (array) ### issue-list List issues -- `--application-ids` stringSlice — Filter by application IDs. -- `--asc` bool -- `--by-intersection` bool +- `--application-ids` stringSlice — Filter by application IDs. Get IDs via 'POST /rum/application/list'. +- `--asc` bool — Sort ascending when 'true'; descending by default. +- `--by-intersection` bool — When 'true', match by time-range overlap: return issues still active within the window ('last_seen_timestamp' >= 'start_time') even if created before it. Default 'false' returns only issues created inside the window. - `--dql` string — DQL query for advanced filtering. Cannot be used with 'sql'. - `--end-time` int64 (required) — End of time range, millisecond timestamp. Maximum range: 183 days. - `--error-required` bool — If 'true', only return issues with at least one associated error event. - `--limit` int64 — Page size. Range: 1–100. Default: 20. -- `--orderby` string — enum: created_at | updated_at | session_count | error_count -- `--page` int64 — Page number. Default: 1. +- `--orderby` string — Sort field; defaults to 'updated_at' when omitted. · enum: created_at | updated_at | session_count | error_count +- `--page` int64 — Page number (1-based). Default: 1. - `--search-after-ctx` string - `--sql` string — SQL-style query for advanced filtering. Cannot be used with 'dql'. -- `--start-time` int64 (required) — Start of time range, millisecond timestamp. -- `--statuses` stringSlice — Filter by statuses. · enum: for_review | reviewed | ignored | resolved -- `--suspected-causes` stringSlice — Filter by suspected causes. -- `--team-ids` intSlice — Filter by team IDs. +- `--start-time` int64 (required) — Start of the time range, Unix epoch milliseconds. +- `--statuses` stringSlice — Filter by status; only the enum values are accepted — any other value is rejected with a parameter error. · enum: for_review | reviewed | ignored | resolved +- `--suspected-causes` stringSlice — Filter by suspected cause; see the enum for valid values. · enum: api.failed_request | network.error | code.exception | code.invalid_object_access | code.invalid_argument | unknown +- `--team-ids` intSlice — Filter by team IDs. Get team IDs via 'POST /team/list'. - response: `{items: [...], has_next_page, total}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: age (integer); application_id (string); application_name (string); created_at (integer); error (object); error_count (integer); first_seen (object); is_crash (boolean); issue_id (string); last_seen (object); regression (object); resolved_at (integer); resolved_by (integer); service (string); session_count (integer); severity (string); status (string); suspected_cause (object); team_id (integer); updated_at (integer); versions (array) ### issue-preset-severity-rules-create Create preset severity rule -- `` (positional, required) string — RUM application ID. +- `` (positional, required) string — RUM application ID. Get application IDs via 'POST /rum/application/list'. - `--description` string — Optional description, up to 512 characters. (≤512 chars) - `--rule-name` string (required) — Rule display name, 1-128 characters. (1-128 chars) - `--severity` string (required) — Severity to assign to errors matching this rule. · enum: Critical | Warning | Info -- body-only (`--data`): filters (array) (required) +- body-only (`--data`): filters (array>) (required) - response: single object (`data` unwrapped to the top level) — fields: priority (integer); rule_id (string); rule_name (string) ### issue-preset-severity-rules-delete Delete preset severity rule -- `--application-id` string (required) — RUM application ID. -- `--rule-id` string (required) — Rule ID. +- `--application-id` string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. +- `--rule-id` string (required) — Rule ID. Get rule IDs via 'POST /rum/issue/preset-severity/rules/list'. ### issue-preset-severity-rules-disable Disable preset severity rule -- `--application-id` string (required) — RUM application ID. -- `--rule-id` string (required) — Rule ID. +- `--application-id` string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. +- `--rule-id` string (required) — Rule ID. Get rule IDs via 'POST /rum/issue/preset-severity/rules/list'. ### issue-preset-severity-rules-enable Enable preset severity rule -- `--application-id` string (required) — RUM application ID. -- `--rule-id` string (required) — Rule ID. +- `--application-id` string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. +- `--rule-id` string (required) — Rule ID. Get rule IDs via 'POST /rum/issue/preset-severity/rules/list'. ### issue-preset-severity-rules-history-list List preset severity rule history -- `` (positional, required) string — RUM application ID. +- `` (positional, required) string — RUM application ID. Get application IDs via 'POST /rum/application/list'. - `--asc` bool — Sort ascending when true; results are descending by default. - `--limit` int64 — Page size. Values <= 0 default to 20; values above 100 are capped at 100. (max 100) - `--orderby` string — Sort column. Any other value (including omitted) falls back to 'updated_at'. · enum: updated_at | version @@ -250,34 +250,34 @@ List preset severity rule history ### issue-preset-severity-rules-history-revert Revert preset severity rules to a history snapshot -- `` (positional, required) string — RUM application ID. -- `--version` int64 (required) — Version number of the snapshot to revert to. (min 1) +- `` (positional, required) string — RUM application ID. Get application IDs via 'POST /rum/application/list'. +- `--version` int64 (required) — Snapshot version number to revert to. Get versions via 'POST /rum/issue/preset-severity/rules/history/list'. (min 1) ### issue-preset-severity-rules-list List preset severity rules -- `` (positional, required) string — RUM application ID. -- response: `{items: [...]}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: created_at (integer); description (string); filters (array); priority (integer); rule_id (string); rule_name (string); severity (string); status (string); updated_at (integer) +- `` (positional, required) string — RUM application ID. Get application IDs via 'POST /rum/application/list'. +- response: `{items: [...]}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: created_at (integer); description (string); filters (array>); priority (integer); rule_id (string); rule_name (string); severity (string); status (string); updated_at (integer) ### issue-preset-severity-rules-reorder Reorder preset severity rule -- `--application-id` string (required) — RUM application ID. -- `--drag-rule-id` string (required) — ID of the rule being moved. +- `--application-id` string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. +- `--drag-rule-id` string (required) — ID of the rule being moved. Get rule IDs via 'POST /rum/issue/preset-severity/rules/list'. - `--target-rule-id` string (required) — ID of the rule whose evaluation position 'drag_rule_id' moves to. ### issue-preset-severity-rules-update Update preset severity rule -- `--application-id` string (required) — RUM application ID. +- `--application-id` string (required) — RUM application ID. Get application IDs via 'POST /rum/application/list'. - `--description` string — New description, up to 512 characters. Omit to leave unchanged. (≤512 chars) -- `--rule-id` string (required) — Rule ID to update. +- `--rule-id` string (required) — Rule ID to update. Get rule IDs via 'POST /rum/issue/preset-severity/rules/list'. - `--rule-name` string — New display name, 1-128 characters. Omit to leave unchanged. (1-128 chars) - `--severity` string — New severity. Omit to leave unchanged. · enum: Critical | Warning | Info -- body-only (`--data`): filters (array) +- body-only (`--data`): filters (array>) ### issue-update Update issue -- `` (positional, required) string — Issue ID to update. -- `--status` string — New status. · enum: for_review | reviewed | ignored | resolved -- `--suspected-cause` string — Suspected cause. · enum: api.failed_request | network.error | code.exception | code.invalid_object_access | code.invalid_argument | unknown +- `` (positional, required) string — Issue ID to update. Get issue IDs via 'POST /rum/issue/list'. +- `--status` string — New status. Setting 'resolved' records the resolution time and operator; switching away from 'resolved' clears them. · enum: for_review | reviewed | ignored | resolved +- `--suspected-cause` string — New suspected cause; setting it marks the cause source as 'user', overriding the automatic classification. · enum: api.failed_request | network.error | code.exception | code.invalid_object_access | code.invalid_argument | unknown ### resource-info Get RUM resource info @@ -286,7 +286,7 @@ Get RUM resource info ### session-replay-metadata Get session replay metadata -- `` (positional, required) string — RUM session ID. +- `` (positional, required) string — RUM session ID (the 'session.id' attribute on RUM events). - `--ts` int64 — Unix timestamp in milliseconds of the session start time. Optional; disambiguates when a session ID has been reused across different time windows. - response: single object (`data` unwrapped to the top level) — fields: application (object); device (object); foreground_periods (array); session (object); views (array) @@ -294,7 +294,7 @@ Get session replay metadata List session replay segments - `--limit` int64 — Maximum number of segments to return. 1-99, default 20. (1-99) - `--search-after-ctx` string — Pagination cursor from a previous call. Take it from the 'search_after_ctx' field (URL mode) or the 'X-Search-After-Ctx' response header (streaming mode). -- `` (positional, required) string — RUM session ID. +- `` (positional, required) string — RUM session ID (the 'session.id' attribute on RUM events). - `--ts` int64 — Unix timestamp in milliseconds. When set (and 'search_after_ctx' is empty), seeks to the most recent full-snapshot segment at or before this time instead of starting from the beginning. - `--url-mode` bool — When 'true', return presigned download URLs as a JSON envelope instead of streaming segment bytes. Defaults to 'false'. - `--view-id` string — Restrict results to segments belonging to this view. Omit to page through the entire session. diff --git a/skills/flashduty/reference/safari.md b/skills/flashduty/reference/safari.md index e42c945..2a40bcd 100644 --- a/skills/flashduty/reference/safari.md +++ b/skills/flashduty/reference/safari.md @@ -64,26 +64,26 @@ Create A2A agent ### a2a-agent-delete Delete A2A agent -- `` (positional, required) string — Target agent ID. +- `` (positional, required) string — Target agent ID, from the list returned by 'POST /safari/a2a-agent/list'. ### a2a-agent-disable Disable A2A agent -- `` (positional, required) string — Target agent ID. +- `` (positional, required) string — Target agent ID, from the list returned by 'POST /safari/a2a-agent/list'. ### a2a-agent-enable Enable A2A agent -- `` (positional, required) string — Target agent ID. +- `` (positional, required) string — Target agent ID, from the list returned by 'POST /safari/a2a-agent/list'. ### a2a-agent-get Get A2A agent detail -- `` (positional, required) string — Target agent ID. +- `` (positional, required) string — Target agent ID, from the list returned by 'POST /safari/a2a-agent/list'. - response: single object (`data` unwrapped to the top level) — fields: account_id (integer); agent_card_name (string); agent_card_skills (array); agent_id (string); agent_name (string); allow_insecure_oauth_http (boolean); allow_insecure_tls_skip_verify (boolean); auth_config (object); auth_mode (string); auth_type (string); can_edit (boolean); card_resolve_timeout (integer); card_url (string); created_at (integer); created_by (integer); environment_id (string); environment_kind (string); instructions (string); oauth_metadata (string); secret_schema (string); status (string); streaming (boolean); task_timeout (integer); team_id (integer); updated_at (integer) ### a2a-agent-list List A2A agents - `--include-account` bool — Include account-scoped (team_id=0) rows. Defaults to true. - `--limit` int64 — Page size. -- `--offset` int64 — Row offset for pagination. +- `--offset` int64 — Pagination offset — number of rows to skip, starting from 0. - `--query` string — Case-insensitive substring search across agent name, instructions, card URL, agent ID, and the resolved card name. (≤128 chars) - `--scope` string — Visibility scope: 'all' (account-scope plus the caller's visible teams), 'account' (account-scope only), or 'team' (team-scoped rows across the caller's visible teams). · enum: all | account | team - `--team-ids` intSlice — Filter to these team IDs; empty = the caller's visible set. @@ -91,7 +91,7 @@ List A2A agents ### a2a-agent-update Update A2A agent -- `` (positional, required) string — Target agent ID. +- `` (positional, required) string — Target agent ID, from the list returned by 'POST /safari/a2a-agent/list'. - `--agent-name` string — New display name. Omit to leave unchanged. (≤128 chars) - `--allow-insecure-oauth-http` bool — Toggle non-loopback HTTP OAuth discovery for this agent. Omit to leave unchanged. - `--allow-insecure-tls-skip-verify` bool — Toggle TLS certificate verification skipping for this agent. Omit to leave unchanged. @@ -126,16 +126,16 @@ Create Automation rule ### automation-rule-delete Delete Automation rule -- `` (positional, required) string — Rule ID. +- `` (positional, required) string — Rule ID, from the list returned by 'POST /safari/automation/rule/list'. ### automation-rule-get Get Automation rule -- `` (positional, required) string — Rule ID. +- `` (positional, required) string — Rule ID, from the list returned by 'POST /safari/automation/rule/list'. - response: same shape as `automation-rule-create` above ### automation-rule-list List Automation rules -- `--enabled` bool — Filter by enabled status. +- `--enabled` bool — Filter by enabled state: 'true' returns only enabled rules, 'false' only disabled; omit or pass null for no filter. - `--include-person` bool — Compatibility field; when scope is empty and this is false, behaves like team scope. - `--keyword` string — Filter by name keyword. (≤64 chars) - `--limit` int64 — Page size. (max 100) @@ -147,7 +147,7 @@ List Automation rules ### automation-rule-run Run Automation rule -- `` (positional, required) string — Rule ID. +- `` (positional, required) string — Rule ID, from the list returned by 'POST /safari/automation/rule/list'. - response: single object (`data` unwrapped to the top level) — fields: preflight (object); rule_id (string); run (object); trigger_kind (string) ### automation-rule-update @@ -163,7 +163,7 @@ Update Automation rule - `--oncall-incident-trigger-enabled` bool — Whether the On-call incident trigger is enabled. - `--prompt` string — New task prompt. - `--rotate-http-post-trigger-token` bool — Whether to rotate the HTTP POST trigger token. The new token is returned only in this response. -- `` (positional, required) string — Target rule ID. +- `` (positional, required) string — Target rule ID, from the list returned by 'POST /safari/automation/rule/list'. - `--schedule-trigger-enabled` bool — Whether the schedule trigger is enabled. - `--team-id` int64 — Only the current value is accepted; personal/team scope is immutable after creation. (min 0) - response: same shape as `automation-rule-create` above @@ -172,12 +172,12 @@ Update Automation rule List Automation runs - `--limit` int64 — Page size. (max 100) - `--page` int64 — Page number, 1-based. -- `` (positional, required) string — Target rule ID. +- `` (positional, required) string — Target rule ID, from the list returned by 'POST /safari/automation/rule/list'. - `--search-after-ctx` string - `--started-after-ms` int64 — Start-time lower bound, Unix milliseconds. - `--started-before-ms` int64 — Start-time upper bound, Unix milliseconds. -- `--status` string — Run status filter. · enum: queued | running | retrying | succeeded | partial | failed | skipped | abandoned -- `--trigger-kind` string — Trigger kind filter. · enum: schedule | debug | manual | http_post | oncall_incident +- `--status` string — Run status filter: 'queued', 'running', 'retrying', 'succeeded', 'partial' (partially succeeded), 'failed', 'skipped' (e.g. rule or trigger no longer valid), 'abandoned' (stale run terminated by the system); omit for no filter. · enum: queued | running | retrying | succeeded | partial | failed | skipped | abandoned +- `--trigger-kind` string — Trigger source filter: 'schedule' cron trigger, 'debug' debug run, 'manual' manual run, 'http_post' HTTP POST trigger, 'oncall_incident' on-call incident trigger; omit for no filter. · enum: schedule | debug | manual | http_post | oncall_incident - response: single object (`data` unwrapped to the top level) — fields: runs (array); total (integer) ### automation-template-list @@ -190,6 +190,68 @@ Fire an Automation HTTP POST trigger - `--text` string - `--token` string +### 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. +- 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. +- 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. +- `--pack-id` string — Knowledge pack ID; defaults to the caller's account-scope pack. +- `--page` int64 — Page number, 1-based. +- `--search-after-ctx` string +- response: single object (`data` unwrapped to the top level) — fields: files (array); total (integer) + +### knowledge-file-put +Upload knowledge file +- `--content-b64` string — Base64-encoded file content; must decode to valid UTF-8 text. +- `--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. +- response: single object (`data` unwrapped to the top level) — fields: file (object); warnings (array) + +### knowledge-get +Get account knowledge pack +- 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. +- 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. · 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 (integer); created_by (integer); file_count (integer); pack_id (string); scope (string); scope_id (integer); team_name (string); total_bytes (integer); updated_at_ms (integer); version (integer) + +### knowledge-pack-list +List knowledge packs +- `--include-account` bool — Include the account-scope pack; 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, and team name. (≤128 chars) +- `--scope` string — Restrict to one scope; 'all' (default) overrides 'include_account'. · 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 +- `--scope-id` int64 — Destination team ID; required when 'scope' is 'team', set automatically for 'account'. +- response: same shape as `knowledge-pack-ensure` above + ### mcp-server-create Create MCP server - `--allow-insecure-oauth-http` bool — Allow this server's OAuth token exchange over plaintext HTTP. Testing use only; defaults to false. @@ -206,28 +268,28 @@ Create MCP server - `--secret-schema` string — JSON secret schema; required when auth_mode=per_user_secret. - `--server-name` string (required) — MCP server name, unique within the account. (1-255 chars) - `--source-template-name` string — Marketplace template name when created from a connector template. -- `--status` string — Initial status. · enum: enabled | disabled +- `--status` string — Initial status: 'enabled' (default) or 'disabled' (created but kept off). · enum: enabled | disabled - `--team-id` int64 — Team scope: 0 = account-wide; >0 = team. -- `--transport` string (required) — Transport protocol. · enum: stdio | sse | streamable-http +- `--transport` string (required) — Transport protocol: 'stdio' launches a local process via 'command'/'args'/'env', 'sse' / 'streamable-http' connects to a remote service via 'url'/'headers'. · enum: stdio | sse | streamable-http - `--url` string — Server URL (sse / streamable-http transport). - body-only (`--data`): env (object); headers (object) - response: single object (`data` unwrapped to the top level) — fields: account_id (integer); ai_description (string); allow_insecure_oauth_http (boolean); allow_insecure_tls_skip_verify (boolean); args (array); auth_mode (string); call_timeout (integer); can_edit (boolean); command (string); connect_timeout (integer); created_at (integer); created_by (integer); description (string); env (object); environment_id (string); environment_kind (string); headers (object); list_error (string); oauth_metadata (string); proxy_url (string); secret_schema (string); server_id (string); server_name (string); source_template_name (string); status (string); team_id (integer); tool_count (integer); tools (array); transport (string); updated_at (integer); url (string) ### mcp-server-delete Delete MCP server -- `` (positional, required) string — Target MCP server ID. +- `` (positional, required) string — Target MCP server ID, from the list returned by 'POST /safari/mcp/server/list'. ### mcp-server-disable Disable MCP server -- `` (positional, required) string — Target MCP server ID. +- `` (positional, required) string — Target MCP server ID, from the list returned by 'POST /safari/mcp/server/list'. ### mcp-server-enable Enable MCP server -- `` (positional, required) string — Target MCP server ID. +- `` (positional, required) string — Target MCP server ID, from the list returned by 'POST /safari/mcp/server/list'. ### mcp-server-get Get MCP server detail -- `` (positional, required) string — Target MCP server ID. +- `` (positional, required) string — Target MCP server ID, from the list returned by 'POST /safari/mcp/server/list'. - response: same shape as `mcp-server-create` above ### mcp-server-list @@ -245,27 +307,27 @@ List MCP servers Update MCP server - `--allow-insecure-oauth-http` bool — Allow OAuth token exchange over plaintext HTTP. Omit to leave unchanged. - `--allow-insecure-tls-skip-verify` bool — Skip TLS certificate verification. Omit to leave unchanged. -- `--args` stringSlice — Command arguments (stdio transport). +- `--args` stringSlice — Command arguments ('stdio' transport); replaces the whole list — pass '[]' to clear, omit to leave unchanged. - `--auth-mode` string — Authentication mode: shared (default), per_user_secret, or per_user_oauth. - `--call-timeout` int64 — Tool-call timeout in seconds. 0 = default (60s). - `--command` string — Executable command (stdio transport). - `--connect-timeout` int64 — Connection timeout in seconds. 0 = default (10s). -- `--description` string — New description. (1-1024 chars) +- `--description` string — New description; omitted or empty leaves it unchanged. (1-1024 chars) - `--environment-id` string — Runner ID paired with environment_kind=byoc. Omit (null) to leave the current binding unchanged. - `--environment-kind` string — Reassign the runner binding: 'byoc' (with environment_id) or empty string to reset to automatic selection. Omit (null) to leave the current binding unchanged. - `--oauth-metadata` string — JSON OAuth metadata; reserved for per_user_oauth. - `--secret-schema` string — JSON secret schema; required when auth_mode=per_user_secret. -- `` (positional, required) string — Target MCP server ID. -- `--server-name` string — New name. (1-255 chars) +- `` (positional, required) string — Target MCP server ID, from the list returned by 'POST /safari/mcp/server/list'. +- `--server-name` string — New name; omitted or empty leaves it unchanged. (1-255 chars) - `--team-id` int64 — Reassign team scope: 0 = account-wide; >0 = team. Omit to leave unchanged. -- `--transport` string — Transport protocol. · enum: stdio | sse | streamable-http +- `--transport` string — Transport protocol; when switching, also supply the matching fields ('command'/'args'/'env' for 'stdio', 'url'/'headers' for 'sse' / 'streamable-http'); omitted or empty leaves it unchanged. · enum: stdio | sse | streamable-http - `--url` string — Server URL (sse / streamable-http transport). - body-only (`--data`): env (object); headers (object) - response: same shape as `mcp-server-create` above ### session-delete Delete session -- `` (positional, required) string — Target session ID. (≥1 chars) +- `` (positional, required) string — Target session ID, from the list returned by 'POST /safari/session/list'. (≥1 chars) ### session-export Stream a session's full event transcript as NDJSON @@ -276,19 +338,19 @@ Get session detail - `--limit` int64 — Page size for events; takes precedence over 'num_recent_events'. 0 uses the server default (100). (0-1000) - `--num-recent-events` int64 — Legacy page size: number of most-recent events to return. Superseded by 'limit' when both are set; 0 uses the server default (100). (0-1000) - `--search-after-ctx` string — Opaque keyset cursor from a previous response; pass it back to fetch the next older page. (≤4096 chars) -- `` (positional, required) string — Target session ID. (≥1 chars) +- `` (positional, required) string — Target session ID, from the list returned by 'POST /safari/session/list'. (≥1 chars) - `--share-token` string — Share token for accessing a session through its share link. Omit it for normal account-authorized access. (≤512 chars) - response: single object (`data` unwrapped to the top level) — fields: events (array); has_more_older (boolean); search_after_ctx (string); session (object); suggest_init (boolean) ### session-list List sessions - `--app-name` string (required) — Agent app whose sessions to list. · enum: ask-ai | support | support-website | support-flashcat | ai-sre | template-assistant | swe -- `--asc` bool — Ascending order when true; applies only when 'orderby' is set. +- `--asc` bool — Ascending order when true, descending when false; also applies when 'orderby' is omitted (sorted by 'updated_at'). - `--entry-kinds` stringSlice — Restrict to sessions produced by these surfaces; empty returns every kind. · enum: web | im | api | automation - `--include-subagent-sessions` bool — Include subagent-dispatched sessions in the list. - `--keyword` string — Filter by session-name keyword. (≤64 chars) - `--limit` int64 — Page size, 1–100. (1-100) -- `--orderby` string — Sort field. · enum: created_at | updated_at +- `--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) - `--scope` string — Visibility scope: 'all' (own personal + accessible team sessions), 'personal', or 'team'; default 'all'. · enum: all | personal | team - `--search-after-ctx` string @@ -298,19 +360,19 @@ List sessions ### skill-delete Delete skill -- `` (positional, required) string — Target skill ID. +- `` (positional, required) string — Target skill ID, from the list returned by 'POST /safari/skill/list'. ### skill-disable Disable skill -- `` (positional, required) string — Target skill ID. +- `` (positional, required) string — Target skill ID, from the list returned by 'POST /safari/skill/list'. ### skill-enable Enable skill -- `` (positional, required) string — Target skill ID. +- `` (positional, required) string — Target skill ID, from the list returned by 'POST /safari/skill/list'. ### skill-get Get skill detail -- `` (positional, required) string — Target skill ID. +- `` (positional, required) string — Target skill ID, from the list returned by 'POST /safari/skill/list'. - response: single object (`data` unwrapped to the top level) — fields: account_id (integer); author (string); can_edit (boolean); checksum (string); content (string); created (boolean); created_at (integer); created_by (integer); description (string); description_en (string); is_modified (boolean); license (string); s3_key (string); skill_id (string); skill_name (string); source_template_name (string); source_template_version (string); status (string); tags (array); team_id (integer); tools (array); update_available (boolean); updated_at (integer); version (string) ### skill-list @@ -328,7 +390,7 @@ List skills Update skill - `--description` string — New description. Cannot contain '<' or '>'. Sending an empty string leaves the current value unchanged — there is no way to clear it via this field. (≤1024 chars) - `--description-en` string — New English description. Cannot contain '<' or '>'. Omit to leave unchanged; send an empty string to explicitly clear it. (≤1024 chars) -- `` (positional, required) string — Target skill ID. +- `` (positional, required) string — Target skill ID, from the list returned by 'POST /safari/skill/list'. - `--team-id` int64 — Reassign team scope: 0 = account-wide; >0 = team. Omit to leave unchanged. - response: same shape as `skill-get ` above diff --git a/skills/flashduty/reference/schedule.md b/skills/flashduty/reference/schedule.md index f252ce1..ddb415e 100644 --- a/skills/flashduty/reference/schedule.md +++ b/skills/flashduty/reference/schedule.md @@ -103,27 +103,27 @@ Create schedule - `--description` string — Schedule description. Max 500 characters. (≤500 chars) - `--end` string — Preview window end (Unix seconds, 10 digits). Required for /schedule/preview. Max 45 days after start. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. - `--name` string — Legacy schedule name field. Used when schedule_name is empty. (≤40 chars) -- `--schedule-id` int64 — Schedule ID. Required on update. +- `--schedule-id` int64 — Schedule ID, required on update; obtain it from 'POST /schedule/list'. - `--schedule-name` string — Schedule display name. Max 40 characters. (≤40 chars) - `--start` string — Preview window start (Unix seconds, 10 digits). Required for /schedule/preview. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. -- `--team-id` int64 — Owning team ID. +- `--team-id` int64 — Owning team ID; obtain it from 'POST /team/list'. - body-only (`--data`): layers (array); notify (object) - response: single object (`data` unwrapped to the top level) — fields: schedule_id (integer) ### delete [...] Delete schedules -- `` (positional, required) intSlice — Schedule IDs to operate on. +- `` (positional, required) intSlice — Schedule IDs to operate on; obtain them from 'POST /schedule/list'. ### info Get schedule info - `--end` string (required) — Preview end timestamp (Unix seconds, 10 digits). Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. -- `` (positional, required) int64 — Schedule ID. +- `` (positional, required) int64 — Schedule ID; obtain it from 'POST /schedule/list'. - `--start` string (required) — Preview start timestamp (Unix seconds, 10 digits). Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. - response: single object (`data` unwrapped to the top level) — fields: account_id (integer); create_at (integer); create_by (integer); cur_oncall (object); description (any); disabled (any); end (integer); field (string); final_schedule (object); group_id (any); id (any); layer_schedules (array); layers (array); name (any); next_oncall (object); notify (object); schedule_id (integer); schedule_layers (array); schedule_name (any); start (integer); status (any); team_id (any); update_at (integer); update_by (integer) ### infos [...] Batch get schedules -- `` (positional, required) intSlice — Schedule ID list. +- `` (positional, required) intSlice — Schedule ID list; obtain IDs from 'POST /schedule/list'. - response: `{items: [...]}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: account_id (integer); create_at (integer); create_by (integer); cur_oncall (object); description (any); disabled (any); end (integer); field (string); final_schedule (object); group_id (any); id (any); layer_schedules (array); layers (array); name (any); next_oncall (object); notify (object); schedule_id (integer); schedule_layers (array); schedule_name (any); start (integer); status (any); team_id (any); update_at (integer); update_by (integer) ### list @@ -144,10 +144,10 @@ Preview schedule - `--description` string — Schedule description. Max 500 characters. (≤500 chars) - `--end` string — Preview window end (Unix seconds, 10 digits). Required for /schedule/preview. Max 45 days after start. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. - `--name` string — Legacy schedule name field. Used when schedule_name is empty. (≤40 chars) -- `--schedule-id` int64 — Schedule ID. Required on update. +- `--schedule-id` int64 — Schedule ID, required on update; obtain it from 'POST /schedule/list'. - `--schedule-name` string — Schedule display name. Max 40 characters. (≤40 chars) - `--start` string — Preview window start (Unix seconds, 10 digits). Required for /schedule/preview. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. -- `--team-id` int64 — Owning team ID. +- `--team-id` int64 — Owning team ID; obtain it from 'POST /team/list'. - body-only (`--data`): layers (array); notify (object) - response: same shape as `info ` above @@ -162,10 +162,10 @@ Update schedule - `--description` string — Schedule description. Max 500 characters. (≤500 chars) - `--end` string — Preview window end (Unix seconds, 10 digits). Required for /schedule/preview. Max 45 days after start. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. - `--name` string — Legacy schedule name field. Used when schedule_name is empty. (≤40 chars) -- `--schedule-id` int64 — Schedule ID. Required on update. +- `--schedule-id` int64 — Schedule ID, required on update; obtain it from 'POST /schedule/list'. - `--schedule-name` string — Schedule display name. Max 40 characters. (≤40 chars) - `--start` string — Preview window start (Unix seconds, 10 digits). Required for /schedule/preview. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. -- `--team-id` int64 — Owning team ID. +- `--team-id` int64 — Owning team ID; obtain it from 'POST /team/list'. - body-only (`--data`): layers (array); notify (object) diff --git a/skills/flashduty/reference/sourcemap.md b/skills/flashduty/reference/sourcemap.md index 16a21be..5f28092 100644 --- a/skills/flashduty/reference/sourcemap.md +++ b/skills/flashduty/reference/sourcemap.md @@ -38,7 +38,7 @@ List sourcemaps - `--build-id` string — Android only. Filter by Gradle plugin build identifier. Max 200 characters. - `--end-time` int64 (required) — End of upload time range, Unix epoch milliseconds. Maximum window: 365 days. - `--limit` int64 — Page size. Maximum 100. Default 20. (max 100) -- `--orderby` string — Sort field. · enum: created_at | updated_at +- `--orderby` string — Sort field; defaults to 'created_at' descending when omitted. · enum: created_at | updated_at - `--page` int64 — Page number, starting at 1. (min 1) - `--query` string — Substring match on the minified URL (browser) or build ID (android). Max 200 characters. - `--search-after-ctx` string diff --git a/skills/flashduty/reference/status-page.md b/skills/flashduty/reference/status-page.md index e2e74a8..31e808c 100644 --- a/skills/flashduty/reference/status-page.md +++ b/skills/flashduty/reference/status-page.md @@ -63,19 +63,19 @@ Create status page event - `--is-retrospective` bool — Mark this event as a retrospective (historical) one. - `--linked-changes` stringSlice — Linked change IDs (related incidents, deployments, etc.). - `--notify-subscribers` bool — Notify subscribers about this event and all its updates. -- `` (positional, required) int64 — Status page ID. -- `--responders` intSlice — Member IDs responsible for this event. +- `` (positional, required) int64 — Status page ID; obtain it from 'POST /status-page/list'. +- `--responders` intSlice — Member IDs responsible for the change; obtain member IDs from 'POST /member/list'. - `--start-at-seconds` string — Event start time in unix seconds. Defaults to now when omitted. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. - `--status` string (required) — Initial event status. 'investigating'/'identified'/'monitoring'/'resolved' apply to incidents; 'scheduled'/'ongoing'/'completed' apply to maintenances. · enum: investigating | identified | monitoring | resolved | scheduled | ongoing | completed - `--title` string (required) — Event title, up to 255 characters. (≤255 chars) -- `--type` string (required) — Event type. · enum: incident | maintenance +- `--type` string (required) — Change type: 'incident' unplanned incident, 'maintenance' planned maintenance. · enum: incident | maintenance - body-only (`--data`): updates (array) (required) - response: single object (`data` unwrapped to the top level) — fields: change_id (integer); change_name (string) ### change-delete Delete status page event -- `--change-id` int64 (required) — Target event ID. -- `--page-id` int64 (required) — Status page ID. +- `--change-id` int64 (required) — Target change ID; obtain it from 'POST /status-page/change/list'. +- `--page-id` int64 (required) — Status page ID; obtain it from 'POST /status-page/list'. ### change-info Get status page event detail @@ -95,43 +95,43 @@ List status page events ### change-timeline-create Create event timeline entry - `--at-seconds` string — Update timestamp in unix seconds. Defaults to now when omitted. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. -- `--change-id` int64 (required) — Target event ID. +- `--change-id` int64 (required) — Target change ID; obtain it from 'POST /status-page/change/list'. - `--description` string — Update description (Markdown). Required. -- `--page-id` int64 (required) — Status page ID. +- `--page-id` int64 (required) — Status page ID; obtain it from 'POST /status-page/list'. - `--status` string (required) — New event status. Must match the event type. When the status transitions to 'resolved' or 'completed', all referenced components must become 'operational'. · enum: investigating | identified | monitoring | resolved | scheduled | ongoing | completed - body-only (`--data`): component_changes (array) - response: single object (`data` unwrapped to the top level) — fields: update_id (string) ### change-timeline-delete Delete event timeline entry -- `--change-id` int64 (required) — Parent event ID. -- `--page-id` int64 (required) — Status page ID. -- `--update-id` string (required) — Timeline update ID to delete. +- `--change-id` int64 (required) — Owning change ID; obtain it from 'POST /status-page/change/list'. +- `--page-id` int64 (required) — Status page ID; obtain it from 'POST /status-page/list'. +- `--update-id` string (required) — Timeline update ID to delete; obtain it from 'POST /status-page/change/info'. ### change-timeline-update Update event timeline entry - `--at-seconds` string — New update timestamp in unix seconds. Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. -- `--change-id` int64 (required) — Parent event ID. +- `--change-id` int64 (required) — Owning change ID; obtain it from 'POST /status-page/change/list'. - `--description` string — New update description (Markdown). -- `--page-id` int64 (required) — Status page ID. -- `--update-id` string (required) — Target timeline update ID. +- `--page-id` int64 (required) — Status page ID; obtain it from 'POST /status-page/list'. +- `--update-id` string (required) — Target timeline update ID; obtain it from 'POST /status-page/change/info'. ### change-update Update status page event -- `--change-id` int64 (required) — Target event ID. +- `--change-id` int64 (required) — Target change ID; obtain it from 'POST /status-page/change/list'. - `--linked-changes` stringSlice — Linked event IDs. Pass the full replacement list. -- `--page-id` int64 (required) — Status page ID. +- `--page-id` int64 (required) — Status page ID; obtain it from 'POST /status-page/list'. - `--responders` intSlice — Member IDs responsible for this event. Pass the full replacement list. - `--title` string — New event title, up to 255 characters. Omit to keep the existing value. (≤255 chars) ### component-delete [...] Delete status page component -- `` (positional, required) stringSlice — IDs of components to delete. -- `--page-id` int64 (required) — Status page ID. +- `` (positional, required) stringSlice — Component IDs to delete; obtain them from 'POST /status-page/info'. +- `--page-id` int64 (required) — Status page ID; obtain it from 'POST /status-page/list'. ### component-upsert Upsert status page component -- `` (positional, required) int64 — Status page ID. +- `` (positional, required) int64 — Status page ID; obtain it from 'POST /status-page/list'. - body-only (`--data`): components (array) (required) - response: single object (`data` unwrapped to the top level) — fields: component_ids (array) @@ -139,20 +139,20 @@ Upsert status page component Create status page - `--contact-info` string — Get-in-touch contact, such as a mailto or website URL. - `--custom-domain` string — Custom domain for a public status page. (≤255 chars) -- `--date-view` string (required) — How event dates are displayed. · enum: calendar | list -- `--display-uptime-mode` string (required) — How uptime is displayed. · enum: chart_and_percentage | chart | none +- `--date-view` string (required) — How change dates are displayed: 'calendar' calendar view, 'list' list view. · enum: calendar | list +- `--display-uptime-mode` string (required) — Uptime display mode: 'chart_and_percentage' chart plus percentage, 'chart' chart only, 'none' hidden. · enum: chart_and_percentage | chart | none - `--name` string (required) — Display name of the status page. (≤255 chars) - `--page-footer` string — Footer content shown on the status page. - `--page-header` string — Header content shown on the status page. - `--page-title` string — Browser title shown for the status page. -- `--type` string (required) — Visibility type of the status page. · enum: public | internal +- `--type` string (required) — Visibility type: 'public' accessible to anyone, 'internal' restricted to logged-in members of this account. · enum: public | internal - `--url-name` string (required) — URL-safe slug, unique per account and page type. (≤255 chars) - body-only (`--data`): custom_links (array); subscription (object) - response: single object (`data` unwrapped to the top level) — fields: page_id (integer); page_name (string); page_url_name (string) ### delete Delete status page -- `` (positional, required) int64 — Status page ID. +- `` (positional, required) int64 — Status page ID; obtain it from 'POST /status-page/list'. ### info Get status page detail @@ -179,7 +179,7 @@ Migrate status page structure ### migration-cancel Cancel status page migration -- `` (positional, required) string — Migration job ID. +- `` (positional, required) string — Migration job ID, returned when the migration job is created; check progress via 'POST /status-page/migration/status'. ### migration-status Get migration status @@ -188,24 +188,24 @@ Get migration status ### section-delete [...] Delete status page section -- `--page-id` int64 (required) — Status page ID. -- `` (positional, required) stringSlice — IDs of sections to delete. +- `--page-id` int64 (required) — Status page ID; obtain it from 'POST /status-page/list'. +- `` (positional, required) stringSlice — Section IDs to delete; obtain them from 'POST /status-page/info'. ### section-upsert Upsert status page section -- `` (positional, required) int64 — Status page ID. +- `` (positional, required) int64 — Status page ID; obtain it from 'POST /status-page/list'. - body-only (`--data`): sections (array) (required) - response: single object (`data` unwrapped to the top level) — fields: section_ids (array) ### subscriber-export Export subscribers - `--component-ids` stringSlice — Optional component IDs to filter subscribers by. -- `` (positional, required) int64 — Status page ID. +- `` (positional, required) int64 — Status page ID; obtain it from 'POST /status-page/list'. ### subscriber-import Import subscribers - `--method` string (required) — Subscription method. 'email' is only valid for public pages; 'im' is only valid for internal pages. · enum: email | im -- `` (positional, required) int64 — Target status page ID. +- `` (positional, required) int64 — Target status page ID; obtain it from 'POST /status-page/list'. - body-only (`--data`): subscribers (array) ### subscriber-list @@ -218,9 +218,9 @@ List status page subscribers ### template-delete Delete status page template -- `--page-id` int64 (required) — Status page ID. -- `--template-id` string (required) — Template ID to delete. -- `--type` string (required) — Template category. · enum: pre_defined | message +- `--page-id` int64 (required) — Status page ID; obtain it from 'POST /status-page/list'. +- `--template-id` string (required) — ID of the template to delete; obtain it from 'POST /status-page/template/list'. +- `--type` string (required) — Template kind: 'pre_defined' predefined template, 'message' message template. · enum: pre_defined | message ### template-list List status page templates @@ -229,7 +229,7 @@ List status page templates ### template-upsert Upsert status page template -- `` (positional, required) int64 — Status page ID. +- `` (positional, required) int64 — Status page ID; obtain it from 'POST /status-page/list'. - `--type` string (required) — Template category. 'pre_defined' for predefined event templates; 'message' for notification message templates. · enum: pre_defined | message - body-only (`--data`): template (object) (required) - response: single object (`data` unwrapped to the top level) — fields: template_id (string) @@ -247,7 +247,7 @@ Update status page - `--name` string — Display name of the status page. Omit to keep the existing value. (≤255 chars) - `--page-footer` string — Footer content shown on the status page. Omit to keep the existing value. - `--page-header` string — Header content shown on the status page. Omit to keep the existing value. -- `` (positional, required) int64 — Status page ID. +- `` (positional, required) int64 — Status page ID; obtain it from 'POST /status-page/list'. - `--page-title` string — Browser title shown for the status page. Omit to keep the existing value. - `--template-preference` string — Preferred change-event template type. Omit to keep the existing value. - `--url-name` string — URL-safe slug, unique per account and page type. Omit to keep the existing value. (≤255 chars) diff --git a/skills/flashduty/reference/team.md b/skills/flashduty/reference/team.md index d5376c6..4335675 100644 --- a/skills/flashduty/reference/team.md +++ b/skills/flashduty/reference/team.md @@ -70,9 +70,9 @@ Get team detail ### info Get team detail -- `--ref-id` string — External reference ID. -- `--team-id` int64 — Team ID. -- `--team-name` string — Team name. +- `--ref-id` string — External reference ID. When provided, takes precedence over 'team_name' and 'team_id'. +- `--team-id` int64 — Team ID. At least one of the three lookup fields is required; lowest priority — only used when neither 'ref_id' nor 'team_name' is provided. +- `--team-name` string — Team name. Only used when 'ref_id' is not provided; takes precedence over 'team_id'. - response: same shape as `get []` above ### infos [...] @@ -103,9 +103,9 @@ Update an existing team Create or update a team - `--country-code` string — Default country code applied to any 'phones' entries that are not in E.164 format. - `--description` string — Free-form description. (≤500 chars) -- `--emails` stringSlice — Email addresses to invite as members. +- `--emails` stringSlice — Add existing members to the team by email. Addresses that don't match an existing member are silently ignored — no invitation is sent. - `--person-ids` intSlice — Member IDs to set as team members. Replaces the existing member list. -- `--phones` stringSlice — Phone numbers to invite as members. +- `--phones` stringSlice — Add existing members to the team by phone number. Numbers that don't match an existing member are silently ignored; non-E.164 numbers are parsed with 'countryCode'. - `--ref-id` string — External reference ID for HR system integration. - `--reset-if-name-exist` bool — If true and a team with the same name already exists, reset its membership to the provided person_ids. - `--team-id` int64 — Team ID. Omit or set to 0 to create a new team. diff --git a/skills/flashduty/reference/template.md b/skills/flashduty/reference/template.md index 3a87a4f..85392d8 100644 --- a/skills/flashduty/reference/template.md +++ b/skills/flashduty/reference/template.md @@ -101,7 +101,7 @@ Get template detail ### list List templates - `--asc` bool — Ascending sort order. -- `--creator-id` int64 — Filter by creator member ID. +- `--creator-id` int64 — Filter by creator member ID; obtain member IDs from 'POST /member/list'. - `--is-my-team` bool — When true, only return templates scoped to teams the caller belongs to. - `--limit` int64 — Page size. Capped at 100. (1-100) - `--orderby` string — Sort field. · enum: created_at | updated_at @@ -134,7 +134,7 @@ Update a template - `--team-id` int64 — Team scope. 0 for account-wide. - `--teams-app` string — Microsoft Teams app message template source. - `--telegram` string — Telegram bot message template source. -- `` (positional, required) string — Target template ID. +- `` (positional, required) string — Target template ID; obtain it from 'POST /template/list'. - `--template-name` string (required) — Template name. 1–39 characters. (1-39 chars) - `--voice` string — Voice call script template source. - `--wecom` string — WeCom robot message template source.