diff --git a/integrations.go b/integrations.go index 288b5fb..2631042 100644 --- a/integrations.go +++ b/integrations.go @@ -23,7 +23,7 @@ func (s *IntegrationsService) DatasourceImPersonTryLink(ctx context.Context, req // Get integration detail. // -// Return one integration, including its settings with sensitive values masked. +// Get a public integration with its stored settings and decrypted integration key. // // API: POST /integration/info (integration-api-read-info). func (s *IntegrationsService) IntegrationAPIReadInfo(ctx context.Context, req *GetIntegrationRequest) (*IntegrationDetail, *Response, error) { @@ -37,7 +37,7 @@ func (s *IntegrationsService) IntegrationAPIReadInfo(ctx context.Context, req *G // List integrations. // -// List the account's alert-source and change-source integrations. +// List public integrations with their stored settings, decrypted keys, and edit permissions. // // API: POST /integration/list (integration-api-read-list). func (s *IntegrationsService) IntegrationAPIReadList(ctx context.Context, req *ListIntegrationsRequest) (*ListIntegrationsResponse, *Response, error) { @@ -65,7 +65,7 @@ func (s *IntegrationsService) IntegrationAPIReadTypeList(ctx context.Context, re // Create integration. // -// Create an integration for an alert source or change source. +// Create a public integration for a supported alert, change, IM, or webhook type. // // API: POST /integration/create (integration-api-write-create). func (s *IntegrationsService) IntegrationAPIWriteCreate(ctx context.Context, req *CreateIntegrationRequest) (*CreateIntegrationResponse, *Response, error) { diff --git a/models_gen.go b/models_gen.go index a821ac7..79653a7 100644 --- a/models_gen.go +++ b/models_gen.go @@ -417,8 +417,8 @@ type AlertEventGlobalListRequest struct { Asc bool `json:"asc,omitempty" toon:"asc,omitempty"` // Filter by channel IDs. At most 100 entries. ChannelIDs []int64 `json:"channel_ids,omitempty" toon:"channel_ids,omitempty"` - // End of the search window, Unix epoch seconds. Must be greater than `start_time` when provided. - EndTime *int64 `json:"end_time,omitempty" toon:"end_time,omitempty"` + // End of the search window, Unix epoch seconds. Must be greater than `start_time`; the span must not exceed 31 days. + EndTime int64 `json:"end_time" toon:"end_time"` // Filter by integration IDs. IntegrationIDs []int64 `json:"integration_ids,omitempty" toon:"integration_ids,omitempty"` // Filter by integration types (plugin keys). @@ -427,8 +427,8 @@ type AlertEventGlobalListRequest struct { Orderby string `json:"orderby,omitempty" toon:"orderby,omitempty"` // Comma-separated severity filter, e.g. `Critical,Warning`. Accepted values: `Critical`, `Warning`, `Info`, `Ok`. Severities string `json:"severities,omitempty" toon:"severities,omitempty"` - // Start of the search window, Unix epoch seconds. Must be greater than 0 when provided. - StartTime *int64 `json:"start_time,omitempty" toon:"start_time,omitempty"` + // Start of the search window, Unix epoch seconds. Must be greater than 0. + StartTime int64 `json:"start_time" toon:"start_time"` } // AlertEventGlobalListResponse is generated from the Flashduty OpenAPI schema. @@ -2246,13 +2246,17 @@ type CreateInhibitRuleRequest struct { type CreateIntegrationRequest struct { // Free-form description, at most 499 characters. Description string `json:"description,omitempty" toon:"description,omitempty"` - // Integration name. 2–49 characters. + // Optional pre-generated key: 35 characters, ending with the account ID modulo 1000 padded to three digits; it must not already be in use. Omit to generate a key. + IntegrationKey string `json:"integration_key,omitempty" toon:"integration_key,omitempty"` + // Run the plugin test during creation; false when omitted. Inspect the returned `test.success` for the test outcome. + IsTest bool `json:"is_test,omitempty" toon:"is_test,omitempty"` + // Integration name, 2–49 characters when nonempty; defaults to the integration type name when omitted or empty. Name string `json:"name,omitempty" toon:"name,omitempty"` // Integration type. Must be one listed by `POST /integration/type/list` with `supports_api_create: true`. PluginType string `json:"plugin_type" toon:"plugin_type"` // Type-specific configuration; the accepted keys depend on `plugin_type`. Settings map[string]any `json:"settings,omitempty" toon:"settings,omitempty"` - // Owning team ID. + // Owning team ID; omit or use `0` for no team. A nonzero ID must belong to the current account. TeamID int64 `json:"team_id,omitempty" toon:"team_id,omitempty"` } @@ -2260,8 +2264,10 @@ type CreateIntegrationRequest struct { type CreateIntegrationResponse struct { // ID of the new integration. IntegrationID int64 `json:"integration_id" toon:"integration_id"` - // Key used to authenticate inbound pushes to this integration. Returned here only; fetch a new one with `POST /integration/key/rotate`. + // Integration key for inbound pushes; also readable from `/integration/list` and `/integration/info`. IntegrationKey string `json:"integration_key" toon:"integration_key"` + // Plugin test result, returned only when a test is performed. + Test *CreateIntegrationResponseTest `json:"test,omitempty" toon:"test,omitempty"` } // CreateSilenceRuleRequest is generated from the Flashduty OpenAPI schema. @@ -2831,7 +2837,7 @@ type DashboardCustomVariable struct { Kind string `json:"kind" toon:"kind"` // Optional display label; falls back to `name`. Label string `json:"label,omitempty" toon:"label,omitempty"` - // Variable name used in `{{ }}` templates, at most 64 characters. + // Variable name used in `{{ }}` templates, at most 64 characters. Names starting with `__` are reserved for built-in time variables. Name string `json:"name" toon:"name"` // Candidate list, 1–1000 entries. Values must be non-empty, unique and must not be `$__all`. Options []DashboardCandidate `json:"options" toon:"options"` @@ -2872,7 +2878,7 @@ type DashboardDatasourceVariable struct { Kind string `json:"kind" toon:"kind"` // Optional display label; falls back to `name`. Label string `json:"label,omitempty" toon:"label,omitempty"` - // Variable name used in `{{ }}` templates, at most 64 characters. + // Variable name used in `{{ }}` templates, at most 64 characters. Names starting with `__` are reserved for built-in time variables. Name string `json:"name" toon:"name"` // Wildcard patterns narrowing the candidates; empty means every datasource of the type. NamePatterns []string `json:"name_patterns,omitempty" toon:"name_patterns,omitempty"` @@ -3036,11 +3042,11 @@ type DashboardListRequest struct { // DashboardLogsVariableQuery is generated from the Flashduty OpenAPI schema. type DashboardLogsVariableQuery struct { - // Named query arguments; defaults to an empty object. + // Named query arguments; defaults to an empty object. Must be empty for a Loki datasource. Args map[string]string `json:"args" toon:"args"` - // Logs query expression; may reference other variables through `{{ }}`. + // Logs query expression; may reference other variables through `{{ }}`. May be empty for a Loki datasource, which then lists the field's values across all streams. Expr string `json:"expr" toon:"expr"` - // Log field whose values become candidates. + // Log field whose values become candidates. For a Loki datasource it must be a bare stream label name (letters, digits and underscores). Field string `json:"field" toon:"field"` // Query kind discriminator; always `logs`, a logs query returning one field's values as candidates. Kind string `json:"kind" toon:"kind"` @@ -3291,9 +3297,13 @@ type DashboardPrometheusVariableQuery struct { type DashboardQueriesResolveRequest struct { // Canonical UUIDv7 of the dashboard. DashboardID string `json:"dashboard_id" toon:"dashboard_id"` + // Downsampling target used to compute the step and render the built-in time variables, 2–5000 points; omit or send null for the server default of 100. + MaxDataPoints *int64 `json:"max_data_points,omitempty" toon:"max_data_points,omitempty"` // Panels to resolve, 1–100 unique IDs. A panel that does not exist yields an `error` arm rather than failing the call. - PanelIDs []string `json:"panel_ids" toon:"panel_ids"` - Time DashboardAbsoluteTimeRange `json:"time" toon:"time"` + PanelIDs []string `json:"panel_ids" toon:"panel_ids"` + // Keep built-in time variables verbatim in the resolved expressions so a caller with its own execution window can render them; user variables are still resolved. + PreserveBuiltinVariables bool `json:"preserve_builtin_variables,omitempty" toon:"preserve_builtin_variables,omitempty"` + Time DashboardAbsoluteTimeRange `json:"time" toon:"time"` // Selections keyed by variable name, at most 20 entries. Variables map[string]DashboardSelection `json:"variables" toon:"variables"` } @@ -3331,7 +3341,7 @@ type DashboardQueryVariable struct { Kind string `json:"kind" toon:"kind"` // Optional display label; falls back to `name`. Label string `json:"label,omitempty" toon:"label,omitempty"` - // Variable name used in `{{ }}` templates, at most 64 characters. + // Variable name used in `{{ }}` templates, at most 64 characters. Names starting with `__` are reserved for built-in time variables. Name string `json:"name" toon:"name"` // When the candidates are recomputed: `on_dashboard_load` = once when the dashboard loads; `on_time_range_change` = every time the time range changes. Refresh string `json:"refresh" toon:"refresh"` @@ -3687,7 +3697,7 @@ type DashboardVariable struct { Kind string `json:"kind" toon:"kind"` // Optional display label; falls back to `name`. Label string `json:"label,omitempty" toon:"label,omitempty"` - // Variable name used in `{{ }}` templates, at most 64 characters. + // Variable name used in `{{ }}` templates, at most 64 characters. Names starting with `__` are reserved for built-in time variables. Name string `json:"name" toon:"name"` // Wildcard patterns narrowing the candidates; empty means every datasource of the type. NamePatterns []string `json:"name_patterns,omitempty" toon:"name_patterns,omitempty"` @@ -3701,11 +3711,11 @@ type DashboardVariable struct { // DashboardVariableQuery is generated from the Flashduty OpenAPI schema. type DashboardVariableQuery struct { - // Named query arguments; defaults to an empty object. + // Named query arguments; defaults to an empty object. Must be empty for a Loki datasource. Args map[string]string `json:"args,omitempty" toon:"args,omitempty"` - // Logs query expression; may reference other variables through `{{ }}`. + // Logs query expression; may reference other variables through `{{ }}`. May be empty for a Loki datasource, which then lists the field's values across all streams. Expr string `json:"expr,omitempty" toon:"expr,omitempty"` - // Log field whose values become candidates. + // Log field whose values become candidates. For a Loki datasource it must be a bare stream label name (letters, digits and underscores). Field string `json:"field,omitempty" toon:"field,omitempty"` // Query kind discriminator; always `logs`, a logs query returning one field's values as candidates. Kind string `json:"kind" toon:"kind"` @@ -4723,12 +4733,18 @@ type FeedDetailIncidentWarRoomDelete struct { type FeedDetailWorkItemAssigneesChanged struct { // Member IDs added as assignees. AddedAssigneeIDs []int64 `json:"added_assignee_ids" toon:"added_assignee_ids"` + // Assignees added by this change, in submitted order. `added_assignee_ids` is the person-only subset. Omitted when nothing was added. + AddedAssignees []WorkItemAssignee `json:"added_assignees" toon:"added_assignees"` // Assignee member IDs after the change. AssigneeIDs []int64 `json:"assignee_ids" toon:"assignee_ids"` + // Assignees of the work item. Each entry is `{type, id?}`; an `ai_sre` entry omits `id`. Omitted when there is no assignee. + Assignees []WorkItemAssignee `json:"assignees" toon:"assignees"` // Work item type. `action`: an action item anchored to the incident itself; `follow_up`: an improvement item anchored to a post-mortem. ItemType string `json:"item_type" toon:"item_type"` // Member IDs removed from assignees. RemovedAssigneeIDs []int64 `json:"removed_assignee_ids" toon:"removed_assignee_ids"` + // Assignees removed by this change. `removed_assignee_ids` is the person-only subset. Omitted when nothing was removed. + RemovedAssignees []WorkItemAssignee `json:"removed_assignees" toon:"removed_assignees"` // Work item title. Title string `json:"title" toon:"title"` // Work item ID. @@ -4783,6 +4799,8 @@ type FeedDetailWorkItemConverted struct { type FeedDetailWorkItemCreated struct { // Assignee member IDs. AssigneeIDs []int64 `json:"assignee_ids" toon:"assignee_ids"` + // Assignees of the work item. Each entry is `{type, id?}`; an `ai_sre` entry omits `id`. Omitted when there is no assignee. + Assignees []WorkItemAssignee `json:"assignees" toon:"assignees"` // Work item type. `action`: an action item anchored to the incident itself, convertible to `follow_up` later; `follow_up`: an improvement item anchored to a post-mortem, requiring the incident to be linked to that post-mortem at creation. ItemType string `json:"item_type" toon:"item_type"` // ID of the post-mortem the work item is bound to. @@ -5160,8 +5178,8 @@ type IncidentFeedItem struct { CreatedAt TimestampMilli `json:"created_at" toon:"created_at"` // User ID of the actor. `0` means system-generated. CreatorID int64 `json:"creator_id" toon:"creator_id"` - // Soft-delete timestamp (ms). Zero if not deleted. - DeletedAt Timestamp `json:"deleted_at" toon:"deleted_at"` + // Soft-delete timestamp in milliseconds. Zero if not deleted. + DeletedAt TimestampMilli `json:"deleted_at" toon:"deleted_at"` // Type-specific payload. The concrete shape is determined by `type`; `null` when the entry has no structured detail. Detail any `json:"detail" toon:"detail"` // ObjectID of the source alert or incident this entry references. @@ -5680,48 +5698,94 @@ type InsightTopkAlertByLabelRequest struct { // IntegrationDetail is generated from the Flashduty OpenAPI schema. type IntegrationDetail struct { - Category any `json:"category" toon:"category"` - CreatedAt any `json:"created_at" toon:"created_at"` - Description any `json:"description" toon:"description"` - IntegrationID any `json:"integration_id" toon:"integration_id"` - LastTime any `json:"last_time" toon:"last_time"` - Name any `json:"name" toon:"name"` - PluginType any `json:"plugin_type" toon:"plugin_type"` - PluginTypeName any `json:"plugin_type_name" toon:"plugin_type_name"` - RefID any `json:"ref_id" toon:"ref_id"` - // Type-specific configuration. Sensitive values (endpoint, headers, secrets, passwords) are returned masked as `******`. - Settings map[string]any `json:"settings" toon:"settings"` - Status any `json:"status" toon:"status"` - TeamID any `json:"team_id" toon:"team_id"` - UpdatedAt any `json:"updated_at" toon:"updated_at"` + // Category the integration belongs to: `event.alert` alert events, `event.change` change events, `im` IM bots, `webhook` custom webhooks. + Category string `json:"category" toon:"category"` + // Unix timestamp in seconds when the integration was created. + CreatedAt Timestamp `json:"created_at" toon:"created_at"` + // ID of the member who created the integration. + CreatorID int64 `json:"creator_id" toon:"creator_id"` + // Free-form description. + Description string `json:"description" toon:"description"` + // Whether the current caller passes the integration object-permission check; write calls also require Integrations Manage. + Editable bool `json:"editable" toon:"editable"` + // Integration ID. + IntegrationID int64 `json:"integration_id" toon:"integration_id"` + // Decrypted integration key for inbound pushes. Empty when no key is stored; distinct from the account `app_key`. + IntegrationKey string `json:"integration_key" toon:"integration_key"` + // Unix timestamp in seconds of the most recent event received. `0` when no event has arrived yet. + LastTime Timestamp `json:"last_time" toon:"last_time"` + // Integration name. + Name string `json:"name" toon:"name"` + // Read-only flag. When true, the public APIs do not allow changes to this integration. + NoEditable bool `json:"no_editable" toon:"no_editable"` + // Internal integration type ID; use `plugin_type`, not this ID, when creating an integration. + PluginID int64 `json:"plugin_id" toon:"plugin_id"` + // Integration type, for example `standard.alert` or `zabbix.alert`. + PluginType string `json:"plugin_type" toon:"plugin_type"` + // Display name of the integration type, in the language of the request. + PluginTypeName string `json:"plugin_type_name" toon:"plugin_type_name"` + // Source reference ID, normally `a_` for an account-level integration; legacy `w_` references may also exist. Channel-owned `c_` integrations are excluded. + RefID string `json:"ref_id" toon:"ref_id"` + // Stored type-specific configuration, including credential values without masking; matches the legacy `/datasource/*` response behavior. + Settings map[string]any `json:"settings" toon:"settings"` + // Lifecycle status: `enabled` while the integration accepts events, `disabled` when it is paused. + Status string `json:"status" toon:"status"` + // ID of the team that owns the integration. `0` when it is not assigned to a team. + TeamID int64 `json:"team_id" toon:"team_id"` + // Plugin test result, returned only when a test is performed. + Test *IntegrationDetailTest `json:"test,omitempty" toon:"test,omitempty"` + // Unix timestamp in seconds when the integration was last updated. + UpdatedAt Timestamp `json:"updated_at" toon:"updated_at"` + // ID of the member who last updated the integration. + UpdatedBy int64 `json:"updated_by" toon:"updated_by"` } // IntegrationItem is generated from the Flashduty OpenAPI schema. type IntegrationItem struct { + // ID of the account that owns the integration. + AccountID int64 `json:"account_id" toon:"account_id"` // Category the integration belongs to: `event.alert` alert events, `event.change` change events, `im` IM bots, `webhook` custom webhooks. Category string `json:"category" toon:"category"` // Unix timestamp in seconds when the integration was created. CreatedAt Timestamp `json:"created_at" toon:"created_at"` + // ID of the member who created the integration. + CreatorID int64 `json:"creator_id" toon:"creator_id"` + // Legacy datasource ID, equal to `integration_id`. + DataSourceID int64 `json:"data_source_id" toon:"data_source_id"` // Free-form description. Description string `json:"description" toon:"description"` + // Whether the current caller passes the integration object-permission check; write calls also require Integrations Manage. + Editable bool `json:"editable" toon:"editable"` + // Legacy compatibility field; `0` for items returned by this public-integration list. + ExclusiveDataSourceID int64 `json:"exclusive_data_source_id" toon:"exclusive_data_source_id"` // Integration ID. IntegrationID int64 `json:"integration_id" toon:"integration_id"` + // Decrypted integration key for inbound pushes. Empty when no key is stored; distinct from the account `app_key`. + IntegrationKey string `json:"integration_key" toon:"integration_key"` // Unix timestamp in seconds of the most recent event received. `0` when no event has arrived yet. LastTime Timestamp `json:"last_time" toon:"last_time"` // Integration name. Name string `json:"name" toon:"name"` + // Read-only flag. When true, the public APIs do not allow changes to this integration. + NoEditable bool `json:"no_editable" toon:"no_editable"` + // Internal integration type ID; use `plugin_type`, not this ID, when creating an integration. + PluginID int64 `json:"plugin_id" toon:"plugin_id"` // Integration type, for example `standard.alert` or `zabbix.alert`. PluginType string `json:"plugin_type" toon:"plugin_type"` // Display name of the integration type, in the language of the request. PluginTypeName string `json:"plugin_type_name" toon:"plugin_type_name"` - // Source reference ID: `a_`-prefixed for an account-scoped integration, `c_`-prefixed when it is shared into a channel, `w_`-prefixed on legacy workspace-scoped integrations. + // Source reference ID, normally `a_` for an account-level integration; legacy `w_` references may also exist. Channel-owned `c_` integrations are excluded. RefID string `json:"ref_id" toon:"ref_id"` + // Stored type-specific configuration, including credential values without masking; matches the legacy `/datasource/*` response behavior. + Settings map[string]any `json:"settings" toon:"settings"` // Lifecycle status: `enabled` while the integration accepts events, `disabled` when it is paused. Status string `json:"status" toon:"status"` // ID of the team that owns the integration. `0` when it is not assigned to a team. TeamID int64 `json:"team_id" toon:"team_id"` // Unix timestamp in seconds when the integration was last updated. UpdatedAt Timestamp `json:"updated_at" toon:"updated_at"` + // ID of the member who last updated the integration. + UpdatedBy int64 `json:"updated_by" toon:"updated_by"` } // IntegrationLifecycleRequest is generated from the Flashduty OpenAPI schema. @@ -8215,7 +8279,7 @@ type RoleUpsertResponse struct { // RotateIntegrationKeyResponse is generated from the Flashduty OpenAPI schema. type RotateIntegrationKeyResponse struct { - // The new key. The previous key stops working immediately; this value cannot be read again later. + // New integration key; the previous key stops working immediately. Also readable from `/integration/list` and `/integration/info`. IntegrationKey string `json:"integration_key" toon:"integration_key"` } @@ -11548,9 +11612,11 @@ type UpdateIntegrationRequest struct { Description *string `json:"description,omitempty" toon:"description,omitempty"` // Integration ID. IntegrationID int64 `json:"integration_id" toon:"integration_id"` + // Run the plugin test when submitting `settings`; no test is performed for a metadata-only update. + IsTest bool `json:"is_test,omitempty" toon:"is_test,omitempty"` // New name, 2–49 characters. Name *string `json:"name,omitempty" toon:"name,omitempty"` - // Replacement configuration for the integration type. Sensitive entries left out, or sent back as the masked `******`, keep their stored value. + // Replacement type-specific configuration. Known sensitive fields omitted or sent as `******` keep their stored value; an explicit empty headers object clears headers. Settings map[string]any `json:"settings,omitempty" toon:"settings,omitempty"` // New owning team ID; `0` clears the team assignment. TeamID *int64 `json:"team_id,omitempty" toon:"team_id,omitempty"` @@ -12243,6 +12309,14 @@ type CreateInhibitRuleRequestTargetFiltersItemItem struct { Vals []string `json:"vals" toon:"vals"` } +// CreateIntegrationResponseTest is generated from the Flashduty OpenAPI schema. +type CreateIntegrationResponseTest struct { + // Test failure message; empty on success. + Message string `json:"message" toon:"message"` + // Whether the plugin test succeeded. + Success bool `json:"success" toon:"success"` +} + // CreateSilenceRuleRequestFiltersItemItem is generated from the Flashduty OpenAPI schema. type CreateSilenceRuleRequestFiltersItemItem struct { // Field key (e.g. `alert_severity`, `labels.service`). @@ -12390,6 +12464,14 @@ type IncidentRawItemRespondersItem struct { PersonName string `json:"person_name" toon:"person_name"` } +// IntegrationDetailTest is generated from the Flashduty OpenAPI schema. +type IntegrationDetailTest struct { + // Test failure message; empty on success. + Message string `json:"message" toon:"message"` + // Whether the plugin test succeeded. + Success bool `json:"success" toon:"success"` +} + // PostMortemItemBasics is generated from the Flashduty OpenAPI schema. type PostMortemItemBasics struct { // Earliest start time among linked incidents (seconds). diff --git a/openapi/openapi.en.json b/openapi/openapi.en.json index bab6114..1a797fb 100644 --- a/openapi/openapi.en.json +++ b/openapi/openapi.en.json @@ -850,7 +850,7 @@ "type": "object" }, "AlertEventGlobalListRequest": { - "description": "Filter and pagination criteria for the global raw event list.", + "description": "Filter and pagination criteria for the global raw event list. Time range is required.", "properties": { "asc": { "description": "Sort ascending when `true`.", @@ -866,12 +866,9 @@ "type": "array" }, "end_time": { - "description": "End of the search window, Unix epoch seconds. Must be greater than `start_time` when provided.", + "description": "End of the search window, Unix epoch seconds. Must be greater than `start_time`; the span must not exceed 31 days.", "format": "int64", - "type": [ - "integer", - "null" - ] + "type": "integer" }, "integration_ids": { "description": "Filter by integration IDs.", @@ -926,15 +923,16 @@ "type": "string" }, "start_time": { - "description": "Start of the search window, Unix epoch seconds. Must be greater than 0 when provided.", + "description": "Start of the search window, Unix epoch seconds. Must be greater than 0.", "exclusiveMinimum": 0, "format": "int64", - "type": [ - "integer", - "null" - ] + "type": "integer" } }, + "required": [ + "start_time", + "end_time" + ], "type": "object" }, "AlertEventGlobalListResponse": { @@ -10231,6 +10229,13 @@ }, "type": "array" }, + "added_assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "Assignees added by this change, in submitted order. `added_assignee_ids` is the person-only subset. Omitted when nothing was added." + }, "assignee_ids": { "description": "Assignee member IDs after the change.", "items": { @@ -10239,6 +10244,13 @@ }, "type": "array" }, + "assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "Assignees of the work item. Each entry is `{type, id?}`; an `ai_sre` entry omits `id`. Omitted when there is no assignee." + }, "item_type": { "description": "Work item type. `action`: an action item anchored to the incident itself; `follow_up`: an improvement item anchored to a post-mortem.", "enum": [ @@ -10255,6 +10267,13 @@ }, "type": "array" }, + "removed_assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "Assignees removed by this change. `removed_assignee_ids` is the person-only subset. Omitted when nothing was removed." + }, "title": { "description": "Work item title.", "type": "string" @@ -10379,6 +10398,13 @@ }, "type": "array" }, + "assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "Assignees of the work item. Each entry is `{type, id?}`; an `ai_sre` entry omits `id`. Omitted when there is no assignee." + }, "item_type": { "description": "Work item type. `action`: an action item anchored to the incident itself, convertible to `follow_up` later; `follow_up`: an improvement item anchored to a post-mortem, requiring the incident to be linked to that post-mortem at creation.", "enum": [ @@ -11387,7 +11413,7 @@ "type": "integer" }, "deleted_at": { - "description": "Soft-delete timestamp (ms). Zero if not deleted.", + "description": "Soft-delete timestamp in milliseconds. Zero if not deleted.", "format": "int64", "type": "integer" }, @@ -29811,7 +29837,7 @@ "name": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$", - "description": "Variable name used in `{{ }}` templates, at most 64 characters." + "description": "Variable name used in `{{ }}` templates, at most 64 characters. Names starting with `__` are reserved for built-in time variables." }, "label": { "type": "string", @@ -29859,7 +29885,7 @@ "name": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$", - "description": "Variable name used in `{{ }}` templates, at most 64 characters." + "description": "Variable name used in `{{ }}` templates, at most 64 characters. Names starting with `__` are reserved for built-in time variables." }, "label": { "type": "string", @@ -29903,7 +29929,7 @@ "name": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$", - "description": "Variable name used in `{{ }}` templates, at most 64 characters." + "description": "Variable name used in `{{ }}` templates, at most 64 characters. Names starting with `__` are reserved for built-in time variables." }, "label": { "type": "string", @@ -30149,19 +30175,19 @@ }, "expr": { "type": "string", - "description": "Logs query expression; may reference other variables through `{{ }}`." + "description": "Logs query expression; may reference other variables through `{{ }}`. May be empty for a Loki datasource, which then lists the field's values across all streams." }, "args": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "Named query arguments; defaults to an empty object." + "description": "Named query arguments; defaults to an empty object. Must be empty for a Loki datasource." }, "field": { "type": "string", "minLength": 1, - "description": "Log field whose values become candidates." + "description": "Log field whose values become candidates. For a Loki datasource it must be a bare stream label name (letters, digits and underscores)." } }, "required": [ @@ -32021,6 +32047,19 @@ "$ref": "#/components/schemas/DashboardSelection" }, "description": "Selections keyed by variable name, at most 20 entries." + }, + "max_data_points": { + "type": [ + "integer", + "null" + ], + "minimum": 2, + "maximum": 5000, + "description": "Downsampling target used to compute the step and render the built-in time variables, 2–5000 points; omit or send null for the server default of 100." + }, + "preserve_builtin_variables": { + "type": "boolean", + "description": "Keep built-in time variables verbatim in the resolved expressions so a caller with its own execution window can render them; user variables are still resolved." } }, "required": [ @@ -32702,7 +32741,7 @@ }, "IntegrationItem": { "type": "object", - "description": "A configured integration. Timestamps are Unix epoch seconds.", + "description": "Public integration list item with full stored configuration. Timestamps are Unix epoch seconds.", "required": [ "integration_id", "team_id", @@ -32715,7 +32754,17 @@ "ref_id", "created_at", "updated_at", - "last_time" + "last_time", + "editable", + "creator_id", + "updated_by", + "no_editable", + "plugin_id", + "integration_key", + "settings", + "data_source_id", + "account_id", + "exclusive_data_source_id" ], "properties": { "integration_id": { @@ -32764,7 +32813,7 @@ }, "ref_id": { "type": "string", - "description": "Source reference ID: `a_`-prefixed for an account-scoped integration, `c_`-prefixed when it is shared into a channel, `w_`-prefixed on legacy workspace-scoped integrations." + "description": "Source reference ID, normally `a_` for an account-level integration; legacy `w_` references may also exist. Channel-owned `c_` integrations are excluded." }, "created_at": { "type": "integer", @@ -32780,6 +32829,53 @@ "type": "integer", "format": "int64", "description": "Unix timestamp in seconds of the most recent event received. `0` when no event has arrived yet." + }, + "editable": { + "type": "boolean", + "description": "Whether the current caller passes the integration object-permission check; write calls also require Integrations Manage." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "ID of the member who created the integration." + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "ID of the member who last updated the integration." + }, + "no_editable": { + "type": "boolean", + "description": "Read-only flag. When true, the public APIs do not allow changes to this integration." + }, + "plugin_id": { + "type": "integer", + "format": "int64", + "description": "Internal integration type ID; use `plugin_type`, not this ID, when creating an integration." + }, + "integration_key": { + "type": "string", + "description": "Decrypted integration key for inbound pushes. Empty when no key is stored; distinct from the account `app_key`." + }, + "settings": { + "type": "object", + "additionalProperties": true, + "description": "Stored type-specific configuration, including credential values without masking; matches the legacy `/datasource/*` response behavior." + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "Legacy datasource ID, equal to `integration_id`." + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "ID of the account that owns the integration." + }, + "exclusive_data_source_id": { + "type": "integer", + "format": "int64", + "description": "Legacy compatibility field; `0` for items returned by this public-integration list." } } }, @@ -32833,7 +32929,7 @@ }, "IntegrationDetail": { "type": "object", - "description": "A single integration with its full settings. Timestamps are Unix epoch seconds.", + "description": "Public integration detail with stored settings and its decrypted key. Timestamps are Unix epoch seconds.", "required": [ "integration_id", "team_id", @@ -32847,112 +32943,128 @@ "created_at", "updated_at", "last_time", + "editable", + "creator_id", + "updated_by", + "no_editable", + "plugin_id", + "integration_key", "settings" ], "properties": { - "integration_id": [ - { - "type": "integer", - "format": "int64", - "description": "Integration ID." - }, - true - ], - "team_id": [ - { - "type": "integer", - "format": "int64", - "description": "ID of the team that owns the integration. `0` when it is not assigned to a team." - }, - true - ], - "plugin_type": [ - { - "type": "string", - "description": "Integration type, for example `standard.alert` or `zabbix.alert`." - }, - true - ], - "plugin_type_name": [ - { - "type": "string", - "description": "Display name of the integration type, in the language of the request." - }, - true - ], - "category": [ - { - "type": "string", - "enum": [ - "event.alert", - "event.change", - "im", - "webhook" - ], - "description": "Category the integration belongs to." - }, - true - ], - "name": [ - { - "type": "string", - "description": "Integration name." - }, - true - ], - "description": [ - { - "type": "string", - "description": "Free-form description." - }, - true - ], - "status": [ - { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "description": "Lifecycle status: `enabled` while the integration accepts events, `disabled` when it is paused." - }, - true - ], - "ref_id": [ - { - "type": "string", - "description": "Source reference ID: `a_`-prefixed for an account-scoped integration, `c_`-prefixed when it is shared into a channel." - }, - true - ], - "created_at": [ - { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in seconds when the integration was created." - }, - true - ], - "updated_at": [ - { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in seconds when the integration was last updated." - }, - true - ], - "last_time": [ - { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in seconds of the most recent event received. `0` when no event has arrived yet." - }, - true - ], + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "ID of the team that owns the integration. `0` when it is not assigned to a team." + }, + "plugin_type": { + "type": "string", + "description": "Integration type, for example `standard.alert` or `zabbix.alert`." + }, + "plugin_type_name": { + "type": "string", + "description": "Display name of the integration type, in the language of the request." + }, + "category": { + "type": "string", + "enum": [ + "event.alert", + "event.change", + "im", + "webhook" + ], + "description": "Category the integration belongs to: `event.alert` alert events, `event.change` change events, `im` IM bots, `webhook` custom webhooks." + }, + "name": { + "type": "string", + "description": "Integration name." + }, + "description": { + "type": "string", + "description": "Free-form description." + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "Lifecycle status: `enabled` while the integration accepts events, `disabled` when it is paused." + }, + "ref_id": { + "type": "string", + "description": "Source reference ID, normally `a_` for an account-level integration; legacy `w_` references may also exist. Channel-owned `c_` integrations are excluded." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds when the integration was created." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds when the integration was last updated." + }, + "last_time": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds of the most recent event received. `0` when no event has arrived yet." + }, + "editable": { + "type": "boolean", + "description": "Whether the current caller passes the integration object-permission check; write calls also require Integrations Manage." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "ID of the member who created the integration." + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "ID of the member who last updated the integration." + }, + "no_editable": { + "type": "boolean", + "description": "Read-only flag. When true, the public APIs do not allow changes to this integration." + }, + "plugin_id": { + "type": "integer", + "format": "int64", + "description": "Internal integration type ID; use `plugin_type`, not this ID, when creating an integration." + }, + "integration_key": { + "type": "string", + "description": "Decrypted integration key for inbound pushes. Empty when no key is stored; distinct from the account `app_key`." + }, "settings": { "type": "object", "additionalProperties": true, - "description": "Type-specific configuration. Sensitive values (endpoint, headers, secrets, passwords) are returned masked as `******`." + "description": "Stored type-specific configuration, including credential values without masking; matches the legacy `/datasource/*` response behavior." + }, + "test": { + "type": "object", + "description": "Plugin test result, returned only when a test is performed.", + "x-flashduty-preserve-absence": true, + "required": [ + "success", + "message" + ], + "properties": { + "success": { + "type": "boolean", + "description": "Whether the plugin test succeeded." + }, + "message": { + "type": "string", + "description": "Test failure message; empty on success." + } + } } } }, @@ -32972,7 +33084,7 @@ "type": "string", "minLength": 2, "maxLength": 49, - "description": "Integration name. 2–49 characters.", + "description": "Integration name, 2–49 characters when nonempty; defaults to the integration type name when omitted or empty.", "example": "Prod metrics alerts" }, "description": { @@ -32983,14 +33095,24 @@ "team_id": { "type": "integer", "format": "int64", - "minimum": 1, - "description": "Owning team ID.", + "minimum": 0, + "description": "Owning team ID; omit or use `0` for no team. A nonzero ID must belong to the current account.", "example": 1467226103121 }, "settings": { "type": "object", "description": "Type-specific configuration; the accepted keys depend on `plugin_type`.", "additionalProperties": true + }, + "integration_key": { + "type": "string", + "minLength": 35, + "maxLength": 35, + "description": "Optional pre-generated key: 35 characters, ending with the account ID modulo 1000 padded to three digits; it must not already be in use. Omit to generate a key." + }, + "is_test": { + "type": "boolean", + "description": "Run the plugin test during creation; false when omitted. Inspect the returned `test.success` for the test outcome." } } }, @@ -33010,8 +33132,27 @@ }, "integration_key": { "type": "string", - "description": "Key used to authenticate inbound pushes to this integration. Returned here only; fetch a new one with `POST /integration/key/rotate`.", - "example": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" + "description": "Integration key for inbound pushes; also readable from `/integration/list` and `/integration/info`.", + "example": "0123456789abcdef0123456789abcdef100" + }, + "test": { + "type": "object", + "description": "Plugin test result, returned only when a test is performed.", + "x-flashduty-preserve-absence": true, + "required": [ + "success", + "message" + ], + "properties": { + "success": { + "type": "boolean", + "description": "Whether the plugin test succeeded." + }, + "message": { + "type": "string", + "description": "Test failure message; empty on success." + } + } } } }, @@ -33056,12 +33197,13 @@ "description": "New owning team ID; `0` clears the team assignment." }, "settings": { - "type": [ - "object", - "null" - ], - "description": "Replacement configuration for the integration type. Sensitive entries left out, or sent back as the masked `******`, keep their stored value.", + "type": "object", + "description": "Replacement type-specific configuration. Known sensitive fields omitted or sent as `******` keep their stored value; an explicit empty headers object clears headers.", "additionalProperties": true + }, + "is_test": { + "type": "boolean", + "description": "Run the plugin test when submitting `settings`; no test is performed for a metadata-only update." } } }, @@ -33090,8 +33232,8 @@ "properties": { "integration_key": { "type": "string", - "description": "The new key. The previous key stops working immediately; this value cannot be read again later.", - "example": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" + "description": "New integration key; the previous key stops working immediately. Also readable from `/integration/list` and `/integration/info`.", + "example": "0123456789abcdef0123456789abcdef100" } } } @@ -33289,7 +33431,7 @@ "On-call/Alerts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Results are filtered by the caller's channel data-access permissions.\n- `severities` is a comma-separated string, e.g. `\"Critical,Warning\"`.", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Both `start_time` and `end_time` are required Unix epoch seconds. `start_time` must be less than `end_time`; the span must not exceed 31 days.\n- Results are filtered by the caller's channel data-access permissions.\n- `severities` is a comma-separated string, e.g. `\"Critical,Warning\"`.", "href": "/en/api-reference/on-call/alerts/alert-event-read-list", "metadata": { "sidebarTitle": "List raw alert events" @@ -67104,12 +67246,12 @@ "post": { "operationId": "integration-api-read-list", "summary": "List integrations", - "description": "List the account's alert-source and change-source integrations.", + "description": "List public integrations with their stored settings, decrypted keys, and edit permissions.", "tags": [ "On-call/Integrations" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |\n\n## Usage\n\n- `orderby` defaults to `created_at`; `plugin_type` is sorted by the underlying plugin.\n- `plugin_type`, `status` and `category` accept comma-separated values; `ref_ids` values must start with `c_`, `a_` or `w_`.\n- With `is_my_team` set, results are limited to your teams and `team_ids` narrows that set further.", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |\n\n## Usage\n\n- `orderby` defaults to `created_at`; `plugin_type` is sorted by the underlying plugin.\n- `plugin_type`, `status` and `category` accept comma-separated values; `ref_ids` values must start with `c_`, `a_` or `w_`; a `c_` filter is syntactically accepted but does not return channel-owned integrations.\n- With `is_my_team` set, results are limited to your teams and `team_ids` narrows that set further.\n- These APIs manage public (account-level) integrations only, not channel-owned dedicated integrations.\n- Items include `settings`, `integration_key`, `plugin_id`, `account_id`, and the legacy `data_source_id` alias; credential values are not masked.", "href": "/en/api-reference/on-call/integrations/integration-api-read-list", "metadata": { "sidebarTitle": "List integrations" @@ -67151,10 +67293,23 @@ "name": "Prod metrics alerts", "description": "Alerts pushed by the production Prometheus stack", "status": "enabled", - "ref_id": "a_6612f0c9e1b7a4d3508f2c6b", + "ref_id": "a_100", "created_at": 1775116800, "updated_at": 1775203200, - "last_time": 1775298600 + "last_time": 1775298600, + "editable": true, + "creator_id": 1467226103999, + "updated_by": 1467226103999, + "no_editable": false, + "plugin_id": 9, + "integration_key": "0123456789abcdef0123456789abcdef100", + "settings": { + "field_mapping": {}, + "value_mapping": {} + }, + "data_source_id": 6113996590131, + "account_id": 100, + "exclusive_data_source_id": 0 } ] } @@ -67196,12 +67351,12 @@ "post": { "operationId": "integration-api-read-info", "summary": "Get integration detail", - "description": "Return one integration, including its settings with sensitive values masked.", + "description": "Get a public integration with its stored settings and decrypted integration key.", "tags": [ "On-call/Integrations" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |\n\n## Usage\n\n- Sensitive settings (endpoint, headers, secrets, passwords) come back masked as `******`.", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |\n\n## Usage\n\n- These APIs manage public (account-level) integrations only, not channel-owned dedicated integrations.\n- Settings and the integration key are returned without masking, matching the legacy datasource detail response.", "href": "/en/api-reference/on-call/integrations/integration-api-read-info", "metadata": { "sidebarTitle": "Get integration detail" @@ -67238,20 +67393,20 @@ "name": "Prod metrics alerts", "description": "Alerts pushed by the production Prometheus stack", "status": "enabled", - "ref_id": "a_6612f0c9e1b7a4d3508f2c6b", + "ref_id": "a_100", "created_at": 1775116800, "updated_at": 1775203200, "last_time": 1775298600, "settings": { - "severity_mapping": [ - { - "P1": "Critical" - } - ], - "labels": { - "source": "prometheus" - } - } + "field_mapping": {}, + "value_mapping": {} + }, + "editable": true, + "creator_id": 1467226103999, + "updated_by": 1467226103999, + "no_editable": false, + "plugin_id": 9, + "integration_key": "0123456789abcdef0123456789abcdef100" } } } @@ -67289,12 +67444,12 @@ "post": { "operationId": "integration-api-write-create", "summary": "Create integration", - "description": "Create an integration for an alert source or change source.", + "description": "Create a public integration for a supported alert, change, IM, or webhook type.", "tags": [ "On-call/Integrations" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- `plugin_type` must be one of the types listed by `POST /integration/type/list` with `supports_api_create: true`; anything else returns `InvalidParameter`.\n- `integration_key` is returned once. Store it at creation time — it is not part of `POST /integration/info`.\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 | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- `plugin_type` must be one of the types listed by `POST /integration/type/list` with `supports_api_create: true`; anything else returns `InvalidParameter`.\n- These APIs manage public (account-level) integrations only, not channel-owned dedicated integrations.\n- An omitted `integration_key` is generated automatically; a supplied key must satisfy the length, account suffix, and uniqueness checks.\n- With `is_test: true`, inspect `test.success`; an HTTP 200 response alone does not establish that the plugin test succeeded.\n- Every call is recorded in the account audit log.", "href": "/en/api-reference/on-call/integrations/integration-api-write-create", "metadata": { "sidebarTitle": "Create integration" @@ -67324,7 +67479,11 @@ "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { "integration_id": 6113996590131, - "integration_key": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" + "integration_key": "0123456789abcdef0123456789abcdef100", + "test": { + "success": true, + "message": "" + } } } } @@ -67356,12 +67515,10 @@ "description": "Alerts pushed by the production Prometheus stack", "team_id": 1467226103121, "settings": { - "severity_mapping": [ - { - "P1": "Critical" - } - ] - } + "field_mapping": {}, + "value_mapping": {} + }, + "is_test": true } } } @@ -67377,7 +67534,7 @@ "On-call/Integrations" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Only the fields you send are changed; omitted fields keep their current value.\n- `settings` replaces the stored configuration. Sensitive entries left out, or sent back as the masked `******`, keep their stored value.\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 | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Only the fields you send are changed; omitted fields keep their current value.\n- Submitting `settings` replaces the configuration; known sensitive fields omitted or sent as `******` retain their value. Send `headers: {}` to clear headers; use the integration type’s explicit empty value to clear a body.\n- Submit `settings` together with `is_test: true` to receive a plugin test result; settings in the response are not masked.\n- These APIs manage public (account-level) integrations only, not channel-owned dedicated integrations.\n- Write access also requires object permission: the account owner, an administrator, the creator, or a member of the assigned team; with no team, members with Integrations Manage may operate. Read-only integrations cannot be changed.\n- Every call is recorded in the account audit log.", "href": "/en/api-reference/on-call/integrations/integration-api-write-update", "metadata": { "sidebarTitle": "Update integration" @@ -67414,19 +67571,23 @@ "name": "Prod metrics alerts (primary)", "description": "Alerts pushed by the production Prometheus stack", "status": "enabled", - "ref_id": "a_6612f0c9e1b7a4d3508f2c6b", + "ref_id": "a_100", "created_at": 1775116800, "updated_at": 1775298600, "last_time": 1775298600, "settings": { - "severity_mapping": [ - { - "P1": "Critical" - } - ], - "labels": { - "source": "prometheus" - } + "field_mapping": {}, + "value_mapping": {} + }, + "editable": true, + "creator_id": 1467226103999, + "updated_by": 1467226103999, + "no_editable": false, + "plugin_id": 9, + "integration_key": "0123456789abcdef0123456789abcdef100", + "test": { + "success": true, + "message": "" } } } @@ -67456,7 +67617,12 @@ "example": { "integration_id": 6113996590131, "name": "Prod metrics alerts (primary)", - "team_id": 1467226103121 + "team_id": 1467226103121, + "settings": { + "field_mapping": {}, + "value_mapping": {} + }, + "is_test": true } } } @@ -67472,7 +67638,7 @@ "On-call/Integrations" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Deleting an integration that other objects still reference returns HTTP 400 with `error.code` = `ReferenceExist` and `data.refs` listing them.\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 | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Deleting an integration that other objects still reference returns HTTP 400 with `error.code` = `ReferenceExist` and `data.refs` listing them.\n- Every call is recorded in the account audit log.\n- These APIs manage public (account-level) integrations only, not channel-owned dedicated integrations.\n- Write access also requires object permission: the account owner, an administrator, the creator, or a member of the assigned team; with no team, members with Integrations Manage may operate. Read-only integrations cannot be changed.", "href": "/en/api-reference/on-call/integrations/integration-api-write-delete", "metadata": { "sidebarTitle": "Delete integration" @@ -67542,7 +67708,7 @@ "On-call/Integrations" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Enabling an integration resumes its scheduled pull task and heartbeat, and requires the integration type to be available on the current plan.\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 | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Enabling an integration resumes its scheduled pull task and heartbeat, and requires the integration type to be available on the current plan.\n- Every call is recorded in the account audit log.\n- These APIs manage public (account-level) integrations only, not channel-owned dedicated integrations.\n- Write access also requires object permission: the account owner, an administrator, the creator, or a member of the assigned team; with no team, members with Integrations Manage may operate. Read-only integrations cannot be changed.", "href": "/en/api-reference/on-call/integrations/integration-api-write-enable", "metadata": { "sidebarTitle": "Enable integration" @@ -67612,7 +67778,7 @@ "On-call/Integrations" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Disabling stops event ingestion and pauses the scheduled pull task; settings are kept so the integration can be enabled again.\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 | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Disabling stops event ingestion and pauses the scheduled pull task; settings are kept so the integration can be enabled again.\n- Every call is recorded in the account audit log.\n- These APIs manage public (account-level) integrations only, not channel-owned dedicated integrations.\n- Write access also requires object permission: the account owner, an administrator, the creator, or a member of the assigned team; with no team, members with Integrations Manage may operate. Read-only integrations cannot be changed.", "href": "/en/api-reference/on-call/integrations/integration-api-write-disable", "metadata": { "sidebarTitle": "Disable integration" @@ -67682,7 +67848,7 @@ "On-call/Integrations" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- The previous key stops working immediately, so update the pushing side before rotating.\n- The new key is returned once and cannot be read again later.\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 | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- The previous key stops working immediately; after rotation, update the pushing side with the new key.\n- The new key can also be read from `/integration/list` and `/integration/info`.\n- These APIs manage public (account-level) integrations only, not channel-owned dedicated integrations.\n- Write access also requires object permission: the account owner, an administrator, the creator, or a member of the assigned team; with no team, members with Integrations Manage may operate. Read-only integrations cannot be changed.\n- Every call is recorded in the account audit log.", "href": "/en/api-reference/on-call/integrations/integration-api-write-rotate-key", "metadata": { "sidebarTitle": "Rotate integration key" @@ -67711,7 +67877,7 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "integration_key": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" + "integration_key": "0123456789abcdef0123456789abcdef100" } } } diff --git a/openapi/openapi.zh.json b/openapi/openapi.zh.json index bbbf579..30821d0 100644 --- a/openapi/openapi.zh.json +++ b/openapi/openapi.zh.json @@ -850,7 +850,7 @@ "type": "object" }, "AlertEventGlobalListRequest": { - "description": "全局原始事件列表的过滤和分页条件。", + "description": "全局原始事件列表的过滤和分页条件,时间范围必填。", "properties": { "asc": { "description": "为 true 时升序排序。", @@ -866,12 +866,9 @@ "type": "array" }, "end_time": { - "description": "查询窗口终点,Unix 时间戳(秒)。提供时必须大于 `start_time`。", + "description": "查询窗口终点,Unix 时间戳(秒)。必须大于 `start_time`;跨度不超过 31 天。", "format": "int64", - "type": [ - "integer", - "null" - ] + "type": "integer" }, "integration_ids": { "description": "按集成 ID 过滤。", @@ -926,15 +923,16 @@ "type": "string" }, "start_time": { - "description": "查询窗口起点,Unix 时间戳(秒)。提供时必须大于 0。", + "description": "查询窗口起点,Unix 时间戳(秒)。必须大于 0。", "exclusiveMinimum": 0, "format": "int64", - "type": [ - "integer", - "null" - ] + "type": "integer" } }, + "required": [ + "start_time", + "end_time" + ], "type": "object" }, "AlertEventGlobalListResponse": { @@ -10231,6 +10229,13 @@ }, "type": "array" }, + "added_assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "本次新增的负责人,按提交顺序。`added_assignee_ids` 是其中仅含 `person` 的子集。无新增时省略。" + }, "assignee_ids": { "description": "变更后的负责人成员 ID 列表。", "items": { @@ -10239,6 +10244,13 @@ }, "type": "array" }, + "assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "跟进事项的负责人。每项为 `{type, id?}`;`ai_sre` 不带 `id`。无负责人时省略。" + }, "item_type": { "description": "跟进事项类型。`action`:挂在故障上的处置行动事项;`follow_up`:挂在故障复盘(Post-mortem)上的改进事项。", "enum": [ @@ -10255,6 +10267,13 @@ }, "type": "array" }, + "removed_assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "本次移除的负责人。`removed_assignee_ids` 是其中仅含 `person` 的子集。无移除时省略。" + }, "title": { "description": "跟进事项标题。", "type": "string" @@ -10379,6 +10398,13 @@ }, "type": "array" }, + "assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "跟进事项的负责人。每项为 `{type, id?}`;`ai_sre` 不带 `id`。无负责人时省略。" + }, "item_type": { "description": "跟进事项类型。`action`:挂在故障上的处置行动事项,可直接转换为 `follow_up`;`follow_up`:挂在故障复盘(Post-mortem)上的改进事项,创建时要求故障已关联到该复盘。", "enum": [ @@ -18385,7 +18411,7 @@ "type": "object" }, "ResponseEnvelope": { - "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.", + "description": "所有 Flashduty 公开 API 共用的标准响应结构。成功时 `data` 为接口专属载荷且不含 `error`;失败时 `error` 存在而 `data` 缺失。`request_id` 始终存在,并会同步写入 `Flashcat-Request-Id` 响应头。", "properties": { "data": { "description": "端点专属数据负载,具体结构见各操作 200 响应中的 schema。" @@ -29811,7 +29837,7 @@ "name": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$", - "description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。" + "description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。以 `__` 开头的名称保留给内置时间变量。" }, "label": { "type": "string", @@ -29859,7 +29885,7 @@ "name": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$", - "description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。" + "description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。以 `__` 开头的名称保留给内置时间变量。" }, "label": { "type": "string", @@ -29903,7 +29929,7 @@ "name": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$", - "description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。" + "description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。以 `__` 开头的名称保留给内置时间变量。" }, "label": { "type": "string", @@ -30149,19 +30175,19 @@ }, "expr": { "type": "string", - "description": "日志查询表达式;可通过 `{{ }}` 引用其他变量。" + "description": "日志查询表达式;可通过 `{{ }}` 引用其他变量。数据源为 Loki 时可为空,此时会列出该字段在所有流中的取值。" }, "args": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "具名查询参数;默认为空对象。" + "description": "具名查询参数;默认为空对象。数据源为 Loki 时必须为空。" }, "field": { "type": "string", "minLength": 1, - "description": "取值作为候选项的日志字段。" + "description": "取值作为候选项的日志字段。数据源为 Loki 时必须是不带修饰的流标签名(字母、数字和下划线)。" } }, "required": [ @@ -32021,6 +32047,19 @@ "$ref": "#/components/schemas/DashboardSelection" }, "description": "按变量名索引的选择,最多 20 项。" + }, + "max_data_points": { + "type": [ + "integer", + "null" + ], + "minimum": 2, + "maximum": 5000, + "description": "用于计算 step 并渲染内置时间变量的降采样目标,2~5000 个点;省略或传 null 时服务端默认 100。" + }, + "preserve_builtin_variables": { + "type": "boolean", + "description": "在解析结果中逐字保留内置时间变量,供调用方按自己的执行窗口渲染;用户变量照常解析。" } }, "required": [ @@ -32702,7 +32741,7 @@ }, "IntegrationItem": { "type": "object", - "description": "已配置的集成;时间字段为 Unix 时间戳(秒)。", + "description": "公共集成列表项,包含完整存储配置;时间字段为 Unix 时间戳(秒)。", "required": [ "integration_id", "team_id", @@ -32715,7 +32754,17 @@ "ref_id", "created_at", "updated_at", - "last_time" + "last_time", + "editable", + "creator_id", + "updated_by", + "no_editable", + "plugin_id", + "integration_key", + "settings", + "data_source_id", + "account_id", + "exclusive_data_source_id" ], "properties": { "integration_id": { @@ -32764,7 +32813,7 @@ }, "ref_id": { "type": "string", - "description": "来源引用 ID:`a_` 开头表示账户级集成,集成被共享到协作空间时为 `c_` 开头,旧版工作空间级集成为 `w_` 开头。" + "description": "来源引用 ID,账户级集成通常为 `a_`,旧记录也可能使用 `w_`;本接口不返回 `c_` 开头的专属集成。" }, "created_at": { "type": "integer", @@ -32780,6 +32829,53 @@ "type": "integer", "format": "int64", "description": "最近收到事件时间的 Unix 时间戳(秒),尚未收到事件时为 `0`。" + }, + "editable": { + "type": "boolean", + "description": "当前调用者是否通过集成对象权限校验;执行写操作还需集成中心管理权限。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "创建集成的成员 ID。" + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "最近更新集成的成员 ID。" + }, + "no_editable": { + "type": "boolean", + "description": "只读标记;为 true 时公开接口不允许修改该集成。" + }, + "plugin_id": { + "type": "integer", + "format": "int64", + "description": "集成类型的内部 ID;创建集成使用 `plugin_type`,不使用此 ID。" + }, + "integration_key": { + "type": "string", + "description": "解密后的集成 Key,用于事件推送;未存储 Key 时为空字符串,与账户 `app_key` 不同。" + }, + "settings": { + "type": "object", + "additionalProperties": true, + "description": "按存储值返回的类型专属配置,凭据不打码,与旧 `/datasource/*` 返回行为一致。" + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "旧 datasource ID,与 `integration_id` 相同。" + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "集成所属账户 ID。" + }, + "exclusive_data_source_id": { + "type": "integer", + "format": "int64", + "description": "旧接口兼容字段;此公共集成列表返回的值为 `0`。" } } }, @@ -32833,7 +32929,7 @@ }, "IntegrationDetail": { "type": "object", - "description": "单个集成详情,含完整配置;时间字段为 Unix 时间戳(秒)。", + "description": "公共集成详情,包含存储配置与解密 Key;时间字段为 Unix 时间戳(秒)。", "required": [ "integration_id", "team_id", @@ -32847,112 +32943,128 @@ "created_at", "updated_at", "last_time", + "editable", + "creator_id", + "updated_by", + "no_editable", + "plugin_id", + "integration_key", "settings" ], "properties": { - "integration_id": [ - { - "type": "integer", - "format": "int64", - "description": "集成 ID。" - }, - true - ], - "team_id": [ - { - "type": "integer", - "format": "int64", - "description": "所属团队 ID;未归属团队时为 `0`。" - }, - true - ], - "plugin_type": [ - { - "type": "string", - "description": "集成类型,例如 `standard.alert`、`zabbix.alert`。" - }, - true - ], - "plugin_type_name": [ - { - "type": "string", - "description": "集成类型显示名,随请求语言变化。" - }, - true - ], - "category": [ - { - "type": "string", - "enum": [ - "event.alert", - "event.change", - "im", - "webhook" - ], - "description": "集成所属分类。" - }, - true - ], - "name": [ - { - "type": "string", - "description": "集成名称。" - }, - true - ], - "description": [ - { - "type": "string", - "description": "集成描述。" - }, - true - ], - "status": [ - { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "description": "状态:`enabled` 正常接收事件,`disabled` 已暂停。" - }, - true - ], - "ref_id": [ - { - "type": "string", - "description": "来源引用 ID:`a_` 开头表示账户级集成,集成被共享到协作空间时为 `c_` 开头。" - }, - true - ], - "created_at": [ - { - "type": "integer", - "format": "int64", - "description": "创建时间的 Unix 时间戳(秒)。" - }, - true - ], - "updated_at": [ - { - "type": "integer", - "format": "int64", - "description": "最近更新时间的 Unix 时间戳(秒)。" - }, - true - ], - "last_time": [ - { - "type": "integer", - "format": "int64", - "description": "最近收到事件时间的 Unix 时间戳(秒),尚未收到事件时为 `0`。" - }, - true - ], + "integration_id": { + "type": "integer", + "format": "int64", + "description": "集成 ID。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID;未归属团队时为 `0`。" + }, + "plugin_type": { + "type": "string", + "description": "集成类型,例如 `standard.alert`、`zabbix.alert`。" + }, + "plugin_type_name": { + "type": "string", + "description": "集成类型显示名,随请求语言变化。" + }, + "category": { + "type": "string", + "enum": [ + "event.alert", + "event.change", + "im", + "webhook" + ], + "description": "集成所属分类:`event.alert` 告警事件,`event.change` 变更事件,`im` IM 机器人,`webhook` 自定义 Webhook。" + }, + "name": { + "type": "string", + "description": "集成名称。" + }, + "description": { + "type": "string", + "description": "集成描述。" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "状态:`enabled` 正常接收事件,`disabled` 已暂停。" + }, + "ref_id": { + "type": "string", + "description": "来源引用 ID,账户级集成通常为 `a_`,旧记录也可能使用 `w_`;本接口不返回 `c_` 开头的专属集成。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间的 Unix 时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最近更新时间的 Unix 时间戳(秒)。" + }, + "last_time": { + "type": "integer", + "format": "int64", + "description": "最近收到事件时间的 Unix 时间戳(秒),尚未收到事件时为 `0`。" + }, + "editable": { + "type": "boolean", + "description": "当前调用者是否通过集成对象权限校验;执行写操作还需集成中心管理权限。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "创建集成的成员 ID。" + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "最近更新集成的成员 ID。" + }, + "no_editable": { + "type": "boolean", + "description": "只读标记;为 true 时公开接口不允许修改该集成。" + }, + "plugin_id": { + "type": "integer", + "format": "int64", + "description": "集成类型的内部 ID;创建集成使用 `plugin_type`,不使用此 ID。" + }, + "integration_key": { + "type": "string", + "description": "解密后的集成 Key,用于事件推送;未存储 Key 时为空字符串,与账户 `app_key` 不同。" + }, "settings": { "type": "object", "additionalProperties": true, - "description": "集成类型专属配置;敏感字段(endpoint、headers、密钥、密码)以 `******` 打码返回。" + "description": "按存储值返回的类型专属配置,凭据不打码,与旧 `/datasource/*` 返回行为一致。" + }, + "test": { + "type": "object", + "description": "执行插件测试时返回的测试结果。", + "x-flashduty-preserve-absence": true, + "required": [ + "success", + "message" + ], + "properties": { + "success": { + "type": "boolean", + "description": "插件测试是否成功。" + }, + "message": { + "type": "string", + "description": "测试失败信息;成功时为空字符串。" + } + } } } }, @@ -32972,7 +33084,7 @@ "type": "string", "minLength": 2, "maxLength": 49, - "description": "集成名称,2–49 个字符。", + "description": "集成名称,非空时为 2–49 字符;不传或为空时使用集成类型名称。", "example": "Prod metrics alerts" }, "description": { @@ -32983,14 +33095,24 @@ "team_id": { "type": "integer", "format": "int64", - "minimum": 1, - "description": "所属团队 ID。", + "minimum": 0, + "description": "所属团队 ID;不传或传 `0` 表示不设置团队,非零 ID 必须属于当前账户。", "example": 1467226103121 }, "settings": { "type": "object", "description": "集成类型专属配置,可传字段取决于 `plugin_type`。", "additionalProperties": true + }, + "integration_key": { + "type": "string", + "minLength": 35, + "maxLength": 35, + "description": "可选预生成 Key,长度 35,末尾为账户 ID 对 1000 取余后补零至三位,且不能已被使用;不传时自动生成。" + }, + "is_test": { + "type": "boolean", + "description": "创建时执行插件测试;不传时为 false,测试结果查看返回的 `test.success`。" } } }, @@ -33010,8 +33132,27 @@ }, "integration_key": { "type": "string", - "description": "该集成的推送鉴权 Key,仅在此处返回;需要新 Key 请调用 `POST /integration/key/rotate`。", - "example": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" + "description": "用于事件推送的集成 Key,也可通过 `/integration/list` 和 `/integration/info` 查询。", + "example": "0123456789abcdef0123456789abcdef100" + }, + "test": { + "type": "object", + "description": "执行插件测试时返回的测试结果。", + "x-flashduty-preserve-absence": true, + "required": [ + "success", + "message" + ], + "properties": { + "success": { + "type": "boolean", + "description": "插件测试是否成功。" + }, + "message": { + "type": "string", + "description": "测试失败信息;成功时为空字符串。" + } + } } } }, @@ -33056,12 +33197,13 @@ "description": "新的所属团队 ID;传 `0` 表示清除团队归属。" }, "settings": { - "type": [ - "object", - "null" - ], - "description": "替换该集成类型的配置;敏感字段不传、或原样回传 `******`,都会保留已存储的值。", + "type": "object", + "description": "替换类型专属配置;已识别的敏感字段不传或传 `******` 时保留原值,显式传空 headers 对象可清空 Headers。", "additionalProperties": true + }, + "is_test": { + "type": "boolean", + "description": "提交 `settings` 时执行插件测试;仅更新名称、描述或团队时不执行测试。" } } }, @@ -33090,8 +33232,8 @@ "properties": { "integration_key": { "type": "string", - "description": "新的集成 Key。旧 Key 立即失效,且该值之后无法再次读取。", - "example": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" + "description": "新的集成 Key,旧 Key 立即失效;新 Key 也可通过 `/integration/list` 和 `/integration/info` 查询。", + "example": "0123456789abcdef0123456789abcdef100" } } } @@ -33289,7 +33431,7 @@ "On-call/告警管理" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |\n\n## 使用说明\n\n- 结果会根据调用方的协作空间数据访问权限进行过滤。\n- `severities` 为逗号分隔的字符串,如 `\"Critical,Warning\"`。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |\n\n## 使用说明\n\n- `start_time` 和 `end_time` 均为必填的 Unix 时间戳(秒)。`start_time` 必须小于 `end_time`,跨度不超过 31 天。\n- 结果会根据调用方的协作空间数据访问权限进行过滤。\n- `severities` 为逗号分隔的字符串,如 `\"Critical,Warning\"`。", "href": "/zh/api-reference/on-call/alerts/alert-event-read-list", "metadata": { "sidebarTitle": "查询原始告警事件列表" @@ -42092,7 +42234,7 @@ "operationId": "incidentPostMortemInfo", "parameters": [ { - "description": "Post-mortem ID. Deterministic hash derived from account ID and the set of linked incident IDs.", + "description": "故障复盘 ID。由账户 ID 与关联故障 ID 集合推导出的确定性哈希值。", "in": "query", "name": "post_mortem_id", "required": true, @@ -52387,7 +52529,7 @@ "text/csv": { "example": "Issue ID,Error type,Error message,Status,Error count,Affected sessions,Last seen (Asia/Shanghai)\nNHEacQHi2DhXqobr9qPQz9,Error,Script error.,for_review,752,381,2026-04-12 10:43:59\nH8kZSmxiE7EgdyD4fCyyNa,Error,\"API ERROR: We encountered an internal error | POST /api/access/logout\",for_review,3,1,2026-04-03 12:41:24", "schema": { - "description": "CSV file content. The header row matches the exported columns in order; values are sanitized against spreadsheet formula injection.", + "description": "CSV 文件内容。表头行按导出列的先后顺序排列;单元格取值已做电子表格公式注入防护。", "type": "string" } } @@ -52395,14 +52537,14 @@ "description": "成功。CSV 附件,非 JSON 信封。", "headers": { "X-Export-Total": { - "description": "Total number of issues matching the filters, before the row cap.", + "description": "符合筛选条件的异常总数,未受行数上限截断前。", "schema": { "format": "int64", "type": "integer" } }, "X-Export-Truncated": { - "description": "`true` when more issues matched than the 100-row cap and the file was truncated.", + "description": "当匹配的异常超过 100 行上限、文件被截断时为 `true`。", "schema": { "type": "boolean" } @@ -53855,7 +53997,7 @@ }, "application/x-ndjson": { "schema": { - "description": "Newline-delimited JSON (NDJSON). Each line is one decompressed replay segment record (rrweb-format events), streamed directly and not wrapped in the standard envelope.", + "description": "按行分隔的 JSON(NDJSON)。每一行是一条解压后的回放分片记录(rrweb 格式事件),直接流式返回,不使用标准响应结构包裹。", "type": "string" } } @@ -54017,7 +54159,7 @@ { "properties": { "data": { - "description": "Always null on success.", + "description": "成功时恒为 null。", "type": "null" } }, @@ -54096,7 +54238,7 @@ { "properties": { "data": { - "description": "Always null on success.", + "description": "成功时恒为 null。", "type": "null" } }, @@ -54175,7 +54317,7 @@ { "properties": { "data": { - "description": "Always null on success.", + "description": "成功时恒为 null。", "type": "null" } }, @@ -54462,7 +54604,7 @@ { "properties": { "data": { - "description": "Always null on success.", + "description": "成功时恒为 null。", "type": "null" } }, @@ -54541,7 +54683,7 @@ { "properties": { "data": { - "description": "Always null on success.", + "description": "成功时恒为 null。", "type": "null" } }, @@ -55084,7 +55226,7 @@ { "properties": { "data": { - "description": "Always null on success.", + "description": "成功时恒为 null。", "type": "null" } }, @@ -60762,7 +60904,7 @@ "operationId": "statusPageChangeInfo", "parameters": [ { - "description": "Status page ID.", + "description": "状态页 ID。", "in": "query", "name": "page_id", "required": true, @@ -60772,7 +60914,7 @@ } }, { - "description": "Event (change) ID.", + "description": "事件(变更)ID。", "in": "query", "name": "change_id", "required": true, @@ -60889,7 +61031,7 @@ "operationId": "statusPageChangeList", "parameters": [ { - "description": "Status page ID.", + "description": "状态页 ID。", "in": "query", "name": "page_id", "required": true, @@ -60899,7 +61041,7 @@ } }, { - "description": "Lower bound of the event activity window: only events still open at, or closed at or after, this Unix timestamp (seconds) are returned.", + "description": "事件活动时间窗的下界:仅返回在该 Unix 时间戳(秒)时仍未结束、或在该时刻之后结束的事件。", "in": "query", "name": "start_at_seconds", "required": false, @@ -60909,7 +61051,7 @@ } }, { - "description": "Upper bound of the event activity window: only events started at or before this Unix timestamp (seconds) are returned.", + "description": "事件活动时间窗的上界:仅返回在该 Unix 时间戳(秒)或之前开始的事件。", "in": "query", "name": "end_at_seconds", "required": false, @@ -60919,7 +61061,7 @@ } }, { - "description": "Event type filter. Required.", + "description": "事件类型筛选条件。必填。", "in": "query", "name": "type", "required": true, @@ -60932,7 +61074,7 @@ } }, { - "description": "Event status filter. Required. Must be a status valid for the given `type` (`investigating`/`identified`/`monitoring`/`resolved` for `incident`; `scheduled`/`ongoing`/`completed` for `maintenance`).", + "description": "事件状态筛选条件。必填。必须是与所给 `type` 匹配的合法状态(`incident` 为 `investigating`/`identified`/`monitoring`/`resolved`;`maintenance` 为 `scheduled`/`ongoing`/`completed`)。", "in": "query", "name": "status", "required": true, @@ -61750,7 +61892,7 @@ "operationId": "statusPageInfo", "parameters": [ { - "description": "Status page ID.", + "description": "状态页 ID。", "in": "query", "name": "page_id", "required": true, @@ -62183,7 +62325,7 @@ "operationId": "statusPageMigrationStatus", "parameters": [ { - "description": "Migration job ID returned by `migrate-structure` or `migrate-email-subscribers`.", + "description": "由 `migrate-structure` 或 `migrate-email-subscribers` 返回的迁移任务 ID。", "in": "query", "name": "job_id", "required": true, @@ -62566,7 +62708,7 @@ "operationId": "statusPageSubscriberList", "parameters": [ { - "description": "Status page ID.", + "description": "状态页 ID。", "in": "query", "name": "page_id", "required": true, @@ -62576,7 +62718,7 @@ } }, { - "description": "Comma-separated component IDs to filter subscribers by.", + "description": "用于筛选订阅者的组件 ID,多个以英文逗号分隔。", "in": "query", "name": "component_ids", "required": false, @@ -62585,7 +62727,7 @@ } }, { - "description": "Page number (1-based).", + "description": "页码(从 1 开始)。", "in": "query", "name": "p", "required": false, @@ -62597,7 +62739,7 @@ } }, { - "description": "Page size (1-100).", + "description": "每页条数(1-100)。", "in": "query", "name": "limit", "required": false, @@ -62760,7 +62902,7 @@ "operationId": "statusPageTemplateList", "parameters": [ { - "description": "Status page ID.", + "description": "状态页 ID。", "in": "query", "name": "page_id", "required": true, @@ -62770,7 +62912,7 @@ } }, { - "description": "Template category. `pre_defined` returns predefined event templates; `message` returns message notification templates.", + "description": "模板类别。`pre_defined` 返回预定义事件模板;`message` 返回消息通知模板。", "in": "query", "name": "type", "required": true, @@ -67104,12 +67246,12 @@ "post": { "operationId": "integration-api-read-list", "summary": "查询集成列表", - "description": "查询当前账户的告警源与变更源集成列表。", + "description": "查询公共集成列表,返回存储配置、解密 Key 与当前调用者的编辑权限。", "tags": [ "On-call/集成中心" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心查看**(`on-call`) |\n\n## 使用说明\n\n- `orderby` 默认 `created_at`;`plugin_type` 按底层插件排序。\n- `plugin_type`、`status`、`category` 支持逗号分隔多值;`ref_ids` 每个值必须以 `c_`、`a_` 或 `w_` 开头。\n- 传入 `is_my_team` 时仅返回你所在团队的集成,`team_ids` 会在该范围内进一步收窄。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心查看**(`on-call`) |\n\n## 使用说明\n\n- `orderby` 默认 `created_at`;`plugin_type` 按底层插件排序。\n- `plugin_type`、`status`、`category` 支持逗号分隔多值;`ref_ids` 每个值必须以 `c_`、`a_` 或 `w_` 开头;`c_` 过滤值通过格式校验,但不会返回协作空间专属集成。\n- 传入 `is_my_team` 时仅返回你所在团队的集成,`team_ids` 会在该范围内进一步收窄。\n- 这些接口仅管理公共(账户级)集成,不管理协作空间专属集成。\n- 列表项包含 `settings`、`integration_key`、`plugin_id`、`account_id` 及旧 ID 别名 `data_source_id`,凭据按原值返回,不打码。", "href": "/zh/api-reference/on-call/integrations/integration-api-read-list", "metadata": { "sidebarTitle": "查询集成列表" @@ -67151,10 +67293,23 @@ "name": "Prod metrics alerts", "description": "Alerts pushed by the production Prometheus stack", "status": "enabled", - "ref_id": "a_6612f0c9e1b7a4d3508f2c6b", + "ref_id": "a_100", "created_at": 1775116800, "updated_at": 1775203200, - "last_time": 1775298600 + "last_time": 1775298600, + "editable": true, + "creator_id": 1467226103999, + "updated_by": 1467226103999, + "no_editable": false, + "plugin_id": 9, + "integration_key": "0123456789abcdef0123456789abcdef100", + "settings": { + "field_mapping": {}, + "value_mapping": {} + }, + "data_source_id": 6113996590131, + "account_id": 100, + "exclusive_data_source_id": 0 } ] } @@ -67196,12 +67351,12 @@ "post": { "operationId": "integration-api-read-info", "summary": "查询集成详情", - "description": "查询单个集成详情,敏感配置以打码形式返回。", + "description": "查询单个公共集成详情,返回存储配置及解密后的集成 Key。", "tags": [ "On-call/集成中心" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心查看**(`on-call`) |\n\n## 使用说明\n\n- 敏感配置(endpoint、headers、密钥、密码)均以 `******` 打码返回。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心查看**(`on-call`) |\n\n## 使用说明\n\n- 这些接口仅管理公共(账户级)集成,不管理协作空间专属集成。\n- settings 与集成 Key 按原值返回,不打码,与旧 datasource 详情接口行为一致。", "href": "/zh/api-reference/on-call/integrations/integration-api-read-info", "metadata": { "sidebarTitle": "查询集成详情" @@ -67238,20 +67393,20 @@ "name": "Prod metrics alerts", "description": "Alerts pushed by the production Prometheus stack", "status": "enabled", - "ref_id": "a_6612f0c9e1b7a4d3508f2c6b", + "ref_id": "a_100", "created_at": 1775116800, "updated_at": 1775203200, "last_time": 1775298600, "settings": { - "severity_mapping": [ - { - "P1": "Critical" - } - ], - "labels": { - "source": "prometheus" - } - } + "field_mapping": {}, + "value_mapping": {} + }, + "editable": true, + "creator_id": 1467226103999, + "updated_by": 1467226103999, + "no_editable": false, + "plugin_id": 9, + "integration_key": "0123456789abcdef0123456789abcdef100" } } } @@ -67289,12 +67444,12 @@ "post": { "operationId": "integration-api-write-create", "summary": "创建集成", - "description": "为某个告警源或变更源创建集成。", + "description": "创建支持的告警源、变更源、IM 或 Webhook 类型公共集成。", "tags": [ "On-call/集成中心" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- `plugin_type` 必须是 `POST /integration/type/list` 中 `supports_api_create: true` 的类型,否则返回 `InvalidParameter`。\n- `integration_key` 仅在创建时返回一次,请及时保存;`POST /integration/info` 不会返回该字段。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- `plugin_type` 必须是 `POST /integration/type/list` 中 `supports_api_create: true` 的类型,否则返回 `InvalidParameter`。\n- 这些接口仅管理公共(账户级)集成,不管理协作空间专属集成。\n- 不传 `integration_key` 时自动生成;传入时须满足长度、账户后缀与唯一性校验。\n- 传 `is_test: true` 时请检查 `test.success`,不能只根据 HTTP 200 判断插件测试成功。\n- 每次调用都会记录到账户审计日志。", "href": "/zh/api-reference/on-call/integrations/integration-api-write-create", "metadata": { "sidebarTitle": "创建集成" @@ -67324,7 +67479,11 @@ "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { "integration_id": 6113996590131, - "integration_key": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" + "integration_key": "0123456789abcdef0123456789abcdef100", + "test": { + "success": true, + "message": "" + } } } } @@ -67356,12 +67515,10 @@ "description": "Alerts pushed by the production Prometheus stack", "team_id": 1467226103121, "settings": { - "severity_mapping": [ - { - "P1": "Critical" - } - ] - } + "field_mapping": {}, + "value_mapping": {} + }, + "is_test": true } } } @@ -67377,7 +67534,7 @@ "On-call/集成中心" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 仅发送的字段会被修改,未发送的字段保持原值。\n- `settings` 会整体替换已存储的配置;敏感字段不传、或原样回传打码值 `******`,都会保留已存储的值。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 仅发送的字段会被修改,未发送的字段保持原值。\n- 提交 `settings` 会替换配置;已识别的敏感字段不传或传 `******` 时保留原值。清空 Headers 请传 `headers: {}`;清空 Body 请使用该集成类型的显式空值。\n- 同时提交 `settings` 与 `is_test: true` 可获得插件测试结果,返回的 settings 不打码。\n- 这些接口仅管理公共(账户级)集成,不管理协作空间专属集成。\n- 写操作还需对象权限:主体账户、管理员、创建者或所属团队成员可操作;未设置团队时,拥有集成中心管理权限的成员可操作,只读集成不可修改。\n- 每次调用都会记录到账户审计日志。", "href": "/zh/api-reference/on-call/integrations/integration-api-write-update", "metadata": { "sidebarTitle": "更新集成" @@ -67414,19 +67571,23 @@ "name": "Prod metrics alerts (primary)", "description": "Alerts pushed by the production Prometheus stack", "status": "enabled", - "ref_id": "a_6612f0c9e1b7a4d3508f2c6b", + "ref_id": "a_100", "created_at": 1775116800, "updated_at": 1775298600, "last_time": 1775298600, "settings": { - "severity_mapping": [ - { - "P1": "Critical" - } - ], - "labels": { - "source": "prometheus" - } + "field_mapping": {}, + "value_mapping": {} + }, + "editable": true, + "creator_id": 1467226103999, + "updated_by": 1467226103999, + "no_editable": false, + "plugin_id": 9, + "integration_key": "0123456789abcdef0123456789abcdef100", + "test": { + "success": true, + "message": "" } } } @@ -67456,7 +67617,12 @@ "example": { "integration_id": 6113996590131, "name": "Prod metrics alerts (primary)", - "team_id": 1467226103121 + "team_id": 1467226103121, + "settings": { + "field_mapping": {}, + "value_mapping": {} + }, + "is_test": true } } } @@ -67472,7 +67638,7 @@ "On-call/集成中心" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 若该集成仍被其他对象引用,删除会返回 HTTP 400,`error.code` 为 `ReferenceExist`,`data.refs` 列出引用方。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 若该集成仍被其他对象引用,删除会返回 HTTP 400,`error.code` 为 `ReferenceExist`,`data.refs` 列出引用方。\n- 每次调用都会记录到账户审计日志。\n- 这些接口仅管理公共(账户级)集成,不管理协作空间专属集成。\n- 写操作还需对象权限:主体账户、管理员、创建者或所属团队成员可操作;未设置团队时,拥有集成中心管理权限的成员可操作,只读集成不可修改。", "href": "/zh/api-reference/on-call/integrations/integration-api-write-delete", "metadata": { "sidebarTitle": "删除集成" @@ -67542,7 +67708,7 @@ "On-call/集成中心" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 启用会恢复该集成的拉取任务与心跳,并要求当前套餐包含该集成类型。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 启用会恢复该集成的拉取任务与心跳,并要求当前套餐包含该集成类型。\n- 每次调用都会记录到账户审计日志。\n- 这些接口仅管理公共(账户级)集成,不管理协作空间专属集成。\n- 写操作还需对象权限:主体账户、管理员、创建者或所属团队成员可操作;未设置团队时,拥有集成中心管理权限的成员可操作,只读集成不可修改。", "href": "/zh/api-reference/on-call/integrations/integration-api-write-enable", "metadata": { "sidebarTitle": "启用集成" @@ -67612,7 +67778,7 @@ "On-call/集成中心" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 禁用后停止接收事件并暂停定时拉取任务,配置保留,可再次启用。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 禁用后停止接收事件并暂停定时拉取任务,配置保留,可再次启用。\n- 每次调用都会记录到账户审计日志。\n- 这些接口仅管理公共(账户级)集成,不管理协作空间专属集成。\n- 写操作还需对象权限:主体账户、管理员、创建者或所属团队成员可操作;未设置团队时,拥有集成中心管理权限的成员可操作,只读集成不可修改。", "href": "/zh/api-reference/on-call/integrations/integration-api-write-disable", "metadata": { "sidebarTitle": "禁用集成" @@ -67682,7 +67848,7 @@ "On-call/集成中心" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 旧 Key 会立即失效,请先更新推送侧再轮换。\n- 新 Key 只返回一次,之后无法再次读取。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 旧 Key 会立即失效;轮换后请将推送端配置更新为新 Key。\n- 新 Key 也可通过 `/integration/list` 和 `/integration/info` 查询。\n- 这些接口仅管理公共(账户级)集成,不管理协作空间专属集成。\n- 写操作还需对象权限:主体账户、管理员、创建者或所属团队成员可操作;未设置团队时,拥有集成中心管理权限的成员可操作,只读集成不可修改。\n- 每次调用都会记录到账户审计日志。", "href": "/zh/api-reference/on-call/integrations/integration-api-write-rotate-key", "metadata": { "sidebarTitle": "轮换集成 Key" @@ -67711,7 +67877,7 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "integration_key": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" + "integration_key": "0123456789abcdef0123456789abcdef100" } } }