From 65647862e49af2e29688a4019ed8fd4cbe890a80 Mon Sep 17 00:00:00 2001 From: ysyneu Date: Wed, 23 Sep 2026 07:42:42 -0700 Subject: [PATCH] docs(api): sync OpenAPI specs with backend API changes - safari (AI SRE): add oncall_incident_merge_similar to automation rule create/update/item; joined_session_id/joined_session_name to run items; has_open_tasks to session item (session/get only); pinned_at to published artifact items; root_invocation_id/delivery_mode/is_error to event items; artifact stream rate limits to 50 rps / 1,000 rpm - monitors: document datasource team-permission fields (manage_team_id, readonly_team_ids, creator_id) and my_perm on datasource list items - on-call: add effective_person_ids to AssignedTo in incident payloads - api catalog: unlist POST /member/notify page (session-credential-only endpoint, covered by the Go SDK guide); counts 338 to 337 - mirror all spec changes into the consolidated openapi.en/zh.json --- api-reference/monitors.openapi.en.json | 90 +++++++++++- api-reference/monitors.openapi.zh.json | 90 +++++++++++- api-reference/on-call.openapi.en.json | 16 ++ api-reference/on-call.openapi.zh.json | 16 ++ api-reference/openapi.en.json | 196 +++++++++++++++++++++++-- api-reference/openapi.zh.json | 196 +++++++++++++++++++++++-- api-reference/safari.openapi.en.json | 102 +++++++++++-- api-reference/safari.openapi.zh.json | 102 +++++++++++-- docs.json | 2 - en/openapi/api-catalog.mdx | 5 +- zh/openapi/api-catalog.mdx | 5 +- 11 files changed, 760 insertions(+), 60 deletions(-) diff --git a/api-reference/monitors.openapi.en.json b/api-reference/monitors.openapi.en.json index bb59ed9f..6836ff68 100644 --- a/api-reference/monitors.openapi.en.json +++ b/api-reference/monitors.openapi.en.json @@ -119,7 +119,7 @@ "Monitors/Data sources" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Manage** (`monit`) |\n\n## Usage\n\n- `type_ident` must be one of: `prometheus`, `loki`, `mysql`, `oracle`, `postgres`, `clickhouse`, `elasticsearch`, `sls`, `tencent_cls`, `victorialogs`, `redis_node`, `redis_sentinel`, `mongodb_mongod`, `mongodb_mongos`, `kafka`.\n- `edge_cluster_name` specifies which Monitors edge cluster evaluates rules using this datasource.\n- For `elasticsearch`, set `payload.elasticsearch.deployment` to `cloud` or `self-managed`.\n- Every call is recorded in the account audit log. Use credential fields only for connection credentials.\n\nSee the request/response schemas for all supported types and credential handling. Diagnostic-only types cannot enable alerting. On create omitted enabled defaults to true; on update omission preserves the current value. Explicit null for enabled or alerting_enabled is invalid. Diagnostic passwords and Kafka private keys are omitted from responses unless they are environment references; omit these secrets on update to preserve them, or send an empty string to clear. Other datasource credentials may be returned and must be handled as sensitive.", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Manage** (`monit`) |\n\n## Usage\n\n- `manage_team_id` and `readonly_team_ids` control team-level authorization: the managing team may update, delete, and view credentials; readonly teams may query and reference. Both are omitted by default (unrestricted). Setting `readonly_team_ids` requires `manage_team_id` in the same request, otherwise the call fails with `400`.\n- `type_ident` must be one of: `prometheus`, `loki`, `mysql`, `oracle`, `postgres`, `clickhouse`, `elasticsearch`, `sls`, `tencent_cls`, `victorialogs`, `redis_node`, `redis_sentinel`, `mongodb_mongod`, `mongodb_mongos`, `kafka`.\n- `edge_cluster_name` specifies which Monitors edge cluster evaluates rules using this datasource.\n- For `elasticsearch`, set `payload.elasticsearch.deployment` to `cloud` or `self-managed`.\n- Every call is recorded in the account audit log. Use credential fields only for connection credentials.\n\nSee the request/response schemas for all supported types and credential handling. Diagnostic-only types cannot enable alerting. On create omitted enabled defaults to true; on update omission preserves the current value. Explicit null for enabled or alerting_enabled is invalid. Diagnostic passwords and Kafka private keys are omitted from responses unless they are environment references; omit these secrets on update to preserve them, or send an empty string to clear. Other datasource credentials may be returned and must be handled as sensitive.", "href": "/en/api-reference/monitors/data-sources/monit-datasource-write-create", "metadata": { "sidebarTitle": "Create datasource" @@ -206,7 +206,7 @@ "Monitors/Data sources" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Use credential fields only for connection credentials.\n\nSee the request/response schemas for all supported types and credential handling. Diagnostic-only types cannot enable alerting. On create omitted enabled defaults to true; on update omission preserves the current value. Explicit null for enabled or alerting_enabled is invalid. Diagnostic passwords and Kafka private keys are omitted from responses unless they are environment references; omit these secrets on update to preserve them, or send an empty string to clear. Other datasource credentials may be returned and must be handled as sensitive.", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Manage** (`monit`) |\n\n## Usage\n\n- `manage_team_id` and `readonly_team_ids` follow presence semantics: omit to preserve the current value; explicit null clears it. Setting `readonly_team_ids` requires `manage_team_id` to remain set — the call fails with `400` when the merged state restricts query access without a managing team.\n- Every call is recorded in the account audit log. Use credential fields only for connection credentials.\n\nSee the request/response schemas for all supported types and credential handling. Diagnostic-only types cannot enable alerting. On create omitted enabled defaults to true; on update omission preserves the current value. Explicit null for enabled or alerting_enabled is invalid. Diagnostic passwords and Kafka private keys are omitted from responses unless they are environment references; omit these secrets on update to preserve them, or send an empty string to clear. Other datasource credentials may be returned and must be handled as sensitive.", "href": "/en/api-reference/monitors/data-sources/monit-datasource-write-update", "metadata": { "sidebarTitle": "Update datasource" @@ -1088,7 +1088,7 @@ "Monitors/Data sources" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Read** (`monit`) |\n\n## Usage\n\n- Omit `type_ident` to return all types.\n- Sensitive credential fields (passwords, keys) are not returned in the list response.\n\nSee the request/response schemas for all supported types and credential handling. Diagnostic-only types cannot enable alerting. On create omitted enabled defaults to true; on update omission preserves the current value. Explicit null for enabled or alerting_enabled is invalid. Diagnostic passwords and Kafka private keys are omitted from responses unless they are environment references; omit these secrets on update to preserve them, or send an empty string to clear. Other datasource credentials may be returned and must be handled as sensitive.", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Read** (`monit`) |\n\n## Usage\n\n- Only datasources the caller may query are returned, and each item carries `my_perm` — the caller's permission level (`manage` or `readonly`). App key callers see every datasource with `my_perm` `manage`.\n- Omit `type_ident` to return all types.\n- Sensitive credential fields (passwords, keys) are not returned in the list response.\n\nSee the request/response schemas for all supported types and credential handling. Diagnostic-only types cannot enable alerting. On create omitted enabled defaults to true; on update omission preserves the current value. Explicit null for enabled or alerting_enabled is invalid. Diagnostic passwords and Kafka private keys are omitted from responses unless they are environment references; omit these secrets on update to preserve them, or send an empty string to clear. Other datasource credentials may be returned and must be handled as sensitive.", "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-list", "metadata": { "sidebarTitle": "List datasources" @@ -1128,7 +1128,8 @@ "edge_cluster_name": "default", "updated_at": 1712000000, "payload": null, - "alerting_enabled": true + "alerting_enabled": true, + "my_perm": "manage" } ] } @@ -3637,7 +3638,10 @@ "edge_cluster_name", "updated_at", "payload", - "alerting_enabled" + "alerting_enabled", + "manage_team_id", + "readonly_team_ids", + "creator_id" ], "properties": { "id": { @@ -3694,6 +3698,33 @@ "alerting_enabled": { "description": "Whether alert evaluation is allowed. Alerting also requires enabled=true and an alerting-capable type. Always false for diagnostic-only types; false does not block non-alerting queries or tools.", "type": "boolean" + }, + "manage_team_id": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "description": "Team ID allowed to manage this datasource (update, delete, view credentials). Null means no managing team, so any member with the Datasources Manage permission may manage it." + }, + "readonly_team_ids": { + "type": [ + "array", + "null" + ], + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Team IDs additionally allowed to query and reference this datasource; the managing team always implies query access. Empty or null means unrestricted, so any member with the Datasources Read permission may query." + }, + "creator_id": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "description": "ID of the user who created this datasource; the account ID when created through the API with an app key. Null for datasources created before this field was tracked." } } }, @@ -3709,9 +3740,9 @@ }, "DataSourceListResponse": { "type": "array", - "description": "List of datasources. The `payload` column is not read by this endpoint, so `payload` is `null` in every item.", + "description": "List of datasources. The `payload` column is not read by this endpoint, so `payload` is `null` in every item. Every item carries `my_perm`, the caller's permission level on that datasource.", "items": { - "$ref": "#/components/schemas/DataSourceItem" + "$ref": "#/components/schemas/DataSourceListItem" } }, "DataSourceUpsertRequest": { @@ -3763,6 +3794,27 @@ "description": "Whether this datasource may evaluate alerts. Omitted on create: true for alerting types, false for diagnostic-only types; omitted on update: preserve current value. null is invalid. redis_node, redis_sentinel, mongodb_mongod, mongodb_mongos and kafka reject true. Disabling is rejected with conflict when enabled rules reference the datasource.", "type": "boolean", "x-flashduty-preserve-absence": true + }, + "manage_team_id": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "description": "Team ID allowed to manage this datasource (update, delete, view credentials). Omit on create: no managing team, so any member with the Datasources Manage permission may manage it. On update, omit to preserve the current value; explicit null clears it. Setting `readonly_team_ids` requires a managing team: the request fails with `400` otherwise.", + "x-flashduty-preserve-absence": true + }, + "readonly_team_ids": { + "type": [ + "array", + "null" + ], + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Team IDs additionally allowed to query and reference this datasource; the managing team always implies query access. Omit on create: unrestricted, so any member with the Datasources Read permission may query. On update, omit to preserve the current value; explicit null clears it back to unrestricted.", + "x-flashduty-preserve-absence": true } } }, @@ -6362,6 +6414,30 @@ "expr", "args" ] + }, + "DataSourceListItem": { + "description": "A monitoring datasource as returned by the list endpoint: the full datasource row plus the caller's permission level on it.", + "allOf": [ + { + "$ref": "#/components/schemas/DataSourceItem" + }, + { + "type": "object", + "required": [ + "my_perm" + ], + "properties": { + "my_perm": { + "type": "string", + "enum": [ + "manage", + "readonly" + ], + "description": "The caller's permission level on this datasource: `manage` (update, delete, view credentials, query) or `readonly` (query and reference only). Callers authenticated with an app key always receive `manage`." + } + } + } + ] } } } diff --git a/api-reference/monitors.openapi.zh.json b/api-reference/monitors.openapi.zh.json index d5aa2d4d..f70f68f2 100644 --- a/api-reference/monitors.openapi.zh.json +++ b/api-reference/monitors.openapi.zh.json @@ -119,7 +119,7 @@ "Monitors/告警数据源" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源管理**(`monit`) |\n\n## 使用说明\n\n- `type_ident` 必须为以下之一:`prometheus`、`loki`、`mysql`、`oracle`、`postgres`、`clickhouse`、`elasticsearch`、`sls`、`tencent_cls`、`victorialogs`、`redis_node`、`redis_sentinel`、`mongodb_mongod`、`mongodb_mongos`、`kafka`。\n- `edge_cluster_name` 指定使用该数据源进行规则评估的 Monitors Edge 集群。\n- 对于 `elasticsearch`,`payload.elasticsearch.deployment` 须设为 `cloud` 或 `self-managed`。\n- 每次调用都会记录到账户审计日志,仅通过凭据字段配置连接凭据。\n\n完整支持类型与凭据行为见请求/响应 Schema。仅诊断类型不能启用告警。创建时省略 enabled 默认为 true,更新时省略保留当前值;enabled 或 alerting_enabled 的显式 null 非法。诊断密码及 Kafka 私钥在响应中省略,环境变量引用除外;更新时省略秘密字段保留原值,空字符串清除。其他数据源凭据可能返回,应作为敏感数据处理。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源管理**(`monit`) |\n\n## 使用说明\n\n- `manage_team_id` 与 `readonly_team_ids` 控制团队级授权:管理团队可更新、删除、查看凭证;readonly 团队可查询和引用。两者默认省略(不限制)。设置 `readonly_team_ids` 时必须在同一请求中给出 `manage_team_id`,否则调用返回 `400`。\n- `type_ident` 必须为以下之一:`prometheus`、`loki`、`mysql`、`oracle`、`postgres`、`clickhouse`、`elasticsearch`、`sls`、`tencent_cls`、`victorialogs`、`redis_node`、`redis_sentinel`、`mongodb_mongod`、`mongodb_mongos`、`kafka`。\n- `edge_cluster_name` 指定使用该数据源进行规则评估的 Monitors Edge 集群。\n- 对于 `elasticsearch`,`payload.elasticsearch.deployment` 须设为 `cloud` 或 `self-managed`。\n- 每次调用都会记录到账户审计日志,仅通过凭据字段配置连接凭据。\n\n完整支持类型与凭据行为见请求/响应 Schema。仅诊断类型不能启用告警。创建时省略 enabled 默认为 true,更新时省略保留当前值;enabled 或 alerting_enabled 的显式 null 非法。诊断密码及 Kafka 私钥在响应中省略,环境变量引用除外;更新时省略秘密字段保留原值,空字符串清除。其他数据源凭据可能返回,应作为敏感数据处理。", "href": "/zh/api-reference/monitors/data-sources/monit-datasource-write-create", "metadata": { "sidebarTitle": "创建数据源" @@ -206,7 +206,7 @@ "Monitors/告警数据源" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源管理**(`monit`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,仅通过凭据字段配置连接凭据。\n\n完整支持类型与凭据行为见请求/响应 Schema。仅诊断类型不能启用告警。创建时省略 enabled 默认为 true,更新时省略保留当前值;enabled 或 alerting_enabled 的显式 null 非法。诊断密码及 Kafka 私钥在响应中省略,环境变量引用除外;更新时省略秘密字段保留原值,空字符串清除。其他数据源凭据可能返回,应作为敏感数据处理。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源管理**(`monit`) |\n\n## 使用说明\n\n- `manage_team_id` 与 `readonly_team_ids` 按是否传入生效:省略表示保留当前值;显式 null 表示清除。设置 `readonly_team_ids` 要求 `manage_team_id` 保持有效——合并后的状态若限制了查询权限却没有管理团队,调用返回 `400`。\n- 每次调用都会记录到账户审计日志,仅通过凭据字段配置连接凭据。\n\n完整支持类型与凭据行为见请求/响应 Schema。仅诊断类型不能启用告警。创建时省略 enabled 默认为 true,更新时省略保留当前值;enabled 或 alerting_enabled 的显式 null 非法。诊断密码及 Kafka 私钥在响应中省略,环境变量引用除外;更新时省略秘密字段保留原值,空字符串清除。其他数据源凭据可能返回,应作为敏感数据处理。", "href": "/zh/api-reference/monitors/data-sources/monit-datasource-write-update", "metadata": { "sidebarTitle": "更新数据源" @@ -1088,7 +1088,7 @@ "Monitors/告警数据源" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源查看**(`monit`) |\n\n## 使用说明\n\n- 省略 `type_ident` 可返回所有类型的数据源。\n- 列表响应中不返回敏感凭证字段(密码、密钥)。\n\n完整支持类型与凭据行为见请求/响应 Schema。仅诊断类型不能启用告警。创建时省略 enabled 默认为 true,更新时省略保留当前值;enabled 或 alerting_enabled 的显式 null 非法。诊断密码及 Kafka 私钥在响应中省略,环境变量引用除外;更新时省略秘密字段保留原值,空字符串清除。其他数据源凭据可能返回,应作为敏感数据处理。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源查看**(`monit`) |\n\n## 使用说明\n\n- 仅返回调用方可查询的数据源,每个条目带有 `my_perm`——调用方的权限级别(`manage` 或 `readonly`)。通过 app key 调用可看到全部数据源,`my_perm` 均为 `manage`。\n- 省略 `type_ident` 可返回所有类型的数据源。\n- 列表响应中不返回敏感凭证字段(密码、密钥)。\n\n完整支持类型与凭据行为见请求/响应 Schema。仅诊断类型不能启用告警。创建时省略 enabled 默认为 true,更新时省略保留当前值;enabled 或 alerting_enabled 的显式 null 非法。诊断密码及 Kafka 私钥在响应中省略,环境变量引用除外;更新时省略秘密字段保留原值,空字符串清除。其他数据源凭据可能返回,应作为敏感数据处理。", "href": "/zh/api-reference/monitors/data-sources/monit-datasource-read-list", "metadata": { "sidebarTitle": "查询数据源列表" @@ -1128,7 +1128,8 @@ "edge_cluster_name": "default", "updated_at": 1712000000, "payload": null, - "alerting_enabled": true + "alerting_enabled": true, + "my_perm": "manage" } ] } @@ -3637,7 +3638,10 @@ "edge_cluster_name", "updated_at", "payload", - "alerting_enabled" + "alerting_enabled", + "manage_team_id", + "readonly_team_ids", + "creator_id" ], "properties": { "id": { @@ -3694,6 +3698,33 @@ "alerting_enabled": { "description": "是否允许告警评估。告警同时要求 enabled=true 且类型支持告警。仅诊断类型固定为 false;false 不阻断非告警查询或工具。", "type": "boolean" + }, + "manage_team_id": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "description": "允许管理该数据源(更新、删除、查看凭证)的团队 ID。为 null 表示不指定管理团队——任何持有数据源管理 权限的成员都可管理。" + }, + "readonly_team_ids": { + "type": [ + "array", + "null" + ], + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "额外允许查询和引用该数据源的团队 ID 列表;管理团队始终隐含查询权限。为空或为 null 表示不限制——任何持有 数据源查看权限的成员都可查询。" + }, + "creator_id": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "description": "创建该数据源的用户 ID;通过 API(app key)创建时为账户 ID。对于早于该字段上线前创建的数据源为 null。" } } }, @@ -3709,9 +3740,9 @@ }, "DataSourceListResponse": { "type": "array", - "description": "数据源列表。本接口不读取 payload 列,因此每项的 `payload` 均为 `null`。", + "description": "数据源列表。该接口不读取 `payload` 列,因此每个条目的 `payload` 均为 `null`。每个条目都带有 `my_perm`,即调用方对该数据源的权限级别。", "items": { - "$ref": "#/components/schemas/DataSourceItem" + "$ref": "#/components/schemas/DataSourceListItem" } }, "DataSourceUpsertRequest": { @@ -3763,6 +3794,27 @@ "description": "是否允许数据源用于告警。创建时省略:支持告警的类型默认为 true,仅诊断类型默认为 false;更新时省略保留当前值。null 非法。redis_node、redis_sentinel、mongodb_mongod、mongodb_mongos 和 kafka 不允许 true。有启用规则引用时,关闭用途返回冲突。", "type": "boolean", "x-flashduty-preserve-absence": true + }, + "manage_team_id": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "description": "允许管理该数据源(更新、删除、查看凭证)的团队 ID。创建时省略:不指定管理团队——任何持有数据源管理权限的成员都可管理。更新时省略表示保留当前值;显式 null 表示清除。设置 `readonly_team_ids` 时必须指定管理团队,否则请求返回 `400`。", + "x-flashduty-preserve-absence": true + }, + "readonly_team_ids": { + "type": [ + "array", + "null" + ], + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "额外允许查询和引用该数据源的团队 ID 列表;管理团队始终隐含查询权限。创建时省略:不限制——任何持有 数据源查看权限的成员都可查询。更新时省略表示保留当前值;显式 null 清除并恢复为不限制。", + "x-flashduty-preserve-absence": true } } }, @@ -6362,6 +6414,30 @@ "expr", "args" ] + }, + "DataSourceListItem": { + "description": "列表接口返回的监控数据源:完整的数据源记录加上调用方对它的权限级别。", + "allOf": [ + { + "$ref": "#/components/schemas/DataSourceItem" + }, + { + "type": "object", + "required": [ + "my_perm" + ], + "properties": { + "my_perm": { + "type": "string", + "enum": [ + "manage", + "readonly" + ], + "description": "调用方对该数据源的权限级别:`manage`(可更新、删除、查看凭证、查询)或 `readonly`(仅可查询和引用)。通过 app key 调用的调用方始终为 `manage`。" + } + } + } + ] } } } diff --git a/api-reference/on-call.openapi.en.json b/api-reference/on-call.openapi.en.json index a76fc6d4..65265821 100644 --- a/api-reference/on-call.openapi.en.json +++ b/api-reference/on-call.openapi.en.json @@ -19067,6 +19067,14 @@ "id": { "type": "string", "description": "Opaque assignment ID generated by the server." + }, + "effective_person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Server-resolved IDs of everyone effectively assigned — the direct `person_ids` plus the escalation rule's current-layer members, deduplicated and sorted. Filled by the server on assign; integrations such as Jira read it to determine who to notify." } } }, @@ -23986,6 +23994,14 @@ "id": { "type": "string", "description": "Internal assignment record ID." + }, + "effective_person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Server-resolved IDs of everyone effectively assigned — the direct `person_ids` plus the escalation rule's current-layer members, deduplicated and sorted. Filled by the server on assign; integrations such as Jira read it to determine who to notify." } } }, diff --git a/api-reference/on-call.openapi.zh.json b/api-reference/on-call.openapi.zh.json index 3d49ef29..36431e85 100644 --- a/api-reference/on-call.openapi.zh.json +++ b/api-reference/on-call.openapi.zh.json @@ -19067,6 +19067,14 @@ "id": { "type": "string", "description": "服务端生成的指派 ID。" + }, + "effective_person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "服务端解析出的实际被分配人 ID——直接指定的 `person_ids` 加上升级规则当前层成员,去重并排序。由服务端在分派时填充;Jira 等集成读取它来确定通知对象。" } } }, @@ -23986,6 +23994,14 @@ "id": { "type": "string", "description": "内部分派记录 ID。" + }, + "effective_person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "服务端解析出的实际被分配人 ID——直接指定的 `person_ids` 加上升级规则当前层成员,去重并排序。由服务端在分派时填充;Jira 等集成读取它来确定通知对象。" } } }, diff --git a/api-reference/openapi.en.json b/api-reference/openapi.en.json index 36e2edaf..dbb898af 100644 --- a/api-reference/openapi.en.json +++ b/api-reference/openapi.en.json @@ -2955,6 +2955,14 @@ "reopen" ], "type": "string" + }, + "effective_person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Server-resolved IDs of everyone effectively assigned — the direct `person_ids` plus the escalation rule's current-layer members, deduplicated and sorted. Filled by the server on assign; integrations such as Jira read it to determine who to notify." } }, "type": "object" @@ -3253,6 +3261,13 @@ }, "type": "array" }, + "oncall_incident_merge_similar": { + "type": [ + "boolean", + "null" + ], + "description": "When the On-call incident trigger fires and an analysis session is already running for a similar incident, fold the new incident into that running analysis instead of starting a new session. Defaults to on when omitted; the stored value is always explicit." + }, "oncall_incident_severities": { "description": "Incident severities to watch. Supported values are Critical, Warning, and Info; creating or enabling this trigger requires at least one value.", "items": { @@ -3378,6 +3393,10 @@ }, "type": "array" }, + "oncall_incident_merge_similar": { + "type": "boolean", + "description": "Whether the On-call incident trigger folds a new incident into an already-running analysis session for a similar incident instead of starting a new one. A trigger row saved before this switch existed reads as the default, on; always present." + }, "oncall_incident_severities": { "description": "Incident severities to watch. Supported values are Critical, Warning, and Info; creating or enabling this trigger requires at least one value. Omitted when no On-call incident trigger is configured.", "items": { @@ -3466,7 +3485,8 @@ "created_at", "updated_at", "schedule_next_fire_at_ms", - "oncall_incident_trigger_enabled" + "oncall_incident_trigger_enabled", + "oncall_incident_merge_similar" ], "type": "object" }, @@ -3605,6 +3625,13 @@ }, "type": "array" }, + "oncall_incident_merge_similar": { + "type": [ + "boolean", + "null" + ], + "description": "When the On-call incident trigger fires and an analysis session is already running for a similar incident, fold the new incident into that running analysis instead of starting a new session. Omit or send null to leave unchanged; a trigger row saved before this switch existed reads as the default, on." + }, "oncall_incident_severities": { "description": "Incident severities to watch. Supported values are Critical, Warning, and Info; creating or enabling this trigger requires at least one value.", "items": { @@ -3702,6 +3729,14 @@ "description": "Error message; empty when the run did not fail.", "type": "string" }, + "joined_session_id": { + "type": "string", + "description": "Analysis session this run was folded into, set only when the run is a fan-in skip (`status=skipped`, `error_code=similar_incident_fan_in`): a similar incident's analysis was already running, so this run has no session of its own. Omitted otherwise." + }, + "joined_session_name": { + "type": "string", + "description": "Display name of the joined analysis session, stamped via the same batch lookup as `session_name`. Omitted when empty or when the lookup fails." + }, "kind": { "description": "Run kind; runs listed for a rule are always `automation_rule`.", "enum": [ @@ -7459,6 +7494,33 @@ "description": "Last update timestamp, Unix epoch seconds.", "format": "int64", "type": "integer" + }, + "manage_team_id": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "description": "Team ID allowed to manage this datasource (update, delete, view credentials). Null means no managing team, so any member with the Datasources Manage permission may manage it." + }, + "readonly_team_ids": { + "type": [ + "array", + "null" + ], + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Team IDs additionally allowed to query and reference this datasource; the managing team always implies query access. Empty or null means unrestricted, so any member with the Datasources Read permission may query." + }, + "creator_id": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "description": "ID of the user who created this datasource; the account ID when created through the API with an app key. Null for datasources created before this field was tracked." } }, "required": [ @@ -7472,7 +7534,10 @@ "edge_cluster_name", "updated_at", "payload", - "alerting_enabled" + "alerting_enabled", + "manage_team_id", + "readonly_team_ids", + "creator_id" ], "type": "object" }, @@ -7487,9 +7552,9 @@ "type": "object" }, "DataSourceListResponse": { - "description": "List of datasources. The `payload` column is not read by this endpoint, so `payload` is `null` in every item.", + "description": "List of datasources. The `payload` column is not read by this endpoint, so `payload` is `null` in every item. Every item carries `my_perm`, the caller's permission level on that datasource.", "items": { - "$ref": "#/components/schemas/DataSourceItem" + "$ref": "#/components/schemas/DataSourceListItem" }, "type": "array" }, @@ -7535,6 +7600,27 @@ "type_ident": { "description": "Datasource type identifier. Allowed: `prometheus`, `loki`, `mysql`, `oracle`, `postgres`, `clickhouse`, `elasticsearch`, `sls`, `tencent_cls`, `victorialogs`, `redis_node`, `redis_sentinel`, `mongodb_mongod`, `mongodb_mongos`, `kafka`。", "type": "string" + }, + "manage_team_id": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "description": "Team ID allowed to manage this datasource (update, delete, view credentials). Omit on create: no managing team, so any member with the Datasources Manage permission may manage it. On update, omit to preserve the current value; explicit null clears it. Setting `readonly_team_ids` requires a managing team: the request fails with `400` otherwise.", + "x-flashduty-preserve-absence": true + }, + "readonly_team_ids": { + "type": [ + "array", + "null" + ], + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Team IDs additionally allowed to query and reference this datasource; the managing team always implies query access. Omit on create: unrestricted, so any member with the Datasources Read permission may query. On update, omit to preserve the current value; explicit null clears it back to unrestricted.", + "x-flashduty-preserve-absence": true } }, "required": [ @@ -9149,6 +9235,10 @@ "format": "int64", "type": "integer" }, + "delivery_mode": { + "type": "string", + "description": "IM delivery mode stamped on the event: `reply_only` when the turn answers without opening an interactive session card. Omitted on non-IM events." + }, "error_code": { "description": "Error code when the event represents a failure.", "type": "string" @@ -9165,10 +9255,18 @@ "description": "ADK invocation id grouping a turn.", "type": "string" }, + "is_error": { + "type": "boolean", + "description": "True when the event carries durable assistant-side runtime error evidence (a sanitized runtime error); control-row payload diagnostics never set it." + }, "partial": { "description": "True for a streaming partial chunk.", "type": "boolean" }, + "root_invocation_id": { + "type": "string", + "description": "ADK invocation id of the root user-visible turn, shared by the parent invocation and every subagent/A2A continuation invocation it spawned; IM delivery uses it to update one card per user question." + }, "session_id": { "description": "Owning session id.", "type": "string" @@ -12093,6 +12191,14 @@ "reopen" ], "type": "string" + }, + "effective_person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Server-resolved IDs of everyone effectively assigned — the direct `person_ids` plus the escalation rule's current-layer members, deduplicated and sorted. Filled by the server on assign; integrations such as Jira read it to determine who to notify." } }, "type": [ @@ -17427,6 +17533,11 @@ "format": "int64", "type": "integer" }, + "pinned_at": { + "type": "integer", + "format": "int64", + "description": "The calling person's own pin time as a Unix timestamp in milliseconds; per-person, never shared. Omitted when the caller has not pinned this artifact." + }, "public_url": { "description": "Anonymous public link — a console `/share/artifact/` page served entirely from CDN. Present only while shared; anyone with the link can view it, no login required.", "type": "string" @@ -23858,6 +23969,10 @@ ], "type": "string" }, + "has_open_tasks": { + "type": "boolean", + "description": "Whether the session has any settlement-blocking open task at response time. Populated only by `POST /safari/session/get`: its absence means unknown, not no open tasks; `session/list` never sets it." + }, "has_unread": { "description": "True when there is assistant output the caller has not yet viewed.", "type": "boolean" @@ -29395,6 +29510,30 @@ ] } } + }, + "DataSourceListItem": { + "description": "A monitoring datasource as returned by the list endpoint: the full datasource row plus the caller's permission level on it.", + "allOf": [ + { + "$ref": "#/components/schemas/DataSourceItem" + }, + { + "type": "object", + "required": [ + "my_perm" + ], + "properties": { + "my_perm": { + "type": "string", + "enum": [ + "manage", + "readonly" + ], + "description": "The caller's permission level on this datasource: `manage` (update, delete, view credentials, query) or `readonly` (query and reference only). Callers authenticated with an app key always receive `manage`." + } + } + } + ] } }, "securitySchemes": { @@ -42813,7 +42952,7 @@ "Monitors/Data sources" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Manage** (`monit`) |\n\n## Usage\n\n- `type_ident` must be one of: `prometheus`, `loki`, `mysql`, `oracle`, `postgres`, `clickhouse`, `elasticsearch`, `sls`, `tencent_cls`, `victorialogs`, `redis_node`, `redis_sentinel`, `mongodb_mongod`, `mongodb_mongos`, `kafka`.\n- `edge_cluster_name` specifies which Monitors edge cluster evaluates rules using this datasource.\n- For `elasticsearch`, set `payload.elasticsearch.deployment` to `cloud` or `self-managed`.\n- Every call is recorded in the account audit log. Use credential fields only for connection credentials.\n\nSee the request/response schemas for all supported types and credential handling. Diagnostic-only types cannot enable alerting. On create omitted enabled defaults to true; on update omission preserves the current value. Explicit null for enabled or alerting_enabled is invalid. Diagnostic passwords and Kafka private keys are omitted from responses unless they are environment references; omit these secrets on update to preserve them, or send an empty string to clear. Other datasource credentials may be returned and must be handled as sensitive.", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Manage** (`monit`) |\n\n## Usage\n\n- `manage_team_id` and `readonly_team_ids` control team-level authorization: the managing team may update, delete, and view credentials; readonly teams may query and reference. Both are omitted by default (unrestricted). Setting `readonly_team_ids` requires `manage_team_id` in the same request, otherwise the call fails with `400`.\n- `type_ident` must be one of: `prometheus`, `loki`, `mysql`, `oracle`, `postgres`, `clickhouse`, `elasticsearch`, `sls`, `tencent_cls`, `victorialogs`, `redis_node`, `redis_sentinel`, `mongodb_mongod`, `mongodb_mongos`, `kafka`.\n- `edge_cluster_name` specifies which Monitors edge cluster evaluates rules using this datasource.\n- For `elasticsearch`, set `payload.elasticsearch.deployment` to `cloud` or `self-managed`.\n- Every call is recorded in the account audit log. Use credential fields only for connection credentials.\n\nSee the request/response schemas for all supported types and credential handling. Diagnostic-only types cannot enable alerting. On create omitted enabled defaults to true; on update omission preserves the current value. Explicit null for enabled or alerting_enabled is invalid. Diagnostic passwords and Kafka private keys are omitted from responses unless they are environment references; omit these secrets on update to preserve them, or send an empty string to clear. Other datasource credentials may be returned and must be handled as sensitive.", "href": "/en/api-reference/monitors/data-sources/monit-datasource-write-create", "metadata": { "sidebarTitle": "Create datasource" @@ -43014,7 +43153,8 @@ "note": "Production Prometheus", "payload": null, "type_ident": "prometheus", - "updated_at": 1712000000 + "updated_at": 1712000000, + "my_perm": "manage" } ], "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" @@ -43056,7 +43196,7 @@ "Monitors/Data sources" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Read** (`monit`) |\n\n## Usage\n\n- Omit `type_ident` to return all types.\n- Sensitive credential fields (passwords, keys) are not returned in the list response.\n\nSee the request/response schemas for all supported types and credential handling. Diagnostic-only types cannot enable alerting. On create omitted enabled defaults to true; on update omission preserves the current value. Explicit null for enabled or alerting_enabled is invalid. Diagnostic passwords and Kafka private keys are omitted from responses unless they are environment references; omit these secrets on update to preserve them, or send an empty string to clear. Other datasource credentials may be returned and must be handled as sensitive.", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Read** (`monit`) |\n\n## Usage\n\n- Only datasources the caller may query are returned, and each item carries `my_perm` — the caller's permission level (`manage` or `readonly`). App key callers see every datasource with `my_perm` `manage`.\n- Omit `type_ident` to return all types.\n- Sensitive credential fields (passwords, keys) are not returned in the list response.\n\nSee the request/response schemas for all supported types and credential handling. Diagnostic-only types cannot enable alerting. On create omitted enabled defaults to true; on update omission preserves the current value. Explicit null for enabled or alerting_enabled is invalid. Diagnostic passwords and Kafka private keys are omitted from responses unless they are environment references; omit these secrets on update to preserve them, or send an empty string to clear. Other datasource credentials may be returned and must be handled as sensitive.", "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-list", "metadata": { "sidebarTitle": "List datasources" @@ -43531,7 +43671,7 @@ "Monitors/Data sources" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Use credential fields only for connection credentials.\n\nSee the request/response schemas for all supported types and credential handling. Diagnostic-only types cannot enable alerting. On create omitted enabled defaults to true; on update omission preserves the current value. Explicit null for enabled or alerting_enabled is invalid. Diagnostic passwords and Kafka private keys are omitted from responses unless they are environment references; omit these secrets on update to preserve them, or send an empty string to clear. Other datasource credentials may be returned and must be handled as sensitive.", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Manage** (`monit`) |\n\n## Usage\n\n- `manage_team_id` and `readonly_team_ids` follow presence semantics: omit to preserve the current value; explicit null clears it. Setting `readonly_team_ids` requires `manage_team_id` to remain set — the call fails with `400` when the merged state restricts query access without a managing team.\n- Every call is recorded in the account audit log. Use credential fields only for connection credentials.\n\nSee the request/response schemas for all supported types and credential handling. Diagnostic-only types cannot enable alerting. On create omitted enabled defaults to true; on update omission preserves the current value. Explicit null for enabled or alerting_enabled is invalid. Diagnostic passwords and Kafka private keys are omitted from responses unless they are environment references; omit these secrets on update to preserve them, or send an empty string to clear. Other datasource credentials may be returned and must be handled as sensitive.", "href": "/en/api-reference/monitors/data-sources/monit-datasource-write-update", "metadata": { "sidebarTitle": "Update datasource" @@ -51756,7 +51896,7 @@ "AI SRE/Artifacts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/minute**; **10 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Success has two forms: a `302` redirect to a short-lived presigned object-storage URL (files stored in S3-compatible storage), or a `200` binary stream (files hosted on a self-hosted runner). Follow redirects.\n- Responses carry `Cache-Control: private, no-store` — they are never cached by the gateway.\n", + "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- Success has two forms: a `302` redirect to a short-lived presigned object-storage URL (files stored in S3-compatible storage), or a `200` binary stream (files hosted on a self-hosted runner). Follow redirects.\n- Responses carry `Cache-Control: private, no-store` — they are never cached by the gateway.\n", "href": "/en/api-reference/ai-sre/artifacts/artifact-read-stream", "metadata": { "sidebarTitle": "Download or preview a file" @@ -51779,6 +51919,7 @@ "oncall_incident_channel_ids": [ 456 ], + "oncall_incident_merge_similar": true, "oncall_incident_severities": [ "Critical", "Warning" @@ -51817,6 +51958,7 @@ "oncall_incident_channel_ids": [ 456 ], + "oncall_incident_merge_similar": true, "oncall_incident_severities": [ "Critical", "Warning" @@ -52005,6 +52147,7 @@ "oncall_incident_channel_ids": [ 456 ], + "oncall_incident_merge_similar": true, "oncall_incident_severities": [ "Critical", "Warning" @@ -52117,6 +52260,7 @@ "oncall_incident_channel_ids": [ 456 ], + "oncall_incident_merge_similar": true, "oncall_incident_severities": [ "Critical", "Warning" @@ -52304,6 +52448,7 @@ "oncall_incident_channel_ids": [ 456 ], + "oncall_incident_merge_similar": false, "oncall_incident_severities": [ "Critical", "Warning" @@ -52340,6 +52485,7 @@ "oncall_incident_channel_ids": [ 456 ], + "oncall_incident_merge_similar": true, "oncall_incident_severities": [ "Critical", "Warning" @@ -52460,9 +52606,38 @@ "status": "succeeded", "trigger_kind": "schedule", "updated_at": 1780630923456 + }, + { + "account_id": 10023, + "attempts": 0, + "completed_at": 1780634400000, + "created_at": 1780634400000, + "duration_ms": 0, + "error_code": "similar_incident_fan_in", + "error_message": "joined run trun_5oDvqiG64uur6sBNsTc4u: similar to incident 88231 (score 0.94)", + "joined_session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "joined_session_name": "Weekly on-call review", + "kind": "automation_rule", + "occurrence_key": "atrig_9cVb2mN7qKs4dEa8T1rY5p:1780634400000", + "result_json": { + "incident_num": "88231", + "incident_title": "node CPU saturation", + "parent_incident_id": "88231", + "parent_run_id": "trun_5oDvqiG64uur6sBNsTc4u", + "parent_session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "reason": "similar_incident_fan_in", + "score": 0.94 + }, + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "run_id": "trun_9kLm3pQw8xz2vBn7yRt5u", + "started_at": 1780634400000, + "stats_json": {}, + "status": "skipped", + "trigger_kind": "oncall_incident", + "updated_at": 1780634400000 } ], - "total": 1 + "total": 2 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -54284,6 +54459,7 @@ "current_turn_tokens": 0, "current_turn_wait_ms": 0, "entry_kind": "web", + "has_open_tasks": false, "has_unread": true, "incognito": false, "is_mine": false, diff --git a/api-reference/openapi.zh.json b/api-reference/openapi.zh.json index 25cbdfae..12097dda 100644 --- a/api-reference/openapi.zh.json +++ b/api-reference/openapi.zh.json @@ -2955,6 +2955,14 @@ "reopen" ], "type": "string" + }, + "effective_person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "服务端解析出的实际被分配人 ID——直接指定的 `person_ids` 加上升级规则当前层成员,去重并排序。由服务端在分派时填充;Jira 等集成读取它来确定通知对象。" } }, "type": "object" @@ -3253,6 +3261,13 @@ }, "type": "array" }, + "oncall_incident_merge_similar": { + "type": [ + "boolean", + "null" + ], + "description": "当 On-call 故障触发器触发且已有相似故障的分析会话在运行时,将新故障并入该会话而不是开启新会话。省略时默认开启;存储值始终显式写入。" + }, "oncall_incident_severities": { "description": "监听的故障严重程度,支持 Critical、Warning 和 Info;创建或启用该触发器时至少需要一个值。", "items": { @@ -3378,6 +3393,10 @@ }, "type": "array" }, + "oncall_incident_merge_similar": { + "type": "boolean", + "description": "On-call 故障触发器触发时,是否将新故障并入已在运行的相似故障分析会话而不是开启新会话。此开关出现之前保存的触发器行按默认开启处理;始终返回。" + }, "oncall_incident_severities": { "description": "要监听的事故级别。支持的值为 Critical、Warning、Info;创建或启用该触发器至少需要一个值;未配置 On-call 故障触发器时省略。", "items": { @@ -3466,7 +3485,8 @@ "created_at", "updated_at", "schedule_next_fire_at_ms", - "oncall_incident_trigger_enabled" + "oncall_incident_trigger_enabled", + "oncall_incident_merge_similar" ], "type": "object" }, @@ -3605,6 +3625,13 @@ }, "type": "array" }, + "oncall_incident_merge_similar": { + "type": [ + "boolean", + "null" + ], + "description": "当 On-call 故障触发器触发且已有相似故障的分析会话在运行时,将新故障并入该会话而不是开启新会话。省略或传 null 表示不修改;此开关出现之前保存的触发器行按默认开启处理。" + }, "oncall_incident_severities": { "description": "监听的故障严重程度,支持 Critical、Warning 和 Info;创建或启用该触发器时至少需要一个值。", "items": { @@ -3702,6 +3729,14 @@ "description": "错误信息;运行未失败时为空字符串。", "type": "string" }, + "joined_session_id": { + "type": "string", + "description": "本次运行并入的分析会话 ID;仅当本次运行为 fan-in skip(`status=skipped`、`error_code=similar_incident_fan_in`,相似故障的分析已在运行,本次运行没有自己的会话)时返回,否则省略。" + }, + "joined_session_name": { + "type": "string", + "description": "并入的分析会话的显示名称,与 `session_name` 经同一批量查询填充;为空或查询失败时省略。" + }, "kind": { "description": "运行类型;按规则查询时恒为 `automation_rule`。", "enum": [ @@ -7459,6 +7494,33 @@ "description": "最后更新时间,Unix 时间戳(秒)。", "format": "int64", "type": "integer" + }, + "manage_team_id": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "description": "允许管理该数据源(更新、删除、查看凭证)的团队 ID。为 null 表示不指定管理团队——任何持有数据源管理 权限的成员都可管理。" + }, + "readonly_team_ids": { + "type": [ + "array", + "null" + ], + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "额外允许查询和引用该数据源的团队 ID 列表;管理团队始终隐含查询权限。为空或为 null 表示不限制——任何持有 数据源查看权限的成员都可查询。" + }, + "creator_id": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "description": "创建该数据源的用户 ID;通过 API(app key)创建时为账户 ID。对于早于该字段上线前创建的数据源为 null。" } }, "required": [ @@ -7472,7 +7534,10 @@ "edge_cluster_name", "updated_at", "payload", - "alerting_enabled" + "alerting_enabled", + "manage_team_id", + "readonly_team_ids", + "creator_id" ], "type": "object" }, @@ -7487,9 +7552,9 @@ "type": "object" }, "DataSourceListResponse": { - "description": "数据源列表。本接口不读取 payload 列,因此每项的 `payload` 均为 `null`。", + "description": "数据源列表。该接口不读取 `payload` 列,因此每个条目的 `payload` 均为 `null`。每个条目都带有 `my_perm`,即调用方对该数据源的权限级别。", "items": { - "$ref": "#/components/schemas/DataSourceItem" + "$ref": "#/components/schemas/DataSourceListItem" }, "type": "array" }, @@ -7535,6 +7600,27 @@ "type_ident": { "description": "数据源类型标识。支持:`prometheus`, `loki`, `mysql`, `oracle`, `postgres`, `clickhouse`, `elasticsearch`, `sls`, `tencent_cls`, `victorialogs`, `redis_node`, `redis_sentinel`, `mongodb_mongod`, `mongodb_mongos`, `kafka`。", "type": "string" + }, + "manage_team_id": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "description": "允许管理该数据源(更新、删除、查看凭证)的团队 ID。创建时省略:不指定管理团队——任何持有数据源管理权限的成员都可管理。更新时省略表示保留当前值;显式 null 表示清除。设置 `readonly_team_ids` 时必须指定管理团队,否则请求返回 `400`。", + "x-flashduty-preserve-absence": true + }, + "readonly_team_ids": { + "type": [ + "array", + "null" + ], + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "额外允许查询和引用该数据源的团队 ID 列表;管理团队始终隐含查询权限。创建时省略:不限制——任何持有 数据源查看权限的成员都可查询。更新时省略表示保留当前值;显式 null 清除并恢复为不限制。", + "x-flashduty-preserve-absence": true } }, "required": [ @@ -9149,6 +9235,10 @@ "format": "int64", "type": "integer" }, + "delivery_mode": { + "type": "string", + "description": "事件上的 IM 投递模式:`reply_only` 表示该轮直接回复而不打开交互式会话卡片;非 IM 事件省略。" + }, "error_code": { "description": "当该事件表示失败时的错误码。", "type": "string" @@ -9165,10 +9255,18 @@ "description": "标识一轮的 ADK 调用 ID。", "type": "string" }, + "is_error": { + "type": "boolean", + "description": "事件包含持久化的助手侧运行时错误证据(已脱敏的运行时错误)时为 true;控制行的载荷诊断不会设置该字段。" + }, "partial": { "description": "流式部分分片时为 true。", "type": "boolean" }, + "root_invocation_id": { + "type": "string", + "description": "根用户可见轮次的 ADK 调用 ID,父调用及其派生的所有 Subagent/A2A 延续调用共享;IM 投递用它保证每个用户问题只更新一张卡片。" + }, "session_id": { "description": "所属会话 ID。", "type": "string" @@ -12093,6 +12191,14 @@ "reopen" ], "type": "string" + }, + "effective_person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "服务端解析出的实际被分配人 ID——直接指定的 `person_ids` 加上升级规则当前层成员,去重并排序。由服务端在分派时填充;Jira 等集成读取它来确定通知对象。" } }, "type": [ @@ -17427,6 +17533,11 @@ "format": "int64", "type": "integer" }, + "pinned_at": { + "type": "integer", + "format": "int64", + "description": "调用者本人的置顶时间,Unix 毫秒时间戳;按人隔离、不共享。调用者未置顶该产物时省略。" + }, "public_url": { "description": "匿名公开链接 —— 由 CDN 承载的控制台 `/share/artifact/` 页面。仅在分享开启时返回;任何拿到链接的人无需登录即可查看。", "type": "string" @@ -23858,6 +23969,10 @@ ], "type": "string" }, + "has_open_tasks": { + "type": "boolean", + "description": "响应时该会话是否存在阻断结算的未完成任务。仅 `POST /safari/session/get` 填充此字段:字段缺省表示未知,而不是没有未完成任务;`session/list` 不返回此字段。" + }, "has_unread": { "description": "当存在调用者尚未查看的助手输出时为 true。", "type": "boolean" @@ -29395,6 +29510,30 @@ ] } } + }, + "DataSourceListItem": { + "description": "列表接口返回的监控数据源:完整的数据源记录加上调用方对它的权限级别。", + "allOf": [ + { + "$ref": "#/components/schemas/DataSourceItem" + }, + { + "type": "object", + "required": [ + "my_perm" + ], + "properties": { + "my_perm": { + "type": "string", + "enum": [ + "manage", + "readonly" + ], + "description": "调用方对该数据源的权限级别:`manage`(可更新、删除、查看凭证、查询)或 `readonly`(仅可查询和引用)。通过 app key 调用的调用方始终为 `manage`。" + } + } + } + ] } }, "securitySchemes": { @@ -42813,7 +42952,7 @@ "Monitors/告警数据源" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源管理**(`monit`) |\n\n## 使用说明\n\n- `type_ident` 必须为以下之一:`prometheus`、`loki`、`mysql`、`oracle`、`postgres`、`clickhouse`、`elasticsearch`、`sls`、`tencent_cls`、`victorialogs`、`redis_node`、`redis_sentinel`、`mongodb_mongod`、`mongodb_mongos`、`kafka`。\n- `edge_cluster_name` 指定使用该数据源进行规则评估的 Monitors Edge 集群。\n- 对于 `elasticsearch`,`payload.elasticsearch.deployment` 须设为 `cloud` 或 `self-managed`。\n- 每次调用都会记录到账户审计日志,仅通过凭据字段配置连接凭据。\n\n完整支持类型与凭据行为见请求/响应 Schema。仅诊断类型不能启用告警。创建时省略 enabled 默认为 true,更新时省略保留当前值;enabled 或 alerting_enabled 的显式 null 非法。诊断密码及 Kafka 私钥在响应中省略,环境变量引用除外;更新时省略秘密字段保留原值,空字符串清除。其他数据源凭据可能返回,应作为敏感数据处理。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源管理**(`monit`) |\n\n## 使用说明\n\n- `manage_team_id` 与 `readonly_team_ids` 控制团队级授权:管理团队可更新、删除、查看凭证;readonly 团队可查询和引用。两者默认省略(不限制)。设置 `readonly_team_ids` 时必须在同一请求中给出 `manage_team_id`,否则调用返回 `400`。\n- `type_ident` 必须为以下之一:`prometheus`、`loki`、`mysql`、`oracle`、`postgres`、`clickhouse`、`elasticsearch`、`sls`、`tencent_cls`、`victorialogs`、`redis_node`、`redis_sentinel`、`mongodb_mongod`、`mongodb_mongos`、`kafka`。\n- `edge_cluster_name` 指定使用该数据源进行规则评估的 Monitors Edge 集群。\n- 对于 `elasticsearch`,`payload.elasticsearch.deployment` 须设为 `cloud` 或 `self-managed`。\n- 每次调用都会记录到账户审计日志,仅通过凭据字段配置连接凭据。\n\n完整支持类型与凭据行为见请求/响应 Schema。仅诊断类型不能启用告警。创建时省略 enabled 默认为 true,更新时省略保留当前值;enabled 或 alerting_enabled 的显式 null 非法。诊断密码及 Kafka 私钥在响应中省略,环境变量引用除外;更新时省略秘密字段保留原值,空字符串清除。其他数据源凭据可能返回,应作为敏感数据处理。", "href": "/zh/api-reference/monitors/data-sources/monit-datasource-write-create", "metadata": { "sidebarTitle": "创建数据源" @@ -43014,7 +43153,8 @@ "note": "Production Prometheus", "payload": null, "type_ident": "prometheus", - "updated_at": 1712000000 + "updated_at": 1712000000, + "my_perm": "manage" } ], "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" @@ -43056,7 +43196,7 @@ "Monitors/告警数据源" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源查看**(`monit`) |\n\n## 使用说明\n\n- 省略 `type_ident` 可返回所有类型的数据源。\n- 列表响应中不返回敏感凭证字段(密码、密钥)。\n\n完整支持类型与凭据行为见请求/响应 Schema。仅诊断类型不能启用告警。创建时省略 enabled 默认为 true,更新时省略保留当前值;enabled 或 alerting_enabled 的显式 null 非法。诊断密码及 Kafka 私钥在响应中省略,环境变量引用除外;更新时省略秘密字段保留原值,空字符串清除。其他数据源凭据可能返回,应作为敏感数据处理。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源查看**(`monit`) |\n\n## 使用说明\n\n- 仅返回调用方可查询的数据源,每个条目带有 `my_perm`——调用方的权限级别(`manage` 或 `readonly`)。通过 app key 调用可看到全部数据源,`my_perm` 均为 `manage`。\n- 省略 `type_ident` 可返回所有类型的数据源。\n- 列表响应中不返回敏感凭证字段(密码、密钥)。\n\n完整支持类型与凭据行为见请求/响应 Schema。仅诊断类型不能启用告警。创建时省略 enabled 默认为 true,更新时省略保留当前值;enabled 或 alerting_enabled 的显式 null 非法。诊断密码及 Kafka 私钥在响应中省略,环境变量引用除外;更新时省略秘密字段保留原值,空字符串清除。其他数据源凭据可能返回,应作为敏感数据处理。", "href": "/zh/api-reference/monitors/data-sources/monit-datasource-read-list", "metadata": { "sidebarTitle": "查询数据源列表" @@ -43531,7 +43671,7 @@ "Monitors/告警数据源" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源管理**(`monit`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,仅通过凭据字段配置连接凭据。\n\n完整支持类型与凭据行为见请求/响应 Schema。仅诊断类型不能启用告警。创建时省略 enabled 默认为 true,更新时省略保留当前值;enabled 或 alerting_enabled 的显式 null 非法。诊断密码及 Kafka 私钥在响应中省略,环境变量引用除外;更新时省略秘密字段保留原值,空字符串清除。其他数据源凭据可能返回,应作为敏感数据处理。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源管理**(`monit`) |\n\n## 使用说明\n\n- `manage_team_id` 与 `readonly_team_ids` 按是否传入生效:省略表示保留当前值;显式 null 表示清除。设置 `readonly_team_ids` 要求 `manage_team_id` 保持有效——合并后的状态若限制了查询权限却没有管理团队,调用返回 `400`。\n- 每次调用都会记录到账户审计日志,仅通过凭据字段配置连接凭据。\n\n完整支持类型与凭据行为见请求/响应 Schema。仅诊断类型不能启用告警。创建时省略 enabled 默认为 true,更新时省略保留当前值;enabled 或 alerting_enabled 的显式 null 非法。诊断密码及 Kafka 私钥在响应中省略,环境变量引用除外;更新时省略秘密字段保留原值,空字符串清除。其他数据源凭据可能返回,应作为敏感数据处理。", "href": "/zh/api-reference/monitors/data-sources/monit-datasource-write-update", "metadata": { "sidebarTitle": "更新数据源" @@ -51756,7 +51896,7 @@ "AI SRE/产物" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **100 次/分钟**;**10 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 成功响应有两种形式:302 重定向到短期有效的对象存储预签名 URL(存储在 S3 兼容存储中的文件),或 200 二进制流(托管在自托管 runner 上的文件)。请跟随重定向。\n- 响应携带 `Cache-Control: private, no-store` —— 网关不会缓存。\n", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 成功响应有两种形式:302 重定向到短期有效的对象存储预签名 URL(存储在 S3 兼容存储中的文件),或 200 二进制流(托管在自托管 runner 上的文件)。请跟随重定向。\n- 响应携带 `Cache-Control: private, no-store` —— 网关不会缓存。\n", "href": "/zh/api-reference/ai-sre/artifacts/artifact-read-stream", "metadata": { "sidebarTitle": "下载或预览文件" @@ -51779,6 +51919,7 @@ "oncall_incident_channel_ids": [ 456 ], + "oncall_incident_merge_similar": true, "oncall_incident_severities": [ "Critical", "Warning" @@ -51817,6 +51958,7 @@ "oncall_incident_channel_ids": [ 456 ], + "oncall_incident_merge_similar": true, "oncall_incident_severities": [ "Critical", "Warning" @@ -52005,6 +52147,7 @@ "oncall_incident_channel_ids": [ 456 ], + "oncall_incident_merge_similar": true, "oncall_incident_severities": [ "Critical", "Warning" @@ -52117,6 +52260,7 @@ "oncall_incident_channel_ids": [ 456 ], + "oncall_incident_merge_similar": true, "oncall_incident_severities": [ "Critical", "Warning" @@ -52304,6 +52448,7 @@ "oncall_incident_channel_ids": [ 456 ], + "oncall_incident_merge_similar": false, "oncall_incident_severities": [ "Critical", "Warning" @@ -52340,6 +52485,7 @@ "oncall_incident_channel_ids": [ 456 ], + "oncall_incident_merge_similar": true, "oncall_incident_severities": [ "Critical", "Warning" @@ -52460,9 +52606,38 @@ "status": "succeeded", "trigger_kind": "schedule", "updated_at": 1780630923456 + }, + { + "account_id": 10023, + "attempts": 0, + "completed_at": 1780634400000, + "created_at": 1780634400000, + "duration_ms": 0, + "error_code": "similar_incident_fan_in", + "error_message": "joined run trun_5oDvqiG64uur6sBNsTc4u: similar to incident 88231 (score 0.94)", + "joined_session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "joined_session_name": "Weekly on-call review", + "kind": "automation_rule", + "occurrence_key": "atrig_9cVb2mN7qKs4dEa8T1rY5p:1780634400000", + "result_json": { + "incident_num": "88231", + "incident_title": "node CPU saturation", + "parent_incident_id": "88231", + "parent_run_id": "trun_5oDvqiG64uur6sBNsTc4u", + "parent_session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "reason": "similar_incident_fan_in", + "score": 0.94 + }, + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "run_id": "trun_9kLm3pQw8xz2vBn7yRt5u", + "started_at": 1780634400000, + "stats_json": {}, + "status": "skipped", + "trigger_kind": "oncall_incident", + "updated_at": 1780634400000 } ], - "total": 1 + "total": 2 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -54284,6 +54459,7 @@ "current_turn_tokens": 0, "current_turn_wait_ms": 0, "entry_kind": "web", + "has_open_tasks": false, "has_unread": true, "incognito": false, "is_mine": false, diff --git a/api-reference/safari.openapi.en.json b/api-reference/safari.openapi.en.json index 3ede44fa..e6ec014a 100644 --- a/api-reference/safari.openapi.en.json +++ b/api-reference/safari.openapi.en.json @@ -730,7 +730,8 @@ "oncall_incident_severities": [ "Critical", "Warning" - ] + ], + "oncall_incident_merge_similar": true } } } @@ -775,7 +776,8 @@ "oncall_incident_severities": [ "Critical", "Warning" - ] + ], + "oncall_incident_merge_similar": true } } } @@ -933,7 +935,8 @@ "oncall_incident_severities": [ "Critical", "Warning" - ] + ], + "oncall_incident_merge_similar": true } } } @@ -1045,7 +1048,8 @@ "oncall_incident_severities": [ "Critical", "Warning" - ] + ], + "oncall_incident_merge_similar": true } ] } @@ -1257,7 +1261,8 @@ "oncall_incident_severities": [ "Critical", "Warning" - ] + ], + "oncall_incident_merge_similar": true } } } @@ -1298,7 +1303,8 @@ ], "oncall_incident_channel_ids": [ 456 - ] + ], + "oncall_incident_merge_similar": false } } } @@ -1348,7 +1354,7 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "total": 1, + "total": 2, "runs": [ { "run_id": "trun_5oDvqiG64uur6sBNsTc4u", @@ -1372,6 +1378,35 @@ }, "created_at": 1780630800000, "updated_at": 1780630923456 + }, + { + "run_id": "trun_9kLm3pQw8xz2vBn7yRt5u", + "kind": "automation_rule", + "account_id": 10023, + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "trigger_kind": "oncall_incident", + "occurrence_key": "atrig_9cVb2mN7qKs4dEa8T1rY5p:1780634400000", + "status": "skipped", + "attempts": 0, + "started_at": 1780634400000, + "completed_at": 1780634400000, + "duration_ms": 0, + "error_code": "similar_incident_fan_in", + "error_message": "joined run trun_5oDvqiG64uur6sBNsTc4u: similar to incident 88231 (score 0.94)", + "stats_json": {}, + "result_json": { + "reason": "similar_incident_fan_in", + "parent_run_id": "trun_5oDvqiG64uur6sBNsTc4u", + "parent_session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "parent_incident_id": "88231", + "score": 0.94, + "incident_num": "88231", + "incident_title": "node CPU saturation" + }, + "joined_session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "joined_session_name": "Weekly on-call review", + "created_at": 1780634400000, + "updated_at": 1780634400000 } ] } @@ -2342,6 +2377,7 @@ "pinned_at": 0, "last_event_at": 1780367992649, "is_running": false, + "has_open_tasks": false, "has_unread": true, "current_turn_started_at": 0, "current_turn_active_ms": 0, @@ -4430,7 +4466,7 @@ } ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/minute**; **10 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Success has two forms: a `302` redirect to a short-lived presigned object-storage URL (files stored in S3-compatible storage), or a `200` binary stream (files hosted on a self-hosted runner). Follow redirects.\n- Responses carry `Cache-Control: private, no-store` — they are never cached by the gateway.\n", + "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- Success has two forms: a `302` redirect to a short-lived presigned object-storage URL (files stored in S3-compatible storage), or a `200` binary stream (files hosted on a self-hosted runner). Follow redirects.\n- Responses carry `Cache-Control: private, no-store` — they are never cached by the gateway.\n", "href": "/en/api-reference/ai-sre/artifacts/artifact-read-stream", "metadata": { "sidebarTitle": "Download or preview a file" @@ -5625,6 +5661,13 @@ ] }, "description": "Incident severities to watch. Supported values are Critical, Warning, and Info; creating or enabling this trigger requires at least one value." + }, + "oncall_incident_merge_similar": { + "type": [ + "boolean", + "null" + ], + "description": "When the On-call incident trigger fires and an analysis session is already running for a similar incident, fold the new incident into that running analysis instead of starting a new session. Defaults to on when omitted; the stored value is always explicit." } }, "required": [ @@ -5758,6 +5801,10 @@ }, "description": "Incident severities to watch. Supported values are Critical, Warning, and Info; creating or enabling this trigger requires at least one value. Omitted when no On-call incident trigger is configured." }, + "oncall_incident_merge_similar": { + "type": "boolean", + "description": "Whether the On-call incident trigger folds a new incident into an already-running analysis session for a similar incident instead of starting a new one. A trigger row saved before this switch existed reads as the default, on; always present." + }, "http_post_token": { "type": "string", "description": "HTTP POST trigger token. Returned only on create or token rotation; save it immediately." @@ -5801,7 +5848,8 @@ "created_at", "updated_at", "schedule_next_fire_at_ms", - "oncall_incident_trigger_enabled" + "oncall_incident_trigger_enabled", + "oncall_incident_merge_similar" ] }, "AutomationRuleListRequest": { @@ -5993,6 +6041,13 @@ }, "description": "Incident severities to watch. Supported values are Critical, Warning, and Info; creating or enabling this trigger requires at least one value." }, + "oncall_incident_merge_similar": { + "type": [ + "boolean", + "null" + ], + "description": "When the On-call incident trigger fires and an analysis session is already running for a similar incident, fold the new incident into that running analysis instead of starting a new session. Omit or send null to leave unchanged; a trigger row saved before this switch existed reads as the default, on." + }, "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." @@ -6017,6 +6072,14 @@ "type": "string", "description": "Display name of the run's session, stamped via a batch lookup. Omitted when empty or when the lookup fails." }, + "joined_session_id": { + "type": "string", + "description": "Analysis session this run was folded into, set only when the run is a fan-in skip (`status=skipped`, `error_code=similar_incident_fan_in`): a similar incident's analysis was already running, so this run has no session of its own. Omitted otherwise." + }, + "joined_session_name": { + "type": "string", + "description": "Display name of the joined analysis session, stamped via the same batch lookup as `session_name`. Omitted when empty or when the lookup fails." + }, "kind": { "type": "string", "description": "Run kind; runs listed for a rule are always `automation_rule`.", @@ -6465,6 +6528,18 @@ "type": "string", "description": "ADK invocation id grouping a turn." }, + "root_invocation_id": { + "type": "string", + "description": "ADK invocation id of the root user-visible turn, shared by the parent invocation and every subagent/A2A continuation invocation it spawned; IM delivery uses it to update one card per user question." + }, + "delivery_mode": { + "type": "string", + "description": "IM delivery mode stamped on the event: `reply_only` when the turn answers without opening an interactive session card. Omitted on non-IM events." + }, + "is_error": { + "type": "boolean", + "description": "True when the event carries durable assistant-side runtime error evidence (a sanitized runtime error); control-row payload diagnostics never set it." + }, "author": { "type": "string", "description": "Event author (e.g. user, the agent name)." @@ -7444,6 +7519,10 @@ "type": "integer", "description": "Number of process-type tasks (background shell or monitor) still alive when the response was rendered." }, + "has_open_tasks": { + "type": "boolean", + "description": "Whether the session has any settlement-blocking open task at response time. Populated only by `POST /safari/session/get`: its absence means unknown, not no open tasks; `session/list` never sets it." + }, "has_unread": { "type": "boolean", "description": "True when there is assistant output the caller has not yet viewed." @@ -8600,6 +8679,11 @@ "format": "int64", "description": "Unix timestamp in milliseconds when the artifact was last updated (rename, transfer, or republish)." }, + "pinned_at": { + "type": "integer", + "format": "int64", + "description": "The calling person's own pin time as a Unix timestamp in milliseconds; per-person, never shared. Omitted when the caller has not pinned this artifact." + }, "share_enabled": { "type": "boolean", "description": "Whether anonymous public sharing is on. Omitted when false." diff --git a/api-reference/safari.openapi.zh.json b/api-reference/safari.openapi.zh.json index 3b78f429..7148b1cd 100644 --- a/api-reference/safari.openapi.zh.json +++ b/api-reference/safari.openapi.zh.json @@ -730,7 +730,8 @@ "oncall_incident_severities": [ "Critical", "Warning" - ] + ], + "oncall_incident_merge_similar": true } } } @@ -775,7 +776,8 @@ "oncall_incident_severities": [ "Critical", "Warning" - ] + ], + "oncall_incident_merge_similar": true } } } @@ -933,7 +935,8 @@ "oncall_incident_severities": [ "Critical", "Warning" - ] + ], + "oncall_incident_merge_similar": true } } } @@ -1045,7 +1048,8 @@ "oncall_incident_severities": [ "Critical", "Warning" - ] + ], + "oncall_incident_merge_similar": true } ] } @@ -1257,7 +1261,8 @@ "oncall_incident_severities": [ "Critical", "Warning" - ] + ], + "oncall_incident_merge_similar": true } } } @@ -1298,7 +1303,8 @@ ], "oncall_incident_channel_ids": [ 456 - ] + ], + "oncall_incident_merge_similar": false } } } @@ -1348,7 +1354,7 @@ "example": { "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", "data": { - "total": 1, + "total": 2, "runs": [ { "run_id": "trun_5oDvqiG64uur6sBNsTc4u", @@ -1372,6 +1378,35 @@ }, "created_at": 1780630800000, "updated_at": 1780630923456 + }, + { + "run_id": "trun_9kLm3pQw8xz2vBn7yRt5u", + "kind": "automation_rule", + "account_id": 10023, + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "trigger_kind": "oncall_incident", + "occurrence_key": "atrig_9cVb2mN7qKs4dEa8T1rY5p:1780634400000", + "status": "skipped", + "attempts": 0, + "started_at": 1780634400000, + "completed_at": 1780634400000, + "duration_ms": 0, + "error_code": "similar_incident_fan_in", + "error_message": "joined run trun_5oDvqiG64uur6sBNsTc4u: similar to incident 88231 (score 0.94)", + "stats_json": {}, + "result_json": { + "reason": "similar_incident_fan_in", + "parent_run_id": "trun_5oDvqiG64uur6sBNsTc4u", + "parent_session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "parent_incident_id": "88231", + "score": 0.94, + "incident_num": "88231", + "incident_title": "node CPU saturation" + }, + "joined_session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "joined_session_name": "Weekly on-call review", + "created_at": 1780634400000, + "updated_at": 1780634400000 } ] } @@ -2342,6 +2377,7 @@ "pinned_at": 0, "last_event_at": 1780367992649, "is_running": false, + "has_open_tasks": false, "has_unread": true, "current_turn_started_at": 0, "current_turn_active_ms": 0, @@ -4430,7 +4466,7 @@ } ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **100 次/分钟**;**10 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 成功响应有两种形式:302 重定向到短期有效的对象存储预签名 URL(存储在 S3 兼容存储中的文件),或 200 二进制流(托管在自托管 runner 上的文件)。请跟随重定向。\n- 响应携带 `Cache-Control: private, no-store` —— 网关不会缓存。\n", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 成功响应有两种形式:302 重定向到短期有效的对象存储预签名 URL(存储在 S3 兼容存储中的文件),或 200 二进制流(托管在自托管 runner 上的文件)。请跟随重定向。\n- 响应携带 `Cache-Control: private, no-store` —— 网关不会缓存。\n", "href": "/zh/api-reference/ai-sre/artifacts/artifact-read-stream", "metadata": { "sidebarTitle": "下载或预览文件" @@ -5625,6 +5661,13 @@ ] }, "description": "监听的故障严重程度,支持 Critical、Warning 和 Info;创建或启用该触发器时至少需要一个值。" + }, + "oncall_incident_merge_similar": { + "type": [ + "boolean", + "null" + ], + "description": "当 On-call 故障触发器触发且已有相似故障的分析会话在运行时,将新故障并入该会话而不是开启新会话。省略时默认开启;存储值始终显式写入。" } }, "required": [ @@ -5758,6 +5801,10 @@ }, "description": "要监听的事故级别。支持的值为 Critical、Warning、Info;创建或启用该触发器至少需要一个值;未配置 On-call 故障触发器时省略。" }, + "oncall_incident_merge_similar": { + "type": "boolean", + "description": "On-call 故障触发器触发时,是否将新故障并入已在运行的相似故障分析会话而不是开启新会话。此开关出现之前保存的触发器行按默认开启处理;始终返回。" + }, "http_post_token": { "type": "string", "description": "HTTP POST trigger token。只在创建或轮换 token 的响应中返回;请立即保存。" @@ -5801,7 +5848,8 @@ "created_at", "updated_at", "schedule_next_fire_at_ms", - "oncall_incident_trigger_enabled" + "oncall_incident_trigger_enabled", + "oncall_incident_merge_similar" ] }, "AutomationRuleListRequest": { @@ -5993,6 +6041,13 @@ }, "description": "监听的故障严重程度,支持 Critical、Warning 和 Info;创建或启用该触发器时至少需要一个值。" }, + "oncall_incident_merge_similar": { + "type": [ + "boolean", + "null" + ], + "description": "当 On-call 故障触发器触发且已有相似故障的分析会话在运行时,将新故障并入该会话而不是开启新会话。省略或传 null 表示不修改;此开关出现之前保存的触发器行按默认开启处理。" + }, "rotate_http_post_trigger_token": { "type": "boolean", "description": "是否轮换 HTTP POST trigger token。新 token 只会在本次响应中返回。" @@ -6017,6 +6072,14 @@ "type": "string", "description": "运行会话的显示名称,批量查询填充;为空或查询失败时省略。" }, + "joined_session_id": { + "type": "string", + "description": "本次运行并入的分析会话 ID;仅当本次运行为 fan-in skip(`status=skipped`、`error_code=similar_incident_fan_in`,相似故障的分析已在运行,本次运行没有自己的会话)时返回,否则省略。" + }, + "joined_session_name": { + "type": "string", + "description": "并入的分析会话的显示名称,与 `session_name` 经同一批量查询填充;为空或查询失败时省略。" + }, "kind": { "type": "string", "description": "运行类型;按规则查询时恒为 `automation_rule`。", @@ -6465,6 +6528,18 @@ "type": "string", "description": "标识一轮的 ADK 调用 ID。" }, + "root_invocation_id": { + "type": "string", + "description": "根用户可见轮次的 ADK 调用 ID,父调用及其派生的所有 Subagent/A2A 延续调用共享;IM 投递用它保证每个用户问题只更新一张卡片。" + }, + "delivery_mode": { + "type": "string", + "description": "事件上的 IM 投递模式:`reply_only` 表示该轮直接回复而不打开交互式会话卡片;非 IM 事件省略。" + }, + "is_error": { + "type": "boolean", + "description": "事件包含持久化的助手侧运行时错误证据(已脱敏的运行时错误)时为 true;控制行的载荷诊断不会设置该字段。" + }, "author": { "type": "string", "description": "事件作者(如 user 或智能体名称)。" @@ -7444,6 +7519,10 @@ "type": "integer", "description": "渲染响应时仍存活的进程型任务数(后台命令或 monitor)。" }, + "has_open_tasks": { + "type": "boolean", + "description": "响应时该会话是否存在阻断结算的未完成任务。仅 `POST /safari/session/get` 填充此字段:字段缺省表示未知,而不是没有未完成任务;`session/list` 不返回此字段。" + }, "has_unread": { "type": "boolean", "description": "当存在调用者尚未查看的助手输出时为 true。" @@ -8600,6 +8679,11 @@ "format": "int64", "description": "产物最近一次更新(重命名、转移或重新发布)的 Unix 毫秒时间戳。" }, + "pinned_at": { + "type": "integer", + "format": "int64", + "description": "调用者本人的置顶时间,Unix 毫秒时间戳;按人隔离、不共享。调用者未置顶该产物时省略。" + }, "share_enabled": { "type": "boolean", "description": "是否已开启匿名公开分享。为 false 时不返回该字段。" diff --git a/docs.json b/docs.json index 18bd345c..2c9968d9 100644 --- a/docs.json +++ b/docs.json @@ -2741,7 +2741,6 @@ "POST /member/role/revoke", "POST /member/role/update", "POST /member/info/reset", - "POST /member/notify", "POST /person/infos" ] }, @@ -4120,7 +4119,6 @@ "POST /member/role/revoke", "POST /member/role/update", "POST /member/info/reset", - "POST /member/notify", "POST /person/infos" ] }, diff --git a/en/openapi/api-catalog.mdx b/en/openapi/api-catalog.mdx index 54265f2f..11fabfba 100644 --- a/en/openapi/api-catalog.mdx +++ b/en/openapi/api-catalog.mdx @@ -3,7 +3,7 @@ title: "API Catalog" description: "Complete list of Flashduty Open API endpoints, organized by product module with links to detailed documentation" --- -Flashduty Open API provides **338** endpoints covering five major modules: On-call, Monitors, RUM, AI SRE, and Platform. All endpoints use unified authentication and request specifications. See [Quick Start](/en/openapi/introduction) for details. +Flashduty Open API provides **337** endpoints covering five major modules: On-call, Monitors, RUM, AI SRE, and Platform. All endpoints use unified authentication and request specifications. See [Quick Start](/en/openapi/introduction) for details. All endpoint URLs use `https://api.flashcat.cloud` as the base, authenticated via APP Key through query string. @@ -519,7 +519,7 @@ Only plain human messages are projected: rows produced by internal producers (au - + ### Members @@ -533,7 +533,6 @@ Only plain human messages are projected: rows produced by internal producers (au | POST | [`/member/role/revoke`](/en/api-reference/platform/members/member-revoke-role) | Revoke role from member | | POST | [`/member/role/update`](/en/api-reference/platform/members/member-update-role) | Update member roles | | POST | [`/member/info/reset`](/en/api-reference/platform/members/member-reset-info) | Reset member info | -| POST | [`/member/notify`](/en/api-reference/platform/members/member-notify) | Notify members | | POST | [`/person/infos`](/en/api-reference/platform/members/person-infos) | Batch get persons | ### Teams diff --git a/zh/openapi/api-catalog.mdx b/zh/openapi/api-catalog.mdx index 2b8550a7..756172f3 100644 --- a/zh/openapi/api-catalog.mdx +++ b/zh/openapi/api-catalog.mdx @@ -3,7 +3,7 @@ title: "API 目录" description: "Flashduty Open API 接口完整列表,按产品模块组织并链接到详细文档" --- -Flashduty Open API 提供 **338** 个接口,覆盖 On-call、Monitors、RUM、AI SRE 和平台五个主要模块。所有接口使用统一认证方式和请求规范。详情参见[快速开始](/zh/openapi/introduction)。 +Flashduty Open API 提供 **337** 个接口,覆盖 On-call、Monitors、RUM、AI SRE 和平台五个主要模块。所有接口使用统一认证方式和请求规范。详情参见[快速开始](/zh/openapi/introduction)。 所有接口 URL 均以 `https://api.flashcat.cloud` 为 base,通过 query string 中的 APP Key 认证。 @@ -519,7 +519,7 @@ Flashduty Open API 提供 **338** 个接口,覆盖 On-call、Monitors、RUM、 - + ### 成员管理 @@ -533,7 +533,6 @@ Flashduty Open API 提供 **338** 个接口,覆盖 On-call、Monitors、RUM、 | POST | [`/member/role/revoke`](/zh/api-reference/platform/members/member-revoke-role) | 解除成员角色 | | POST | [`/member/role/update`](/zh/api-reference/platform/members/member-update-role) | 更新成员角色 | | POST | [`/member/info/reset`](/zh/api-reference/platform/members/member-reset-info) | 重置成员信息 | -| POST | [`/member/notify`](/zh/api-reference/platform/members/member-notify) | 通知成员 | | POST | [`/person/infos`](/zh/api-reference/platform/members/person-infos) | 批量获取人员信息 | ### 团队管理