From c987e36bf2c423bb8ec07b99cc4accb15693b59e Mon Sep 17 00:00:00 2001 From: ysyneu <9045284+ysyneu@users.noreply.github.com> Date: Wed, 15 Jul 2026 04:16:24 +0000 Subject: [PATCH] chore: sync OpenAPI spec from flashduty-docs + regenerate --- analytics.go | 8 +- automations.go | 14 + en.go | 106 + models_gen.go | 294 +- openapi/openapi.en.json | 10601 +++++++++++++++++++------------------ openapi/openapi.zh.json | 10687 ++++++++++++++++++++------------------ roundtrip_gen_test.go | 1 + services_gen.go | 4 +- skills.go | 2 +- 9 files changed, 11668 insertions(+), 10049 deletions(-) create mode 100644 en.go 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/automations.go b/automations.go index 096eb62..e0132a8 100644 --- a/automations.go +++ b/automations.go @@ -63,6 +63,20 @@ func (s *AutomationsService) RuleWriteDelete(ctx context.Context, req *Automatio return out, resp, nil } +// Run Automation rule. +// +// Manually run an Automation rule immediately, outside its schedule. +// +// API: POST /safari/automation/rule/run (automation-rule-write-run). +func (s *AutomationsService) RuleWriteRun(ctx context.Context, req *AutomationRuleIDRequest) (*ManualRunRuleResult, *Response, error) { + out := new(ManualRunRuleResult) + resp, err := s.client.do(ctx, "/safari/automation/rule/run", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} + // Update Automation rule. // // Update mutable Automation rule fields, including HTTP POST and On-call incident trigger settings. diff --git a/en.go b/en.go new file mode 100644 index 0000000..c346a28 --- /dev/null +++ b/en.go @@ -0,0 +1,106 @@ +// Code generated by internal/cmd/gen; DO NOT EDIT. + +package flashduty + +import "context" + +// EnService handles the "en" API resource. +type EnService service + +// Get A2A agent detail. +// +// Get one A2A agent by ID. +// +// API: POST /safari/a2a-agent/get (remote-agent-read-get). +func (s *EnService) ReadGet(ctx context.Context, req *A2aAgentIDRequest) (*A2aAgentItem, *Response, error) { + out := new(A2aAgentItem) + resp, err := s.client.do(ctx, "/safari/a2a-agent/get", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} + +// List A2A agents. +// +// List A2A agents visible to the caller across account and team scopes, with pagination. +// +// API: POST /safari/a2a-agent/list (remote-agent-read-list). +func (s *EnService) ReadList(ctx context.Context, req *A2aAgentListRequest) (*A2aAgentListResponse, *Response, error) { + out := new(A2aAgentListResponse) + resp, err := s.client.do(ctx, "/safari/a2a-agent/list", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} + +// Create A2A agent. +// +// Register a new A2A remote agent from its agent-card URL. +// +// API: POST /safari/a2a-agent/create (remote-agent-write-create). +func (s *EnService) WriteCreate(ctx context.Context, req *A2aAgentCreateRequest) (*A2aAgentCreateResponse, *Response, error) { + out := new(A2aAgentCreateResponse) + resp, err := s.client.do(ctx, "/safari/a2a-agent/create", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} + +// Delete A2A agent. +// +// Soft-delete an A2A agent by ID. +// +// API: POST /safari/a2a-agent/delete (remote-agent-write-delete). +func (s *EnService) WriteDelete(ctx context.Context, req *A2aAgentIDRequest) (*any, *Response, error) { + out := new(any) + resp, err := s.client.do(ctx, "/safari/a2a-agent/delete", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} + +// Disable A2A agent. +// +// Disable an enabled A2A agent. +// +// API: POST /safari/a2a-agent/disable (remote-agent-write-disable). +func (s *EnService) WriteDisable(ctx context.Context, req *A2aAgentIDRequest) (*any, *Response, error) { + out := new(any) + resp, err := s.client.do(ctx, "/safari/a2a-agent/disable", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} + +// Enable A2A agent. +// +// Enable a disabled A2A agent. +// +// API: POST /safari/a2a-agent/enable (remote-agent-write-enable). +func (s *EnService) WriteEnable(ctx context.Context, req *A2aAgentIDRequest) (*any, *Response, error) { + out := new(any) + resp, err := s.client.do(ctx, "/safari/a2a-agent/enable", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} + +// Update A2A agent. +// +// Apply a partial update to an A2A agent. Omit a field to leave it unchanged. +// +// API: POST /safari/a2a-agent/update (remote-agent-write-update). +func (s *EnService) WriteUpdate(ctx context.Context, req *A2aAgentUpdateRequest) (*any, *Response, error) { + out := new(any) + resp, err := s.client.do(ctx, "/safari/a2a-agent/update", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} diff --git a/models_gen.go b/models_gen.go index b737b7e..bb56294 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 ( @@ -169,23 +169,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 +221,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 +241,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 +255,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 +271,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 +293,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"` } @@ -1066,7 +1094,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 +1118,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 +1132,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 +1178,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 +1193,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"` } @@ -1234,6 +1266,14 @@ type AutomationRunListResponse struct { Total int64 `json:"total" toon:"total"` } +// AutomationRunView is generated from the Flashduty OpenAPI schema. +type AutomationRunView struct { + // Run ID, always populated once a run is created. + RunID string `json:"run_id" toon:"run_id"` + // AI SRE session ID for this run. Always populated in a 200 response, since the call only returns after the session has started. + SessionID string `json:"session_id" toon:"session_id"` +} + // AutomationTemplateItem is generated from the Flashduty OpenAPI schema. type AutomationTemplateItem struct { // Template description. @@ -2382,13 +2422,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"` } @@ -3161,35 +3201,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. @@ -3261,6 +3315,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). @@ -3306,6 +3362,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). @@ -3362,6 +3420,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). @@ -3410,6 +3470,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. @@ -3785,6 +3847,10 @@ type ListWebhookHistoryResponse 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. @@ -3799,6 +3865,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. @@ -3837,6 +3907,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. @@ -3857,6 +3931,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. @@ -3894,6 +3972,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"` } @@ -3914,6 +3996,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. @@ -3928,6 +4014,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. @@ -3956,6 +4046,16 @@ type McpToolInfo struct { Name string `json:"name" toon:"name"` } +// ManualRunRuleResult is generated from the Flashduty OpenAPI schema. +type ManualRunRuleResult struct { + Preflight PreflightResult `json:"preflight" toon:"preflight"` + // Rule ID that was run. + RuleID string `json:"rule_id" toon:"rule_id"` + Run AutomationRunView `json:"run" toon:"run"` + // Always manual for this operation. + TriggerKind string `json:"trigger_kind" toon:"trigger_kind"` +} + // MappingAPICreateRequest is generated from the Flashduty OpenAPI schema. type MappingAPICreateRequest struct { // Unique API name (max 199 chars). @@ -4764,6 +4864,24 @@ type PostMortemTemplate struct { UpdatedAtSeconds Timestamp `json:"updated_at_seconds" toon:"updated_at_seconds"` } +// PreflightResult is generated from the Flashduty OpenAPI schema. +type PreflightResult struct { + // App the rule is scoped to. Currently always ai-sre; manual runs are only supported for that app. + AppName string `json:"app_name" toon:"app_name"` + // Names of the readiness checks performed, in order. Current fixed set: rule_loaded, actor_authorized, app_allowed, runtime_scope_resolved, rule_config_valid. + Checks []string `json:"checks" toon:"checks"` + // 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. + OK bool `json:"ok" toon:"ok"` + // Rule owner person ID. + OwnerID int64 `json:"owner_id" toon:"owner_id"` + // Resolved run scope for this run; mirrors the rule's run_scope. + Scope string `json:"scope" toon:"scope"` + // Rule's scope team ID; 0 means a personal rule. + TeamID int64 `json:"team_id" toon:"team_id"` + // Non-fatal warnings surfaced during preflight. Omitted or empty when there are none. + Warnings []string `json:"warnings" toon:"warnings"` +} + // PreviewSyncRequest is generated from the Flashduty OpenAPI schema. type PreviewSyncRequest struct { // Additional type-specific query arguments. @@ -5998,6 +6116,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. @@ -6009,17 +6129,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"` @@ -6027,6 +6157,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. @@ -6049,6 +6187,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. @@ -6079,11 +6225,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"` } @@ -6091,6 +6237,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"` } @@ -6167,6 +6315,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. @@ -6181,7 +6331,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"` @@ -6200,8 +6350,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"` } @@ -6222,8 +6376,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. @@ -6232,13 +6388,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"` } diff --git a/openapi/openapi.en.json b/openapi/openapi.en.json index 07e54aa..42abcdc 100644 --- a/openapi/openapi.en.json +++ b/openapi/openapi.en.json @@ -10949,7 +10949,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,7 +11002,7 @@ "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" ], @@ -11182,7 +11189,7 @@ "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" ], @@ -11364,7 +11371,7 @@ "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" ], @@ -11537,7 +11544,7 @@ "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" ], @@ -13247,7 +13254,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 +13358,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" @@ -13843,7 +13850,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 +15488,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" @@ -19723,7 +19730,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" @@ -20900,24 +20907,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": { @@ -20928,13 +21004,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SkillListResponse" + "$ref": "#/components/schemas/PostMortemItem" } } } @@ -20943,33 +21019,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": "" } } } @@ -20993,36 +21079,109 @@ "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" + "On-call/Incidents" ], - "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", + "metadata": { + "sidebarTitle": "Update post-mortem basics" } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "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/ResetPostMortemBasicsRequest" + }, + "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 + ] + } + } + } + } + } + }, + "/incident/post-mortem/status/reset": { + "post": { + "operationId": "postmortem-write-reset-status", + "summary": "Update post-mortem status", + "description": "Set a post-mortem report to drafting or published.", + "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", - "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-status", "metadata": { - "sidebarTitle": "Get skill detail" + "sidebarTitle": "Update post-mortem status" } }, "responses": { @@ -21033,13 +21192,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SkillItem" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -21047,31 +21206,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": {} } } } @@ -21094,34 +21229,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillGetRequest" + "$ref": "#/components/schemas/ResetPostMortemStatusRequest" }, "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "status": "published" } } } } } }, - "/safari/skill/update": { + "/incident/post-mortem/title/reset": { "post": { - "operationId": "skill-write-update", - "summary": "Update skill", - "description": "Update a skill's description or reassign its team scope.", + "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- 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-title", "metadata": { - "sidebarTitle": "Update skill" + "sidebarTitle": "Update post-mortem title" } }, "responses": { @@ -21132,13 +21263,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SkillItem" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -21146,30 +21277,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": {} } } } @@ -21180,9 +21288,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21195,35 +21300,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillUpdateRequest" + "$ref": "#/components/schemas/ResetPostMortemTitleRequest" }, "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", - "description": "Updated triage runbook." + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "title": "Production API latency incident" } } } } } }, - "/safari/skill/delete": { + "/incident/post-mortem/follow-ups/reset": { "post": { - "operationId": "skill-write-delete", - "summary": "Delete skill", - "description": "Delete a skill by ID.", + "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 | **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-follow-ups", "metadata": { - "sidebarTitle": "Delete skill" + "sidebarTitle": "Update post-mortem follow-ups" } }, "responses": { @@ -21234,14 +21334,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" } } } @@ -21249,7 +21348,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -21260,9 +21359,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21275,34 +21371,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillDeleteRequest" + "$ref": "#/components/schemas/ResetPostMortemFollowUpsRequest" }, "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "follow_ups": "- Add database saturation alert\n- Review cache TTL rollout" } } } } } }, - "/safari/skill/upload": { + "/incident/post-mortem/template/upsert": { "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-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 | **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-upsert-template", "metadata": { - "sidebarTitle": "Upload skill" + "sidebarTitle": "Create or update post-mortem template" } }, "responses": { @@ -21313,13 +21405,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SkillItem" + "$ref": "#/components/schemas/PostMortemTemplate" } } } @@ -21328,29 +21420,15 @@ "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 + "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 } } } @@ -21362,9 +21440,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21375,37 +21450,35 @@ "requestBody": { "required": true, "content": { - "multipart/form-data": { + "application/json": { "schema": { - "$ref": "#/components/schemas/SkillUploadRequest" + "$ref": "#/components/schemas/UpsertPostMortemTemplateRequest" }, "example": { - "team_id": 0, - "replace": false + "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/enable": { + "/incident/post-mortem/template/delete": { "post": { - "operationId": "skill-read-enable", - "summary": "Enable skill", - "description": "Enable a disabled skill so the agent can load 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 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-delete-template", "metadata": { - "sidebarTitle": "Enable skill" + "sidebarTitle": "Delete post-mortem template" } }, "responses": { @@ -21416,14 +21489,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" } } } @@ -21431,7 +21503,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -21442,9 +21514,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21457,34 +21526,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/skill/disable": { + "/incident/post-mortem/template/list": { "post": { - "operationId": "skill-write-disable", - "summary": "Disable skill", - "description": "Disable an enabled skill so the agent stops loading it.", + "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/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 Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/postmortem-read-list-templates", "metadata": { - "sidebarTitle": "Disable skill" + "sidebarTitle": "List post-mortem templates" } }, "responses": { @@ -21495,14 +21559,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/ListPostMortemTemplatesResponse" } } } @@ -21510,7 +21573,23 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "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 + } + ] + } } } } @@ -21521,9 +21600,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21536,34 +21612,32 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillStatusRequest" + "$ref": "#/components/schemas/ListPostMortemTemplatesRequest" }, "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + "p": 1, + "limit": 20, + "order_by": "created_at_seconds", + "asc": false } } } } } }, - "/safari/mcp/server/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.", + "/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 | 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-template-info", "metadata": { - "sidebarTitle": "List MCP servers" + "sidebarTitle": "Get post-mortem template detail" } }, "responses": { @@ -21574,13 +21648,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/MCPServerListResponse" + "$ref": "#/components/schemas/PostMortemTemplate" } } } @@ -21589,37 +21663,15 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "total": 1, - "servers": [ - { - "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 } } } @@ -21638,41 +21690,32 @@ "$ref": "#/components/responses/ServerError" } }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MCPServerListRequest" - }, - "example": { - "p": 1, - "limit": 20, - "include_account": true - } - } + "parameters": [ + { + "name": "template_id", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "description": "Template ID." } - } + ] } }, - "/safari/mcp/server/create": { + "/monit/preview/sync": { "post": { - "operationId": "mcp-write-server-create", - "summary": "Create MCP server", - "description": "Register a new MCP server (connector) on the account.", + "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 | **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 | **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": "Create MCP server" + "sidebarTitle": "Preview datasource query" } }, "responses": { @@ -21683,13 +21726,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/MCPServerItem" + "$ref": "#/components/schemas/PreviewSyncResponse" } } } @@ -21698,32 +21741,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": [] + } } } } @@ -21735,9 +21757,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21750,38 +21769,32 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServerCreateRequest" + "$ref": "#/components/schemas/PreviewSyncRequest" }, "example": { - "server_name": "prometheus", - "description": "Query Prometheus metrics and alerts.", - "transport": "streamable-http", - "url": "https://mcp.example.com/prometheus", - "status": "enabled" + "ds_type": "prometheus", + "ds_name": "Prometheus Prod", + "expr": "rate(http_requests_total[5m])", + "delay_seconds": 0 } } } } } }, - "/safari/mcp/server/get": { - "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.", + "/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 | 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 | **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": "Get MCP server detail" + "sidebarTitle": "Get status page detail" } }, "responses": { @@ -21792,13 +21805,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/MCPServerItem" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -21807,32 +21820,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 and alerts.", - "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" } } } @@ -21851,39 +21880,32 @@ "$ref": "#/components/responses/ServerError" } }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MCPServerGetRequest" - }, - "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" - } - } - } - } + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "description": "Status page ID" + } + ] } }, - "/safari/mcp/server/update": { + "/status-page/create": { "post": { - "operationId": "mcp-write-server-update", - "summary": "Update MCP server", - "description": "Update an MCP server's configuration. Omit a field to leave it unchanged.", + "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- 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 | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-create", "metadata": { - "sidebarTitle": "Update MCP server" + "sidebarTitle": "Create status page" } }, "responses": { @@ -21894,13 +21916,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/MCPServerItem" + "$ref": "#/components/schemas/CreateStatusPageResponse" } } } @@ -21909,32 +21931,9 @@ "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": [ - { - "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 + "page_id": 6294565612043, + "page_name": "My Status Page", + "page_url_name": "my-status-page" } } } @@ -21946,9 +21945,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21961,35 +21957,33 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServerUpdateRequest" + "$ref": "#/components/schemas/CreateStatusPageRequest" }, "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", - "description": "Query Prometheus metrics, alerts, and rules." + "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/delete": { + "/status-page/update": { "post": { - "operationId": "mcp-write-server-delete", - "summary": "Delete MCP server", - "description": "Delete an MCP server by ID.", + "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-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-update", "metadata": { - "sidebarTitle": "Delete MCP server" + "sidebarTitle": "Update status page" } }, "responses": { @@ -22000,14 +21994,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" } } } @@ -22015,7 +22008,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -22026,9 +22019,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22041,34 +22031,32 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServerDeleteRequest" + "$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/enable": { + "/status-page/delete": { "post": { - "operationId": "mcp-write-server-enable", - "summary": "Enable MCP server", - "description": "Enable a disabled 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-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-delete", "metadata": { - "sidebarTitle": "Enable MCP server" + "sidebarTitle": "Delete status page" } }, "responses": { @@ -22079,14 +22067,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" } } } @@ -22094,7 +22081,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -22105,9 +22092,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22120,34 +22104,29 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServerStatusRequest" + "$ref": "#/components/schemas/EmptyRequest" }, "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" + "page_id": 5750613685214 } } } } } }, - "/safari/mcp/server/disable": { + "/status-page/component/upsert": { "post": { - "operationId": "mcp-write-server-disable", - "summary": "Disable MCP server", - "description": "Disable an enabled MCP server.", + "operationId": "statusPageComponentUpsert", + "summary": "Upsert status page component", + "description": "Create or update a service component on 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-component-upsert", "metadata": { - "sidebarTitle": "Disable MCP server" + "sidebarTitle": "Upsert status page component" } }, "responses": { @@ -22158,14 +22137,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/UpsertStatusPageComponentResponse" } } } @@ -22173,7 +22151,11 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": { + "component_ids": [ + "01KP032KMN9YFBMPWANJMFZFG1" + ] + } } } } @@ -22184,9 +22166,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22199,34 +22178,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServerStatusRequest" + "$ref": "#/components/schemas/UpsertStatusPageComponentRequest" }, "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" + "page_id": 5750613685214, + "components": [ + { + "name": "Web Console", + "description": "Main web interface", + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", + "order_id": 1 + } + ] } } } } } }, - "/safari/a2a-agent/create": { + "/status-page/component/delete": { "post": { - "operationId": "remote-agent-write-create", - "summary": "Create A2A agent", - "description": "Register a new A2A remote agent from its agent-card URL.", + "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 | **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-delete", "metadata": { - "sidebarTitle": "Create A2A agent" + "sidebarTitle": "Delete status page component" } }, "responses": { @@ -22237,13 +22219,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/A2AAgentCreateResponse" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -22251,9 +22233,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" - } + "data": {} } } } @@ -22264,9 +22244,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22279,38 +22256,32 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentCreateRequest" + "$ref": "#/components/schemas/DeleteStatusPageComponentRequest" }, "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, + "component_ids": [ + "01KP032KMN9YFBMPWANJMFZFG1" + ] } } } } } }, - "/safari/a2a-agent/list": { + "/status-page/section/upsert": { "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": "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\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-section-upsert", "metadata": { - "sidebarTitle": "List A2A agents" + "sidebarTitle": "Upsert status page section" } }, "responses": { @@ -22321,13 +22292,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/A2AAgentListResponse" + "$ref": "#/components/schemas/UpsertStatusPageSectionResponse" } } } @@ -22336,32 +22307,9 @@ "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 + "section_ids": [ + "01KP032J1FV2H8DDGN0QSJ1CAR" + ] } } } @@ -22385,36 +22333,36 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentListRequest" + "$ref": "#/components/schemas/UpsertStatusPageSectionRequest" }, "example": { - "offset": 0, - "limit": 20, - "include_account": true + "page_id": 5750613685214, + "sections": [ + { + "name": "Core Services", + "description": "Our core services", + "order_id": 1 + } + ] } } } } } }, - "/safari/a2a-agent/get": { + "/status-page/section/delete": { "post": { - "operationId": "remote-agent-read-get", - "summary": "Get A2A agent detail", - "description": "Get one A2A agent by ID.", + "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 | 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-delete", "metadata": { - "sidebarTitle": "Get A2A agent detail" + "sidebarTitle": "Delete status page section" } }, "responses": { @@ -22425,13 +22373,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/A2AAgentItem" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -22439,29 +22387,7 @@ }, "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 - } + "data": {} } } } @@ -22484,34 +22410,32 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentIDRequest" + "$ref": "#/components/schemas/DeleteStatusPageSectionRequest" }, "example": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" + "page_id": 5750613685214, + "section_ids": [ + "01KP032J1FV2H8DDGN0QSJ1CAR" + ] } } } } } }, - "/safari/a2a-agent/update": { + "/status-page/template/upsert": { "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": "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-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-template-upsert", "metadata": { - "sidebarTitle": "Update A2A agent" + "sidebarTitle": "Upsert status page template" } }, "responses": { @@ -22522,14 +22446,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" } } } @@ -22537,7 +22460,9 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": { + "template_id": "01KP0339G5XDEPM4R86T2B23EP" + } } } } @@ -22548,9 +22473,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22563,35 +22485,36 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentUpdateRequest" + "$ref": "#/components/schemas/UpsertStatusPageTemplateRequest" }, "example": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", - "description": "Inspects deployment pipelines and proposes rollbacks." + "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/enable": { + "/status-page/template/delete": { "post": { - "operationId": "remote-agent-write-enable", - "summary": "Enable A2A agent", - "description": "Enable a disabled 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-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-delete", "metadata": { - "sidebarTitle": "Enable A2A agent" + "sidebarTitle": "Delete status page template" } }, "responses": { @@ -22602,14 +22525,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" } } } @@ -22617,7 +22539,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -22628,9 +22550,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22643,34 +22562,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/disable": { - "post": { - "operationId": "remote-agent-write-disable", - "summary": "Disable A2A agent", - "description": "Disable an enabled A2A agent.", + "/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-disable", + "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": "Disable A2A agent" + "sidebarTitle": "List status page templates" } }, "responses": { @@ -22681,14 +22597,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" } } } @@ -22696,7 +22611,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." + } + ] + } } } } @@ -22707,9 +22632,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22717,39 +22639,51 @@ "$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/a2a-agent/delete": { + "/safari/a2a-agent/create": { "post": { - "operationId": "remote-agent-write-delete", - "summary": "Delete A2A agent", - "description": "Soft-delete an A2A agent by ID.", - "tags": [ - "AI SRE/A2A agents" - ], + "operationId": "remote-agent-write-create", + "summary": "Create A2A agent", + "description": "Register a new A2A remote agent from its agent-card URL.", + "tags": [ + "en" + ], "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 | **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 | **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": "Delete A2A agent" + "sidebarTitle": "Create A2A agent" } }, "responses": { @@ -22766,8 +22700,7 @@ "type": "object", "properties": { "data": { - "type": "null", - "description": "Always null on success." + "$ref": "#/components/schemas/A2AAgentCreateResponse" } } } @@ -22775,7 +22708,9 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": { + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" + } } } } @@ -22801,23 +22736,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentIDRequest" + "$ref": "#/components/schemas/A2AAgentCreateRequest" }, "example": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" + "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/list": { + "/safari/a2a-agent/delete": { "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-delete", + "summary": "Delete A2A agent", + "description": "Soft-delete an A2A agent by ID.", "tags": [ - "AI SRE/Sessions" + "en" ], "security": [ { @@ -22825,10 +22767,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- 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": "List sessions" + "sidebarTitle": "Delete A2A agent" } }, "responses": { @@ -22845,7 +22787,8 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SessionListResponse" + "type": "null", + "description": "Always null on success." } } } @@ -22853,38 +22796,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 - } - ] - } + "data": null } } } @@ -22895,6 +22807,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22907,26 +22822,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SessionListRequest" + "$ref": "#/components/schemas/A2AAgentIDRequest" }, "example": { - "app_name": "ai-sre", - "limit": 2, - "orderby": "updated_at", - "scope": "all" + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" } } } } } }, - "/safari/session/get": { + "/safari/a2a-agent/disable": { "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-disable", + "summary": "Disable A2A agent", + "description": "Disable an enabled A2A agent.", "tags": [ - "AI SRE/Sessions" + "en" ], "security": [ { @@ -22934,10 +22846,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- 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": "Get session detail" + "sidebarTitle": "Disable A2A agent" } }, "responses": { @@ -22954,7 +22866,8 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SessionGetResponse" + "type": "null", + "description": "Always null on success." } } } @@ -22962,64 +22875,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 } } } @@ -23030,6 +22886,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23042,24 +22901,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/enable": { "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-enable", + "summary": "Enable A2A agent", + "description": "Enable a disabled A2A agent.", "tags": [ - "AI SRE/Sessions" + "en" ], "security": [ { @@ -23067,20 +22925,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, 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": "Export session transcript" + "sidebarTitle": "Enable 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 } } } @@ -23091,6 +22965,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23103,24 +22980,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/get": { "post": { - "operationId": "session-write-delete", - "summary": "Delete session", - "description": "Delete a session by ID.", + "operationId": "remote-agent-read-get", + "summary": "Get A2A agent detail", + "description": "Get one A2A agent by ID.", "tags": [ - "AI SRE/Sessions" + "en" ], "security": [ { @@ -23128,10 +23004,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 | **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": "Delete session" + "sidebarTitle": "Get A2A agent detail" } }, "responses": { @@ -23148,8 +23024,7 @@ "type": "object", "properties": { "data": { - "type": "null", - "description": "Always null on success." + "$ref": "#/components/schemas/A2AAgentItem" } } } @@ -23157,7 +23032,31 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": { + "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 + } } } } @@ -23180,29 +23079,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/list": { "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-list", + "summary": "List A2A agents", + "description": "List A2A agents visible to the caller across account and team scopes, with pagination.", "tags": [ - "On-call/Integrations" + "en" + ], + "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- 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": "Attempt IM person linking" + "sidebarTitle": "List A2A agents" } }, "responses": { @@ -23213,13 +23117,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/TryLinkPersonResponse" + "$ref": "#/components/schemas/A2AAgentListResponse" } } } @@ -23228,9 +23132,34 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "new_linked_person_ids": [ - 5348648172131 - ] + "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 } } } @@ -23254,29 +23183,36 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TryLinkPersonRequest" + "$ref": "#/components/schemas/A2AAgentListRequest" }, "example": { - "integration_id": 6113996590131 + "offset": 0, + "limit": 20, + "include_account": true } } } } } }, - "/incident/post-mortem/init": { + "/safari/a2a-agent/update": { "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-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" + "en" + ], + "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 | **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": "Initialize post-mortem" + "sidebarTitle": "Update A2A agent" } }, "responses": { @@ -23287,13 +23223,14 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/PostMortemItem" + "type": "null", + "description": "Always null on success." } } } @@ -23301,45 +23238,7 @@ }, "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": "" - } + "data": null } } } @@ -23350,6 +23249,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23362,32 +23264,35 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InitPostMortemRequest" + "$ref": "#/components/schemas/A2AAgentUpdateRequest" }, "example": { - "incident_ids": [ - "69bb9233331067560c718ecd" - ], - "template_id": "post_mortem_default_tmpl_en-us" + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", + "instructions": "Inspect deployment pipelines and propose rollbacks." } } } } } }, - "/incident/post-mortem/basics/reset": { + "/safari/automation/rule/create": { "post": { - "operationId": "postmortem-write-reset-basics", - "summary": "Update post-mortem basics", - "description": "Replace the incident facts stored in a post-mortem report.", + "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-basics", + "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 basics" + "sidebarTitle": "Create Automation rule" } }, "responses": { @@ -23398,13 +23303,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/AutomationRuleItem" } } } @@ -23412,7 +23317,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" + ] + } } } } @@ -23423,6 +23360,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23435,16 +23375,24 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResetPostMortemBasicsRequest" + "$ref": "#/components/schemas/AutomationRuleCreateRequest" }, "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 + "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" ] } } @@ -23452,19 +23400,24 @@ } } }, - "/incident/post-mortem/status/reset": { + "/safari/automation/rule/delete": { "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-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-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- 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 status" + "sidebarTitle": "Delete Automation rule" } }, "responses": { @@ -23475,13 +23428,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." } } } @@ -23489,7 +23443,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": null } } } @@ -23500,6 +23454,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23512,30 +23469,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResetPostMortemStatusRequest" + "$ref": "#/components/schemas/AutomationRuleIDRequest" }, "example": { - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", - "status": "published" + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b" } } } } } }, - "/incident/post-mortem/title/reset": { + "/safari/automation/rule/get": { "post": { - "operationId": "postmortem-write-reset-title", - "summary": "Update post-mortem title", - "description": "Replace the title of 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-title", + "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 title" + "sidebarTitle": "Get Automation rule" } }, "responses": { @@ -23546,13 +23507,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/AutomationRuleItem" } } } @@ -23560,7 +23521,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" + ] + } } } } @@ -23571,6 +23564,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23583,30 +23579,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/list": { "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-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-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`; 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": "Update post-mortem follow-ups" + "sidebarTitle": "List Automation rules" } }, "responses": { @@ -23617,13 +23617,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/AutomationRuleListResponse" } } } @@ -23631,7 +23631,44 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": { + "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" + ] + } + ] + } } } } @@ -23642,6 +23679,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23654,30 +23694,35 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResetPostMortemFollowUpsRequest" + "$ref": "#/components/schemas/AutomationRuleListRequest" }, "example": { - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", - "follow_ups": "- Add database saturation alert\n- Review cache TTL rollout" + "scope": "all", + "limit": 20 } } } } } }, - "/incident/post-mortem/template/upsert": { + "/safari/automation/rule/run": { "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-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-upsert-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": "Create or update post-mortem template" + "sidebarTitle": "Run Automation rule" } }, "responses": { @@ -23688,13 +23733,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/PostMortemTemplate" + "$ref": "#/components/schemas/ManualRunRuleResult" } } } @@ -23703,15 +23748,26 @@ "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 + "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" + } } } } @@ -23723,6 +23779,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23735,33 +23794,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpsertPostMortemTemplateRequest" + "$ref": "#/components/schemas/AutomationRuleIDRequest" }, "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." + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b" } } } } } }, - "/incident/post-mortem/template/delete": { + "/safari/automation/rule/update": { "post": { - "operationId": "postmortem-write-delete-template", - "summary": "Delete post-mortem template", - "description": "Delete a custom post-mortem template.", + "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 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 | **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": "Delete post-mortem template" + "sidebarTitle": "Update Automation rule" } }, "responses": { @@ -23772,13 +23832,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/AutomationRuleItem" } } } @@ -23786,7 +23846,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" + ] + } } } } @@ -23797,6 +23889,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23809,29 +23904,45 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeletePostMortemTemplateRequest" + "$ref": "#/components/schemas/AutomationRuleUpdateRequest" }, "example": { - "template_id": "post_mortem_custom_tmpl_01" + "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/list": { + "/safari/automation/run/list": { "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-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-list-templates", + "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": "List post-mortem templates" + "sidebarTitle": "List Automation runs" } }, "responses": { @@ -23842,13 +23953,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ListPostMortemTemplatesResponse" + "$ref": "#/components/schemas/AutomationRunListResponse" } } } @@ -23857,19 +23968,28 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "total": 2, - "has_next_page": false, - "items": [ + "total": 1, + "runs": [ { - "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 + "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 } ] } @@ -23883,6 +24003,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23895,32 +24018,36 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListPostMortemTemplatesRequest" + "$ref": "#/components/schemas/AutomationRunListRequest" }, "example": { - "p": 1, + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", "limit": 20, - "order_by": "created_at_seconds", - "asc": false + "trigger_kind": "schedule" } } } } } }, - "/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/template/list": { + "post": { + "operationId": "automation-template-read-list", + "summary": "List Automation templates", + "description": "List preset Automation templates for the requested locale.", "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`; results are filtered to the caller's visible scope |\n", + "href": "/en/api-reference/ai-sre/automations/automation-template-read-list", "metadata": { - "sidebarTitle": "Get post-mortem template detail" + "sidebarTitle": "List Automation templates" } }, "responses": { @@ -23931,13 +24058,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/PostMortemTemplate" + "$ref": "#/components/schemas/AutomationTemplateListResponse" } } } @@ -23946,15 +24073,15 @@ "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 + "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" + } + ] } } } @@ -23966,6 +24093,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23973,32 +24103,39 @@ "$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/AutomationTemplateListRequest" + }, + "example": { + "locale": "en-US" + } + } } - ] + } } }, - "/monit/preview/sync": { + "/safari/mcp/server/create": { "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": "mcp-write-server-create", + "summary": "Create MCP server", + "description": "Register a new MCP server (connector) on the account.", "tags": [ - "Monitors/Monitor utilities" + "AI SRE/MCP servers" + ], + "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 | **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": "Preview datasource query" + "sidebarTitle": "Create MCP server" } }, "responses": { @@ -24009,13 +24146,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/PreviewSyncResponse" + "$ref": "#/components/schemas/MCPServerItem" } } } @@ -24024,11 +24161,34 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "status": "success", - "data": { - "resultType": "vector", - "result": [] - } + "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 } } } @@ -24040,6 +24200,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24052,32 +24215,38 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PreviewSyncRequest" + "$ref": "#/components/schemas/MCPServerCreateRequest" }, "example": { - "ds_type": "prometheus", - "ds_name": "Prometheus Prod", - "expr": "rate(http_requests_total[5m])", - "delay_seconds": 0 + "server_name": "prometheus", + "description": "Query Prometheus metrics and alerts.", + "transport": "streamable-http", + "url": "https://mcp.example.com/prometheus", + "status": "enabled" } } } } } }, - "/status-page/info": { - "get": { - "operationId": "statusPageInfo", - "summary": "Get status page detail", - "description": "Retrieve detailed configuration for a specific status page.", + "/safari/mcp/server/delete": { + "post": { + "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 | 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- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-delete", "metadata": { - "sidebarTitle": "Get status page detail" + "sidebarTitle": "Delete MCP server" } }, "responses": { @@ -24088,13 +24257,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." } } } @@ -24102,50 +24272,7 @@ }, "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": [ - { - "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", - "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", - "name": "Web Console", - "available_since_seconds": 1765349358, - "order_id": 1 - } - ], - "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" - } + "data": null } } } @@ -24156,6 +24283,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24163,32 +24293,39 @@ "$ref": "#/components/responses/ServerError" } }, - "parameters": [ - { - "name": "page_id", - "in": "query", - "required": true, - "schema": { - "type": "string" - }, - "description": "Status page ID" - } - ] - } - }, - "/status-page/create": { - "post": { - "operationId": "statusPageCreate", - "summary": "Create status page", - "description": "Create a new status page.", - "tags": [ - "On-call/Status pages" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPServerDeleteRequest" + }, + "example": { + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" + } + } + } + } + } + }, + "/safari/mcp/server/disable": { + "post": { + "operationId": "mcp-write-server-disable", + "summary": "Disable MCP server", + "description": "Disable an enabled MCP server.", + "tags": [ + "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- 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": "Create status page" + "sidebarTitle": "Disable MCP server" } }, "responses": { @@ -24199,13 +24336,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." } } } @@ -24213,11 +24351,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "page_id": 6294565612043, - "page_name": "My Status Page", - "page_url_name": "my-status-page" - } + "data": null } } } @@ -24228,6 +24362,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24240,33 +24377,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateStatusPageRequest" + "$ref": "#/components/schemas/MCPServerStatusRequest" }, "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/enable": { "post": { - "operationId": "statusPageUpdate", - "summary": "Update status page", - "description": "Update an existing status page configuration.", + "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-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- 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": "Update status page" + "sidebarTitle": "Enable MCP server" } }, "responses": { @@ -24277,13 +24415,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." } } } @@ -24291,7 +24430,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": null } } } @@ -24302,6 +24441,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24314,32 +24456,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/get": { "post": { - "operationId": "statusPageDelete", - "summary": "Delete status page", - "description": "Delete 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-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 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": "Delete status page" + "sidebarTitle": "Get MCP server detail" } }, "responses": { @@ -24350,13 +24494,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/MCPServerItem" } } } @@ -24364,7 +24508,36 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": { + "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 + } } } } @@ -24387,29 +24560,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EmptyRequest" + "$ref": "#/components/schemas/MCPServerGetRequest" }, "example": { - "page_id": 5750613685214 + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" } } } } } }, - "/status-page/component/upsert": { + "/safari/mcp/server/list": { "post": { - "operationId": "statusPageComponentUpsert", - "summary": "Upsert status page component", - "description": "Create or update a service component on 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-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 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": "Upsert status page component" + "sidebarTitle": "List MCP servers" } }, "responses": { @@ -24420,13 +24598,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/UpsertStatusPageComponentResponse" + "$ref": "#/components/schemas/MCPServerListResponse" } } } @@ -24435,8 +24613,38 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "component_ids": [ - "01KP032KMN9YFBMPWANJMFZFG1" + "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 + } ] } } @@ -24461,37 +24669,36 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpsertStatusPageComponentRequest" + "$ref": "#/components/schemas/MCPServerListRequest" }, "example": { - "page_id": 5750613685214, - "components": [ - { - "name": "Web Console", - "description": "Main web interface", - "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", - "order_id": 1 - } - ] + "p": 1, + "limit": 20, + "include_account": true } } } } } }, - "/status-page/component/delete": { + "/safari/mcp/server/update": { "post": { - "operationId": "statusPageComponentDelete", - "summary": "Delete status page component", - "description": "Delete a service component from 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-component-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- 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": "Delete status page component" + "sidebarTitle": "Update MCP server" } }, "responses": { @@ -24502,13 +24709,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/MCPServerItem" } } } @@ -24516,7 +24723,36 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": { + "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 + } } } } @@ -24527,6 +24763,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24539,32 +24778,35 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteStatusPageComponentRequest" + "$ref": "#/components/schemas/MCPServerUpdateRequest" }, "example": { - "page_id": 5750613685214, - "component_ids": [ - "01KP032KMN9YFBMPWANJMFZFG1" - ] + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", + "description": "Query Prometheus metrics, alerts, and rules." } } } } } }, - "/status-page/section/upsert": { + "/safari/session/delete": { "post": { - "operationId": "statusPageSectionUpsert", - "summary": "Upsert status page section", - "description": "Create or update a section on 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-upsert", + "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": "Upsert status page section" + "sidebarTitle": "Delete session" } }, "responses": { @@ -24575,13 +24817,14 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/UpsertStatusPageSectionResponse" + "type": "null", + "description": "Always null on success." } } } @@ -24589,11 +24832,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "section_ids": [ - "01KP032J1FV2H8DDGN0QSJ1CAR" - ] - } + "data": null } } } @@ -24604,6 +24843,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24616,61 +24858,44 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpsertStatusPageSectionRequest" + "$ref": "#/components/schemas/SessionDeleteRequest" }, "example": { - "page_id": 5750613685214, - "sections": [ - { - "name": "Core Services", - "description": "Our core services", - "order_id": 1 - } - ] + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" } } } } } }, - "/status-page/section/delete": { + "/safari/session/export": { "post": { - "operationId": "statusPageSectionDelete", - "summary": "Delete status page section", - "description": "Delete a section from 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-section-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **20 requests/minute**; **1 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": "Delete status page section" + "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/EmptyResponse" - } - } - } - ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "type": "string", + "description": "Newline-delimited JSON stream. Parse line-by-line; do not buffer the whole body." } } } @@ -24681,6 +24906,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24693,32 +24921,35 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteStatusPageSectionRequest" + "$ref": "#/components/schemas/SessionExportRequest" }, "example": { - "page_id": 5750613685214, - "section_ids": [ - "01KP032J1FV2H8DDGN0QSJ1CAR" - ] + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "include_subagents": false } } } } } }, - "/status-page/template/upsert": { + "/safari/session/get": { "post": { - "operationId": "statusPageTemplateUpsert", - "summary": "Upsert status page template", - "description": "Create or update an event template for 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-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- 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": "Upsert status page template" + "sidebarTitle": "Get session detail" } }, "responses": { @@ -24729,13 +24960,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/UpsertStatusPageTemplateResponse" + "$ref": "#/components/schemas/SessionGetResponse" } } } @@ -24744,7 +24975,75 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "template_id": "01KP0339G5XDEPM4R86T2B23EP" + "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 } } } @@ -24756,6 +25055,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24768,36 +25070,35 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpsertStatusPageTemplateRequest" + "$ref": "#/components/schemas/SessionGetRequest" }, "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", + "num_recent_events": 50 } } } } } }, - "/status-page/template/delete": { + "/safari/session/list": { "post": { - "operationId": "statusPageTemplateDelete", - "summary": "Delete status page template", - "description": "Delete an event template from a status page.", + "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 | **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- 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": "Delete status page template" + "sidebarTitle": "List sessions" } }, "responses": { @@ -24808,13 +25109,13 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/SessionListResponse" } } } @@ -24822,17 +25123,64 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} - } - } - } - }, + "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_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 + } + } + } + } + }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24845,31 +25193,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteStatusPageTemplateRequest" + "$ref": "#/components/schemas/SessionListRequest" }, "example": { - "page_id": 5720156736380, - "type": "pre_defined", - "template_id": "01KP0339G5XDEPM4R86T2B23EP" + "app_name": "ai-sre", + "limit": 2, + "orderby": "updated_at", + "scope": "all" } } } } } }, - "/status-page/template/list": { - "get": { - "operationId": "statusPageTemplateList", - "summary": "List status page templates", - "description": "List all event templates for a status page.", + "/safari/skill/delete": { + "post": { + "operationId": "skill-write-delete", + "summary": "Delete skill", + "description": "Delete a skill by ID.", "tags": [ - "On-call/Status pages" + "AI SRE/Skills" + ], + "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 | **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": "List status page templates" + "sidebarTitle": "Delete skill" } }, "responses": { @@ -24880,13 +25234,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." } } } @@ -24894,17 +25249,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "items": [ - { - "template_id": "01KC8KP6PHVPSCAB0BTKZBN2HR", - "title": "Service Disruption", - "type": "incident", - "status": "identified", - "description": "We have identified the root cause." - } - ] - } + "data": null } } } @@ -24915,6 +25260,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24922,40 +25270,28 @@ "$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/SkillDeleteRequest" + }, + "example": { + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + } + } } - ] + } } }, - "/safari/automation/rule/create": { + "/safari/skill/disable": { "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-disable", + "summary": "Disable skill", + "description": "Disable an enabled skill so the agent stops loading it.", "tags": [ - "AI SRE/Automations" + "AI SRE/Skills" ], "security": [ { @@ -24963,10 +25299,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- 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": "Create Automation rule" + "sidebarTitle": "Disable skill" } }, "responses": { @@ -24983,7 +25319,8 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationRuleItem" + "type": "null", + "description": "Always null on success." } } } @@ -24991,38 +25328,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 } } } @@ -25048,37 +25354,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationRuleCreateRequest" + "$ref": "#/components/schemas/SkillStatusRequest" }, "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/enable": { "post": { - "operationId": "automation-rule-read-list", - "summary": "List Automation rules", - "description": "List Automation rules visible to the caller.", + "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": [ { @@ -25086,10 +25378,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 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": "List Automation rules" + "sidebarTitle": "Enable skill" } }, "responses": { @@ -25106,7 +25398,8 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationRuleListResponse" + "type": "null", + "description": "Always null on success." } } } @@ -25114,42 +25407,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 } } } @@ -25175,24 +25433,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/get": { "post": { - "operationId": "automation-rule-read-get", - "summary": "Get Automation rule", - "description": "Get one Automation rule by ID.", + "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": [ { @@ -25200,10 +25457,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 | **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": "Get Automation rule" + "sidebarTitle": "Get skill detail" } }, "responses": { @@ -25220,7 +25477,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationRuleItem" + "$ref": "#/components/schemas/SkillItem" } } } @@ -25229,35 +25486,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, - "schedule_next_fire_at_ms": 1780630800000, - "oncall_incident_trigger_id": "autotrg_9cFr2kLm8qNv5pXs4dWy7a", - "oncall_incident_trigger_enabled": true, - "oncall_incident_channel_ids": [ - 2468013579 + "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" } } } @@ -25269,9 +25521,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -25284,23 +25533,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationRuleIDRequest" + "$ref": "#/components/schemas/SkillGetRequest" }, "example": { - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b" + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" } } } } } }, - "/safari/automation/rule/update": { + "/safari/skill/list": { "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-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": [ { @@ -25308,10 +25557,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- 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": "Update Automation rule" + "sidebarTitle": "List skills" } }, "responses": { @@ -25328,7 +25577,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationRuleItem" + "$ref": "#/components/schemas/SkillListResponse" } } } @@ -25337,35 +25586,32 @@ "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" + "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 + } ] } } @@ -25378,9 +25624,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -25393,34 +25636,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationRuleUpdateRequest" + "$ref": "#/components/schemas/SkillListRequest" }, "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 - ] + "p": 1, + "limit": 20, + "include_account": true } } } } } }, - "/safari/automation/rule/delete": { + "/safari/skill/update": { "post": { - "operationId": "automation-rule-write-delete", - "summary": "Delete Automation rule", - "description": "Delete an Automation rule.", + "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": [ { @@ -25428,10 +25662,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 | **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": "Delete Automation rule" + "sidebarTitle": "Update skill" } }, "responses": { @@ -25448,8 +25682,7 @@ "type": "object", "properties": { "data": { - "type": "null", - "description": "Always null on success." + "$ref": "#/components/schemas/SkillItem" } } } @@ -25457,7 +25690,30 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "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 + } } } } @@ -25483,23 +25739,24 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationRuleIDRequest" + "$ref": "#/components/schemas/SkillUpdateRequest" }, "example": { - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b" + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", + "description": "Updated triage runbook." } } } } } }, - "/safari/automation/template/list": { + "/safari/skill/upload": { "post": { - "operationId": "automation-template-read-list", - "summary": "List Automation templates", - "description": "List preset Automation templates for the requested locale.", + "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": [ { @@ -25507,10 +25764,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 | **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 templates" + "sidebarTitle": "Upload skill" } }, "responses": { @@ -25527,7 +25784,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationTemplateListResponse" + "$ref": "#/components/schemas/SkillItem" } } } @@ -25536,15 +25793,29 @@ "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": "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 } } } @@ -25569,136 +25840,32 @@ "requestBody": { "required": true, "content": { - "application/json": { + "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/AutomationTemplateListRequest" + "$ref": "#/components/schemas/SkillUploadRequest" }, "example": { - "locale": "en-US" + "team_id": 0, + "replace": false } } } } - } - }, - "/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": [ - "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 | Valid `app_key`; results are filtered to the caller's visible scope |\n", - "href": "/en/api-reference/ai-sre/automations/automation-run-read-list", - "metadata": { - "sidebarTitle": "List Automation runs" - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/ResponseEnvelope" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/AutomationRunListResponse" - } - } - } - ] - }, - "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 - } - ] - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "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/AutomationRunListRequest" - }, - "example": { - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b", - "limit": 20, - "trigger_kind": "schedule" - } - } - } - } - } - } - }, - "components": { - "securitySchemes": { - "AppKeyAuth": { - "type": "apiKey", - "in": "query", - "name": "app_key", - "description": "App key issued from the Flashduty console under Account → APP Keys. Required on every public API call. Keep it secret — it grants the same access as the owning account." - }, - "AutomationTriggerBearerAuth": { - "type": "http", - "scheme": "bearer", - "description": "Bearer token generated for one Automation HTTP POST trigger. This is not an app_key." + } + } + }, + "components": { + "securitySchemes": { + "AppKeyAuth": { + "type": "apiKey", + "in": "query", + "name": "app_key", + "description": "App key issued from the Flashduty console under Account → APP Keys. Required on every public API call. Keep it secret — it grants the same access as the owning account." + }, + "AutomationTriggerBearerAuth": { + "type": "http", + "scheme": "bearer", + "description": "Bearer token generated for one Automation HTTP POST trigger. This is not an app_key." } }, "responses": { @@ -25832,7 +25999,7 @@ "schemas": { "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", @@ -25854,30 +26021,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", @@ -25888,8 +26032,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": [ @@ -35654,6 +35797,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." } } }, @@ -36149,6 +36296,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." } } }, @@ -42347,146 +42529,6 @@ } } }, - "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": { @@ -42671,268 +42713,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": { @@ -43004,32 +42784,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": { @@ -43047,41 +42801,6 @@ } } }, - "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": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkillItem" - }, - "description": "Skills on this page." - } - }, - "required": [ - "total", - "skills" - ] - }, "ResponseEnvelope": { "type": "object", "description": "Standard response envelope used by every Flashduty public API. On success `data` contains the endpoint-specific payload and `error` is absent. On failure `error` is present and `data` is absent. `request_id` is always present and is also mirrored in the `Flashcat-Request-Id` response header.", @@ -43169,3690 +42888,4642 @@ } } }, - "SkillStatusRequest": { + "ListWarRoomEnabledResponse": { "type": "object", - "description": "Skill enable/disable by ID.", "properties": { - "skill_id": { - "type": "string", - "description": "Target skill ID." + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WarRoomDataSourceItem" + }, + "description": "IM integrations with the war-room feature enabled." } - }, - "required": [ - "skill_id" - ] + } }, - "MCPServerCreateRequest": { + "WarRoomDataSourceItem": { "type": "object", - "description": "Configuration for a new MCP server.", "properties": { - "server_name": { + "data_source_id": { + "type": "integer", + "description": "Integration ID.", + "format": "int64" + }, + "account_id": { + "type": "integer", + "description": "Account this integration belongs to.", + "format": "int64" + }, + "team_id": { + "type": "integer", + "description": "Team that owns this integration.", + "format": "int64" + }, + "plugin_id": { + "type": "integer", + "description": "Plugin ID backing this integration.", + "format": "int64" + }, + "name": { "type": "string", - "description": "MCP server name, unique within the account.", - "minLength": 1, - "maxLength": 255 + "description": "Integration name." }, - "description": { + "status": { "type": "string", - "description": "Server description.", - "minLength": 1, - "maxLength": 1024 + "description": "Current status of the integration." }, - "transport": { + "category": { "type": "string", - "description": "Transport protocol.", - "enum": [ - "stdio", - "sse", - "streamable-http" - ] + "description": "Category of the integration plugin." }, - "command": { + "plugin_type": { "type": "string", - "description": "Executable command (stdio transport)." + "description": "Type identifier of the integration plugin." }, - "args": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Command arguments (stdio transport)." + "plugin_type_name": { + "type": "string", + "description": "Localized display name of the integration plugin type." }, - "env": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Environment variables (stdio transport)." + "description": { + "type": "string", + "description": "Integration description." }, - "url": { + "integration_key": { "type": "string", - "description": "Server URL (sse / streamable-http transport)." + "description": "Push key used by alert sources to send to this integration." }, - "headers": { + "ref_id": { + "type": "string", + "description": "External reference ID of the integration." + }, + "settings": { "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "HTTP headers (sse / streamable-http)." + "additionalProperties": true, + "description": "Plugin-specific configuration of the integration." }, - "connect_timeout": { - "type": "integer", - "description": "Connection timeout in seconds. 0 = default (10s)." + "no_editable": { + "type": "boolean", + "description": "Whether the integration is read-only." }, - "call_timeout": { + "creator_id": { "type": "integer", - "description": "Tool-call timeout in seconds. 0 = default (60s)." + "description": "Person who created the integration.", + "format": "int64" }, - "auth_mode": { - "type": "string", - "description": "Authentication mode: shared (default), per_user_secret, or per_user_oauth." + "updated_by": { + "type": "integer", + "description": "Person who last updated the integration.", + "format": "int64" }, - "secret_schema": { - "type": "string", - "description": "JSON secret schema; required when auth_mode=per_user_secret." + "created_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds when the integration was created." }, - "oauth_metadata": { - "type": "string", - "description": "JSON OAuth metadata; reserved for per_user_oauth." + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds when the integration was last updated." }, - "status": { - "type": "string", - "description": "Initial status.", - "enum": [ - "enabled", - "disabled" - ], - "default": "enabled" + "last_time": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds of the most recent activity on the integration." }, - "team_id": { + "exclusive_data_source_id": { "type": "integer", - "description": "Team scope: 0 = account-wide; >0 = team.", + "description": "Exclusive integration ID associated with this integration.", "format": "int64" }, - "source_template_name": { - "type": "string", - "description": "Marketplace template name when created from a connector template." + "integration_id": { + "type": "integer", + "description": "Integration ID, alias of data_source_id.", + "format": "int64" } - }, - "required": [ - "server_name", - "description", - "transport" - ] + } }, - "MCPServerDeleteRequest": { + "AddWarRoomMemberRequest": { "type": "object", - "description": "MCP server deletion by ID.", "properties": { - "server_id": { + "integration_id": { + "type": "integer", + "description": "IM integration that hosts the war room.", + "format": "int64" + }, + "chat_id": { "type": "string", - "description": "Target MCP server ID." + "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": [ - "server_id" + "integration_id", + "chat_id", + "member_ids" ] }, - "SkillListRequest": { + "AccountInfo": { "type": "object", - "description": "Pagination and team filter for listing skills.", "properties": { - "p": { + "account_id": { "type": "integer", - "description": "Page number, 1-based.", - "default": 1 + "description": "Account identifier." }, - "limit": { - "type": "integer", - "description": "Page size.", - "default": 20 + "account_name": { + "type": "string", + "description": "Account name." }, - "team_ids": { + "domain": { + "type": "string", + "description": "Primary account domain (login subdomain)." + }, + "extra_domains": { "type": "array", "items": { - "type": "integer", - "format": "int64" + "type": "string" }, - "description": "Filter to these team IDs; empty = the caller's visible set." + "description": "Additional account domains." }, - "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": { + "phone": { "type": "string", - "description": "Target MCP server ID." + "description": "Account contact phone, masked for privacy." }, - "server_name": { + "country_code": { "type": "string", - "description": "New name.", - "minLength": 1, - "maxLength": 255 + "description": "Calling country code for the contact phone." }, - "description": { + "email": { "type": "string", - "description": "New description.", - "minLength": 1, - "maxLength": 1024 + "description": "Account contact email." }, - "transport": { + "avatar": { "type": "string", - "description": "Transport protocol.", - "enum": [ - "stdio", - "sse", - "streamable-http" - ] + "description": "Account avatar URL." }, - "command": { + "locale": { "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)." + "description": "Account language preference (e.g. zh-CN, en-US)." }, - "url": { + "time_zone": { "type": "string", - "description": "Server URL (sse / streamable-http transport)." - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "HTTP headers (sse / streamable-http)." + "description": "Account default timezone (IANA name, e.g. Asia/Shanghai)." }, - "connect_timeout": { + "created_at": { "type": "integer", - "description": "Connection timeout in seconds. 0 = default (10s)." + "format": "int64", + "description": "Account creation time, Unix timestamp in seconds." }, - "call_timeout": { - "type": "integer", - "description": "Tool-call timeout in seconds. 0 = default (60s)." + "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." + } + } }, - "auth_mode": { + "mp_plat": { "type": "string", - "description": "Authentication mode: shared (default), per_user_secret, or per_user_oauth." + "description": "Cloud marketplace platform the account was provisioned from (present only for marketplace accounts)." }, - "secret_schema": { + "mp_account_id": { "type": "string", - "description": "JSON secret schema; required when auth_mode=per_user_secret." + "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." }, - "oauth_metadata": { + "type": { "type": "string", - "description": "JSON OAuth metadata; reserved for per_user_oauth." + "description": "Template channel type that selects the rendering engine." }, - "team_id": { - "type": [ - "integer", - "null" - ], - "description": "Reassign team scope: 0 = account-wide; >0 = team. Omit to leave unchanged.", - "format": "int64" + "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": [ - "server_id" + "content", + "type" ] }, - "ListWarRoomEnabledResponse": { + "ListStatusPageResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { - "$ref": "#/components/schemas/WarRoomDataSourceItem" + "$ref": "#/components/schemas/StatusPageItem" }, - "description": "IM integrations with the war-room feature enabled." + "description": "Status pages owned by the account." } } }, - "WarRoomDataSourceItem": { + "StatusPageItem": { "type": "object", "properties": { - "data_source_id": { - "type": "integer", - "description": "Integration ID.", - "format": "int64" - }, - "account_id": { - "type": "integer", - "description": "Account this integration belongs to.", - "format": "int64" - }, - "team_id": { - "type": "integer", - "description": "Team that owns this integration.", - "format": "int64" - }, - "plugin_id": { + "page_id": { "type": "integer", - "description": "Plugin ID backing this integration.", + "description": "Status page ID.", "format": "int64" }, "name": { "type": "string", - "description": "Integration name." + "description": "Display name of the status page." }, - "status": { + "url_name": { "type": "string", - "description": "Current status of the integration." + "description": "URL-safe slug, unique per account." }, - "category": { + "type": { "type": "string", - "description": "Category of the integration plugin." + "description": "Visibility type of the status page.", + "enum": [ + "public", + "internal" + ] }, - "plugin_type": { + "custom_domain": { "type": "string", - "description": "Type identifier of the integration plugin." + "description": "Custom domain pointing to the status page." }, - "plugin_type_name": { + "logo": { "type": "string", - "description": "Localized display name of the integration plugin type." + "description": "Logo image of the status page." }, - "description": { + "dark_logo": { "type": "string", - "description": "Integration description." + "description": "Dark-mode logo image of the status page." }, - "integration_key": { + "logo_url": { "type": "string", - "description": "Push key used by alert sources to send to this integration." + "description": "URL opened when the logo is clicked." }, - "ref_id": { + "favicon": { "type": "string", - "description": "External reference ID of the integration." + "description": "Favicon of the status page." }, - "settings": { - "type": "object", - "additionalProperties": true, - "description": "Plugin-specific configuration of the integration." + "page_header": { + "type": "string", + "description": "Header content of the status page." }, - "no_editable": { - "type": "boolean", - "description": "Whether the integration is read-only." + "page_footer": { + "type": "string", + "description": "Footer content of the status page." }, - "creator_id": { - "type": "integer", - "description": "Person who created the integration.", - "format": "int64" + "date_view": { + "type": "string", + "description": "How the timeline is displayed.", + "enum": [ + "calendar", + "list" + ] }, - "updated_by": { - "type": "integer", - "description": "Person who last updated the integration.", - "format": "int64" + "display_uptime_mode": { + "type": "string", + "description": "How uptime is displayed.", + "enum": [ + "chart_and_percentage", + "chart", + "none" + ] }, - "created_at": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in seconds when the integration was created." + "custom_links": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description": "Custom navigation links shown on the status page." }, - "updated_at": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in seconds when the integration was last updated." + "contact_info": { + "type": "string", + "description": "Get-in-touch contact, a mailto or website URL." }, - "last_time": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in seconds of the most recent activity on the integration." + "components": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusPageComponentItem" + }, + "description": "Components tracked on the status page." }, - "exclusive_data_source_id": { - "type": "integer", - "description": "Exclusive integration ID associated with this integration.", - "format": "int64" + "sections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusPageSectionItem" + }, + "description": "Sections grouping the components." }, - "integration_id": { - "type": "integer", - "description": "Integration ID, alias of data_source_id.", - "format": "int64" + "subscription": { + "$ref": "#/components/schemas/StatusPageSubscriptionItem" + }, + "template_preference": { + "type": "string", + "description": "Preferred change-event template type." } } }, - "A2AAgentListResponse": { + "StatusPageSubscriptionItem": { "type": "object", - "description": "Paginated A2A agent list.", "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/A2AAgentItem" - }, - "description": "A2A agents on this page." + "email": { + "type": "boolean", + "description": "Whether email subscription is enabled." }, - "total": { - "type": "integer", - "description": "Total number of matching agents.", - "format": "int64" + "im": { + "type": "boolean", + "description": "Whether IM subscription is enabled." } - }, - "required": [ - "items", - "total" - ] + } }, - "A2AAgentItem": { + "StatusPageSectionItem": { "type": "object", - "description": "A registered A2A (agent-to-agent) remote agent.", "properties": { - "agent_id": { + "section_id": { "type": "string", - "description": "Unique A2A agent ID (prefix `a2a_`)." - }, - "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 agent." + "description": "Section ID." }, - "agent_name": { + "name": { "type": "string", - "description": "Agent display name." + "description": "Section name." }, "description": { "type": "string", - "description": "Agent description." - }, - "card_url": { - "type": "string", - "description": "URL of the remote agent card." - }, - "auth_type": { - "type": "string", - "description": "Authentication type for reaching the remote agent." + "description": "Section description." }, - "auth_config": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Authentication config; secret values are masked." + "order_id": { + "type": "integer", + "description": "Display order of the section.", + "format": "int64" }, - "streaming": { + "hide_uptime": { "type": "boolean", - "description": "Whether the remote agent supports streaming responses." - }, - "status": { - "type": "string", - "description": "Agent status.", - "enum": [ - "enabled", - "disabled" - ] + "description": "Whether uptime data is hidden from summary responses." }, - "agent_card_name": { + "hide_all": { + "type": "boolean", + "description": "Whether the section and its components are hidden from summary endpoints." + } + } + }, + "DeletePostMortemTemplateRequest": { + "type": "object", + "description": "Parameters for deleting a post-mortem template.", + "required": [ + "template_id" + ], + "properties": { + "template_id": { "type": "string", - "description": "Agent name resolved from the remote card." - }, - "agent_card_skills": { + "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": "Skills advertised by the remote card." - }, - "card_resolve_timeout": { - "type": "integer", - "description": "Card-resolution timeout in seconds." - }, - "task_timeout": { - "type": "integer", - "description": "Single-task execution timeout in seconds." + "description": "Incident IDs to link to the report. 1-10 incidents." }, - "auth_mode": { + "template_id": { "type": "string", - "description": "Authentication mode.", - "enum": [ - "shared", - "per_user_secret", - "per_user_oauth" - ] - }, - "secret_schema": { + "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": "JSON-encoded secret schema (per_user_secret mode)." + "enum": [ + "created_at_seconds" + ], + "description": "Field used to order results." }, - "oauth_metadata": { - "type": "string", - "description": "JSON-encoded OAuth metadata (per_user_oauth mode)." + "asc": { + "type": "boolean", + "description": "Ascending order when true." }, - "created_by": { + "p": { "type": "integer", - "description": "Member ID that created the agent.", - "format": "int64" + "format": "int64", + "minimum": 0, + "description": "Page number starting at 1." }, - "created_at": { + "limit": { "type": "integer", "format": "int64", - "description": "Creation time. Unix timestamp in milliseconds." + "minimum": 0, + "maximum": 100, + "default": 20, + "description": "Page size, at most 100." }, - "updated_at": { + "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": "Last update time. Unix timestamp in milliseconds." + "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": [ - "agent_id", "account_id", - "team_id", - "can_edit", - "agent_name", + "template_id", + "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.", + "content", + "content_markdown", + "team_id", + "created_at_seconds", + "updated_at_seconds" + ], "properties": { - "agent_id": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID that owns the template. 0 for built-in templates." + }, + "template_id": { "type": "string", - "description": "Target agent ID." + "description": "Template ID. Built-in templates use a stable `post_mortem_default_tmpl_*` ID." }, - "agent_name": { - "type": [ - "string", - "null" - ], - "description": "New display name. Omit to leave unchanged.", - "maxLength": 128 + "name": { + "type": "string", + "description": "Template name shown in the console." }, "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." + "type": "string", + "description": "Template description." }, - "auth_config": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Replace the auth config. Omit to leave unchanged." + "content": { + "type": "string", + "description": "BlockNote JSON content used to initialize the report body." }, - "streaming": { - "type": [ - "boolean", - "null" - ], - "description": "Toggle streaming support. Omit to leave unchanged." + "content_markdown": { + "type": "string", + "description": "Markdown version of the template content, used by AI generation." }, "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." + "type": "integer", + "format": "int64", + "description": "Managing team ID. Built-in templates use 0." }, - "secret_schema": { - "type": [ - "string", - "null" - ], - "description": "New JSON secret schema." + "created_at_seconds": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds when the template was created." }, - "oauth_metadata": { - "type": [ - "string", - "null" - ], - "description": "New JSON OAuth metadata." + "updated_at_seconds": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds when the template was last updated." } - }, - "required": [ - "agent_id" - ] + } }, - "A2AAgentCreateRequest": { + "PreviewSyncRequest": { "type": "object", - "description": "Registration parameters for a new A2A agent.", + "required": [ + "ds_type", + "ds_name", + "expr" + ], + "description": "Parameters for a synchronous datasource query preview.", "properties": { - "agent_name": { + "ds_type": { "type": "string", - "description": "Agent display name.", - "maxLength": 128 + "description": "Datasource type, e.g. `prometheus`, `loki`, `elasticsearch`." }, - "description": { + "ds_name": { "type": "string", - "description": "Agent description.", - "maxLength": 2000 + "description": "Datasource display name as configured in the account." }, - "card_url": { + "expr": { "type": "string", - "description": "URL of the remote agent card." + "description": "Query expression. Format depends on `ds_type` (PromQL for Prometheus, LogQL for Loki, etc.)." }, - "auth_type": { - "type": "string", - "description": "Authentication type for the remote agent." + "delay_seconds": { + "type": "integer", + "description": "Shift the query window backward by this many seconds to compensate for data ingestion latency." }, - "auth_config": { + "args": { "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." + "description": "Additional type-specific query arguments." } - }, - "required": [ - "agent_name", - "card_url" - ] + } }, - "MCPServerListRequest": { + "PreviewSyncResponse": { + "type": "object", + "description": "Raw JSON response from the datasource. Schema varies by datasource type." + }, + "ResetPostMortemBasicsRequest": { "type": "object", - "description": "Pagination and team filter for listing MCP servers.", + "description": "Basic incident facts to write back to a post-mortem report.", + "required": [ + "post_mortem_id", + "incidents_highest_severity", + "incidents_earliest_start_seconds" + ], "properties": { - "p": { + "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", - "description": "Page number, 1-based.", - "default": 1 + "format": "int64", + "minimum": 1, + "description": "Unix timestamp in seconds for the earliest linked incident start time." }, - "limit": { + "incidents_latest_close_seconds": { "type": "integer", - "description": "Page size.", - "default": 20 + "format": "int64", + "minimum": 0, + "description": "Unix timestamp in seconds for the latest linked incident close time. 0 when still open." }, - "team_ids": { + "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": "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." + "description": "Responder member IDs to store on the report." } } }, - "A2AAgentCreateResponse": { + "ResetPostMortemFollowUpsRequest": { "type": "object", - "description": "Result of registering an A2A agent.", + "description": "Parameters for replacing post-mortem follow-up action items.", + "required": [ + "post_mortem_id" + ], "properties": { - "agent_id": { + "post_mortem_id": { "type": "string", - "description": "ID of the newly created agent." + "description": "Post-mortem ID." + }, + "follow_ups": { + "type": "string", + "description": "Follow-up action items as free text." } - }, - "required": [ - "agent_id" - ] + } }, - "AddWarRoomMemberRequest": { + "ResetPostMortemStatusRequest": { "type": "object", + "description": "Parameters for changing a post-mortem report status.", + "required": [ + "post_mortem_id", + "status" + ], "properties": { - "integration_id": { - "type": "integer", - "description": "IM integration that hosts the war room.", - "format": "int64" - }, - "chat_id": { + "post_mortem_id": { "type": "string", - "description": "Chat ID of the war room within the IM platform." + "description": "Post-mortem ID." }, - "member_ids": { - "type": "array", - "items": { - "type": "integer", - "description": "", - "format": "int64" - }, - "description": "Person IDs to add to the war room." + "status": { + "type": "string", + "enum": [ + "drafting", + "published" + ], + "description": "Target report status." } - }, - "required": [ - "integration_id", - "chat_id", - "member_ids" - ] + } }, - "AccountInfo": { + "ResetPostMortemTitleRequest": { "type": "object", + "description": "Parameters for changing a post-mortem report title.", + "required": [ + "post_mortem_id", + "title" + ], "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": { + "post_mortem_id": { "type": "string", - "description": "Account language preference (e.g. zh-CN, en-US)." + "description": "Post-mortem ID." }, - "time_zone": { + "title": { "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": { + "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": "Cloud marketplace platform the account was provisioned from (present only for marketplace accounts)." + "description": "RUM application ID." }, - "mp_account_id": { + "webhook_url": { "type": "string", - "description": "Account identifier on the cloud marketplace platform (present only for marketplace accounts)." + "format": "uri", + "description": "Webhook URL to receive the sample alert event." } } }, - "PreviewTemplateRequest": { + "RumWebhookTestResponse": { "type": "object", + "description": "Result of the webhook test delivery.", + "required": [ + "ok", + "status_code", + "message" + ], "properties": { - "content": { - "type": "string", - "description": "Template content to render." + "ok": { + "type": "boolean", + "description": "Whether the webhook endpoint accepted the sample event." }, - "type": { - "type": "string", - "description": "Template channel type that selects the rendering engine." + "status_code": { + "type": "integer", + "description": "HTTP status code returned by the webhook endpoint. 0 when the request did not receive a response." }, - "incident_id": { + "message": { "type": "string", - "description": "Incident ID whose data is used to render the template; mock data is used when omitted. A MongoDB ObjectID hex string." + "description": "`ok` on success, otherwise the delivery error message." } - }, - "required": [ - "content", - "type" - ] + } }, - "A2AAgentIDRequest": { + "TryLinkPersonRequest": { "type": "object", - "description": "A2A agent lookup by ID.", + "description": "Parameters for attempting automatic IM account linking.", + "required": [ + "integration_id" + ], "properties": { - "agent_id": { - "type": "string", - "description": "Target agent ID." + "integration_id": { + "type": "integer", + "format": "int64", + "description": "IM integration ID." } - }, - "required": [ - "agent_id" - ] + } }, - "ListStatusPageResponse": { + "TryLinkPersonResponse": { "type": "object", + "description": "People linked by this attempt.", + "required": [ + "new_linked_person_ids" + ], "properties": { - "items": { + "new_linked_person_ids": { "type": "array", "items": { - "$ref": "#/components/schemas/StatusPageItem" + "type": "integer", + "format": "int64" }, - "description": "Status pages owned by the account." + "description": "Person IDs newly linked during this call." } } }, - "StatusPageItem": { + "UpsertPostMortemTemplateRequest": { "type": "object", + "description": "Parameters for creating or updating a post-mortem template.", + "required": [ + "name", + "content" + ], "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": { + "template_id": { "type": "string", - "description": "Custom domain pointing to the status page." + "description": "Template ID. Omit to create a new template; provide it to update an existing template." }, - "logo": { - "type": "string", - "description": "Logo image of the status page." + "team_id": { + "type": "integer", + "format": "int64", + "description": "Managing team ID. Required when creating a custom template." }, - "dark_logo": { + "name": { "type": "string", - "description": "Dark-mode logo image of the status page." + "description": "Template name." }, - "logo_url": { + "description": { "type": "string", - "description": "URL opened when the logo is clicked." + "description": "Template description." }, - "favicon": { + "content": { "type": "string", - "description": "Favicon of the status page." + "description": "BlockNote JSON template content." }, - "page_header": { + "content_markdown": { "type": "string", - "description": "Header content of the status page." + "description": "Markdown version of the template content." + } + } + }, + "DeleteStatusPageComponentRequest": { + "type": "object", + "description": "Parameters for deleting one or more service components from a status page.", + "required": [ + "page_id", + "component_ids" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "Status page ID." }, - "page_footer": { - "type": "string", - "description": "Footer content of the status page." - }, - "date_view": { - "type": "string", - "description": "How the timeline is displayed.", - "enum": [ - "calendar", - "list" - ] - }, - "display_uptime_mode": { - "type": "string", - "description": "How uptime is displayed.", - "enum": [ - "chart_and_percentage", - "chart", - "none" - ] - }, - "custom_links": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "description": "Custom navigation links shown on the status page." - }, - "contact_info": { - "type": "string", - "description": "Get-in-touch contact, a mailto or website URL." - }, - "components": { + "component_ids": { "type": "array", "items": { - "$ref": "#/components/schemas/StatusPageComponentItem" + "type": "string" }, - "description": "Components tracked on the status page." + "description": "IDs of components to delete." + } + } + }, + "DeleteStatusPageSectionRequest": { + "type": "object", + "description": "Parameters for deleting one or more sections from a status page.", + "required": [ + "page_id", + "section_ids" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "Status page ID." }, - "sections": { + "section_ids": { "type": "array", "items": { - "$ref": "#/components/schemas/StatusPageSectionItem" + "type": "string" }, - "description": "Sections grouping the components." + "description": "IDs of sections to delete." + } + } + }, + "DeleteStatusPageTemplateRequest": { + "type": "object", + "description": "Parameters for deleting a status page template.", + "required": [ + "page_id", + "type", + "template_id" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "Status page ID." }, - "subscription": { - "$ref": "#/components/schemas/StatusPageSubscriptionItem" + "type": { + "type": "string", + "enum": [ + "pre_defined", + "message" + ], + "description": "Template category." }, - "template_preference": { + "template_id": { "type": "string", - "description": "Preferred change-event template type." + "description": "Template ID to delete." } } }, - "StatusPageSubscriptionItem": { + "UpsertStatusPageComponentRequest": { "type": "object", + "description": "Parameters for creating or updating one or more service components on a status page.", + "required": [ + "page_id", + "components" + ], "properties": { - "email": { - "type": "boolean", - "description": "Whether email subscription is enabled." + "page_id": { + "type": "integer", + "format": "int64", + "description": "Status page ID." }, - "im": { - "type": "boolean", - "description": "Whether IM subscription is enabled." + "components": { + "type": "array", + "description": "Components to create or update.", + "items": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "component_id": { + "type": "string", + "description": "Component ID. Omit to create a new component; supply to update an existing one." + }, + "section_id": { + "type": "string", + "description": "Parent section ID. Omit to place the component at the top level." + }, + "name": { + "type": "string", + "description": "Component display name." + }, + "description": { + "type": "string", + "description": "Component description." + }, + "order_id": { + "type": "integer", + "format": "int64", + "description": "Display order within its section." + }, + "hide_uptime": { + "type": "boolean", + "description": "When true, uptime data is hidden from summary responses." + }, + "hide_all": { + "type": "boolean", + "description": "When true, the component is hidden entirely from summary endpoints." + } + } + } } } }, - "StatusPageSectionItem": { + "UpsertStatusPageComponentResponse": { "type": "object", + "description": "Result of upserting status page components.", + "required": [ + "component_ids" + ], "properties": { - "section_id": { - "type": "string", - "description": "Section ID." - }, - "name": { - "type": "string", - "description": "Section name." - }, - "description": { - "type": "string", - "description": "Section description." - }, - "order_id": { - "type": "integer", - "description": "Display order of the section.", - "format": "int64" - }, - "hide_uptime": { - "type": "boolean", - "description": "Whether uptime data is hidden from summary responses." - }, - "hide_all": { - "type": "boolean", - "description": "Whether the section and its components are hidden from summary endpoints." + "component_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "IDs of the created or updated components, in the same order as the request." } } }, - "SessionListRequest": { + "UpsertStatusPageSectionRequest": { "type": "object", - "description": "Filters for listing agent sessions. Reads are scoped to the resolved account and the caller's visible teams.", + "description": "Parameters for creating or updating one or more sections on a status page.", + "required": [ + "page_id", + "sections" + ], "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": { + "page_id": { "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 + member-of-team rows, default), personal, or team.", - "enum": [ - "all", - "personal", - "team" - ] + "format": "int64", + "description": "Status page ID." }, - "team_ids": { + "sections": { "type": "array", + "description": "Sections to create or update.", "items": { - "type": "integer", - "format": "int64" - }, - "description": "Optional explicit team filter; intersects with `scope`." - }, - "entry_kinds": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "section_id": { + "type": "string", + "description": "Section ID. Omit to create a new section; supply to update an existing one." + }, + "name": { + "type": "string", + "description": "Section display name." + }, + "description": { + "type": "string", + "description": "Section description." + }, + "order_id": { + "type": "integer", + "format": "int64", + "description": "Display order." + }, + "hide_uptime": { + "type": "boolean", + "description": "When true, uptime data for all components in this section is hidden." + }, + "hide_all": { + "type": "boolean", + "description": "When true, the entire section is hidden from summary endpoints." + } + } + } + } + } + }, + "UpsertStatusPageSectionResponse": { + "type": "object", + "description": "Result of upserting status page sections.", + "required": [ + "section_ids" + ], + "properties": { + "section_ids": { "type": "array", "items": { - "type": "string", - "enum": [ - "web", - "im", - "api", - "automation" - ] + "type": "string" }, - "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": "IDs of the created or updated sections, in the same order as the request." } - }, - "required": [ - "app_name" - ] + } }, - "SessionTokenUsage": { + "UpsertStatusPageTemplateRequest": { "type": "object", - "description": "Cumulative session-level token rollup across all turns. The account-billing source of truth.", + "description": "Parameters for creating or updating a status page template.", + "required": [ + "page_id", + "type", + "template" + ], "properties": { - "input_tokens": { + "page_id": { "type": "integer", "format": "int64", - "description": "Total prompt (input) tokens, including the cached portion." + "description": "Status page ID." }, - "cached_tokens": { - "type": "integer", - "format": "int64", - "description": "Portion of input_tokens served from the prompt cache." + "type": { + "type": "string", + "enum": [ + "pre_defined", + "message" + ], + "description": "Template category. `pre_defined` for predefined event templates; `message` for notification message templates." }, - "output_tokens": { - "type": "integer", - "format": "int64", - "description": "Total generated (output) tokens." + "template": { + "type": "object", + "description": "Template content.", + "required": [ + "title", + "event_type", + "status" + ], + "properties": { + "template_id": { + "type": "string", + "description": "Template ID. Omit to create; supply to update." + }, + "title": { + "type": "string", + "description": "Template title." + }, + "event_type": { + "type": "string", + "enum": [ + "incident", + "maintenance" + ], + "description": "Event type this template applies to." + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "Event status this template represents." + }, + "description": { + "type": "string", + "description": "Template body text (Markdown)." + } + } + } + } + }, + "UpsertStatusPageTemplateResponse": { + "type": "object", + "description": "Result of upserting a status page template.", + "required": [ + "template_id" + ], + "properties": { + "template_id": { + "type": "string", + "description": "ID of the created or updated template." + } + } + }, + "FacetCountItem": { + "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`." }, - "reasoning_tokens": { + "count": { "type": "integer", "format": "int64", - "description": "Total reasoning/thinking tokens." + "description": "Number of events with this facet value in the time range.", + "example": 1523 } } }, - "EnvironmentBinding": { + "RumDataAggregateFunction": { "type": "object", - "description": "The runner or cloud sandbox the session is bound to. Null until the first message.", + "description": "Aggregate function metadata used by the sampling engine.", + "required": [ + "type", + "column_name", + "column_index" + ], "properties": { - "kind": { - "type": "string", - "description": "Environment kind (e.g. runner, sandbox)." - }, - "id": { + "type": { "type": "string", - "description": "Environment identifier." + "description": "Aggregate function type." }, - "name": { + "column_name": { "type": "string", - "description": "Human-readable environment name." + "description": "Column name used by the aggregate." }, - "status": { - "type": "string", - "description": "Binding status." + "column_index": { + "type": "integer", + "description": "Column index used by the aggregate." } } }, - "ContextResolvedItem": { + "RumDataFieldMeta": { "type": "object", - "description": "Snapshot of the three-tier knowledge-pack resolution for this session.", + "description": "Metadata for one returned column.", + "required": [ + "name", + "type", + "nullable" + ], "properties": { - "account_pack_id": { - "type": "string", - "description": "Resolved account-scoped pack id." - }, - "team_pack_id": { + "name": { "type": "string", - "description": "Resolved team-scoped pack id." + "description": "Column name." }, - "incident_id": { + "type": { "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." + "description": "Backend database type name for this column." }, - "versions": { - "type": "object", - "additionalProperties": { - "type": "integer" - }, - "description": "Per-pack resolved version map." + "nullable": { + "type": "boolean", + "description": "Whether values in this column may be null." } } }, - "SessionItem": { + "RumDataQueryDefinition": { "type": "object", - "description": "One agent session row.", + "description": "One RUM data query definition.", + "required": [ + "id", + "sql", + "format" + ], "properties": { - "session_id": { - "type": "string", - "description": "Session identifier." - }, - "parent_session_id": { + "id": { "type": "string", - "description": "Parent session id for subagent (child) sessions; empty otherwise." + "maxLength": 64, + "description": "Client-supplied query ID. The same value is used as the key in the response object." }, - "session_name": { + "sql": { "type": "string", - "description": "Session title; may be empty for untitled sessions." + "description": "RUM SQL query to execute." }, - "app_name": { + "dql": { "type": "string", - "description": "Agent app that owns the session." + "description": "Optional RUM DQL filter expression used together with SQL validation." }, - "entry_kind": { + "format": { "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": { - "type": "string", - "description": "Lifecycle status.", - "enum": [ - "enabled", - "deleted" - ] - }, - "incognito": { - "type": "boolean", - "description": "True for incognito (non-persisted-memory) sessions." + "time_series", + "table" + ], + "description": "Output format. `table` returns rows; `time_series` returns bucketed time-series rows." }, - "created_at": { + "interval": { "type": "integer", "format": "int64", - "description": "Unix timestamp in milliseconds when the session was created." + "exclusiveMinimum": 0, + "default": 3600, + "description": "Time bucket interval in seconds for `time_series` queries." }, - "updated_at": { + "max_points": { "type": "integer", "format": "int64", - "description": "Unix timestamp in milliseconds of the last session update." + "exclusiveMinimum": 0, + "default": 1226, + "description": "Maximum number of points for `time_series` queries." }, - "template_staging_round_id": { + "time_zone": { "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." + "description": "IANA time zone name used when evaluating time functions, such as `Asia/Shanghai`." }, - "is_running": { - "type": "boolean", - "description": "True when an agent turn is currently in flight for this session." + "search_after_ctx": { + "type": "string", + "description": "Opaque cursor returned by a previous table query for continuing pagination." }, - "has_unread": { + "disable_sampling": { "type": "boolean", - "description": "True when there is assistant output the caller has not yet viewed." + "description": "When true, asks the query engine to avoid sampling when possible." } } }, - "SessionListResponse": { + "RumDataQueryOutput": { "type": "object", - "description": "A page of agent sessions.", + "description": "Result for one query. Failed subqueries populate `error`; successful ones populate `data`.", "properties": { - "total": { - "type": "integer", - "format": "int64", - "description": "Total number of sessions matching the filter (ignoring pagination)." + "error": { + "$ref": "#/components/schemas/DutyError" }, - "sessions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SessionItem" - }, - "description": "The page of sessions." + "data": { + "$ref": "#/components/schemas/RumDataQueryResult" } } }, - "SessionGetRequest": { + "RumDataQueryRequest": { "type": "object", - "description": "Fetch one session plus a backward-paged window of its most recent events.", + "description": "Batch of RUM data queries over a bounded time range.", + "required": [ + "start_time", + "end_time", + "queries" + ], "properties": { - "session_id": { - "type": "string", - "description": "Target session ID.", - "minLength": 1 - }, - "num_recent_events": { + "start_time": { "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 + "format": "int64", + "description": "Start of the query window, Unix epoch milliseconds.", + "example": 1712620800000 }, - "limit": { + "end_time": { "type": "integer", - "description": "Page size for events; takes precedence over `num_recent_events`. 0 uses the server default (100).", - "minimum": 0, - "maximum": 1000 + "format": "int64", + "description": "End of the query window, Unix epoch milliseconds. Maximum 31-day span.", + "example": 1712707200000 }, - "search_after_ctx": { - "type": "string", - "description": "Opaque keyset cursor from a previous response; pass it back to fetch the next older page.", - "maxLength": 4096 + "queries": { + "type": "array", + "description": "Queries to execute concurrently. 1 to 10 queries are allowed.", + "minItems": 1, + "maxItems": 10, + "items": { + "$ref": "#/components/schemas/RumDataQueryDefinition" + } } - }, - "required": [ - "session_id" - ] + } }, - "EventItem": { + "RumDataQueryResponse": { "type": "object", - "description": "One persisted session event. content/actions/usage_metadata carry the raw ADK envelope; treat them as opaque structured payloads.", + "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": { - "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": { + "search_after_ctx": { "type": "string", - "description": "Error code when the event represents a failure." + "description": "Opaque cursor for continuing paginated table queries." }, - "error_message": { - "type": "string", - "description": "Human-readable error message, when present." + "fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumDataFieldMeta" + }, + "description": "Column metadata for the values matrix." }, - "status": { - "type": "string", - "description": "Event status.", - "enum": [ - "normal", - "compressed" - ] + "values": { + "type": "array", + "description": "Rows returned by the query. Each row aligns with `fields` by index.", + "items": { + "type": "array", + "items": {} + } }, - "created_at": { + "interval": { "type": "integer", "format": "int64", - "description": "Unix timestamp in milliseconds when the event was written." + "description": "Effective time bucket interval in seconds for time-series queries." + }, + "sampling": { + "$ref": "#/components/schemas/RumDataSamplingDecision" } } }, - "SessionGetResponse": { + "RumDataSamplingDecision": { "type": "object", - "description": "A session plus a backward-paged window of its events.", + "description": "Sampling metadata when the query engine uses sampled data.", + "required": [ + "enabled", + "scale_factor" + ], "properties": { - "session": { - "$ref": "#/components/schemas/SessionItem" + "enabled": { + "type": "boolean", + "description": "Whether sampling was applied." }, - "events": { + "scale_factor": { + "type": "number", + "description": "Multiplier used to scale sampled counts back to estimated full counts." + }, + "selected_tablets": { "type": "array", "items": { - "$ref": "#/components/schemas/EventItem" + "type": "string" }, - "description": "Recent events, ascending by (created_at, event_id)." - }, - "has_more_older": { - "type": "boolean", - "description": "True when older events remain beyond this page." + "description": "Storage tablets selected for the sampled query." }, - "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." + "aggregate_funcs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumDataAggregateFunction" + }, + "description": "Aggregate functions affected by sampling." } } }, - "SessionExportRequest": { + "RumFacetCountRequest": { "type": "object", - "description": "Export the full event transcript of one session as a streaming NDJSON body.", + "description": "Parameters for counting facet value distribution.", + "required": [ + "scope", + "facet_key", + "start_time", + "end_time" + ], "properties": { - "session_id": { + "scope": { "type": "string", - "description": "Target session ID." + "description": "RUM data scope to query.", + "enum": [ + "session", + "view", + "action", + "error", + "resource", + "long_task", + "vital", + "issue", + "sourcemap" + ] }, - "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" - ] - }, - "SkillUploadRequest": { - "type": "object", - "description": "Multipart form for uploading a skill archive.", - "properties": { - "file": { + "facet_key": { "type": "string", - "format": "binary", - "description": "Skill archive (.skill / .zip / .tar.gz / .tgz). Max 100MB." + "description": "The field key to count value distribution for." }, - "team_id": { + "facet_value": { + "description": "When set, filter events where `facet_key` equals this value before counting. Accepts string, number, or boolean." + }, + "start_time": { "type": "integer", - "description": "Team scope for the new skill: 0 = account-wide.", - "format": "int64" + "format": "int64", + "description": "Start of the time range, Unix epoch milliseconds.", + "example": 1712620800000 }, - "replace": { - "type": "boolean", - "description": "When true, overwrite an existing same-name skill." + "end_time": { + "type": "integer", + "format": "int64", + "description": "End of the time range, Unix epoch milliseconds. Maximum 31-day span.", + "example": 1712707200000 }, - "skill_id": { + "dql": { "type": "string", - "description": "When replacing a specific skill, its skill ID." - } - }, - "required": [ - "file" - ] - }, - "SessionDeleteRequest": { - "type": "object", - "description": "Session deletion by ID.", - "properties": { - "session_id": { + "description": "RUM DQL filter expression applied before counting." + }, + "sql": { "type": "string", - "description": "Target session ID.", - "minLength": 1 + "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 } - }, - "required": [ - "session_id" - ] + } }, - "DeletePostMortemTemplateRequest": { + "RumFacetCountResponse": { "type": "object", - "description": "Parameters for deleting a post-mortem template.", + "description": "Top N facet values sorted by count descending.", "required": [ - "template_id" + "items" ], "properties": { - "template_id": { - "type": "string", - "description": "Template ID." + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FacetCountItem" + } } } }, - "InitPostMortemRequest": { + "RumFacetListRequest": { "type": "object", - "description": "Parameters for initializing a post-mortem report from incidents.", - "required": [ - "incident_ids", - "template_id" - ], + "description": "Filter parameters for listing RUM field definitions.", "properties": { - "incident_ids": { + "scopes": { "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." + "description": "Filter by RUM data scopes. Valid values: `session`, `view`, `action`, `error`, `resource`, `long_task`, `vital`, `issue`, `sourcemap`." }, - "asc": { + "is_facet": { "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." + "description": "When true, return only facet-enabled fields. When false or omitted, return all fields." } } }, - "ListPostMortemTemplatesResponse": { + "RumFacetListResponse": { "type": "object", - "description": "Paginated list of post-mortem templates.", + "description": "List of RUM field definitions.", "required": [ - "items", - "total", - "has_next_page" + "items" ], "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." + "$ref": "#/components/schemas/RumFieldItem" + } } } }, - "PostMortemTemplate": { + "RumFieldItem": { "type": "object", - "description": "Post-mortem report template.", + "description": "A RUM field definition.", "required": [ "account_id", - "template_id", - "name", + "field_key", + "field_name", + "group", "description", - "content", - "content_markdown", - "team_id", - "created_at_seconds", - "updated_at_seconds" + "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": "Account ID that owns the template. 0 for built-in templates." + "description": "Account ID. 0 for built-in fields." }, - "template_id": { + "field_key": { "type": "string", - "description": "Template ID. Built-in templates use a stable `post_mortem_default_tmpl_*` ID." + "description": "Unique field key, e.g. `error.type`." }, - "name": { + "field_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." + "description": "Human-readable field name." }, - "content_markdown": { + "group": { "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." + "description": "Display group for this field." }, - "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": { + "description": { "type": "string", - "description": "Datasource type, e.g. `prometheus`, `loki`, `elasticsearch`." + "description": "Description of what this field captures." }, - "ds_name": { + "value_type": { "type": "string", - "description": "Datasource display name as configured in the account." + "description": "Data type of the field value.", + "enum": [ + "string", + "number", + "boolean", + "array", + "array", + "array" + ] }, - "expr": { + "show_type": { "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." + "description": "Display type in the analytics UI.", + "enum": [ + "list", + "range" + ] }, - "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": { + "unit_family": { "type": "string", - "description": "Post-mortem ID." + "description": "Measurement unit family, e.g. `time`, `bytes`. Empty for dimensionless fields." }, - "incidents_highest_severity": { + "unit_name": { "type": "string", - "description": "Highest severity among linked incidents." + "description": "Specific measurement unit, e.g. `millisecond`, `byte`." }, - "incidents_earliest_start_seconds": { - "type": "integer", - "format": "int64", - "minimum": 1, - "description": "Unix timestamp in seconds for the earliest linked incident start time." + "edit_able": { + "type": "boolean", + "description": "True if this is a custom field that can be edited by the user." }, - "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." + "is_facet": { + "type": "boolean", + "description": "True if value distribution counting is supported for this field." }, - "incidents_total_duration_seconds": { - "type": "integer", - "format": "int64", - "minimum": 0, - "description": "Total incident duration in seconds." + "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": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } }, - "responder_ids": { + "scopes": { "type": "array", "items": { - "type": "integer", - "format": "int64" + "type": "string" }, - "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." + "description": "RUM scopes this field appears in." }, - "follow_ups": { + "status": { "type": "string", - "description": "Follow-up action items as free text." + "description": "Field status, e.g. `active`." + }, + "queryable": { + "type": "boolean", + "description": "True if this field can be used in DQL/SQL queries." } } }, - "ResetPostMortemStatusRequest": { + "RumFieldListRequest": { "type": "object", - "description": "Parameters for changing a post-mortem report status.", - "required": [ - "post_mortem_id", - "status" - ], + "description": "Filter parameters for listing RUM field definitions.", "properties": { - "post_mortem_id": { - "type": "string", - "description": "Post-mortem ID." + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by RUM data scopes. Valid values: `session`, `view`, `action`, `error`, `resource`, `long_task`, `vital`, `issue`, `sourcemap`." }, - "status": { - "type": "string", - "enum": [ - "drafting", - "published" - ], - "description": "Target report status." + "is_facet": { + "type": "boolean", + "description": "When true, return only facet-enabled fields. When false or omitted, return all fields." } } }, - "ResetPostMortemTitleRequest": { + "RumFieldListResponse": { "type": "object", - "description": "Parameters for changing a post-mortem report title.", + "description": "List of RUM field definitions.", "required": [ - "post_mortem_id", - "title" + "items" ], "properties": { - "post_mortem_id": { - "type": "string", - "description": "Post-mortem ID." - }, - "title": { - "type": "string", - "description": "New report title." + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumFieldItem" + } } } }, - "RumWebhookTestRequest": { + "SourcemapBinaryImage": { "type": "object", - "description": "Parameters for sending a sample RUM alert webhook.", + "description": "Loaded binary image from a crash report.", "required": [ - "application_id", - "webhook_url" + "uuid", + "name", + "is_system" ], "properties": { - "application_id": { + "uuid": { "type": "string", - "description": "RUM application ID." + "description": "Build UUID identifying the binary or dSYM." }, - "webhook_url": { + "name": { "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": { + "description": "Binary image name." + }, + "is_system": { "type": "boolean", - "description": "Whether the webhook endpoint accepted the sample event." + "description": "Whether this binary belongs to the operating system." }, - "status_code": { - "type": "integer", - "description": "HTTP status code returned by the webhook endpoint. 0 when the request did not receive a response." + "load_address": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + } + ], + "description": "Runtime address. Accepts a hex string such as `0x100000000` or a decimal integer." }, - "message": { + "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": "`ok` on success, otherwise the delivery error message." + "description": "CPU architecture for this binary image." } } }, - "TryLinkPersonRequest": { + "SourcemapCodeSnippet": { "type": "object", - "description": "Parameters for attempting automatic IM account linking.", + "description": "One source-code line returned around an enriched frame.", "required": [ - "integration_id" + "line", + "code" ], "properties": { - "integration_id": { + "line": { "type": "integer", - "format": "int64", - "description": "IM integration ID." + "description": "Source line number." + }, + "code": { + "type": "string", + "description": "Source code on that line." } } }, - "TryLinkPersonResponse": { - "type": "object", - "description": "People linked by this attempt.", - "required": [ - "new_linked_person_ids" - ], - "properties": { - "new_linked_person_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "Person IDs newly linked during this call." + "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." + } + } } - } + ] }, - "UpsertPostMortemTemplateRequest": { + "SourcemapStackEnrichRequest": { "type": "object", - "description": "Parameters for creating or updating a post-mortem template.", + "description": "Stack trace enrichment request.", "required": [ - "name", - "content" + "service", + "version" ], "properties": { - "template_id": { + "type": { "type": "string", - "description": "Template ID. Omit to create a new template; provide it to update an existing template." + "enum": [ + "browser", + "android", + "ios", + "miniprogram", + "harmony" + ], + "description": "Source platform. Defaults to `browser` when omitted." }, - "team_id": { + "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": { + "type": "string", + "description": "Raw stack trace to parse and enrich." + }, + "near": { "type": "integer", - "format": "int64", - "description": "Managing team ID. Required when creating a custom template." + "minimum": 1, + "maximum": 20, + "description": "Number of nearby meaningful source lines to return around converted frames." }, - "name": { + "no_cache": { + "type": "boolean", + "description": "Skip cached enrich results. Intended for debugging." + }, + "build_id": { "type": "string", - "description": "Template name." + "description": "Android build ID for Gradle plugin 1.13.0 and later." }, - "description": { + "variant": { "type": "string", - "description": "Template description." + "description": "Android build variant used by older Gradle plugin versions." }, - "content": { + "arch": { "type": "string", - "description": "BlockNote JSON template content." + "description": "Android NDK architecture such as `arm`, `arm64`, `x86`, or `x64`." }, - "content_markdown": { + "source_type": { "type": "string", - "description": "Markdown version of the template content." - } - } - }, - "DeleteStatusPageComponentRequest": { - "type": "object", - "description": "Parameters for deleting one or more service components from a status page.", - "required": [ - "page_id", - "component_ids" - ], - "properties": { - "page_id": { - "type": "integer", - "format": "int64", - "description": "Status page ID." + "description": "Android error source type. Use `ndk` with `arch` for native symbolication." }, - "component_ids": { + "binary_images": { "type": "array", + "description": "Loaded binary images from an iOS crash report.", "items": { - "type": "string" - }, - "description": "IDs of components to delete." + "$ref": "#/components/schemas/SourcemapBinaryImage" + } } } }, - "DeleteStatusPageSectionRequest": { + "SourcemapStackEnrichResponse": { "type": "object", - "description": "Parameters for deleting one or more sections from a status page.", + "description": "Enriched stack frames.", "required": [ - "page_id", - "section_ids" + "frames" ], "properties": { - "page_id": { - "type": "integer", - "format": "int64", - "description": "Status page ID." - }, - "section_ids": { + "frames": { "type": "array", "items": { - "type": "string" - }, - "description": "IDs of sections to delete." + "$ref": "#/components/schemas/SourcemapEnrichedFrame" + } } } }, - "DeleteStatusPageTemplateRequest": { + "SourcemapStackFrame": { "type": "object", - "description": "Parameters for deleting a status page template.", - "required": [ - "page_id", - "type", - "template_id" - ], + "description": "Parsed stack frame fields shared across platforms.", "properties": { - "page_id": { + "function": { + "type": "string", + "description": "Function or method name." + }, + "file": { + "type": "string", + "description": "Source file, URL, or module path." + }, + "line": { "type": "integer", - "format": "int64", - "description": "Status page ID." + "description": "Line number." }, - "type": { + "column": { + "type": "integer", + "description": "Column number for JavaScript or Flutter frames." + }, + "class_name": { "type": "string", - "enum": [ - "pre_defined", - "message" - ], - "description": "Template category." + "description": "Android Java/Kotlin class name." }, - "template_id": { + "method_name": { "type": "string", - "description": "Template ID to delete." + "description": "Android Java/Kotlin method name without class prefix." + }, + "module": { + "type": "string", + "description": "iOS Swift/Objective-C module name." + }, + "address": { + "type": "string", + "description": "iOS or native memory address." + }, + "offset": { + "type": "integer", + "description": "Symbol offset from function start." + }, + "native_address": { + "type": "string", + "description": "Unity IL native address." } } }, - "UpsertStatusPageComponentRequest": { + "CreateStatusPageRequest": { "type": "object", - "description": "Parameters for creating or updating one or more service components on a status page.", - "required": [ - "page_id", - "components" - ], "properties": { - "page_id": { - "type": "integer", - "format": "int64", - "description": "Status page ID." + "name": { + "type": "string", + "description": "Display name of the status page.", + "maxLength": 255 }, - "components": { - "type": "array", - "description": "Components to create or update.", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "component_id": { - "type": "string", - "description": "Component ID. Omit to create a new component; supply to update an existing one." - }, - "section_id": { - "type": "string", - "description": "Parent section ID. Omit to place the component at the top level." - }, - "name": { - "type": "string", - "description": "Component display name." - }, - "description": { - "type": "string", - "description": "Component description." - }, - "order_id": { - "type": "integer", - "format": "int64", - "description": "Display order within its section." - }, - "hide_uptime": { - "type": "boolean", - "description": "When true, uptime data is hidden from summary responses." - }, - "hide_all": { - "type": "boolean", - "description": "When true, the component is hidden entirely from summary endpoints." - } + "url_name": { + "type": "string", + "description": "URL-safe slug, unique per account and page type.", + "maxLength": 255 + }, + "type": { + "type": "string", + "description": "Visibility type of the status page.", + "enum": [ + "public", + "internal" + ] + }, + "custom_domain": { + "type": "string", + "description": "Custom domain for a public status page.", + "maxLength": 255 + }, + "page_title": { + "type": "string", + "description": "Browser title shown for the status page." + }, + "page_header": { + "type": "string", + "description": "Header content shown on the status page." + }, + "page_footer": { + "type": "string", + "description": "Footer content shown on the status page." + }, + "date_view": { + "type": "string", + "description": "How event dates are displayed.", + "enum": [ + "calendar", + "list" + ] + }, + "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": [ + "name", + "url_name", + "type", + "date_view", + "display_uptime_mode" + ] }, - "UpsertStatusPageComponentResponse": { + "CreateStatusPageResponse": { "type": "object", - "description": "Result of upserting status page components.", + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "Created status page ID." + }, + "page_name": { + "type": "string", + "description": "Created status page name." + }, + "page_url_name": { + "type": "string", + "description": "Final URL-safe slug assigned to the status page." + } + }, "required": [ - "component_ids" - ], + "page_id", + "page_name", + "page_url_name" + ] + }, + "A2AAgentCreateRequest": { + "type": "object", + "description": "Registration parameters for a new A2A agent.", "properties": { - "component_ids": { - "type": "array", - "items": { + "agent_name": { + "type": "string", + "description": "Agent display name.", + "maxLength": 128 + }, + "instructions": { + "type": "string", + "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 + }, + "card_url": { + "type": "string", + "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." + }, + "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": "IDs of the created or updated components, in the same order as the request." + "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." + }, + "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": [ + "", + "byoc" + ], + "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." + }, + "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." + }, + "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." + }, + "secret_schema": { + "type": "string", + "description": "JSON-encoded secret schema, e.g. `{\"header_name\":\"X-Api-Key\"}`; required when `auth_mode=per_user_secret`." + }, + "oauth_metadata": { + "type": "string", + "description": "JSON-encoded OAuth metadata; populated by the OAuth discovery flow for `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. 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" + ] }, - "UpsertStatusPageSectionRequest": { + "A2AAgentCreateResponse": { "type": "object", - "description": "Parameters for creating or updating one or more sections on a status page.", + "description": "Result of registering an A2A agent.", + "properties": { + "agent_id": { + "type": "string", + "description": "ID of the newly created agent." + } + }, "required": [ - "page_id", - "sections" - ], + "agent_id" + ] + }, + "A2AAgentIDRequest": { + "type": "object", + "description": "A2A agent lookup by ID.", "properties": { - "page_id": { + "agent_id": { + "type": "string", + "description": "Target agent ID." + } + }, + "required": [ + "agent_id" + ] + }, + "A2AAgentItem": { + "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", - "format": "int64", - "description": "Status page ID." + "description": "Owning account ID.", + "format": "int64" }, - "sections": { + "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 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": "Sections to create or update.", "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "section_id": { - "type": "string", - "description": "Section ID. Omit to create a new section; supply to update an existing one." - }, - "name": { - "type": "string", - "description": "Section display name." - }, - "description": { - "type": "string", - "description": "Section description." - }, - "order_id": { - "type": "integer", - "format": "int64", - "description": "Display order." - }, - "hide_uptime": { - "type": "boolean", - "description": "When true, uptime data for all components in this section is hidden." - }, - "hide_all": { - "type": "boolean", - "description": "When true, the entire section is hidden from summary endpoints." - } - } - } + "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." } - } + }, + "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" + ] }, - "UpsertStatusPageSectionResponse": { + "A2AAgentListRequest": { "type": "object", - "description": "Result of upserting status page sections.", - "required": [ - "section_ids" - ], + "description": "Pagination, scope, and search filter for listing A2A agents.", "properties": { - "section_ids": { + "offset": { + "type": "integer", + "description": "Row offset for pagination.", + "default": 0 + }, + "limit": { + "type": "integer", + "description": "Page size.", + "default": 20 + }, + "scope": { + "type": "string", + "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)." + }, + "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": { - "type": "string" + "type": "integer", + "format": "int64" }, - "description": "IDs of the created or updated sections, in the same order as the request." + "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." } } }, - "UpsertStatusPageTemplateRequest": { + "A2AAgentListResponse": { "type": "object", - "description": "Parameters for creating or updating a status page template.", - "required": [ - "page_id", - "type", - "template" - ], + "description": "Paginated A2A agent list.", "properties": { - "page_id": { - "type": "integer", - "format": "int64", - "description": "Status page ID." + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/A2AAgentItem" + }, + "description": "A2A agents on this page." }, - "type": { + "total": { + "type": "integer", + "description": "Total number of matching agents.", + "format": "int64" + } + }, + "required": [ + "items", + "total" + ] + }, + "A2AAgentUpdateRequest": { + "type": "object", + "description": "Partial update of an A2A agent. A null/omitted field is left unchanged.", + "properties": { + "agent_id": { "type": "string", - "enum": [ - "pre_defined", - "message" + "description": "Target agent ID." + }, + "agent_name": { + "type": [ + "string", + "null" ], - "description": "Template category. `pre_defined` for predefined event templates; `message` for notification message templates." + "description": "New display name. Omit to leave unchanged.", + "maxLength": 128 }, - "template": { + "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", - "description": "Template content.", - "required": [ - "title", - "event_type", - "status" + "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" ], - "properties": { - "template_id": { - "type": "string", - "description": "Template ID. Omit to create; supply to update." - }, - "title": { - "type": "string", - "description": "Template title." - }, - "event_type": { - "type": "string", - "enum": [ - "incident", - "maintenance" - ], - "description": "Event type this template applies to." - }, - "status": { - "type": "string", - "enum": [ - "investigating", - "identified", - "monitoring", - "resolved", - "scheduled", - "ongoing", - "completed" - ], - "description": "Event status this template represents." - }, - "description": { - "type": "string", - "description": "Template body text (Markdown)." - } + "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": [ + "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 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": { + "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 * * *" + }, + "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": "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." + } + }, + "required": [ + "name", + "cron_expr", + "prompt" + ] + }, + "AutomationRuleIDRequest": { + "type": "object", + "properties": { + "rule_id": { + "type": "string", + "description": "Rule ID." + } + }, + "required": [ + "rule_id" + ] + }, + "AutomationRuleItem": { + "type": "object", + "description": "Automation rule.", + "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." + }, + "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" + ] }, - "UpsertStatusPageTemplateResponse": { + "EnvironmentBinding": { "type": "object", - "description": "Result of upserting a status page template.", - "required": [ - "template_id" - ], + "description": "The runner or cloud sandbox the session is bound to. Null until the first message.", "properties": { - "template_id": { + "kind": { "type": "string", - "description": "ID of the created or updated template." + "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" + ] }, - "AutomationRuleCreateRequest": { + "EventItem": { "type": "object", - "description": "Create an Automation rule.", + "description": "One persisted session event. content/actions/usage_metadata carry the raw ADK envelope; treat them as opaque structured payloads.", "properties": { - "name": { + "event_id": { "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 the rule is enabled after creation. Omitted API value is false; Chat/CLI create sends true by default unless the user asks for disabled." + "description": "Event identifier." }, - "cron_expr": { + "session_id": { "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": "Owning session id." }, - "prompt": { + "invocation_id": { "type": "string", - "minLength": 1, - "description": "Task prompt sent to the AI SRE agent on each run." + "description": "ADK invocation id grouping a turn." }, - "environment_kind": { + "author": { "type": "string", - "description": "Runtime environment kind. Omit or send an empty value for automatic selection.", - "enum": [ - "", - "cloud", - "byoc" - ] + "description": "Event author (e.g. user, the agent name)." }, - "environment_id": { + "branch": { "type": "string", - "description": "BYOC Runner ID. Used only when `environment_kind=byoc`." + "description": "ADK branch path for nested agents." }, - "http_post_trigger_enabled": { + "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": "Whether to create and enable an HTTP POST trigger. When enabled, the response includes a one-time token." + "description": "True for a streaming partial chunk." }, - "oncall_incident_trigger_enabled": { + "turn_complete": { "type": "boolean", - "description": "Whether the On-call incident trigger is enabled." + "description": "True on the terminal event of a turn." }, - "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." + "error_code": { + "type": "string", + "description": "Error code when the event represents a failure." }, - "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." + "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": [ - "name", - "cron_expr", - "prompt" + "event_id", + "session_id", + "partial", + "turn_complete", + "created_at" ] }, - "AutomationRuleUpdateRequest": { + "MCPServerCreateRequest": { "type": "object", - "description": "Update an Automation rule. Omit fields to leave them unchanged.", + "description": "Configuration for a new MCP server.", "properties": { - "rule_id": { + "server_name": { "type": "string", - "description": "Target rule ID." + "description": "MCP server name, unique within the account.", + "minLength": 1, + "maxLength": 255 }, - "name": { + "description": { "type": "string", - "maxLength": 255, - "description": "New rule name." + "description": "Server description.", + "minLength": 1, + "maxLength": 1024 }, - "team_id": { + "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", - "format": "int64", - "minimum": 0, - "description": "Only the current value is accepted; personal/team scope is immutable after creation." + "description": "Connection timeout in seconds. 0 = default (10s)." }, - "enabled": { - "type": "boolean", - "description": "Whether the rule is enabled." + "call_timeout": { + "type": "integer", + "description": "Tool-call timeout in seconds. 0 = default (60s)." }, - "cron_expr": { + "auth_mode": { "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": "Authentication mode: shared (default), per_user_secret, or per_user_oauth." }, - "schedule_trigger_enabled": { - "type": "boolean", - "description": "Whether the schedule trigger is enabled." + "secret_schema": { + "type": "string", + "description": "JSON secret schema; required when auth_mode=per_user_secret." }, - "prompt": { + "oauth_metadata": { "type": "string", - "description": "New task prompt." + "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": "Runtime environment kind. Omit or send an empty value for automatic selection.", + "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": [ - "", - "cloud", "byoc" ] }, "environment_id": { "type": "string", - "description": "BYOC Runner ID." + "description": "Runner ID; required when environment_kind is byoc." }, - "http_post_trigger_enabled": { + "allow_insecure_oauth_http": { "type": "boolean", - "description": "Whether the HTTP POST trigger is enabled. Sending true creates one when missing." + "description": "Allow this server's OAuth token exchange over plaintext HTTP. Testing use only; defaults to false." }, - "oncall_incident_trigger_enabled": { + "allow_insecure_tls_skip_verify": { "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": "Skip TLS certificate verification when connecting to this server. Testing use only; defaults to false." }, - "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." + "source_template_name": { + "type": "string", + "description": "Marketplace template name when created from a connector template." } }, "required": [ - "rule_id" + "server_name", + "description", + "transport" ] }, - "AutomationRuleIDRequest": { + "MCPServerDeleteRequest": { "type": "object", + "description": "MCP server deletion by ID.", "properties": { - "rule_id": { + "server_id": { "type": "string", - "description": "Rule ID." + "description": "Target MCP server ID." } }, "required": [ - "rule_id" + "server_id" ] }, - "AutomationRuleListRequest": { + "MCPServerGetRequest": { "type": "object", - "description": "List Automation rules visible to the caller.", + "description": "MCP server lookup by ID.", "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. Defaults to all." - }, - "team_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "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." - }, - "keyword": { + "server_id": { "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" - } + "description": "Target MCP server ID." } }, "required": [ - "total", - "rules" + "server_id" ] }, - "AutomationRuleItem": { + "MCPServerItem": { "type": "object", - "description": "Automation rule.", + "description": "An MCP server (connector) registered on the account.", "properties": { - "rule_id": { + "server_id": { "type": "string", - "description": "Rule ID." + "description": "Unique MCP server ID (prefix `mcp_`)." }, "account_id": { "type": "integer", - "format": "int64", - "description": "Account ID." + "description": "Owning account ID.", + "format": "int64" }, "team_id": { "type": "integer", - "format": "int64", - "description": "Scope team ID; 0 means personal rule." + "description": "Team scope: 0 = account-wide; >0 = the owning team.", + "format": "int64" }, - "owner_id": { - "type": "integer", - "format": "int64", - "description": "Creator person ID." + "can_edit": { + "type": "boolean", + "description": "Whether the caller may edit this server." }, - "name": { + "environment_kind": { "type": "string", - "description": "Rule name." + "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" + ] }, - "enabled": { - "type": "boolean", - "description": "Whether the rule is enabled." + "environment_id": { + "type": "string", + "description": "Runner ID when environment_kind is byoc; empty otherwise." }, - "run_scope": { + "server_name": { "type": "string", - "enum": [ - "person", - "team" - ], - "description": "Hidden session run scope." + "description": "MCP server name, unique within the account." }, - "cron_expr": { + "description": { "type": "string", - "description": "Normalized 5-field cron expression." + "description": "Server description." }, - "prompt": { + "ai_description": { "type": "string", - "description": "Task prompt." + "description": "LLM-generated description, preferred over `description` when present." }, - "environment_kind": { + "transport": { "type": "string", - "description": "Runtime environment kind. Omit or send an empty value for automatic selection.", + "description": "Transport protocol.", "enum": [ - "", - "cloud", - "byoc" + "stdio", + "sse", + "streamable-http" ] }, - "environment_id": { + "command": { "type": "string", - "description": "BYOC Runner ID." + "description": "Executable command (stdio transport only)." }, - "schedule_trigger_id": { + "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": "Schedule trigger ID." + "description": "Server URL (sse / streamable-http transport)." }, - "schedule_trigger_enabled": { - "type": "boolean", - "description": "Whether the schedule trigger is enabled." + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "HTTP headers (sse / streamable-http). Secret values are masked." }, - "http_post_trigger_id": { + "proxy_url": { "type": "string", - "description": "HTTP POST trigger ID." + "description": "Outbound proxy URL used to reach the server." }, - "http_post_trigger_url": { + "status": { "type": "string", - "description": "HTTP POST trigger path." + "description": "Server status.", + "enum": [ + "enabled", + "disabled" + ] }, - "http_post_trigger_enabled": { - "type": "boolean", - "description": "Whether the HTTP POST trigger is enabled." + "connect_timeout": { + "type": "integer", + "description": "Connection timeout in seconds (0 = server default, 10s)." }, - "oncall_incident_trigger_id": { - "type": "string", - "description": "On-call incident trigger ID." + "call_timeout": { + "type": "integer", + "description": "Tool-call timeout in seconds (0 = server default, 60s)." }, - "oncall_incident_trigger_enabled": { + "allow_insecure_oauth_http": { "type": "boolean", - "description": "Whether the On-call incident trigger is enabled." + "description": "Allow this server's OAuth token exchange over plaintext HTTP; testing use only." }, - "oncall_incident_channel_ids": { + "allow_insecure_tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate verification when connecting to this server; testing use only." + }, + "tools": { "type": "array", "items": { - "type": "integer", - "format": "int64", - "minimum": 1 + "$ref": "#/components/schemas/MCPToolInfo" }, - "description": "On-call integration IDs to watch. Creating or enabling this trigger requires at least one valid ID." + "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)." }, - "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." + "oauth_metadata": { + "type": "string", + "description": "JSON-encoded OAuth metadata (per_user_oauth mode)." }, - "http_post_token": { + "source_template_name": { "type": "string", - "description": "HTTP POST trigger token. Returned only on create or token rotation; save it immediately." + "description": "Marketplace template this connector was installed from; empty for user-authored." }, - "can_edit": { - "type": "boolean", - "description": "Whether the caller can manage this rule." + "created_by": { + "type": "integer", + "description": "Member ID that created the server.", + "format": "int64" }, "created_at": { "type": "integer", "format": "int64", - "description": "Creation time, Unix milliseconds." + "description": "Creation time. Unix timestamp in 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": "Last update time. Unix timestamp in milliseconds." } }, "required": [ - "rule_id", + "server_id", "account_id", "team_id", - "owner_id", - "name", - "enabled", - "run_scope", - "cron_expr", - "prompt", + "can_edit", "environment_kind", "environment_id", - "schedule_trigger_enabled", - "http_post_trigger_enabled", - "can_edit", + "server_name", + "description", + "transport", + "status", + "connect_timeout", + "call_timeout", + "created_by", "created_at", - "updated_at", - "schedule_next_fire_at_ms", - "oncall_incident_trigger_enabled" + "updated_at" ] }, - "AutomationTemplateListRequest": { + "MCPServerListRequest": { "type": "object", + "description": "Pagination, scope, and search filters for listing MCP servers.", "properties": { - "locale": { + "p": { + "type": "integer", + "description": "Page number, 1-based.", + "default": 1 + }, + "limit": { + "type": "integer", + "description": "Page size.", + "default": 20 + }, + "scope": { "type": "string", - "maxLength": 16, - "description": "Template locale such as zh-CN or en-US. Omit to detect from the request locale." + "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." } } }, - "AutomationTemplateListResponse": { + "MCPServerListResponse": { "type": "object", + "description": "Paginated MCP server list.", "properties": { - "templates": { + "total": { + "type": "integer", + "description": "Total number of matching servers.", + "format": "int64" + }, + "servers": { "type": "array", "items": { - "$ref": "#/components/schemas/AutomationTemplateItem" - } + "$ref": "#/components/schemas/MCPServerItem" + }, + "description": "MCP servers on this page." } }, "required": [ - "templates" + "total", + "servers" ] }, - "AutomationTemplateItem": { + "MCPServerStatusRequest": { "type": "object", + "description": "MCP server enable/disable by ID.", "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": { + "server_id": { "type": "string", - "description": "Template prompt." + "description": "Target MCP server ID." } }, "required": [ - "name", - "description", - "icon", - "enabled", - "prompt" + "server_id" ] }, - "AutomationRunListRequest": { + "MCPServerUpdateRequest": { "type": "object", + "description": "Partial update of an MCP server. Omit a field to leave it unchanged.", "properties": { - "rule_id": { + "server_id": { "type": "string", - "description": "Target rule ID." + "description": "Target MCP server ID." }, - "p": { - "type": "integer", - "default": 1, - "description": "Page number, 1-based." + "server_name": { + "type": "string", + "description": "New name.", + "minLength": 1, + "maxLength": 255 }, - "limit": { - "type": "integer", - "default": 20, - "maximum": 100, - "description": "Page size." + "description": { + "type": "string", + "description": "New description.", + "minLength": 1, + "maxLength": 1024 }, - "status": { + "transport": { "type": "string", + "description": "Transport protocol.", "enum": [ - "queued", - "running", - "retrying", - "succeeded", - "partial", - "failed", - "skipped", - "abandoned" - ], - "description": "Run status filter." + "stdio", + "sse", + "streamable-http" + ] }, - "trigger_kind": { + "command": { "type": "string", - "enum": [ - "schedule", - "debug", - "manual", - "http_post", - "oncall_incident" - ], - "description": "Trigger kind filter." + "description": "Executable command (stdio transport)." }, - "started_after_ms": { + "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", - "format": "int64", - "description": "Start-time lower bound, Unix milliseconds." + "description": "Connection timeout in seconds. 0 = default (10s)." }, - "started_before_ms": { + "call_timeout": { "type": "integer", - "format": "int64", - "description": "Start-time upper bound, Unix milliseconds." + "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" + }, + "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": [ - "rule_id" + "server_id" ] }, - "AutomationRunListResponse": { + "MCPToolInfo": { "type": "object", + "description": "Metadata for one tool exposed by an MCP server.", "properties": { - "total": { - "type": "integer", - "format": "int64", - "description": "Total count." + "name": { + "type": "string", + "description": "Tool name." }, - "runs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AutomationRunItem" - } + "description": { + "type": "string", + "description": "Tool description." + }, + "input_schema": { + "type": "object", + "additionalProperties": true, + "description": "JSON Schema describing the tool's input parameters." } }, "required": [ - "total", - "runs" + "name", + "description" ] }, - "AutomationRunItem": { + "ManualRunRuleResult": { "type": "object", + "description": "Result of manually running an Automation rule outside its schedule.", "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." + "description": "Rule ID that was run." }, "trigger_kind": { "type": "string", "enum": [ - "schedule", - "debug", - "manual", - "http_post", - "oncall_incident" + "manual" ], - "description": "Trigger kind." + "description": "Always manual for this operation." }, - "occurrence_key": { - "type": "string", - "description": "Idempotency key for this occurrence." + "preflight": { + "$ref": "#/components/schemas/PreflightResult" }, - "status": { + "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": [ - "queued", - "running", - "retrying", - "succeeded", - "partial", - "failed", - "skipped", - "abandoned" + "person", + "team" ], - "description": "Run status." - }, - "attempts": { - "type": "integer", - "description": "Attempt count." + "description": "Resolved run scope for this run; mirrors the rule's run_scope." }, - "started_at": { - "type": "integer", - "format": "int64", - "description": "Start time, Unix milliseconds." - }, - "completed_at": { + "owner_id": { "type": "integer", "format": "int64", - "description": "Completion time, Unix milliseconds. 0 means not completed." + "description": "Rule owner person ID." }, - "duration_ms": { + "team_id": { "type": "integer", "format": "int64", - "description": "Duration in milliseconds." + "description": "Rule's scope team ID; 0 means a personal rule." }, - "error_code": { + "app_name": { "type": "string", - "description": "Error code." + "description": "App the rule is scoped to. Currently always ai-sre; manual runs are only supported for that app." }, - "error_message": { + "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": "Error message." + "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." }, - "stats_json": { - "description": "Run stats JSON." + "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 }, - "result_json": { - "description": "Run result JSON." + "share_token": { + "type": "string", + "description": "Share token for accessing a session through its share link. Omit it for normal account-authorized access.", + "maxLength": 512 }, - "created_at": { + "num_recent_events": { "type": "integer", - "format": "int64", - "description": "Creation time, Unix milliseconds." + "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 }, - "updated_at": { + "limit": { "type": "integer", - "format": "int64", - "description": "Last update time, Unix milliseconds." + "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": [ - "run_id", - "kind", - "account_id", - "rule_id", - "trigger_kind", - "occurrence_key", - "status", - "attempts", - "started_at", - "completed_at", - "duration_ms", - "created_at", - "updated_at" + "session_id" ] }, - "FacetCountItem": { + "SessionGetResponse": { "type": "object", - "description": "A facet value and its occurrence count.", - "required": [ - "facet_value", - "count" - ], + "description": "A session plus a backward-paged window of its events.", "properties": { - "facet_value": { - "description": "The facet value. Type matches the field's `value_type`." + "session": { + "$ref": "#/components/schemas/SessionItem" }, - "count": { - "type": "integer", - "format": "int64", - "description": "Number of events with this facet value in the time range.", - "example": 1523 + "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" + ] }, - "RumDataAggregateFunction": { + "SessionItem": { "type": "object", - "description": "Aggregate function metadata used by the sampling engine.", - "required": [ - "type", - "column_name", - "column_index" - ], + "description": "One agent session row.", "properties": { - "type": { + "session_id": { "type": "string", - "description": "Aggregate function type." + "description": "Session identifier." }, - "column_name": { + "parent_session_id": { "type": "string", - "description": "Column name used by the aggregate." + "description": "Parent session id for subagent (child) sessions; empty otherwise." }, - "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": { + "session_name": { "type": "string", - "description": "Column name." + "description": "Session title; may be empty for untitled sessions." }, - "type": { + "app_name": { "type": "string", - "description": "Backend database type name for this column." + "description": "Agent app that owns the session." }, - "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": { + "entry_kind": { "type": "string", - "maxLength": 64, - "description": "Client-supplied query ID. The same value is used as the key in the response object." + "description": "Surface that created the session.", + "enum": [ + "web", + "im", + "api", + "automation", + "subagent" + ] }, - "sql": { + "person_id": { "type": "string", - "description": "RUM SQL query to execute." + "description": "Creator person id." }, - "dql": { + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team id; 0 means no team is bound. Immutable after create." + }, + "team_name": { "type": "string", - "description": "Optional RUM DQL filter expression used together with SQL validation." + "description": "Resolved team name; empty for unbound rows or deleted teams." }, - "format": { + "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": [ - "time_series", - "table" - ], - "description": "Output format. `table` returns rows; `time_series` returns bucketed time-series rows." + "owner", + "team_member", + "manager", + "share_link" + ] }, - "interval": { + "share_enabled": { + "type": "boolean", + "description": "True when the session's share link is active." + }, + "share_version": { "type": "integer", "format": "int64", - "exclusiveMinimum": 0, - "default": 3600, - "description": "Time bucket interval in seconds for `time_series` queries." + "description": "Revision of the share link; it increases when sharing is revoked." }, - "max_points": { + "shared_at": { "type": "integer", "format": "int64", - "exclusiveMinimum": 0, - "default": 1226, - "description": "Maximum number of points for `time_series` queries." + "description": "Unix timestamp in milliseconds when sharing was last enabled; 0 if never shared." }, - "time_zone": { - "type": "string", - "description": "IANA time zone name used when evaluating time functions, such as `Asia/Shanghai`." + "shared_by": { + "type": "integer", + "format": "int64", + "description": "Person ID that most recently enabled sharing; 0 if never shared." }, - "search_after_ctx": { + "status": { "type": "string", - "description": "Opaque cursor returned by a previous table query for continuing pagination." + "description": "Lifecycle status.", + "enum": [ + "enabled", + "deleted" + ] }, - "disable_sampling": { + "incognito": { "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" + "description": "True for incognito (non-persisted-memory) sessions." }, - "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": { + "created_at": { "type": "integer", "format": "int64", - "description": "Start of the query window, Unix epoch milliseconds.", - "example": 1712620800000 + "description": "Unix timestamp in milliseconds when the session was created." }, - "end_time": { + "updated_at": { "type": "integer", "format": "int64", - "description": "End of the query window, Unix epoch milliseconds. Maximum 31-day span.", - "example": 1712707200000 + "description": "Unix timestamp in milliseconds of the last session update." }, - "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": { + "template_staging_round_id": { "type": "string", - "description": "Opaque cursor for continuing paginated table queries." + "description": "Current save→validate round id (template-assistant only); empty otherwise." }, - "fields": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RumDataFieldMeta" - }, - "description": "Column metadata for the values matrix." + "state": { + "type": "object", + "additionalProperties": true, + "description": "Raw session-state bag (session-scoped keys). Omitted when empty." }, - "values": { - "type": "array", - "description": "Rows returned by the query. Each row aligns with `fields` by index.", - "items": { - "type": "array", - "items": {} - } + "bound_environment": { + "$ref": "#/components/schemas/EnvironmentBinding" }, - "interval": { + "context_resolved": { + "$ref": "#/components/schemas/ContextResolvedItem" + }, + "token_usage": { + "$ref": "#/components/schemas/SessionTokenUsage" + }, + "current_context_tokens": { "type": "integer", "format": "int64", - "description": "Effective time bucket interval in seconds for time-series queries." + "description": "Size in tokens of the LLM context window as of the most recent turn. 0 means no turn has completed." }, - "sampling": { - "$ref": "#/components/schemas/RumDataSamplingDecision" - } - } - }, - "RumDataSamplingDecision": { - "type": "object", - "description": "Sampling metadata when the query engine uses sampled data.", - "required": [ - "enabled", - "scale_factor" - ], - "properties": { - "enabled": { - "type": "boolean", - "description": "Whether sampling was applied." + "context_window": { + "type": "integer", + "format": "int64", + "description": "The bound model's max context size in tokens. 0 means unknown." }, - "scale_factor": { - "type": "number", - "description": "Multiplier used to scale sampled counts back to estimated full counts." + "archived_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds when archived; 0 means not archived." }, - "selected_tablets": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Storage tablets selected for the sampled query." + "pinned_at": { + "type": "integer", + "format": "int64", + "description": "Caller's per-user pin timestamp in milliseconds; 0 means not pinned." }, - "aggregate_funcs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RumDataAggregateFunction" - }, - "description": "Aggregate functions affected by sampling." - } - } - }, - "RumFacetCountRequest": { - "type": "object", - "description": "Parameters for counting facet value distribution.", - "required": [ - "scope", - "facet_key", - "start_time", - "end_time" - ], - "properties": { - "scope": { - "type": "string", - "description": "RUM data scope to query.", - "enum": [ - "session", - "view", - "action", - "error", - "resource", - "long_task", - "vital", - "issue", - "sourcemap" - ] + "last_event_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds of the most recent assistant-side event." }, - "facet_key": { - "type": "string", - "description": "The field key to count value distribution for." + "is_running": { + "type": "boolean", + "description": "True when an agent turn is currently in flight for this session." }, - "facet_value": { - "description": "When set, filter events where `facet_key` equals this value before counting. Accepts string, number, or boolean." + "has_unread": { + "type": "boolean", + "description": "True when there is assistant output the caller has not yet viewed." }, - "start_time": { + "current_turn_started_at": { "type": "integer", "format": "int64", - "description": "Start of the time range, Unix epoch milliseconds.", - "example": 1712620800000 + "description": "Unix timestamp in milliseconds when the current or most recent round started; 0 if no round has started yet." }, - "end_time": { + "current_turn_active_ms": { "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": "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." }, - "sql": { - "type": "string", - "description": "SQL WHERE clause (no SELECT) for additional filtering." + "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." }, - "limit": { + "current_turn_tokens": { "type": "integer", - "description": "Maximum number of top values to return. Default 100, maximum 100.", - "maximum": 100, - "default": 100 + "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." } - } - }, - "RumFacetCountResponse": { - "type": "object", - "description": "Top N facet values sorted by count descending.", + }, "required": [ - "items" - ], - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FacetCountItem" - } - } - } + "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" + ] }, - "RumFacetListRequest": { + "SessionListRequest": { "type": "object", - "description": "Filter parameters for listing RUM field definitions.", + "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": { - "scopes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Filter by RUM data scopes. Valid values: `session`, `view`, `action`, `error`, `resource`, `long_task`, `vital`, `issue`, `sourcemap`." + "app_name": { + "type": "string", + "description": "Agent app whose sessions to list.", + "enum": [ + "ask-ai", + "support", + "support-website", + "support-flashcat", + "ai-sre", + "template-assistant", + "swe" + ] }, - "is_facet": { - "type": "boolean", - "description": "When true, return only facet-enabled fields. When false or omitted, return all fields." - } - } - }, - "RumFacetListResponse": { - "type": "object", - "description": "List of RUM field definitions.", - "required": [ - "items" - ], - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RumFieldItem" - } - } - } - }, - "RumFieldItem": { - "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" - ], - "properties": { - "account_id": { + "p": { "type": "integer", - "format": "int64", - "description": "Account ID. 0 for built-in fields." + "description": "Page number, 1-based.", + "default": 1, + "minimum": 1 }, - "field_key": { - "type": "string", - "description": "Unique field key, e.g. `error.type`." + "limit": { + "type": "integer", + "description": "Page size, 1–100.", + "minimum": 1, + "maximum": 100, + "default": 20 }, - "field_name": { + "orderby": { "type": "string", - "description": "Human-readable field name." + "description": "Sort field.", + "enum": [ + "created_at", + "updated_at" + ] }, - "group": { - "type": "string", - "description": "Display group for this field." + "asc": { + "type": "boolean", + "description": "Ascending order when true; applies only when `orderby` is set." }, - "description": { - "type": "string", - "description": "Description of what this field captures." + "include_subagent_sessions": { + "type": "boolean", + "description": "Include subagent-dispatched sessions in the list." }, - "value_type": { + "keyword": { "type": "string", - "description": "Data type of the field value.", - "enum": [ - "string", - "number", - "boolean", - "array", - "array", - "array" - ] + "description": "Filter by session-name keyword.", + "maxLength": 64 }, - "show_type": { + "scope": { "type": "string", - "description": "Display type in the analytics UI.", + "description": "Visibility scope: `all` (own personal + accessible team sessions), `personal`, or `team`; default `all`.", "enum": [ - "list", - "range" + "all", + "personal", + "team" ] }, - "unit_family": { - "type": "string", - "description": "Measurement unit family, e.g. `time`, `bytes`. Empty for dimensionless fields." - }, - "unit_name": { - "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." - }, - "enum_values": { + "team_ids": { "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": "integer", + "format": "int64" + }, + "description": "Optional explicit team filter; intersects with `scope` and never expands access." }, - "scopes": { + "entry_kinds": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "web", + "im", + "api", + "automation" + ] }, - "description": "RUM scopes this field appears in." + "description": "Restrict to sessions produced by these surfaces; empty returns every kind." }, "status": { "type": "string", - "description": "Field status, e.g. `active`." - }, - "queryable": { - "type": "boolean", - "description": "True if this field can be used in DQL/SQL queries." + "description": "Archive bucket: active (default) returns un-archived, archived returns archived, all returns both.", + "enum": [ + "active", + "archived", + "all" + ] } - } + }, + "required": [ + "app_name" + ] }, - "RumFieldListRequest": { + "SessionListResponse": { "type": "object", - "description": "Filter parameters for listing RUM field definitions.", + "description": "A page of agent sessions.", "properties": { - "scopes": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total number of sessions matching the filter (ignoring pagination)." + }, + "sessions": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/SessionItem" }, - "description": "Filter by RUM data scopes. Valid values: `session`, `view`, `action`, `error`, `resource`, `long_task`, `vital`, `issue`, `sourcemap`." + "description": "The page of sessions." }, - "is_facet": { + "suggest_init": { "type": "boolean", - "description": "When true, return only facet-enabled fields. When false or omitted, return all fields." + "description": "Account-wide onboarding flag: true when the account has zero knowledge packs in any scope; not dependent on this call's filters." } - } - }, - "RumFieldListResponse": { - "type": "object", - "description": "List of RUM field definitions.", + }, "required": [ - "items" - ], - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RumFieldItem" - } - } - } + "total", + "sessions", + "suggest_init" + ] }, - "SourcemapBinaryImage": { + "SessionTokenUsage": { "type": "object", - "description": "Loaded binary image from a crash report.", - "required": [ - "uuid", - "name", - "is_system" - ], + "description": "Cumulative session-level token rollup across all turns. The account-billing source of truth.", "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." + "input_tokens": { + "type": "integer", + "format": "int64", + "description": "Total prompt (input) tokens, including the cached portion." }, - "load_address": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer", - "format": "int64" - } - ], - "description": "Runtime address. Accepts a hex string such as `0x100000000` or a decimal integer." + "cached_tokens": { + "type": "integer", + "format": "int64", + "description": "Portion of input_tokens served from the prompt cache." }, - "max_address": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer", - "format": "int64" - } - ], - "description": "Runtime address. Accepts a hex string such as `0x100000000` or a decimal integer." + "output_tokens": { + "type": "integer", + "format": "int64", + "description": "Total generated (output) tokens." }, - "arch": { - "type": "string", - "description": "CPU architecture for this binary image." + "reasoning_tokens": { + "type": "integer", + "format": "int64", + "description": "Total reasoning/thinking tokens." } - } + }, + "required": [ + "input_tokens", + "cached_tokens", + "output_tokens", + "reasoning_tokens" + ] }, - "SourcemapCodeSnippet": { + "SkillDeleteRequest": { "type": "object", - "description": "One source-code line returned around an enriched frame.", - "required": [ - "line", - "code" - ], + "description": "Skill deletion by ID.", "properties": { - "line": { - "type": "integer", - "description": "Source line number." - }, - "code": { + "skill_id": { "type": "string", - "description": "Source code on that line." + "description": "Target skill ID." } - } + }, + "required": [ + "skill_id" + ] }, - "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." - } - } + "SkillGetRequest": { + "type": "object", + "description": "Skill lookup by ID.", + "properties": { + "skill_id": { + "type": "string", + "description": "Target skill ID." } + }, + "required": [ + "skill_id" ] }, - "SourcemapStackEnrichRequest": { + "SkillItem": { "type": "object", - "description": "Stack trace enrichment request.", - "required": [ - "service", - "version" - ], + "description": "An AI SRE skill — a packaged SKILL.md bundle the agent can load.", "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": { + "skill_id": { "type": "string", - "description": "Application version used when the sourcemap was uploaded." + "description": "Unique skill ID (prefix `skill_`)." }, - "stack": { - "type": "string", - "description": "Raw stack trace to parse and enrich." + "account_id": { + "type": "integer", + "description": "Owning account ID.", + "format": "int64" }, - "near": { + "team_id": { "type": "integer", - "minimum": 1, - "maximum": 20, - "description": "Number of nearby meaningful source lines to return around converted frames." + "description": "Team scope: 0 = account-wide; >0 = the owning team.", + "format": "int64" }, - "no_cache": { - "type": "boolean", - "description": "Skip cached enrich results. Intended for debugging." + "skill_name": { + "type": "string", + "description": "Skill name, unique within the account." }, - "build_id": { + "description": { "type": "string", - "description": "Android build ID for Gradle plugin 1.13.0 and later." + "description": "Human-readable description from the SKILL.md frontmatter." }, - "variant": { + "description_en": { "type": "string", - "description": "Android build variant used by older Gradle plugin versions." + "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." }, - "arch": { + "content": { "type": "string", - "description": "Android NDK architecture such as `arm`, `arm64`, `x86`, or `x64`." + "description": "Full SKILL.md content. Omitted in list responses." }, - "source_type": { + "version": { "type": "string", - "description": "Android error source type. Use `ndk` with `arch` for native symbolication." + "description": "Skill version from the frontmatter." }, - "binary_images": { + "tags": { "type": "array", - "description": "Loaded binary images from an iOS crash report.", "items": { - "$ref": "#/components/schemas/SourcemapBinaryImage" - } - } - } - }, - "SourcemapStackEnrichResponse": { - "type": "object", - "description": "Enriched stack frames.", - "required": [ - "frames" - ], - "properties": { - "frames": { + "type": "string" + }, + "description": "Tags parsed from the frontmatter." + }, + "author": { + "type": "string", + "description": "Skill author." + }, + "license": { + "type": "string", + "description": "Skill license." + }, + "tools": { "type": "array", "items": { - "$ref": "#/components/schemas/SourcemapEnrichedFrame" - } - } - } - }, - "SourcemapStackFrame": { - "type": "object", - "description": "Parsed stack frame fields shared across platforms.", - "properties": { - "function": { + "type": "string" + }, + "description": "Required tools (builtin or `mcp:server/tool`)." + }, + "s3_key": { "type": "string", - "description": "Function or method name." + "description": "Object-storage key of the skill zip." }, - "file": { + "checksum": { "type": "string", - "description": "Source file, URL, or module path." + "description": "SHA-256 checksum of the skill zip." }, - "line": { + "status": { + "type": "string", + "description": "Skill status. Deleted skills are excluded from every API response, so only these two values are ever returned.", + "enum": [ + "enabled", + "disabled" + ] + }, + "created_by": { "type": "integer", - "description": "Line number." + "description": "Member ID that created the skill.", + "format": "int64" }, - "column": { + "created_at": { "type": "integer", - "description": "Column number for JavaScript or Flutter frames." + "format": "int64", + "description": "Creation time. Unix timestamp in milliseconds." }, - "class_name": { - "type": "string", - "description": "Android Java/Kotlin class name." + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update time. Unix timestamp in milliseconds." }, - "method_name": { - "type": "string", - "description": "Android Java/Kotlin method name without class prefix." + "can_edit": { + "type": "boolean", + "description": "Whether the caller may edit this skill." }, - "module": { + "source_template_name": { "type": "string", - "description": "iOS Swift/Objective-C module name." + "description": "Marketplace template this skill was installed from; empty for user-authored." }, - "address": { + "source_template_version": { "type": "string", - "description": "iOS or native memory address." + "description": "Template version at install time." }, - "offset": { - "type": "integer", - "description": "Symbol offset from function start." + "update_available": { + "type": "boolean", + "description": "True when the marketplace has a newer template version." }, - "native_address": { - "type": "string", - "description": "Unity IL native address." + "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" + ] }, - "CreateStatusPageRequest": { + "SkillListRequest": { "type": "object", + "description": "Pagination, search, and team filter for listing skills.", "properties": { - "name": { - "type": "string", - "description": "Display name of the status page.", - "maxLength": 255 + "p": { + "type": "integer", + "description": "Page number, 1-based.", + "default": 1 }, - "url_name": { - "type": "string", - "description": "URL-safe slug, unique per account and page type.", - "maxLength": 255 + "limit": { + "type": "integer", + "description": "Page size.", + "default": 20 }, - "type": { + "scope": { "type": "string", - "description": "Visibility type of the status page.", + "description": "Restrict results to `all` (default), `account`-only (team_id=0), or `team`-only (excludes account-scoped rows). Overrides `include_account` when set.", "enum": [ - "public", - "internal" + "all", + "account", + "team" ] }, - "custom_domain": { + "query": { "type": "string", - "description": "Custom domain for a public status page.", - "maxLength": 255 + "description": "Free-text search across skill name, description, English description, skill ID, marketplace source template name, and author.", + "maxLength": 128 }, - "page_title": { - "type": "string", - "description": "Browser title shown for the status page." + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter to these team IDs; empty = the caller's visible set." }, - "page_header": { - "type": "string", - "description": "Header content shown on the status page." + "include_account": { + "type": [ + "boolean", + "null" + ], + "description": "Include account-scoped (team_id=0) rows. Defaults to true. Ignored when `scope` is `account` or `team`." + } + } + }, + "SkillListResponse": { + "type": "object", + "description": "Paginated skill list.", + "properties": { + "total": { + "type": "integer", + "description": "Total number of matching skills.", + "format": "int64" }, - "page_footer": { + "skills": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SkillItem" + }, + "description": "Skills on this page." + } + }, + "required": [ + "total", + "skills" + ] + }, + "SkillStatusRequest": { + "type": "object", + "description": "Skill enable/disable by ID.", + "properties": { + "skill_id": { "type": "string", - "description": "Footer content shown on the status page." - }, - "date_view": { + "description": "Target skill ID." + } + }, + "required": [ + "skill_id" + ] + }, + "SkillUpdateRequest": { + "type": "object", + "description": "Editable skill metadata.", + "properties": { + "skill_id": { "type": "string", - "description": "How event dates are displayed.", - "enum": [ - "calendar", - "list" - ] + "description": "Target skill ID." }, - "display_uptime_mode": { + "description": { "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": "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 }, - "contact_info": { - "type": "string", - "description": "Get-in-touch contact, such as a mailto or website URL." + "description_en": { + "type": [ + "string", + "null" + ], + "description": "New English description. Cannot contain `<` or `>`. Omit to leave unchanged; send an empty string to explicitly clear it.", + "maxLength": 1024 }, - "subscription": { - "$ref": "#/components/schemas/StatusPageSubscriptionItem" + "team_id": { + "type": [ + "integer", + "null" + ], + "description": "Reassign team scope: 0 = account-wide; >0 = team. Omit to leave unchanged.", + "format": "int64" } }, "required": [ - "name", - "url_name", - "type", - "date_view", - "display_uptime_mode" + "skill_id" ] }, - "CreateStatusPageResponse": { + "SkillUploadRequest": { "type": "object", + "description": "Multipart form for uploading a skill archive.", "properties": { - "page_id": { + "file": { + "type": "string", + "format": "binary", + "description": "Skill archive (.skill / .zip / .tar.gz / .tgz). Max 100MB; oversized files are rejected before the body is read." + }, + "team_id": { "type": "integer", - "format": "int64", - "description": "Created status page ID." + "description": "Team scope for the created/upserted skill: 0 = account-wide. Ignored when replacing a specific skill via `skill_id`.", + "format": "int64" }, - "page_name": { - "type": "string", - "description": "Created status page name." + "replace": { + "type": "boolean", + "description": "When true, overwrite an existing skill instead of failing on a name collision — matched by `skill_id` if provided, otherwise by skill name." }, - "page_url_name": { + "skill_id": { "type": "string", - "description": "Final URL-safe slug assigned to the status page." + "description": "Existing skill ID to target when replacing a specific skill (requires `replace=true`)." } }, "required": [ - "page_id", - "page_name", - "page_url_name" + "file" ] } } diff --git a/openapi/openapi.zh.json b/openapi/openapi.zh.json index e4e26af..9054a80 100644 --- a/openapi/openapi.zh.json +++ b/openapi/openapi.zh.json @@ -10941,7 +10941,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,7 +10994,7 @@ "post": { "operationId": "insightIncidentExport", "summary": "导出洞察故障", - "description": "将故障分析列表以 CSV 文件形式导出。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", + "description": "将故障分析列表以 CSV 文件形式导出。CSV 列名和格式化值优先使用请求语言,其次使用成员语言和账户语言。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", "tags": [ "On-call/分析看板" ], @@ -11174,7 +11181,7 @@ "post": { "operationId": "insightChannelExport", "summary": "导出协作空间洞察", - "description": "将协作空间洞察指标以 CSV 文件形式导出。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", + "description": "将协作空间洞察指标以 CSV 文件形式导出。CSV 列名和格式化值优先使用请求语言,其次使用成员语言和账户语言。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", "tags": [ "On-call/分析看板" ], @@ -11356,7 +11363,7 @@ "post": { "operationId": "insightTeamExport", "summary": "导出团队洞察", - "description": "将团队洞察指标以 CSV 文件形式导出。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", + "description": "将团队洞察指标以 CSV 文件形式导出。CSV 列名和格式化值优先使用请求语言,其次使用成员语言和账户语言。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", "tags": [ "On-call/分析看板" ], @@ -11529,7 +11536,7 @@ "post": { "operationId": "insightResponderExport", "summary": "导出处理人员洞察", - "description": "将处理人员洞察指标以 CSV 文件形式导出。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", + "description": "将处理人员洞察指标以 CSV 文件形式导出。CSV 列名和格式化值优先使用请求语言,其次使用成员语言和账户语言。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", "tags": [ "On-call/分析看板" ], @@ -13239,7 +13246,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 +13350,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": "更新告警规则" @@ -13835,7 +13842,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 +15480,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": "查询分值分布" @@ -19715,7 +19722,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": "查询数据源原始行" @@ -20892,41 +20899,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" } } } @@ -20935,33 +21011,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": "" } } } @@ -20985,53 +21071,126 @@ "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/技能" + "On-call/故障管理" ], - "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", + "metadata": { + "sidebarTitle": "更新故障复盘基础信息" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "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/ResetPostMortemBasicsRequest" + }, + "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 + ] + } + } + } + } + } + }, + "/incident/post-mortem/status/reset": { + "post": { + "operationId": "postmortem-write-reset-status", + "summary": "更新故障复盘状态", + "description": "将复盘报告设置为草稿或已发布。", + "tags": [ + "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-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" } } } @@ -21039,31 +21198,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": {} } } } @@ -21086,51 +21221,47 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillGetRequest" + "$ref": "#/components/schemas/ResetPostMortemStatusRequest" }, "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "status": "published" } } } } } }, - "/safari/skill/update": { + "/incident/post-mortem/title/reset": { "post": { - "operationId": "skill-write-update", - "summary": "更新技能", - "description": "更新技能的描述或重新分配团队范围。", + "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- 仅 `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-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": { - "$ref": "#/components/schemas/SkillItem" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -21138,30 +21269,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": {} } } } @@ -21172,9 +21280,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21187,53 +21292,47 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillUpdateRequest" + "$ref": "#/components/schemas/ResetPostMortemTitleRequest" }, "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", - "description": "Updated triage runbook." + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "title": "Production API latency incident" } } } } } }, - "/safari/skill/delete": { + "/incident/post-mortem/follow-ups/reset": { "post": { - "operationId": "skill-write-delete", - "summary": "删除技能", - "description": "按 ID 删除技能。", + "operationId": "postmortem-write-reset-follow-ups", + "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-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": { - "type": "null", - "description": "成功时恒为 null。" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -21241,7 +21340,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -21252,9 +21351,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21267,51 +21363,47 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillDeleteRequest" + "$ref": "#/components/schemas/ResetPostMortemFollowUpsRequest" }, "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "follow_ups": "- Add database saturation alert\n- Review cache TTL rollout" } } } } } }, - "/safari/skill/upload": { + "/incident/post-mortem/template/upsert": { "post": { - "operationId": "skill-write-upload", - "summary": "上传技能", - "description": "上传技能压缩包(.skill/.zip/.tar.gz/.tgz)以创建或覆盖技能。", + "operationId": "postmortem-write-upsert-template", + "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-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": { - "$ref": "#/components/schemas/SkillItem" + "$ref": "#/components/schemas/PostMortemTemplate" } } } @@ -21320,29 +21412,15 @@ "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 + "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 } } } @@ -21354,9 +21432,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21367,55 +21442,52 @@ "requestBody": { "required": true, "content": { - "multipart/form-data": { + "application/json": { "schema": { - "$ref": "#/components/schemas/SkillUploadRequest" + "$ref": "#/components/schemas/UpsertPostMortemTemplateRequest" }, "example": { - "team_id": 0, - "replace": false + "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/enable": { + "/incident/post-mortem/template/delete": { "post": { - "operationId": "skill-read-enable", - "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- 仅可启用 `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-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" } } } @@ -21423,7 +21495,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -21434,9 +21506,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21449,52 +21518,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/skill/disable": { + "/incident/post-mortem/template/list": { "post": { - "operationId": "skill-write-disable", - "summary": "禁用技能", - "description": "禁用已启用的技能,使智能体不再加载。", + "operationId": "postmortem-read-list-templates", + "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`) |", + "href": "/zh/api-reference/on-call/incidents/postmortem-read-list-templates", "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/ListPostMortemTemplatesResponse" } } } @@ -21502,7 +21565,23 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "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 + } + ] + } } } } @@ -21513,9 +21592,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21528,51 +21604,49 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillStatusRequest" + "$ref": "#/components/schemas/ListPostMortemTemplatesRequest" }, "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + "p": 1, + "limit": 20, + "order_by": "created_at_seconds", + "asc": false } } } } } }, - "/safari/mcp/server/list": { - "post": { - "operationId": "mcp-read-server-list", - "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| 权限要求 | 无 —— 持有有效的 `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-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/MCPServerListResponse" + "$ref": "#/components/schemas/PostMortemTemplate" } } } @@ -21581,37 +21655,15 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "total": 1, - "servers": [ - { - "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 } } } @@ -21630,58 +21682,49 @@ "$ref": "#/components/responses/ServerError" } }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MCPServerListRequest" - }, - "example": { - "p": 1, - "limit": 20, - "include_account": true - } - } + "parameters": [ + { + "name": "template_id", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "description": "Template ID." } - } + ] } }, - "/safari/mcp/server/create": { + "/monit/preview/sync": { "post": { - "operationId": "mcp-write-server-create", - "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| 权限要求 | **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| 速率限制 | 每个账户 **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" } } } @@ -21690,32 +21733,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": [] + } } } } @@ -21727,9 +21749,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21742,55 +21761,49 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServerCreateRequest" + "$ref": "#/components/schemas/PreviewSyncRequest" }, "example": { - "server_name": "prometheus", - "description": "Query Prometheus metrics and alerts.", - "transport": "streamable-http", - "url": "https://mcp.example.com/prometheus", - "status": "enabled" + "ds_type": "prometheus", + "ds_name": "生产 Prometheus", + "expr": "rate(http_requests_total[5m])", + "delay_seconds": 0 } } } } } }, - "/safari/mcp/server/get": { - "post": { - "operationId": "mcp-read-server-get", - "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| 权限要求 | 无 —— 持有有效的 `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| 速率限制 | 每个账户 **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" } } } @@ -21799,43 +21812,59 @@ "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": [ + "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 - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, + "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" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21843,56 +21872,49 @@ "$ref": "#/components/responses/ServerError" } }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MCPServerGetRequest" - }, - "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" - } - } + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "description": "Status page ID" } - } + ] } }, - "/safari/mcp/server/update": { + "/status-page/create": { "post": { - "operationId": "mcp-write-server-update", - "summary": "更新 MCP 服务器", - "description": "更新 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- `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| 权限要求 | **状态页面管理**(`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": { - "$ref": "#/components/schemas/MCPServerItem" + "$ref": "#/components/schemas/CreateStatusPageResponse" } } } @@ -21901,32 +21923,9 @@ "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": [ - { - "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 + "page_id": 6294565612043, + "page_name": "My Status Page", + "page_url_name": "my-status-page" } } } @@ -21938,9 +21937,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -21953,53 +21949,50 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServerUpdateRequest" + "$ref": "#/components/schemas/CreateStatusPageRequest" }, "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", - "description": "Query Prometheus metrics, alerts, and rules." + "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/delete": { + "/status-page/update": { "post": { - "operationId": "mcp-write-server-delete", - "summary": "删除 MCP 服务器", - "description": "按 ID 删除 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-delete", + "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" } } } @@ -22007,7 +22000,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -22018,9 +22011,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22033,52 +22023,49 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServerDeleteRequest" + "$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/enable": { + "/status-page/delete": { "post": { - "operationId": "mcp-write-server-enable", - "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-enable", + "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" } } } @@ -22086,7 +22073,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -22097,9 +22084,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22112,52 +22096,46 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServerStatusRequest" + "$ref": "#/components/schemas/EmptyRequest" }, "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" + "page_id": 5750613685214 } } } } } }, - "/safari/mcp/server/disable": { + "/status-page/component/upsert": { "post": { - "operationId": "mcp-write-server-disable", - "summary": "禁用 MCP 服务器", - "description": "禁用已启用的 MCP 服务器。", + "operationId": "statusPageComponentUpsert", + "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-component-upsert", "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/UpsertStatusPageComponentResponse" } } } @@ -22165,7 +22143,11 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": { + "component_ids": [ + "01KP032KMN9YFBMPWANJMFZFG1" + ] + } } } } @@ -22176,9 +22158,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22191,51 +22170,54 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServerStatusRequest" + "$ref": "#/components/schemas/UpsertStatusPageComponentRequest" }, "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" + "page_id": 5750613685214, + "components": [ + { + "name": "Web Console", + "description": "Main web interface", + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", + "order_id": 1 + } + ] } } } } } }, - "/safari/a2a-agent/create": { + "/status-page/component/delete": { "post": { - "operationId": "remote-agent-write-create", - "summary": "创建 A2A 智能体", - "description": "通过智能体卡片 URL 注册新的 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| 权限要求 | **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-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/A2AAgentCreateResponse" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -22243,9 +22225,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" - } + "data": {} } } } @@ -22256,9 +22236,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22271,55 +22248,49 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentCreateRequest" + "$ref": "#/components/schemas/DeleteStatusPageComponentRequest" }, "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, + "component_ids": [ + "01KP032KMN9YFBMPWANJMFZFG1" + ] } } } } } }, - "/safari/a2a-agent/list": { + "/status-page/section/upsert": { "post": { - "operationId": "remote-agent-read-list", - "summary": "查询 A2A 智能体列表", - "description": "分页查询调用者在账户与团队范围内可见的 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\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-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/A2AAgentListResponse" + "$ref": "#/components/schemas/UpsertStatusPageSectionResponse" } } } @@ -22328,32 +22299,9 @@ "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 + "section_ids": [ + "01KP032J1FV2H8DDGN0QSJ1CAR" + ] } } } @@ -22377,53 +22325,53 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentListRequest" + "$ref": "#/components/schemas/UpsertStatusPageSectionRequest" }, "example": { - "offset": 0, - "limit": 20, - "include_account": true + "page_id": 5750613685214, + "sections": [ + { + "name": "Core Services", + "description": "Our core services", + "order_id": 1 + } + ] } } } } } }, - "/safari/a2a-agent/get": { + "/status-page/section/delete": { "post": { - "operationId": "remote-agent-read-get", - "summary": "查看 A2A 智能体详情", - "description": "按 ID 查看单个 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| 权限要求 | 无 —— 持有有效的 `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-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/A2AAgentItem" + "$ref": "#/components/schemas/EmptyResponse" } } } @@ -22431,29 +22379,7 @@ }, "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 - } + "data": {} } } } @@ -22476,52 +22402,49 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentIDRequest" + "$ref": "#/components/schemas/DeleteStatusPageSectionRequest" }, "example": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" + "page_id": 5750613685214, + "section_ids": [ + "01KP032J1FV2H8DDGN0QSJ1CAR" + ] } } } } } }, - "/safari/a2a-agent/update": { + "/status-page/template/upsert": { "post": { - "operationId": "remote-agent-write-update", - "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-update", + "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" } } } @@ -22529,7 +22452,9 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": { + "template_id": "01KP0339G5XDEPM4R86T2B23EP" + } } } } @@ -22540,9 +22465,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22555,53 +22477,53 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentUpdateRequest" + "$ref": "#/components/schemas/UpsertStatusPageTemplateRequest" }, "example": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", - "description": "Inspects deployment pipelines and proposes rollbacks." + "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/enable": { + "/status-page/template/delete": { "post": { - "operationId": "remote-agent-write-enable", - "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-enable", + "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" } } } @@ -22609,7 +22531,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": {} } } } @@ -22620,9 +22542,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22635,52 +22554,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/disable": { - "post": { - "operationId": "remote-agent-write-disable", - "summary": "禁用 A2A 智能体", - "description": "禁用已启用的 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-disable", + "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" } } } @@ -22688,9 +22603,19 @@ }, "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." + } + ] + } + } + } } }, "400": { @@ -22699,9 +22624,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22709,28 +22631,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/a2a-agent/delete": { + "/safari/a2a-agent/create": { "post": { - "operationId": "remote-agent-write-delete", - "summary": "删除 A2A 智能体", - "description": "按 ID 软删除 A2A 智能体。", + "operationId": "remote-agent-write-create", + "summary": "创建 A2A 智能体", + "description": "通过智能体卡片 URL 注册新的 A2A 远程智能体。", "tags": [ - "AI SRE/A2A 智能体" + "zh" ], "security": [ { @@ -22738,10 +22672,10 @@ } ], "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| 速率限制 | 每个 `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": "删除 A2A 智能体" + "sidebarTitle": "创建 A2A 智能体" } }, "responses": { @@ -22758,8 +22692,7 @@ "type": "object", "properties": { "data": { - "type": "null", - "description": "成功时恒为 null。" + "$ref": "#/components/schemas/A2AAgentCreateResponse" } } } @@ -22767,7 +22700,9 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": { + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" + } } } } @@ -22793,23 +22728,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/A2AAgentIDRequest" + "$ref": "#/components/schemas/A2AAgentCreateRequest" }, "example": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" + "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/list": { + "/safari/a2a-agent/delete": { "post": { - "operationId": "session-read-list", - "summary": "查询会话列表", - "description": "分页查询调用者可见的智能体会话,可按应用、入口、归档状态与团队过滤。", + "operationId": "remote-agent-write-delete", + "summary": "删除 A2A 智能体", + "description": "按 ID 软删除 A2A 智能体。", "tags": [ - "AI SRE/会话" + "zh" ], "security": [ { @@ -22817,10 +22759,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- 删除为软删除;删除后该智能体不再出现在列表/详情中,也无法再被调度。\n- 需要对智能体所属团队具备编辑权限(`access.CanEdit`)。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-write-delete", "metadata": { - "sidebarTitle": "查询会话列表" + "sidebarTitle": "删除 A2A 智能体" } }, "responses": { @@ -22837,7 +22779,8 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SessionListResponse" + "type": "null", + "description": "Always null on success." } } } @@ -22845,38 +22788,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 - } - ] - } + "data": null } } } @@ -22887,6 +22799,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -22899,26 +22814,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SessionListRequest" + "$ref": "#/components/schemas/A2AAgentIDRequest" }, "example": { - "app_name": "ai-sre", - "limit": 2, - "orderby": "updated_at", - "scope": "all" + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" } } } } } }, - "/safari/session/get": { + "/safari/a2a-agent/disable": { "post": { - "operationId": "session-read-info", - "summary": "查看会话详情", - "description": "查看单个会话,并返回其最近事件的一页(向更早方向分页)。", + "operationId": "remote-agent-write-disable", + "summary": "禁用 A2A 智能体", + "description": "禁用已启用的 A2A 智能体。", "tags": [ - "AI SRE/会话" + "zh" ], "security": [ { @@ -22926,10 +22838,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- 需要对智能体所属团队具备编辑权限(`access.CanEdit`)。\n- 若智能体已处于禁用状态,返回 `InvalidParameter`。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-write-disable", "metadata": { - "sidebarTitle": "查看会话详情" + "sidebarTitle": "禁用 A2A 智能体" } }, "responses": { @@ -22946,7 +22858,8 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/SessionGetResponse" + "type": "null", + "description": "Always null on success." } } } @@ -22954,64 +22867,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 } } } @@ -23022,6 +22878,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23034,24 +22893,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/enable": { "post": { - "operationId": "session-read-export", - "summary": "导出会话记录", - "description": "以换行分隔的 JSON(NDJSON)流式导出会话的完整事件记录。", + "operationId": "remote-agent-write-enable", + "summary": "启用 A2A 智能体", + "description": "启用已禁用的 A2A 智能体。", "tags": [ - "AI SRE/会话" + "zh" ], "security": [ { @@ -23059,20 +22917,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-enable", "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 } } } @@ -23083,6 +22957,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23095,24 +22972,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/get": { "post": { - "operationId": "session-write-delete", - "summary": "删除会话", - "description": "按 ID 删除会话。", + "operationId": "remote-agent-read-get", + "summary": "查看 A2A 智能体详情", + "description": "按 ID 查看单个 A2A 智能体。", "tags": [ - "AI SRE/会话" + "zh" ], "security": [ { @@ -23120,10 +22996,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` **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": "删除会话" + "sidebarTitle": "查看 A2A 智能体详情" } }, "responses": { @@ -23140,8 +23016,7 @@ "type": "object", "properties": { "data": { - "type": "null", - "description": "成功时恒为 null。" + "$ref": "#/components/schemas/A2AAgentItem" } } } @@ -23149,7 +23024,31 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null + "data": { + "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 + } } } } @@ -23172,46 +23071,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/list": { "post": { - "operationId": "datasourceImPersonTryLink", - "summary": "尝试关联 IM 人员", - "description": "为指定集成尝试将未绑定成员自动关联到对应的 IM 账号。", + "operationId": "remote-agent-read-list", + "summary": "查询 A2A 智能体列表", + "description": "分页查询调用者在账户与团队范围内可见的 A2A 智能体。", "tags": [ - "On-call/集成中心" + "zh" + ], + "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- 分页使用 `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": "尝试关联 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/A2AAgentListResponse" } } } @@ -23220,9 +23124,34 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "new_linked_person_ids": [ - 5348648172131 - ] + "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 } } } @@ -23246,46 +23175,54 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TryLinkPersonRequest" + "$ref": "#/components/schemas/A2AAgentListRequest" }, "example": { - "integration_id": 6113996590131 + "offset": 0, + "limit": 20, + "include_account": true } } } } } }, - "/incident/post-mortem/init": { + "/safari/a2a-agent/update": { "post": { - "operationId": "postmortem-write-init", - "summary": "初始化故障复盘", - "description": "根据一个或多个故障和模板创建复盘草稿。", + "operationId": "remote-agent-write-update", + "summary": "更新 A2A 智能体", + "description": "对 A2A 智能体执行部分更新;省略字段表示不变。", "tags": [ - "On-call/故障管理" + "zh" + ], + "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` **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/PostMortemItem" + "type": "null", + "description": "Always null on success." } } } @@ -23293,45 +23230,7 @@ }, "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": "" - } + "data": null } } } @@ -23342,6 +23241,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23354,49 +23256,52 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InitPostMortemRequest" + "$ref": "#/components/schemas/A2AAgentUpdateRequest" }, "example": { - "incident_ids": [ - "69bb9233331067560c718ecd" - ], - "template_id": "post_mortem_default_tmpl_en-us" + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", + "instructions": "Inspect deployment pipelines and propose rollbacks." } } } } } }, - "/incident/post-mortem/basics/reset": { + "/safari/automation/rule/create": { "post": { - "operationId": "postmortem-write-reset-basics", - "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-basics", + "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" } } } @@ -23404,7 +23309,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" + ] + } } } } @@ -23415,6 +23352,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23427,53 +23367,67 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResetPostMortemBasicsRequest" + "$ref": "#/components/schemas/AutomationRuleCreateRequest" }, "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 - ] - } - } - } - } - } - }, - "/incident/post-mortem/status/reset": { + "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" + ] + } + } + } + } + } + }, + "/safari/automation/rule/delete": { "post": { - "operationId": "postmortem-write-reset-status", - "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-status", + "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。" } } } @@ -23481,7 +23435,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": null } } } @@ -23492,6 +23446,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23504,47 +23461,51 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResetPostMortemStatusRequest" + "$ref": "#/components/schemas/AutomationRuleIDRequest" }, "example": { - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", - "status": "published" + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b" } } } } } }, - "/incident/post-mortem/title/reset": { + "/safari/automation/rule/get": { "post": { - "operationId": "postmortem-write-reset-title", - "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-title", + "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" } } } @@ -23552,7 +23513,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" + ] + } } } } @@ -23563,6 +23556,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23575,47 +23571,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/list": { "post": { - "operationId": "postmortem-write-reset-follow-ups", - "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-reset-follow-ups", + "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/EmptyResponse" + "$ref": "#/components/schemas/AutomationRuleListResponse" } } } @@ -23623,7 +23623,44 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": { + "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" + ] + } + ] + } } } } @@ -23634,6 +23671,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23646,47 +23686,52 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResetPostMortemFollowUpsRequest" + "$ref": "#/components/schemas/AutomationRuleListRequest" }, "example": { - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", - "follow_ups": "- Add database saturation alert\n- Review cache TTL rollout" + "scope": "all", + "limit": 20 } } } } } }, - "/incident/post-mortem/template/upsert": { + "/safari/automation/rule/run": { "post": { - "operationId": "postmortem-write-upsert-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-upsert-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/PostMortemTemplate" + "$ref": "#/components/schemas/ManualRunRuleResult" } } } @@ -23695,15 +23740,26 @@ "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 + "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" + } } } } @@ -23715,6 +23771,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23727,50 +23786,51 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpsertPostMortemTemplateRequest" + "$ref": "#/components/schemas/AutomationRuleIDRequest" }, "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." + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b" } } } } } }, - "/incident/post-mortem/template/delete": { + "/safari/automation/rule/update": { "post": { - "operationId": "postmortem-write-delete-template", - "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`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", - "href": "/zh/api-reference/on-call/incidents/postmortem-write-delete-template", + "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/EmptyResponse" + "$ref": "#/components/schemas/AutomationRuleItem" } } } @@ -23778,7 +23838,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" + ] + } } } } @@ -23789,6 +23881,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23801,46 +23896,62 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeletePostMortemTemplateRequest" + "$ref": "#/components/schemas/AutomationRuleUpdateRequest" }, "example": { - "template_id": "post_mortem_custom_tmpl_01" + "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/list": { + "/safari/automation/run/list": { "post": { - "operationId": "postmortem-read-list-templates", - "summary": "查询故障复盘模板列表", - "description": "返回账号下的内置和自定义故障复盘模板。", + "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-list-templates", + "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/ListPostMortemTemplatesResponse" + "$ref": "#/components/schemas/AutomationRunListResponse" } } } @@ -23849,19 +23960,28 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "total": 2, - "has_next_page": false, - "items": [ + "total": 1, + "runs": [ { - "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 + "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 } ] } @@ -23875,6 +23995,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23887,49 +24010,53 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListPostMortemTemplatesRequest" + "$ref": "#/components/schemas/AutomationRunListRequest" }, "example": { - "p": 1, + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", "limit": 20, - "order_by": "created_at_seconds", - "asc": false + "trigger_kind": "schedule" } } } } } }, - "/incident/post-mortem/template/info": { - "get": { - "operationId": "postmortem-read-template-info", - "summary": "查看故障复盘模板详情", - "description": "按 ID 返回单个故障复盘模板。", + "/safari/automation/template/list": { + "post": { + "operationId": "automation-template-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", + "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/PostMortemTemplate" + "$ref": "#/components/schemas/AutomationTemplateListResponse" } } } @@ -23938,15 +24065,15 @@ "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 + "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" + } + ] } } } @@ -23958,6 +24085,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -23965,49 +24095,56 @@ "$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/AutomationTemplateListRequest" + }, + "example": { + "locale": "en-US" + } + } } - ] + } } }, - "/monit/preview/sync": { + "/safari/mcp/server/create": { "post": { - "operationId": "monit-preview-sync", - "summary": "同步预览数据源查询", - "description": "同步执行数据源查询并返回原始结果,用于在保存前预览告警规则表达式的效果。", + "operationId": "mcp-write-server-create", + "summary": "创建 MCP 服务器", + "description": "在账户下注册新的 MCP 服务器(连接器)。", "tags": [ - "Monitors/通用工具" + "AI SRE/MCP 服务器" + ], + "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| 速率限制 | 每个 `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/PreviewSyncResponse" + "$ref": "#/components/schemas/MCPServerItem" } } } @@ -24016,11 +24153,34 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "status": "success", - "data": { - "resultType": "vector", - "result": [] - } + "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 } } } @@ -24032,6 +24192,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24044,49 +24207,56 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PreviewSyncRequest" + "$ref": "#/components/schemas/MCPServerCreateRequest" }, "example": { - "ds_type": "prometheus", - "ds_name": "生产 Prometheus", - "expr": "rate(http_requests_total[5m])", - "delay_seconds": 0 + "server_name": "prometheus", + "description": "Query Prometheus metrics and alerts.", + "transport": "streamable-http", + "url": "https://mcp.example.com/prometheus", + "status": "enabled" } } } } } }, - "/status-page/info": { - "get": { - "operationId": "statusPageInfo", - "summary": "获取状态页详情", - "description": "获取指定状态页的详细配置信息。", - "tags": [ - "On-call/状态页" - ], - "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", - "href": "/zh/api-reference/on-call/status-pages/status-page-info", + "/safari/mcp/server/delete": { + "post": { + "operationId": "mcp-write-server-delete", + "summary": "删除 MCP 服务器", + "description": "按 ID 删除 MCP 服务器。", + "tags": [ + "AI SRE/MCP 服务器" + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "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", "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。" } } } @@ -24094,50 +24264,7 @@ }, "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": [ - { - "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", - "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", - "name": "Web Console", - "available_since_seconds": 1765349358, - "order_id": 1 - } - ], - "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" - } + "data": null } } } @@ -24148,6 +24275,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24155,49 +24285,57 @@ "$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/MCPServerDeleteRequest" + }, + "example": { + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" + } + } } - ] + } } }, - "/status-page/create": { + "/safari/mcp/server/disable": { "post": { - "operationId": "statusPageCreate", - "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-create", + "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/CreateStatusPageResponse" + "type": "null", + "description": "成功时恒为 null。" } } } @@ -24205,11 +24343,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "page_id": 6294565612043, - "page_name": "My Status Page", - "page_url_name": "my-status-page" - } + "data": null } } } @@ -24220,6 +24354,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24232,50 +24369,52 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateStatusPageRequest" + "$ref": "#/components/schemas/MCPServerStatusRequest" }, "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/enable": { "post": { - "operationId": "statusPageUpdate", - "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-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-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。" } } } @@ -24283,7 +24422,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": null } } } @@ -24294,6 +24433,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24306,49 +24448,51 @@ "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/get": { "post": { - "operationId": "statusPageDelete", - "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-delete", + "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/EmptyResponse" + "$ref": "#/components/schemas/MCPServerItem" } } } @@ -24356,7 +24500,36 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": { + "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 + } } } } @@ -24379,46 +24552,51 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EmptyRequest" + "$ref": "#/components/schemas/MCPServerGetRequest" }, "example": { - "page_id": 5750613685214 + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" } } } } } }, - "/status-page/component/upsert": { + "/safari/mcp/server/list": { "post": { - "operationId": "statusPageComponentUpsert", - "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-upsert", + "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/UpsertStatusPageComponentResponse" + "$ref": "#/components/schemas/MCPServerListResponse" } } } @@ -24427,8 +24605,38 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "component_ids": [ - "01KP032KMN9YFBMPWANJMFZFG1" + "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 + } ] } } @@ -24453,54 +24661,53 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpsertStatusPageComponentRequest" + "$ref": "#/components/schemas/MCPServerListRequest" }, "example": { - "page_id": 5750613685214, - "components": [ - { - "name": "Web Console", - "description": "Main web interface", - "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", - "order_id": 1 - } - ] + "p": 1, + "limit": 20, + "include_account": true } } } } } }, - "/status-page/component/delete": { + "/safari/mcp/server/update": { "post": { - "operationId": "statusPageComponentDelete", - "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-component-delete", + "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/EmptyResponse" + "$ref": "#/components/schemas/MCPServerItem" } } } @@ -24508,7 +24715,36 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "data": { + "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 + } } } } @@ -24519,6 +24755,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24531,49 +24770,53 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteStatusPageComponentRequest" + "$ref": "#/components/schemas/MCPServerUpdateRequest" }, "example": { - "page_id": 5750613685214, - "component_ids": [ - "01KP032KMN9YFBMPWANJMFZFG1" - ] + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", + "description": "Query Prometheus metrics, alerts, and rules." } } } } } }, - "/status-page/section/upsert": { + "/safari/session/delete": { "post": { - "operationId": "statusPageSectionUpsert", - "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-upsert", + "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/UpsertStatusPageSectionResponse" + "type": "null", + "description": "成功时恒为 null。" } } } @@ -24581,11 +24824,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "section_ids": [ - "01KP032J1FV2H8DDGN0QSJ1CAR" - ] - } + "data": null } } } @@ -24596,6 +24835,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24608,61 +24850,44 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpsertStatusPageSectionRequest" + "$ref": "#/components/schemas/SessionDeleteRequest" }, "example": { - "page_id": 5750613685214, - "sections": [ - { - "name": "Core Services", - "description": "Our core services", - "order_id": 1 - } - ] + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" } } } } } }, - "/status-page/section/delete": { + "/safari/session/export": { "post": { - "operationId": "statusPageSectionDelete", - "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-section-delete", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **20 次/分钟**;**1 次/秒** |\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/EmptyResponse" - } - } - } - ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "type": "string", + "description": "换行分隔的 JSON 流。请逐行解析,切勿缓冲整个响应体。" } } } @@ -24673,6 +24898,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24685,49 +24913,52 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteStatusPageSectionRequest" + "$ref": "#/components/schemas/SessionExportRequest" }, "example": { - "page_id": 5750613685214, - "section_ids": [ - "01KP032J1FV2H8DDGN0QSJ1CAR" - ] + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "include_subagents": false } } } } } }, - "/status-page/template/upsert": { + "/safari/session/get": { "post": { - "operationId": "statusPageTemplateUpsert", - "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-upsert", + "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/UpsertStatusPageTemplateResponse" + "$ref": "#/components/schemas/SessionGetResponse" } } } @@ -24736,7 +24967,75 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "template_id": "01KP0339G5XDEPM4R86T2B23EP" + "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 } } } @@ -24748,6 +25047,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24760,53 +25062,52 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpsertStatusPageTemplateRequest" + "$ref": "#/components/schemas/SessionGetRequest" }, "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", + "num_recent_events": 50 } } } } } }, - "/status-page/template/delete": { + "/safari/session/list": { "post": { - "operationId": "statusPageTemplateDelete", - "summary": "删除状态页模板", - "description": "删除状态页的事件模板。", + "operationId": "session-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/status-pages/status-page-template-delete", + "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" } } } @@ -24814,7 +25115,51 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": {} + "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_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 + } } } } @@ -24825,6 +25170,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24837,48 +25185,55 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteStatusPageTemplateRequest" + "$ref": "#/components/schemas/SessionListRequest" }, "example": { - "page_id": 5720156736380, - "type": "pre_defined", - "template_id": "01KP0339G5XDEPM4R86T2B23EP" + "app_name": "ai-sre", + "limit": 2, + "orderby": "updated_at", + "scope": "all" } } } } } }, - "/status-page/template/list": { - "get": { - "operationId": "statusPageTemplateList", - "summary": "查询状态页模板列表", - "description": "查询状态页的所有事件模板。", + "/safari/skill/delete": { + "post": { + "operationId": "skill-write-delete", + "summary": "删除技能", + "description": "按 ID 删除技能。", "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| 速率限制 | 每个账户 **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": { "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。" } } } @@ -24886,17 +25241,7 @@ }, "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "items": [ - { - "template_id": "01KC8KP6PHVPSCAB0BTKZBN2HR", - "title": "Service Disruption", - "type": "incident", - "status": "identified", - "description": "We have identified the root cause." - } - ] - } + "data": null } } } @@ -24907,6 +25252,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -24914,40 +25262,28 @@ "$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/SkillDeleteRequest" + }, + "example": { + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + } + } } - ] + } } }, - "/safari/automation/rule/create": { + "/safari/skill/disable": { "post": { - "operationId": "automation-rule-write-create", - "summary": "创建自动化规则", - "description": "创建自动化规则,支持 schedule、HTTP POST 和 On-call 故障触发器。", + "operationId": "skill-write-disable", + "summary": "禁用技能", + "description": "禁用已启用的技能,使智能体不再加载。", "tags": [ - "AI SRE/自动化" + "AI SRE/技能" ], "security": [ { @@ -24955,10 +25291,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- 仅可禁用 `enabled` 状态的技能;已禁用的技能会返回 `InvalidParameter`。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/skills/skill-write-disable", "metadata": { - "sidebarTitle": "创建自动化规则" + "sidebarTitle": "禁用技能" } }, "responses": { @@ -24975,7 +25311,8 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationRuleItem" + "type": "null", + "description": "成功时恒为 null。" } } } @@ -24983,38 +25320,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 } } } @@ -25040,37 +25346,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationRuleCreateRequest" + "$ref": "#/components/schemas/SkillStatusRequest" }, "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/enable": { "post": { - "operationId": "automation-rule-read-list", - "summary": "列出自动化规则", - "description": "列出当前调用者可见的自动化规则。", + "operationId": "skill-read-enable", + "summary": "启用技能", + "description": "启用已禁用的技能,使智能体可加载。", "tags": [ - "AI SRE/自动化" + "AI SRE/技能" ], "security": [ { @@ -25078,10 +25370,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- 仅可启用 `disabled` 状态的技能;已启用的技能会返回 `InvalidParameter`。\n- 每次调用都会记录到账户审计日志。\n", + "href": "/zh/api-reference/ai-sre/skills/skill-read-enable", "metadata": { - "sidebarTitle": "列出自动化规则" + "sidebarTitle": "启用技能" } }, "responses": { @@ -25098,7 +25390,8 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationRuleListResponse" + "type": "null", + "description": "成功时恒为 null。" } } } @@ -25106,42 +25399,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 } } } @@ -25167,24 +25425,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/get": { "post": { - "operationId": "automation-rule-read-get", - "summary": "查看自动化规则", - "description": "按 ID 查看一条自动化规则。", + "operationId": "skill-read-get", + "summary": "查看技能详情", + "description": "查看单个技能,包含完整的 SKILL.md 内容。", "tags": [ - "AI SRE/自动化" + "AI SRE/技能" ], "security": [ { @@ -25192,10 +25449,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| 速率限制 | 每个 `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": { @@ -25212,7 +25469,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationRuleItem" + "$ref": "#/components/schemas/SkillItem" } } } @@ -25221,35 +25478,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, - "schedule_next_fire_at_ms": 1780630800000, - "oncall_incident_trigger_id": "autotrg_9cFr2kLm8qNv5pXs4dWy7a", - "oncall_incident_trigger_enabled": true, - "oncall_incident_channel_ids": [ - 2468013579 + "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" } } } @@ -25261,9 +25513,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -25276,23 +25525,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationRuleIDRequest" + "$ref": "#/components/schemas/SkillGetRequest" }, "example": { - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b" + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" } } } } } }, - "/safari/automation/rule/update": { + "/safari/skill/list": { "post": { - "operationId": "automation-rule-write-update", - "summary": "更新自动化规则", - "description": "更新自动化规则的可变字段,包括 HTTP POST 与 On-call 故障触发器配置。", + "operationId": "skill-read-list", + "summary": "查询技能列表", + "description": "分页查询调用者在账户与团队范围内可见的 AI SRE 技能。", "tags": [ - "AI SRE/自动化" + "AI SRE/技能" ], "security": [ { @@ -25300,10 +25549,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- 列表行中省略 `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": { @@ -25320,7 +25569,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationRuleItem" + "$ref": "#/components/schemas/SkillListResponse" } } } @@ -25329,35 +25578,32 @@ "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" + "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 + } ] } } @@ -25370,9 +25616,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -25385,34 +25628,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationRuleUpdateRequest" + "$ref": "#/components/schemas/SkillListRequest" }, "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 - ] + "p": 1, + "limit": 20, + "include_account": true } } } } } }, - "/safari/automation/rule/delete": { + "/safari/skill/update": { "post": { - "operationId": "automation-rule-write-delete", - "summary": "删除自动化规则", - "description": "删除一条自动化规则。", + "operationId": "skill-write-update", + "summary": "更新技能", + "description": "更新技能的描述信息或重新分配团队范围。", "tags": [ - "AI SRE/自动化" + "AI SRE/技能" ], "security": [ { @@ -25420,10 +25654,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| 速率限制 | 每个账户 **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": { @@ -25440,86 +25674,7 @@ "type": "object", "properties": { "data": { - "type": "null", - "description": "成功时固定为 null。" - } - } - } - ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": null - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "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/AutomationRuleIDRequest" - }, - "example": { - "rule_id": "auto_7NnLzY2Qp8xS4kUaV3mR6b" - } - } - } - } - } - }, - "/safari/automation/template/list": { - "post": { - "operationId": "automation-template-read-list", - "summary": "列出自动化模板", - "description": "按语言列出自动化预设模板。", - "tags": [ - "AI SRE/自动化" - ], - "security": [ - { - "AppKeyAuth": [] - } - ], - "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", - "metadata": { - "sidebarTitle": "列出自动化模板" - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/ResponseEnvelope" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/AutomationTemplateListResponse" + "$ref": "#/components/schemas/SkillItem" } } } @@ -25528,15 +25683,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 } } } @@ -25563,23 +25731,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": [ { @@ -25587,10 +25756,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": { @@ -25607,7 +25776,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AutomationRunListResponse" + "$ref": "#/components/schemas/SkillItem" } } } @@ -25616,30 +25785,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 } } } @@ -25664,14 +25832,13 @@ "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 } } } @@ -25824,7 +25991,7 @@ "schemas": { "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", @@ -25846,42 +26013,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": [ @@ -25909,7 +26052,7 @@ }, "ErrorResponse": { "type": "object", - "description": "错误响应结构。`error` 必填,`data` 不存在。", + "description": "Response envelope for errors. `error` is required; `data` is absent.", "properties": { "request_id": { "type": "string", @@ -35645,6 +35788,10 @@ "description_html_to_text": { "type": "boolean", "description": "导出时是否将描述列中的 HTML 标签转换为纯文本。" + }, + "include_ever_muted": { + "type": "boolean", + "description": "是否包含曾被收敛的故障;默认不包含。" } } }, @@ -36140,6 +36287,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": "故障频次分类。" } } }, @@ -42338,146 +42520,6 @@ } } }, - "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": { @@ -42662,268 +42704,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": { @@ -42995,32 +42775,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": { @@ -43038,41 +42792,6 @@ } } }, - "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": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SkillItem" - }, - "description": "当前页的技能。" - } - }, - "required": [ - "total", - "skills" - ] - }, "ResponseEnvelope": { "type": "object", "description": "Standard response envelope used by every Flashduty public API. On success `data` contains the endpoint-specific payload and `error` is absent. On failure `error` is present and `data` is absent. `request_id` is always present and is also mirrored in the `Flashcat-Request-Id` response header.", @@ -43160,3690 +42879,4642 @@ } } }, - "SkillStatusRequest": { + "ListWarRoomEnabledResponse": { "type": "object", - "description": "按 ID 启用/禁用技能。", "properties": { - "skill_id": { - "type": "string", - "description": "目标技能 ID。" + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WarRoomDataSourceItem" + }, + "description": "已开启作战室功能的 IM 集成。" } - }, - "required": [ - "skill_id" - ] + } }, - "MCPServerCreateRequest": { + "WarRoomDataSourceItem": { "type": "object", - "description": "新建 MCP 服务器的配置。", "properties": { - "server_name": { + "data_source_id": { + "type": "integer", + "description": "集成 ID。", + "format": "int64" + }, + "account_id": { + "type": "integer", + "description": "该集成所属账户。", + "format": "int64" + }, + "team_id": { + "type": "integer", + "description": "拥有该集成的团队。", + "format": "int64" + }, + "plugin_id": { + "type": "integer", + "description": "该集成对应的插件 ID。", + "format": "int64" + }, + "name": { "type": "string", - "description": "MCP 服务器名称,在账户内唯一。", - "minLength": 1, - "maxLength": 255 + "description": "集成名称。" }, - "description": { + "status": { "type": "string", - "description": "服务器描述。", - "minLength": 1, - "maxLength": 1024 + "description": "集成当前状态。" }, - "transport": { + "category": { "type": "string", - "description": "传输协议。", - "enum": [ - "stdio", - "sse", - "streamable-http" - ] + "description": "集成插件的类别。" }, - "command": { + "plugin_type": { "type": "string", - "description": "可执行命令(stdio 传输)。" + "description": "集成插件的类型标识。" }, - "args": { - "type": "array", - "items": { - "type": "string" - }, - "description": "命令参数(stdio 传输)。" + "plugin_type_name": { + "type": "string", + "description": "集成插件类型的本地化显示名称。" }, - "env": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "环境变量(stdio 传输)。" + "description": { + "type": "string", + "description": "集成描述。" }, - "url": { + "integration_key": { "type": "string", - "description": "服务器 URL(sse / streamable-http 传输)。" + "description": "告警源向该集成推送时使用的推送密钥。" }, - "headers": { + "ref_id": { + "type": "string", + "description": "集成的外部引用 ID。" + }, + "settings": { "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "HTTP 头(sse / streamable-http)。" + "additionalProperties": true, + "description": "集成的插件特定配置。" }, - "connect_timeout": { - "type": "integer", - "description": "连接超时,单位秒。0 表示默认(10 秒)。" + "no_editable": { + "type": "boolean", + "description": "集成是否为只读。" }, - "call_timeout": { + "creator_id": { "type": "integer", - "description": "工具调用超时,单位秒。0 表示默认(60 秒)。" + "description": "创建该集成的人员。", + "format": "int64" }, - "auth_mode": { - "type": "string", - "description": "认证模式:shared(默认)、per_user_secret 或 per_user_oauth。" + "updated_by": { + "type": "integer", + "description": "最近更新该集成的人员。", + "format": "int64" }, - "secret_schema": { - "type": "string", - "description": "JSON 密钥 schema;auth_mode=per_user_secret 时必填。" + "created_at": { + "type": "integer", + "format": "int64", + "description": "集成创建时的 Unix 时间戳(秒)。" }, - "oauth_metadata": { - "type": "string", - "description": "JSON OAuth 元数据;为 per_user_oauth 预留。" + "updated_at": { + "type": "integer", + "format": "int64", + "description": "集成最近更新时的 Unix 时间戳(秒)。" }, - "status": { - "type": "string", - "description": "初始状态。", - "enum": [ - "enabled", - "disabled" - ], - "default": "enabled" + "last_time": { + "type": "integer", + "format": "int64", + "description": "集成最近活动的 Unix 时间戳(秒)。" }, - "team_id": { + "exclusive_data_source_id": { "type": "integer", - "description": "团队范围:0 表示账户级;>0 表示团队。", + "description": "与该集成关联的专属集成 ID。", "format": "int64" }, - "source_template_name": { - "type": "string", - "description": "从连接器模板创建时的市场模板名称。" + "integration_id": { + "type": "integer", + "description": "集成 ID,data_source_id 的别名。", + "format": "int64" } - }, - "required": [ - "server_name", - "description", - "transport" - ] + } }, - "MCPServerDeleteRequest": { + "AddWarRoomMemberRequest": { "type": "object", - "description": "按 ID 删除 MCP 服务器。", "properties": { - "server_id": { + "integration_id": { + "type": "integer", + "description": "承载作战室的 IM 集成。", + "format": "int64" + }, + "chat_id": { "type": "string", - "description": "目标 MCP 服务器 ID。" + "description": "IM 平台中作战室的群聊 ID。" + }, + "member_ids": { + "type": "array", + "items": { + "type": "integer", + "description": "", + "format": "int64" + }, + "description": "要加入作战室的人员 ID 列表。" } }, "required": [ - "server_id" + "integration_id", + "chat_id", + "member_ids" ] }, - "SkillListRequest": { + "AccountInfo": { "type": "object", - "description": "技能列表的分页与团队过滤条件。", "properties": { - "p": { + "account_id": { "type": "integer", - "description": "页码,从 1 开始。", - "default": 1 + "description": "主体(账户)标识。" }, - "limit": { - "type": "integer", - "description": "每页数量。", - "default": 20 + "account_name": { + "type": "string", + "description": "主体名称。" }, - "team_ids": { + "domain": { + "type": "string", + "description": "主体主域名(登录子域名)。" + }, + "extra_domains": { "type": "array", "items": { - "type": "integer", - "format": "int64" + "type": "string" }, - "description": "按团队 ID 过滤;为空则使用调用者可见范围。" + "description": "主体的附加域名。" }, - "include_account": { - "type": [ - "boolean", - "null" - ], - "description": "是否包含账户级(team_id=0)记录,默认 true。" - } - } - }, - "MCPServerUpdateRequest": { - "type": "object", - "description": "MCP 服务器的部分更新;省略字段表示不变。", - "properties": { - "server_id": { + "phone": { "type": "string", - "description": "目标 MCP 服务器 ID。" + "description": "主体联系电话,已做隐私脱敏处理。" }, - "server_name": { + "country_code": { "type": "string", - "description": "新名称。", - "minLength": 1, - "maxLength": 255 + "description": "联系电话的国家区号。" }, - "description": { + "email": { "type": "string", - "description": "新描述。", - "minLength": 1, - "maxLength": 1024 + "description": "主体联系邮箱。" }, - "transport": { + "avatar": { "type": "string", - "description": "传输协议。", - "enum": [ - "stdio", - "sse", - "streamable-http" - ] + "description": "主体头像 URL。" }, - "command": { + "locale": { "type": "string", - "description": "可执行命令(stdio 传输)。" - }, - "args": { - "type": "array", - "items": { - "type": "string" - }, - "description": "命令参数(stdio 传输)。" - }, - "env": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "环境变量(stdio 传输)。" + "description": "主体语言偏好(例如 zh-CN、en-US)。" }, - "url": { + "time_zone": { "type": "string", - "description": "服务器 URL(sse / streamable-http 传输)。" - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "HTTP 头(sse / streamable-http)。" + "description": "主体默认时区(IANA 名称,例如 Asia/Shanghai)。" }, - "connect_timeout": { + "created_at": { "type": "integer", - "description": "连接超时,单位秒。0 表示默认(10 秒)。" + "format": "int64", + "description": "主体创建时间,Unix 时间戳(秒)。" }, - "call_timeout": { - "type": "integer", - "description": "工具调用超时,单位秒。0 表示默认(60 秒)。" + "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": "认证模式:shared(默认)、per_user_secret 或 per_user_oauth。" + "description": "主体所属的云市场平台(仅云市场来源的主体返回)。" }, - "secret_schema": { + "mp_account_id": { "type": "string", - "description": "JSON 密钥 schema;auth_mode=per_user_secret 时必填。" + "description": "主体在云市场平台上的账户标识(仅云市场来源的主体返回)。" + } + } + }, + "PreviewTemplateRequest": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "要渲染的模板内容。" }, - "oauth_metadata": { + "type": { "type": "string", - "description": "JSON OAuth 元数据;为 per_user_oauth 预留。" + "description": "决定渲染引擎的模板通道类型。" }, - "team_id": { - "type": [ - "integer", - "null" - ], - "description": "重新分配团队范围:0 表示账户级;>0 表示团队。省略则不变。", - "format": "int64" + "incident_id": { + "type": "string", + "description": "用于渲染模板的故障 ID,省略时使用模拟数据。MongoDB ObjectID 十六进制字符串。" } }, "required": [ - "server_id" + "content", + "type" ] }, - "ListWarRoomEnabledResponse": { + "ListStatusPageResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { - "$ref": "#/components/schemas/WarRoomDataSourceItem" + "$ref": "#/components/schemas/StatusPageItem" }, - "description": "已开启作战室功能的 IM 集成。" + "description": "账户拥有的状态页。" } } }, - "WarRoomDataSourceItem": { + "StatusPageItem": { "type": "object", "properties": { - "data_source_id": { + "page_id": { "type": "integer", - "description": "集成 ID。", + "description": "状态页 ID。", "format": "int64" }, - "account_id": { - "type": "integer", - "description": "该集成所属账户。", - "format": "int64" + "name": { + "type": "string", + "description": "状态页显示名称。" }, - "team_id": { - "type": "integer", - "description": "拥有该集成的团队。", - "format": "int64" + "url_name": { + "type": "string", + "description": "URL 安全的别名,在账户内唯一。" }, - "plugin_id": { - "type": "integer", - "description": "该集成对应的插件 ID。", - "format": "int64" + "type": { + "type": "string", + "description": "状态页可见性类型。", + "enum": [ + "public", + "internal" + ] }, - "name": { + "custom_domain": { "type": "string", - "description": "集成名称。" + "description": "指向状态页的自定义域名。" }, - "status": { + "logo": { "type": "string", - "description": "集成当前状态。" + "description": "状态页 Logo 图片。" }, - "category": { + "dark_logo": { "type": "string", - "description": "集成插件的类别。" + "description": "状态页暗色模式 Logo 图片。" }, - "plugin_type": { + "logo_url": { "type": "string", - "description": "集成插件的类型标识。" + "description": "点击 Logo 时跳转的 URL。" }, - "plugin_type_name": { + "favicon": { "type": "string", - "description": "集成插件类型的本地化显示名称。" + "description": "状态页的网站图标。" }, - "description": { + "page_header": { "type": "string", - "description": "集成描述。" + "description": "状态页头部内容。" }, - "integration_key": { + "page_footer": { "type": "string", - "description": "告警源向该集成推送时使用的推送密钥。" + "description": "状态页底部内容。" }, - "ref_id": { + "date_view": { "type": "string", - "description": "集成的外部引用 ID。" + "description": "时间线的展示方式。", + "enum": [ + "calendar", + "list" + ] }, - "settings": { - "type": "object", - "additionalProperties": true, - "description": "集成的插件特定配置。" + "display_uptime_mode": { + "type": "string", + "description": "可用率的展示方式。", + "enum": [ + "chart_and_percentage", + "chart", + "none" + ] }, - "no_editable": { + "custom_links": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description": "状态页上展示的自定义导航链接。" + }, + "contact_info": { + "type": "string", + "description": "联系方式,mailto 或网站 URL。" + }, + "components": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusPageComponentItem" + }, + "description": "状态页跟踪的组件。" + }, + "sections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusPageSectionItem" + }, + "description": "对组件进行分组的分组列表。" + }, + "subscription": { + "$ref": "#/components/schemas/StatusPageSubscriptionItem" + }, + "template_preference": { + "type": "string", + "description": "偏好的变更事件模板类型。" + } + } + }, + "StatusPageSubscriptionItem": { + "type": "object", + "properties": { + "email": { "type": "boolean", - "description": "集成是否为只读。" + "description": "是否开启邮件订阅。" }, - "creator_id": { - "type": "integer", - "description": "创建该集成的人员。", - "format": "int64" + "im": { + "type": "boolean", + "description": "是否开启 IM 订阅。" + } + } + }, + "StatusPageSectionItem": { + "type": "object", + "properties": { + "section_id": { + "type": "string", + "description": "分组 ID。" }, - "updated_by": { + "name": { + "type": "string", + "description": "分组名称。" + }, + "description": { + "type": "string", + "description": "分组描述。" + }, + "order_id": { "type": "integer", - "description": "最近更新该集成的人员。", + "description": "分组的展示顺序。", "format": "int64" }, - "created_at": { - "type": "integer", - "format": "int64", - "description": "集成创建时的 Unix 时间戳(秒)。" + "hide_uptime": { + "type": "boolean", + "description": "是否在汇总响应中隐藏可用率数据。" }, - "updated_at": { - "type": "integer", - "format": "int64", - "description": "集成最近更新时的 Unix 时间戳(秒)。" + "hide_all": { + "type": "boolean", + "description": "是否在汇总接口中隐藏该分组及其组件。" + } + } + }, + "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 个。" }, - "last_time": { + "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", - "description": "集成最近活动的 Unix 时间戳(秒)。" + "minimum": 0, + "description": "页码,从 1 开始。" }, - "exclusive_data_source_id": { + "limit": { "type": "integer", - "description": "与该集成关联的专属集成 ID。", - "format": "int64" + "format": "int64", + "minimum": 0, + "maximum": 100, + "default": 20, + "description": "每页数量,最多 100。" }, - "integration_id": { - "type": "integer", - "description": "集成 ID,data_source_id 的别名。", - "format": "int64" + "search_after_ctx": { + "type": "string", + "description": "上一页响应返回的向后分页游标。" } } }, - "A2AAgentListResponse": { + "ListPostMortemTemplatesResponse": { "type": "object", - "description": "分页的 A2A 智能体列表。", + "description": "分页后的故障复盘模板列表。", + "required": [ + "items", + "total", + "has_next_page" + ], "properties": { "items": { "type": "array", "items": { - "$ref": "#/components/schemas/A2AAgentItem" + "$ref": "#/components/schemas/PostMortemTemplate" }, - "description": "当前页的 A2A 智能体。" + "description": "当前页的模板。" }, "total": { "type": "integer", - "description": "匹配的智能体总数。", - "format": "int64" + "format": "int64", + "description": "匹配的模板总数。" + }, + "has_next_page": { + "type": "boolean", + "description": "为 true 表示还有下一页。" + }, + "search_after_ctx": { + "type": "string", + "description": "向后分页游标。" } - }, - "required": [ - "items", - "total" - ] + } }, - "A2AAgentItem": { + "PostMortemTemplate": { "type": "object", - "description": "已注册的 A2A(智能体到智能体)远程智能体。", + "description": "故障复盘报告模板。", + "required": [ + "account_id", + "template_id", + "name", + "description", + "content", + "content_markdown", + "team_id", + "created_at_seconds", + "updated_at_seconds" + ], "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" + "format": "int64", + "description": "模板所属账号 ID。内置模板为 0。" }, - "can_edit": { - "type": "boolean", - "description": "调用者是否可编辑该智能体。" + "template_id": { + "type": "string", + "description": "模板 ID。内置模板使用稳定的 `post_mortem_default_tmpl_*` ID。" }, - "agent_name": { + "name": { "type": "string", - "description": "智能体显示名称。" + "description": "控制台展示的模板名称。" }, "description": { "type": "string", - "description": "智能体描述。" + "description": "模板描述。" }, - "card_url": { + "content": { "type": "string", - "description": "远程智能体卡片的 URL。" + "description": "用于初始化复盘正文的 BlockNote JSON 内容。" }, - "auth_type": { + "content_markdown": { "type": "string", - "description": "访问远程智能体的认证类型。" + "description": "模板内容的 Markdown 版本,供 AI 生成使用。" }, - "auth_config": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "认证配置;密钥值已脱敏。" + "team_id": { + "type": "integer", + "format": "int64", + "description": "管理团队 ID。内置模板为 0。" }, - "streaming": { - "type": "boolean", - "description": "远程智能体是否支持流式响应。" + "created_at_seconds": { + "type": "integer", + "format": "int64", + "description": "模板创建时间的 Unix 秒级时间戳。" }, - "status": { + "updated_at_seconds": { + "type": "integer", + "format": "int64", + "description": "模板最近更新时间的 Unix 秒级时间戳。" + } + } + }, + "PreviewSyncRequest": { + "type": "object", + "required": [ + "ds_type", + "ds_name", + "expr" + ], + "description": "同步数据源查询预览的参数。", + "properties": { + "ds_type": { "type": "string", - "description": "智能体状态。", - "enum": [ - "enabled", - "disabled" - ] + "description": "数据源类型,如 `prometheus`、`loki`、`elasticsearch`。" }, - "agent_card_name": { + "ds_name": { "type": "string", - "description": "从远程卡片解析出的智能体名称。" + "description": "账户中配置的数据源显示名称。" }, - "agent_card_skills": { - "type": "array", - "items": { - "type": "string" - }, - "description": "远程卡片声明的技能。" - }, - "card_resolve_timeout": { - "type": "integer", - "description": "卡片解析超时,单位秒。" + "expr": { + "type": "string", + "description": "查询表达式,格式因 `ds_type` 而异(Prometheus 为 PromQL,Loki 为 LogQL 等)。" }, - "task_timeout": { + "delay_seconds": { "type": "integer", - "description": "单任务执行超时,单位秒。" - }, - "auth_mode": { - "type": "string", - "description": "认证模式。", - "enum": [ - "shared", - "per_user_secret", - "per_user_oauth" - ] + "description": "将查询窗口向前偏移的秒数,用于补偿数据摄入延迟。" }, - "secret_schema": { + "args": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "特定类型的额外查询参数。" + } + } + }, + "PreviewSyncResponse": { + "type": "object", + "description": "数据源返回的原始 JSON,结构随数据源类型而异。" + }, + "ResetPostMortemBasicsRequest": { + "type": "object", + "description": "写回复盘报告的故障基础信息。", + "required": [ + "post_mortem_id", + "incidents_highest_severity", + "incidents_earliest_start_seconds" + ], + "properties": { + "post_mortem_id": { "type": "string", - "description": "JSON 编码的密钥 schema(per_user_secret 模式)。" + "description": "复盘 ID。" }, - "oauth_metadata": { + "incidents_highest_severity": { "type": "string", - "description": "JSON 编码的 OAuth 元数据(per_user_oauth 模式)。" + "description": "关联故障中的最高严重级别。" }, - "created_by": { + "incidents_earliest_start_seconds": { "type": "integer", - "description": "创建该智能体的成员 ID。", - "format": "int64" + "format": "int64", + "minimum": 1, + "description": "最早关联故障开始时间的 Unix 秒级时间戳。" }, - "created_at": { + "incidents_latest_close_seconds": { "type": "integer", "format": "int64", - "description": "创建时间,Unix 毫秒时间戳。" + "minimum": 0, + "description": "最晚关联故障关闭时间的 Unix 秒级时间戳;仍未关闭时为 0。" }, - "updated_at": { + "incidents_total_duration_seconds": { "type": "integer", "format": "int64", - "description": "最近更新时间,Unix 毫秒时间戳。" + "minimum": 0, + "description": "故障总持续时间,单位秒。" + }, + "responder_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "写入报告的响应人成员 ID。" } - }, - "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": { + "ResetPostMortemFollowUpsRequest": { "type": "object", - "description": "A2A 智能体的部分更新;为空或省略的字段保持不变。", + "description": "替换复盘后续行动项的参数。", + "required": [ + "post_mortem_id" + ], "properties": { - "agent_id": { + "post_mortem_id": { "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。" + "description": "复盘 ID。" }, - "oauth_metadata": { - "type": [ - "string", - "null" - ], - "description": "新的 JSON OAuth 元数据。" + "follow_ups": { + "type": "string", + "description": "自由文本格式的后续行动项。" } - }, - "required": [ - "agent_id" - ] + } }, - "A2AAgentCreateRequest": { + "ResetPostMortemStatusRequest": { "type": "object", - "description": "注册新 A2A 智能体的参数。", + "description": "更新复盘报告状态的参数。", + "required": [ + "post_mortem_id", + "status" + ], "properties": { - "agent_name": { - "type": "string", - "description": "智能体显示名称。", - "maxLength": 128 - }, - "description": { + "post_mortem_id": { "type": "string", - "description": "智能体描述。", - "maxLength": 2000 + "description": "复盘 ID。" }, - "card_url": { + "status": { "type": "string", - "description": "远程智能体卡片的 URL。" - }, - "auth_type": { + "enum": [ + "drafting", + "published" + ], + "description": "目标报告状态。" + } + } + }, + "ResetPostMortemTitleRequest": { + "type": "object", + "description": "更新复盘报告标题的参数。", + "required": [ + "post_mortem_id", + "title" + ], + "properties": { + "post_mortem_id": { "type": "string", - "description": "远程智能体的认证类型。" - }, - "auth_config": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "认证配置键值对。" - }, - "streaming": { - "type": "boolean", - "description": "远程智能体是否支持流式响应。" - }, - "team_id": { - "type": "integer", - "description": "团队范围:0 表示账户级;>0 表示团队。", - "format": "int64" + "description": "复盘 ID。" }, - "auth_mode": { + "title": { "type": "string", - "description": "认证模式:shared(默认)、per_user_secret 或 per_user_oauth。" - }, - "secret_schema": { + "description": "新的报告标题。" + } + } + }, + "RumWebhookTestRequest": { + "type": "object", + "description": "发送 RUM 告警样例 Webhook 的参数。", + "required": [ + "application_id", + "webhook_url" + ], + "properties": { + "application_id": { "type": "string", - "description": "JSON 密钥 schema;auth_mode=per_user_secret 时必填。" + "description": "RUM 应用 ID。" }, - "oauth_metadata": { + "webhook_url": { "type": "string", - "description": "JSON OAuth 元数据;为 per_user_oauth 预留。" + "format": "uri", + "description": "接收样例告警事件的 Webhook URL。" } - }, - "required": [ - "agent_name", - "card_url" - ] + } }, - "MCPServerListRequest": { + "RumWebhookTestResponse": { "type": "object", - "description": "MCP 服务器列表的分页与团队过滤条件。", + "description": "Webhook 测试投递结果。", + "required": [ + "ok", + "status_code", + "message" + ], "properties": { - "p": { - "type": "integer", - "description": "页码,从 1 开始。", - "default": 1 + "ok": { + "type": "boolean", + "description": "Webhook 端点是否接受了样例事件。" }, - "limit": { + "status_code": { "type": "integer", - "description": "每页数量。", - "default": 20 - }, - "team_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "按团队 ID 过滤;为空则使用调用者可见范围。" + "description": "Webhook 端点返回的 HTTP 状态码。未收到响应时为 0。" }, - "include_account": { - "type": [ - "boolean", - "null" - ], - "description": "是否包含账户级(team_id=0)记录,默认 true。" + "message": { + "type": "string", + "description": "成功时为 `ok`,失败时为投递错误信息。" } } }, - "A2AAgentCreateResponse": { + "TryLinkPersonRequest": { "type": "object", - "description": "注册 A2A 智能体的结果。", + "description": "尝试自动关联 IM 账号的参数。", + "required": [ + "integration_id" + ], "properties": { - "agent_id": { - "type": "string", - "description": "新建智能体的 ID。" + "integration_id": { + "type": "integer", + "format": "int64", + "description": "IM 集成 ID。" } - }, - "required": [ - "agent_id" - ] + } }, - "AddWarRoomMemberRequest": { + "TryLinkPersonResponse": { "type": "object", + "description": "本次尝试关联成功的人员。", + "required": [ + "new_linked_person_ids" + ], "properties": { - "integration_id": { - "type": "integer", - "description": "承载作战室的 IM 集成。", - "format": "int64" - }, - "chat_id": { - "type": "string", - "description": "IM 平台中作战室的群聊 ID。" - }, - "member_ids": { + "new_linked_person_ids": { "type": "array", "items": { "type": "integer", - "description": "", "format": "int64" }, - "description": "要加入作战室的人员 ID 列表。" + "description": "本次调用中新关联成功的人员 ID。" } - }, - "required": [ - "integration_id", - "chat_id", - "member_ids" - ] + } }, - "AccountInfo": { + "UpsertPostMortemTemplateRequest": { "type": "object", + "description": "创建或更新故障复盘模板的参数。", + "required": [ + "name", + "content" + ], "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": { + "template_id": { "type": "string", - "description": "主体联系邮箱。" + "description": "模板 ID。创建新模板时省略;更新已有模板时传入。" }, - "avatar": { - "type": "string", - "description": "主体头像 URL。" + "team_id": { + "type": "integer", + "format": "int64", + "description": "管理团队 ID。创建自定义模板时必填。" }, - "locale": { + "name": { "type": "string", - "description": "主体语言偏好(例如 zh-CN、en-US)。" + "description": "模板名称。" }, - "time_zone": { + "description": { "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": "是否同时接受允许邮箱域名的子域名。" - } - } + "description": "模板描述。" }, - "mp_plat": { + "content": { "type": "string", - "description": "主体所属的云市场平台(仅云市场来源的主体返回)。" + "description": "BlockNote JSON 模板内容。" }, - "mp_account_id": { + "content_markdown": { "type": "string", - "description": "主体在云市场平台上的账户标识(仅云市场来源的主体返回)。" + "description": "模板内容的 Markdown 版本。" } } }, - "PreviewTemplateRequest": { + "DeleteStatusPageComponentRequest": { "type": "object", + "description": "删除状态页服务组件的请求参数。", + "required": [ + "page_id", + "component_ids" + ], "properties": { - "content": { - "type": "string", - "description": "要渲染的模板内容。" - }, - "type": { - "type": "string", - "description": "决定渲染引擎的模板通道类型。" + "page_id": { + "type": "integer", + "format": "int64", + "description": "状态页 ID。" }, - "incident_id": { - "type": "string", - "description": "用于渲染模板的故障 ID,省略时使用模拟数据。MongoDB ObjectID 十六进制字符串。" + "component_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "要删除的组件 ID 列表。" } - }, - "required": [ - "content", - "type" - ] + } }, - "A2AAgentIDRequest": { + "DeleteStatusPageSectionRequest": { "type": "object", - "description": "按 ID 查询 A2A 智能体。", - "properties": { - "agent_id": { - "type": "string", - "description": "目标智能体 ID。" - } - }, + "description": "删除状态页区域的请求参数。", "required": [ - "agent_id" - ] - }, - "ListStatusPageResponse": { - "type": "object", + "page_id", + "section_ids" + ], "properties": { - "items": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "状态页 ID。" + }, + "section_ids": { "type": "array", "items": { - "$ref": "#/components/schemas/StatusPageItem" + "type": "string" }, - "description": "账户拥有的状态页。" + "description": "要删除的区域 ID 列表。" } } }, - "StatusPageItem": { + "DeleteStatusPageTemplateRequest": { "type": "object", + "description": "删除状态页模板的请求参数。", + "required": [ + "page_id", + "type", + "template_id" + ], "properties": { "page_id": { "type": "integer", - "description": "状态页 ID。", - "format": "int64" + "format": "int64", + "description": "状态页 ID。" }, - "name": { + "type": { "type": "string", - "description": "状态页显示名称。" - }, - "url_name": { - "type": "string", - "description": "URL 安全的别名,在账户内唯一。" - }, - "type": { - "type": "string", - "description": "状态页可见性类型。", - "enum": [ - "public", - "internal" - ] - }, - "custom_domain": { - "type": "string", - "description": "指向状态页的自定义域名。" - }, - "logo": { - "type": "string", - "description": "状态页 Logo 图片。" - }, - "dark_logo": { - "type": "string", - "description": "状态页暗色模式 Logo 图片。" - }, - "logo_url": { - "type": "string", - "description": "点击 Logo 时跳转的 URL。" - }, - "favicon": { - "type": "string", - "description": "状态页的网站图标。" - }, - "page_header": { - "type": "string", - "description": "状态页头部内容。" - }, - "page_footer": { - "type": "string", - "description": "状态页底部内容。" - }, - "date_view": { - "type": "string", - "description": "时间线的展示方式。", "enum": [ - "calendar", - "list" - ] + "pre_defined", + "message" + ], + "description": "模板分类。" }, - "display_uptime_mode": { + "template_id": { "type": "string", - "description": "可用率的展示方式。", - "enum": [ - "chart_and_percentage", - "chart", - "none" - ] + "description": "要删除的模板 ID。" + } + } + }, + "UpsertStatusPageComponentRequest": { + "type": "object", + "description": "创建或更新状态页服务组件的请求参数。", + "required": [ + "page_id", + "components" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "状态页 ID。" }, - "custom_links": { + "components": { "type": "array", + "description": "要创建或更新的组件列表。", "items": { "type": "object", - "additionalProperties": { - "type": "string" + "required": [ + "name" + ], + "properties": { + "component_id": { + "type": "string", + "description": "组件 ID。省略则创建新组件;提供则更新已有组件。" + }, + "section_id": { + "type": "string", + "description": "所属区域 ID。省略则将组件置于顶层。" + }, + "name": { + "type": "string", + "description": "组件显示名称。" + }, + "description": { + "type": "string", + "description": "组件描述。" + }, + "order_id": { + "type": "integer", + "format": "int64", + "description": "在所属区域中的显示顺序。" + }, + "hide_uptime": { + "type": "boolean", + "description": "为 true 时,在汇总接口中隐藏该组件的可用率数据。" + }, + "hide_all": { + "type": "boolean", + "description": "为 true 时,在汇总接口中完全隐藏该组件。" + } } - }, - "description": "状态页上展示的自定义导航链接。" - }, - "contact_info": { - "type": "string", - "description": "联系方式,mailto 或网站 URL。" - }, - "components": { + } + } + } + }, + "UpsertStatusPageComponentResponse": { + "type": "object", + "description": "创建或更新状态页组件的结果。", + "required": [ + "component_ids" + ], + "properties": { + "component_ids": { "type": "array", "items": { - "$ref": "#/components/schemas/StatusPageComponentItem" + "type": "string" }, - "description": "状态页跟踪的组件。" + "description": "创建或更新的组件 ID 列表,顺序与请求一致。" + } + } + }, + "UpsertStatusPageSectionRequest": { + "type": "object", + "description": "创建或更新状态页区域的请求参数。", + "required": [ + "page_id", + "sections" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "状态页 ID。" }, "sections": { "type": "array", + "description": "要创建或更新的区域列表。", "items": { - "$ref": "#/components/schemas/StatusPageSectionItem" - }, - "description": "对组件进行分组的分组列表。" - }, - "subscription": { - "$ref": "#/components/schemas/StatusPageSubscriptionItem" - }, - "template_preference": { - "type": "string", - "description": "偏好的变更事件模板类型。" + "type": "object", + "required": [ + "name" + ], + "properties": { + "section_id": { + "type": "string", + "description": "区域 ID。省略则创建新区域;提供则更新已有区域。" + }, + "name": { + "type": "string", + "description": "区域显示名称。" + }, + "description": { + "type": "string", + "description": "区域描述。" + }, + "order_id": { + "type": "integer", + "format": "int64", + "description": "显示顺序。" + }, + "hide_uptime": { + "type": "boolean", + "description": "为 true 时,隐藏该区域下所有组件的可用率数据。" + }, + "hide_all": { + "type": "boolean", + "description": "为 true 时,在汇总接口中完全隐藏该区域。" + } + } + } } } }, - "StatusPageSubscriptionItem": { + "UpsertStatusPageSectionResponse": { "type": "object", + "description": "创建或更新状态页区域的结果。", + "required": [ + "section_ids" + ], "properties": { - "email": { - "type": "boolean", - "description": "是否开启邮件订阅。" - }, - "im": { - "type": "boolean", - "description": "是否开启 IM 订阅。" + "section_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "创建或更新的区域 ID 列表,顺序与请求一致。" } } }, - "StatusPageSectionItem": { + "UpsertStatusPageTemplateRequest": { "type": "object", + "description": "创建或更新状态页模板的请求参数。", + "required": [ + "page_id", + "type", + "template" + ], "properties": { - "section_id": { - "type": "string", - "description": "分组 ID。" - }, - "name": { - "type": "string", - "description": "分组名称。" - }, - "description": { - "type": "string", - "description": "分组描述。" - }, - "order_id": { + "page_id": { "type": "integer", - "description": "分组的展示顺序。", - "format": "int64" + "format": "int64", + "description": "状态页 ID。" }, - "hide_uptime": { - "type": "boolean", - "description": "是否在汇总响应中隐藏可用率数据。" + "type": { + "type": "string", + "enum": [ + "pre_defined", + "message" + ], + "description": "模板分类。`pre_defined` 为预定义事件模板;`message` 为通知消息模板。" }, - "hide_all": { - "type": "boolean", - "description": "是否在汇总接口中隐藏该分组及其组件。" + "template": { + "type": "object", + "description": "模板内容。", + "required": [ + "title", + "event_type", + "status" + ], + "properties": { + "template_id": { + "type": "string", + "description": "模板 ID。省略则创建;提供则更新。" + }, + "title": { + "type": "string", + "description": "模板标题。" + }, + "event_type": { + "type": "string", + "enum": [ + "incident", + "maintenance" + ], + "description": "本模板适用的事件类型。" + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "本模板对应的事件状态。" + }, + "description": { + "type": "string", + "description": "模板正文(Markdown)。" + } + } } } }, - "SessionListRequest": { + "UpsertStatusPageTemplateResponse": { "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": { - "type": "string", - "description": "可见范围:all(本人 + 所属团队,默认)、personal 或 team。", - "enum": [ - "all", - "personal", - "team" - ] - }, - "team_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "可选的团队过滤;与 `scope` 取交集。" - }, - "entry_kinds": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "web", - "im", - "api", - "automation" - ] - }, - "description": "仅返回由这些入口产生的会话;为空则返回所有类型。" - }, - "status": { + "template_id": { "type": "string", - "description": "归档分桶:active(默认)返回未归档,archived 返回已归档,all 返回全部。", - "enum": [ - "active", - "archived", - "all" - ] + "description": "创建或更新的模板 ID。" } - }, - "required": [ - "app_name" - ] + } }, - "SessionTokenUsage": { + "FacetCountItem": { "type": "object", - "description": "跨所有轮次的会话级 token 累计汇总。账户计费的权威来源。", + "description": "一个分面值及其出现次数。", + "required": [ + "facet_value", + "count" + ], "properties": { - "input_tokens": { - "type": "integer", - "format": "int64", - "description": "提示(输入)token 总数,含缓存部分。" - }, - "cached_tokens": { - "type": "integer", - "format": "int64", - "description": "input_tokens 中由提示缓存命中的部分。" - }, - "output_tokens": { - "type": "integer", - "format": "int64", - "description": "生成(输出)token 总数。" + "facet_value": { + "description": "分面值,类型与字段的 `value_type` 一致。" }, - "reasoning_tokens": { + "count": { "type": "integer", "format": "int64", - "description": "推理/思考 token 总数。" + "description": "该时间范围内具有此分面值的事件数量。", + "example": 1523 } } }, - "EnvironmentBinding": { + "RumDataAggregateFunction": { "type": "object", - "description": "会话绑定的 runner 或云沙箱。首条消息前为 null。", + "description": "采样引擎使用的聚合函数元信息。", + "required": [ + "type", + "column_name", + "column_index" + ], "properties": { - "kind": { - "type": "string", - "description": "环境类型(如 runner、sandbox)。" - }, - "id": { + "type": { "type": "string", - "description": "环境标识。" + "description": "聚合函数类型。" }, - "name": { + "column_name": { "type": "string", - "description": "可读的环境名称。" + "description": "聚合函数使用的列名。" }, - "status": { - "type": "string", - "description": "绑定状态。" + "column_index": { + "type": "integer", + "description": "聚合函数使用的列下标。" } } }, - "ContextResolvedItem": { + "RumDataFieldMeta": { "type": "object", - "description": "该会话三层知识包解析结果的快照。", + "description": "单个返回列的元信息。", + "required": [ + "name", + "type", + "nullable" + ], "properties": { - "account_pack_id": { - "type": "string", - "description": "解析出的账户级知识包 ID。" - }, - "team_pack_id": { + "name": { "type": "string", - "description": "解析出的团队级知识包 ID。" + "description": "列名。" }, - "incident_id": { + "type": { "type": "string", - "description": "作战室来源时绑定的故障 ID。" - }, - "resolved_at_ms": { - "type": "integer", - "format": "int64", - "description": "知识包解析时间,Unix 毫秒时间戳。" + "description": "该列的后端数据库类型名称。" }, - "versions": { - "type": "object", - "additionalProperties": { - "type": "integer" - }, - "description": "各知识包解析版本映射。" + "nullable": { + "type": "boolean", + "description": "该列的值是否可能为 null。" } } }, - "SessionItem": { + "RumDataQueryDefinition": { "type": "object", - "description": "单条智能体会话记录。", + "description": "单个 RUM 数据查询定义。", + "required": [ + "id", + "sql", + "format" + ], "properties": { - "session_id": { - "type": "string", - "description": "会话标识。" - }, - "parent_session_id": { + "id": { "type": "string", - "description": "子智能体(子)会话的父会话 ID;否则为空。" + "maxLength": 64, + "description": "调用方提供的查询 ID;响应对象会使用同一值作为 key。" }, - "session_name": { + "sql": { "type": "string", - "description": "会话标题;未命名会话可能为空。" + "description": "要执行的 RUM SQL 查询。" }, - "app_name": { + "dql": { "type": "string", - "description": "拥有该会话的智能体应用。" + "description": "可选的 RUM DQL 过滤表达式,会和 SQL 校验一起使用。" }, - "entry_kind": { + "format": { "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。" + "time_series", + "table" + ], + "description": "输出格式。`table` 返回行数据;`time_series` 返回按时间桶聚合的时序数据。" }, - "created_at": { + "interval": { "type": "integer", "format": "int64", - "description": "会话创建时间,Unix 毫秒时间戳。" + "exclusiveMinimum": 0, + "default": 3600, + "description": "`time_series` 查询的时间桶间隔,单位秒。" }, - "updated_at": { + "max_points": { "type": "integer", "format": "int64", - "description": "会话最近更新时间,Unix 毫秒时间戳。" + "exclusiveMinimum": 0, + "default": 1226, + "description": "`time_series` 查询最多返回的点数。" }, - "template_staging_round_id": { + "time_zone": { "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 毫秒时间戳。" + "description": "计算时间函数时使用的 IANA 时区名称,例如 `Asia/Shanghai`。" }, - "is_running": { - "type": "boolean", - "description": "当该会话当前有正在进行的智能体轮次时为 true。" + "search_after_ctx": { + "type": "string", + "description": "上一次表格查询返回的不透明游标,用于继续分页。" }, - "has_unread": { + "disable_sampling": { "type": "boolean", - "description": "当存在调用者尚未查看的助手输出时为 true。" + "description": "为 true 时,请求查询引擎尽可能避免采样。" } } }, - "SessionListResponse": { + "RumDataQueryOutput": { "type": "object", - "description": "一页智能体会话。", + "description": "单个查询的结果。失败的子查询填充 `error`;成功的子查询填充 `data`。", "properties": { - "total": { - "type": "integer", - "format": "int64", - "description": "匹配过滤条件的会话总数(忽略分页)。" + "error": { + "$ref": "#/components/schemas/DutyError" }, - "sessions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SessionItem" - }, - "description": "当前页的会话。" + "data": { + "$ref": "#/components/schemas/RumDataQueryResult" } } }, - "SessionGetRequest": { + "RumDataQueryRequest": { "type": "object", - "description": "查询单个会话,并返回其最近事件的一页(向更早方向分页)。", + "description": "指定时间范围内的一组 RUM 数据查询。", + "required": [ + "start_time", + "end_time", + "queries" + ], "properties": { - "session_id": { - "type": "string", - "description": "目标会话 ID。", - "minLength": 1 - }, - "num_recent_events": { + "start_time": { "type": "integer", - "description": "旧版每页数量:返回的最近事件数。与 `limit` 同时设置时以 `limit` 为准;0 使用服务端默认值(100)。", - "minimum": 0, - "maximum": 1000 + "format": "int64", + "description": "查询窗口起始时间,Unix 毫秒时间戳。", + "example": 1712620800000 }, - "limit": { + "end_time": { "type": "integer", - "description": "事件每页数量;优先于 `num_recent_events`。0 使用服务端默认值(100)。", - "minimum": 0, - "maximum": 1000 + "format": "int64", + "description": "查询窗口结束时间,Unix 毫秒时间戳。最大跨度 31 天。", + "example": 1712707200000 }, - "search_after_ctx": { - "type": "string", - "description": "上一次响应返回的不透明游标;回传以获取更早的一页。", - "maxLength": 4096 + "queries": { + "type": "array", + "description": "并发执行的查询列表,允许 1 到 10 个。", + "minItems": 1, + "maxItems": 10, + "items": { + "$ref": "#/components/schemas/RumDataQueryDefinition" + } } - }, - "required": [ - "session_id" - ] + } }, - "EventItem": { + "RumDataQueryResponse": { "type": "object", - "description": "单条已持久化的会话事件。content/actions/usage_metadata 携带原始 ADK 信封,请将其视为不透明的结构化负载。", + "description": "从请求中的查询 ID 到该查询结果或错误的映射。", + "additionalProperties": { + "$ref": "#/components/schemas/RumDataQueryOutput" + } + }, + "RumDataQueryResult": { + "type": "object", + "description": "单个 RUM 数据查询返回的行数据和元信息。", + "required": [ + "fields", + "values" + ], "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": { + "search_after_ctx": { "type": "string", - "description": "当该事件表示失败时的错误码。" + "description": "用于继续表格查询分页的不透明游标。" }, - "error_message": { - "type": "string", - "description": "可读的错误信息(如有)。" + "fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumDataFieldMeta" + }, + "description": "返回值矩阵的列元信息。" }, - "status": { - "type": "string", - "description": "事件状态。", - "enum": [ - "normal", - "compressed" - ] + "values": { + "type": "array", + "description": "查询返回的行数据。每一行按下标与 `fields` 对齐。", + "items": { + "type": "array", + "items": {} + } }, - "created_at": { + "interval": { "type": "integer", "format": "int64", - "description": "事件写入时间,Unix 毫秒时间戳。" + "description": "时序查询实际使用的时间桶间隔,单位秒。" + }, + "sampling": { + "$ref": "#/components/schemas/RumDataSamplingDecision" } } }, - "SessionGetResponse": { + "RumDataSamplingDecision": { "type": "object", - "description": "一个会话及其事件的一页(向更早方向分页)。", + "description": "查询引擎使用采样数据时返回的采样元信息。", + "required": [ + "enabled", + "scale_factor" + ], "properties": { - "session": { - "$ref": "#/components/schemas/SessionItem" + "enabled": { + "type": "boolean", + "description": "是否应用了采样。" }, - "events": { + "scale_factor": { + "type": "number", + "description": "将采样计数放大为全量估算值时使用的倍率。" + }, + "selected_tablets": { "type": "array", "items": { - "$ref": "#/components/schemas/EventItem" + "type": "string" }, - "description": "最近事件,按 (created_at, event_id) 升序排列。" - }, - "has_more_older": { - "type": "boolean", - "description": "当本页之外仍有更早的事件时为 true。" + "description": "采样查询选中的存储 tablet。" }, - "search_after_ctx": { - "type": "string", - "description": "不透明游标;作为 search_after_ctx 回传以获取更早的一页。has_more_older 为 false 时省略。" + "aggregate_funcs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumDataAggregateFunction" + }, + "description": "受采样影响的聚合函数。" } } }, - "SessionExportRequest": { + "RumFacetCountRequest": { "type": "object", - "description": "以流式 NDJSON 导出单个会话的完整事件记录。", + "description": "分面值分布统计的请求参数。", + "required": [ + "scope", + "facet_key", + "start_time", + "end_time" + ], "properties": { - "session_id": { + "scope": { "type": "string", - "description": "目标会话 ID。" + "description": "要查询的 RUM 数据 scope。", + "enum": [ + "session", + "view", + "action", + "error", + "resource", + "long_task", + "vital", + "issue", + "sourcemap" + ] }, - "include_subagents": { - "type": "boolean", - "description": "为 true 时,每条 subagent_dispatch 行后会跟随子会话的完整事件流,并以其自身的 session_meta 包裹。默认 false。" - } - }, - "required": [ - "session_id" - ] - }, - "SkillUploadRequest": { - "type": "object", - "description": "上传技能压缩包的 multipart 表单。", - "properties": { - "file": { + "facet_key": { "type": "string", - "format": "binary", - "description": "技能压缩包(.skill / .zip / .tar.gz / .tgz),最大 100MB。" + "description": "要统计值分布的字段键。" }, - "team_id": { + "facet_value": { + "description": "设置后,统计前会先过滤 `facet_key` 等于该值的事件。接受字符串、数字或布尔值。" + }, + "start_time": { "type": "integer", - "description": "新技能的团队范围:0 表示账户级。", - "format": "int64" + "format": "int64", + "description": "时间范围起始,Unix 毫秒时间戳。", + "example": 1712620800000 }, - "replace": { - "type": "boolean", - "description": "为 true 时覆盖同名技能。" + "end_time": { + "type": "integer", + "format": "int64", + "description": "时间范围结束,Unix 毫秒时间戳。最大跨度 31 天。", + "example": 1712707200000 }, - "skill_id": { + "dql": { "type": "string", - "description": "替换指定技能时的技能 ID。" - } - }, - "required": [ - "file" - ] - }, - "SessionDeleteRequest": { - "type": "object", - "description": "按 ID 删除会话。", - "properties": { - "session_id": { + "description": "统计前应用的 RUM DQL 过滤表达式。" + }, + "sql": { "type": "string", - "description": "目标会话 ID。", - "minLength": 1 + "description": "仅含 WHERE 子句(无 SELECT)的 SQL 附加过滤条件。" + }, + "limit": { + "type": "integer", + "description": "返回的最大 Top N 值数量。默认 100,最大 100。", + "maximum": 100, + "default": 100 } - }, - "required": [ - "session_id" - ] + } }, - "DeletePostMortemTemplateRequest": { + "RumFacetCountResponse": { "type": "object", - "description": "删除故障复盘模板的参数。", + "description": "按计数降序排列的 Top N 分面值。", "required": [ - "template_id" + "items" ], "properties": { - "template_id": { - "type": "string", - "description": "模板 ID。" + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FacetCountItem" + } } } }, - "InitPostMortemRequest": { + "RumFacetListRequest": { "type": "object", - "description": "从故障初始化复盘报告的参数。", - "required": [ - "incident_ids", - "template_id" - ], + "description": "RUM 字段定义列表的过滤参数。", "properties": { - "incident_ids": { + "scopes": { "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": "排序字段。" + "description": "按 RUM 数据 scope 过滤。合法值:`session`、`view`、`action`、`error`、`resource`、`long_task`、`vital`、`issue`、`sourcemap`。" }, - "asc": { + "is_facet": { "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": "上一页响应返回的向后分页游标。" + "description": "为 true 时只返回支持分面查询的字段;为 false 或不传时返回所有字段。" } } }, - "ListPostMortemTemplatesResponse": { + "RumFacetListResponse": { "type": "object", - "description": "分页后的故障复盘模板列表。", + "description": "RUM 字段定义列表。", "required": [ - "items", - "total", - "has_next_page" + "items" ], "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": "向后分页游标。" + "$ref": "#/components/schemas/RumFieldItem" + } } } }, - "PostMortemTemplate": { + "RumFieldItem": { "type": "object", - "description": "故障复盘报告模板。", + "description": "一条 RUM 字段定义。", "required": [ "account_id", - "template_id", - "name", + "field_key", + "field_name", + "group", "description", - "content", - "content_markdown", - "team_id", - "created_at_seconds", - "updated_at_seconds" + "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。" + "description": "账户 ID。内置字段为 0。" }, - "template_id": { + "field_key": { "type": "string", - "description": "模板 ID。内置模板使用稳定的 `post_mortem_default_tmpl_*` ID。" + "description": "唯一字段键,如 `error.type`。" }, - "name": { + "field_name": { "type": "string", - "description": "控制台展示的模板名称。" + "description": "人类可读的字段名称。" }, - "description": { + "group": { "type": "string", - "description": "模板描述。" - }, - "content": { - "type": "string", - "description": "用于初始化复盘正文的 BlockNote JSON 内容。" - }, - "content_markdown": { - "type": "string", - "description": "模板内容的 Markdown 版本,供 AI 生成使用。" - }, - "team_id": { - "type": "integer", - "format": "int64", - "description": "管理团队 ID。内置模板为 0。" - }, - "created_at_seconds": { - "type": "integer", - "format": "int64", - "description": "模板创建时间的 Unix 秒级时间戳。" + "description": "字段的展示分组。" }, - "updated_at_seconds": { - "type": "integer", - "format": "int64", - "description": "模板最近更新时间的 Unix 秒级时间戳。" - } - } - }, - "PreviewSyncRequest": { - "type": "object", - "required": [ - "ds_type", - "ds_name", - "expr" - ], - "description": "同步数据源查询预览的参数。", - "properties": { - "ds_type": { + "description": { "type": "string", - "description": "数据源类型,如 `prometheus`、`loki`、`elasticsearch`。" + "description": "该字段捕获内容的描述。" }, - "ds_name": { + "value_type": { "type": "string", - "description": "账户中配置的数据源显示名称。" + "description": "字段值的数据类型。", + "enum": [ + "string", + "number", + "boolean", + "array", + "array", + "array" + ] }, - "expr": { + "show_type": { "type": "string", - "description": "查询表达式,格式因 `ds_type` 而异(Prometheus 为 PromQL,Loki 为 LogQL 等)。" - }, - "delay_seconds": { - "type": "integer", - "description": "将查询窗口向前偏移的秒数,用于补偿数据摄入延迟。" + "description": "在分析 UI 中的展示类型。", + "enum": [ + "list", + "range" + ] }, - "args": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "特定类型的额外查询参数。" - } - } - }, - "PreviewSyncResponse": { - "type": "object", - "description": "数据源返回的原始 JSON,结构随数据源类型而异。" - }, - "ResetPostMortemBasicsRequest": { - "type": "object", - "description": "写回复盘报告的故障基础信息。", - "required": [ - "post_mortem_id", - "incidents_highest_severity", - "incidents_earliest_start_seconds" - ], - "properties": { - "post_mortem_id": { + "unit_family": { "type": "string", - "description": "复盘 ID。" + "description": "计量单位族,如 `time`、`bytes`。无量纲字段为空。" }, - "incidents_highest_severity": { + "unit_name": { "type": "string", - "description": "关联故障中的最高严重级别。" + "description": "具体计量单位,如 `millisecond`、`byte`。" }, - "incidents_earliest_start_seconds": { - "type": "integer", - "format": "int64", - "minimum": 1, - "description": "最早关联故障开始时间的 Unix 秒级时间戳。" + "edit_able": { + "type": "boolean", + "description": "是否为用户可编辑的自定义字段。" }, - "incidents_latest_close_seconds": { - "type": "integer", - "format": "int64", - "minimum": 0, - "description": "最晚关联故障关闭时间的 Unix 秒级时间戳;仍未关闭时为 0。" + "is_facet": { + "type": "boolean", + "description": "是否支持值分布统计查询。" }, - "incidents_total_duration_seconds": { - "type": "integer", - "format": "int64", - "minimum": 0, - "description": "故障总持续时间,单位秒。" + "enum_values": { + "type": "array", + "description": "该字段的预定义枚举值。元素类型与 `value_type` 对应:字符串类型为 `string`,数字类型为 `number`,布尔类型为 `boolean`。无固定值集合时为空数组。", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } }, - "responder_ids": { + "scopes": { "type": "array", "items": { - "type": "integer", - "format": "int64" + "type": "string" }, - "description": "写入报告的响应人成员 ID。" - } - } - }, - "ResetPostMortemFollowUpsRequest": { - "type": "object", - "description": "替换复盘后续行动项的参数。", - "required": [ - "post_mortem_id" - ], - "properties": { - "post_mortem_id": { - "type": "string", - "description": "复盘 ID。" + "description": "该字段所属的 RUM scope 列表。" }, - "follow_ups": { + "status": { "type": "string", - "description": "自由文本格式的后续行动项。" + "description": "字段状态,如 `active`。" + }, + "queryable": { + "type": "boolean", + "description": "是否可在 DQL/SQL 查询中使用。" } } }, - "ResetPostMortemStatusRequest": { + "RumFieldListRequest": { "type": "object", - "description": "更新复盘报告状态的参数。", - "required": [ - "post_mortem_id", - "status" - ], + "description": "RUM 字段定义列表的过滤参数。", "properties": { - "post_mortem_id": { - "type": "string", - "description": "复盘 ID。" + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按 RUM 数据 scope 过滤。合法值:`session`、`view`、`action`、`error`、`resource`、`long_task`、`vital`、`issue`、`sourcemap`。" }, - "status": { - "type": "string", - "enum": [ - "drafting", - "published" - ], - "description": "目标报告状态。" + "is_facet": { + "type": "boolean", + "description": "为 true 时只返回支持分面查询的字段;为 false 或不传时返回所有字段。" } } }, - "ResetPostMortemTitleRequest": { + "RumFieldListResponse": { "type": "object", - "description": "更新复盘报告标题的参数。", + "description": "RUM 字段定义列表。", "required": [ - "post_mortem_id", - "title" + "items" ], "properties": { - "post_mortem_id": { - "type": "string", - "description": "复盘 ID。" - }, - "title": { - "type": "string", - "description": "新的报告标题。" + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumFieldItem" + } } } }, - "RumWebhookTestRequest": { + "SourcemapBinaryImage": { "type": "object", - "description": "发送 RUM 告警样例 Webhook 的参数。", + "description": "崩溃报告中的已加载 binary image。", "required": [ - "application_id", - "webhook_url" + "uuid", + "name", + "is_system" ], "properties": { - "application_id": { + "uuid": { "type": "string", - "description": "RUM 应用 ID。" + "description": "标识 binary 或 dSYM 的 build UUID。" }, - "webhook_url": { + "name": { "type": "string", - "format": "uri", - "description": "接收样例告警事件的 Webhook URL。" - } - } - }, - "RumWebhookTestResponse": { - "type": "object", - "description": "Webhook 测试投递结果。", - "required": [ - "ok", - "status_code", - "message" - ], - "properties": { - "ok": { + "description": "Binary image 名称。" + }, + "is_system": { "type": "boolean", - "description": "Webhook 端点是否接受了样例事件。" + "description": "是否为操作系统自带 binary。" }, - "status_code": { - "type": "integer", - "description": "Webhook 端点返回的 HTTP 状态码。未收到响应时为 0。" + "load_address": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + } + ], + "description": "运行时地址。接受 `0x100000000` 这样的十六进制字符串,也接受十进制整数。" }, - "message": { + "max_address": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + } + ], + "description": "运行时地址。接受 `0x100000000` 这样的十六进制字符串,也接受十进制整数。" + }, + "arch": { "type": "string", - "description": "成功时为 `ok`,失败时为投递错误信息。" + "description": "该 binary image 的 CPU 架构。" } } }, - "TryLinkPersonRequest": { + "SourcemapCodeSnippet": { "type": "object", - "description": "尝试自动关联 IM 账号的参数。", + "description": "enrich 后栈帧附近的一行源码。", "required": [ - "integration_id" + "line", + "code" ], "properties": { - "integration_id": { + "line": { "type": "integer", - "format": "int64", - "description": "IM 集成 ID。" + "description": "源码行号。" + }, + "code": { + "type": "string", + "description": "该行源码内容。" } } }, - "TryLinkPersonResponse": { - "type": "object", - "description": "本次尝试关联成功的人员。", - "required": [ - "new_linked_person_ids" - ], - "properties": { - "new_linked_person_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "本次调用中新关联成功的人员 ID。" + "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": "该栈帧是否来自第三方或系统库。" + } + } } - } + ] }, - "UpsertPostMortemTemplateRequest": { + "SourcemapStackEnrichRequest": { "type": "object", - "description": "创建或更新故障复盘模板的参数。", + "description": "错误栈 enrich 请求。", "required": [ - "name", - "content" + "service", + "version" ], "properties": { - "template_id": { + "type": { "type": "string", - "description": "模板 ID。创建新模板时省略;更新已有模板时传入。" + "enum": [ + "browser", + "android", + "ios", + "miniprogram", + "harmony" + ], + "description": "来源平台。省略时默认按 `browser` 处理。" }, - "team_id": { + "service": { + "type": "string", + "description": "上传 Sourcemap 时使用的应用或服务名称。" + }, + "version": { + "type": "string", + "description": "上传 Sourcemap 时使用的应用版本。" + }, + "stack": { + "type": "string", + "description": "待解析和 enrich 的原始错误栈。" + }, + "near": { "type": "integer", - "format": "int64", - "description": "管理团队 ID。创建自定义模板时必填。" + "minimum": 1, + "maximum": 20, + "description": "在转换后的栈帧附近返回的有效源码行数。" }, - "name": { + "no_cache": { + "type": "boolean", + "description": "跳过缓存的 enrich 结果,主要用于调试。" + }, + "build_id": { "type": "string", - "description": "模板名称。" + "description": "Gradle 插件 1.13.0 及以后版本使用的 Android build ID。" }, - "description": { + "variant": { "type": "string", - "description": "模板描述。" + "description": "旧版 Gradle 插件使用的 Android build variant。" }, - "content": { + "arch": { "type": "string", - "description": "BlockNote JSON 模板内容。" + "description": "Android NDK 架构,例如 `arm`、`arm64`、`x86` 或 `x64`。" }, - "content_markdown": { + "source_type": { "type": "string", - "description": "模板内容的 Markdown 版本。" - } - } - }, - "DeleteStatusPageComponentRequest": { - "type": "object", - "description": "删除状态页服务组件的请求参数。", - "required": [ - "page_id", - "component_ids" - ], - "properties": { - "page_id": { - "type": "integer", - "format": "int64", - "description": "状态页 ID。" + "description": "Android 错误来源类型;native 符号化时配合 `arch` 传入 `ndk`。" }, - "component_ids": { + "binary_images": { "type": "array", + "description": "iOS 崩溃报告中的已加载 binary image 列表。", "items": { - "type": "string" - }, - "description": "要删除的组件 ID 列表。" + "$ref": "#/components/schemas/SourcemapBinaryImage" + } } } }, - "DeleteStatusPageSectionRequest": { + "SourcemapStackEnrichResponse": { "type": "object", - "description": "删除状态页区域的请求参数。", + "description": "enrich 后的错误栈帧。", "required": [ - "page_id", - "section_ids" + "frames" ], "properties": { - "page_id": { - "type": "integer", - "format": "int64", - "description": "状态页 ID。" - }, - "section_ids": { + "frames": { "type": "array", "items": { - "type": "string" - }, - "description": "要删除的区域 ID 列表。" + "$ref": "#/components/schemas/SourcemapEnrichedFrame" + } } } }, - "DeleteStatusPageTemplateRequest": { + "SourcemapStackFrame": { "type": "object", - "description": "删除状态页模板的请求参数。", - "required": [ - "page_id", - "type", - "template_id" - ], + "description": "跨平台通用的已解析栈帧字段。", "properties": { - "page_id": { + "function": { + "type": "string", + "description": "函数或方法名称。" + }, + "file": { + "type": "string", + "description": "源文件、URL 或模块路径。" + }, + "line": { "type": "integer", - "format": "int64", - "description": "状态页 ID。" + "description": "行号。" }, - "type": { + "column": { + "type": "integer", + "description": "JavaScript 或 Flutter 栈帧中的列号。" + }, + "class_name": { "type": "string", - "enum": [ - "pre_defined", - "message" - ], - "description": "模板分类。" + "description": "Android Java/Kotlin 类名。" }, - "template_id": { + "method_name": { "type": "string", - "description": "要删除的模板 ID。" + "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 地址。" } } }, - "UpsertStatusPageComponentRequest": { + "CreateStatusPageRequest": { "type": "object", - "description": "创建或更新状态页服务组件的请求参数。", - "required": [ - "page_id", - "components" - ], "properties": { - "page_id": { - "type": "integer", - "format": "int64", - "description": "状态页 ID。" + "name": { + "type": "string", + "description": "状态页展示名称。", + "maxLength": 255 }, - "components": { - "type": "array", - "description": "要创建或更新的组件列表。", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "component_id": { - "type": "string", - "description": "组件 ID。省略则创建新组件;提供则更新已有组件。" - }, - "section_id": { - "type": "string", - "description": "所属区域 ID。省略则将组件置于顶层。" - }, - "name": { - "type": "string", - "description": "组件显示名称。" - }, - "description": { - "type": "string", - "description": "组件描述。" - }, - "order_id": { - "type": "integer", - "format": "int64", - "description": "在所属区域中的显示顺序。" - }, - "hide_uptime": { - "type": "boolean", - "description": "为 true 时,在汇总接口中隐藏该组件的可用率数据。" - }, - "hide_all": { - "type": "boolean", - "description": "为 true 时,在汇总接口中完全隐藏该组件。" - } + "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" + ] }, - "UpsertStatusPageComponentResponse": { + "CreateStatusPageResponse": { "type": "object", - "description": "创建或更新状态页组件的结果。", + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "创建的状态页 ID。" + }, + "page_name": { + "type": "string", + "description": "创建的状态页名称。" + }, + "page_url_name": { + "type": "string", + "description": "最终分配给状态页的 URL 安全路径。" + } + }, "required": [ - "component_ids" - ], + "page_id", + "page_name", + "page_url_name" + ] + }, + "A2AAgentCreateRequest": { + "type": "object", + "description": "新建 A2A 智能体的注册参数。", "properties": { - "component_ids": { - "type": "array", - "items": { + "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": "创建或更新的组件 ID 列表,顺序与请求一致。" + "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" + ] }, - "UpsertStatusPageSectionRequest": { + "A2AAgentCreateResponse": { "type": "object", - "description": "创建或更新状态页区域的请求参数。", + "description": "注册 A2A 智能体的结果。", + "properties": { + "agent_id": { + "type": "string", + "description": "新建智能体的 ID。" + } + }, "required": [ - "page_id", - "sections" - ], + "agent_id" + ] + }, + "A2AAgentIDRequest": { + "type": "object", + "description": "按 ID 查找 A2A 智能体。", "properties": { - "page_id": { + "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", - "format": "int64", - "description": "状态页 ID。" + "description": "所属账户 ID。", + "format": "int64" }, - "sections": { + "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", - "description": "要创建或更新的区域列表。", "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "section_id": { - "type": "string", - "description": "区域 ID。省略则创建新区域;提供则更新已有区域。" - }, - "name": { - "type": "string", - "description": "区域显示名称。" - }, - "description": { - "type": "string", - "description": "区域描述。" - }, - "order_id": { - "type": "integer", - "format": "int64", - "description": "显示顺序。" - }, - "hide_uptime": { - "type": "boolean", - "description": "为 true 时,隐藏该区域下所有组件的可用率数据。" - }, - "hide_all": { - "type": "boolean", - "description": "为 true 时,在汇总接口中完全隐藏该区域。" - } - } - } + "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" + ] }, - "UpsertStatusPageSectionResponse": { + "A2AAgentListRequest": { "type": "object", - "description": "创建或更新状态页区域的结果。", - "required": [ - "section_ids" - ], + "description": "查询 A2A 智能体列表的分页、范围与搜索过滤参数。", "properties": { - "section_ids": { + "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": "string" + "type": "integer", + "format": "int64" }, - "description": "创建或更新的区域 ID 列表,顺序与请求一致。" + "description": "限定在这些团队 ID 内;留空表示使用调用者可见的团队集合。" + }, + "include_account": { + "type": [ + "boolean", + "null" + ], + "description": "是否包含账户级(team_id=0)记录。默认为 true。" } } }, - "UpsertStatusPageTemplateRequest": { + "A2AAgentListResponse": { "type": "object", - "description": "创建或更新状态页模板的请求参数。", - "required": [ - "page_id", - "type", - "template" - ], + "description": "分页的 A2A 智能体列表。", "properties": { - "page_id": { - "type": "integer", - "format": "int64", - "description": "状态页 ID。" + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/A2AAgentItem" + }, + "description": "本页的 A2A 智能体。" }, - "type": { + "total": { + "type": "integer", + "description": "符合条件的智能体总数。", + "format": "int64" + } + }, + "required": [ + "items", + "total" + ] + }, + "A2AAgentUpdateRequest": { + "type": "object", + "description": "对 A2A 智能体执行部分更新。字段为 null 或省略时保持不变。", + "properties": { + "agent_id": { "type": "string", - "enum": [ - "pre_defined", - "message" + "description": "目标智能体 ID。" + }, + "agent_name": { + "type": [ + "string", + "null" ], - "description": "模板分类。`pre_defined` 为预定义事件模板;`message` 为通知消息模板。" + "description": "新的显示名称。省略则保持不变。", + "maxLength": 128 }, - "template": { + "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", - "description": "模板内容。", - "required": [ - "title", - "event_type", - "status" + "additionalProperties": { + "type": "string" + }, + "description": "替换认证配置。省略则保持不变。对敏感键回传挖码值(或空字符串)将保留已存储的密钥而非覆盖。" + }, + "streaming": { + "type": [ + "boolean", + "null" ], - "properties": { - "template_id": { - "type": "string", - "description": "模板 ID。省略则创建;提供则更新。" - }, - "title": { - "type": "string", - "description": "模板标题。" - }, - "event_type": { - "type": "string", - "enum": [ - "incident", - "maintenance" - ], - "description": "本模板适用的事件类型。" - }, - "status": { - "type": "string", - "enum": [ - "investigating", - "identified", - "monitoring", - "resolved", - "scheduled", - "ongoing", - "completed" - ], - "description": "本模板对应的事件状态。" - }, - "description": { - "type": "string", - "description": "模板正文(Markdown)。" - } + "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" + ] }, - "UpsertStatusPageTemplateResponse": { + "EnvironmentBinding": { "type": "object", - "description": "创建或更新状态页模板的结果。", - "required": [ - "template_id" - ], + "description": "会话绑定的 runner 或云沙箱。首条消息前为 null。", "properties": { - "template_id": { + "kind": { "type": "string", - "description": "创建或更新的模板 ID。" + "description": "会话当前绑定的环境类型:`cloud`(托管沙箱)或 `byoc`(自建 runner)。", + "enum": [ + "cloud", + "byoc" + ] + }, + "id": { + "type": "string", + "description": "环境标识:`cloud` 绑定为云沙箱 ID,`byoc` 绑定为 runner/环境 ID。" + }, + "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" + ] }, - "AutomationRuleCreateRequest": { + "EventItem": { "type": "object", - "description": "创建自动化规则。", + "description": "单条已持久化的会话事件。content/actions/usage_metadata 携带原始 ADK 信封,请将其视为不透明的结构化负载。", "properties": { - "name": { + "event_id": { "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,除非用户要求禁用。" + "description": "事件标识。" }, - "cron_expr": { + "session_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 * * *" - }, - "schedule_trigger_enabled": { - "type": [ - "boolean", - "null" - ], - "description": "是否启用 schedule trigger。省略时为 true;HTTP-POST-only 规则应传 false。" + "description": "所属会话 ID。" }, - "prompt": { + "invocation_id": { "type": "string", - "minLength": 1, - "description": "每次运行发给 AI SRE Agent 的任务提示词。" + "description": "标识一轮的 ADK 调用 ID。" }, - "environment_kind": { + "author": { "type": "string", - "description": "运行环境类型。省略或空字符串表示自动选择。", - "enum": [ - "", - "cloud", - "byoc" - ] + "description": "事件作者(如 user 或智能体名称)。" }, - "environment_id": { + "branch": { "type": "string", - "description": "BYOC Runner ID。仅 `environment_kind=byoc` 时使用。" + "description": "嵌套智能体的 ADK 分支路径。" }, - "http_post_trigger_enabled": { + "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 }, - "team_id": { + "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", - "format": "int64", - "minimum": 0, - "description": "只允许传当前值;创建后 personal / team scope 不可修改。" + "description": "连接超时,单位秒。0 表示默认(10 秒)。" }, - "enabled": { - "type": "boolean", - "description": "是否启用规则。" + "call_timeout": { + "type": "integer", + "description": "工具调用超时,单位秒。0 表示默认(60 秒)。" }, - "cron_expr": { + "auth_mode": { "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": "认证模式:shared(默认)、per_user_secret 或 per_user_oauth。" }, - "schedule_trigger_enabled": { - "type": "boolean", - "description": "是否启用 schedule trigger。" + "secret_schema": { + "type": "string", + "description": "JSON 密钥 schema;auth_mode=per_user_secret 时必填。" }, - "prompt": { + "oauth_metadata": { "type": "string", - "description": "新的任务提示词。" + "description": "JSON OAuth 元数据;为 per_user_oauth 预留。" + }, + "status": { + "type": "string", + "description": "初始状态。", + "enum": [ + "enabled", + "disabled" + ], + "default": "enabled" + }, + "team_id": { + "type": "integer", + "description": "团队范围:0 表示账户级;>0 表示团队。", + "format": "int64" }, "environment_kind": { "type": "string", - "description": "运行环境类型。省略或空字符串表示自动选择。", + "description": "绑定到指定 BYOC 运行器(需同时提供 environment_id)。省略或留空表示自动选择;MCP 服务器不支持 cloud。", "enum": [ - "", - "cloud", "byoc" ] }, "environment_id": { "type": "string", - "description": "BYOC Runner ID。" + "description": "运行器 ID;environment_kind 为 byoc 时必填。" }, - "http_post_trigger_enabled": { + "allow_insecure_oauth_http": { "type": "boolean", - "description": "是否启用 HTTP POST trigger。不存在时设为 true 会创建。" + "description": "允许该服务器的 OAuth 令牌交换使用明文 HTTP,仅用于测试,默认 false。" }, - "oncall_incident_trigger_enabled": { + "allow_insecure_tls_skip_verify": { "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;创建或启用该触发器时至少需要一个值。" + "description": "连接该服务器时跳过 TLS 证书校验,仅用于测试,默认 false。" }, - "rotate_http_post_trigger_token": { - "type": "boolean", - "description": "是否轮换 HTTP POST trigger token。新 token 只会在本次响应中返回。" + "source_template_name": { + "type": "string", + "description": "从连接器模板创建时的市场模板名称。" } }, "required": [ - "rule_id" + "server_name", + "description", + "transport" ] }, - "AutomationRuleIDRequest": { + "MCPServerDeleteRequest": { "type": "object", + "description": "按 ID 删除 MCP 服务器。", "properties": { - "rule_id": { + "server_id": { "type": "string", - "description": "规则 ID。" + "description": "目标 MCP 服务器 ID。" } }, "required": [ - "rule_id" + "server_id" ] }, - "AutomationRuleListRequest": { + "MCPServerGetRequest": { "type": "object", - "description": "列出当前调用者可见的自动化规则。", + "description": "按 ID 查询 MCP 服务器。", "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。" - }, - "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": { + "server_id": { "type": "string", - "maxLength": 64, - "description": "按名称关键字过滤。" - } - } - }, - "AutomationRuleListResponse": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int64", - "description": "总数。" - }, - "rules": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AutomationRuleItem" - } + "description": "目标 MCP 服务器 ID。" } }, "required": [ - "total", - "rules" + "server_id" ] }, - "AutomationRuleItem": { + "MCPServerItem": { "type": "object", - "description": "自动化规则。", + "description": "账户下注册的 MCP 服务器(连接器)。", "properties": { - "rule_id": { + "server_id": { "type": "string", - "description": "规则 ID。" + "description": "MCP 服务器唯一 ID(前缀 `mcp_`)。" }, "account_id": { "type": "integer", - "format": "int64", - "description": "账户 ID。" + "description": "所属账户 ID。", + "format": "int64" }, "team_id": { "type": "integer", - "format": "int64", - "description": "作用域团队 ID;0 表示个人规则。" + "description": "团队范围:0 表示账户级;>0 表示所属团队。", + "format": "int64" }, - "owner_id": { - "type": "integer", - "format": "int64", - "description": "创建者 person ID。" + "can_edit": { + "type": "boolean", + "description": "调用者是否可编辑该服务器。" }, - "name": { + "environment_kind": { "type": "string", - "description": "规则名称。" + "description": "运行环境类型:留空表示自动选择,`byoc` 表示绑定到指定运行器;MCP 服务器不支持绑定 `cloud`。", + "enum": [ + "", + "byoc" + ] }, - "enabled": { - "type": "boolean", - "description": "规则是否启用。" + "environment_id": { + "type": "string", + "description": "environment_kind 为 byoc 时对应的运行器 ID;否则为空。" }, - "run_scope": { + "server_name": { "type": "string", - "enum": [ - "person", - "team" - ], - "description": "运行会话作用域。" + "description": "MCP 服务器名称,在账户内唯一。" }, - "cron_expr": { + "description": { "type": "string", - "description": "规范化后的 5 段 cron 表达式。" + "description": "服务器描述。" }, - "prompt": { + "ai_description": { "type": "string", - "description": "任务提示词。" + "description": "LLM 生成的描述,存在时优先于 `description`。" }, - "environment_kind": { + "transport": { "type": "string", - "description": "运行环境类型。省略或空字符串表示自动选择。", + "description": "传输协议。", "enum": [ - "", - "cloud", - "byoc" + "stdio", + "sse", + "streamable-http" ] }, - "environment_id": { + "command": { "type": "string", - "description": "BYOC Runner ID。" + "description": "可执行命令(仅 stdio 传输)。" }, - "schedule_trigger_id": { + "args": { + "type": "array", + "items": { + "type": "string" + }, + "description": "命令参数(stdio 传输)。" + }, + "env": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "环境变量(stdio 传输);密钥值已脱敏。" + }, + "url": { "type": "string", - "description": "Schedule trigger ID。" + "description": "服务器 URL(sse / streamable-http 传输)。" }, - "schedule_trigger_enabled": { - "type": "boolean", - "description": "Schedule trigger 是否启用。" + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "HTTP 头(sse / streamable-http);密钥值已脱敏。" }, - "http_post_trigger_id": { + "proxy_url": { "type": "string", - "description": "HTTP POST trigger ID。" + "description": "访问服务器使用的出站代理 URL。" }, - "http_post_trigger_url": { + "status": { "type": "string", - "description": "HTTP POST 触发路径。" + "description": "服务器状态。", + "enum": [ + "enabled", + "disabled" + ] }, - "http_post_trigger_enabled": { - "type": "boolean", - "description": "HTTP POST trigger 是否启用。" + "connect_timeout": { + "type": "integer", + "description": "连接超时,单位秒(0 表示默认 10 秒)。" }, - "oncall_incident_trigger_id": { - "type": "string", - "description": "On-call 故障触发器 ID。" + "call_timeout": { + "type": "integer", + "description": "工具调用超时,单位秒(0 表示默认 60 秒)。" }, - "oncall_incident_trigger_enabled": { + "allow_insecure_oauth_http": { "type": "boolean", - "description": "是否启用 On-call 故障触发器。" + "description": "允许该服务器的 OAuth 令牌交换使用明文 HTTP;仅用于测试。" }, - "oncall_incident_channel_ids": { + "allow_insecure_tls_skip_verify": { + "type": "boolean", + "description": "连接该服务器时跳过 TLS 证书校验;仅用于测试。" + }, + "tools": { "type": "array", "items": { - "type": "integer", - "format": "int64", - "minimum": 1 + "$ref": "#/components/schemas/MCPToolInfo" }, - "description": "监听的 On-call 集成 ID 列表;创建或启用该触发器时至少需要一个有效 ID。" + "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 模式)。" }, - "oncall_incident_severities": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "Critical", - "Warning", - "Info" - ] - }, - "description": "监听的故障严重程度,支持 Critical、Warning 和 Info;创建或启用该触发器时至少需要一个值。" + "oauth_metadata": { + "type": "string", + "description": "JSON 编码的 OAuth 元数据(per_user_oauth 模式)。" }, - "http_post_token": { + "source_template_name": { "type": "string", - "description": "HTTP POST trigger token。只在创建或轮换 token 的响应中返回;请立即保存。" + "description": "该连接器安装来源的市场模板名称;自建为空。" }, - "can_edit": { - "type": "boolean", - "description": "当前调用者是否可管理该规则。" + "created_by": { + "type": "integer", + "description": "创建该服务器的成员 ID。", + "format": "int64" }, "created_at": { "type": "integer", "format": "int64", - "description": "创建时间,Unix 毫秒。" + "description": "创建时间,Unix 毫秒时间戳。" }, "updated_at": { "type": "integer", "format": "int64", - "description": "更新时间,Unix 毫秒。" - }, - "schedule_next_fire_at_ms": { - "type": "integer", - "format": "int64", - "description": "下一次计划触发时间,Unix 毫秒;0 表示暂无可用的下一次计划触发。" + "description": "最近更新时间,Unix 毫秒时间戳。" } }, "required": [ - "rule_id", + "server_id", "account_id", "team_id", - "owner_id", - "name", - "enabled", - "run_scope", - "cron_expr", - "prompt", + "can_edit", "environment_kind", "environment_id", - "schedule_trigger_enabled", - "http_post_trigger_enabled", - "can_edit", + "server_name", + "description", + "transport", + "status", + "connect_timeout", + "call_timeout", + "created_by", "created_at", - "updated_at", - "schedule_next_fire_at_ms", - "oncall_incident_trigger_enabled" + "updated_at" ] }, - "AutomationTemplateListRequest": { + "MCPServerListRequest": { "type": "object", + "description": "MCP 服务器列表的分页、范围与搜索过滤条件。", "properties": { - "locale": { + "p": { + "type": "integer", + "description": "页码,从 1 开始。", + "default": 1 + }, + "limit": { + "type": "integer", + "description": "每页数量。", + "default": 20 + }, + "scope": { "type": "string", - "maxLength": 16, - "description": "模板语言,例如 zh-CN 或 en-US。省略时按请求语言自动选择。" + "description": "结果范围:account 仅返回账户级记录,team 仅返回调用者可见的团队级记录,省略则默认为 all(返回两者,仍受 team_ids/include_account 约束)。", + "enum": [ + "all", + "account", + "team" + ] + }, + "query": { + "type": "string", + "maxLength": 128, + "description": "对名称、描述、AI 生成描述、服务器 ID、传输协议、URL、命令、市场模板名称进行不区分大小写的子串搜索。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按团队 ID 过滤;为空则使用调用者可见范围。" + }, + "include_account": { + "type": [ + "boolean", + "null" + ], + "description": "是否包含账户级(team_id=0)记录,默认 true。" } } }, - "AutomationTemplateListResponse": { + "MCPServerListResponse": { "type": "object", + "description": "分页的 MCP 服务器列表。", "properties": { - "templates": { + "total": { + "type": "integer", + "description": "匹配的服务器总数。", + "format": "int64" + }, + "servers": { "type": "array", "items": { - "$ref": "#/components/schemas/AutomationTemplateItem" - } + "$ref": "#/components/schemas/MCPServerItem" + }, + "description": "当前页的 MCP 服务器。" } }, "required": [ - "templates" + "total", + "servers" ] }, - "AutomationTemplateItem": { + "MCPServerStatusRequest": { "type": "object", + "description": "按 ID 启用/禁用 MCP 服务器。", "properties": { - "name": { - "type": "string", - "description": "模板名称。" - }, - "description": { - "type": "string", - "description": "模板说明。" - }, - "icon": { - "type": "string", - "description": "图标标识。" - }, - "enabled": { - "type": "boolean", - "description": "模板是否可用。" - }, - "prompt": { + "server_id": { "type": "string", - "description": "模板提示词。" + "description": "目标 MCP 服务器 ID。" } }, "required": [ - "name", - "description", - "icon", - "enabled", - "prompt" + "server_id" ] }, - "AutomationRunListRequest": { + "MCPServerUpdateRequest": { "type": "object", + "description": "MCP 服务器的部分更新;省略字段表示不变。", "properties": { - "rule_id": { + "server_id": { "type": "string", - "description": "目标规则 ID。" + "description": "目标 MCP 服务器 ID。" }, - "p": { - "type": "integer", - "default": 1, - "description": "页码,从 1 开始。" + "server_name": { + "type": "string", + "description": "新名称。", + "minLength": 1, + "maxLength": 255 }, - "limit": { - "type": "integer", - "default": 20, - "maximum": 100, - "description": "每页数量。" + "description": { + "type": "string", + "description": "新描述。", + "minLength": 1, + "maxLength": 1024 }, - "status": { + "transport": { "type": "string", + "description": "传输协议。", "enum": [ - "queued", - "running", - "retrying", - "succeeded", - "partial", - "failed", - "skipped", - "abandoned" - ], - "description": "运行状态过滤。" + "stdio", + "sse", + "streamable-http" + ] }, - "trigger_kind": { + "command": { "type": "string", - "enum": [ - "schedule", - "debug", - "manual", - "http_post", - "oncall_incident" - ], - "description": "触发来源过滤条件。" + "description": "可执行命令(stdio 传输)。" }, - "started_after_ms": { + "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", - "format": "int64", - "description": "开始时间下界,Unix 毫秒。" + "description": "连接超时,单位秒。0 表示默认(10 秒)。" }, - "started_before_ms": { + "call_timeout": { "type": "integer", - "format": "int64", - "description": "开始时间上界,Unix 毫秒。" + "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" + }, + "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": [ - "rule_id" + "server_id" ] }, - "AutomationRunListResponse": { + "MCPToolInfo": { "type": "object", + "description": "MCP 服务器暴露的单个工具的元数据。", "properties": { - "total": { - "type": "integer", - "format": "int64", - "description": "总数。" + "name": { + "type": "string", + "description": "工具名称。" }, - "runs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AutomationRunItem" - } + "description": { + "type": "string", + "description": "工具描述。" + }, + "input_schema": { + "type": "object", + "additionalProperties": true, + "description": "描述工具输入参数的 JSON Schema。" } }, "required": [ - "total", - "runs" + "name", + "description" ] }, - "AutomationRunItem": { + "ManualRunRuleResult": { "type": "object", + "description": "手动运行一次自动化规则(跳过其计划触发时间)的结果。", "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。" + "description": "被运行的规则 ID。" }, "trigger_kind": { "type": "string", "enum": [ - "schedule", - "debug", - "manual", - "http_post", - "oncall_incident" + "manual" ], - "description": "触发来源。" + "description": "该操作固定为 manual。" }, - "occurrence_key": { - "type": "string", - "description": "幂等键。" + "preflight": { + "$ref": "#/components/schemas/PreflightResult" }, - "status": { + "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 的响应体。" + }, + "checks": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按执行顺序列出的就绪检查项名称。当前固定为:rule_loaded、actor_authorized、app_allowed、runtime_scope_resolved、rule_config_valid。" + }, + "scope": { "type": "string", "enum": [ - "queued", - "running", - "retrying", - "succeeded", - "partial", - "failed", - "skipped", - "abandoned" + "person", + "team" ], - "description": "运行状态。" - }, - "attempts": { - "type": "integer", - "description": "尝试次数。" + "description": "本次运行解析出的作用域,与规则的 run_scope 一致。" }, - "started_at": { - "type": "integer", - "format": "int64", - "description": "开始时间,Unix 毫秒。" - }, - "completed_at": { + "owner_id": { "type": "integer", "format": "int64", - "description": "完成时间,Unix 毫秒。0 表示尚未完成。" + "description": "规则所有者 person ID。" }, - "duration_ms": { + "team_id": { "type": "integer", "format": "int64", - "description": "运行耗时,毫秒。" + "description": "规则的作用域团队 ID;0 表示个人规则。" }, - "error_code": { + "app_name": { "type": "string", - "description": "错误码。" + "description": "规则所属的 App。当前始终为 ai-sre;手动运行目前仅支持该 App。" }, - "error_message": { + "warnings": { + "type": "array", + "items": { + "type": "string" + }, + "description": "预检过程中给出的非致命警告。没有警告时省略或为空数组。" + } + }, + "required": [ + "ok", + "checks", + "scope", + "owner_id", + "team_id", + "app_name" + ] + }, + "SessionDeleteRequest": { + "type": "object", + "description": "按 ID 删除会话。", + "properties": { + "session_id": { "type": "string", - "description": "错误消息。" + "description": "目标会话 ID。", + "minLength": 1 + } + }, + "required": [ + "session_id" + ] + }, + "SessionExportRequest": { + "type": "object", + "description": "以流式 NDJSON 导出单个会话的完整事件记录。", + "properties": { + "session_id": { + "type": "string", + "description": "目标会话 ID。" }, - "stats_json": { - "description": "统计 JSON。" + "include_subagents": { + "type": "boolean", + "description": "为 true 时,每条 subagent_dispatch 行后会跟随子会话的完整事件流,并以其自身的 session_meta 包裹。默认 false。" + } + }, + "required": [ + "session_id" + ] + }, + "SessionGetRequest": { + "type": "object", + "description": "查询单个会话,并返回其最近事件的一页(向更早方向分页)。", + "properties": { + "session_id": { + "type": "string", + "description": "目标会话 ID。", + "minLength": 1 }, - "result_json": { - "description": "结果 JSON。" + "share_token": { + "type": "string", + "description": "通过分享链接访问会话时使用的分享令牌;常规账户授权访问时省略。", + "maxLength": 512 }, - "created_at": { + "num_recent_events": { "type": "integer", - "format": "int64", - "description": "创建时间,Unix 毫秒。" + "description": "旧版每页数量:返回的最近事件数。与 `limit` 同时设置时以 `limit` 为准;0 使用服务端默认值(100)。", + "minimum": 0, + "maximum": 1000 }, - "updated_at": { + "limit": { "type": "integer", - "format": "int64", - "description": "更新时间,Unix 毫秒。" + "description": "事件每页数量;优先于 `num_recent_events`。0 使用服务端默认值(100)。", + "minimum": 0, + "maximum": 1000 + }, + "search_after_ctx": { + "type": "string", + "description": "上一次响应返回的不透明游标;回传以获取更早的一页。", + "maxLength": 4096 } }, "required": [ - "run_id", - "kind", - "account_id", - "rule_id", - "trigger_kind", - "occurrence_key", - "status", - "attempts", - "started_at", - "completed_at", - "duration_ms", - "created_at", - "updated_at" + "session_id" ] }, - "FacetCountItem": { + "SessionGetResponse": { "type": "object", - "description": "一个分面值及其出现次数。", - "required": [ - "facet_value", - "count" - ], + "description": "一个会话及其事件的一页(向更早方向分页)。", "properties": { - "facet_value": { - "description": "分面值,类型与字段的 `value_type` 一致。" + "session": { + "$ref": "#/components/schemas/SessionItem" }, - "count": { - "type": "integer", - "format": "int64", - "description": "该时间范围内具有此分面值的事件数量。", - "example": 1523 + "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 时省略。" + }, + "suggest_init": { + "type": "boolean", + "description": "账户级引导标志:当账户在任何范围内都没有知识包时为 true;并非该会话独有的属性。" } - } + }, + "required": [ + "session", + "events", + "has_more_older", + "suggest_init" + ] }, - "RumDataAggregateFunction": { + "SessionItem": { "type": "object", - "description": "采样引擎使用的聚合函数元信息。", - "required": [ - "type", - "column_name", - "column_index" - ], + "description": "单条智能体会话记录。", "properties": { - "type": { + "session_id": { "type": "string", - "description": "聚合函数类型。" + "description": "会话标识。" }, - "column_name": { + "parent_session_id": { "type": "string", - "description": "聚合函数使用的列名。" + "description": "子智能体(子)会话的父会话 ID;否则为空。" }, - "column_index": { - "type": "integer", - "description": "聚合函数使用的列下标。" - } - } - }, - "RumDataFieldMeta": { - "type": "object", - "description": "单个返回列的元信息。", - "required": [ - "name", - "type", - "nullable" - ], - "properties": { - "name": { + "session_name": { "type": "string", - "description": "列名。" + "description": "会话标题;未命名会话可能为空。" }, - "type": { + "app_name": { "type": "string", - "description": "该列的后端数据库类型名称。" + "description": "拥有该会话的智能体应用。" }, - "nullable": { - "type": "boolean", - "description": "该列的值是否可能为 null。" - } - } - }, - "RumDataQueryDefinition": { - "type": "object", - "description": "单个 RUM 数据查询定义。", - "required": [ - "id", - "sql", - "format" - ], - "properties": { - "id": { + "entry_kind": { "type": "string", - "maxLength": 64, - "description": "调用方提供的查询 ID;响应对象会使用同一值作为 key。" + "description": "创建该会话的入口来源。", + "enum": [ + "web", + "im", + "api", + "automation", + "subagent" + ] }, - "sql": { + "person_id": { "type": "string", - "description": "要执行的 RUM SQL 查询。" + "description": "创建者人员 ID。" }, - "dql": { + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID;0 表示未绑定团队。创建后不可变更。" + }, + "team_name": { "type": "string", - "description": "可选的 RUM DQL 过滤表达式,会和 SQL 校验一起使用。" + "description": "解析出的团队名称;未绑定或团队已删除时为空。" }, - "format": { + "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": [ - "time_series", - "table" - ], - "description": "输出格式。`table` 返回行数据;`time_series` 返回按时间桶聚合的时序数据。" + "owner", + "team_member", + "manager", + "share_link" + ] }, - "interval": { + "share_enabled": { + "type": "boolean", + "description": "会话的分享链接处于启用状态时为 true。" + }, + "share_version": { "type": "integer", "format": "int64", - "exclusiveMinimum": 0, - "default": 3600, - "description": "`time_series` 查询的时间桶间隔,单位秒。" + "description": "分享链接的版本号;撤销分享时会递增。" }, - "max_points": { + "shared_at": { "type": "integer", "format": "int64", - "exclusiveMinimum": 0, - "default": 1226, - "description": "`time_series` 查询最多返回的点数。" + "description": "最近一次启用分享的时间,Unix 毫秒时间戳;从未分享时为 0。" }, - "time_zone": { - "type": "string", - "description": "计算时间函数时使用的 IANA 时区名称,例如 `Asia/Shanghai`。" + "shared_by": { + "type": "integer", + "format": "int64", + "description": "最近一次启用分享的人员 ID;从未分享时为 0。" }, - "search_after_ctx": { + "status": { "type": "string", - "description": "上一次表格查询返回的不透明游标,用于继续分页。" + "description": "生命周期状态。", + "enum": [ + "enabled", + "deleted" + ] }, - "disable_sampling": { + "incognito": { "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": { + "created_at": { "type": "integer", "format": "int64", - "description": "查询窗口起始时间,Unix 毫秒时间戳。", - "example": 1712620800000 + "description": "会话创建时间,Unix 毫秒时间戳。" }, - "end_time": { + "updated_at": { "type": "integer", "format": "int64", - "description": "查询窗口结束时间,Unix 毫秒时间戳。最大跨度 31 天。", - "example": 1712707200000 + "description": "会话最近更新时间,Unix 毫秒时间戳。" }, - "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": { + "template_staging_round_id": { "type": "string", - "description": "用于继续表格查询分页的不透明游标。" + "description": "当前 save→validate 轮次 ID(仅 template-assistant);否则为空。" }, - "fields": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RumDataFieldMeta" - }, - "description": "返回值矩阵的列元信息。" + "state": { + "type": "object", + "additionalProperties": true, + "description": "原始会话状态包(会话级键)。为空时省略。" }, - "values": { - "type": "array", - "description": "查询返回的行数据。每一行按下标与 `fields` 对齐。", - "items": { - "type": "array", - "items": {} - } + "bound_environment": { + "$ref": "#/components/schemas/EnvironmentBinding" }, - "interval": { + "context_resolved": { + "$ref": "#/components/schemas/ContextResolvedItem" + }, + "token_usage": { + "$ref": "#/components/schemas/SessionTokenUsage" + }, + "current_context_tokens": { "type": "integer", "format": "int64", - "description": "时序查询实际使用的时间桶间隔,单位秒。" + "description": "截至最近一轮的 LLM 上下文窗口的 token 数。0 表示尚无已完成的轮次。" }, - "sampling": { - "$ref": "#/components/schemas/RumDataSamplingDecision" - } - } - }, - "RumDataSamplingDecision": { - "type": "object", - "description": "查询引擎使用采样数据时返回的采样元信息。", - "required": [ - "enabled", - "scale_factor" - ], - "properties": { - "enabled": { - "type": "boolean", - "description": "是否应用了采样。" + "context_window": { + "type": "integer", + "format": "int64", + "description": "所绑定模型的最大上下文 token 数。0 表示未知。" }, - "scale_factor": { - "type": "number", - "description": "将采样计数放大为全量估算值时使用的倍率。" + "archived_at": { + "type": "integer", + "format": "int64", + "description": "归档时间,Unix 毫秒时间戳;0 表示未归档。" }, - "selected_tablets": { - "type": "array", - "items": { - "type": "string" - }, - "description": "采样查询选中的存储 tablet。" + "pinned_at": { + "type": "integer", + "format": "int64", + "description": "调用者的个人置顶时间,Unix 毫秒时间戳;0 表示未置顶。" }, - "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" - ] + "last_event_at": { + "type": "integer", + "format": "int64", + "description": "最近一条助手侧事件的时间,Unix 毫秒时间戳。" }, - "facet_key": { - "type": "string", - "description": "要统计值分布的字段键。" + "is_running": { + "type": "boolean", + "description": "当该会话当前有正在进行的智能体轮次时为 true。" }, - "facet_value": { - "description": "设置后,统计前会先过滤 `facet_key` 等于该值的事件。接受字符串、数字或布尔值。" + "has_unread": { + "type": "boolean", + "description": "当存在调用者尚未查看的助手输出时为 true。" }, - "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 - }, - "dql": { - "type": "string", - "description": "统计前应用的 RUM DQL 过滤表达式。" + "description": "本轮(当前或最近一轮)的实际工作时长(毫秒),不含等待 ask_user 的时间;每次新轮次开始时重置为 0。" }, - "sql": { - "type": "string", - "description": "仅含 WHERE 子句(无 SELECT)的 SQL 附加过滤条件。" + "current_turn_wait_ms": { + "type": "integer", + "format": "int64", + "description": "当前轮次累计的 ask_user 人工等待时长(毫秒);每次新轮次开始时重置为 0。" }, - "limit": { + "current_turn_tokens": { "type": "integer", - "description": "返回的最大 Top N 值数量。默认 100,最大 100。", - "maximum": 100, - "default": 100 + "format": "int64", + "description": "当前进行中轮次的 token 总数(输入+输出+推理),涵盖父会话及其所有子智能体;仅由 session/get 在会话运行时计算,session/list 响应及空闲时恒为 0。" } - } - }, - "RumFacetCountResponse": { - "type": "object", - "description": "按计数降序排列的 Top N 分面值。", + }, "required": [ - "items" - ], - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FacetCountItem" - } - } - } + "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" + ] }, - "RumFacetListRequest": { + "SessionListRequest": { "type": "object", - "description": "RUM 字段定义列表的过滤参数。", + "description": "查询智能体会话列表的过滤条件。`all` 表示调用者自己的个人会话和可访问团队的团队会话;账户管理员不可见他人的个人会话。", "properties": { - "scopes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "按 RUM 数据 scope 过滤。合法值:`session`、`view`、`action`、`error`、`resource`、`long_task`、`vital`、`issue`、`sourcemap`。" + "app_name": { + "type": "string", + "description": "要查询其会话的智能体应用。", + "enum": [ + "ask-ai", + "support", + "support-website", + "support-flashcat", + "ai-sre", + "template-assistant", + "swe" + ] }, - "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": { + "p": { "type": "integer", - "format": "int64", - "description": "账户 ID。内置字段为 0。" + "description": "页码,从 1 开始。", + "default": 1, + "minimum": 1 }, - "field_key": { - "type": "string", - "description": "唯一字段键,如 `error.type`。" + "limit": { + "type": "integer", + "description": "每页数量,1–100。", + "minimum": 1, + "maximum": 100, + "default": 20 }, - "field_name": { + "orderby": { "type": "string", - "description": "人类可读的字段名称。" + "description": "排序字段。", + "enum": [ + "created_at", + "updated_at" + ] }, - "group": { - "type": "string", - "description": "字段的展示分组。" + "asc": { + "type": "boolean", + "description": "为 true 时升序;仅在设置 `orderby` 时生效。" }, - "description": { - "type": "string", - "description": "该字段捕获内容的描述。" + "include_subagent_sessions": { + "type": "boolean", + "description": "是否在列表中包含子智能体派生的会话。" }, - "value_type": { + "keyword": { "type": "string", - "description": "字段值的数据类型。", - "enum": [ - "string", - "number", - "boolean", - "array", - "array", - "array" - ] + "description": "按会话名称关键字过滤。", + "maxLength": 64 }, - "show_type": { + "scope": { "type": "string", - "description": "在分析 UI 中的展示类型。", + "description": "可见范围:`all`(自己的个人会话 + 可访问团队会话)、`personal` 或 `team`;默认 `all`。", "enum": [ - "list", - "range" + "all", + "personal", + "team" ] }, - "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": { + "team_ids": { "type": "array", - "description": "该字段的预定义枚举值。元素类型与 `value_type` 对应:字符串类型为 `string`,数字类型为 `number`,布尔类型为 `boolean`。无固定值集合时为空数组。", "items": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - } + "type": "integer", + "format": "int64" + }, + "description": "可选的团队过滤;与 `scope` 取交集,且不会扩大访问范围。" }, - "scopes": { + "entry_kinds": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "web", + "im", + "api", + "automation" + ] }, - "description": "该字段所属的 RUM scope 列表。" + "description": "仅返回由这些入口产生的会话;为空则返回所有类型。" }, "status": { "type": "string", - "description": "字段状态,如 `active`。" - }, - "queryable": { - "type": "boolean", - "description": "是否可在 DQL/SQL 查询中使用。" + "description": "归档分桶:active(默认)返回未归档,archived 返回已归档,all 返回全部。", + "enum": [ + "active", + "archived", + "all" + ] } - } + }, + "required": [ + "app_name" + ] }, - "RumFieldListRequest": { + "SessionListResponse": { "type": "object", - "description": "RUM 字段定义列表的过滤参数。", + "description": "一页智能体会话。", "properties": { - "scopes": { + "total": { + "type": "integer", + "format": "int64", + "description": "匹配过滤条件的会话总数(忽略分页)。" + }, + "sessions": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/SessionItem" }, - "description": "按 RUM 数据 scope 过滤。合法值:`session`、`view`、`action`、`error`、`resource`、`long_task`、`vital`、`issue`、`sourcemap`。" + "description": "当前页的会话。" }, - "is_facet": { + "suggest_init": { "type": "boolean", - "description": "为 true 时只返回支持分面查询的字段;为 false 或不传时返回所有字段。" + "description": "账户级引导标志:当账户在任何范围内都没有知识包时为 true;与本次调用的过滤条件无关。" } - } - }, - "RumFieldListResponse": { - "type": "object", - "description": "RUM 字段定义列表。", + }, "required": [ - "items" - ], - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RumFieldItem" - } - } - } + "total", + "sessions", + "suggest_init" + ] }, - "SourcemapBinaryImage": { + "SessionTokenUsage": { "type": "object", - "description": "崩溃报告中的已加载 binary image。", - "required": [ - "uuid", - "name", - "is_system" - ], + "description": "跨所有轮次的会话级 token 累计汇总。账户计费的权威来源。", "properties": { - "uuid": { - "type": "string", - "description": "标识 binary 或 dSYM 的 build UUID。" - }, - "name": { - "type": "string", - "description": "Binary image 名称。" - }, - "is_system": { - "type": "boolean", - "description": "是否为操作系统自带 binary。" + "input_tokens": { + "type": "integer", + "format": "int64", + "description": "提示(输入)token 总数,含缓存部分。" }, - "load_address": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer", - "format": "int64" - } - ], - "description": "运行时地址。接受 `0x100000000` 这样的十六进制字符串,也接受十进制整数。" + "cached_tokens": { + "type": "integer", + "format": "int64", + "description": "input_tokens 中由提示缓存命中的部分。" }, - "max_address": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer", - "format": "int64" - } - ], - "description": "运行时地址。接受 `0x100000000` 这样的十六进制字符串,也接受十进制整数。" + "output_tokens": { + "type": "integer", + "format": "int64", + "description": "生成(输出)token 总数。" }, - "arch": { - "type": "string", - "description": "该 binary image 的 CPU 架构。" + "reasoning_tokens": { + "type": "integer", + "format": "int64", + "description": "推理/思考 token 总数。" } - } + }, + "required": [ + "input_tokens", + "cached_tokens", + "output_tokens", + "reasoning_tokens" + ] }, - "SourcemapCodeSnippet": { + "SkillDeleteRequest": { "type": "object", - "description": "enrich 后栈帧附近的一行源码。", - "required": [ - "line", - "code" - ], + "description": "按 ID 删除技能。", "properties": { - "line": { - "type": "integer", - "description": "源码行号。" - }, - "code": { + "skill_id": { "type": "string", - "description": "该行源码内容。" + "description": "目标技能 ID。" } - } + }, + "required": [ + "skill_id" + ] }, - "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": "该栈帧是否来自第三方或系统库。" - } - } + "SkillGetRequest": { + "type": "object", + "description": "按 ID 查询技能。", + "properties": { + "skill_id": { + "type": "string", + "description": "目标技能 ID。" } + }, + "required": [ + "skill_id" ] }, - "SourcemapStackEnrichRequest": { + "SkillItem": { "type": "object", - "description": "错误栈 enrich 请求。", - "required": [ - "service", - "version" - ], + "description": "AI SRE 技能 —— 智能体可加载的 SKILL.md 打包资源。", "properties": { - "type": { - "type": "string", - "enum": [ - "browser", - "android", - "ios", - "miniprogram", - "harmony" - ], - "description": "来源平台。省略时默认按 `browser` 处理。" - }, - "service": { - "type": "string", - "description": "上传 Sourcemap 时使用的应用或服务名称。" - }, - "version": { + "skill_id": { "type": "string", - "description": "上传 Sourcemap 时使用的应用版本。" + "description": "技能唯一 ID(前缀 `skill_`)。" }, - "stack": { - "type": "string", - "description": "待解析和 enrich 的原始错误栈。" + "account_id": { + "type": "integer", + "description": "所属账户 ID。", + "format": "int64" }, - "near": { + "team_id": { "type": "integer", - "minimum": 1, - "maximum": 20, - "description": "在转换后的栈帧附近返回的有效源码行数。" + "description": "团队范围:0 表示账户级;>0 表示所属团队。", + "format": "int64" }, - "no_cache": { - "type": "boolean", - "description": "跳过缓存的 enrich 结果,主要用于调试。" + "skill_name": { + "type": "string", + "description": "技能名称,在账户内唯一。" }, - "build_id": { + "description": { "type": "string", - "description": "Gradle 插件 1.13.0 及以后版本使用的 Android build ID。" + "description": "来自 SKILL.md frontmatter 的可读描述。" }, - "variant": { + "description_en": { "type": "string", - "description": "旧版 Gradle 插件使用的 Android build variant。" + "description": "可选的英文描述。英文语言环境下的界面响应优先使用该字段而非 `description`;当 `description` 被本地化展示时,技能目录也会用它作为稳定的选型信号。" }, - "arch": { + "content": { "type": "string", - "description": "Android NDK 架构,例如 `arm`、`arm64`、`x86` 或 `x64`。" + "description": "完整的 SKILL.md 内容;列表响应中省略。" }, - "source_type": { + "version": { "type": "string", - "description": "Android 错误来源类型;native 符号化时配合 `arch` 传入 `ndk`。" + "description": "frontmatter 中的技能版本。" }, - "binary_images": { + "tags": { "type": "array", - "description": "iOS 崩溃报告中的已加载 binary image 列表。", "items": { - "$ref": "#/components/schemas/SourcemapBinaryImage" - } - } - } - }, - "SourcemapStackEnrichResponse": { - "type": "object", - "description": "enrich 后的错误栈帧。", - "required": [ - "frames" - ], - "properties": { - "frames": { + "type": "string" + }, + "description": "从 frontmatter 解析的标签。" + }, + "author": { + "type": "string", + "description": "技能作者。" + }, + "license": { + "type": "string", + "description": "技能许可证。" + }, + "tools": { "type": "array", "items": { - "$ref": "#/components/schemas/SourcemapEnrichedFrame" - } - } - } - }, - "SourcemapStackFrame": { - "type": "object", - "description": "跨平台通用的已解析栈帧字段。", - "properties": { - "function": { + "type": "string" + }, + "description": "所需工具(内置或 `mcp:server/tool`)。" + }, + "s3_key": { "type": "string", - "description": "函数或方法名称。" + "description": "技能压缩包在对象存储中的 key。" }, - "file": { + "checksum": { "type": "string", - "description": "源文件、URL 或模块路径。" + "description": "技能压缩包的 SHA-256 校验和。" }, - "line": { + "status": { + "type": "string", + "description": "技能状态。已删除的技能不会出现在任何 API 响应中,因此只会返回这两种状态。", + "enum": [ + "enabled", + "disabled" + ] + }, + "created_by": { "type": "integer", - "description": "行号。" + "description": "创建该技能的成员 ID。", + "format": "int64" }, - "column": { + "created_at": { "type": "integer", - "description": "JavaScript 或 Flutter 栈帧中的列号。" + "format": "int64", + "description": "创建时间,Unix 毫秒时间戳。" }, - "class_name": { - "type": "string", - "description": "Android Java/Kotlin 类名。" + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最近更新时间,Unix 毫秒时间戳。" }, - "method_name": { - "type": "string", - "description": "不带类名前缀的 Android Java/Kotlin 方法名。" + "can_edit": { + "type": "boolean", + "description": "调用者是否可编辑该技能。" }, - "module": { + "source_template_name": { "type": "string", - "description": "iOS Swift/Objective-C 模块名。" + "description": "该技能安装来源的市场模板名称;自建技能为空。" }, - "address": { + "source_template_version": { "type": "string", - "description": "iOS 或 native 内存地址。" + "description": "安装时的模板版本。" }, - "offset": { - "type": "integer", - "description": "相对函数起始位置的符号偏移。" + "update_available": { + "type": "boolean", + "description": "当市场存在更新版本时为 true。" }, - "native_address": { - "type": "string", - "description": "Unity IL native 地址。" + "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" + ] }, - "CreateStatusPageRequest": { + "SkillListRequest": { "type": "object", + "description": "技能列表的分页、搜索与团队过滤条件。", "properties": { - "name": { - "type": "string", - "description": "状态页展示名称。", - "maxLength": 255 + "p": { + "type": "integer", + "description": "页码,从 1 开始。", + "default": 1 }, - "url_name": { - "type": "string", - "description": "URL 安全的状态页路径,在账户和状态页类型内唯一。", - "maxLength": 255 + "limit": { + "type": "integer", + "description": "每页数量。", + "default": 20 }, - "type": { + "scope": { "type": "string", - "description": "状态页可见性类型。", + "description": "将结果限制为 `all`(默认)、仅 `account`(team_id=0)、或仅 `team`(排除账户级记录);设置后会覆盖 `include_account`。", "enum": [ - "public", - "internal" + "all", + "account", + "team" ] }, - "custom_domain": { + "query": { "type": "string", - "description": "公开状态页使用的自定义域名。", - "maxLength": 255 + "description": "跨技能名称、描述、英文描述、技能 ID、市场来源模板名称与作者的全文搜索。", + "maxLength": 128 }, - "page_title": { - "type": "string", - "description": "状态页浏览器标题。" + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按团队 ID 过滤;为空则使用调用者可见范围。" }, - "page_header": { - "type": "string", - "description": "状态页页头内容。" + "include_account": { + "type": [ + "boolean", + "null" + ], + "description": "是否包含账户级(team_id=0)记录,默认 true。当 `scope` 为 `account` 或 `team` 时该字段会被忽略。" + } + } + }, + "SkillListResponse": { + "type": "object", + "description": "分页的技能列表。", + "properties": { + "total": { + "type": "integer", + "description": "匹配的技能总数。", + "format": "int64" }, - "page_footer": { + "skills": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SkillItem" + }, + "description": "当前页的技能。" + } + }, + "required": [ + "total", + "skills" + ] + }, + "SkillStatusRequest": { + "type": "object", + "description": "按 ID 启用/禁用技能。", + "properties": { + "skill_id": { "type": "string", - "description": "状态页页脚内容。" - }, - "date_view": { + "description": "目标技能 ID。" + } + }, + "required": [ + "skill_id" + ] + }, + "SkillUpdateRequest": { + "type": "object", + "description": "可编辑的技能元数据。", + "properties": { + "skill_id": { "type": "string", - "description": "事件日期展示方式。", - "enum": [ - "calendar", - "list" - ] + "description": "目标技能 ID。" }, - "display_uptime_mode": { + "description": { "type": "string", - "description": "可用率展示方式。", - "enum": [ - "chart_and_percentage", - "chart", - "none" - ] - }, - "custom_links": { - "type": "array", - "description": "状态页展示的自定义导航链接。", - "items": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } + "description": "新的描述,不能包含 `<` 或 `>`。传入空字符串不会清空当前值 —— 该字段无法用于清空描述。", + "maxLength": 1024 }, - "contact_info": { - "type": "string", - "description": "联系信息,例如 mailto 或网站 URL。" + "description_en": { + "type": [ + "string", + "null" + ], + "description": "新的英文描述,不能包含 `<` 或 `>`。省略表示不变;传入空字符串可显式清空。", + "maxLength": 1024 }, - "subscription": { - "$ref": "#/components/schemas/StatusPageSubscriptionItem" + "team_id": { + "type": [ + "integer", + "null" + ], + "description": "重新分配团队范围:0 表示账户级;>0 表示团队。省略则不变。", + "format": "int64" } }, "required": [ - "name", - "url_name", - "type", - "date_view", - "display_uptime_mode" + "skill_id" ] }, - "CreateStatusPageResponse": { + "SkillUploadRequest": { "type": "object", + "description": "上传技能压缩包的 multipart 表单。", "properties": { - "page_id": { + "file": { + "type": "string", + "format": "binary", + "description": "技能压缩包(.skill / .zip / .tar.gz / .tgz),最大 100MB;超限文件会在读取正文前即被拒绝。" + }, + "team_id": { "type": "integer", - "format": "int64", - "description": "创建的状态页 ID。" + "description": "新建/upsert 技能的团队范围:0 表示账户级。通过 `skill_id` 定向替换时会忽略该字段。", + "format": "int64" }, - "page_name": { - "type": "string", - "description": "创建的状态页名称。" + "replace": { + "type": "boolean", + "description": "为 true 时覆盖已有技能而非在名称冲突时报错 —— 若提供 `skill_id` 则按其匹配,否则按技能名称匹配。" }, - "page_url_name": { + "skill_id": { "type": "string", - "description": "最终分配给状态页的 URL 安全路径。" + "description": "定向替换指定技能时的技能 ID(需配合 `replace=true`)。" } }, "required": [ - "page_id", - "page_name", - "page_url_name" + "file" ] } } diff --git a/roundtrip_gen_test.go b/roundtrip_gen_test.go index 74efd33..4717356 100644 --- a/roundtrip_gen_test.go +++ b/roundtrip_gen_test.go @@ -150,6 +150,7 @@ var exampleDataDecoders = map[string]func(json.RawMessage) error{ "POST /safari/automation/rule/delete": func(d json.RawMessage) error { var v any; return json.Unmarshal(d, &v) }, "POST /safari/automation/rule/get": func(d json.RawMessage) error { var v AutomationRuleItem; return json.Unmarshal(d, &v) }, "POST /safari/automation/rule/list": func(d json.RawMessage) error { var v AutomationRuleListResponse; return json.Unmarshal(d, &v) }, + "POST /safari/automation/rule/run": func(d json.RawMessage) error { var v ManualRunRuleResult; return json.Unmarshal(d, &v) }, "POST /safari/automation/rule/update": func(d json.RawMessage) error { var v AutomationRuleItem; return json.Unmarshal(d, &v) }, "POST /safari/automation/run/list": func(d json.RawMessage) error { var v AutomationRunListResponse; return json.Unmarshal(d, &v) }, "POST /safari/automation/template/list": func(d json.RawMessage) error { var v AutomationTemplateListResponse; return json.Unmarshal(d, &v) }, diff --git a/services_gen.go b/services_gen.go index e216f2a..3a433bb 100644 --- a/services_gen.go +++ b/services_gen.go @@ -8,7 +8,6 @@ type service struct{ client *Client } // genServices is embedded in Client to expose the generated service handles. type genServices struct { - A2aAgents *A2aAgentsService Automations *AutomationsService McpServers *McpServersService Sessions *SessionsService @@ -40,12 +39,12 @@ type genServices struct { Facets *FacetsService Issues *IssuesService Sourcemaps *SourcemapsService + En *EnService } // initServices wires every service to the shared backref. Called by NewClient. func (c *Client) initServices() { c.common.client = c - c.A2aAgents = (*A2aAgentsService)(&c.common) c.Automations = (*AutomationsService)(&c.common) c.McpServers = (*McpServersService)(&c.common) c.Sessions = (*SessionsService)(&c.common) @@ -77,4 +76,5 @@ func (c *Client) initServices() { c.Facets = (*FacetsService)(&c.common) c.Issues = (*IssuesService)(&c.common) c.Sourcemaps = (*SourcemapsService)(&c.common) + c.En = (*EnService)(&c.common) } 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) {