diff --git a/api-reference/on-call.openapi.en.json b/api-reference/on-call.openapi.en.json index a50cbba..6c7dfaa 100644 --- a/api-reference/on-call.openapi.en.json +++ b/api-reference/on-call.openapi.en.json @@ -12310,6 +12310,92 @@ ] } }, + "/status-page/draft/create": { + "post": { + "operationId": "statusPageDraftCreate", + "summary": "Create status page draft", + "description": "Store a status page event draft so a human can review and publish it from the console.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The `draft` payload is stored verbatim (up to 64 KB); the console publish form reads it back to prefill the event.\n- A draft lives for 30 days and is consumed exactly once when the event is published.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/status-pages/status-page-draft-create", + "metadata": { + "sidebarTitle": "Create status page draft" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageDraftCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "draft_id": "draft_3xK9mQ2vN7pR4wT8yH1sJ5", + "created_at": 1788000000 + } + } + } + } + }, + "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/CreateStatusPageDraftRequest" + }, + "example": { + "draft": { + "v": 1, + "page_id": 5750613685214, + "type": "incident", + "name": "Web Console Degraded Performance", + "message": "We are investigating degraded performance affecting the web console.", + "affected_components": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "status": "degraded" + } + ] + }, + "source": "ai_sre:sess_01KC3H2A9ZQ8W7E6R5T4Y3U2I1" + } + } + } + } + } + }, "/enrichment/mapping/api/create": { "post": { "operationId": "mapping-api-write-create", @@ -20940,6 +21026,24 @@ } } }, + "CreateStatusPageDraftRequest": { + "type": "object", + "description": "Parameters for storing a status page draft. The `draft` payload is stored verbatim; only the validated fields listed below are interpreted.", + "required": [ + "draft" + ], + "properties": { + "draft": { + "type": "object", + "description": "Draft payload, stored verbatim, up to 64 KB serialized. Validated fields: `page_id`, `type` (`incident` or `maintenance`), `name`, `message`; optional `change_id` (append an update to an existing event when > 0), `status`, `affected_components`, and `start_time`/`end_time` (Unix epoch seconds, new maintenance only)." + }, + "source": { + "type": "string", + "maxLength": 64, + "description": "Opaque marker of the drafting origin, e.g. `ai_sre:sess_xxx`. Up to 64 characters." + } + } + }, "CreateWarRoomRequest": { "type": "object", "description": "Parameters for opening an incident war room in an IM integration.", @@ -28047,6 +28151,25 @@ } } }, + "StatusPageDraftCreateResponse": { + "type": "object", + "description": "Result of storing a status page draft.", + "required": [ + "draft_id", + "created_at" + ], + "properties": { + "draft_id": { + "type": "string", + "description": "Draft ID matching `draft_[A-Za-z0-9]{22}`; the console review link carries it." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation time in Unix epoch seconds." + } + } + }, "StatusPageMigrationJob": { "type": "object", "description": "A migration job's current state and progress.", diff --git a/api-reference/on-call.openapi.zh.json b/api-reference/on-call.openapi.zh.json index 04f7fd6..a7ae4cf 100644 --- a/api-reference/on-call.openapi.zh.json +++ b/api-reference/on-call.openapi.zh.json @@ -12310,6 +12310,92 @@ ] } }, + "/status-page/draft/create": { + "post": { + "operationId": "statusPageDraftCreate", + "summary": "创建状态页草稿", + "description": "存储状态页事件草稿,供人工在控制台审核后发布。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 无 —— 任意有效 `app_key` 均可调用 |\n\n## 使用说明\n\n- `draft` 载荷将被原样存储(最大 64 KB);控制台发布表单会读取它来预填事件内容。\n- 草稿保留 30 天,事件发布时被消费且仅可消费一次。\n- 每次调用都会记录到账户审计日志,请勿在请求字段中写入敏感信息。", + "href": "/zh/api-reference/on-call/status-pages/status-page-draft-create", + "metadata": { + "sidebarTitle": "创建状态页草稿" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageDraftCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "draft_id": "draft_3xK9mQ2vN7pR4wT8yH1sJ5", + "created_at": 1788000000 + } + } + } + } + }, + "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/CreateStatusPageDraftRequest" + }, + "example": { + "draft": { + "v": 1, + "page_id": 5750613685214, + "type": "incident", + "name": "Web Console Degraded Performance", + "message": "We are investigating degraded performance affecting the web console.", + "affected_components": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "status": "degraded" + } + ] + }, + "source": "ai_sre:sess_01KC3H2A9ZQ8W7E6R5T4Y3U2I1" + } + } + } + } + } + }, "/enrichment/mapping/api/create": { "post": { "operationId": "mapping-api-write-create", @@ -20940,6 +21026,24 @@ } } }, + "CreateStatusPageDraftRequest": { + "type": "object", + "description": "存储状态页草稿的参数。`draft` 载荷将被原样存储,仅下列被校验的字段会被解析。", + "required": [ + "draft" + ], + "properties": { + "draft": { + "type": "object", + "description": "草稿载荷,原样存储,序列化后最大 64 KB。被校验的字段:`page_id`、`type`(`incident` 或 `maintenance`)、`name`、`message`;可选 `change_id`(大于 0 时表示向已有事件追加进展)、`status`、`affected_components`,以及 `start_time`/`end_time`(Unix epoch 秒,仅新建维护窗口时使用)。" + }, + "source": { + "type": "string", + "maxLength": 64, + "description": "草稿来源的不透明标记,例如 `ai_sre:sess_xxx`。最长 64 个字符。" + } + } + }, "CreateWarRoomRequest": { "type": "object", "description": "为故障开启 IM 作战室所需的参数。", @@ -28047,6 +28151,25 @@ } } }, + "StatusPageDraftCreateResponse": { + "type": "object", + "description": "存储状态页草稿的结果。", + "required": [ + "draft_id", + "created_at" + ], + "properties": { + "draft_id": { + "type": "string", + "description": "草稿 ID,格式为 `draft_[A-Za-z0-9]{22}`;控制台审核链接会携带它。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix epoch 秒。" + } + } + }, "StatusPageMigrationJob": { "type": "object", "description": "迁移任务的当前状态及进度。", diff --git a/api-reference/openapi.en.json b/api-reference/openapi.en.json index eb3cc92..2f1d624 100644 --- a/api-reference/openapi.en.json +++ b/api-reference/openapi.en.json @@ -12224,6 +12224,92 @@ ] } }, + "/status-page/draft/create": { + "post": { + "operationId": "statusPageDraftCreate", + "summary": "Create status page draft", + "description": "Store a status page event draft so a human can review and publish it from the console.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The `draft` payload is stored verbatim (up to 64 KB); the console publish form reads it back to prefill the event.\n- A draft lives for 30 days and is consumed exactly once when the event is published.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/status-pages/status-page-draft-create", + "metadata": { + "sidebarTitle": "Create status page draft" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageDraftCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "draft_id": "draft_3xK9mQ2vN7pR4wT8yH1sJ5", + "created_at": 1788000000 + } + } + } + } + }, + "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/CreateStatusPageDraftRequest" + }, + "example": { + "draft": { + "v": 1, + "page_id": 5750613685214, + "type": "incident", + "name": "Web Console Degraded Performance", + "message": "We are investigating degraded performance affecting the web console.", + "affected_components": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "status": "degraded" + } + ] + }, + "source": "ai_sre:sess_01KC3H2A9ZQ8W7E6R5T4Y3U2I1" + } + } + } + } + } + }, "/status-page/change/create": { "post": { "operationId": "statusPageChangeCreate", @@ -42665,6 +42751,25 @@ } } }, + "StatusPageDraftCreateResponse": { + "type": "object", + "description": "Result of storing a status page draft.", + "required": [ + "draft_id", + "created_at" + ], + "properties": { + "draft_id": { + "type": "string", + "description": "Draft ID matching `draft_[A-Za-z0-9]{22}`; the console review link carries it." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation time in Unix epoch seconds." + } + } + }, "ImportStatusPageSubscribersRequest": { "type": "object", "description": "Parameters for bulk-importing subscribers. Each subscriber must have a non-empty `recipient` (≤255 chars) and subscribe to at least one component, change, or set `all: true`.", @@ -43195,6 +43300,24 @@ } } }, + "CreateStatusPageDraftRequest": { + "type": "object", + "description": "Parameters for storing a status page draft. The `draft` payload is stored verbatim; only the validated fields listed below are interpreted.", + "required": [ + "draft" + ], + "properties": { + "draft": { + "type": "object", + "description": "Draft payload, stored verbatim, up to 64 KB serialized. Validated fields: `page_id`, `type` (`incident` or `maintenance`), `name`, `message`; optional `change_id` (append an update to an existing event when > 0), `status`, `affected_components`, and `start_time`/`end_time` (Unix epoch seconds, new maintenance only)." + }, + "source": { + "type": "string", + "maxLength": 64, + "description": "Opaque marker of the drafting origin, e.g. `ai_sre:sess_xxx`. Up to 64 characters." + } + } + }, "RuleListRequest": { "type": "object", "description": "Filter parameter for listing rules in a folder.", diff --git a/api-reference/openapi.zh.json b/api-reference/openapi.zh.json index 8330b09..0f68dc5 100644 --- a/api-reference/openapi.zh.json +++ b/api-reference/openapi.zh.json @@ -12224,6 +12224,92 @@ ] } }, + "/status-page/draft/create": { + "post": { + "operationId": "statusPageDraftCreate", + "summary": "创建状态页草稿", + "description": "存储状态页事件草稿,供人工在控制台审核后发布。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | 无 —— 任意有效 `app_key` 均可调用 |\n\n## 使用说明\n\n- `draft` 载荷将被原样存储(最大 64 KB);控制台发布表单会读取它来预填事件内容。\n- 草稿保留 30 天,事件发布时被消费且仅可消费一次。\n- 每次调用都会记录到账户审计日志,请勿在请求字段中写入敏感信息。", + "href": "/zh/api-reference/on-call/status-pages/status-page-draft-create", + "metadata": { + "sidebarTitle": "创建状态页草稿" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageDraftCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "draft_id": "draft_3xK9mQ2vN7pR4wT8yH1sJ5", + "created_at": 1788000000 + } + } + } + } + }, + "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/CreateStatusPageDraftRequest" + }, + "example": { + "draft": { + "v": 1, + "page_id": 5750613685214, + "type": "incident", + "name": "Web Console Degraded Performance", + "message": "We are investigating degraded performance affecting the web console.", + "affected_components": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "status": "degraded" + } + ] + }, + "source": "ai_sre:sess_01KC3H2A9ZQ8W7E6R5T4Y3U2I1" + } + } + } + } + } + }, "/status-page/change/create": { "post": { "operationId": "statusPageChangeCreate", @@ -42665,6 +42751,25 @@ } } }, + "StatusPageDraftCreateResponse": { + "type": "object", + "description": "存储状态页草稿的结果。", + "required": [ + "draft_id", + "created_at" + ], + "properties": { + "draft_id": { + "type": "string", + "description": "草稿 ID,格式为 `draft_[A-Za-z0-9]{22}`;控制台审核链接会携带它。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix epoch 秒。" + } + } + }, "ImportStatusPageSubscribersRequest": { "type": "object", "description": "批量导入订阅者所需的参数。每个订阅者的 `recipient` 非空且不超过 255 字符;并且至少订阅一个组件/事件,或将 `all` 置为 true。", @@ -43195,6 +43300,24 @@ } } }, + "CreateStatusPageDraftRequest": { + "type": "object", + "description": "存储状态页草稿的参数。`draft` 载荷将被原样存储,仅下列被校验的字段会被解析。", + "required": [ + "draft" + ], + "properties": { + "draft": { + "type": "object", + "description": "草稿载荷,原样存储,序列化后最大 64 KB。被校验的字段:`page_id`、`type`(`incident` 或 `maintenance`)、`name`、`message`;可选 `change_id`(大于 0 时表示向已有事件追加进展)、`status`、`affected_components`,以及 `start_time`/`end_time`(Unix epoch 秒,仅新建维护窗口时使用)。" + }, + "source": { + "type": "string", + "maxLength": 64, + "description": "草稿来源的不透明标记,例如 `ai_sre:sess_xxx`。最长 64 个字符。" + } + } + }, "RuleListRequest": { "type": "object", "description": "按文件夹查询规则的过滤参数。", diff --git a/docs.json b/docs.json index dfd5a96..24eb70d 100644 --- a/docs.json +++ b/docs.json @@ -2435,7 +2435,8 @@ "POST /status-page/section/delete", "POST /status-page/template/upsert", "POST /status-page/template/delete", - "GET /status-page/template/list" + "GET /status-page/template/list", + "POST /status-page/draft/create" ] }, { @@ -3810,7 +3811,8 @@ "POST /status-page/section/delete", "POST /status-page/template/upsert", "POST /status-page/template/delete", - "GET /status-page/template/list" + "GET /status-page/template/list", + "POST /status-page/draft/create" ] }, { diff --git a/en/openapi/api-catalog.mdx b/en/openapi/api-catalog.mdx index 8edc224..2cb1e50 100644 --- a/en/openapi/api-catalog.mdx +++ b/en/openapi/api-catalog.mdx @@ -3,13 +3,13 @@ title: "API Catalog" description: "Complete list of Flashduty Open API endpoints, organized by product module with links to detailed documentation" --- -Flashduty Open API provides **335** 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 **336** 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. - + ### Incidents @@ -242,6 +242,7 @@ All endpoint URLs use `https://api.flashcat.cloud` as the base, authenticated vi | POST | [`/status-page/migrate-email-subscribers`](/en/api-reference/on-call/status-pages/status-page-migrate-email-subscribers) | Migrate email subscribers | | GET | [`/status-page/migration/status`](/en/api-reference/on-call/status-pages/status-page-migration-status) | Get migration status | | POST | [`/status-page/migration/cancel`](/en/api-reference/on-call/status-pages/status-page-migration-cancel) | Cancel status page migration | +| POST | [`/status-page/draft/create`](/en/api-reference/on-call/status-pages/status-page-draft-create) | Create status page draft | | GET | [`/status-page/list`](/en/api-reference/on-call/status-pages/status-page-read-page-list) | List status pages | | GET | [`/status-page/info`](/en/api-reference/on-call/status-pages/status-page-info) | Get status page detail | | POST | [`/status-page/create`](/en/api-reference/on-call/status-pages/status-page-create) | Create status page | diff --git a/zh/openapi/api-catalog.mdx b/zh/openapi/api-catalog.mdx index d230b7b..9d99925 100644 --- a/zh/openapi/api-catalog.mdx +++ b/zh/openapi/api-catalog.mdx @@ -3,13 +3,13 @@ title: "API 目录" description: "Flashduty Open API 接口完整列表,按产品模块组织并链接到详细文档" --- -Flashduty Open API 提供 **335** 个接口,覆盖 On-call、Monitors、RUM、AI SRE 和平台五个主要模块。所有接口使用统一认证方式和请求规范。详情参见[快速开始](/zh/openapi/introduction)。 +Flashduty Open API 提供 **336** 个接口,覆盖 On-call、Monitors、RUM、AI SRE 和平台五个主要模块。所有接口使用统一认证方式和请求规范。详情参见[快速开始](/zh/openapi/introduction)。 所有接口 URL 均以 `https://api.flashcat.cloud` 为 base,通过 query string 中的 APP Key 认证。 - + ### 故障管理 @@ -242,6 +242,7 @@ Flashduty Open API 提供 **335** 个接口,覆盖 On-call、Monitors、RUM、 | POST | [`/status-page/migrate-email-subscribers`](/zh/api-reference/on-call/status-pages/status-page-migrate-email-subscribers) | 迁移邮件订阅者 | | GET | [`/status-page/migration/status`](/zh/api-reference/on-call/status-pages/status-page-migration-status) | 获取迁移状态 | | POST | [`/status-page/migration/cancel`](/zh/api-reference/on-call/status-pages/status-page-migration-cancel) | 取消状态页迁移 | +| POST | [`/status-page/draft/create`](/zh/api-reference/on-call/status-pages/status-page-draft-create) | 创建状态页草稿 | | GET | [`/status-page/list`](/zh/api-reference/on-call/status-pages/status-page-read-page-list) | 查询状态页列表 | | GET | [`/status-page/info`](/zh/api-reference/on-call/status-pages/status-page-info) | 获取状态页详情 | | POST | [`/status-page/create`](/zh/api-reference/on-call/status-pages/status-page-create) | 创建状态页 |