diff --git a/api-reference/openapi.en.json b/api-reference/openapi.en.json index 3b08147..9e4a04d 100644 --- a/api-reference/openapi.en.json +++ b/api-reference/openapi.en.json @@ -16342,7 +16342,7 @@ "RUM/Issues" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `start_time` and `end_time` are millisecond timestamps. Maximum range: 183 days.\n- `statuses` filters by issue status. Valid values: `for_review`, `reviewed`, `ignored`, `resolved`.\n- `orderby` accepts: `created_at`, `updated_at`, `session_count`, `error_count`.\n- Use `dql` or `sql` for advanced filtering. Cannot provide both.", + "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- `start_time` and `end_time` are millisecond timestamps. Maximum range: 183 days.\n- `statuses` filters by issue status. Valid values: `for_review`, `reviewed`, `ignored`, `resolved`.\n- `orderby` accepts: `created_at`, `updated_at`, `session_count`, `error_count`, `severity`.\n- Use `dql` or `sql` for advanced filtering. Cannot provide both.", "href": "/en/api-reference/rum/issues/rum-issue-read-list", "metadata": { "sidebarTitle": "List issues" @@ -16494,6 +16494,96 @@ } } }, + "/rum/issue/export": { + "post": { + "operationId": "rum-issue-read-export", + "summary": "Export issues as CSV", + "description": "Export the filtered RUM error tracking issues as a CSV file. The response is a `text/csv` stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope; non-console callers can read the `X-Export-Total` and `X-Export-Truncated` response headers.", + "tags": [ + "RUM/Issues" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **200 requests/day**; **100 requests/minute**; **10 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The response is a `text/csv` stream delivered with `Content-Disposition: attachment` — it is not wrapped in the standard envelope. The filename is `rum-issues-.csv`, stamped in the requested `time_zone`. Read `X-Export-Total` and `X-Export-Truncated` response headers instead of a body field.\n- The export reads the first 100 matching rows (`ExportMaxRows`); `X-Export-Truncated` is `true` when more issues match. `p` and `limit` are ignored.\n- The request filters are exactly those of `POST /rum/issue/list` — an export is \"what I am looking at, as a file\".\n- `export_fields` names the CSV columns in the order they appear. Unknown keys are rejected with a parameter error; an empty array uses the default column set.\n- `time_zone` must be a valid IANA zone name (e.g. `Asia/Shanghai`, `UTC`); timestamps are rendered in that zone and time columns carry the zone in their header. Invalid names are rejected.\n- `console_origin` is used to build the `issue_url` column; the service cannot infer it (SaaS, on-premises and dev releases answer on different origins).\n- Every call is recorded in the account's audit log with the caller's member ID, request payload, and resulting error (if any). Do not put secrets in request fields.", + "href": "/en/api-reference/rum/issues/rum-issue-read-export", + "metadata": { + "sidebarTitle": "Export issues as CSV" + } + }, + "responses": { + "200": { + "description": "Success. CSV attachment, not a JSON envelope.", + "headers": { + "X-Export-Total": { + "description": "Total number of issues matching the filters, before the row cap.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "X-Export-Truncated": { + "description": "`true` when more issues matched than the 100-row cap and the file was truncated.", + "schema": { + "type": "boolean" + } + } + }, + "content": { + "text/csv": { + "schema": { + "type": "string", + "description": "CSV file content. The header row matches the exported columns in order; values are sanitized against spreadsheet formula injection." + }, + "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" + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RumIssueExportRequest" + }, + "example": { + "start_time": 1772611200000, + "end_time": 1775961914595, + "application_ids": [ + "eWbr4xk3ZRnLabRa6unqwD" + ], + "statuses": [ + "for_review" + ], + "orderby": "updated_at", + "export_fields": [ + "issue_id", + "error_type", + "error_message", + "status", + "error_count", + "session_count", + "last_seen_at" + ], + "console_origin": "https://console.flashcat.cloud", + "time_zone": "Asia/Shanghai" + } + } + } + } + } + }, "/rum/issue/update": { "post": { "operationId": "rum-issue-write-update", @@ -45482,6 +45572,143 @@ } } }, + "RumIssueExportRequest": { + "type": "object", + "required": [ + "start_time", + "end_time" + ], + "description": "Filters for exporting RUM error tracking issues to CSV.", + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "Start of the time range, Unix epoch milliseconds." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "End of time range, millisecond timestamp. Maximum range: 183 days." + }, + "application_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by application IDs. Get IDs via `POST /rum/application/list`." + }, + "dql": { + "type": "string", + "description": "DQL query for advanced filtering. Cannot be used with `sql`." + }, + "sql": { + "type": "string", + "description": "SQL-style query for advanced filtering. Cannot be used with `dql`." + }, + "statuses": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "for_review", + "reviewed", + "ignored", + "resolved" + ] + }, + "description": "Filter by status; only the enum values are accepted — any other value is rejected with a parameter error." + }, + "suspected_causes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "api.failed_request", + "network.error", + "code.exception", + "code.invalid_object_access", + "code.invalid_argument", + "unknown" + ] + }, + "description": "Filter by suspected cause; see the enum for valid values." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by team IDs. Get team IDs via `POST /team/list`." + }, + "p": { + "type": "integer", + "description": "Page number (1-based). Ignored by the export — the first 100 matching rows are always read." + }, + "limit": { + "type": "integer", + "description": "Page size (1–100). Ignored by the export — the row cap is fixed at 100." + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at", + "session_count", + "error_count", + "severity" + ], + "description": "Sort field; defaults to `updated_at` when omitted." + }, + "asc": { + "type": "boolean", + "description": "Sort ascending when `true`; descending by default." + }, + "error_required": { + "type": "boolean", + "description": "If `true`, only export issues with at least one associated error event." + }, + "by_intersection": { + "type": "boolean", + "description": "When `true`, match by time-range overlap: export issues still active within the window (`last_seen_timestamp` >= `start_time`) even if created before it. Default `false` exports only issues created inside the window." + }, + "export_fields": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "issue_id", + "issue_url", + "application_name", + "service", + "error_type", + "error_message", + "status", + "severity", + "is_crash", + "error_count", + "session_count", + "first_seen_at", + "first_seen_version", + "last_seen_at", + "last_seen_version", + "versions", + "suspected_cause", + "resolved_at" + ] + }, + "description": "CSV columns to export, in the order they appear. Unknown keys are rejected with a parameter error; an empty array uses the default column set." + }, + "console_origin": { + "type": "string", + "description": "Console origin used to build the `issue_url` column, e.g. `https://console.flashcat.cloud`. The service cannot infer it (SaaS, on-premises and dev releases answer on different origins)." + }, + "time_zone": { + "type": "string", + "description": "IANA time zone used to render timestamps in the CSV, e.g. `Asia/Shanghai` or `UTC`. Default: `Asia/Shanghai`." + } + } + }, "RumIssueItem": { "type": "object", "description": "A RUM error tracking issue.", @@ -45751,7 +45978,8 @@ "created_at", "updated_at", "session_count", - "error_count" + "error_count", + "severity" ], "description": "Sort field; defaults to `updated_at` when omitted." }, diff --git a/api-reference/openapi.zh.json b/api-reference/openapi.zh.json index b01a2df..80598d6 100644 --- a/api-reference/openapi.zh.json +++ b/api-reference/openapi.zh.json @@ -16486,6 +16486,96 @@ } } }, + "/rum/issue/export": { + "post": { + "operationId": "rum-issue-read-export", + "summary": "导出 Issue 列表", + "description": "将符合过滤条件的 RUM 异常追踪 Issue 导出为 CSV 文件。响应为 `text/csv` 流,通过 `Content-Disposition: attachment` 交付——不是 JSON 信封;非控制台调用方可通过 `X-Export-Total` 与 `X-Export-Truncated` 响应头获知匹配总数与截断情况。", + "tags": [ + "RUM/RUM 问题跟踪" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **200 次/天**;**100 次/分钟**;**10 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 响应为 `text/csv` 流,通过 `Content-Disposition: attachment` 交付——不使用标准信封。文件名为 `rum-issues-<时间戳>.csv`,按请求的 `time_zone` 打时间戳。请通过 `X-Export-Total` 与 `X-Export-Truncated` 响应头获取总数与截断情况。\n- 导出读取前 100 条匹配记录(`ExportMaxRows`);匹配数超过上限时 `X-Export-Truncated` 为 `true`。`p` 和 `limit` 被忽略。\n- 请求过滤条件与 `POST /rum/issue/list` 完全一致——导出就是“我正在看的列表,输出成文件”。\n- `export_fields` 按顺序指定 CSV 列;未知键会被拒绝;空数组使用默认列集。\n- `time_zone` 必须是合法的 IANA 时区名(如 `Asia/Shanghai`、`UTC`);时间戳按该时区渲染,时间列表头携带时区。非法时区名会被拒绝。\n- `console_origin` 用于拼接 `issue_url` 列;服务无法自行推断(SaaS、私有化与 dev 环境地址不同)。\n- 每次调用都会记录到账户审计日志,包含调用者成员 ID、请求负载与最终错误(如有)。请勿在请求字段中放置敏感信息。", + "href": "/zh/api-reference/rum/issues/rum-issue-read-export", + "metadata": { + "sidebarTitle": "导出 Issue 列表" + } + }, + "responses": { + "200": { + "description": "Success. CSV attachment, not a JSON envelope.", + "headers": { + "X-Export-Total": { + "description": "Total number of issues matching the filters, before the row cap.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "X-Export-Truncated": { + "description": "`true` when more issues matched than the 100-row cap and the file was truncated.", + "schema": { + "type": "boolean" + } + } + }, + "content": { + "text/csv": { + "schema": { + "type": "string", + "description": "CSV file content. The header row matches the exported columns in order; values are sanitized against spreadsheet formula injection." + }, + "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" + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RumIssueExportRequest" + }, + "example": { + "start_time": 1772611200000, + "end_time": 1775961914595, + "application_ids": [ + "eWbr4xk3ZRnLabRa6unqwD" + ], + "statuses": [ + "for_review" + ], + "orderby": "updated_at", + "export_fields": [ + "issue_id", + "error_type", + "error_message", + "status", + "error_count", + "session_count", + "last_seen_at" + ], + "console_origin": "https://console.flashcat.cloud", + "time_zone": "Asia/Shanghai" + } + } + } + } + } + }, "/rum/issue/update": { "post": { "operationId": "rum-issue-write-update", @@ -45473,6 +45563,143 @@ } } }, + "RumIssueExportRequest": { + "type": "object", + "required": [ + "start_time", + "end_time" + ], + "description": "导出 RUM 异常追踪 Issue 的过滤参数。", + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "时间范围起始,Unix 毫秒时间戳。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "时间范围结束,毫秒时间戳,最大范围 183 天。" + }, + "application_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按应用 ID 过滤;应用 ID 可通过 `POST /rum/application/list` 获取。" + }, + "dql": { + "type": "string", + "description": "DQL 高级过滤查询,不能与 `sql` 同时使用。" + }, + "sql": { + "type": "string", + "description": "SQL 式高级过滤查询,不能与 `dql` 同时使用。" + }, + "statuses": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "for_review", + "reviewed", + "ignored", + "resolved" + ] + }, + "description": "按状态过滤,取值见枚举;传入其他值会报参数错误。" + }, + "suspected_causes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "api.failed_request", + "network.error", + "code.exception", + "code.invalid_object_access", + "code.invalid_argument", + "unknown" + ] + }, + "description": "按疑似原因过滤,取值见枚举。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按团队 ID 过滤;团队 ID 可通过 `POST /team/list` 获取。" + }, + "p": { + "type": "integer", + "description": "页码(从 1 开始)。导出时忽略——始终读取前 100 条匹配记录。" + }, + "limit": { + "type": "integer", + "description": "每页条数(1–100)。导出时忽略——行数上限固定为 100。" + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at", + "session_count", + "error_count", + "severity" + ], + "description": "排序字段;缺省时按 `updated_at` 排序。" + }, + "asc": { + "type": "boolean", + "description": "为 `true` 时升序排列;默认降序。" + }, + "error_required": { + "type": "boolean", + "description": "为 `true` 时仅导出有关联错误事件的 Issue。" + }, + "by_intersection": { + "type": "boolean", + "description": "为 `true` 时按时间交集匹配:导出在时间窗口内仍有活动的 Issue(`last_seen_timestamp` 不早于 `start_time`),即使其创建于窗口之前;默认 `false` 仅导出创建于窗口内的 Issue。" + }, + "export_fields": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "issue_id", + "issue_url", + "application_name", + "service", + "error_type", + "error_message", + "status", + "severity", + "is_crash", + "error_count", + "session_count", + "first_seen_at", + "first_seen_version", + "last_seen_at", + "last_seen_version", + "versions", + "suspected_cause", + "resolved_at" + ] + }, + "description": "按顺序指定导出的 CSV 列;未知键会被拒绝;空数组使用默认列集。" + }, + "console_origin": { + "type": "string", + "description": "用于拼接 `issue_url` 列的控制台地址,如 `https://console.flashcat.cloud`;服务无法自行推断(SaaS、私有化与 dev 环境地址不同)。" + }, + "time_zone": { + "type": "string", + "description": "渲染 CSV 时间戳所用的 IANA 时区名,如 `Asia/Shanghai`、`UTC`;默认 `Asia/Shanghai`。" + } + } + }, "RumIssueItem": { "type": "object", "description": "单个 RUM 异常追踪 Issue。", @@ -45742,7 +45969,8 @@ "created_at", "updated_at", "session_count", - "error_count" + "error_count", + "severity" ], "description": "排序字段;缺省时按 `updated_at` 排序。" }, diff --git a/api-reference/rum.openapi.en.json b/api-reference/rum.openapi.en.json index d0d3646..c87536a 100644 --- a/api-reference/rum.openapi.en.json +++ b/api-reference/rum.openapi.en.json @@ -700,7 +700,7 @@ "RUM/Issues" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `start_time` and `end_time` are millisecond timestamps. Maximum range: 183 days.\n- `statuses` filters by issue status. Valid values: `for_review`, `reviewed`, `ignored`, `resolved`.\n- `orderby` accepts: `created_at`, `updated_at`, `session_count`, `error_count`.\n- Use `dql` or `sql` for advanced filtering. Cannot provide both.", + "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- `start_time` and `end_time` are millisecond timestamps. Maximum range: 183 days.\n- `statuses` filters by issue status. Valid values: `for_review`, `reviewed`, `ignored`, `resolved`.\n- `orderby` accepts: `created_at`, `updated_at`, `session_count`, `error_count`, `severity`.\n- Use `dql` or `sql` for advanced filtering. Cannot provide both.", "href": "/en/api-reference/rum/issues/rum-issue-read-list", "metadata": { "sidebarTitle": "List issues" @@ -852,6 +852,96 @@ } } }, + "/rum/issue/export": { + "post": { + "operationId": "rum-issue-read-export", + "summary": "Export issues as CSV", + "description": "Export the filtered RUM error tracking issues as a CSV file. The response is a `text/csv` stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope; non-console callers can read the `X-Export-Total` and `X-Export-Truncated` response headers.", + "tags": [ + "RUM/Issues" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **200 requests/day**; **100 requests/minute**; **10 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The response is a `text/csv` stream delivered with `Content-Disposition: attachment` — it is not wrapped in the standard envelope. The filename is `rum-issues-.csv`, stamped in the requested `time_zone`. Read `X-Export-Total` and `X-Export-Truncated` response headers instead of a body field.\n- The export reads the first 100 matching rows (`ExportMaxRows`); `X-Export-Truncated` is `true` when more issues match. `p` and `limit` are ignored.\n- The request filters are exactly those of `POST /rum/issue/list` — an export is \"what I am looking at, as a file\".\n- `export_fields` names the CSV columns in the order they appear. Unknown keys are rejected with a parameter error; an empty array uses the default column set.\n- `time_zone` must be a valid IANA zone name (e.g. `Asia/Shanghai`, `UTC`); timestamps are rendered in that zone and time columns carry the zone in their header. Invalid names are rejected.\n- `console_origin` is used to build the `issue_url` column; the service cannot infer it (SaaS, on-premises and dev releases answer on different origins).\n- Every call is recorded in the account's audit log with the caller's member ID, request payload, and resulting error (if any). Do not put secrets in request fields.", + "href": "/en/api-reference/rum/issues/rum-issue-read-export", + "metadata": { + "sidebarTitle": "Export issues as CSV" + } + }, + "responses": { + "200": { + "description": "Success. CSV attachment, not a JSON envelope.", + "headers": { + "X-Export-Total": { + "description": "Total number of issues matching the filters, before the row cap.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "X-Export-Truncated": { + "description": "`true` when more issues matched than the 100-row cap and the file was truncated.", + "schema": { + "type": "boolean" + } + } + }, + "content": { + "text/csv": { + "schema": { + "type": "string", + "description": "CSV file content. The header row matches the exported columns in order; values are sanitized against spreadsheet formula injection." + }, + "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" + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RumIssueExportRequest" + }, + "example": { + "start_time": 1772611200000, + "end_time": 1775961914595, + "application_ids": [ + "eWbr4xk3ZRnLabRa6unqwD" + ], + "statuses": [ + "for_review" + ], + "orderby": "updated_at", + "export_fields": [ + "issue_id", + "error_type", + "error_message", + "status", + "error_count", + "session_count", + "last_seen_at" + ], + "console_origin": "https://console.flashcat.cloud", + "time_zone": "Asia/Shanghai" + } + } + } + } + } + }, "/rum/issue/update": { "post": { "operationId": "rum-issue-write-update", @@ -4628,6 +4718,143 @@ } } }, + "RumIssueExportRequest": { + "type": "object", + "required": [ + "start_time", + "end_time" + ], + "description": "Filters for exporting RUM error tracking issues to CSV.", + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "Start of the time range, Unix epoch milliseconds." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "End of time range, millisecond timestamp. Maximum range: 183 days." + }, + "application_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by application IDs. Get IDs via `POST /rum/application/list`." + }, + "dql": { + "type": "string", + "description": "DQL query for advanced filtering. Cannot be used with `sql`." + }, + "sql": { + "type": "string", + "description": "SQL-style query for advanced filtering. Cannot be used with `dql`." + }, + "statuses": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "for_review", + "reviewed", + "ignored", + "resolved" + ] + }, + "description": "Filter by status; only the enum values are accepted — any other value is rejected with a parameter error." + }, + "suspected_causes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "api.failed_request", + "network.error", + "code.exception", + "code.invalid_object_access", + "code.invalid_argument", + "unknown" + ] + }, + "description": "Filter by suspected cause; see the enum for valid values." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by team IDs. Get team IDs via `POST /team/list`." + }, + "p": { + "type": "integer", + "description": "Page number (1-based). Ignored by the export — the first 100 matching rows are always read." + }, + "limit": { + "type": "integer", + "description": "Page size (1–100). Ignored by the export — the row cap is fixed at 100." + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at", + "session_count", + "error_count", + "severity" + ], + "description": "Sort field; defaults to `updated_at` when omitted." + }, + "asc": { + "type": "boolean", + "description": "Sort ascending when `true`; descending by default." + }, + "error_required": { + "type": "boolean", + "description": "If `true`, only export issues with at least one associated error event." + }, + "by_intersection": { + "type": "boolean", + "description": "When `true`, match by time-range overlap: export issues still active within the window (`last_seen_timestamp` >= `start_time`) even if created before it. Default `false` exports only issues created inside the window." + }, + "export_fields": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "issue_id", + "issue_url", + "application_name", + "service", + "error_type", + "error_message", + "status", + "severity", + "is_crash", + "error_count", + "session_count", + "first_seen_at", + "first_seen_version", + "last_seen_at", + "last_seen_version", + "versions", + "suspected_cause", + "resolved_at" + ] + }, + "description": "CSV columns to export, in the order they appear. Unknown keys are rejected with a parameter error; an empty array uses the default column set." + }, + "console_origin": { + "type": "string", + "description": "Console origin used to build the `issue_url` column, e.g. `https://console.flashcat.cloud`. The service cannot infer it (SaaS, on-premises and dev releases answer on different origins)." + }, + "time_zone": { + "type": "string", + "description": "IANA time zone used to render timestamps in the CSV, e.g. `Asia/Shanghai` or `UTC`. Default: `Asia/Shanghai`." + } + } + }, "RumIssueIDRequest": { "type": "object", "required": [ @@ -4909,7 +5136,8 @@ "created_at", "updated_at", "session_count", - "error_count" + "error_count", + "severity" ], "description": "Sort field; defaults to `updated_at` when omitted." }, diff --git a/api-reference/rum.openapi.zh.json b/api-reference/rum.openapi.zh.json index 6f48f3d..09eaa4e 100644 --- a/api-reference/rum.openapi.zh.json +++ b/api-reference/rum.openapi.zh.json @@ -852,6 +852,96 @@ } } }, + "/rum/issue/export": { + "post": { + "operationId": "rum-issue-read-export", + "summary": "导出 Issue 列表", + "description": "将符合过滤条件的 RUM 异常追踪 Issue 导出为 CSV 文件。响应为 `text/csv` 流,通过 `Content-Disposition: attachment` 交付——不是 JSON 信封;非控制台调用方可通过 `X-Export-Total` 与 `X-Export-Truncated` 响应头获知匹配总数与截断情况。", + "tags": [ + "RUM/RUM 问题跟踪" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **200 次/天**;**100 次/分钟**;**10 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 响应为 `text/csv` 流,通过 `Content-Disposition: attachment` 交付——不使用标准信封。文件名为 `rum-issues-<时间戳>.csv`,按请求的 `time_zone` 打时间戳。请通过 `X-Export-Total` 与 `X-Export-Truncated` 响应头获取总数与截断情况。\n- 导出读取前 100 条匹配记录(`ExportMaxRows`);匹配数超过上限时 `X-Export-Truncated` 为 `true`。`p` 和 `limit` 被忽略。\n- 请求过滤条件与 `POST /rum/issue/list` 完全一致——导出就是“我正在看的列表,输出成文件”。\n- `export_fields` 按顺序指定 CSV 列;未知键会被拒绝;空数组使用默认列集。\n- `time_zone` 必须是合法的 IANA 时区名(如 `Asia/Shanghai`、`UTC`);时间戳按该时区渲染,时间列表头携带时区。非法时区名会被拒绝。\n- `console_origin` 用于拼接 `issue_url` 列;服务无法自行推断(SaaS、私有化与 dev 环境地址不同)。\n- 每次调用都会记录到账户审计日志,包含调用者成员 ID、请求负载与最终错误(如有)。请勿在请求字段中放置敏感信息。", + "href": "/zh/api-reference/rum/issues/rum-issue-read-export", + "metadata": { + "sidebarTitle": "导出 Issue 列表" + } + }, + "responses": { + "200": { + "description": "Success. CSV attachment, not a JSON envelope.", + "headers": { + "X-Export-Total": { + "description": "Total number of issues matching the filters, before the row cap.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "X-Export-Truncated": { + "description": "`true` when more issues matched than the 100-row cap and the file was truncated.", + "schema": { + "type": "boolean" + } + } + }, + "content": { + "text/csv": { + "schema": { + "type": "string", + "description": "CSV file content. The header row matches the exported columns in order; values are sanitized against spreadsheet formula injection." + }, + "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" + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RumIssueExportRequest" + }, + "example": { + "start_time": 1772611200000, + "end_time": 1775961914595, + "application_ids": [ + "eWbr4xk3ZRnLabRa6unqwD" + ], + "statuses": [ + "for_review" + ], + "orderby": "updated_at", + "export_fields": [ + "issue_id", + "error_type", + "error_message", + "status", + "error_count", + "session_count", + "last_seen_at" + ], + "console_origin": "https://console.flashcat.cloud", + "time_zone": "Asia/Shanghai" + } + } + } + } + } + }, "/rum/issue/update": { "post": { "operationId": "rum-issue-write-update", @@ -4628,6 +4718,143 @@ } } }, + "RumIssueExportRequest": { + "type": "object", + "required": [ + "start_time", + "end_time" + ], + "description": "导出 RUM 异常追踪 Issue 的过滤参数。", + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "时间范围起始,Unix 毫秒时间戳。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "时间范围结束,毫秒时间戳,最大范围 183 天。" + }, + "application_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按应用 ID 过滤;应用 ID 可通过 `POST /rum/application/list` 获取。" + }, + "dql": { + "type": "string", + "description": "DQL 高级过滤查询,不能与 `sql` 同时使用。" + }, + "sql": { + "type": "string", + "description": "SQL 式高级过滤查询,不能与 `dql` 同时使用。" + }, + "statuses": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "for_review", + "reviewed", + "ignored", + "resolved" + ] + }, + "description": "按状态过滤,取值见枚举;传入其他值会报参数错误。" + }, + "suspected_causes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "api.failed_request", + "network.error", + "code.exception", + "code.invalid_object_access", + "code.invalid_argument", + "unknown" + ] + }, + "description": "按疑似原因过滤,取值见枚举。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按团队 ID 过滤;团队 ID 可通过 `POST /team/list` 获取。" + }, + "p": { + "type": "integer", + "description": "页码(从 1 开始)。导出时忽略——始终读取前 100 条匹配记录。" + }, + "limit": { + "type": "integer", + "description": "每页条数(1–100)。导出时忽略——行数上限固定为 100。" + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at", + "session_count", + "error_count", + "severity" + ], + "description": "排序字段;缺省时按 `updated_at` 排序。" + }, + "asc": { + "type": "boolean", + "description": "为 `true` 时升序排列;默认降序。" + }, + "error_required": { + "type": "boolean", + "description": "为 `true` 时仅导出有关联错误事件的 Issue。" + }, + "by_intersection": { + "type": "boolean", + "description": "为 `true` 时按时间交集匹配:导出在时间窗口内仍有活动的 Issue(`last_seen_timestamp` 不早于 `start_time`),即使其创建于窗口之前;默认 `false` 仅导出创建于窗口内的 Issue。" + }, + "export_fields": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "issue_id", + "issue_url", + "application_name", + "service", + "error_type", + "error_message", + "status", + "severity", + "is_crash", + "error_count", + "session_count", + "first_seen_at", + "first_seen_version", + "last_seen_at", + "last_seen_version", + "versions", + "suspected_cause", + "resolved_at" + ] + }, + "description": "按顺序指定导出的 CSV 列;未知键会被拒绝;空数组使用默认列集。" + }, + "console_origin": { + "type": "string", + "description": "用于拼接 `issue_url` 列的控制台地址,如 `https://console.flashcat.cloud`;服务无法自行推断(SaaS、私有化与 dev 环境地址不同)。" + }, + "time_zone": { + "type": "string", + "description": "渲染 CSV 时间戳所用的 IANA 时区名,如 `Asia/Shanghai`、`UTC`;默认 `Asia/Shanghai`。" + } + } + }, "RumIssueIDRequest": { "type": "object", "required": [ @@ -4909,7 +5136,8 @@ "created_at", "updated_at", "session_count", - "error_count" + "error_count", + "severity" ], "description": "排序字段;缺省时按 `updated_at` 排序。" }, diff --git a/docs.json b/docs.json index c6ee986..e4f4d32 100644 --- a/docs.json +++ b/docs.json @@ -2533,6 +2533,7 @@ "icon": "bug", "pages": [ "POST /rum/issue/list", + "POST /rum/issue/export", "POST /rum/issue/info", "POST /rum/issue/update" ] @@ -3895,6 +3896,7 @@ "icon": "bug", "pages": [ "POST /rum/issue/list", + "POST /rum/issue/export", "POST /rum/issue/info", "POST /rum/issue/update" ] diff --git a/en/openapi/api-catalog.mdx b/en/openapi/api-catalog.mdx index 01fea02..64823d4 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 **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. +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. All endpoint URLs use `https://api.flashcat.cloud` as the base, authenticated via APP Key through query string. @@ -345,7 +345,7 @@ All endpoint URLs use `https://api.flashcat.cloud` as the base, authenticated vi - + ### Facets @@ -370,6 +370,7 @@ All endpoint URLs use `https://api.flashcat.cloud` as the base, authenticated vi | Method | Endpoint | Description | | :--- | :--- | :--- | +| POST | [`/rum/issue/export`](/en/api-reference/rum/issues/rum-issue-read-export) | Export issues as CSV | | POST | [`/rum/issue/info`](/en/api-reference/rum/issues/rum-issue-read-info) | Get issue detail | | POST | [`/rum/issue/list`](/en/api-reference/rum/issues/rum-issue-read-list) | List issues | | POST | [`/rum/issue/update`](/en/api-reference/rum/issues/rum-issue-write-update) | Update issue | diff --git a/zh/openapi/api-catalog.mdx b/zh/openapi/api-catalog.mdx index 507180d..8b121c6 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 提供 **337** 个接口,覆盖 On-call、Monitors、RUM、AI SRE 和平台五个主要模块。所有接口使用统一认证方式和请求规范。详情参见[快速开始](/zh/openapi/introduction)。 +Flashduty Open API 提供 **338** 个接口,覆盖 On-call、Monitors、RUM、AI SRE 和平台五个主要模块。所有接口使用统一认证方式和请求规范。详情参见[快速开始](/zh/openapi/introduction)。 所有接口 URL 均以 `https://api.flashcat.cloud` 为 base,通过 query string 中的 APP Key 认证。 @@ -345,7 +345,7 @@ Flashduty Open API 提供 **337** 个接口,覆盖 On-call、Monitors、RUM、 - + ### RUM 自定义字段 @@ -370,6 +370,7 @@ Flashduty Open API 提供 **337** 个接口,覆盖 On-call、Monitors、RUM、 | 方法 | 接口 | 描述 | | :--- | :--- | :--- | +| POST | [`/rum/issue/export`](/zh/api-reference/rum/issues/rum-issue-read-export) | 导出 Issue 列表 | | POST | [`/rum/issue/info`](/zh/api-reference/rum/issues/rum-issue-read-info) | 查看 Issue 详情 | | POST | [`/rum/issue/list`](/zh/api-reference/rum/issues/rum-issue-read-list) | 查询 Issue 列表 | | POST | [`/rum/issue/update`](/zh/api-reference/rum/issues/rum-issue-write-update) | 更新 Issue |