diff --git a/analytics.go b/analytics.go index ed11d8e..5ae7c19 100644 --- a/analytics.go +++ b/analytics.go @@ -65,7 +65,7 @@ func (s *AnalyticsService) ByTeam(ctx context.Context, req *InsightQueryRequest) // Export channel insight. // -// Export channel insight metrics as a CSV file. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope. +// Export channel insight metrics as a CSV file. CSV headers and formatted values use the request locale, falling back to the member locale and then the account locale. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope. // // API: POST /insight/channel/export (insightChannelExport). func (s *AnalyticsService) ChannelExport(ctx context.Context, req *InsightQueryRequest) (*Response, error) { @@ -74,7 +74,7 @@ func (s *AnalyticsService) ChannelExport(ctx context.Context, req *InsightQueryR // Export insight incidents. // -// Export the filtered incident analytics list as a CSV file. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope. +// Export the filtered incident analytics list as a CSV file. CSV headers and formatted values use the request locale, falling back to the member locale and then the account locale. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope. // // API: POST /insight/incident/export (insightIncidentExport). func (s *AnalyticsService) IncidentExport(ctx context.Context, req *InsightIncidentExportRequest) (*Response, error) { @@ -97,7 +97,7 @@ func (s *AnalyticsService) IncidentList(ctx context.Context, req *InsightInciden // Export responder insight. // -// Export responder insight metrics as a CSV file. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope. +// Export responder insight metrics as a CSV file. CSV headers and formatted values use the request locale, falling back to the member locale and then the account locale. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope. // // API: POST /insight/responder/export (insightResponderExport). func (s *AnalyticsService) ResponderExport(ctx context.Context, req *InsightQueryRequest) (*Response, error) { @@ -106,7 +106,7 @@ func (s *AnalyticsService) ResponderExport(ctx context.Context, req *InsightQuer // Export team insight. // -// Export team insight metrics as a CSV file. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope. +// Export team insight metrics as a CSV file. CSV headers and formatted values use the request locale, falling back to the member locale and then the account locale. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope. // // API: POST /insight/team/export (insightTeamExport). func (s *AnalyticsService) TeamExport(ctx context.Context, req *InsightQueryRequest) (*Response, error) { diff --git a/licenses.go b/licenses.go new file mode 100644 index 0000000..36b52c6 --- /dev/null +++ b/licenses.go @@ -0,0 +1,22 @@ +// Code generated by internal/cmd/gen; DO NOT EDIT. + +package flashduty + +import "context" + +// LicensesService handles the "On-call/Licenses" API resource. +type LicensesService service + +// List On-call licenses. +// +// List people with active fixed or temporary On-call licenses in the current account. +// +// API: POST /oncall/license/list (oncall-license-read-license-list). +func (s *LicensesService) List(ctx context.Context) (*LicenseListResponse, *Response, error) { + out := new(LicenseListResponse) + resp, err := s.client.do(ctx, "/oncall/license/list", nil, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} diff --git a/models_gen.go b/models_gen.go index f5e8f31..25f6336 100644 --- a/models_gen.go +++ b/models_gen.go @@ -25,7 +25,7 @@ func (e CSVFileResponse) String() string { return string(e) } // DataSourceListResponse is a list response payload. type DataSourceListResponse []DataSourceItem -// ErrorCode Flashduty error code enum. Every failed API response sets `error.code` to one of these stable wire strings. HTTP status is informational — the authoritative signal is the enum value. +// ErrorCode Flashduty error code enum. Every failed API response sets `error.code` to one of these values. The value is a stable wire string — not a localized message and not a numeric status. HTTP status is informational. type ErrorCode string const ( @@ -70,6 +70,9 @@ func (e FeedSeverity) String() string { return string(e) } // FilterGroup is an alias for OrFilterGroup. type FilterGroup = OrFilterGroup +// IncidentCardHiddenFields is a map response payload. +type IncidentCardHiddenFields map[string][]string + // IncidentFeedType Incident timeline entry type. Each value identifies one lifecycle event; the matching `detail` payload shape is determined by this field. Incident types are prefixed with `i_`. type IncidentFeedType string @@ -169,23 +172,31 @@ type StoreRulesetListResponse []StoreRulesetItem type A2aAgentCreateRequest struct { // Agent display name. AgentName string `json:"agent_name,omitempty" toon:"agent_name,omitempty"` - // Authentication config key-values. + // Allow non-loopback HTTP OAuth discovery/metadata endpoints for this agent instead of requiring HTTPS. Defaults to false. + AllowInsecureOauthHTTP bool `json:"allow_insecure_oauth_http,omitempty" toon:"allow_insecure_oauth_http,omitempty"` + // Skip TLS certificate verification when connecting to this agent's endpoint (self-signed/private certs). Defaults to false. + AllowInsecureTlsSkipVerify bool `json:"allow_insecure_tls_skip_verify,omitempty" toon:"allow_insecure_tls_skip_verify,omitempty"` + // Authentication config key-values, e.g. the API key or bearer token. Values for sensitive keys (`api_key`, `token`, `client_secret`) are masked back in responses. AuthConfig map[string]string `json:"auth_config,omitempty" toon:"auth_config,omitempty"` - // Authentication mode: shared (default), per_user_secret, or per_user_oauth. + // Authentication mode: `shared` (default) shares one credential across all users; `per_user_secret` requires `secret_schema.header_name`; `per_user_oauth` runs per-user OAuth. AuthMode string `json:"auth_mode,omitempty" toon:"auth_mode,omitempty"` - // Authentication type for the remote agent. + // Authentication type for reaching the remote agent: `none`, `api_key`, or `bearer`. AuthType string `json:"auth_type,omitempty" toon:"auth_type,omitempty"` - // URL of the remote agent card. + // URL of the remote agent card. Must be an absolute `http` or `https` URL with a non-empty host; reachability is enforced by the execution environment, not at creation time. CardURL string `json:"card_url,omitempty" toon:"card_url,omitempty"` - // Agent description. - Description string `json:"description,omitempty" toon:"description,omitempty"` - // JSON OAuth metadata; reserved for per_user_oauth. + // BYOC runner ID. Required when `environment_kind=byoc`; the runner must belong to the account or a team the caller belongs to. + EnvironmentID string `json:"environment_id,omitempty" toon:"environment_id,omitempty"` + // Execution environment binding. Omit or send empty for automatic routing; `byoc` pins the agent to a specific runner given by `environment_id`. `cloud` is not accepted — configured A2A agents need a persistent runner, not a disposable cloud sandbox. + EnvironmentKind string `json:"environment_kind,omitempty" toon:"environment_kind,omitempty"` + // Natural-language instructions for the remote agent. Required — a deprecated `description` field is still accepted for legacy clients and, if both are sent, must exactly match `instructions`. + Instructions string `json:"instructions,omitempty" toon:"instructions,omitempty"` + // JSON-encoded OAuth metadata; populated by the OAuth discovery flow for `per_user_oauth` mode. OauthMetadata string `json:"oauth_metadata,omitempty" toon:"oauth_metadata,omitempty"` - // JSON secret schema; required when auth_mode=per_user_secret. + // JSON-encoded secret schema, e.g. `{"header_name":"X-Api-Key"}`; required when `auth_mode=per_user_secret`. SecretSchema string `json:"secret_schema,omitempty" toon:"secret_schema,omitempty"` // Whether the remote agent supports streaming. Streaming bool `json:"streaming,omitempty" toon:"streaming,omitempty"` - // Team scope: 0 = account-wide; >0 = team. + // Team scope: 0 = account-wide; >0 = team. Creating at account scope requires the owner/admin role; creating into a team requires actual membership in that team. TeamID int64 `json:"team_id,omitempty" toon:"team_id,omitempty"` } @@ -213,15 +224,19 @@ type A2aAgentItem struct { AgentID string `json:"agent_id" toon:"agent_id"` // Agent display name. AgentName string `json:"agent_name" toon:"agent_name"` - // Authentication config; secret values are masked. + // Allow non-loopback HTTP OAuth discovery/metadata endpoints for this agent instead of requiring HTTPS. + AllowInsecureOauthHTTP bool `json:"allow_insecure_oauth_http" toon:"allow_insecure_oauth_http"` + // Skip TLS certificate verification when connecting to this agent's endpoint. + AllowInsecureTlsSkipVerify bool `json:"allow_insecure_tls_skip_verify" toon:"allow_insecure_tls_skip_verify"` + // Authentication config; sensitive values (`api_key`, `token`, `client_secret`) are masked. AuthConfig map[string]string `json:"auth_config" toon:"auth_config"` // Authentication mode. AuthMode string `json:"auth_mode" toon:"auth_mode"` - // Authentication type for reaching the remote agent. + // Authentication type for reaching the remote agent: `none`, `api_key`, or `bearer`. AuthType string `json:"auth_type" toon:"auth_type"` // Whether the caller may edit this agent. CanEdit bool `json:"can_edit" toon:"can_edit"` - // Card-resolution timeout in seconds. + // Card-resolution timeout in seconds. Always 0 today — the API does not yet expose a way to set it. CardResolveTimeout int64 `json:"card_resolve_timeout" toon:"card_resolve_timeout"` // URL of the remote agent card. CardURL string `json:"card_url" toon:"card_url"` @@ -229,8 +244,12 @@ type A2aAgentItem struct { CreatedAt TimestampMilli `json:"created_at" toon:"created_at"` // Member ID that created the agent. CreatedBy int64 `json:"created_by" toon:"created_by"` - // Agent description. - Description string `json:"description" toon:"description"` + // BYOC runner ID. Set only when `environment_kind=byoc`; empty otherwise. + EnvironmentID string `json:"environment_id" toon:"environment_id"` + // Execution environment binding. Empty selects automatic routing; `byoc` pins the agent to a specific runner named by `environment_id`. + EnvironmentKind string `json:"environment_kind" toon:"environment_kind"` + // Natural-language instructions for the remote agent (formerly named `description`). + Instructions string `json:"instructions" toon:"instructions"` // JSON-encoded OAuth metadata (per_user_oauth mode). OauthMetadata string `json:"oauth_metadata" toon:"oauth_metadata"` // JSON-encoded secret schema (per_user_secret mode). @@ -239,7 +258,7 @@ type A2aAgentItem struct { Status string `json:"status" toon:"status"` // Whether the remote agent supports streaming responses. Streaming bool `json:"streaming" toon:"streaming"` - // Single-task execution timeout in seconds. + // Single-task execution timeout in seconds. Always 0 today — the API does not yet expose a way to set it. TaskTimeout int64 `json:"task_timeout" toon:"task_timeout"` // Team scope: 0 = account-wide; >0 = the owning team. TeamID int64 `json:"team_id" toon:"team_id"` @@ -255,6 +274,10 @@ type A2aAgentListRequest struct { Limit int64 `json:"limit,omitempty" toon:"limit,omitempty"` // Row offset for pagination. Offset int64 `json:"offset,omitempty" toon:"offset,omitempty"` + // Case-insensitive substring search across agent name, instructions, card URL, agent ID, and the resolved card name. + Query string `json:"query,omitempty" toon:"query,omitempty"` + // 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). + Scope string `json:"scope,omitempty" toon:"scope,omitempty"` // Filter to these team IDs; empty = the caller's visible set. TeamIDs []int64 `json:"team_ids,omitempty" toon:"team_ids,omitempty"` } @@ -273,23 +296,31 @@ type A2aAgentUpdateRequest struct { AgentID string `json:"agent_id,omitempty" toon:"agent_id,omitempty"` // New display name. Omit to leave unchanged. AgentName *string `json:"agent_name,omitempty" toon:"agent_name,omitempty"` - // Replace the auth config. Omit to leave unchanged. + // Toggle non-loopback HTTP OAuth discovery for this agent. Omit to leave unchanged. + AllowInsecureOauthHTTP *bool `json:"allow_insecure_oauth_http,omitempty" toon:"allow_insecure_oauth_http,omitempty"` + // Toggle TLS certificate verification skipping for this agent. Omit to leave unchanged. + AllowInsecureTlsSkipVerify *bool `json:"allow_insecure_tls_skip_verify,omitempty" toon:"allow_insecure_tls_skip_verify,omitempty"` + // Replace the auth config. Omit to leave unchanged. Sending back the masked value (or an empty string) for a sensitive key keeps the stored secret instead of overwriting it. AuthConfig map[string]string `json:"auth_config,omitempty" toon:"auth_config,omitempty"` - // New auth mode: shared, per_user_secret, or per_user_oauth. + // New auth mode: shared, per_user_secret, or per_user_oauth. Changing it always rewrites secret_schema together with it. AuthMode *string `json:"auth_mode,omitempty" toon:"auth_mode,omitempty"` // New auth type. Omit to leave unchanged. AuthType *string `json:"auth_type,omitempty" toon:"auth_type,omitempty"` // New card URL. Omit to leave unchanged. CardURL *string `json:"card_url,omitempty" toon:"card_url,omitempty"` - // New description. Omit to leave unchanged. - Description *string `json:"description,omitempty" toon:"description,omitempty"` - // New JSON OAuth metadata. + // New BYOC runner ID. Required alongside `environment_kind=byoc`. Omit to leave unchanged. + EnvironmentID *string `json:"environment_id,omitempty" toon:"environment_id,omitempty"` + // New execution environment binding: empty for automatic, `byoc` for a specific runner. `cloud` is rejected. Omit to leave unchanged. + EnvironmentKind *string `json:"environment_kind,omitempty" toon:"environment_kind,omitempty"` + // New instructions. Omit to leave unchanged. A deprecated `description` field is also accepted; if both are sent they must match. + Instructions *string `json:"instructions,omitempty" toon:"instructions,omitempty"` + // New JSON OAuth metadata. If omitted while auth_mode changes, it is cleared to empty. OauthMetadata *string `json:"oauth_metadata,omitempty" toon:"oauth_metadata,omitempty"` // New JSON secret schema. SecretSchema *string `json:"secret_schema,omitempty" toon:"secret_schema,omitempty"` // Toggle streaming support. Omit to leave unchanged. Streaming *bool `json:"streaming,omitempty" toon:"streaming,omitempty"` - // Reassign team scope. Omit to leave unchanged. + // Reassign team scope. Omit to leave unchanged. Reassigning requires rights on the destination team; if the team changes without also sending a new environment binding, the existing runner binding must remain selectable by the caller or the update is rejected. TeamID *int64 `json:"team_id,omitempty" toon:"team_id,omitempty"` } @@ -327,8 +358,14 @@ type AccountInfo struct { // AckIncidentRequest is generated from the Flashduty OpenAPI schema. type AckIncidentRequest struct { + // Custom field values for the acknowledgement form. Allowed keys and values depend on the incident's visible form. + CustomFields CustomFieldValues `json:"custom_fields,omitempty" toon:"custom_fields,omitempty"` + // Images attached to the acknowledgement timeline entry. + Images []IncidentActionImage `json:"images,omitempty" toon:"images,omitempty"` // Incident IDs to acknowledge. At most 100 per call. IncidentIDs []string `json:"incident_ids,omitempty" toon:"incident_ids,omitempty"` + // Form summary recorded as a timeline comment. Accepted only when the acknowledgement form contains a summary element. + Summary string `json:"summary,omitempty" toon:"summary,omitempty"` } // AddIncidentResponderRequest is generated from the Flashduty OpenAPI schema. @@ -1066,7 +1103,7 @@ type AuditSearchResponse struct { // AutomationRuleCreateRequest is generated from the Flashduty OpenAPI schema. type AutomationRuleCreateRequest struct { - // Run cadence. Supports 4 fields (`hour day month weekday`, minute defaults to 0) and 5 fields (`minute hour day month weekday`). The minute must be one fixed integer; 6-field seconds are not supported. The create API currently requires this field even for HTTP-POST-only rules; send a valid cron and set `schedule_trigger_enabled=false`. + // Run cadence. Supports 4 fields (`hour day month weekday`, minute defaults to 0) and 5 fields (`minute hour day month weekday`). The minute must be one fixed integer; 6-field seconds are not supported. A cron that sets both day-of-month and day-of-week is rejected. The create API currently requires this field even for HTTP-POST-only rules; send a valid cron and set `schedule_trigger_enabled=false`. CronExpr string `json:"cron_expr,omitempty" toon:"cron_expr,omitempty"` // Whether the rule is enabled after creation. Omitted API value is false; Chat/CLI create sends true by default unless the user asks for disabled. Enabled bool `json:"enabled,omitempty" toon:"enabled,omitempty"` @@ -1090,6 +1127,8 @@ type AutomationRuleCreateRequest struct { ScheduleTriggerEnabled *bool `json:"schedule_trigger_enabled,omitempty" toon:"schedule_trigger_enabled,omitempty"` // Scope team ID. 0 or omitted means a personal rule; >0 means a team in the account. Immutable after creation. TeamID int64 `json:"team_id,omitempty" toon:"team_id,omitempty"` + // IANA timezone `cron_expr` is evaluated in, e.g. `Asia/Shanghai`. Must be a timezone name loadable by the server; an invalid value is rejected. Defaults to the caller's member timezone, then the account timezone, then UTC when omitted. + Timezone string `json:"timezone,omitempty" toon:"timezone,omitempty"` } // AutomationRuleIDRequest is generated from the Flashduty OpenAPI schema. @@ -1102,7 +1141,7 @@ type AutomationRuleIDRequest struct { type AutomationRuleItem struct { // Account ID. AccountID int64 `json:"account_id" toon:"account_id"` - // Whether the caller can manage this rule. + // True when the caller can manage this rule: the personal rule owner; for team rules, an account admin or a member of the rule's team. CanEdit bool `json:"can_edit" toon:"can_edit"` // Creation time, Unix milliseconds. CreatedAt TimestampMilli `json:"created_at" toon:"created_at"` @@ -1148,6 +1187,8 @@ type AutomationRuleItem struct { ScheduleTriggerID string `json:"schedule_trigger_id" toon:"schedule_trigger_id"` // Scope team ID; 0 means personal rule. TeamID int64 `json:"team_id" toon:"team_id"` + // IANA timezone `cron_expr` is evaluated in. Always populated for rules created after this field shipped; empty on legacy rows created before it, which still resolve to UTC when scheduled. + Timezone string `json:"timezone" toon:"timezone"` // Last update time, Unix milliseconds. UpdatedAt TimestampMilli `json:"updated_at" toon:"updated_at"` } @@ -1161,9 +1202,9 @@ type AutomationRuleListRequest struct { IncludePerson *bool `json:"include_person,omitempty" toon:"include_person,omitempty"` // Filter by name keyword. Keyword string `json:"keyword,omitempty" toon:"keyword,omitempty"` - // Scope filter. Defaults to all. + // Scope filter: `all` (own personal + accessible team rules), `personal`, or `team`; default `all`. Scope string `json:"scope,omitempty" toon:"scope,omitempty"` - // Filter to these team IDs; this filters results and does not expand access. + // Filter to these team IDs; this narrows results and does not expand access. TeamIDs []int64 `json:"team_ids,omitempty" toon:"team_ids,omitempty"` } @@ -1760,6 +1801,8 @@ type CreateIncidentRequest struct { ChannelID int64 `json:"channel_id,omitempty" toon:"channel_id,omitempty"` // Incident description, up to 1024 characters. Description string `json:"description,omitempty" toon:"description,omitempty"` + // Custom field values keyed by field name. When a create form applies, only its visible fields are accepted. + Fields CustomFieldValues `json:"fields,omitempty" toon:"fields,omitempty"` // Incident severity. IncidentSeverity string `json:"incident_severity,omitempty" toon:"incident_severity,omitempty"` // Incident title, up to 512 characters. @@ -1913,6 +1956,9 @@ type CreateWarRoomRequest struct { MemberIDs []int64 `json:"member_ids,omitempty" toon:"member_ids,omitempty"` } +// CustomFieldValues is generated from the Flashduty OpenAPI schema. +type CustomFieldValues struct{} + // DsClickHouseConfig is generated from the Flashduty OpenAPI schema. type DsClickHouseConfig struct { // Default database for authentication. @@ -2533,13 +2579,13 @@ type EnrichmentUpsertRequest struct { // EnvironmentBinding is generated from the Flashduty OpenAPI schema. type EnvironmentBinding struct { - // Environment identifier. + // Environment identifier: a cloud sandbox ID for `cloud` bindings, a runner/environment ID for `byoc` bindings. ID string `json:"id" toon:"id"` - // Environment kind (e.g. runner, sandbox). + // Environment kind bound to the session: `cloud` (managed sandbox) or `byoc` (self-hosted runner). Kind string `json:"kind" toon:"kind"` - // Human-readable environment name. + // Human-readable environment name; empty for cloud bindings using the default allowlist. Name string `json:"name" toon:"name"` - // Binding status. + // Live binding health, namespaced by kind: BYOC uses online/pending/offline/deleted; cloud uses available/rebuilding/expired. Status string `json:"status" toon:"status"` } @@ -2963,6 +3009,23 @@ type FeedItem struct { UpdatedAt TimestampMilli `json:"updated_at" toon:"updated_at"` } +// FieldDeleteReference is generated from the Flashduty OpenAPI schema. +type FieldDeleteReference struct { + // Console URL for the referencing custom form. + Href string `json:"href" toon:"href"` + // Referenced resource kind. Always `custom_form` for this response. + Kind string `json:"kind" toon:"kind"` + // Display name of the referencing custom form. + Name string `json:"name" toon:"name"` +} + +// FieldDeleteReferenceError is generated from the Flashduty OpenAPI schema. +type FieldDeleteReferenceError struct { + Data FieldDeleteReferenceErrorData `json:"data" toon:"data"` + Error any `json:"error" toon:"error"` + RequestID string `json:"request_id" toon:"request_id"` +} + // FieldInfoRequest is generated from the Flashduty OpenAPI schema. type FieldInfoRequest struct { // Field ID — 24-character hex ObjectID. @@ -3143,6 +3206,16 @@ type IncProgressCnts struct { Triggered int64 `json:"Triggered" toon:"Triggered"` } +// IncidentActionImage is generated from the Flashduty OpenAPI schema. +type IncidentActionImage struct { + // Alternative text for the image. + Alt string `json:"alt,omitempty" toon:"alt,omitempty"` + // Optional link that the image points to. + Href string `json:"href,omitempty" toon:"href,omitempty"` + // Image source. Accepts an `img_` upload token, an `http(s)` URL, or an object-storage key beginning with `/`. + Src string `json:"src,omitempty" toon:"src,omitempty"` +} + // IncidentFeedItem is generated from the Flashduty OpenAPI schema. type IncidentFeedItem struct { // Account ID. @@ -3312,35 +3385,49 @@ type IncidentListResponse struct { type IncidentRawItem struct { Acknowledgements int64 `json:"acknowledgements" toon:"acknowledgements"` // Current assignment target for the incident. - AssignedTo IncidentRawItemAssignedTo `json:"assigned_to" toon:"assigned_to"` - Assignments int64 `json:"assignments" toon:"assignments"` - ChannelID int64 `json:"channel_id" toon:"channel_id"` - ChannelName string `json:"channel_name" toon:"channel_name"` - ClosedBy string `json:"closed_by" toon:"closed_by"` - CreatedAt int64 `json:"created_at" toon:"created_at"` - CreatorID int64 `json:"creator_id" toon:"creator_id"` - CreatorName string `json:"creator_name" toon:"creator_name"` - Description string `json:"description" toon:"description"` - EngagedSeconds int64 `json:"engaged_seconds" toon:"engaged_seconds"` - Escalations int64 `json:"escalations" toon:"escalations"` - Fields map[string]any `json:"fields" toon:"fields"` - Hours string `json:"hours" toon:"hours"` - IncidentID string `json:"incident_id" toon:"incident_id"` - Interruptions int64 `json:"interruptions" toon:"interruptions"` - Labels map[string]string `json:"labels" toon:"labels"` - ManualEscalations int64 `json:"manual_escalations" toon:"manual_escalations"` - Notifications int64 `json:"notifications" toon:"notifications"` + AssignedTo IncidentRawItemAssignedTo `json:"assigned_to" toon:"assigned_to"` + Assignments int64 `json:"assignments" toon:"assignments"` + ChannelID int64 `json:"channel_id" toon:"channel_id"` + ChannelName string `json:"channel_name" toon:"channel_name"` + ClosedBy string `json:"closed_by" toon:"closed_by"` + // Member ID of the person who closed the incident. + CloserID int64 `json:"closer_id" toon:"closer_id"` + // Display name of the person who closed the incident. + CloserName string `json:"closer_name" toon:"closer_name"` + CreatedAt int64 `json:"created_at" toon:"created_at"` + CreatorID int64 `json:"creator_id" toon:"creator_id"` + CreatorName string `json:"creator_name" toon:"creator_name"` + Description string `json:"description" toon:"description"` + EngagedSeconds int64 `json:"engaged_seconds" toon:"engaged_seconds"` + Escalations int64 `json:"escalations" toon:"escalations"` + // Whether the incident has ever been muted. + EverMuted bool `json:"ever_muted" toon:"ever_muted"` + Fields map[string]any `json:"fields" toon:"fields"` + // Incident frequency classification. + Frequency string `json:"frequency" toon:"frequency"` + Hours string `json:"hours" toon:"hours"` + IncidentID string `json:"incident_id" toon:"incident_id"` + Interruptions int64 `json:"interruptions" toon:"interruptions"` + Labels map[string]string `json:"labels" toon:"labels"` + ManualEscalations int64 `json:"manual_escalations" toon:"manual_escalations"` + Notifications int64 `json:"notifications" toon:"notifications"` + // Member ID of the incident owner. + OwnerID int64 `json:"owner_id" toon:"owner_id"` + // Display name of the incident owner. + OwnerName string `json:"owner_name" toon:"owner_name"` // Incident progress state — one of `Triggered`, `Processing`, `Closed`. - Progress string `json:"progress" toon:"progress"` - Reassignments int64 `json:"reassignments" toon:"reassignments"` - Responders []map[string]any `json:"responders" toon:"responders"` - SecondsToAck int64 `json:"seconds_to_ack" toon:"seconds_to_ack"` - SecondsToClose int64 `json:"seconds_to_close" toon:"seconds_to_close"` - Severity string `json:"severity" toon:"severity"` - TeamID int64 `json:"team_id" toon:"team_id"` - TeamName string `json:"team_name" toon:"team_name"` - TimeoutEscalations int64 `json:"timeout_escalations" toon:"timeout_escalations"` - Title string `json:"title" toon:"title"` + Progress string `json:"progress" toon:"progress"` + Reassignments int64 `json:"reassignments" toon:"reassignments"` + Responders []map[string]any `json:"responders" toon:"responders"` + SecondsToAck int64 `json:"seconds_to_ack" toon:"seconds_to_ack"` + SecondsToClose int64 `json:"seconds_to_close" toon:"seconds_to_close"` + Severity string `json:"severity" toon:"severity"` + // Unix timestamp in seconds until which the incident is snoozed. + SnoozedBefore Timestamp `json:"snoozed_before" toon:"snoozed_before"` + TeamID int64 `json:"team_id" toon:"team_id"` + TeamName string `json:"team_name" toon:"team_name"` + TimeoutEscalations int64 `json:"timeout_escalations" toon:"timeout_escalations"` + Title string `json:"title" toon:"title"` } // IncidentShort is generated from the Flashduty OpenAPI schema. @@ -3412,6 +3499,8 @@ type InsightFilter struct { Fields map[string]any `json:"fields,omitempty" toon:"fields,omitempty"` // Filter by incident IDs (MongoDB ObjectIDs). At most 100 entries. IncidentIDs []string `json:"incident_ids,omitempty" toon:"incident_ids,omitempty"` + // Include incidents that have ever been muted. By default, they are excluded. + IncludeEverMuted bool `json:"include_ever_muted,omitempty" toon:"include_ever_muted,omitempty"` // Restrict results to teams the caller belongs to. When true and the caller has no teams, the result set is empty. IsMyTeam bool `json:"is_my_team,omitempty" toon:"is_my_team,omitempty"` // Label filters (exact match). @@ -3457,6 +3546,8 @@ type InsightIncidentListRequest struct { Fields map[string]any `json:"fields,omitempty" toon:"fields,omitempty"` // Filter by incident IDs (MongoDB ObjectIDs). At most 100 entries. IncidentIDs []string `json:"incident_ids,omitempty" toon:"incident_ids,omitempty"` + // Include incidents that have ever been muted. By default, they are excluded. + IncludeEverMuted bool `json:"include_ever_muted,omitempty" toon:"include_ever_muted,omitempty"` // Restrict results to teams the caller belongs to. When true and the caller has no teams, the result set is empty. IsMyTeam bool `json:"is_my_team,omitempty" toon:"is_my_team,omitempty"` // Label filters (exact match). @@ -3513,6 +3604,8 @@ type InsightQueryRequest struct { Fields map[string]any `json:"fields,omitempty" toon:"fields,omitempty"` // Filter by incident IDs (MongoDB ObjectIDs). At most 100 entries. IncidentIDs []string `json:"incident_ids,omitempty" toon:"incident_ids,omitempty"` + // Include incidents that have ever been muted. By default, they are excluded. + IncludeEverMuted bool `json:"include_ever_muted,omitempty" toon:"include_ever_muted,omitempty"` // Restrict results to teams the caller belongs to. When true and the caller has no teams, the result set is empty. IsMyTeam bool `json:"is_my_team,omitempty" toon:"is_my_team,omitempty"` // Label filters (exact match). @@ -3561,6 +3654,8 @@ type InsightTopkAlertByLabelRequest struct { Fields map[string]any `json:"fields,omitempty" toon:"fields,omitempty"` // Filter by incident IDs (MongoDB ObjectIDs). At most 100 entries. IncidentIDs []string `json:"incident_ids,omitempty" toon:"incident_ids,omitempty"` + // Include incidents that have ever been muted. By default, they are excluded. + IncludeEverMuted bool `json:"include_ever_muted,omitempty" toon:"include_ever_muted,omitempty"` // Restrict results to teams the caller belongs to. When true and the caller has no teams, the result set is empty. IsMyTeam bool `json:"is_my_team,omitempty" toon:"is_my_team,omitempty"` // Number of top entries to return, between 1 and 100. @@ -3615,6 +3710,30 @@ type InviteMemberItem struct { TimeZone string `json:"time_zone,omitempty" toon:"time_zone,omitempty"` } +// LicenseListResponse is generated from the Flashduty OpenAPI schema. +type LicenseListResponse struct { + // People holding an active license. + Items []LicensePersonItem `json:"items" toon:"items"` + // Number of people holding an active license. + Total int64 `json:"total" toon:"total"` +} + +// LicensePersonItem is generated from the Flashduty OpenAPI schema. +type LicensePersonItem struct { + // Unix timestamp when a fixed license was assigned. `0` for temporary licenses. + CreatedAt Timestamp `json:"created_at" toon:"created_at"` + // ID of the licensed person. + PersonID int64 `json:"person_id" toon:"person_id"` + // Display name of the licensed person. + PersonName string `json:"person_name" toon:"person_name"` + // License assignment type. `fixed` is explicitly assigned; `temporary` is held from the active license window. + Type string `json:"type" toon:"type"` + // Unix timestamp when a fixed license was last changed. `0` for temporary licenses. + UpdatedAt Timestamp `json:"updated_at" toon:"updated_at"` + // Person ID that last changed a fixed license. `0` for temporary licenses. + UpdatedBy int64 `json:"updated_by" toon:"updated_by"` +} + // LinkItem is generated from the Flashduty OpenAPI schema. type LinkItem struct { // Rendered URL for the link. @@ -4014,6 +4133,10 @@ type LogPatternWindowEvidence struct { // McpServerCreateRequest is generated from the Flashduty OpenAPI schema. type McpServerCreateRequest struct { + // Allow this server's OAuth token exchange over plaintext HTTP. Testing use only; defaults to false. + AllowInsecureOauthHTTP bool `json:"allow_insecure_oauth_http,omitempty" toon:"allow_insecure_oauth_http,omitempty"` + // Skip TLS certificate verification when connecting to this server. Testing use only; defaults to false. + AllowInsecureTlsSkipVerify bool `json:"allow_insecure_tls_skip_verify,omitempty" toon:"allow_insecure_tls_skip_verify,omitempty"` // Command arguments (stdio transport). Args []string `json:"args,omitempty" toon:"args,omitempty"` // Authentication mode: shared (default), per_user_secret, or per_user_oauth. @@ -4028,6 +4151,10 @@ type McpServerCreateRequest struct { Description string `json:"description,omitempty" toon:"description,omitempty"` // Environment variables (stdio transport). Env map[string]string `json:"env,omitempty" toon:"env,omitempty"` + // Runner ID; required when environment_kind is byoc. + EnvironmentID string `json:"environment_id,omitempty" toon:"environment_id,omitempty"` + // Pin the server to a specific BYOC runner (`environment_id` required). Omit or send empty for automatic selection; `cloud` is not supported for MCP servers. + EnvironmentKind string `json:"environment_kind,omitempty" toon:"environment_kind,omitempty"` // HTTP headers (sse / streamable-http). Headers map[string]string `json:"headers,omitempty" toon:"headers,omitempty"` // JSON OAuth metadata; reserved for per_user_oauth. @@ -4066,6 +4193,10 @@ type McpServerItem struct { AccountID int64 `json:"account_id" toon:"account_id"` // LLM-generated description, preferred over `description` when present. AIDescription string `json:"ai_description" toon:"ai_description"` + // Allow this server's OAuth token exchange over plaintext HTTP; testing use only. + AllowInsecureOauthHTTP bool `json:"allow_insecure_oauth_http" toon:"allow_insecure_oauth_http"` + // Skip TLS certificate verification when connecting to this server; testing use only. + AllowInsecureTlsSkipVerify bool `json:"allow_insecure_tls_skip_verify" toon:"allow_insecure_tls_skip_verify"` // Command arguments (stdio transport). Args []string `json:"args" toon:"args"` // Authentication mode. @@ -4086,6 +4217,10 @@ type McpServerItem struct { Description string `json:"description" toon:"description"` // Environment variables (stdio transport). Secret values are masked. Env map[string]string `json:"env" toon:"env"` + // Runner ID when environment_kind is byoc; empty otherwise. + EnvironmentID string `json:"environment_id" toon:"environment_id"` + // Runtime environment kind: empty for automatic selection, or `byoc` when pinned to a specific runner. `cloud` cannot be bound to an MCP server. + EnvironmentKind string `json:"environment_kind" toon:"environment_kind"` // HTTP headers (sse / streamable-http). Secret values are masked. Headers map[string]string `json:"headers" toon:"headers"` // Error message when the live tool list failed. @@ -4123,6 +4258,10 @@ type McpServerListRequest struct { ListOptions // Include account-scoped (team_id=0) rows. Defaults to true. IncludeAccount *bool `json:"include_account,omitempty" toon:"include_account,omitempty"` + // Case-insensitive substring search across name, description, AI-generated description, server ID, transport, URL, command, and source template name. + Query string `json:"query,omitempty" toon:"query,omitempty"` + // Restrict results to a scope: `account` for account-wide rows only, `team` for the caller's own visible team rows only, or omit (defaults to `all`) for both, subject to team_ids/include_account. + Scope string `json:"scope,omitempty" toon:"scope,omitempty"` // Filter to these team IDs; empty = the caller's visible set. TeamIDs []int64 `json:"team_ids,omitempty" toon:"team_ids,omitempty"` } @@ -4143,6 +4282,10 @@ type McpServerStatusRequest struct { // McpServerUpdateRequest is generated from the Flashduty OpenAPI schema. type McpServerUpdateRequest struct { + // Allow OAuth token exchange over plaintext HTTP. Omit to leave unchanged. + AllowInsecureOauthHTTP *bool `json:"allow_insecure_oauth_http,omitempty" toon:"allow_insecure_oauth_http,omitempty"` + // Skip TLS certificate verification. Omit to leave unchanged. + AllowInsecureTlsSkipVerify *bool `json:"allow_insecure_tls_skip_verify,omitempty" toon:"allow_insecure_tls_skip_verify,omitempty"` // Command arguments (stdio transport). Args []string `json:"args,omitempty" toon:"args,omitempty"` // Authentication mode: shared (default), per_user_secret, or per_user_oauth. @@ -4157,6 +4300,10 @@ type McpServerUpdateRequest struct { Description string `json:"description,omitempty" toon:"description,omitempty"` // Environment variables (stdio transport). Env map[string]string `json:"env,omitempty" toon:"env,omitempty"` + // Runner ID paired with environment_kind=byoc. Omit (null) to leave the current binding unchanged. + EnvironmentID *string `json:"environment_id,omitempty" toon:"environment_id,omitempty"` + // Reassign the runner binding: `byoc` (with environment_id) or empty string to reset to automatic selection. Omit (null) to leave the current binding unchanged. + EnvironmentKind *string `json:"environment_kind,omitempty" toon:"environment_kind,omitempty"` // HTTP headers (sse / streamable-http). Headers map[string]string `json:"headers,omitempty" toon:"headers,omitempty"` // JSON OAuth metadata; reserved for per_user_oauth. @@ -5071,6 +5218,14 @@ type PreflightResult struct { Warnings []string `json:"warnings" toon:"warnings"` } +// PreviewIncidentCardFixedField is generated from the Flashduty OpenAPI schema. +type PreviewIncidentCardFixedField struct { + // Incident-card field name. + Field string `json:"field" toon:"field"` + // Rendered display value for the fixed field. + Value string `json:"value" toon:"value"` +} + // PreviewSyncRequest is generated from the Flashduty OpenAPI schema. type PreviewSyncRequest struct { // Additional type-specific query arguments. @@ -5091,7 +5246,8 @@ type PreviewSyncResponse struct{} // PreviewTemplateRequest is generated from the Flashduty OpenAPI schema. type PreviewTemplateRequest struct { // Template content to render. - Content string `json:"content,omitempty" toon:"content,omitempty"` + Content string `json:"content,omitempty" toon:"content,omitempty"` + IncidentCardHiddenFields IncidentCardHiddenFields `json:"incident_card_hidden_fields,omitempty" toon:"incident_card_hidden_fields,omitempty"` // Incident ID whose data is used to render the template; mock data is used when omitted. A MongoDB ObjectID hex string. IncidentID string `json:"incident_id,omitempty" toon:"incident_id,omitempty"` // Template channel type that selects the rendering engine. @@ -5102,6 +5258,8 @@ type PreviewTemplateRequest struct { type PreviewTemplateResponse struct { // Rendered template output, present when success is true. Content string `json:"content" toon:"content"` + // Fixed incident-card fields returned for supported IM previews after the requested hiding rules are applied. + FixedFields []PreviewIncidentCardFixedField `json:"fixed_fields" toon:"fixed_fields"` // Error message describing why rendering failed, present when success is false. Message string `json:"message" toon:"message"` // Whether the template rendered without errors. @@ -5120,7 +5278,7 @@ type QueryRow struct { type QueryRowsRequest struct { // Optional consistency check. Must equal the authenticated account when supplied; mismatched values are rejected. Business execution always uses the authenticated account. AccountID int64 `json:"account_id,omitempty" toon:"account_id,omitempty"` - // Polymorphic key/value extension parameters forwarded verbatim to monit-edge. All values must be strings. Semantics depend on `ds_type`: SLS requires `sls.project` + `sls.logstore`; Loki / VictoriaLogs raw mode requires a time range via `.start`/`.end` or `.timespan.value` + `.timespan.unit`; Prometheus and SQL sources ignore it. Always namespace keys by source (e.g. `sls.project`, `loki.type`). + // Polymorphic key/value extension parameters forwarded verbatim to monit-edge. All values must be strings, and keys are always namespaced by source (e.g. `sls.project`, `loki.type`). Validation depends on `ds_type`: SLS requires `sls.project` + `sls.logstore`. Elasticsearch accepts `es.type` of `sql`, or omitted — any other value is rejected. Loki and VictoriaLogs accept `.type` of `stats`, `raw`, or omitted; `raw` additionally requires a time range, either `.start` + `.end` or `.timespan.value` + `.timespan.unit` (unit one of `s`, `m`, `h`, `d`). Prometheus and the remaining SQL sources ignore `args` entirely. Args map[string]string `json:"args,omitempty" toon:"args,omitempty"` // Look-back offset in seconds applied to point-in-time queries (Prometheus, Loki stats, VictoriaLogs stats). Ignored for raw / detail queries. DelaySeconds int64 `json:"delay_seconds,omitempty" toon:"delay_seconds,omitempty"` @@ -5198,12 +5356,20 @@ type ResetPostMortemTitleRequest struct { // ResolveIncidentRequest is generated from the Flashduty OpenAPI schema. type ResolveIncidentRequest struct { + // Custom field values for the resolution form. Allowed keys and values depend on the incident's visible form. + CustomFields CustomFieldValues `json:"custom_fields,omitempty" toon:"custom_fields,omitempty"` + // New incident description, up to 6,144 characters. When set, it replaces the current description before the incident closes. + Description string `json:"description,omitempty" toon:"description,omitempty"` + // Images attached to the resolution timeline entry. + Images []IncidentActionImage `json:"images,omitempty" toon:"images,omitempty"` // Incident IDs to resolve. At most 100 per call. IncidentIDs []string `json:"incident_ids,omitempty" toon:"incident_ids,omitempty"` // Optional resolution note applied to every resolved incident. Resolution *string `json:"resolution,omitempty" toon:"resolution,omitempty"` // Optional root cause note applied to every resolved incident. RootCause *string `json:"root_cause,omitempty" toon:"root_cause,omitempty"` + // Form summary recorded as a timeline comment. Accepted only when the resolution form contains a summary element. + Summary string `json:"summary,omitempty" toon:"summary,omitempty"` } // Responder is generated from the Flashduty OpenAPI schema. @@ -5914,6 +6080,111 @@ type RUMIssueUpdateRequest struct { SuspectedCause string `json:"suspected_cause,omitempty" toon:"suspected_cause,omitempty"` } +// RUMReplayApplication is generated from the Flashduty OpenAPI schema. +type RUMReplayApplication struct { + // RUM application ID the session belongs to. + ID string `json:"id" toon:"id"` +} + +// RUMReplayDevice is generated from the Flashduty OpenAPI schema. +type RUMReplayDevice struct { + // Device type recorded for the session, e.g. `desktop`, `mobile`, `tablet`. + Type string `json:"type" toon:"type"` +} + +// RUMReplayForegroundPeriod is generated from the Flashduty OpenAPI schema. +type RUMReplayForegroundPeriod struct { + // Unix timestamp in milliseconds when the foreground period ended. + End TimestampMilli `json:"end" toon:"end"` + // Unix timestamp in milliseconds when the foreground period started. + Start TimestampMilli `json:"start" toon:"start"` + // View ID active during this foreground period. + ViewID string `json:"view_id" toon:"view_id"` +} + +// RUMReplaySession is generated from the Flashduty OpenAPI schema. +type RUMReplaySession struct { + // Unix timestamp in milliseconds when the session ended (or was last updated, if still active). + End TimestampMilli `json:"end" toon:"end"` + // Whether the session was still active as of the last recorded event. + IsActive bool `json:"is_active" toon:"is_active"` + // Clock skew in milliseconds between the client and Flashduty's servers, added to client timestamps for correction. + ServerTimeDelta int64 `json:"server_time_delta" toon:"server_time_delta"` + // SDK platform that recorded the session. + Source string `json:"source" toon:"source"` + // Unix timestamp in milliseconds when the session started. + Start TimestampMilli `json:"start" toon:"start"` +} + +// RUMReplayView is generated from the Flashduty OpenAPI schema. +type RUMReplayView struct { + // SDK platform of the container app, when this view is embedded (e.g. a WebView inside a native app). + ContainerSource string `json:"container_source" toon:"container_source"` + // View ID of the containing view, when this view is embedded. + ContainerViewID string `json:"container_view_id" toon:"container_view_id"` + // Unix timestamp in milliseconds when the view ended. + End TimestampMilli `json:"end" toon:"end"` + // Whether the view was still active as of the last recorded event. + IsActive bool `json:"is_active" toon:"is_active"` + // How the view was entered, e.g. `initial_load`, `route_change`. + LoadingType string `json:"loading_type" toon:"loading_type"` + // View name, typically the route or screen name. + Name string `json:"name" toon:"name"` + // Clock skew in milliseconds between the client and Flashduty's servers, added to client timestamps for correction. + ServerTimeDelta int64 `json:"server_time_delta" toon:"server_time_delta"` + // SDK platform that recorded the view. + Source string `json:"source" toon:"source"` + // Unix timestamp in milliseconds when the view started. + Start TimestampMilli `json:"start" toon:"start"` + // URL (web) or screen identifier (mobile) associated with the view. + URL string `json:"url" toon:"url"` + // Unique ID of the view within the session. + ViewID string `json:"view_id" toon:"view_id"` +} + +// RUMSessionReplayMetaItem is generated from the Flashduty OpenAPI schema. +type RUMSessionReplayMetaItem struct { + Application RUMReplayApplication `json:"application" toon:"application"` + Device RUMReplayDevice `json:"device" toon:"device"` + // Foreground periods across the session (mobile sessions only; empty for web). + ForegroundPeriods []RUMReplayForegroundPeriod `json:"foreground_periods" toon:"foreground_periods"` + Session RUMReplaySession `json:"session" toon:"session"` + // Every view recorded during the session, in chronological order. + Views []RUMReplayView `json:"views" toon:"views"` +} + +// RUMSessionReplayMetaRequest is generated from the Flashduty OpenAPI schema. +type RUMSessionReplayMetaRequest struct { + // RUM session ID. + SessionID string `json:"session_id,omitempty" toon:"session_id,omitempty"` + // Unix timestamp in milliseconds of the session start time. Optional; disambiguates when a session ID has been reused across different time windows. + TS int64 `json:"ts,omitempty" toon:"ts,omitempty"` +} + +// RUMSessionReplaySegmentsRequest is generated from the Flashduty OpenAPI schema. +type RUMSessionReplaySegmentsRequest struct { + // Maximum number of segments to return. 1-99, default 20. + Limit int64 `json:"limit,omitempty" toon:"limit,omitempty"` + // 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). + SearchAfterCtx string `json:"search_after_ctx,omitempty" toon:"search_after_ctx,omitempty"` + // RUM session ID. + SessionID string `json:"session_id,omitempty" toon:"session_id,omitempty"` + // 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. + TS int64 `json:"ts,omitempty" toon:"ts,omitempty"` + // When `true`, return presigned download URLs as a JSON envelope instead of streaming segment bytes. Defaults to `false`. + URLMode bool `json:"url_mode,omitempty" toon:"url_mode,omitempty"` + // Restrict results to segments belonging to this view. Omit to page through the entire session. + ViewID string `json:"view_id,omitempty" toon:"view_id,omitempty"` +} + +// RUMSessionReplaySegmentsResult is generated from the Flashduty OpenAPI schema. +type RUMSessionReplaySegmentsResult struct { + // Presigned, time-limited URLs (valid 1 hour) for downloading each segment's raw compressed bytes. + Items []string `json:"items" toon:"items"` + // Pagination cursor to pass as `search_after_ctx` on the next call. Empty when this page was the last one. + SearchAfterCtx string `json:"search_after_ctx" toon:"search_after_ctx"` +} + // RUMWebhookTestRequest is generated from the Flashduty OpenAPI schema. type RUMWebhookTestRequest struct { // RUM application ID. @@ -6305,6 +6576,8 @@ type SessionGetRequest struct { SearchAfterCtx string `json:"search_after_ctx,omitempty" toon:"search_after_ctx,omitempty"` // Target session ID. SessionID string `json:"session_id,omitempty" toon:"session_id,omitempty"` + // Share token for accessing a session through its share link. Omit it for normal account-authorized access. + ShareToken string `json:"share_token,omitempty" toon:"share_token,omitempty"` } // SessionGetResponse is generated from the Flashduty OpenAPI schema. @@ -6316,17 +6589,27 @@ type SessionGetResponse struct { // Opaque keyset cursor; pass back as search_after_ctx to fetch the next older page. Omitted when has_more_older is false. SearchAfterCtx string `json:"search_after_ctx" toon:"search_after_ctx"` Session SessionItem `json:"session" toon:"session"` + // Account-wide onboarding flag: true when the account has zero knowledge packs in any scope; not specific to this session. + SuggestInit bool `json:"suggest_init" toon:"suggest_init"` } // SessionItem is generated from the Flashduty OpenAPI schema. type SessionItem struct { + // How the caller received access to this session. Omitted when no access source is resolved. + AccessSource string `json:"access_source" toon:"access_source"` // Agent app that owns the session. AppName string `json:"app_name" toon:"app_name"` // Unix timestamp in milliseconds when archived; 0 means not archived. ArchivedAt TimestampMilli `json:"archived_at" toon:"archived_at"` BoundEnvironment EnvironmentBinding `json:"bound_environment" toon:"bound_environment"` - // True when the caller may rename/archive/delete the session. - CanManage bool `json:"can_manage" toon:"can_manage"` + // True when the caller can add a new turn to this session. + CanContinue bool `json:"can_continue" toon:"can_continue"` + // True when the caller can fork this session. + CanFork bool `json:"can_fork" toon:"can_fork"` + // True when the caller may rename/archive/delete the session; personal sessions are creator-only, team sessions allow the creator, account admin, or team member. + CanManage bool `json:"can_manage" toon:"can_manage"` + // True when the caller can view this session. + CanView bool `json:"can_view" toon:"can_view"` ContextResolved ContextResolvedItem `json:"context_resolved" toon:"context_resolved"` // The bound model's max context size in tokens. 0 means unknown. ContextWindow int64 `json:"context_window" toon:"context_window"` @@ -6334,6 +6617,14 @@ type SessionItem struct { CreatedAt TimestampMilli `json:"created_at" toon:"created_at"` // Size in tokens of the LLM context window as of the most recent turn. 0 means no turn has completed. CurrentContextTokens int64 `json:"current_context_tokens" toon:"current_context_tokens"` + // Active working duration in milliseconds for the current or most recent round, excluding time spent waiting on ask_user; resets to 0 at the start of each new round. + CurrentTurnActiveMs int64 `json:"current_turn_active_ms" toon:"current_turn_active_ms"` + // Unix timestamp in milliseconds when the current or most recent round started; 0 if no round has started yet. + CurrentTurnStartedAt TimestampMilli `json:"current_turn_started_at" toon:"current_turn_started_at"` + // Total tokens (input+output+reasoning) for the in-flight round across the parent and its subagents; only computed by session/get while the session is running, always 0 in session/list responses and when idle. + CurrentTurnTokens int64 `json:"current_turn_tokens" toon:"current_turn_tokens"` + // Accumulated ask_user human-wait duration in milliseconds for the current round; resets to 0 at the start of each new round. + CurrentTurnWaitMs int64 `json:"current_turn_wait_ms" toon:"current_turn_wait_ms"` // Surface that created the session. EntryKind string `json:"entry_kind" toon:"entry_kind"` // True when there is assistant output the caller has not yet viewed. @@ -6356,6 +6647,14 @@ type SessionItem struct { SessionID string `json:"session_id" toon:"session_id"` // Session title; may be empty for untitled sessions. SessionName string `json:"session_name" toon:"session_name"` + // True when the session's share link is active. + ShareEnabled bool `json:"share_enabled" toon:"share_enabled"` + // Revision of the share link; it increases when sharing is revoked. + ShareVersion int64 `json:"share_version" toon:"share_version"` + // Unix timestamp in milliseconds when sharing was last enabled; 0 if never shared. + SharedAt TimestampMilli `json:"shared_at" toon:"shared_at"` + // Person ID that most recently enabled sharing; 0 if never shared. + SharedBy int64 `json:"shared_by" toon:"shared_by"` // Raw session-state bag (session-scoped keys). Omitted when empty. State map[string]any `json:"state" toon:"state"` // Lifecycle status. @@ -6386,11 +6685,11 @@ type SessionListRequest struct { Keyword string `json:"keyword,omitempty" toon:"keyword,omitempty"` // Sort field. Orderby string `json:"orderby,omitempty" toon:"orderby,omitempty"` - // Visibility scope: all (own + member-of-team rows, default), personal, or team. + // Visibility scope: `all` (own personal + accessible team sessions), `personal`, or `team`; default `all`. Scope string `json:"scope,omitempty" toon:"scope,omitempty"` // Archive bucket: active (default) returns un-archived, archived returns archived, all returns both. Status string `json:"status,omitempty" toon:"status,omitempty"` - // Optional explicit team filter; intersects with `scope`. + // Optional explicit team filter; intersects with `scope` and never expands access. TeamIDs []int64 `json:"team_ids,omitempty" toon:"team_ids,omitempty"` } @@ -6398,6 +6697,8 @@ type SessionListRequest struct { type SessionListResponse struct { // The page of sessions. Sessions []SessionItem `json:"sessions" toon:"sessions"` + // Account-wide onboarding flag: true when the account has zero knowledge packs in any scope; not dependent on this call's filters. + SuggestInit bool `json:"suggest_init" toon:"suggest_init"` // Total number of sessions matching the filter (ignoring pagination). Total int64 `json:"total" toon:"total"` } @@ -6474,6 +6775,8 @@ type SkillItem struct { CreatedBy int64 `json:"created_by" toon:"created_by"` // Human-readable description from the SKILL.md frontmatter. Description string `json:"description" toon:"description"` + // Optional English description. English-locale UI responses prefer this over `description`; the skill catalog also uses it as a stable selection signal when `description` is localized for display. + DescriptionEn string `json:"description_en" toon:"description_en"` // True when a marketplace-sourced skill was edited locally (auto-update skips it). IsModified bool `json:"is_modified" toon:"is_modified"` // Skill license. @@ -6488,7 +6791,7 @@ type SkillItem struct { SourceTemplateName string `json:"source_template_name" toon:"source_template_name"` // Template version at install time. SourceTemplateVersion string `json:"source_template_version" toon:"source_template_version"` - // Skill status. + // Skill status. Deleted skills are excluded from every API response, so only these two values are ever returned. Status string `json:"status" toon:"status"` // Tags parsed from the frontmatter. Tags []string `json:"tags" toon:"tags"` @@ -6507,8 +6810,12 @@ type SkillItem struct { // SkillListRequest is generated from the Flashduty OpenAPI schema. type SkillListRequest struct { ListOptions - // Include account-scoped (team_id=0) rows. Defaults to true. + // Include account-scoped (team_id=0) rows. Defaults to true. Ignored when `scope` is `account` or `team`. IncludeAccount *bool `json:"include_account,omitempty" toon:"include_account,omitempty"` + // Free-text search across skill name, description, English description, skill ID, marketplace source template name, and author. + Query string `json:"query,omitempty" toon:"query,omitempty"` + // Restrict results to `all` (default), `account`-only (team_id=0), or `team`-only (excludes account-scoped rows). Overrides `include_account` when set. + Scope string `json:"scope,omitempty" toon:"scope,omitempty"` // Filter to these team IDs; empty = the caller's visible set. TeamIDs []int64 `json:"team_ids,omitempty" toon:"team_ids,omitempty"` } @@ -6529,8 +6836,10 @@ type SkillStatusRequest struct { // SkillUpdateRequest is generated from the Flashduty OpenAPI schema. type SkillUpdateRequest struct { - // New 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. Description string `json:"description,omitempty" toon:"description,omitempty"` + // New English description. Cannot contain `<` or `>`. Omit to leave unchanged; send an empty string to explicitly clear it. + DescriptionEn *string `json:"description_en,omitempty" toon:"description_en,omitempty"` // Target skill ID. SkillID string `json:"skill_id,omitempty" toon:"skill_id,omitempty"` // Reassign team scope: 0 = account-wide; >0 = team. Omit to leave unchanged. @@ -6539,13 +6848,13 @@ type SkillUpdateRequest struct { // SkillUploadRequest is generated from the Flashduty OpenAPI schema. type SkillUploadRequest struct { - // Skill archive (.skill / .zip / .tar.gz / .tgz). Max 100MB. + // Skill archive (.skill / .zip / .tar.gz / .tgz). Max 100MB; oversized files are rejected before the body is read. File string `json:"file,omitempty" toon:"file,omitempty"` - // When true, overwrite an existing same-name skill. + // When true, overwrite an existing skill instead of failing on a name collision — matched by `skill_id` if provided, otherwise by skill name. Replace bool `json:"replace,omitempty" toon:"replace,omitempty"` - // When replacing a specific skill, its skill ID. + // Existing skill ID to target when replacing a specific skill (requires `replace=true`). SkillID string `json:"skill_id,omitempty" toon:"skill_id,omitempty"` - // Team scope for the new skill: 0 = account-wide. + // Team scope for the created/upserted skill: 0 = account-wide. Ignored when replacing a specific skill via `skill_id`. TeamID int64 `json:"team_id,omitempty" toon:"team_id,omitempty"` } @@ -7012,7 +7321,7 @@ type TargetsListRequest struct { type TargetsListResponse struct { Items []TargetsListResponseItemsItem `json:"items" toon:"items"` // Opaque cursor for the next page. Absent / empty means this is the last page. - NextCursor string `json:"next_cursor" toon:"next_cursor"` + NextCursor *string `json:"next_cursor,omitempty" toon:"next_cursor,omitempty"` // Total matches for the current `(account_id, keyword)` pair, independent of `cursor`. Total int64 `json:"total" toon:"total"` } @@ -7336,11 +7645,11 @@ type ToolCatalogRequest struct { // ToolCatalogResponse is generated from the Flashduty OpenAPI schema. type ToolCatalogResponse struct { - // Business error. `null` on success. - Error ToolCatalogResponseError `json:"error" toon:"error"` - // Resolved target. `null` when locator could not be uniquely resolved. - Target ToolCatalogResponseTarget `json:"target" toon:"target"` - // Tool catalog entries. Empty when `error` is non-null. + // Request-level business error. Omitted on success. Returned with HTTP 200 — do not rely on the status code alone. + Error *ToolCatalogResponseError `json:"error,omitempty" toon:"error,omitempty"` + // Resolved target. Omitted when `target_kind` was not supplied and the locator could not be uniquely inferred. + Target *ToolCatalogResponseTarget `json:"target,omitempty" toon:"target,omitempty"` + // Tool metadata advertised by the target's agent. Always present; an empty array when `error` is set. Tools []ToolCatalogResponseToolsItem `json:"tools" toon:"tools"` } @@ -7358,12 +7667,12 @@ type ToolInvokeRequest struct { // ToolInvokeResponse is generated from the Flashduty OpenAPI schema. type ToolInvokeResponse struct { - // Request-level business error. `null` on success. - Error ToolInvokeResponseError `json:"error" toon:"error"` - // Per-tool results aligned with the request `tools[]` order. Empty when `error` is non-null. + // Request-level business error. Omitted on success. Returned with HTTP 200 — do not rely on the status code alone. + Error *ToolInvokeResponseError `json:"error,omitempty" toon:"error,omitempty"` + // Per-tool results, aligned with the request `tools[]` order. Empty when a request-level `error` is present. Results []ToolInvokeResponseResultsItem `json:"results" toon:"results"` - // Resolved target. - Target ToolInvokeResponseTarget `json:"target" toon:"target"` + // Resolved target. Omitted when `target_kind` was not supplied and the locator could not be uniquely inferred. + Target *ToolInvokeResponseTarget `json:"target,omitempty" toon:"target,omitempty"` } // TryLinkPersonRequest is generated from the Flashduty OpenAPI schema. @@ -8123,6 +8432,11 @@ type EscalateTargetWebhooksItem struct { Type string `json:"type,omitempty" toon:"type,omitempty"` } +// FieldDeleteReferenceErrorData is generated from the Flashduty OpenAPI schema. +type FieldDeleteReferenceErrorData struct { + Refs []FieldDeleteReference `json:"refs" toon:"refs"` +} + // IncidentRawItemAssignedTo is generated from the Flashduty OpenAPI schema. type IncidentRawItemAssignedTo struct { // Unix timestamp (seconds) when this assignment was made. @@ -8272,7 +8586,7 @@ type ToolCatalogResponseError struct { Code string `json:"code" toon:"code"` Message string `json:"message" toon:"message"` // Returned for `ambiguous_target_kind`; lists the candidate kinds. - TargetKinds []string `json:"target_kinds" toon:"target_kinds"` + TargetKinds *[]string `json:"target_kinds,omitempty" toon:"target_kinds,omitempty"` } // ToolCatalogResponseTarget is generated from the Flashduty OpenAPI schema. @@ -8289,8 +8603,8 @@ type ToolCatalogResponseToolsItem struct { InputSchema map[string]any `json:"input_schema" toon:"input_schema"` // Tool name; pass into `/monit/tools/invoke` as `tools[].tool`. Name string `json:"name" toon:"name"` - // Optional output JSON Schema; only returned when `include_output_shape=true`. - OutputShape map[string]any `json:"output_shape" toon:"output_shape"` + // JSON Schema of the tool result. Returned only when the request set `include_output_shape` to true. + OutputShape *map[string]any `json:"output_shape,omitempty" toon:"output_shape,omitempty"` // Target kind this tool applies to. TargetKind string `json:"target_kind" toon:"target_kind"` } @@ -8305,24 +8619,31 @@ type ToolInvokeRequestToolsItem struct { // ToolInvokeResponseError is generated from the Flashduty OpenAPI schema. type ToolInvokeResponseError struct { - Code string `json:"code" toon:"code"` - Message string `json:"message" toon:"message"` - TargetKinds []string `json:"target_kinds" toon:"target_kinds"` + Code string `json:"code" toon:"code"` + Message string `json:"message" toon:"message"` + TargetKinds *[]string `json:"target_kinds,omitempty" toon:"target_kinds,omitempty"` } // ToolInvokeResponseResultsItem is generated from the Flashduty OpenAPI schema. type ToolInvokeResponseResultsItem struct { - // Agent-self-reported tool execution time in milliseconds, excludes network. May be 0 when the failure occurred before the agent started executing. + // Agent-self-reported tool execution time in milliseconds, excluding network round-trips. May be 0 when the failure occurred before execution started. AgentElapsedMs int64 `json:"agent_elapsed_ms" toon:"agent_elapsed_ms"` - // Successful tool payload — passthrough of monit-agent `ToolResultPayload.data` (typically `data` / `summary` / `truncated`). `null` when the per-tool `error` is set. - Data map[string]any `json:"data" toon:"data"` - // Webapi-observed end-to-end time in milliseconds (webapi → ws → edge → agent → ws → webapi). A large gap vs `agent_elapsed_ms` indicates network / edge slowness. + // Tool business payload. Present only on success. Webapi already unwraps the monit-agent result envelope, so there is no nested `data.data`. + Data *map[string]any `json:"data,omitempty" toon:"data,omitempty"` + // Webapi-observed end-to-end time in milliseconds (webapi → ws → edge → agent → ws → webapi). A large gap versus `agent_elapsed_ms` indicates network / edge slowness, not a slow tool. E2eElapsedMs int64 `json:"e2e_elapsed_ms" toon:"e2e_elapsed_ms"` - // Per-tool error. Mutually exclusive with `data`. - Error ToolInvokeResponseResultsItemError `json:"error" toon:"error"` - Tool string `json:"tool" toon:"tool"` - // Agent-executed tool version. Empty when execution failed before the agent picked a version. - ToolVersion string `json:"tool_version" toon:"tool_version"` + // Per-tool failure. Present only on failure, and mutually exclusive with `data` / `summary` / `truncated`. + Error *ToolInvokeResponseResultsItemError `json:"error,omitempty" toon:"error,omitempty"` + // Request params echoed back by webapi. Normalized to `{}` when the request omitted them or sent null. + Params map[string]any `json:"params" toon:"params"` + // Human/LLM-readable one-line distillation of the result. Present only when non-empty. + Summary *string `json:"summary,omitempty" toon:"summary,omitempty"` + // Tool name, aligned one-to-one with the request `tools[]` order. + Tool string `json:"tool" toon:"tool"` + // Agent-executed tool version. Omitted when the failure occurred before the agent picked a version. + ToolVersion *string `json:"tool_version,omitempty" toon:"tool_version,omitempty"` + // Present only when the result was actually truncated — the field's presence is the signal, so there is no redundant `truncated: true`. + Truncated *ToolInvokeResponseResultsItemTruncated `json:"truncated,omitempty" toon:"truncated,omitempty"` } // ToolInvokeResponseTarget is generated from the Flashduty OpenAPI schema. @@ -8451,6 +8772,12 @@ type ToolInvokeResponseResultsItemError struct { Message string `json:"message" toon:"message"` } +// ToolInvokeResponseResultsItemTruncated is generated from the Flashduty OpenAPI schema. +type ToolInvokeResponseResultsItemTruncated struct { + // Why the result was truncated. + Reason string `json:"reason" toon:"reason"` +} + // CreateChannelRequestEscalateRuleTargetBy is generated from the Flashduty OpenAPI schema. type CreateChannelRequestEscalateRuleTargetBy struct { // Channels for Critical events (e.g. `voice`, `sms`, `email`, `feishu`). diff --git a/openapi/openapi.en.json b/openapi/openapi.en.json index 7a464c5..120de7e 100644 --- a/openapi/openapi.en.json +++ b/openapi/openapi.en.json @@ -41,6 +41,10 @@ "name": "On-call/Schedules", "description": "" }, + { + "name": "On-call/Licenses", + "description": "" + }, { "name": "On-call/Calendars", "description": "" @@ -143,6 +147,10 @@ { "name": "RUM/Sourcemaps", "description": "Manage and query RUM sourcemap files for browser, Android, and iOS error symbolication." + }, + { + "name": "RUM/Session replay", + "description": "Retrieve session replay metadata and recorded segments for RUM sessions." } ], "paths": { @@ -918,7 +926,7 @@ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- When an account create form applies, its visible custom fields and required system values must be supplied.\n- To attach images, send `multipart/form-data` with the JSON request in `data` and files in `images`; the complete request must not exceed 50 MiB.\n- Audited — changes are recorded in the audit log.", "href": "/en/api-reference/on-call/incidents/incident-create", "metadata": { "sidebarTitle": "Create incident" @@ -984,6 +992,33 @@ ] } } + }, + "multipart/form-data": { + "schema": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "string", + "description": "JSON-encoded CreateIncidentRequest payload." + }, + "images": { + "type": "array", + "items": { + "type": "string", + "format": "binary" + }, + "description": "Image files attached to the new incident." + } + } + }, + "encoding": { + "data": { + "contentType": "application/json" + } + } } } } @@ -998,7 +1033,7 @@ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- When an acknowledgement form applies, `custom_fields`, `summary`, and `images` must match its visible elements and required rules.\n- For a batch, form values are accepted only when every selected incident resolves to the same form; otherwise acknowledge incidents individually.\n- The legacy `values` and `custom_values` properties are rejected; use `custom_fields`.\n- Audited — changes are recorded in the audit log.", "href": "/en/api-reference/on-call/incidents/incident-ack", "metadata": { "sidebarTitle": "Acknowledge incident" @@ -1142,7 +1177,7 @@ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- When a resolution form applies, `custom_fields`, `summary`, and `images` must match its visible elements and required rules.\n- For a batch, form values are accepted only when every selected incident resolves to the same form; otherwise resolve incidents individually.\n- The legacy `values` and `custom_values` properties are rejected; use `custom_fields`.\n- Audited — changes are recorded in the audit log.", "href": "/en/api-reference/on-call/incidents/incident-resolve", "metadata": { "sidebarTitle": "Resolve incident" @@ -10949,7 +10984,14 @@ "timeout_escalations": 0, "manual_escalations": 0, "creator_id": 3790925372131, - "creator_name": "alice" + "creator_name": "alice", + "owner_id": 3790925372132, + "owner_name": "bob", + "closer_id": 3790925372133, + "closer_name": "carol", + "snoozed_before": 1712608400, + "ever_muted": false, + "frequency": "rare" } ] } @@ -10995,12 +11037,12 @@ "post": { "operationId": "insightIncidentExport", "summary": "Export insight incidents", - "description": "Export the filtered incident analytics list as a CSV file. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope.", + "description": "Export the filtered incident analytics list as a CSV file. CSV headers and formatted values use the request locale, falling back to the member locale and then the account locale. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope.", "tags": [ "On-call/Analytics" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/day**; **20 requests/minute**; **10 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", "href": "/en/api-reference/on-call/analytics/insight-incident-export", "metadata": { "sidebarTitle": "Export insight incidents" @@ -11182,12 +11224,12 @@ "post": { "operationId": "insightChannelExport", "summary": "Export channel insight", - "description": "Export channel insight metrics as a CSV file. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope.", + "description": "Export channel insight metrics as a CSV file. CSV headers and formatted values use the request locale, falling back to the member locale and then the account locale. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope.", "tags": [ "On-call/Analytics" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/day**; **20 requests/minute**; **10 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", "href": "/en/api-reference/on-call/analytics/insight-channel-export", "metadata": { "sidebarTitle": "Export channel insight" @@ -11364,12 +11406,12 @@ "post": { "operationId": "insightTeamExport", "summary": "Export team insight", - "description": "Export team insight metrics as a CSV file. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope.", + "description": "Export team insight metrics as a CSV file. CSV headers and formatted values use the request locale, falling back to the member locale and then the account locale. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope.", "tags": [ "On-call/Analytics" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/day**; **20 requests/minute**; **10 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", "href": "/en/api-reference/on-call/analytics/insight-team-export", "metadata": { "sidebarTitle": "Export team insight" @@ -11537,12 +11579,12 @@ "post": { "operationId": "insightResponderExport", "summary": "Export responder insight", - "description": "Export responder insight metrics as a CSV file. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope.", + "description": "Export responder insight metrics as a CSV file. CSV headers and formatted values use the request locale, falling back to the member locale and then the account locale. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope.", "tags": [ "On-call/Analytics" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/day**; **20 requests/minute**; **10 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", "href": "/en/api-reference/on-call/analytics/insight-responder-export", "metadata": { "sidebarTitle": "Export responder insight" @@ -12709,7 +12751,7 @@ "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/day**; **20 requests/minute**; **10 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", "href": "/en/api-reference/on-call/status-pages/status-page-subscriber-export", "metadata": { "sidebarTitle": "Export subscribers" @@ -13247,7 +13289,7 @@ "Monitors/Alert rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- `name`, `ds_type`, `cron_pattern`, and `rule_configs.queries` are required.\n- Either `ds_list` (supports wildcards) or `ds_ids` must be non-empty.\n- `cron_pattern` uses standard 5-field cron syntax.\n- `channel_ids` can be empty; alerts will then route through the global integration.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- `name`, `ds_type`, `cron_pattern`, and `rule_configs.queries` are required.\n- Either `ds_list` (supports wildcards) or `ds_ids` must be non-empty.\n- `cron_pattern` uses standard 5-field cron syntax.\n- `channel_ids` can be empty; alerts will then route through the global integration.\n- `name` must be unique within `folder_id`; a duplicate returns `InvalidParameter`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-create", "metadata": { "sidebarTitle": "Create alert rule" @@ -13351,7 +13393,7 @@ "Monitors/Alert rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- `id` is required. All other fields follow the same rules as `POST /monit/rule/create`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- `id` is required. All other fields follow the same rules as `POST /monit/rule/create`.\n- The name must remain unique within its folder; a duplicate returns `InvalidParameter`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-update", "metadata": { "sidebarTitle": "Update alert rule" @@ -13761,7 +13803,7 @@ "Monitors/Alert rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/day**; **200 requests/minute**; **20 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-export", "metadata": { "sidebarTitle": "Export alert rules" @@ -13843,7 +13885,7 @@ "Monitors/Alert rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Rules whose names already exist in the destination folder are skipped. Inspect each result's `message` to identify conflicts.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-move", "metadata": { "sidebarTitle": "Move alert rules to folder" @@ -15481,7 +15523,7 @@ "RUM/Facets" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Use `POST /rum/facet/list` to discover available `facet_key` values for each scope.\n- The `scope` must be one of: `session`, `view`, `action`, `error`, `resource`, `long_task`, `vital`, `issue`, `sourcemap`.\n- Pass `dql` to further filter events before counting. DQL syntax follows the RUM query language.\n- Pass `sql` with a WHERE-clause only (no SELECT) for SQL-style filtering.\n- Default limit is 100; maximum is 100.\n- Time range is required (`start_time` / `end_time` in Unix epoch **milliseconds**). Maximum span is 31 days.", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **100 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Use `POST /rum/facet/list` to discover available `facet_key` values for each scope.\n- The `scope` must be one of: `session`, `view`, `action`, `error`, `resource`, `long_task`, `vital`, `issue`, `sourcemap`.\n- Pass `dql` to further filter events before counting. DQL syntax follows the RUM query language.\n- Pass `sql` with a WHERE-clause only (no SELECT) for SQL-style filtering.\n- Default limit is 100; maximum is 100.\n- Time range is required (`start_time` / `end_time` in Unix epoch **milliseconds**). Maximum span is 31 days.", "href": "/en/api-reference/rum/facets/rum-read-facet-count", "metadata": { "sidebarTitle": "Count facet value distribution" @@ -19653,7 +19695,7 @@ "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- The field is marked deleted synchronously; clearing its values from historical incidents runs in the background and may take time on large datasets.\n- Re-creating a field with the same `field_name` is only allowed if `field_type` and `value_type` match the deleted entry.\n- Audited — changes are recorded in the audit log.", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- The field is marked deleted synchronously; clearing its values from historical incidents runs in the background and may take time on large datasets.\n- Re-creating a field with the same `field_name` is only allowed if `field_type` and `value_type` match the deleted entry.\n- Deletion is rejected with `ReferenceExist` and the referencing custom forms in `data.refs` until no form uses the field.\n- Audited — changes are recorded in the audit log.", "href": "/en/api-reference/on-call/alert-enrichment/field-write-delete", "metadata": { "sidebarTitle": "Delete field" @@ -19687,7 +19729,41 @@ } }, "400": { - "$ref": "#/components/responses/BadRequest" + "description": "Invalid request or the field is still referenced by a custom form.", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorResponse" + }, + { + "$ref": "#/components/schemas/FieldDeleteReferenceError" + } + ] + }, + "examples": { + "fieldStillReferenced": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "ReferenceExist", + "message": "There still are associated resources, deletion is blocked." + }, + "data": { + "refs": [ + { + "kind": "custom_form", + "name": "Resolve incident", + "href": "https://console.flashcat.cloud/forms/resolve" + } + ] + } + } + } + } + } + } }, "401": { "$ref": "#/components/responses/Unauthorized" @@ -19723,7 +19799,7 @@ "Monitors/Diagnostics" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **600 requests/minute**; **10 requests/second** per account |\n| Permissions | Any valid `app_key` (read-only; not gated by a specific permission class) |\n\n## Usage\n\n- The request is forwarded to `monit-edge` over WebSocket; the data source named by `ds_type` + `ds_name` must already exist under the calling account.\n- `account_id` in the body is optional. When supplied it must equal the authenticated account; mismatched values are rejected.\n- Two error layers: webapi-level failures use the standard error envelope, but errors raised by `monit-edge` while executing the query are returned as HTTP 200 with an `error` object in the body. Always check the response body for `error` in addition to the HTTP status.\n- monit-edge enforces a row cap; large result sets come back as `error.message = \"too many rows\"`. Narrow the time range or aggregate at the source.\n- `args` is a polymorphic `string→string` map that is forwarded verbatim. Semantics depend on `ds_type` (SLS requires `sls.project` + `sls.logstore`; Loki / VictoriaLogs raw mode requires a time range via `*.start`/`*.end` or `*.timespan.value`/`*.timespan.unit`; Prometheus and SQL sources ignore it). See the monit-webapi query-api docs for the per-source key list.", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **600 requests/minute**; **10 requests/second** per account |\n| Permissions | Any valid `app_key` (read-only; not gated by a specific permission class) |\n\n## Usage\n\n- The request is forwarded to `monit-edge` over WebSocket; the data source named by `ds_type` + `ds_name` must already exist under the calling account.\n- `account_id` in the body is optional. When supplied it must equal the authenticated account; mismatched values are rejected.\n- Validation failures use the standard error envelope. When `monit-edge` rejects a query, its `{\"error\": {\"code\": ..., \"message\": ...}}` body is preserved and the HTTP status matches the edge error code; an invalid or absent code becomes HTTP 500. Check both the status and the error body.\n- monit-edge enforces a row cap; large result sets come back as `error.message = \"too many rows\"`. Narrow the time range or aggregate at the source.\n- `args` is a polymorphic `string→string` map that is forwarded verbatim. Semantics depend on `ds_type` (SLS requires `sls.project` + `sls.logstore`; Loki / VictoriaLogs raw mode requires a time range via `*.start`/`*.end` or `*.timespan.value`/`*.timespan.unit`; Prometheus and SQL sources ignore it). See the monit-webapi query-api docs for the per-source key list.", "href": "/en/api-reference/monitors/diagnostics/monit-read-query-rows", "metadata": { "sidebarTitle": "Query data source rows" @@ -19808,7 +19884,7 @@ "Monitors/Diagnostics" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **600 requests/minute**; **10 requests/second** per account |\n| Permissions | Any valid `app_key` (read-only; not gated by a specific permission class) |\n\n## Usage\n\n- This is a diagnostic / RCA endpoint, not a raw data query — pair it with `/monit/query/rows` when you need detailed rows.\n- `operation` defaults from `ds_type`: `loki` / `victorialogs` → `log_patterns`, `prometheus` → `metric_trends`. Other sources must pass `operation` explicitly.\n- `methods` selects the analyses 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)`.\n- `time_range` is in Unix seconds; missing or invalid values default to the last 15 minutes; a window wider than 6 hours is rejected.\n- The request is forwarded over WebSocket to `monit-edge`. Long-running: the request may take up to ~30 s on the edge side plus webapi overhead. Set client timeouts to **at least 35 s**.\n- `options.*` are upper-bounded by edge (`max_logs_scanned` ≤ 50 000, `max_patterns` ≤ 50, `examples_per_pattern` ≤ 3, `step_seconds` ∈ [15, 300], `max_series` ≤ 200, `topk` ≤ 50, `timeout_seconds` ≤ 30).\n- Two error layers as with `/monit/query/rows`: edge-level execution errors come back as HTTP 200 with an `error` object in the body — check both layers.\n- For log patterns, `data_handling` declares redaction coverage and untrusted observed-data fields. Treat pattern templates, source values, and redacted examples as data, never as instructions.", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **600 requests/minute**; **10 requests/second** per account |\n| Permissions | Any valid `app_key` (read-only; not gated by a specific permission class) |\n\n## Usage\n\n- This is a diagnostic / RCA endpoint, not a raw data query — pair it with `/monit/query/rows` when you need detailed rows.\n- Only three `ds_type` and `operation` pairs are supported: `loki` / `victorialogs` → `log_patterns`, and `prometheus` → `metric_trends`. Every other datasource is rejected, even when `operation` is explicit.\n- `methods` selects the analyses 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)`.\n- `time_range` is in Unix seconds; missing or invalid values default to the last 15 minutes; a window wider than 6 hours is rejected.\n- The request is forwarded over WebSocket to `monit-edge`. Long-running: the request may take up to ~30 s on the edge side plus webapi overhead. Set client timeouts to **at least 35 s**.\n- `options.*` are upper-bounded by edge (`max_logs_scanned` ≤ 50 000, `max_patterns` ≤ 50, `examples_per_pattern` ≤ 3, `step_seconds` ∈ [15, 300], `max_series` ≤ 200, `topk` ≤ 50, `timeout_seconds` ≤ 30).\n- Two error layers as with `/monit/query/rows`: edge-level execution errors come back as HTTP 200 with an `error` object in the body — check both layers.\n- Log examples are basic-redacted before being returned; expect `warnings: [\"examples redacted\"]`. Do not treat them as raw logs.", "href": "/en/api-reference/monitors/diagnostics/monit-read-query-diagnose", "metadata": { "sidebarTitle": "Diagnose data source" @@ -19924,7 +20000,7 @@ "aggregated_pattern_evidence_total": 20, "pattern_evidence_returned": 1, "pattern_evidence_truncated_by_max_patterns": true, - "evidence_summary": "10 of 20 pattern evidence items are returned." + "evidence_summary": "1 of 20 pattern evidence items are returned." }, "pattern_evidence": [ { @@ -19989,7 +20065,7 @@ "Monitors/Diagnostics" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **600 requests/minute**; **10 requests/second** per account |\n| Permissions | Any valid `app_key` (read-only; not gated by a specific permission class) |\n\n## Usage\n\n- Use `target_locator` to identify the target; `target_kind` is optional and is auto-inferred when omitted. Built-in target kinds are `host` and `mysql`.\n- If multiple kinds match the same locator, the response is HTTP 200 with `data.error.code = \"ambiguous_target_kind\"` and a `target_kinds` list — retry with an explicit `target_kind`.\n- The catalog is a *candidate capability* view, not an execution guarantee. The target Agent may go offline between catalog and invoke, or local Agent policy may block individual tools at invoke time.\n- Set `include_output_shape: true` to additionally receive each tool's `output_shape`. Default is `false` to keep the response small for LLM consumption.\n- Business errors (`target_unavailable`, `unknown_toolset_hash`, `ambiguous_target_kind`) come back as HTTP 200 with a non-null `data.error`. Only protocol / auth / internal errors use the standard error envelope.", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **600 requests/minute**; **10 requests/second** per account |\n| Permissions | Any valid `app_key` (read-only; not gated by a specific permission class) |\n\n## Usage\n\n- Use `target_locator` to identify the target; `target_kind` is optional and is auto-inferred when omitted. Built-in target kinds are `host` and `mysql`.\n- If multiple kinds match the same locator, the response is HTTP 200 with `data.error.code = \"ambiguous_target_kind\"` and a `target_kinds` list — retry with an explicit `target_kind`.\n- The catalog is a *candidate capability* view, not an execution guarantee. The target Agent may go offline between catalog and invoke, or local Agent policy may block individual tools at invoke time.\n- Set `include_output_shape: true` to additionally receive each tool's `output_shape`. Default is `false` to keep the response small for LLM consumption.\n- Business errors (`target_unavailable`, `unknown_toolset_hash`, `ambiguous_target_kind`) come back as HTTP 200 with `data.error` present and `data.tools = []`. Only protocol / auth / internal errors use the standard error envelope.\n- The response uses **sparse fields**: on success `error` is omitted rather than sent as `null`, and `target` is omitted when the locator could not be uniquely resolved. `tools` is always present.", "href": "/en/api-reference/monitors/diagnostics/monit-read-tools-catalog", "metadata": { "sidebarTitle": "List target tool catalog" @@ -20041,34 +20117,232 @@ { "name": "os.overview", "target_kind": "host", - "description": "Returns a bounded overview of host health (CPU, memory, disk, network, top processes).", + "description": "Returns a bounded overview of host health: CPU usage and load, memory and swap utilisation, disk and network counters, and top processes.", "input_schema": { "type": "object", "additionalProperties": false, "properties": {} }, "output_shape": { + "properties": { + "data": { + "properties": { + "cpu": { + "type": "object" + }, + "degradation_reasons": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + "disk": { + "description": "Filesystems sorted by used_pct desc; rootfs always present; capped at host.disk.top_n. Sizes are in GB; used_pct/inode_used_pct in percent.", + "type": "array" + }, + "disk_errors": { + "description": "Mount points whose statfs returned a syscall error (EACCES / ENOENT / EIO / stale, etc.); each entry is `: `.", + "type": "array" + }, + "disk_io": { + "description": "Per-device disk I/O rates (util_pct, IOPS, throughput, await). Sorted by util_pct desc; capped at host.disk_io.top_n. Only whole-disk devices shown.", + "type": "object" + }, + "disk_timeouts": { + "description": "Mount points whose statfs hit per-mount timeout.", + "type": "array" + }, + "load": { + "type": "object" + }, + "memory": { + "description": "Memory and swap sizes are in MB; percentages are 0..100. Swap fields are always present when memory collection succeeds, including zero when swap is not configured.", + "properties": { + "available_mb": { + "type": "integer" + }, + "swap_configured": { + "description": "True when the kernel reports a non-zero SwapTotal.", + "type": "boolean" + }, + "swap_total_mb": { + "type": "integer" + }, + "swap_used_mb": { + "type": "integer" + }, + "swap_used_pct": { + "type": "number" + }, + "total_mb": { + "type": "integer" + }, + "used_mb": { + "type": "integer" + }, + "used_pct": { + "type": "number" + } + }, + "required": [ + "total_mb", + "available_mb", + "used_mb", + "used_pct", + "swap_configured", + "swap_total_mb", + "swap_used_mb", + "swap_used_pct" + ], + "type": "object" + }, + "network_io": { + "description": "Per-interface network throughput and error rates. Sorted by total traffic desc; capped at host.network_io.top_n. Virtual/container interfaces excluded by default.", + "type": "object" + }, + "procs": { + "type": "object" + }, + "sample_interval_sec": { + "description": "Shared sampling interval for CPU, disk_io, network_io counter-diff calculations.", + "type": "number" + }, + "tcp_connections": { + "description": "TCP connection state distribution via netlink SOCK_DIAG. Shows counts per state (established, time_wait, close_wait, listen, syn_recv, other, total).", + "type": "object" + }, + "uptime_sec": { + "type": "number" + }, + "vmstat": { + "description": "Sparse cumulative counters since the current boot; use them as historical clues, not current rates.", + "properties": { + "oom_kill_since_boot": { + "description": "OOM kills accumulated since boot; omitted when this kernel does not expose the counter.", + "type": "integer" + }, + "pgmajfault_since_boot": { + "description": "Major page faults accumulated since boot.", + "type": "integer" + } + }, + "required": [ + "pgmajfault_since_boot" + ], + "type": "object" + } + }, + "required": [ + "sample_interval_sec" + ], + "type": "object" + }, + "summary": { + "minLength": 1, + "type": "string" + }, + "truncated": { + "additionalProperties": false, + "properties": { + "reason": { + "minLength": 1, + "type": "string" + } + }, + "required": [ + "reason" + ], + "type": "object" + } + }, + "required": [ + "data" + ], + "type": "object" + } + }, + { + "name": "net.tcp_ping", + "target_kind": "host", + "description": "Checks TCP reachability of a host:port from the target, reporting connect latency.", + "input_schema": { "type": "object", + "additionalProperties": false, "required": [ - "data", - "summary", - "truncated" + "host", + "port" ], + "properties": { + "host": { + "type": "string" + }, + "port": { + "type": "integer" + } + } + }, + "output_shape": { "properties": { "data": { + "properties": { + "avg_ms": { + "type": "number" + }, + "max_ms": { + "type": "number" + }, + "min_ms": { + "type": "number" + }, + "probes": { + "items": { + "properties": { + "error": { + "type": "string" + }, + "latency_ms": { + "type": "number" + } + }, + "type": "object" + }, + "type": "array" + }, + "reachable": { + "type": "boolean" + }, + "resolved_ip": { + "type": "string" + } + }, "type": "object" }, "summary": { + "minLength": 1, "type": "string" }, "truncated": { + "additionalProperties": false, + "properties": { + "reason": { + "minLength": 1, + "type": "string" + } + }, + "required": [ + "reason" + ], "type": "object" } - } + }, + "required": [ + "data" + ], + "type": "object" } } - ], - "error": null + ] } } } @@ -20098,7 +20372,7 @@ "Monitors/Diagnostics" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **600 requests/minute**; **10 requests/second** per account |\n| Permissions | Any valid `app_key` (read-only; not gated by a specific permission class) |\n\n## Usage\n\n- Up to **8** tools per call (`MaxToolsPerInvoke`); larger batches must be split client-side. The 8-tool cap aligns with the per-target agent concurrency.\n- Tools execute in parallel on the agent; webapi returns `results[]` aligned with the request `tools[]` order.\n- Long-running: set client timeouts to **at least 35 s**. The endpoint is intended for AI-SRE / human-RCA flows, not interactive UI.\n- Request-level errors (`target_unavailable`, `ambiguous_target_kind`, `unknown_toolset_hash`, `forward_failed`) appear as HTTP 200 with `data.error` set and `data.results = []`.\n- Per-tool failures appear as HTTP 200 with `data.error = null` and `results[i].error` populated — always check **all three** layers (outer envelope `error`, `data.error`, then each `results[i].error`).\n- Each result carries two latency fields: `agent_elapsed_ms` (agent-self-reported, excludes network) and `e2e_elapsed_ms` (webapi-observed end-to-end). A large gap between them indicates network / edge slowness rather than slow tool execution.\n- Construct `tools[].params` against the `input_schema` returned by `/monit/tools/catalog`. For no-arg tools always pass `params: {}` explicitly.", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **600 requests/minute**; **10 requests/second** per account |\n| Permissions | Any valid `app_key` (read-only; not gated by a specific permission class) |\n\n## Usage\n\n- Up to **8** tools per call (`MaxToolsPerInvoke`); larger batches must be split client-side. The 8-tool cap aligns with the per-target agent concurrency.\n- Tools execute in parallel on the agent; webapi returns `results[]` aligned with the request `tools[]` order.\n- Long-running: set client timeouts to **at least 35 s**. The endpoint is intended for AI-SRE / human-RCA flows, not interactive UI.\n- Request-level errors (`target_unavailable`, `ambiguous_target_kind`, `unknown_toolset_hash`, `forward_failed`) appear as HTTP 200 with `data.error` set and `data.results = []`.\n- Per-tool failures appear as HTTP 200 with `data.error` absent and `results[i].error` populated — always check **all three** layers (outer envelope `error`, `data.error`, then each `results[i].error`).\n- The response uses **sparse fields**: absent means empty. On success `error` is omitted entirely rather than sent as `null`; on failure `data`, `summary` and `truncated` are omitted. Do not key logic off placeholder `null` fields, and do not expect `target` when the locator could not be uniquely resolved.\n- `results[i].data` is the tool payload with the monit-agent result envelope **already unwrapped** — there is no nested `data.data`. The one-line distillation is `results[i].summary`, and `results[i].truncated` (carrying a `reason`) appears only when the result was genuinely truncated.\n- `results[i].params` echoes the params webapi received for that tool, so batched calls stay correlatable even when an individual tool fails.\n- Each result carries two latency fields: `agent_elapsed_ms` (agent-self-reported, excludes network) and `e2e_elapsed_ms` (webapi-observed end-to-end). A large gap between them indicates network / edge slowness rather than slow tool execution.\n- Construct `tools[].params` against the `input_schema` returned by `/monit/tools/catalog`. For no-arg tools always pass `params: {}` explicitly.", "href": "/en/api-reference/monitors/diagnostics/monit-read-tools-invoke", "metadata": { "sidebarTitle": "Invoke target tools" @@ -20161,35 +20435,45 @@ "results": [ { "tool": "os.overview", - "tool_version": "0.5.0", - "data": { - "data": { - "sample_interval_sec": 3, - "degraded": false, - "degradation_reasons": [] + "params": {}, + "tool_version": "0.6.0", + "data": { + "sample_interval_sec": 0.5, + "cpu": { + "cores": 4, + "usage_pct": 32.66, + "user_pct": 28.14, + "system_pct": 3.52, + "iowait_pct": 1.01, + "idle_pct": 67.34 }, - "summary": "os.overview ...", - "truncated": { - "truncated": false + "load": { + "load1": 1.79, + "load5": 1.83, + "load15": 1.67, + "runnable_procs": 7, + "total_procs": 1036 } }, - "error": null, + "summary": "os.overview cpu=32.66% mem=74.46% swap=not_configured oom_kill_since_boot=2 load1=1.79", "agent_elapsed_ms": 3120, "e2e_elapsed_ms": 3188 }, { "tool": "net.tcp_ping", - "tool_version": "0.5.0", - "data": null, + "params": { + "host": "10.255.255.1", + "port": 3306 + }, + "tool_version": "0.1.0", "error": { - "code": "target_unreachable", - "message": "dial tcp 10.0.0.10:3306: i/o timeout" + "code": "timeout", + "message": "tool \"net.tcp_ping\" exceeded 8000ms" }, - "agent_elapsed_ms": 0, - "e2e_elapsed_ms": 2008 + "agent_elapsed_ms": 8048, + "e2e_elapsed_ms": 8217 } - ], - "error": null + ] } } } @@ -20569,7 +20853,7 @@ "On-call/Notification templates" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **60 requests/minute**; **10 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **60 requests/minute**; **10 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `incident_card_hidden_fields` applies only to supported IM-card previews; unsupported app types or field names return `InvalidParameter`.\n- `fixed_fields` is returned only when the selected IM preview has a non-empty fixed incident-card value.", "href": "/en/api-reference/on-call/notification-templates/template-read-preview", "metadata": { "sidebarTitle": "Preview template" @@ -20600,7 +20884,13 @@ "data": { "success": true, "content": "Incident Database latency spike is Critical", - "message": "" + "message": "", + "fixed_fields": [ + { + "field": "channel", + "value": "Payment Alerts" + } + ] } } } @@ -20629,7 +20919,12 @@ "example": { "content": "Incident {{.Title}} is {{.Status}}", "type": "feishu_app", - "incident_id": "664a1b2c3d4e5f6a7b8c9d0e" + "incident_id": "664a1b2c3d4e5f6a7b8c9d0e", + "incident_card_hidden_fields": { + "feishu_app": [ + "responders" + ] + } } } } @@ -20930,24 +21225,93 @@ } } }, - "/safari/skill/list": { + "/datasource/im/person/try-link": { "post": { - "operationId": "skill-read-list", - "summary": "List skills", - "description": "List AI SRE skills visible to the caller across account and team scopes, with pagination.", + "operationId": "datasourceImPersonTryLink", + "summary": "Attempt IM person linking", + "description": "Try to automatically link unbound members to their IM accounts for one integration.", "tags": [ - "AI SRE/Skills" + "On-call/Integrations" ], - "security": [ - { - "AppKeyAuth": [] + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- The server uses member email and phone values to find matching users in DingTalk, Feishu, or WeCom.\n- If no member can be linked, the response contains an empty `new_linked_person_ids` array.", + "href": "/en/api-reference/on-call/integrations/datasource-im-person-try-link", + "metadata": { + "sidebarTitle": "Attempt IM person linking" } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TryLinkPersonResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "new_linked_person_ids": [ + 5348648172131 + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TryLinkPersonRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/incident/post-mortem/init": { + "post": { + "operationId": "postmortem-write-init", + "summary": "Initialize post-mortem", + "description": "Create a post-mortem draft from one or more incidents and a template.", + "tags": [ + "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The `content` field is omitted in list rows; fetch a single skill to read its body.\n", - "href": "/en/api-reference/ai-sre/skills/skill-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Links at most 10 incidents to one post-mortem report.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/incidents/postmortem-write-init", "metadata": { - "sidebarTitle": "List skills" + "sidebarTitle": "Initialize post-mortem" } }, "responses": { @@ -20958,13 +21322,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SkillListResponse" + "$ref": "#/components/schemas/PostMortemItem" } } } @@ -20973,33 +21337,43 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "total": 1, - "skills": [ - { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", - "account_id": 10023, - "team_id": 0, - "skill_name": "k8s-triage", - "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", - "version": "1.2.0", - "tags": [ - "kubernetes", - "triage" - ], - "author": "sre-team", - "tools": [ - "bash", - "mcp:prometheus/query" - ], - "status": "enabled", - "created_by": 80011, - "created_at": 1716960000000, - "updated_at": 1717046400000, - "can_edit": true, - "update_available": false, - "is_modified": false - } - ] + "meta": { + "account_id": 2451002751131, + "title": "Postmortem1", + "status": "published", + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "template_id": "post_mortem_default_tmpl_en-us", + "incident_ids": [ + "69bb9233331067560c718ecd" + ], + "media_count": 0, + "author_ids": [ + 2477273692131 + ], + "team_id": 2477033058131, + "channel_id": 3047621227131, + "is_private": false, + "channel_name": "Ops Channel", + "created_at_seconds": 1773900354, + "updated_at_seconds": 1773909012 + }, + "basics": { + "incidents_highest_severity": "Warning", + "incidents_earliest_start_seconds": 1761133512, + "incidents_latest_close_seconds": 1761133632, + "incidents_total_duration_seconds": 120, + "responders": [ + { + "person_id": 3790925372131, + "assigned_at": 1761133515, + "acknowledged_at": 0 + } + ] + }, + "content": { + "content": "{\"type\":\"doc\",\"content\":[]}" + }, + "follow_ups": "" } } } @@ -21023,36 +21397,32 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillListRequest" + "$ref": "#/components/schemas/InitPostMortemRequest" }, "example": { - "p": 1, - "limit": 20, - "include_account": true + "incident_ids": [ + "69bb9233331067560c718ecd" + ], + "template_id": "post_mortem_default_tmpl_en-us" } } } } } }, - "/safari/skill/get": { + "/incident/post-mortem/basics/reset": { "post": { - "operationId": "skill-read-get", - "summary": "Get skill detail", - "description": "Get one skill including its full SKILL.md content.", + "operationId": "postmortem-write-reset-basics", + "summary": "Update post-mortem basics", + "description": "Replace the incident facts stored in a post-mortem report.", "tags": [ - "AI SRE/Skills" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n", - "href": "/en/api-reference/ai-sre/skills/skill-read-get", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/incidents/postmortem-write-reset-basics", "metadata": { - "sidebarTitle": "Get skill detail" + "sidebarTitle": "Update post-mortem basics" } }, "responses": { @@ -21063,13 +21433,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SkillItem" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -21077,31 +21447,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", - "account_id": 10023, - "team_id": 0, - "skill_name": "k8s-triage", - "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", - "version": "1.2.0", - "tags": [ - "kubernetes", - "triage" - ], - "author": "sre-team", - "tools": [ - "bash", - "mcp:prometheus/query" - ], - "status": "enabled", - "created_by": 80011, - "created_at": 1716960000000, - "updated_at": 1717046400000, - "can_edit": true, - "update_available": false, - "is_modified": false, - "content": "---\nname: k8s-triage\ndescription: ...\n---\n# Triage steps" - } + "data": {} } } } @@ -21124,34 +21470,36 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillGetRequest" + "$ref": "#/components/schemas/ResetPostMortemBasicsRequest" }, "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "incidents_highest_severity": "Warning", + "incidents_earliest_start_seconds": 1761133512, + "incidents_latest_close_seconds": 1761133632, + "incidents_total_duration_seconds": 120, + "responder_ids": [ + 3790925372131 + ] } } } } } }, - "/safari/skill/update": { + "/incident/post-mortem/status/reset": { "post": { - "operationId": "skill-write-update", - "summary": "Update skill", - "description": "Update a skill's description or reassign its team scope.", + "operationId": "postmortem-write-reset-status", + "summary": "Update post-mortem status", + "description": "Set a post-mortem report to drafting or published.", "tags": [ - "AI SRE/Skills" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Only `description` and `team_id` are editable; the skill body is changed by re-uploading.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/skills/skill-write-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/incidents/postmortem-write-reset-status", "metadata": { - "sidebarTitle": "Update skill" + "sidebarTitle": "Update post-mortem status" } }, "responses": { @@ -21162,13 +21510,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SkillItem" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -21176,30 +21524,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", - "account_id": 10023, - "team_id": 0, - "skill_name": "k8s-triage", - "description": "Updated triage runbook.", - "version": "1.2.0", - "tags": [ - "kubernetes", - "triage" - ], - "author": "sre-team", - "tools": [ - "bash", - "mcp:prometheus/query" - ], - "status": "enabled", - "created_by": 80011, - "created_at": 1716960000000, - "updated_at": 1717046400000, - "can_edit": true, - "update_available": false, - "is_modified": false - } + "data": {} } } } @@ -21210,9 +21535,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21225,35 +21547,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillUpdateRequest" + "$ref": "#/components/schemas/ResetPostMortemStatusRequest" }, "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", - "description": "Updated triage runbook." + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "status": "published" } } } } } }, - "/safari/skill/delete": { + "/incident/post-mortem/title/reset": { "post": { - "operationId": "skill-write-delete", - "summary": "Delete skill", - "description": "Delete a skill by ID.", + "operationId": "postmortem-write-reset-title", + "summary": "Update post-mortem title", + "description": "Replace the title of a post-mortem report.", "tags": [ - "AI SRE/Skills" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/skills/skill-write-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/incidents/postmortem-write-reset-title", "metadata": { - "sidebarTitle": "Delete skill" + "sidebarTitle": "Update post-mortem title" } }, "responses": { @@ -21264,14 +21581,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "type": "null", - "description": "Always null on success." + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -21279,7 +21595,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -21290,9 +21606,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21305,34 +21618,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillDeleteRequest" + "$ref": "#/components/schemas/ResetPostMortemTitleRequest" }, "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "title": "Production API latency incident" } } } } } }, - "/safari/skill/upload": { + "/incident/post-mortem/follow-ups/reset": { "post": { - "operationId": "skill-write-upload", - "summary": "Upload skill", - "description": "Upload a skill archive (.skill/.zip/.tar.gz/.tgz) to create or replace a skill.", + "operationId": "postmortem-write-reset-follow-ups", + "summary": "Update post-mortem follow-ups", + "description": "Replace the follow-up action items on a post-mortem report.", "tags": [ - "AI SRE/Skills" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **30 requests/minute**; **3 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Send as `multipart/form-data` with a `file` part. Max archive size is 100MB.\n- Set `replace=true` to overwrite an existing same-name skill.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/skills/skill-write-upload", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/incidents/postmortem-write-reset-follow-ups", "metadata": { - "sidebarTitle": "Upload skill" + "sidebarTitle": "Update post-mortem follow-ups" } }, "responses": { @@ -21343,13 +21652,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SkillItem" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -21357,31 +21666,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", - "account_id": 10023, - "team_id": 0, - "skill_name": "k8s-triage", - "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", - "version": "1.2.0", - "tags": [ - "kubernetes", - "triage" - ], - "author": "sre-team", - "tools": [ - "bash", - "mcp:prometheus/query" - ], - "status": "enabled", - "created_by": 80011, - "created_at": 1716960000000, - "updated_at": 1717046400000, - "can_edit": true, - "update_available": false, - "is_modified": false, - "created": true - } + "data": {} } } } @@ -21392,9 +21677,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21405,37 +21687,32 @@ "requestBody": { "required": true, "content": { - "multipart/form-data": { + "application/json": { "schema": { - "$ref": "#/components/schemas/SkillUploadRequest" + "$ref": "#/components/schemas/ResetPostMortemFollowUpsRequest" }, "example": { - "team_id": 0, - "replace": false + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "follow_ups": "- Add database saturation alert\n- Review cache TTL rollout" } } } } } }, - "/safari/skill/enable": { + "/incident/post-mortem/template/upsert": { "post": { - "operationId": "skill-read-enable", - "summary": "Enable skill", - "description": "Enable a disabled skill so the agent can load it.", + "operationId": "postmortem-write-upsert-template", + "summary": "Create or update post-mortem template", + "description": "Create a custom post-mortem template or update an existing one.", "tags": [ - "AI SRE/Skills" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Only a `disabled` skill can be enabled; otherwise returns InvalidParameter.\n", - "href": "/en/api-reference/ai-sre/skills/skill-read-enable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/incidents/postmortem-write-upsert-template", "metadata": { - "sidebarTitle": "Enable skill" + "sidebarTitle": "Create or update post-mortem template" } }, "responses": { @@ -21446,14 +21723,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "type": "null", - "description": "Always null on success." + "$ref": "#/components/schemas/PostMortemTemplate" } } } @@ -21461,7 +21737,17 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": { + "account_id": 2451002751131, + "template_id": "post_mortem_default_tmpl_en-us", + "name": "Default post-mortem report", + "description": "Default sections for post-mortem reports.", + "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", + "content_markdown": "## Summary\nDescribe what happened.", + "team_id": 2477033058131, + "created_at_seconds": 1773900000, + "updated_at_seconds": 1773903600 + } } } } @@ -21472,9 +21758,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21487,34 +21770,33 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillStatusRequest" + "$ref": "#/components/schemas/UpsertPostMortemTemplateRequest" }, "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + "team_id": 2477033058131, + "name": "Production incident template", + "description": "Template for production incident reviews.", + "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", + "content_markdown": "## Summary\nDescribe what happened." } } } } } }, - "/safari/skill/disable": { + "/incident/post-mortem/template/delete": { "post": { - "operationId": "skill-write-disable", - "summary": "Disable skill", - "description": "Disable an enabled skill so the agent stops loading it.", + "operationId": "postmortem-write-delete-template", + "summary": "Delete post-mortem template", + "description": "Delete a custom post-mortem template.", "tags": [ - "AI SRE/Skills" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Only an `enabled` skill can be disabled; otherwise returns InvalidParameter.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/skills/skill-write-disable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/incidents/postmortem-write-delete-template", "metadata": { - "sidebarTitle": "Disable skill" + "sidebarTitle": "Delete post-mortem template" } }, "responses": { @@ -21525,14 +21807,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "type": "null", - "description": "Always null on success." + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -21540,7 +21821,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -21551,9 +21832,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21566,34 +21844,29 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillStatusRequest" + "$ref": "#/components/schemas/DeletePostMortemTemplateRequest" }, "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + "template_id": "post_mortem_custom_tmpl_01" } } } } } }, - "/safari/mcp/server/list": { + "/incident/post-mortem/template/list": { "post": { - "operationId": "mcp-read-server-list", - "summary": "List MCP servers", - "description": "List MCP servers visible to the caller across account and team scopes, with pagination.", + "operationId": "postmortem-read-list-templates", + "summary": "List post-mortem templates", + "description": "Return built-in and custom post-mortem templates for the account.", "tags": [ - "AI SRE/MCP servers" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The live tool list is not included; fetch a single server to probe its tools.\n", - "href": "/en/api-reference/ai-sre/mcp-servers/mcp-read-server-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/postmortem-read-list-templates", "metadata": { - "sidebarTitle": "List MCP servers" + "sidebarTitle": "List post-mortem templates" } }, "responses": { @@ -21604,13 +21877,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/MCPServerListResponse" + "$ref": "#/components/schemas/ListPostMortemTemplatesResponse" } } } @@ -21619,35 +21892,19 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "total": 1, - "servers": [ + "total": 2, + "has_next_page": false, + "items": [ { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", - "account_id": 10023, - "team_id": 0, - "can_edit": true, - "server_name": "prometheus", - "description": "Query Prometheus metrics and alerts.", - "transport": "streamable-http", - "url": "https://mcp.example.com/prometheus", - "status": "enabled", - "connect_timeout": 10, - "call_timeout": 60, - "tool_count": 2, - "tools": [ - { - "name": "query", - "description": "Run a PromQL instant query." - }, - { - "name": "query_range", - "description": "Run a PromQL range query." - } - ], - "auth_mode": "shared", - "created_by": 80011, - "created_at": 1716960000000, - "updated_at": 1717046400000 + "account_id": 2451002751131, + "template_id": "post_mortem_default_tmpl_en-us", + "name": "Default post-mortem report", + "description": "Default sections for post-mortem reports.", + "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", + "content_markdown": "## Summary\nDescribe what happened.", + "team_id": 2477033058131, + "created_at_seconds": 1773900000, + "updated_at_seconds": 1773903600 } ] } @@ -21673,36 +21930,32 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServerListRequest" + "$ref": "#/components/schemas/ListPostMortemTemplatesRequest" }, "example": { "p": 1, "limit": 20, - "include_account": true + "order_by": "created_at_seconds", + "asc": false } } } } } }, - "/safari/mcp/server/create": { - "post": { - "operationId": "mcp-write-server-create", - "summary": "Create MCP server", - "description": "Register a new MCP server (connector) on the account.", + "/incident/post-mortem/template/info": { + "get": { + "operationId": "postmortem-read-template-info", + "summary": "Get post-mortem template detail", + "description": "Return one post-mortem template by ID.", "tags": [ - "AI SRE/MCP servers" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- `command`/`args`/`env` apply to `stdio`; `url`/`headers` apply to `sse`/`streamable-http`.\n- Server name must be unique within the account; duplicates return InvalidParameter.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/postmortem-read-template-info", "metadata": { - "sidebarTitle": "Create MCP server" + "sidebarTitle": "Get post-mortem template detail" } }, "responses": { @@ -21713,13 +21966,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/MCPServerItem" + "$ref": "#/components/schemas/PostMortemTemplate" } } } @@ -21728,32 +21981,15 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", - "account_id": 10023, - "team_id": 0, - "can_edit": true, - "server_name": "prometheus", - "description": "Query Prometheus metrics and alerts.", - "transport": "streamable-http", - "url": "https://mcp.example.com/prometheus", - "status": "enabled", - "connect_timeout": 10, - "call_timeout": 60, - "tool_count": 2, - "tools": [ - { - "name": "query", - "description": "Run a PromQL instant query." - }, - { - "name": "query_range", - "description": "Run a PromQL range query." - } - ], - "auth_mode": "shared", - "created_by": 80011, - "created_at": 1716960000000, - "updated_at": 1717046400000 + "account_id": 2451002751131, + "template_id": "post_mortem_default_tmpl_en-us", + "name": "Default post-mortem report", + "description": "Default sections for post-mortem reports.", + "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", + "content_markdown": "## Summary\nDescribe what happened.", + "team_id": 2477033058131, + "created_at_seconds": 1773900000, + "updated_at_seconds": 1773903600 } } } @@ -21765,9 +22001,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21775,43 +22008,32 @@ "$ref": "#/components/responses/ServerError" } }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MCPServerCreateRequest" - }, - "example": { - "server_name": "prometheus", - "description": "Query Prometheus metrics and alerts.", - "transport": "streamable-http", - "url": "https://mcp.example.com/prometheus", - "status": "enabled" - } - } + "parameters": [ + { + "name": "template_id", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "description": "Template ID." } - } + ] } }, - "/safari/mcp/server/get": { + "/monit/preview/sync": { "post": { - "operationId": "mcp-read-server-get", - "summary": "Get MCP server detail", - "description": "Get one MCP server and run a live probe of its tool list.", + "operationId": "monit-preview-sync", + "summary": "Preview datasource query", + "description": "Execute a synchronous datasource query and return the raw result. Used to preview alert rule expressions before saving.", "tags": [ - "AI SRE/MCP servers" - ], - "security": [ - { - "AppKeyAuth": [] - } + "Monitors/Monitor utilities" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The detail call live-probes tools; on failure `list_error` is set and the request still succeeds.\n", - "href": "/en/api-reference/ai-sre/mcp-servers/mcp-read-server-get", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **60 requests/minute**; **10 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `ds_type` must match the datasource type (e.g. `prometheus`, `loki`).\n- `ds_name` is the display name of the datasource as configured in the account.\n- `delay_seconds` shifts the query window backward by the specified number of seconds, useful for accommodating data ingestion latency.\n- The response body is the raw JSON returned by the datasource — its schema varies by datasource type.", + "href": "/en/api-reference/monitors/monitor-utilities/monit-preview-sync", "metadata": { - "sidebarTitle": "Get MCP server detail" + "sidebarTitle": "Preview datasource query" } }, "responses": { @@ -21822,13 +22044,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/MCPServerItem" + "$ref": "#/components/schemas/PreviewSyncResponse" } } } @@ -21837,32 +22059,11 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", - "account_id": 10023, - "team_id": 0, - "can_edit": true, - "server_name": "prometheus", - "description": "Query Prometheus metrics and alerts.", - "transport": "streamable-http", - "url": "https://mcp.example.com/prometheus", - "status": "enabled", - "connect_timeout": 10, - "call_timeout": 60, - "tool_count": 2, - "tools": [ - { - "name": "query", - "description": "Run a PromQL instant query." - }, - { - "name": "query_range", - "description": "Run a PromQL range query." - } - ], - "auth_mode": "shared", - "created_by": 80011, - "created_at": 1716960000000, - "updated_at": 1717046400000 + "status": "success", + "data": { + "resultType": "vector", + "result": [] + } } } } @@ -21886,34 +22087,32 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServerGetRequest" + "$ref": "#/components/schemas/PreviewSyncRequest" }, "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" + "ds_type": "prometheus", + "ds_name": "Prometheus Prod", + "expr": "rate(http_requests_total[5m])", + "delay_seconds": 0 } } } } } }, - "/safari/mcp/server/update": { - "post": { - "operationId": "mcp-write-server-update", - "summary": "Update MCP server", - "description": "Update an MCP server's configuration. Omit a field to leave it unchanged.", + "/status-page/info": { + "get": { + "operationId": "statusPageInfo", + "summary": "Get status page detail", + "description": "Retrieve detailed configuration for a specific status page.", "tags": [ - "AI SRE/MCP servers" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- Masked secret values in `env`/`headers` are preserved — sending the masked value back does not overwrite the stored secret.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/status-pages/status-page-info", "metadata": { - "sidebarTitle": "Update MCP server" + "sidebarTitle": "Get status page detail" } }, "responses": { @@ -21924,13 +22123,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/MCPServerItem" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -21939,32 +22138,48 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", - "account_id": 10023, - "team_id": 0, - "can_edit": true, - "server_name": "prometheus", - "description": "Query Prometheus metrics, alerts, and rules.", - "transport": "streamable-http", - "url": "https://mcp.example.com/prometheus", - "status": "enabled", - "connect_timeout": 10, - "call_timeout": 60, - "tool_count": 2, - "tools": [ + "page_id": 5750613685214, + "name": "Flashduty Status Page", + "url_name": "flashduty-statuspage", + "type": "public", + "custom_domain": "status.example.com", + "logo": "https://cdn.example.com/logo.png", + "favicon": "https://cdn.example.com/favicon.png", + "page_header": "Welcome to our status page", + "page_footer": "2025 Example Corp", + "date_view": "list", + "display_uptime_mode": "chart_and_percentage", + "custom_links": [ { - "name": "query", - "description": "Run a PromQL instant query." - }, + "key": "Documentation", + "value": "https://docs.example.com" + } + ], + "contact_info": "mailto:support@example.com", + "components": [ { - "name": "query_range", - "description": "Run a PromQL range query." + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", + "name": "Web Console", + "available_since_seconds": 1765349358, + "order_id": 1 } ], - "auth_mode": "shared", - "created_by": 80011, - "created_at": 1716960000000, - "updated_at": 1717046400000 + "sections": [ + { + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", + "name": "Core Services", + "description": "Our core services", + "order_id": 1, + "hide_uptime": false, + "hide_all": false + } + ], + "subscription": { + "email": true, + "im": false + }, + "template_preference": "message" } } } @@ -21976,9 +22191,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21986,40 +22198,32 @@ "$ref": "#/components/responses/ServerError" } }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MCPServerUpdateRequest" - }, - "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", - "description": "Query Prometheus metrics, alerts, and rules." - } - } + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "description": "Status page ID" } - } + ] } }, - "/safari/mcp/server/delete": { + "/status-page/create": { "post": { - "operationId": "mcp-write-server-delete", - "summary": "Delete MCP server", - "description": "Delete an MCP server by ID.", + "operationId": "statusPageCreate", + "summary": "Create status page", + "description": "Create a new status page.", "tags": [ - "AI SRE/MCP servers" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-create", "metadata": { - "sidebarTitle": "Delete MCP server" + "sidebarTitle": "Create status page" } }, "responses": { @@ -22030,14 +22234,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "type": "null", - "description": "Always null on success." + "$ref": "#/components/schemas/CreateStatusPageResponse" } } } @@ -22045,7 +22248,11 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": { + "page_id": 6294565612043, + "page_name": "My Status Page", + "page_url_name": "my-status-page" + } } } } @@ -22056,9 +22263,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22071,34 +22275,33 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServerDeleteRequest" + "$ref": "#/components/schemas/CreateStatusPageRequest" }, "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" + "name": "My Status Page", + "url_name": "my-status-page", + "type": "public", + "page_header": "Welcome to our status page", + "contact_info": "mailto:support@example.com" } } } } } }, - "/safari/mcp/server/enable": { + "/status-page/update": { "post": { - "operationId": "mcp-write-server-enable", - "summary": "Enable MCP server", - "description": "Enable a disabled MCP server.", + "operationId": "statusPageUpdate", + "summary": "Update status page", + "description": "Update an existing status page configuration.", "tags": [ - "AI SRE/MCP servers" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-enable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-update", "metadata": { - "sidebarTitle": "Enable MCP server" + "sidebarTitle": "Update status page" } }, "responses": { @@ -22109,14 +22312,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "type": "null", - "description": "Always null on success." + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -22124,7 +22326,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -22135,9 +22337,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22150,34 +22349,32 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServerStatusRequest" + "$ref": "#/components/schemas/EmptyRequest" }, "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" + "page_id": 5750613685214, + "name": "Flashduty Status Page (Updated)", + "page_header": "Updated status page header", + "contact_info": "mailto:support@example.com" } } } } } }, - "/safari/mcp/server/disable": { + "/status-page/delete": { "post": { - "operationId": "mcp-write-server-disable", - "summary": "Disable MCP server", - "description": "Disable an enabled MCP server.", + "operationId": "statusPageDelete", + "summary": "Delete status page", + "description": "Delete a status page.", "tags": [ - "AI SRE/MCP servers" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-disable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-delete", "metadata": { - "sidebarTitle": "Disable MCP server" + "sidebarTitle": "Delete status page" } }, "responses": { @@ -22188,14 +22385,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "type": "null", - "description": "Always null on success." + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -22203,7 +22399,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -22214,9 +22410,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22229,34 +22422,29 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServerStatusRequest" + "$ref": "#/components/schemas/EmptyRequest" }, "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" + "page_id": 5750613685214 } } } } } }, - "/safari/a2a-agent/create": { + "/status-page/component/upsert": { "post": { - "operationId": "remote-agent-write-create", - "summary": "Create A2A agent", - "description": "Register a new A2A remote agent from its agent-card URL.", + "operationId": "statusPageComponentUpsert", + "summary": "Upsert status page component", + "description": "Create or update a service component on a status page.", "tags": [ - "AI SRE/A2A agents" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- `card_url` must resolve to a valid agent card; an unreachable or invalid card returns InvalidParameter.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-component-upsert", "metadata": { - "sidebarTitle": "Create A2A agent" + "sidebarTitle": "Upsert status page component" } }, "responses": { @@ -22267,13 +22455,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/A2AAgentCreateResponse" + "$ref": "#/components/schemas/UpsertStatusPageComponentResponse" } } } @@ -22282,7 +22470,9 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" + "component_ids": [ + "01KP032KMN9YFBMPWANJMFZFG1" + ] } } } @@ -22294,9 +22484,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22309,38 +22496,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentCreateRequest" + "$ref": "#/components/schemas/UpsertStatusPageComponentRequest" }, "example": { - "agent_name": "deploy-bot", - "card_url": "https://agents.example.com/deploy-bot/card", - "auth_type": "bearer", - "streaming": true, - "team_id": 0 + "page_id": 5750613685214, + "components": [ + { + "name": "Web Console", + "description": "Main web interface", + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", + "order_id": 1 + } + ] } } } } } }, - "/safari/a2a-agent/list": { + "/status-page/component/delete": { "post": { - "operationId": "remote-agent-read-list", - "summary": "List A2A agents", - "description": "List A2A agents visible to the caller across account and team scopes, with pagination.", + "operationId": "statusPageComponentDelete", + "summary": "Delete status page component", + "description": "Delete a service component from a status page.", "tags": [ - "AI SRE/A2A agents" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Pagination uses `offset`/`limit` (not `p`/`limit`).\n", - "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-component-delete", "metadata": { - "sidebarTitle": "List A2A agents" + "sidebarTitle": "Delete status page component" } }, "responses": { @@ -22351,13 +22537,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/A2AAgentListResponse" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -22365,34 +22551,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "items": [ - { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", - "account_id": 10023, - "team_id": 0, - "can_edit": true, - "agent_name": "deploy-bot", - "description": "Remote agent that inspects deployment pipelines.", - "card_url": "https://agents.example.com/deploy-bot/card", - "auth_type": "bearer", - "streaming": true, - "status": "enabled", - "agent_card_name": "Deploy Bot", - "agent_card_skills": [ - "rollback", - "diff" - ], - "card_resolve_timeout": 10, - "task_timeout": 120, - "auth_mode": "shared", - "created_by": 80011, - "created_at": 1716960000000, - "updated_at": 1717046400000 - } - ], - "total": 1 - } + "data": {} } } } @@ -22415,36 +22574,32 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentListRequest" + "$ref": "#/components/schemas/DeleteStatusPageComponentRequest" }, "example": { - "offset": 0, - "limit": 20, - "include_account": true + "page_id": 5750613685214, + "component_ids": [ + "01KP032KMN9YFBMPWANJMFZFG1" + ] } } } } } }, - "/safari/a2a-agent/get": { + "/status-page/section/upsert": { "post": { - "operationId": "remote-agent-read-get", - "summary": "Get A2A agent detail", - "description": "Get one A2A agent by ID.", + "operationId": "statusPageSectionUpsert", + "summary": "Upsert status page section", + "description": "Create or update a section on a status page.", "tags": [ - "AI SRE/A2A agents" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n", - "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-read-get", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-section-upsert", "metadata": { - "sidebarTitle": "Get A2A agent detail" + "sidebarTitle": "Upsert status page section" } }, "responses": { @@ -22455,13 +22610,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/A2AAgentItem" + "$ref": "#/components/schemas/UpsertStatusPageSectionResponse" } } } @@ -22470,27 +22625,9 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", - "account_id": 10023, - "team_id": 0, - "can_edit": true, - "agent_name": "deploy-bot", - "description": "Remote agent that inspects deployment pipelines.", - "card_url": "https://agents.example.com/deploy-bot/card", - "auth_type": "bearer", - "streaming": true, - "status": "enabled", - "agent_card_name": "Deploy Bot", - "agent_card_skills": [ - "rollback", - "diff" - ], - "card_resolve_timeout": 10, - "task_timeout": 120, - "auth_mode": "shared", - "created_by": 80011, - "created_at": 1716960000000, - "updated_at": 1717046400000 + "section_ids": [ + "01KP032J1FV2H8DDGN0QSJ1CAR" + ] } } } @@ -22514,34 +22651,36 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentIDRequest" + "$ref": "#/components/schemas/UpsertStatusPageSectionRequest" }, "example": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" + "page_id": 5750613685214, + "sections": [ + { + "name": "Core Services", + "description": "Our core services", + "order_id": 1 + } + ] } } } } } }, - "/safari/a2a-agent/update": { + "/status-page/section/delete": { "post": { - "operationId": "remote-agent-write-update", - "summary": "Update A2A agent", - "description": "Apply a partial update to an A2A agent. Omit a field to leave it unchanged.", + "operationId": "statusPageSectionDelete", + "summary": "Delete status page section", + "description": "Delete a section from a status page.", "tags": [ - "AI SRE/A2A agents" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-section-delete", "metadata": { - "sidebarTitle": "Update A2A agent" + "sidebarTitle": "Delete status page section" } }, "responses": { @@ -22552,14 +22691,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "type": "null", - "description": "Always null on success." + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -22567,7 +22705,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -22578,9 +22716,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22593,35 +22728,32 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentUpdateRequest" + "$ref": "#/components/schemas/DeleteStatusPageSectionRequest" }, "example": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", - "description": "Inspects deployment pipelines and proposes rollbacks." + "page_id": 5750613685214, + "section_ids": [ + "01KP032J1FV2H8DDGN0QSJ1CAR" + ] } } } } } }, - "/safari/a2a-agent/enable": { + "/status-page/template/upsert": { "post": { - "operationId": "remote-agent-write-enable", - "summary": "Enable A2A agent", - "description": "Enable a disabled A2A agent.", + "operationId": "statusPageTemplateUpsert", + "summary": "Upsert status page template", + "description": "Create or update an event template for a status page.", "tags": [ - "AI SRE/A2A agents" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-enable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-template-upsert", "metadata": { - "sidebarTitle": "Enable A2A agent" + "sidebarTitle": "Upsert status page template" } }, "responses": { @@ -22632,14 +22764,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "type": "null", - "description": "Always null on success." + "$ref": "#/components/schemas/UpsertStatusPageTemplateResponse" } } } @@ -22647,7 +22778,9 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": { + "template_id": "01KP0339G5XDEPM4R86T2B23EP" + } } } } @@ -22658,9 +22791,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22673,34 +22803,36 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentIDRequest" + "$ref": "#/components/schemas/UpsertStatusPageTemplateRequest" }, "example": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" + "page_id": 5720156736380, + "type": "pre_defined", + "template": { + "title": "Service Disruption", + "event_type": "incident", + "status": "investigating", + "description": "We are investigating a service disruption affecting some users." + } } } } } } }, - "/safari/a2a-agent/disable": { + "/status-page/template/delete": { "post": { - "operationId": "remote-agent-write-disable", - "summary": "Disable A2A agent", - "description": "Disable an enabled A2A agent.", + "operationId": "statusPageTemplateDelete", + "summary": "Delete status page template", + "description": "Delete an event template from a status page.", "tags": [ - "AI SRE/A2A agents" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-disable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-template-delete", "metadata": { - "sidebarTitle": "Disable A2A agent" + "sidebarTitle": "Delete status page template" } }, "responses": { @@ -22711,14 +22843,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "type": "null", - "description": "Always null on success." + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -22726,7 +22857,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -22737,9 +22868,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22752,34 +22880,31 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentIDRequest" + "$ref": "#/components/schemas/DeleteStatusPageTemplateRequest" }, "example": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" + "page_id": 5720156736380, + "type": "pre_defined", + "template_id": "01KP0339G5XDEPM4R86T2B23EP" } } } } } }, - "/safari/a2a-agent/delete": { - "post": { - "operationId": "remote-agent-write-delete", - "summary": "Delete A2A agent", - "description": "Soft-delete an A2A agent by ID.", + "/status-page/template/list": { + "get": { + "operationId": "statusPageTemplateList", + "summary": "List status page templates", + "description": "List all event templates for a status page.", "tags": [ - "AI SRE/A2A agents" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/status-pages/status-page-template-list", "metadata": { - "sidebarTitle": "Delete A2A agent" + "sidebarTitle": "List status page templates" } }, "responses": { @@ -22790,14 +22915,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "type": "null", - "description": "Always null on success." + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -22805,7 +22929,17 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": { + "items": [ + { + "template_id": "01KC8KP6PHVPSCAB0BTKZBN2HR", + "title": "Service Disruption", + "type": "incident", + "status": "identified", + "description": "We have identified the root cause." + } + ] + } } } } @@ -22816,9 +22950,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22826,28 +22957,40 @@ "$ref": "#/components/responses/ServerError" } }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/A2AAgentIDRequest" - }, - "example": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" - } - } + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Status page ID." + }, + { + "name": "type", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "pre_defined", + "message" + ] + }, + "description": "Template category. `pre_defined` returns predefined event templates; `message` returns message notification templates." } - } + ] } }, - "/safari/session/list": { + "/safari/a2a-agent/create": { "post": { - "operationId": "session-read-list", - "summary": "List sessions", - "description": "List agent sessions visible to the caller, filtered by app, surface, archive status, and team.", + "operationId": "remote-agent-write-create", + "summary": "Create A2A agent", + "description": "Register a new A2A remote agent from its agent-card URL.", "tags": [ - "AI SRE/Sessions" + "AI SRE/A2A agents" ], "security": [ { @@ -22855,10 +22998,10 @@ } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Pagination uses `p`/`limit` (max 100); `scope` defaults to `all` (own + member-of-team rows).\n- `is_running` reflects the live run-set; `has_unread` is computed per calling user.\n", - "href": "/en/api-reference/ai-sre/sessions/session-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- `instructions` is required; a deprecated `description` field is still accepted for legacy clients and, if both are sent, must exactly match `instructions`.\n- `card_url` must be an absolute `http`/`https` URL with a non-empty host (reachability is enforced by the execution environment, not here); `auth_type` accepts only `none`, `api_key`, or `bearer`.\n- `environment_kind` accepts only empty (automatic) or `byoc`; `cloud` is rejected. `byoc` requires `environment_id`, and the runner must be visible to the caller.\n- Creating into a team (`team_id > 0`) requires the caller to actually belong to that team; only the account owner/admin may create at account scope (`team_id=0`).\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-create", "metadata": { - "sidebarTitle": "List sessions" + "sidebarTitle": "Create A2A agent" } }, "responses": { @@ -22875,7 +23018,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SessionListResponse" + "$ref": "#/components/schemas/A2AAgentCreateResponse" } } } @@ -22884,36 +23027,7 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "total": 988, - "sessions": [ - { - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", - "session_name": "Investigate cloud-assistant first heartbeat", - "app_name": "ai-sre", - "entry_kind": "web", - "person_id": "3790925372131", - "team_id": 0, - "is_mine": false, - "can_manage": true, - "status": "enabled", - "incognito": false, - "created_at": 1780367971228, - "updated_at": 1780367993457, - "token_usage": { - "input_tokens": 14948, - "cached_tokens": 11520, - "output_tokens": 888, - "reasoning_tokens": 351 - }, - "current_context_tokens": 14948, - "context_window": 0, - "archived_at": 0, - "pinned_at": 0, - "last_event_at": 1780367992649, - "is_running": false, - "has_unread": true - } - ] + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" } } } @@ -22925,6 +23039,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22937,26 +23054,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SessionListRequest" + "$ref": "#/components/schemas/A2AAgentCreateRequest" }, "example": { - "app_name": "ai-sre", - "limit": 2, - "orderby": "updated_at", - "scope": "all" + "agent_name": "deploy-bot", + "instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.", + "card_url": "https://agents.example.com/deploy-bot/card", + "auth_type": "bearer", + "streaming": true, + "team_id": 0, + "environment_kind": "byoc", + "environment_id": "env_8s7Hn2kLpQ3xYbVc4Wd2m" } } } } } }, - "/safari/session/get": { + "/safari/a2a-agent/delete": { "post": { - "operationId": "session-read-info", - "summary": "Get session detail", - "description": "Fetch one session plus a backward-paged window of its most recent events.", + "operationId": "remote-agent-write-delete", + "summary": "Delete A2A agent", + "description": "Soft-delete an A2A agent by ID.", "tags": [ - "AI SRE/Sessions" + "AI SRE/A2A agents" ], "security": [ { @@ -22964,10 +23085,10 @@ } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Page older history with `search_after_ctx` from the previous response.\n- `limit` (or legacy `num_recent_events`) caps the event page; default 100, max 1000.\n", - "href": "/en/api-reference/ai-sre/sessions/session-read-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- Delete is a soft delete; the agent stops appearing in list/get and can no longer be dispatched once removed.\n- Requires edit permission (`access.CanEdit`) on the agent's team.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-delete", "metadata": { - "sidebarTitle": "Get session detail" + "sidebarTitle": "Delete A2A agent" } }, "responses": { @@ -22984,7 +23105,8 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SessionGetResponse" + "type": "null", + "description": "Always null on success." } } } @@ -22992,64 +23114,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "session": { - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", - "session_name": "Investigate cloud-assistant first heartbeat", - "app_name": "ai-sre", - "entry_kind": "web", - "person_id": "3790925372131", - "team_id": 0, - "is_mine": false, - "can_manage": true, - "status": "enabled", - "incognito": false, - "created_at": 1780367971228, - "updated_at": 1780367993457, - "token_usage": { - "input_tokens": 14948, - "cached_tokens": 11520, - "output_tokens": 888, - "reasoning_tokens": 351 - }, - "current_context_tokens": 14948, - "context_window": 0, - "archived_at": 0, - "pinned_at": 0, - "last_event_at": 1780367992649, - "is_running": false, - "has_unread": true - }, - "events": [ - { - "event_id": "evt_3aZQ9p", - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", - "author": "user", - "partial": false, - "turn_complete": false, - "status": "normal", - "created_at": 1780367971241 - }, - { - "event_id": "evt_7bWk2r", - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", - "author": "ai-sre", - "content": { - "role": "model", - "parts": [ - { - "text": "..." - } - ] - }, - "partial": false, - "turn_complete": true, - "status": "normal", - "created_at": 1780367992649 - } - ], - "has_more_older": false - } + "data": null } } } @@ -23060,6 +23125,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23072,24 +23140,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SessionGetRequest" + "$ref": "#/components/schemas/A2AAgentIDRequest" }, "example": { - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", - "num_recent_events": 50 + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" } } } } } }, - "/safari/session/export": { + "/safari/a2a-agent/disable": { "post": { - "operationId": "session-read-export", - "summary": "Export session transcript", - "description": "Stream a session's full event transcript as newline-delimited JSON.", + "operationId": "remote-agent-write-disable", + "summary": "Disable A2A agent", + "description": "Disable an enabled A2A agent.", "tags": [ - "AI SRE/Sessions" + "AI SRE/A2A agents" ], "security": [ { @@ -23097,20 +23164,36 @@ } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The response is `application/x-ndjson` — parse line-by-line and write to a file; do not buffer the whole body in memory.\n- The first line is always a `session_meta` envelope; `include_subagents=true` inlines each child session's stream after its dispatch line.\n", - "href": "/en/api-reference/ai-sre/sessions/session-read-export", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- Requires edit permission (`access.CanEdit`) on the agent's team.\n- Returns `InvalidParameter` if the agent is already disabled.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-disable", "metadata": { - "sidebarTitle": "Export session transcript" + "sidebarTitle": "Disable A2A agent" } }, "responses": { "200": { - "description": "Streaming NDJSON (application/x-ndjson). One JSON object per line, terminated by a newline. The first line is always a `session_meta` envelope; subsequent lines are session events.", + "description": "Success", "content": { - "application/x-ndjson": { + "application/json": { "schema": { - "type": "string", - "description": "Newline-delimited JSON stream. Parse line-by-line; do not buffer the whole body." + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "type": "null", + "description": "Always null on success." + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": null } } } @@ -23121,6 +23204,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23133,24 +23219,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SessionExportRequest" + "$ref": "#/components/schemas/A2AAgentIDRequest" }, "example": { - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", - "include_subagents": false + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" } } } } } }, - "/safari/session/delete": { + "/safari/a2a-agent/enable": { "post": { - "operationId": "session-write-delete", - "summary": "Delete session", - "description": "Delete a session by ID.", + "operationId": "remote-agent-write-enable", + "summary": "Enable A2A agent", + "description": "Enable a disabled A2A agent.", "tags": [ - "AI SRE/Sessions" + "AI SRE/A2A agents" ], "security": [ { @@ -23158,10 +23243,10 @@ } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Requires manage rights on the session (creator, account admin, or owning-team member).\n", - "href": "/en/api-reference/ai-sre/sessions/session-write-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- Requires edit permission (`access.CanEdit`) on the agent's team, not just visibility into it.\n- Returns `InvalidParameter` if the agent is already enabled.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-enable", "metadata": { - "sidebarTitle": "Delete session" + "sidebarTitle": "Enable A2A agent" } }, "responses": { @@ -23198,6 +23283,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23210,29 +23298,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SessionDeleteRequest" + "$ref": "#/components/schemas/A2AAgentIDRequest" }, "example": { - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" } } } } } }, - "/datasource/im/person/try-link": { + "/safari/a2a-agent/get": { "post": { - "operationId": "datasourceImPersonTryLink", - "summary": "Attempt IM person linking", - "description": "Try to automatically link unbound members to their IM accounts for one integration.", + "operationId": "remote-agent-read-get", + "summary": "Get A2A agent detail", + "description": "Get one A2A agent by ID.", "tags": [ - "On-call/Integrations" + "AI SRE/A2A agents" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- The server uses member email and phone values to find matching users in DingTalk, Feishu, or WeCom.\n- If no member can be linked, the response contains an empty `new_linked_person_ids` array.", - "href": "/en/api-reference/on-call/integrations/datasource-im-person-try-link", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `card_resolve_timeout` and `task_timeout` are always `0` today — the API does not yet expose a way to set them.\n", + "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-read-get", "metadata": { - "sidebarTitle": "Attempt IM person linking" + "sidebarTitle": "Get A2A agent detail" } }, "responses": { @@ -23243,13 +23336,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/TryLinkPersonResponse" + "$ref": "#/components/schemas/A2AAgentItem" } } } @@ -23258,9 +23351,29 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "new_linked_person_ids": [ - 5348648172131 - ] + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", + "account_id": 10023, + "team_id": 0, + "can_edit": true, + "environment_kind": "", + "environment_id": "", + "agent_name": "deploy-bot", + "instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.", + "card_url": "https://agents.example.com/deploy-bot/card", + "auth_type": "bearer", + "streaming": true, + "status": "enabled", + "agent_card_name": "Deploy Bot", + "agent_card_skills": [ + "rollback", + "diff" + ], + "card_resolve_timeout": 0, + "task_timeout": 0, + "auth_mode": "shared", + "created_by": 80011, + "created_at": 1716960000000, + "updated_at": 1717046400000 } } } @@ -23284,29 +23397,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TryLinkPersonRequest" + "$ref": "#/components/schemas/A2AAgentIDRequest" }, "example": { - "integration_id": 6113996590131 + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" } } } } } }, - "/incident/post-mortem/init": { + "/safari/a2a-agent/list": { "post": { - "operationId": "postmortem-write-init", - "summary": "Initialize post-mortem", - "description": "Create a post-mortem draft from one or more incidents and a template.", + "operationId": "remote-agent-read-list", + "summary": "List A2A agents", + "description": "List A2A agents visible to the caller across account and team scopes, with pagination.", "tags": [ - "On-call/Incidents" + "AI SRE/A2A agents" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Links at most 10 incidents to one post-mortem report.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/incidents/postmortem-write-init", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Pagination uses `offset`/`limit` (not `p`/`limit`).\n- `scope=account` restricts to account-scoped agents; `scope=team` restricts to the caller's visible teams; the default `all` combines both, subject to `include_account`.\n- `query` performs a case-insensitive substring search across agent name, instructions, card URL, agent ID, and the resolved card name.\n- `card_resolve_timeout` and `task_timeout` are always `0` today — the API does not yet expose a way to set them.\n", + "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-read-list", "metadata": { - "sidebarTitle": "Initialize post-mortem" + "sidebarTitle": "List A2A agents" } }, "responses": { @@ -23317,13 +23435,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/PostMortemItem" + "$ref": "#/components/schemas/A2AAgentListResponse" } } } @@ -23332,43 +23450,34 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "meta": { - "account_id": 2451002751131, - "title": "Postmortem1", - "status": "published", - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", - "template_id": "post_mortem_default_tmpl_en-us", - "incident_ids": [ - "69bb9233331067560c718ecd" - ], - "media_count": 0, - "author_ids": [ - 2477273692131 - ], - "team_id": 2477033058131, - "channel_id": 3047621227131, - "is_private": false, - "channel_name": "Ops Channel", - "created_at_seconds": 1773900354, - "updated_at_seconds": 1773909012 - }, - "basics": { - "incidents_highest_severity": "Warning", - "incidents_earliest_start_seconds": 1761133512, - "incidents_latest_close_seconds": 1761133632, - "incidents_total_duration_seconds": 120, - "responders": [ - { - "person_id": 3790925372131, - "assigned_at": 1761133515, - "acknowledged_at": 0 - } - ] - }, - "content": { - "content": "{\"type\":\"doc\",\"content\":[]}" - }, - "follow_ups": "" + "items": [ + { + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", + "account_id": 10023, + "team_id": 0, + "can_edit": true, + "environment_kind": "", + "environment_id": "", + "agent_name": "deploy-bot", + "instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.", + "card_url": "https://agents.example.com/deploy-bot/card", + "auth_type": "bearer", + "streaming": true, + "status": "enabled", + "agent_card_name": "Deploy Bot", + "agent_card_skills": [ + "rollback", + "diff" + ], + "card_resolve_timeout": 0, + "task_timeout": 0, + "auth_mode": "shared", + "created_by": 80011, + "created_at": 1716960000000, + "updated_at": 1717046400000 + } + ], + "total": 1 } } } @@ -23392,32 +23501,36 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InitPostMortemRequest" + "$ref": "#/components/schemas/A2AAgentListRequest" }, "example": { - "incident_ids": [ - "69bb9233331067560c718ecd" - ], - "template_id": "post_mortem_default_tmpl_en-us" + "offset": 0, + "limit": 20, + "include_account": true } } } } } }, - "/incident/post-mortem/basics/reset": { + "/safari/a2a-agent/update": { "post": { - "operationId": "postmortem-write-reset-basics", - "summary": "Update post-mortem basics", - "description": "Replace the incident facts stored in a post-mortem report.", + "operationId": "remote-agent-write-update", + "summary": "Update A2A agent", + "description": "Apply a partial update to an A2A agent. Omit a field to leave it unchanged.", "tags": [ - "On-call/Incidents" + "AI SRE/A2A agents" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/incidents/postmortem-write-reset-basics", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- Requires edit permission (`access.CanEdit`) on the agent's *current* team before any field may change.\n- Reassigning `team_id` requires rights on the destination team; if the team changes without also sending a new environment binding, the existing runner binding must remain selectable by the caller or the update is rejected.\n- Changing `auth_mode` always rewrites `secret_schema` together with it; omitting `oauth_metadata` alongside a new `auth_mode` clears it to empty.\n- Sending back a masked or empty value for a sensitive `auth_config` key (`api_key`, `token`, `client_secret`) keeps the stored secret instead of overwriting it.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-update", "metadata": { - "sidebarTitle": "Update post-mortem basics" + "sidebarTitle": "Update A2A agent" } }, "responses": { @@ -23428,13 +23541,14 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "type": "null", + "description": "Always null on success." } } } @@ -23442,7 +23556,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": null } } } @@ -23453,6 +23567,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23465,36 +23582,35 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResetPostMortemBasicsRequest" + "$ref": "#/components/schemas/A2AAgentUpdateRequest" }, "example": { - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", - "incidents_highest_severity": "Warning", - "incidents_earliest_start_seconds": 1761133512, - "incidents_latest_close_seconds": 1761133632, - "incidents_total_duration_seconds": 120, - "responder_ids": [ - 3790925372131 - ] + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", + "instructions": "Inspect deployment pipelines and propose rollbacks." } } } } } }, - "/incident/post-mortem/status/reset": { + "/safari/automation/rule/create": { "post": { - "operationId": "postmortem-write-reset-status", - "summary": "Update post-mortem status", - "description": "Set a post-mortem report to drafting or published.", + "operationId": "automation-rule-write-create", + "summary": "Create Automation rule", + "description": "Create an Automation rule with schedule, HTTP POST, and On-call incident triggers.", "tags": [ - "On-call/Incidents" + "AI SRE/Automations" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/incidents/postmortem-write-reset-status", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | Valid `app_key`; management operations require the caller to manage the target rule |\n\n## Usage\n\n- A caller may create personal rules and rules for any team in the current account; `team_id` is immutable after creation.\n- `cron_expr` is evaluated in `timezone` if provided, else the caller's member timezone, else the account timezone, else UTC.\n- `http_post_trigger_enabled=true` creates and enables an HTTP POST trigger; the response's `http_post_token` is a one-time value returned only on creation — save it immediately.\n- `oncall_incident_trigger_enabled=true` requires at least one `oncall_incident_channel_ids` entry and one `oncall_incident_severities` value; matching incidents run with `trigger_kind=oncall_incident`.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/automations/automation-rule-write-create", "metadata": { - "sidebarTitle": "Update post-mortem status" + "sidebarTitle": "Create Automation rule" } }, "responses": { @@ -23505,13 +23621,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/AutomationRuleItem" } } } @@ -23519,10 +23635,42 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} - } - } - } + "data": { + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "account_id": 10023, + "team_id": 123, + "owner_id": 80011, + "name": "Weekly on-call review", + "enabled": true, + "run_scope": "team", + "cron_expr": "0 9 * * 1", + "timezone": "Asia/Shanghai", + "prompt": "Summarize last week's alert noise and escalation load.", + "environment_kind": "", + "environment_id": "", + "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z", + "schedule_trigger_enabled": true, + "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y", + "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire", + "http_post_trigger_enabled": true, + "can_edit": true, + "created_at": 1780367971228, + "updated_at": 1780367971228, + "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U", + "schedule_next_fire_at_ms": 1780630800000, + "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p", + "oncall_incident_trigger_enabled": true, + "oncall_incident_channel_ids": [ + 456 + ], + "oncall_incident_severities": [ + "Critical", + "Warning" + ] + } + } + } + } }, "400": { "$ref": "#/components/responses/BadRequest" @@ -23530,6 +23678,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23542,30 +23693,49 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResetPostMortemStatusRequest" + "$ref": "#/components/schemas/AutomationRuleCreateRequest" }, "example": { - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", - "status": "published" + "name": "Weekly on-call review", + "team_id": 123, + "enabled": true, + "cron_expr": "0 9 * * 1", + "timezone": "Asia/Shanghai", + "schedule_trigger_enabled": true, + "prompt": "Summarize last week's alert noise and escalation load.", + "http_post_trigger_enabled": true, + "oncall_incident_trigger_enabled": true, + "oncall_incident_channel_ids": [ + 456 + ], + "oncall_incident_severities": [ + "Critical", + "Warning" + ] } } } } } }, - "/incident/post-mortem/title/reset": { + "/safari/automation/rule/delete": { "post": { - "operationId": "postmortem-write-reset-title", - "summary": "Update post-mortem title", - "description": "Replace the title of a post-mortem report.", + "operationId": "automation-rule-write-delete", + "summary": "Delete Automation rule", + "description": "Delete an Automation rule.", "tags": [ - "On-call/Incidents" + "AI SRE/Automations" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/incidents/postmortem-write-reset-title", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | Valid `app_key`; management operations require the caller to manage the target rule |\n\n## Usage\n\n- Deleting a rule also removes its schedule, HTTP POST, and On-call incident triggers; a deleted HTTP POST trigger's token stops working immediately.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/automations/automation-rule-write-delete", "metadata": { - "sidebarTitle": "Update post-mortem title" + "sidebarTitle": "Delete Automation rule" } }, "responses": { @@ -23576,13 +23746,14 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "type": "null", + "description": "Always null on success." } } } @@ -23590,7 +23761,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": null } } } @@ -23601,6 +23772,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23613,30 +23787,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResetPostMortemTitleRequest" + "$ref": "#/components/schemas/AutomationRuleIDRequest" }, "example": { - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", - "title": "Production API latency incident" + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b" } } } } } }, - "/incident/post-mortem/follow-ups/reset": { + "/safari/automation/rule/get": { "post": { - "operationId": "postmortem-write-reset-follow-ups", - "summary": "Update post-mortem follow-ups", - "description": "Replace the follow-up action items on a post-mortem report.", + "operationId": "automation-rule-read-get", + "summary": "Get Automation rule", + "description": "Get one Automation rule by ID.", "tags": [ - "On-call/Incidents" + "AI SRE/Automations" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/incidents/postmortem-write-reset-follow-ups", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; caller must manage the target rule |\n\n## Usage\n\n- Manage rights mean the personal rule owner; for team rules, an account admin or a member of the rule's team.\n", + "href": "/en/api-reference/ai-sre/automations/automation-rule-read-get", "metadata": { - "sidebarTitle": "Update post-mortem follow-ups" + "sidebarTitle": "Get Automation rule" } }, "responses": { @@ -23647,13 +23825,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/AutomationRuleItem" } } } @@ -23661,7 +23839,39 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": { + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "account_id": 10023, + "team_id": 123, + "owner_id": 80011, + "name": "Weekly on-call review", + "enabled": true, + "run_scope": "team", + "cron_expr": "0 9 * * 1", + "timezone": "Asia/Shanghai", + "prompt": "Summarize last week's alert noise and escalation load.", + "environment_kind": "", + "environment_id": "", + "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z", + "schedule_trigger_enabled": true, + "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y", + "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire", + "http_post_trigger_enabled": true, + "can_edit": true, + "created_at": 1780367971228, + "updated_at": 1780367971228, + "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U", + "schedule_next_fire_at_ms": 1780630800000, + "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p", + "oncall_incident_trigger_enabled": true, + "oncall_incident_channel_ids": [ + 456 + ], + "oncall_incident_severities": [ + "Critical", + "Warning" + ] + } } } } @@ -23672,6 +23882,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23684,30 +23897,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResetPostMortemFollowUpsRequest" + "$ref": "#/components/schemas/AutomationRuleIDRequest" }, "example": { - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", - "follow_ups": "- Add database saturation alert\n- Review cache TTL rollout" + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b" } } } } } }, - "/incident/post-mortem/template/upsert": { + "/safari/automation/rule/list": { "post": { - "operationId": "postmortem-write-upsert-template", - "summary": "Create or update post-mortem template", - "description": "Create a custom post-mortem template or update an existing one.", + "operationId": "automation-rule-read-list", + "summary": "List Automation rules", + "description": "List Automation rules visible to the caller.", "tags": [ - "On-call/Incidents" + "AI SRE/Automations" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/incidents/postmortem-write-upsert-template", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; results are filtered to the caller's visible scope |\n\n## Usage\n\n- `all` returns your personal rules plus team rules you can access.\n- Account admins see all team rules in list results, but not other users' personal rules.\n- `team_ids` narrows the visible set and never expands access.\n", + "href": "/en/api-reference/ai-sre/automations/automation-rule-read-list", "metadata": { - "sidebarTitle": "Create or update post-mortem template" + "sidebarTitle": "List Automation rules" } }, "responses": { @@ -23718,13 +23935,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/PostMortemTemplate" + "$ref": "#/components/schemas/AutomationRuleListResponse" } } } @@ -23733,15 +23950,42 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "account_id": 2451002751131, - "template_id": "post_mortem_default_tmpl_en-us", - "name": "Default post-mortem report", - "description": "Default sections for post-mortem reports.", - "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", - "content_markdown": "## Summary\nDescribe what happened.", - "team_id": 2477033058131, - "created_at_seconds": 1773900000, - "updated_at_seconds": 1773903600 + "total": 1, + "rules": [ + { + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "account_id": 10023, + "team_id": 123, + "owner_id": 80011, + "name": "Weekly on-call review", + "enabled": true, + "run_scope": "team", + "cron_expr": "0 9 * * 1", + "timezone": "Asia/Shanghai", + "prompt": "Summarize last week's alert noise and escalation load.", + "environment_kind": "", + "environment_id": "", + "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z", + "schedule_trigger_enabled": true, + "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y", + "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire", + "http_post_trigger_enabled": true, + "can_edit": true, + "created_at": 1780367971228, + "updated_at": 1780367971228, + "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U", + "schedule_next_fire_at_ms": 1780630800000, + "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p", + "oncall_incident_trigger_enabled": true, + "oncall_incident_channel_ids": [ + 456 + ], + "oncall_incident_severities": [ + "Critical", + "Warning" + ] + } + ] } } } @@ -23753,6 +23997,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23765,33 +24012,35 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpsertPostMortemTemplateRequest" + "$ref": "#/components/schemas/AutomationRuleListRequest" }, "example": { - "team_id": 2477033058131, - "name": "Production incident template", - "description": "Template for production incident reviews.", - "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", - "content_markdown": "## Summary\nDescribe what happened." + "scope": "all", + "limit": 20 } } } } } }, - "/incident/post-mortem/template/delete": { + "/safari/automation/rule/run": { "post": { - "operationId": "postmortem-write-delete-template", - "summary": "Delete post-mortem template", - "description": "Delete a custom post-mortem template.", + "operationId": "automation-rule-write-run", + "summary": "Run Automation rule", + "description": "Manually run an Automation rule immediately, outside its schedule.", "tags": [ - "On-call/Incidents" + "AI SRE/Automations" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/incidents/postmortem-write-delete-template", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/minute**; **5 requests/second** per account |\n| Permissions | Valid `app_key`; caller must manage the target rule |\n\n## Usage\n\n- Rate-limited to at most once per minute per rule; a second call within that window returns `429` with `code: \"RequestTooFrequently\"`.\n- Only enabled rules can run manually; a disabled or misconfigured rule fails preflight with a `400` error before any run is created.\n- The call returns once the underlying agent session starts, not once the run finishes; the run continues asynchronously — use List Automation runs to check completion status.\n- `trigger_kind` is always `manual` for runs started this way, distinguishing them from `schedule`, `http_post`, and `oncall_incident` runs in run history.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/automations/automation-rule-write-run", "metadata": { - "sidebarTitle": "Delete post-mortem template" + "sidebarTitle": "Run Automation rule" } }, "responses": { @@ -23802,13 +24051,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/ManualRunRuleResult" } } } @@ -23816,7 +24065,28 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": { + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "trigger_kind": "manual", + "preflight": { + "ok": true, + "checks": [ + "rule_loaded", + "actor_authorized", + "app_allowed", + "runtime_scope_resolved", + "rule_config_valid" + ], + "scope": "team", + "owner_id": 80011, + "team_id": 123, + "app_name": "ai-sre" + }, + "run": { + "run_id": "trun_5oDvqiG64uur6sBNsTc4u", + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" + } + } } } } @@ -23827,6 +24097,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23839,29 +24112,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeletePostMortemTemplateRequest" + "$ref": "#/components/schemas/AutomationRuleIDRequest" }, "example": { - "template_id": "post_mortem_custom_tmpl_01" + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b" } } } } } }, - "/incident/post-mortem/template/list": { + "/safari/automation/rule/update": { "post": { - "operationId": "postmortem-read-list-templates", - "summary": "List post-mortem templates", - "description": "Return built-in and custom post-mortem templates for the account.", + "operationId": "automation-rule-write-update", + "summary": "Update Automation rule", + "description": "Update mutable Automation rule fields, including HTTP POST and On-call incident trigger settings.", "tags": [ - "On-call/Incidents" + "AI SRE/Automations" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/postmortem-read-list-templates", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | Valid `app_key`; management operations require the caller to manage the target rule |\n\n## Usage\n\n- Omitted or `null` fields are left unchanged; `team_id` cannot be changed from its current value.\n- `cron_expr` and `timezone` can be updated independently — sending only one keeps the other at its current stored value.\n- `rotate_http_post_trigger_token=true` issues a fresh webhook token, returned only in this response.\n- To trigger from On-call incidents, send `oncall_incident_trigger_enabled`, `oncall_incident_channel_ids`, and `oncall_incident_severities`; matching events run with `trigger_kind=oncall_incident`.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/automations/automation-rule-write-update", "metadata": { - "sidebarTitle": "List post-mortem templates" + "sidebarTitle": "Update Automation rule" } }, "responses": { @@ -23872,13 +24150,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ListPostMortemTemplatesResponse" + "$ref": "#/components/schemas/AutomationRuleItem" } } } @@ -23887,20 +24165,36 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "total": 2, - "has_next_page": false, - "items": [ - { - "account_id": 2451002751131, - "template_id": "post_mortem_default_tmpl_en-us", - "name": "Default post-mortem report", - "description": "Default sections for post-mortem reports.", - "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", - "content_markdown": "## Summary\nDescribe what happened.", - "team_id": 2477033058131, - "created_at_seconds": 1773900000, - "updated_at_seconds": 1773903600 - } + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "account_id": 10023, + "team_id": 123, + "owner_id": 80011, + "name": "Weekly on-call review", + "enabled": true, + "run_scope": "team", + "cron_expr": "0 9 * * 1", + "timezone": "Asia/Shanghai", + "prompt": "Summarize last week's alert noise and escalation load.", + "environment_kind": "", + "environment_id": "", + "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z", + "schedule_trigger_enabled": true, + "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y", + "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire", + "http_post_trigger_enabled": true, + "can_edit": true, + "created_at": 1780367971228, + "updated_at": 1780367971228, + "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U", + "schedule_next_fire_at_ms": 1780630800000, + "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p", + "oncall_incident_trigger_enabled": true, + "oncall_incident_channel_ids": [ + 456 + ], + "oncall_incident_severities": [ + "Critical", + "Warning" ] } } @@ -23913,6 +24207,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23925,32 +24222,45 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListPostMortemTemplatesRequest" + "$ref": "#/components/schemas/AutomationRuleUpdateRequest" }, "example": { - "p": 1, - "limit": 20, - "order_by": "created_at_seconds", - "asc": false + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "enabled": true, + "cron_expr": "15 9 * * 1", + "rotate_http_post_trigger_token": true, + "oncall_incident_trigger_enabled": true, + "oncall_incident_severities": [ + "Critical", + "Warning" + ], + "oncall_incident_channel_ids": [ + 456 + ] } } } } } }, - "/incident/post-mortem/template/info": { - "get": { - "operationId": "postmortem-read-template-info", - "summary": "Get post-mortem template detail", - "description": "Return one post-mortem template by ID.", + "/safari/automation/run/list": { + "post": { + "operationId": "automation-run-read-list", + "summary": "List Automation runs", + "description": "List run history for a rule the caller can manage.", "tags": [ - "On-call/Incidents" + "AI SRE/Automations" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/postmortem-read-template-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; caller must manage the target rule |\n\n## Usage\n\n- Run history is visible only when the caller can manage the rule: the personal rule owner; for team rules, an account admin or a member of the rule's team.\n", + "href": "/en/api-reference/ai-sre/automations/automation-run-read-list", "metadata": { - "sidebarTitle": "Get post-mortem template detail" + "sidebarTitle": "List Automation runs" } }, "responses": { @@ -23961,13 +24271,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/PostMortemTemplate" + "$ref": "#/components/schemas/AutomationRunListResponse" } } } @@ -23976,15 +24286,30 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "account_id": 2451002751131, - "template_id": "post_mortem_default_tmpl_en-us", - "name": "Default post-mortem report", - "description": "Default sections for post-mortem reports.", - "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", - "content_markdown": "## Summary\nDescribe what happened.", - "team_id": 2477033058131, - "created_at_seconds": 1773900000, - "updated_at_seconds": 1773903600 + "total": 1, + "runs": [ + { + "run_id": "trun_5oDvqiG64uur6sBNsTc4u", + "kind": "automation_rule", + "account_id": 10023, + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "trigger_kind": "schedule", + "occurrence_key": "atrig_6aKp3wT9mQ2xVc8bR1nY7z:1780630800000", + "status": "succeeded", + "attempts": 1, + "started_at": 1780630800000, + "completed_at": 1780630923456, + "duration_ms": 123456, + "error_code": "", + "error_message": "", + "stats_json": {}, + "result_json": { + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" + }, + "created_at": 1780630800000, + "updated_at": 1780630923456 + } + ] } } } @@ -23996,6 +24321,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24003,32 +24331,41 @@ "$ref": "#/components/responses/ServerError" } }, - "parameters": [ - { - "name": "template_id", - "in": "query", - "required": true, - "schema": { - "type": "string" - }, - "description": "Template ID." + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationRunListRequest" + }, + "example": { + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "limit": 20, + "trigger_kind": "schedule" + } + } } - ] + } } }, - "/monit/preview/sync": { + "/safari/automation/template/list": { "post": { - "operationId": "monit-preview-sync", - "summary": "Preview datasource query", - "description": "Execute a synchronous datasource query and return the raw result. Used to preview alert rule expressions before saving.", + "operationId": "automation-template-read-list", + "summary": "List Automation templates", + "description": "List preset Automation templates for the requested locale.", "tags": [ - "Monitors/Monitor utilities" + "AI SRE/Automations" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **60 requests/minute**; **10 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `ds_type` must match the datasource type (e.g. `prometheus`, `loki`).\n- `ds_name` is the display name of the datasource as configured in the account.\n- `delay_seconds` shifts the query window backward by the specified number of seconds, useful for accommodating data ingestion latency.\n- The response body is the raw JSON returned by the datasource — its schema varies by datasource type.", - "href": "/en/api-reference/monitors/monitor-utilities/monit-preview-sync", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; results are filtered to the caller's visible scope |\n", + "href": "/en/api-reference/ai-sre/automations/automation-template-read-list", "metadata": { - "sidebarTitle": "Preview datasource query" + "sidebarTitle": "List Automation templates" } }, "responses": { @@ -24039,13 +24376,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/PreviewSyncResponse" + "$ref": "#/components/schemas/AutomationTemplateListResponse" } } } @@ -24054,11 +24391,15 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "status": "success", - "data": { - "resultType": "vector", - "result": [] - } + "templates": [ + { + "name": "Weekly Insights", + "description": "Analyze incidents, alerts, response activity, notification load, and related changes from the past week.", + "icon": "chart-no-axes-combined", + "enabled": false, + "prompt": "Generate a weekly insights report. Analyze incidents, alerts, response activity, notification load, and related changes from the past week. Focus on what happened this week, which signals deserve attention, and which improvement actions are most valuable. Do not modify any Flashduty business state.\n" + } + ] } } } @@ -24070,6 +24411,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24082,32 +24426,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PreviewSyncRequest" + "$ref": "#/components/schemas/AutomationTemplateListRequest" }, "example": { - "ds_type": "prometheus", - "ds_name": "Prometheus Prod", - "expr": "rate(http_requests_total[5m])", - "delay_seconds": 0 + "locale": "en-US" } } } } } }, - "/status-page/info": { - "get": { - "operationId": "statusPageInfo", - "summary": "Get status page detail", - "description": "Retrieve detailed configuration for a specific status page.", + "/safari/mcp/server/create": { + "post": { + "operationId": "mcp-write-server-create", + "summary": "Create MCP server", + "description": "Register a new MCP server (connector) on the account.", "tags": [ - "On-call/Status pages" + "AI SRE/MCP servers" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/status-pages/status-page-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- `command`/`args`/`env` apply to `stdio`; `url`/`headers` apply to `sse`/`streamable-http`.\n- Server name must start with a letter and contain only letters, digits, `-`, or `_`, and is unique within the account (case-insensitive); violations return InvalidParameter.\n- `environment_kind` accepts only `byoc` (with `environment_id`) or empty for automatic selection — `cloud` cannot be bound directly to an MCP server.\n- `per_user_secret` auth mode requires `secret_schema` to be valid JSON with a non-empty `header_name`.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-create", "metadata": { - "sidebarTitle": "Get status page detail" + "sidebarTitle": "Create MCP server" } }, "responses": { @@ -24118,13 +24464,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/MCPServerItem" } } } @@ -24133,48 +24479,34 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "page_id": 5750613685214, - "name": "Flashduty Status Page", - "url_name": "flashduty-statuspage", - "type": "public", - "custom_domain": "status.example.com", - "logo": "https://cdn.example.com/logo.png", - "favicon": "https://cdn.example.com/favicon.png", - "page_header": "Welcome to our status page", - "page_footer": "2025 Example Corp", - "date_view": "list", - "display_uptime_mode": "chart_and_percentage", - "custom_links": [ - { - "key": "Documentation", - "value": "https://docs.example.com" - } - ], - "contact_info": "mailto:support@example.com", - "components": [ + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", + "account_id": 10023, + "team_id": 0, + "can_edit": true, + "environment_kind": "", + "environment_id": "", + "server_name": "prometheus", + "description": "Query Prometheus metrics and alerts.", + "transport": "streamable-http", + "url": "https://mcp.example.com/prometheus", + "status": "enabled", + "connect_timeout": 10, + "call_timeout": 60, + "tool_count": 2, + "tools": [ { - "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", - "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", - "name": "Web Console", - "available_since_seconds": 1765349358, - "order_id": 1 - } - ], - "sections": [ + "name": "query", + "description": "Run a PromQL instant query." + }, { - "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", - "name": "Core Services", - "description": "Our core services", - "order_id": 1, - "hide_uptime": false, - "hide_all": false + "name": "query_range", + "description": "Run a PromQL range query." } ], - "subscription": { - "email": true, - "im": false - }, - "template_preference": "message" + "auth_mode": "shared", + "created_by": 80011, + "created_at": 1716960000000, + "updated_at": 1717046400000 } } } @@ -24186,6 +24518,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24193,32 +24528,43 @@ "$ref": "#/components/responses/ServerError" } }, - "parameters": [ - { - "name": "page_id", - "in": "query", - "required": true, - "schema": { - "type": "string" - }, - "description": "Status page ID" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPServerCreateRequest" + }, + "example": { + "server_name": "prometheus", + "description": "Query Prometheus metrics and alerts.", + "transport": "streamable-http", + "url": "https://mcp.example.com/prometheus", + "status": "enabled" + } + } } - ] + } } }, - "/status-page/create": { + "/safari/mcp/server/delete": { "post": { - "operationId": "statusPageCreate", - "summary": "Create status page", - "description": "Create a new status page.", + "operationId": "mcp-write-server-delete", + "summary": "Delete MCP server", + "description": "Delete an MCP server by ID.", "tags": [ - "On-call/Status pages" + "AI SRE/MCP servers" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-delete", "metadata": { - "sidebarTitle": "Create status page" + "sidebarTitle": "Delete MCP server" } }, "responses": { @@ -24229,13 +24575,14 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CreateStatusPageResponse" + "type": "null", + "description": "Always null on success." } } } @@ -24243,11 +24590,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "page_id": 6294565612043, - "page_name": "My Status Page", - "page_url_name": "my-status-page" - } + "data": null } } } @@ -24258,6 +24601,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24270,33 +24616,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateStatusPageRequest" + "$ref": "#/components/schemas/MCPServerDeleteRequest" }, "example": { - "name": "My Status Page", - "url_name": "my-status-page", - "type": "public", - "page_header": "Welcome to our status page", - "contact_info": "mailto:support@example.com" + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" } } } } } }, - "/status-page/update": { + "/safari/mcp/server/disable": { "post": { - "operationId": "statusPageUpdate", - "summary": "Update status page", - "description": "Update an existing status page configuration.", + "operationId": "mcp-write-server-disable", + "summary": "Disable MCP server", + "description": "Disable an enabled MCP server.", "tags": [ - "On-call/Status pages" + "AI SRE/MCP servers" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- Disabling an already-disabled server returns InvalidParameter instead of a silent no-op.\n- Requires edit permission on the server's current team: account-scope servers are owner/admin only; team-scope servers require the caller to belong to that team (or be owner/admin).\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-disable", "metadata": { - "sidebarTitle": "Update status page" + "sidebarTitle": "Disable MCP server" } }, "responses": { @@ -24307,13 +24654,14 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "type": "null", + "description": "Always null on success." } } } @@ -24321,7 +24669,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": null } } } @@ -24332,6 +24680,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24344,32 +24695,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EmptyRequest" + "$ref": "#/components/schemas/MCPServerStatusRequest" }, "example": { - "page_id": 5750613685214, - "name": "Flashduty Status Page (Updated)", - "page_header": "Updated status page header", - "contact_info": "mailto:support@example.com" + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" } } } } } }, - "/status-page/delete": { + "/safari/mcp/server/enable": { "post": { - "operationId": "statusPageDelete", - "summary": "Delete status page", - "description": "Delete a status page.", + "operationId": "mcp-write-server-enable", + "summary": "Enable MCP server", + "description": "Enable a disabled MCP server.", "tags": [ - "On-call/Status pages" + "AI SRE/MCP servers" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- Enabling an already-enabled server returns InvalidParameter instead of a silent no-op.\n- Requires edit permission on the server's current team: account-scope servers are owner/admin only; team-scope servers require the caller to belong to that team (or be owner/admin).\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-enable", "metadata": { - "sidebarTitle": "Delete status page" + "sidebarTitle": "Enable MCP server" } }, "responses": { @@ -24380,13 +24733,14 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "type": "null", + "description": "Always null on success." } } } @@ -24394,7 +24748,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": null } } } @@ -24405,6 +24759,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24417,29 +24774,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EmptyRequest" + "$ref": "#/components/schemas/MCPServerStatusRequest" }, "example": { - "page_id": 5750613685214 + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" } } } } } }, - "/status-page/component/upsert": { + "/safari/mcp/server/get": { "post": { - "operationId": "statusPageComponentUpsert", - "summary": "Upsert status page component", - "description": "Create or update a service component on a status page.", + "operationId": "mcp-read-server-get", + "summary": "Get MCP server detail", + "description": "Get one MCP server and run a live probe of its tool list.", "tags": [ - "On-call/Status pages" + "AI SRE/MCP servers" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-component-upsert", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The detail call live-probes tools; on failure `list_error` is set and the request still succeeds.\n", + "href": "/en/api-reference/ai-sre/mcp-servers/mcp-read-server-get", "metadata": { - "sidebarTitle": "Upsert status page component" + "sidebarTitle": "Get MCP server detail" } }, "responses": { @@ -24450,13 +24812,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/UpsertStatusPageComponentResponse" + "$ref": "#/components/schemas/MCPServerItem" } } } @@ -24465,9 +24827,34 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "component_ids": [ - "01KP032KMN9YFBMPWANJMFZFG1" - ] + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", + "account_id": 10023, + "team_id": 0, + "can_edit": true, + "environment_kind": "", + "environment_id": "", + "server_name": "prometheus", + "description": "Query Prometheus metrics and alerts.", + "transport": "streamable-http", + "url": "https://mcp.example.com/prometheus", + "status": "enabled", + "connect_timeout": 10, + "call_timeout": 60, + "tool_count": 2, + "tools": [ + { + "name": "query", + "description": "Run a PromQL instant query." + }, + { + "name": "query_range", + "description": "Run a PromQL range query." + } + ], + "auth_mode": "shared", + "created_by": 80011, + "created_at": 1716960000000, + "updated_at": 1717046400000 } } } @@ -24491,37 +24878,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpsertStatusPageComponentRequest" + "$ref": "#/components/schemas/MCPServerGetRequest" }, "example": { - "page_id": 5750613685214, - "components": [ - { - "name": "Web Console", - "description": "Main web interface", - "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", - "order_id": 1 - } - ] + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" } } } } } }, - "/status-page/component/delete": { + "/safari/mcp/server/list": { "post": { - "operationId": "statusPageComponentDelete", - "summary": "Delete status page component", - "description": "Delete a service component from a status page.", + "operationId": "mcp-read-server-list", + "summary": "List MCP servers", + "description": "List MCP servers visible to the caller across account and team scopes, with pagination.", "tags": [ - "On-call/Status pages" + "AI SRE/MCP servers" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-component-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The live tool list is not included; fetch a single server to probe its tools.\n- `query` performs a case-insensitive substring search across name, description, AI-generated description, server ID, transport, URL, command, and source template name.\n", + "href": "/en/api-reference/ai-sre/mcp-servers/mcp-read-server-list", "metadata": { - "sidebarTitle": "Delete status page component" + "sidebarTitle": "List MCP servers" } }, "responses": { @@ -24532,13 +24916,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/MCPServerListResponse" } } } @@ -24546,7 +24930,41 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": { + "total": 1, + "servers": [ + { + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", + "account_id": 10023, + "team_id": 0, + "can_edit": true, + "environment_kind": "", + "environment_id": "", + "server_name": "prometheus", + "description": "Query Prometheus metrics and alerts.", + "transport": "streamable-http", + "url": "https://mcp.example.com/prometheus", + "status": "enabled", + "connect_timeout": 10, + "call_timeout": 60, + "tool_count": 2, + "tools": [ + { + "name": "query", + "description": "Run a PromQL instant query." + }, + { + "name": "query_range", + "description": "Run a PromQL range query." + } + ], + "auth_mode": "shared", + "created_by": 80011, + "created_at": 1716960000000, + "updated_at": 1717046400000 + } + ] + } } } } @@ -24569,32 +24987,36 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteStatusPageComponentRequest" + "$ref": "#/components/schemas/MCPServerListRequest" }, "example": { - "page_id": 5750613685214, - "component_ids": [ - "01KP032KMN9YFBMPWANJMFZFG1" - ] + "p": 1, + "limit": 20, + "include_account": true } } } } } }, - "/status-page/section/upsert": { + "/safari/mcp/server/update": { "post": { - "operationId": "statusPageSectionUpsert", - "summary": "Upsert status page section", - "description": "Create or update a section on a status page.", + "operationId": "mcp-write-server-update", + "summary": "Update MCP server", + "description": "Update an MCP server's configuration. Omit a field to leave it unchanged.", "tags": [ - "On-call/Status pages" + "AI SRE/MCP servers" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-section-upsert", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- Masked secret values in `env`/`headers` are preserved — sending the masked value back does not overwrite the stored secret.\n- `environment_kind`/`environment_id` are independent partial-update fields: omit both to leave the runner binding unchanged; set either to change it, subject to the same `byoc`-or-empty constraint as create.\n- Changing `team_id` requires reassignment permission on the destination team; if the runner binding is left unchanged, it must still be selectable by the caller under the new team or the update is rejected.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-update", "metadata": { - "sidebarTitle": "Upsert status page section" + "sidebarTitle": "Update MCP server" } }, "responses": { @@ -24605,13 +25027,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/UpsertStatusPageSectionResponse" + "$ref": "#/components/schemas/MCPServerItem" } } } @@ -24620,9 +25042,34 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "section_ids": [ - "01KP032J1FV2H8DDGN0QSJ1CAR" - ] + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", + "account_id": 10023, + "team_id": 0, + "can_edit": true, + "environment_kind": "", + "environment_id": "", + "server_name": "prometheus", + "description": "Query Prometheus metrics, alerts, and rules.", + "transport": "streamable-http", + "url": "https://mcp.example.com/prometheus", + "status": "enabled", + "connect_timeout": 10, + "call_timeout": 60, + "tool_count": 2, + "tools": [ + { + "name": "query", + "description": "Run a PromQL instant query." + }, + { + "name": "query_range", + "description": "Run a PromQL range query." + } + ], + "auth_mode": "shared", + "created_by": 80011, + "created_at": 1716960000000, + "updated_at": 1717046400000 } } } @@ -24634,6 +25081,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24646,36 +25096,35 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpsertStatusPageSectionRequest" + "$ref": "#/components/schemas/MCPServerUpdateRequest" }, "example": { - "page_id": 5750613685214, - "sections": [ - { - "name": "Core Services", - "description": "Our core services", - "order_id": 1 - } - ] + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", + "description": "Query Prometheus metrics, alerts, and rules." } } } } } }, - "/status-page/section/delete": { + "/safari/session/delete": { "post": { - "operationId": "statusPageSectionDelete", - "summary": "Delete status page section", - "description": "Delete a section from a status page.", + "operationId": "session-write-delete", + "summary": "Delete session", + "description": "Delete a session by ID.", "tags": [ - "On-call/Status pages" + "AI SRE/Sessions" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-section-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Personal sessions can be deleted only by their creator; team sessions can be deleted by the creator, an account admin, or a member of the owning team.\n- This is a soft delete: it also cascades to delete child subagent sessions and any presented files; the underlying S3/MinIO blobs are removed best-effort after the transaction commits, so an orphaned blob is possible on partial failure.\n", + "href": "/en/api-reference/ai-sre/sessions/session-write-delete", "metadata": { - "sidebarTitle": "Delete status page section" + "sidebarTitle": "Delete session" } }, "responses": { @@ -24686,13 +25135,14 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "type": "null", + "description": "Always null on success." } } } @@ -24700,7 +25150,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": null } } } @@ -24711,6 +25161,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24723,59 +25176,44 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteStatusPageSectionRequest" + "$ref": "#/components/schemas/SessionDeleteRequest" }, "example": { - "page_id": 5750613685214, - "section_ids": [ - "01KP032J1FV2H8DDGN0QSJ1CAR" - ] + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" } } } } } }, - "/status-page/template/upsert": { + "/safari/session/export": { "post": { - "operationId": "statusPageTemplateUpsert", - "summary": "Upsert status page template", - "description": "Create or update an event template for a status page.", + "operationId": "session-read-export", + "summary": "Export session transcript", + "description": "Stream a session's full event transcript as newline-delimited JSON.", "tags": [ - "On-call/Status pages" + "AI SRE/Sessions" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-template-upsert", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/day**; **200 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Personal sessions are exportable only by their creator; team sessions can be exported by same-account callers with the `session_id`.\n- The response is `application/x-ndjson` — parse line-by-line and write to a file; do not buffer the whole body in memory.\n- The first line is always a `session_meta` envelope; `include_subagents=true` inlines each child session's stream after its dispatch line.\n- Requests are capped at a 60-second execution timeout; very large sessions may not finish exporting within that window.\n- If the stream fails partway through, the response ends with a JSON error line instead of a proper error envelope (headers are already sent) — check for this trailing line to detect truncation.\n", + "href": "/en/api-reference/ai-sre/sessions/session-read-export", "metadata": { - "sidebarTitle": "Upsert status page template" + "sidebarTitle": "Export session transcript" } }, "responses": { "200": { - "description": "Success", + "description": "Streaming NDJSON (application/x-ndjson). One JSON object per line, terminated by a newline. The first line is always a `session_meta` envelope; subsequent lines are session events.", "content": { - "application/json": { + "application/x-ndjson": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/UpsertStatusPageTemplateResponse" - } - } - } - ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "template_id": "01KP0339G5XDEPM4R86T2B23EP" - } + "type": "string", + "description": "Newline-delimited JSON stream. Parse line-by-line; do not buffer the whole body." } } } @@ -24786,6 +25224,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24798,36 +25239,35 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpsertStatusPageTemplateRequest" + "$ref": "#/components/schemas/SessionExportRequest" }, "example": { - "page_id": 5720156736380, - "type": "pre_defined", - "template": { - "title": "Service Disruption", - "event_type": "incident", - "status": "investigating", - "description": "We are investigating a service disruption affecting some users." - } + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "include_subagents": false } } } } } }, - "/status-page/template/delete": { + "/safari/session/get": { "post": { - "operationId": "statusPageTemplateDelete", - "summary": "Delete status page template", - "description": "Delete an event template from a status page.", + "operationId": "session-read-info", + "summary": "Get session detail", + "description": "Fetch one session plus a backward-paged window of its most recent events.", "tags": [ - "On-call/Status pages" + "AI SRE/Sessions" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-template-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Personal sessions are readable only by their creator; team sessions can be read by same-account callers with the `session_id`.\n- Page older history with `search_after_ctx` from the previous response.\n- `limit` (or legacy `num_recent_events`) caps the event page; default 100, max 1000.\n- A malformed `search_after_ctx` returns 400 immediately, before any DB work.\n- `current_turn_*` fields are populated only while the session `is_running`; `suggest_init` is the same account-wide onboarding flag as `session/list`.\n", + "href": "/en/api-reference/ai-sre/sessions/session-read-info", "metadata": { - "sidebarTitle": "Delete status page template" + "sidebarTitle": "Get session detail" } }, "responses": { @@ -24838,13 +25278,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/SessionGetResponse" } } } @@ -24852,7 +25292,77 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": { + "session": { + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "session_name": "Investigate cloud-assistant first heartbeat", + "app_name": "ai-sre", + "entry_kind": "web", + "person_id": "3790925372131", + "team_id": 0, + "is_mine": false, + "can_view": true, + "can_continue": true, + "can_manage": true, + "can_fork": true, + "access_source": "manager", + "share_enabled": true, + "share_version": 3, + "shared_at": 1780367971000, + "shared_by": 3790925372131, + "status": "enabled", + "incognito": false, + "created_at": 1780367971228, + "updated_at": 1780367993457, + "token_usage": { + "input_tokens": 14948, + "cached_tokens": 11520, + "output_tokens": 888, + "reasoning_tokens": 351 + }, + "current_context_tokens": 14948, + "context_window": 0, + "archived_at": 0, + "pinned_at": 0, + "last_event_at": 1780367992649, + "is_running": false, + "has_unread": true, + "current_turn_started_at": 0, + "current_turn_active_ms": 0, + "current_turn_wait_ms": 0, + "current_turn_tokens": 0 + }, + "events": [ + { + "event_id": "evt_3aZQ9p", + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "author": "user", + "partial": false, + "turn_complete": false, + "status": "normal", + "created_at": 1780367971241 + }, + { + "event_id": "evt_7bWk2r", + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "author": "ai-sre", + "content": { + "role": "model", + "parts": [ + { + "text": "..." + } + ] + }, + "partial": false, + "turn_complete": true, + "status": "normal", + "created_at": 1780367992649 + } + ], + "has_more_older": false, + "suggest_init": false + } } } } @@ -24863,6 +25373,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24875,31 +25388,35 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteStatusPageTemplateRequest" + "$ref": "#/components/schemas/SessionGetRequest" }, "example": { - "page_id": 5720156736380, - "type": "pre_defined", - "template_id": "01KP0339G5XDEPM4R86T2B23EP" + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "num_recent_events": 50 } } } } } }, - "/status-page/template/list": { - "get": { - "operationId": "statusPageTemplateList", - "summary": "List status page templates", - "description": "List all event templates for a status page.", + "/safari/session/list": { + "post": { + "operationId": "session-read-list", + "summary": "List sessions", + "description": "List agent sessions visible to the caller, filtered by app, surface, archive status, and team.", "tags": [ - "On-call/Status pages" + "AI SRE/Sessions" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/status-pages/status-page-template-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Pagination uses `p`/`limit` (max 100); `scope` defaults to `all`.\n- `all` returns your personal sessions plus team sessions you can access; account admins see all team sessions, but not other users' personal sessions.\n- `team_ids` narrows the visible set and never expands access.\n- `is_running` reflects the live run-set; `has_unread` is computed per calling user; the `current_turn_*` fields are always zero here — only `session/get` computes them while a session is running.\n- `suggest_init` is an account-wide onboarding flag (true only when the account has zero knowledge packs anywhere) — it doesn't depend on the list filters.\n", + "href": "/en/api-reference/ai-sre/sessions/session-read-list", "metadata": { - "sidebarTitle": "List status page templates" + "sidebarTitle": "List sessions" } }, "responses": { @@ -24910,13 +25427,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/SessionListResponse" } } } @@ -24925,15 +25442,49 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "items": [ + "total": 988, + "sessions": [ { - "template_id": "01KC8KP6PHVPSCAB0BTKZBN2HR", - "title": "Service Disruption", - "type": "incident", - "status": "identified", - "description": "We have identified the root cause." + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "session_name": "Investigate cloud-assistant first heartbeat", + "app_name": "ai-sre", + "entry_kind": "web", + "person_id": "3790925372131", + "team_id": 0, + "is_mine": false, + "can_view": true, + "can_continue": true, + "can_manage": true, + "can_fork": true, + "access_source": "manager", + "share_enabled": true, + "share_version": 3, + "shared_at": 1780367971000, + "shared_by": 3790925372131, + "status": "enabled", + "incognito": false, + "created_at": 1780367971228, + "updated_at": 1780367993457, + "token_usage": { + "input_tokens": 14948, + "cached_tokens": 11520, + "output_tokens": 888, + "reasoning_tokens": 351 + }, + "current_context_tokens": 14948, + "context_window": 0, + "archived_at": 0, + "pinned_at": 0, + "last_event_at": 1780367992649, + "is_running": false, + "has_unread": true, + "current_turn_started_at": 0, + "current_turn_active_ms": 0, + "current_turn_wait_ms": 0, + "current_turn_tokens": 0 } - ] + ], + "suggest_init": false } } } @@ -24945,6 +25496,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24952,40 +25506,31 @@ "$ref": "#/components/responses/ServerError" } }, - "parameters": [ - { - "name": "page_id", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - }, - "description": "Status page ID." - }, - { - "name": "type", - "in": "query", - "required": true, - "schema": { - "type": "string", - "enum": [ - "pre_defined", - "message" - ] - }, - "description": "Template category. `pre_defined` returns predefined event templates; `message` returns message notification templates." + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionListRequest" + }, + "example": { + "app_name": "ai-sre", + "limit": 2, + "orderby": "updated_at", + "scope": "all" + } + } } - ] + } } }, - "/safari/automation/rule/create": { + "/safari/skill/delete": { "post": { - "operationId": "automation-rule-write-create", - "summary": "Create Automation rule", - "description": "Create an Automation rule with schedule, HTTP POST, and On-call incident triggers.", + "operationId": "skill-write-delete", + "summary": "Delete skill", + "description": "Delete a skill by ID.", "tags": [ - "AI SRE/Automations" + "AI SRE/Skills" ], "security": [ { @@ -24993,10 +25538,10 @@ } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; management operations require the caller to manage the target rule |\n\n## Usage\n\n- A caller may create personal rules and rules for any team in the current account; `team_id` is immutable after creation.\n- List visibility follows session-list visibility: owners/admins see all rules; ordinary members see rules they created and rules for their teams.\n- `http_post_token` is returned only when creating or rotating the token. Save it immediately.\n- To trigger from On-call incidents, send `oncall_incident_trigger_enabled`, `oncall_incident_channel_ids`, and `oncall_incident_severities`; matching events run with `trigger_kind=oncall_incident`.\n", - "href": "/en/api-reference/ai-sre/automations/automation-rule-write-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Soft delete only: sets `status` to `deleted` and renames the row to free its name for reuse; the skill's zip archive is not removed from object storage.\n- Deleting an already-deleted or nonexistent `skill_id` returns `ResourceNotFound`, since the lookup excludes deleted rows before the delete itself runs.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/skills/skill-write-delete", "metadata": { - "sidebarTitle": "Create Automation rule" + "sidebarTitle": "Delete skill" } }, "responses": { @@ -25013,7 +25558,8 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationRuleItem" + "type": "null", + "description": "Always null on success." } } } @@ -25021,38 +25567,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b", - "account_id": 10023, - "team_id": 123, - "owner_id": 80011, - "name": "Weekly on-call review", - "enabled": true, - "run_scope": "team", - "cron_expr": "0 9 * * 1", - "prompt": "Summarize last week's alert noise and escalation load.", - "environment_kind": "", - "environment_id": "", - "schedule_trigger_id": "autotrg_6aKp3wT9mQ2xVc8bR1nY7z", - "schedule_trigger_enabled": true, - "http_post_trigger_id": "autotrg_2bLq4xT8mP1sWd9cN3rF6y", - "http_post_trigger_url": "/safari/automation/triggers/autotrg_2bLq4xT8mP1sWd9cN3rF6y/fire", - "http_post_trigger_enabled": true, - "can_edit": true, - "created_at": 1780367971228, - "updated_at": 1780367971228, - "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U", - "schedule_next_fire_at_ms": 1780630800000, - "oncall_incident_trigger_id": "autotrg_9cVb2mN7qKs4dEa8T1rY5p", - "oncall_incident_trigger_enabled": true, - "oncall_incident_channel_ids": [ - 456 - ], - "oncall_incident_severities": [ - "Critical", - "Warning" - ] - } + "data": null } } } @@ -25078,37 +25593,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationRuleCreateRequest" + "$ref": "#/components/schemas/SkillDeleteRequest" }, "example": { - "name": "Weekly on-call review", - "team_id": 123, - "enabled": true, - "cron_expr": "0 9 * * 1", - "schedule_trigger_enabled": true, - "prompt": "Summarize last week's alert noise and escalation load.", - "http_post_trigger_enabled": true, - "oncall_incident_trigger_enabled": true, - "oncall_incident_channel_ids": [ - 456 - ], - "oncall_incident_severities": [ - "Critical", - "Warning" - ] + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" } } } } } }, - "/safari/automation/rule/list": { + "/safari/skill/disable": { "post": { - "operationId": "automation-rule-read-list", - "summary": "List Automation rules", - "description": "List Automation rules visible to the caller.", + "operationId": "skill-write-disable", + "summary": "Disable skill", + "description": "Disable an enabled skill so the agent stops loading it.", "tags": [ - "AI SRE/Automations" + "AI SRE/Skills" ], "security": [ { @@ -25116,10 +25617,10 @@ } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; results are filtered to the caller's visible scope |\n", - "href": "/en/api-reference/ai-sre/automations/automation-rule-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Only an `enabled` skill can be disabled; an already-disabled skill returns `InvalidParameter`.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/skills/skill-write-disable", "metadata": { - "sidebarTitle": "List Automation rules" + "sidebarTitle": "Disable skill" } }, "responses": { @@ -25136,7 +25637,8 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationRuleListResponse" + "type": "null", + "description": "Always null on success." } } } @@ -25144,42 +25646,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "total": 1, - "rules": [ - { - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b", - "account_id": 10023, - "team_id": 123, - "owner_id": 80011, - "name": "Weekly on-call review", - "enabled": true, - "run_scope": "team", - "cron_expr": "0 9 * * 1", - "prompt": "Summarize last week's alert noise and escalation load.", - "environment_kind": "", - "environment_id": "", - "schedule_trigger_id": "autotrg_6aKp3wT9mQ2xVc8bR1nY7z", - "schedule_trigger_enabled": true, - "http_post_trigger_id": "autotrg_2bLq4xT8mP1sWd9cN3rF6y", - "http_post_trigger_url": "/safari/automation/triggers/autotrg_2bLq4xT8mP1sWd9cN3rF6y/fire", - "http_post_trigger_enabled": true, - "can_edit": true, - "created_at": 1780367971228, - "updated_at": 1780367971228, - "schedule_next_fire_at_ms": 1780630800000, - "oncall_incident_trigger_id": "autotrg_9cFr2kLm8qNv5pXs4dWy7a", - "oncall_incident_trigger_enabled": true, - "oncall_incident_channel_ids": [ - 2468013579 - ], - "oncall_incident_severities": [ - "Critical", - "Warning" - ] - } - ] - } + "data": null } } } @@ -25205,24 +25672,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationRuleListRequest" + "$ref": "#/components/schemas/SkillStatusRequest" }, "example": { - "scope": "all", - "limit": 20 + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" } } } } } }, - "/safari/automation/rule/get": { + "/safari/skill/enable": { "post": { - "operationId": "automation-rule-read-get", - "summary": "Get Automation rule", - "description": "Get one Automation rule by ID.", + "operationId": "skill-read-enable", + "summary": "Enable skill", + "description": "Enable a disabled skill so the agent can load it.", "tags": [ - "AI SRE/Automations" + "AI SRE/Skills" ], "security": [ { @@ -25230,10 +25696,10 @@ } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; results are filtered to the caller's visible scope |\n", - "href": "/en/api-reference/ai-sre/automations/automation-rule-read-get", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Only a `disabled` skill can be enabled; an already-enabled skill returns `InvalidParameter`.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/skills/skill-read-enable", "metadata": { - "sidebarTitle": "Get Automation rule" + "sidebarTitle": "Enable skill" } }, "responses": { @@ -25250,7 +25716,8 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationRuleItem" + "type": "null", + "description": "Always null on success." } } } @@ -25258,37 +25725,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b", - "account_id": 10023, - "team_id": 123, - "owner_id": 80011, - "name": "Weekly on-call review", - "enabled": true, - "run_scope": "team", - "cron_expr": "0 9 * * 1", - "prompt": "Summarize last week's alert noise and escalation load.", - "environment_kind": "", - "environment_id": "", - "schedule_trigger_id": "autotrg_6aKp3wT9mQ2xVc8bR1nY7z", - "schedule_trigger_enabled": true, - "http_post_trigger_id": "autotrg_2bLq4xT8mP1sWd9cN3rF6y", - "http_post_trigger_url": "/safari/automation/triggers/autotrg_2bLq4xT8mP1sWd9cN3rF6y/fire", - "http_post_trigger_enabled": true, - "can_edit": true, - "created_at": 1780367971228, - "updated_at": 1780367971228, - "schedule_next_fire_at_ms": 1780630800000, - "oncall_incident_trigger_id": "autotrg_9cFr2kLm8qNv5pXs4dWy7a", - "oncall_incident_trigger_enabled": true, - "oncall_incident_channel_ids": [ - 2468013579 - ], - "oncall_incident_severities": [ - "Critical", - "Warning" - ] - } + "data": null } } } @@ -25314,23 +25751,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationRuleIDRequest" + "$ref": "#/components/schemas/SkillStatusRequest" }, "example": { - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b" + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" } } } } } }, - "/safari/automation/rule/update": { + "/safari/skill/get": { "post": { - "operationId": "automation-rule-write-update", - "summary": "Update Automation rule", - "description": "Update mutable Automation rule fields, including HTTP POST and On-call incident trigger settings.", + "operationId": "skill-read-get", + "summary": "Get skill detail", + "description": "Get one skill including its full SKILL.md content.", "tags": [ - "AI SRE/Automations" + "AI SRE/Skills" ], "security": [ { @@ -25338,10 +25775,10 @@ } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; management operations require the caller to manage the target rule |\n\n## Usage\n\n- A caller may create personal rules and rules for any team in the current account; `team_id` is immutable after creation.\n- List visibility follows session-list visibility: owners/admins see all rules; ordinary members see rules they created and rules for their teams.\n- `http_post_token` is returned only when creating or rotating the token. Save it immediately.\n- To trigger from On-call incidents, send `oncall_incident_trigger_enabled`, `oncall_incident_channel_ids`, and `oncall_incident_severities`; matching events run with `trigger_kind=oncall_incident`.\n", - "href": "/en/api-reference/ai-sre/automations/automation-rule-write-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `ResourceNotFound` if the skill does not exist or has already been deleted.\n- `can_edit` reflects team membership, but read access itself is open to any caller regardless of team.\n", + "href": "/en/api-reference/ai-sre/skills/skill-read-get", "metadata": { - "sidebarTitle": "Update Automation rule" + "sidebarTitle": "Get skill detail" } }, "responses": { @@ -25358,7 +25795,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationRuleItem" + "$ref": "#/components/schemas/SkillItem" } } } @@ -25367,36 +25804,30 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b", + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", "account_id": 10023, - "team_id": 123, - "owner_id": 80011, - "name": "Weekly on-call review", - "enabled": true, - "run_scope": "team", - "cron_expr": "0 9 * * 1", - "prompt": "Summarize last week's alert noise and escalation load.", - "environment_kind": "", - "environment_id": "", - "schedule_trigger_id": "autotrg_6aKp3wT9mQ2xVc8bR1nY7z", - "schedule_trigger_enabled": true, - "http_post_trigger_id": "autotrg_2bLq4xT8mP1sWd9cN3rF6y", - "http_post_trigger_url": "/safari/automation/triggers/autotrg_2bLq4xT8mP1sWd9cN3rF6y/fire", - "http_post_trigger_enabled": true, - "can_edit": true, - "created_at": 1780367971228, - "updated_at": 1780367971228, - "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U", - "schedule_next_fire_at_ms": 1780630800000, - "oncall_incident_trigger_id": "autotrg_9cVb2mN7qKs4dEa8T1rY5p", - "oncall_incident_trigger_enabled": true, - "oncall_incident_channel_ids": [ - 456 + "team_id": 0, + "skill_name": "k8s-triage", + "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", + "version": "1.2.0", + "tags": [ + "kubernetes", + "triage" ], - "oncall_incident_severities": [ - "Critical", - "Warning" - ] + "author": "sre-team", + "tools": [ + "bash", + "mcp:prometheus/query" + ], + "status": "enabled", + "created_by": 80011, + "created_at": 1716960000000, + "updated_at": 1717046400000, + "can_edit": true, + "update_available": false, + "is_modified": false, + "description_en": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", + "content": "---\nname: k8s-triage\ndescription: ...\n---\n# Triage steps" } } } @@ -25408,9 +25839,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -25423,34 +25851,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationRuleUpdateRequest" + "$ref": "#/components/schemas/SkillGetRequest" }, "example": { - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b", - "enabled": true, - "cron_expr": "15 9 * * 1", - "rotate_http_post_trigger_token": true, - "oncall_incident_trigger_enabled": true, - "oncall_incident_severities": [ - "Critical", - "Warning" - ], - "oncall_incident_channel_ids": [ - 456 - ] + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" } } } } } }, - "/safari/automation/rule/delete": { + "/safari/skill/list": { "post": { - "operationId": "automation-rule-write-delete", - "summary": "Delete Automation rule", - "description": "Delete an Automation rule.", + "operationId": "skill-read-list", + "summary": "List skills", + "description": "List AI SRE skills visible to the caller across account and team scopes, with pagination.", "tags": [ - "AI SRE/Automations" + "AI SRE/Skills" ], "security": [ { @@ -25458,10 +25875,10 @@ } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; management operations require the caller to manage the target rule |\n\n## Usage\n\n- A caller may create personal rules and rules for any team in the current account; `team_id` is immutable after creation.\n- List visibility follows session-list visibility: owners/admins see all rules; ordinary members see rules they created and rules for their teams.\n- `http_post_token` is returned only when creating or rotating the token. Save it immediately.\n", - "href": "/en/api-reference/ai-sre/automations/automation-rule-write-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The `content` field is omitted in list rows; fetch a single skill to read its body.\n- `scope` selects `all` (default), `account`-only, or `team`-only, overriding `include_account`; non-admins requesting specific `team_ids` are silently filtered down to the teams they belong to.\n- `update_available` compares against the marketplace catalog once per call; if the catalog fails to load, the badge is simply suppressed rather than the request failing.\n", + "href": "/en/api-reference/ai-sre/skills/skill-read-list", "metadata": { - "sidebarTitle": "Delete Automation rule" + "sidebarTitle": "List skills" } }, "responses": { @@ -25478,8 +25895,7 @@ "type": "object", "properties": { "data": { - "type": "null", - "description": "Always null on success." + "$ref": "#/components/schemas/SkillListResponse" } } } @@ -25487,7 +25903,35 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": { + "total": 1, + "skills": [ + { + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", + "account_id": 10023, + "team_id": 0, + "skill_name": "k8s-triage", + "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", + "version": "1.2.0", + "tags": [ + "kubernetes", + "triage" + ], + "author": "sre-team", + "tools": [ + "bash", + "mcp:prometheus/query" + ], + "status": "enabled", + "created_by": 80011, + "created_at": 1716960000000, + "updated_at": 1717046400000, + "can_edit": true, + "update_available": false, + "is_modified": false + } + ] + } } } } @@ -25498,9 +25942,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -25513,23 +25954,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationRuleIDRequest" + "$ref": "#/components/schemas/SkillListRequest" }, "example": { - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b" + "p": 1, + "limit": 20, + "include_account": true } } } } } }, - "/safari/automation/template/list": { + "/safari/skill/update": { "post": { - "operationId": "automation-template-read-list", - "summary": "List Automation templates", - "description": "List preset Automation templates for the requested locale.", + "operationId": "skill-write-update", + "summary": "Update skill", + "description": "Update a skill's descriptions or reassign its team scope.", "tags": [ - "AI SRE/Automations" + "AI SRE/Skills" ], "security": [ { @@ -25537,10 +25980,10 @@ } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; results are filtered to the caller's visible scope |\n", - "href": "/en/api-reference/ai-sre/automations/automation-template-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Only `description`, `description_en`, and `team_id` are editable; the skill body is changed by re-uploading.\n- `description` only updates when non-empty — there is no way to clear it via this field; `description_en` is nilable, so send an empty string to explicitly clear it.\n- Reassigning `team_id` to a different team runs a second authorization check beyond edit access, verifying the caller may target the destination team.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/skills/skill-write-update", "metadata": { - "sidebarTitle": "List Automation templates" + "sidebarTitle": "Update skill" } }, "responses": { @@ -25557,7 +26000,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationTemplateListResponse" + "$ref": "#/components/schemas/SkillItem" } } } @@ -25566,15 +26009,28 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "templates": [ - { - "name": "Noise reduction", - "description": "Analyze recent alert noise and recommend cleanup actions.", - "icon": "bell-off", - "enabled": true, - "prompt": "Inspect alert noise, escalation load, and on-call handling in the last 24 hours." - } - ] + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", + "account_id": 10023, + "team_id": 0, + "skill_name": "k8s-triage", + "description": "Updated triage runbook.", + "version": "1.2.0", + "tags": [ + "kubernetes", + "triage" + ], + "author": "sre-team", + "tools": [ + "bash", + "mcp:prometheus/query" + ], + "status": "enabled", + "created_by": 80011, + "created_at": 1716960000000, + "updated_at": 1717046400000, + "can_edit": true, + "update_available": false, + "is_modified": false } } } @@ -25601,23 +26057,24 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationTemplateListRequest" + "$ref": "#/components/schemas/SkillUpdateRequest" }, "example": { - "locale": "en-US" + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", + "description": "Updated triage runbook." } } } } } }, - "/safari/automation/run/list": { + "/safari/skill/upload": { "post": { - "operationId": "automation-run-read-list", - "summary": "List Automation runs", - "description": "List run history for a rule the caller can manage.", + "operationId": "skill-write-upload", + "summary": "Upload skill", + "description": "Upload a skill archive (.skill/.zip/.tar.gz/.tgz) to create or replace a skill.", "tags": [ - "AI SRE/Automations" + "AI SRE/Skills" ], "security": [ { @@ -25625,10 +26082,10 @@ } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; results are filtered to the caller's visible scope |\n", - "href": "/en/api-reference/ai-sre/automations/automation-run-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **30 requests/minute**; **3 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Send as `multipart/form-data` with a `file` part; accepted archive types are `.skill`, `.zip`, `.tar.gz`, `.tgz`, capped at 100MB (oversized files are rejected before the body is read).\n- `skill_id` + `replace=true` targets and overwrites that specific skill, skipping the team-authorship check since the caller already owns the row.\n- `replace=true` without `skill_id` upserts by matching skill name; omitting `replace` always creates a new skill — both paths require the caller to be allowed to author into the target `team_id`.\n- The response always stamps `can_edit: true`.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/skills/skill-write-upload", "metadata": { - "sidebarTitle": "List Automation runs" + "sidebarTitle": "Upload skill" } }, "responses": { @@ -25645,7 +26102,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationRunListResponse" + "$ref": "#/components/schemas/SkillItem" } } } @@ -25654,30 +26111,29 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "total": 1, - "runs": [ - { - "run_id": "taskrun_5oDvqiG64uur6sBNsTc4u", - "kind": "automation_rule", - "account_id": 10023, - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b", - "trigger_kind": "schedule", - "occurrence_key": "autotrg_6aKp3wT9mQ2xVc8bR1nY7z:1780630800000", - "status": "succeeded", - "attempts": 1, - "started_at": 1780630800000, - "completed_at": 1780630923456, - "duration_ms": 123456, - "error_code": "", - "error_message": "", - "stats_json": {}, - "result_json": { - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" - }, - "created_at": 1780630800000, - "updated_at": 1780630923456 - } - ] + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", + "account_id": 10023, + "team_id": 0, + "skill_name": "k8s-triage", + "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", + "version": "1.2.0", + "tags": [ + "kubernetes", + "triage" + ], + "author": "sre-team", + "tools": [ + "bash", + "mcp:prometheus/query" + ], + "status": "enabled", + "created_by": 80011, + "created_at": 1716960000000, + "updated_at": 1717046400000, + "can_edit": true, + "update_available": false, + "is_modified": false, + "created": true } } } @@ -25702,38 +26158,32 @@ "requestBody": { "required": true, "content": { - "application/json": { + "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/AutomationRunListRequest" + "$ref": "#/components/schemas/SkillUploadRequest" }, "example": { - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b", - "limit": 20, - "trigger_kind": "schedule" + "team_id": 0, + "replace": false } } } } } }, - "/safari/automation/rule/run": { + "/rum/session-replay/metadata": { "post": { - "operationId": "automation-rule-write-run", - "summary": "Run Automation rule", - "description": "Manually run an Automation rule immediately, outside its schedule.", + "operationId": "rum-session-replay-read-metadata", + "summary": "Get session replay metadata", + "description": "Return the application, device, session bounds, and views recorded for a replayable session.", "tags": [ - "AI SRE/Automations" - ], - "security": [ - { - "AppKeyAuth": [] - } + "RUM/Session replay" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/minute**; **5 requests/second** per account |\n| Permissions | Valid `app_key`; caller must manage the target rule |\n\n## Usage\n\n- Rate-limited to at most once per minute per rule; a second call within that window returns `429` with `code: \"RequestTooFrequently\"`.\n- Only enabled rules can run manually; a disabled or misconfigured rule fails preflight with a `400` error before any run is created.\n- The call returns once the underlying agent session starts, not once the run finishes; the run continues asynchronously — use List Automation runs to check completion status.\n- `trigger_kind` is always `manual` for runs started this way, distinguishing them from `schedule`, `http_post`, and `oncall_incident` runs in run history.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/automations/automation-rule-write-run", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `InvalidParameter` if the session does not exist, or if it has no replay data recorded (`session_has_replay` is false).\n- Returns `InvalidParameter` if no views are found within the session's time window.\n- Pass `ts` to disambiguate when a `session_id` has been reused across different time windows.", + "href": "/en/api-reference/rum/session-replay/rum-session-replay-read-metadata", "metadata": { - "sidebarTitle": "Run Automation rule" + "sidebarTitle": "Get session replay metadata" } }, "responses": { @@ -25744,13 +26194,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ManualRunRuleResult" + "$ref": "#/components/schemas/RumSessionReplayMetaItem" } } } @@ -25759,26 +26209,35 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", - "trigger_kind": "manual", - "preflight": { - "ok": true, - "checks": [ - "rule_loaded", - "actor_authorized", - "app_allowed", - "runtime_scope_resolved", - "rule_config_valid" - ], - "scope": "team", - "owner_id": 80011, - "team_id": 123, - "app_name": "ai-sre" + "application": { + "id": "WoyQQ3BohkdtPivubEvE8o" }, - "run": { - "run_id": "trun_5oDvqiG64uur6sBNsTc4u", - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" - } + "device": { + "type": "desktop" + }, + "session": { + "is_active": false, + "server_time_delta": 0, + "source": "browser", + "start": 1752480000000, + "end": 1752480600000 + }, + "views": [ + { + "source": "browser", + "view_id": "6f2b6b1a-8f7e-4e3a-9c2b-1a2b3c4d5e6f", + "name": "/dashboard", + "url": "https://app.example.com/dashboard", + "loading_type": "initial_load", + "container_source": "", + "container_view_id": "", + "server_time_delta": 0, + "start": 1752480000000, + "end": 1752480600000, + "is_active": false + } + ], + "foreground_periods": [] } } } @@ -25790,8 +26249,95 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RumSessionReplayMetaRequest" + }, + "example": { + "session_id": "0a4a2e64-8a4f-4b9a-9c1e-3a2f9e6d7c81" + } + } + } + } + } + }, + "/rum/session-replay/segments": { + "post": { + "operationId": "rum-session-replay-read-segments", + "summary": "List session replay segments", + "description": "Page through the recorded replay segments of a session, as presigned URLs or a raw stream.", + "tags": [ + "RUM/Session replay" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- When `url_mode` is `false` (default), the response streams `application/x-ndjson` — one decompressed replay segment JSON object per line — and is **not** wrapped in the standard envelope. The pagination cursor for the next call is returned in the `X-Search-After-Ctx` response header instead of a body field.\n- When `url_mode` is `true`, the response is a normal JSON envelope containing presigned download URLs (valid 1 hour) instead of the raw segment bytes.\n- Pass `ts` to seek to the most recent full-snapshot segment at or before that time, instead of paging from the start of the session.\n- `limit` accepts 1-99; values of 100 or more are rejected.", + "href": "/en/api-reference/rum/session-replay/rum-session-replay-read-segments", + "metadata": { + "sidebarTitle": "List session replay segments" + } + }, + "responses": { + "200": { + "description": "Success. Shape depends on `url_mode` — see Usage.", + "headers": { + "X-Search-After-Ctx": { + "description": "Base64-encoded pagination cursor for the next call. Only set in streaming mode (`url_mode: false`).", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumSessionReplaySegmentsResult" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R5", + "data": { + "items": [ + "https://rum-replay.flashcat.cloud/short-term/2451002751131/0a4a2e64-8a4f-4b9a-9c1e-3a2f9e6d7c81/segments/1752480001234?X-Amz-Signature=example", + "https://rum-replay.flashcat.cloud/short-term/2451002751131/0a4a2e64-8a4f-4b9a-9c1e-3a2f9e6d7c81/segments/1752480032456?X-Amz-Signature=example" + ], + "search_after_ctx": "c2hvcnQtdGVybS8yNDUxMDAyNzUxMTMxLzBhNGEyZTY0LThhNGYtNGI5YS05YzFlLTNhMmY5ZTZkN2M4MS9zZWdtZW50cy8xNzUyNDgwMDMyNDU2" + } + } + }, + "application/x-ndjson": { + "schema": { + "type": "string", + "description": "Newline-delimited JSON (NDJSON). Each line is one decompressed replay segment record (rrweb-format events), streamed directly and not wrapped in the standard envelope." + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" }, "429": { "$ref": "#/components/responses/TooManyRequests" @@ -25805,15 +26351,105 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationRuleIDRequest" + "$ref": "#/components/schemas/RumSessionReplaySegmentsRequest" }, "example": { - "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b" + "session_id": "0a4a2e64-8a4f-4b9a-9c1e-3a2f9e6d7c81", + "limit": 20, + "url_mode": true } } } } } + }, + "/oncall/license/list": { + "post": { + "operationId": "oncall-license-read-license-list", + "summary": "List On-call licenses", + "description": "List people with active fixed or temporary On-call licenses in the current account.", + "tags": [ + "On-call/Licenses" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `items` contains only people with an active fixed or temporary On-call license.\n- For temporary licenses, `updated_by`, `created_at`, and `updated_at` are `0`.", + "href": "/en/api-reference/on-call/licenses/oncall-license-read-license-list", + "metadata": { + "sidebarTitle": "List On-call licenses" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/LicenseListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01J0D5Y31GY2TWAHRP3Q8K4M6N", + "data": { + "total": 2, + "items": [ + { + "person_id": 80011, + "person_name": "Yuki Zhang", + "type": "fixed", + "updated_by": 80001, + "created_at": 1719792000, + "updated_at": 1719878400 + }, + { + "person_id": 80012, + "person_name": "Alex Chen", + "type": "temporary", + "updated_by": 0, + "created_at": 0, + "updated_at": 0 + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } } }, "components": { @@ -25959,9 +26595,76 @@ } }, "schemas": { + "LicenseListResponse": { + "type": "object", + "description": "People with active fixed or temporary On-call licenses.", + "required": [ + "total", + "items" + ], + "properties": { + "total": { + "type": "integer", + "description": "Number of people holding an active license." + }, + "items": { + "type": "array", + "description": "People holding an active license.", + "items": { + "$ref": "#/components/schemas/LicensePersonItem" + } + } + } + }, + "LicensePersonItem": { + "type": "object", + "description": "One person with an active On-call license.", + "required": [ + "person_id", + "person_name", + "type", + "updated_by", + "created_at", + "updated_at" + ], + "properties": { + "person_id": { + "type": "integer", + "format": "int64", + "description": "ID of the licensed person." + }, + "person_name": { + "type": "string", + "description": "Display name of the licensed person." + }, + "type": { + "type": "string", + "enum": [ + "fixed", + "temporary" + ], + "description": "License assignment type. `fixed` is explicitly assigned; `temporary` is held from the active license window." + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "Person ID that last changed a fixed license. `0` for temporary licenses." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp when a fixed license was assigned. `0` for temporary licenses." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp when a fixed license was last changed. `0` for temporary licenses." + } + } + }, "ErrorCode": { "type": "string", - "description": "Flashduty error code enum. Every failed API response sets `error.code` to one of these stable wire strings. HTTP status is informational — the authoritative signal is the enum value.\n\n| Code | HTTP | Meaning |\n|---|---|---|\n| `OK` | 200 | Reserved — not returned on real errors. |\n| `InvalidParameter` | 400 | A required parameter is missing or failed validation. |\n| `BadRequest` | 400 | Generic 400 used when no more specific code fits. |\n| `InvalidContentType` | 400 | The `Content-Type` header is not `application/json`. |\n| `ResourceNotFound` | 400 | The referenced resource does not exist. Note: returned as HTTP 400, not 404 (historical choice). |\n| `NoLicense` | 400 | The feature is license-gated and no active license was found. |\n| `ReferenceExist` | 400 | Deletion blocked — other entities still reference this resource. |\n| `Unauthorized` | 401 | `app_key` is missing, invalid, or expired. |\n| `BalanceNotEnough` | 402 | Billing-gated operation with insufficient account balance. |\n| `AccessDenied` | 403 | Authenticated but lacking the permission required for this operation. |\n| `RouteNotFound` | 404 | The request URL path is not a known route. |\n| `MethodNotAllowed` | 405 | The HTTP method is not allowed on this otherwise-known path. |\n| `UndonedOrderExist` | 409 | An outstanding billing order blocks this new one. Wait and retry. |\n| `RequestLocked` | 423 | Operation temporarily locked due to repeated failures. |\n| `EntityTooLarge` | 413 | Request body exceeds the configured max size. |\n| `RequestTooFrequently` | 429 | Rate limit hit — API-global, per-account, or per-integration. |\n| `RequestVerifyRequired` | 428 | Second-factor verification required but not supplied. |\n| `DangerousOperation` | 428 | High-risk operation requires MFA verification. |\n| `InternalError` | 500 | Unhandled server-side error. Include `request_id` in the bug report. |\n| `ServiceUnavailable` | 503 | A backend dependency is unavailable. Try again later. |", + "description": "Flashduty error code enum. Every failed API response sets `error.code` to one of these values. The value is a stable wire string — not a localized message and not a numeric status. HTTP status is informational.", "enum": [ "OK", "InvalidParameter", @@ -25983,30 +26686,7 @@ "DangerousOperation", "InternalError", "ServiceUnavailable" - ], - "x-enumDescriptions": { - "OK": "Reserved — not returned on real errors.", - "InvalidParameter": "A required parameter is missing or failed validation.", - "BadRequest": "Generic 400 used when no more specific code fits.", - "InvalidContentType": "The `Content-Type` header is not `application/json`.", - "ResourceNotFound": "The referenced resource does not exist. Note: returned as HTTP 400, not 404 (historical choice).", - "NoLicense": "The feature is license-gated and no active license was found.", - "ReferenceExist": "Deletion blocked — other entities still reference this resource.", - "Unauthorized": "`app_key` is missing, invalid, or expired.", - "BalanceNotEnough": "Billing-gated operation with insufficient account balance.", - "AccessDenied": "Authenticated but lacking the permission required for this operation.", - "RouteNotFound": "The request URL path is not a known route.", - "MethodNotAllowed": "The HTTP method is not allowed on this otherwise-known path.", - "UndonedOrderExist": "An outstanding billing order blocks this new one. Wait and retry.", - "RequestLocked": "Operation temporarily locked due to repeated failures.", - "EntityTooLarge": "Request body exceeds the configured max size.", - "RequestTooFrequently": "Rate limit hit — API-global, per-account, or per-integration.", - "RequestVerifyRequired": "Second-factor verification required but not supplied.", - "DangerousOperation": "High-risk operation requires MFA verification.", - "InternalError": "Unhandled server-side error. Include `request_id` in the bug report.", - "ServiceUnavailable": "A backend dependency is unavailable. Try again later." - }, - "example": "InvalidParameter" + ] }, "DutyError": { "type": "object", @@ -26017,8 +26697,7 @@ }, "message": { "type": "string", - "description": "Human-readable error message, localized by the caller's Accept-Language. May contain field names, IDs, or other context from the failing request.", - "example": "The specified parameter template_id is not valid." + "description": "Human-readable error message, localized by the caller's Accept-Language. May contain field names, IDs, or other context from the failing request." } }, "required": [ @@ -26167,6 +26846,10 @@ } } } + }, + "fields": { + "$ref": "#/components/schemas/CustomFieldValues", + "description": "Custom field values keyed by field name. When a create form applies, only its visible fields are accepted." } } }, @@ -28195,6 +28878,21 @@ "maxItems": 100, "description": "Incident IDs to acknowledge. At most 100 per call.", "minItems": 1 + }, + "custom_fields": { + "$ref": "#/components/schemas/CustomFieldValues", + "description": "Custom field values for the acknowledgement form. Allowed keys and values depend on the incident's visible form." + }, + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentActionImage" + }, + "description": "Images attached to the acknowledgement timeline entry." + }, + "summary": { + "type": "string", + "description": "Form summary recorded as a timeline comment. Accepted only when the acknowledgement form contains a summary element." } } }, @@ -28249,6 +28947,26 @@ ], "maxLength": 1024, "description": "Optional resolution note applied to every resolved incident." + }, + "description": { + "type": "string", + "maxLength": 6144, + "description": "New incident description, up to 6,144 characters. When set, it replaces the current description before the incident closes." + }, + "custom_fields": { + "$ref": "#/components/schemas/CustomFieldValues", + "description": "Custom field values for the resolution form. Allowed keys and values depend on the incident's visible form." + }, + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentActionImage" + }, + "description": "Images attached to the resolution timeline entry." + }, + "summary": { + "type": "string", + "description": "Form summary recorded as a timeline comment. Accepted only when the resolution form contains a summary element." } } }, @@ -35783,6 +36501,10 @@ "description_html_to_text": { "type": "boolean", "description": "Strip HTML markup from the description column when exporting." + }, + "include_ever_muted": { + "type": "boolean", + "description": "Include incidents that have ever been muted. By default, they are excluded." } } }, @@ -36278,6 +37000,41 @@ }, "creator_name": { "type": "string" + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "Member ID of the incident owner." + }, + "owner_name": { + "type": "string", + "description": "Display name of the incident owner." + }, + "closer_id": { + "type": "integer", + "format": "int64", + "description": "Member ID of the person who closed the incident." + }, + "closer_name": { + "type": "string", + "description": "Display name of the person who closed the incident." + }, + "snoozed_before": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds until which the incident is snoozed." + }, + "ever_muted": { + "type": "boolean", + "description": "Whether the incident has ever been muted." + }, + "frequency": { + "type": "string", + "enum": [ + "frequent", + "rare" + ], + "description": "Incident frequency classification." } } }, @@ -41919,7 +42676,7 @@ }, "args": { "type": "object", - "description": "Polymorphic key/value extension parameters forwarded verbatim to monit-edge. All values must be strings. Semantics depend on `ds_type`: SLS requires `sls.project` + `sls.logstore`; Loki / VictoriaLogs raw mode requires a time range via `.start`/`.end` or `.timespan.value` + `.timespan.unit`; Prometheus and SQL sources ignore it. Always namespace keys by source (e.g. `sls.project`, `loki.type`).", + "description": "Polymorphic key/value extension parameters forwarded verbatim to monit-edge. All values must be strings, and keys are always namespaced by source (e.g. `sls.project`, `loki.type`). Validation depends on `ds_type`: SLS requires `sls.project` + `sls.logstore`. Elasticsearch accepts `es.type` of `sql`, or omitted — any other value is rejected. Loki and VictoriaLogs accept `.type` of `stats`, `raw`, or omitted; `raw` additionally requires a time range, either `.start` + `.end` or `.timespan.value` + `.timespan.unit` (unit one of `s`, `m`, `h`, `d`). Prometheus and the remaining SQL sources ignore `args` entirely.", "additionalProperties": { "type": "string" } @@ -42117,8 +42874,7 @@ "properties": { "target": { "type": "object", - "nullable": true, - "description": "Resolved target. `null` when locator could not be uniquely resolved.", + "description": "Resolved target. Omitted when `target_kind` was not supplied and the locator could not be uniquely inferred.", "properties": { "kind": { "type": "string" @@ -42126,11 +42882,12 @@ "locator": { "type": "string" } - } + }, + "x-flashduty-preserve-absence": true }, "tools": { "type": "array", - "description": "Tool catalog entries. Empty when `error` is non-null.", + "description": "Tool metadata advertised by the target's agent. Always present; an empty array when `error` is set.", "items": { "type": "object", "properties": { @@ -42152,15 +42909,15 @@ }, "output_shape": { "type": "object", - "description": "Optional output JSON Schema; only returned when `include_output_shape=true`." + "description": "JSON Schema of the tool result. Returned only when the request set `include_output_shape` to true.", + "x-flashduty-preserve-absence": true } } } }, "error": { "type": "object", - "nullable": true, - "description": "Business error. `null` on success.", + "description": "Request-level business error. Omitted on success. Returned with HTTP 200 — do not rely on the status code alone.", "properties": { "code": { "type": "string", @@ -42178,9 +42935,11 @@ "items": { "type": "string" }, - "description": "Returned for `ambiguous_target_kind`; lists the candidate kinds." + "description": "Returned for `ambiguous_target_kind`; lists the candidate kinds.", + "x-flashduty-preserve-absence": true } - } + }, + "x-flashduty-preserve-absence": true } } }, @@ -42234,8 +42993,7 @@ "properties": { "target": { "type": "object", - "nullable": true, - "description": "Resolved target.", + "description": "Resolved target. Omitted when `target_kind` was not supplied and the locator could not be uniquely inferred.", "properties": { "kind": { "type": "string" @@ -42243,30 +43001,52 @@ "locator": { "type": "string" } - } + }, + "x-flashduty-preserve-absence": true }, "results": { "type": "array", - "description": "Per-tool results aligned with the request `tools[]` order. Empty when `error` is non-null.", + "description": "Per-tool results, aligned with the request `tools[]` order. Empty when a request-level `error` is present.", "items": { "type": "object", "properties": { "tool": { - "type": "string" + "type": "string", + "description": "Tool name, aligned one-to-one with the request `tools[]` order." + }, + "params": { + "type": "object", + "description": "Request params echoed back by webapi. Normalized to `{}` when the request omitted them or sent null." }, "tool_version": { "type": "string", - "description": "Agent-executed tool version. Empty when execution failed before the agent picked a version." + "description": "Agent-executed tool version. Omitted when the failure occurred before the agent picked a version.", + "x-flashduty-preserve-absence": true }, "data": { "type": "object", - "nullable": true, - "description": "Successful tool payload — passthrough of monit-agent `ToolResultPayload.data` (typically `data` / `summary` / `truncated`). `null` when the per-tool `error` is set." + "description": "Tool business payload. Present only on success. Webapi already unwraps the monit-agent result envelope, so there is no nested `data.data`.", + "x-flashduty-preserve-absence": true + }, + "summary": { + "type": "string", + "description": "Human/LLM-readable one-line distillation of the result. Present only when non-empty.", + "x-flashduty-preserve-absence": true + }, + "truncated": { + "type": "object", + "description": "Present only when the result was actually truncated — the field's presence is the signal, so there is no redundant `truncated: true`.", + "properties": { + "reason": { + "type": "string", + "description": "Why the result was truncated." + } + }, + "x-flashduty-preserve-absence": true }, "error": { "type": "object", - "nullable": true, - "description": "Per-tool error. Mutually exclusive with `data`.", + "description": "Per-tool failure. Present only on failure, and mutually exclusive with `data` / `summary` / `truncated`.", "properties": { "code": { "type": "string", @@ -42275,25 +43055,25 @@ "message": { "type": "string" } - } + }, + "x-flashduty-preserve-absence": true }, "agent_elapsed_ms": { "type": "integer", "format": "int64", - "description": "Agent-self-reported tool execution time in milliseconds, excludes network. May be 0 when the failure occurred before the agent started executing." + "description": "Agent-self-reported tool execution time in milliseconds, excluding network round-trips. May be 0 when the failure occurred before execution started." }, "e2e_elapsed_ms": { "type": "integer", "format": "int64", - "description": "Webapi-observed end-to-end time in milliseconds (webapi → ws → edge → agent → ws → webapi). A large gap vs `agent_elapsed_ms` indicates network / edge slowness." + "description": "Webapi-observed end-to-end time in milliseconds (webapi → ws → edge → agent → ws → webapi). A large gap versus `agent_elapsed_ms` indicates network / edge slowness, not a slow tool." } } } }, "error": { "type": "object", - "nullable": true, - "description": "Request-level business error. `null` on success.", + "description": "Request-level business error. Omitted on success. Returned with HTTP 200 — do not rely on the status code alone.", "properties": { "code": { "type": "string", @@ -42301,7 +43081,6 @@ "target_unavailable", "unknown_toolset_hash", "forward_failed", - "invalid_tool_result", "ambiguous_target_kind" ] }, @@ -42312,9 +43091,11 @@ "type": "array", "items": { "type": "string" - } + }, + "x-flashduty-preserve-absence": true } - } + }, + "x-flashduty-preserve-absence": true } } }, @@ -42385,150 +43166,11 @@ }, "next_cursor": { "type": "string", - "description": "Opaque cursor for the next page. Absent / empty means this is the last page." + "description": "Opaque cursor for the next page. Absent / empty means this is the last page.", + "x-flashduty-preserve-absence": true } } }, - "MCPServerStatusRequest": { - "type": "object", - "description": "MCP server enable/disable by ID.", - "properties": { - "server_id": { - "type": "string", - "description": "Target MCP server ID." - } - }, - "required": [ - "server_id" - ] - }, - "SkillItem": { - "type": "object", - "description": "An AI SRE skill — a packaged SKILL.md bundle the agent can load.", - "properties": { - "skill_id": { - "type": "string", - "description": "Unique skill ID (prefix `skill_`)." - }, - "account_id": { - "type": "integer", - "description": "Owning account ID.", - "format": "int64" - }, - "team_id": { - "type": "integer", - "description": "Team scope: 0 = account-wide; >0 = the owning team.", - "format": "int64" - }, - "skill_name": { - "type": "string", - "description": "Skill name, unique within the account." - }, - "description": { - "type": "string", - "description": "Human-readable description from the SKILL.md frontmatter." - }, - "content": { - "type": "string", - "description": "Full SKILL.md content. Omitted in list responses." - }, - "version": { - "type": "string", - "description": "Skill version from the frontmatter." - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Tags parsed from the frontmatter." - }, - "author": { - "type": "string", - "description": "Skill author." - }, - "license": { - "type": "string", - "description": "Skill license." - }, - "tools": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Required tools (builtin or `mcp:server/tool`)." - }, - "s3_key": { - "type": "string", - "description": "Object-storage key of the skill zip." - }, - "checksum": { - "type": "string", - "description": "SHA-256 checksum of the skill zip." - }, - "status": { - "type": "string", - "description": "Skill status.", - "enum": [ - "enabled", - "disabled" - ] - }, - "created_by": { - "type": "integer", - "description": "Member ID that created the skill.", - "format": "int64" - }, - "created_at": { - "type": "integer", - "format": "int64", - "description": "Creation time. Unix timestamp in milliseconds." - }, - "updated_at": { - "type": "integer", - "format": "int64", - "description": "Last update time. Unix timestamp in milliseconds." - }, - "can_edit": { - "type": "boolean", - "description": "Whether the caller may edit this skill." - }, - "source_template_name": { - "type": "string", - "description": "Marketplace template this skill was installed from; empty for user-authored." - }, - "source_template_version": { - "type": "string", - "description": "Template version at install time." - }, - "update_available": { - "type": "boolean", - "description": "True when the marketplace has a newer template version." - }, - "is_modified": { - "type": "boolean", - "description": "True when a marketplace-sourced skill was edited locally (auto-update skips it)." - }, - "created": { - "type": "boolean", - "description": "Set only on install-from-session responses: true = fresh install, false = in-place update." - } - }, - "required": [ - "skill_id", - "account_id", - "team_id", - "skill_name", - "description", - "status", - "created_by", - "created_at", - "updated_at", - "can_edit", - "update_available", - "is_modified" - ] - }, "ListChangeResponse": { "type": "object", "properties": { @@ -42713,268 +43355,6 @@ } } }, - "A2AAgentListRequest": { - "type": "object", - "description": "Pagination and team filter for listing A2A agents.", - "properties": { - "offset": { - "type": "integer", - "description": "Row offset for pagination.", - "default": 0 - }, - "limit": { - "type": "integer", - "description": "Page size.", - "default": 20 - }, - "team_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "Filter to these team IDs; empty = the caller's visible set." - }, - "include_account": { - "type": [ - "boolean", - "null" - ], - "description": "Include account-scoped (team_id=0) rows. Defaults to true." - } - } - }, - "SkillUpdateRequest": { - "type": "object", - "description": "Editable skill metadata.", - "properties": { - "skill_id": { - "type": "string", - "description": "Target skill ID." - }, - "description": { - "type": "string", - "description": "New description.", - "maxLength": 1024 - }, - "team_id": { - "type": [ - "integer", - "null" - ], - "description": "Reassign team scope: 0 = account-wide; >0 = team. Omit to leave unchanged.", - "format": "int64" - } - }, - "required": [ - "skill_id" - ] - }, - "MCPServerListResponse": { - "type": "object", - "description": "Paginated MCP server list.", - "properties": { - "total": { - "type": "integer", - "description": "Total number of matching servers.", - "format": "int64" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MCPServerItem" - }, - "description": "MCP servers on this page." - } - }, - "required": [ - "total", - "servers" - ] - }, - "MCPServerItem": { - "type": "object", - "description": "An MCP server (connector) registered on the account.", - "properties": { - "server_id": { - "type": "string", - "description": "Unique MCP server ID (prefix `mcp_`)." - }, - "account_id": { - "type": "integer", - "description": "Owning account ID.", - "format": "int64" - }, - "team_id": { - "type": "integer", - "description": "Team scope: 0 = account-wide; >0 = the owning team.", - "format": "int64" - }, - "can_edit": { - "type": "boolean", - "description": "Whether the caller may edit this server." - }, - "server_name": { - "type": "string", - "description": "MCP server name, unique within the account." - }, - "description": { - "type": "string", - "description": "Server description." - }, - "ai_description": { - "type": "string", - "description": "LLM-generated description, preferred over `description` when present." - }, - "transport": { - "type": "string", - "description": "Transport protocol.", - "enum": [ - "stdio", - "sse", - "streamable-http" - ] - }, - "command": { - "type": "string", - "description": "Executable command (stdio transport only)." - }, - "args": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Command arguments (stdio transport)." - }, - "env": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Environment variables (stdio transport). Secret values are masked." - }, - "url": { - "type": "string", - "description": "Server URL (sse / streamable-http transport)." - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "HTTP headers (sse / streamable-http). Secret values are masked." - }, - "proxy_url": { - "type": "string", - "description": "Outbound proxy URL used to reach the server." - }, - "status": { - "type": "string", - "description": "Server status.", - "enum": [ - "enabled", - "disabled" - ] - }, - "connect_timeout": { - "type": "integer", - "description": "Connection timeout in seconds (0 = server default, 10s)." - }, - "call_timeout": { - "type": "integer", - "description": "Tool-call timeout in seconds (0 = server default, 60s)." - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MCPToolInfo" - }, - "description": "Live tool list; populated by the get/test endpoints." - }, - "tool_count": { - "type": "integer", - "description": "Number of tools in the live list." - }, - "list_error": { - "type": "string", - "description": "Error message when the live tool list failed." - }, - "auth_mode": { - "type": "string", - "description": "Authentication mode.", - "enum": [ - "shared", - "per_user_secret", - "per_user_oauth" - ] - }, - "secret_schema": { - "type": "string", - "description": "JSON-encoded secret schema (per_user_secret mode)." - }, - "oauth_metadata": { - "type": "string", - "description": "JSON-encoded OAuth metadata (per_user_oauth mode)." - }, - "source_template_name": { - "type": "string", - "description": "Marketplace template this connector was installed from; empty for user-authored." - }, - "created_by": { - "type": "integer", - "description": "Member ID that created the server.", - "format": "int64" - }, - "created_at": { - "type": "integer", - "format": "int64", - "description": "Creation time. Unix timestamp in milliseconds." - }, - "updated_at": { - "type": "integer", - "format": "int64", - "description": "Last update time. Unix timestamp in milliseconds." - } - }, - "required": [ - "server_id", - "account_id", - "team_id", - "can_edit", - "server_name", - "description", - "transport", - "status", - "connect_timeout", - "call_timeout", - "created_by", - "created_at", - "updated_at" - ] - }, - "MCPToolInfo": { - "type": "object", - "description": "Metadata for one tool exposed by an MCP server.", - "properties": { - "name": { - "type": "string", - "description": "Tool name." - }, - "description": { - "type": "string", - "description": "Tool description." - }, - "input_schema": { - "type": "object", - "additionalProperties": true, - "description": "JSON Schema describing the tool's input parameters." - } - }, - "required": [ - "name", - "description" - ] - }, "GetWarRoomDefaultObserversResponse": { "type": "object", "properties": { @@ -43046,32 +43426,6 @@ "incident_id" ] }, - "SkillDeleteRequest": { - "type": "object", - "description": "Skill deletion by ID.", - "properties": { - "skill_id": { - "type": "string", - "description": "Target skill ID." - } - }, - "required": [ - "skill_id" - ] - }, - "MCPServerGetRequest": { - "type": "object", - "description": "MCP server lookup by ID.", - "properties": { - "server_id": { - "type": "string", - "description": "Target MCP server ID." - } - }, - "required": [ - "server_id" - ] - }, "PreviewTemplateResponse": { "type": "object", "properties": { @@ -43086,43 +43440,15 @@ "message": { "type": "string", "description": "Error message describing why rendering failed, present when success is false." - } - } - }, - "SkillGetRequest": { - "type": "object", - "description": "Skill lookup by ID.", - "properties": { - "skill_id": { - "type": "string", - "description": "Target skill ID." - } - }, - "required": [ - "skill_id" - ] - }, - "SkillListResponse": { - "type": "object", - "description": "Paginated skill list.", - "properties": { - "total": { - "type": "integer", - "description": "Total number of matching skills.", - "format": "int64" }, - "skills": { + "fixed_fields": { "type": "array", "items": { - "$ref": "#/components/schemas/SkillItem" + "$ref": "#/components/schemas/PreviewIncidentCardFixedField" }, - "description": "Skills on this page." + "description": "Fixed incident-card fields returned for supported IM previews after the requested hiding rules are applied." } - }, - "required": [ - "total", - "skills" - ] + } }, "ResponseEnvelope": { "type": "object", @@ -43211,253 +43537,6 @@ } } }, - "SkillStatusRequest": { - "type": "object", - "description": "Skill enable/disable by ID.", - "properties": { - "skill_id": { - "type": "string", - "description": "Target skill ID." - } - }, - "required": [ - "skill_id" - ] - }, - "MCPServerCreateRequest": { - "type": "object", - "description": "Configuration for a new MCP server.", - "properties": { - "server_name": { - "type": "string", - "description": "MCP server name, unique within the account.", - "minLength": 1, - "maxLength": 255 - }, - "description": { - "type": "string", - "description": "Server description.", - "minLength": 1, - "maxLength": 1024 - }, - "transport": { - "type": "string", - "description": "Transport protocol.", - "enum": [ - "stdio", - "sse", - "streamable-http" - ] - }, - "command": { - "type": "string", - "description": "Executable command (stdio transport)." - }, - "args": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Command arguments (stdio transport)." - }, - "env": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Environment variables (stdio transport)." - }, - "url": { - "type": "string", - "description": "Server URL (sse / streamable-http transport)." - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "HTTP headers (sse / streamable-http)." - }, - "connect_timeout": { - "type": "integer", - "description": "Connection timeout in seconds. 0 = default (10s)." - }, - "call_timeout": { - "type": "integer", - "description": "Tool-call timeout in seconds. 0 = default (60s)." - }, - "auth_mode": { - "type": "string", - "description": "Authentication mode: shared (default), per_user_secret, or per_user_oauth." - }, - "secret_schema": { - "type": "string", - "description": "JSON secret schema; required when auth_mode=per_user_secret." - }, - "oauth_metadata": { - "type": "string", - "description": "JSON OAuth metadata; reserved for per_user_oauth." - }, - "status": { - "type": "string", - "description": "Initial status.", - "enum": [ - "enabled", - "disabled" - ], - "default": "enabled" - }, - "team_id": { - "type": "integer", - "description": "Team scope: 0 = account-wide; >0 = team.", - "format": "int64" - }, - "source_template_name": { - "type": "string", - "description": "Marketplace template name when created from a connector template." - } - }, - "required": [ - "server_name", - "description", - "transport" - ] - }, - "MCPServerDeleteRequest": { - "type": "object", - "description": "MCP server deletion by ID.", - "properties": { - "server_id": { - "type": "string", - "description": "Target MCP server ID." - } - }, - "required": [ - "server_id" - ] - }, - "SkillListRequest": { - "type": "object", - "description": "Pagination and team filter for listing skills.", - "properties": { - "p": { - "type": "integer", - "description": "Page number, 1-based.", - "default": 1 - }, - "limit": { - "type": "integer", - "description": "Page size.", - "default": 20 - }, - "team_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "Filter to these team IDs; empty = the caller's visible set." - }, - "include_account": { - "type": [ - "boolean", - "null" - ], - "description": "Include account-scoped (team_id=0) rows. Defaults to true." - } - } - }, - "MCPServerUpdateRequest": { - "type": "object", - "description": "Partial update of an MCP server. Omit a field to leave it unchanged.", - "properties": { - "server_id": { - "type": "string", - "description": "Target MCP server ID." - }, - "server_name": { - "type": "string", - "description": "New name.", - "minLength": 1, - "maxLength": 255 - }, - "description": { - "type": "string", - "description": "New description.", - "minLength": 1, - "maxLength": 1024 - }, - "transport": { - "type": "string", - "description": "Transport protocol.", - "enum": [ - "stdio", - "sse", - "streamable-http" - ] - }, - "command": { - "type": "string", - "description": "Executable command (stdio transport)." - }, - "args": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Command arguments (stdio transport)." - }, - "env": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Environment variables (stdio transport)." - }, - "url": { - "type": "string", - "description": "Server URL (sse / streamable-http transport)." - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "HTTP headers (sse / streamable-http)." - }, - "connect_timeout": { - "type": "integer", - "description": "Connection timeout in seconds. 0 = default (10s)." - }, - "call_timeout": { - "type": "integer", - "description": "Tool-call timeout in seconds. 0 = default (60s)." - }, - "auth_mode": { - "type": "string", - "description": "Authentication mode: shared (default), per_user_secret, or per_user_oauth." - }, - "secret_schema": { - "type": "string", - "description": "JSON secret schema; required when auth_mode=per_user_secret." - }, - "oauth_metadata": { - "type": "string", - "description": "JSON OAuth metadata; reserved for per_user_oauth." - }, - "team_id": { - "type": [ - "integer", - "null" - ], - "description": "Reassign team scope: 0 = account-wide; >0 = team. Omit to leave unchanged.", - "format": "int64" - } - }, - "required": [ - "server_id" - ] - }, "ListWarRoomEnabledResponse": { "type": "object", "properties": { @@ -43571,535 +43650,190 @@ } } }, - "A2AAgentListResponse": { + "AddWarRoomMemberRequest": { "type": "object", - "description": "Paginated A2A agent list.", "properties": { - "items": { + "integration_id": { + "type": "integer", + "description": "IM integration that hosts the war room.", + "format": "int64" + }, + "chat_id": { + "type": "string", + "description": "Chat ID of the war room within the IM platform." + }, + "member_ids": { "type": "array", "items": { - "$ref": "#/components/schemas/A2AAgentItem" + "type": "integer", + "description": "", + "format": "int64" }, - "description": "A2A agents on this page." - }, - "total": { - "type": "integer", - "description": "Total number of matching agents.", - "format": "int64" + "description": "Person IDs to add to the war room." } }, "required": [ - "items", - "total" + "integration_id", + "chat_id", + "member_ids" ] }, - "A2AAgentItem": { + "AccountInfo": { "type": "object", - "description": "A registered A2A (agent-to-agent) remote agent.", "properties": { - "agent_id": { - "type": "string", - "description": "Unique A2A agent ID (prefix `a2a_`)." - }, "account_id": { "type": "integer", - "description": "Owning account ID.", - "format": "int64" + "description": "Account identifier." }, - "team_id": { - "type": "integer", - "description": "Team scope: 0 = account-wide; >0 = the owning team.", - "format": "int64" + "account_name": { + "type": "string", + "description": "Account name." }, - "can_edit": { - "type": "boolean", - "description": "Whether the caller may edit this agent." + "domain": { + "type": "string", + "description": "Primary account domain (login subdomain)." }, - "agent_name": { + "extra_domains": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Additional account domains." + }, + "phone": { "type": "string", - "description": "Agent display name." + "description": "Account contact phone, masked for privacy." }, - "description": { + "country_code": { "type": "string", - "description": "Agent description." + "description": "Calling country code for the contact phone." }, - "card_url": { + "email": { "type": "string", - "description": "URL of the remote agent card." + "description": "Account contact email." }, - "auth_type": { + "avatar": { "type": "string", - "description": "Authentication type for reaching the remote agent." + "description": "Account avatar URL." }, - "auth_config": { + "locale": { + "type": "string", + "description": "Account language preference (e.g. zh-CN, en-US)." + }, + "time_zone": { + "type": "string", + "description": "Account default timezone (IANA name, e.g. Asia/Shanghai)." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Account creation time, Unix timestamp in seconds." + }, + "restrictions": { "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Authentication config; secret values are masked." + "description": "Account access restrictions (present only when configured).", + "properties": { + "ips": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed source IP/CIDR whitelist." + }, + "email_domains": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed login email domains." + }, + "allow_subdomain": { + "type": "boolean", + "description": "Whether subdomains of the allowed email domains are also accepted." + } + } }, - "streaming": { - "type": "boolean", - "description": "Whether the remote agent supports streaming responses." + "mp_plat": { + "type": "string", + "description": "Cloud marketplace platform the account was provisioned from (present only for marketplace accounts)." }, - "status": { + "mp_account_id": { "type": "string", - "description": "Agent status.", - "enum": [ - "enabled", - "disabled" - ] + "description": "Account identifier on the cloud marketplace platform (present only for marketplace accounts)." + } + } + }, + "PreviewTemplateRequest": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "Template content to render." }, - "agent_card_name": { + "type": { "type": "string", - "description": "Agent name resolved from the remote card." + "description": "Template channel type that selects the rendering engine." }, - "agent_card_skills": { + "incident_id": { + "type": "string", + "description": "Incident ID whose data is used to render the template; mock data is used when omitted. A MongoDB ObjectID hex string." + }, + "incident_card_hidden_fields": { + "$ref": "#/components/schemas/IncidentCardHiddenFields" + } + }, + "required": [ + "content", + "type" + ] + }, + "ListStatusPageResponse": { + "type": "object", + "properties": { + "items": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/StatusPageItem" }, - "description": "Skills advertised by the remote card." - }, - "card_resolve_timeout": { + "description": "Status pages owned by the account." + } + } + }, + "StatusPageItem": { + "type": "object", + "properties": { + "page_id": { "type": "integer", - "description": "Card-resolution timeout in seconds." + "description": "Status page ID.", + "format": "int64" }, - "task_timeout": { - "type": "integer", - "description": "Single-task execution timeout in seconds." + "name": { + "type": "string", + "description": "Display name of the status page." }, - "auth_mode": { + "url_name": { "type": "string", - "description": "Authentication mode.", + "description": "URL-safe slug, unique per account." + }, + "type": { + "type": "string", + "description": "Visibility type of the status page.", "enum": [ - "shared", - "per_user_secret", - "per_user_oauth" + "public", + "internal" ] }, - "secret_schema": { + "custom_domain": { "type": "string", - "description": "JSON-encoded secret schema (per_user_secret mode)." + "description": "Custom domain pointing to the status page." }, - "oauth_metadata": { + "logo": { "type": "string", - "description": "JSON-encoded OAuth metadata (per_user_oauth mode)." + "description": "Logo image of the status page." }, - "created_by": { - "type": "integer", - "description": "Member ID that created the agent.", - "format": "int64" - }, - "created_at": { - "type": "integer", - "format": "int64", - "description": "Creation time. Unix timestamp in milliseconds." - }, - "updated_at": { - "type": "integer", - "format": "int64", - "description": "Last update time. Unix timestamp in milliseconds." - } - }, - "required": [ - "agent_id", - "account_id", - "team_id", - "can_edit", - "agent_name", - "description", - "card_url", - "auth_type", - "streaming", - "status", - "card_resolve_timeout", - "task_timeout", - "created_by", - "created_at", - "updated_at" - ] - }, - "A2AAgentUpdateRequest": { - "type": "object", - "description": "Partial update of an A2A agent. A null/omitted field is left unchanged.", - "properties": { - "agent_id": { - "type": "string", - "description": "Target agent ID." - }, - "agent_name": { - "type": [ - "string", - "null" - ], - "description": "New display name. Omit to leave unchanged.", - "maxLength": 128 - }, - "description": { - "type": [ - "string", - "null" - ], - "description": "New description. Omit to leave unchanged.", - "maxLength": 2000 - }, - "card_url": { - "type": [ - "string", - "null" - ], - "description": "New card URL. Omit to leave unchanged." - }, - "auth_type": { - "type": [ - "string", - "null" - ], - "description": "New auth type. Omit to leave unchanged." - }, - "auth_config": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Replace the auth config. Omit to leave unchanged." - }, - "streaming": { - "type": [ - "boolean", - "null" - ], - "description": "Toggle streaming support. Omit to leave unchanged." - }, - "team_id": { - "type": [ - "integer", - "null" - ], - "description": "Reassign team scope. Omit to leave unchanged.", - "format": "int64" - }, - "auth_mode": { - "type": [ - "string", - "null" - ], - "description": "New auth mode: shared, per_user_secret, or per_user_oauth." - }, - "secret_schema": { - "type": [ - "string", - "null" - ], - "description": "New JSON secret schema." - }, - "oauth_metadata": { - "type": [ - "string", - "null" - ], - "description": "New JSON OAuth metadata." - } - }, - "required": [ - "agent_id" - ] - }, - "A2AAgentCreateRequest": { - "type": "object", - "description": "Registration parameters for a new A2A agent.", - "properties": { - "agent_name": { - "type": "string", - "description": "Agent display name.", - "maxLength": 128 - }, - "description": { - "type": "string", - "description": "Agent description.", - "maxLength": 2000 - }, - "card_url": { - "type": "string", - "description": "URL of the remote agent card." - }, - "auth_type": { - "type": "string", - "description": "Authentication type for the remote agent." - }, - "auth_config": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Authentication config key-values." - }, - "streaming": { - "type": "boolean", - "description": "Whether the remote agent supports streaming." - }, - "team_id": { - "type": "integer", - "description": "Team scope: 0 = account-wide; >0 = team.", - "format": "int64" - }, - "auth_mode": { - "type": "string", - "description": "Authentication mode: shared (default), per_user_secret, or per_user_oauth." - }, - "secret_schema": { - "type": "string", - "description": "JSON secret schema; required when auth_mode=per_user_secret." - }, - "oauth_metadata": { - "type": "string", - "description": "JSON OAuth metadata; reserved for per_user_oauth." - } - }, - "required": [ - "agent_name", - "card_url" - ] - }, - "MCPServerListRequest": { - "type": "object", - "description": "Pagination and team filter for listing MCP servers.", - "properties": { - "p": { - "type": "integer", - "description": "Page number, 1-based.", - "default": 1 - }, - "limit": { - "type": "integer", - "description": "Page size.", - "default": 20 - }, - "team_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "Filter to these team IDs; empty = the caller's visible set." - }, - "include_account": { - "type": [ - "boolean", - "null" - ], - "description": "Include account-scoped (team_id=0) rows. Defaults to true." - } - } - }, - "A2AAgentCreateResponse": { - "type": "object", - "description": "Result of registering an A2A agent.", - "properties": { - "agent_id": { - "type": "string", - "description": "ID of the newly created agent." - } - }, - "required": [ - "agent_id" - ] - }, - "AddWarRoomMemberRequest": { - "type": "object", - "properties": { - "integration_id": { - "type": "integer", - "description": "IM integration that hosts the war room.", - "format": "int64" - }, - "chat_id": { - "type": "string", - "description": "Chat ID of the war room within the IM platform." - }, - "member_ids": { - "type": "array", - "items": { - "type": "integer", - "description": "", - "format": "int64" - }, - "description": "Person IDs to add to the war room." - } - }, - "required": [ - "integration_id", - "chat_id", - "member_ids" - ] - }, - "AccountInfo": { - "type": "object", - "properties": { - "account_id": { - "type": "integer", - "description": "Account identifier." - }, - "account_name": { - "type": "string", - "description": "Account name." - }, - "domain": { - "type": "string", - "description": "Primary account domain (login subdomain)." - }, - "extra_domains": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Additional account domains." - }, - "phone": { - "type": "string", - "description": "Account contact phone, masked for privacy." - }, - "country_code": { - "type": "string", - "description": "Calling country code for the contact phone." - }, - "email": { - "type": "string", - "description": "Account contact email." - }, - "avatar": { - "type": "string", - "description": "Account avatar URL." - }, - "locale": { - "type": "string", - "description": "Account language preference (e.g. zh-CN, en-US)." - }, - "time_zone": { - "type": "string", - "description": "Account default timezone (IANA name, e.g. Asia/Shanghai)." - }, - "created_at": { - "type": "integer", - "format": "int64", - "description": "Account creation time, Unix timestamp in seconds." - }, - "restrictions": { - "type": "object", - "description": "Account access restrictions (present only when configured).", - "properties": { - "ips": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Allowed source IP/CIDR whitelist." - }, - "email_domains": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Allowed login email domains." - }, - "allow_subdomain": { - "type": "boolean", - "description": "Whether subdomains of the allowed email domains are also accepted." - } - } - }, - "mp_plat": { - "type": "string", - "description": "Cloud marketplace platform the account was provisioned from (present only for marketplace accounts)." - }, - "mp_account_id": { - "type": "string", - "description": "Account identifier on the cloud marketplace platform (present only for marketplace accounts)." - } - } - }, - "PreviewTemplateRequest": { - "type": "object", - "properties": { - "content": { - "type": "string", - "description": "Template content to render." - }, - "type": { - "type": "string", - "description": "Template channel type that selects the rendering engine." - }, - "incident_id": { - "type": "string", - "description": "Incident ID whose data is used to render the template; mock data is used when omitted. A MongoDB ObjectID hex string." - } - }, - "required": [ - "content", - "type" - ] - }, - "A2AAgentIDRequest": { - "type": "object", - "description": "A2A agent lookup by ID.", - "properties": { - "agent_id": { - "type": "string", - "description": "Target agent ID." - } - }, - "required": [ - "agent_id" - ] - }, - "ListStatusPageResponse": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StatusPageItem" - }, - "description": "Status pages owned by the account." - } - } - }, - "StatusPageItem": { - "type": "object", - "properties": { - "page_id": { - "type": "integer", - "description": "Status page ID.", - "format": "int64" - }, - "name": { - "type": "string", - "description": "Display name of the status page." - }, - "url_name": { - "type": "string", - "description": "URL-safe slug, unique per account." - }, - "type": { - "type": "string", - "description": "Visibility type of the status page.", - "enum": [ - "public", - "internal" - ] - }, - "custom_domain": { - "type": "string", - "description": "Custom domain pointing to the status page." - }, - "logo": { - "type": "string", - "description": "Logo image of the status page." - }, - "dark_logo": { - "type": "string", - "description": "Dark-mode logo image of the status page." + "dark_logo": { + "type": "string", + "description": "Dark-mode logo image of the status page." }, "logo_url": { "type": "string", @@ -44214,865 +43948,364 @@ } } }, - "SessionListRequest": { + "DeletePostMortemTemplateRequest": { "type": "object", - "description": "Filters for listing agent sessions. Reads are scoped to the resolved account and the caller's visible teams.", + "description": "Parameters for deleting a post-mortem template.", + "required": [ + "template_id" + ], "properties": { - "app_name": { + "template_id": { + "type": "string", + "description": "Template ID." + } + } + }, + "InitPostMortemRequest": { + "type": "object", + "description": "Parameters for initializing a post-mortem report from incidents.", + "required": [ + "incident_ids", + "template_id" + ], + "properties": { + "incident_ids": { + "type": "array", + "minItems": 1, + "maxItems": 10, + "items": { + "type": "string" + }, + "description": "Incident IDs to link to the report. 1-10 incidents." + }, + "template_id": { + "type": "string", + "description": "Template ID used to initialize the report." + } + } + }, + "ListPostMortemTemplatesRequest": { + "type": "object", + "description": "Pagination and ordering options for post-mortem templates.", + "properties": { + "order_by": { "type": "string", - "description": "Agent app whose sessions to list.", "enum": [ - "ask-ai", - "support", - "support-website", - "support-flashcat", - "ai-sre", - "template-assistant", - "swe" - ] + "created_at_seconds" + ], + "description": "Field used to order results." + }, + "asc": { + "type": "boolean", + "description": "Ascending order when true." }, "p": { "type": "integer", - "description": "Page number, 1-based.", - "default": 1, - "minimum": 1 + "format": "int64", + "minimum": 0, + "description": "Page number starting at 1." }, "limit": { "type": "integer", - "description": "Page size, 1–100.", - "minimum": 1, + "format": "int64", + "minimum": 0, "maximum": 100, - "default": 20 + "default": 20, + "description": "Page size, at most 100." }, - "orderby": { + "search_after_ctx": { "type": "string", - "description": "Sort field.", - "enum": [ - "created_at", - "updated_at" - ] + "description": "Cursor from a previous response for forward pagination." + } + } + }, + "ListPostMortemTemplatesResponse": { + "type": "object", + "description": "Paginated list of post-mortem templates.", + "required": [ + "items", + "total", + "has_next_page" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PostMortemTemplate" + }, + "description": "Templates in the current page." }, - "asc": { - "type": "boolean", - "description": "Ascending order when true; applies only when `orderby` is set." + "total": { + "type": "integer", + "format": "int64", + "description": "Total matching templates." }, - "include_subagent_sessions": { + "has_next_page": { "type": "boolean", - "description": "Include subagent-dispatched sessions in the list." - }, - "keyword": { - "type": "string", - "description": "Filter by session-name keyword.", - "maxLength": 64 + "description": "True when another page is available." }, - "scope": { + "search_after_ctx": { "type": "string", - "description": "Visibility scope: all (own + member-of-team rows, default), personal, or team.", - "enum": [ - "all", - "personal", - "team" - ] - }, - "team_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "Optional explicit team filter; intersects with `scope`." - }, - "entry_kinds": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "web", - "im", - "api", - "automation" - ] - }, - "description": "Restrict to sessions produced by these surfaces; empty returns every kind." - }, - "status": { - "type": "string", - "description": "Archive bucket: active (default) returns un-archived, archived returns archived, all returns both.", - "enum": [ - "active", - "archived", - "all" - ] + "description": "Cursor for forward pagination." } - }, - "required": [ - "app_name" - ] + } }, - "SessionTokenUsage": { + "PostMortemTemplate": { "type": "object", - "description": "Cumulative session-level token rollup across all turns. The account-billing source of truth.", + "description": "Post-mortem report template.", + "required": [ + "account_id", + "template_id", + "name", + "description", + "content", + "content_markdown", + "team_id", + "created_at_seconds", + "updated_at_seconds" + ], "properties": { - "input_tokens": { - "type": "integer", - "format": "int64", - "description": "Total prompt (input) tokens, including the cached portion." - }, - "cached_tokens": { + "account_id": { "type": "integer", "format": "int64", - "description": "Portion of input_tokens served from the prompt cache." + "description": "Account ID that owns the template. 0 for built-in templates." }, - "output_tokens": { - "type": "integer", - "format": "int64", - "description": "Total generated (output) tokens." + "template_id": { + "type": "string", + "description": "Template ID. Built-in templates use a stable `post_mortem_default_tmpl_*` ID." }, - "reasoning_tokens": { - "type": "integer", - "format": "int64", - "description": "Total reasoning/thinking tokens." - } - } - }, - "EnvironmentBinding": { - "type": "object", - "description": "The runner or cloud sandbox the session is bound to. Null until the first message.", - "properties": { - "kind": { + "name": { "type": "string", - "description": "Environment kind (e.g. runner, sandbox)." + "description": "Template name shown in the console." }, - "id": { + "description": { "type": "string", - "description": "Environment identifier." + "description": "Template description." }, - "name": { + "content": { "type": "string", - "description": "Human-readable environment name." + "description": "BlockNote JSON content used to initialize the report body." }, - "status": { + "content_markdown": { "type": "string", - "description": "Binding status." + "description": "Markdown version of the template content, used by AI generation." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Managing team ID. Built-in templates use 0." + }, + "created_at_seconds": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds when the template was created." + }, + "updated_at_seconds": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds when the template was last updated." } } }, - "ContextResolvedItem": { + "PreviewSyncRequest": { "type": "object", - "description": "Snapshot of the three-tier knowledge-pack resolution for this session.", + "required": [ + "ds_type", + "ds_name", + "expr" + ], + "description": "Parameters for a synchronous datasource query preview.", "properties": { - "account_pack_id": { + "ds_type": { "type": "string", - "description": "Resolved account-scoped pack id." + "description": "Datasource type, e.g. `prometheus`, `loki`, `elasticsearch`." }, - "team_pack_id": { + "ds_name": { "type": "string", - "description": "Resolved team-scoped pack id." + "description": "Datasource display name as configured in the account." }, - "incident_id": { + "expr": { "type": "string", - "description": "Bound incident id, when war-room originated." + "description": "Query expression. Format depends on `ds_type` (PromQL for Prometheus, LogQL for Loki, etc.)." }, - "resolved_at_ms": { + "delay_seconds": { "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds when the packs were resolved." + "description": "Shift the query window backward by this many seconds to compensate for data ingestion latency." }, - "versions": { + "args": { "type": "object", "additionalProperties": { - "type": "integer" + "type": "string" }, - "description": "Per-pack resolved version map." + "description": "Additional type-specific query arguments." } } }, - "SessionItem": { + "PreviewSyncResponse": { "type": "object", - "description": "One agent session row.", + "description": "Raw JSON response from the datasource. Schema varies by datasource type." + }, + "ResetPostMortemBasicsRequest": { + "type": "object", + "description": "Basic incident facts to write back to a post-mortem report.", + "required": [ + "post_mortem_id", + "incidents_highest_severity", + "incidents_earliest_start_seconds" + ], "properties": { - "session_id": { - "type": "string", - "description": "Session identifier." - }, - "parent_session_id": { - "type": "string", - "description": "Parent session id for subagent (child) sessions; empty otherwise." - }, - "session_name": { - "type": "string", - "description": "Session title; may be empty for untitled sessions." - }, - "app_name": { - "type": "string", - "description": "Agent app that owns the session." - }, - "entry_kind": { - "type": "string", - "description": "Surface that created the session.", - "enum": [ - "web", - "im", - "api", - "scheduled", - "subagent" - ] - }, - "person_id": { - "type": "string", - "description": "Creator person id." - }, - "team_id": { - "type": "integer", - "format": "int64", - "description": "Owning team id; 0 means no team is bound. Immutable after create." - }, - "team_name": { - "type": "string", - "description": "Resolved team name; empty for unbound rows or deleted teams." - }, - "is_mine": { - "type": "boolean", - "description": "True when the caller created this session." - }, - "can_manage": { - "type": "boolean", - "description": "True when the caller may rename/archive/delete the session." - }, - "status": { + "post_mortem_id": { "type": "string", - "description": "Lifecycle status.", - "enum": [ - "enabled", - "deleted" - ] - }, - "incognito": { - "type": "boolean", - "description": "True for incognito (non-persisted-memory) sessions." - }, - "created_at": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds when the session was created." - }, - "updated_at": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds of the last session update." + "description": "Post-mortem ID." }, - "template_staging_round_id": { + "incidents_highest_severity": { "type": "string", - "description": "Current save→validate round id (template-assistant only); empty otherwise." - }, - "state": { - "type": "object", - "additionalProperties": true, - "description": "Raw session-state bag (session-scoped keys). Omitted when empty." - }, - "bound_environment": { - "$ref": "#/components/schemas/EnvironmentBinding" - }, - "context_resolved": { - "$ref": "#/components/schemas/ContextResolvedItem" - }, - "token_usage": { - "$ref": "#/components/schemas/SessionTokenUsage" - }, - "current_context_tokens": { - "type": "integer", - "format": "int64", - "description": "Size in tokens of the LLM context window as of the most recent turn. 0 means no turn has completed." - }, - "context_window": { - "type": "integer", - "format": "int64", - "description": "The bound model's max context size in tokens. 0 means unknown." - }, - "archived_at": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds when archived; 0 means not archived." + "description": "Highest severity among linked incidents." }, - "pinned_at": { + "incidents_earliest_start_seconds": { "type": "integer", "format": "int64", - "description": "Caller's per-user pin timestamp in milliseconds; 0 means not pinned." + "minimum": 1, + "description": "Unix timestamp in seconds for the earliest linked incident start time." }, - "last_event_at": { + "incidents_latest_close_seconds": { "type": "integer", "format": "int64", - "description": "Unix timestamp in milliseconds of the most recent assistant-side event." - }, - "is_running": { - "type": "boolean", - "description": "True when an agent turn is currently in flight for this session." + "minimum": 0, + "description": "Unix timestamp in seconds for the latest linked incident close time. 0 when still open." }, - "has_unread": { - "type": "boolean", - "description": "True when there is assistant output the caller has not yet viewed." - } - } - }, - "SessionListResponse": { - "type": "object", - "description": "A page of agent sessions.", - "properties": { - "total": { + "incidents_total_duration_seconds": { "type": "integer", "format": "int64", - "description": "Total number of sessions matching the filter (ignoring pagination)." + "minimum": 0, + "description": "Total incident duration in seconds." }, - "sessions": { + "responder_ids": { "type": "array", "items": { - "$ref": "#/components/schemas/SessionItem" + "type": "integer", + "format": "int64" }, - "description": "The page of sessions." + "description": "Responder member IDs to store on the report." } } }, - "SessionGetRequest": { + "ResetPostMortemFollowUpsRequest": { "type": "object", - "description": "Fetch one session plus a backward-paged window of its most recent events.", + "description": "Parameters for replacing post-mortem follow-up action items.", + "required": [ + "post_mortem_id" + ], "properties": { - "session_id": { + "post_mortem_id": { "type": "string", - "description": "Target session ID.", - "minLength": 1 - }, - "num_recent_events": { - "type": "integer", - "description": "Legacy page size: number of most-recent events to return. Superseded by `limit` when both are set; 0 uses the server default (100).", - "minimum": 0, - "maximum": 1000 - }, - "limit": { - "type": "integer", - "description": "Page size for events; takes precedence over `num_recent_events`. 0 uses the server default (100).", - "minimum": 0, - "maximum": 1000 + "description": "Post-mortem ID." }, - "search_after_ctx": { + "follow_ups": { "type": "string", - "description": "Opaque keyset cursor from a previous response; pass it back to fetch the next older page.", - "maxLength": 4096 + "description": "Follow-up action items as free text." } - }, - "required": [ - "session_id" - ] + } }, - "EventItem": { + "ResetPostMortemStatusRequest": { "type": "object", - "description": "One persisted session event. content/actions/usage_metadata carry the raw ADK envelope; treat them as opaque structured payloads.", + "description": "Parameters for changing a post-mortem report status.", + "required": [ + "post_mortem_id", + "status" + ], "properties": { - "event_id": { - "type": "string", - "description": "Event identifier." - }, - "session_id": { - "type": "string", - "description": "Owning session id." - }, - "invocation_id": { - "type": "string", - "description": "ADK invocation id grouping a turn." - }, - "author": { - "type": "string", - "description": "Event author (e.g. user, the agent name)." - }, - "branch": { - "type": "string", - "description": "ADK branch path for nested agents." - }, - "content": { - "type": "object", - "additionalProperties": true, - "description": "ADK content envelope {role, parts:[...]}." - }, - "actions": { - "type": "object", - "additionalProperties": true, - "description": "ADK actions envelope (state deltas, transfers, escalation)." - }, - "usage_metadata": { - "type": "object", - "additionalProperties": true, - "description": "Per-turn token usage metadata." - }, - "partial": { - "type": "boolean", - "description": "True for a streaming partial chunk." - }, - "turn_complete": { - "type": "boolean", - "description": "True on the terminal event of a turn." - }, - "error_code": { - "type": "string", - "description": "Error code when the event represents a failure." - }, - "error_message": { + "post_mortem_id": { "type": "string", - "description": "Human-readable error message, when present." + "description": "Post-mortem ID." }, "status": { "type": "string", - "description": "Event status.", "enum": [ - "normal", - "compressed" - ] - }, - "created_at": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds when the event was written." + "drafting", + "published" + ], + "description": "Target report status." } } }, - "SessionGetResponse": { + "ResetPostMortemTitleRequest": { "type": "object", - "description": "A session plus a backward-paged window of its events.", + "description": "Parameters for changing a post-mortem report title.", + "required": [ + "post_mortem_id", + "title" + ], "properties": { - "session": { - "$ref": "#/components/schemas/SessionItem" - }, - "events": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EventItem" - }, - "description": "Recent events, ascending by (created_at, event_id)." - }, - "has_more_older": { - "type": "boolean", - "description": "True when older events remain beyond this page." + "post_mortem_id": { + "type": "string", + "description": "Post-mortem ID." }, - "search_after_ctx": { + "title": { "type": "string", - "description": "Opaque keyset cursor; pass back as search_after_ctx to fetch the next older page. Omitted when has_more_older is false." + "description": "New report title." } } }, - "SessionExportRequest": { + "RumWebhookTestRequest": { "type": "object", - "description": "Export the full event transcript of one session as a streaming NDJSON body.", + "description": "Parameters for sending a sample RUM alert webhook.", + "required": [ + "application_id", + "webhook_url" + ], "properties": { - "session_id": { + "application_id": { "type": "string", - "description": "Target session ID." + "description": "RUM application ID." }, - "include_subagents": { - "type": "boolean", - "description": "When true, each subagent_dispatch line is followed by the child session's full event stream, bracketed by its own session_meta. Defaults to false." + "webhook_url": { + "type": "string", + "format": "uri", + "description": "Webhook URL to receive the sample alert event." } - }, - "required": [ - "session_id" - ] + } }, - "SkillUploadRequest": { + "RumWebhookTestResponse": { "type": "object", - "description": "Multipart form for uploading a skill archive.", + "description": "Result of the webhook test delivery.", + "required": [ + "ok", + "status_code", + "message" + ], "properties": { - "file": { - "type": "string", - "format": "binary", - "description": "Skill archive (.skill / .zip / .tar.gz / .tgz). Max 100MB." + "ok": { + "type": "boolean", + "description": "Whether the webhook endpoint accepted the sample event." }, - "team_id": { + "status_code": { "type": "integer", - "description": "Team scope for the new skill: 0 = account-wide.", - "format": "int64" - }, - "replace": { - "type": "boolean", - "description": "When true, overwrite an existing same-name skill." + "description": "HTTP status code returned by the webhook endpoint. 0 when the request did not receive a response." }, - "skill_id": { - "type": "string", - "description": "When replacing a specific skill, its skill ID." - } - }, - "required": [ - "file" - ] - }, - "SessionDeleteRequest": { - "type": "object", - "description": "Session deletion by ID.", - "properties": { - "session_id": { + "message": { "type": "string", - "description": "Target session ID.", - "minLength": 1 + "description": "`ok` on success, otherwise the delivery error message." } - }, - "required": [ - "session_id" - ] + } }, - "DeletePostMortemTemplateRequest": { + "TryLinkPersonRequest": { "type": "object", - "description": "Parameters for deleting a post-mortem template.", + "description": "Parameters for attempting automatic IM account linking.", "required": [ - "template_id" + "integration_id" ], "properties": { - "template_id": { - "type": "string", - "description": "Template ID." + "integration_id": { + "type": "integer", + "format": "int64", + "description": "IM integration ID." } } }, - "InitPostMortemRequest": { + "TryLinkPersonResponse": { "type": "object", - "description": "Parameters for initializing a post-mortem report from incidents.", - "required": [ - "incident_ids", - "template_id" - ], - "properties": { - "incident_ids": { - "type": "array", - "minItems": 1, - "maxItems": 10, - "items": { - "type": "string" - }, - "description": "Incident IDs to link to the report. 1-10 incidents." - }, - "template_id": { - "type": "string", - "description": "Template ID used to initialize the report." - } - } - }, - "ListPostMortemTemplatesRequest": { - "type": "object", - "description": "Pagination and ordering options for post-mortem templates.", - "properties": { - "order_by": { - "type": "string", - "enum": [ - "created_at_seconds" - ], - "description": "Field used to order results." - }, - "asc": { - "type": "boolean", - "description": "Ascending order when true." - }, - "p": { - "type": "integer", - "format": "int64", - "minimum": 0, - "description": "Page number starting at 1." - }, - "limit": { - "type": "integer", - "format": "int64", - "minimum": 0, - "maximum": 100, - "default": 20, - "description": "Page size, at most 100." - }, - "search_after_ctx": { - "type": "string", - "description": "Cursor from a previous response for forward pagination." - } - } - }, - "ListPostMortemTemplatesResponse": { - "type": "object", - "description": "Paginated list of post-mortem templates.", - "required": [ - "items", - "total", - "has_next_page" - ], - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PostMortemTemplate" - }, - "description": "Templates in the current page." - }, - "total": { - "type": "integer", - "format": "int64", - "description": "Total matching templates." - }, - "has_next_page": { - "type": "boolean", - "description": "True when another page is available." - }, - "search_after_ctx": { - "type": "string", - "description": "Cursor for forward pagination." - } - } - }, - "PostMortemTemplate": { - "type": "object", - "description": "Post-mortem report template.", - "required": [ - "account_id", - "template_id", - "name", - "description", - "content", - "content_markdown", - "team_id", - "created_at_seconds", - "updated_at_seconds" - ], - "properties": { - "account_id": { - "type": "integer", - "format": "int64", - "description": "Account ID that owns the template. 0 for built-in templates." - }, - "template_id": { - "type": "string", - "description": "Template ID. Built-in templates use a stable `post_mortem_default_tmpl_*` ID." - }, - "name": { - "type": "string", - "description": "Template name shown in the console." - }, - "description": { - "type": "string", - "description": "Template description." - }, - "content": { - "type": "string", - "description": "BlockNote JSON content used to initialize the report body." - }, - "content_markdown": { - "type": "string", - "description": "Markdown version of the template content, used by AI generation." - }, - "team_id": { - "type": "integer", - "format": "int64", - "description": "Managing team ID. Built-in templates use 0." - }, - "created_at_seconds": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in seconds when the template was created." - }, - "updated_at_seconds": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in seconds when the template was last updated." - } - } - }, - "PreviewSyncRequest": { - "type": "object", - "required": [ - "ds_type", - "ds_name", - "expr" - ], - "description": "Parameters for a synchronous datasource query preview.", - "properties": { - "ds_type": { - "type": "string", - "description": "Datasource type, e.g. `prometheus`, `loki`, `elasticsearch`." - }, - "ds_name": { - "type": "string", - "description": "Datasource display name as configured in the account." - }, - "expr": { - "type": "string", - "description": "Query expression. Format depends on `ds_type` (PromQL for Prometheus, LogQL for Loki, etc.)." - }, - "delay_seconds": { - "type": "integer", - "description": "Shift the query window backward by this many seconds to compensate for data ingestion latency." - }, - "args": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Additional type-specific query arguments." - } - } - }, - "PreviewSyncResponse": { - "type": "object", - "description": "Raw JSON response from the datasource. Schema varies by datasource type." - }, - "ResetPostMortemBasicsRequest": { - "type": "object", - "description": "Basic incident facts to write back to a post-mortem report.", - "required": [ - "post_mortem_id", - "incidents_highest_severity", - "incidents_earliest_start_seconds" - ], - "properties": { - "post_mortem_id": { - "type": "string", - "description": "Post-mortem ID." - }, - "incidents_highest_severity": { - "type": "string", - "description": "Highest severity among linked incidents." - }, - "incidents_earliest_start_seconds": { - "type": "integer", - "format": "int64", - "minimum": 1, - "description": "Unix timestamp in seconds for the earliest linked incident start time." - }, - "incidents_latest_close_seconds": { - "type": "integer", - "format": "int64", - "minimum": 0, - "description": "Unix timestamp in seconds for the latest linked incident close time. 0 when still open." - }, - "incidents_total_duration_seconds": { - "type": "integer", - "format": "int64", - "minimum": 0, - "description": "Total incident duration in seconds." - }, - "responder_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "Responder member IDs to store on the report." - } - } - }, - "ResetPostMortemFollowUpsRequest": { - "type": "object", - "description": "Parameters for replacing post-mortem follow-up action items.", - "required": [ - "post_mortem_id" - ], - "properties": { - "post_mortem_id": { - "type": "string", - "description": "Post-mortem ID." - }, - "follow_ups": { - "type": "string", - "description": "Follow-up action items as free text." - } - } - }, - "ResetPostMortemStatusRequest": { - "type": "object", - "description": "Parameters for changing a post-mortem report status.", - "required": [ - "post_mortem_id", - "status" - ], - "properties": { - "post_mortem_id": { - "type": "string", - "description": "Post-mortem ID." - }, - "status": { - "type": "string", - "enum": [ - "drafting", - "published" - ], - "description": "Target report status." - } - } - }, - "ResetPostMortemTitleRequest": { - "type": "object", - "description": "Parameters for changing a post-mortem report title.", - "required": [ - "post_mortem_id", - "title" - ], - "properties": { - "post_mortem_id": { - "type": "string", - "description": "Post-mortem ID." - }, - "title": { - "type": "string", - "description": "New report title." - } - } - }, - "RumWebhookTestRequest": { - "type": "object", - "description": "Parameters for sending a sample RUM alert webhook.", - "required": [ - "application_id", - "webhook_url" - ], - "properties": { - "application_id": { - "type": "string", - "description": "RUM application ID." - }, - "webhook_url": { - "type": "string", - "format": "uri", - "description": "Webhook URL to receive the sample alert event." - } - } - }, - "RumWebhookTestResponse": { - "type": "object", - "description": "Result of the webhook test delivery.", - "required": [ - "ok", - "status_code", - "message" - ], - "properties": { - "ok": { - "type": "boolean", - "description": "Whether the webhook endpoint accepted the sample event." - }, - "status_code": { - "type": "integer", - "description": "HTTP status code returned by the webhook endpoint. 0 when the request did not receive a response." - }, - "message": { - "type": "string", - "description": "`ok` on success, otherwise the delivery error message." - } - } - }, - "TryLinkPersonRequest": { - "type": "object", - "description": "Parameters for attempting automatic IM account linking.", - "required": [ - "integration_id" - ], - "properties": { - "integration_id": { - "type": "integer", - "format": "int64", - "description": "IM integration ID." - } - } - }, - "TryLinkPersonResponse": { - "type": "object", - "description": "People linked by this attempt.", + "description": "People linked by this attempt.", "required": [ "new_linked_person_ids" ], @@ -45415,1741 +44648,3930 @@ } } }, - "AutomationRuleCreateRequest": { + "FacetCountItem": { "type": "object", - "description": "Create an Automation rule.", + "description": "A facet value and its occurrence count.", + "required": [ + "facet_value", + "count" + ], "properties": { - "name": { - "type": "string", - "minLength": 1, - "maxLength": 255, - "description": "Rule name." + "facet_value": { + "description": "The facet value. Type matches the field's `value_type`." }, - "team_id": { + "count": { "type": "integer", "format": "int64", - "minimum": 0, - "description": "Scope team ID. 0 or omitted means a personal rule; >0 means a team in the account. Immutable after creation." - }, - "enabled": { - "type": "boolean", - "description": "Whether the rule is enabled after creation. Omitted API value is false; Chat/CLI create sends true by default unless the user asks for disabled." - }, - "cron_expr": { + "description": "Number of events with this facet value in the time range.", + "example": 1523 + } + } + }, + "RumDataAggregateFunction": { + "type": "object", + "description": "Aggregate function metadata used by the sampling engine.", + "required": [ + "type", + "column_name", + "column_index" + ], + "properties": { + "type": { "type": "string", - "description": "Run cadence. Supports 4 fields (`hour day month weekday`, minute defaults to 0) and 5 fields (`minute hour day month weekday`). The minute must be one fixed integer; 6-field seconds are not supported. The create API currently requires this field even for HTTP-POST-only rules; send a valid cron and set `schedule_trigger_enabled=false`.", - "example": "15 9 * * *" - }, - "schedule_trigger_enabled": { - "type": [ - "boolean", - "null" - ], - "description": "Whether the schedule trigger is enabled. Defaults to true when omitted; HTTP-POST-only rules should send false." + "description": "Aggregate function type." }, - "prompt": { + "column_name": { "type": "string", - "minLength": 1, - "description": "Task prompt sent to the AI SRE agent on each run." + "description": "Column name used by the aggregate." }, - "environment_kind": { + "column_index": { + "type": "integer", + "description": "Column index used by the aggregate." + } + } + }, + "RumDataFieldMeta": { + "type": "object", + "description": "Metadata for one returned column.", + "required": [ + "name", + "type", + "nullable" + ], + "properties": { + "name": { "type": "string", - "description": "Runtime environment kind. Omit or send an empty value for automatic selection.", - "enum": [ - "", - "cloud", - "byoc" - ] + "description": "Column name." }, - "environment_id": { + "type": { "type": "string", - "description": "BYOC Runner ID. Used only when `environment_kind=byoc`." - }, - "http_post_trigger_enabled": { - "type": "boolean", - "description": "Whether to create and enable an HTTP POST trigger. When enabled, the response includes a one-time token." + "description": "Backend database type name for this column." }, - "oncall_incident_trigger_enabled": { + "nullable": { "type": "boolean", - "description": "Whether the On-call incident trigger is enabled." - }, - "oncall_incident_channel_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64", - "minimum": 1 - }, - "description": "On-call integration IDs to watch. Creating or enabling this trigger requires at least one valid ID." - }, - "oncall_incident_severities": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "Critical", - "Warning", - "Info" - ] - }, - "description": "Incident severities to watch. Supported values are Critical, Warning, and Info; creating or enabling this trigger requires at least one value." + "description": "Whether values in this column may be null." } - }, - "required": [ - "name", - "cron_expr", - "prompt" - ] + } }, - "AutomationRuleUpdateRequest": { + "RumDataQueryDefinition": { "type": "object", - "description": "Update an Automation rule. Omit fields to leave them unchanged.", + "description": "One RUM data query definition.", + "required": [ + "id", + "sql", + "format" + ], "properties": { - "rule_id": { + "id": { "type": "string", - "description": "Target rule ID." + "maxLength": 64, + "description": "Client-supplied query ID. The same value is used as the key in the response object." }, - "name": { + "sql": { "type": "string", - "maxLength": 255, - "description": "New rule name." + "description": "RUM SQL query to execute." }, - "team_id": { + "dql": { + "type": "string", + "description": "Optional RUM DQL filter expression used together with SQL validation." + }, + "format": { + "type": "string", + "enum": [ + "time_series", + "table" + ], + "description": "Output format. `table` returns rows; `time_series` returns bucketed time-series rows." + }, + "interval": { "type": "integer", "format": "int64", - "minimum": 0, - "description": "Only the current value is accepted; personal/team scope is immutable after creation." + "exclusiveMinimum": 0, + "default": 3600, + "description": "Time bucket interval in seconds for `time_series` queries." }, - "enabled": { - "type": "boolean", - "description": "Whether the rule is enabled." + "max_points": { + "type": "integer", + "format": "int64", + "exclusiveMinimum": 0, + "default": 1226, + "description": "Maximum number of points for `time_series` queries." }, - "cron_expr": { + "time_zone": { "type": "string", - "description": "Run cadence. Supports 4 fields (`hour day month weekday`, minute defaults to 0) and 5 fields (`minute hour day month weekday`). The minute must be one fixed integer; 6-field seconds are not supported. The create API currently requires this field even for HTTP-POST-only rules; send a valid cron and set `schedule_trigger_enabled=false`.", - "example": "15 9 * * *" + "description": "IANA time zone name used when evaluating time functions, such as `Asia/Shanghai`." }, - "schedule_trigger_enabled": { - "type": "boolean", - "description": "Whether the schedule trigger is enabled." - }, - "prompt": { + "search_after_ctx": { "type": "string", - "description": "New task prompt." + "description": "Opaque cursor returned by a previous table query for continuing pagination." }, - "environment_kind": { - "type": "string", - "description": "Runtime environment kind. Omit or send an empty value for automatic selection.", - "enum": [ - "", - "cloud", - "byoc" - ] + "disable_sampling": { + "type": "boolean", + "description": "When true, asks the query engine to avoid sampling when possible." + } + } + }, + "RumDataQueryOutput": { + "type": "object", + "description": "Result for one query. Failed subqueries populate `error`; successful ones populate `data`.", + "properties": { + "error": { + "$ref": "#/components/schemas/DutyError" }, - "environment_id": { - "type": "string", - "description": "BYOC Runner ID." + "data": { + "$ref": "#/components/schemas/RumDataQueryResult" + } + } + }, + "RumDataQueryRequest": { + "type": "object", + "description": "Batch of RUM data queries over a bounded time range.", + "required": [ + "start_time", + "end_time", + "queries" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "Start of the query window, Unix epoch milliseconds.", + "example": 1712620800000 }, - "http_post_trigger_enabled": { - "type": "boolean", - "description": "Whether the HTTP POST trigger is enabled. Sending true creates one when missing." + "end_time": { + "type": "integer", + "format": "int64", + "description": "End of the query window, Unix epoch milliseconds. Maximum 31-day span.", + "example": 1712707200000 }, - "oncall_incident_trigger_enabled": { - "type": "boolean", - "description": "Whether the On-call incident trigger is enabled." + "queries": { + "type": "array", + "description": "Queries to execute concurrently. 1 to 10 queries are allowed.", + "minItems": 1, + "maxItems": 10, + "items": { + "$ref": "#/components/schemas/RumDataQueryDefinition" + } + } + } + }, + "RumDataQueryResponse": { + "type": "object", + "description": "Map from request query ID to that query's result or error.", + "additionalProperties": { + "$ref": "#/components/schemas/RumDataQueryOutput" + } + }, + "RumDataQueryResult": { + "type": "object", + "description": "Rows and metadata returned by one RUM data query.", + "required": [ + "fields", + "values" + ], + "properties": { + "search_after_ctx": { + "type": "string", + "description": "Opaque cursor for continuing paginated table queries." }, - "oncall_incident_channel_ids": { + "fields": { "type": "array", "items": { - "type": "integer", - "format": "int64", - "minimum": 1 + "$ref": "#/components/schemas/RumDataFieldMeta" }, - "description": "On-call integration IDs to watch. Creating or enabling this trigger requires at least one valid ID." + "description": "Column metadata for the values matrix." }, - "oncall_incident_severities": { + "values": { "type": "array", + "description": "Rows returned by the query. Each row aligns with `fields` by index.", "items": { - "type": "string", - "enum": [ - "Critical", - "Warning", - "Info" - ] - }, - "description": "Incident severities to watch. Supported values are Critical, Warning, and Info; creating or enabling this trigger requires at least one value." + "type": "array", + "items": {} + } }, - "rotate_http_post_trigger_token": { - "type": "boolean", - "description": "Whether to rotate the HTTP POST trigger token. The new token is returned only in this response." + "interval": { + "type": "integer", + "format": "int64", + "description": "Effective time bucket interval in seconds for time-series queries." + }, + "sampling": { + "$ref": "#/components/schemas/RumDataSamplingDecision" } - }, - "required": [ - "rule_id" - ] + } }, - "AutomationRuleIDRequest": { + "RumDataSamplingDecision": { "type": "object", + "description": "Sampling metadata when the query engine uses sampled data.", + "required": [ + "enabled", + "scale_factor" + ], "properties": { - "rule_id": { - "type": "string", - "description": "Rule ID." + "enabled": { + "type": "boolean", + "description": "Whether sampling was applied." + }, + "scale_factor": { + "type": "number", + "description": "Multiplier used to scale sampled counts back to estimated full counts." + }, + "selected_tablets": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Storage tablets selected for the sampled query." + }, + "aggregate_funcs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumDataAggregateFunction" + }, + "description": "Aggregate functions affected by sampling." } - }, - "required": [ - "rule_id" - ] + } }, - "AutomationRuleListRequest": { + "RumFacetCountRequest": { "type": "object", - "description": "List Automation rules visible to the caller.", + "description": "Parameters for counting facet value distribution.", + "required": [ + "scope", + "facet_key", + "start_time", + "end_time" + ], "properties": { - "p": { + "scope": { + "type": "string", + "description": "RUM data scope to query.", + "enum": [ + "session", + "view", + "action", + "error", + "resource", + "long_task", + "vital", + "issue", + "sourcemap" + ] + }, + "facet_key": { + "type": "string", + "description": "The field key to count value distribution for." + }, + "facet_value": { + "description": "When set, filter events where `facet_key` equals this value before counting. Accepts string, number, or boolean." + }, + "start_time": { "type": "integer", - "default": 1, - "description": "Page number, 1-based." + "format": "int64", + "description": "Start of the time range, Unix epoch milliseconds.", + "example": 1712620800000 }, - "limit": { + "end_time": { "type": "integer", - "default": 20, - "maximum": 100, - "description": "Page size." + "format": "int64", + "description": "End of the time range, Unix epoch milliseconds. Maximum 31-day span.", + "example": 1712707200000 }, - "scope": { + "dql": { "type": "string", - "enum": [ - "all", - "personal", - "team" - ], - "description": "Scope filter. Defaults to all." + "description": "RUM DQL filter expression applied before counting." }, - "team_ids": { + "sql": { + "type": "string", + "description": "SQL WHERE clause (no SELECT) for additional filtering." + }, + "limit": { + "type": "integer", + "description": "Maximum number of top values to return. Default 100, maximum 100.", + "maximum": 100, + "default": 100 + } + } + }, + "RumFacetCountResponse": { + "type": "object", + "description": "Top N facet values sorted by count descending.", + "required": [ + "items" + ], + "properties": { + "items": { "type": "array", "items": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/FacetCountItem" + } + } + } + }, + "RumFacetListRequest": { + "type": "object", + "description": "Filter parameters for listing RUM field definitions.", + "properties": { + "scopes": { + "type": "array", + "items": { + "type": "string" }, - "description": "Filter to these team IDs; this filters results and does not expand access." - }, - "include_person": { - "type": [ - "boolean", - "null" - ], - "description": "Compatibility field; when scope is empty and this is false, behaves like team scope." - }, - "enabled": { - "type": [ - "boolean", - "null" - ], - "description": "Filter by enabled status." + "description": "Filter by RUM data scopes. Valid values: `session`, `view`, `action`, `error`, `resource`, `long_task`, `vital`, `issue`, `sourcemap`." }, - "keyword": { - "type": "string", - "maxLength": 64, - "description": "Filter by name keyword." + "is_facet": { + "type": "boolean", + "description": "When true, return only facet-enabled fields. When false or omitted, return all fields." } } }, - "AutomationRuleListResponse": { + "RumFacetListResponse": { "type": "object", + "description": "List of RUM field definitions.", + "required": [ + "items" + ], "properties": { - "total": { - "type": "integer", - "format": "int64", - "description": "Total count." - }, - "rules": { + "items": { "type": "array", "items": { - "$ref": "#/components/schemas/AutomationRuleItem" + "$ref": "#/components/schemas/RumFieldItem" } } - }, - "required": [ - "total", - "rules" - ] + } }, - "AutomationRuleItem": { + "RumFieldItem": { "type": "object", - "description": "Automation rule.", + "description": "A RUM field definition.", + "required": [ + "account_id", + "field_key", + "field_name", + "group", + "description", + "value_type", + "show_type", + "unit_family", + "unit_name", + "edit_able", + "is_facet", + "enum_values", + "scopes", + "status", + "queryable" + ], "properties": { - "rule_id": { - "type": "string", - "description": "Rule ID." - }, "account_id": { "type": "integer", "format": "int64", - "description": "Account ID." - }, - "team_id": { - "type": "integer", - "format": "int64", - "description": "Scope team ID; 0 means personal rule." - }, - "owner_id": { - "type": "integer", - "format": "int64", - "description": "Creator person ID." + "description": "Account ID. 0 for built-in fields." }, - "name": { + "field_key": { "type": "string", - "description": "Rule name." - }, - "enabled": { - "type": "boolean", - "description": "Whether the rule is enabled." + "description": "Unique field key, e.g. `error.type`." }, - "run_scope": { + "field_name": { "type": "string", - "enum": [ - "person", - "team" - ], - "description": "Hidden session run scope." + "description": "Human-readable field name." }, - "cron_expr": { + "group": { "type": "string", - "description": "Normalized 5-field cron expression." + "description": "Display group for this field." }, - "prompt": { + "description": { "type": "string", - "description": "Task prompt." + "description": "Description of what this field captures." }, - "environment_kind": { + "value_type": { "type": "string", - "description": "Runtime environment kind. Omit or send an empty value for automatic selection.", + "description": "Data type of the field value.", "enum": [ - "", - "cloud", - "byoc" + "string", + "number", + "boolean", + "array", + "array", + "array" ] }, - "environment_id": { - "type": "string", - "description": "BYOC Runner ID." - }, - "schedule_trigger_id": { + "show_type": { "type": "string", - "description": "Schedule trigger ID." - }, - "schedule_trigger_enabled": { - "type": "boolean", - "description": "Whether the schedule trigger is enabled." + "description": "Display type in the analytics UI.", + "enum": [ + "list", + "range" + ] }, - "http_post_trigger_id": { + "unit_family": { "type": "string", - "description": "HTTP POST trigger ID." + "description": "Measurement unit family, e.g. `time`, `bytes`. Empty for dimensionless fields." }, - "http_post_trigger_url": { + "unit_name": { "type": "string", - "description": "HTTP POST trigger path." + "description": "Specific measurement unit, e.g. `millisecond`, `byte`." }, - "http_post_trigger_enabled": { + "edit_able": { "type": "boolean", - "description": "Whether the HTTP POST trigger is enabled." - }, - "oncall_incident_trigger_id": { - "type": "string", - "description": "On-call incident trigger ID." + "description": "True if this is a custom field that can be edited by the user." }, - "oncall_incident_trigger_enabled": { + "is_facet": { "type": "boolean", - "description": "Whether the On-call incident trigger is enabled." + "description": "True if value distribution counting is supported for this field." }, - "oncall_incident_channel_ids": { + "enum_values": { "type": "array", + "description": "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.", "items": { - "type": "integer", - "format": "int64", - "minimum": 1 - }, - "description": "On-call integration IDs to watch. Creating or enabling this trigger requires at least one valid ID." + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } }, - "oncall_incident_severities": { + "scopes": { "type": "array", "items": { - "type": "string", - "enum": [ - "Critical", - "Warning", - "Info" - ] + "type": "string" }, - "description": "Incident severities to watch. Supported values are Critical, Warning, and Info; creating or enabling this trigger requires at least one value." + "description": "RUM scopes this field appears in." }, - "http_post_token": { + "status": { "type": "string", - "description": "HTTP POST trigger token. Returned only on create or token rotation; save it immediately." + "description": "Field status, e.g. `active`." }, - "can_edit": { + "queryable": { "type": "boolean", - "description": "Whether the caller can manage this rule." - }, - "created_at": { - "type": "integer", - "format": "int64", - "description": "Creation time, Unix milliseconds." - }, - "updated_at": { - "type": "integer", - "format": "int64", - "description": "Last update time, Unix milliseconds." - }, - "schedule_next_fire_at_ms": { - "type": "integer", - "format": "int64", - "description": "Next scheduled fire time, Unix milliseconds. 0 means no future scheduled fire is available." + "description": "True if this field can be used in DQL/SQL queries." } - }, - "required": [ - "rule_id", - "account_id", - "team_id", - "owner_id", - "name", - "enabled", - "run_scope", - "cron_expr", - "prompt", - "environment_kind", - "environment_id", - "schedule_trigger_enabled", - "http_post_trigger_enabled", - "can_edit", - "created_at", - "updated_at", - "schedule_next_fire_at_ms", - "oncall_incident_trigger_enabled" - ] + } }, - "AutomationTemplateListRequest": { + "RumFieldListRequest": { "type": "object", + "description": "Filter parameters for listing RUM field definitions.", "properties": { - "locale": { - "type": "string", - "maxLength": 16, - "description": "Template locale such as zh-CN or en-US. Omit to detect from the request locale." + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by RUM data scopes. Valid values: `session`, `view`, `action`, `error`, `resource`, `long_task`, `vital`, `issue`, `sourcemap`." + }, + "is_facet": { + "type": "boolean", + "description": "When true, return only facet-enabled fields. When false or omitted, return all fields." } } }, - "AutomationTemplateListResponse": { + "RumFieldListResponse": { "type": "object", + "description": "List of RUM field definitions.", + "required": [ + "items" + ], "properties": { - "templates": { + "items": { "type": "array", "items": { - "$ref": "#/components/schemas/AutomationTemplateItem" + "$ref": "#/components/schemas/RumFieldItem" } } - }, - "required": [ - "templates" - ] + } }, - "AutomationTemplateItem": { + "SourcemapBinaryImage": { "type": "object", + "description": "Loaded binary image from a crash report.", + "required": [ + "uuid", + "name", + "is_system" + ], "properties": { - "name": { - "type": "string", - "description": "Template name." - }, - "description": { + "uuid": { "type": "string", - "description": "Template description." + "description": "Build UUID identifying the binary or dSYM." }, - "icon": { + "name": { "type": "string", - "description": "Icon identifier." + "description": "Binary image name." }, - "enabled": { + "is_system": { "type": "boolean", - "description": "Whether the template is enabled." + "description": "Whether this binary belongs to the operating system." }, - "prompt": { + "load_address": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + } + ], + "description": "Runtime address. Accepts a hex string such as `0x100000000` or a decimal integer." + }, + "max_address": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + } + ], + "description": "Runtime address. Accepts a hex string such as `0x100000000` or a decimal integer." + }, + "arch": { "type": "string", - "description": "Template prompt." + "description": "CPU architecture for this binary image." } - }, + } + }, + "SourcemapCodeSnippet": { + "type": "object", + "description": "One source-code line returned around an enriched frame.", "required": [ - "name", - "description", - "icon", - "enabled", - "prompt" + "line", + "code" + ], + "properties": { + "line": { + "type": "integer", + "description": "Source line number." + }, + "code": { + "type": "string", + "description": "Source code on that line." + } + } + }, + "SourcemapEnrichedFrame": { + "allOf": [ + { + "$ref": "#/components/schemas/SourcemapStackFrame" + }, + { + "type": "object", + "required": [ + "converted" + ], + "properties": { + "converted": { + "type": "boolean", + "description": "Whether the frame was successfully symbolicated or deobfuscated." + }, + "code_snippets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SourcemapCodeSnippet" + }, + "description": "Source-code snippets around this frame." + }, + "original_frame": { + "$ref": "#/components/schemas/SourcemapStackFrame" + }, + "third_party": { + "type": "boolean", + "description": "Whether the frame is from third-party or system libraries." + } + } + } ] }, - "AutomationRunListRequest": { + "SourcemapStackEnrichRequest": { "type": "object", + "description": "Stack trace enrichment request.", + "required": [ + "service", + "version" + ], "properties": { - "rule_id": { + "type": { "type": "string", - "description": "Target rule ID." + "enum": [ + "browser", + "android", + "ios", + "miniprogram", + "harmony" + ], + "description": "Source platform. Defaults to `browser` when omitted." }, - "p": { - "type": "integer", - "default": 1, - "description": "Page number, 1-based." + "service": { + "type": "string", + "description": "Application or service name used when the sourcemap was uploaded." }, - "limit": { + "version": { + "type": "string", + "description": "Application version used when the sourcemap was uploaded." + }, + "stack": { + "type": "string", + "description": "Raw stack trace to parse and enrich." + }, + "near": { "type": "integer", - "default": 20, - "maximum": 100, - "description": "Page size." + "minimum": 1, + "maximum": 20, + "description": "Number of nearby meaningful source lines to return around converted frames." }, - "status": { + "no_cache": { + "type": "boolean", + "description": "Skip cached enrich results. Intended for debugging." + }, + "build_id": { "type": "string", - "enum": [ - "queued", - "running", - "retrying", - "succeeded", - "partial", - "failed", - "skipped", - "abandoned" - ], - "description": "Run status filter." + "description": "Android build ID for Gradle plugin 1.13.0 and later." }, - "trigger_kind": { + "variant": { "type": "string", - "enum": [ - "schedule", - "debug", - "manual", - "http_post", - "oncall_incident" - ], - "description": "Trigger kind filter." + "description": "Android build variant used by older Gradle plugin versions." }, - "started_after_ms": { - "type": "integer", - "format": "int64", - "description": "Start-time lower bound, Unix milliseconds." + "arch": { + "type": "string", + "description": "Android NDK architecture such as `arm`, `arm64`, `x86`, or `x64`." }, - "started_before_ms": { - "type": "integer", - "format": "int64", - "description": "Start-time upper bound, Unix milliseconds." + "source_type": { + "type": "string", + "description": "Android error source type. Use `ndk` with `arch` for native symbolication." + }, + "binary_images": { + "type": "array", + "description": "Loaded binary images from an iOS crash report.", + "items": { + "$ref": "#/components/schemas/SourcemapBinaryImage" + } } - }, - "required": [ - "rule_id" - ] + } }, - "AutomationRunListResponse": { + "SourcemapStackEnrichResponse": { "type": "object", + "description": "Enriched stack frames.", + "required": [ + "frames" + ], "properties": { - "total": { - "type": "integer", - "format": "int64", - "description": "Total count." - }, - "runs": { + "frames": { "type": "array", "items": { - "$ref": "#/components/schemas/AutomationRunItem" + "$ref": "#/components/schemas/SourcemapEnrichedFrame" } } - }, - "required": [ - "total", - "runs" - ] + } }, - "AutomationRunItem": { + "SourcemapStackFrame": { "type": "object", + "description": "Parsed stack frame fields shared across platforms.", "properties": { - "run_id": { + "function": { "type": "string", - "description": "Run ID." + "description": "Function or method name." }, - "kind": { + "file": { "type": "string", - "description": "Run kind." + "description": "Source file, URL, or module path." }, - "account_id": { + "line": { "type": "integer", - "format": "int64", - "description": "Account ID." + "description": "Line number." }, - "rule_id": { + "column": { + "type": "integer", + "description": "Column number for JavaScript or Flutter frames." + }, + "class_name": { "type": "string", - "description": "Rule ID." + "description": "Android Java/Kotlin class name." }, - "trigger_kind": { + "method_name": { "type": "string", - "enum": [ - "schedule", - "debug", - "manual", - "http_post", - "oncall_incident" - ], - "description": "Trigger kind." + "description": "Android Java/Kotlin method name without class prefix." }, - "occurrence_key": { + "module": { "type": "string", - "description": "Idempotency key for this occurrence." + "description": "iOS Swift/Objective-C module name." }, - "status": { + "address": { "type": "string", - "enum": [ - "queued", - "running", - "retrying", - "succeeded", - "partial", - "failed", - "skipped", - "abandoned" - ], - "description": "Run status." + "description": "iOS or native memory address." }, - "attempts": { + "offset": { "type": "integer", - "description": "Attempt count." + "description": "Symbol offset from function start." }, - "started_at": { - "type": "integer", - "format": "int64", - "description": "Start time, Unix milliseconds." + "native_address": { + "type": "string", + "description": "Unity IL native address." + } + } + }, + "CreateStatusPageRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Display name of the status page.", + "maxLength": 255 }, - "completed_at": { - "type": "integer", - "format": "int64", - "description": "Completion time, Unix milliseconds. 0 means not completed." + "url_name": { + "type": "string", + "description": "URL-safe slug, unique per account and page type.", + "maxLength": 255 }, - "duration_ms": { - "type": "integer", - "format": "int64", - "description": "Duration in milliseconds." + "type": { + "type": "string", + "description": "Visibility type of the status page.", + "enum": [ + "public", + "internal" + ] }, - "error_code": { + "custom_domain": { "type": "string", - "description": "Error code." + "description": "Custom domain for a public status page.", + "maxLength": 255 }, - "error_message": { + "page_title": { "type": "string", - "description": "Error message." + "description": "Browser title shown for the status page." }, - "stats_json": { - "description": "Run stats JSON." + "page_header": { + "type": "string", + "description": "Header content shown on the status page." }, - "result_json": { - "description": "Run result JSON." + "page_footer": { + "type": "string", + "description": "Footer content shown on the status page." }, - "created_at": { - "type": "integer", - "format": "int64", - "description": "Creation time, Unix milliseconds." + "date_view": { + "type": "string", + "description": "How event dates are displayed.", + "enum": [ + "calendar", + "list" + ] }, - "updated_at": { - "type": "integer", - "format": "int64", - "description": "Last update time, Unix milliseconds." + "display_uptime_mode": { + "type": "string", + "description": "How uptime is displayed.", + "enum": [ + "chart_and_percentage", + "chart", + "none" + ] + }, + "custom_links": { + "type": "array", + "description": "Custom navigation links shown on the status page.", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "contact_info": { + "type": "string", + "description": "Get-in-touch contact, such as a mailto or website URL." + }, + "subscription": { + "$ref": "#/components/schemas/StatusPageSubscriptionItem" } }, "required": [ - "run_id", - "kind", - "account_id", - "rule_id", - "trigger_kind", - "occurrence_key", - "status", - "attempts", - "started_at", - "completed_at", - "duration_ms", - "created_at", - "updated_at" + "name", + "url_name", + "type", + "date_view", + "display_uptime_mode" ] }, - "FacetCountItem": { + "CreateStatusPageResponse": { "type": "object", - "description": "A facet value and its occurrence count.", - "required": [ - "facet_value", - "count" - ], "properties": { - "facet_value": { - "description": "The facet value. Type matches the field's `value_type`." - }, - "count": { + "page_id": { "type": "integer", "format": "int64", - "description": "Number of events with this facet value in the time range.", - "example": 1523 - } - } - }, - "RumDataAggregateFunction": { - "type": "object", - "description": "Aggregate function metadata used by the sampling engine.", - "required": [ - "type", - "column_name", - "column_index" - ], - "properties": { - "type": { - "type": "string", - "description": "Aggregate function type." + "description": "Created status page ID." }, - "column_name": { + "page_name": { "type": "string", - "description": "Column name used by the aggregate." + "description": "Created status page name." }, - "column_index": { - "type": "integer", - "description": "Column index used by the aggregate." + "page_url_name": { + "type": "string", + "description": "Final URL-safe slug assigned to the status page." } - } + }, + "required": [ + "page_id", + "page_name", + "page_url_name" + ] }, - "RumDataFieldMeta": { + "A2AAgentCreateRequest": { "type": "object", - "description": "Metadata for one returned column.", - "required": [ - "name", - "type", - "nullable" - ], + "description": "Registration parameters for a new A2A agent.", "properties": { - "name": { + "agent_name": { "type": "string", - "description": "Column name." + "description": "Agent display name.", + "maxLength": 128 }, - "type": { + "instructions": { "type": "string", - "description": "Backend database type name for this column." + "description": "Natural-language instructions for the remote agent. Required — a deprecated `description` field is still accepted for legacy clients and, if both are sent, must exactly match `instructions`.", + "maxLength": 2000 }, - "nullable": { - "type": "boolean", - "description": "Whether values in this column may be null." - } - } - }, - "RumDataQueryDefinition": { - "type": "object", - "description": "One RUM data query definition.", - "required": [ - "id", - "sql", - "format" - ], - "properties": { - "id": { + "card_url": { "type": "string", - "maxLength": 64, - "description": "Client-supplied query ID. The same value is used as the key in the response object." + "description": "URL of the remote agent card. Must be an absolute `http` or `https` URL with a non-empty host; reachability is enforced by the execution environment, not at creation time." }, - "sql": { + "auth_type": { "type": "string", - "description": "RUM SQL query to execute." + "description": "Authentication type for reaching the remote agent: `none`, `api_key`, or `bearer`." }, - "dql": { - "type": "string", - "description": "Optional RUM DQL filter expression used together with SQL validation." + "auth_config": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Authentication config key-values, e.g. the API key or bearer token. Values for sensitive keys (`api_key`, `token`, `client_secret`) are masked back in responses." }, - "format": { + "streaming": { + "type": "boolean", + "description": "Whether the remote agent supports streaming." + }, + "team_id": { + "type": "integer", + "description": "Team scope: 0 = account-wide; >0 = team. Creating at account scope requires the owner/admin role; creating into a team requires actual membership in that team.", + "format": "int64" + }, + "environment_kind": { "type": "string", "enum": [ - "time_series", - "table" + "", + "byoc" ], - "description": "Output format. `table` returns rows; `time_series` returns bucketed time-series rows." + "description": "Execution environment binding. Omit or send empty for automatic routing; `byoc` pins the agent to a specific runner given by `environment_id`. `cloud` is not accepted — configured A2A agents need a persistent runner, not a disposable cloud sandbox." }, - "interval": { - "type": "integer", - "format": "int64", - "exclusiveMinimum": 0, - "default": 3600, - "description": "Time bucket interval in seconds for `time_series` queries." + "environment_id": { + "type": "string", + "description": "BYOC runner ID. Required when `environment_kind=byoc`; the runner must belong to the account or a team the caller belongs to." }, - "max_points": { - "type": "integer", - "format": "int64", - "exclusiveMinimum": 0, - "default": 1226, - "description": "Maximum number of points for `time_series` queries." + "auth_mode": { + "type": "string", + "description": "Authentication mode: `shared` (default) shares one credential across all users; `per_user_secret` requires `secret_schema.header_name`; `per_user_oauth` runs per-user OAuth." }, - "time_zone": { + "secret_schema": { "type": "string", - "description": "IANA time zone name used when evaluating time functions, such as `Asia/Shanghai`." + "description": "JSON-encoded secret schema, e.g. `{\"header_name\":\"X-Api-Key\"}`; required when `auth_mode=per_user_secret`." }, - "search_after_ctx": { + "oauth_metadata": { "type": "string", - "description": "Opaque cursor returned by a previous table query for continuing pagination." + "description": "JSON-encoded OAuth metadata; populated by the OAuth discovery flow for `per_user_oauth` mode." }, - "disable_sampling": { + "allow_insecure_oauth_http": { "type": "boolean", - "description": "When true, asks the query engine to avoid sampling when possible." + "description": "Allow non-loopback HTTP OAuth discovery/metadata endpoints for this agent instead of requiring HTTPS. Defaults to false." + }, + "allow_insecure_tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate verification when connecting to this agent's endpoint (self-signed/private certs). Defaults to false." } - } + }, + "required": [ + "agent_name", + "instructions", + "card_url" + ] }, - "RumDataQueryOutput": { + "A2AAgentCreateResponse": { "type": "object", - "description": "Result for one query. Failed subqueries populate `error`; successful ones populate `data`.", + "description": "Result of registering an A2A agent.", "properties": { - "error": { - "$ref": "#/components/schemas/DutyError" - }, - "data": { - "$ref": "#/components/schemas/RumDataQueryResult" + "agent_id": { + "type": "string", + "description": "ID of the newly created agent." } - } + }, + "required": [ + "agent_id" + ] }, - "RumDataQueryRequest": { + "A2AAgentIDRequest": { "type": "object", - "description": "Batch of RUM data queries over a bounded time range.", + "description": "A2A agent lookup by ID.", + "properties": { + "agent_id": { + "type": "string", + "description": "Target agent ID." + } + }, "required": [ - "start_time", - "end_time", - "queries" - ], + "agent_id" + ] + }, + "A2AAgentItem": { + "type": "object", + "description": "A registered A2A (agent-to-agent) remote agent.", "properties": { - "start_time": { + "agent_id": { + "type": "string", + "description": "Unique A2A agent ID (prefix `a2a_`)." + }, + "account_id": { "type": "integer", - "format": "int64", - "description": "Start of the query window, Unix epoch milliseconds.", - "example": 1712620800000 + "description": "Owning account ID.", + "format": "int64" }, - "end_time": { + "team_id": { "type": "integer", - "format": "int64", - "description": "End of the query window, Unix epoch milliseconds. Maximum 31-day span.", - "example": 1712707200000 + "description": "Team scope: 0 = account-wide; >0 = the owning team.", + "format": "int64" }, - "queries": { + "can_edit": { + "type": "boolean", + "description": "Whether the caller may edit this agent." + }, + "environment_kind": { + "type": "string", + "enum": [ + "", + "byoc" + ], + "description": "Execution environment binding. Empty selects automatic routing; `byoc` pins the agent to a specific runner named by `environment_id`." + }, + "environment_id": { + "type": "string", + "description": "BYOC runner ID. Set only when `environment_kind=byoc`; empty otherwise." + }, + "agent_name": { + "type": "string", + "description": "Agent display name." + }, + "instructions": { + "type": "string", + "description": "Natural-language instructions for the remote agent (formerly named `description`).", + "maxLength": 2000 + }, + "card_url": { + "type": "string", + "description": "URL of the remote agent card." + }, + "auth_type": { + "type": "string", + "description": "Authentication type for reaching the remote agent: `none`, `api_key`, or `bearer`." + }, + "auth_config": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Authentication config; sensitive values (`api_key`, `token`, `client_secret`) are masked." + }, + "streaming": { + "type": "boolean", + "description": "Whether the remote agent supports streaming responses." + }, + "status": { + "type": "string", + "description": "Agent status.", + "enum": [ + "enabled", + "disabled" + ] + }, + "agent_card_name": { + "type": "string", + "description": "Agent name resolved from the remote card." + }, + "agent_card_skills": { "type": "array", - "description": "Queries to execute concurrently. 1 to 10 queries are allowed.", - "minItems": 1, - "maxItems": 10, "items": { - "$ref": "#/components/schemas/RumDataQueryDefinition" - } + "type": "string" + }, + "description": "Skills advertised by the remote card." + }, + "card_resolve_timeout": { + "type": "integer", + "description": "Card-resolution timeout in seconds. Always 0 today — the API does not yet expose a way to set it." + }, + "task_timeout": { + "type": "integer", + "description": "Single-task execution timeout in seconds. Always 0 today — the API does not yet expose a way to set it." + }, + "auth_mode": { + "type": "string", + "description": "Authentication mode.", + "enum": [ + "shared", + "per_user_secret", + "per_user_oauth" + ] + }, + "secret_schema": { + "type": "string", + "description": "JSON-encoded secret schema (per_user_secret mode)." + }, + "oauth_metadata": { + "type": "string", + "description": "JSON-encoded OAuth metadata (per_user_oauth mode)." + }, + "allow_insecure_oauth_http": { + "type": "boolean", + "description": "Allow non-loopback HTTP OAuth discovery/metadata endpoints for this agent instead of requiring HTTPS." + }, + "allow_insecure_tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate verification when connecting to this agent's endpoint." + }, + "created_by": { + "type": "integer", + "description": "Member ID that created the agent.", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation time. Unix timestamp in milliseconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update time. Unix timestamp in milliseconds." } - } - }, - "RumDataQueryResponse": { - "type": "object", - "description": "Map from request query ID to that query's result or error.", - "additionalProperties": { - "$ref": "#/components/schemas/RumDataQueryOutput" - } + }, + "required": [ + "agent_id", + "account_id", + "team_id", + "can_edit", + "environment_kind", + "environment_id", + "agent_name", + "instructions", + "card_url", + "auth_type", + "streaming", + "status", + "card_resolve_timeout", + "task_timeout", + "created_by", + "created_at", + "updated_at" + ] }, - "RumDataQueryResult": { + "A2AAgentListRequest": { "type": "object", - "description": "Rows and metadata returned by one RUM data query.", - "required": [ - "fields", - "values" - ], + "description": "Pagination, scope, and search filter for listing A2A agents.", "properties": { - "search_after_ctx": { + "offset": { + "type": "integer", + "description": "Row offset for pagination.", + "default": 0 + }, + "limit": { + "type": "integer", + "description": "Page size.", + "default": 20 + }, + "scope": { "type": "string", - "description": "Opaque cursor for continuing paginated table queries." + "enum": [ + "all", + "account", + "team" + ], + "default": "all", + "description": "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)." }, - "fields": { + "query": { + "type": "string", + "description": "Case-insensitive substring search across agent name, instructions, card URL, agent ID, and the resolved card name.", + "maxLength": 128 + }, + "team_ids": { "type": "array", "items": { - "$ref": "#/components/schemas/RumDataFieldMeta" + "type": "integer", + "format": "int64" }, - "description": "Column metadata for the values matrix." + "description": "Filter to these team IDs; empty = the caller's visible set." }, - "values": { + "include_account": { + "type": [ + "boolean", + "null" + ], + "description": "Include account-scoped (team_id=0) rows. Defaults to true." + } + } + }, + "A2AAgentListResponse": { + "type": "object", + "description": "Paginated A2A agent list.", + "properties": { + "items": { "type": "array", - "description": "Rows returned by the query. Each row aligns with `fields` by index.", "items": { - "type": "array", - "items": {} - } + "$ref": "#/components/schemas/A2AAgentItem" + }, + "description": "A2A agents on this page." }, - "interval": { + "total": { "type": "integer", - "format": "int64", - "description": "Effective time bucket interval in seconds for time-series queries." - }, - "sampling": { - "$ref": "#/components/schemas/RumDataSamplingDecision" + "description": "Total number of matching agents.", + "format": "int64" } - } + }, + "required": [ + "items", + "total" + ] }, - "RumDataSamplingDecision": { + "A2AAgentUpdateRequest": { "type": "object", - "description": "Sampling metadata when the query engine uses sampled data.", + "description": "Partial update of an A2A agent. A null/omitted field is left unchanged.", + "properties": { + "agent_id": { + "type": "string", + "description": "Target agent ID." + }, + "agent_name": { + "type": [ + "string", + "null" + ], + "description": "New display name. Omit to leave unchanged.", + "maxLength": 128 + }, + "instructions": { + "type": [ + "string", + "null" + ], + "description": "New instructions. Omit to leave unchanged. A deprecated `description` field is also accepted; if both are sent they must match.", + "maxLength": 2000 + }, + "card_url": { + "type": [ + "string", + "null" + ], + "description": "New card URL. Omit to leave unchanged." + }, + "auth_type": { + "type": [ + "string", + "null" + ], + "description": "New auth type. Omit to leave unchanged." + }, + "auth_config": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Replace the auth config. Omit to leave unchanged. Sending back the masked value (or an empty string) for a sensitive key keeps the stored secret instead of overwriting it." + }, + "streaming": { + "type": [ + "boolean", + "null" + ], + "description": "Toggle streaming support. Omit to leave unchanged." + }, + "team_id": { + "type": [ + "integer", + "null" + ], + "description": "Reassign team scope. Omit to leave unchanged. Reassigning requires rights on the destination team; if the team changes without also sending a new environment binding, the existing runner binding must remain selectable by the caller or the update is rejected.", + "format": "int64" + }, + "environment_kind": { + "type": [ + "string", + "null" + ], + "description": "New execution environment binding: empty for automatic, `byoc` for a specific runner. `cloud` is rejected. Omit to leave unchanged." + }, + "environment_id": { + "type": [ + "string", + "null" + ], + "description": "New BYOC runner ID. Required alongside `environment_kind=byoc`. Omit to leave unchanged." + }, + "auth_mode": { + "type": [ + "string", + "null" + ], + "description": "New auth mode: shared, per_user_secret, or per_user_oauth. Changing it always rewrites secret_schema together with it." + }, + "secret_schema": { + "type": [ + "string", + "null" + ], + "description": "New JSON secret schema." + }, + "oauth_metadata": { + "type": [ + "string", + "null" + ], + "description": "New JSON OAuth metadata. If omitted while auth_mode changes, it is cleared to empty." + }, + "allow_insecure_oauth_http": { + "type": [ + "boolean", + "null" + ], + "description": "Toggle non-loopback HTTP OAuth discovery for this agent. Omit to leave unchanged." + }, + "allow_insecure_tls_skip_verify": { + "type": [ + "boolean", + "null" + ], + "description": "Toggle TLS certificate verification skipping for this agent. Omit to leave unchanged." + } + }, "required": [ - "enabled", - "scale_factor" - ], + "agent_id" + ] + }, + "AutomationRuleCreateRequest": { + "type": "object", + "description": "Create an Automation rule.", "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Rule name." + }, + "team_id": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "Scope team ID. 0 or omitted means a personal rule; >0 means a team in the account. Immutable after creation." + }, "enabled": { "type": "boolean", - "description": "Whether sampling was applied." + "description": "Whether the rule is enabled after creation. Omitted API value is false; Chat/CLI create sends true by default unless the user asks for disabled." }, - "scale_factor": { - "type": "number", - "description": "Multiplier used to scale sampled counts back to estimated full counts." + "cron_expr": { + "type": "string", + "description": "Run cadence. Supports 4 fields (`hour day month weekday`, minute defaults to 0) and 5 fields (`minute hour day month weekday`). The minute must be one fixed integer; 6-field seconds are not supported. A cron that sets both day-of-month and day-of-week is rejected. The create API currently requires this field even for HTTP-POST-only rules; send a valid cron and set `schedule_trigger_enabled=false`.", + "example": "15 9 * * *" }, - "selected_tablets": { + "timezone": { + "type": "string", + "description": "IANA timezone `cron_expr` is evaluated in, e.g. `Asia/Shanghai`. Must be a timezone name loadable by the server; an invalid value is rejected. Defaults to the caller's member timezone, then the account timezone, then UTC when omitted." + }, + "schedule_trigger_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "Whether the schedule trigger is enabled. Defaults to true when omitted; HTTP-POST-only rules should send false." + }, + "prompt": { + "type": "string", + "minLength": 1, + "description": "Task prompt sent to the AI SRE agent on each run." + }, + "environment_kind": { + "type": "string", + "description": "Runtime environment kind. Omit or send an empty value for automatic selection.", + "enum": [ + "", + "cloud", + "byoc" + ] + }, + "environment_id": { + "type": "string", + "description": "BYOC Runner ID. Used only when `environment_kind=byoc`." + }, + "http_post_trigger_enabled": { + "type": "boolean", + "description": "Whether to create and enable an HTTP POST trigger. When enabled, the response includes a one-time token." + }, + "oncall_incident_trigger_enabled": { + "type": "boolean", + "description": "Whether the On-call incident trigger is enabled." + }, + "oncall_incident_channel_ids": { "type": "array", "items": { - "type": "string" + "type": "integer", + "format": "int64", + "minimum": 1 }, - "description": "Storage tablets selected for the sampled query." + "description": "On-call integration IDs to watch. Creating or enabling this trigger requires at least one valid ID." }, - "aggregate_funcs": { + "oncall_incident_severities": { "type": "array", "items": { - "$ref": "#/components/schemas/RumDataAggregateFunction" + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info" + ] }, - "description": "Aggregate functions affected by sampling." + "description": "Incident severities to watch. Supported values are Critical, Warning, and Info; creating or enabling this trigger requires at least one value." } - } + }, + "required": [ + "name", + "cron_expr", + "prompt" + ] }, - "RumFacetCountRequest": { + "AutomationRuleIDRequest": { "type": "object", - "description": "Parameters for counting facet value distribution.", + "properties": { + "rule_id": { + "type": "string", + "description": "Rule ID." + } + }, "required": [ - "scope", - "facet_key", - "start_time", - "end_time" - ], + "rule_id" + ] + }, + "AutomationRuleItem": { + "type": "object", + "description": "Automation rule.", "properties": { - "scope": { + "rule_id": { "type": "string", - "description": "RUM data scope to query.", - "enum": [ - "session", - "view", - "action", - "error", - "resource", - "long_task", - "vital", - "issue", - "sourcemap" - ] + "description": "Rule ID." }, - "facet_key": { - "type": "string", - "description": "The field key to count value distribution for." + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." }, - "facet_value": { - "description": "When set, filter events where `facet_key` equals this value before counting. Accepts string, number, or boolean." + "team_id": { + "type": "integer", + "format": "int64", + "description": "Scope team ID; 0 means personal rule." + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "Creator person ID." + }, + "name": { + "type": "string", + "description": "Rule name." + }, + "enabled": { + "type": "boolean", + "description": "Whether the rule is enabled." + }, + "run_scope": { + "type": "string", + "enum": [ + "person", + "team" + ], + "description": "Hidden session run scope." + }, + "cron_expr": { + "type": "string", + "description": "Normalized 5-field cron expression." + }, + "timezone": { + "type": "string", + "description": "IANA timezone `cron_expr` is evaluated in. Always populated for rules created after this field shipped; empty on legacy rows created before it, which still resolve to UTC when scheduled." + }, + "prompt": { + "type": "string", + "description": "Task prompt." + }, + "environment_kind": { + "type": "string", + "description": "Runtime environment kind. Omit or send an empty value for automatic selection.", + "enum": [ + "", + "cloud", + "byoc" + ] + }, + "environment_id": { + "type": "string", + "description": "BYOC Runner ID." + }, + "schedule_trigger_id": { + "type": "string", + "description": "Schedule trigger ID." + }, + "schedule_trigger_enabled": { + "type": "boolean", + "description": "Whether the schedule trigger is enabled." + }, + "http_post_trigger_id": { + "type": "string", + "description": "HTTP POST trigger ID." + }, + "http_post_trigger_url": { + "type": "string", + "description": "HTTP POST trigger path." + }, + "http_post_trigger_enabled": { + "type": "boolean", + "description": "Whether the HTTP POST trigger is enabled." + }, + "oncall_incident_trigger_id": { + "type": "string", + "description": "On-call incident trigger ID." + }, + "oncall_incident_trigger_enabled": { + "type": "boolean", + "description": "Whether the On-call incident trigger is enabled." + }, + "oncall_incident_channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64", + "minimum": 1 + }, + "description": "On-call integration IDs to watch. Creating or enabling this trigger requires at least one valid ID." + }, + "oncall_incident_severities": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info" + ] + }, + "description": "Incident severities to watch. Supported values are Critical, Warning, and Info; creating or enabling this trigger requires at least one value." + }, + "http_post_token": { + "type": "string", + "description": "HTTP POST trigger token. Returned only on create or token rotation; save it immediately." + }, + "can_edit": { + "type": "boolean", + "description": "True when the caller can manage this rule: the personal rule owner; for team rules, an account admin or a member of the rule's team." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation time, Unix milliseconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update time, Unix milliseconds." + }, + "schedule_next_fire_at_ms": { + "type": "integer", + "format": "int64", + "description": "Next scheduled fire time, Unix milliseconds. 0 means no future scheduled fire is available." + } + }, + "required": [ + "rule_id", + "account_id", + "team_id", + "owner_id", + "name", + "enabled", + "run_scope", + "cron_expr", + "timezone", + "prompt", + "environment_kind", + "environment_id", + "schedule_trigger_enabled", + "http_post_trigger_enabled", + "can_edit", + "created_at", + "updated_at", + "schedule_next_fire_at_ms", + "oncall_incident_trigger_enabled" + ] + }, + "AutomationRuleListRequest": { + "type": "object", + "description": "List Automation rules visible to the caller. `all` includes the caller's personal rules plus accessible team rules; account admins do not see other users' personal rules in list results.", + "properties": { + "p": { + "type": "integer", + "default": 1, + "description": "Page number, 1-based." + }, + "limit": { + "type": "integer", + "default": 20, + "maximum": 100, + "description": "Page size." + }, + "scope": { + "type": "string", + "enum": [ + "all", + "personal", + "team" + ], + "description": "Scope filter: `all` (own personal + accessible team rules), `personal`, or `team`; default `all`." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter to these team IDs; this narrows results and does not expand access." + }, + "include_person": { + "type": [ + "boolean", + "null" + ], + "description": "Compatibility field; when scope is empty and this is false, behaves like team scope." + }, + "enabled": { + "type": [ + "boolean", + "null" + ], + "description": "Filter by enabled status." + }, + "keyword": { + "type": "string", + "maxLength": 64, + "description": "Filter by name keyword." + } + } + }, + "AutomationRuleListResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total count." + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AutomationRuleItem" + } + } + }, + "required": [ + "total", + "rules" + ] + }, + "AutomationRuleUpdateRequest": { + "type": "object", + "description": "Update an Automation rule. Omit or send null on a field to leave it unchanged.", + "properties": { + "rule_id": { + "type": "string", + "description": "Target rule ID." + }, + "name": { + "type": [ + "string", + "null" + ], + "maxLength": 255, + "description": "New rule name." + }, + "team_id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "minimum": 0, + "description": "Only the current value is accepted; personal/team scope is immutable after creation." + }, + "enabled": { + "type": [ + "boolean", + "null" + ], + "description": "Whether the rule is enabled." + }, + "cron_expr": { + "type": [ + "string", + "null" + ], + "description": "Run cadence. Supports 4 fields (`hour day month weekday`, minute defaults to 0) and 5 fields (`minute hour day month weekday`). The minute must be one fixed integer; 6-field seconds are not supported.", + "example": "15 9 * * *" + }, + "timezone": { + "type": [ + "string", + "null" + ], + "description": "New IANA timezone for evaluating `cron_expr`. Omit or send null to leave the current timezone unchanged." + }, + "schedule_trigger_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "Whether the schedule trigger is enabled." + }, + "prompt": { + "type": [ + "string", + "null" + ], + "description": "New task prompt." + }, + "environment_kind": { + "type": [ + "string", + "null" + ], + "description": "Runtime environment kind. Omit or send an empty value for automatic selection.", + "enum": [ + "", + "cloud", + "byoc" + ] + }, + "environment_id": { + "type": [ + "string", + "null" + ], + "description": "BYOC Runner ID." + }, + "http_post_trigger_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "Whether the HTTP POST trigger is enabled. Sending true creates one when missing." + }, + "oncall_incident_trigger_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "Whether the On-call incident trigger is enabled." + }, + "oncall_incident_channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64", + "minimum": 1 + }, + "description": "On-call integration IDs to watch. Creating or enabling this trigger requires at least one valid ID." + }, + "oncall_incident_severities": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info" + ] + }, + "description": "Incident severities to watch. Supported values are Critical, Warning, and Info; creating or enabling this trigger requires at least one value." + }, + "rotate_http_post_trigger_token": { + "type": "boolean", + "description": "Whether to rotate the HTTP POST trigger token. The new token is returned only in this response." + } + }, + "required": [ + "rule_id" + ] + }, + "AutomationRunItem": { + "type": "object", + "properties": { + "run_id": { + "type": "string", + "description": "Run ID." + }, + "kind": { + "type": "string", + "description": "Run kind." + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." + }, + "rule_id": { + "type": "string", + "description": "Rule ID." + }, + "trigger_kind": { + "type": "string", + "enum": [ + "schedule", + "debug", + "manual", + "http_post", + "oncall_incident" + ], + "description": "Trigger kind." + }, + "occurrence_key": { + "type": "string", + "description": "Idempotency key for this occurrence." + }, + "status": { + "type": "string", + "enum": [ + "queued", + "running", + "retrying", + "succeeded", + "partial", + "failed", + "skipped", + "abandoned" + ], + "description": "Run status." + }, + "attempts": { + "type": "integer", + "description": "Attempt count." + }, + "started_at": { + "type": "integer", + "format": "int64", + "description": "Start time, Unix milliseconds." + }, + "completed_at": { + "type": "integer", + "format": "int64", + "description": "Completion time, Unix milliseconds. 0 means not completed." + }, + "duration_ms": { + "type": "integer", + "format": "int64", + "description": "Duration in milliseconds." + }, + "error_code": { + "type": "string", + "description": "Error code." + }, + "error_message": { + "type": "string", + "description": "Error message." + }, + "stats_json": { + "description": "Run stats JSON." + }, + "result_json": { + "description": "Run result JSON." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation time, Unix milliseconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update time, Unix milliseconds." + } + }, + "required": [ + "run_id", + "kind", + "account_id", + "rule_id", + "trigger_kind", + "occurrence_key", + "status", + "attempts", + "started_at", + "completed_at", + "duration_ms", + "created_at", + "updated_at" + ] + }, + "AutomationRunListRequest": { + "type": "object", + "properties": { + "rule_id": { + "type": "string", + "description": "Target rule ID." + }, + "p": { + "type": "integer", + "default": 1, + "description": "Page number, 1-based." + }, + "limit": { + "type": "integer", + "default": 20, + "maximum": 100, + "description": "Page size." + }, + "status": { + "type": "string", + "enum": [ + "queued", + "running", + "retrying", + "succeeded", + "partial", + "failed", + "skipped", + "abandoned" + ], + "description": "Run status filter." + }, + "trigger_kind": { + "type": "string", + "enum": [ + "schedule", + "debug", + "manual", + "http_post", + "oncall_incident" + ], + "description": "Trigger kind filter." + }, + "started_after_ms": { + "type": "integer", + "format": "int64", + "description": "Start-time lower bound, Unix milliseconds." + }, + "started_before_ms": { + "type": "integer", + "format": "int64", + "description": "Start-time upper bound, Unix milliseconds." + } + }, + "required": [ + "rule_id" + ] + }, + "AutomationRunListResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total count." + }, + "runs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AutomationRunItem" + } + } + }, + "required": [ + "total", + "runs" + ] + }, + "AutomationRunView": { + "type": "object", + "description": "Reference to the run started by a manual trigger.", + "properties": { + "run_id": { + "type": "string", + "description": "Run ID, always populated once a run is created." + }, + "session_id": { + "type": "string", + "description": "AI SRE session ID for this run. Always populated in a 200 response, since the call only returns after the session has started." + } + }, + "required": [ + "run_id" + ] + }, + "AutomationTemplateItem": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Template name." + }, + "description": { + "type": "string", + "description": "Template description." + }, + "icon": { + "type": "string", + "description": "Icon identifier." + }, + "enabled": { + "type": "boolean", + "description": "Whether the template is enabled." + }, + "prompt": { + "type": "string", + "description": "Template prompt." + } + }, + "required": [ + "name", + "description", + "icon", + "enabled", + "prompt" + ] + }, + "AutomationTemplateListRequest": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "maxLength": 16, + "description": "Template locale such as zh-CN or en-US. Omit to detect from the request locale." + } + } + }, + "AutomationTemplateListResponse": { + "type": "object", + "properties": { + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AutomationTemplateItem" + } + } + }, + "required": [ + "templates" + ] + }, + "ContextResolvedItem": { + "type": "object", + "description": "Snapshot of the three-tier knowledge-pack resolution for this session.", + "properties": { + "account_pack_id": { + "type": "string", + "description": "Resolved account-scoped pack id." + }, + "team_pack_id": { + "type": "string", + "description": "Resolved team-scoped pack id." + }, + "incident_id": { + "type": "string", + "description": "Bound incident id, when war-room originated." + }, + "resolved_at_ms": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds when the packs were resolved." + }, + "versions": { + "type": "object", + "additionalProperties": { + "type": "integer" + }, + "description": "Per-pack resolved version map." + } + }, + "required": [ + "resolved_at_ms" + ] + }, + "EnvironmentBinding": { + "type": "object", + "description": "The runner or cloud sandbox the session is bound to. Null until the first message.", + "properties": { + "kind": { + "type": "string", + "description": "Environment kind bound to the session: `cloud` (managed sandbox) or `byoc` (self-hosted runner).", + "enum": [ + "cloud", + "byoc" + ] + }, + "id": { + "type": "string", + "description": "Environment identifier: a cloud sandbox ID for `cloud` bindings, a runner/environment ID for `byoc` bindings." + }, + "name": { + "type": "string", + "description": "Human-readable environment name; empty for cloud bindings using the default allowlist." + }, + "status": { + "type": "string", + "description": "Live binding health, namespaced by kind: BYOC uses online/pending/offline/deleted; cloud uses available/rebuilding/expired.", + "enum": [ + "online", + "pending", + "offline", + "deleted", + "available", + "rebuilding", + "expired" + ] + } + }, + "required": [ + "kind", + "id" + ] + }, + "EventItem": { + "type": "object", + "description": "One persisted session event. content/actions/usage_metadata carry the raw ADK envelope; treat them as opaque structured payloads.", + "properties": { + "event_id": { + "type": "string", + "description": "Event identifier." + }, + "session_id": { + "type": "string", + "description": "Owning session id." + }, + "invocation_id": { + "type": "string", + "description": "ADK invocation id grouping a turn." + }, + "author": { + "type": "string", + "description": "Event author (e.g. user, the agent name)." + }, + "branch": { + "type": "string", + "description": "ADK branch path for nested agents." + }, + "content": { + "type": "object", + "additionalProperties": true, + "description": "ADK content envelope {role, parts:[...]}." + }, + "actions": { + "type": "object", + "additionalProperties": true, + "description": "ADK actions envelope (state deltas, transfers, escalation)." + }, + "usage_metadata": { + "type": "object", + "additionalProperties": true, + "description": "Per-turn token usage metadata." + }, + "partial": { + "type": "boolean", + "description": "True for a streaming partial chunk." + }, + "turn_complete": { + "type": "boolean", + "description": "True on the terminal event of a turn." + }, + "error_code": { + "type": "string", + "description": "Error code when the event represents a failure." + }, + "error_message": { + "type": "string", + "description": "Human-readable error message, when present." + }, + "status": { + "type": "string", + "description": "Event status.", + "enum": [ + "normal", + "compressed" + ] + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds when the event was written." + } + }, + "required": [ + "event_id", + "session_id", + "partial", + "turn_complete", + "created_at" + ] + }, + "MCPServerCreateRequest": { + "type": "object", + "description": "Configuration for a new MCP server.", + "properties": { + "server_name": { + "type": "string", + "description": "MCP server name, unique within the account.", + "minLength": 1, + "maxLength": 255 + }, + "description": { + "type": "string", + "description": "Server description.", + "minLength": 1, + "maxLength": 1024 + }, + "transport": { + "type": "string", + "description": "Transport protocol.", + "enum": [ + "stdio", + "sse", + "streamable-http" + ] + }, + "command": { + "type": "string", + "description": "Executable command (stdio transport)." + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Command arguments (stdio transport)." + }, + "env": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables (stdio transport)." + }, + "url": { + "type": "string", + "description": "Server URL (sse / streamable-http transport)." + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "HTTP headers (sse / streamable-http)." + }, + "connect_timeout": { + "type": "integer", + "description": "Connection timeout in seconds. 0 = default (10s)." + }, + "call_timeout": { + "type": "integer", + "description": "Tool-call timeout in seconds. 0 = default (60s)." + }, + "auth_mode": { + "type": "string", + "description": "Authentication mode: shared (default), per_user_secret, or per_user_oauth." + }, + "secret_schema": { + "type": "string", + "description": "JSON secret schema; required when auth_mode=per_user_secret." + }, + "oauth_metadata": { + "type": "string", + "description": "JSON OAuth metadata; reserved for per_user_oauth." + }, + "status": { + "type": "string", + "description": "Initial status.", + "enum": [ + "enabled", + "disabled" + ], + "default": "enabled" + }, + "team_id": { + "type": "integer", + "description": "Team scope: 0 = account-wide; >0 = team.", + "format": "int64" + }, + "environment_kind": { + "type": "string", + "description": "Pin the server to a specific BYOC runner (`environment_id` required). Omit or send empty for automatic selection; `cloud` is not supported for MCP servers.", + "enum": [ + "byoc" + ] + }, + "environment_id": { + "type": "string", + "description": "Runner ID; required when environment_kind is byoc." + }, + "allow_insecure_oauth_http": { + "type": "boolean", + "description": "Allow this server's OAuth token exchange over plaintext HTTP. Testing use only; defaults to false." + }, + "allow_insecure_tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate verification when connecting to this server. Testing use only; defaults to false." + }, + "source_template_name": { + "type": "string", + "description": "Marketplace template name when created from a connector template." + } + }, + "required": [ + "server_name", + "description", + "transport" + ] + }, + "MCPServerDeleteRequest": { + "type": "object", + "description": "MCP server deletion by ID.", + "properties": { + "server_id": { + "type": "string", + "description": "Target MCP server ID." + } + }, + "required": [ + "server_id" + ] + }, + "MCPServerGetRequest": { + "type": "object", + "description": "MCP server lookup by ID.", + "properties": { + "server_id": { + "type": "string", + "description": "Target MCP server ID." + } + }, + "required": [ + "server_id" + ] + }, + "MCPServerItem": { + "type": "object", + "description": "An MCP server (connector) registered on the account.", + "properties": { + "server_id": { + "type": "string", + "description": "Unique MCP server ID (prefix `mcp_`)." + }, + "account_id": { + "type": "integer", + "description": "Owning account ID.", + "format": "int64" + }, + "team_id": { + "type": "integer", + "description": "Team scope: 0 = account-wide; >0 = the owning team.", + "format": "int64" + }, + "can_edit": { + "type": "boolean", + "description": "Whether the caller may edit this server." + }, + "environment_kind": { + "type": "string", + "description": "Runtime environment kind: empty for automatic selection, or `byoc` when pinned to a specific runner. `cloud` cannot be bound to an MCP server.", + "enum": [ + "", + "byoc" + ] + }, + "environment_id": { + "type": "string", + "description": "Runner ID when environment_kind is byoc; empty otherwise." + }, + "server_name": { + "type": "string", + "description": "MCP server name, unique within the account." + }, + "description": { + "type": "string", + "description": "Server description." + }, + "ai_description": { + "type": "string", + "description": "LLM-generated description, preferred over `description` when present." + }, + "transport": { + "type": "string", + "description": "Transport protocol.", + "enum": [ + "stdio", + "sse", + "streamable-http" + ] + }, + "command": { + "type": "string", + "description": "Executable command (stdio transport only)." + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Command arguments (stdio transport)." + }, + "env": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables (stdio transport). Secret values are masked." + }, + "url": { + "type": "string", + "description": "Server URL (sse / streamable-http transport)." + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "HTTP headers (sse / streamable-http). Secret values are masked." + }, + "proxy_url": { + "type": "string", + "description": "Outbound proxy URL used to reach the server." + }, + "status": { + "type": "string", + "description": "Server status.", + "enum": [ + "enabled", + "disabled" + ] + }, + "connect_timeout": { + "type": "integer", + "description": "Connection timeout in seconds (0 = server default, 10s)." + }, + "call_timeout": { + "type": "integer", + "description": "Tool-call timeout in seconds (0 = server default, 60s)." + }, + "allow_insecure_oauth_http": { + "type": "boolean", + "description": "Allow this server's OAuth token exchange over plaintext HTTP; testing use only." + }, + "allow_insecure_tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate verification when connecting to this server; testing use only." + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MCPToolInfo" + }, + "description": "Live tool list; populated by the get/test endpoints." + }, + "tool_count": { + "type": "integer", + "description": "Number of tools in the live list." + }, + "list_error": { + "type": "string", + "description": "Error message when the live tool list failed." + }, + "auth_mode": { + "type": "string", + "description": "Authentication mode.", + "enum": [ + "shared", + "per_user_secret", + "per_user_oauth" + ] + }, + "secret_schema": { + "type": "string", + "description": "JSON-encoded secret schema (per_user_secret mode)." + }, + "oauth_metadata": { + "type": "string", + "description": "JSON-encoded OAuth metadata (per_user_oauth mode)." + }, + "source_template_name": { + "type": "string", + "description": "Marketplace template this connector was installed from; empty for user-authored." + }, + "created_by": { + "type": "integer", + "description": "Member ID that created the server.", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation time. Unix timestamp in milliseconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update time. Unix timestamp in milliseconds." + } + }, + "required": [ + "server_id", + "account_id", + "team_id", + "can_edit", + "environment_kind", + "environment_id", + "server_name", + "description", + "transport", + "status", + "connect_timeout", + "call_timeout", + "created_by", + "created_at", + "updated_at" + ] + }, + "MCPServerListRequest": { + "type": "object", + "description": "Pagination, scope, and search filters for listing MCP servers.", + "properties": { + "p": { + "type": "integer", + "description": "Page number, 1-based.", + "default": 1 + }, + "limit": { + "type": "integer", + "description": "Page size.", + "default": 20 + }, + "scope": { + "type": "string", + "description": "Restrict results to a scope: `account` for account-wide rows only, `team` for the caller's own visible team rows only, or omit (defaults to `all`) for both, subject to team_ids/include_account.", + "enum": [ + "all", + "account", + "team" + ] + }, + "query": { + "type": "string", + "maxLength": 128, + "description": "Case-insensitive substring search across name, description, AI-generated description, server ID, transport, URL, command, and source template name." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter to these team IDs; empty = the caller's visible set." + }, + "include_account": { + "type": [ + "boolean", + "null" + ], + "description": "Include account-scoped (team_id=0) rows. Defaults to true." + } + } + }, + "MCPServerListResponse": { + "type": "object", + "description": "Paginated MCP server list.", + "properties": { + "total": { + "type": "integer", + "description": "Total number of matching servers.", + "format": "int64" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MCPServerItem" + }, + "description": "MCP servers on this page." + } + }, + "required": [ + "total", + "servers" + ] + }, + "MCPServerStatusRequest": { + "type": "object", + "description": "MCP server enable/disable by ID.", + "properties": { + "server_id": { + "type": "string", + "description": "Target MCP server ID." + } + }, + "required": [ + "server_id" + ] + }, + "MCPServerUpdateRequest": { + "type": "object", + "description": "Partial update of an MCP server. Omit a field to leave it unchanged.", + "properties": { + "server_id": { + "type": "string", + "description": "Target MCP server ID." + }, + "server_name": { + "type": "string", + "description": "New name.", + "minLength": 1, + "maxLength": 255 + }, + "description": { + "type": "string", + "description": "New description.", + "minLength": 1, + "maxLength": 1024 + }, + "transport": { + "type": "string", + "description": "Transport protocol.", + "enum": [ + "stdio", + "sse", + "streamable-http" + ] + }, + "command": { + "type": "string", + "description": "Executable command (stdio transport)." + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Command arguments (stdio transport)." + }, + "env": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables (stdio transport)." + }, + "url": { + "type": "string", + "description": "Server URL (sse / streamable-http transport)." + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "HTTP headers (sse / streamable-http)." + }, + "connect_timeout": { + "type": "integer", + "description": "Connection timeout in seconds. 0 = default (10s)." + }, + "call_timeout": { + "type": "integer", + "description": "Tool-call timeout in seconds. 0 = default (60s)." + }, + "auth_mode": { + "type": "string", + "description": "Authentication mode: shared (default), per_user_secret, or per_user_oauth." + }, + "secret_schema": { + "type": "string", + "description": "JSON secret schema; required when auth_mode=per_user_secret." }, - "start_time": { + "oauth_metadata": { + "type": "string", + "description": "JSON OAuth metadata; reserved for per_user_oauth." + }, + "team_id": { + "type": [ + "integer", + "null" + ], + "description": "Reassign team scope: 0 = account-wide; >0 = team. Omit to leave unchanged.", + "format": "int64" + }, + "environment_kind": { + "type": [ + "string", + "null" + ], + "description": "Reassign the runner binding: `byoc` (with environment_id) or empty string to reset to automatic selection. Omit (null) to leave the current binding unchanged." + }, + "environment_id": { + "type": [ + "string", + "null" + ], + "description": "Runner ID paired with environment_kind=byoc. Omit (null) to leave the current binding unchanged." + }, + "allow_insecure_oauth_http": { + "type": [ + "boolean", + "null" + ], + "description": "Allow OAuth token exchange over plaintext HTTP. Omit to leave unchanged." + }, + "allow_insecure_tls_skip_verify": { + "type": [ + "boolean", + "null" + ], + "description": "Skip TLS certificate verification. Omit to leave unchanged." + } + }, + "required": [ + "server_id" + ] + }, + "MCPToolInfo": { + "type": "object", + "description": "Metadata for one tool exposed by an MCP server.", + "properties": { + "name": { + "type": "string", + "description": "Tool name." + }, + "description": { + "type": "string", + "description": "Tool description." + }, + "input_schema": { + "type": "object", + "additionalProperties": true, + "description": "JSON Schema describing the tool's input parameters." + } + }, + "required": [ + "name", + "description" + ] + }, + "ManualRunRuleResult": { + "type": "object", + "description": "Result of manually running an Automation rule outside its schedule.", + "properties": { + "rule_id": { + "type": "string", + "description": "Rule ID that was run." + }, + "trigger_kind": { + "type": "string", + "enum": [ + "manual" + ], + "description": "Always manual for this operation." + }, + "preflight": { + "$ref": "#/components/schemas/PreflightResult" + }, + "run": { + "$ref": "#/components/schemas/AutomationRunView" + } + }, + "required": [ + "rule_id", + "trigger_kind", + "preflight" + ] + }, + "PreflightResult": { + "type": "object", + "description": "Readiness checks computed before a manual run is allowed to start.", + "properties": { + "ok": { + "type": "boolean", + "description": "Whether all readiness checks passed. Always true in a response that reaches the caller — a failed preflight returns a 400/403 error instead of a payload with ok=false." + }, + "checks": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Names of the readiness checks performed, in order. Current fixed set: rule_loaded, actor_authorized, app_allowed, runtime_scope_resolved, rule_config_valid." + }, + "scope": { + "type": "string", + "enum": [ + "person", + "team" + ], + "description": "Resolved run scope for this run; mirrors the rule's run_scope." + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "Rule owner person ID." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Rule's scope team ID; 0 means a personal rule." + }, + "app_name": { + "type": "string", + "description": "App the rule is scoped to. Currently always ai-sre; manual runs are only supported for that app." + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Non-fatal warnings surfaced during preflight. Omitted or empty when there are none." + } + }, + "required": [ + "ok", + "checks", + "scope", + "owner_id", + "team_id", + "app_name" + ] + }, + "SessionDeleteRequest": { + "type": "object", + "description": "Session deletion by ID.", + "properties": { + "session_id": { + "type": "string", + "description": "Target session ID.", + "minLength": 1 + } + }, + "required": [ + "session_id" + ] + }, + "SessionExportRequest": { + "type": "object", + "description": "Export the full event transcript of one session as a streaming NDJSON body.", + "properties": { + "session_id": { + "type": "string", + "description": "Target session ID." + }, + "include_subagents": { + "type": "boolean", + "description": "When true, each subagent_dispatch line is followed by the child session's full event stream, bracketed by its own session_meta. Defaults to false." + } + }, + "required": [ + "session_id" + ] + }, + "SessionGetRequest": { + "type": "object", + "description": "Fetch one session plus a backward-paged window of its most recent events.", + "properties": { + "session_id": { + "type": "string", + "description": "Target session ID.", + "minLength": 1 + }, + "share_token": { + "type": "string", + "description": "Share token for accessing a session through its share link. Omit it for normal account-authorized access.", + "maxLength": 512 + }, + "num_recent_events": { + "type": "integer", + "description": "Legacy page size: number of most-recent events to return. Superseded by `limit` when both are set; 0 uses the server default (100).", + "minimum": 0, + "maximum": 1000 + }, + "limit": { + "type": "integer", + "description": "Page size for events; takes precedence over `num_recent_events`. 0 uses the server default (100).", + "minimum": 0, + "maximum": 1000 + }, + "search_after_ctx": { + "type": "string", + "description": "Opaque keyset cursor from a previous response; pass it back to fetch the next older page.", + "maxLength": 4096 + } + }, + "required": [ + "session_id" + ] + }, + "SessionGetResponse": { + "type": "object", + "description": "A session plus a backward-paged window of its events.", + "properties": { + "session": { + "$ref": "#/components/schemas/SessionItem" + }, + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EventItem" + }, + "description": "Recent events, ascending by (created_at, event_id)." + }, + "has_more_older": { + "type": "boolean", + "description": "True when older events remain beyond this page." + }, + "search_after_ctx": { + "type": "string", + "description": "Opaque keyset cursor; pass back as search_after_ctx to fetch the next older page. Omitted when has_more_older is false." + }, + "suggest_init": { + "type": "boolean", + "description": "Account-wide onboarding flag: true when the account has zero knowledge packs in any scope; not specific to this session." + } + }, + "required": [ + "session", + "events", + "has_more_older", + "suggest_init" + ] + }, + "SessionItem": { + "type": "object", + "description": "One agent session row.", + "properties": { + "session_id": { + "type": "string", + "description": "Session identifier." + }, + "parent_session_id": { + "type": "string", + "description": "Parent session id for subagent (child) sessions; empty otherwise." + }, + "session_name": { + "type": "string", + "description": "Session title; may be empty for untitled sessions." + }, + "app_name": { + "type": "string", + "description": "Agent app that owns the session." + }, + "entry_kind": { + "type": "string", + "description": "Surface that created the session.", + "enum": [ + "web", + "im", + "api", + "automation", + "subagent" + ] + }, + "person_id": { + "type": "string", + "description": "Creator person id." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team id; 0 means no team is bound. Immutable after create." + }, + "team_name": { + "type": "string", + "description": "Resolved team name; empty for unbound rows or deleted teams." + }, + "is_mine": { + "type": "boolean", + "description": "True when the caller created this session." + }, + "can_view": { + "type": "boolean", + "description": "True when the caller can view this session." + }, + "can_continue": { + "type": "boolean", + "description": "True when the caller can add a new turn to this session." + }, + "can_manage": { + "type": "boolean", + "description": "True when the caller may rename/archive/delete the session; personal sessions are creator-only, team sessions allow the creator, account admin, or team member." + }, + "can_fork": { + "type": "boolean", + "description": "True when the caller can fork this session." + }, + "access_source": { + "type": "string", + "description": "How the caller received access to this session. Omitted when no access source is resolved.", + "enum": [ + "owner", + "team_member", + "manager", + "share_link" + ] + }, + "share_enabled": { + "type": "boolean", + "description": "True when the session's share link is active." + }, + "share_version": { + "type": "integer", + "format": "int64", + "description": "Revision of the share link; it increases when sharing is revoked." + }, + "shared_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds when sharing was last enabled; 0 if never shared." + }, + "shared_by": { + "type": "integer", + "format": "int64", + "description": "Person ID that most recently enabled sharing; 0 if never shared." + }, + "status": { + "type": "string", + "description": "Lifecycle status.", + "enum": [ + "enabled", + "deleted" + ] + }, + "incognito": { + "type": "boolean", + "description": "True for incognito (non-persisted-memory) sessions." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds when the session was created." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds of the last session update." + }, + "template_staging_round_id": { + "type": "string", + "description": "Current save→validate round id (template-assistant only); empty otherwise." + }, + "state": { + "type": "object", + "additionalProperties": true, + "description": "Raw session-state bag (session-scoped keys). Omitted when empty." + }, + "bound_environment": { + "$ref": "#/components/schemas/EnvironmentBinding" + }, + "context_resolved": { + "$ref": "#/components/schemas/ContextResolvedItem" + }, + "token_usage": { + "$ref": "#/components/schemas/SessionTokenUsage" + }, + "current_context_tokens": { + "type": "integer", + "format": "int64", + "description": "Size in tokens of the LLM context window as of the most recent turn. 0 means no turn has completed." + }, + "context_window": { + "type": "integer", + "format": "int64", + "description": "The bound model's max context size in tokens. 0 means unknown." + }, + "archived_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds when archived; 0 means not archived." + }, + "pinned_at": { + "type": "integer", + "format": "int64", + "description": "Caller's per-user pin timestamp in milliseconds; 0 means not pinned." + }, + "last_event_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds of the most recent assistant-side event." + }, + "is_running": { + "type": "boolean", + "description": "True when an agent turn is currently in flight for this session." + }, + "has_unread": { + "type": "boolean", + "description": "True when there is assistant output the caller has not yet viewed." + }, + "current_turn_started_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds when the current or most recent round started; 0 if no round has started yet." + }, + "current_turn_active_ms": { + "type": "integer", + "format": "int64", + "description": "Active working duration in milliseconds for the current or most recent round, excluding time spent waiting on ask_user; resets to 0 at the start of each new round." + }, + "current_turn_wait_ms": { + "type": "integer", + "format": "int64", + "description": "Accumulated ask_user human-wait duration in milliseconds for the current round; resets to 0 at the start of each new round." + }, + "current_turn_tokens": { + "type": "integer", + "format": "int64", + "description": "Total tokens (input+output+reasoning) for the in-flight round across the parent and its subagents; only computed by session/get while the session is running, always 0 in session/list responses and when idle." + } + }, + "required": [ + "session_id", + "session_name", + "app_name", + "person_id", + "team_id", + "is_mine", + "can_view", + "can_continue", + "can_manage", + "can_fork", + "share_enabled", + "share_version", + "shared_at", + "shared_by", + "status", + "incognito", + "created_at", + "updated_at", + "current_context_tokens", + "context_window", + "archived_at", + "pinned_at", + "is_running", + "has_unread", + "current_turn_started_at", + "current_turn_active_ms", + "current_turn_wait_ms", + "current_turn_tokens" + ] + }, + "SessionListRequest": { + "type": "object", + "description": "Filters for listing agent sessions. `all` visibility means the caller's own personal sessions plus accessible team sessions; account admins do not see other users' personal sessions.", + "properties": { + "app_name": { + "type": "string", + "description": "Agent app whose sessions to list.", + "enum": [ + "ask-ai", + "support", + "support-website", + "support-flashcat", + "ai-sre", + "template-assistant", + "swe" + ] + }, + "p": { + "type": "integer", + "description": "Page number, 1-based.", + "default": 1, + "minimum": 1 + }, + "limit": { + "type": "integer", + "description": "Page size, 1–100.", + "minimum": 1, + "maximum": 100, + "default": 20 + }, + "orderby": { + "type": "string", + "description": "Sort field.", + "enum": [ + "created_at", + "updated_at" + ] + }, + "asc": { + "type": "boolean", + "description": "Ascending order when true; applies only when `orderby` is set." + }, + "include_subagent_sessions": { + "type": "boolean", + "description": "Include subagent-dispatched sessions in the list." + }, + "keyword": { + "type": "string", + "description": "Filter by session-name keyword.", + "maxLength": 64 + }, + "scope": { + "type": "string", + "description": "Visibility scope: `all` (own personal + accessible team sessions), `personal`, or `team`; default `all`.", + "enum": [ + "all", + "personal", + "team" + ] + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Optional explicit team filter; intersects with `scope` and never expands access." + }, + "entry_kinds": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "web", + "im", + "api", + "automation" + ] + }, + "description": "Restrict to sessions produced by these surfaces; empty returns every kind." + }, + "status": { + "type": "string", + "description": "Archive bucket: active (default) returns un-archived, archived returns archived, all returns both.", + "enum": [ + "active", + "archived", + "all" + ] + } + }, + "required": [ + "app_name" + ] + }, + "SessionListResponse": { + "type": "object", + "description": "A page of agent sessions.", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total number of sessions matching the filter (ignoring pagination)." + }, + "sessions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionItem" + }, + "description": "The page of sessions." + }, + "suggest_init": { + "type": "boolean", + "description": "Account-wide onboarding flag: true when the account has zero knowledge packs in any scope; not dependent on this call's filters." + } + }, + "required": [ + "total", + "sessions", + "suggest_init" + ] + }, + "SessionTokenUsage": { + "type": "object", + "description": "Cumulative session-level token rollup across all turns. The account-billing source of truth.", + "properties": { + "input_tokens": { "type": "integer", "format": "int64", - "description": "Start of the time range, Unix epoch milliseconds.", - "example": 1712620800000 + "description": "Total prompt (input) tokens, including the cached portion." }, - "end_time": { + "cached_tokens": { "type": "integer", "format": "int64", - "description": "End of the time range, Unix epoch milliseconds. Maximum 31-day span.", - "example": 1712707200000 - }, - "dql": { - "type": "string", - "description": "RUM DQL filter expression applied before counting." + "description": "Portion of input_tokens served from the prompt cache." }, - "sql": { - "type": "string", - "description": "SQL WHERE clause (no SELECT) for additional filtering." + "output_tokens": { + "type": "integer", + "format": "int64", + "description": "Total generated (output) tokens." }, - "limit": { + "reasoning_tokens": { "type": "integer", - "description": "Maximum number of top values to return. Default 100, maximum 100.", - "maximum": 100, - "default": 100 + "format": "int64", + "description": "Total reasoning/thinking tokens." } - } - }, - "RumFacetCountResponse": { - "type": "object", - "description": "Top N facet values sorted by count descending.", + }, "required": [ - "items" - ], - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FacetCountItem" - } - } - } + "input_tokens", + "cached_tokens", + "output_tokens", + "reasoning_tokens" + ] }, - "RumFacetListRequest": { + "SkillDeleteRequest": { "type": "object", - "description": "Filter parameters for listing RUM field definitions.", + "description": "Skill deletion by ID.", "properties": { - "scopes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Filter by RUM data scopes. Valid values: `session`, `view`, `action`, `error`, `resource`, `long_task`, `vital`, `issue`, `sourcemap`." - }, - "is_facet": { - "type": "boolean", - "description": "When true, return only facet-enabled fields. When false or omitted, return all fields." + "skill_id": { + "type": "string", + "description": "Target skill ID." } - } + }, + "required": [ + "skill_id" + ] }, - "RumFacetListResponse": { + "SkillGetRequest": { "type": "object", - "description": "List of RUM field definitions.", - "required": [ - "items" - ], + "description": "Skill lookup by ID.", "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RumFieldItem" - } + "skill_id": { + "type": "string", + "description": "Target skill ID." } - } + }, + "required": [ + "skill_id" + ] }, - "RumFieldItem": { + "SkillItem": { "type": "object", - "description": "A RUM field definition.", - "required": [ - "account_id", - "field_key", - "field_name", - "group", - "description", - "value_type", - "show_type", - "unit_family", - "unit_name", - "edit_able", - "is_facet", - "enum_values", - "scopes", - "status", - "queryable" - ], + "description": "An AI SRE skill — a packaged SKILL.md bundle the agent can load.", "properties": { + "skill_id": { + "type": "string", + "description": "Unique skill ID (prefix `skill_`)." + }, "account_id": { "type": "integer", - "format": "int64", - "description": "Account ID. 0 for built-in fields." - }, - "field_key": { - "type": "string", - "description": "Unique field key, e.g. `error.type`." + "description": "Owning account ID.", + "format": "int64" }, - "field_name": { - "type": "string", - "description": "Human-readable field name." + "team_id": { + "type": "integer", + "description": "Team scope: 0 = account-wide; >0 = the owning team.", + "format": "int64" }, - "group": { + "skill_name": { "type": "string", - "description": "Display group for this field." + "description": "Skill name, unique within the account." }, "description": { "type": "string", - "description": "Description of what this field captures." - }, - "value_type": { - "type": "string", - "description": "Data type of the field value.", - "enum": [ - "string", - "number", - "boolean", - "array", - "array", - "array" - ] + "description": "Human-readable description from the SKILL.md frontmatter." }, - "show_type": { + "description_en": { "type": "string", - "description": "Display type in the analytics UI.", - "enum": [ - "list", - "range" - ] + "description": "Optional English description. English-locale UI responses prefer this over `description`; the skill catalog also uses it as a stable selection signal when `description` is localized for display." }, - "unit_family": { + "content": { "type": "string", - "description": "Measurement unit family, e.g. `time`, `bytes`. Empty for dimensionless fields." + "description": "Full SKILL.md content. Omitted in list responses." }, - "unit_name": { + "version": { "type": "string", - "description": "Specific measurement unit, e.g. `millisecond`, `byte`." - }, - "edit_able": { - "type": "boolean", - "description": "True if this is a custom field that can be edited by the user." - }, - "is_facet": { - "type": "boolean", - "description": "True if value distribution counting is supported for this field." + "description": "Skill version from the frontmatter." }, - "enum_values": { + "tags": { "type": "array", - "description": "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.", "items": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - } + "type": "string" + }, + "description": "Tags parsed from the frontmatter." }, - "scopes": { + "author": { + "type": "string", + "description": "Skill author." + }, + "license": { + "type": "string", + "description": "Skill license." + }, + "tools": { "type": "array", "items": { "type": "string" }, - "description": "RUM scopes this field appears in." + "description": "Required tools (builtin or `mcp:server/tool`)." + }, + "s3_key": { + "type": "string", + "description": "Object-storage key of the skill zip." + }, + "checksum": { + "type": "string", + "description": "SHA-256 checksum of the skill zip." }, "status": { "type": "string", - "description": "Field status, e.g. `active`." + "description": "Skill status. Deleted skills are excluded from every API response, so only these two values are ever returned.", + "enum": [ + "enabled", + "disabled" + ] }, - "queryable": { + "created_by": { + "type": "integer", + "description": "Member ID that created the skill.", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation time. Unix timestamp in milliseconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update time. Unix timestamp in milliseconds." + }, + "can_edit": { "type": "boolean", - "description": "True if this field can be used in DQL/SQL queries." + "description": "Whether the caller may edit this skill." + }, + "source_template_name": { + "type": "string", + "description": "Marketplace template this skill was installed from; empty for user-authored." + }, + "source_template_version": { + "type": "string", + "description": "Template version at install time." + }, + "update_available": { + "type": "boolean", + "description": "True when the marketplace has a newer template version." + }, + "is_modified": { + "type": "boolean", + "description": "True when a marketplace-sourced skill was edited locally (auto-update skips it)." + }, + "created": { + "type": "boolean", + "description": "Set only on install-from-session responses: true = fresh install, false = in-place update." } - } + }, + "required": [ + "skill_id", + "account_id", + "team_id", + "skill_name", + "description", + "status", + "created_by", + "created_at", + "updated_at", + "can_edit", + "update_available", + "is_modified" + ] }, - "RumFieldListRequest": { + "SkillListRequest": { "type": "object", - "description": "Filter parameters for listing RUM field definitions.", + "description": "Pagination, search, and team filter for listing skills.", "properties": { - "scopes": { + "p": { + "type": "integer", + "description": "Page number, 1-based.", + "default": 1 + }, + "limit": { + "type": "integer", + "description": "Page size.", + "default": 20 + }, + "scope": { + "type": "string", + "description": "Restrict results to `all` (default), `account`-only (team_id=0), or `team`-only (excludes account-scoped rows). Overrides `include_account` when set.", + "enum": [ + "all", + "account", + "team" + ] + }, + "query": { + "type": "string", + "description": "Free-text search across skill name, description, English description, skill ID, marketplace source template name, and author.", + "maxLength": 128 + }, + "team_ids": { "type": "array", "items": { - "type": "string" + "type": "integer", + "format": "int64" }, - "description": "Filter by RUM data scopes. Valid values: `session`, `view`, `action`, `error`, `resource`, `long_task`, `vital`, `issue`, `sourcemap`." + "description": "Filter to these team IDs; empty = the caller's visible set." }, - "is_facet": { - "type": "boolean", - "description": "When true, return only facet-enabled fields. When false or omitted, return all fields." + "include_account": { + "type": [ + "boolean", + "null" + ], + "description": "Include account-scoped (team_id=0) rows. Defaults to true. Ignored when `scope` is `account` or `team`." } } }, - "RumFieldListResponse": { + "SkillListResponse": { "type": "object", - "description": "List of RUM field definitions.", - "required": [ - "items" - ], + "description": "Paginated skill list.", "properties": { - "items": { + "total": { + "type": "integer", + "description": "Total number of matching skills.", + "format": "int64" + }, + "skills": { "type": "array", "items": { - "$ref": "#/components/schemas/RumFieldItem" - } + "$ref": "#/components/schemas/SkillItem" + }, + "description": "Skills on this page." } - } + }, + "required": [ + "total", + "skills" + ] }, - "SourcemapBinaryImage": { + "SkillStatusRequest": { "type": "object", - "description": "Loaded binary image from a crash report.", - "required": [ - "uuid", - "name", - "is_system" - ], + "description": "Skill enable/disable by ID.", "properties": { - "uuid": { - "type": "string", - "description": "Build UUID identifying the binary or dSYM." - }, - "name": { - "type": "string", - "description": "Binary image name." - }, - "is_system": { - "type": "boolean", - "description": "Whether this binary belongs to the operating system." - }, - "load_address": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer", - "format": "int64" - } - ], - "description": "Runtime address. Accepts a hex string such as `0x100000000` or a decimal integer." - }, - "max_address": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer", - "format": "int64" - } - ], - "description": "Runtime address. Accepts a hex string such as `0x100000000` or a decimal integer." - }, - "arch": { + "skill_id": { "type": "string", - "description": "CPU architecture for this binary image." + "description": "Target skill ID." } - } + }, + "required": [ + "skill_id" + ] }, - "SourcemapCodeSnippet": { + "SkillUpdateRequest": { "type": "object", - "description": "One source-code line returned around an enriched frame.", - "required": [ - "line", - "code" - ], + "description": "Editable skill metadata.", "properties": { - "line": { - "type": "integer", - "description": "Source line number." + "skill_id": { + "type": "string", + "description": "Target skill ID." }, - "code": { + "description": { "type": "string", - "description": "Source code on that line." - } - } - }, - "SourcemapEnrichedFrame": { - "allOf": [ - { - "$ref": "#/components/schemas/SourcemapStackFrame" + "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.", + "maxLength": 1024 }, - { - "type": "object", - "required": [ - "converted" + "description_en": { + "type": [ + "string", + "null" ], - "properties": { - "converted": { - "type": "boolean", - "description": "Whether the frame was successfully symbolicated or deobfuscated." - }, - "code_snippets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SourcemapCodeSnippet" - }, - "description": "Source-code snippets around this frame." - }, - "original_frame": { - "$ref": "#/components/schemas/SourcemapStackFrame" - }, - "third_party": { - "type": "boolean", - "description": "Whether the frame is from third-party or system libraries." - } - } + "description": "New English description. Cannot contain `<` or `>`. Omit to leave unchanged; send an empty string to explicitly clear it.", + "maxLength": 1024 + }, + "team_id": { + "type": [ + "integer", + "null" + ], + "description": "Reassign team scope: 0 = account-wide; >0 = team. Omit to leave unchanged.", + "format": "int64" } + }, + "required": [ + "skill_id" ] }, - "SourcemapStackEnrichRequest": { + "SkillUploadRequest": { "type": "object", - "description": "Stack trace enrichment request.", - "required": [ - "service", - "version" - ], + "description": "Multipart form for uploading a skill archive.", "properties": { - "type": { - "type": "string", - "enum": [ - "browser", - "android", - "ios", - "miniprogram", - "harmony" - ], - "description": "Source platform. Defaults to `browser` when omitted." - }, - "service": { - "type": "string", - "description": "Application or service name used when the sourcemap was uploaded." - }, - "version": { - "type": "string", - "description": "Application version used when the sourcemap was uploaded." - }, - "stack": { + "file": { "type": "string", - "description": "Raw stack trace to parse and enrich." + "format": "binary", + "description": "Skill archive (.skill / .zip / .tar.gz / .tgz). Max 100MB; oversized files are rejected before the body is read." }, - "near": { + "team_id": { "type": "integer", - "minimum": 1, - "maximum": 20, - "description": "Number of nearby meaningful source lines to return around converted frames." + "description": "Team scope for the created/upserted skill: 0 = account-wide. Ignored when replacing a specific skill via `skill_id`.", + "format": "int64" }, - "no_cache": { + "replace": { "type": "boolean", - "description": "Skip cached enrich results. Intended for debugging." - }, - "build_id": { - "type": "string", - "description": "Android build ID for Gradle plugin 1.13.0 and later." - }, - "variant": { - "type": "string", - "description": "Android build variant used by older Gradle plugin versions." - }, - "arch": { - "type": "string", - "description": "Android NDK architecture such as `arm`, `arm64`, `x86`, or `x64`." - }, - "source_type": { - "type": "string", - "description": "Android error source type. Use `ndk` with `arch` for native symbolication." + "description": "When true, overwrite an existing skill instead of failing on a name collision — matched by `skill_id` if provided, otherwise by skill name." }, - "binary_images": { - "type": "array", - "description": "Loaded binary images from an iOS crash report.", - "items": { - "$ref": "#/components/schemas/SourcemapBinaryImage" - } + "skill_id": { + "type": "string", + "description": "Existing skill ID to target when replacing a specific skill (requires `replace=true`)." } - } + }, + "required": [ + "file" + ] }, - "SourcemapStackEnrichResponse": { + "RumSessionReplayMetaRequest": { "type": "object", - "description": "Enriched stack frames.", "required": [ - "frames" + "session_id" ], + "description": "Look up replay metadata for a single RUM session.", "properties": { - "frames": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SourcemapEnrichedFrame" - } + "session_id": { + "type": "string", + "description": "RUM session ID." + }, + "ts": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds of the session start time. Optional; disambiguates when a session ID has been reused across different time windows." } } }, - "SourcemapStackFrame": { + "RumReplayApplication": { "type": "object", - "description": "Parsed stack frame fields shared across platforms.", "properties": { - "function": { + "id": { "type": "string", - "description": "Function or method name." - }, - "file": { + "description": "RUM application ID the session belongs to." + } + } + }, + "RumReplayDevice": { + "type": "object", + "properties": { + "type": { "type": "string", - "description": "Source file, URL, or module path." - }, - "line": { - "type": "integer", - "description": "Line number." + "description": "Device type recorded for the session, e.g. `desktop`, `mobile`, `tablet`." + } + } + }, + "RumReplaySession": { + "type": "object", + "properties": { + "is_active": { + "type": "boolean", + "description": "Whether the session was still active as of the last recorded event." }, - "column": { + "server_time_delta": { "type": "integer", - "description": "Column number for JavaScript or Flutter frames." - }, - "class_name": { - "type": "string", - "description": "Android Java/Kotlin class name." - }, - "method_name": { - "type": "string", - "description": "Android Java/Kotlin method name without class prefix." - }, - "module": { - "type": "string", - "description": "iOS Swift/Objective-C module name." + "format": "int64", + "description": "Clock skew in milliseconds between the client and Flashduty's servers, added to client timestamps for correction." }, - "address": { + "source": { "type": "string", - "description": "iOS or native memory address." + "enum": [ + "browser", + "android", + "ios", + "miniprogram", + "react-native", + "flutter", + "kotlin-multiplatform", + "roku", + "unity" + ], + "description": "SDK platform that recorded the session." }, - "offset": { + "start": { "type": "integer", - "description": "Symbol offset from function start." + "format": "int64", + "description": "Unix timestamp in milliseconds when the session started." }, - "native_address": { - "type": "string", - "description": "Unity IL native address." + "end": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds when the session ended (or was last updated, if still active)." } } }, - "CreateStatusPageRequest": { + "RumReplayView": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "Display name of the status page.", - "maxLength": 255 - }, - "url_name": { - "type": "string", - "description": "URL-safe slug, unique per account and page type.", - "maxLength": 255 - }, - "type": { + "source": { "type": "string", - "description": "Visibility type of the status page.", "enum": [ - "public", - "internal" - ] + "browser", + "android", + "ios", + "miniprogram", + "react-native", + "flutter", + "kotlin-multiplatform", + "roku", + "unity" + ], + "description": "SDK platform that recorded the view." }, - "custom_domain": { + "view_id": { "type": "string", - "description": "Custom domain for a public status page.", - "maxLength": 255 + "description": "Unique ID of the view within the session." }, - "page_title": { + "name": { "type": "string", - "description": "Browser title shown for the status page." + "description": "View name, typically the route or screen name." }, - "page_header": { + "url": { "type": "string", - "description": "Header content shown on the status page." + "description": "URL (web) or screen identifier (mobile) associated with the view." }, - "page_footer": { + "loading_type": { "type": "string", - "description": "Footer content shown on the status page." + "description": "How the view was entered, e.g. `initial_load`, `route_change`." }, - "date_view": { + "container_source": { "type": "string", - "description": "How event dates are displayed.", - "enum": [ - "calendar", - "list" - ] + "description": "SDK platform of the container app, when this view is embedded (e.g. a WebView inside a native app)." }, - "display_uptime_mode": { + "container_view_id": { "type": "string", - "description": "How uptime is displayed.", - "enum": [ - "chart_and_percentage", - "chart", - "none" - ] - }, - "custom_links": { - "type": "array", - "description": "Custom navigation links shown on the status page.", - "items": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } + "description": "View ID of the containing view, when this view is embedded." }, - "contact_info": { - "type": "string", - "description": "Get-in-touch contact, such as a mailto or website URL." + "server_time_delta": { + "type": "integer", + "format": "int64", + "description": "Clock skew in milliseconds between the client and Flashduty's servers, added to client timestamps for correction." }, - "subscription": { - "$ref": "#/components/schemas/StatusPageSubscriptionItem" - } - }, - "required": [ - "name", - "url_name", - "type", - "date_view", - "display_uptime_mode" - ] - }, - "CreateStatusPageResponse": { - "type": "object", - "properties": { - "page_id": { + "end": { "type": "integer", "format": "int64", - "description": "Created status page ID." + "description": "Unix timestamp in milliseconds when the view ended." }, - "page_name": { - "type": "string", - "description": "Created status page name." + "start": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds when the view started." }, - "page_url_name": { - "type": "string", - "description": "Final URL-safe slug assigned to the status page." + "is_active": { + "type": "boolean", + "description": "Whether the view was still active as of the last recorded event." } - }, - "required": [ - "page_id", - "page_name", - "page_url_name" - ] + } }, - "LogPatternDiagnoseSummary": { + "RumReplayForegroundPeriod": { "type": "object", - "description": "Summary of log sampling, aggregation, and returned evidence.", + "description": "A time span during which the app was in the foreground (mobile sessions).", "properties": { - "current_sample": { - "$ref": "#/components/schemas/LogPatternSampleSummary", - "description": "Log sample summary for the current window." - }, - "baseline_sample": { - "$ref": "#/components/schemas/LogPatternSampleSummary", - "description": "Log sample summary for the baseline window.", - "x-flashduty-preserve-absence": true - }, - "patterns_aggregated_only_in_baseline_sample": { + "start": { "type": "integer", - "description": "Number of aggregated patterns observed only in the baseline sample. Omitted when sampling is incomplete.", "format": "int64", - "x-flashduty-preserve-absence": true - }, - "aggregated_pattern_evidence_total": { - "type": "integer", - "description": "Total aggregated pattern evidence items before the response limit is applied.", - "format": "int64" + "description": "Unix timestamp in milliseconds when the foreground period started." }, - "pattern_evidence_returned": { + "end": { "type": "integer", - "description": "Number of pattern evidence items returned in this response.", - "format": "int64" - }, - "pattern_evidence_truncated_by_max_patterns": { - "type": "boolean", - "description": "Whether returned pattern evidence was truncated by `max_patterns`." + "format": "int64", + "description": "Unix timestamp in milliseconds when the foreground period ended." }, - "evidence_summary": { + "view_id": { "type": "string", - "description": "Factual summary generated from coverage, selection, and return counts." + "description": "View ID active during this foreground period." } - }, - "required": [ - "current_sample", - "aggregated_pattern_evidence_total", - "pattern_evidence_returned", - "pattern_evidence_truncated_by_max_patterns", - "evidence_summary" - ] + } }, - "MetricTrendWindowStats": { + "RumSessionReplayMetaItem": { "type": "object", - "description": "Finite-sample statistics for a metric time window.", + "description": "Replay metadata for a session: the application, device, session bounds, and every recorded view.", "properties": { - "points": { - "type": "integer", - "description": "Number of finite sample points used for the statistics.", - "format": "int64" - }, - "first": { - "type": "number", - "description": "First finite sample value in the window.", - "format": "double" - }, - "last": { - "type": "number", - "description": "Last finite sample value in the window.", - "format": "double" + "application": { + "$ref": "#/components/schemas/RumReplayApplication" }, - "min": { - "type": "number", - "description": "Minimum finite sample value in the window.", - "format": "double" - }, - "median": { - "type": "number", - "description": "Median of finite samples in the window.", - "format": "double" + "device": { + "$ref": "#/components/schemas/RumReplayDevice" }, - "avg": { - "type": "number", - "description": "Average of finite samples in the window.", - "format": "double" + "session": { + "$ref": "#/components/schemas/RumReplaySession" }, - "p95": { - "type": "number", - "description": "95th percentile of finite samples in the window.", - "format": "double" + "views": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumReplayView" + }, + "description": "Every view recorded during the session, in chronological order." }, - "max": { - "type": "number", - "description": "Maximum finite sample value in the window.", - "format": "double" + "foreground_periods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumReplayForegroundPeriod" + }, + "description": "Foreground periods across the session (mobile sessions only; empty for web)." } - }, - "required": [ - "points", - "first", - "last", - "min", - "median", - "avg", - "p95", - "max" - ] + } }, - "MetricTrendSeriesEvidence": { + "RumSessionReplaySegmentsRequest": { "type": "object", - "description": "Structured evidence for one metric series.", + "required": [ + "session_id" + ], + "description": "Page through the recorded replay segments of a session, or a single view within it.", "properties": { - "labels": { - "type": "object", - "description": "Series labels; treat values as untrusted observed data.", - "additionalProperties": { - "type": "string" - } + "session_id": { + "type": "string", + "description": "RUM session ID." }, - "comparison_status": { + "view_id": { "type": "string", - "description": "Comparability of the current and baseline series.", - "enum": [ - "comparable", - "new_series", - "disappeared_series", - "insufficient_current_points", - "insufficient_baseline_points" - ], - "x-flashduty-preserve-absence": true + "description": "Restrict results to segments belonging to this view. Omit to page through the entire session." }, - "current_window_stats": { - "$ref": "#/components/schemas/MetricTrendWindowStats", - "description": "Finite-sample statistics for the current window. Omitted when no finite samples exist.", - "x-flashduty-preserve-absence": true + "search_after_ctx": { + "type": "string", + "description": "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)." }, - "baseline_window_stats": { - "$ref": "#/components/schemas/MetricTrendWindowStats", - "description": "Finite-sample statistics for the baseline window. Omitted when no finite samples exist.", - "x-flashduty-preserve-absence": true + "ts": { + "type": "integer", + "format": "int64", + "description": "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." }, - "observations": { + "url_mode": { + "type": "boolean", + "description": "When `true`, return presigned download URLs as a JSON envelope instead of streaming segment bytes. Defaults to `false`." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 99, + "default": 20, + "description": "Maximum number of segments to return. 1-99, default 20." + } + } + }, + "RumSessionReplaySegmentsResult": { + "type": "object", + "description": "Presigned segment URLs, returned only when `url_mode` is `true`.", + "properties": { + "items": { "type": "array", - "description": "Verifiable observations generated from the structured statistics.", "items": { "type": "string" - } + }, + "description": "Presigned, time-limited URLs (valid 1 hour) for downloading each segment's raw compressed bytes." + }, + "search_after_ctx": { + "type": "string", + "description": "Pagination cursor to pass as `search_after_ctx` on the next call. Empty when this page was the last one." } - }, - "required": [ - "labels", - "observations" - ] + } }, - "LogPatternSampleSummary": { + "CustomFieldValues": { "type": "object", - "description": "Log sample summary for the current window.", + "description": "Values keyed by account custom field name. The active form determines the allowed keys, types, and required fields.", + "additionalProperties": true + }, + "IncidentActionImage": { + "type": "object", + "description": "Image attached to an acknowledgement or resolution timeline entry.", + "required": [ + "src" + ], "properties": { - "logs_scanned": { - "type": "integer", - "description": "Number of logs scanned in the sample.", - "format": "int64" - }, - "patterns_aggregated": { - "type": "integer", - "description": "Number of patterns aggregated from the sample.", - "format": "int64" - }, - "logs_not_aggregated_due_to_cluster_limit": { - "type": "integer", - "description": "Logs not aggregated because the cluster limit was reached.", - "format": "int64" - }, - "pattern_matching_limited": { - "type": "boolean", - "description": "Whether pattern matching was limited by the bounded candidate set." + "src": { + "type": "string", + "description": "Image source. Accepts an `img_` upload token, an `http(s)` URL, or an object-storage key beginning with `/`." }, - "truncated": { - "type": "boolean", - "description": "Whether the data-source response was truncated at the sample limit." + "href": { + "type": "string", + "description": "Optional link that the image points to." }, - "sampling_bias": { + "alt": { "type": "string", - "description": "Data-source sampling direction when truncated, such as `newest_only` or `oldest_only`.", - "enum": [ - "newest_only", - "oldest_only" - ], - "x-flashduty-preserve-absence": true + "description": "Alternative text for the image." } - }, - "required": [ - "logs_scanned", - "patterns_aggregated", - "logs_not_aggregated_due_to_cluster_limit", - "pattern_matching_limited", - "truncated" - ] + } }, - "DiagnoseResult": { - "description": "Diagnostic evidence from one method; `method` determines the schema of the remaining fields.", - "oneOf": [ - { - "$ref": "#/components/schemas/DiagnoseLogPatternResult" - }, - { - "$ref": "#/components/schemas/DiagnoseMetricTrendResult" + "IncidentCardHiddenFields": { + "type": "object", + "description": "Fields to hide by IM app when previewing an incident card. Only supported IM app types and field names are accepted.", + "propertyNames": { + "type": "string", + "enum": [ + "feishu_app", + "dingtalk_app", + "slack_app", + "teams_app", + "wecom_app" + ] + }, + "additionalProperties": { + "type": "array", + "description": "Incident-card field names to hide for this IM app.", + "items": { + "type": "string", + "enum": [ + "channel", + "snoozed_before", + "severity", + "responders", + "aggregate_alert_count" + ] } + } + }, + "PreviewIncidentCardFixedField": { + "type": "object", + "description": "Fixed incident-card fields returned for supported IM previews after the requested hiding rules are applied.", + "required": [ + "field", + "value" ], - "discriminator": { - "propertyName": "method", - "mapping": { - "pattern_snapshot": "#/components/schemas/DiagnoseLogPatternResult", - "pattern_compare": "#/components/schemas/DiagnoseLogPatternResult", - "single_window_shape": "#/components/schemas/DiagnoseMetricTrendResult", - "window_compare": "#/components/schemas/DiagnoseMetricTrendResult" + "properties": { + "field": { + "type": "string", + "enum": [ + "channel", + "snoozed_before", + "severity", + "responders", + "aggregate_alert_count" + ], + "description": "Incident-card field name." + }, + "value": { + "type": "string", + "description": "Rendered display value for the fixed field." } } }, - "MetricTrendDiagnoseSummary": { + "FieldDeleteReference": { "type": "object", - "description": "Coverage, selection, and return counts for metric series.", + "description": "Custom form that still references the field.", + "required": [ + "kind", + "name", + "href" + ], "properties": { - "series_total": { - "type": "integer", - "description": "Total input series; for comparisons, the union of current and baseline label sets.", - "format": "int64" + "kind": { + "type": "string", + "const": "custom_form", + "description": "Referenced resource kind. Always `custom_form` for this response." }, - "series_analyzed": { - "type": "integer", - "description": "Number of series analyzed after applying `max_series`.", - "format": "int64" + "name": { + "type": "string", + "description": "Display name of the referencing custom form." }, - "selected_series_total": { - "type": "integer", - "description": "Series matching internal selection rules before `topk` is applied.", - "format": "int64" + "href": { + "type": "string", + "description": "Console URL for the referencing custom form." + } + } + }, + "FieldDeleteReferenceError": { + "type": "object", + "description": "Error response returned when a custom form still references the field.", + "required": [ + "request_id", + "error", + "data" + ], + "properties": { + "request_id": { + "type": "string", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, - "series_returned": { - "type": "integer", - "description": "Number of `series_evidence` items returned in this response.", - "format": "int64" + "error": { + "$ref": "#/components/schemas/DutyError" }, - "analysis_truncated": { - "type": "boolean", - "description": "Whether `max_series` prevented full analysis of all input series." + "data": { + "type": "object", + "required": [ + "refs" + ], + "properties": { + "refs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FieldDeleteReference" + } + } + } + } + } + }, + "DiagnoseEvidenceWindow": { + "type": "object", + "description": "Current analysis window using RFC 3339 UTC timestamps.", + "properties": { + "start": { + "type": "string", + "description": "Window start time in RFC 3339 UTC.", + "format": "date-time" }, - "evidence_summary": { + "end": { "type": "string", - "description": "Factual summary generated from coverage, selection, and return counts." + "description": "Window end time in RFC 3339 UTC.", + "format": "date-time" } }, "required": [ - "series_total", - "series_analyzed", - "selected_series_total", - "series_returned", - "analysis_truncated", - "evidence_summary" + "start", + "end" ] }, "DiagnoseLogDataHandling": { @@ -47181,6 +48603,62 @@ "untrusted_data_fields" ] }, + "DiagnoseLogPatternResponse": { + "type": "object", + "description": "Diagnostic result for the `log_patterns` operation.", + "properties": { + "schema_version": { + "type": "string", + "description": "Schema version of the edge diagnostic result.", + "enum": [ + "2" + ] + }, + "operation": { + "type": "string", + "description": "Diagnostic operation that produced the result.", + "enum": [ + "log_patterns" + ] + }, + "ds_type": { + "type": "string", + "description": "Data source type." + }, + "ds_name": { + "type": "string", + "description": "Data source name." + }, + "query": { + "type": "string", + "description": "Query string echoed from the request." + }, + "window": { + "$ref": "#/components/schemas/DiagnoseEvidenceWindow", + "description": "Current analysis window using RFC 3339 UTC timestamps." + }, + "results": { + "type": "array", + "description": "Diagnostic evidence from one method; `method` determines the schema of the remaining fields.", + "items": { + "$ref": "#/components/schemas/DiagnoseResult" + } + }, + "data_handling": { + "$ref": "#/components/schemas/DiagnoseLogDataHandling" + } + }, + "required": [ + "schema_version", + "operation", + "ds_type", + "ds_name", + "query", + "window", + "results", + "data_handling" + ] + }, "DiagnoseLogPatternResult": { "type": "object", "description": "Evidence from a log-pattern method.", @@ -47238,6 +48716,69 @@ "warnings" ] }, + "DiagnoseMethodSummary": { + "description": "Summary returned by either a log-pattern or metric-trend method.", + "oneOf": [ + { + "$ref": "#/components/schemas/LogPatternDiagnoseSummary" + }, + { + "$ref": "#/components/schemas/MetricTrendDiagnoseSummary" + } + ] + }, + "DiagnoseMetricTrendResponse": { + "type": "object", + "description": "Diagnostic result for the `metric_trends` operation.", + "properties": { + "schema_version": { + "type": "string", + "description": "Schema version of the edge diagnostic result.", + "enum": [ + "2" + ] + }, + "operation": { + "type": "string", + "description": "Diagnostic operation that produced the result.", + "enum": [ + "metric_trends" + ] + }, + "ds_type": { + "type": "string", + "description": "Data source type." + }, + "ds_name": { + "type": "string", + "description": "Data source name." + }, + "query": { + "type": "string", + "description": "Query string echoed from the request." + }, + "window": { + "$ref": "#/components/schemas/DiagnoseEvidenceWindow", + "description": "Current analysis window using RFC 3339 UTC timestamps." + }, + "results": { + "type": "array", + "description": "Diagnostic evidence from one method; `method` determines the schema of the remaining fields.", + "items": { + "$ref": "#/components/schemas/DiagnoseResult" + } + } + }, + "required": [ + "schema_version", + "operation", + "ds_type", + "ds_name", + "query", + "window", + "results" + ] + }, "DiagnoseMetricTrendResult": { "type": "object", "description": "Evidence from a metric-trend method.", @@ -47295,6 +48836,72 @@ "warnings" ] }, + "DiagnoseResult": { + "description": "Diagnostic evidence from one method; `method` determines the schema of the remaining fields.", + "oneOf": [ + { + "$ref": "#/components/schemas/DiagnoseLogPatternResult" + }, + { + "$ref": "#/components/schemas/DiagnoseMetricTrendResult" + } + ], + "discriminator": { + "propertyName": "method", + "mapping": { + "pattern_snapshot": "#/components/schemas/DiagnoseLogPatternResult", + "pattern_compare": "#/components/schemas/DiagnoseLogPatternResult", + "single_window_shape": "#/components/schemas/DiagnoseMetricTrendResult", + "window_compare": "#/components/schemas/DiagnoseMetricTrendResult" + } + } + }, + "LogPatternDiagnoseSummary": { + "type": "object", + "description": "Summary of log sampling, aggregation, and returned evidence.", + "properties": { + "current_sample": { + "$ref": "#/components/schemas/LogPatternSampleSummary", + "description": "Log sample summary for the current window." + }, + "baseline_sample": { + "$ref": "#/components/schemas/LogPatternSampleSummary", + "description": "Log sample summary for the baseline window.", + "x-flashduty-preserve-absence": true + }, + "patterns_aggregated_only_in_baseline_sample": { + "type": "integer", + "description": "Number of aggregated patterns observed only in the baseline sample. Omitted when sampling is incomplete.", + "format": "int64", + "x-flashduty-preserve-absence": true + }, + "aggregated_pattern_evidence_total": { + "type": "integer", + "description": "Total aggregated pattern evidence items before the response limit is applied.", + "format": "int64" + }, + "pattern_evidence_returned": { + "type": "integer", + "description": "Number of pattern evidence items returned in this response.", + "format": "int64" + }, + "pattern_evidence_truncated_by_max_patterns": { + "type": "boolean", + "description": "Whether returned pattern evidence was truncated by `max_patterns`." + }, + "evidence_summary": { + "type": "string", + "description": "Factual summary generated from coverage, selection, and return counts." + } + }, + "required": [ + "current_sample", + "aggregated_pattern_evidence_total", + "pattern_evidence_returned", + "pattern_evidence_truncated_by_max_patterns", + "evidence_summary" + ] + }, "LogPatternEvidence": { "type": "object", "description": "Structured evidence for one log pattern.", @@ -47350,24 +48957,49 @@ "pattern_template" ] }, - "DiagnoseEvidenceWindow": { + "LogPatternSampleSummary": { "type": "object", - "description": "Current analysis window using RFC 3339 UTC timestamps.", + "description": "Log sample summary for the current window.", "properties": { - "start": { - "type": "string", - "description": "Window start time in RFC 3339 UTC.", - "format": "date-time" + "logs_scanned": { + "type": "integer", + "description": "Number of logs scanned in the sample.", + "format": "int64" }, - "end": { + "patterns_aggregated": { + "type": "integer", + "description": "Number of patterns aggregated from the sample.", + "format": "int64" + }, + "logs_not_aggregated_due_to_cluster_limit": { + "type": "integer", + "description": "Logs not aggregated because the cluster limit was reached.", + "format": "int64" + }, + "pattern_matching_limited": { + "type": "boolean", + "description": "Whether pattern matching was limited by the bounded candidate set." + }, + "truncated": { + "type": "boolean", + "description": "Whether the data-source response was truncated at the sample limit." + }, + "sampling_bias": { "type": "string", - "description": "Window end time in RFC 3339 UTC.", - "format": "date-time" + "description": "Data-source sampling direction when truncated, such as `newest_only` or `oldest_only`.", + "enum": [ + "newest_only", + "oldest_only" + ], + "x-flashduty-preserve-absence": true } }, "required": [ - "start", - "end" + "logs_scanned", + "patterns_aggregated", + "logs_not_aggregated_due_to_cluster_limit", + "pattern_matching_limited", + "truncated" ] }, "LogPatternSourceEvidence": { @@ -47443,222 +49075,148 @@ "last_seen" ] }, - "DiagnoseMethodSummary": { - "description": "Summary returned by either a log-pattern or metric-trend method.", - "oneOf": [ - { - "$ref": "#/components/schemas/LogPatternDiagnoseSummary" - }, - { - "$ref": "#/components/schemas/MetricTrendDiagnoseSummary" - } - ] - }, - "DiagnoseMetricTrendResponse": { + "MetricTrendDiagnoseSummary": { "type": "object", - "description": "Diagnostic result for the `metric_trends` operation.", + "description": "Coverage, selection, and return counts for metric series.", "properties": { - "schema_version": { - "type": "string", - "description": "Schema version of the edge diagnostic result.", - "enum": [ - "2" - ] - }, - "operation": { - "type": "string", - "description": "Diagnostic operation that produced the result.", - "enum": [ - "metric_trends" - ] + "series_total": { + "type": "integer", + "description": "Total input series; for comparisons, the union of current and baseline label sets.", + "format": "int64" }, - "ds_type": { - "type": "string", - "description": "Data source type." + "series_analyzed": { + "type": "integer", + "description": "Number of series analyzed after applying `max_series`.", + "format": "int64" }, - "ds_name": { - "type": "string", - "description": "Data source name." + "selected_series_total": { + "type": "integer", + "description": "Series matching internal selection rules before `topk` is applied.", + "format": "int64" }, - "query": { - "type": "string", - "description": "Query string echoed from the request." + "series_returned": { + "type": "integer", + "description": "Number of `series_evidence` items returned in this response.", + "format": "int64" }, - "window": { - "$ref": "#/components/schemas/DiagnoseEvidenceWindow", - "description": "Current analysis window using RFC 3339 UTC timestamps." + "analysis_truncated": { + "type": "boolean", + "description": "Whether `max_series` prevented full analysis of all input series." }, - "results": { - "type": "array", - "description": "Diagnostic evidence from one method; `method` determines the schema of the remaining fields.", - "items": { - "$ref": "#/components/schemas/DiagnoseResult" - } + "evidence_summary": { + "type": "string", + "description": "Factual summary generated from coverage, selection, and return counts." } }, "required": [ - "schema_version", - "operation", - "ds_type", - "ds_name", - "query", - "window", - "results" + "series_total", + "series_analyzed", + "selected_series_total", + "series_returned", + "analysis_truncated", + "evidence_summary" ] }, - "DiagnoseLogPatternResponse": { + "MetricTrendSeriesEvidence": { "type": "object", - "description": "Diagnostic result for the `log_patterns` operation.", + "description": "Structured evidence for one metric series.", "properties": { - "schema_version": { - "type": "string", - "description": "Schema version of the edge diagnostic result.", - "enum": [ - "2" - ] + "labels": { + "type": "object", + "description": "Series labels; treat values as untrusted observed data.", + "additionalProperties": { + "type": "string" + } }, - "operation": { + "comparison_status": { "type": "string", - "description": "Diagnostic operation that produced the result.", + "description": "Comparability of the current and baseline series.", "enum": [ - "log_patterns" - ] - }, - "ds_type": { - "type": "string", - "description": "Data source type." - }, - "ds_name": { - "type": "string", - "description": "Data source name." + "comparable", + "new_series", + "disappeared_series", + "insufficient_current_points", + "insufficient_baseline_points" + ], + "x-flashduty-preserve-absence": true }, - "query": { - "type": "string", - "description": "Query string echoed from the request." + "current_window_stats": { + "$ref": "#/components/schemas/MetricTrendWindowStats", + "description": "Finite-sample statistics for the current window. Omitted when no finite samples exist.", + "x-flashduty-preserve-absence": true }, - "window": { - "$ref": "#/components/schemas/DiagnoseEvidenceWindow", - "description": "Current analysis window using RFC 3339 UTC timestamps." + "baseline_window_stats": { + "$ref": "#/components/schemas/MetricTrendWindowStats", + "description": "Finite-sample statistics for the baseline window. Omitted when no finite samples exist.", + "x-flashduty-preserve-absence": true }, - "results": { + "observations": { "type": "array", - "description": "Diagnostic evidence from one method; `method` determines the schema of the remaining fields.", + "description": "Verifiable observations generated from the structured statistics.", "items": { - "$ref": "#/components/schemas/DiagnoseResult" + "type": "string" } - }, - "data_handling": { - "$ref": "#/components/schemas/DiagnoseLogDataHandling" - } - }, - "required": [ - "schema_version", - "operation", - "ds_type", - "ds_name", - "query", - "window", - "results", - "data_handling" - ] - }, - "ManualRunRuleResult": { - "type": "object", - "description": "Result of manually running an Automation rule outside its schedule.", - "properties": { - "rule_id": { - "type": "string", - "description": "Rule ID that was run." - }, - "trigger_kind": { - "type": "string", - "enum": [ - "manual" - ], - "description": "Always manual for this operation." - }, - "preflight": { - "$ref": "#/components/schemas/PreflightResult" - }, - "run": { - "$ref": "#/components/schemas/AutomationRunView" } }, "required": [ - "rule_id", - "trigger_kind", - "preflight" + "labels", + "observations" ] }, - "PreflightResult": { + "MetricTrendWindowStats": { "type": "object", - "description": "Readiness checks computed before a manual run is allowed to start.", + "description": "Finite-sample statistics for a metric time window.", "properties": { - "ok": { - "type": "boolean", - "description": "Whether all readiness checks passed. Always true in a response that reaches the caller — a failed preflight returns a 400/403 error instead of a payload with ok=false." + "points": { + "type": "integer", + "description": "Number of finite sample points used for the statistics.", + "format": "int64" }, - "checks": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Names of the readiness checks performed, in order. Current fixed set: rule_loaded, actor_authorized, app_allowed, runtime_scope_resolved, rule_config_valid." + "first": { + "type": "number", + "description": "First finite sample value in the window.", + "format": "double" }, - "scope": { - "type": "string", - "enum": [ - "person", - "team" - ], - "description": "Resolved run scope for this run; mirrors the rule's run_scope." + "last": { + "type": "number", + "description": "Last finite sample value in the window.", + "format": "double" }, - "owner_id": { - "type": "integer", - "format": "int64", - "description": "Rule owner person ID." + "min": { + "type": "number", + "description": "Minimum finite sample value in the window.", + "format": "double" }, - "team_id": { - "type": "integer", - "format": "int64", - "description": "Rule's scope team ID; 0 means a personal rule." + "median": { + "type": "number", + "description": "Median of finite samples in the window.", + "format": "double" }, - "app_name": { - "type": "string", - "description": "App the rule is scoped to. Currently always ai-sre; manual runs are only supported for that app." + "avg": { + "type": "number", + "description": "Average of finite samples in the window.", + "format": "double" }, - "warnings": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Non-fatal warnings surfaced during preflight. Omitted or empty when there are none." - } - }, - "required": [ - "ok", - "checks", - "scope", - "owner_id", - "team_id", - "app_name" - ] - }, - "AutomationRunView": { - "type": "object", - "description": "Reference to the run started by a manual trigger.", - "properties": { - "run_id": { - "type": "string", - "description": "Run ID, always populated once a run is created." + "p95": { + "type": "number", + "description": "95th percentile of finite samples in the window.", + "format": "double" }, - "session_id": { - "type": "string", - "description": "AI SRE session ID for this run. Always populated in a 200 response, since the call only returns after the session has started." + "max": { + "type": "number", + "description": "Maximum finite sample value in the window.", + "format": "double" } }, "required": [ - "run_id" + "points", + "first", + "last", + "min", + "median", + "avg", + "p95", + "max" ] } } diff --git a/openapi/openapi.zh.json b/openapi/openapi.zh.json index c6cb3bc..e3e5ee6 100644 --- a/openapi/openapi.zh.json +++ b/openapi/openapi.zh.json @@ -41,6 +41,10 @@ "name": "On-call/值班排班", "description": "" }, + { + "name": "On-call/许可管理", + "description": "" + }, { "name": "On-call/日历管理", "description": "" @@ -143,6 +147,10 @@ { "name": "RUM/RUM Sourcemap", "description": "管理和查询用于 Browser、Android、iOS 错误符号化的 RUM Sourcemap 文件。" + }, + { + "name": "RUM/Session replay", + "description": "查询 RUM 会话的回放元数据与录制分段。" } ], "paths": { @@ -918,7 +926,7 @@ "On-call/故障管理" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 账户的创建表单生效时,必须提供其中可见的自定义字段和必填系统字段。\n- 如需在创建时附加图片,请使用 `multipart/form-data`:在 `data` 中传 JSON 请求体,在 `images` 中传文件;完整请求不得超过 50 MiB。\n- 已审计 —— 变更会记录到审计日志。", "href": "/zh/api-reference/on-call/incidents/incident-create", "metadata": { "sidebarTitle": "创建故障" @@ -984,6 +992,33 @@ ] } } + }, + "multipart/form-data": { + "schema": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "string", + "description": "JSON 编码的 CreateIncidentRequest 请求体。" + }, + "images": { + "type": "array", + "items": { + "type": "string", + "format": "binary" + }, + "description": "附加到新故障的图片文件。" + } + } + }, + "encoding": { + "data": { + "contentType": "application/json" + } + } } } } @@ -998,7 +1033,7 @@ "On-call/故障管理" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 认领表单生效时,`custom_fields`、`summary` 和 `images` 必须符合其中可见元素及必填规则。\n- 批量操作只有在全部选中的故障解析到同一张表单时才接受表单值;否则请逐条认领。\n- 旧字段 `values` 和 `custom_values` 会被拒绝,请使用 `custom_fields`。\n- 已审计 —— 变更会记录到审计日志。", "href": "/zh/api-reference/on-call/incidents/incident-ack", "metadata": { "sidebarTitle": "认领故障" @@ -1142,7 +1177,7 @@ "On-call/故障管理" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 解决表单生效时,`custom_fields`、`summary` 和 `images` 必须符合其中可见元素及必填规则。\n- 批量操作只有在全部选中的故障解析到同一张表单时才接受表单值;否则请逐条解决。\n- 旧字段 `values` 和 `custom_values` 会被拒绝,请使用 `custom_fields`。\n- 已审计 —— 变更会记录到审计日志。", "href": "/zh/api-reference/on-call/incidents/incident-resolve", "metadata": { "sidebarTitle": "恢复故障" @@ -10941,7 +10976,14 @@ "timeout_escalations": 0, "manual_escalations": 0, "creator_id": 3790925372131, - "creator_name": "alice" + "creator_name": "alice", + "owner_id": 3790925372132, + "owner_name": "bob", + "closer_id": 3790925372133, + "closer_name": "carol", + "snoozed_before": 1712608400, + "ever_muted": false, + "frequency": "rare" } ] } @@ -10987,12 +11029,12 @@ "post": { "operationId": "insightIncidentExport", "summary": "导出洞察故障", - "description": "将故障分析列表以 CSV 文件形式导出。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", + "description": "将故障分析列表以 CSV 文件形式导出。CSV 列名和格式化值优先使用请求语言,其次使用成员语言和账户语言。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", "tags": [ "On-call/分析看板" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**;**1 次/秒** |\n| 权限要求 | **分析看板查看**(`on-call`) |", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **100 次/天**;**20 次/分钟**;**10 次/秒** |\n| 权限要求 | **分析看板查看**(`on-call`) |", "href": "/zh/api-reference/on-call/analytics/insight-incident-export", "metadata": { "sidebarTitle": "导出洞察故障" @@ -11174,12 +11216,12 @@ "post": { "operationId": "insightChannelExport", "summary": "导出协作空间洞察", - "description": "将协作空间洞察指标以 CSV 文件形式导出。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", + "description": "将协作空间洞察指标以 CSV 文件形式导出。CSV 列名和格式化值优先使用请求语言,其次使用成员语言和账户语言。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", "tags": [ "On-call/分析看板" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**;**1 次/秒** |\n| 权限要求 | **分析看板查看**(`on-call`) |", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **100 次/天**;**20 次/分钟**;**10 次/秒** |\n| 权限要求 | **分析看板查看**(`on-call`) |", "href": "/zh/api-reference/on-call/analytics/insight-channel-export", "metadata": { "sidebarTitle": "导出协作空间洞察" @@ -11356,12 +11398,12 @@ "post": { "operationId": "insightTeamExport", "summary": "导出团队洞察", - "description": "将团队洞察指标以 CSV 文件形式导出。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", + "description": "将团队洞察指标以 CSV 文件形式导出。CSV 列名和格式化值优先使用请求语言,其次使用成员语言和账户语言。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", "tags": [ "On-call/分析看板" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**;**1 次/秒** |\n| 权限要求 | **分析看板查看**(`on-call`) |", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **100 次/天**;**20 次/分钟**;**10 次/秒** |\n| 权限要求 | **分析看板查看**(`on-call`) |", "href": "/zh/api-reference/on-call/analytics/insight-team-export", "metadata": { "sidebarTitle": "导出团队洞察" @@ -11529,12 +11571,12 @@ "post": { "operationId": "insightResponderExport", "summary": "导出处理人员洞察", - "description": "将处理人员洞察指标以 CSV 文件形式导出。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", + "description": "将处理人员洞察指标以 CSV 文件形式导出。CSV 列名和格式化值优先使用请求语言,其次使用成员语言和账户语言。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", "tags": [ "On-call/分析看板" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**;**1 次/秒** |\n| 权限要求 | **分析看板查看**(`on-call`) |", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **100 次/天**;**20 次/分钟**;**10 次/秒** |\n| 权限要求 | **分析看板查看**(`on-call`) |", "href": "/zh/api-reference/on-call/analytics/insight-responder-export", "metadata": { "sidebarTitle": "导出处理人员洞察" @@ -12701,7 +12743,7 @@ "On-call/状态页" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**;**1 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **100 次/天**;**20 次/分钟**;**10 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", "href": "/zh/api-reference/on-call/status-pages/status-page-subscriber-export", "metadata": { "sidebarTitle": "导出订阅者" @@ -13239,7 +13281,7 @@ "Monitors/告警规则" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- `name`、`ds_type`、`cron_pattern` 和 `rule_configs.queries` 为必填项。\n- `ds_list`(支持通配符)或 `ds_ids` 必须有一个非空。\n- `cron_pattern` 使用标准 5 字段 cron 语法。\n- `channel_ids` 可为空,告警将通过全局集成路由。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- `name`、`ds_type`、`cron_pattern` 和 `rule_configs.queries` 为必填项。\n- `ds_list`(支持通配符)或 `ds_ids` 必须有一个非空。\n- `cron_pattern` 使用标准 5 字段 cron 语法。\n- `channel_ids` 可为空,告警将通过全局集成路由。\n- `name` 在 `folder_id` 内必须唯一;重名会返回 `InvalidParameter`。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-create", "metadata": { "sidebarTitle": "创建告警规则" @@ -13343,7 +13385,7 @@ "Monitors/告警规则" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- `id` 为必填项。其他字段与 `POST /monit/rule/create` 的规则相同。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- `id` 为必填项。其他字段与 `POST /monit/rule/create` 的规则相同。\n- 名称在所在文件夹内必须保持唯一;重名会返回 `InvalidParameter`。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-update", "metadata": { "sidebarTitle": "更新告警规则" @@ -13753,7 +13795,7 @@ "Monitors/告警规则" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**;**1 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/天**;**200 次/分钟**;**20 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |", "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-export", "metadata": { "sidebarTitle": "导出告警规则" @@ -13835,7 +13877,7 @@ "Monitors/告警规则" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- 如果目标文件夹中已存在同名规则,该规则会被跳过;请检查每条结果的 `message` 以识别冲突。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-move", "metadata": { "sidebarTitle": "移动告警规则到文件夹" @@ -15473,7 +15515,7 @@ "RUM/RUM 自定义字段" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 使用 `POST /rum/facet/list` 发现每个 scope 下可用的 `facet_key` 值。\n- `scope` 必须是以下之一:`session`、`view`、`action`、`error`、`resource`、`long_task`、`vital`、`issue`、`sourcemap`。\n- 传入 `dql` 可在统计前进一步过滤事件,DQL 语法遵循 RUM 查询语言。\n- 传入 `sql` 可使用仅含 WHERE 子句(无 SELECT)的 SQL 风格过滤。\n- 默认 limit 为 100,最大 100。\n- 时间范围必填(`start_time` / `end_time` 为 Unix 毫秒时间戳),最大跨度 31 天。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**100 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 使用 `POST /rum/facet/list` 发现每个 scope 下可用的 `facet_key` 值。\n- `scope` 必须是以下之一:`session`、`view`、`action`、`error`、`resource`、`long_task`、`vital`、`issue`、`sourcemap`。\n- 传入 `dql` 可在统计前进一步过滤事件,DQL 语法遵循 RUM 查询语言。\n- 传入 `sql` 可使用仅含 WHERE 子句(无 SELECT)的 SQL 风格过滤。\n- 默认 limit 为 100,最大 100。\n- 时间范围必填(`start_time` / `end_time` 为 Unix 毫秒时间戳),最大跨度 31 天。", "href": "/zh/api-reference/rum/facets/rum-read-facet-count", "metadata": { "sidebarTitle": "查询分值分布" @@ -19645,7 +19687,7 @@ "On-call/标签增强" ], "x-mint": { - "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | 每账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限 | **故障可管理** (`on-call`) |\n\n## 使用说明\n\n- 字段会立即标记为已删除;从历史故障中剥离对应值的清理过程在后台执行,数据量大时可能较慢。\n- 仅当 `field_type` 与 `value_type` 完全一致时,才允许复用已删除字段的 `field_name`。\n- 该接口会被审计日志记录。", + "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | 每账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限 | **故障可管理** (`on-call`) |\n\n## 使用说明\n\n- 字段会被同步标记为已删除;历史故障中的字段值会在后台清理,大型数据集可能需要时间。\n- 仅当 `field_type` 和 `value_type` 与已删除字段一致时,才能使用相同 `field_name` 重新创建。\n- 自定义表单仍使用该字段时,删除会返回 `ReferenceExist`,引用表单位于 `data.refs`;移除所有引用后才能删除。\n- 已审计 —— 变更会记录到审计日志。", "href": "/zh/api-reference/on-call/alert-enrichment/field-write-delete", "metadata": { "sidebarTitle": "删除自定义字段" @@ -19679,7 +19721,41 @@ } }, "400": { - "$ref": "#/components/responses/BadRequest" + "description": "请求参数无效,或该字段仍被自定义表单引用。", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorResponse" + }, + { + "$ref": "#/components/schemas/FieldDeleteReferenceError" + } + ] + }, + "examples": { + "fieldStillReferenced": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "ReferenceExist", + "message": "There still are associated resources, deletion is blocked." + }, + "data": { + "refs": [ + { + "kind": "custom_form", + "name": "Resolve incident", + "href": "https://console.flashcat.cloud/forms/resolve" + } + ] + } + } + } + } + } + } }, "401": { "$ref": "#/components/responses/Unauthorized" @@ -19715,7 +19791,7 @@ "Monitors/诊断分析" ], "x-mint": { - "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | **600 次/分钟**;**10 次/秒** 每账户 |\n| 权限 | 任意有效的 `app_key`(只读;不受特定权限分类约束) |\n\n## 使用说明\n\n- 请求通过 WebSocket 转发至 `monit-edge`;`ds_type` + `ds_name` 指定的数据源必须已在调用方账户下存在。\n- 请求体中的 `account_id` 为可选;若提供,必须与已认证账户一致,否则拒绝。\n- 存在两层错误:webapi 层失败使用标准错误信封返回,而 `monit-edge` 执行查询时抛出的错误以 HTTP 200 返回,并在响应体中携带 `error` 对象。除 HTTP 状态外,务必同时检查响应体中的 `error`。\n- monit-edge 强制行数上限;过大结果集会返回 `error.message = \"too many rows\"`。请收窄时间范围或在数据源端聚合。\n- `args` 是一个多态 `string→string` 映射,原样转发。语义取决于 `ds_type`(SLS 需要 `sls.project` + `sls.logstore`;Loki / VictoriaLogs 原始模式需要通过 `*.start`/`*.end` 或 `*.timespan.value`/`*.timespan.unit` 指定时间范围;Prometheus 与 SQL 类数据源忽略该字段)。各数据源的键列表见 monit-webapi query-api 文档。", + "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | **600 次/分钟**;**10 次/秒** 每账户 |\n| 权限 | 任意有效的 `app_key`(只读;不受特定权限分类约束) |\n\n## 使用说明\n\n- 请求通过 WebSocket 转发至 `monit-edge`;`ds_type` + `ds_name` 指定的数据源必须已在调用方账户下存在。\n- 请求体中的 `account_id` 为可选;若提供,必须与已认证账户一致,否则拒绝。\n- 请求参数校验失败使用标准错误信封返回。`monit-edge` 拒绝查询时,原始 `{\"error\": {\"code\": ..., \"message\": ...}}` 响应体会被保留,HTTP 状态码与边缘错误码一致;无效或缺失的错误码按 HTTP 500 返回。请同时检查 HTTP 状态与错误体。\n- monit-edge 强制行数上限;过大结果集会返回 `error.message = \"too many rows\"`。请收窄时间范围或在数据源端聚合。\n- `args` 是一个多态 `string→string` 映射,原样转发。语义取决于 `ds_type`(SLS 需要 `sls.project` + `sls.logstore`;Loki / VictoriaLogs 原始模式需要通过 `*.start`/`*.end` 或 `*.timespan.value`/`*.timespan.unit` 指定时间范围;Prometheus 与 SQL 类数据源忽略该字段)。各数据源的键列表见 monit-webapi query-api 文档。", "href": "/zh/api-reference/monitors/diagnostics/monit-read-query-rows", "metadata": { "sidebarTitle": "查询数据源原始行" @@ -19800,7 +19876,7 @@ "Monitors/诊断分析" ], "x-mint": { - "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | **600 次/分钟**;**10 次/秒** 每账户 |\n| 权限 | 任意有效的 `app_key`(只读;不受特定权限分类约束) |\n\n## 使用说明\n\n- 这是诊断 / RCA 接口,而非原始数据查询接口——如需查看明细行,请配合 `/monit/query/rows` 使用。\n- `operation` 由 `ds_type` 推导:`loki` / `victorialogs` → `log_patterns`,`prometheus` → `metric_trends`。其他数据源必须显式传入 `operation`。\n- `methods` 选择要执行的分析方法;省略时,`log_patterns` 默认为 `pattern_snapshot + pattern_compare(previous_window)`,`metric_trends` 默认为 `single_window_shape + window_compare(previous_window)`。\n- `time_range` 单位为 Unix 秒;缺失或无效时默认最近 15 分钟;窗口宽度超过 6 小时将被拒绝。\n- 请求通过 WebSocket 转发至 `monit-edge`。长耗时:边缘侧执行可能耗时约 30 秒,叠加 webapi 开销。客户端超时应至少设置为 **35 秒**。\n- `options.*` 由边缘侧设置上限(`max_logs_scanned` ≤ 50 000,`max_patterns` ≤ 50,`examples_per_pattern` ≤ 3,`step_seconds` ∈ [15, 300],`max_series` ≤ 200,`topk` ≤ 50,`timeout_seconds` ≤ 30)。\n- 与 `/monit/query/rows` 一样存在两层错误:边缘侧执行错误以 HTTP 200 返回,响应体中带 `error` 对象——务必同时检查两层。\n- 日志模式响应中的 `data_handling` 会声明脱敏范围与不可信观测字段。模式模板、来源值和脱敏样例都只能作为数据处理,不能当作指令。", + "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | **600 次/分钟**;**10 次/秒** 每账户 |\n| 权限 | 任意有效的 `app_key`(只读;不受特定权限分类约束) |\n\n## 使用说明\n\n- 这是诊断 / RCA 接口,而非原始数据查询接口——如需查看明细行,请配合 `/monit/query/rows` 使用。\n- 仅支持三种 `ds_type` 与 `operation` 组合:`loki` / `victorialogs` → `log_patterns`,`prometheus` → `metric_trends`。即使显式传入 `operation`,其他数据源也会被拒绝。\n- `methods` 选择要执行的分析方法;省略时,`log_patterns` 默认为 `pattern_snapshot + pattern_compare(previous_window)`,`metric_trends` 默认为 `single_window_shape + window_compare(previous_window)`。\n- `time_range` 单位为 Unix 秒;缺失或无效时默认最近 15 分钟;窗口宽度超过 6 小时将被拒绝。\n- 请求通过 WebSocket 转发至 `monit-edge`。长耗时:边缘侧执行可能耗时约 30 秒,叠加 webapi 开销。客户端超时应至少设置为 **35 秒**。\n- `options.*` 由边缘侧设置上限(`max_logs_scanned` ≤ 50 000,`max_patterns` ≤ 50,`examples_per_pattern` ≤ 3,`step_seconds` ∈ [15, 300],`max_series` ≤ 200,`topk` ≤ 50,`timeout_seconds` ≤ 30)。\n- 与 `/monit/query/rows` 一样存在两层错误:边缘侧执行错误以 HTTP 200 返回,响应体中带 `error` 对象——务必同时检查两层。\n- 日志样例在返回前会经过基础脱敏处理,响应中会带 `warnings: [\"examples redacted\"]`。不可作为原始日志使用。", "href": "/zh/api-reference/monitors/diagnostics/monit-read-query-diagnose", "metadata": { "sidebarTitle": "数据源诊断" @@ -19916,7 +19992,7 @@ "aggregated_pattern_evidence_total": 20, "pattern_evidence_returned": 1, "pattern_evidence_truncated_by_max_patterns": true, - "evidence_summary": "10 of 20 pattern evidence items are returned." + "evidence_summary": "1 of 20 pattern evidence items are returned." }, "pattern_evidence": [ { @@ -19981,7 +20057,7 @@ "Monitors/诊断分析" ], "x-mint": { - "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | **600 次/分钟**;**10 次/秒** 每账户 |\n| 权限 | 任意有效的 `app_key`(只读;不受特定权限分类约束) |\n\n## 使用说明\n\n- 使用 `target_locator` 标识监控对象;`target_kind` 可选,省略时自动推断。内置的 target kind 包括 `host` 与 `mysql`。\n- 若同一 locator 匹配多个 kind,响应为 HTTP 200,`data.error.code = \"ambiguous_target_kind\"`,并附带 `target_kinds` 列表——请带上显式的 `target_kind` 重试。\n- 工具能力清单是*候选能力*视图,并非执行保证。目标 Agent 可能在拿到清单与发起调用之间下线,本地 Agent 策略也可能在调用时拦截某些工具。\n- 设置 `include_output_shape: true` 可额外返回每个工具的 `output_shape`。默认为 `false`,以便为 LLM 消费保持响应精简。\n- 业务错误(`target_unavailable`、`unknown_toolset_hash`、`ambiguous_target_kind`)以 HTTP 200 返回,`data.error` 非空。只有协议 / 鉴权 / 内部错误才使用标准错误信封。", + "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | **600 次/分钟**;**10 次/秒** 每账户 |\n| 权限 | 任意有效的 `app_key`(只读;不受特定权限分类约束) |\n\n## 使用说明\n\n- 使用 `target_locator` 标识监控对象;`target_kind` 可选,省略时自动推断。内置的 target kind 包括 `host` 与 `mysql`。\n- 若同一 locator 匹配多个 kind,响应为 HTTP 200,`data.error.code = \"ambiguous_target_kind\"`,并附带 `target_kinds` 列表——请带上显式的 `target_kind` 重试。\n- 工具能力清单是*候选能力*视图,并非执行保证。目标 Agent 可能在拿到清单与发起调用之间下线,本地 Agent 策略也可能在调用时拦截某些工具。\n- 设置 `include_output_shape: true` 可额外返回每个工具的 `output_shape`。默认为 `false`,以便为 LLM 消费保持响应精简。\n- 业务错误(`target_unavailable`、`unknown_toolset_hash`、`ambiguous_target_kind`)以 HTTP 200 返回,`data.error` 存在且 `data.tools = []`。只有协议 / 鉴权 / 内部错误才使用标准错误信封。\n- 响应采用**稀疏字段**:成功时 `error` 直接省略而非返回 `null`;当 locator 无法唯一解析时 `target` 不输出。`tools` 字段恒存在。", "href": "/zh/api-reference/monitors/diagnostics/monit-read-tools-catalog", "metadata": { "sidebarTitle": "查询监控对象工具能力清单" @@ -20033,34 +20109,232 @@ { "name": "os.overview", "target_kind": "host", - "description": "Returns a bounded overview of host health (CPU, memory, disk, network, top processes).", + "description": "Returns a bounded overview of host health: CPU usage and load, memory and swap utilisation, disk and network counters, and top processes.", "input_schema": { "type": "object", "additionalProperties": false, "properties": {} }, "output_shape": { + "properties": { + "data": { + "properties": { + "cpu": { + "type": "object" + }, + "degradation_reasons": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + "disk": { + "description": "Filesystems sorted by used_pct desc; rootfs always present; capped at host.disk.top_n. Sizes are in GB; used_pct/inode_used_pct in percent.", + "type": "array" + }, + "disk_errors": { + "description": "Mount points whose statfs returned a syscall error (EACCES / ENOENT / EIO / stale, etc.); each entry is `: `.", + "type": "array" + }, + "disk_io": { + "description": "Per-device disk I/O rates (util_pct, IOPS, throughput, await). Sorted by util_pct desc; capped at host.disk_io.top_n. Only whole-disk devices shown.", + "type": "object" + }, + "disk_timeouts": { + "description": "Mount points whose statfs hit per-mount timeout.", + "type": "array" + }, + "load": { + "type": "object" + }, + "memory": { + "description": "Memory and swap sizes are in MB; percentages are 0..100. Swap fields are always present when memory collection succeeds, including zero when swap is not configured.", + "properties": { + "available_mb": { + "type": "integer" + }, + "swap_configured": { + "description": "True when the kernel reports a non-zero SwapTotal.", + "type": "boolean" + }, + "swap_total_mb": { + "type": "integer" + }, + "swap_used_mb": { + "type": "integer" + }, + "swap_used_pct": { + "type": "number" + }, + "total_mb": { + "type": "integer" + }, + "used_mb": { + "type": "integer" + }, + "used_pct": { + "type": "number" + } + }, + "required": [ + "total_mb", + "available_mb", + "used_mb", + "used_pct", + "swap_configured", + "swap_total_mb", + "swap_used_mb", + "swap_used_pct" + ], + "type": "object" + }, + "network_io": { + "description": "Per-interface network throughput and error rates. Sorted by total traffic desc; capped at host.network_io.top_n. Virtual/container interfaces excluded by default.", + "type": "object" + }, + "procs": { + "type": "object" + }, + "sample_interval_sec": { + "description": "Shared sampling interval for CPU, disk_io, network_io counter-diff calculations.", + "type": "number" + }, + "tcp_connections": { + "description": "TCP connection state distribution via netlink SOCK_DIAG. Shows counts per state (established, time_wait, close_wait, listen, syn_recv, other, total).", + "type": "object" + }, + "uptime_sec": { + "type": "number" + }, + "vmstat": { + "description": "Sparse cumulative counters since the current boot; use them as historical clues, not current rates.", + "properties": { + "oom_kill_since_boot": { + "description": "OOM kills accumulated since boot; omitted when this kernel does not expose the counter.", + "type": "integer" + }, + "pgmajfault_since_boot": { + "description": "Major page faults accumulated since boot.", + "type": "integer" + } + }, + "required": [ + "pgmajfault_since_boot" + ], + "type": "object" + } + }, + "required": [ + "sample_interval_sec" + ], + "type": "object" + }, + "summary": { + "minLength": 1, + "type": "string" + }, + "truncated": { + "additionalProperties": false, + "properties": { + "reason": { + "minLength": 1, + "type": "string" + } + }, + "required": [ + "reason" + ], + "type": "object" + } + }, + "required": [ + "data" + ], + "type": "object" + } + }, + { + "name": "net.tcp_ping", + "target_kind": "host", + "description": "Checks TCP reachability of a host:port from the target, reporting connect latency.", + "input_schema": { "type": "object", + "additionalProperties": false, "required": [ - "data", - "summary", - "truncated" + "host", + "port" ], + "properties": { + "host": { + "type": "string" + }, + "port": { + "type": "integer" + } + } + }, + "output_shape": { "properties": { "data": { + "properties": { + "avg_ms": { + "type": "number" + }, + "max_ms": { + "type": "number" + }, + "min_ms": { + "type": "number" + }, + "probes": { + "items": { + "properties": { + "error": { + "type": "string" + }, + "latency_ms": { + "type": "number" + } + }, + "type": "object" + }, + "type": "array" + }, + "reachable": { + "type": "boolean" + }, + "resolved_ip": { + "type": "string" + } + }, "type": "object" }, "summary": { + "minLength": 1, "type": "string" }, "truncated": { + "additionalProperties": false, + "properties": { + "reason": { + "minLength": 1, + "type": "string" + } + }, + "required": [ + "reason" + ], "type": "object" } - } + }, + "required": [ + "data" + ], + "type": "object" } } - ], - "error": null + ] } } } @@ -20090,7 +20364,7 @@ "Monitors/诊断分析" ], "x-mint": { - "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | **600 次/分钟**;**10 次/秒** 每账户 |\n| 权限 | 任意有效的 `app_key`(只读;不受特定权限分类约束) |\n\n## 使用说明\n\n- 单次调用至多 **8** 个工具(`MaxToolsPerInvoke`);超出需在客户端拆分。8 个工具的上限与单监控对象 Agent 的并发能力对齐。\n- 工具在 Agent 上并行执行;webapi 返回的 `results[]` 与请求中的 `tools[]` 顺序对齐。\n- 长耗时:客户端超时至少设置 **35 秒**。该接口面向 AI-SRE / 人工排障流程,不适用于交互式 UI。\n- 请求级错误(`target_unavailable`、`ambiguous_target_kind`、`unknown_toolset_hash`、`forward_failed`)以 HTTP 200 返回,`data.error` 不为空,`data.results = []`。\n- 单工具失败以 HTTP 200 返回,`data.error = null`,`results[i].error` 被填充——务必同时检查**三层**(外层信封 `error`、`data.error`、再到每个 `results[i].error`)。\n- 每条结果带两个耗时字段:`agent_elapsed_ms`(Agent 自报,不含网络)与 `e2e_elapsed_ms`(webapi 观测的端到端)。两者差距较大表示网络 / 边缘侧慢,而非工具执行慢。\n- 按 `/monit/tools/catalog` 返回的 `input_schema` 构造 `tools[].params`。对于无参工具,务必显式传 `params: {}`。", + "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | **600 次/分钟**;**10 次/秒** 每账户 |\n| 权限 | 任意有效的 `app_key`(只读;不受特定权限分类约束) |\n\n## 使用说明\n\n- 单次调用至多 **8** 个工具(`MaxToolsPerInvoke`);超出需在客户端拆分。8 个工具的上限与单监控对象 Agent 的并发能力对齐。\n- 工具在 Agent 上并行执行;webapi 返回的 `results[]` 与请求中的 `tools[]` 顺序对齐。\n- 长耗时:客户端超时至少设置 **35 秒**。该接口面向 AI-SRE / 人工排障流程,不适用于交互式 UI。\n- 请求级错误(`target_unavailable`、`ambiguous_target_kind`、`unknown_toolset_hash`、`forward_failed`)以 HTTP 200 返回,`data.error` 不为空,`data.results = []`。\n- 单工具失败以 HTTP 200 返回,`data.error` 不输出,`results[i].error` 被填充——务必同时检查**三层**(外层信封 `error`、`data.error`、再到每个 `results[i].error`)。\n- 响应采用**稀疏字段**:字段不存在即表示为空。成功时 `error` 直接省略而非返回 `null`;失败时 `data`、`summary`、`truncated` 均不输出。不要依赖占位的 `null` 字段做判断;当 locator 无法唯一解析时,`target` 同样不会出现。\n- `results[i].data` 是 Tool 的业务数据,monit-agent 的 result envelope **已被解开**——不会出现嵌套的 `data.data`。一行摘要位于 `results[i].summary`;`results[i].truncated`(内含 `reason`)仅在结果确实被截断时出现。\n- `results[i].params` 回显 webapi 收到的该 Tool 调用参数,便于在批量调用中关联结果——即使其中某个 Tool 失败也能对上号。\n- 每条结果带两个耗时字段:`agent_elapsed_ms`(Agent 自报,不含网络)与 `e2e_elapsed_ms`(webapi 观测的端到端)。两者差距较大表示网络 / 边缘侧慢,而非工具执行慢。\n- 按 `/monit/tools/catalog` 返回的 `input_schema` 构造 `tools[].params`。对于无参工具,务必显式传 `params: {}`。", "href": "/zh/api-reference/monitors/diagnostics/monit-read-tools-invoke", "metadata": { "sidebarTitle": "调用监控对象工具" @@ -20153,35 +20427,45 @@ "results": [ { "tool": "os.overview", - "tool_version": "0.5.0", - "data": { - "data": { - "sample_interval_sec": 3, - "degraded": false, - "degradation_reasons": [] + "params": {}, + "tool_version": "0.6.0", + "data": { + "sample_interval_sec": 0.5, + "cpu": { + "cores": 4, + "usage_pct": 32.66, + "user_pct": 28.14, + "system_pct": 3.52, + "iowait_pct": 1.01, + "idle_pct": 67.34 }, - "summary": "os.overview ...", - "truncated": { - "truncated": false + "load": { + "load1": 1.79, + "load5": 1.83, + "load15": 1.67, + "runnable_procs": 7, + "total_procs": 1036 } }, - "error": null, + "summary": "os.overview cpu=32.66% mem=74.46% swap=not_configured oom_kill_since_boot=2 load1=1.79", "agent_elapsed_ms": 3120, "e2e_elapsed_ms": 3188 }, { "tool": "net.tcp_ping", - "tool_version": "0.5.0", - "data": null, + "params": { + "host": "10.255.255.1", + "port": 3306 + }, + "tool_version": "0.1.0", "error": { - "code": "target_unreachable", - "message": "dial tcp 10.0.0.10:3306: i/o timeout" + "code": "timeout", + "message": "tool \"net.tcp_ping\" exceeded 8000ms" }, - "agent_elapsed_ms": 0, - "e2e_elapsed_ms": 2008 + "agent_elapsed_ms": 8048, + "e2e_elapsed_ms": 8217 } - ], - "error": null + ] } } } @@ -20561,7 +20845,7 @@ "On-call/通知模板" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **60 次/分钟**;**10 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **60 次/分钟**;**10 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- `incident_card_hidden_fields` 仅用于受支持的 IM 故障卡片预览;不支持的应用类型或字段名会返回 `InvalidParameter`。\n- 只有所选 IM 预览存在非空固定故障卡片值时,才会返回 `fixed_fields`。", "href": "/zh/api-reference/on-call/notification-templates/template-read-preview", "metadata": { "sidebarTitle": "预览模板" @@ -20592,7 +20876,13 @@ "data": { "success": true, "content": "Incident Database latency spike is Critical", - "message": "" + "message": "", + "fixed_fields": [ + { + "field": "channel", + "value": "Payment Alerts" + } + ] } } } @@ -20621,7 +20911,12 @@ "example": { "content": "Incident {{.Title}} is {{.Status}}", "type": "feishu_app", - "incident_id": "664a1b2c3d4e5f6a7b8c9d0e" + "incident_id": "664a1b2c3d4e5f6a7b8c9d0e", + "incident_card_hidden_fields": { + "feishu_app": [ + "responders" + ] + } } } } @@ -20922,41 +21217,110 @@ } } }, - "/safari/skill/list": { + "/datasource/im/person/try-link": { "post": { - "operationId": "skill-read-list", - "summary": "查询技能列表", - "description": "分页查询调用者在账户与团队范围内可见的 AI SRE 技能。", + "operationId": "datasourceImPersonTryLink", + "summary": "尝试关联 IM 人员", + "description": "为指定集成尝试将未绑定成员自动关联到对应的 IM 账号。", "tags": [ - "AI SRE/技能" + "On-call/集成中心" ], - "security": [ - { - "AppKeyAuth": [] + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 服务端使用成员邮箱和手机号在钉钉、飞书或企业微信中查找匹配用户。\n- 如果没有成员可关联,响应中的 `new_linked_person_ids` 为空数组。", + "href": "/zh/api-reference/on-call/integrations/datasource-im-person-try-link", + "metadata": { + "sidebarTitle": "尝试关联 IM 人员" } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TryLinkPersonResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "new_linked_person_ids": [ + 5348648172131 + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TryLinkPersonRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/incident/post-mortem/init": { + "post": { + "operationId": "postmortem-write-init", + "summary": "初始化故障复盘", + "description": "根据一个或多个故障和模板创建复盘草稿。", + "tags": [ + "On-call/故障管理" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 列表行中省略 `content` 字段;如需正文请单独查询某个技能。\n", - "href": "/zh/api-reference/ai-sre/skills/skill-read-list", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 最多可将 10 个故障关联到同一份复盘报告。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/incidents/postmortem-write-init", "metadata": { - "sidebarTitle": "查询技能列表" + "sidebarTitle": "初始化故障复盘" } }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SkillListResponse" + "$ref": "#/components/schemas/PostMortemItem" } } } @@ -20965,33 +21329,43 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "total": 1, - "skills": [ - { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", - "account_id": 10023, - "team_id": 0, - "skill_name": "k8s-triage", - "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", - "version": "1.2.0", - "tags": [ - "kubernetes", - "triage" - ], - "author": "sre-team", - "tools": [ - "bash", - "mcp:prometheus/query" - ], - "status": "enabled", - "created_by": 80011, - "created_at": 1716960000000, - "updated_at": 1717046400000, - "can_edit": true, - "update_available": false, - "is_modified": false - } - ] + "meta": { + "account_id": 2451002751131, + "title": "Postmortem1", + "status": "published", + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "template_id": "post_mortem_default_tmpl_en-us", + "incident_ids": [ + "69bb9233331067560c718ecd" + ], + "media_count": 0, + "author_ids": [ + 2477273692131 + ], + "team_id": 2477033058131, + "channel_id": 3047621227131, + "is_private": false, + "channel_name": "Ops Channel", + "created_at_seconds": 1773900354, + "updated_at_seconds": 1773909012 + }, + "basics": { + "incidents_highest_severity": "Warning", + "incidents_earliest_start_seconds": 1761133512, + "incidents_latest_close_seconds": 1761133632, + "incidents_total_duration_seconds": 120, + "responders": [ + { + "person_id": 3790925372131, + "assigned_at": 1761133515, + "acknowledged_at": 0 + } + ] + }, + "content": { + "content": "{\"type\":\"doc\",\"content\":[]}" + }, + "follow_ups": "" } } } @@ -21015,53 +21389,49 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillListRequest" + "$ref": "#/components/schemas/InitPostMortemRequest" }, "example": { - "p": 1, - "limit": 20, - "include_account": true + "incident_ids": [ + "69bb9233331067560c718ecd" + ], + "template_id": "post_mortem_default_tmpl_en-us" } } } } } }, - "/safari/skill/get": { + "/incident/post-mortem/basics/reset": { "post": { - "operationId": "skill-read-get", - "summary": "查看技能详情", - "description": "查看单个技能,包含完整的 SKILL.md 内容。", + "operationId": "postmortem-write-reset-basics", + "summary": "更新故障复盘基础信息", + "description": "替换复盘报告中记录的故障基础信息。", "tags": [ - "AI SRE/技能" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/故障管理" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n", - "href": "/zh/api-reference/ai-sre/skills/skill-read-get", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/incidents/postmortem-write-reset-basics", "metadata": { - "sidebarTitle": "查看技能详情" + "sidebarTitle": "更新故障复盘基础信息" } }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SkillItem" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -21069,31 +21439,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", - "account_id": 10023, - "team_id": 0, - "skill_name": "k8s-triage", - "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", - "version": "1.2.0", - "tags": [ - "kubernetes", - "triage" - ], - "author": "sre-team", - "tools": [ - "bash", - "mcp:prometheus/query" - ], - "status": "enabled", - "created_by": 80011, - "created_at": 1716960000000, - "updated_at": 1717046400000, - "can_edit": true, - "update_available": false, - "is_modified": false, - "content": "---\nname: k8s-triage\ndescription: ...\n---\n# Triage steps" - } + "data": {} } } } @@ -21116,51 +21462,53 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillGetRequest" + "$ref": "#/components/schemas/ResetPostMortemBasicsRequest" }, "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "incidents_highest_severity": "Warning", + "incidents_earliest_start_seconds": 1761133512, + "incidents_latest_close_seconds": 1761133632, + "incidents_total_duration_seconds": 120, + "responder_ids": [ + 3790925372131 + ] } } } } } }, - "/safari/skill/update": { + "/incident/post-mortem/status/reset": { "post": { - "operationId": "skill-write-update", - "summary": "更新技能", - "description": "更新技能的描述或重新分配团队范围。", + "operationId": "postmortem-write-reset-status", + "summary": "更新故障复盘状态", + "description": "将复盘报告设置为草稿或已发布。", "tags": [ - "AI SRE/技能" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/故障管理" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **Skill 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 仅 `description` 与 `team_id` 可编辑;技能正文需通过重新上传修改。\n- 每次调用都会记录到账户审计日志。\n", - "href": "/zh/api-reference/ai-sre/skills/skill-write-update", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/incidents/postmortem-write-reset-status", "metadata": { - "sidebarTitle": "更新技能" + "sidebarTitle": "更新故障复盘状态" } }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SkillItem" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -21168,30 +21516,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", - "account_id": 10023, - "team_id": 0, - "skill_name": "k8s-triage", - "description": "Updated triage runbook.", - "version": "1.2.0", - "tags": [ - "kubernetes", - "triage" - ], - "author": "sre-team", - "tools": [ - "bash", - "mcp:prometheus/query" - ], - "status": "enabled", - "created_by": 80011, - "created_at": 1716960000000, - "updated_at": 1717046400000, - "can_edit": true, - "update_available": false, - "is_modified": false - } + "data": {} } } } @@ -21202,9 +21527,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21217,53 +21539,47 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillUpdateRequest" + "$ref": "#/components/schemas/ResetPostMortemStatusRequest" }, "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", - "description": "Updated triage runbook." + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "status": "published" } } } } } }, - "/safari/skill/delete": { + "/incident/post-mortem/title/reset": { "post": { - "operationId": "skill-write-delete", - "summary": "删除技能", - "description": "按 ID 删除技能。", + "operationId": "postmortem-write-reset-title", + "summary": "更新故障复盘标题", + "description": "替换复盘报告标题。", "tags": [ - "AI SRE/技能" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/故障管理" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **Skill 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志。\n", - "href": "/zh/api-reference/ai-sre/skills/skill-write-delete", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/incidents/postmortem-write-reset-title", "metadata": { - "sidebarTitle": "删除技能" + "sidebarTitle": "更新故障复盘标题" } }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "type": "null", - "description": "成功时恒为 null。" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -21271,7 +21587,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -21282,9 +21598,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21297,51 +21610,47 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillDeleteRequest" + "$ref": "#/components/schemas/ResetPostMortemTitleRequest" }, "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "title": "Production API latency incident" } } } } } }, - "/safari/skill/upload": { + "/incident/post-mortem/follow-ups/reset": { "post": { - "operationId": "skill-write-upload", - "summary": "上传技能", - "description": "上传技能压缩包(.skill/.zip/.tar.gz/.tgz)以创建或覆盖技能。", + "operationId": "postmortem-write-reset-follow-ups", + "summary": "更新故障复盘后续行动", + "description": "替换复盘报告中的后续行动项。", "tags": [ - "AI SRE/技能" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/故障管理" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **30 次/分钟**;**3 次/秒** |\n| 权限要求 | **Skill 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 以 `multipart/form-data` 提交,包含 `file` 部分。压缩包最大 100MB。\n- 设置 `replace=true` 可覆盖同名技能。\n- 每次调用都会记录到账户审计日志。\n", - "href": "/zh/api-reference/ai-sre/skills/skill-write-upload", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/incidents/postmortem-write-reset-follow-ups", "metadata": { - "sidebarTitle": "上传技能" + "sidebarTitle": "更新故障复盘后续行动" } }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SkillItem" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -21349,31 +21658,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", - "account_id": 10023, - "team_id": 0, - "skill_name": "k8s-triage", - "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", - "version": "1.2.0", - "tags": [ - "kubernetes", - "triage" - ], - "author": "sre-team", - "tools": [ - "bash", - "mcp:prometheus/query" - ], - "status": "enabled", - "created_by": 80011, - "created_at": 1716960000000, - "updated_at": 1717046400000, - "can_edit": true, - "update_available": false, - "is_modified": false, - "created": true - } + "data": {} } } } @@ -21384,9 +21669,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21397,55 +21679,49 @@ "requestBody": { "required": true, "content": { - "multipart/form-data": { + "application/json": { "schema": { - "$ref": "#/components/schemas/SkillUploadRequest" + "$ref": "#/components/schemas/ResetPostMortemFollowUpsRequest" }, "example": { - "team_id": 0, - "replace": false + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "follow_ups": "- Add database saturation alert\n- Review cache TTL rollout" } } } } } }, - "/safari/skill/enable": { + "/incident/post-mortem/template/upsert": { "post": { - "operationId": "skill-read-enable", - "summary": "启用技能", - "description": "启用已禁用的技能,使智能体可加载。", + "operationId": "postmortem-write-upsert-template", + "summary": "创建或更新故障复盘模板", + "description": "创建自定义复盘模板,或更新已有模板。", "tags": [ - "AI SRE/技能" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/故障管理" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **Skill 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 仅可启用 `disabled` 状态的技能,否则返回 InvalidParameter。\n", - "href": "/zh/api-reference/ai-sre/skills/skill-read-enable", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/incidents/postmortem-write-upsert-template", "metadata": { - "sidebarTitle": "启用技能" + "sidebarTitle": "创建或更新故障复盘模板" } }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "type": "null", - "description": "成功时恒为 null。" + "$ref": "#/components/schemas/PostMortemTemplate" } } } @@ -21453,7 +21729,17 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": { + "account_id": 2451002751131, + "template_id": "post_mortem_default_tmpl_en-us", + "name": "Default post-mortem report", + "description": "Default sections for post-mortem reports.", + "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", + "content_markdown": "## Summary\nDescribe what happened.", + "team_id": 2477033058131, + "created_at_seconds": 1773900000, + "updated_at_seconds": 1773903600 + } } } } @@ -21464,9 +21750,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21479,52 +21762,50 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillStatusRequest" + "$ref": "#/components/schemas/UpsertPostMortemTemplateRequest" }, "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + "team_id": 2477033058131, + "name": "Production incident template", + "description": "Template for production incident reviews.", + "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", + "content_markdown": "## Summary\nDescribe what happened." } } } } } }, - "/safari/skill/disable": { + "/incident/post-mortem/template/delete": { "post": { - "operationId": "skill-write-disable", - "summary": "禁用技能", - "description": "禁用已启用的技能,使智能体不再加载。", + "operationId": "postmortem-write-delete-template", + "summary": "删除故障复盘模板", + "description": "删除自定义复盘模板。", "tags": [ - "AI SRE/技能" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/故障管理" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **Skill 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 仅可禁用 `enabled` 状态的技能,否则返回 InvalidParameter。\n- 每次调用都会记录到账户审计日志。\n", - "href": "/zh/api-reference/ai-sre/skills/skill-write-disable", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/incidents/postmortem-write-delete-template", "metadata": { - "sidebarTitle": "禁用技能" + "sidebarTitle": "删除故障复盘模板" } }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "type": "null", - "description": "成功时恒为 null。" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -21532,7 +21813,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -21543,9 +21824,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21558,51 +21836,46 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillStatusRequest" + "$ref": "#/components/schemas/DeletePostMortemTemplateRequest" }, "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + "template_id": "post_mortem_custom_tmpl_01" } } } } } }, - "/safari/mcp/server/list": { + "/incident/post-mortem/template/list": { "post": { - "operationId": "mcp-read-server-list", - "summary": "查询 MCP 服务器列表", - "description": "分页查询调用者在账户与团队范围内可见的 MCP 服务器。", + "operationId": "postmortem-read-list-templates", + "summary": "查询故障复盘模板列表", + "description": "返回账号下的内置和自定义故障复盘模板。", "tags": [ - "AI SRE/MCP 服务器" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/故障管理" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 列表不含实时工具列表;如需探测工具请单独查询某个服务器。\n", - "href": "/zh/api-reference/ai-sre/mcp-servers/mcp-read-server-list", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/postmortem-read-list-templates", "metadata": { - "sidebarTitle": "查询 MCP 服务器列表" + "sidebarTitle": "查询故障复盘模板列表" } }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/MCPServerListResponse" + "$ref": "#/components/schemas/ListPostMortemTemplatesResponse" } } } @@ -21611,35 +21884,19 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "total": 1, - "servers": [ + "total": 2, + "has_next_page": false, + "items": [ { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", - "account_id": 10023, - "team_id": 0, - "can_edit": true, - "server_name": "prometheus", - "description": "Query Prometheus metrics and alerts.", - "transport": "streamable-http", - "url": "https://mcp.example.com/prometheus", - "status": "enabled", - "connect_timeout": 10, - "call_timeout": 60, - "tool_count": 2, - "tools": [ - { - "name": "query", - "description": "Run a PromQL instant query." - }, - { - "name": "query_range", - "description": "Run a PromQL range query." - } - ], - "auth_mode": "shared", - "created_by": 80011, - "created_at": 1716960000000, - "updated_at": 1717046400000 + "account_id": 2451002751131, + "template_id": "post_mortem_default_tmpl_en-us", + "name": "Default post-mortem report", + "description": "Default sections for post-mortem reports.", + "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", + "content_markdown": "## Summary\nDescribe what happened.", + "team_id": 2477033058131, + "created_at_seconds": 1773900000, + "updated_at_seconds": 1773903600 } ] } @@ -21665,53 +21922,49 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServerListRequest" + "$ref": "#/components/schemas/ListPostMortemTemplatesRequest" }, "example": { "p": 1, "limit": 20, - "include_account": true + "order_by": "created_at_seconds", + "asc": false } } } } } }, - "/safari/mcp/server/create": { - "post": { - "operationId": "mcp-write-server-create", - "summary": "创建 MCP 服务器", - "description": "在账户下注册新的 MCP 服务器(连接器)。", + "/incident/post-mortem/template/info": { + "get": { + "operationId": "postmortem-read-template-info", + "summary": "查看故障复盘模板详情", + "description": "按 ID 返回单个故障复盘模板。", "tags": [ - "AI SRE/MCP 服务器" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/故障管理" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **MCP 管理**(`ai-sre`) |\n\n## 使用说明\n\n- `command`/`args`/`env` 用于 `stdio`;`url`/`headers` 用于 `sse`/`streamable-http`。\n- 服务器名称在账户内必须唯一,重复将返回 InvalidParameter。\n- 每次调用都会记录到账户审计日志。\n", - "href": "/zh/api-reference/ai-sre/mcp-servers/mcp-write-server-create", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/postmortem-read-template-info", "metadata": { - "sidebarTitle": "创建 MCP 服务器" + "sidebarTitle": "查看故障复盘模板详情" } }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/MCPServerItem" + "$ref": "#/components/schemas/PostMortemTemplate" } } } @@ -21720,32 +21973,15 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", - "account_id": 10023, - "team_id": 0, - "can_edit": true, - "server_name": "prometheus", - "description": "Query Prometheus metrics and alerts.", - "transport": "streamable-http", - "url": "https://mcp.example.com/prometheus", - "status": "enabled", - "connect_timeout": 10, - "call_timeout": 60, - "tool_count": 2, - "tools": [ - { - "name": "query", - "description": "Run a PromQL instant query." - }, - { - "name": "query_range", - "description": "Run a PromQL range query." - } - ], - "auth_mode": "shared", - "created_by": 80011, - "created_at": 1716960000000, - "updated_at": 1717046400000 + "account_id": 2451002751131, + "template_id": "post_mortem_default_tmpl_en-us", + "name": "Default post-mortem report", + "description": "Default sections for post-mortem reports.", + "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", + "content_markdown": "## Summary\nDescribe what happened.", + "team_id": 2477033058131, + "created_at_seconds": 1773900000, + "updated_at_seconds": 1773903600 } } } @@ -21757,9 +21993,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21767,60 +22000,49 @@ "$ref": "#/components/responses/ServerError" } }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MCPServerCreateRequest" - }, - "example": { - "server_name": "prometheus", - "description": "Query Prometheus metrics and alerts.", - "transport": "streamable-http", - "url": "https://mcp.example.com/prometheus", - "status": "enabled" - } - } + "parameters": [ + { + "name": "template_id", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "description": "Template ID." } - } + ] } }, - "/safari/mcp/server/get": { + "/monit/preview/sync": { "post": { - "operationId": "mcp-read-server-get", - "summary": "查看 MCP 服务器详情", - "description": "查看单个 MCP 服务器并实时探测其工具列表。", + "operationId": "monit-preview-sync", + "summary": "同步预览数据源查询", + "description": "同步执行数据源查询并返回原始结果,用于在保存前预览告警规则表达式的效果。", "tags": [ - "AI SRE/MCP 服务器" - ], - "security": [ - { - "AppKeyAuth": [] - } + "Monitors/通用工具" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 详情接口会实时探测工具;探测失败时设置 `list_error`,请求本身仍成功。\n", - "href": "/zh/api-reference/ai-sre/mcp-servers/mcp-read-server-get", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **60 次/分钟**;**10 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- `ds_type` 须与数据源类型匹配,如 `prometheus`、`loki`。\n- `ds_name` 为账户中配置的数据源显示名称。\n- `delay_seconds` 将查询窗口向前偏移指定秒数,用于补偿数据摄入延迟。\n- 响应体为数据源返回的原始 JSON,其结构随数据源类型而异。", + "href": "/zh/api-reference/monitors/monitor-utilities/monit-preview-sync", "metadata": { - "sidebarTitle": "查看 MCP 服务器详情" + "sidebarTitle": "同步预览数据源查询" } }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/MCPServerItem" + "$ref": "#/components/schemas/PreviewSyncResponse" } } } @@ -21829,32 +22051,11 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", - "account_id": 10023, - "team_id": 0, - "can_edit": true, - "server_name": "prometheus", - "description": "Query Prometheus metrics and alerts.", - "transport": "streamable-http", - "url": "https://mcp.example.com/prometheus", - "status": "enabled", - "connect_timeout": 10, - "call_timeout": 60, - "tool_count": 2, - "tools": [ - { - "name": "query", - "description": "Run a PromQL instant query." - }, - { - "name": "query_range", - "description": "Run a PromQL range query." - } - ], - "auth_mode": "shared", - "created_by": 80011, - "created_at": 1716960000000, - "updated_at": 1717046400000 + "status": "success", + "data": { + "resultType": "vector", + "result": [] + } } } } @@ -21878,51 +22079,49 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServerGetRequest" + "$ref": "#/components/schemas/PreviewSyncRequest" }, "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" + "ds_type": "prometheus", + "ds_name": "生产 Prometheus", + "expr": "rate(http_requests_total[5m])", + "delay_seconds": 0 } } } } } }, - "/safari/mcp/server/update": { - "post": { - "operationId": "mcp-write-server-update", - "summary": "更新 MCP 服务器", - "description": "更新 MCP 服务器配置;省略字段表示不变。", + "/status-page/info": { + "get": { + "operationId": "statusPageInfo", + "summary": "获取状态页详情", + "description": "获取指定状态页的详细配置信息。", "tags": [ - "AI SRE/MCP 服务器" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/状态页" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **MCP 管理**(`ai-sre`) |\n\n## 使用说明\n\n- `env`/`headers` 中的脱敏密钥会被保留——回传脱敏值不会覆盖已存储的真实密钥。\n- 每次调用都会记录到账户审计日志。\n", - "href": "/zh/api-reference/ai-sre/mcp-servers/mcp-write-server-update", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/status-pages/status-page-info", "metadata": { - "sidebarTitle": "更新 MCP 服务器" + "sidebarTitle": "获取状态页详情" } }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/MCPServerItem" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -21931,32 +22130,48 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", - "account_id": 10023, - "team_id": 0, - "can_edit": true, - "server_name": "prometheus", - "description": "Query Prometheus metrics, alerts, and rules.", - "transport": "streamable-http", - "url": "https://mcp.example.com/prometheus", - "status": "enabled", - "connect_timeout": 10, - "call_timeout": 60, - "tool_count": 2, - "tools": [ + "page_id": 5750613685214, + "name": "Flashduty Status Page", + "url_name": "flashduty-statuspage", + "type": "public", + "custom_domain": "status.example.com", + "logo": "https://cdn.example.com/logo.png", + "favicon": "https://cdn.example.com/favicon.png", + "page_header": "Welcome to our status page", + "page_footer": "2025 Example Corp", + "date_view": "list", + "display_uptime_mode": "chart_and_percentage", + "custom_links": [ { - "name": "query", - "description": "Run a PromQL instant query." - }, + "key": "Documentation", + "value": "https://docs.example.com" + } + ], + "contact_info": "mailto:support@example.com", + "components": [ { - "name": "query_range", - "description": "Run a PromQL range query." + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", + "name": "Web Console", + "available_since_seconds": 1765349358, + "order_id": 1 } ], - "auth_mode": "shared", - "created_by": 80011, - "created_at": 1716960000000, - "updated_at": 1717046400000 + "sections": [ + { + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", + "name": "Core Services", + "description": "Our core services", + "order_id": 1, + "hide_uptime": false, + "hide_all": false + } + ], + "subscription": { + "email": true, + "im": false + }, + "template_preference": "message" } } } @@ -21968,9 +22183,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21978,58 +22190,49 @@ "$ref": "#/components/responses/ServerError" } }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MCPServerUpdateRequest" - }, - "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", - "description": "Query Prometheus metrics, alerts, and rules." - } - } + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "description": "Status page ID" } - } + ] } }, - "/safari/mcp/server/delete": { + "/status-page/create": { "post": { - "operationId": "mcp-write-server-delete", - "summary": "删除 MCP 服务器", - "description": "按 ID 删除 MCP 服务器。", + "operationId": "statusPageCreate", + "summary": "创建状态页", + "description": "创建一个新的状态页。", "tags": [ - "AI SRE/MCP 服务器" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/状态页" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **MCP 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志。\n", - "href": "/zh/api-reference/ai-sre/mcp-servers/mcp-write-server-delete", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-create", "metadata": { - "sidebarTitle": "删除 MCP 服务器" + "sidebarTitle": "创建状态页" } }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "type": "null", - "description": "成功时恒为 null。" + "$ref": "#/components/schemas/CreateStatusPageResponse" } } } @@ -22037,7 +22240,11 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": { + "page_id": 6294565612043, + "page_name": "My Status Page", + "page_url_name": "my-status-page" + } } } } @@ -22048,9 +22255,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22063,52 +22267,50 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServerDeleteRequest" + "$ref": "#/components/schemas/CreateStatusPageRequest" }, "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" + "name": "My Status Page", + "url_name": "my-status-page", + "type": "public", + "page_header": "Welcome to our status page", + "contact_info": "mailto:support@example.com" } } } } } }, - "/safari/mcp/server/enable": { + "/status-page/update": { "post": { - "operationId": "mcp-write-server-enable", - "summary": "启用 MCP 服务器", - "description": "启用已禁用的 MCP 服务器。", + "operationId": "statusPageUpdate", + "summary": "更新状态页", + "description": "更新已有状态页的配置。", "tags": [ - "AI SRE/MCP 服务器" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/状态页" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **MCP 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志。\n", - "href": "/zh/api-reference/ai-sre/mcp-servers/mcp-write-server-enable", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-update", "metadata": { - "sidebarTitle": "启用 MCP 服务器" + "sidebarTitle": "更新状态页" } }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "type": "null", - "description": "成功时恒为 null。" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -22116,7 +22318,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -22127,9 +22329,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22142,52 +22341,49 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServerStatusRequest" + "$ref": "#/components/schemas/EmptyRequest" }, "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" + "page_id": 5750613685214, + "name": "Flashduty Status Page (Updated)", + "page_header": "Updated status page header", + "contact_info": "mailto:support@example.com" } } } } } }, - "/safari/mcp/server/disable": { + "/status-page/delete": { "post": { - "operationId": "mcp-write-server-disable", - "summary": "禁用 MCP 服务器", - "description": "禁用已启用的 MCP 服务器。", + "operationId": "statusPageDelete", + "summary": "删除状态页", + "description": "删除指定的状态页。", "tags": [ - "AI SRE/MCP 服务器" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/状态页" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **MCP 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志。\n", - "href": "/zh/api-reference/ai-sre/mcp-servers/mcp-write-server-disable", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-delete", "metadata": { - "sidebarTitle": "禁用 MCP 服务器" + "sidebarTitle": "删除状态页" } }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "type": "null", - "description": "成功时恒为 null。" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -22195,7 +22391,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -22206,9 +22402,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22221,51 +22414,46 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServerStatusRequest" + "$ref": "#/components/schemas/EmptyRequest" }, "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" + "page_id": 5750613685214 } } } } } }, - "/safari/a2a-agent/create": { + "/status-page/component/upsert": { "post": { - "operationId": "remote-agent-write-create", - "summary": "创建 A2A 智能体", - "description": "通过智能体卡片 URL 注册新的 A2A 远程智能体。", + "operationId": "statusPageComponentUpsert", + "summary": "创建或更新状态页组件", + "description": "在状态页上创建或更新服务组件。", "tags": [ - "AI SRE/A2A 智能体" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/状态页" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **Agent 管理**(`ai-sre`) |\n\n## 使用说明\n\n- `card_url` 必须可解析为有效的智能体卡片;无法访问或无效的卡片返回 InvalidParameter。\n- 每次调用都会记录到账户审计日志。\n", - "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-write-create", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-component-upsert", "metadata": { - "sidebarTitle": "创建 A2A 智能体" + "sidebarTitle": "创建或更新状态页组件" } }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/A2AAgentCreateResponse" + "$ref": "#/components/schemas/UpsertStatusPageComponentResponse" } } } @@ -22274,7 +22462,9 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" + "component_ids": [ + "01KP032KMN9YFBMPWANJMFZFG1" + ] } } } @@ -22286,9 +22476,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22301,55 +22488,54 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentCreateRequest" + "$ref": "#/components/schemas/UpsertStatusPageComponentRequest" }, "example": { - "agent_name": "deploy-bot", - "card_url": "https://agents.example.com/deploy-bot/card", - "auth_type": "bearer", - "streaming": true, - "team_id": 0 + "page_id": 5750613685214, + "components": [ + { + "name": "Web Console", + "description": "Main web interface", + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", + "order_id": 1 + } + ] } } } } } }, - "/safari/a2a-agent/list": { + "/status-page/component/delete": { "post": { - "operationId": "remote-agent-read-list", - "summary": "查询 A2A 智能体列表", - "description": "分页查询调用者在账户与团队范围内可见的 A2A 智能体。", + "operationId": "statusPageComponentDelete", + "summary": "删除状态页组件", + "description": "从状态页删除服务组件。", "tags": [ - "AI SRE/A2A 智能体" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/状态页" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 分页使用 `offset`/`limit`(而非 `p`/`limit`)。\n", - "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-read-list", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-component-delete", "metadata": { - "sidebarTitle": "查询 A2A 智能体列表" + "sidebarTitle": "删除状态页组件" } }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/A2AAgentListResponse" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -22357,34 +22543,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "items": [ - { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", - "account_id": 10023, - "team_id": 0, - "can_edit": true, - "agent_name": "deploy-bot", - "description": "Remote agent that inspects deployment pipelines.", - "card_url": "https://agents.example.com/deploy-bot/card", - "auth_type": "bearer", - "streaming": true, - "status": "enabled", - "agent_card_name": "Deploy Bot", - "agent_card_skills": [ - "rollback", - "diff" - ], - "card_resolve_timeout": 10, - "task_timeout": 120, - "auth_mode": "shared", - "created_by": 80011, - "created_at": 1716960000000, - "updated_at": 1717046400000 - } - ], - "total": 1 - } + "data": {} } } } @@ -22407,53 +22566,49 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentListRequest" + "$ref": "#/components/schemas/DeleteStatusPageComponentRequest" }, "example": { - "offset": 0, - "limit": 20, - "include_account": true + "page_id": 5750613685214, + "component_ids": [ + "01KP032KMN9YFBMPWANJMFZFG1" + ] } } } } } }, - "/safari/a2a-agent/get": { + "/status-page/section/upsert": { "post": { - "operationId": "remote-agent-read-get", - "summary": "查看 A2A 智能体详情", - "description": "按 ID 查看单个 A2A 智能体。", + "operationId": "statusPageSectionUpsert", + "summary": "创建或更新状态页区域", + "description": "在状态页上创建或更新区域。", "tags": [ - "AI SRE/A2A 智能体" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/状态页" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n", - "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-read-get", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-section-upsert", "metadata": { - "sidebarTitle": "查看 A2A 智能体详情" + "sidebarTitle": "创建或更新状态页区域" } }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/A2AAgentItem" + "$ref": "#/components/schemas/UpsertStatusPageSectionResponse" } } } @@ -22462,27 +22617,9 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", - "account_id": 10023, - "team_id": 0, - "can_edit": true, - "agent_name": "deploy-bot", - "description": "Remote agent that inspects deployment pipelines.", - "card_url": "https://agents.example.com/deploy-bot/card", - "auth_type": "bearer", - "streaming": true, - "status": "enabled", - "agent_card_name": "Deploy Bot", - "agent_card_skills": [ - "rollback", - "diff" - ], - "card_resolve_timeout": 10, - "task_timeout": 120, - "auth_mode": "shared", - "created_by": 80011, - "created_at": 1716960000000, - "updated_at": 1717046400000 + "section_ids": [ + "01KP032J1FV2H8DDGN0QSJ1CAR" + ] } } } @@ -22506,52 +22643,53 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentIDRequest" + "$ref": "#/components/schemas/UpsertStatusPageSectionRequest" }, "example": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" + "page_id": 5750613685214, + "sections": [ + { + "name": "Core Services", + "description": "Our core services", + "order_id": 1 + } + ] } } } } } }, - "/safari/a2a-agent/update": { + "/status-page/section/delete": { "post": { - "operationId": "remote-agent-write-update", - "summary": "更新 A2A 智能体", - "description": "对 A2A 智能体执行部分更新;省略字段表示不变。", + "operationId": "statusPageSectionDelete", + "summary": "删除状态页区域", + "description": "从状态页删除区域。", "tags": [ - "AI SRE/A2A 智能体" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/状态页" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **Agent 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志。\n", - "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-write-update", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-section-delete", "metadata": { - "sidebarTitle": "更新 A2A 智能体" + "sidebarTitle": "删除状态页区域" } }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "type": "null", - "description": "成功时恒为 null。" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -22559,7 +22697,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -22570,9 +22708,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22585,53 +22720,49 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentUpdateRequest" + "$ref": "#/components/schemas/DeleteStatusPageSectionRequest" }, "example": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", - "description": "Inspects deployment pipelines and proposes rollbacks." + "page_id": 5750613685214, + "section_ids": [ + "01KP032J1FV2H8DDGN0QSJ1CAR" + ] } } } } } }, - "/safari/a2a-agent/enable": { + "/status-page/template/upsert": { "post": { - "operationId": "remote-agent-write-enable", - "summary": "启用 A2A 智能体", - "description": "启用已禁用的 A2A 智能体。", + "operationId": "statusPageTemplateUpsert", + "summary": "创建或更新状态页模板", + "description": "创建或更新状态页的事件模板。", "tags": [ - "AI SRE/A2A 智能体" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/状态页" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **Agent 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志。\n", - "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-write-enable", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-template-upsert", "metadata": { - "sidebarTitle": "启用 A2A 智能体" + "sidebarTitle": "创建或更新状态页模板" } }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "type": "null", - "description": "成功时恒为 null。" + "$ref": "#/components/schemas/UpsertStatusPageTemplateResponse" } } } @@ -22639,7 +22770,9 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": { + "template_id": "01KP0339G5XDEPM4R86T2B23EP" + } } } } @@ -22650,9 +22783,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22665,52 +22795,53 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentIDRequest" + "$ref": "#/components/schemas/UpsertStatusPageTemplateRequest" }, "example": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" + "page_id": 5720156736380, + "type": "pre_defined", + "template": { + "title": "Service Disruption", + "event_type": "incident", + "status": "investigating", + "description": "We are investigating a service disruption affecting some users." + } } } } } } }, - "/safari/a2a-agent/disable": { + "/status-page/template/delete": { "post": { - "operationId": "remote-agent-write-disable", - "summary": "禁用 A2A 智能体", - "description": "禁用已启用的 A2A 智能体。", + "operationId": "statusPageTemplateDelete", + "summary": "删除状态页模板", + "description": "删除状态页的事件模板。", "tags": [ - "AI SRE/A2A 智能体" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/状态页" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **Agent 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志。\n", - "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-write-disable", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-template-delete", "metadata": { - "sidebarTitle": "禁用 A2A 智能体" + "sidebarTitle": "删除状态页模板" } }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "type": "null", - "description": "成功时恒为 null。" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -22718,7 +22849,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -22729,9 +22860,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22744,52 +22872,48 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentIDRequest" + "$ref": "#/components/schemas/DeleteStatusPageTemplateRequest" }, "example": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" + "page_id": 5720156736380, + "type": "pre_defined", + "template_id": "01KP0339G5XDEPM4R86T2B23EP" } } } } } }, - "/safari/a2a-agent/delete": { - "post": { - "operationId": "remote-agent-write-delete", - "summary": "删除 A2A 智能体", - "description": "按 ID 软删除 A2A 智能体。", + "/status-page/template/list": { + "get": { + "operationId": "statusPageTemplateList", + "summary": "查询状态页模板列表", + "description": "查询状态页的所有事件模板。", "tags": [ - "AI SRE/A2A 智能体" - ], - "security": [ - { - "AppKeyAuth": [] - } + "On-call/状态页" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **Agent 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志。\n", - "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-write-delete", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/status-pages/status-page-template-list", "metadata": { - "sidebarTitle": "删除 A2A 智能体" + "sidebarTitle": "查询状态页模板列表" } }, "responses": { "200": { - "description": "Success", + "description": "成功", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "type": "null", - "description": "成功时恒为 null。" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -22797,7 +22921,17 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": { + "items": [ + { + "template_id": "01KC8KP6PHVPSCAB0BTKZBN2HR", + "title": "Service Disruption", + "type": "incident", + "status": "identified", + "description": "We have identified the root cause." + } + ] + } } } } @@ -22808,9 +22942,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22818,28 +22949,40 @@ "$ref": "#/components/responses/ServerError" } }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/A2AAgentIDRequest" - }, - "example": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" - } - } + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Status page ID." + }, + { + "name": "type", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "pre_defined", + "message" + ] + }, + "description": "Template category. `pre_defined` returns predefined event templates; `message` returns message notification templates." } - } + ] } }, - "/safari/session/list": { + "/safari/a2a-agent/create": { "post": { - "operationId": "session-read-list", - "summary": "查询会话列表", - "description": "分页查询调用者可见的智能体会话,可按应用、入口、归档状态与团队过滤。", + "operationId": "remote-agent-write-create", + "summary": "创建 A2A 智能体", + "description": "通过智能体卡片 URL 注册新的 A2A 远程智能体。", "tags": [ - "AI SRE/会话" + "AI SRE/A2A 智能体" ], "security": [ { @@ -22847,10 +22990,10 @@ } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 分页使用 `p`/`limit`(最大 100);`scope` 默认 `all`(本人 + 所属团队)。\n- `is_running` 反映实时运行集合;`has_unread` 按调用者各自计算。\n", - "href": "/zh/api-reference/ai-sre/sessions/session-read-list", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **Agent 管理**(`ai-sre`) |\n\n## 使用说明\n\n- `instructions` 为必填项;已弃用的 `description` 字段仍保留以兼容旧客户端,若两者同时传入则必须与 `instructions` 完全一致。\n- `card_url` 必须是 host 非空的绝对 `http`/`https` URL(可达性由执行环境验证,此处不检查);`auth_type` 仅接受 `none`、`api_key` 或 `bearer`。\n- `environment_kind` 仅接受空字符串(自动)或 `byoc`;`cloud` 将被拒绝。`byoc` 需要 `environment_id`,且该 Runner 对调用者可见。\n- 创建到某个团队(`team_id > 0`)需要调用者真实属于该团队;只有账户 owner/admin 可以在账户级(`team_id=0`)创建。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-write-create", "metadata": { - "sidebarTitle": "查询会话列表" + "sidebarTitle": "创建 A2A 智能体" } }, "responses": { @@ -22867,7 +23010,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SessionListResponse" + "$ref": "#/components/schemas/A2AAgentCreateResponse" } } } @@ -22876,36 +23019,7 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "total": 988, - "sessions": [ - { - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", - "session_name": "Investigate cloud-assistant first heartbeat", - "app_name": "ai-sre", - "entry_kind": "web", - "person_id": "3790925372131", - "team_id": 0, - "is_mine": false, - "can_manage": true, - "status": "enabled", - "incognito": false, - "created_at": 1780367971228, - "updated_at": 1780367993457, - "token_usage": { - "input_tokens": 14948, - "cached_tokens": 11520, - "output_tokens": 888, - "reasoning_tokens": 351 - }, - "current_context_tokens": 14948, - "context_window": 0, - "archived_at": 0, - "pinned_at": 0, - "last_event_at": 1780367992649, - "is_running": false, - "has_unread": true - } - ] + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" } } } @@ -22917,6 +23031,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22929,26 +23046,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SessionListRequest" + "$ref": "#/components/schemas/A2AAgentCreateRequest" }, "example": { - "app_name": "ai-sre", - "limit": 2, - "orderby": "updated_at", - "scope": "all" + "agent_name": "deploy-bot", + "instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.", + "card_url": "https://agents.example.com/deploy-bot/card", + "auth_type": "bearer", + "streaming": true, + "team_id": 0, + "environment_kind": "byoc", + "environment_id": "env_8s7Hn2kLpQ3xYbVc4Wd2m" } } } } } }, - "/safari/session/get": { + "/safari/a2a-agent/delete": { "post": { - "operationId": "session-read-info", - "summary": "查看会话详情", - "description": "查看单个会话,并返回其最近事件的一页(向更早方向分页)。", + "operationId": "remote-agent-write-delete", + "summary": "删除 A2A 智能体", + "description": "按 ID 软删除 A2A 智能体。", "tags": [ - "AI SRE/会话" + "AI SRE/A2A 智能体" ], "security": [ { @@ -22956,10 +23077,10 @@ } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 使用上一次响应的 `search_after_ctx` 翻阅更早的历史。\n- `limit`(或旧版 `num_recent_events`)限制事件页大小;默认 100,最大 1000。\n", - "href": "/zh/api-reference/ai-sre/sessions/session-read-info", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **Agent 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 删除为软删除;删除后该智能体不再出现在列表/详情中,也无法再被调度。\n- 需要对智能体所属团队具备编辑权限(`access.CanEdit`)。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-write-delete", "metadata": { - "sidebarTitle": "查看会话详情" + "sidebarTitle": "删除 A2A 智能体" } }, "responses": { @@ -22976,7 +23097,8 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SessionGetResponse" + "type": "null", + "description": "Always null on success." } } } @@ -22984,64 +23106,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "session": { - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", - "session_name": "Investigate cloud-assistant first heartbeat", - "app_name": "ai-sre", - "entry_kind": "web", - "person_id": "3790925372131", - "team_id": 0, - "is_mine": false, - "can_manage": true, - "status": "enabled", - "incognito": false, - "created_at": 1780367971228, - "updated_at": 1780367993457, - "token_usage": { - "input_tokens": 14948, - "cached_tokens": 11520, - "output_tokens": 888, - "reasoning_tokens": 351 - }, - "current_context_tokens": 14948, - "context_window": 0, - "archived_at": 0, - "pinned_at": 0, - "last_event_at": 1780367992649, - "is_running": false, - "has_unread": true - }, - "events": [ - { - "event_id": "evt_3aZQ9p", - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", - "author": "user", - "partial": false, - "turn_complete": false, - "status": "normal", - "created_at": 1780367971241 - }, - { - "event_id": "evt_7bWk2r", - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", - "author": "ai-sre", - "content": { - "role": "model", - "parts": [ - { - "text": "..." - } - ] - }, - "partial": false, - "turn_complete": true, - "status": "normal", - "created_at": 1780367992649 - } - ], - "has_more_older": false - } + "data": null } } } @@ -23052,6 +23117,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23064,24 +23132,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SessionGetRequest" + "$ref": "#/components/schemas/A2AAgentIDRequest" }, "example": { - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", - "num_recent_events": 50 + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" } } } } } }, - "/safari/session/export": { + "/safari/a2a-agent/disable": { "post": { - "operationId": "session-read-export", - "summary": "导出会话记录", - "description": "以换行分隔的 JSON(NDJSON)流式导出会话的完整事件记录。", + "operationId": "remote-agent-write-disable", + "summary": "禁用 A2A 智能体", + "description": "禁用已启用的 A2A 智能体。", "tags": [ - "AI SRE/会话" + "AI SRE/A2A 智能体" ], "security": [ { @@ -23089,20 +23156,36 @@ } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 响应为 `application/x-ndjson`——请逐行解析并写入文件,切勿将整段记录读入内存。\n- 第一行始终为 `session_meta` 信封;`include_subagents=true` 会在派发行后内联各子会话的事件流。\n", - "href": "/zh/api-reference/ai-sre/sessions/session-read-export", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **Agent 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 需要对智能体所属团队具备编辑权限(`access.CanEdit`)。\n- 若智能体已处于禁用状态,返回 `InvalidParameter`。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-write-disable", "metadata": { - "sidebarTitle": "导出会话记录" + "sidebarTitle": "禁用 A2A 智能体" } }, "responses": { "200": { - "description": "流式 NDJSON(application/x-ndjson)。每行一个 JSON 对象,以换行结束。第一行始终为 `session_meta` 信封,其后为会话事件。", + "description": "Success", "content": { - "application/x-ndjson": { + "application/json": { "schema": { - "type": "string", - "description": "换行分隔的 JSON 流。请逐行解析,切勿缓冲整个响应体。" + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "type": "null", + "description": "Always null on success." + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": null } } } @@ -23113,6 +23196,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23125,24 +23211,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SessionExportRequest" + "$ref": "#/components/schemas/A2AAgentIDRequest" }, "example": { - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", - "include_subagents": false + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" } } } } } }, - "/safari/session/delete": { + "/safari/a2a-agent/enable": { "post": { - "operationId": "session-write-delete", - "summary": "删除会话", - "description": "按 ID 删除会话。", + "operationId": "remote-agent-write-enable", + "summary": "启用 A2A 智能体", + "description": "启用已禁用的 A2A 智能体。", "tags": [ - "AI SRE/会话" + "AI SRE/A2A 智能体" ], "security": [ { @@ -23150,10 +23235,10 @@ } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 需要对该会话拥有管理权限(创建者、账户管理员或所属团队成员)。\n", - "href": "/zh/api-reference/ai-sre/sessions/session-write-delete", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **Agent 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 需要对智能体所属团队具备编辑权限(`access.CanEdit`),仅可见不足以调用。\n- 若智能体已处于启用状态,返回 `InvalidParameter`。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-write-enable", "metadata": { - "sidebarTitle": "删除会话" + "sidebarTitle": "启用 A2A 智能体" } }, "responses": { @@ -23171,7 +23256,7 @@ "properties": { "data": { "type": "null", - "description": "成功时恒为 null。" + "description": "Always null on success." } } } @@ -23190,6 +23275,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23202,46 +23290,51 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SessionDeleteRequest" + "$ref": "#/components/schemas/A2AAgentIDRequest" }, "example": { - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" } } } } } }, - "/datasource/im/person/try-link": { + "/safari/a2a-agent/get": { "post": { - "operationId": "datasourceImPersonTryLink", - "summary": "尝试关联 IM 人员", - "description": "为指定集成尝试将未绑定成员自动关联到对应的 IM 账号。", + "operationId": "remote-agent-read-get", + "summary": "查看 A2A 智能体详情", + "description": "按 ID 查看单个 A2A 智能体。", "tags": [ - "On-call/集成中心" + "AI SRE/A2A 智能体" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 服务端使用成员邮箱和手机号在钉钉、飞书或企业微信中查找匹配用户。\n- 如果没有成员可关联,响应中的 `new_linked_person_ids` 为空数组。", - "href": "/zh/api-reference/on-call/integrations/datasource-im-person-try-link", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- `card_resolve_timeout` 与 `task_timeout` 目前恒为 `0` —— API 尚未提供设置方式。\n", + "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-read-get", "metadata": { - "sidebarTitle": "尝试关联 IM 人员" + "sidebarTitle": "查看 A2A 智能体详情" } }, "responses": { "200": { - "description": "成功", + "description": "Success", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/TryLinkPersonResponse" + "$ref": "#/components/schemas/A2AAgentItem" } } } @@ -23250,9 +23343,29 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "new_linked_person_ids": [ - 5348648172131 - ] + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", + "account_id": 10023, + "team_id": 0, + "can_edit": true, + "environment_kind": "", + "environment_id": "", + "agent_name": "deploy-bot", + "instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.", + "card_url": "https://agents.example.com/deploy-bot/card", + "auth_type": "bearer", + "streaming": true, + "status": "enabled", + "agent_card_name": "Deploy Bot", + "agent_card_skills": [ + "rollback", + "diff" + ], + "card_resolve_timeout": 0, + "task_timeout": 0, + "auth_mode": "shared", + "created_by": 80011, + "created_at": 1716960000000, + "updated_at": 1717046400000 } } } @@ -23276,46 +23389,51 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TryLinkPersonRequest" + "$ref": "#/components/schemas/A2AAgentIDRequest" }, "example": { - "integration_id": 6113996590131 + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" } } } } } }, - "/incident/post-mortem/init": { + "/safari/a2a-agent/list": { "post": { - "operationId": "postmortem-write-init", - "summary": "初始化故障复盘", - "description": "根据一个或多个故障和模板创建复盘草稿。", + "operationId": "remote-agent-read-list", + "summary": "查询 A2A 智能体列表", + "description": "分页查询调用者在账户与团队范围内可见的 A2A 智能体。", "tags": [ - "On-call/故障管理" + "AI SRE/A2A 智能体" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 最多可将 10 个故障关联到同一份复盘报告。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", - "href": "/zh/api-reference/on-call/incidents/postmortem-write-init", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 分页使用 `offset`/`limit`(而非 `p`/`limit`)。\n- `scope=account` 仅返回账户级智能体;`scope=team` 仅返回调用者可见团队中的智能体;默认 `all` 两者兼含,受 `include_account` 影响。\n- `query` 会在智能体名称、指令、卡片 URL、智能体 ID 以及解析得到的卡片名称中执行不区分大小写的子串搜索。\n- `card_resolve_timeout` 与 `task_timeout` 目前恒为 `0` —— API 尚未提供设置方式。\n", + "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-read-list", "metadata": { - "sidebarTitle": "初始化故障复盘" + "sidebarTitle": "查询 A2A 智能体列表" } }, "responses": { "200": { - "description": "成功", + "description": "Success", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/PostMortemItem" + "$ref": "#/components/schemas/A2AAgentListResponse" } } } @@ -23324,43 +23442,34 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "meta": { - "account_id": 2451002751131, - "title": "Postmortem1", - "status": "published", - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", - "template_id": "post_mortem_default_tmpl_en-us", - "incident_ids": [ - "69bb9233331067560c718ecd" - ], - "media_count": 0, - "author_ids": [ - 2477273692131 - ], - "team_id": 2477033058131, - "channel_id": 3047621227131, - "is_private": false, - "channel_name": "Ops Channel", - "created_at_seconds": 1773900354, - "updated_at_seconds": 1773909012 - }, - "basics": { - "incidents_highest_severity": "Warning", - "incidents_earliest_start_seconds": 1761133512, - "incidents_latest_close_seconds": 1761133632, - "incidents_total_duration_seconds": 120, - "responders": [ - { - "person_id": 3790925372131, - "assigned_at": 1761133515, - "acknowledged_at": 0 - } - ] - }, - "content": { - "content": "{\"type\":\"doc\",\"content\":[]}" - }, - "follow_ups": "" + "items": [ + { + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", + "account_id": 10023, + "team_id": 0, + "can_edit": true, + "environment_kind": "", + "environment_id": "", + "agent_name": "deploy-bot", + "instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.", + "card_url": "https://agents.example.com/deploy-bot/card", + "auth_type": "bearer", + "streaming": true, + "status": "enabled", + "agent_card_name": "Deploy Bot", + "agent_card_skills": [ + "rollback", + "diff" + ], + "card_resolve_timeout": 0, + "task_timeout": 0, + "auth_mode": "shared", + "created_by": 80011, + "created_at": 1716960000000, + "updated_at": 1717046400000 + } + ], + "total": 1 } } } @@ -23384,49 +23493,54 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InitPostMortemRequest" + "$ref": "#/components/schemas/A2AAgentListRequest" }, "example": { - "incident_ids": [ - "69bb9233331067560c718ecd" - ], - "template_id": "post_mortem_default_tmpl_en-us" + "offset": 0, + "limit": 20, + "include_account": true } } } } } }, - "/incident/post-mortem/basics/reset": { + "/safari/a2a-agent/update": { "post": { - "operationId": "postmortem-write-reset-basics", - "summary": "更新故障复盘基础信息", - "description": "替换复盘报告中记录的故障基础信息。", + "operationId": "remote-agent-write-update", + "summary": "更新 A2A 智能体", + "description": "对 A2A 智能体执行部分更新;省略字段表示不变。", "tags": [ - "On-call/故障管理" + "AI SRE/A2A 智能体" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", - "href": "/zh/api-reference/on-call/incidents/postmortem-write-reset-basics", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **Agent 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 任何字段变更前都需要对智能体*当前*所属团队具备编辑权限(`access.CanEdit`)。\n- 重新分配 `team_id` 需要对目标团队的权限;若团队变更且未同时传入新的环境绑定,则现有 Runner 绑定必须对调用者仍可选,否则更新将被拒绝。\n- 变更 `auth_mode` 时会始终一并重写 `secret_schema`;若变更 `auth_mode` 时未传入 `oauth_metadata`,则将其清空。\n- 对敏感的 `auth_config` 键(`api_key`、`token`、`client_secret`)回传挖码值或空字符串将保留已存储的密钥,而不会覆盖。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-write-update", "metadata": { - "sidebarTitle": "更新故障复盘基础信息" + "sidebarTitle": "更新 A2A 智能体" } }, "responses": { "200": { - "description": "成功", + "description": "Success", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "type": "null", + "description": "Always null on success." } } } @@ -23434,7 +23548,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": null } } } @@ -23445,6 +23559,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23457,53 +23574,52 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResetPostMortemBasicsRequest" + "$ref": "#/components/schemas/A2AAgentUpdateRequest" }, "example": { - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", - "incidents_highest_severity": "Warning", - "incidents_earliest_start_seconds": 1761133512, - "incidents_latest_close_seconds": 1761133632, - "incidents_total_duration_seconds": 120, - "responder_ids": [ - 3790925372131 - ] + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", + "instructions": "Inspect deployment pipelines and propose rollbacks." } } } } } }, - "/incident/post-mortem/status/reset": { + "/safari/automation/rule/create": { "post": { - "operationId": "postmortem-write-reset-status", - "summary": "更新故障复盘状态", - "description": "将复盘报告设置为草稿或已发布。", + "operationId": "automation-rule-write-create", + "summary": "创建自动化规则", + "description": "创建自动化规则,支持 schedule、HTTP POST 和 On-call 故障触发器。", "tags": [ - "On-call/故障管理" + "AI SRE/自动化" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", - "href": "/zh/api-reference/on-call/incidents/postmortem-write-reset-status", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 有效 `app_key`;管理操作要求调用者可管理目标规则 |\n\n## 使用说明\n\n- 可以创建个人规则,也可以创建当前账户下任意团队的规则;`team_id` 创建后不可修改。\n- `cron_expr` 按 `timezone`(如提供)计算;未提供时依次回退到调用者的成员时区、账户时区,最后是 UTC。\n- `http_post_trigger_enabled=true` 会创建并启用 HTTP POST 触发器;响应中的 `http_post_token` 是仅在创建时返回的一次性值,请立即保存。\n- `oncall_incident_trigger_enabled=true` 时,`oncall_incident_channel_ids` 和 `oncall_incident_severities` 至少各需一项;匹配的故障会以 `trigger_kind=oncall_incident` 运行。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/automations/automation-rule-write-create", "metadata": { - "sidebarTitle": "更新故障复盘状态" + "sidebarTitle": "创建自动化规则" } }, "responses": { "200": { - "description": "成功", + "description": "Success", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/AutomationRuleItem" } } } @@ -23511,7 +23627,39 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": { + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "account_id": 10023, + "team_id": 123, + "owner_id": 80011, + "name": "Weekly on-call review", + "enabled": true, + "run_scope": "team", + "cron_expr": "0 9 * * 1", + "timezone": "Asia/Shanghai", + "prompt": "Summarize last week's alert noise and escalation load.", + "environment_kind": "", + "environment_id": "", + "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z", + "schedule_trigger_enabled": true, + "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y", + "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire", + "http_post_trigger_enabled": true, + "can_edit": true, + "created_at": 1780367971228, + "updated_at": 1780367971228, + "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U", + "schedule_next_fire_at_ms": 1780630800000, + "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p", + "oncall_incident_trigger_enabled": true, + "oncall_incident_channel_ids": [ + 456 + ], + "oncall_incident_severities": [ + "Critical", + "Warning" + ] + } } } } @@ -23522,6 +23670,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23534,47 +23685,67 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResetPostMortemStatusRequest" + "$ref": "#/components/schemas/AutomationRuleCreateRequest" }, "example": { - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", - "status": "published" + "name": "Weekly on-call review", + "team_id": 123, + "enabled": true, + "cron_expr": "0 9 * * 1", + "timezone": "Asia/Shanghai", + "schedule_trigger_enabled": true, + "prompt": "Summarize last week's alert noise and escalation load.", + "http_post_trigger_enabled": true, + "oncall_incident_trigger_enabled": true, + "oncall_incident_channel_ids": [ + 456 + ], + "oncall_incident_severities": [ + "Critical", + "Warning" + ] } } } } } }, - "/incident/post-mortem/title/reset": { + "/safari/automation/rule/delete": { "post": { - "operationId": "postmortem-write-reset-title", - "summary": "更新故障复盘标题", - "description": "替换复盘报告标题。", + "operationId": "automation-rule-write-delete", + "summary": "删除自动化规则", + "description": "删除一条自动化规则。", "tags": [ - "On-call/故障管理" + "AI SRE/自动化" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", - "href": "/zh/api-reference/on-call/incidents/postmortem-write-reset-title", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 有效 `app_key`;管理操作要求调用者可管理目标规则 |\n\n## 使用说明\n\n- 删除规则会同时移除其 schedule、HTTP POST 和 On-call 故障触发器;被删除的 HTTP POST 触发器 token 会立即失效。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/automations/automation-rule-write-delete", "metadata": { - "sidebarTitle": "更新故障复盘标题" + "sidebarTitle": "删除自动化规则" } }, "responses": { "200": { - "description": "成功", + "description": "Success", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "type": "null", + "description": "成功时固定为 null。" } } } @@ -23582,7 +23753,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": null } } } @@ -23593,6 +23764,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23605,47 +23779,51 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResetPostMortemTitleRequest" + "$ref": "#/components/schemas/AutomationRuleIDRequest" }, "example": { - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", - "title": "Production API latency incident" + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b" } } } } } }, - "/incident/post-mortem/follow-ups/reset": { + "/safari/automation/rule/get": { "post": { - "operationId": "postmortem-write-reset-follow-ups", - "summary": "更新故障复盘后续行动", - "description": "替换复盘报告中的后续行动项。", + "operationId": "automation-rule-read-get", + "summary": "查看自动化规则", + "description": "按 ID 查看一条自动化规则。", "tags": [ - "On-call/故障管理" + "AI SRE/自动化" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", - "href": "/zh/api-reference/on-call/incidents/postmortem-write-reset-follow-ups", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 有效 `app_key`;调用者必须可管理目标规则 |\n\n## 使用说明\n\n- 管理权限指:个人规则仅限创建者;团队规则限账户管理员或规则所属团队成员。\n", + "href": "/zh/api-reference/ai-sre/automations/automation-rule-read-get", "metadata": { - "sidebarTitle": "更新故障复盘后续行动" + "sidebarTitle": "查看自动化规则" } }, "responses": { "200": { - "description": "成功", + "description": "Success", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/AutomationRuleItem" } } } @@ -23653,7 +23831,39 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": { + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "account_id": 10023, + "team_id": 123, + "owner_id": 80011, + "name": "Weekly on-call review", + "enabled": true, + "run_scope": "team", + "cron_expr": "0 9 * * 1", + "timezone": "Asia/Shanghai", + "prompt": "Summarize last week's alert noise and escalation load.", + "environment_kind": "", + "environment_id": "", + "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z", + "schedule_trigger_enabled": true, + "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y", + "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire", + "http_post_trigger_enabled": true, + "can_edit": true, + "created_at": 1780367971228, + "updated_at": 1780367971228, + "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U", + "schedule_next_fire_at_ms": 1780630800000, + "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p", + "oncall_incident_trigger_enabled": true, + "oncall_incident_channel_ids": [ + 456 + ], + "oncall_incident_severities": [ + "Critical", + "Warning" + ] + } } } } @@ -23664,6 +23874,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23676,47 +23889,51 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResetPostMortemFollowUpsRequest" + "$ref": "#/components/schemas/AutomationRuleIDRequest" }, "example": { - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", - "follow_ups": "- Add database saturation alert\n- Review cache TTL rollout" + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b" } } } } } }, - "/incident/post-mortem/template/upsert": { + "/safari/automation/rule/list": { "post": { - "operationId": "postmortem-write-upsert-template", - "summary": "创建或更新故障复盘模板", - "description": "创建自定义复盘模板,或更新已有模板。", + "operationId": "automation-rule-read-list", + "summary": "列出自动化规则", + "description": "列出当前调用者可见的自动化规则。", "tags": [ - "On-call/故障管理" + "AI SRE/自动化" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", - "href": "/zh/api-reference/on-call/incidents/postmortem-write-upsert-template", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 有效 `app_key`;结果按调用者可见范围过滤 |\n\n## 使用说明\n\n- `all` 返回调用者自己的个人规则,以及调用者可访问团队的团队规则。\n- 账户管理员在列表中可见所有团队规则,但不可见他人的个人规则。\n- `team_ids` 只会收窄可见集合,不会扩大访问范围。\n", + "href": "/zh/api-reference/ai-sre/automations/automation-rule-read-list", "metadata": { - "sidebarTitle": "创建或更新故障复盘模板" + "sidebarTitle": "列出自动化规则" } }, "responses": { "200": { - "description": "成功", + "description": "Success", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/PostMortemTemplate" + "$ref": "#/components/schemas/AutomationRuleListResponse" } } } @@ -23725,15 +23942,42 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "account_id": 2451002751131, - "template_id": "post_mortem_default_tmpl_en-us", - "name": "Default post-mortem report", - "description": "Default sections for post-mortem reports.", - "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", - "content_markdown": "## Summary\nDescribe what happened.", - "team_id": 2477033058131, - "created_at_seconds": 1773900000, - "updated_at_seconds": 1773903600 + "total": 1, + "rules": [ + { + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "account_id": 10023, + "team_id": 123, + "owner_id": 80011, + "name": "Weekly on-call review", + "enabled": true, + "run_scope": "team", + "cron_expr": "0 9 * * 1", + "timezone": "Asia/Shanghai", + "prompt": "Summarize last week's alert noise and escalation load.", + "environment_kind": "", + "environment_id": "", + "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z", + "schedule_trigger_enabled": true, + "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y", + "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire", + "http_post_trigger_enabled": true, + "can_edit": true, + "created_at": 1780367971228, + "updated_at": 1780367971228, + "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U", + "schedule_next_fire_at_ms": 1780630800000, + "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p", + "oncall_incident_trigger_enabled": true, + "oncall_incident_channel_ids": [ + 456 + ], + "oncall_incident_severities": [ + "Critical", + "Warning" + ] + } + ] } } } @@ -23745,6 +23989,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23757,50 +24004,52 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpsertPostMortemTemplateRequest" + "$ref": "#/components/schemas/AutomationRuleListRequest" }, "example": { - "team_id": 2477033058131, - "name": "Production incident template", - "description": "Template for production incident reviews.", - "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", - "content_markdown": "## Summary\nDescribe what happened." + "scope": "all", + "limit": 20 } } } } } }, - "/incident/post-mortem/template/delete": { + "/safari/automation/rule/run": { "post": { - "operationId": "postmortem-write-delete-template", - "summary": "删除故障复盘模板", - "description": "删除自定义复盘模板。", + "operationId": "automation-rule-write-run", + "summary": "运行自动化规则", + "description": "立即手动运行一次自动化规则,不受其计划触发时间限制。", "tags": [ - "On-call/故障管理" + "AI SRE/自动化" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", - "href": "/zh/api-reference/on-call/incidents/postmortem-write-delete-template", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **100 次/分钟**;**5 次/秒** |\n| 权限要求 | 有效 `app_key`;调用者必须可管理目标规则 |\n\n## 使用说明\n\n- 同一规则的手动运行限速为每分钟最多一次;在此窗口内的第二次调用会返回 `429`,`code` 为 `\"RequestTooFrequently\"`。\n- 只有已启用的规则才能手动运行;已禁用或配置无效的规则会在创建运行前以 `400` 错误未通过预检。\n- 调用在底层 Agent 会话启动后即返回,而非等待运行结束;运行会继续异步执行——可使用列出自动化运行历史查询完成状态。\n- 以此方式发起的运行,`trigger_kind` 固定为 `manual`,在运行历史中与 `schedule`、`http_post`、`oncall_incident` 区分开来。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/automations/automation-rule-write-run", "metadata": { - "sidebarTitle": "删除故障复盘模板" + "sidebarTitle": "运行自动化规则" } }, "responses": { "200": { - "description": "成功", + "description": "Success", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/ManualRunRuleResult" } } } @@ -23808,7 +24057,28 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": { + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "trigger_kind": "manual", + "preflight": { + "ok": true, + "checks": [ + "rule_loaded", + "actor_authorized", + "app_allowed", + "runtime_scope_resolved", + "rule_config_valid" + ], + "scope": "team", + "owner_id": 80011, + "team_id": 123, + "app_name": "ai-sre" + }, + "run": { + "run_id": "trun_5oDvqiG64uur6sBNsTc4u", + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" + } + } } } } @@ -23819,6 +24089,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23831,46 +24104,51 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeletePostMortemTemplateRequest" + "$ref": "#/components/schemas/AutomationRuleIDRequest" }, "example": { - "template_id": "post_mortem_custom_tmpl_01" + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b" } } } } } }, - "/incident/post-mortem/template/list": { + "/safari/automation/rule/update": { "post": { - "operationId": "postmortem-read-list-templates", - "summary": "查询故障复盘模板列表", - "description": "返回账号下的内置和自定义故障复盘模板。", + "operationId": "automation-rule-write-update", + "summary": "更新自动化规则", + "description": "更新自动化规则的可变字段,包括 HTTP POST 与 On-call 故障触发器配置。", "tags": [ - "On-call/故障管理" + "AI SRE/自动化" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", - "href": "/zh/api-reference/on-call/incidents/postmortem-read-list-templates", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 有效 `app_key`;管理操作要求调用者可管理目标规则 |\n\n## 使用说明\n\n- 省略或传 `null` 的字段保持不变;`team_id` 不能修改为与当前值不同的值。\n- `cron_expr` 与 `timezone` 可以分别更新——只传其中一个时,另一个保持当前已存储的值。\n- `rotate_http_post_trigger_token=true` 会签发新的 webhook token,且仅在本次响应中返回。\n- 如需由 On-call 故障触发,传入 `oncall_incident_trigger_enabled`、`oncall_incident_channel_ids` 与 `oncall_incident_severities`;匹配事件会以 `trigger_kind=oncall_incident` 运行。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/automations/automation-rule-write-update", "metadata": { - "sidebarTitle": "查询故障复盘模板列表" + "sidebarTitle": "更新自动化规则" } }, "responses": { "200": { - "description": "成功", + "description": "Success", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ListPostMortemTemplatesResponse" + "$ref": "#/components/schemas/AutomationRuleItem" } } } @@ -23879,20 +24157,36 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "total": 2, - "has_next_page": false, - "items": [ - { - "account_id": 2451002751131, - "template_id": "post_mortem_default_tmpl_en-us", - "name": "Default post-mortem report", - "description": "Default sections for post-mortem reports.", - "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", - "content_markdown": "## Summary\nDescribe what happened.", - "team_id": 2477033058131, - "created_at_seconds": 1773900000, - "updated_at_seconds": 1773903600 - } + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "account_id": 10023, + "team_id": 123, + "owner_id": 80011, + "name": "Weekly on-call review", + "enabled": true, + "run_scope": "team", + "cron_expr": "0 9 * * 1", + "timezone": "Asia/Shanghai", + "prompt": "Summarize last week's alert noise and escalation load.", + "environment_kind": "", + "environment_id": "", + "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z", + "schedule_trigger_enabled": true, + "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y", + "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire", + "http_post_trigger_enabled": true, + "can_edit": true, + "created_at": 1780367971228, + "updated_at": 1780367971228, + "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U", + "schedule_next_fire_at_ms": 1780630800000, + "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p", + "oncall_incident_trigger_enabled": true, + "oncall_incident_channel_ids": [ + 456 + ], + "oncall_incident_severities": [ + "Critical", + "Warning" ] } } @@ -23905,6 +24199,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23917,49 +24214,62 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListPostMortemTemplatesRequest" + "$ref": "#/components/schemas/AutomationRuleUpdateRequest" }, "example": { - "p": 1, - "limit": 20, - "order_by": "created_at_seconds", - "asc": false + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "enabled": true, + "cron_expr": "15 9 * * 1", + "rotate_http_post_trigger_token": true, + "oncall_incident_trigger_enabled": true, + "oncall_incident_severities": [ + "Critical", + "Warning" + ], + "oncall_incident_channel_ids": [ + 456 + ] } } } } } }, - "/incident/post-mortem/template/info": { - "get": { - "operationId": "postmortem-read-template-info", - "summary": "查看故障复盘模板详情", - "description": "按 ID 返回单个故障复盘模板。", + "/safari/automation/run/list": { + "post": { + "operationId": "automation-run-read-list", + "summary": "列出自动化运行历史", + "description": "列出调用者可管理规则的运行历史。", "tags": [ - "On-call/故障管理" + "AI SRE/自动化" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", - "href": "/zh/api-reference/on-call/incidents/postmortem-read-template-info", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 有效 `app_key`;调用者必须可管理目标规则 |\n\n## 使用说明\n\n- 仅当调用者可管理规则时才可查看运行历史:个人规则仅限创建者;团队规则限账户管理员或规则所属团队成员。\n", + "href": "/zh/api-reference/ai-sre/automations/automation-run-read-list", "metadata": { - "sidebarTitle": "查看故障复盘模板详情" + "sidebarTitle": "列出自动化运行历史" } }, "responses": { "200": { - "description": "成功", + "description": "Success", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/PostMortemTemplate" + "$ref": "#/components/schemas/AutomationRunListResponse" } } } @@ -23968,15 +24278,30 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "account_id": 2451002751131, - "template_id": "post_mortem_default_tmpl_en-us", - "name": "Default post-mortem report", - "description": "Default sections for post-mortem reports.", - "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", - "content_markdown": "## Summary\nDescribe what happened.", - "team_id": 2477033058131, - "created_at_seconds": 1773900000, - "updated_at_seconds": 1773903600 + "total": 1, + "runs": [ + { + "run_id": "trun_5oDvqiG64uur6sBNsTc4u", + "kind": "automation_rule", + "account_id": 10023, + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "trigger_kind": "schedule", + "occurrence_key": "atrig_6aKp3wT9mQ2xVc8bR1nY7z:1780630800000", + "status": "succeeded", + "attempts": 1, + "started_at": 1780630800000, + "completed_at": 1780630923456, + "duration_ms": 123456, + "error_code": "", + "error_message": "", + "stats_json": {}, + "result_json": { + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" + }, + "created_at": 1780630800000, + "updated_at": 1780630923456 + } + ] } } } @@ -23988,6 +24313,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23995,49 +24323,58 @@ "$ref": "#/components/responses/ServerError" } }, - "parameters": [ - { - "name": "template_id", - "in": "query", - "required": true, - "schema": { - "type": "string" - }, - "description": "Template ID." + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationRunListRequest" + }, + "example": { + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "limit": 20, + "trigger_kind": "schedule" + } + } } - ] + } } }, - "/monit/preview/sync": { + "/safari/automation/template/list": { "post": { - "operationId": "monit-preview-sync", - "summary": "同步预览数据源查询", - "description": "同步执行数据源查询并返回原始结果,用于在保存前预览告警规则表达式的效果。", + "operationId": "automation-template-read-list", + "summary": "列出自动化模板", + "description": "按语言列出自动化预设模板。", "tags": [ - "Monitors/通用工具" + "AI SRE/自动化" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **60 次/分钟**;**10 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- `ds_type` 须与数据源类型匹配,如 `prometheus`、`loki`。\n- `ds_name` 为账户中配置的数据源显示名称。\n- `delay_seconds` 将查询窗口向前偏移指定秒数,用于补偿数据摄入延迟。\n- 响应体为数据源返回的原始 JSON,其结构随数据源类型而异。", - "href": "/zh/api-reference/monitors/monitor-utilities/monit-preview-sync", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 有效 `app_key`;结果按调用者可见范围过滤 |\n", + "href": "/zh/api-reference/ai-sre/automations/automation-template-read-list", "metadata": { - "sidebarTitle": "同步预览数据源查询" + "sidebarTitle": "列出自动化模板" } }, "responses": { "200": { - "description": "成功", + "description": "Success", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/PreviewSyncResponse" + "$ref": "#/components/schemas/AutomationTemplateListResponse" } } } @@ -24046,11 +24383,15 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "status": "success", - "data": { - "resultType": "vector", - "result": [] - } + "templates": [ + { + "name": "Weekly Insights", + "description": "Analyze incidents, alerts, response activity, notification load, and related changes from the past week.", + "icon": "chart-no-axes-combined", + "enabled": false, + "prompt": "Generate a weekly insights report. Analyze incidents, alerts, response activity, notification load, and related changes from the past week. Focus on what happened this week, which signals deserve attention, and which improvement actions are most valuable. Do not modify any Flashduty business state.\n" + } + ] } } } @@ -24062,6 +24403,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24074,49 +24418,51 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PreviewSyncRequest" + "$ref": "#/components/schemas/AutomationTemplateListRequest" }, "example": { - "ds_type": "prometheus", - "ds_name": "生产 Prometheus", - "expr": "rate(http_requests_total[5m])", - "delay_seconds": 0 + "locale": "en-US" } } } } } }, - "/status-page/info": { - "get": { - "operationId": "statusPageInfo", - "summary": "获取状态页详情", - "description": "获取指定状态页的详细配置信息。", + "/safari/mcp/server/create": { + "post": { + "operationId": "mcp-write-server-create", + "summary": "创建 MCP 服务器", + "description": "在账户下注册新的 MCP 服务器(连接器)。", "tags": [ - "On-call/状态页" + "AI SRE/MCP 服务器" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", - "href": "/zh/api-reference/on-call/status-pages/status-page-info", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **MCP 管理**(`ai-sre`) |\n\n## 使用说明\n\n- `command`/`args`/`env` 用于 `stdio`;`url`/`headers` 用于 `sse`/`streamable-http`。\n- 服务器名称必须以字母开头,且只能包含字母、数字、`-` 或 `_`,在账户内不区分大小写唯一;不满足则返回 InvalidParameter。\n- `environment_kind` 仅支持 `byoc`(需同时提供 `environment_id`)或留空表示自动选择——MCP 服务器不支持直接绑定 `cloud`。\n- `per_user_secret` 认证模式要求 `secret_schema` 为合法 JSON 且包含非空的 `header_name`。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/mcp-servers/mcp-write-server-create", "metadata": { - "sidebarTitle": "获取状态页详情" + "sidebarTitle": "创建 MCP 服务器" } }, "responses": { "200": { - "description": "成功", + "description": "Success", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/MCPServerItem" } } } @@ -24125,48 +24471,34 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "page_id": 5750613685214, - "name": "Flashduty Status Page", - "url_name": "flashduty-statuspage", - "type": "public", - "custom_domain": "status.example.com", - "logo": "https://cdn.example.com/logo.png", - "favicon": "https://cdn.example.com/favicon.png", - "page_header": "Welcome to our status page", - "page_footer": "2025 Example Corp", - "date_view": "list", - "display_uptime_mode": "chart_and_percentage", - "custom_links": [ - { - "key": "Documentation", - "value": "https://docs.example.com" - } - ], - "contact_info": "mailto:support@example.com", - "components": [ + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", + "account_id": 10023, + "team_id": 0, + "can_edit": true, + "environment_kind": "", + "environment_id": "", + "server_name": "prometheus", + "description": "Query Prometheus metrics and alerts.", + "transport": "streamable-http", + "url": "https://mcp.example.com/prometheus", + "status": "enabled", + "connect_timeout": 10, + "call_timeout": 60, + "tool_count": 2, + "tools": [ { - "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", - "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", - "name": "Web Console", - "available_since_seconds": 1765349358, - "order_id": 1 - } - ], - "sections": [ + "name": "query", + "description": "Run a PromQL instant query." + }, { - "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", - "name": "Core Services", - "description": "Our core services", - "order_id": 1, - "hide_uptime": false, - "hide_all": false + "name": "query_range", + "description": "Run a PromQL range query." } ], - "subscription": { - "email": true, - "im": false - }, - "template_preference": "message" + "auth_mode": "shared", + "created_by": 80011, + "created_at": 1716960000000, + "updated_at": 1717046400000 } } } @@ -24178,6 +24510,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24185,49 +24520,61 @@ "$ref": "#/components/responses/ServerError" } }, - "parameters": [ - { - "name": "page_id", - "in": "query", - "required": true, - "schema": { - "type": "string" - }, - "description": "Status page ID" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPServerCreateRequest" + }, + "example": { + "server_name": "prometheus", + "description": "Query Prometheus metrics and alerts.", + "transport": "streamable-http", + "url": "https://mcp.example.com/prometheus", + "status": "enabled" + } + } } - ] + } } }, - "/status-page/create": { + "/safari/mcp/server/delete": { "post": { - "operationId": "statusPageCreate", - "summary": "创建状态页", - "description": "创建一个新的状态页。", + "operationId": "mcp-write-server-delete", + "summary": "删除 MCP 服务器", + "description": "按 ID 删除 MCP 服务器。", "tags": [ - "On-call/状态页" + "AI SRE/MCP 服务器" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", - "href": "/zh/api-reference/on-call/status-pages/status-page-create", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **MCP 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/mcp-servers/mcp-write-server-delete", "metadata": { - "sidebarTitle": "创建状态页" + "sidebarTitle": "删除 MCP 服务器" } }, "responses": { "200": { - "description": "成功", + "description": "Success", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/CreateStatusPageResponse" + "type": "null", + "description": "成功时恒为 null。" } } } @@ -24235,11 +24582,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "page_id": 6294565612043, - "page_name": "My Status Page", - "page_url_name": "my-status-page" - } + "data": null } } } @@ -24250,6 +24593,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24262,50 +24608,52 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateStatusPageRequest" + "$ref": "#/components/schemas/MCPServerDeleteRequest" }, "example": { - "name": "My Status Page", - "url_name": "my-status-page", - "type": "public", - "page_header": "Welcome to our status page", - "contact_info": "mailto:support@example.com" + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" } } } } } }, - "/status-page/update": { + "/safari/mcp/server/disable": { "post": { - "operationId": "statusPageUpdate", - "summary": "更新状态页", - "description": "更新已有状态页的配置。", + "operationId": "mcp-write-server-disable", + "summary": "禁用 MCP 服务器", + "description": "禁用已启用的 MCP 服务器。", "tags": [ - "On-call/状态页" + "AI SRE/MCP 服务器" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", - "href": "/zh/api-reference/on-call/status-pages/status-page-update", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **MCP 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 对已禁用的服务器再次禁用会返回 InvalidParameter,而不是静默忽略。\n- 需要对服务器当前所属团队具有编辑权限:账户级服务器仅限所有者/管理员;团队级服务器要求调用者属于该团队(或为所有者/管理员)。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/mcp-servers/mcp-write-server-disable", "metadata": { - "sidebarTitle": "更新状态页" + "sidebarTitle": "禁用 MCP 服务器" } }, "responses": { "200": { - "description": "成功", + "description": "Success", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "type": "null", + "description": "成功时恒为 null。" } } } @@ -24313,7 +24661,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": null } } } @@ -24324,6 +24672,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24336,49 +24687,52 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EmptyRequest" + "$ref": "#/components/schemas/MCPServerStatusRequest" }, "example": { - "page_id": 5750613685214, - "name": "Flashduty Status Page (Updated)", - "page_header": "Updated status page header", - "contact_info": "mailto:support@example.com" + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" } } } } } }, - "/status-page/delete": { + "/safari/mcp/server/enable": { "post": { - "operationId": "statusPageDelete", - "summary": "删除状态页", - "description": "删除指定的状态页。", + "operationId": "mcp-write-server-enable", + "summary": "启用 MCP 服务器", + "description": "启用已禁用的 MCP 服务器。", "tags": [ - "On-call/状态页" + "AI SRE/MCP 服务器" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", - "href": "/zh/api-reference/on-call/status-pages/status-page-delete", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **MCP 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 对已启用的服务器再次启用会返回 InvalidParameter,而不是静默忽略。\n- 需要对服务器当前所属团队具有编辑权限:账户级服务器仅限所有者/管理员;团队级服务器要求调用者属于该团队(或为所有者/管理员)。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/mcp-servers/mcp-write-server-enable", "metadata": { - "sidebarTitle": "删除状态页" + "sidebarTitle": "启用 MCP 服务器" } }, "responses": { "200": { - "description": "成功", + "description": "Success", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "type": "null", + "description": "成功时恒为 null。" } } } @@ -24386,7 +24740,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": null } } } @@ -24397,6 +24751,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24409,46 +24766,51 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EmptyRequest" + "$ref": "#/components/schemas/MCPServerStatusRequest" }, "example": { - "page_id": 5750613685214 + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" } } } } } }, - "/status-page/component/upsert": { + "/safari/mcp/server/get": { "post": { - "operationId": "statusPageComponentUpsert", - "summary": "创建或更新状态页组件", - "description": "在状态页上创建或更新服务组件。", + "operationId": "mcp-read-server-get", + "summary": "查看 MCP 服务器详情", + "description": "查看单个 MCP 服务器并实时探测其工具列表。", "tags": [ - "On-call/状态页" + "AI SRE/MCP 服务器" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", - "href": "/zh/api-reference/on-call/status-pages/status-page-component-upsert", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 详情接口会实时探测工具;探测失败时设置 `list_error`,请求本身仍成功。\n", + "href": "/zh/api-reference/ai-sre/mcp-servers/mcp-read-server-get", "metadata": { - "sidebarTitle": "创建或更新状态页组件" + "sidebarTitle": "查看 MCP 服务器详情" } }, "responses": { "200": { - "description": "成功", + "description": "Success", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/UpsertStatusPageComponentResponse" + "$ref": "#/components/schemas/MCPServerItem" } } } @@ -24457,9 +24819,34 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "component_ids": [ - "01KP032KMN9YFBMPWANJMFZFG1" - ] + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", + "account_id": 10023, + "team_id": 0, + "can_edit": true, + "environment_kind": "", + "environment_id": "", + "server_name": "prometheus", + "description": "Query Prometheus metrics and alerts.", + "transport": "streamable-http", + "url": "https://mcp.example.com/prometheus", + "status": "enabled", + "connect_timeout": 10, + "call_timeout": 60, + "tool_count": 2, + "tools": [ + { + "name": "query", + "description": "Run a PromQL instant query." + }, + { + "name": "query_range", + "description": "Run a PromQL range query." + } + ], + "auth_mode": "shared", + "created_by": 80011, + "created_at": 1716960000000, + "updated_at": 1717046400000 } } } @@ -24483,54 +24870,51 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpsertStatusPageComponentRequest" + "$ref": "#/components/schemas/MCPServerGetRequest" }, "example": { - "page_id": 5750613685214, - "components": [ - { - "name": "Web Console", - "description": "Main web interface", - "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", - "order_id": 1 - } - ] + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" } } } } } }, - "/status-page/component/delete": { + "/safari/mcp/server/list": { "post": { - "operationId": "statusPageComponentDelete", - "summary": "删除状态页组件", - "description": "从状态页删除服务组件。", + "operationId": "mcp-read-server-list", + "summary": "查询 MCP 服务器列表", + "description": "分页查询调用者在账户与团队范围内可见的 MCP 服务器。", "tags": [ - "On-call/状态页" + "AI SRE/MCP 服务器" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", - "href": "/zh/api-reference/on-call/status-pages/status-page-component-delete", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 列表不含实时工具列表;如需探测工具请单独查询某个服务器。\n- `query` 会对名称、描述、AI 生成描述、服务器 ID、传输协议、URL、命令及市场模板名称进行不区分大小写的子串匹配。\n", + "href": "/zh/api-reference/ai-sre/mcp-servers/mcp-read-server-list", "metadata": { - "sidebarTitle": "删除状态页组件" + "sidebarTitle": "查询 MCP 服务器列表" } }, "responses": { "200": { - "description": "成功", + "description": "Success", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/MCPServerListResponse" } } } @@ -24538,7 +24922,41 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": { + "total": 1, + "servers": [ + { + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", + "account_id": 10023, + "team_id": 0, + "can_edit": true, + "environment_kind": "", + "environment_id": "", + "server_name": "prometheus", + "description": "Query Prometheus metrics and alerts.", + "transport": "streamable-http", + "url": "https://mcp.example.com/prometheus", + "status": "enabled", + "connect_timeout": 10, + "call_timeout": 60, + "tool_count": 2, + "tools": [ + { + "name": "query", + "description": "Run a PromQL instant query." + }, + { + "name": "query_range", + "description": "Run a PromQL range query." + } + ], + "auth_mode": "shared", + "created_by": 80011, + "created_at": 1716960000000, + "updated_at": 1717046400000 + } + ] + } } } } @@ -24561,49 +24979,53 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteStatusPageComponentRequest" + "$ref": "#/components/schemas/MCPServerListRequest" }, "example": { - "page_id": 5750613685214, - "component_ids": [ - "01KP032KMN9YFBMPWANJMFZFG1" - ] + "p": 1, + "limit": 20, + "include_account": true } } } } } }, - "/status-page/section/upsert": { + "/safari/mcp/server/update": { "post": { - "operationId": "statusPageSectionUpsert", - "summary": "创建或更新状态页区域", - "description": "在状态页上创建或更新区域。", + "operationId": "mcp-write-server-update", + "summary": "更新 MCP 服务器", + "description": "更新 MCP 服务器配置;省略字段表示不变。", "tags": [ - "On-call/状态页" + "AI SRE/MCP 服务器" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", - "href": "/zh/api-reference/on-call/status-pages/status-page-section-upsert", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **MCP 管理**(`ai-sre`) |\n\n## 使用说明\n\n- `env`/`headers` 中的脱敏密钥会被保留——回传脱敏值不会覆盖已存储的真实密钥。\n- `environment_kind`/`environment_id` 是相互独立的部分更新字段:两者都省略表示运行器绑定不变;设置任一字段即可修改绑定,约束与创建时相同(byoc 或留空)。\n- 变更 `team_id` 需要对目标团队具有重新分配权限;若运行器绑定未随之修改,则该绑定在新团队下仍须对调用者可选,否则更新会被拒绝。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/mcp-servers/mcp-write-server-update", "metadata": { - "sidebarTitle": "创建或更新状态页区域" + "sidebarTitle": "更新 MCP 服务器" } }, "responses": { "200": { - "description": "成功", + "description": "Success", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/UpsertStatusPageSectionResponse" + "$ref": "#/components/schemas/MCPServerItem" } } } @@ -24612,9 +25034,34 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "section_ids": [ - "01KP032J1FV2H8DDGN0QSJ1CAR" - ] + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", + "account_id": 10023, + "team_id": 0, + "can_edit": true, + "environment_kind": "", + "environment_id": "", + "server_name": "prometheus", + "description": "Query Prometheus metrics, alerts, and rules.", + "transport": "streamable-http", + "url": "https://mcp.example.com/prometheus", + "status": "enabled", + "connect_timeout": 10, + "call_timeout": 60, + "tool_count": 2, + "tools": [ + { + "name": "query", + "description": "Run a PromQL instant query." + }, + { + "name": "query_range", + "description": "Run a PromQL range query." + } + ], + "auth_mode": "shared", + "created_by": 80011, + "created_at": 1716960000000, + "updated_at": 1717046400000 } } } @@ -24626,6 +25073,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24638,53 +25088,53 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpsertStatusPageSectionRequest" + "$ref": "#/components/schemas/MCPServerUpdateRequest" }, "example": { - "page_id": 5750613685214, - "sections": [ - { - "name": "Core Services", - "description": "Our core services", - "order_id": 1 - } - ] + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", + "description": "Query Prometheus metrics, alerts, and rules." } } } } } }, - "/status-page/section/delete": { + "/safari/session/delete": { "post": { - "operationId": "statusPageSectionDelete", - "summary": "删除状态页区域", - "description": "从状态页删除区域。", + "operationId": "session-write-delete", + "summary": "删除会话", + "description": "按 ID 删除会话。", "tags": [ - "On-call/状态页" + "AI SRE/会话" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", - "href": "/zh/api-reference/on-call/status-pages/status-page-section-delete", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 个人会话仅创建者可删除;团队会话可由创建者、账户管理员或所属团队成员删除。\n- 这是软删除:会级联删除子智能体会话及其已展示的文件;底层 S3/MinIO 对象在事务提交后尽力清理,部分失败时可能残留孤立对象。\n", + "href": "/zh/api-reference/ai-sre/sessions/session-write-delete", "metadata": { - "sidebarTitle": "删除状态页区域" + "sidebarTitle": "删除会话" } }, "responses": { "200": { - "description": "成功", + "description": "Success", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "type": "null", + "description": "成功时恒为 null。" } } } @@ -24692,7 +25142,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": null } } } @@ -24703,7 +25153,10 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "429": { + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { @@ -24715,59 +25168,44 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteStatusPageSectionRequest" + "$ref": "#/components/schemas/SessionDeleteRequest" }, "example": { - "page_id": 5750613685214, - "section_ids": [ - "01KP032J1FV2H8DDGN0QSJ1CAR" - ] + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" } } } } } }, - "/status-page/template/upsert": { + "/safari/session/export": { "post": { - "operationId": "statusPageTemplateUpsert", - "summary": "创建或更新状态页模板", - "description": "创建或更新状态页的事件模板。", + "operationId": "session-read-export", + "summary": "导出会话记录", + "description": "以换行分隔的 JSON(NDJSON)流式导出会话的完整事件记录。", "tags": [ - "On-call/状态页" + "AI SRE/会话" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", - "href": "/zh/api-reference/on-call/status-pages/status-page-template-upsert", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/天**;**200 次/分钟**;**20 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 个人会话仅创建者可导出;团队会话允许同一账户内持有 `session_id` 的调用者导出。\n- 响应为 `application/x-ndjson`——请逐行解析并写入文件,切勿将整段记录读入内存。\n- 第一行始终为 `session_meta` 信封;`include_subagents=true` 会在派发行后内联各子会话的事件流。\n- 请求存在 60 秒的执行超时上限;非常大的会话可能无法在该时间内导出完成。\n- 若流在中途失败,响应会以一行 JSON 错误行结束,而非规范的错误信封(响应头已发出)——可通过检测该结尾行判断记录是否被截断。\n", + "href": "/zh/api-reference/ai-sre/sessions/session-read-export", "metadata": { - "sidebarTitle": "创建或更新状态页模板" + "sidebarTitle": "导出会话记录" } }, "responses": { "200": { - "description": "成功", + "description": "流式 NDJSON(application/x-ndjson)。每行一个 JSON 对象,以换行结束。第一行始终为 `session_meta` 信封,其后为会话事件。", "content": { - "application/json": { + "application/x-ndjson": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/UpsertStatusPageTemplateResponse" - } - } - } - ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "template_id": "01KP0339G5XDEPM4R86T2B23EP" - } + "type": "string", + "description": "换行分隔的 JSON 流。请逐行解析,切勿缓冲整个响应体。" } } } @@ -24778,6 +25216,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24790,53 +25231,52 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpsertStatusPageTemplateRequest" + "$ref": "#/components/schemas/SessionExportRequest" }, "example": { - "page_id": 5720156736380, - "type": "pre_defined", - "template": { - "title": "Service Disruption", - "event_type": "incident", - "status": "investigating", - "description": "We are investigating a service disruption affecting some users." - } + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "include_subagents": false } } } } } }, - "/status-page/template/delete": { + "/safari/session/get": { "post": { - "operationId": "statusPageTemplateDelete", - "summary": "删除状态页模板", - "description": "删除状态页的事件模板。", + "operationId": "session-read-info", + "summary": "查看会话详情", + "description": "查看单个会话,并返回其最近事件的一页(向更早方向分页)。", "tags": [ - "On-call/状态页" + "AI SRE/会话" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", - "href": "/zh/api-reference/on-call/status-pages/status-page-template-delete", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 个人会话仅创建者可读;团队会话允许同一账户内持有 `session_id` 的调用者读取。\n- 使用上一次响应的 `search_after_ctx` 翻阅更早的历史。\n- `limit`(或旧版 `num_recent_events`)限制事件页大小;默认 100,最大 1000。\n- 格式错误的 `search_after_ctx` 会在触发任何数据库查询前立即返回 400。\n- `current_turn_*` 字段仅在会话 `is_running` 时才会填充;`suggest_init` 与 `session/list` 使用同一个账户级引导提示。\n", + "href": "/zh/api-reference/ai-sre/sessions/session-read-info", "metadata": { - "sidebarTitle": "删除状态页模板" + "sidebarTitle": "查看会话详情" } }, "responses": { "200": { - "description": "成功", + "description": "Success", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/SessionGetResponse" } } } @@ -24844,7 +25284,77 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": { + "session": { + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "session_name": "Investigate cloud-assistant first heartbeat", + "app_name": "ai-sre", + "entry_kind": "web", + "person_id": "3790925372131", + "team_id": 0, + "is_mine": false, + "can_view": true, + "can_continue": true, + "can_manage": true, + "can_fork": true, + "access_source": "manager", + "share_enabled": true, + "share_version": 3, + "shared_at": 1780367971000, + "shared_by": 3790925372131, + "status": "enabled", + "incognito": false, + "created_at": 1780367971228, + "updated_at": 1780367993457, + "token_usage": { + "input_tokens": 14948, + "cached_tokens": 11520, + "output_tokens": 888, + "reasoning_tokens": 351 + }, + "current_context_tokens": 14948, + "context_window": 0, + "archived_at": 0, + "pinned_at": 0, + "last_event_at": 1780367992649, + "is_running": false, + "has_unread": true, + "current_turn_started_at": 0, + "current_turn_active_ms": 0, + "current_turn_wait_ms": 0, + "current_turn_tokens": 0 + }, + "events": [ + { + "event_id": "evt_3aZQ9p", + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "author": "user", + "partial": false, + "turn_complete": false, + "status": "normal", + "created_at": 1780367971241 + }, + { + "event_id": "evt_7bWk2r", + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "author": "ai-sre", + "content": { + "role": "model", + "parts": [ + { + "text": "..." + } + ] + }, + "partial": false, + "turn_complete": true, + "status": "normal", + "created_at": 1780367992649 + } + ], + "has_more_older": false, + "suggest_init": false + } } } } @@ -24855,6 +25365,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24867,48 +25380,52 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteStatusPageTemplateRequest" + "$ref": "#/components/schemas/SessionGetRequest" }, "example": { - "page_id": 5720156736380, - "type": "pre_defined", - "template_id": "01KP0339G5XDEPM4R86T2B23EP" + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "num_recent_events": 50 } } } } } }, - "/status-page/template/list": { - "get": { - "operationId": "statusPageTemplateList", - "summary": "查询状态页模板列表", - "description": "查询状态页的所有事件模板。", + "/safari/session/list": { + "post": { + "operationId": "session-read-list", + "summary": "查询会话列表", + "description": "分页查询调用者可见的智能体会话,可按应用、入口、归档状态与团队过滤。", "tags": [ - "On-call/状态页" + "AI SRE/会话" + ], + "security": [ + { + "AppKeyAuth": [] + } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", - "href": "/zh/api-reference/on-call/status-pages/status-page-template-list", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 分页使用 `p`/`limit`(最大 100);`scope` 默认 `all`。\n- `all` 返回调用者自己的个人会话,以及调用者可访问团队的团队会话;账户管理员可见所有团队会话,但不可见他人的个人会话。\n- `team_ids` 只会收窄可见集合,不会扩大访问范围。\n- `is_running` 反映实时运行集合;`has_unread` 按调用者各自计算;`current_turn_*` 字段在此接口恒为 0 —— 仅 `session/get` 会在会话运行时计算它们。\n- `suggest_init` 是账户级的引导提示(仅当账户在任何范围内都没有知识包时为 true),与列表过滤条件无关。\n", + "href": "/zh/api-reference/ai-sre/sessions/session-read-list", "metadata": { - "sidebarTitle": "查询状态页模板列表" + "sidebarTitle": "查询会话列表" } }, "responses": { "200": { - "description": "成功", + "description": "Success", "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/SessionListResponse" } } } @@ -24917,15 +25434,49 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "items": [ + "total": 988, + "sessions": [ { - "template_id": "01KC8KP6PHVPSCAB0BTKZBN2HR", - "title": "Service Disruption", - "type": "incident", - "status": "identified", - "description": "We have identified the root cause." + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "session_name": "Investigate cloud-assistant first heartbeat", + "app_name": "ai-sre", + "entry_kind": "web", + "person_id": "3790925372131", + "team_id": 0, + "is_mine": false, + "can_view": true, + "can_continue": true, + "can_manage": true, + "can_fork": true, + "access_source": "manager", + "share_enabled": true, + "share_version": 3, + "shared_at": 1780367971000, + "shared_by": 3790925372131, + "status": "enabled", + "incognito": false, + "created_at": 1780367971228, + "updated_at": 1780367993457, + "token_usage": { + "input_tokens": 14948, + "cached_tokens": 11520, + "output_tokens": 888, + "reasoning_tokens": 351 + }, + "current_context_tokens": 14948, + "context_window": 0, + "archived_at": 0, + "pinned_at": 0, + "last_event_at": 1780367992649, + "is_running": false, + "has_unread": true, + "current_turn_started_at": 0, + "current_turn_active_ms": 0, + "current_turn_wait_ms": 0, + "current_turn_tokens": 0 } - ] + ], + "suggest_init": false } } } @@ -24937,6 +25488,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24944,40 +25498,31 @@ "$ref": "#/components/responses/ServerError" } }, - "parameters": [ - { - "name": "page_id", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - }, - "description": "Status page ID." - }, - { - "name": "type", - "in": "query", - "required": true, - "schema": { - "type": "string", - "enum": [ - "pre_defined", - "message" - ] - }, - "description": "Template category. `pre_defined` returns predefined event templates; `message` returns message notification templates." + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionListRequest" + }, + "example": { + "app_name": "ai-sre", + "limit": 2, + "orderby": "updated_at", + "scope": "all" + } + } } - ] + } } }, - "/safari/automation/rule/create": { + "/safari/skill/delete": { "post": { - "operationId": "automation-rule-write-create", - "summary": "创建自动化规则", - "description": "创建自动化规则,支持 schedule、HTTP POST 和 On-call 故障触发器。", + "operationId": "skill-write-delete", + "summary": "删除技能", + "description": "按 ID 删除技能。", "tags": [ - "AI SRE/自动化" + "AI SRE/技能" ], "security": [ { @@ -24985,10 +25530,10 @@ } ], "x-mint": { - "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | **1,000 次/分钟**;**50 次/秒** 每账户 |\n| 权限 | 有效 `app_key`;管理操作要求调用者可管理目标规则 |\n\n## 使用说明\n\n- 可以创建个人规则,也可以创建当前 account 下任意团队规则;`team_id` 创建后不可修改。\n- 列表可见性与 Session 列表对齐:Owner / 管理员可见全部;普通成员可见自己创建的规则和自己团队的规则。\n- `http_post_token` 只在创建或轮换 token 的响应中返回,请立即保存。\n- 如需由 On-call 故障触发,传入 `oncall_incident_trigger_enabled`、`oncall_incident_channel_ids` 与 `oncall_incident_severities`;匹配事件会以 `oncall_incident` 运行。\n", - "href": "/zh/api-reference/ai-sre/automations/automation-rule-write-create", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **Skill 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 仅为软删除:将 `status` 置为 `deleted` 并重命名该行以释放原名称供复用;技能的压缩包不会从对象存储中删除。\n- 对已删除或不存在的 `skill_id` 再次删除会返回 `ResourceNotFound`,因为查找逻辑在执行删除前就已排除已删除的行。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/skills/skill-write-delete", "metadata": { - "sidebarTitle": "创建自动化规则" + "sidebarTitle": "删除技能" } }, "responses": { @@ -25005,7 +25550,8 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationRuleItem" + "type": "null", + "description": "成功时恒为 null。" } } } @@ -25013,38 +25559,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b", - "account_id": 10023, - "team_id": 123, - "owner_id": 80011, - "name": "Weekly on-call review", - "enabled": true, - "run_scope": "team", - "cron_expr": "0 9 * * 1", - "prompt": "Summarize last week's alert noise and escalation load.", - "environment_kind": "", - "environment_id": "", - "schedule_trigger_id": "autotrg_6aKp3wT9mQ2xVc8bR1nY7z", - "schedule_trigger_enabled": true, - "http_post_trigger_id": "autotrg_2bLq4xT8mP1sWd9cN3rF6y", - "http_post_trigger_url": "/safari/automation/triggers/autotrg_2bLq4xT8mP1sWd9cN3rF6y/fire", - "http_post_trigger_enabled": true, - "can_edit": true, - "created_at": 1780367971228, - "updated_at": 1780367971228, - "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U", - "schedule_next_fire_at_ms": 1780630800000, - "oncall_incident_trigger_id": "autotrg_9cVb2mN7qKs4dEa8T1rY5p", - "oncall_incident_trigger_enabled": true, - "oncall_incident_channel_ids": [ - 456 - ], - "oncall_incident_severities": [ - "Critical", - "Warning" - ] - } + "data": null } } } @@ -25070,37 +25585,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationRuleCreateRequest" + "$ref": "#/components/schemas/SkillDeleteRequest" }, "example": { - "name": "Weekly on-call review", - "team_id": 123, - "enabled": true, - "cron_expr": "0 9 * * 1", - "schedule_trigger_enabled": true, - "prompt": "Summarize last week's alert noise and escalation load.", - "http_post_trigger_enabled": true, - "oncall_incident_trigger_enabled": true, - "oncall_incident_channel_ids": [ - 456 - ], - "oncall_incident_severities": [ - "Critical", - "Warning" - ] + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" } } } } } }, - "/safari/automation/rule/list": { + "/safari/skill/disable": { "post": { - "operationId": "automation-rule-read-list", - "summary": "列出自动化规则", - "description": "列出当前调用者可见的自动化规则。", + "operationId": "skill-write-disable", + "summary": "禁用技能", + "description": "禁用已启用的技能,使智能体不再加载。", "tags": [ - "AI SRE/自动化" + "AI SRE/技能" ], "security": [ { @@ -25108,10 +25609,10 @@ } ], "x-mint": { - "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | **1,000 次/分钟**;**50 次/秒** 每账户 |\n| 权限 | 有效 `app_key`;结果按调用者可见范围过滤 |\n", - "href": "/zh/api-reference/ai-sre/automations/automation-rule-read-list", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **Skill 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 仅可禁用 `enabled` 状态的技能;已禁用的技能会返回 `InvalidParameter`。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/skills/skill-write-disable", "metadata": { - "sidebarTitle": "列出自动化规则" + "sidebarTitle": "禁用技能" } }, "responses": { @@ -25128,7 +25629,8 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationRuleListResponse" + "type": "null", + "description": "成功时恒为 null。" } } } @@ -25136,42 +25638,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "total": 1, - "rules": [ - { - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b", - "account_id": 10023, - "team_id": 123, - "owner_id": 80011, - "name": "Weekly on-call review", - "enabled": true, - "run_scope": "team", - "cron_expr": "0 9 * * 1", - "prompt": "Summarize last week's alert noise and escalation load.", - "environment_kind": "", - "environment_id": "", - "schedule_trigger_id": "autotrg_6aKp3wT9mQ2xVc8bR1nY7z", - "schedule_trigger_enabled": true, - "http_post_trigger_id": "autotrg_2bLq4xT8mP1sWd9cN3rF6y", - "http_post_trigger_url": "/safari/automation/triggers/autotrg_2bLq4xT8mP1sWd9cN3rF6y/fire", - "http_post_trigger_enabled": true, - "can_edit": true, - "created_at": 1780367971228, - "updated_at": 1780367971228, - "schedule_next_fire_at_ms": 1780630800000, - "oncall_incident_trigger_id": "autotrg_9cFr2kLm8qNv5pXs4dWy7a", - "oncall_incident_trigger_enabled": true, - "oncall_incident_channel_ids": [ - 2468013579 - ], - "oncall_incident_severities": [ - "Critical", - "Warning" - ] - } - ] - } + "data": null } } } @@ -25197,24 +25664,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationRuleListRequest" + "$ref": "#/components/schemas/SkillStatusRequest" }, "example": { - "scope": "all", - "limit": 20 + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" } } } } } }, - "/safari/automation/rule/get": { + "/safari/skill/enable": { "post": { - "operationId": "automation-rule-read-get", - "summary": "查看自动化规则", - "description": "按 ID 查看一条自动化规则。", + "operationId": "skill-read-enable", + "summary": "启用技能", + "description": "启用已禁用的技能,使智能体可加载。", "tags": [ - "AI SRE/自动化" + "AI SRE/技能" ], "security": [ { @@ -25222,10 +25688,10 @@ } ], "x-mint": { - "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | **1,000 次/分钟**;**50 次/秒** 每账户 |\n| 权限 | 有效 `app_key`;结果按调用者可见范围过滤 |\n", - "href": "/zh/api-reference/ai-sre/automations/automation-rule-read-get", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **Skill 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 仅可启用 `disabled` 状态的技能;已启用的技能会返回 `InvalidParameter`。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/skills/skill-read-enable", "metadata": { - "sidebarTitle": "查看自动化规则" + "sidebarTitle": "启用技能" } }, "responses": { @@ -25242,7 +25708,8 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationRuleItem" + "type": "null", + "description": "成功时恒为 null。" } } } @@ -25250,37 +25717,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b", - "account_id": 10023, - "team_id": 123, - "owner_id": 80011, - "name": "Weekly on-call review", - "enabled": true, - "run_scope": "team", - "cron_expr": "0 9 * * 1", - "prompt": "Summarize last week's alert noise and escalation load.", - "environment_kind": "", - "environment_id": "", - "schedule_trigger_id": "autotrg_6aKp3wT9mQ2xVc8bR1nY7z", - "schedule_trigger_enabled": true, - "http_post_trigger_id": "autotrg_2bLq4xT8mP1sWd9cN3rF6y", - "http_post_trigger_url": "/safari/automation/triggers/autotrg_2bLq4xT8mP1sWd9cN3rF6y/fire", - "http_post_trigger_enabled": true, - "can_edit": true, - "created_at": 1780367971228, - "updated_at": 1780367971228, - "schedule_next_fire_at_ms": 1780630800000, - "oncall_incident_trigger_id": "autotrg_9cFr2kLm8qNv5pXs4dWy7a", - "oncall_incident_trigger_enabled": true, - "oncall_incident_channel_ids": [ - 2468013579 - ], - "oncall_incident_severities": [ - "Critical", - "Warning" - ] - } + "data": null } } } @@ -25306,23 +25743,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationRuleIDRequest" + "$ref": "#/components/schemas/SkillStatusRequest" }, "example": { - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b" + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" } } } } } }, - "/safari/automation/rule/update": { + "/safari/skill/get": { "post": { - "operationId": "automation-rule-write-update", - "summary": "更新自动化规则", - "description": "更新自动化规则的可变字段,包括 HTTP POST 与 On-call 故障触发器配置。", + "operationId": "skill-read-get", + "summary": "查看技能详情", + "description": "查看单个技能,包含完整的 SKILL.md 内容。", "tags": [ - "AI SRE/自动化" + "AI SRE/技能" ], "security": [ { @@ -25330,10 +25767,10 @@ } ], "x-mint": { - "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | **1,000 次/分钟**;**50 次/秒** 每账户 |\n| 权限 | 有效 `app_key`;管理操作要求调用者可管理目标规则 |\n\n## 使用说明\n\n- 可以创建个人规则,也可以创建当前 account 下任意团队规则;`team_id` 创建后不可修改。\n- 列表可见性与 Session 列表对齐:Owner / 管理员可见全部;普通成员可见自己创建的规则和自己团队的规则。\n- `http_post_token` 只在创建或轮换 token 的响应中返回,请立即保存。\n- 如需由 On-call 故障触发,传入 `oncall_incident_trigger_enabled`、`oncall_incident_channel_ids` 与 `oncall_incident_severities`;匹配事件会以 `oncall_incident` 运行。\n", - "href": "/zh/api-reference/ai-sre/automations/automation-rule-write-update", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 若技能不存在或已被删除,返回 `ResourceNotFound`。\n- `can_edit` 反映团队成员关系,但读取本身不受团队限制,任意调用者均可访问。\n", + "href": "/zh/api-reference/ai-sre/skills/skill-read-get", "metadata": { - "sidebarTitle": "更新自动化规则" + "sidebarTitle": "查看技能详情" } }, "responses": { @@ -25350,7 +25787,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationRuleItem" + "$ref": "#/components/schemas/SkillItem" } } } @@ -25359,36 +25796,30 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b", + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", "account_id": 10023, - "team_id": 123, - "owner_id": 80011, - "name": "Weekly on-call review", - "enabled": true, - "run_scope": "team", - "cron_expr": "0 9 * * 1", - "prompt": "Summarize last week's alert noise and escalation load.", - "environment_kind": "", - "environment_id": "", - "schedule_trigger_id": "autotrg_6aKp3wT9mQ2xVc8bR1nY7z", - "schedule_trigger_enabled": true, - "http_post_trigger_id": "autotrg_2bLq4xT8mP1sWd9cN3rF6y", - "http_post_trigger_url": "/safari/automation/triggers/autotrg_2bLq4xT8mP1sWd9cN3rF6y/fire", - "http_post_trigger_enabled": true, - "can_edit": true, - "created_at": 1780367971228, - "updated_at": 1780367971228, - "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U", - "schedule_next_fire_at_ms": 1780630800000, - "oncall_incident_trigger_id": "autotrg_9cVb2mN7qKs4dEa8T1rY5p", - "oncall_incident_trigger_enabled": true, - "oncall_incident_channel_ids": [ - 456 + "team_id": 0, + "skill_name": "k8s-triage", + "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", + "version": "1.2.0", + "tags": [ + "kubernetes", + "triage" ], - "oncall_incident_severities": [ - "Critical", - "Warning" - ] + "author": "sre-team", + "tools": [ + "bash", + "mcp:prometheus/query" + ], + "status": "enabled", + "created_by": 80011, + "created_at": 1716960000000, + "updated_at": 1717046400000, + "can_edit": true, + "update_available": false, + "is_modified": false, + "description_en": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", + "content": "---\nname: k8s-triage\ndescription: ...\n---\n# Triage steps" } } } @@ -25400,9 +25831,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -25415,34 +25843,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationRuleUpdateRequest" + "$ref": "#/components/schemas/SkillGetRequest" }, "example": { - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b", - "enabled": true, - "cron_expr": "15 9 * * 1", - "rotate_http_post_trigger_token": true, - "oncall_incident_trigger_enabled": true, - "oncall_incident_severities": [ - "Critical", - "Warning" - ], - "oncall_incident_channel_ids": [ - 456 - ] + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" } } } } } }, - "/safari/automation/rule/delete": { + "/safari/skill/list": { "post": { - "operationId": "automation-rule-write-delete", - "summary": "删除自动化规则", - "description": "删除一条自动化规则。", + "operationId": "skill-read-list", + "summary": "查询技能列表", + "description": "分页查询调用者在账户与团队范围内可见的 AI SRE 技能。", "tags": [ - "AI SRE/自动化" + "AI SRE/技能" ], "security": [ { @@ -25450,10 +25867,10 @@ } ], "x-mint": { - "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | **1,000 次/分钟**;**50 次/秒** 每账户 |\n| 权限 | 有效 `app_key`;管理操作要求调用者可管理目标规则 |\n\n## 使用说明\n\n- 可以创建个人规则,也可以创建当前 account 下任意团队规则;`team_id` 创建后不可修改。\n- 列表可见性与 Session 列表对齐:Owner / 管理员可见全部;普通成员可见自己创建的规则和自己团队的规则。\n- `http_post_token` 只在创建或轮换 token 的响应中返回,请立即保存。\n", - "href": "/zh/api-reference/ai-sre/automations/automation-rule-write-delete", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 列表行中省略 `content` 字段;如需正文请单独查询某个技能。\n- `scope` 用于选择 `all`(默认)、仅 `account`、或仅 `team`,会覆盖 `include_account`;非管理员请求特定 `team_ids` 时会被静默过滤为其所属的团队。\n- `update_available` 每次调用会与市场目录比对一次;若目录加载失败,仅会隐藏该徽标,不会导致请求失败。\n", + "href": "/zh/api-reference/ai-sre/skills/skill-read-list", "metadata": { - "sidebarTitle": "删除自动化规则" + "sidebarTitle": "查询技能列表" } }, "responses": { @@ -25470,8 +25887,7 @@ "type": "object", "properties": { "data": { - "type": "null", - "description": "成功时固定为 null。" + "$ref": "#/components/schemas/SkillListResponse" } } } @@ -25479,7 +25895,35 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": { + "total": 1, + "skills": [ + { + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", + "account_id": 10023, + "team_id": 0, + "skill_name": "k8s-triage", + "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", + "version": "1.2.0", + "tags": [ + "kubernetes", + "triage" + ], + "author": "sre-team", + "tools": [ + "bash", + "mcp:prometheus/query" + ], + "status": "enabled", + "created_by": 80011, + "created_at": 1716960000000, + "updated_at": 1717046400000, + "can_edit": true, + "update_available": false, + "is_modified": false + } + ] + } } } } @@ -25490,9 +25934,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -25505,23 +25946,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationRuleIDRequest" + "$ref": "#/components/schemas/SkillListRequest" }, "example": { - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b" + "p": 1, + "limit": 20, + "include_account": true } } } } } }, - "/safari/automation/template/list": { + "/safari/skill/update": { "post": { - "operationId": "automation-template-read-list", - "summary": "列出自动化模板", - "description": "按语言列出自动化预设模板。", + "operationId": "skill-write-update", + "summary": "更新技能", + "description": "更新技能的描述信息或重新分配团队范围。", "tags": [ - "AI SRE/自动化" + "AI SRE/技能" ], "security": [ { @@ -25529,10 +25972,10 @@ } ], "x-mint": { - "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | **1,000 次/分钟**;**50 次/秒** 每账户 |\n| 权限 | 有效 `app_key`;结果按调用者可见范围过滤 |\n", - "href": "/zh/api-reference/ai-sre/automations/automation-template-read-list", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **Skill 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 仅 `description`、`description_en` 与 `team_id` 可编辑;技能正文需通过重新上传修改。\n- `description` 仅在非空时更新 —— 无法通过该字段清空;`description_en` 可为 null,传入空字符串即可显式清空。\n- 将 `team_id` 重新分配到不同团队时,除编辑权限外还会触发第二重授权检查,验证调用者是否可将资源指派到目标团队。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/skills/skill-write-update", "metadata": { - "sidebarTitle": "列出自动化模板" + "sidebarTitle": "更新技能" } }, "responses": { @@ -25549,7 +25992,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationTemplateListResponse" + "$ref": "#/components/schemas/SkillItem" } } } @@ -25558,15 +26001,28 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "templates": [ - { - "name": "噪音治理", - "description": "分析近期告警噪音并给出治理建议。", - "icon": "bell-off", - "enabled": true, - "prompt": "检查过去 24 小时告警噪音、升级负载和值班处理情况。" - } - ] + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", + "account_id": 10023, + "team_id": 0, + "skill_name": "k8s-triage", + "description": "Updated triage runbook.", + "version": "1.2.0", + "tags": [ + "kubernetes", + "triage" + ], + "author": "sre-team", + "tools": [ + "bash", + "mcp:prometheus/query" + ], + "status": "enabled", + "created_by": 80011, + "created_at": 1716960000000, + "updated_at": 1717046400000, + "can_edit": true, + "update_available": false, + "is_modified": false } } } @@ -25593,23 +26049,24 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationTemplateListRequest" + "$ref": "#/components/schemas/SkillUpdateRequest" }, "example": { - "locale": "en-US" + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", + "description": "Updated triage runbook." } } } } } }, - "/safari/automation/run/list": { + "/safari/skill/upload": { "post": { - "operationId": "automation-run-read-list", - "summary": "列出自动化运行历史", - "description": "列出调用者可管理规则的运行历史。", + "operationId": "skill-write-upload", + "summary": "上传技能", + "description": "上传技能压缩包(.skill/.zip/.tar.gz/.tgz)以创建或覆盖技能。", "tags": [ - "AI SRE/自动化" + "AI SRE/技能" ], "security": [ { @@ -25617,10 +26074,10 @@ } ], "x-mint": { - "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | **1,000 次/分钟**;**50 次/秒** 每账户 |\n| 权限 | 有效 `app_key`;结果按调用者可见范围过滤 |\n", - "href": "/zh/api-reference/ai-sre/automations/automation-run-read-list", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **30 次/分钟**;**3 次/秒** |\n| 权限要求 | **Skill 管理**(`ai-sre`) |\n\n## 使用说明\n\n- 以 `multipart/form-data` 提交,包含 `file` 部分;支持的压缩包类型为 `.skill`、`.zip`、`.tar.gz`、`.tgz`,最大 100MB(超限文件会在读取正文前即被拒绝)。\n- `skill_id` + `replace=true` 会定向覆盖该指定技能,且跳过团队归属校验,因为调用者本就拥有该行。\n- 仅 `replace=true`(不带 `skill_id`)会按技能名称做 upsert;不设置 `replace` 则始终创建新技能 —— 这两条路径都要求调用者被允许向目标 `team_id` 创建资源。\n- 响应始终将 `can_edit` 标记为 `true`。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/skills/skill-write-upload", "metadata": { - "sidebarTitle": "列出自动化运行历史" + "sidebarTitle": "上传技能" } }, "responses": { @@ -25637,7 +26094,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationRunListResponse" + "$ref": "#/components/schemas/SkillItem" } } } @@ -25646,30 +26103,29 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "total": 1, - "runs": [ - { - "run_id": "taskrun_5oDvqiG64uur6sBNsTc4u", - "kind": "automation_rule", - "account_id": 10023, - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b", - "trigger_kind": "schedule", - "occurrence_key": "autotrg_6aKp3wT9mQ2xVc8bR1nY7z:1780630800000", - "status": "succeeded", - "attempts": 1, - "started_at": 1780630800000, - "completed_at": 1780630923456, - "duration_ms": 123456, - "error_code": "", - "error_message": "", - "stats_json": {}, - "result_json": { - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" - }, - "created_at": 1780630800000, - "updated_at": 1780630923456 - } - ] + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", + "account_id": 10023, + "team_id": 0, + "skill_name": "k8s-triage", + "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", + "version": "1.2.0", + "tags": [ + "kubernetes", + "triage" + ], + "author": "sre-team", + "tools": [ + "bash", + "mcp:prometheus/query" + ], + "status": "enabled", + "created_by": 80011, + "created_at": 1716960000000, + "updated_at": 1717046400000, + "can_edit": true, + "update_available": false, + "is_modified": false, + "created": true } } } @@ -25694,38 +26150,32 @@ "requestBody": { "required": true, "content": { - "application/json": { + "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/AutomationRunListRequest" + "$ref": "#/components/schemas/SkillUploadRequest" }, "example": { - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b", - "limit": 20, - "trigger_kind": "schedule" + "team_id": 0, + "replace": false } } } } } }, - "/safari/automation/rule/run": { + "/rum/session-replay/metadata": { "post": { - "operationId": "automation-rule-write-run", - "summary": "运行自动化规则", - "description": "立即手动运行一次自动化规则,不受其计划触发时间限制。", + "operationId": "rum-session-replay-read-metadata", + "summary": "查看会话回放元数据", + "description": "返回可回放会话记录的应用、设备、会话时间范围及全部视图信息。", "tags": [ - "AI SRE/自动化" - ], - "security": [ - { - "AppKeyAuth": [] - } + "RUM/Session replay" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **100 次/分钟**;**5 次/秒** |\n| 权限要求 | 有效 `app_key`;调用者必须可管理目标规则 |\n\n## 使用说明\n\n- 同一规则的手动运行限速为每分钟最多一次;在此窗口内的第二次调用会返回 `429`,`code` 为 `\"RequestTooFrequently\"`。\n- 只有已启用的规则才能手动运行;已禁用或配置无效的规则会在创建运行前以 `400` 错误未通过预检。\n- 调用在底层 Agent 会话启动后即返回,而非等待运行结束;运行会继续异步执行——可使用列出自动化运行历史查询完成状态。\n- 以此方式发起的运行,`trigger_kind` 固定为 `manual`,在运行历史中与 `schedule`、`http_post`、`oncall_incident` 区分开来。\n- 每次调用都会记录到账户审计日志。\n", - "href": "/zh/api-reference/ai-sre/automations/automation-rule-write-run", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 若会话不存在,或该会话没有录制回放数据(`session_has_replay` 为 false),返回 `InvalidParameter`。\n- 若该会话时间窗口内未查询到任何视图,返回 `InvalidParameter`。\n- 当 `session_id` 在不同时间窗口内被复用时,可传入 `ts` 加以区分。", + "href": "/zh/api-reference/rum/session-replay/rum-session-replay-read-metadata", "metadata": { - "sidebarTitle": "运行自动化规则" + "sidebarTitle": "查看会话回放元数据" } }, "responses": { @@ -25736,13 +26186,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ManualRunRuleResult" + "$ref": "#/components/schemas/RumSessionReplayMetaItem" } } } @@ -25751,26 +26201,35 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", - "trigger_kind": "manual", - "preflight": { - "ok": true, - "checks": [ - "rule_loaded", - "actor_authorized", - "app_allowed", - "runtime_scope_resolved", - "rule_config_valid" - ], - "scope": "team", - "owner_id": 80011, - "team_id": 123, - "app_name": "ai-sre" + "application": { + "id": "WoyQQ3BohkdtPivubEvE8o" }, - "run": { - "run_id": "trun_5oDvqiG64uur6sBNsTc4u", - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" - } + "device": { + "type": "desktop" + }, + "session": { + "is_active": false, + "server_time_delta": 0, + "source": "browser", + "start": 1752480000000, + "end": 1752480600000 + }, + "views": [ + { + "source": "browser", + "view_id": "6f2b6b1a-8f7e-4e3a-9c2b-1a2b3c4d5e6f", + "name": "/dashboard", + "url": "https://app.example.com/dashboard", + "loading_type": "initial_load", + "container_source": "", + "container_view_id": "", + "server_time_delta": 0, + "start": 1752480000000, + "end": 1752480600000, + "is_active": false + } + ], + "foreground_periods": [] } } } @@ -25782,8 +26241,95 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RumSessionReplayMetaRequest" + }, + "example": { + "session_id": "0a4a2e64-8a4f-4b9a-9c1e-3a2f9e6d7c81" + } + } + } + } + } + }, + "/rum/session-replay/segments": { + "post": { + "operationId": "rum-session-replay-read-segments", + "summary": "查询会话回放分段", + "description": "分页获取会话录制的回放分段,可返回预签名下载地址或原始数据流。", + "tags": [ + "RUM/Session replay" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 当 `url_mode` 为 `false`(默认)时,响应以 `application/x-ndjson` 流式返回——每行是一条解压后的回放分段 JSON 记录——且**不会**包裹在标准信封中;下一页的分页游标改由响应头 `X-Search-After-Ctx` 返回,而非响应体字段。\n- 当 `url_mode` 为 `true` 时,响应为标准 JSON 信封,内含分段的预签名下载地址(1 小时内有效),而非原始字节流。\n- 传入 `ts` 可从该时间点之前最近的一个全量快照分段开始定位,而非从会话起始处分页。\n- `limit` 取值范围 1-99;传入 100 及以上将被拒绝。", + "href": "/zh/api-reference/rum/session-replay/rum-session-replay-read-segments", + "metadata": { + "sidebarTitle": "查询会话回放分段" + } + }, + "responses": { + "200": { + "description": "成功。响应体形状取决于 `url_mode`——详见使用说明。", + "headers": { + "X-Search-After-Ctx": { + "description": "Base64 编码的分页游标,用于下一次调用。仅在流式模式(`url_mode: false`)下返回。", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumSessionReplaySegmentsResult" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R5", + "data": { + "items": [ + "https://rum-replay.flashcat.cloud/short-term/2451002751131/0a4a2e64-8a4f-4b9a-9c1e-3a2f9e6d7c81/segments/1752480001234?X-Amz-Signature=example", + "https://rum-replay.flashcat.cloud/short-term/2451002751131/0a4a2e64-8a4f-4b9a-9c1e-3a2f9e6d7c81/segments/1752480032456?X-Amz-Signature=example" + ], + "search_after_ctx": "c2hvcnQtdGVybS8yNDUxMDAyNzUxMTMxLzBhNGEyZTY0LThhNGYtNGI5YS05YzFlLTNhMmY5ZTZkN2M4MS9zZWdtZW50cy8xNzUyNDgwMDMyNDU2" + } + } + }, + "application/x-ndjson": { + "schema": { + "type": "string", + "description": "Newline-delimited JSON (NDJSON). Each line is one decompressed replay segment record (rrweb-format events), streamed directly and not wrapped in the standard envelope." + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" }, "429": { "$ref": "#/components/responses/TooManyRequests" @@ -25797,12 +26343,102 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationRuleIDRequest" + "$ref": "#/components/schemas/RumSessionReplaySegmentsRequest" }, "example": { - "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b" + "session_id": "0a4a2e64-8a4f-4b9a-9c1e-3a2f9e6d7c81", + "limit": 20, + "url_mode": true + } + } + } + } + } + }, + "/oncall/license/list": { + "post": { + "operationId": "oncall-license-read-license-list", + "summary": "查询 On-call 许可列表", + "description": "查询当前账户中正在使用固定或临时 On-call 许可的人员。", + "tags": [ + "On-call/许可管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无——任意有效的 `app_key` 都可以调用此接口 |\n\n## 使用说明\n\n- `items` 仅包含持有固定或临时 On-call 许可的人员。\n- 对临时许可,`updated_by`、`created_at` 和 `updated_at` 均为 `0`。", + "href": "/zh/api-reference/on-call/licenses/oncall-license-read-license-list", + "metadata": { + "sidebarTitle": "查询 On-call 许可列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/LicenseListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01J0D5Y31GY2TWAHRP3Q8K4M6N", + "data": { + "total": 2, + "items": [ + { + "person_id": 80011, + "person_name": "Yuki Zhang", + "type": "fixed", + "updated_by": 80001, + "created_at": 1719792000, + "updated_at": 1719878400 + }, + { + "person_id": 80012, + "person_name": "Alex Chen", + "type": "temporary", + "updated_by": 0, + "created_at": 0, + "updated_at": 0 + } + ] + } + } } } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } } } } @@ -25951,9 +26587,76 @@ } }, "schemas": { + "LicenseListResponse": { + "type": "object", + "description": "当前账户中持有固定或临时 On-call 许可的人员。", + "required": [ + "total", + "items" + ], + "properties": { + "total": { + "type": "integer", + "description": "持有有效许可的人员数量。" + }, + "items": { + "type": "array", + "description": "持有有效许可的人员。", + "items": { + "$ref": "#/components/schemas/LicensePersonItem" + } + } + } + }, + "LicensePersonItem": { + "type": "object", + "description": "一名持有有效 On-call 许可的人员。", + "required": [ + "person_id", + "person_name", + "type", + "updated_by", + "created_at", + "updated_at" + ], + "properties": { + "person_id": { + "type": "integer", + "format": "int64", + "description": "持有许可的人员 ID。" + }, + "person_name": { + "type": "string", + "description": "持有许可的人员显示名称。" + }, + "type": { + "type": "string", + "enum": [ + "fixed", + "temporary" + ], + "description": "许可分配类型。`fixed` 表示固定分配,`temporary` 表示处于有效许可窗口中的临时分配。" + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "最后修改固定许可的人员 ID。临时许可为 `0`。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "固定许可的分配时间,Unix 时间戳。临时许可为 `0`。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "固定许可的最后修改时间,Unix 时间戳。临时许可为 `0`。" + } + } + }, "ErrorCode": { "type": "string", - "description": "Flashduty 错误码枚举。每个失败响应的 `error.code` 都是下列稳定值之一,HTTP 状态码仅作参考。\n\n| 错误码 | HTTP | 含义 |\n|---|---|---|\n| `OK` | 200 | 保留值,正常错误响应不会返回。 |\n| `InvalidParameter` | 400 | 必填参数缺失或未通过校验。 |\n| `BadRequest` | 400 | 通用的 400 错误,通常是请求本身不合法。 |\n| `InvalidContentType` | 400 | 请求头 `Content-Type` 不是 `application/json`。 |\n| `ResourceNotFound` | 400 | 目标资源不存在。注意 HTTP 状态码是 400 而非 404(历史设计)。 |\n| `NoLicense` | 400 | 功能需要有效授权,但未找到可用的 license。 |\n| `ReferenceExist` | 400 | 该资源仍被其他实体引用,无法删除。 |\n| `Unauthorized` | 401 | `app_key` 缺失、无效或已过期。 |\n| `BalanceNotEnough` | 402 | 账户余额不足,无法执行需要计费的操作。 |\n| `AccessDenied` | 403 | 身份认证通过,但 RBAC 权限不足以执行该操作。 |\n| `RouteNotFound` | 404 | 请求的 URL 路径不是已知路由。 |\n| `MethodNotAllowed` | 405 | 当前路径不接受所使用的 HTTP 方法。 |\n| `UndonedOrderExist` | 409 | 账户存在未完成的订单,请稍后重试。 |\n| `RequestLocked` | 423 | 因连续失败被临时锁定。 |\n| `EntityTooLarge` | 413 | 请求体超过允许的最大长度。 |\n| `RequestTooFrequently` | 429 | 命中限流(全局、账户级或集成级)。 |\n| `RequestVerifyRequired` | 428 | 操作需要二次验证码,但未提供。 |\n| `DangerousOperation` | 428 | 危险操作,需要进行 MFA 验证。 |\n| `InternalError` | 500 | 服务端未预期错误。反馈问题请附上 `request_id`。 |\n| `ServiceUnavailable` | 503 | 后端依赖不可用,请稍后重试。 |", + "description": "Flashduty error code enum. Every failed API response sets `error.code` to one of these values. The value is a stable wire string — not a localized message and not a numeric status. HTTP status is informational.", "enum": [ "OK", "InvalidParameter", @@ -25975,42 +26678,18 @@ "DangerousOperation", "InternalError", "ServiceUnavailable" - ], - "x-enumDescriptions": { - "OK": "保留值,正常错误响应不会返回。", - "InvalidParameter": "必填参数缺失或未通过校验。", - "BadRequest": "通用的 400 错误,通常是请求本身不合法。", - "InvalidContentType": "请求头 `Content-Type` 不是 `application/json`。", - "ResourceNotFound": "目标资源不存在。注意 HTTP 状态码是 400 而非 404(历史设计)。", - "NoLicense": "功能需要有效授权,但未找到可用的 license。", - "ReferenceExist": "该资源仍被其他实体引用,无法删除。", - "Unauthorized": "`app_key` 缺失、无效或已过期。", - "BalanceNotEnough": "账户余额不足,无法执行需要计费的操作。", - "AccessDenied": "身份认证通过,但 RBAC 权限不足以执行该操作。", - "RouteNotFound": "请求的 URL 路径不是已知路由。", - "MethodNotAllowed": "当前路径不接受所使用的 HTTP 方法。", - "UndonedOrderExist": "账户存在未完成的订单,请稍后重试。", - "RequestLocked": "因连续失败被临时锁定。", - "EntityTooLarge": "请求体超过允许的最大长度。", - "RequestTooFrequently": "命中限流(全局、账户级或集成级)。", - "RequestVerifyRequired": "操作需要二次验证码,但未提供。", - "DangerousOperation": "危险操作,需要进行 MFA 验证。", - "InternalError": "服务端未预期错误。反馈问题请附上 `request_id`。", - "ServiceUnavailable": "后端依赖不可用,请稍后重试。" - }, - "example": "InvalidParameter" + ] }, "DutyError": { "type": "object", - "description": "响应结构中的错误 payload,仅在非 2xx 响应时出现。", + "description": "Error payload inside the response envelope. Present only on non-2xx responses.", "properties": { "code": { "$ref": "#/components/schemas/ErrorCode" }, "message": { "type": "string", - "description": "用户可读的错误描述,语言会跟随调用方的 Accept-Language。可能包含字段名、ID 等请求上下文。", - "example": "The specified parameter template_id is not valid." + "description": "Human-readable error message, localized by the caller's Accept-Language. May contain field names, IDs, or other context from the failing request." } }, "required": [ @@ -26038,7 +26717,7 @@ }, "ErrorResponse": { "type": "object", - "description": "错误响应结构。`error` 必填,`data` 不存在。", + "description": "Response envelope for errors. `error` is required; `data` is absent.", "properties": { "request_id": { "type": "string", @@ -26159,6 +26838,10 @@ } } } + }, + "fields": { + "$ref": "#/components/schemas/CustomFieldValues", + "description": "以字段名为键的自定义字段值。创建表单生效时,只接受表单中可见的字段。" } } }, @@ -28186,6 +28869,21 @@ "maxItems": 100, "description": "待认领的故障 ID 列表,单次最多 100 条。", "minItems": 1 + }, + "custom_fields": { + "$ref": "#/components/schemas/CustomFieldValues", + "description": "认领表单的自定义字段值。允许的字段和值取决于该故障当前可见的表单。" + }, + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentActionImage" + }, + "description": "附加到认领故障时间线记录的图片。" + }, + "summary": { + "type": "string", + "description": "写入时间线评论的表单摘要。仅在认领表单包含摘要元素时接受。" } } }, @@ -28240,6 +28938,26 @@ ], "maxLength": 1024, "description": "可选,应用到所有故障的解决方案说明。" + }, + "description": { + "type": "string", + "maxLength": 6144, + "description": "新的故障描述,最多 6,144 个字符。提供后会在故障关闭前替换当前描述。" + }, + "custom_fields": { + "$ref": "#/components/schemas/CustomFieldValues", + "description": "解决表单的自定义字段值。允许的字段和值取决于该故障当前可见的表单。" + }, + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentActionImage" + }, + "description": "附加到解决故障时间线记录的图片。" + }, + "summary": { + "type": "string", + "description": "写入时间线评论的表单摘要。仅在解决表单包含摘要元素时接受。" } } }, @@ -35774,6 +36492,10 @@ "description_html_to_text": { "type": "boolean", "description": "导出时是否将描述列中的 HTML 标签转换为纯文本。" + }, + "include_ever_muted": { + "type": "boolean", + "description": "是否包含曾被收敛的故障;默认不包含。" } } }, @@ -36269,6 +36991,41 @@ }, "creator_name": { "type": "string" + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "故障负责人的成员 ID。" + }, + "owner_name": { + "type": "string", + "description": "故障负责人的显示名称。" + }, + "closer_id": { + "type": "integer", + "format": "int64", + "description": "关闭该故障的成员 ID。" + }, + "closer_name": { + "type": "string", + "description": "关闭该故障的成员显示名称。" + }, + "snoozed_before": { + "type": "integer", + "format": "int64", + "description": "故障被暂缓到何时的 Unix 时间戳(秒)。" + }, + "ever_muted": { + "type": "boolean", + "description": "该故障是否曾被收敛。" + }, + "frequency": { + "type": "string", + "enum": [ + "frequent", + "rare" + ], + "description": "故障频次分类。" } } }, @@ -41910,7 +42667,7 @@ }, "args": { "type": "object", - "description": "多态键值扩展参数,原样转发给 monit-edge。所有值必须为字符串。语义取决于 `ds_type`:SLS 需要 `sls.project` + `sls.logstore`;Loki / VictoriaLogs 原始模式需要通过 `.start`/`.end` 或 `.timespan.value` + `.timespan.unit` 指定时间范围;Prometheus 与 SQL 类数据源忽略该字段。键务必按数据源命名空间区分(如 `sls.project`、`loki.type`)。", + "description": "透传给 monit-edge 的多态键值扩展参数。所有值必须是字符串,键一律按数据源加前缀(如 `sls.project`、`loki.type`)。校验规则取决于 `ds_type`:SLS 必须提供 `sls.project` 与 `sls.logstore`;Elasticsearch 的 `es.type` 只接受 `sql` 或不传,其他值一律拒绝;Loki 与 VictoriaLogs 的 `.type` 接受 `stats`、`raw` 或不传,其中 `raw` 还必须给出时间范围——`.start` + `.end`,或 `.timespan.value` + `.timespan.unit`(单位取 `s`/`m`/`h`/`d`)。Prometheus 及其余 SQL 类数据源完全忽略 `args`。", "additionalProperties": { "type": "string" } @@ -42108,8 +42865,7 @@ "properties": { "target": { "type": "object", - "nullable": true, - "description": "解析出的监控对象。若 locator 无法唯一解析,则为 `null`。", + "description": "解析出的目标。未传 `target_kind` 且无法根据 locator 唯一推断时,不输出该字段。", "properties": { "kind": { "type": "string" @@ -42117,11 +42873,12 @@ "locator": { "type": "string" } - } + }, + "x-flashduty-preserve-absence": true }, "tools": { "type": "array", - "description": "工具能力清单条目。当 `error` 不为空时为空。", + "description": "目标 Agent 当前声明的 Tool 元数据。该字段恒存在;出错时为空数组。", "items": { "type": "object", "properties": { @@ -42143,15 +42900,15 @@ }, "output_shape": { "type": "object", - "description": "可选的输出 JSON Schema;仅当 `include_output_shape=true` 时返回。" + "description": "Tool 结果的 JSON Schema。仅当请求将 `include_output_shape` 置为 true 时返回。", + "x-flashduty-preserve-absence": true } } } }, "error": { "type": "object", - "nullable": true, - "description": "业务错误。成功时为 `null`。", + "description": "请求级业务错误,成功时不输出。该错误以 HTTP 200 返回——不要只看状态码。", "properties": { "code": { "type": "string", @@ -42169,9 +42926,11 @@ "items": { "type": "string" }, - "description": "在 `ambiguous_target_kind` 时返回;列出候选的 kind。" + "description": "在 `ambiguous_target_kind` 时返回;列出候选的 kind。", + "x-flashduty-preserve-absence": true } - } + }, + "x-flashduty-preserve-absence": true } } }, @@ -42225,8 +42984,7 @@ "properties": { "target": { "type": "object", - "nullable": true, - "description": "解析出的监控对象。", + "description": "解析出的目标。未传 `target_kind` 且无法根据 locator 唯一推断时,不输出该字段。", "properties": { "kind": { "type": "string" @@ -42234,57 +42992,79 @@ "locator": { "type": "string" } - } + }, + "x-flashduty-preserve-absence": true }, "results": { "type": "array", - "description": "按入参 `tools[]` 顺序对齐的单工具结果。当 `error` 不为空时为空。", + "description": "各 Tool 的执行结果,与请求中 `tools[]` 的顺序对齐。存在请求级 `error` 时为空数组。", "items": { "type": "object", "properties": { "tool": { - "type": "string" + "type": "string", + "description": "Tool 名称,与请求中 `tools[]` 的顺序一一对应。" + }, + "params": { + "type": "object", + "description": "WebAPI 从原始请求回填的调用参数。请求中缺省或为 null 时规范化为 `{}`。" }, "tool_version": { "type": "string", - "description": "Agent 执行的工具版本。若执行在 Agent 选定版本之前就失败了,则为空。" + "description": "Agent 实际执行的 Tool 版本。若失败发生在 Agent 选定版本之前,则不输出该字段。", + "x-flashduty-preserve-absence": true }, "data": { "type": "object", - "nullable": true, - "description": "工具执行成功时的负载——monit-agent `ToolResultPayload.data` 的透传(通常包含 `data` / `summary` / `truncated`)。当单工具 `error` 被设置时为 `null`。" + "description": "Tool 的业务数据,仅成功时输出。WebAPI 已解开 monit-agent 的 result envelope,因此不会出现嵌套的 `data.data`。", + "x-flashduty-preserve-absence": true + }, + "summary": { + "type": "string", + "description": "人类 / LLM 可读的一行结果摘要,仅在非空时输出。", + "x-flashduty-preserve-absence": true + }, + "truncated": { + "type": "object", + "description": "仅在结果确实被截断时输出——字段存在本身即表示已截断,因此不再输出冗余的 `truncated: true`。", + "properties": { + "reason": { + "type": "string", + "description": "结果被截断的原因。" + } + }, + "x-flashduty-preserve-absence": true }, "error": { "type": "object", - "nullable": true, - "description": "单工具错误。与 `data` 互斥。", + "description": "单 Tool 失败信息。仅失败时输出,与 `data` / `summary` / `truncated` 互斥。", "properties": { "code": { "type": "string", - "description": "常见取值:`timeout`、`target_unavailable`、`edge_unsupported`、`invalid_tool_result`、`internal`、`invalid_args`、`unknown_tool`、`unknown_tool_version`、`unknown_toolset_hash`、`target_not_owned`、`wrong_agent`、`overloaded`、`denied`、`permission_denied`、`credential_unavailable`、`target_unreachable`。" + "description": "常见取值:`timeout`、`target_unavailable`、`edge_unsupported`、`invalid_tool_result`、`internal`、`invalid_args`、`unknown_tool`、`unknown_tool_version`、`unknown_toolset_hash`、`target_not_owned`、`wrong_agent`、`overloaded`、`denied`、`permission_denied`、`credential_unavailable`、`target_unreachable`。" }, "message": { "type": "string" } - } + }, + "x-flashduty-preserve-absence": true }, "agent_elapsed_ms": { "type": "integer", "format": "int64", - "description": "Agent 自报的工具执行耗时,单位毫秒,不含网络。当失败发生在 Agent 开始执行之前时可能为 0。" + "description": "Agent 自报的 Tool 执行耗时(毫秒),不含网络往返。若失败发生在执行开始之前,可能为 0。" }, "e2e_elapsed_ms": { "type": "integer", "format": "int64", - "description": "webapi 观测的端到端耗时,单位毫秒(webapi → ws → edge → agent → ws → webapi)。与 `agent_elapsed_ms` 差距较大表示网络 / 边缘侧慢。" + "description": "WebAPI 观测到的端到端耗时(毫秒,webapi → ws → edge → agent → ws → webapi)。与 `agent_elapsed_ms` 差距很大说明是链路慢,而非 Tool 慢。" } } } }, "error": { "type": "object", - "nullable": true, - "description": "请求级业务错误。成功时为 `null`。", + "description": "请求级业务错误,成功时不输出。该错误以 HTTP 200 返回——不要只看状态码。", "properties": { "code": { "type": "string", @@ -42292,7 +43072,6 @@ "target_unavailable", "unknown_toolset_hash", "forward_failed", - "invalid_tool_result", "ambiguous_target_kind" ] }, @@ -42303,9 +43082,11 @@ "type": "array", "items": { "type": "string" - } + }, + "x-flashduty-preserve-absence": true } - } + }, + "x-flashduty-preserve-absence": true } } }, @@ -42376,150 +43157,11 @@ }, "next_cursor": { "type": "string", - "description": "下一页的不透明游标。缺失 / 为空表示已到末页。" + "description": "下一页的不透明游标。缺失 / 为空表示已到末页。", + "x-flashduty-preserve-absence": true } } }, - "MCPServerStatusRequest": { - "type": "object", - "description": "按 ID 启用/禁用 MCP 服务器。", - "properties": { - "server_id": { - "type": "string", - "description": "目标 MCP 服务器 ID。" - } - }, - "required": [ - "server_id" - ] - }, - "SkillItem": { - "type": "object", - "description": "AI SRE 技能 —— 智能体可加载的 SKILL.md 打包资源。", - "properties": { - "skill_id": { - "type": "string", - "description": "技能唯一 ID(前缀 `skill_`)。" - }, - "account_id": { - "type": "integer", - "description": "所属账户 ID。", - "format": "int64" - }, - "team_id": { - "type": "integer", - "description": "团队范围:0 表示账户级;>0 表示所属团队。", - "format": "int64" - }, - "skill_name": { - "type": "string", - "description": "技能名称,在账户内唯一。" - }, - "description": { - "type": "string", - "description": "来自 SKILL.md frontmatter 的可读描述。" - }, - "content": { - "type": "string", - "description": "完整的 SKILL.md 内容;列表响应中省略。" - }, - "version": { - "type": "string", - "description": "frontmatter 中的技能版本。" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "description": "从 frontmatter 解析的标签。" - }, - "author": { - "type": "string", - "description": "技能作者。" - }, - "license": { - "type": "string", - "description": "技能许可证。" - }, - "tools": { - "type": "array", - "items": { - "type": "string" - }, - "description": "所需工具(内置或 `mcp:server/tool`)。" - }, - "s3_key": { - "type": "string", - "description": "技能压缩包在对象存储中的 key。" - }, - "checksum": { - "type": "string", - "description": "技能压缩包的 SHA-256 校验和。" - }, - "status": { - "type": "string", - "description": "技能状态。", - "enum": [ - "enabled", - "disabled" - ] - }, - "created_by": { - "type": "integer", - "description": "创建该技能的成员 ID。", - "format": "int64" - }, - "created_at": { - "type": "integer", - "format": "int64", - "description": "创建时间,Unix 毫秒时间戳。" - }, - "updated_at": { - "type": "integer", - "format": "int64", - "description": "最近更新时间,Unix 毫秒时间戳。" - }, - "can_edit": { - "type": "boolean", - "description": "调用者是否可编辑该技能。" - }, - "source_template_name": { - "type": "string", - "description": "该技能安装来源的市场模板名称;自建技能为空。" - }, - "source_template_version": { - "type": "string", - "description": "安装时的模板版本。" - }, - "update_available": { - "type": "boolean", - "description": "当市场存在更新版本时为 true。" - }, - "is_modified": { - "type": "boolean", - "description": "当市场来源技能被本地修改时为 true(自动更新将跳过)。" - }, - "created": { - "type": "boolean", - "description": "仅在“从会话安装”响应中出现:true 表示新建,false 表示原地更新。" - } - }, - "required": [ - "skill_id", - "account_id", - "team_id", - "skill_name", - "description", - "status", - "created_by", - "created_at", - "updated_at", - "can_edit", - "update_available", - "is_modified" - ] - }, "ListChangeResponse": { "type": "object", "properties": { @@ -42704,268 +43346,6 @@ } } }, - "A2AAgentListRequest": { - "type": "object", - "description": "A2A 智能体列表的分页与团队过滤条件。", - "properties": { - "offset": { - "type": "integer", - "description": "分页行偏移。", - "default": 0 - }, - "limit": { - "type": "integer", - "description": "每页数量。", - "default": 20 - }, - "team_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "按团队 ID 过滤;为空则使用调用者可见范围。" - }, - "include_account": { - "type": [ - "boolean", - "null" - ], - "description": "是否包含账户级(team_id=0)记录,默认 true。" - } - } - }, - "SkillUpdateRequest": { - "type": "object", - "description": "可编辑的技能元数据。", - "properties": { - "skill_id": { - "type": "string", - "description": "目标技能 ID。" - }, - "description": { - "type": "string", - "description": "新的描述。", - "maxLength": 1024 - }, - "team_id": { - "type": [ - "integer", - "null" - ], - "description": "重新分配团队范围:0 表示账户级;>0 表示团队。省略则不变。", - "format": "int64" - } - }, - "required": [ - "skill_id" - ] - }, - "MCPServerListResponse": { - "type": "object", - "description": "分页的 MCP 服务器列表。", - "properties": { - "total": { - "type": "integer", - "description": "匹配的服务器总数。", - "format": "int64" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MCPServerItem" - }, - "description": "当前页的 MCP 服务器。" - } - }, - "required": [ - "total", - "servers" - ] - }, - "MCPServerItem": { - "type": "object", - "description": "账户下注册的 MCP 服务器(连接器)。", - "properties": { - "server_id": { - "type": "string", - "description": "MCP 服务器唯一 ID(前缀 `mcp_`)。" - }, - "account_id": { - "type": "integer", - "description": "所属账户 ID。", - "format": "int64" - }, - "team_id": { - "type": "integer", - "description": "团队范围:0 表示账户级;>0 表示所属团队。", - "format": "int64" - }, - "can_edit": { - "type": "boolean", - "description": "调用者是否可编辑该服务器。" - }, - "server_name": { - "type": "string", - "description": "MCP 服务器名称,在账户内唯一。" - }, - "description": { - "type": "string", - "description": "服务器描述。" - }, - "ai_description": { - "type": "string", - "description": "LLM 生成的描述,存在时优先于 `description`。" - }, - "transport": { - "type": "string", - "description": "传输协议。", - "enum": [ - "stdio", - "sse", - "streamable-http" - ] - }, - "command": { - "type": "string", - "description": "可执行命令(仅 stdio 传输)。" - }, - "args": { - "type": "array", - "items": { - "type": "string" - }, - "description": "命令参数(stdio 传输)。" - }, - "env": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "环境变量(stdio 传输);密钥值已脱敏。" - }, - "url": { - "type": "string", - "description": "服务器 URL(sse / streamable-http 传输)。" - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "HTTP 头(sse / streamable-http);密钥值已脱敏。" - }, - "proxy_url": { - "type": "string", - "description": "访问服务器使用的出站代理 URL。" - }, - "status": { - "type": "string", - "description": "服务器状态。", - "enum": [ - "enabled", - "disabled" - ] - }, - "connect_timeout": { - "type": "integer", - "description": "连接超时,单位秒(0 表示默认 10 秒)。" - }, - "call_timeout": { - "type": "integer", - "description": "工具调用超时,单位秒(0 表示默认 60 秒)。" - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MCPToolInfo" - }, - "description": "实时工具列表;由 get/test 接口填充。" - }, - "tool_count": { - "type": "integer", - "description": "实时工具列表的数量。" - }, - "list_error": { - "type": "string", - "description": "实时获取工具列表失败时的错误信息。" - }, - "auth_mode": { - "type": "string", - "description": "认证模式。", - "enum": [ - "shared", - "per_user_secret", - "per_user_oauth" - ] - }, - "secret_schema": { - "type": "string", - "description": "JSON 编码的密钥 schema(per_user_secret 模式)。" - }, - "oauth_metadata": { - "type": "string", - "description": "JSON 编码的 OAuth 元数据(per_user_oauth 模式)。" - }, - "source_template_name": { - "type": "string", - "description": "该连接器安装来源的市场模板名称;自建为空。" - }, - "created_by": { - "type": "integer", - "description": "创建该服务器的成员 ID。", - "format": "int64" - }, - "created_at": { - "type": "integer", - "format": "int64", - "description": "创建时间,Unix 毫秒时间戳。" - }, - "updated_at": { - "type": "integer", - "format": "int64", - "description": "最近更新时间,Unix 毫秒时间戳。" - } - }, - "required": [ - "server_id", - "account_id", - "team_id", - "can_edit", - "server_name", - "description", - "transport", - "status", - "connect_timeout", - "call_timeout", - "created_by", - "created_at", - "updated_at" - ] - }, - "MCPToolInfo": { - "type": "object", - "description": "MCP 服务器暴露的单个工具的元数据。", - "properties": { - "name": { - "type": "string", - "description": "工具名称。" - }, - "description": { - "type": "string", - "description": "工具描述。" - }, - "input_schema": { - "type": "object", - "additionalProperties": true, - "description": "描述工具输入参数的 JSON Schema。" - } - }, - "required": [ - "name", - "description" - ] - }, "GetWarRoomDefaultObserversResponse": { "type": "object", "properties": { @@ -43037,32 +43417,6 @@ "incident_id" ] }, - "SkillDeleteRequest": { - "type": "object", - "description": "按 ID 删除技能。", - "properties": { - "skill_id": { - "type": "string", - "description": "目标技能 ID。" - } - }, - "required": [ - "skill_id" - ] - }, - "MCPServerGetRequest": { - "type": "object", - "description": "按 ID 查询 MCP 服务器。", - "properties": { - "server_id": { - "type": "string", - "description": "目标 MCP 服务器 ID。" - } - }, - "required": [ - "server_id" - ] - }, "PreviewTemplateResponse": { "type": "object", "properties": { @@ -43077,43 +43431,15 @@ "message": { "type": "string", "description": "渲染失败的错误说明,success 为 false 时返回。" - } - } - }, - "SkillGetRequest": { - "type": "object", - "description": "按 ID 查询技能。", - "properties": { - "skill_id": { - "type": "string", - "description": "目标技能 ID。" - } - }, - "required": [ - "skill_id" - ] - }, - "SkillListResponse": { - "type": "object", - "description": "分页的技能列表。", - "properties": { - "total": { - "type": "integer", - "description": "匹配的技能总数。", - "format": "int64" }, - "skills": { + "fixed_fields": { "type": "array", "items": { - "$ref": "#/components/schemas/SkillItem" + "$ref": "#/components/schemas/PreviewIncidentCardFixedField" }, - "description": "当前页的技能。" + "description": "已应用隐藏规则后,为受支持 IM 预览返回的固定故障卡片字段。" } - }, - "required": [ - "total", - "skills" - ] + } }, "ResponseEnvelope": { "type": "object", @@ -43202,253 +43528,6 @@ } } }, - "SkillStatusRequest": { - "type": "object", - "description": "按 ID 启用/禁用技能。", - "properties": { - "skill_id": { - "type": "string", - "description": "目标技能 ID。" - } - }, - "required": [ - "skill_id" - ] - }, - "MCPServerCreateRequest": { - "type": "object", - "description": "新建 MCP 服务器的配置。", - "properties": { - "server_name": { - "type": "string", - "description": "MCP 服务器名称,在账户内唯一。", - "minLength": 1, - "maxLength": 255 - }, - "description": { - "type": "string", - "description": "服务器描述。", - "minLength": 1, - "maxLength": 1024 - }, - "transport": { - "type": "string", - "description": "传输协议。", - "enum": [ - "stdio", - "sse", - "streamable-http" - ] - }, - "command": { - "type": "string", - "description": "可执行命令(stdio 传输)。" - }, - "args": { - "type": "array", - "items": { - "type": "string" - }, - "description": "命令参数(stdio 传输)。" - }, - "env": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "环境变量(stdio 传输)。" - }, - "url": { - "type": "string", - "description": "服务器 URL(sse / streamable-http 传输)。" - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "HTTP 头(sse / streamable-http)。" - }, - "connect_timeout": { - "type": "integer", - "description": "连接超时,单位秒。0 表示默认(10 秒)。" - }, - "call_timeout": { - "type": "integer", - "description": "工具调用超时,单位秒。0 表示默认(60 秒)。" - }, - "auth_mode": { - "type": "string", - "description": "认证模式:shared(默认)、per_user_secret 或 per_user_oauth。" - }, - "secret_schema": { - "type": "string", - "description": "JSON 密钥 schema;auth_mode=per_user_secret 时必填。" - }, - "oauth_metadata": { - "type": "string", - "description": "JSON OAuth 元数据;为 per_user_oauth 预留。" - }, - "status": { - "type": "string", - "description": "初始状态。", - "enum": [ - "enabled", - "disabled" - ], - "default": "enabled" - }, - "team_id": { - "type": "integer", - "description": "团队范围:0 表示账户级;>0 表示团队。", - "format": "int64" - }, - "source_template_name": { - "type": "string", - "description": "从连接器模板创建时的市场模板名称。" - } - }, - "required": [ - "server_name", - "description", - "transport" - ] - }, - "MCPServerDeleteRequest": { - "type": "object", - "description": "按 ID 删除 MCP 服务器。", - "properties": { - "server_id": { - "type": "string", - "description": "目标 MCP 服务器 ID。" - } - }, - "required": [ - "server_id" - ] - }, - "SkillListRequest": { - "type": "object", - "description": "技能列表的分页与团队过滤条件。", - "properties": { - "p": { - "type": "integer", - "description": "页码,从 1 开始。", - "default": 1 - }, - "limit": { - "type": "integer", - "description": "每页数量。", - "default": 20 - }, - "team_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "按团队 ID 过滤;为空则使用调用者可见范围。" - }, - "include_account": { - "type": [ - "boolean", - "null" - ], - "description": "是否包含账户级(team_id=0)记录,默认 true。" - } - } - }, - "MCPServerUpdateRequest": { - "type": "object", - "description": "MCP 服务器的部分更新;省略字段表示不变。", - "properties": { - "server_id": { - "type": "string", - "description": "目标 MCP 服务器 ID。" - }, - "server_name": { - "type": "string", - "description": "新名称。", - "minLength": 1, - "maxLength": 255 - }, - "description": { - "type": "string", - "description": "新描述。", - "minLength": 1, - "maxLength": 1024 - }, - "transport": { - "type": "string", - "description": "传输协议。", - "enum": [ - "stdio", - "sse", - "streamable-http" - ] - }, - "command": { - "type": "string", - "description": "可执行命令(stdio 传输)。" - }, - "args": { - "type": "array", - "items": { - "type": "string" - }, - "description": "命令参数(stdio 传输)。" - }, - "env": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "环境变量(stdio 传输)。" - }, - "url": { - "type": "string", - "description": "服务器 URL(sse / streamable-http 传输)。" - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "HTTP 头(sse / streamable-http)。" - }, - "connect_timeout": { - "type": "integer", - "description": "连接超时,单位秒。0 表示默认(10 秒)。" - }, - "call_timeout": { - "type": "integer", - "description": "工具调用超时,单位秒。0 表示默认(60 秒)。" - }, - "auth_mode": { - "type": "string", - "description": "认证模式:shared(默认)、per_user_secret 或 per_user_oauth。" - }, - "secret_schema": { - "type": "string", - "description": "JSON 密钥 schema;auth_mode=per_user_secret 时必填。" - }, - "oauth_metadata": { - "type": "string", - "description": "JSON OAuth 元数据;为 per_user_oauth 预留。" - }, - "team_id": { - "type": [ - "integer", - "null" - ], - "description": "重新分配团队范围:0 表示账户级;>0 表示团队。省略则不变。", - "format": "int64" - } - }, - "required": [ - "server_id" - ] - }, "ListWarRoomEnabledResponse": { "type": "object", "properties": { @@ -43562,511 +43641,166 @@ } } }, - "A2AAgentListResponse": { + "AddWarRoomMemberRequest": { "type": "object", - "description": "分页的 A2A 智能体列表。", "properties": { - "items": { + "integration_id": { + "type": "integer", + "description": "承载作战室的 IM 集成。", + "format": "int64" + }, + "chat_id": { + "type": "string", + "description": "IM 平台中作战室的群聊 ID。" + }, + "member_ids": { "type": "array", "items": { - "$ref": "#/components/schemas/A2AAgentItem" + "type": "integer", + "description": "", + "format": "int64" }, - "description": "当前页的 A2A 智能体。" - }, - "total": { - "type": "integer", - "description": "匹配的智能体总数。", - "format": "int64" + "description": "要加入作战室的人员 ID 列表。" } }, "required": [ - "items", - "total" + "integration_id", + "chat_id", + "member_ids" ] }, - "A2AAgentItem": { + "AccountInfo": { "type": "object", - "description": "已注册的 A2A(智能体到智能体)远程智能体。", "properties": { - "agent_id": { - "type": "string", - "description": "A2A 智能体唯一 ID(前缀 `a2a_`)。" - }, "account_id": { "type": "integer", - "description": "所属账户 ID。", - "format": "int64" - }, - "team_id": { - "type": "integer", - "description": "团队范围:0 表示账户级;>0 表示所属团队。", - "format": "int64" - }, - "can_edit": { - "type": "boolean", - "description": "调用者是否可编辑该智能体。" + "description": "主体(账户)标识。" }, - "agent_name": { + "account_name": { "type": "string", - "description": "智能体显示名称。" + "description": "主体名称。" }, - "description": { + "domain": { "type": "string", - "description": "智能体描述。" + "description": "主体主域名(登录子域名)。" }, - "card_url": { - "type": "string", - "description": "远程智能体卡片的 URL。" + "extra_domains": { + "type": "array", + "items": { + "type": "string" + }, + "description": "主体的附加域名。" }, - "auth_type": { + "phone": { "type": "string", - "description": "访问远程智能体的认证类型。" + "description": "主体联系电话,已做隐私脱敏处理。" }, - "auth_config": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "认证配置;密钥值已脱敏。" + "country_code": { + "type": "string", + "description": "联系电话的国家区号。" }, - "streaming": { - "type": "boolean", - "description": "远程智能体是否支持流式响应。" + "email": { + "type": "string", + "description": "主体联系邮箱。" }, - "status": { + "avatar": { "type": "string", - "description": "智能体状态。", - "enum": [ - "enabled", - "disabled" - ] + "description": "主体头像 URL。" }, - "agent_card_name": { + "locale": { "type": "string", - "description": "从远程卡片解析出的智能体名称。" + "description": "主体语言偏好(例如 zh-CN、en-US)。" }, - "agent_card_skills": { - "type": "array", - "items": { - "type": "string" - }, - "description": "远程卡片声明的技能。" + "time_zone": { + "type": "string", + "description": "主体默认时区(IANA 名称,例如 Asia/Shanghai)。" }, - "card_resolve_timeout": { + "created_at": { "type": "integer", - "description": "卡片解析超时,单位秒。" + "format": "int64", + "description": "主体创建时间,Unix 时间戳(秒)。" }, - "task_timeout": { - "type": "integer", - "description": "单任务执行超时,单位秒。" + "restrictions": { + "type": "object", + "description": "主体访问限制(仅在已配置时返回)。", + "properties": { + "ips": { + "type": "array", + "items": { + "type": "string" + }, + "description": "允许的来源 IP/CIDR 白名单。" + }, + "email_domains": { + "type": "array", + "items": { + "type": "string" + }, + "description": "允许的登录邮箱域名。" + }, + "allow_subdomain": { + "type": "boolean", + "description": "是否同时接受允许邮箱域名的子域名。" + } + } }, - "auth_mode": { + "mp_plat": { "type": "string", - "description": "认证模式。", - "enum": [ - "shared", - "per_user_secret", - "per_user_oauth" - ] + "description": "主体所属的云市场平台(仅云市场来源的主体返回)。" }, - "secret_schema": { + "mp_account_id": { "type": "string", - "description": "JSON 编码的密钥 schema(per_user_secret 模式)。" - }, - "oauth_metadata": { + "description": "主体在云市场平台上的账户标识(仅云市场来源的主体返回)。" + } + } + }, + "PreviewTemplateRequest": { + "type": "object", + "properties": { + "content": { "type": "string", - "description": "JSON 编码的 OAuth 元数据(per_user_oauth 模式)。" + "description": "要渲染的模板内容。" }, - "created_by": { - "type": "integer", - "description": "创建该智能体的成员 ID。", - "format": "int64" + "type": { + "type": "string", + "description": "决定渲染引擎的模板通道类型。" }, - "created_at": { - "type": "integer", - "format": "int64", - "description": "创建时间,Unix 毫秒时间戳。" + "incident_id": { + "type": "string", + "description": "用于渲染模板的故障 ID,省略时使用模拟数据。MongoDB ObjectID 十六进制字符串。" }, - "updated_at": { - "type": "integer", - "format": "int64", - "description": "最近更新时间,Unix 毫秒时间戳。" + "incident_card_hidden_fields": { + "$ref": "#/components/schemas/IncidentCardHiddenFields" } }, "required": [ - "agent_id", - "account_id", - "team_id", - "can_edit", - "agent_name", - "description", - "card_url", - "auth_type", - "streaming", - "status", - "card_resolve_timeout", - "task_timeout", - "created_by", - "created_at", - "updated_at" + "content", + "type" ] }, - "A2AAgentUpdateRequest": { + "ListStatusPageResponse": { "type": "object", - "description": "A2A 智能体的部分更新;为空或省略的字段保持不变。", "properties": { - "agent_id": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusPageItem" + }, + "description": "账户拥有的状态页。" + } + } + }, + "StatusPageItem": { + "type": "object", + "properties": { + "page_id": { + "type": "integer", + "description": "状态页 ID。", + "format": "int64" + }, + "name": { "type": "string", - "description": "目标智能体 ID。" - }, - "agent_name": { - "type": [ - "string", - "null" - ], - "description": "新的显示名称。省略则不变。", - "maxLength": 128 - }, - "description": { - "type": [ - "string", - "null" - ], - "description": "新的描述。省略则不变。", - "maxLength": 2000 - }, - "card_url": { - "type": [ - "string", - "null" - ], - "description": "新的卡片 URL。省略则不变。" - }, - "auth_type": { - "type": [ - "string", - "null" - ], - "description": "新的认证类型。省略则不变。" - }, - "auth_config": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "替换认证配置。省略则不变。" - }, - "streaming": { - "type": [ - "boolean", - "null" - ], - "description": "切换流式支持。省略则不变。" - }, - "team_id": { - "type": [ - "integer", - "null" - ], - "description": "重新分配团队范围。省略则不变。", - "format": "int64" - }, - "auth_mode": { - "type": [ - "string", - "null" - ], - "description": "新的认证模式:shared、per_user_secret 或 per_user_oauth。" - }, - "secret_schema": { - "type": [ - "string", - "null" - ], - "description": "新的 JSON 密钥 schema。" - }, - "oauth_metadata": { - "type": [ - "string", - "null" - ], - "description": "新的 JSON OAuth 元数据。" - } - }, - "required": [ - "agent_id" - ] - }, - "A2AAgentCreateRequest": { - "type": "object", - "description": "注册新 A2A 智能体的参数。", - "properties": { - "agent_name": { - "type": "string", - "description": "智能体显示名称。", - "maxLength": 128 - }, - "description": { - "type": "string", - "description": "智能体描述。", - "maxLength": 2000 - }, - "card_url": { - "type": "string", - "description": "远程智能体卡片的 URL。" - }, - "auth_type": { - "type": "string", - "description": "远程智能体的认证类型。" - }, - "auth_config": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "认证配置键值对。" - }, - "streaming": { - "type": "boolean", - "description": "远程智能体是否支持流式响应。" - }, - "team_id": { - "type": "integer", - "description": "团队范围:0 表示账户级;>0 表示团队。", - "format": "int64" - }, - "auth_mode": { - "type": "string", - "description": "认证模式:shared(默认)、per_user_secret 或 per_user_oauth。" - }, - "secret_schema": { - "type": "string", - "description": "JSON 密钥 schema;auth_mode=per_user_secret 时必填。" - }, - "oauth_metadata": { - "type": "string", - "description": "JSON OAuth 元数据;为 per_user_oauth 预留。" - } - }, - "required": [ - "agent_name", - "card_url" - ] - }, - "MCPServerListRequest": { - "type": "object", - "description": "MCP 服务器列表的分页与团队过滤条件。", - "properties": { - "p": { - "type": "integer", - "description": "页码,从 1 开始。", - "default": 1 - }, - "limit": { - "type": "integer", - "description": "每页数量。", - "default": 20 - }, - "team_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "按团队 ID 过滤;为空则使用调用者可见范围。" - }, - "include_account": { - "type": [ - "boolean", - "null" - ], - "description": "是否包含账户级(team_id=0)记录,默认 true。" - } - } - }, - "A2AAgentCreateResponse": { - "type": "object", - "description": "注册 A2A 智能体的结果。", - "properties": { - "agent_id": { - "type": "string", - "description": "新建智能体的 ID。" - } - }, - "required": [ - "agent_id" - ] - }, - "AddWarRoomMemberRequest": { - "type": "object", - "properties": { - "integration_id": { - "type": "integer", - "description": "承载作战室的 IM 集成。", - "format": "int64" - }, - "chat_id": { - "type": "string", - "description": "IM 平台中作战室的群聊 ID。" - }, - "member_ids": { - "type": "array", - "items": { - "type": "integer", - "description": "", - "format": "int64" - }, - "description": "要加入作战室的人员 ID 列表。" - } - }, - "required": [ - "integration_id", - "chat_id", - "member_ids" - ] - }, - "AccountInfo": { - "type": "object", - "properties": { - "account_id": { - "type": "integer", - "description": "主体(账户)标识。" - }, - "account_name": { - "type": "string", - "description": "主体名称。" - }, - "domain": { - "type": "string", - "description": "主体主域名(登录子域名)。" - }, - "extra_domains": { - "type": "array", - "items": { - "type": "string" - }, - "description": "主体的附加域名。" - }, - "phone": { - "type": "string", - "description": "主体联系电话,已做隐私脱敏处理。" - }, - "country_code": { - "type": "string", - "description": "联系电话的国家区号。" - }, - "email": { - "type": "string", - "description": "主体联系邮箱。" - }, - "avatar": { - "type": "string", - "description": "主体头像 URL。" - }, - "locale": { - "type": "string", - "description": "主体语言偏好(例如 zh-CN、en-US)。" - }, - "time_zone": { - "type": "string", - "description": "主体默认时区(IANA 名称,例如 Asia/Shanghai)。" - }, - "created_at": { - "type": "integer", - "format": "int64", - "description": "主体创建时间,Unix 时间戳(秒)。" - }, - "restrictions": { - "type": "object", - "description": "主体访问限制(仅在已配置时返回)。", - "properties": { - "ips": { - "type": "array", - "items": { - "type": "string" - }, - "description": "允许的来源 IP/CIDR 白名单。" - }, - "email_domains": { - "type": "array", - "items": { - "type": "string" - }, - "description": "允许的登录邮箱域名。" - }, - "allow_subdomain": { - "type": "boolean", - "description": "是否同时接受允许邮箱域名的子域名。" - } - } - }, - "mp_plat": { - "type": "string", - "description": "主体所属的云市场平台(仅云市场来源的主体返回)。" - }, - "mp_account_id": { - "type": "string", - "description": "主体在云市场平台上的账户标识(仅云市场来源的主体返回)。" - } - } - }, - "PreviewTemplateRequest": { - "type": "object", - "properties": { - "content": { - "type": "string", - "description": "要渲染的模板内容。" - }, - "type": { - "type": "string", - "description": "决定渲染引擎的模板通道类型。" - }, - "incident_id": { - "type": "string", - "description": "用于渲染模板的故障 ID,省略时使用模拟数据。MongoDB ObjectID 十六进制字符串。" - } - }, - "required": [ - "content", - "type" - ] - }, - "A2AAgentIDRequest": { - "type": "object", - "description": "按 ID 查询 A2A 智能体。", - "properties": { - "agent_id": { - "type": "string", - "description": "目标智能体 ID。" - } - }, - "required": [ - "agent_id" - ] - }, - "ListStatusPageResponse": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StatusPageItem" - }, - "description": "账户拥有的状态页。" - } - } - }, - "StatusPageItem": { - "type": "object", - "properties": { - "page_id": { - "type": "integer", - "description": "状态页 ID。", - "format": "int64" - }, - "name": { - "type": "string", - "description": "状态页显示名称。" + "description": "状态页显示名称。" }, "url_name": { "type": "string", @@ -44205,610 +43939,109 @@ } } }, - "SessionListRequest": { + "DeletePostMortemTemplateRequest": { "type": "object", - "description": "查询智能体会话列表的过滤条件。读取范围限定为解析出的账户及调用者可见的团队。", + "description": "删除故障复盘模板的参数。", + "required": [ + "template_id" + ], "properties": { - "app_name": { - "type": "string", - "description": "要查询其会话的智能体应用。", - "enum": [ - "ask-ai", - "support", - "support-website", - "support-flashcat", - "ai-sre", - "template-assistant", - "swe" - ] - }, - "p": { - "type": "integer", - "description": "页码,从 1 开始。", - "default": 1, - "minimum": 1 - }, - "limit": { - "type": "integer", - "description": "每页数量,1–100。", - "minimum": 1, - "maximum": 100, - "default": 20 - }, - "orderby": { - "type": "string", - "description": "排序字段。", - "enum": [ - "created_at", - "updated_at" - ] - }, - "asc": { - "type": "boolean", - "description": "为 true 时升序;仅在设置 `orderby` 时生效。" - }, - "include_subagent_sessions": { - "type": "boolean", - "description": "是否在列表中包含子智能体派生的会话。" - }, - "keyword": { - "type": "string", - "description": "按会话名称关键字过滤。", - "maxLength": 64 - }, - "scope": { + "template_id": { "type": "string", - "description": "可见范围:all(本人 + 所属团队,默认)、personal 或 team。", - "enum": [ - "all", - "personal", - "team" - ] - }, - "team_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "可选的团队过滤;与 `scope` 取交集。" - }, - "entry_kinds": { + "description": "模板 ID。" + } + } + }, + "InitPostMortemRequest": { + "type": "object", + "description": "从故障初始化复盘报告的参数。", + "required": [ + "incident_ids", + "template_id" + ], + "properties": { + "incident_ids": { "type": "array", + "minItems": 1, + "maxItems": 10, "items": { - "type": "string", - "enum": [ - "web", - "im", - "api", - "automation" - ] + "type": "string" }, - "description": "仅返回由这些入口产生的会话;为空则返回所有类型。" + "description": "要关联到复盘报告的故障 ID,1-10 个。" }, - "status": { + "template_id": { "type": "string", - "description": "归档分桶:active(默认)返回未归档,archived 返回已归档,all 返回全部。", - "enum": [ - "active", - "archived", - "all" - ] + "description": "用于初始化报告的模板 ID。" } - }, - "required": [ - "app_name" - ] + } }, - "SessionTokenUsage": { + "ListPostMortemTemplatesRequest": { "type": "object", - "description": "跨所有轮次的会话级 token 累计汇总。账户计费的权威来源。", + "description": "故障复盘模板的分页与排序参数。", "properties": { - "input_tokens": { - "type": "integer", - "format": "int64", - "description": "提示(输入)token 总数,含缓存部分。" + "order_by": { + "type": "string", + "enum": [ + "created_at_seconds" + ], + "description": "排序字段。" }, - "cached_tokens": { - "type": "integer", - "format": "int64", - "description": "input_tokens 中由提示缓存命中的部分。" + "asc": { + "type": "boolean", + "description": "为 true 时按升序排序。" }, - "output_tokens": { + "p": { "type": "integer", "format": "int64", - "description": "生成(输出)token 总数。" + "minimum": 0, + "description": "页码,从 1 开始。" }, - "reasoning_tokens": { + "limit": { "type": "integer", "format": "int64", - "description": "推理/思考 token 总数。" + "minimum": 0, + "maximum": 100, + "default": 20, + "description": "每页数量,最多 100。" + }, + "search_after_ctx": { + "type": "string", + "description": "上一页响应返回的向后分页游标。" } } }, - "EnvironmentBinding": { + "ListPostMortemTemplatesResponse": { "type": "object", - "description": "会话绑定的 runner 或云沙箱。首条消息前为 null。", + "description": "分页后的故障复盘模板列表。", + "required": [ + "items", + "total", + "has_next_page" + ], "properties": { - "kind": { - "type": "string", - "description": "环境类型(如 runner、sandbox)。" + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PostMortemTemplate" + }, + "description": "当前页的模板。" }, - "id": { - "type": "string", - "description": "环境标识。" + "total": { + "type": "integer", + "format": "int64", + "description": "匹配的模板总数。" }, - "name": { - "type": "string", - "description": "可读的环境名称。" + "has_next_page": { + "type": "boolean", + "description": "为 true 表示还有下一页。" }, - "status": { + "search_after_ctx": { "type": "string", - "description": "绑定状态。" + "description": "向后分页游标。" } } }, - "ContextResolvedItem": { - "type": "object", - "description": "该会话三层知识包解析结果的快照。", - "properties": { - "account_pack_id": { - "type": "string", - "description": "解析出的账户级知识包 ID。" - }, - "team_pack_id": { - "type": "string", - "description": "解析出的团队级知识包 ID。" - }, - "incident_id": { - "type": "string", - "description": "作战室来源时绑定的故障 ID。" - }, - "resolved_at_ms": { - "type": "integer", - "format": "int64", - "description": "知识包解析时间,Unix 毫秒时间戳。" - }, - "versions": { - "type": "object", - "additionalProperties": { - "type": "integer" - }, - "description": "各知识包解析版本映射。" - } - } - }, - "SessionItem": { - "type": "object", - "description": "单条智能体会话记录。", - "properties": { - "session_id": { - "type": "string", - "description": "会话标识。" - }, - "parent_session_id": { - "type": "string", - "description": "子智能体(子)会话的父会话 ID;否则为空。" - }, - "session_name": { - "type": "string", - "description": "会话标题;未命名会话可能为空。" - }, - "app_name": { - "type": "string", - "description": "拥有该会话的智能体应用。" - }, - "entry_kind": { - "type": "string", - "description": "创建该会话的入口来源。", - "enum": [ - "web", - "im", - "api", - "scheduled", - "subagent" - ] - }, - "person_id": { - "type": "string", - "description": "创建者人员 ID。" - }, - "team_id": { - "type": "integer", - "format": "int64", - "description": "所属团队 ID;0 表示未绑定团队。创建后不可变更。" - }, - "team_name": { - "type": "string", - "description": "解析出的团队名称;未绑定或团队已删除时为空。" - }, - "is_mine": { - "type": "boolean", - "description": "当该会话由调用者创建时为 true。" - }, - "can_manage": { - "type": "boolean", - "description": "当调用者可重命名/归档/删除该会话时为 true。" - }, - "status": { - "type": "string", - "description": "生命周期状态。", - "enum": [ - "enabled", - "deleted" - ] - }, - "incognito": { - "type": "boolean", - "description": "无痕(不持久化记忆)会话时为 true。" - }, - "created_at": { - "type": "integer", - "format": "int64", - "description": "会话创建时间,Unix 毫秒时间戳。" - }, - "updated_at": { - "type": "integer", - "format": "int64", - "description": "会话最近更新时间,Unix 毫秒时间戳。" - }, - "template_staging_round_id": { - "type": "string", - "description": "当前 save→validate 轮次 ID(仅 template-assistant);否则为空。" - }, - "state": { - "type": "object", - "additionalProperties": true, - "description": "原始会话状态包(会话级键)。为空时省略。" - }, - "bound_environment": { - "$ref": "#/components/schemas/EnvironmentBinding" - }, - "context_resolved": { - "$ref": "#/components/schemas/ContextResolvedItem" - }, - "token_usage": { - "$ref": "#/components/schemas/SessionTokenUsage" - }, - "current_context_tokens": { - "type": "integer", - "format": "int64", - "description": "截至最近一轮的 LLM 上下文窗口的 token 数。0 表示尚无已完成的轮次。" - }, - "context_window": { - "type": "integer", - "format": "int64", - "description": "所绑定模型的最大上下文 token 数。0 表示未知。" - }, - "archived_at": { - "type": "integer", - "format": "int64", - "description": "归档时间,Unix 毫秒时间戳;0 表示未归档。" - }, - "pinned_at": { - "type": "integer", - "format": "int64", - "description": "调用者的个人置顶时间,Unix 毫秒时间戳;0 表示未置顶。" - }, - "last_event_at": { - "type": "integer", - "format": "int64", - "description": "最近一条助手侧事件的时间,Unix 毫秒时间戳。" - }, - "is_running": { - "type": "boolean", - "description": "当该会话当前有正在进行的智能体轮次时为 true。" - }, - "has_unread": { - "type": "boolean", - "description": "当存在调用者尚未查看的助手输出时为 true。" - } - } - }, - "SessionListResponse": { - "type": "object", - "description": "一页智能体会话。", - "properties": { - "total": { - "type": "integer", - "format": "int64", - "description": "匹配过滤条件的会话总数(忽略分页)。" - }, - "sessions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SessionItem" - }, - "description": "当前页的会话。" - } - } - }, - "SessionGetRequest": { - "type": "object", - "description": "查询单个会话,并返回其最近事件的一页(向更早方向分页)。", - "properties": { - "session_id": { - "type": "string", - "description": "目标会话 ID。", - "minLength": 1 - }, - "num_recent_events": { - "type": "integer", - "description": "旧版每页数量:返回的最近事件数。与 `limit` 同时设置时以 `limit` 为准;0 使用服务端默认值(100)。", - "minimum": 0, - "maximum": 1000 - }, - "limit": { - "type": "integer", - "description": "事件每页数量;优先于 `num_recent_events`。0 使用服务端默认值(100)。", - "minimum": 0, - "maximum": 1000 - }, - "search_after_ctx": { - "type": "string", - "description": "上一次响应返回的不透明游标;回传以获取更早的一页。", - "maxLength": 4096 - } - }, - "required": [ - "session_id" - ] - }, - "EventItem": { - "type": "object", - "description": "单条已持久化的会话事件。content/actions/usage_metadata 携带原始 ADK 信封,请将其视为不透明的结构化负载。", - "properties": { - "event_id": { - "type": "string", - "description": "事件标识。" - }, - "session_id": { - "type": "string", - "description": "所属会话 ID。" - }, - "invocation_id": { - "type": "string", - "description": "标识一轮的 ADK 调用 ID。" - }, - "author": { - "type": "string", - "description": "事件作者(如 user 或智能体名称)。" - }, - "branch": { - "type": "string", - "description": "嵌套智能体的 ADK 分支路径。" - }, - "content": { - "type": "object", - "additionalProperties": true, - "description": "ADK content 信封 {role, parts:[...]}。" - }, - "actions": { - "type": "object", - "additionalProperties": true, - "description": "ADK actions 信封(状态增量、转移、升级)。" - }, - "usage_metadata": { - "type": "object", - "additionalProperties": true, - "description": "单轮 token 用量元数据。" - }, - "partial": { - "type": "boolean", - "description": "流式部分分片时为 true。" - }, - "turn_complete": { - "type": "boolean", - "description": "一轮的终止事件上为 true。" - }, - "error_code": { - "type": "string", - "description": "当该事件表示失败时的错误码。" - }, - "error_message": { - "type": "string", - "description": "可读的错误信息(如有)。" - }, - "status": { - "type": "string", - "description": "事件状态。", - "enum": [ - "normal", - "compressed" - ] - }, - "created_at": { - "type": "integer", - "format": "int64", - "description": "事件写入时间,Unix 毫秒时间戳。" - } - } - }, - "SessionGetResponse": { - "type": "object", - "description": "一个会话及其事件的一页(向更早方向分页)。", - "properties": { - "session": { - "$ref": "#/components/schemas/SessionItem" - }, - "events": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EventItem" - }, - "description": "最近事件,按 (created_at, event_id) 升序排列。" - }, - "has_more_older": { - "type": "boolean", - "description": "当本页之外仍有更早的事件时为 true。" - }, - "search_after_ctx": { - "type": "string", - "description": "不透明游标;作为 search_after_ctx 回传以获取更早的一页。has_more_older 为 false 时省略。" - } - } - }, - "SessionExportRequest": { - "type": "object", - "description": "以流式 NDJSON 导出单个会话的完整事件记录。", - "properties": { - "session_id": { - "type": "string", - "description": "目标会话 ID。" - }, - "include_subagents": { - "type": "boolean", - "description": "为 true 时,每条 subagent_dispatch 行后会跟随子会话的完整事件流,并以其自身的 session_meta 包裹。默认 false。" - } - }, - "required": [ - "session_id" - ] - }, - "SkillUploadRequest": { - "type": "object", - "description": "上传技能压缩包的 multipart 表单。", - "properties": { - "file": { - "type": "string", - "format": "binary", - "description": "技能压缩包(.skill / .zip / .tar.gz / .tgz),最大 100MB。" - }, - "team_id": { - "type": "integer", - "description": "新技能的团队范围:0 表示账户级。", - "format": "int64" - }, - "replace": { - "type": "boolean", - "description": "为 true 时覆盖同名技能。" - }, - "skill_id": { - "type": "string", - "description": "替换指定技能时的技能 ID。" - } - }, - "required": [ - "file" - ] - }, - "SessionDeleteRequest": { - "type": "object", - "description": "按 ID 删除会话。", - "properties": { - "session_id": { - "type": "string", - "description": "目标会话 ID。", - "minLength": 1 - } - }, - "required": [ - "session_id" - ] - }, - "DeletePostMortemTemplateRequest": { - "type": "object", - "description": "删除故障复盘模板的参数。", - "required": [ - "template_id" - ], - "properties": { - "template_id": { - "type": "string", - "description": "模板 ID。" - } - } - }, - "InitPostMortemRequest": { - "type": "object", - "description": "从故障初始化复盘报告的参数。", - "required": [ - "incident_ids", - "template_id" - ], - "properties": { - "incident_ids": { - "type": "array", - "minItems": 1, - "maxItems": 10, - "items": { - "type": "string" - }, - "description": "要关联到复盘报告的故障 ID,1-10 个。" - }, - "template_id": { - "type": "string", - "description": "用于初始化报告的模板 ID。" - } - } - }, - "ListPostMortemTemplatesRequest": { - "type": "object", - "description": "故障复盘模板的分页与排序参数。", - "properties": { - "order_by": { - "type": "string", - "enum": [ - "created_at_seconds" - ], - "description": "排序字段。" - }, - "asc": { - "type": "boolean", - "description": "为 true 时按升序排序。" - }, - "p": { - "type": "integer", - "format": "int64", - "minimum": 0, - "description": "页码,从 1 开始。" - }, - "limit": { - "type": "integer", - "format": "int64", - "minimum": 0, - "maximum": 100, - "default": 20, - "description": "每页数量,最多 100。" - }, - "search_after_ctx": { - "type": "string", - "description": "上一页响应返回的向后分页游标。" - } - } - }, - "ListPostMortemTemplatesResponse": { - "type": "object", - "description": "分页后的故障复盘模板列表。", - "required": [ - "items", - "total", - "has_next_page" - ], - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PostMortemTemplate" - }, - "description": "当前页的模板。" - }, - "total": { - "type": "integer", - "format": "int64", - "description": "匹配的模板总数。" - }, - "has_next_page": { - "type": "boolean", - "description": "为 true 表示还有下一页。" - }, - "search_after_ctx": { - "type": "string", - "description": "向后分页游标。" - } - } - }, - "PostMortemTemplate": { + "PostMortemTemplate": { "type": "object", "description": "故障复盘报告模板。", "required": [ @@ -45406,214 +44639,2488 @@ } } }, - "AutomationRuleCreateRequest": { + "FacetCountItem": { "type": "object", - "description": "创建自动化规则。", + "description": "一个分面值及其出现次数。", + "required": [ + "facet_value", + "count" + ], "properties": { - "name": { - "type": "string", - "minLength": 1, - "maxLength": 255, - "description": "规则名称。" + "facet_value": { + "description": "分面值,类型与字段的 `value_type` 一致。" }, - "team_id": { + "count": { "type": "integer", "format": "int64", - "minimum": 0, - "description": "作用域团队 ID。0 或省略表示个人规则;>0 表示账户下某团队。创建后不可修改。" - }, - "enabled": { - "type": "boolean", - "description": "规则创建后是否启用。API 省略时为 false;Chat/CLI 入口会默认发送 true,除非用户要求禁用。" - }, - "cron_expr": { + "description": "该时间范围内具有此分面值的事件数量。", + "example": 1523 + } + } + }, + "RumDataAggregateFunction": { + "type": "object", + "description": "采样引擎使用的聚合函数元信息。", + "required": [ + "type", + "column_name", + "column_index" + ], + "properties": { + "type": { "type": "string", - "description": "运行周期。支持 4 段 `hour day month weekday`,会补 `minute=0`;也支持 5 段 `minute hour day month weekday`。分钟必须是固定整数,秒级 6 段不支持。创建 API 当前要求该字段,即使只启用 HTTP POST trigger,也要提供一个有效 cron 并把 `schedule_trigger_enabled` 设为 false。", - "example": "15 9 * * *" - }, - "schedule_trigger_enabled": { - "type": [ - "boolean", - "null" - ], - "description": "是否启用 schedule trigger。省略时为 true;HTTP-POST-only 规则应传 false。" + "description": "聚合函数类型。" }, - "prompt": { + "column_name": { "type": "string", - "minLength": 1, - "description": "每次运行发给 AI SRE Agent 的任务提示词。" + "description": "聚合函数使用的列名。" }, - "environment_kind": { - "type": "string", - "description": "运行环境类型。省略或空字符串表示自动选择。", + "column_index": { + "type": "integer", + "description": "聚合函数使用的列下标。" + } + } + }, + "RumDataFieldMeta": { + "type": "object", + "description": "单个返回列的元信息。", + "required": [ + "name", + "type", + "nullable" + ], + "properties": { + "name": { + "type": "string", + "description": "列名。" + }, + "type": { + "type": "string", + "description": "该列的后端数据库类型名称。" + }, + "nullable": { + "type": "boolean", + "description": "该列的值是否可能为 null。" + } + } + }, + "RumDataQueryDefinition": { + "type": "object", + "description": "单个 RUM 数据查询定义。", + "required": [ + "id", + "sql", + "format" + ], + "properties": { + "id": { + "type": "string", + "maxLength": 64, + "description": "调用方提供的查询 ID;响应对象会使用同一值作为 key。" + }, + "sql": { + "type": "string", + "description": "要执行的 RUM SQL 查询。" + }, + "dql": { + "type": "string", + "description": "可选的 RUM DQL 过滤表达式,会和 SQL 校验一起使用。" + }, + "format": { + "type": "string", + "enum": [ + "time_series", + "table" + ], + "description": "输出格式。`table` 返回行数据;`time_series` 返回按时间桶聚合的时序数据。" + }, + "interval": { + "type": "integer", + "format": "int64", + "exclusiveMinimum": 0, + "default": 3600, + "description": "`time_series` 查询的时间桶间隔,单位秒。" + }, + "max_points": { + "type": "integer", + "format": "int64", + "exclusiveMinimum": 0, + "default": 1226, + "description": "`time_series` 查询最多返回的点数。" + }, + "time_zone": { + "type": "string", + "description": "计算时间函数时使用的 IANA 时区名称,例如 `Asia/Shanghai`。" + }, + "search_after_ctx": { + "type": "string", + "description": "上一次表格查询返回的不透明游标,用于继续分页。" + }, + "disable_sampling": { + "type": "boolean", + "description": "为 true 时,请求查询引擎尽可能避免采样。" + } + } + }, + "RumDataQueryOutput": { + "type": "object", + "description": "单个查询的结果。失败的子查询填充 `error`;成功的子查询填充 `data`。", + "properties": { + "error": { + "$ref": "#/components/schemas/DutyError" + }, + "data": { + "$ref": "#/components/schemas/RumDataQueryResult" + } + } + }, + "RumDataQueryRequest": { + "type": "object", + "description": "指定时间范围内的一组 RUM 数据查询。", + "required": [ + "start_time", + "end_time", + "queries" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "查询窗口起始时间,Unix 毫秒时间戳。", + "example": 1712620800000 + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "查询窗口结束时间,Unix 毫秒时间戳。最大跨度 31 天。", + "example": 1712707200000 + }, + "queries": { + "type": "array", + "description": "并发执行的查询列表,允许 1 到 10 个。", + "minItems": 1, + "maxItems": 10, + "items": { + "$ref": "#/components/schemas/RumDataQueryDefinition" + } + } + } + }, + "RumDataQueryResponse": { + "type": "object", + "description": "从请求中的查询 ID 到该查询结果或错误的映射。", + "additionalProperties": { + "$ref": "#/components/schemas/RumDataQueryOutput" + } + }, + "RumDataQueryResult": { + "type": "object", + "description": "单个 RUM 数据查询返回的行数据和元信息。", + "required": [ + "fields", + "values" + ], + "properties": { + "search_after_ctx": { + "type": "string", + "description": "用于继续表格查询分页的不透明游标。" + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumDataFieldMeta" + }, + "description": "返回值矩阵的列元信息。" + }, + "values": { + "type": "array", + "description": "查询返回的行数据。每一行按下标与 `fields` 对齐。", + "items": { + "type": "array", + "items": {} + } + }, + "interval": { + "type": "integer", + "format": "int64", + "description": "时序查询实际使用的时间桶间隔,单位秒。" + }, + "sampling": { + "$ref": "#/components/schemas/RumDataSamplingDecision" + } + } + }, + "RumDataSamplingDecision": { + "type": "object", + "description": "查询引擎使用采样数据时返回的采样元信息。", + "required": [ + "enabled", + "scale_factor" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "是否应用了采样。" + }, + "scale_factor": { + "type": "number", + "description": "将采样计数放大为全量估算值时使用的倍率。" + }, + "selected_tablets": { + "type": "array", + "items": { + "type": "string" + }, + "description": "采样查询选中的存储 tablet。" + }, + "aggregate_funcs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumDataAggregateFunction" + }, + "description": "受采样影响的聚合函数。" + } + } + }, + "RumFacetCountRequest": { + "type": "object", + "description": "分面值分布统计的请求参数。", + "required": [ + "scope", + "facet_key", + "start_time", + "end_time" + ], + "properties": { + "scope": { + "type": "string", + "description": "要查询的 RUM 数据 scope。", + "enum": [ + "session", + "view", + "action", + "error", + "resource", + "long_task", + "vital", + "issue", + "sourcemap" + ] + }, + "facet_key": { + "type": "string", + "description": "要统计值分布的字段键。" + }, + "facet_value": { + "description": "设置后,统计前会先过滤 `facet_key` 等于该值的事件。接受字符串、数字或布尔值。" + }, + "start_time": { + "type": "integer", + "format": "int64", + "description": "时间范围起始,Unix 毫秒时间戳。", + "example": 1712620800000 + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "时间范围结束,Unix 毫秒时间戳。最大跨度 31 天。", + "example": 1712707200000 + }, + "dql": { + "type": "string", + "description": "统计前应用的 RUM DQL 过滤表达式。" + }, + "sql": { + "type": "string", + "description": "仅含 WHERE 子句(无 SELECT)的 SQL 附加过滤条件。" + }, + "limit": { + "type": "integer", + "description": "返回的最大 Top N 值数量。默认 100,最大 100。", + "maximum": 100, + "default": 100 + } + } + }, + "RumFacetCountResponse": { + "type": "object", + "description": "按计数降序排列的 Top N 分面值。", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FacetCountItem" + } + } + } + }, + "RumFacetListRequest": { + "type": "object", + "description": "RUM 字段定义列表的过滤参数。", + "properties": { + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按 RUM 数据 scope 过滤。合法值:`session`、`view`、`action`、`error`、`resource`、`long_task`、`vital`、`issue`、`sourcemap`。" + }, + "is_facet": { + "type": "boolean", + "description": "为 true 时只返回支持分面查询的字段;为 false 或不传时返回所有字段。" + } + } + }, + "RumFacetListResponse": { + "type": "object", + "description": "RUM 字段定义列表。", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumFieldItem" + } + } + } + }, + "RumFieldItem": { + "type": "object", + "description": "一条 RUM 字段定义。", + "required": [ + "account_id", + "field_key", + "field_name", + "group", + "description", + "value_type", + "show_type", + "unit_family", + "unit_name", + "edit_able", + "is_facet", + "enum_values", + "scopes", + "status", + "queryable" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "账户 ID。内置字段为 0。" + }, + "field_key": { + "type": "string", + "description": "唯一字段键,如 `error.type`。" + }, + "field_name": { + "type": "string", + "description": "人类可读的字段名称。" + }, + "group": { + "type": "string", + "description": "字段的展示分组。" + }, + "description": { + "type": "string", + "description": "该字段捕获内容的描述。" + }, + "value_type": { + "type": "string", + "description": "字段值的数据类型。", + "enum": [ + "string", + "number", + "boolean", + "array", + "array", + "array" + ] + }, + "show_type": { + "type": "string", + "description": "在分析 UI 中的展示类型。", + "enum": [ + "list", + "range" + ] + }, + "unit_family": { + "type": "string", + "description": "计量单位族,如 `time`、`bytes`。无量纲字段为空。" + }, + "unit_name": { + "type": "string", + "description": "具体计量单位,如 `millisecond`、`byte`。" + }, + "edit_able": { + "type": "boolean", + "description": "是否为用户可编辑的自定义字段。" + }, + "is_facet": { + "type": "boolean", + "description": "是否支持值分布统计查询。" + }, + "enum_values": { + "type": "array", + "description": "该字段的预定义枚举值。元素类型与 `value_type` 对应:字符串类型为 `string`,数字类型为 `number`,布尔类型为 `boolean`。无固定值集合时为空数组。", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "该字段所属的 RUM scope 列表。" + }, + "status": { + "type": "string", + "description": "字段状态,如 `active`。" + }, + "queryable": { + "type": "boolean", + "description": "是否可在 DQL/SQL 查询中使用。" + } + } + }, + "RumFieldListRequest": { + "type": "object", + "description": "RUM 字段定义列表的过滤参数。", + "properties": { + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按 RUM 数据 scope 过滤。合法值:`session`、`view`、`action`、`error`、`resource`、`long_task`、`vital`、`issue`、`sourcemap`。" + }, + "is_facet": { + "type": "boolean", + "description": "为 true 时只返回支持分面查询的字段;为 false 或不传时返回所有字段。" + } + } + }, + "RumFieldListResponse": { + "type": "object", + "description": "RUM 字段定义列表。", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumFieldItem" + } + } + } + }, + "SourcemapBinaryImage": { + "type": "object", + "description": "崩溃报告中的已加载 binary image。", + "required": [ + "uuid", + "name", + "is_system" + ], + "properties": { + "uuid": { + "type": "string", + "description": "标识 binary 或 dSYM 的 build UUID。" + }, + "name": { + "type": "string", + "description": "Binary image 名称。" + }, + "is_system": { + "type": "boolean", + "description": "是否为操作系统自带 binary。" + }, + "load_address": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + } + ], + "description": "运行时地址。接受 `0x100000000` 这样的十六进制字符串,也接受十进制整数。" + }, + "max_address": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + } + ], + "description": "运行时地址。接受 `0x100000000` 这样的十六进制字符串,也接受十进制整数。" + }, + "arch": { + "type": "string", + "description": "该 binary image 的 CPU 架构。" + } + } + }, + "SourcemapCodeSnippet": { + "type": "object", + "description": "enrich 后栈帧附近的一行源码。", + "required": [ + "line", + "code" + ], + "properties": { + "line": { + "type": "integer", + "description": "源码行号。" + }, + "code": { + "type": "string", + "description": "该行源码内容。" + } + } + }, + "SourcemapEnrichedFrame": { + "allOf": [ + { + "$ref": "#/components/schemas/SourcemapStackFrame" + }, + { + "type": "object", + "required": [ + "converted" + ], + "properties": { + "converted": { + "type": "boolean", + "description": "该栈帧是否成功符号化或反混淆。" + }, + "code_snippets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SourcemapCodeSnippet" + }, + "description": "该栈帧附近的源码片段。" + }, + "original_frame": { + "$ref": "#/components/schemas/SourcemapStackFrame" + }, + "third_party": { + "type": "boolean", + "description": "该栈帧是否来自第三方或系统库。" + } + } + } + ] + }, + "SourcemapStackEnrichRequest": { + "type": "object", + "description": "错误栈 enrich 请求。", + "required": [ + "service", + "version" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "browser", + "android", + "ios", + "miniprogram", + "harmony" + ], + "description": "来源平台。省略时默认按 `browser` 处理。" + }, + "service": { + "type": "string", + "description": "上传 Sourcemap 时使用的应用或服务名称。" + }, + "version": { + "type": "string", + "description": "上传 Sourcemap 时使用的应用版本。" + }, + "stack": { + "type": "string", + "description": "待解析和 enrich 的原始错误栈。" + }, + "near": { + "type": "integer", + "minimum": 1, + "maximum": 20, + "description": "在转换后的栈帧附近返回的有效源码行数。" + }, + "no_cache": { + "type": "boolean", + "description": "跳过缓存的 enrich 结果,主要用于调试。" + }, + "build_id": { + "type": "string", + "description": "Gradle 插件 1.13.0 及以后版本使用的 Android build ID。" + }, + "variant": { + "type": "string", + "description": "旧版 Gradle 插件使用的 Android build variant。" + }, + "arch": { + "type": "string", + "description": "Android NDK 架构,例如 `arm`、`arm64`、`x86` 或 `x64`。" + }, + "source_type": { + "type": "string", + "description": "Android 错误来源类型;native 符号化时配合 `arch` 传入 `ndk`。" + }, + "binary_images": { + "type": "array", + "description": "iOS 崩溃报告中的已加载 binary image 列表。", + "items": { + "$ref": "#/components/schemas/SourcemapBinaryImage" + } + } + } + }, + "SourcemapStackEnrichResponse": { + "type": "object", + "description": "enrich 后的错误栈帧。", + "required": [ + "frames" + ], + "properties": { + "frames": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SourcemapEnrichedFrame" + } + } + } + }, + "SourcemapStackFrame": { + "type": "object", + "description": "跨平台通用的已解析栈帧字段。", + "properties": { + "function": { + "type": "string", + "description": "函数或方法名称。" + }, + "file": { + "type": "string", + "description": "源文件、URL 或模块路径。" + }, + "line": { + "type": "integer", + "description": "行号。" + }, + "column": { + "type": "integer", + "description": "JavaScript 或 Flutter 栈帧中的列号。" + }, + "class_name": { + "type": "string", + "description": "Android Java/Kotlin 类名。" + }, + "method_name": { + "type": "string", + "description": "不带类名前缀的 Android Java/Kotlin 方法名。" + }, + "module": { + "type": "string", + "description": "iOS Swift/Objective-C 模块名。" + }, + "address": { + "type": "string", + "description": "iOS 或 native 内存地址。" + }, + "offset": { + "type": "integer", + "description": "相对函数起始位置的符号偏移。" + }, + "native_address": { + "type": "string", + "description": "Unity IL native 地址。" + } + } + }, + "CreateStatusPageRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "状态页展示名称。", + "maxLength": 255 + }, + "url_name": { + "type": "string", + "description": "URL 安全的状态页路径,在账户和状态页类型内唯一。", + "maxLength": 255 + }, + "type": { + "type": "string", + "description": "状态页可见性类型。", + "enum": [ + "public", + "internal" + ] + }, + "custom_domain": { + "type": "string", + "description": "公开状态页使用的自定义域名。", + "maxLength": 255 + }, + "page_title": { + "type": "string", + "description": "状态页浏览器标题。" + }, + "page_header": { + "type": "string", + "description": "状态页页头内容。" + }, + "page_footer": { + "type": "string", + "description": "状态页页脚内容。" + }, + "date_view": { + "type": "string", + "description": "事件日期展示方式。", + "enum": [ + "calendar", + "list" + ] + }, + "display_uptime_mode": { + "type": "string", + "description": "可用率展示方式。", + "enum": [ + "chart_and_percentage", + "chart", + "none" + ] + }, + "custom_links": { + "type": "array", + "description": "状态页展示的自定义导航链接。", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "contact_info": { + "type": "string", + "description": "联系信息,例如 mailto 或网站 URL。" + }, + "subscription": { + "$ref": "#/components/schemas/StatusPageSubscriptionItem" + } + }, + "required": [ + "name", + "url_name", + "type", + "date_view", + "display_uptime_mode" + ] + }, + "CreateStatusPageResponse": { + "type": "object", + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "创建的状态页 ID。" + }, + "page_name": { + "type": "string", + "description": "创建的状态页名称。" + }, + "page_url_name": { + "type": "string", + "description": "最终分配给状态页的 URL 安全路径。" + } + }, + "required": [ + "page_id", + "page_name", + "page_url_name" + ] + }, + "A2AAgentCreateRequest": { + "type": "object", + "description": "新建 A2A 智能体的注册参数。", + "properties": { + "agent_name": { + "type": "string", + "description": "智能体显示名称。", + "maxLength": 128 + }, + "instructions": { + "type": "string", + "description": "远程智能体的自然语言指令。必填 —— 已弃用的 `description` 字段仍保留以兼容旧客户端,若两者同时传入则必须与 `instructions` 完全一致。", + "maxLength": 2000 + }, + "card_url": { + "type": "string", + "description": "远程智能体卡片的 URL。必须是 host 非空的绝对 `http` 或 `https` URL;可达性由执行环境在运行时验证,创建时不检查。" + }, + "auth_type": { + "type": "string", + "description": "访问远程智能体的认证类型:`none`、`api_key` 或 `bearer`。" + }, + "auth_config": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "认证配置键值对,如 API Key 或 Bearer Token。敏感键(`api_key`、`token`、`client_secret`)的值在返回时会被挖码。" + }, + "streaming": { + "type": "boolean", + "description": "远程智能体是否支持流式响应。" + }, + "team_id": { + "type": "integer", + "description": "团队范围:0 = 账户级;>0 = 团队。在账户级创建需要 owner/admin 角色;创建到某个团队需要真实属于该团队。", + "format": "int64" + }, + "environment_kind": { + "type": "string", + "enum": [ + "", + "byoc" + ], + "description": "执行环境绑定。省略或传空字符串表示自动路由;`byoc` 将智能体固定到 `environment_id` 指定的 Runner。不接受 `cloud` —— 已配置的 A2A 智能体需要持久 Runner,而非一次性云沙箱。" + }, + "environment_id": { + "type": "string", + "description": "BYOC Runner ID。当 `environment_kind=byoc` 时必填;该 Runner 必须属于账户或调用者所属的团队。" + }, + "auth_mode": { + "type": "string", + "description": "认证模式:`shared`(默认)所有用户共享一份凭证;`per_user_secret` 需要 `secret_schema.header_name`;`per_user_oauth` 为每个用户单独进行 OAuth。" + }, + "secret_schema": { + "type": "string", + "description": "JSON 编码的密钥 schema,例如 `{\"header_name\":\"X-Api-Key\"}`;`auth_mode=per_user_secret` 时必填。" + }, + "oauth_metadata": { + "type": "string", + "description": "JSON 编码的 OAuth 元数据;由 `per_user_oauth` 模式的 OAuth 发现流程填充。" + }, + "allow_insecure_oauth_http": { + "type": "boolean", + "description": "允许该智能体使用非回环的 HTTP OAuth 发现/元数据端点,而非强制 HTTPS。默认为 false。" + }, + "allow_insecure_tls_skip_verify": { + "type": "boolean", + "description": "连接到该智能体端点时跳过 TLS 证书验证(自签/私有证书)。默认为 false。" + } + }, + "required": [ + "agent_name", + "instructions", + "card_url" + ] + }, + "A2AAgentCreateResponse": { + "type": "object", + "description": "注册 A2A 智能体的结果。", + "properties": { + "agent_id": { + "type": "string", + "description": "新建智能体的 ID。" + } + }, + "required": [ + "agent_id" + ] + }, + "A2AAgentIDRequest": { + "type": "object", + "description": "按 ID 查找 A2A 智能体。", + "properties": { + "agent_id": { + "type": "string", + "description": "目标智能体 ID。" + } + }, + "required": [ + "agent_id" + ] + }, + "A2AAgentItem": { + "type": "object", + "description": "一个已注册的 A2A(智能体间通信)远程智能体。", + "properties": { + "agent_id": { + "type": "string", + "description": "唯一的 A2A 智能体 ID(前缀 `a2a_`)。" + }, + "account_id": { + "type": "integer", + "description": "所属账户 ID。", + "format": "int64" + }, + "team_id": { + "type": "integer", + "description": "团队范围:0 = 账户级;>0 = 所属团队。", + "format": "int64" + }, + "can_edit": { + "type": "boolean", + "description": "调用者是否可以编辑该智能体。" + }, + "environment_kind": { + "type": "string", + "enum": [ + "", + "byoc" + ], + "description": "执行环境绑定。空字符串表示自动路由;`byoc` 表示固定到 `environment_id` 指定的 Runner。" + }, + "environment_id": { + "type": "string", + "description": "BYOC Runner ID。仅在 `environment_kind=byoc` 时设置,否则为空。" + }, + "agent_name": { + "type": "string", + "description": "智能体显示名称。" + }, + "instructions": { + "type": "string", + "description": "远程智能体的自然语言指令(旧名 `description`)。", + "maxLength": 2000 + }, + "card_url": { + "type": "string", + "description": "远程智能体卡片的 URL。" + }, + "auth_type": { + "type": "string", + "description": "访问远程智能体的认证类型:`none`、`api_key` 或 `bearer`。" + }, + "auth_config": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "认证配置;敏感值(`api_key`、`token`、`client_secret`)会被挖码。" + }, + "streaming": { + "type": "boolean", + "description": "远程智能体是否支持流式响应。" + }, + "status": { + "type": "string", + "description": "智能体状态。", + "enum": [ + "enabled", + "disabled" + ] + }, + "agent_card_name": { + "type": "string", + "description": "从远程卡片解析得到的智能体名称。" + }, + "agent_card_skills": { + "type": "array", + "items": { + "type": "string" + }, + "description": "远程卡片宣告的技能。" + }, + "card_resolve_timeout": { + "type": "integer", + "description": "卡片解析超时时间(秒)。目前恒为 0 —— API 尚未提供设置方式。" + }, + "task_timeout": { + "type": "integer", + "description": "单个任务执行超时时间(秒)。目前恒为 0 —— API 尚未提供设置方式。" + }, + "auth_mode": { + "type": "string", + "description": "认证模式。", + "enum": [ + "shared", + "per_user_secret", + "per_user_oauth" + ] + }, + "secret_schema": { + "type": "string", + "description": "JSON 编码的密钥 schema(per_user_secret 模式)。" + }, + "oauth_metadata": { + "type": "string", + "description": "JSON 编码的 OAuth 元数据(per_user_oauth 模式)。" + }, + "allow_insecure_oauth_http": { + "type": "boolean", + "description": "允许该智能体使用非回环的 HTTP OAuth 发现/元数据端点,而非强制 HTTPS。" + }, + "allow_insecure_tls_skip_verify": { + "type": "boolean", + "description": "连接到该智能体端点时跳过 TLS 证书验证。" + }, + "created_by": { + "type": "integer", + "description": "创建该智能体的成员 ID。", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间。Unix 时间戳(毫秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间。Unix 时间戳(毫秒)。" + } + }, + "required": [ + "agent_id", + "account_id", + "team_id", + "can_edit", + "environment_kind", + "environment_id", + "agent_name", + "instructions", + "card_url", + "auth_type", + "streaming", + "status", + "card_resolve_timeout", + "task_timeout", + "created_by", + "created_at", + "updated_at" + ] + }, + "A2AAgentListRequest": { + "type": "object", + "description": "查询 A2A 智能体列表的分页、范围与搜索过滤参数。", + "properties": { + "offset": { + "type": "integer", + "description": "分页偏移量。", + "default": 0 + }, + "limit": { + "type": "integer", + "description": "页面大小。", + "default": 20 + }, + "scope": { + "type": "string", + "enum": [ + "all", + "account", + "team" + ], + "default": "all", + "description": "可见范围:`all`(账户级加上调用者可见的团队)、`account`(仅账户级)或 `team`(调用者可见团队中的团队级记录)。" + }, + "query": { + "type": "string", + "description": "在智能体名称、指令、卡片 URL、智能体 ID 以及解析得到的卡片名称中进行不区分大小写的子串搜索。", + "maxLength": 128 + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "限定在这些团队 ID 内;留空表示使用调用者可见的团队集合。" + }, + "include_account": { + "type": [ + "boolean", + "null" + ], + "description": "是否包含账户级(team_id=0)记录。默认为 true。" + } + } + }, + "A2AAgentListResponse": { + "type": "object", + "description": "分页的 A2A 智能体列表。", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/A2AAgentItem" + }, + "description": "本页的 A2A 智能体。" + }, + "total": { + "type": "integer", + "description": "符合条件的智能体总数。", + "format": "int64" + } + }, + "required": [ + "items", + "total" + ] + }, + "A2AAgentUpdateRequest": { + "type": "object", + "description": "对 A2A 智能体执行部分更新。字段为 null 或省略时保持不变。", + "properties": { + "agent_id": { + "type": "string", + "description": "目标智能体 ID。" + }, + "agent_name": { + "type": [ + "string", + "null" + ], + "description": "新的显示名称。省略则保持不变。", + "maxLength": 128 + }, + "instructions": { + "type": [ + "string", + "null" + ], + "description": "新的指令。省略则保持不变。已弃用的 `description` 字段仍可传入,若两者同时传入则必须一致。", + "maxLength": 2000 + }, + "card_url": { + "type": [ + "string", + "null" + ], + "description": "新的卡片 URL。省略则保持不变。" + }, + "auth_type": { + "type": [ + "string", + "null" + ], + "description": "新的认证类型。省略则保持不变。" + }, + "auth_config": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "替换认证配置。省略则保持不变。对敏感键回传挖码值(或空字符串)将保留已存储的密钥而非覆盖。" + }, + "streaming": { + "type": [ + "boolean", + "null" + ], + "description": "切换流式支持。省略则保持不变。" + }, + "team_id": { + "type": [ + "integer", + "null" + ], + "description": "重新分配团队范围。省略则保持不变。重新分配需要对目标团队的权限;若团队变更且未同时传入新的环境绑定,则现有 Runner 绑定必须对调用者仍可选,否则更新将被拒绝。", + "format": "int64" + }, + "environment_kind": { + "type": [ + "string", + "null" + ], + "description": "新的执行环境绑定:空字符串表示自动,`byoc` 表示指定 Runner。不接受 `cloud`。省略则保持不变。" + }, + "environment_id": { + "type": [ + "string", + "null" + ], + "description": "新的 BYOC Runner ID。与 `environment_kind=byoc` 一同传入。省略则保持不变。" + }, + "auth_mode": { + "type": [ + "string", + "null" + ], + "description": "新的认证模式:shared、per_user_secret 或 per_user_oauth。变更时会一并重写 secret_schema。" + }, + "secret_schema": { + "type": [ + "string", + "null" + ], + "description": "新的 JSON 密钥 schema。" + }, + "oauth_metadata": { + "type": [ + "string", + "null" + ], + "description": "新的 JSON OAuth 元数据。若 auth_mode 变更但未传入此字段,将被清空。" + }, + "allow_insecure_oauth_http": { + "type": [ + "boolean", + "null" + ], + "description": "切换该智能体的非回环 HTTP OAuth 发现开关。省略则保持不变。" + }, + "allow_insecure_tls_skip_verify": { + "type": [ + "boolean", + "null" + ], + "description": "切换该智能体的 TLS 证书验证跳过开关。省略则保持不变。" + } + }, + "required": [ + "agent_id" + ] + }, + "AutomationRuleCreateRequest": { + "type": "object", + "description": "创建自动化规则。", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "规则名称。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "作用域团队 ID。0 或省略表示个人规则;>0 表示账户下某团队。创建后不可修改。" + }, + "enabled": { + "type": "boolean", + "description": "规则创建后是否启用。API 省略时为 false;Chat/CLI 入口会默认发送 true,除非用户要求禁用。" + }, + "cron_expr": { + "type": "string", + "description": "运行周期。支持 4 段 `hour day month weekday`,会补 `minute=0`;也支持 5 段 `minute hour day month weekday`。分钟必须是固定整数,秒级 6 段不支持。同时设置日期和星期几的 cron 会被拒绝。创建 API 当前要求该字段,即使只启用 HTTP POST trigger,也要提供一个有效 cron 并把 `schedule_trigger_enabled` 设为 false。", + "example": "15 9 * * *" + }, + "timezone": { + "type": "string", + "description": "`cron_expr` 计算所用的 IANA 时区,例如 `Asia/Shanghai`。必须是服务端可加载的合法时区名,非法值会被拒绝。省略时依次回退到调用者的成员时区、账户时区,最后是 UTC。" + }, + "schedule_trigger_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "是否启用 schedule trigger。省略时为 true;HTTP-POST-only 规则应传 false。" + }, + "prompt": { + "type": "string", + "minLength": 1, + "description": "每次运行发给 AI SRE Agent 的任务提示词。" + }, + "environment_kind": { + "type": "string", + "description": "运行环境类型。省略或空字符串表示自动选择。", + "enum": [ + "", + "cloud", + "byoc" + ] + }, + "environment_id": { + "type": "string", + "description": "BYOC Runner ID。仅 `environment_kind=byoc` 时使用。" + }, + "http_post_trigger_enabled": { + "type": "boolean", + "description": "是否创建并启用 HTTP POST trigger。启用时响应里会返回一次性 token。" + }, + "oncall_incident_trigger_enabled": { + "type": "boolean", + "description": "是否启用 On-call 故障触发器。" + }, + "oncall_incident_channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64", + "minimum": 1 + }, + "description": "监听的 On-call 集成 ID 列表;创建或启用该触发器时至少需要一个有效 ID。" + }, + "oncall_incident_severities": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info" + ] + }, + "description": "监听的故障严重程度,支持 Critical、Warning 和 Info;创建或启用该触发器时至少需要一个值。" + } + }, + "required": [ + "name", + "cron_expr", + "prompt" + ] + }, + "AutomationRuleIDRequest": { + "type": "object", + "properties": { + "rule_id": { + "type": "string", + "description": "规则 ID。" + } + }, + "required": [ + "rule_id" + ] + }, + "AutomationRuleItem": { + "type": "object", + "description": "自动化规则。", + "properties": { + "rule_id": { + "type": "string", + "description": "规则 ID。" + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "账户 ID。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "作用域团队 ID;0 表示个人规则。" + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "创建者 person ID。" + }, + "name": { + "type": "string", + "description": "规则名称。" + }, + "enabled": { + "type": "boolean", + "description": "规则是否启用。" + }, + "run_scope": { + "type": "string", + "enum": [ + "person", + "team" + ], + "description": "运行会话作用域。" + }, + "cron_expr": { + "type": "string", + "description": "规范化后的 5 段 cron 表达式。" + }, + "timezone": { + "type": "string", + "description": "`cron_expr` 计算所用的 IANA 时区。该字段上线后创建的规则始终会有值;上线前创建的旧数据可能为空,此时调度仍按 UTC 解析。" + }, + "prompt": { + "type": "string", + "description": "任务提示词。" + }, + "environment_kind": { + "type": "string", + "description": "运行环境类型。省略或空字符串表示自动选择。", + "enum": [ + "", + "cloud", + "byoc" + ] + }, + "environment_id": { + "type": "string", + "description": "BYOC Runner ID。" + }, + "schedule_trigger_id": { + "type": "string", + "description": "Schedule trigger ID。" + }, + "schedule_trigger_enabled": { + "type": "boolean", + "description": "Schedule trigger 是否启用。" + }, + "http_post_trigger_id": { + "type": "string", + "description": "HTTP POST trigger ID。" + }, + "http_post_trigger_url": { + "type": "string", + "description": "HTTP POST 触发路径。" + }, + "http_post_trigger_enabled": { + "type": "boolean", + "description": "HTTP POST trigger 是否启用。" + }, + "oncall_incident_trigger_id": { + "type": "string", + "description": "On-call 故障触发器 ID。" + }, + "oncall_incident_trigger_enabled": { + "type": "boolean", + "description": "是否启用 On-call 故障触发器。" + }, + "oncall_incident_channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64", + "minimum": 1 + }, + "description": "监听的 On-call 集成 ID 列表;创建或启用该触发器时至少需要一个有效 ID。" + }, + "oncall_incident_severities": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info" + ] + }, + "description": "监听的故障严重程度,支持 Critical、Warning 和 Info;创建或启用该触发器时至少需要一个值。" + }, + "http_post_token": { + "type": "string", + "description": "HTTP POST trigger token。只在创建或轮换 token 的响应中返回;请立即保存。" + }, + "can_edit": { + "type": "boolean", + "description": "当调用者可管理该规则时为 true:个人规则仅限创建者;团队规则限账户管理员或规则所属团队成员。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 毫秒。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "更新时间,Unix 毫秒。" + }, + "schedule_next_fire_at_ms": { + "type": "integer", + "format": "int64", + "description": "下一次计划触发时间,Unix 毫秒;0 表示暂无可用的下一次计划触发。" + } + }, + "required": [ + "rule_id", + "account_id", + "team_id", + "owner_id", + "name", + "enabled", + "run_scope", + "cron_expr", + "timezone", + "prompt", + "environment_kind", + "environment_id", + "schedule_trigger_enabled", + "http_post_trigger_enabled", + "can_edit", + "created_at", + "updated_at", + "schedule_next_fire_at_ms", + "oncall_incident_trigger_enabled" + ] + }, + "AutomationRuleListRequest": { + "type": "object", + "description": "列出当前调用者可见的自动化规则。`all` 包含调用者自己的个人规则和可访问团队的团队规则;账户管理员在列表中不可见他人的个人规则。", + "properties": { + "p": { + "type": "integer", + "default": 1, + "description": "页码,从 1 开始。" + }, + "limit": { + "type": "integer", + "default": 20, + "maximum": 100, + "description": "每页数量。" + }, + "scope": { + "type": "string", + "enum": [ + "all", + "personal", + "team" + ], + "description": "作用域过滤:`all`(自己的个人规则 + 可访问团队规则)、`personal` 或 `team`;默认 `all`。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "过滤到这些团队 ID;该字段只会收窄结果,不会扩大访问范围。" + }, + "include_person": { + "type": [ + "boolean", + "null" + ], + "description": "兼容字段;scope 为空且为 false 时等同于 team。" + }, + "enabled": { + "type": [ + "boolean", + "null" + ], + "description": "按启用状态过滤。" + }, + "keyword": { + "type": "string", + "maxLength": 64, + "description": "按名称关键字过滤。" + } + } + }, + "AutomationRuleListResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "总数。" + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AutomationRuleItem" + } + } + }, + "required": [ + "total", + "rules" + ] + }, + "AutomationRuleUpdateRequest": { + "type": "object", + "description": "更新自动化规则。字段省略或传 null 表示不修改。", + "properties": { + "rule_id": { + "type": "string", + "description": "目标规则 ID。" + }, + "name": { + "type": [ + "string", + "null" + ], + "maxLength": 255, + "description": "新规则名称。" + }, + "team_id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "minimum": 0, + "description": "只允许传当前值;创建后 personal / team scope 不可修改。" + }, + "enabled": { + "type": [ + "boolean", + "null" + ], + "description": "是否启用规则。" + }, + "cron_expr": { + "type": [ + "string", + "null" + ], + "description": "运行周期。支持 4 段 `hour day month weekday`,会补 `minute=0`;也支持 5 段 `minute hour day month weekday`。分钟必须是固定整数,秒级 6 段不支持。", + "example": "15 9 * * *" + }, + "timezone": { + "type": [ + "string", + "null" + ], + "description": "更新 `cron_expr` 所用的 IANA 时区。省略或传 null 表示保持当前时区不变。" + }, + "schedule_trigger_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "是否启用 schedule trigger。" + }, + "prompt": { + "type": [ + "string", + "null" + ], + "description": "新的任务提示词。" + }, + "environment_kind": { + "type": [ + "string", + "null" + ], + "description": "运行环境类型。省略或空字符串表示自动选择。", + "enum": [ + "", + "cloud", + "byoc" + ] + }, + "environment_id": { + "type": [ + "string", + "null" + ], + "description": "BYOC Runner ID。" + }, + "http_post_trigger_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "是否启用 HTTP POST trigger。不存在时设为 true 会创建。" + }, + "oncall_incident_trigger_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "是否启用 On-call 故障触发器。" + }, + "oncall_incident_channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64", + "minimum": 1 + }, + "description": "监听的 On-call 集成 ID 列表;创建或启用该触发器时至少需要一个有效 ID。" + }, + "oncall_incident_severities": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info" + ] + }, + "description": "监听的故障严重程度,支持 Critical、Warning 和 Info;创建或启用该触发器时至少需要一个值。" + }, + "rotate_http_post_trigger_token": { + "type": "boolean", + "description": "是否轮换 HTTP POST trigger token。新 token 只会在本次响应中返回。" + } + }, + "required": [ + "rule_id" + ] + }, + "AutomationRunItem": { + "type": "object", + "properties": { + "run_id": { + "type": "string", + "description": "运行 ID。" + }, + "kind": { + "type": "string", + "description": "运行类型。" + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "账户 ID。" + }, + "rule_id": { + "type": "string", + "description": "规则 ID。" + }, + "trigger_kind": { + "type": "string", + "enum": [ + "schedule", + "debug", + "manual", + "http_post", + "oncall_incident" + ], + "description": "触发来源。" + }, + "occurrence_key": { + "type": "string", + "description": "幂等键。" + }, + "status": { + "type": "string", + "enum": [ + "queued", + "running", + "retrying", + "succeeded", + "partial", + "failed", + "skipped", + "abandoned" + ], + "description": "运行状态。" + }, + "attempts": { + "type": "integer", + "description": "尝试次数。" + }, + "started_at": { + "type": "integer", + "format": "int64", + "description": "开始时间,Unix 毫秒。" + }, + "completed_at": { + "type": "integer", + "format": "int64", + "description": "完成时间,Unix 毫秒。0 表示尚未完成。" + }, + "duration_ms": { + "type": "integer", + "format": "int64", + "description": "运行耗时,毫秒。" + }, + "error_code": { + "type": "string", + "description": "错误码。" + }, + "error_message": { + "type": "string", + "description": "错误消息。" + }, + "stats_json": { + "description": "统计 JSON。" + }, + "result_json": { + "description": "结果 JSON。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 毫秒。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "更新时间,Unix 毫秒。" + } + }, + "required": [ + "run_id", + "kind", + "account_id", + "rule_id", + "trigger_kind", + "occurrence_key", + "status", + "attempts", + "started_at", + "completed_at", + "duration_ms", + "created_at", + "updated_at" + ] + }, + "AutomationRunListRequest": { + "type": "object", + "properties": { + "rule_id": { + "type": "string", + "description": "目标规则 ID。" + }, + "p": { + "type": "integer", + "default": 1, + "description": "页码,从 1 开始。" + }, + "limit": { + "type": "integer", + "default": 20, + "maximum": 100, + "description": "每页数量。" + }, + "status": { + "type": "string", + "enum": [ + "queued", + "running", + "retrying", + "succeeded", + "partial", + "failed", + "skipped", + "abandoned" + ], + "description": "运行状态过滤。" + }, + "trigger_kind": { + "type": "string", + "enum": [ + "schedule", + "debug", + "manual", + "http_post", + "oncall_incident" + ], + "description": "触发来源过滤条件。" + }, + "started_after_ms": { + "type": "integer", + "format": "int64", + "description": "开始时间下界,Unix 毫秒。" + }, + "started_before_ms": { + "type": "integer", + "format": "int64", + "description": "开始时间上界,Unix 毫秒。" + } + }, + "required": [ + "rule_id" + ] + }, + "AutomationRunListResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "总数。" + }, + "runs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AutomationRunItem" + } + } + }, + "required": [ + "total", + "runs" + ] + }, + "AutomationRunView": { + "type": "object", + "description": "手动触发所创建运行的引用。", + "properties": { + "run_id": { + "type": "string", + "description": "运行 ID,运行创建后始终会有值。" + }, + "session_id": { + "type": "string", + "description": "本次运行对应的 AI SRE 会话 ID。由于调用只会在会话启动后才返回,因此在 200 响应中始终会有值。" + } + }, + "required": [ + "run_id" + ] + }, + "AutomationTemplateItem": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "模板名称。" + }, + "description": { + "type": "string", + "description": "模板说明。" + }, + "icon": { + "type": "string", + "description": "图标标识。" + }, + "enabled": { + "type": "boolean", + "description": "模板是否可用。" + }, + "prompt": { + "type": "string", + "description": "模板提示词。" + } + }, + "required": [ + "name", + "description", + "icon", + "enabled", + "prompt" + ] + }, + "AutomationTemplateListRequest": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "maxLength": 16, + "description": "模板语言,例如 zh-CN 或 en-US。省略时按请求语言自动选择。" + } + } + }, + "AutomationTemplateListResponse": { + "type": "object", + "properties": { + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AutomationTemplateItem" + } + } + }, + "required": [ + "templates" + ] + }, + "ContextResolvedItem": { + "type": "object", + "description": "该会话三层知识包解析结果的快照。", + "properties": { + "account_pack_id": { + "type": "string", + "description": "解析出的账户级知识包 ID。" + }, + "team_pack_id": { + "type": "string", + "description": "解析出的团队级知识包 ID。" + }, + "incident_id": { + "type": "string", + "description": "作战室来源时绑定的故障 ID。" + }, + "resolved_at_ms": { + "type": "integer", + "format": "int64", + "description": "知识包解析时间,Unix 毫秒时间戳。" + }, + "versions": { + "type": "object", + "additionalProperties": { + "type": "integer" + }, + "description": "各知识包解析版本映射。" + } + }, + "required": [ + "resolved_at_ms" + ] + }, + "EnvironmentBinding": { + "type": "object", + "description": "会话绑定的 runner 或云沙箱。首条消息前为 null。", + "properties": { + "kind": { + "type": "string", + "description": "会话当前绑定的环境类型:`cloud`(托管沙箱)或 `byoc`(自建 runner)。", "enum": [ - "", "cloud", "byoc" ] }, - "environment_id": { + "id": { "type": "string", - "description": "BYOC Runner ID。仅 `environment_kind=byoc` 时使用。" + "description": "环境标识:`cloud` 绑定为云沙箱 ID,`byoc` 绑定为 runner/环境 ID。" }, - "http_post_trigger_enabled": { + "name": { + "type": "string", + "description": "可读的环境名称;cloud 绑定使用默认允许列表时为空。" + }, + "status": { + "type": "string", + "description": "绑定的实时健康状态,按类型分命名空间:BYOC 使用 online/pending/offline/deleted;cloud 使用 available/rebuilding/expired。", + "enum": [ + "online", + "pending", + "offline", + "deleted", + "available", + "rebuilding", + "expired" + ] + } + }, + "required": [ + "kind", + "id" + ] + }, + "EventItem": { + "type": "object", + "description": "单条已持久化的会话事件。content/actions/usage_metadata 携带原始 ADK 信封,请将其视为不透明的结构化负载。", + "properties": { + "event_id": { + "type": "string", + "description": "事件标识。" + }, + "session_id": { + "type": "string", + "description": "所属会话 ID。" + }, + "invocation_id": { + "type": "string", + "description": "标识一轮的 ADK 调用 ID。" + }, + "author": { + "type": "string", + "description": "事件作者(如 user 或智能体名称)。" + }, + "branch": { + "type": "string", + "description": "嵌套智能体的 ADK 分支路径。" + }, + "content": { + "type": "object", + "additionalProperties": true, + "description": "ADK content 信封 {role, parts:[...]}。" + }, + "actions": { + "type": "object", + "additionalProperties": true, + "description": "ADK actions 信封(状态增量、转移、升级)。" + }, + "usage_metadata": { + "type": "object", + "additionalProperties": true, + "description": "单轮 token 用量元数据。" + }, + "partial": { "type": "boolean", - "description": "是否创建并启用 HTTP POST trigger。启用时响应里会返回一次性 token。" + "description": "流式部分分片时为 true。" }, - "oncall_incident_trigger_enabled": { + "turn_complete": { "type": "boolean", - "description": "是否启用 On-call 故障触发器。" + "description": "一轮的终止事件上为 true。" }, - "oncall_incident_channel_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64", - "minimum": 1 - }, - "description": "监听的 On-call 集成 ID 列表;创建或启用该触发器时至少需要一个有效 ID。" + "error_code": { + "type": "string", + "description": "当该事件表示失败时的错误码。" }, - "oncall_incident_severities": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "Critical", - "Warning", - "Info" - ] - }, - "description": "监听的故障严重程度,支持 Critical、Warning 和 Info;创建或启用该触发器时至少需要一个值。" + "error_message": { + "type": "string", + "description": "可读的错误信息(如有)。" + }, + "status": { + "type": "string", + "description": "事件状态。", + "enum": [ + "normal", + "compressed" + ] + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "事件写入时间,Unix 毫秒时间戳。" } }, "required": [ - "name", - "cron_expr", - "prompt" + "event_id", + "session_id", + "partial", + "turn_complete", + "created_at" ] }, - "AutomationRuleUpdateRequest": { + "MCPServerCreateRequest": { "type": "object", - "description": "更新自动化规则。省略字段表示不修改。", + "description": "新建 MCP 服务器的配置。", "properties": { - "rule_id": { + "server_name": { "type": "string", - "description": "目标规则 ID。" + "description": "MCP 服务器名称,在账户内唯一。", + "minLength": 1, + "maxLength": 255 }, - "name": { + "description": { "type": "string", - "maxLength": 255, - "description": "新规则名称。" + "description": "服务器描述。", + "minLength": 1, + "maxLength": 1024 + }, + "transport": { + "type": "string", + "description": "传输协议。", + "enum": [ + "stdio", + "sse", + "streamable-http" + ] + }, + "command": { + "type": "string", + "description": "可执行命令(stdio 传输)。" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "description": "命令参数(stdio 传输)。" + }, + "env": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "环境变量(stdio 传输)。" + }, + "url": { + "type": "string", + "description": "服务器 URL(sse / streamable-http 传输)。" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "HTTP 头(sse / streamable-http)。" + }, + "connect_timeout": { + "type": "integer", + "description": "连接超时,单位秒。0 表示默认(10 秒)。" + }, + "call_timeout": { + "type": "integer", + "description": "工具调用超时,单位秒。0 表示默认(60 秒)。" + }, + "auth_mode": { + "type": "string", + "description": "认证模式:shared(默认)、per_user_secret 或 per_user_oauth。" + }, + "secret_schema": { + "type": "string", + "description": "JSON 密钥 schema;auth_mode=per_user_secret 时必填。" + }, + "oauth_metadata": { + "type": "string", + "description": "JSON OAuth 元数据;为 per_user_oauth 预留。" + }, + "status": { + "type": "string", + "description": "初始状态。", + "enum": [ + "enabled", + "disabled" + ], + "default": "enabled" }, "team_id": { "type": "integer", - "format": "int64", - "minimum": 0, - "description": "只允许传当前值;创建后 personal / team scope 不可修改。" + "description": "团队范围:0 表示账户级;>0 表示团队。", + "format": "int64" }, - "enabled": { - "type": "boolean", - "description": "是否启用规则。" + "environment_kind": { + "type": "string", + "description": "绑定到指定 BYOC 运行器(需同时提供 environment_id)。省略或留空表示自动选择;MCP 服务器不支持 cloud。", + "enum": [ + "byoc" + ] }, - "cron_expr": { + "environment_id": { "type": "string", - "description": "运行周期。支持 4 段 `hour day month weekday`,会补 `minute=0`;也支持 5 段 `minute hour day month weekday`。分钟必须是固定整数,秒级 6 段不支持。创建 API 当前要求该字段,即使只启用 HTTP POST trigger,也要提供一个有效 cron 并把 `schedule_trigger_enabled` 设为 false。", - "example": "15 9 * * *" + "description": "运行器 ID;environment_kind 为 byoc 时必填。" }, - "schedule_trigger_enabled": { + "allow_insecure_oauth_http": { "type": "boolean", - "description": "是否启用 schedule trigger。" + "description": "允许该服务器的 OAuth 令牌交换使用明文 HTTP,仅用于测试,默认 false。" }, - "prompt": { + "allow_insecure_tls_skip_verify": { + "type": "boolean", + "description": "连接该服务器时跳过 TLS 证书校验,仅用于测试,默认 false。" + }, + "source_template_name": { "type": "string", - "description": "新的任务提示词。" + "description": "从连接器模板创建时的市场模板名称。" + } + }, + "required": [ + "server_name", + "description", + "transport" + ] + }, + "MCPServerDeleteRequest": { + "type": "object", + "description": "按 ID 删除 MCP 服务器。", + "properties": { + "server_id": { + "type": "string", + "description": "目标 MCP 服务器 ID。" + } + }, + "required": [ + "server_id" + ] + }, + "MCPServerGetRequest": { + "type": "object", + "description": "按 ID 查询 MCP 服务器。", + "properties": { + "server_id": { + "type": "string", + "description": "目标 MCP 服务器 ID。" + } + }, + "required": [ + "server_id" + ] + }, + "MCPServerItem": { + "type": "object", + "description": "账户下注册的 MCP 服务器(连接器)。", + "properties": { + "server_id": { + "type": "string", + "description": "MCP 服务器唯一 ID(前缀 `mcp_`)。" + }, + "account_id": { + "type": "integer", + "description": "所属账户 ID。", + "format": "int64" + }, + "team_id": { + "type": "integer", + "description": "团队范围:0 表示账户级;>0 表示所属团队。", + "format": "int64" + }, + "can_edit": { + "type": "boolean", + "description": "调用者是否可编辑该服务器。" }, "environment_kind": { "type": "string", - "description": "运行环境类型。省略或空字符串表示自动选择。", + "description": "运行环境类型:留空表示自动选择,`byoc` 表示绑定到指定运行器;MCP 服务器不支持绑定 `cloud`。", "enum": [ "", - "cloud", "byoc" ] }, "environment_id": { "type": "string", - "description": "BYOC Runner ID。" + "description": "environment_kind 为 byoc 时对应的运行器 ID;否则为空。" }, - "http_post_trigger_enabled": { - "type": "boolean", - "description": "是否启用 HTTP POST trigger。不存在时设为 true 会创建。" + "server_name": { + "type": "string", + "description": "MCP 服务器名称,在账户内唯一。" }, - "oncall_incident_trigger_enabled": { - "type": "boolean", - "description": "是否启用 On-call 故障触发器。" + "description": { + "type": "string", + "description": "服务器描述。" }, - "oncall_incident_channel_ids": { + "ai_description": { + "type": "string", + "description": "LLM 生成的描述,存在时优先于 `description`。" + }, + "transport": { + "type": "string", + "description": "传输协议。", + "enum": [ + "stdio", + "sse", + "streamable-http" + ] + }, + "command": { + "type": "string", + "description": "可执行命令(仅 stdio 传输)。" + }, + "args": { "type": "array", "items": { - "type": "integer", - "format": "int64", - "minimum": 1 + "type": "string" }, - "description": "监听的 On-call 集成 ID 列表;创建或启用该触发器时至少需要一个有效 ID。" + "description": "命令参数(stdio 传输)。" }, - "oncall_incident_severities": { + "env": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "环境变量(stdio 传输);密钥值已脱敏。" + }, + "url": { + "type": "string", + "description": "服务器 URL(sse / streamable-http 传输)。" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "HTTP 头(sse / streamable-http);密钥值已脱敏。" + }, + "proxy_url": { + "type": "string", + "description": "访问服务器使用的出站代理 URL。" + }, + "status": { + "type": "string", + "description": "服务器状态。", + "enum": [ + "enabled", + "disabled" + ] + }, + "connect_timeout": { + "type": "integer", + "description": "连接超时,单位秒(0 表示默认 10 秒)。" + }, + "call_timeout": { + "type": "integer", + "description": "工具调用超时,单位秒(0 表示默认 60 秒)。" + }, + "allow_insecure_oauth_http": { + "type": "boolean", + "description": "允许该服务器的 OAuth 令牌交换使用明文 HTTP;仅用于测试。" + }, + "allow_insecure_tls_skip_verify": { + "type": "boolean", + "description": "连接该服务器时跳过 TLS 证书校验;仅用于测试。" + }, + "tools": { "type": "array", "items": { - "type": "string", - "enum": [ - "Critical", - "Warning", - "Info" - ] + "$ref": "#/components/schemas/MCPToolInfo" }, - "description": "监听的故障严重程度,支持 Critical、Warning 和 Info;创建或启用该触发器时至少需要一个值。" + "description": "实时工具列表;由 get/test 接口填充。" + }, + "tool_count": { + "type": "integer", + "description": "实时工具列表的数量。" + }, + "list_error": { + "type": "string", + "description": "实时获取工具列表失败时的错误信息。" + }, + "auth_mode": { + "type": "string", + "description": "认证模式。", + "enum": [ + "shared", + "per_user_secret", + "per_user_oauth" + ] }, - "rotate_http_post_trigger_token": { - "type": "boolean", - "description": "是否轮换 HTTP POST trigger token。新 token 只会在本次响应中返回。" - } - }, - "required": [ - "rule_id" - ] - }, - "AutomationRuleIDRequest": { - "type": "object", - "properties": { - "rule_id": { + "secret_schema": { "type": "string", - "description": "规则 ID。" + "description": "JSON 编码的密钥 schema(per_user_secret 模式)。" + }, + "oauth_metadata": { + "type": "string", + "description": "JSON 编码的 OAuth 元数据(per_user_oauth 模式)。" + }, + "source_template_name": { + "type": "string", + "description": "该连接器安装来源的市场模板名称;自建为空。" + }, + "created_by": { + "type": "integer", + "description": "创建该服务器的成员 ID。", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 毫秒时间戳。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最近更新时间,Unix 毫秒时间戳。" } }, "required": [ - "rule_id" + "server_id", + "account_id", + "team_id", + "can_edit", + "environment_kind", + "environment_id", + "server_name", + "description", + "transport", + "status", + "connect_timeout", + "call_timeout", + "created_by", + "created_at", + "updated_at" ] }, - "AutomationRuleListRequest": { + "MCPServerListRequest": { "type": "object", - "description": "列出当前调用者可见的自动化规则。", + "description": "MCP 服务器列表的分页、范围与搜索过滤条件。", "properties": { "p": { "type": "integer", - "default": 1, - "description": "页码,从 1 开始。" + "description": "页码,从 1 开始。", + "default": 1 }, "limit": { "type": "integer", - "default": 20, - "maximum": 100, - "description": "每页数量。" + "description": "每页数量。", + "default": 20 }, "scope": { "type": "string", + "description": "结果范围:account 仅返回账户级记录,team 仅返回调用者可见的团队级记录,省略则默认为 all(返回两者,仍受 team_ids/include_account 约束)。", "enum": [ "all", - "personal", + "account", "team" - ], - "description": "作用域过滤。默认 all。" + ] + }, + "query": { + "type": "string", + "maxLength": 128, + "description": "对名称、描述、AI 生成描述、服务器 ID、传输协议、URL、命令、市场模板名称进行不区分大小写的子串搜索。" }, "team_ids": { "type": "array", @@ -45621,1526 +47128,1441 @@ "type": "integer", "format": "int64" }, - "description": "额外过滤到这些团队 ID;这是过滤器,不是扩权。" - }, - "include_person": { - "type": [ - "boolean", - "null" - ], - "description": "兼容字段;scope 为空且为 false 时等同于 team。" + "description": "按团队 ID 过滤;为空则使用调用者可见范围。" }, - "enabled": { + "include_account": { "type": [ "boolean", "null" ], - "description": "按启用状态过滤。" - }, - "keyword": { - "type": "string", - "maxLength": 64, - "description": "按名称关键字过滤。" + "description": "是否包含账户级(team_id=0)记录,默认 true。" } } }, - "AutomationRuleListResponse": { + "MCPServerListResponse": { "type": "object", + "description": "分页的 MCP 服务器列表。", "properties": { "total": { "type": "integer", - "format": "int64", - "description": "总数。" + "description": "匹配的服务器总数。", + "format": "int64" }, - "rules": { + "servers": { "type": "array", "items": { - "$ref": "#/components/schemas/AutomationRuleItem" - } + "$ref": "#/components/schemas/MCPServerItem" + }, + "description": "当前页的 MCP 服务器。" } }, "required": [ "total", - "rules" + "servers" ] }, - "AutomationRuleItem": { + "MCPServerStatusRequest": { "type": "object", - "description": "自动化规则。", + "description": "按 ID 启用/禁用 MCP 服务器。", "properties": { - "rule_id": { + "server_id": { "type": "string", - "description": "规则 ID。" - }, - "account_id": { - "type": "integer", - "format": "int64", - "description": "账户 ID。" - }, - "team_id": { - "type": "integer", - "format": "int64", - "description": "作用域团队 ID;0 表示个人规则。" - }, - "owner_id": { - "type": "integer", - "format": "int64", - "description": "创建者 person ID。" + "description": "目标 MCP 服务器 ID。" + } + }, + "required": [ + "server_id" + ] + }, + "MCPServerUpdateRequest": { + "type": "object", + "description": "MCP 服务器的部分更新;省略字段表示不变。", + "properties": { + "server_id": { + "type": "string", + "description": "目标 MCP 服务器 ID。" }, - "name": { + "server_name": { "type": "string", - "description": "规则名称。" + "description": "新名称。", + "minLength": 1, + "maxLength": 255 }, - "enabled": { - "type": "boolean", - "description": "规则是否启用。" + "description": { + "type": "string", + "description": "新描述。", + "minLength": 1, + "maxLength": 1024 }, - "run_scope": { + "transport": { "type": "string", + "description": "传输协议。", "enum": [ - "person", - "team" - ], - "description": "运行会话作用域。" + "stdio", + "sse", + "streamable-http" + ] }, - "cron_expr": { + "command": { "type": "string", - "description": "规范化后的 5 段 cron 表达式。" + "description": "可执行命令(stdio 传输)。" }, - "prompt": { + "args": { + "type": "array", + "items": { + "type": "string" + }, + "description": "命令参数(stdio 传输)。" + }, + "env": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "环境变量(stdio 传输)。" + }, + "url": { "type": "string", - "description": "任务提示词。" + "description": "服务器 URL(sse / streamable-http 传输)。" }, - "environment_kind": { + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "HTTP 头(sse / streamable-http)。" + }, + "connect_timeout": { + "type": "integer", + "description": "连接超时,单位秒。0 表示默认(10 秒)。" + }, + "call_timeout": { + "type": "integer", + "description": "工具调用超时,单位秒。0 表示默认(60 秒)。" + }, + "auth_mode": { "type": "string", - "description": "运行环境类型。省略或空字符串表示自动选择。", - "enum": [ - "", - "cloud", - "byoc" - ] + "description": "认证模式:shared(默认)、per_user_secret 或 per_user_oauth。" }, - "environment_id": { + "secret_schema": { "type": "string", - "description": "BYOC Runner ID。" + "description": "JSON 密钥 schema;auth_mode=per_user_secret 时必填。" }, - "schedule_trigger_id": { + "oauth_metadata": { "type": "string", - "description": "Schedule trigger ID。" + "description": "JSON OAuth 元数据;为 per_user_oauth 预留。" }, - "schedule_trigger_enabled": { - "type": "boolean", - "description": "Schedule trigger 是否启用。" + "team_id": { + "type": [ + "integer", + "null" + ], + "description": "重新分配团队范围:0 表示账户级;>0 表示团队。省略则不变。", + "format": "int64" }, - "http_post_trigger_id": { + "environment_kind": { + "type": [ + "string", + "null" + ], + "description": "重新指定运行器绑定:byoc(需同时提供 environment_id)或空字符串表示重置为自动选择。省略(null)表示保持当前绑定不变。" + }, + "environment_id": { + "type": [ + "string", + "null" + ], + "description": "与 environment_kind=byoc 配对的运行器 ID。省略(null)表示保持当前绑定不变。" + }, + "allow_insecure_oauth_http": { + "type": [ + "boolean", + "null" + ], + "description": "是否允许 OAuth 令牌交换使用明文 HTTP。省略表示不变。" + }, + "allow_insecure_tls_skip_verify": { + "type": [ + "boolean", + "null" + ], + "description": "是否跳过 TLS 证书校验。省略表示不变。" + } + }, + "required": [ + "server_id" + ] + }, + "MCPToolInfo": { + "type": "object", + "description": "MCP 服务器暴露的单个工具的元数据。", + "properties": { + "name": { "type": "string", - "description": "HTTP POST trigger ID。" + "description": "工具名称。" }, - "http_post_trigger_url": { + "description": { "type": "string", - "description": "HTTP POST 触发路径。" + "description": "工具描述。" }, - "http_post_trigger_enabled": { - "type": "boolean", - "description": "HTTP POST trigger 是否启用。" + "input_schema": { + "type": "object", + "additionalProperties": true, + "description": "描述工具输入参数的 JSON Schema。" + } + }, + "required": [ + "name", + "description" + ] + }, + "ManualRunRuleResult": { + "type": "object", + "description": "手动运行一次自动化规则(跳过其计划触发时间)的结果。", + "properties": { + "rule_id": { + "type": "string", + "description": "被运行的规则 ID。" }, - "oncall_incident_trigger_id": { + "trigger_kind": { "type": "string", - "description": "On-call 故障触发器 ID。" + "enum": [ + "manual" + ], + "description": "该操作固定为 manual。" }, - "oncall_incident_trigger_enabled": { - "type": "boolean", - "description": "是否启用 On-call 故障触发器。" + "preflight": { + "$ref": "#/components/schemas/PreflightResult" }, - "oncall_incident_channel_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64", - "minimum": 1 - }, - "description": "监听的 On-call 集成 ID 列表;创建或启用该触发器时至少需要一个有效 ID。" + "run": { + "$ref": "#/components/schemas/AutomationRunView" + } + }, + "required": [ + "rule_id", + "trigger_kind", + "preflight" + ] + }, + "PreflightResult": { + "type": "object", + "description": "在允许发起手动运行前计算出的就绪检查结果。", + "properties": { + "ok": { + "type": "boolean", + "description": "全部就绪检查是否通过。凡是能返回给调用者的响应中该值恒为 true——预检失败会直接返回 400/403 错误,而不是 ok=false 的响应体。" }, - "oncall_incident_severities": { + "checks": { "type": "array", "items": { - "type": "string", - "enum": [ - "Critical", - "Warning", - "Info" - ] + "type": "string" }, - "description": "监听的故障严重程度,支持 Critical、Warning 和 Info;创建或启用该触发器时至少需要一个值。" + "description": "按执行顺序列出的就绪检查项名称。当前固定为:rule_loaded、actor_authorized、app_allowed、runtime_scope_resolved、rule_config_valid。" }, - "http_post_token": { + "scope": { "type": "string", - "description": "HTTP POST trigger token。只在创建或轮换 token 的响应中返回;请立即保存。" - }, - "can_edit": { - "type": "boolean", - "description": "当前调用者是否可管理该规则。" + "enum": [ + "person", + "team" + ], + "description": "本次运行解析出的作用域,与规则的 run_scope 一致。" }, - "created_at": { + "owner_id": { "type": "integer", "format": "int64", - "description": "创建时间,Unix 毫秒。" + "description": "规则所有者 person ID。" }, - "updated_at": { + "team_id": { "type": "integer", "format": "int64", - "description": "更新时间,Unix 毫秒。" + "description": "规则的作用域团队 ID;0 表示个人规则。" }, - "schedule_next_fire_at_ms": { - "type": "integer", - "format": "int64", - "description": "下一次计划触发时间,Unix 毫秒;0 表示暂无可用的下一次计划触发。" + "app_name": { + "type": "string", + "description": "规则所属的 App。当前始终为 ai-sre;手动运行目前仅支持该 App。" + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + }, + "description": "预检过程中给出的非致命警告。没有警告时省略或为空数组。" } }, "required": [ - "rule_id", - "account_id", - "team_id", + "ok", + "checks", + "scope", "owner_id", - "name", - "enabled", - "run_scope", - "cron_expr", - "prompt", - "environment_kind", - "environment_id", - "schedule_trigger_enabled", - "http_post_trigger_enabled", - "can_edit", - "created_at", - "updated_at", - "schedule_next_fire_at_ms", - "oncall_incident_trigger_enabled" + "team_id", + "app_name" ] }, - "AutomationTemplateListRequest": { + "SessionDeleteRequest": { "type": "object", + "description": "按 ID 删除会话。", "properties": { - "locale": { + "session_id": { "type": "string", - "maxLength": 16, - "description": "模板语言,例如 zh-CN 或 en-US。省略时按请求语言自动选择。" - } - } - }, - "AutomationTemplateListResponse": { - "type": "object", - "properties": { - "templates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AutomationTemplateItem" - } + "description": "目标会话 ID。", + "minLength": 1 } }, "required": [ - "templates" + "session_id" ] }, - "AutomationTemplateItem": { + "SessionExportRequest": { "type": "object", + "description": "以流式 NDJSON 导出单个会话的完整事件记录。", "properties": { - "name": { - "type": "string", - "description": "模板名称。" - }, - "description": { - "type": "string", - "description": "模板说明。" - }, - "icon": { + "session_id": { "type": "string", - "description": "图标标识。" + "description": "目标会话 ID。" }, - "enabled": { + "include_subagents": { "type": "boolean", - "description": "模板是否可用。" - }, - "prompt": { - "type": "string", - "description": "模板提示词。" + "description": "为 true 时,每条 subagent_dispatch 行后会跟随子会话的完整事件流,并以其自身的 session_meta 包裹。默认 false。" } }, "required": [ - "name", - "description", - "icon", - "enabled", - "prompt" + "session_id" ] }, - "AutomationRunListRequest": { + "SessionGetRequest": { "type": "object", + "description": "查询单个会话,并返回其最近事件的一页(向更早方向分页)。", "properties": { - "rule_id": { + "session_id": { "type": "string", - "description": "目标规则 ID。" + "description": "目标会话 ID。", + "minLength": 1 }, - "p": { + "share_token": { + "type": "string", + "description": "通过分享链接访问会话时使用的分享令牌;常规账户授权访问时省略。", + "maxLength": 512 + }, + "num_recent_events": { "type": "integer", - "default": 1, - "description": "页码,从 1 开始。" + "description": "旧版每页数量:返回的最近事件数。与 `limit` 同时设置时以 `limit` 为准;0 使用服务端默认值(100)。", + "minimum": 0, + "maximum": 1000 }, "limit": { "type": "integer", - "default": 20, - "maximum": 100, - "description": "每页数量。" - }, - "status": { - "type": "string", - "enum": [ - "queued", - "running", - "retrying", - "succeeded", - "partial", - "failed", - "skipped", - "abandoned" - ], - "description": "运行状态过滤。" + "description": "事件每页数量;优先于 `num_recent_events`。0 使用服务端默认值(100)。", + "minimum": 0, + "maximum": 1000 }, - "trigger_kind": { + "search_after_ctx": { "type": "string", - "enum": [ - "schedule", - "debug", - "manual", - "http_post", - "oncall_incident" - ], - "description": "触发来源过滤条件。" - }, - "started_after_ms": { - "type": "integer", - "format": "int64", - "description": "开始时间下界,Unix 毫秒。" - }, - "started_before_ms": { - "type": "integer", - "format": "int64", - "description": "开始时间上界,Unix 毫秒。" + "description": "上一次响应返回的不透明游标;回传以获取更早的一页。", + "maxLength": 4096 } }, "required": [ - "rule_id" + "session_id" ] }, - "AutomationRunListResponse": { + "SessionGetResponse": { "type": "object", + "description": "一个会话及其事件的一页(向更早方向分页)。", "properties": { - "total": { - "type": "integer", - "format": "int64", - "description": "总数。" + "session": { + "$ref": "#/components/schemas/SessionItem" }, - "runs": { + "events": { "type": "array", "items": { - "$ref": "#/components/schemas/AutomationRunItem" - } + "$ref": "#/components/schemas/EventItem" + }, + "description": "最近事件,按 (created_at, event_id) 升序排列。" + }, + "has_more_older": { + "type": "boolean", + "description": "当本页之外仍有更早的事件时为 true。" + }, + "search_after_ctx": { + "type": "string", + "description": "不透明游标;作为 search_after_ctx 回传以获取更早的一页。has_more_older 为 false 时省略。" + }, + "suggest_init": { + "type": "boolean", + "description": "账户级引导标志:当账户在任何范围内都没有知识包时为 true;并非该会话独有的属性。" } }, "required": [ - "total", - "runs" + "session", + "events", + "has_more_older", + "suggest_init" ] }, - "AutomationRunItem": { + "SessionItem": { "type": "object", + "description": "单条智能体会话记录。", "properties": { - "run_id": { + "session_id": { "type": "string", - "description": "运行 ID。" + "description": "会话标识。" }, - "kind": { + "parent_session_id": { "type": "string", - "description": "运行类型。" + "description": "子智能体(子)会话的父会话 ID;否则为空。" }, - "account_id": { - "type": "integer", - "format": "int64", - "description": "账户 ID。" + "session_name": { + "type": "string", + "description": "会话标题;未命名会话可能为空。" }, - "rule_id": { + "app_name": { "type": "string", - "description": "规则 ID。" + "description": "拥有该会话的智能体应用。" }, - "trigger_kind": { + "entry_kind": { "type": "string", + "description": "创建该会话的入口来源。", "enum": [ - "schedule", - "debug", - "manual", - "http_post", - "oncall_incident" - ], - "description": "触发来源。" + "web", + "im", + "api", + "automation", + "subagent" + ] }, - "occurrence_key": { + "person_id": { "type": "string", - "description": "幂等键。" + "description": "创建者人员 ID。" }, - "status": { + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID;0 表示未绑定团队。创建后不可变更。" + }, + "team_name": { + "type": "string", + "description": "解析出的团队名称;未绑定或团队已删除时为空。" + }, + "is_mine": { + "type": "boolean", + "description": "当该会话由调用者创建时为 true。" + }, + "can_view": { + "type": "boolean", + "description": "调用者可查看此会话时为 true。" + }, + "can_continue": { + "type": "boolean", + "description": "调用者可在此会话中继续发起新轮次时为 true。" + }, + "can_manage": { + "type": "boolean", + "description": "当调用者可重命名/归档/删除该会话时为 true;个人会话仅创建者可管理,团队会话允许创建者、账户管理员或团队成员管理。" + }, + "can_fork": { + "type": "boolean", + "description": "调用者可从此会话创建分支时为 true。" + }, + "access_source": { "type": "string", + "description": "调用者获得该会话访问权限的方式;未解析到访问来源时省略。", "enum": [ - "queued", - "running", - "retrying", - "succeeded", - "partial", - "failed", - "skipped", - "abandoned" - ], - "description": "运行状态。" + "owner", + "team_member", + "manager", + "share_link" + ] }, - "attempts": { - "type": "integer", - "description": "尝试次数。" + "share_enabled": { + "type": "boolean", + "description": "会话的分享链接处于启用状态时为 true。" }, - "started_at": { + "share_version": { "type": "integer", "format": "int64", - "description": "开始时间,Unix 毫秒。" + "description": "分享链接的版本号;撤销分享时会递增。" }, - "completed_at": { + "shared_at": { "type": "integer", "format": "int64", - "description": "完成时间,Unix 毫秒。0 表示尚未完成。" + "description": "最近一次启用分享的时间,Unix 毫秒时间戳;从未分享时为 0。" }, - "duration_ms": { + "shared_by": { "type": "integer", "format": "int64", - "description": "运行耗时,毫秒。" + "description": "最近一次启用分享的人员 ID;从未分享时为 0。" }, - "error_code": { - "type": "string", - "description": "错误码。" - }, - "error_message": { + "status": { "type": "string", - "description": "错误消息。" - }, - "stats_json": { - "description": "统计 JSON。" + "description": "生命周期状态。", + "enum": [ + "enabled", + "deleted" + ] }, - "result_json": { - "description": "结果 JSON。" + "incognito": { + "type": "boolean", + "description": "无痕(不持久化记忆)会话时为 true。" }, "created_at": { "type": "integer", "format": "int64", - "description": "创建时间,Unix 毫秒。" + "description": "会话创建时间,Unix 毫秒时间戳。" }, "updated_at": { "type": "integer", "format": "int64", - "description": "更新时间,Unix 毫秒。" - } - }, - "required": [ - "run_id", - "kind", - "account_id", - "rule_id", - "trigger_kind", - "occurrence_key", - "status", - "attempts", - "started_at", - "completed_at", - "duration_ms", - "created_at", - "updated_at" - ] - }, - "FacetCountItem": { - "type": "object", - "description": "一个分面值及其出现次数。", - "required": [ - "facet_value", - "count" - ], - "properties": { - "facet_value": { - "description": "分面值,类型与字段的 `value_type` 一致。" - }, - "count": { - "type": "integer", - "format": "int64", - "description": "该时间范围内具有此分面值的事件数量。", - "example": 1523 - } - } - }, - "RumDataAggregateFunction": { - "type": "object", - "description": "采样引擎使用的聚合函数元信息。", - "required": [ - "type", - "column_name", - "column_index" - ], - "properties": { - "type": { - "type": "string", - "description": "聚合函数类型。" + "description": "会话最近更新时间,Unix 毫秒时间戳。" }, - "column_name": { + "template_staging_round_id": { "type": "string", - "description": "聚合函数使用的列名。" + "description": "当前 save→validate 轮次 ID(仅 template-assistant);否则为空。" }, - "column_index": { - "type": "integer", - "description": "聚合函数使用的列下标。" - } - } - }, - "RumDataFieldMeta": { - "type": "object", - "description": "单个返回列的元信息。", - "required": [ - "name", - "type", - "nullable" - ], - "properties": { - "name": { - "type": "string", - "description": "列名。" + "state": { + "type": "object", + "additionalProperties": true, + "description": "原始会话状态包(会话级键)。为空时省略。" }, - "type": { - "type": "string", - "description": "该列的后端数据库类型名称。" + "bound_environment": { + "$ref": "#/components/schemas/EnvironmentBinding" }, - "nullable": { - "type": "boolean", - "description": "该列的值是否可能为 null。" - } - } - }, - "RumDataQueryDefinition": { - "type": "object", - "description": "单个 RUM 数据查询定义。", - "required": [ - "id", - "sql", - "format" - ], - "properties": { - "id": { - "type": "string", - "maxLength": 64, - "description": "调用方提供的查询 ID;响应对象会使用同一值作为 key。" + "context_resolved": { + "$ref": "#/components/schemas/ContextResolvedItem" }, - "sql": { - "type": "string", - "description": "要执行的 RUM SQL 查询。" + "token_usage": { + "$ref": "#/components/schemas/SessionTokenUsage" }, - "dql": { - "type": "string", - "description": "可选的 RUM DQL 过滤表达式,会和 SQL 校验一起使用。" + "current_context_tokens": { + "type": "integer", + "format": "int64", + "description": "截至最近一轮的 LLM 上下文窗口的 token 数。0 表示尚无已完成的轮次。" }, - "format": { - "type": "string", - "enum": [ - "time_series", - "table" - ], - "description": "输出格式。`table` 返回行数据;`time_series` 返回按时间桶聚合的时序数据。" + "context_window": { + "type": "integer", + "format": "int64", + "description": "所绑定模型的最大上下文 token 数。0 表示未知。" }, - "interval": { + "archived_at": { "type": "integer", "format": "int64", - "exclusiveMinimum": 0, - "default": 3600, - "description": "`time_series` 查询的时间桶间隔,单位秒。" + "description": "归档时间,Unix 毫秒时间戳;0 表示未归档。" }, - "max_points": { + "pinned_at": { "type": "integer", "format": "int64", - "exclusiveMinimum": 0, - "default": 1226, - "description": "`time_series` 查询最多返回的点数。" + "description": "调用者的个人置顶时间,Unix 毫秒时间戳;0 表示未置顶。" }, - "time_zone": { - "type": "string", - "description": "计算时间函数时使用的 IANA 时区名称,例如 `Asia/Shanghai`。" + "last_event_at": { + "type": "integer", + "format": "int64", + "description": "最近一条助手侧事件的时间,Unix 毫秒时间戳。" }, - "search_after_ctx": { - "type": "string", - "description": "上一次表格查询返回的不透明游标,用于继续分页。" + "is_running": { + "type": "boolean", + "description": "当该会话当前有正在进行的智能体轮次时为 true。" }, - "disable_sampling": { + "has_unread": { "type": "boolean", - "description": "为 true 时,请求查询引擎尽可能避免采样。" - } - } - }, - "RumDataQueryOutput": { - "type": "object", - "description": "单个查询的结果。失败的子查询填充 `error`;成功的子查询填充 `data`。", - "properties": { - "error": { - "$ref": "#/components/schemas/DutyError" + "description": "当存在调用者尚未查看的助手输出时为 true。" }, - "data": { - "$ref": "#/components/schemas/RumDataQueryResult" - } - } - }, - "RumDataQueryRequest": { - "type": "object", - "description": "指定时间范围内的一组 RUM 数据查询。", - "required": [ - "start_time", - "end_time", - "queries" - ], - "properties": { - "start_time": { + "current_turn_started_at": { "type": "integer", "format": "int64", - "description": "查询窗口起始时间,Unix 毫秒时间戳。", - "example": 1712620800000 + "description": "本轮(当前或最近一轮)开始时间,Unix 毫秒时间戳;尚未开始任何轮次时为 0。" }, - "end_time": { + "current_turn_active_ms": { "type": "integer", "format": "int64", - "description": "查询窗口结束时间,Unix 毫秒时间戳。最大跨度 31 天。", - "example": 1712707200000 + "description": "本轮(当前或最近一轮)的实际工作时长(毫秒),不含等待 ask_user 的时间;每次新轮次开始时重置为 0。" }, - "queries": { - "type": "array", - "description": "并发执行的查询列表,允许 1 到 10 个。", - "minItems": 1, - "maxItems": 10, - "items": { - "$ref": "#/components/schemas/RumDataQueryDefinition" - } + "current_turn_wait_ms": { + "type": "integer", + "format": "int64", + "description": "当前轮次累计的 ask_user 人工等待时长(毫秒);每次新轮次开始时重置为 0。" + }, + "current_turn_tokens": { + "type": "integer", + "format": "int64", + "description": "当前进行中轮次的 token 总数(输入+输出+推理),涵盖父会话及其所有子智能体;仅由 session/get 在会话运行时计算,session/list 响应及空闲时恒为 0。" } - } - }, - "RumDataQueryResponse": { - "type": "object", - "description": "从请求中的查询 ID 到该查询结果或错误的映射。", - "additionalProperties": { - "$ref": "#/components/schemas/RumDataQueryOutput" - } + }, + "required": [ + "session_id", + "session_name", + "app_name", + "person_id", + "team_id", + "is_mine", + "can_view", + "can_continue", + "can_manage", + "can_fork", + "share_enabled", + "share_version", + "shared_at", + "shared_by", + "status", + "incognito", + "created_at", + "updated_at", + "current_context_tokens", + "context_window", + "archived_at", + "pinned_at", + "is_running", + "has_unread", + "current_turn_started_at", + "current_turn_active_ms", + "current_turn_wait_ms", + "current_turn_tokens" + ] }, - "RumDataQueryResult": { + "SessionListRequest": { "type": "object", - "description": "单个 RUM 数据查询返回的行数据和元信息。", - "required": [ - "fields", - "values" - ], + "description": "查询智能体会话列表的过滤条件。`all` 表示调用者自己的个人会话和可访问团队的团队会话;账户管理员不可见他人的个人会话。", "properties": { - "search_after_ctx": { + "app_name": { "type": "string", - "description": "用于继续表格查询分页的不透明游标。" - }, - "fields": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RumDataFieldMeta" - }, - "description": "返回值矩阵的列元信息。" + "description": "要查询其会话的智能体应用。", + "enum": [ + "ask-ai", + "support", + "support-website", + "support-flashcat", + "ai-sre", + "template-assistant", + "swe" + ] }, - "values": { - "type": "array", - "description": "查询返回的行数据。每一行按下标与 `fields` 对齐。", - "items": { - "type": "array", - "items": {} - } + "p": { + "type": "integer", + "description": "页码,从 1 开始。", + "default": 1, + "minimum": 1 }, - "interval": { + "limit": { "type": "integer", - "format": "int64", - "description": "时序查询实际使用的时间桶间隔,单位秒。" + "description": "每页数量,1–100。", + "minimum": 1, + "maximum": 100, + "default": 20 }, - "sampling": { - "$ref": "#/components/schemas/RumDataSamplingDecision" - } - } - }, - "RumDataSamplingDecision": { - "type": "object", - "description": "查询引擎使用采样数据时返回的采样元信息。", - "required": [ - "enabled", - "scale_factor" - ], - "properties": { - "enabled": { + "orderby": { + "type": "string", + "description": "排序字段。", + "enum": [ + "created_at", + "updated_at" + ] + }, + "asc": { "type": "boolean", - "description": "是否应用了采样。" + "description": "为 true 时升序;仅在设置 `orderby` 时生效。" }, - "scale_factor": { - "type": "number", - "description": "将采样计数放大为全量估算值时使用的倍率。" + "include_subagent_sessions": { + "type": "boolean", + "description": "是否在列表中包含子智能体派生的会话。" }, - "selected_tablets": { + "keyword": { + "type": "string", + "description": "按会话名称关键字过滤。", + "maxLength": 64 + }, + "scope": { + "type": "string", + "description": "可见范围:`all`(自己的个人会话 + 可访问团队会话)、`personal` 或 `team`;默认 `all`。", + "enum": [ + "all", + "personal", + "team" + ] + }, + "team_ids": { "type": "array", "items": { - "type": "string" + "type": "integer", + "format": "int64" }, - "description": "采样查询选中的存储 tablet。" + "description": "可选的团队过滤;与 `scope` 取交集,且不会扩大访问范围。" }, - "aggregate_funcs": { + "entry_kinds": { "type": "array", "items": { - "$ref": "#/components/schemas/RumDataAggregateFunction" + "type": "string", + "enum": [ + "web", + "im", + "api", + "automation" + ] }, - "description": "受采样影响的聚合函数。" + "description": "仅返回由这些入口产生的会话;为空则返回所有类型。" + }, + "status": { + "type": "string", + "description": "归档分桶:active(默认)返回未归档,archived 返回已归档,all 返回全部。", + "enum": [ + "active", + "archived", + "all" + ] } - } + }, + "required": [ + "app_name" + ] }, - "RumFacetCountRequest": { + "SessionListResponse": { "type": "object", - "description": "分面值分布统计的请求参数。", - "required": [ - "scope", - "facet_key", - "start_time", - "end_time" - ], + "description": "一页智能体会话。", "properties": { - "scope": { - "type": "string", - "description": "要查询的 RUM 数据 scope。", - "enum": [ - "session", - "view", - "action", - "error", - "resource", - "long_task", - "vital", - "issue", - "sourcemap" - ] - }, - "facet_key": { - "type": "string", - "description": "要统计值分布的字段键。" + "total": { + "type": "integer", + "format": "int64", + "description": "匹配过滤条件的会话总数(忽略分页)。" }, - "facet_value": { - "description": "设置后,统计前会先过滤 `facet_key` 等于该值的事件。接受字符串、数字或布尔值。" + "sessions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionItem" + }, + "description": "当前页的会话。" }, - "start_time": { + "suggest_init": { + "type": "boolean", + "description": "账户级引导标志:当账户在任何范围内都没有知识包时为 true;与本次调用的过滤条件无关。" + } + }, + "required": [ + "total", + "sessions", + "suggest_init" + ] + }, + "SessionTokenUsage": { + "type": "object", + "description": "跨所有轮次的会话级 token 累计汇总。账户计费的权威来源。", + "properties": { + "input_tokens": { "type": "integer", "format": "int64", - "description": "时间范围起始,Unix 毫秒时间戳。", - "example": 1712620800000 + "description": "提示(输入)token 总数,含缓存部分。" }, - "end_time": { + "cached_tokens": { "type": "integer", "format": "int64", - "description": "时间范围结束,Unix 毫秒时间戳。最大跨度 31 天。", - "example": 1712707200000 - }, - "dql": { - "type": "string", - "description": "统计前应用的 RUM DQL 过滤表达式。" + "description": "input_tokens 中由提示缓存命中的部分。" }, - "sql": { - "type": "string", - "description": "仅含 WHERE 子句(无 SELECT)的 SQL 附加过滤条件。" + "output_tokens": { + "type": "integer", + "format": "int64", + "description": "生成(输出)token 总数。" }, - "limit": { + "reasoning_tokens": { "type": "integer", - "description": "返回的最大 Top N 值数量。默认 100,最大 100。", - "maximum": 100, - "default": 100 + "format": "int64", + "description": "推理/思考 token 总数。" } - } - }, - "RumFacetCountResponse": { - "type": "object", - "description": "按计数降序排列的 Top N 分面值。", + }, "required": [ - "items" - ], - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FacetCountItem" - } - } - } + "input_tokens", + "cached_tokens", + "output_tokens", + "reasoning_tokens" + ] }, - "RumFacetListRequest": { + "SkillDeleteRequest": { "type": "object", - "description": "RUM 字段定义列表的过滤参数。", + "description": "按 ID 删除技能。", "properties": { - "scopes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "按 RUM 数据 scope 过滤。合法值:`session`、`view`、`action`、`error`、`resource`、`long_task`、`vital`、`issue`、`sourcemap`。" - }, - "is_facet": { - "type": "boolean", - "description": "为 true 时只返回支持分面查询的字段;为 false 或不传时返回所有字段。" + "skill_id": { + "type": "string", + "description": "目标技能 ID。" } - } + }, + "required": [ + "skill_id" + ] }, - "RumFacetListResponse": { + "SkillGetRequest": { "type": "object", - "description": "RUM 字段定义列表。", - "required": [ - "items" - ], + "description": "按 ID 查询技能。", "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RumFieldItem" - } + "skill_id": { + "type": "string", + "description": "目标技能 ID。" } - } + }, + "required": [ + "skill_id" + ] }, - "RumFieldItem": { + "SkillItem": { "type": "object", - "description": "一条 RUM 字段定义。", - "required": [ - "account_id", - "field_key", - "field_name", - "group", - "description", - "value_type", - "show_type", - "unit_family", - "unit_name", - "edit_able", - "is_facet", - "enum_values", - "scopes", - "status", - "queryable" - ], + "description": "AI SRE 技能 —— 智能体可加载的 SKILL.md 打包资源。", "properties": { + "skill_id": { + "type": "string", + "description": "技能唯一 ID(前缀 `skill_`)。" + }, "account_id": { "type": "integer", - "format": "int64", - "description": "账户 ID。内置字段为 0。" - }, - "field_key": { - "type": "string", - "description": "唯一字段键,如 `error.type`。" + "description": "所属账户 ID。", + "format": "int64" }, - "field_name": { - "type": "string", - "description": "人类可读的字段名称。" + "team_id": { + "type": "integer", + "description": "团队范围:0 表示账户级;>0 表示所属团队。", + "format": "int64" }, - "group": { + "skill_name": { "type": "string", - "description": "字段的展示分组。" + "description": "技能名称,在账户内唯一。" }, "description": { "type": "string", - "description": "该字段捕获内容的描述。" - }, - "value_type": { - "type": "string", - "description": "字段值的数据类型。", - "enum": [ - "string", - "number", - "boolean", - "array", - "array", - "array" - ] + "description": "来自 SKILL.md frontmatter 的可读描述。" }, - "show_type": { + "description_en": { "type": "string", - "description": "在分析 UI 中的展示类型。", - "enum": [ - "list", - "range" - ] + "description": "可选的英文描述。英文语言环境下的界面响应优先使用该字段而非 `description`;当 `description` 被本地化展示时,技能目录也会用它作为稳定的选型信号。" }, - "unit_family": { + "content": { "type": "string", - "description": "计量单位族,如 `time`、`bytes`。无量纲字段为空。" + "description": "完整的 SKILL.md 内容;列表响应中省略。" }, - "unit_name": { + "version": { "type": "string", - "description": "具体计量单位,如 `millisecond`、`byte`。" - }, - "edit_able": { - "type": "boolean", - "description": "是否为用户可编辑的自定义字段。" - }, - "is_facet": { - "type": "boolean", - "description": "是否支持值分布统计查询。" + "description": "frontmatter 中的技能版本。" }, - "enum_values": { + "tags": { "type": "array", - "description": "该字段的预定义枚举值。元素类型与 `value_type` 对应:字符串类型为 `string`,数字类型为 `number`,布尔类型为 `boolean`。无固定值集合时为空数组。", "items": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - } + "type": "string" + }, + "description": "从 frontmatter 解析的标签。" }, - "scopes": { + "author": { + "type": "string", + "description": "技能作者。" + }, + "license": { + "type": "string", + "description": "技能许可证。" + }, + "tools": { "type": "array", "items": { "type": "string" }, - "description": "该字段所属的 RUM scope 列表。" + "description": "所需工具(内置或 `mcp:server/tool`)。" + }, + "s3_key": { + "type": "string", + "description": "技能压缩包在对象存储中的 key。" + }, + "checksum": { + "type": "string", + "description": "技能压缩包的 SHA-256 校验和。" }, "status": { "type": "string", - "description": "字段状态,如 `active`。" + "description": "技能状态。已删除的技能不会出现在任何 API 响应中,因此只会返回这两种状态。", + "enum": [ + "enabled", + "disabled" + ] }, - "queryable": { + "created_by": { + "type": "integer", + "description": "创建该技能的成员 ID。", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 毫秒时间戳。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最近更新时间,Unix 毫秒时间戳。" + }, + "can_edit": { "type": "boolean", - "description": "是否可在 DQL/SQL 查询中使用。" + "description": "调用者是否可编辑该技能。" + }, + "source_template_name": { + "type": "string", + "description": "该技能安装来源的市场模板名称;自建技能为空。" + }, + "source_template_version": { + "type": "string", + "description": "安装时的模板版本。" + }, + "update_available": { + "type": "boolean", + "description": "当市场存在更新版本时为 true。" + }, + "is_modified": { + "type": "boolean", + "description": "当市场来源技能被本地修改时为 true(自动更新将跳过)。" + }, + "created": { + "type": "boolean", + "description": "仅在“从会话安装”响应中出现:true 表示新建,false 表示原地更新。" } - } + }, + "required": [ + "skill_id", + "account_id", + "team_id", + "skill_name", + "description", + "status", + "created_by", + "created_at", + "updated_at", + "can_edit", + "update_available", + "is_modified" + ] }, - "RumFieldListRequest": { + "SkillListRequest": { "type": "object", - "description": "RUM 字段定义列表的过滤参数。", + "description": "技能列表的分页、搜索与团队过滤条件。", "properties": { - "scopes": { + "p": { + "type": "integer", + "description": "页码,从 1 开始。", + "default": 1 + }, + "limit": { + "type": "integer", + "description": "每页数量。", + "default": 20 + }, + "scope": { + "type": "string", + "description": "将结果限制为 `all`(默认)、仅 `account`(team_id=0)、或仅 `team`(排除账户级记录);设置后会覆盖 `include_account`。", + "enum": [ + "all", + "account", + "team" + ] + }, + "query": { + "type": "string", + "description": "跨技能名称、描述、英文描述、技能 ID、市场来源模板名称与作者的全文搜索。", + "maxLength": 128 + }, + "team_ids": { "type": "array", "items": { - "type": "string" + "type": "integer", + "format": "int64" }, - "description": "按 RUM 数据 scope 过滤。合法值:`session`、`view`、`action`、`error`、`resource`、`long_task`、`vital`、`issue`、`sourcemap`。" + "description": "按团队 ID 过滤;为空则使用调用者可见范围。" }, - "is_facet": { - "type": "boolean", - "description": "为 true 时只返回支持分面查询的字段;为 false 或不传时返回所有字段。" + "include_account": { + "type": [ + "boolean", + "null" + ], + "description": "是否包含账户级(team_id=0)记录,默认 true。当 `scope` 为 `account` 或 `team` 时该字段会被忽略。" } } }, - "RumFieldListResponse": { + "SkillListResponse": { "type": "object", - "description": "RUM 字段定义列表。", - "required": [ - "items" - ], + "description": "分页的技能列表。", "properties": { - "items": { + "total": { + "type": "integer", + "description": "匹配的技能总数。", + "format": "int64" + }, + "skills": { "type": "array", "items": { - "$ref": "#/components/schemas/RumFieldItem" - } + "$ref": "#/components/schemas/SkillItem" + }, + "description": "当前页的技能。" } - } + }, + "required": [ + "total", + "skills" + ] }, - "SourcemapBinaryImage": { + "SkillStatusRequest": { "type": "object", - "description": "崩溃报告中的已加载 binary image。", - "required": [ - "uuid", - "name", - "is_system" - ], + "description": "按 ID 启用/禁用技能。", "properties": { - "uuid": { - "type": "string", - "description": "标识 binary 或 dSYM 的 build UUID。" - }, - "name": { - "type": "string", - "description": "Binary image 名称。" - }, - "is_system": { - "type": "boolean", - "description": "是否为操作系统自带 binary。" - }, - "load_address": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer", - "format": "int64" - } - ], - "description": "运行时地址。接受 `0x100000000` 这样的十六进制字符串,也接受十进制整数。" - }, - "max_address": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer", - "format": "int64" - } - ], - "description": "运行时地址。接受 `0x100000000` 这样的十六进制字符串,也接受十进制整数。" - }, - "arch": { + "skill_id": { "type": "string", - "description": "该 binary image 的 CPU 架构。" + "description": "目标技能 ID。" } - } + }, + "required": [ + "skill_id" + ] }, - "SourcemapCodeSnippet": { + "SkillUpdateRequest": { "type": "object", - "description": "enrich 后栈帧附近的一行源码。", - "required": [ - "line", - "code" - ], + "description": "可编辑的技能元数据。", "properties": { - "line": { - "type": "integer", - "description": "源码行号。" + "skill_id": { + "type": "string", + "description": "目标技能 ID。" }, - "code": { + "description": { "type": "string", - "description": "该行源码内容。" - } - } - }, - "SourcemapEnrichedFrame": { - "allOf": [ - { - "$ref": "#/components/schemas/SourcemapStackFrame" + "description": "新的描述,不能包含 `<` 或 `>`。传入空字符串不会清空当前值 —— 该字段无法用于清空描述。", + "maxLength": 1024 }, - { - "type": "object", - "required": [ - "converted" + "description_en": { + "type": [ + "string", + "null" ], - "properties": { - "converted": { - "type": "boolean", - "description": "该栈帧是否成功符号化或反混淆。" - }, - "code_snippets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SourcemapCodeSnippet" - }, - "description": "该栈帧附近的源码片段。" - }, - "original_frame": { - "$ref": "#/components/schemas/SourcemapStackFrame" - }, - "third_party": { - "type": "boolean", - "description": "该栈帧是否来自第三方或系统库。" - } - } + "description": "新的英文描述,不能包含 `<` 或 `>`。省略表示不变;传入空字符串可显式清空。", + "maxLength": 1024 + }, + "team_id": { + "type": [ + "integer", + "null" + ], + "description": "重新分配团队范围:0 表示账户级;>0 表示团队。省略则不变。", + "format": "int64" } + }, + "required": [ + "skill_id" ] }, - "SourcemapStackEnrichRequest": { + "SkillUploadRequest": { "type": "object", - "description": "错误栈 enrich 请求。", - "required": [ - "service", - "version" - ], + "description": "上传技能压缩包的 multipart 表单。", "properties": { - "type": { - "type": "string", - "enum": [ - "browser", - "android", - "ios", - "miniprogram", - "harmony" - ], - "description": "来源平台。省略时默认按 `browser` 处理。" - }, - "service": { - "type": "string", - "description": "上传 Sourcemap 时使用的应用或服务名称。" - }, - "version": { - "type": "string", - "description": "上传 Sourcemap 时使用的应用版本。" - }, - "stack": { + "file": { "type": "string", - "description": "待解析和 enrich 的原始错误栈。" + "format": "binary", + "description": "技能压缩包(.skill / .zip / .tar.gz / .tgz),最大 100MB;超限文件会在读取正文前即被拒绝。" }, - "near": { + "team_id": { "type": "integer", - "minimum": 1, - "maximum": 20, - "description": "在转换后的栈帧附近返回的有效源码行数。" + "description": "新建/upsert 技能的团队范围:0 表示账户级。通过 `skill_id` 定向替换时会忽略该字段。", + "format": "int64" }, - "no_cache": { + "replace": { "type": "boolean", - "description": "跳过缓存的 enrich 结果,主要用于调试。" - }, - "build_id": { - "type": "string", - "description": "Gradle 插件 1.13.0 及以后版本使用的 Android build ID。" - }, - "variant": { - "type": "string", - "description": "旧版 Gradle 插件使用的 Android build variant。" - }, - "arch": { - "type": "string", - "description": "Android NDK 架构,例如 `arm`、`arm64`、`x86` 或 `x64`。" - }, - "source_type": { - "type": "string", - "description": "Android 错误来源类型;native 符号化时配合 `arch` 传入 `ndk`。" + "description": "为 true 时覆盖已有技能而非在名称冲突时报错 —— 若提供 `skill_id` 则按其匹配,否则按技能名称匹配。" }, - "binary_images": { - "type": "array", - "description": "iOS 崩溃报告中的已加载 binary image 列表。", - "items": { - "$ref": "#/components/schemas/SourcemapBinaryImage" - } + "skill_id": { + "type": "string", + "description": "定向替换指定技能时的技能 ID(需配合 `replace=true`)。" } - } + }, + "required": [ + "file" + ] }, - "SourcemapStackEnrichResponse": { + "RumSessionReplayMetaRequest": { "type": "object", - "description": "enrich 后的错误栈帧。", "required": [ - "frames" + "session_id" ], + "description": "查询单个 RUM 会话的回放元数据。", "properties": { - "frames": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SourcemapEnrichedFrame" - } + "session_id": { + "type": "string", + "description": "RUM 会话 ID。" + }, + "ts": { + "type": "integer", + "format": "int64", + "description": "会话起始时间的 Unix 毫秒时间戳。可选;当 `session_id` 在不同时间窗口内被复用时用于区分。" } } }, - "SourcemapStackFrame": { + "RumReplayApplication": { "type": "object", - "description": "跨平台通用的已解析栈帧字段。", "properties": { - "function": { + "id": { "type": "string", - "description": "函数或方法名称。" - }, - "file": { + "description": "会话所属的 RUM 应用 ID。" + } + } + }, + "RumReplayDevice": { + "type": "object", + "properties": { + "type": { "type": "string", - "description": "源文件、URL 或模块路径。" - }, - "line": { - "type": "integer", - "description": "行号。" + "description": "会话记录的设备类型,如 `desktop`、`mobile`、`tablet`。" + } + } + }, + "RumReplaySession": { + "type": "object", + "properties": { + "is_active": { + "type": "boolean", + "description": "截至最后一条记录事件时,会话是否仍处于活跃状态。" }, - "column": { + "server_time_delta": { "type": "integer", - "description": "JavaScript 或 Flutter 栈帧中的列号。" - }, - "class_name": { - "type": "string", - "description": "Android Java/Kotlin 类名。" - }, - "method_name": { - "type": "string", - "description": "不带类名前缀的 Android Java/Kotlin 方法名。" - }, - "module": { - "type": "string", - "description": "iOS Swift/Objective-C 模块名。" + "format": "int64", + "description": "客户端与 Flashduty 服务端之间的时钟偏移(毫秒),用于校正客户端时间戳。" }, - "address": { + "source": { "type": "string", - "description": "iOS 或 native 内存地址。" + "enum": [ + "browser", + "android", + "ios", + "miniprogram", + "react-native", + "flutter", + "kotlin-multiplatform", + "roku", + "unity" + ], + "description": "记录该会话的 SDK 平台。" }, - "offset": { + "start": { "type": "integer", - "description": "相对函数起始位置的符号偏移。" + "format": "int64", + "description": "会话开始的 Unix 毫秒时间戳。" }, - "native_address": { - "type": "string", - "description": "Unity IL native 地址。" + "end": { + "type": "integer", + "format": "int64", + "description": "会话结束(或活跃会话最后更新)的 Unix 毫秒时间戳。" } } }, - "CreateStatusPageRequest": { + "RumReplayView": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "状态页展示名称。", - "maxLength": 255 - }, - "url_name": { - "type": "string", - "description": "URL 安全的状态页路径,在账户和状态页类型内唯一。", - "maxLength": 255 - }, - "type": { + "source": { "type": "string", - "description": "状态页可见性类型。", "enum": [ - "public", - "internal" - ] + "browser", + "android", + "ios", + "miniprogram", + "react-native", + "flutter", + "kotlin-multiplatform", + "roku", + "unity" + ], + "description": "记录该视图的 SDK 平台。" }, - "custom_domain": { + "view_id": { "type": "string", - "description": "公开状态页使用的自定义域名。", - "maxLength": 255 + "description": "会话内该视图的唯一 ID。" }, - "page_title": { + "name": { "type": "string", - "description": "状态页浏览器标题。" + "description": "视图名称,通常为路由或页面名。" }, - "page_header": { + "url": { "type": "string", - "description": "状态页页头内容。" + "description": "视图对应的 URL(Web)或屏幕标识(移动端)。" }, - "page_footer": { + "loading_type": { "type": "string", - "description": "状态页页脚内容。" + "description": "进入该视图的方式,如 `initial_load`、`route_change`。" }, - "date_view": { + "container_source": { "type": "string", - "description": "事件日期展示方式。", - "enum": [ - "calendar", - "list" - ] + "description": "当该视图被嵌入时(如原生 App 内的 WebView),容器 App 的 SDK 平台。" }, - "display_uptime_mode": { + "container_view_id": { "type": "string", - "description": "可用率展示方式。", - "enum": [ - "chart_and_percentage", - "chart", - "none" - ] - }, - "custom_links": { - "type": "array", - "description": "状态页展示的自定义导航链接。", - "items": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } + "description": "当该视图被嵌入时,所属容器视图的 ID。" }, - "contact_info": { - "type": "string", - "description": "联系信息,例如 mailto 或网站 URL。" + "server_time_delta": { + "type": "integer", + "format": "int64", + "description": "客户端与 Flashduty 服务端之间的时钟偏移(毫秒),用于校正客户端时间戳。" }, - "subscription": { - "$ref": "#/components/schemas/StatusPageSubscriptionItem" - } - }, - "required": [ - "name", - "url_name", - "type", - "date_view", - "display_uptime_mode" - ] - }, - "CreateStatusPageResponse": { - "type": "object", - "properties": { - "page_id": { + "end": { "type": "integer", "format": "int64", - "description": "创建的状态页 ID。" + "description": "视图结束的 Unix 毫秒时间戳。" }, - "page_name": { - "type": "string", - "description": "创建的状态页名称。" + "start": { + "type": "integer", + "format": "int64", + "description": "视图开始的 Unix 毫秒时间戳。" }, - "page_url_name": { - "type": "string", - "description": "最终分配给状态页的 URL 安全路径。" + "is_active": { + "type": "boolean", + "description": "截至最后一条记录事件时,视图是否仍处于活跃状态。" } - }, - "required": [ - "page_id", - "page_name", - "page_url_name" - ] + } }, - "LogPatternDiagnoseSummary": { + "RumReplayForegroundPeriod": { "type": "object", - "description": "日志采样、聚合与返回范围的摘要。", + "description": "App 处于前台的一段时间区间(移动端会话)。", "properties": { - "current_sample": { - "$ref": "#/components/schemas/LogPatternSampleSummary", - "description": "当前窗口的日志采样摘要。" - }, - "baseline_sample": { - "$ref": "#/components/schemas/LogPatternSampleSummary", - "description": "基线窗口的日志采样摘要。", - "x-flashduty-preserve-absence": true - }, - "patterns_aggregated_only_in_baseline_sample": { + "start": { "type": "integer", - "description": "只在基线采样中观测到的已聚合模式数量。采样不完整时省略。", "format": "int64", - "x-flashduty-preserve-absence": true - }, - "aggregated_pattern_evidence_total": { - "type": "integer", - "description": "聚合后得到的模式证据总数,未受返回上限截断。", - "format": "int64" + "description": "前台区间开始的 Unix 毫秒时间戳。" }, - "pattern_evidence_returned": { + "end": { "type": "integer", - "description": "当前响应中返回的模式证据数量。", - "format": "int64" - }, - "pattern_evidence_truncated_by_max_patterns": { - "type": "boolean", - "description": "是否因 `max_patterns` 而截断返回的模式证据。" + "format": "int64", + "description": "前台区间结束的 Unix 毫秒时间戳。" }, - "evidence_summary": { + "view_id": { "type": "string", - "description": "基于覆盖范围、选择和返回计数生成的事实性摘要。" + "description": "该前台区间内活跃的视图 ID。" } - }, - "required": [ - "current_sample", - "aggregated_pattern_evidence_total", - "pattern_evidence_returned", - "pattern_evidence_truncated_by_max_patterns", - "evidence_summary" - ] + } }, - "MetricTrendWindowStats": { + "RumSessionReplayMetaItem": { "type": "object", - "description": "指标时间窗口的有限样本统计。", + "description": "会话的回放元数据:所属应用、设备、会话时间范围及全部录制视图。", "properties": { - "points": { - "type": "integer", - "description": "用于统计的有限样本点数。", - "format": "int64" - }, - "first": { - "type": "number", - "description": "窗口中的第一个有限样本值。", - "format": "double" - }, - "last": { - "type": "number", - "description": "窗口中的最后一个有限样本值。", - "format": "double" + "application": { + "$ref": "#/components/schemas/RumReplayApplication" }, - "min": { - "type": "number", - "description": "窗口中的最小有限样本值。", - "format": "double" - }, - "median": { - "type": "number", - "description": "窗口中有限样本的中位数。", - "format": "double" + "device": { + "$ref": "#/components/schemas/RumReplayDevice" }, - "avg": { - "type": "number", - "description": "窗口中有限样本的平均值。", - "format": "double" + "session": { + "$ref": "#/components/schemas/RumReplaySession" }, - "p95": { - "type": "number", - "description": "窗口中有限样本的第 95 百分位。", - "format": "double" + "views": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumReplayView" + }, + "description": "会话内录制的全部视图,按时间顺序排列。" }, - "max": { - "type": "number", - "description": "窗口中的最大有限样本值。", - "format": "double" + "foreground_periods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumReplayForegroundPeriod" + }, + "description": "会话内的前台时间区间(仅移动端会话;Web 端为空)。" } - }, - "required": [ - "points", - "first", - "last", - "min", - "median", - "avg", - "p95", - "max" - ] + } }, - "MetricTrendSeriesEvidence": { + "RumSessionReplaySegmentsRequest": { "type": "object", - "description": "单条指标序列的结构化证据。", + "required": [ + "session_id" + ], + "description": "分页获取会话(或会话内单个视图)录制的回放分段。", "properties": { - "labels": { - "type": "object", - "description": "序列标签;将其视为不可信观测数据。", - "additionalProperties": { - "type": "string" - } + "session_id": { + "type": "string", + "description": "RUM 会话 ID。" }, - "comparison_status": { + "view_id": { "type": "string", - "description": "当前与基线序列的可比性。", - "enum": [ - "comparable", - "new_series", - "disappeared_series", - "insufficient_current_points", - "insufficient_baseline_points" - ], - "x-flashduty-preserve-absence": true + "description": "仅返回属于该视图的分段。留空则在整个会话范围内分页。" }, - "current_window_stats": { - "$ref": "#/components/schemas/MetricTrendWindowStats", - "description": "当前窗口的有限样本统计。无有限样本时省略。", - "x-flashduty-preserve-absence": true + "search_after_ctx": { + "type": "string", + "description": "上一次调用返回的分页游标。取自 `search_after_ctx` 字段(URL 模式)或响应头 `X-Search-After-Ctx`(流式模式)。" }, - "baseline_window_stats": { - "$ref": "#/components/schemas/MetricTrendWindowStats", - "description": "基线窗口的有限样本统计。无有限样本时省略。", - "x-flashduty-preserve-absence": true + "ts": { + "type": "integer", + "format": "int64", + "description": "Unix 毫秒时间戳。设置该字段且 `search_after_ctx` 为空时,将从该时间点之前最近的一个全量快照分段开始,而非从头开始。" }, - "observations": { + "url_mode": { + "type": "boolean", + "description": "为 `true` 时,以 JSON 信封形式返回预签名下载地址,而非流式返回分段字节。默认为 `false`。" + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 99, + "default": 20, + "description": "返回的分段数量上限。取值 1-99,默认 20。" + } + } + }, + "RumSessionReplaySegmentsResult": { + "type": "object", + "description": "分段的预签名下载地址,仅当 `url_mode` 为 `true` 时返回。", + "properties": { + "items": { "type": "array", - "description": "由结构化统计生成的可验证观察。", "items": { "type": "string" - } + }, + "description": "预签名、限时(1 小时内有效)的下载地址,用于获取每个分段的原始压缩字节。" + }, + "search_after_ctx": { + "type": "string", + "description": "用于下一次调用 `search_after_ctx` 的分页游标。为该会话最后一页时为空。" } - }, - "required": [ - "labels", - "observations" - ] + } }, - "LogPatternSampleSummary": { + "CustomFieldValues": { "type": "object", - "description": "当前窗口的日志采样摘要。", + "description": "以账户自定义字段名为键的字段值。允许的字段、类型和必填规则由当前生效表单决定。", + "additionalProperties": true + }, + "IncidentActionImage": { + "type": "object", + "description": "附加到认领或解决故障时间线记录的图片。", + "required": [ + "src" + ], "properties": { - "logs_scanned": { - "type": "integer", - "description": "采样中扫描的日志条数。", - "format": "int64" - }, - "patterns_aggregated": { - "type": "integer", - "description": "从采样中聚合出的模式数量。", - "format": "int64" - }, - "logs_not_aggregated_due_to_cluster_limit": { - "type": "integer", - "description": "因聚类上限而未被聚合的日志条数。", - "format": "int64" - }, - "pattern_matching_limited": { - "type": "boolean", - "description": "模式匹配是否因有界候选集而受限。" + "src": { + "type": "string", + "description": "图片来源。支持 `img_` 上传令牌、`http(s)` URL,或以 `/` 开头的对象存储键。" }, - "truncated": { - "type": "boolean", - "description": "数据源响应是否在达到采样上限时被截断。" + "href": { + "type": "string", + "description": "图片指向的可选链接。" }, - "sampling_bias": { + "alt": { "type": "string", - "description": "截断时的数据源返回方向,例如 `newest_only` 或 `oldest_only`。", - "enum": [ - "newest_only", - "oldest_only" - ], - "x-flashduty-preserve-absence": true + "description": "图片替代文本。" } - }, - "required": [ - "logs_scanned", - "patterns_aggregated", - "logs_not_aggregated_due_to_cluster_limit", - "pattern_matching_limited", - "truncated" - ] + } }, - "DiagnoseResult": { - "description": "一个方法的诊断证据;`method` 决定其余字段的 schema。", - "oneOf": [ - { - "$ref": "#/components/schemas/DiagnoseLogPatternResult" - }, - { - "$ref": "#/components/schemas/DiagnoseMetricTrendResult" + "IncidentCardHiddenFields": { + "type": "object", + "description": "预览故障卡片时,按 IM 应用隐藏的字段。只接受受支持的 IM 应用类型和字段名。", + "propertyNames": { + "type": "string", + "enum": [ + "feishu_app", + "dingtalk_app", + "slack_app", + "teams_app", + "wecom_app" + ] + }, + "additionalProperties": { + "type": "array", + "description": "要为该 IM 应用隐藏的故障卡片字段名。", + "items": { + "type": "string", + "enum": [ + "channel", + "snoozed_before", + "severity", + "responders", + "aggregate_alert_count" + ] } + } + }, + "PreviewIncidentCardFixedField": { + "type": "object", + "description": "已应用隐藏规则后,为受支持 IM 预览返回的固定故障卡片字段。", + "required": [ + "field", + "value" ], - "discriminator": { - "propertyName": "method", - "mapping": { - "pattern_snapshot": "#/components/schemas/DiagnoseLogPatternResult", - "pattern_compare": "#/components/schemas/DiagnoseLogPatternResult", - "single_window_shape": "#/components/schemas/DiagnoseMetricTrendResult", - "window_compare": "#/components/schemas/DiagnoseMetricTrendResult" + "properties": { + "field": { + "type": "string", + "enum": [ + "channel", + "snoozed_before", + "severity", + "responders", + "aggregate_alert_count" + ], + "description": "故障卡片字段名。" + }, + "value": { + "type": "string", + "description": "固定字段的渲染显示值。" } } }, - "MetricTrendDiagnoseSummary": { + "FieldDeleteReference": { "type": "object", - "description": "指标序列的覆盖范围、选择和返回计数。", + "description": "仍引用该字段的自定义表单。", + "required": [ + "kind", + "name", + "href" + ], "properties": { - "series_total": { - "type": "integer", - "description": "输入序列总数;比较时为当前与基线标签集合的并集。", - "format": "int64" + "kind": { + "type": "string", + "const": "custom_form", + "description": "被引用资源类型。在此响应中始终为 `custom_form`。" }, - "series_analyzed": { - "type": "integer", - "description": "实际分析的序列数量,受 `max_series` 限制。", - "format": "int64" + "name": { + "type": "string", + "description": "引用该字段的自定义表单显示名称。" }, - "selected_series_total": { - "type": "integer", - "description": "在 `topk` 前满足内部选择规则的序列数量。", - "format": "int64" + "href": { + "type": "string", + "description": "引用该字段的自定义表单控制台 URL。" + } + } + }, + "FieldDeleteReferenceError": { + "type": "object", + "description": "自定义表单仍引用该字段时返回的错误响应。", + "required": [ + "request_id", + "error", + "data" + ], + "properties": { + "request_id": { + "type": "string", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, - "series_returned": { - "type": "integer", - "description": "响应中返回的 `series_evidence` 数量。", - "format": "int64" + "error": { + "$ref": "#/components/schemas/DutyError" }, - "analysis_truncated": { - "type": "boolean", - "description": "是否因 `max_series` 未能完整分析全部输入序列。" + "data": { + "type": "object", + "required": [ + "refs" + ], + "properties": { + "refs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FieldDeleteReference" + } + } + } + } + } + }, + "DiagnoseEvidenceWindow": { + "type": "object", + "description": "分析的当前时间窗口,使用 RFC 3339 UTC 时间戳。", + "properties": { + "start": { + "type": "string", + "description": "窗口开始时间(RFC 3339 UTC)。", + "format": "date-time" }, - "evidence_summary": { + "end": { "type": "string", - "description": "基于覆盖范围、选择和返回计数生成的事实性摘要。" + "description": "窗口结束时间(RFC 3339 UTC)。", + "format": "date-time" } }, "required": [ - "series_total", - "series_analyzed", - "selected_series_total", - "series_returned", - "analysis_truncated", - "evidence_summary" + "start", + "end" ] }, "DiagnoseLogDataHandling": { @@ -47172,6 +48594,62 @@ "untrusted_data_fields" ] }, + "DiagnoseLogPatternResponse": { + "type": "object", + "description": "日志模式诊断结果。", + "properties": { + "schema_version": { + "type": "string", + "description": "边缘诊断结果的 schema 版本。", + "enum": [ + "2" + ] + }, + "operation": { + "type": "string", + "description": "执行的诊断类别。", + "enum": [ + "log_patterns" + ] + }, + "ds_type": { + "type": "string", + "description": "数据源类型。" + }, + "ds_name": { + "type": "string", + "description": "数据源名称。" + }, + "query": { + "type": "string", + "description": "回显的查询语句。" + }, + "window": { + "$ref": "#/components/schemas/DiagnoseEvidenceWindow", + "description": "分析的当前时间窗口,使用 RFC 3339 UTC 时间戳。" + }, + "results": { + "type": "array", + "description": "一个方法的诊断证据;`method` 决定其余字段的 schema。", + "items": { + "$ref": "#/components/schemas/DiagnoseResult" + } + }, + "data_handling": { + "$ref": "#/components/schemas/DiagnoseLogDataHandling" + } + }, + "required": [ + "schema_version", + "operation", + "ds_type", + "ds_name", + "query", + "window", + "results", + "data_handling" + ] + }, "DiagnoseLogPatternResult": { "type": "object", "description": "日志模式方法的证据。", @@ -47229,6 +48707,69 @@ "warnings" ] }, + "DiagnoseMethodSummary": { + "description": "日志模式和指标趋势方法使用的摘要。", + "oneOf": [ + { + "$ref": "#/components/schemas/LogPatternDiagnoseSummary" + }, + { + "$ref": "#/components/schemas/MetricTrendDiagnoseSummary" + } + ] + }, + "DiagnoseMetricTrendResponse": { + "type": "object", + "description": "指标趋势诊断结果。", + "properties": { + "schema_version": { + "type": "string", + "description": "边缘诊断结果的 schema 版本。", + "enum": [ + "2" + ] + }, + "operation": { + "type": "string", + "description": "执行的诊断类别。", + "enum": [ + "metric_trends" + ] + }, + "ds_type": { + "type": "string", + "description": "数据源类型。" + }, + "ds_name": { + "type": "string", + "description": "数据源名称。" + }, + "query": { + "type": "string", + "description": "回显的查询语句。" + }, + "window": { + "$ref": "#/components/schemas/DiagnoseEvidenceWindow", + "description": "分析的当前时间窗口,使用 RFC 3339 UTC 时间戳。" + }, + "results": { + "type": "array", + "description": "一个方法的诊断证据;`method` 决定其余字段的 schema。", + "items": { + "$ref": "#/components/schemas/DiagnoseResult" + } + } + }, + "required": [ + "schema_version", + "operation", + "ds_type", + "ds_name", + "query", + "window", + "results" + ] + }, "DiagnoseMetricTrendResult": { "type": "object", "description": "指标趋势方法的证据。", @@ -47286,6 +48827,72 @@ "warnings" ] }, + "DiagnoseResult": { + "description": "一个方法的诊断证据;`method` 决定其余字段的 schema。", + "oneOf": [ + { + "$ref": "#/components/schemas/DiagnoseLogPatternResult" + }, + { + "$ref": "#/components/schemas/DiagnoseMetricTrendResult" + } + ], + "discriminator": { + "propertyName": "method", + "mapping": { + "pattern_snapshot": "#/components/schemas/DiagnoseLogPatternResult", + "pattern_compare": "#/components/schemas/DiagnoseLogPatternResult", + "single_window_shape": "#/components/schemas/DiagnoseMetricTrendResult", + "window_compare": "#/components/schemas/DiagnoseMetricTrendResult" + } + } + }, + "LogPatternDiagnoseSummary": { + "type": "object", + "description": "日志采样、聚合与返回范围的摘要。", + "properties": { + "current_sample": { + "$ref": "#/components/schemas/LogPatternSampleSummary", + "description": "当前窗口的日志采样摘要。" + }, + "baseline_sample": { + "$ref": "#/components/schemas/LogPatternSampleSummary", + "description": "基线窗口的日志采样摘要。", + "x-flashduty-preserve-absence": true + }, + "patterns_aggregated_only_in_baseline_sample": { + "type": "integer", + "description": "只在基线采样中观测到的已聚合模式数量。采样不完整时省略。", + "format": "int64", + "x-flashduty-preserve-absence": true + }, + "aggregated_pattern_evidence_total": { + "type": "integer", + "description": "聚合后得到的模式证据总数,未受返回上限截断。", + "format": "int64" + }, + "pattern_evidence_returned": { + "type": "integer", + "description": "当前响应中返回的模式证据数量。", + "format": "int64" + }, + "pattern_evidence_truncated_by_max_patterns": { + "type": "boolean", + "description": "是否因 `max_patterns` 而截断返回的模式证据。" + }, + "evidence_summary": { + "type": "string", + "description": "基于覆盖范围、选择和返回计数生成的事实性摘要。" + } + }, + "required": [ + "current_sample", + "aggregated_pattern_evidence_total", + "pattern_evidence_returned", + "pattern_evidence_truncated_by_max_patterns", + "evidence_summary" + ] + }, "LogPatternEvidence": { "type": "object", "description": "单个日志模式的结构化证据。", @@ -47341,24 +48948,49 @@ "pattern_template" ] }, - "DiagnoseEvidenceWindow": { + "LogPatternSampleSummary": { "type": "object", - "description": "分析的当前时间窗口,使用 RFC 3339 UTC 时间戳。", + "description": "当前窗口的日志采样摘要。", "properties": { - "start": { - "type": "string", - "description": "窗口开始时间(RFC 3339 UTC)。", - "format": "date-time" + "logs_scanned": { + "type": "integer", + "description": "采样中扫描的日志条数。", + "format": "int64" }, - "end": { + "patterns_aggregated": { + "type": "integer", + "description": "从采样中聚合出的模式数量。", + "format": "int64" + }, + "logs_not_aggregated_due_to_cluster_limit": { + "type": "integer", + "description": "因聚类上限而未被聚合的日志条数。", + "format": "int64" + }, + "pattern_matching_limited": { + "type": "boolean", + "description": "模式匹配是否因有界候选集而受限。" + }, + "truncated": { + "type": "boolean", + "description": "数据源响应是否在达到采样上限时被截断。" + }, + "sampling_bias": { "type": "string", - "description": "窗口结束时间(RFC 3339 UTC)。", - "format": "date-time" + "description": "截断时的数据源返回方向,例如 `newest_only` 或 `oldest_only`。", + "enum": [ + "newest_only", + "oldest_only" + ], + "x-flashduty-preserve-absence": true } }, "required": [ - "start", - "end" + "logs_scanned", + "patterns_aggregated", + "logs_not_aggregated_due_to_cluster_limit", + "pattern_matching_limited", + "truncated" ] }, "LogPatternSourceEvidence": { @@ -47434,222 +49066,148 @@ "last_seen" ] }, - "DiagnoseMethodSummary": { - "description": "日志模式和指标趋势方法使用的摘要。", - "oneOf": [ - { - "$ref": "#/components/schemas/LogPatternDiagnoseSummary" - }, - { - "$ref": "#/components/schemas/MetricTrendDiagnoseSummary" - } - ] - }, - "DiagnoseMetricTrendResponse": { + "MetricTrendDiagnoseSummary": { "type": "object", - "description": "指标趋势诊断结果。", + "description": "指标序列的覆盖范围、选择和返回计数。", "properties": { - "schema_version": { - "type": "string", - "description": "边缘诊断结果的 schema 版本。", - "enum": [ - "2" - ] - }, - "operation": { - "type": "string", - "description": "执行的诊断类别。", - "enum": [ - "metric_trends" - ] + "series_total": { + "type": "integer", + "description": "输入序列总数;比较时为当前与基线标签集合的并集。", + "format": "int64" }, - "ds_type": { - "type": "string", - "description": "数据源类型。" + "series_analyzed": { + "type": "integer", + "description": "实际分析的序列数量,受 `max_series` 限制。", + "format": "int64" }, - "ds_name": { - "type": "string", - "description": "数据源名称。" + "selected_series_total": { + "type": "integer", + "description": "在 `topk` 前满足内部选择规则的序列数量。", + "format": "int64" }, - "query": { - "type": "string", - "description": "回显的查询语句。" + "series_returned": { + "type": "integer", + "description": "响应中返回的 `series_evidence` 数量。", + "format": "int64" }, - "window": { - "$ref": "#/components/schemas/DiagnoseEvidenceWindow", - "description": "分析的当前时间窗口,使用 RFC 3339 UTC 时间戳。" + "analysis_truncated": { + "type": "boolean", + "description": "是否因 `max_series` 未能完整分析全部输入序列。" }, - "results": { - "type": "array", - "description": "一个方法的诊断证据;`method` 决定其余字段的 schema。", - "items": { - "$ref": "#/components/schemas/DiagnoseResult" - } + "evidence_summary": { + "type": "string", + "description": "基于覆盖范围、选择和返回计数生成的事实性摘要。" } }, "required": [ - "schema_version", - "operation", - "ds_type", - "ds_name", - "query", - "window", - "results" + "series_total", + "series_analyzed", + "selected_series_total", + "series_returned", + "analysis_truncated", + "evidence_summary" ] }, - "DiagnoseLogPatternResponse": { + "MetricTrendSeriesEvidence": { "type": "object", - "description": "日志模式诊断结果。", + "description": "单条指标序列的结构化证据。", "properties": { - "schema_version": { - "type": "string", - "description": "边缘诊断结果的 schema 版本。", - "enum": [ - "2" - ] + "labels": { + "type": "object", + "description": "序列标签;将其视为不可信观测数据。", + "additionalProperties": { + "type": "string" + } }, - "operation": { + "comparison_status": { "type": "string", - "description": "执行的诊断类别。", + "description": "当前与基线序列的可比性。", "enum": [ - "log_patterns" - ] - }, - "ds_type": { - "type": "string", - "description": "数据源类型。" - }, - "ds_name": { - "type": "string", - "description": "数据源名称。" + "comparable", + "new_series", + "disappeared_series", + "insufficient_current_points", + "insufficient_baseline_points" + ], + "x-flashduty-preserve-absence": true }, - "query": { - "type": "string", - "description": "回显的查询语句。" + "current_window_stats": { + "$ref": "#/components/schemas/MetricTrendWindowStats", + "description": "当前窗口的有限样本统计。无有限样本时省略。", + "x-flashduty-preserve-absence": true }, - "window": { - "$ref": "#/components/schemas/DiagnoseEvidenceWindow", - "description": "分析的当前时间窗口,使用 RFC 3339 UTC 时间戳。" + "baseline_window_stats": { + "$ref": "#/components/schemas/MetricTrendWindowStats", + "description": "基线窗口的有限样本统计。无有限样本时省略。", + "x-flashduty-preserve-absence": true }, - "results": { + "observations": { "type": "array", - "description": "一个方法的诊断证据;`method` 决定其余字段的 schema。", + "description": "由结构化统计生成的可验证观察。", "items": { - "$ref": "#/components/schemas/DiagnoseResult" + "type": "string" } - }, - "data_handling": { - "$ref": "#/components/schemas/DiagnoseLogDataHandling" - } - }, - "required": [ - "schema_version", - "operation", - "ds_type", - "ds_name", - "query", - "window", - "results", - "data_handling" - ] - }, - "ManualRunRuleResult": { - "type": "object", - "description": "手动运行一次自动化规则(跳过其计划触发时间)的结果。", - "properties": { - "rule_id": { - "type": "string", - "description": "被运行的规则 ID。" - }, - "trigger_kind": { - "type": "string", - "enum": [ - "manual" - ], - "description": "该操作固定为 manual。" - }, - "preflight": { - "$ref": "#/components/schemas/PreflightResult" - }, - "run": { - "$ref": "#/components/schemas/AutomationRunView" } }, "required": [ - "rule_id", - "trigger_kind", - "preflight" + "labels", + "observations" ] }, - "PreflightResult": { + "MetricTrendWindowStats": { "type": "object", - "description": "在允许发起手动运行前计算出的就绪检查结果。", + "description": "指标时间窗口的有限样本统计。", "properties": { - "ok": { - "type": "boolean", - "description": "全部就绪检查是否通过。凡是能返回给调用者的响应中该值恒为 true——预检失败会直接返回 400/403 错误,而不是 ok=false 的响应体。" + "points": { + "type": "integer", + "description": "用于统计的有限样本点数。", + "format": "int64" }, - "checks": { - "type": "array", - "items": { - "type": "string" - }, - "description": "按执行顺序列出的就绪检查项名称。当前固定为:rule_loaded、actor_authorized、app_allowed、runtime_scope_resolved、rule_config_valid。" + "first": { + "type": "number", + "description": "窗口中的第一个有限样本值。", + "format": "double" }, - "scope": { - "type": "string", - "enum": [ - "person", - "team" - ], - "description": "本次运行解析出的作用域,与规则的 run_scope 一致。" + "last": { + "type": "number", + "description": "窗口中的最后一个有限样本值。", + "format": "double" }, - "owner_id": { - "type": "integer", - "format": "int64", - "description": "规则所有者 person ID。" + "min": { + "type": "number", + "description": "窗口中的最小有限样本值。", + "format": "double" }, - "team_id": { - "type": "integer", - "format": "int64", - "description": "规则的作用域团队 ID;0 表示个人规则。" + "median": { + "type": "number", + "description": "窗口中有限样本的中位数。", + "format": "double" }, - "app_name": { - "type": "string", - "description": "规则所属的 App。当前始终为 ai-sre;手动运行目前仅支持该 App。" + "avg": { + "type": "number", + "description": "窗口中有限样本的平均值。", + "format": "double" }, - "warnings": { - "type": "array", - "items": { - "type": "string" - }, - "description": "预检过程中给出的非致命警告。没有警告时省略或为空数组。" - } - }, - "required": [ - "ok", - "checks", - "scope", - "owner_id", - "team_id", - "app_name" - ] - }, - "AutomationRunView": { - "type": "object", - "description": "手动触发所创建运行的引用。", - "properties": { - "run_id": { - "type": "string", - "description": "运行 ID,运行创建后始终会有值。" + "p95": { + "type": "number", + "description": "窗口中有限样本的第 95 百分位。", + "format": "double" }, - "session_id": { - "type": "string", - "description": "本次运行对应的 AI SRE 会话 ID。由于调用只会在会话启动后才返回,因此在 200 响应中始终会有值。" + "max": { + "type": "number", + "description": "窗口中的最大有限样本值。", + "format": "double" } }, "required": [ - "run_id" + "points", + "first", + "last", + "min", + "median", + "avg", + "p95", + "max" ] } } diff --git a/roundtrip_gen_test.go b/roundtrip_gen_test.go index 4717356..76ae2d3 100644 --- a/roundtrip_gen_test.go +++ b/roundtrip_gen_test.go @@ -120,6 +120,7 @@ var exampleDataDecoders = map[string]func(json.RawMessage) error{ "POST /monit/targets": func(d json.RawMessage) error { var v TargetsListResponse; return json.Unmarshal(d, &v) }, "POST /monit/tools/catalog": func(d json.RawMessage) error { var v ToolCatalogResponse; return json.Unmarshal(d, &v) }, "POST /monit/tools/invoke": func(d json.RawMessage) error { var v ToolInvokeResponse; return json.Unmarshal(d, &v) }, + "POST /oncall/license/list": func(d json.RawMessage) error { var v LicenseListResponse; return json.Unmarshal(d, &v) }, "POST /person/infos": func(d json.RawMessage) error { var v PersonInfosResponse; return json.Unmarshal(d, &v) }, "POST /role/info": func(d json.RawMessage) error { var v RoleItem; return json.Unmarshal(d, &v) }, "POST /role/list": func(d json.RawMessage) error { var v RoleListResponse; return json.Unmarshal(d, &v) }, @@ -139,6 +140,8 @@ var exampleDataDecoders = map[string]func(json.RawMessage) error{ "POST /rum/field/list": func(d json.RawMessage) error { var v RUMFieldListResponse; return json.Unmarshal(d, &v) }, "POST /rum/issue/info": func(d json.RawMessage) error { var v RUMIssueItem; return json.Unmarshal(d, &v) }, "POST /rum/issue/list": func(d json.RawMessage) error { var v RUMIssueListResponse; return json.Unmarshal(d, &v) }, + "POST /rum/session-replay/metadata": func(d json.RawMessage) error { var v RUMSessionReplayMetaItem; return json.Unmarshal(d, &v) }, + "POST /rum/session-replay/segments": func(d json.RawMessage) error { var v RUMSessionReplaySegmentsResult; return json.Unmarshal(d, &v) }, "POST /safari/a2a-agent/create": func(d json.RawMessage) error { var v A2aAgentCreateResponse; return json.Unmarshal(d, &v) }, "POST /safari/a2a-agent/delete": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, "POST /safari/a2a-agent/disable": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, diff --git a/services_gen.go b/services_gen.go index e216f2a..ad924dc 100644 --- a/services_gen.go +++ b/services_gen.go @@ -27,6 +27,7 @@ type genServices struct { ImIntegrations *ImIntegrationsService Incidents *IncidentsService Integrations *IntegrationsService + Licenses *LicensesService NotificationTemplates *NotificationTemplatesService Schedules *SchedulesService StatusPages *StatusPagesService @@ -39,6 +40,7 @@ type genServices struct { DataQuery *DataQueryService Facets *FacetsService Issues *IssuesService + SessionReplay *SessionReplayService Sourcemaps *SourcemapsService } @@ -64,6 +66,7 @@ func (c *Client) initServices() { c.ImIntegrations = (*ImIntegrationsService)(&c.common) c.Incidents = (*IncidentsService)(&c.common) c.Integrations = (*IntegrationsService)(&c.common) + c.Licenses = (*LicensesService)(&c.common) c.NotificationTemplates = (*NotificationTemplatesService)(&c.common) c.Schedules = (*SchedulesService)(&c.common) c.StatusPages = (*StatusPagesService)(&c.common) @@ -76,5 +79,6 @@ func (c *Client) initServices() { c.DataQuery = (*DataQueryService)(&c.common) c.Facets = (*FacetsService)(&c.common) c.Issues = (*IssuesService)(&c.common) + c.SessionReplay = (*SessionReplayService)(&c.common) c.Sourcemaps = (*SourcemapsService)(&c.common) } diff --git a/session_replay.go b/session_replay.go new file mode 100644 index 0000000..e3132e3 --- /dev/null +++ b/session_replay.go @@ -0,0 +1,36 @@ +// Code generated by internal/cmd/gen; DO NOT EDIT. + +package flashduty + +import "context" + +// SessionReplayService handles the "RUM/Session replay" API resource. +type SessionReplayService service + +// Get session replay metadata. +// +// Return the application, device, session bounds, and views recorded for a replayable session. +// +// API: POST /rum/session-replay/metadata (rum-session-replay-read-metadata). +func (s *SessionReplayService) Metadata(ctx context.Context, req *RUMSessionReplayMetaRequest) (*RUMSessionReplayMetaItem, *Response, error) { + out := new(RUMSessionReplayMetaItem) + resp, err := s.client.do(ctx, "/rum/session-replay/metadata", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} + +// List session replay segments. +// +// Page through the recorded replay segments of a session, as presigned URLs or a raw stream. +// +// API: POST /rum/session-replay/segments (rum-session-replay-read-segments). +func (s *SessionReplayService) Segments(ctx context.Context, req *RUMSessionReplaySegmentsRequest) (*RUMSessionReplaySegmentsResult, *Response, error) { + out := new(RUMSessionReplaySegmentsResult) + resp, err := s.client.do(ctx, "/rum/session-replay/segments", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} diff --git a/skills.go b/skills.go index f4fa2a6..6a0dad3 100644 --- a/skills.go +++ b/skills.go @@ -79,7 +79,7 @@ func (s *SkillsService) WriteDisable(ctx context.Context, req *SkillStatusReques // Update skill. // -// Update a skill's description or reassign its team scope. +// Update a skill's descriptions or reassign its team scope. // // API: POST /safari/skill/update (skill-write-update). func (s *SkillsService) WriteUpdate(ctx context.Context, req *SkillUpdateRequest) (*SkillItem, *Response, error) {