diff --git a/CLAUDE.md b/CLAUDE.md index cdac3d3..58187c6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -27,13 +27,15 @@ Prerequisite: `npm i -g mint` - **`docs.json`** — Central Mintlify config: navigation structure, tabs, theme. All new pages must be registered here under the correct language → tab → group. - **`zh/`** and **`en/`** — Mirror each other. Chinese is the source of truth; English is translated from it. -- **`.cursor/skills/`** — AI agent skills for translation (`translate-zh-to-en`) and polishing (`polish-document`), with glossary and standards resources. +- **`glossary.md`** — Chinese-English terminology glossary for translation consistency. +- **`api-reference/`** — OpenAPI 3.1 spec files (per-module, per-language) powering the API Reference tab. +- **`.cursor/skills/`** — AI agent skills for translation (`translate-zh-to-en`) and polishing (`polish-document`). ## Documentation Workflow 1. Create/edit Chinese docs in `zh/` as `.mdx` files 2. Add the page path to `docs.json` navigation (both `zh` and `en` language sections) -3. Translate to English using the glossary at `.cursor/skills/translate-zh-to-en/glossary.md` +3. Translate to English using the glossary at `glossary.md` 4. Run `mint broken-links` to validate ## Key Terminology (zh → en) @@ -57,7 +59,7 @@ These are non-obvious translations that must stay consistent: | 规则告警聚合 | pattern alert grouping | | 智能告警聚合 | intelligent alert grouping | -Full glossary: `.cursor/skills/translate-zh-to-en/glossary.md` +Full glossary: `glossary.md` ## Writing Conventions diff --git a/README.md b/README.md index 84112f3..8c0ab4b 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,8 @@ flashduty-docs/ │ ├── compliance/ # Security compliance │ └── changelog/ # Changelog ├── en/ # English docs (mirrors zh/) +├── api-reference/ # OpenAPI 3.1 specs (per-module, per-language) +├── glossary.md # Chinese-English terminology glossary ├── docs.json # Mintlify configuration & navigation └── logo/ # Logo assets ``` @@ -121,7 +123,7 @@ Chinese is the source language; English is translated from it. When translating: | 抑制策略 | inhibit rule | | 排除规则 | drop rule | -Full glossary: `.cursor/skills/translate-zh-to-en/glossary.md` +Full glossary: [`glossary.md`](glossary.md) --- diff --git a/README_zh.md b/README_zh.md index 8742f01..02771b5 100644 --- a/README_zh.md +++ b/README_zh.md @@ -92,6 +92,8 @@ flashduty-docs/ │ ├── compliance/ # 安全合规 │ └── changelog/ # 更新日志 ├── en/ # 英文文档(与 zh/ 结构一致) +├── api-reference/ # OpenAPI 3.1 规范文件(按模块和语言拆分) +├── glossary.md # 中英术语对照表 ├── docs.json # Mintlify 配置与导航 └── logo/ # Logo 资源 ``` @@ -121,7 +123,7 @@ flashduty-docs/ | 抑制策略 | inhibit rule | | 排除规则 | drop rule | -完整术语表见 `.cursor/skills/translate-zh-to-en/glossary.md`。 +完整术语表见 [`glossary.md`](glossary.md)。 --- diff --git a/api-reference/monitors.openapi.en.json b/api-reference/monitors.openapi.en.json new file mode 100644 index 0000000..806ffa3 --- /dev/null +++ b/api-reference/monitors.openapi.en.json @@ -0,0 +1,4444 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Flashduty Open API", + "description": "Public HTTP API for the Flashduty incident management platform — incidents, notification templates, channels, schedules, monitors, RUM, and platform administration. Every operation is authenticated with an `app_key` query parameter issued from the Flashduty console under Account → APP Keys. Responses follow a uniform envelope: `{ request_id, data }` on success, `{ request_id, error }` on failure.", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://api.flashcat.cloud", + "description": "Flashduty Open API" + } + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "tags": [ + { + "name": "Monitors/Alert rules", + "description": "Create, manage, and export monitor alert rules. Query rule counters and audit history." + }, + { + "name": "Monitors/Data sources", + "description": "Manage monitoring data sources used by alert rules to query metrics." + }, + { + "name": "Monitors/Rule sets", + "description": "Manage shared rule sets (rulesets) in the Monitors rule repository. Rulesets can be shared publicly or within an account." + } + ], + "paths": { + "/monit/store/ruleset/update": { + "post": { + "operationId": "monit-store-ruleset-update", + "summary": "Update ruleset", + "description": "Update the note, sharing flag, and payload of an existing ruleset.", + "tags": [ + "Monitors/Rule sets" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Rule Repository Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/rule-sets/monit-store-ruleset-update", + "metadata": { + "sidebarTitle": "Update ruleset" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StoreRulesetItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 1, + "note": "Updated CPU alerts", + "open_flag": 2, + "updated_at": 1712100000 + } + } + } + } + }, + "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/StoreRulesetUpdateRequest" + }, + "example": { + "id": 1, + "note": "Updated CPU alerts", + "open_flag": 2, + "payload": "[{\"prom_ql\":\"rate(cpu_usage[5m]) > 0.9\"}]" + } + } + } + } + } + }, + "/monit/rule/counter/total": { + "post": { + "operationId": "monit-rule-read-counter-total", + "summary": "Get rule counter time series", + "description": "Return the stored time series of the total rule count across the account — one sample per `clock` timestamp.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |\n\n## Usage\n\n- Each item is a historical snapshot: `num` is the total rule count at the given `clock` (Unix epoch seconds).", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-counter-total", + "metadata": { + "sidebarTitle": "Get rule counter time series" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCounterTotalResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 1, + "account_id": 10023, + "num": 50, + "clock": 1712000000 + } + ] + } + } + } + }, + "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/RuleEmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/monit/datasource/create": { + "post": { + "operationId": "monit-datasource-write-create", + "summary": "Create datasource", + "description": "Create a new monitoring data source. The `payload` must include the type-specific configuration block.", + "tags": [ + "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`, `victorialogs`.\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. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-write-create", + "metadata": { + "sidebarTitle": "Create datasource" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DataSourceItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 10, + "type_ident": "prometheus", + "name": "Prometheus Prod", + "enabled": true, + "edge_cluster_name": "default", + "updated_at": 1712000000 + } + } + } + } + }, + "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/DataSourceUpsertRequest" + }, + "example": { + "type_ident": "prometheus", + "name": "Prometheus Prod", + "note": "Production Prometheus", + "address": "http://prometheus.example.com:9090", + "edge_cluster_name": "default", + "payload": { + "prometheus": { + "basic_auth_enabled": false + } + } + } + } + } + } + } + }, + "/monit/datasource/update": { + "post": { + "operationId": "monit-datasource-write-update", + "summary": "Update datasource", + "description": "Update an existing data source. Supply `id` plus the fields to change.", + "tags": [ + "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. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-write-update", + "metadata": { + "sidebarTitle": "Update datasource" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DataSourceItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 10, + "type_ident": "prometheus", + "name": "Prometheus Prod v2", + "enabled": true, + "edge_cluster_name": "default", + "updated_at": 1712100000 + } + } + } + } + }, + "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/DataSourceUpsertRequest" + }, + "example": { + "id": 10, + "type_ident": "prometheus", + "name": "Prometheus Prod v2", + "note": "Updated", + "address": "http://prometheus-v2.example.com:9090", + "edge_cluster_name": "default", + "payload": { + "prometheus": { + "basic_auth_enabled": false + } + } + } + } + } + } + } + }, + "/monit/rule/move": { + "post": { + "operationId": "monit-rule-write-move", + "summary": "Move alert rules to folder", + "description": "Move one or more alert rules to a different folder.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-move", + "metadata": { + "sidebarTitle": "Move alert rules to folder" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleNameMessageListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "name": "CPU High", + "message": "" + } + ] + } + } + } + }, + "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/RuleMoveRequest" + }, + "example": { + "ids": [ + 50001, + 50002 + ], + "dest_folder_id": 200 + } + } + } + } + } + }, + "/monit/rule/counter/node": { + "post": { + "operationId": "monit-rule-read-counter-node", + "summary": "Get rule counts by folder node", + "description": "Return an object mapping top-level folder name to the total number of rules under that folder and all its descendants.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-counter-node", + "metadata": { + "sidebarTitle": "Get rule counts by folder node" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCounterNodeResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "Production": 10, + "Staging": 3 + } + } + } + } + }, + "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/RuleEmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/monit/rule/audit/detail": { + "post": { + "operationId": "monit-rule-read-audit-detail", + "summary": "Get rule audit snapshot", + "description": "Return the audit record (including the `content` field, a JSON string of the rule snapshot at that point in time).", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |\n\n## Usage\n\n- Pass the audit record `id` (not the rule `id`) from `POST /monit/rule/audits`.\n- `content` is a JSON string — parse it to get the full rule snapshot.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-audit-detail", + "metadata": { + "sidebarTitle": "Get rule audit snapshot" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertRuleAudit" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 9001, + "account_id": 10023, + "alert_rule_id": 50001, + "action": "update", + "content": "{\"id\":50001,\"name\":\"CPU High\"}", + "creator_id": 80011, + "creator_name": "Alice", + "created_at": 1712000000 + } + } + } + } + }, + "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/RuleIDRequest" + }, + "example": { + "id": 9001 + } + } + } + } + } + }, + "/monit/datasource/delete": { + "post": { + "operationId": "monit-datasource-write-delete", + "summary": "Delete datasource", + "description": "Delete a data source by ID. Alert rules referencing this datasource must be updated or deleted first.", + "tags": [ + "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. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-write-delete", + "metadata": { + "sidebarTitle": "Delete datasource" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IDRequest" + }, + "example": { + "id": 10 + } + } + } + } + } + }, + "/monit/rule/delete/batch": { + "post": { + "operationId": "monit-rule-write-delete-batch", + "summary": "Batch delete alert rules", + "description": "Delete multiple alert rules in a single request.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **30 requests/minute**; **5 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-delete-batch", + "metadata": { + "sidebarTitle": "Batch delete alert rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleEmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleIDsRequest" + }, + "example": { + "ids": [ + 50001, + 50002 + ] + } + } + } + } + } + }, + "/monit/datasource/sls/projects": { + "post": { + "operationId": "monit-datasource-read-sls-projects", + "summary": "List SLS projects", + "description": "List Alibaba Cloud SLS (Simple Log Service) projects available in the specified SLS datasource.", + "tags": [ + "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- The datasource identified by `id` must be of type `sls`.\n- Use `query` to filter projects by name prefix. Use `offset` and `size` for pagination.", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-sls-projects", + "metadata": { + "sidebarTitle": "List SLS projects" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/SLSProjectsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + "project-a", + "project-b" + ] + } + } + } + }, + "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/SLSProjectsRequest" + }, + "example": { + "id": 10, + "query": "", + "offset": 0, + "size": 50 + } + } + } + } + } + }, + "/monit/rule/status": { + "post": { + "operationId": "monit-rule-write-status", + "summary": "Get rule trigger status under folder", + "description": "Return the rule trigger summary for all rules under a folder node and its descendants.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Set `folder_id` to `0` to get summary across all folders.\n- If the folder contains too many rules, computation is skipped for self-protection.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-status", + "metadata": { + "sidebarTitle": "Get rule trigger status under folder" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleStatusResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "folder_id": 100, + "folder_name": "Production", + "rule_total": 10, + "triggered_rule_count": 2 + } + ] + } + } + } + }, + "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/RuleFolderIDRequest" + }, + "example": { + "folder_id": 100 + } + } + } + } + } + }, + "/monit/rule/export": { + "post": { + "operationId": "monit-rule-read-export", + "summary": "Export alert rules", + "description": "Export the configuration of selected alert rules as a portable JSON array, compatible with `POST /monit/rule/import`.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-export", + "metadata": { + "sidebarTitle": "Export alert rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertRuleExportListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "name": "CPU High", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "* * * * *" + } + ] + } + } + } + }, + "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/RuleIDsRequest" + }, + "example": { + "ids": [ + 50001 + ] + } + } + } + } + } + }, + "/monit/datasource/sls/logstores": { + "post": { + "operationId": "monit-datasource-read-sls-logstores", + "summary": "List SLS logstores", + "description": "List logstores within an SLS project for the specified SLS datasource.", + "tags": [ + "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- The datasource identified by `id` must be of type `sls`.\n- Supply `project` to select the SLS project whose logstores to list.", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-sls-logstores", + "metadata": { + "sidebarTitle": "List SLS logstores" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/SLSLogstoresResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + "logstore-1", + "logstore-2" + ] + } + } + } + }, + "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/SLSLogstoresRequest" + }, + "example": { + "id": 10, + "project": "project-a", + "offset": 0, + "size": 50 + } + } + } + } + } + }, + "/monit/datasource/info": { + "post": { + "operationId": "monit-datasource-read-info", + "summary": "Get datasource detail", + "description": "Retrieve full details of a single data source by its ID, including the `payload` configuration.", + "tags": [ + "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`) |", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-info", + "metadata": { + "sidebarTitle": "Get datasource detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DataSourceItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 10, + "account_id": 10023, + "type_ident": "prometheus", + "name": "Prometheus Prod", + "enabled": true, + "note": "Production Prometheus", + "address": "http://prometheus.example.com:9090", + "payload": { + "prometheus": { + "basic_auth_enabled": false, + "basic_auth_username": "", + "basic_auth_password": "", + "tls_skip_verify": false + } + }, + "edge_cluster_name": "default", + "updated_at": 1712000000 + } + } + } + } + }, + "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/IDRequest" + }, + "example": { + "id": 10 + } + } + } + } + } + }, + "/monit/rule/audits": { + "post": { + "operationId": "monit-rule-read-audits", + "summary": "List rule change history", + "description": "Return the change history (audit records) for an alert rule.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-audits", + "metadata": { + "sidebarTitle": "List rule change history" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleAuditListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 9001, + "account_id": 10023, + "alert_rule_id": 50001, + "action": "update", + "creator_id": 80011, + "creator_name": "Alice", + "created_at": 1712000000 + } + ] + } + } + } + }, + "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/RuleIDRequest" + }, + "example": { + "id": 50001 + } + } + } + } + } + }, + "/monit/rule/info": { + "post": { + "operationId": "monit-rule-read-info", + "summary": "Get alert rule detail", + "description": "Return the full configuration of an alert rule by its ID, including rule queries, thresholds, and notification settings.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-info", + "metadata": { + "sidebarTitle": "Get alert rule detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertRuleInfoResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 50001, + "folder_id": 100, + "name": "CPU High", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "* * * * *", + "channel_ids": [ + 20001 + ] + } + } + } + } + }, + "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/RuleIDRequest" + }, + "example": { + "id": 50001 + } + } + } + } + } + }, + "/monit/rule/delete": { + "post": { + "operationId": "monit-rule-write-delete", + "summary": "Delete alert rule", + "description": "Delete a single alert rule by its ID.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-delete", + "metadata": { + "sidebarTitle": "Delete alert rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleEmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleIDRequest" + }, + "example": { + "id": 50001 + } + } + } + } + } + }, + "/monit/rule/dstypes": { + "post": { + "operationId": "monit-rule-read-dstypes", + "summary": "List available datasource types", + "description": "Return the list of datasource types (`DSType` records) that the current account can use when authoring alert rules — combines global types and account-scoped types.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-dstypes", + "metadata": { + "sidebarTitle": "List available datasource types" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleDsTypesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 1, + "name": "Prometheus", + "ident": "prometheus", + "account_id": 0, + "weight": 100 + } + ] + } + } + } + }, + "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/RuleEmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/monit/rule/update": { + "post": { + "operationId": "monit-rule-write-update", + "summary": "Update alert rule", + "description": "Replace the full configuration of an existing alert rule. All fields are overwritten.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- `id` is required. All other fields follow the same rules as `POST /monit/rule/create`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-update", + "metadata": { + "sidebarTitle": "Update alert rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertRule" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 50001, + "updated_at": 1712100000 + } + } + } + } + }, + "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/AlertRule" + }, + "example": { + "id": 50001, + "folder_id": 100, + "name": "CPU High v2", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "* * * * *", + "rule_configs": { + "queries": [ + { + "name": "A", + "expr": "avg(cpu_usage_idle) < 5" + } + ] + } + } + } + } + } + } + }, + "/monit/rule/import": { + "post": { + "operationId": "monit-rule-write-import", + "summary": "Import alert rules", + "description": "Import one or more alert rules from a JSON array. Returns the result for each rule, indicating success or failure.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **20 requests/minute**; **2 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- The request body is a JSON array of rule export objects (compatible with the output of `POST /monit/rule/export`).\n- Each object must include `folder_id`, `ds_type`, and either `ds_list` or `ds_ids`.\n- Some rules may fail (e.g. duplicate name). Check each result for individual status.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-import", + "metadata": { + "sidebarTitle": "Import alert rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleImportResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "name": "CPU High", + "message": "" + } + ] + } + } + } + }, + "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/RuleImportRequest" + }, + "example": [ + { + "folder_id": 100, + "name": "CPU High", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "* * * * *", + "rule_configs": { + "queries": [ + { + "name": "A", + "expr": "avg(cpu_usage_idle) < 10" + } + ] + } + } + ] + } + } + } + } + }, + "/monit/rule/create": { + "post": { + "operationId": "monit-rule-write-create", + "summary": "Create alert rule", + "description": "Create a new alert rule. Returns the created rule with its assigned ID.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- `name`, `ds_type`, `cron_pattern`, and `rule_configs.queries` are required.\n- Either `ds_list` (supports wildcards) or `ds_ids` must be non-empty.\n- `cron_pattern` uses standard 5-field cron syntax.\n- `channel_ids` can be empty; alerts will then route through the global integration.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-create", + "metadata": { + "sidebarTitle": "Create alert rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertRule" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 50001, + "folder_id": 100, + "name": "CPU High", + "ds_type": "prometheus", + "created_at": 1712000000 + } + } + } + } + }, + "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/AlertRule" + }, + "example": { + "folder_id": 100, + "name": "CPU High", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "* * * * *", + "channel_ids": [ + 20001 + ], + "rule_configs": { + "queries": [ + { + "name": "A", + "expr": "avg(cpu_usage_idle) < 10" + } + ], + "check_threshold": { + "enabled": true, + "critical": "A", + "alerting_check_times": 1, + "recovery_check_times": 1, + "push_recovery_event": true, + "recovery": { + "mode": "invert" + } + } + } + } + } + } + } + } + }, + "/monit/store/ruleset/list": { + "post": { + "operationId": "monit-store-ruleset-list", + "summary": "List rulesets", + "description": "Return all rulesets for a given datasource type that are accessible to the current user.", + "tags": [ + "Monitors/Rule sets" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Rule Repository Read** (`monit`) |\n\n## Usage\n\n- A ruleset is visible if its `open_flag` is `2` (public), if the current user is the creator (`open_flag=0`), or if it belongs to the same account (`open_flag=1`).\n- The list does not include the `payload` field. Call `/monit/store/ruleset/info` to get the full ruleset content.", + "href": "/en/api-reference/monitors/rule-sets/monit-store-ruleset-list", + "metadata": { + "sidebarTitle": "List rulesets" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StoreRulesetListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 1, + "type_ident": "prometheus", + "note": "CPU usage alerts", + "open_flag": 2, + "creator_account_id": 10023, + "creator_id": 80011, + "creator_name": "Alice", + "created_at": 1710000000, + "updated_at": 1712000000 + } + ] + } + } + } + }, + "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/StoreRulesetListRequest" + }, + "example": { + "type_ident": "prometheus" + } + } + } + } + } + }, + "/monit/store/ruleset/delete": { + "post": { + "operationId": "monit-store-ruleset-delete", + "summary": "Delete ruleset", + "description": "Delete a ruleset from the rule repository by ID.", + "tags": [ + "Monitors/Rule sets" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Rule Repository Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/rule-sets/monit-store-ruleset-delete", + "metadata": { + "sidebarTitle": "Delete ruleset" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IDRequest" + }, + "example": { + "id": 1 + } + } + } + } + } + }, + "/monit/rule/counter/status": { + "post": { + "operationId": "monit-rule-read-counter-status", + "summary": "Get rule status counters for top-level folders", + "description": "Return trigger status summary for all top-level folder nodes — used for the overview dashboard.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-counter-status", + "metadata": { + "sidebarTitle": "Get rule status counters for top-level folders" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleStatusResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "folder_id": 100, + "folder_name": "Production", + "rule_total": 10, + "triggered_rule_count": 2 + } + ] + } + } + } + }, + "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/RuleEmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/monit/rule/list/basic": { + "post": { + "operationId": "monit-rule-read-list", + "summary": "List alert rules", + "description": "Return the basic information of all alert rules in a folder. For full rule details, call `POST /monit/rule/info`.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |\n\n## Usage\n\n- Set `folder_id` to `0` to list all rules across all folders visible to the current user.\n- The `triggered` field indicates whether the rule has any currently active alerts.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-list", + "metadata": { + "sidebarTitle": "List alert rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleBasicListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 50001, + "folder_id": 100, + "name": "CPU High", + "ds_type": "prometheus", + "enabled": true, + "triggered": true, + "created_at": 1710000000 + } + ] + } + } + } + }, + "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/RuleListRequest" + }, + "example": { + "folder_id": 100 + } + } + } + } + } + }, + "/monit/store/ruleset/info": { + "post": { + "operationId": "monit-store-ruleset-info", + "summary": "Get ruleset detail", + "description": "Retrieve the full details of a ruleset including its `payload` (the alert rule definitions as a JSON string).", + "tags": [ + "Monitors/Rule sets" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Rule Repository Read** (`monit`) |", + "href": "/en/api-reference/monitors/rule-sets/monit-store-ruleset-info", + "metadata": { + "sidebarTitle": "Get ruleset detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StoreRulesetItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 1, + "type_ident": "prometheus", + "note": "CPU usage alerts", + "open_flag": 2, + "payload": "[{\"prom_ql\":\"...\"}]", + "creator_account_id": 10023, + "creator_id": 80011, + "creator_name": "Alice", + "created_at": 1710000000, + "updated_at": 1712000000 + } + } + } + } + }, + "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/IDRequest" + }, + "example": { + "id": 1 + } + } + } + } + } + }, + "/monit/store/ruleset/create": { + "post": { + "operationId": "monit-store-ruleset-create", + "summary": "Create ruleset", + "description": "Create a new ruleset in the rule repository.", + "tags": [ + "Monitors/Rule sets" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Rule Repository Manage** (`monit`) |\n\n## Usage\n\n- `open_flag`: `0` = private (creator only), `1` = account-shared, `2` = public.\n- `payload` is a required JSON string containing the alert rule definitions.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/rule-sets/monit-store-ruleset-create", + "metadata": { + "sidebarTitle": "Create ruleset" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StoreRulesetItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 1, + "type_ident": "prometheus", + "note": "CPU usage alerts", + "open_flag": 1, + "created_at": 1712000000, + "updated_at": 1712000000 + } + } + } + } + }, + "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/StoreRulesetUpsertRequest" + }, + "example": { + "type_ident": "prometheus", + "note": "CPU usage alerts", + "open_flag": 1, + "payload": "[{\"prom_ql\":\"rate(cpu_usage[5m]) > 0.8\"}]" + } + } + } + } + } + }, + "/monit/datasource/list": { + "post": { + "operationId": "monit-datasource-read-list", + "summary": "List datasources", + "description": "Return all data sources for the current account. Optionally filter by `type_ident`.", + "tags": [ + "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.", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-list", + "metadata": { + "sidebarTitle": "List datasources" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DataSourceListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 10, + "account_id": 10023, + "type_ident": "prometheus", + "name": "Prometheus Prod", + "enabled": true, + "note": "Production Prometheus", + "address": "http://prometheus.example.com:9090", + "edge_cluster_name": "default", + "updated_at": 1712000000 + } + ] + } + } + } + }, + "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/DataSourceListRequest" + }, + "example": { + "type": "prometheus" + } + } + } + } + } + }, + "/monit/rule/update/fields": { + "post": { + "operationId": "monit-rule-write-fields-update", + "summary": "Batch update rule fields", + "description": "Update specific fields across multiple alert rules at once. Only the fields listed in `fields` are applied.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Include the field names you want to update in the `fields` array, e.g. `[\"enabled\", \"channel_ids\"]`.\n- Only the specified fields are updated; others are left unchanged.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-fields-update", + "metadata": { + "sidebarTitle": "Batch update rule fields" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleNameMessageListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "name": "CPU High", + "message": "" + }, + { + "name": "Disk High", + "message": "" + } + ] + } + } + } + }, + "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/RuleFieldsUpdateRequest" + }, + "example": { + "ids": [ + 50001, + 50002 + ], + "fields": [ + "enabled" + ], + "enabled": false + } + } + } + } + } + }, + "/monit/rule/counter/channel": { + "post": { + "operationId": "monit-rule-read-counter-channel", + "summary": "Get rule counts by channel", + "description": "Return an object mapping channel name to the number of rules routing alerts to that channel. If a channel name cannot be resolved, the channel ID (as a string) is used as the key.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-counter-channel", + "metadata": { + "sidebarTitle": "Get rule counts by channel" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCounterChannelResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "Production": 8 + } + } + } + } + }, + "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/RuleEmptyRequest" + }, + "example": {} + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "AppKeyAuth": { + "type": "apiKey", + "in": "query", + "name": "app_key", + "description": "App key issued from the Flashduty console under Account → APP Keys. Required on every public API call. Keep it secret — it grants the same access as the owning account." + } + }, + "responses": { + "BadRequest": { + "description": "Invalid request — usually a missing or malformed parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "missingParameter": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "InvalidParameter", + "message": "The specified parameter is not valid." + } + } + } + } + } + } + }, + "Unauthorized": { + "description": "Missing or invalid app_key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "missingAppKey": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "Unauthorized", + "message": "You are unauthorized." + } + } + } + } + } + } + }, + "Forbidden": { + "description": "The app_key is valid but lacks permission for this operation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "noEditPermission": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "AccessDenied", + "message": "Access Denied." + } + } + } + } + } + } + }, + "NotFound": { + "description": "The referenced resource does not exist or has been deleted. Note: Flashduty historically returns HTTP 400 with code `ResourceNotFound` for missing domain entities; a true 404 is reserved for unknown routes.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "resourceMissing": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "ResourceNotFound", + "message": "The resource you request is not found" + } + } + } + } + } + } + }, + "TooManyRequests": { + "description": "Rate limit hit. Either the global API limit, a per-account limit, or a per-integration limit.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "rateLimited": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "RequestTooFrequently", + "message": "Request too frequently." + } + } + } + } + } + } + }, + "ServerError": { + "description": "Unexpected server-side error. Include the request_id when reporting.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "internal": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "InternalError", + "message": "We encountered an internal error, and it has been reported. Please try again later." + } + } + } + } + } + } + } + }, + "schemas": { + "AlertRule": { + "type": "object", + "description": "Full alert rule configuration.", + "properties": { + "id": { + "type": "integer", + "format": "uint64" + }, + "account_id": { + "type": "integer", + "format": "uint64" + }, + "folder_id": { + "type": "integer", + "format": "uint64", + "description": "Folder the rule belongs to." + }, + "name": { + "type": "string", + "description": "Rule name." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom labels." + }, + "ds_type": { + "type": "string", + "description": "Data source type." + }, + "ds_list": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Data source name patterns (supports wildcards)." + }, + "ds_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Specific data source IDs." + }, + "enabled": { + "type": "boolean" + }, + "debug_log_enabled": { + "type": "boolean" + }, + "rule_configs": { + "$ref": "#/components/schemas/RuleConfigs" + }, + "cron_pattern": { + "type": "string", + "description": "5-field cron schedule." + }, + "delay_seconds": { + "type": "integer" + }, + "enabled_times": { + "type": "array", + "description": "Time windows when the rule is active.", + "items": { + "type": "object", + "properties": { + "days": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Days of week (0=Sunday)." + }, + "stime": { + "type": "string", + "description": "Start time, e.g. `09:00`." + }, + "etime": { + "type": "string", + "description": "End time, e.g. `18:00`." + } + } + } + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description_type": { + "type": "string", + "enum": [ + "text", + "markdown" + ] + }, + "description": { + "type": "string" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Channel IDs to send alerts to." + }, + "repeat_interval": { + "type": "integer", + "format": "int64", + "description": "Notification repeat interval in seconds." + }, + "repeat_total": { + "type": "integer", + "format": "int64", + "description": "Max number of repeat notifications." + }, + "creator_id": { + "type": "integer", + "format": "uint64" + }, + "creator_name": { + "type": "string" + }, + "updater_id": { + "type": "integer", + "format": "uint64" + }, + "updater_name": { + "type": "string" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + } + } + }, + "AlertRuleAudit": { + "type": "object", + "description": "An audit record capturing a rule snapshot at a point in time.", + "required": [ + "id", + "account_id", + "alert_rule_id", + "action", + "creator_id", + "creator_name", + "created_at" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "Audit record ID." + }, + "account_id": { + "type": "integer", + "format": "uint64" + }, + "alert_rule_id": { + "type": "integer", + "format": "uint64", + "description": "ID of the alert rule this record belongs to." + }, + "action": { + "type": "string", + "description": "Action performed, e.g. `create`, `update`." + }, + "content": { + "type": "string", + "description": "JSON string of the full rule snapshot at audit time. Populated on `/monit/rule/audit/detail`, omitted on list responses." + }, + "creator_id": { + "type": "integer", + "format": "uint64" + }, + "creator_name": { + "type": "string" + }, + "created_at": { + "type": "integer", + "format": "int64" + } + } + }, + "AlertRuleBasic": { + "type": "object", + "description": "Basic alert rule information for list views.", + "required": [ + "id", + "account_id", + "folder_id", + "name", + "ds_type", + "enabled", + "debug_log_enabled", + "cron_pattern", + "delay_seconds", + "creator_id", + "creator_name", + "updater_id", + "updater_name", + "created_at", + "updated_at", + "triggered" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "Unique rule ID." + }, + "account_id": { + "type": "integer", + "format": "uint64", + "description": "Account ID." + }, + "folder_id": { + "type": "integer", + "format": "uint64", + "description": "Folder ID." + }, + "name": { + "type": "string", + "description": "Rule name." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom labels." + }, + "ds_type": { + "type": "string", + "description": "Data source type, e.g. `prometheus`." + }, + "enabled": { + "type": "boolean", + "description": "Whether the rule is enabled." + }, + "debug_log_enabled": { + "type": "boolean", + "description": "Whether debug logging is enabled." + }, + "cron_pattern": { + "type": "string", + "description": "5-field cron schedule, e.g. `* * * * *`." + }, + "delay_seconds": { + "type": "integer", + "description": "Evaluation delay in seconds." + }, + "creator_id": { + "type": "integer", + "format": "uint64" + }, + "creator_name": { + "type": "string" + }, + "updater_id": { + "type": "integer", + "format": "uint64" + }, + "updater_name": { + "type": "string" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "triggered": { + "type": "boolean", + "description": "True if the rule currently has active alerts." + } + } + }, + "AlertRuleCounter": { + "type": "object", + "description": "One historical snapshot of the account's alert rule total.", + "required": [ + "id", + "account_id", + "num", + "clock" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64" + }, + "account_id": { + "type": "integer", + "format": "uint64" + }, + "num": { + "type": "integer", + "format": "int64", + "description": "Rule count at the sample time." + }, + "clock": { + "type": "integer", + "format": "int64", + "description": "Sample timestamp, Unix epoch seconds." + } + } + }, + "AlertRuleExport": { + "type": "object", + "description": "Portable alert rule representation for import/export. Omits identifying fields like `id`, `account_id`, and audit metadata.", + "required": [ + "name", + "ds_type", + "enabled", + "debug_log_enabled", + "cron_pattern" + ], + "properties": { + "name": { + "type": "string" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "ds_type": { + "type": "string" + }, + "ds_list": { + "type": "array", + "items": { + "type": "string" + } + }, + "ds_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + } + }, + "enabled": { + "type": "boolean" + }, + "debug_log_enabled": { + "type": "boolean" + }, + "rule_configs": { + "$ref": "#/components/schemas/RuleConfigs" + }, + "cron_pattern": { + "type": "string" + }, + "delay_seconds": { + "type": "integer" + }, + "enabled_times": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnabledTime" + } + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description_type": { + "type": "string", + "enum": [ + "text", + "markdown" + ] + }, + "description": { + "type": "string" + }, + "repeat_interval": { + "type": "integer", + "format": "int64" + }, + "repeat_total": { + "type": "integer", + "format": "int64" + } + } + }, + "AlertRuleExportListResponse": { + "type": "array", + "description": "List of exported rule configurations, compatible with `POST /monit/rule/import`.", + "items": { + "$ref": "#/components/schemas/AlertRuleExport" + } + }, + "AlertRuleInfoResponse": { + "allOf": [ + { + "$ref": "#/components/schemas/AlertRule" + } + ], + "description": "Full alert rule returned by the info endpoint. All server-assigned fields are guaranteed present.", + "required": [ + "id", + "account_id", + "folder_id", + "name", + "ds_type", + "enabled", + "debug_log_enabled", + "cron_pattern", + "delay_seconds", + "creator_id", + "creator_name", + "updater_id", + "updater_name", + "created_at", + "updated_at" + ] + }, + "AlertRuleStatus": { + "type": "object", + "description": "Rule trigger status for a folder node.", + "required": [ + "folder_id", + "rule_total", + "triggered_rule_count" + ], + "properties": { + "folder_id": { + "type": "integer", + "format": "uint64" + }, + "folder_name": { + "type": "string" + }, + "rule_total": { + "type": "integer", + "format": "int64", + "description": "Total rules in the folder family." + }, + "triggered_rule_count": { + "type": "integer", + "format": "int64", + "description": "Rules with active alerts." + } + } + }, + "DSClickHouseConfig": { + "type": "object", + "description": "ClickHouse datasource configuration. TLS fields are inherited from TLSClientConfig.", + "properties": { + "database": { + "type": "string", + "description": "Default database for authentication." + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "open_conns": { + "type": "integer" + }, + "idle_conns": { + "type": "integer" + }, + "lifetime_seconds": { + "type": "integer", + "format": "int64" + }, + "timeout_mills": { + "type": "integer", + "format": "int64" + }, + "max_execution_seconds": { + "type": "integer", + "format": "int64", + "description": "Max query execution time in seconds." + }, + "dial_timeout_mills": { + "type": "integer", + "format": "int64", + "description": "Dial timeout in milliseconds." + }, + "tls_enabled": { + "type": "boolean" + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + }, + "tls_key_pwd": { + "type": "string" + }, + "tls_skip_verify": { + "type": "boolean" + }, + "tls_server_name": { + "type": "string" + }, + "tls_min_version": { + "type": "string" + }, + "tls_max_version": { + "type": "string" + } + } + }, + "DSElasticSearchConfig": { + "type": "object", + "description": "Elasticsearch datasource configuration.", + "properties": { + "deployment": { + "type": "string", + "enum": [ + "cloud", + "self-managed" + ], + "description": "Deployment type. `cloud` uses Elastic Cloud; `self-managed` uses a self-hosted cluster." + }, + "timeout_mills": { + "type": "integer", + "format": "int64" + }, + "cloud_id": { + "type": "string", + "description": "Elastic Cloud deployment ID. Only for `cloud` deployment." + }, + "api_key": { + "type": "string", + "description": "Elastic Cloud API key. Only for `cloud` deployment." + }, + "username": { + "type": "string", + "description": "Username for `self-managed` deployment." + }, + "password": { + "type": "string" + }, + "service_token": { + "type": "string", + "description": "Service token; overrides username/password if set." + }, + "tls_ca": { + "type": "string" + }, + "certificate_fingerprint": { + "type": "string" + }, + "headers": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "DSLokiConfig": { + "type": "object", + "description": "Loki datasource configuration. TLS fields are inherited from TLSClientConfig.", + "properties": { + "basic_auth_enabled": { + "type": "boolean" + }, + "basic_auth_username": { + "type": "string" + }, + "basic_auth_password": { + "type": "string" + }, + "headers": { + "type": "array", + "items": { + "type": "string" + } + }, + "params": { + "type": "array", + "items": { + "type": "string" + } + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + }, + "tls_key_pwd": { + "type": "string" + }, + "tls_skip_verify": { + "type": "boolean" + }, + "tls_server_name": { + "type": "string" + }, + "tls_min_version": { + "type": "string" + }, + "tls_max_version": { + "type": "string" + } + } + }, + "DSMySQLConfig": { + "type": "object", + "description": "MySQL datasource configuration. TLS fields are inherited from TLSClientConfig.", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "open_conns": { + "type": "integer", + "description": "Maximum open connections." + }, + "idle_conns": { + "type": "integer", + "description": "Maximum idle connections." + }, + "lifetime_seconds": { + "type": "integer", + "format": "int64", + "description": "Connection maximum lifetime in seconds." + }, + "timeout_mills": { + "type": "integer", + "format": "int64", + "description": "Query timeout in milliseconds." + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + }, + "tls_key_pwd": { + "type": "string" + }, + "tls_skip_verify": { + "type": "boolean" + }, + "tls_server_name": { + "type": "string" + }, + "tls_min_version": { + "type": "string" + }, + "tls_max_version": { + "type": "string" + } + } + }, + "DSOracleConfig": { + "type": "object", + "description": "Oracle datasource configuration.", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "options": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Extra connection options as key-value pairs." + }, + "open_conns": { + "type": "integer" + }, + "idle_conns": { + "type": "integer" + }, + "lifetime_seconds": { + "type": "integer", + "format": "int64" + }, + "timeout_mills": { + "type": "integer", + "format": "int64" + } + } + }, + "DSPayload": { + "type": "object", + "description": "Type-specific datasource configuration. Include only the block matching `type_ident`.", + "properties": { + "prometheus": { + "$ref": "#/components/schemas/DSPrometheusConfig" + }, + "loki": { + "$ref": "#/components/schemas/DSLokiConfig" + }, + "mysql": { + "$ref": "#/components/schemas/DSMySQLConfig" + }, + "oracle": { + "$ref": "#/components/schemas/DSOracleConfig" + }, + "postgres": { + "$ref": "#/components/schemas/DSPostgresConfig" + }, + "clickhouse": { + "$ref": "#/components/schemas/DSClickHouseConfig" + }, + "elasticsearch": { + "$ref": "#/components/schemas/DSElasticSearchConfig" + }, + "sls": { + "$ref": "#/components/schemas/DSSLSConfig" + }, + "victorialogs": { + "$ref": "#/components/schemas/DSVictoriaLogsConfig" + } + } + }, + "DSPostgresConfig": { + "type": "object", + "description": "PostgreSQL datasource configuration.", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "open_conns": { + "type": "integer" + }, + "idle_conns": { + "type": "integer" + }, + "lifetime_seconds": { + "type": "integer", + "format": "int64" + }, + "timeout_mills": { + "type": "integer", + "format": "int64" + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + } + } + }, + "DSPrometheusConfig": { + "type": "object", + "description": "Prometheus datasource configuration. TLS fields are inherited from TLSClientConfig.", + "properties": { + "basic_auth_enabled": { + "type": "boolean", + "description": "Enable HTTP Basic Auth." + }, + "basic_auth_username": { + "type": "string", + "description": "Basic auth username." + }, + "basic_auth_password": { + "type": "string", + "description": "Basic auth password." + }, + "headers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Custom HTTP headers in `Key: Value` format." + }, + "params": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Custom query parameters in `key=value` format." + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + }, + "tls_key_pwd": { + "type": "string" + }, + "tls_skip_verify": { + "type": "boolean" + }, + "tls_server_name": { + "type": "string" + }, + "tls_min_version": { + "type": "string" + }, + "tls_max_version": { + "type": "string" + } + } + }, + "DSSLSConfig": { + "type": "object", + "description": "Alibaba Cloud SLS datasource configuration.", + "properties": { + "access_key_id": { + "type": "string", + "description": "Alibaba Cloud Access Key ID." + }, + "access_key_secret": { + "type": "string", + "description": "Alibaba Cloud Access Key Secret." + }, + "headers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Custom HTTP headers." + } + } + }, + "DSType": { + "type": "object", + "description": "A datasource type definition usable by alert rules.", + "required": [ + "id", + "name", + "ident", + "account_id", + "weight" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64" + }, + "name": { + "type": "string", + "description": "Display name, e.g. `Prometheus`." + }, + "ident": { + "type": "string", + "description": "Identifier used as the `ds_type` of rules, e.g. `prometheus`." + }, + "account_id": { + "type": "integer", + "format": "uint64", + "description": "Owning account ID. `0` for global types." + }, + "weight": { + "type": "integer", + "description": "Display order weight; higher appears first." + } + } + }, + "DSVictoriaLogsConfig": { + "type": "object", + "description": "VictoriaLogs datasource configuration. TLS fields are inherited from TLSClientConfig.", + "properties": { + "basic_auth_enabled": { + "type": "boolean" + }, + "basic_auth_username": { + "type": "string" + }, + "basic_auth_password": { + "type": "string" + }, + "headers": { + "type": "array", + "items": { + "type": "string" + } + }, + "params": { + "type": "array", + "items": { + "type": "string" + } + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + }, + "tls_key_pwd": { + "type": "string" + }, + "tls_skip_verify": { + "type": "boolean" + }, + "tls_server_name": { + "type": "string" + }, + "tls_min_version": { + "type": "string" + }, + "tls_max_version": { + "type": "string" + } + } + }, + "DataSourceItem": { + "type": "object", + "description": "A monitoring datasource.", + "required": [ + "id", + "account_id", + "type_ident", + "name", + "enabled", + "note", + "address", + "edge_cluster_name", + "updated_at" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "Unique datasource ID." + }, + "account_id": { + "type": "integer", + "format": "uint64", + "description": "Account ID." + }, + "type_ident": { + "type": "string", + "description": "Datasource type identifier. Allowed: `prometheus`, `loki`, `mysql`, `oracle`, `postgres`, `clickhouse`, `elasticsearch`, `sls`, `victorialogs`." + }, + "name": { + "type": "string", + "description": "Datasource display name." + }, + "enabled": { + "type": "boolean", + "description": "Whether the datasource is active." + }, + "note": { + "type": "string", + "description": "Optional description." + }, + "address": { + "type": "string", + "description": "Connection address. For Prometheus/Loki/VictoriaLogs: HTTP URL. For MySQL/Oracle/Postgres/ClickHouse: `host:port`. For SLS: endpoint without http/https prefix." + }, + "payload": { + "$ref": "#/components/schemas/DSPayload" + }, + "edge_cluster_name": { + "type": "string", + "description": "Monitors edge cluster name responsible for evaluating rules using this datasource." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp, Unix epoch seconds." + } + } + }, + "DataSourceListRequest": { + "type": "object", + "description": "Filter parameters for listing datasources.", + "properties": { + "type": { + "type": "string", + "description": "Filter by datasource type identifier. Omit to return all types. Allowed values: `prometheus`, `loki`, `mysql`, `oracle`, `postgres`, `clickhouse`, `elasticsearch`, `sls`, `victorialogs`." + } + } + }, + "DataSourceListResponse": { + "type": "array", + "description": "List of datasources. Sensitive credential fields are omitted.", + "items": { + "$ref": "#/components/schemas/DataSourceItem" + } + }, + "DataSourceUpsertRequest": { + "type": "object", + "description": "Request body for creating or updating a datasource. `id` is required only for update. `address` is required for all types except Elasticsearch with `deployment=cloud`.", + "required": [ + "type_ident", + "name", + "edge_cluster_name", + "payload" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "Datasource ID. Required for update; omit for create." + }, + "type_ident": { + "type": "string", + "description": "Datasource type identifier. Allowed: `prometheus`, `loki`, `mysql`, `oracle`, `postgres`, `clickhouse`, `elasticsearch`, `sls`, `victorialogs`." + }, + "name": { + "type": "string", + "description": "Datasource display name." + }, + "note": { + "type": "string", + "description": "Optional description." + }, + "address": { + "type": "string", + "description": "Connection address. For Prometheus/Loki/VictoriaLogs: HTTP URL. For MySQL/Oracle/Postgres/ClickHouse: `host:port`. For SLS: endpoint without http/https prefix. Not required for Elasticsearch cloud deployment." + }, + "payload": { + "$ref": "#/components/schemas/DSPayload", + "description": "Type-specific configuration block. Must include the key matching `type_ident`." + }, + "edge_cluster_name": { + "type": "string", + "description": "Monitors edge cluster name responsible for evaluating rules using this datasource." + } + } + }, + "DutyError": { + "type": "object", + "description": "Error payload inside the response envelope. Present only on non-2xx responses.", + "properties": { + "code": { + "$ref": "#/components/schemas/ErrorCode" + }, + "message": { + "type": "string", + "description": "Human-readable error message, localized by the caller's Accept-Language. May contain field names, IDs, or other context from the failing request.", + "example": "The specified parameter template_id is not valid." + } + }, + "required": [ + "code", + "message" + ] + }, + "EmptyObject": { + "type": "object", + "description": "An empty object. Returned as the `data` payload by operations whose success signal is simply the absence of an error.", + "additionalProperties": false + }, + "EmptyRequest": { + "type": "object", + "description": "No parameters required.", + "additionalProperties": false + }, + "EmptyResponse": { + "type": "object", + "description": "Empty response body. The server returns `data: null` on success.", + "properties": {} + }, + "EnabledTime": { + "type": "object", + "description": "Time window in which the rule is active.", + "properties": { + "days": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Days of week, 0 = Sunday." + }, + "stime": { + "type": "string", + "description": "Start time, e.g. `09:00`." + }, + "etime": { + "type": "string", + "description": "End time, e.g. `18:00`." + } + } + }, + "ErrorCode": { + "type": "string", + "description": "Flashduty error code enum. Every failed API response sets `error.code` to one of these stable wire strings. HTTP status is informational — the authoritative signal is the enum value.\n\n| Code | HTTP | Meaning |\n|---|---|---|\n| `OK` | 200 | Reserved — not returned on real errors. |\n| `InvalidParameter` | 400 | A required parameter is missing or failed validation. |\n| `BadRequest` | 400 | Generic 400 used when no more specific code fits. |\n| `InvalidContentType` | 400 | The `Content-Type` header is not `application/json`. |\n| `ResourceNotFound` | 400 | The referenced resource does not exist. Note: returned as HTTP 400, not 404 (historical choice). |\n| `NoLicense` | 400 | The feature is license-gated and no active license was found. |\n| `ReferenceExist` | 400 | Deletion blocked — other entities still reference this resource. |\n| `Unauthorized` | 401 | `app_key` is missing, invalid, or expired. |\n| `BalanceNotEnough` | 402 | Billing-gated operation with insufficient account balance. |\n| `AccessDenied` | 403 | Authenticated but lacking the permission required for this operation. |\n| `RouteNotFound` | 404 | The request URL path is not a known route. |\n| `MethodNotAllowed` | 405 | The HTTP method is not allowed on this otherwise-known path. |\n| `UndonedOrderExist` | 409 | An outstanding billing order blocks this new one. Wait and retry. |\n| `RequestLocked` | 423 | Operation temporarily locked due to repeated failures. |\n| `EntityTooLarge` | 413 | Request body exceeds the configured max size. |\n| `RequestTooFrequently` | 429 | Rate limit hit — API-global, per-account, or per-integration. |\n| `RequestVerifyRequired` | 428 | Second-factor verification required but not supplied. |\n| `DangerousOperation` | 428 | High-risk operation requires MFA verification. |\n| `InternalError` | 500 | Unhandled server-side error. Include `request_id` in the bug report. |\n| `ServiceUnavailable` | 503 | A backend dependency is unavailable. Try again later. |", + "enum": [ + "OK", + "InvalidParameter", + "BadRequest", + "InvalidContentType", + "ResourceNotFound", + "NoLicense", + "ReferenceExist", + "Unauthorized", + "BalanceNotEnough", + "AccessDenied", + "RouteNotFound", + "MethodNotAllowed", + "UndonedOrderExist", + "RequestLocked", + "EntityTooLarge", + "RequestTooFrequently", + "RequestVerifyRequired", + "DangerousOperation", + "InternalError", + "ServiceUnavailable" + ], + "x-enumDescriptions": { + "OK": "Reserved — not returned on real errors.", + "InvalidParameter": "A required parameter is missing or failed validation.", + "BadRequest": "Generic 400 used when no more specific code fits.", + "InvalidContentType": "The `Content-Type` header is not `application/json`.", + "ResourceNotFound": "The referenced resource does not exist. Note: returned as HTTP 400, not 404 (historical choice).", + "NoLicense": "The feature is license-gated and no active license was found.", + "ReferenceExist": "Deletion blocked — other entities still reference this resource.", + "Unauthorized": "`app_key` is missing, invalid, or expired.", + "BalanceNotEnough": "Billing-gated operation with insufficient account balance.", + "AccessDenied": "Authenticated but lacking the permission required for this operation.", + "RouteNotFound": "The request URL path is not a known route.", + "MethodNotAllowed": "The HTTP method is not allowed on this otherwise-known path.", + "UndonedOrderExist": "An outstanding billing order blocks this new one. Wait and retry.", + "RequestLocked": "Operation temporarily locked due to repeated failures.", + "EntityTooLarge": "Request body exceeds the configured max size.", + "RequestTooFrequently": "Rate limit hit — API-global, per-account, or per-integration.", + "RequestVerifyRequired": "Second-factor verification required but not supplied.", + "DangerousOperation": "High-risk operation requires MFA verification.", + "InternalError": "Unhandled server-side error. Include `request_id` in the bug report.", + "ServiceUnavailable": "A backend dependency is unavailable. Try again later." + }, + "example": "InvalidParameter" + }, + "ErrorResponse": { + "type": "object", + "description": "Response envelope for errors. `error` is required; `data` is absent.", + "properties": { + "request_id": { + "type": "string", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "error": { + "$ref": "#/components/schemas/DutyError" + } + }, + "required": [ + "request_id", + "error" + ] + }, + "IDRequest": { + "type": "object", + "required": [ + "id" + ], + "description": "Request with a single numeric ID.", + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "Resource ID." + } + } + }, + "NameMessage": { + "type": "object", + "description": "Per-item result for batch rule operations.", + "required": [ + "name", + "message" + ], + "properties": { + "name": { + "type": "string", + "description": "Rule name." + }, + "message": { + "type": "string", + "description": "Empty on success, error message on failure." + } + } + }, + "RuleAuditListResponse": { + "type": "array", + "description": "Audit records for a rule, ordered by creation time descending. The `content` field is omitted.", + "items": { + "$ref": "#/components/schemas/AlertRuleAudit" + } + }, + "RuleBasicListResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertRuleBasic" + }, + "description": "List of alert rules (basic info)." + }, + "RuleConfigs": { + "type": "object", + "description": "Rule evaluation configuration.", + "properties": { + "queries": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Query identifier (letter, e.g. `A`). The name `R` is reserved and must not be used." + }, + "expr": { + "type": "string", + "description": "Query expression." + }, + "label_fields": { + "type": "array", + "items": { + "type": "string" + } + }, + "value_fields": { + "type": "array", + "items": { + "type": "string" + } + }, + "args": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "relate_queries": { + "type": "array", + "description": "Optional auxiliary queries whose results are attached to alert events as context. Each entry must have a unique `name` (not duplicating any query name) and a non-empty `expr`.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Relate-query identifier." + }, + "expr": { + "type": "string", + "description": "Query expression." + }, + "args": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "check_threshold": { + "type": "object", + "description": "Threshold check configuration.", + "properties": { + "enabled": { + "type": "boolean" + }, + "alerting_check_times": { + "type": "integer" + }, + "recovery_check_times": { + "type": "integer" + }, + "push_recovery_event": { + "type": "boolean" + }, + "critical": { + "type": "string" + }, + "warning": { + "type": "string" + }, + "info": { + "type": "string" + }, + "recovery": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "invert", + "threshold", + "ql" + ] + }, + "condition": { + "type": "string" + } + } + } + } + }, + "check_anydata": { + "type": "object", + "description": "Any-data check configuration. Fires when the query returns any data rows.", + "properties": { + "enabled": { + "type": "boolean" + }, + "alerting_check_times": { + "type": "integer" + }, + "recovery_check_times": { + "type": "integer" + }, + "push_recovery_event": { + "type": "boolean" + }, + "severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info" + ] + }, + "recovery": { + "type": "object", + "description": "Recovery condition for any-data check. If omitted or `mode` is empty, treated as `nodata`.", + "properties": { + "mode": { + "type": "string", + "enum": [ + "nodata", + "ql" + ], + "description": "`nodata` = recover when the query returns no data; `ql` = recover when the `condition` expression evaluates to true. When `mode` is `ql`, only a single query (`name=A`) is permitted." + }, + "condition": { + "type": "string", + "description": "Recovery expression. Required when `mode` is `ql`." + }, + "args": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "check_nodata": { + "type": "object", + "description": "No-data check configuration.", + "properties": { + "enabled": { + "type": "boolean" + }, + "alerting_check_times": { + "type": "integer" + }, + "recovery_check_times": { + "type": "integer" + }, + "push_recovery_event": { + "type": "boolean" + }, + "severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info" + ] + }, + "resolve_timeout": { + "type": "integer", + "description": "Auto-resolve after N seconds." + } + } + } + } + }, + "RuleCounterChannelResponse": { + "type": "object", + "description": "Map of channel name to rule count. Unresolved channel IDs appear as stringified IDs.", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + }, + "RuleCounterNodeResponse": { + "type": "object", + "description": "Map of top-level folder name to rule count.", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + }, + "RuleCounterTotalResponse": { + "type": "array", + "description": "Historical rule-count samples ordered by `clock` ascending.", + "items": { + "$ref": "#/components/schemas/AlertRuleCounter" + } + }, + "RuleDsTypesResponse": { + "type": "array", + "description": "Datasource types available to the account — global types plus account-scoped types.", + "items": { + "$ref": "#/components/schemas/DSType" + } + }, + "RuleEmptyRequest": { + "type": "object", + "description": "No parameters required.", + "additionalProperties": false + }, + "RuleEmptyResponse": { + "type": "object", + "description": "Empty response on success.", + "additionalProperties": false + }, + "RuleFieldsUpdateRequest": { + "type": "object", + "required": [ + "ids", + "fields" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Rule IDs to update." + }, + "fields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Field names to update." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "ds_type": { + "type": "string" + }, + "ds_list": { + "type": "array", + "items": { + "type": "string" + } + }, + "ds_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + } + }, + "enabled": { + "type": "boolean" + }, + "debug_log_enabled": { + "type": "boolean" + }, + "cron_pattern": { + "type": "string" + }, + "delay_seconds": { + "type": "integer" + }, + "enabled_times": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnabledTime" + } + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description": { + "type": "string" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + } + }, + "repeat_interval": { + "type": "integer", + "format": "int64" + }, + "repeat_total": { + "type": "integer", + "format": "int64" + } + } + }, + "RuleFolderIDRequest": { + "type": "object", + "properties": { + "folder_id": { + "type": "integer", + "format": "uint64", + "description": "Folder ID. 0 for all." + } + } + }, + "RuleIDRequest": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "Rule ID." + } + } + }, + "RuleIDsRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Rule IDs." + } + } + }, + "RuleImportRequest": { + "type": "array", + "description": "Array of alert rule export objects to import.", + "items": { + "$ref": "#/components/schemas/AlertRule" + } + }, + "RuleImportResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameMessage" + }, + "description": "Import result for each rule." + }, + "RuleListRequest": { + "type": "object", + "description": "Filter parameter for listing rules in a folder.", + "properties": { + "folder_id": { + "type": "integer", + "format": "uint64", + "description": "Folder ID. 0 to list all accessible rules." + } + } + }, + "RuleMoveRequest": { + "type": "object", + "required": [ + "ids", + "dest_folder_id" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Rule IDs to move." + }, + "dest_folder_id": { + "type": "integer", + "format": "uint64", + "description": "Destination folder ID." + } + } + }, + "RuleNameMessageListResponse": { + "type": "array", + "description": "Per-rule batch-operation results.", + "items": { + "$ref": "#/components/schemas/NameMessage" + } + }, + "RuleStatusResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertRuleStatus" + } + }, + "SLSLogstoresRequest": { + "type": "object", + "description": "Parameters for listing SLS logstores.", + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "SLS datasource ID." + }, + "project": { + "type": "string", + "description": "SLS project name." + }, + "offset": { + "type": "integer", + "description": "Pagination offset." + }, + "size": { + "type": "integer", + "description": "Page size." + } + } + }, + "SLSLogstoresResponse": { + "type": "array", + "description": "List of SLS logstore names.", + "items": { + "type": "string" + } + }, + "SLSProjectsRequest": { + "type": "object", + "description": "Parameters for listing SLS projects.", + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "SLS datasource ID." + }, + "query": { + "type": "string", + "description": "Name prefix filter." + }, + "offset": { + "type": "integer", + "description": "Pagination offset." + }, + "size": { + "type": "integer", + "description": "Page size." + } + } + }, + "SLSProjectsResponse": { + "type": "array", + "description": "List of SLS project names.", + "items": { + "type": "string" + } + }, + "StoreRulesetItem": { + "type": "object", + "description": "A rule repository ruleset.", + "required": [ + "id", + "type_ident", + "note", + "open_flag", + "creator_account_id", + "creator_id", + "creator_name", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "Ruleset ID." + }, + "type_ident": { + "type": "string", + "description": "Datasource type identifier this ruleset applies to." + }, + "note": { + "type": "string", + "description": "Description or title of the ruleset." + }, + "open_flag": { + "type": "integer", + "enum": [ + 0, + 1, + 2 + ], + "description": "Sharing scope. `0` = private (creator only), `1` = account-shared, `2` = public." + }, + "payload": { + "type": "string", + "description": "JSON string containing the alert rule definitions. Omitted in list responses." + }, + "creator_account_id": { + "type": "integer", + "format": "uint64", + "description": "Account ID of the creator." + }, + "creator_id": { + "type": "integer", + "format": "uint64", + "description": "Member ID of the creator." + }, + "creator_name": { + "type": "string", + "description": "Display name of the creator." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp, Unix epoch seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp, Unix epoch seconds." + } + } + }, + "StoreRulesetListRequest": { + "type": "object", + "required": [ + "type_ident" + ], + "description": "Filter rulesets by datasource type.", + "properties": { + "type_ident": { + "type": "string", + "description": "Datasource type identifier to filter by, e.g. `prometheus`." + } + } + }, + "StoreRulesetListResponse": { + "type": "array", + "description": "Rulesets accessible to the current user. The `payload` field is omitted.", + "items": { + "$ref": "#/components/schemas/StoreRulesetItem" + } + }, + "StoreRulesetUpdateRequest": { + "type": "object", + "required": [ + "id", + "note", + "payload" + ], + "description": "Parameters for updating a ruleset.", + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "Ruleset ID to update." + }, + "note": { + "type": "string", + "description": "New description." + }, + "open_flag": { + "type": "integer", + "enum": [ + 0, + 1, + 2 + ], + "description": "New sharing scope. `0` = private, `1` = account-shared, `2` = public." + }, + "payload": { + "type": "string", + "description": "New JSON string of alert rule definitions." + } + } + }, + "StoreRulesetUpsertRequest": { + "type": "object", + "description": "Request body for creating a ruleset. All fields are validated by `Validate()` on the server.", + "required": [ + "type_ident", + "note", + "payload" + ], + "properties": { + "type_ident": { + "type": "string", + "description": "Datasource type identifier this ruleset applies to, e.g. `prometheus`." + }, + "note": { + "type": "string", + "description": "Description or title of the ruleset." + }, + "open_flag": { + "type": "integer", + "enum": [ + 0, + 1, + 2 + ], + "description": "Sharing scope. `0` = private (creator only), `1` = account-shared, `2` = public. Defaults to `0` if omitted." + }, + "payload": { + "type": "string", + "description": "JSON string containing the alert rule definitions." + } + } + }, + "SuccessEnvelope": { + "type": "object", + "description": "Success response envelope. On every 2xx response, `request_id` identifies the call (also mirrored in the `Flashcat-Request-Id` header) and `data` holds the endpoint-specific payload. Failure responses use a different shape — see `ErrorResponse`.", + "properties": { + "request_id": { + "type": "string", + "description": "Unique ID for this request. Mirrored in the Flashcat-Request-Id response header. Include it when reporting issues.", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "data": { + "description": "Endpoint-specific payload. See each operation's 200 response schema." + } + }, + "required": [ + "request_id", + "data" + ] + } + } + } +} diff --git a/api-reference/monitors.openapi.zh.json b/api-reference/monitors.openapi.zh.json new file mode 100644 index 0000000..905b9e9 --- /dev/null +++ b/api-reference/monitors.openapi.zh.json @@ -0,0 +1,4444 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Flashduty 开放 API", + "description": "Flashduty 事件管理平台的公开 HTTP API —— 覆盖故障、通知模板、协作空间、值班排班、监控、RUM、以及平台管理。每次调用都需在 query 中携带 `app_key`,该 key 在 Flashduty 控制台 账户 → APP Key 中签发。所有响应使用统一结构:成功时为 `{ request_id, data }`,失败时为 `{ request_id, error }`。", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://api.flashcat.cloud", + "description": "Flashduty Open API" + } + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "tags": [ + { + "name": "Monitors/告警规则", + "description": "创建、管理和导出监控告警规则,查询规则统计和审计历史。" + }, + { + "name": "Monitors/告警数据源", + "description": "管理监控告警规则用于查询指标的数据源。" + }, + { + "name": "Monitors/规则集", + "description": "管理 Monitors 规则仓库中的共享规则集,规则集可在账户内或公开共享。" + } + ], + "paths": { + "/monit/store/ruleset/update": { + "post": { + "operationId": "monit-store-ruleset-update", + "summary": "更新规则集", + "description": "更新已有规则集的备注、共享标志及 payload。", + "tags": [ + "Monitors/规则集" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **规则仓库管理**(`monit`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/rule-sets/monit-store-ruleset-update", + "metadata": { + "sidebarTitle": "更新规则集" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StoreRulesetItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 1, + "note": "更新后的 CPU 告警", + "open_flag": 2, + "updated_at": 1712100000 + } + } + } + } + }, + "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/StoreRulesetUpdateRequest" + }, + "example": { + "id": 1, + "note": "更新后的 CPU 告警", + "open_flag": 2, + "payload": "[{\"prom_ql\":\"rate(cpu_usage[5m]) > 0.9\"}]" + } + } + } + } + } + }, + "/monit/rule/counter/total": { + "post": { + "operationId": "monit-rule-read-counter-total", + "summary": "查看规则数量时序", + "description": "返回当前账户下规则总数的历史时序数据,每个 `clock` 时间戳对应一个采样。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |\n\n## 使用说明\n\n- 每一项为一次历史快照:`num` 为 `clock`(Unix 时间戳,秒)时刻的规则总数。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-counter-total", + "metadata": { + "sidebarTitle": "查看规则数量时序" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCounterTotalResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 1, + "account_id": 10023, + "num": 50, + "clock": 1712000000 + } + ] + } + } + } + }, + "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/RuleEmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/monit/datasource/create": { + "post": { + "operationId": "monit-datasource-write-create", + "summary": "创建数据源", + "description": "创建新的监控数据源,`payload` 中须包含对应类型的配置块。", + "tags": [ + "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`、`victorialogs`。\n- `edge_cluster_name` 指定使用该数据源进行规则评估的 Monitors Edge 集群。\n- 对于 `elasticsearch`,`payload.elasticsearch.deployment` 须设为 `cloud` 或 `self-managed`。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/data-sources/monit-datasource-write-create", + "metadata": { + "sidebarTitle": "创建数据源" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DataSourceItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 10, + "type_ident": "prometheus", + "name": "生产 Prometheus", + "enabled": true, + "edge_cluster_name": "default", + "updated_at": 1712000000 + } + } + } + } + }, + "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/DataSourceUpsertRequest" + }, + "example": { + "type_ident": "prometheus", + "name": "生产 Prometheus", + "note": "生产环境 Prometheus", + "address": "http://prometheus.example.com:9090", + "edge_cluster_name": "default", + "payload": { + "prometheus": { + "basic_auth_enabled": false + } + } + } + } + } + } + } + }, + "/monit/datasource/update": { + "post": { + "operationId": "monit-datasource-write-update", + "summary": "更新数据源", + "description": "更新已有数据源,需提供 `id` 及待修改的字段。", + "tags": [ + "Monitors/告警数据源" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源管理**(`monit`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/data-sources/monit-datasource-write-update", + "metadata": { + "sidebarTitle": "更新数据源" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DataSourceItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 10, + "type_ident": "prometheus", + "name": "生产 Prometheus v2", + "enabled": true, + "edge_cluster_name": "default", + "updated_at": 1712100000 + } + } + } + } + }, + "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/DataSourceUpsertRequest" + }, + "example": { + "id": 10, + "type_ident": "prometheus", + "name": "生产 Prometheus v2", + "note": "已更新", + "address": "http://prometheus-v2.example.com:9090", + "edge_cluster_name": "default", + "payload": { + "prometheus": { + "basic_auth_enabled": false + } + } + } + } + } + } + } + }, + "/monit/rule/move": { + "post": { + "operationId": "monit-rule-write-move", + "summary": "移动告警规则到文件夹", + "description": "将一条或多条告警规则移动到其他文件夹。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-move", + "metadata": { + "sidebarTitle": "移动告警规则到文件夹" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleNameMessageListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "name": "CPU 过高", + "message": "" + } + ] + } + } + } + }, + "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/RuleMoveRequest" + }, + "example": { + "ids": [ + 50001, + 50002 + ], + "dest_folder_id": 200 + } + } + } + } + } + }, + "/monit/rule/counter/node": { + "post": { + "operationId": "monit-rule-read-counter-node", + "summary": "按文件夹节点查询规则统计", + "description": "返回一个对象,key 为顶层文件夹名称,value 为该文件夹及其子孙下的规则总数。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-counter-node", + "metadata": { + "sidebarTitle": "按文件夹节点查询规则统计" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCounterNodeResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "生产环境": 10, + "预发环境": 3 + } + } + } + } + }, + "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/RuleEmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/monit/rule/audit/detail": { + "post": { + "operationId": "monit-rule-read-audit-detail", + "summary": "查看规则审计快照", + "description": "返回审计记录(包含 `content` 字段,即该时间点规则配置的 JSON 字符串快照)。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |\n\n## 使用说明\n\n- 传入来自 `POST /monit/rule/audits` 的审计记录 `id`(非规则 `id`)。\n- `content` 为 JSON 字符串,解析后可获得完整的规则快照。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-audit-detail", + "metadata": { + "sidebarTitle": "查看规则审计快照" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertRuleAudit" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 9001, + "account_id": 10023, + "alert_rule_id": 50001, + "action": "update", + "content": "{\"id\":50001,\"name\":\"CPU 过高\"}", + "creator_id": 80011, + "creator_name": "Alice", + "created_at": 1712000000 + } + } + } + } + }, + "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/RuleIDRequest" + }, + "example": { + "id": 9001 + } + } + } + } + } + }, + "/monit/datasource/delete": { + "post": { + "operationId": "monit-datasource-write-delete", + "summary": "删除数据源", + "description": "通过 ID 删除数据源。引用该数据源的告警规则需提前更新或删除。", + "tags": [ + "Monitors/告警数据源" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源管理**(`monit`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/data-sources/monit-datasource-write-delete", + "metadata": { + "sidebarTitle": "删除数据源" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IDRequest" + }, + "example": { + "id": 10 + } + } + } + } + } + }, + "/monit/rule/delete/batch": { + "post": { + "operationId": "monit-rule-write-delete-batch", + "summary": "批量删除告警规则", + "description": "在单次请求中删除多条告警规则。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **30 次/分钟**;**5 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-delete-batch", + "metadata": { + "sidebarTitle": "批量删除告警规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleEmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleIDsRequest" + }, + "example": { + "ids": [ + 50001, + 50002 + ] + } + } + } + } + } + }, + "/monit/datasource/sls/projects": { + "post": { + "operationId": "monit-datasource-read-sls-projects", + "summary": "查询 SLS 项目列表", + "description": "列出指定 SLS 数据源中可用的阿里云日志服务(SLS)项目。", + "tags": [ + "Monitors/告警数据源" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源查看**(`monit`) |\n\n## 使用说明\n\n- `id` 指定的数据源类型必须为 `sls`。\n- 使用 `query` 按名称前缀过滤项目,使用 `offset` 和 `size` 分页。", + "href": "/zh/api-reference/monitors/data-sources/monit-datasource-read-sls-projects", + "metadata": { + "sidebarTitle": "查询 SLS 项目列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/SLSProjectsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + "project-a", + "project-b" + ] + } + } + } + }, + "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/SLSProjectsRequest" + }, + "example": { + "id": 10, + "query": "", + "offset": 0, + "size": 50 + } + } + } + } + } + }, + "/monit/rule/status": { + "post": { + "operationId": "monit-rule-write-status", + "summary": "查看文件夹下规则触发状态", + "description": "返回指定文件夹节点及其子孙节点下所有规则的触发情况汇总。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- 将 `folder_id` 设为 `0` 可获取所有文件夹的汇总。\n- 若文件夹包含规则数量过多,为保护系统会跳过计算。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-status", + "metadata": { + "sidebarTitle": "查看文件夹下规则触发状态" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleStatusResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "folder_id": 100, + "folder_name": "生产环境", + "rule_total": 10, + "triggered_rule_count": 2 + } + ] + } + } + } + }, + "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/RuleFolderIDRequest" + }, + "example": { + "folder_id": 100 + } + } + } + } + } + }, + "/monit/rule/export": { + "post": { + "operationId": "monit-rule-read-export", + "summary": "导出告警规则", + "description": "将选定告警规则的配置导出为可移植的 JSON 数组,与 `POST /monit/rule/import` 兼容。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**;**1 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-export", + "metadata": { + "sidebarTitle": "导出告警规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertRuleExportListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "name": "CPU 过高", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "* * * * *" + } + ] + } + } + } + }, + "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/RuleIDsRequest" + }, + "example": { + "ids": [ + 50001 + ] + } + } + } + } + } + }, + "/monit/datasource/sls/logstores": { + "post": { + "operationId": "monit-datasource-read-sls-logstores", + "summary": "查询 SLS 日志库列表", + "description": "列出指定 SLS 数据源中某个项目下的日志库。", + "tags": [ + "Monitors/告警数据源" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源查看**(`monit`) |\n\n## 使用说明\n\n- `id` 指定的数据源类型必须为 `sls`。\n- 通过 `project` 指定要列出日志库的 SLS 项目。", + "href": "/zh/api-reference/monitors/data-sources/monit-datasource-read-sls-logstores", + "metadata": { + "sidebarTitle": "查询 SLS 日志库列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/SLSLogstoresResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + "logstore-1", + "logstore-2" + ] + } + } + } + }, + "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/SLSLogstoresRequest" + }, + "example": { + "id": 10, + "project": "project-a", + "offset": 0, + "size": 50 + } + } + } + } + } + }, + "/monit/datasource/info": { + "post": { + "operationId": "monit-datasource-read-info", + "summary": "查看数据源详情", + "description": "通过 ID 获取单个数据源的完整信息,包括 `payload` 配置。", + "tags": [ + "Monitors/告警数据源" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源查看**(`monit`) |", + "href": "/zh/api-reference/monitors/data-sources/monit-datasource-read-info", + "metadata": { + "sidebarTitle": "查看数据源详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DataSourceItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 10, + "account_id": 10023, + "type_ident": "prometheus", + "name": "生产 Prometheus", + "enabled": true, + "note": "生产环境 Prometheus", + "address": "http://prometheus.example.com:9090", + "payload": { + "prometheus": { + "basic_auth_enabled": false, + "basic_auth_username": "", + "basic_auth_password": "", + "tls_skip_verify": false + } + }, + "edge_cluster_name": "default", + "updated_at": 1712000000 + } + } + } + } + }, + "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/IDRequest" + }, + "example": { + "id": 10 + } + } + } + } + } + }, + "/monit/rule/audits": { + "post": { + "operationId": "monit-rule-read-audits", + "summary": "查询规则变更历史", + "description": "返回告警规则的变更历史(审计记录)。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-audits", + "metadata": { + "sidebarTitle": "查询规则变更历史" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleAuditListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 9001, + "account_id": 10023, + "alert_rule_id": 50001, + "action": "update", + "creator_id": 80011, + "creator_name": "Alice", + "created_at": 1712000000 + } + ] + } + } + } + }, + "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/RuleIDRequest" + }, + "example": { + "id": 50001 + } + } + } + } + } + }, + "/monit/rule/info": { + "post": { + "operationId": "monit-rule-read-info", + "summary": "查看告警规则详情", + "description": "通过 ID 返回告警规则的完整配置,包括规则查询、阈值和通知设置。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-info", + "metadata": { + "sidebarTitle": "查看告警规则详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertRuleInfoResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 50001, + "folder_id": 100, + "name": "CPU 过高", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "* * * * *", + "channel_ids": [ + 20001 + ] + } + } + } + } + }, + "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/RuleIDRequest" + }, + "example": { + "id": 50001 + } + } + } + } + } + }, + "/monit/rule/delete": { + "post": { + "operationId": "monit-rule-write-delete", + "summary": "删除告警规则", + "description": "通过 ID 删除单条告警规则。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-delete", + "metadata": { + "sidebarTitle": "删除告警规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleEmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleIDRequest" + }, + "example": { + "id": 50001 + } + } + } + } + } + }, + "/monit/rule/dstypes": { + "post": { + "operationId": "monit-rule-read-dstypes", + "summary": "查询可用的数据源类型", + "description": "返回当前账户在创建告警规则时可使用的数据源类型(`DSType` 记录)列表,包括全局类型和账户自定义类型。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-dstypes", + "metadata": { + "sidebarTitle": "查询可用的数据源类型" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleDsTypesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 1, + "name": "Prometheus", + "ident": "prometheus", + "account_id": 0, + "weight": 100 + } + ] + } + } + } + }, + "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/RuleEmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/monit/rule/update": { + "post": { + "operationId": "monit-rule-write-update", + "summary": "更新告警规则", + "description": "替换已有告警规则的完整配置,所有字段将被覆盖。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- `id` 为必填项。其他字段与 `POST /monit/rule/create` 的规则相同。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-update", + "metadata": { + "sidebarTitle": "更新告警规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertRule" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 50001, + "updated_at": 1712100000 + } + } + } + } + }, + "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/AlertRule" + }, + "example": { + "id": 50001, + "folder_id": 100, + "name": "CPU 过高 v2", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "* * * * *", + "rule_configs": { + "queries": [ + { + "name": "A", + "expr": "avg(cpu_usage_idle) < 5" + } + ] + } + } + } + } + } + } + }, + "/monit/rule/import": { + "post": { + "operationId": "monit-rule-write-import", + "summary": "导入告警规则", + "description": "从 JSON 数组导入一条或多条告警规则,返回每条规则的导入结果(成功或失败)。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **20 次/分钟**;**2 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- 请求体为规则导出对象的 JSON 数组(与 `POST /monit/rule/export` 输出兼容)。\n- 每个对象必须包含 `folder_id`、`ds_type` 以及 `ds_list` 或 `ds_ids` 之一。\n- 部分规则可能失败(如名称重复),请检查每条结果的状态。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-import", + "metadata": { + "sidebarTitle": "导入告警规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleImportResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "name": "CPU 过高", + "message": "" + } + ] + } + } + } + }, + "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/RuleImportRequest" + }, + "example": [ + { + "folder_id": 100, + "name": "CPU 过高", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "* * * * *", + "rule_configs": { + "queries": [ + { + "name": "A", + "expr": "avg(cpu_usage_idle) < 10" + } + ] + } + } + ] + } + } + } + } + }, + "/monit/rule/create": { + "post": { + "operationId": "monit-rule-write-create", + "summary": "创建告警规则", + "description": "创建新的告警规则,返回带有分配 ID 的已创建规则。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- `name`、`ds_type`、`cron_pattern` 和 `rule_configs.queries` 为必填项。\n- `ds_list`(支持通配符)或 `ds_ids` 必须有一个非空。\n- `cron_pattern` 使用标准 5 字段 cron 语法。\n- `channel_ids` 可为空,告警将通过全局集成路由。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-create", + "metadata": { + "sidebarTitle": "创建告警规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertRule" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 50001, + "folder_id": 100, + "name": "CPU 过高", + "ds_type": "prometheus", + "created_at": 1712000000 + } + } + } + } + }, + "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/AlertRule" + }, + "example": { + "folder_id": 100, + "name": "CPU 过高", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "* * * * *", + "channel_ids": [ + 20001 + ], + "rule_configs": { + "queries": [ + { + "name": "A", + "expr": "avg(cpu_usage_idle) < 10" + } + ], + "check_threshold": { + "enabled": true, + "critical": "A", + "alerting_check_times": 1, + "recovery_check_times": 1, + "push_recovery_event": true, + "recovery": { + "mode": "invert" + } + } + } + } + } + } + } + } + }, + "/monit/store/ruleset/list": { + "post": { + "operationId": "monit-store-ruleset-list", + "summary": "查询规则集列表", + "description": "返回指定数据源类型下当前用户有权访问的所有规则集。", + "tags": [ + "Monitors/规则集" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **规则仓库查看**(`monit`) |\n\n## 使用说明\n\n- 当 `open_flag` 为 `2`(公开)、当前用户为创建者(`open_flag=0`)或与账户共享(`open_flag=1`)时,规则集对当前用户可见。\n- 列表不包含 `payload` 字段,完整内容请调用 `/monit/store/ruleset/info`。", + "href": "/zh/api-reference/monitors/rule-sets/monit-store-ruleset-list", + "metadata": { + "sidebarTitle": "查询规则集列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StoreRulesetListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 1, + "type_ident": "prometheus", + "note": "CPU 用量告警", + "open_flag": 2, + "creator_account_id": 10023, + "creator_id": 80011, + "creator_name": "Alice", + "created_at": 1710000000, + "updated_at": 1712000000 + } + ] + } + } + } + }, + "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/StoreRulesetListRequest" + }, + "example": { + "type_ident": "prometheus" + } + } + } + } + } + }, + "/monit/store/ruleset/delete": { + "post": { + "operationId": "monit-store-ruleset-delete", + "summary": "删除规则集", + "description": "通过 ID 从规则仓库中删除规则集。", + "tags": [ + "Monitors/规则集" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **规则仓库管理**(`monit`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/rule-sets/monit-store-ruleset-delete", + "metadata": { + "sidebarTitle": "删除规则集" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IDRequest" + }, + "example": { + "id": 1 + } + } + } + } + } + }, + "/monit/rule/counter/status": { + "post": { + "operationId": "monit-rule-read-counter-status", + "summary": "查看顶层文件夹规则状态统计", + "description": "返回所有顶层文件夹节点的规则触发状态汇总,用于概览看板。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-counter-status", + "metadata": { + "sidebarTitle": "查看顶层文件夹规则状态统计" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleStatusResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "folder_id": 100, + "folder_name": "生产环境", + "rule_total": 10, + "triggered_rule_count": 2 + } + ] + } + } + } + }, + "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/RuleEmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/monit/rule/list/basic": { + "post": { + "operationId": "monit-rule-read-list", + "summary": "查询告警规则列表", + "description": "返回指定文件夹下所有告警规则的基础信息。如需完整规则详情,请调用 `POST /monit/rule/info`。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |\n\n## 使用说明\n\n- 将 `folder_id` 设为 `0` 可列出当前用户有权查看的所有文件夹下的规则。\n- `triggered` 字段表示该规则当前是否有活跃告警。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-list", + "metadata": { + "sidebarTitle": "查询告警规则列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleBasicListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 50001, + "folder_id": 100, + "name": "CPU 过高", + "ds_type": "prometheus", + "enabled": true, + "triggered": true, + "created_at": 1710000000 + } + ] + } + } + } + }, + "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/RuleListRequest" + }, + "example": { + "folder_id": 100 + } + } + } + } + } + }, + "/monit/store/ruleset/info": { + "post": { + "operationId": "monit-store-ruleset-info", + "summary": "查看规则集详情", + "description": "获取规则集的完整信息,包括 `payload`(JSON 字符串形式的告警规则定义)。", + "tags": [ + "Monitors/规则集" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **规则仓库查看**(`monit`) |", + "href": "/zh/api-reference/monitors/rule-sets/monit-store-ruleset-info", + "metadata": { + "sidebarTitle": "查看规则集详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StoreRulesetItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 1, + "type_ident": "prometheus", + "note": "CPU 用量告警", + "open_flag": 2, + "payload": "[{\"prom_ql\":\"...\"}]", + "creator_account_id": 10023, + "creator_id": 80011, + "creator_name": "Alice", + "created_at": 1710000000, + "updated_at": 1712000000 + } + } + } + } + }, + "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/IDRequest" + }, + "example": { + "id": 1 + } + } + } + } + } + }, + "/monit/store/ruleset/create": { + "post": { + "operationId": "monit-store-ruleset-create", + "summary": "创建规则集", + "description": "在规则仓库中创建新的规则集。", + "tags": [ + "Monitors/规则集" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **规则仓库管理**(`monit`) |\n\n## 使用说明\n\n- `open_flag`:`0` 仅创建者可见,`1` 账户内共享,`2` 公开。\n- `payload` 为必填 JSON 字符串,包含告警规则定义。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/rule-sets/monit-store-ruleset-create", + "metadata": { + "sidebarTitle": "创建规则集" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StoreRulesetItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 1, + "type_ident": "prometheus", + "note": "CPU 用量告警", + "open_flag": 1, + "created_at": 1712000000, + "updated_at": 1712000000 + } + } + } + } + }, + "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/StoreRulesetUpsertRequest" + }, + "example": { + "type_ident": "prometheus", + "note": "CPU 用量告警", + "open_flag": 1, + "payload": "[{\"prom_ql\":\"rate(cpu_usage[5m]) > 0.8\"}]" + } + } + } + } + } + }, + "/monit/datasource/list": { + "post": { + "operationId": "monit-datasource-read-list", + "summary": "查询数据源列表", + "description": "返回当前账户下的所有数据源,可通过 `type_ident` 过滤类型。", + "tags": [ + "Monitors/告警数据源" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源查看**(`monit`) |\n\n## 使用说明\n\n- 省略 `type_ident` 可返回所有类型的数据源。\n- 列表响应中不返回敏感凭证字段(密码、密钥)。", + "href": "/zh/api-reference/monitors/data-sources/monit-datasource-read-list", + "metadata": { + "sidebarTitle": "查询数据源列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DataSourceListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 10, + "account_id": 10023, + "type_ident": "prometheus", + "name": "生产 Prometheus", + "enabled": true, + "note": "生产环境 Prometheus", + "address": "http://prometheus.example.com:9090", + "edge_cluster_name": "default", + "updated_at": 1712000000 + } + ] + } + } + } + }, + "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/DataSourceListRequest" + }, + "example": { + "type": "prometheus" + } + } + } + } + } + }, + "/monit/rule/update/fields": { + "post": { + "operationId": "monit-rule-write-fields-update", + "summary": "批量更新规则字段", + "description": "一次性更新多条告警规则的特定字段,仅应用 `fields` 列表中指定的字段。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- 在 `fields` 数组中指定要更新的字段名,如 `[\"enabled\", \"channel_ids\"]`。\n- 仅更新指定字段,其他字段保持不变。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-fields-update", + "metadata": { + "sidebarTitle": "批量更新规则字段" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleNameMessageListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "name": "CPU 过高", + "message": "" + }, + { + "name": "磁盘告警", + "message": "" + } + ] + } + } + } + }, + "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/RuleFieldsUpdateRequest" + }, + "example": { + "ids": [ + 50001, + 50002 + ], + "fields": [ + "enabled" + ], + "enabled": false + } + } + } + } + } + }, + "/monit/rule/counter/channel": { + "post": { + "operationId": "monit-rule-read-counter-channel", + "summary": "按协作空间查询规则统计", + "description": "返回一个对象,key 为协作空间名称,value 为将告警路由到该协作空间的规则数量。若协作空间名称无法解析,则以协作空间 ID(字符串形式)作为 key。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-counter-channel", + "metadata": { + "sidebarTitle": "按协作空间查询规则统计" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCounterChannelResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "生产": 8 + } + } + } + } + }, + "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/RuleEmptyRequest" + }, + "example": {} + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "AppKeyAuth": { + "type": "apiKey", + "in": "query", + "name": "app_key", + "description": "在 Flashduty 控制台 账户 → APP Key 中签发的 app_key。调用任何公开 API 时都必须携带。它等同于所属账户的身份凭证,请妥善保管。" + } + }, + "responses": { + "BadRequest": { + "description": "请求非法 — 通常是参数缺失或格式不正确。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "missingParameter": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "InvalidParameter", + "message": "The specified parameter is not valid." + } + } + } + } + } + } + }, + "Unauthorized": { + "description": "app_key 缺失或无效。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "missingAppKey": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "Unauthorized", + "message": "You are unauthorized." + } + } + } + } + } + } + }, + "Forbidden": { + "description": "app_key 有效但没有执行该操作的权限。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "noEditPermission": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "AccessDenied", + "message": "Access Denied." + } + } + } + } + } + } + }, + "NotFound": { + "description": "目标资源不存在或已被删除。注意:Flashduty 对业务实体的缺失通常返回 HTTP 400 + code=`ResourceNotFound`,真正的 404 只用于未知路由。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "resourceMissing": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "ResourceNotFound", + "message": "The resource you request is not found" + } + } + } + } + } + } + }, + "TooManyRequests": { + "description": "命中限流。可能是全局 API 限流、账户级限流或集成级限流。限流按账户聚合。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "rateLimited": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "RequestTooFrequently", + "message": "Request too frequently." + } + } + } + } + } + } + }, + "ServerError": { + "description": "服务端未预期错误。反馈问题时请携带 request_id。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "internal": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "InternalError", + "message": "We encountered an internal error, and it has been reported. Please try again later." + } + } + } + } + } + } + } + }, + "schemas": { + "AlertRule": { + "type": "object", + "description": "完整的告警规则配置。", + "properties": { + "id": { + "type": "integer", + "format": "uint64" + }, + "account_id": { + "type": "integer", + "format": "uint64" + }, + "folder_id": { + "type": "integer", + "format": "uint64", + "description": "规则所属文件夹。" + }, + "name": { + "type": "string", + "description": "规则名称。" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "自定义标签。" + }, + "ds_type": { + "type": "string", + "description": "数据源类型。" + }, + "ds_list": { + "type": "array", + "items": { + "type": "string" + }, + "description": "数据源名称模式(支持通配符)。" + }, + "ds_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "具体数据源 ID 列表。" + }, + "enabled": { + "type": "boolean" + }, + "debug_log_enabled": { + "type": "boolean" + }, + "rule_configs": { + "$ref": "#/components/schemas/RuleConfigs" + }, + "cron_pattern": { + "type": "string", + "description": "5 字段 cron 调度。" + }, + "delay_seconds": { + "type": "integer" + }, + "enabled_times": { + "type": "array", + "description": "规则生效的时间窗口。", + "items": { + "type": "object", + "properties": { + "days": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "星期几(0=周日)。" + }, + "stime": { + "type": "string", + "description": "开始时间,如 `09:00`。" + }, + "etime": { + "type": "string", + "description": "结束时间,如 `18:00`。" + } + } + } + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description_type": { + "type": "string", + "enum": [ + "text", + "markdown" + ] + }, + "description": { + "type": "string" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "告警发送到的协作空间 ID 列表。" + }, + "repeat_interval": { + "type": "integer", + "format": "int64", + "description": "通知重复间隔(秒)。" + }, + "repeat_total": { + "type": "integer", + "format": "int64", + "description": "最大重复通知次数。" + }, + "creator_id": { + "type": "integer", + "format": "uint64" + }, + "creator_name": { + "type": "string" + }, + "updater_id": { + "type": "integer", + "format": "uint64" + }, + "updater_name": { + "type": "string" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + } + } + }, + "AlertRuleAudit": { + "type": "object", + "description": "审计记录,保存某一时刻的规则快照。", + "required": [ + "id", + "account_id", + "alert_rule_id", + "action", + "creator_id", + "creator_name", + "created_at" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "审计记录 ID。" + }, + "account_id": { + "type": "integer", + "format": "uint64" + }, + "alert_rule_id": { + "type": "integer", + "format": "uint64", + "description": "关联的告警规则 ID。" + }, + "action": { + "type": "string", + "description": "操作类型,如 `create`、`update`。" + }, + "content": { + "type": "string", + "description": "审计时刻规则完整配置的 JSON 字符串,仅在 `/monit/rule/audit/detail` 返回,列表接口中省略。" + }, + "creator_id": { + "type": "integer", + "format": "uint64" + }, + "creator_name": { + "type": "string" + }, + "created_at": { + "type": "integer", + "format": "int64" + } + } + }, + "AlertRuleBasic": { + "type": "object", + "description": "列表视图用的告警规则基础信息。", + "required": [ + "id", + "account_id", + "folder_id", + "name", + "ds_type", + "enabled", + "debug_log_enabled", + "cron_pattern", + "delay_seconds", + "creator_id", + "creator_name", + "updater_id", + "updater_name", + "created_at", + "updated_at", + "triggered" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "唯一规则 ID。" + }, + "account_id": { + "type": "integer", + "format": "uint64", + "description": "账户 ID。" + }, + "folder_id": { + "type": "integer", + "format": "uint64", + "description": "文件夹 ID。" + }, + "name": { + "type": "string", + "description": "规则名称。" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "自定义标签。" + }, + "ds_type": { + "type": "string", + "description": "数据源类型,如 `prometheus`。" + }, + "enabled": { + "type": "boolean", + "description": "规则是否启用。" + }, + "debug_log_enabled": { + "type": "boolean", + "description": "是否启用调试日志。" + }, + "cron_pattern": { + "type": "string", + "description": "5 字段 cron 调度,如 `* * * * *`。" + }, + "delay_seconds": { + "type": "integer", + "description": "评估延迟(秒)。" + }, + "creator_id": { + "type": "integer", + "format": "uint64" + }, + "creator_name": { + "type": "string" + }, + "updater_id": { + "type": "integer", + "format": "uint64" + }, + "updater_name": { + "type": "string" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "triggered": { + "type": "boolean", + "description": "是否有当前活跃告警。" + } + } + }, + "AlertRuleCounter": { + "type": "object", + "description": "账户规则总数的一次历史快照。", + "required": [ + "id", + "account_id", + "num", + "clock" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64" + }, + "account_id": { + "type": "integer", + "format": "uint64" + }, + "num": { + "type": "integer", + "format": "int64", + "description": "该时间点的规则数量。" + }, + "clock": { + "type": "integer", + "format": "int64", + "description": "采样时间戳(Unix 秒)。" + } + } + }, + "AlertRuleExport": { + "type": "object", + "description": "用于导入/导出的便携告警规则表示,省略 `id`、`account_id` 等标识字段与审计元数据。", + "required": [ + "name", + "ds_type", + "enabled", + "debug_log_enabled", + "cron_pattern" + ], + "properties": { + "name": { + "type": "string" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "ds_type": { + "type": "string" + }, + "ds_list": { + "type": "array", + "items": { + "type": "string" + } + }, + "ds_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + } + }, + "enabled": { + "type": "boolean" + }, + "debug_log_enabled": { + "type": "boolean" + }, + "rule_configs": { + "$ref": "#/components/schemas/RuleConfigs" + }, + "cron_pattern": { + "type": "string" + }, + "delay_seconds": { + "type": "integer" + }, + "enabled_times": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnabledTime" + } + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description_type": { + "type": "string", + "enum": [ + "text", + "markdown" + ] + }, + "description": { + "type": "string" + }, + "repeat_interval": { + "type": "integer", + "format": "int64" + }, + "repeat_total": { + "type": "integer", + "format": "int64" + } + } + }, + "AlertRuleExportListResponse": { + "type": "array", + "description": "导出的规则配置列表,兼容 `POST /monit/rule/import`。", + "items": { + "$ref": "#/components/schemas/AlertRuleExport" + } + }, + "AlertRuleInfoResponse": { + "allOf": [ + { + "$ref": "#/components/schemas/AlertRule" + } + ], + "description": "info 接口返回的完整告警规则,服务端赋值字段均保证存在。", + "required": [ + "id", + "account_id", + "folder_id", + "name", + "ds_type", + "enabled", + "debug_log_enabled", + "cron_pattern", + "delay_seconds", + "creator_id", + "creator_name", + "updater_id", + "updater_name", + "created_at", + "updated_at" + ] + }, + "AlertRuleStatus": { + "type": "object", + "description": "文件夹节点的规则触发状态。", + "required": [ + "folder_id", + "rule_total", + "triggered_rule_count" + ], + "properties": { + "folder_id": { + "type": "integer", + "format": "uint64" + }, + "folder_name": { + "type": "string" + }, + "rule_total": { + "type": "integer", + "format": "int64", + "description": "文件夹家族内规则总数。" + }, + "triggered_rule_count": { + "type": "integer", + "format": "int64", + "description": "有活跃告警的规则数量。" + } + } + }, + "DSClickHouseConfig": { + "type": "object", + "description": "ClickHouse 数据源配置,TLS 字段继承自 TLSClientConfig。", + "properties": { + "database": { + "type": "string", + "description": "认证用默认数据库。" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "open_conns": { + "type": "integer" + }, + "idle_conns": { + "type": "integer" + }, + "lifetime_seconds": { + "type": "integer", + "format": "int64" + }, + "timeout_mills": { + "type": "integer", + "format": "int64" + }, + "max_execution_seconds": { + "type": "integer", + "format": "int64", + "description": "最大查询执行时间(秒)。" + }, + "dial_timeout_mills": { + "type": "integer", + "format": "int64", + "description": "拨号超时(毫秒)。" + }, + "tls_enabled": { + "type": "boolean" + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + }, + "tls_key_pwd": { + "type": "string" + }, + "tls_skip_verify": { + "type": "boolean" + }, + "tls_server_name": { + "type": "string" + }, + "tls_min_version": { + "type": "string" + }, + "tls_max_version": { + "type": "string" + } + } + }, + "DSElasticSearchConfig": { + "type": "object", + "description": "Elasticsearch 数据源配置。", + "properties": { + "deployment": { + "type": "string", + "enum": [ + "cloud", + "self-managed" + ], + "description": "部署类型。`cloud` 使用 Elastic Cloud;`self-managed` 使用自托管集群。" + }, + "timeout_mills": { + "type": "integer", + "format": "int64" + }, + "cloud_id": { + "type": "string", + "description": "Elastic Cloud 部署 ID,仅用于 `cloud` 部署。" + }, + "api_key": { + "type": "string", + "description": "Elastic Cloud API 密钥,仅用于 `cloud` 部署。" + }, + "username": { + "type": "string", + "description": "`self-managed` 部署的用户名。" + }, + "password": { + "type": "string" + }, + "service_token": { + "type": "string", + "description": "服务令牌,若设置则覆盖用户名/密码认证。" + }, + "tls_ca": { + "type": "string" + }, + "certificate_fingerprint": { + "type": "string" + }, + "headers": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "DSLokiConfig": { + "type": "object", + "description": "Loki 数据源配置,TLS 字段继承自 TLSClientConfig。", + "properties": { + "basic_auth_enabled": { + "type": "boolean" + }, + "basic_auth_username": { + "type": "string" + }, + "basic_auth_password": { + "type": "string" + }, + "headers": { + "type": "array", + "items": { + "type": "string" + } + }, + "params": { + "type": "array", + "items": { + "type": "string" + } + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + }, + "tls_key_pwd": { + "type": "string" + }, + "tls_skip_verify": { + "type": "boolean" + }, + "tls_server_name": { + "type": "string" + }, + "tls_min_version": { + "type": "string" + }, + "tls_max_version": { + "type": "string" + } + } + }, + "DSMySQLConfig": { + "type": "object", + "description": "MySQL 数据源配置,TLS 字段继承自 TLSClientConfig。", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "open_conns": { + "type": "integer", + "description": "最大打开连接数。" + }, + "idle_conns": { + "type": "integer", + "description": "最大空闲连接数。" + }, + "lifetime_seconds": { + "type": "integer", + "format": "int64", + "description": "连接最大生命周期(秒)。" + }, + "timeout_mills": { + "type": "integer", + "format": "int64", + "description": "查询超时时间(毫秒)。" + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + }, + "tls_key_pwd": { + "type": "string" + }, + "tls_skip_verify": { + "type": "boolean" + }, + "tls_server_name": { + "type": "string" + }, + "tls_min_version": { + "type": "string" + }, + "tls_max_version": { + "type": "string" + } + } + }, + "DSOracleConfig": { + "type": "object", + "description": "Oracle 数据源配置。", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "options": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "额外连接参数(键值对)。" + }, + "open_conns": { + "type": "integer" + }, + "idle_conns": { + "type": "integer" + }, + "lifetime_seconds": { + "type": "integer", + "format": "int64" + }, + "timeout_mills": { + "type": "integer", + "format": "int64" + } + } + }, + "DSPayload": { + "type": "object", + "description": "与类型相关的数据源配置,仅包含与 `type_ident` 匹配的配置块。", + "properties": { + "prometheus": { + "$ref": "#/components/schemas/DSPrometheusConfig" + }, + "loki": { + "$ref": "#/components/schemas/DSLokiConfig" + }, + "mysql": { + "$ref": "#/components/schemas/DSMySQLConfig" + }, + "oracle": { + "$ref": "#/components/schemas/DSOracleConfig" + }, + "postgres": { + "$ref": "#/components/schemas/DSPostgresConfig" + }, + "clickhouse": { + "$ref": "#/components/schemas/DSClickHouseConfig" + }, + "elasticsearch": { + "$ref": "#/components/schemas/DSElasticSearchConfig" + }, + "sls": { + "$ref": "#/components/schemas/DSSLSConfig" + }, + "victorialogs": { + "$ref": "#/components/schemas/DSVictoriaLogsConfig" + } + } + }, + "DSPostgresConfig": { + "type": "object", + "description": "PostgreSQL 数据源配置。", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "open_conns": { + "type": "integer" + }, + "idle_conns": { + "type": "integer" + }, + "lifetime_seconds": { + "type": "integer", + "format": "int64" + }, + "timeout_mills": { + "type": "integer", + "format": "int64" + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + } + } + }, + "DSPrometheusConfig": { + "type": "object", + "description": "Prometheus 数据源配置,TLS 字段继承自 TLSClientConfig。", + "properties": { + "basic_auth_enabled": { + "type": "boolean", + "description": "启用 HTTP Basic 认证。" + }, + "basic_auth_username": { + "type": "string", + "description": "Basic 认证用户名。" + }, + "basic_auth_password": { + "type": "string", + "description": "Basic 认证密码。" + }, + "headers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "自定义 HTTP 请求头,格式为 `Key: Value`。" + }, + "params": { + "type": "array", + "items": { + "type": "string" + }, + "description": "自定义查询参数,格式为 `key=value`。" + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + }, + "tls_key_pwd": { + "type": "string" + }, + "tls_skip_verify": { + "type": "boolean" + }, + "tls_server_name": { + "type": "string" + }, + "tls_min_version": { + "type": "string" + }, + "tls_max_version": { + "type": "string" + } + } + }, + "DSSLSConfig": { + "type": "object", + "description": "阿里云日志服务(SLS)数据源配置。", + "properties": { + "access_key_id": { + "type": "string", + "description": "阿里云 Access Key ID。" + }, + "access_key_secret": { + "type": "string", + "description": "阿里云 Access Key Secret。" + }, + "headers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "自定义 HTTP 请求头。" + } + } + }, + "DSType": { + "type": "object", + "description": "告警规则可使用的数据源类型定义。", + "required": [ + "id", + "name", + "ident", + "account_id", + "weight" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64" + }, + "name": { + "type": "string", + "description": "显示名称,如 `Prometheus`。" + }, + "ident": { + "type": "string", + "description": "作为规则 `ds_type` 的标识符,如 `prometheus`。" + }, + "account_id": { + "type": "integer", + "format": "uint64", + "description": "所属账户 ID;`0` 表示全局类型。" + }, + "weight": { + "type": "integer", + "description": "排序权重,值越大越靠前。" + } + } + }, + "DSVictoriaLogsConfig": { + "type": "object", + "description": "VictoriaLogs 数据源配置,TLS 字段继承自 TLSClientConfig。", + "properties": { + "basic_auth_enabled": { + "type": "boolean" + }, + "basic_auth_username": { + "type": "string" + }, + "basic_auth_password": { + "type": "string" + }, + "headers": { + "type": "array", + "items": { + "type": "string" + } + }, + "params": { + "type": "array", + "items": { + "type": "string" + } + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + }, + "tls_key_pwd": { + "type": "string" + }, + "tls_skip_verify": { + "type": "boolean" + }, + "tls_server_name": { + "type": "string" + }, + "tls_min_version": { + "type": "string" + }, + "tls_max_version": { + "type": "string" + } + } + }, + "DataSourceItem": { + "type": "object", + "description": "单个监控数据源。", + "required": [ + "id", + "account_id", + "type_ident", + "name", + "enabled", + "note", + "address", + "edge_cluster_name", + "updated_at" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "唯一数据源 ID。" + }, + "account_id": { + "type": "integer", + "format": "uint64", + "description": "账户 ID。" + }, + "type_ident": { + "type": "string", + "description": "数据源类型标识,可选值:`prometheus`、`loki`、`mysql`、`oracle`、`postgres`、`clickhouse`、`elasticsearch`、`sls`、`victorialogs`。" + }, + "name": { + "type": "string", + "description": "数据源显示名称。" + }, + "enabled": { + "type": "boolean", + "description": "数据源是否启用。" + }, + "note": { + "type": "string", + "description": "可选描述。" + }, + "address": { + "type": "string", + "description": "连接地址。Prometheus/Loki/VictoriaLogs 为 HTTP URL;MySQL/Oracle/Postgres/ClickHouse 为 `host:port`;SLS 为不含 http/https 前缀的 endpoint。" + }, + "payload": { + "$ref": "#/components/schemas/DSPayload" + }, + "edge_cluster_name": { + "type": "string", + "description": "负责使用该数据源评估规则的 Monitors Edge 集群名称。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 时间戳(秒)。" + } + } + }, + "DataSourceListRequest": { + "type": "object", + "description": "查询数据源列表的过滤参数。", + "properties": { + "type": { + "type": "string", + "description": "按数据源类型过滤,省略则返回所有类型。可选值:`prometheus`、`loki`、`mysql`、`oracle`、`postgres`、`clickhouse`、`elasticsearch`、`sls`、`victorialogs`。" + } + } + }, + "DataSourceListResponse": { + "type": "array", + "description": "数据源列表,不含敏感凭证字段。", + "items": { + "$ref": "#/components/schemas/DataSourceItem" + } + }, + "DataSourceUpsertRequest": { + "type": "object", + "description": "创建或更新数据源的请求体。`id` 仅在更新时必填。`address` 除 Elasticsearch `deployment=cloud` 外均为必填。", + "required": [ + "type_ident", + "name", + "edge_cluster_name", + "payload" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "数据源 ID。更新时必填,创建时省略。" + }, + "type_ident": { + "type": "string", + "description": "数据源类型标识,可选值:`prometheus`、`loki`、`mysql`、`oracle`、`postgres`、`clickhouse`、`elasticsearch`、`sls`、`victorialogs`。" + }, + "name": { + "type": "string", + "description": "数据源显示名称。" + }, + "note": { + "type": "string", + "description": "可选描述。" + }, + "address": { + "type": "string", + "description": "连接地址。Prometheus/Loki/VictoriaLogs 为 HTTP URL;MySQL/Oracle/Postgres/ClickHouse 为 `host:port`;SLS 为不含 http/https 前缀的 endpoint;Elasticsearch cloud 部署无需填写。" + }, + "payload": { + "$ref": "#/components/schemas/DSPayload", + "description": "类型相关配置块,必须包含与 `type_ident` 匹配的键。" + }, + "edge_cluster_name": { + "type": "string", + "description": "负责使用该数据源评估规则的 Monitors Edge 集群名称。" + } + } + }, + "DutyError": { + "type": "object", + "description": "响应结构中的错误 payload,仅在非 2xx 响应时出现。", + "properties": { + "code": { + "$ref": "#/components/schemas/ErrorCode" + }, + "message": { + "type": "string", + "description": "用户可读的错误描述,语言会跟随调用方的 Accept-Language。可能包含字段名、ID 等请求上下文。", + "example": "The specified parameter template_id is not valid." + } + }, + "required": [ + "code", + "message" + ] + }, + "EmptyObject": { + "type": "object", + "description": "空对象。当操作的成功信号就是不报错时,作为 `data` 返回。", + "additionalProperties": false + }, + "EmptyRequest": { + "type": "object", + "description": "无参数。", + "additionalProperties": false + }, + "EmptyResponse": { + "type": "object", + "description": "空响应体。成功时服务端返回 `data: null`。", + "properties": {} + }, + "EnabledTime": { + "type": "object", + "description": "规则激活时间窗口。", + "properties": { + "days": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "星期几,0 = 周日。" + }, + "stime": { + "type": "string", + "description": "起始时间,如 `09:00`。" + }, + "etime": { + "type": "string", + "description": "结束时间,如 `18:00`。" + } + } + }, + "ErrorCode": { + "type": "string", + "description": "Flashduty 错误码枚举。每个失败响应的 `error.code` 都是下列稳定值之一,HTTP 状态码仅作参考。\n\n| 错误码 | HTTP | 含义 |\n|---|---|---|\n| `OK` | 200 | 保留值,正常错误响应不会返回。 |\n| `InvalidParameter` | 400 | 必填参数缺失或未通过校验。 |\n| `BadRequest` | 400 | 通用的 400 错误,通常是请求本身不合法。 |\n| `InvalidContentType` | 400 | 请求头 `Content-Type` 不是 `application/json`。 |\n| `ResourceNotFound` | 400 | 目标资源不存在。注意 HTTP 状态码是 400 而非 404(历史设计)。 |\n| `NoLicense` | 400 | 功能需要有效授权,但未找到可用的 license。 |\n| `ReferenceExist` | 400 | 该资源仍被其他实体引用,无法删除。 |\n| `Unauthorized` | 401 | `app_key` 缺失、无效或已过期。 |\n| `BalanceNotEnough` | 402 | 账户余额不足,无法执行需要计费的操作。 |\n| `AccessDenied` | 403 | 身份认证通过,但 RBAC 权限不足以执行该操作。 |\n| `RouteNotFound` | 404 | 请求的 URL 路径不是已知路由。 |\n| `MethodNotAllowed` | 405 | 当前路径不接受所使用的 HTTP 方法。 |\n| `UndonedOrderExist` | 409 | 账户存在未完成的订单,请稍后重试。 |\n| `RequestLocked` | 423 | 因连续失败被临时锁定。 |\n| `EntityTooLarge` | 413 | 请求体超过允许的最大长度。 |\n| `RequestTooFrequently` | 429 | 命中限流(全局、账户级或集成级)。 |\n| `RequestVerifyRequired` | 428 | 操作需要二次验证码,但未提供。 |\n| `DangerousOperation` | 428 | 危险操作,需要进行 MFA 验证。 |\n| `InternalError` | 500 | 服务端未预期错误。反馈问题请附上 `request_id`。 |\n| `ServiceUnavailable` | 503 | 后端依赖不可用,请稍后重试。 |", + "enum": [ + "OK", + "InvalidParameter", + "BadRequest", + "InvalidContentType", + "ResourceNotFound", + "NoLicense", + "ReferenceExist", + "Unauthorized", + "BalanceNotEnough", + "AccessDenied", + "RouteNotFound", + "MethodNotAllowed", + "UndonedOrderExist", + "RequestLocked", + "EntityTooLarge", + "RequestTooFrequently", + "RequestVerifyRequired", + "DangerousOperation", + "InternalError", + "ServiceUnavailable" + ], + "x-enumDescriptions": { + "OK": "保留值,正常错误响应不会返回。", + "InvalidParameter": "必填参数缺失或未通过校验。", + "BadRequest": "通用的 400 错误,通常是请求本身不合法。", + "InvalidContentType": "请求头 `Content-Type` 不是 `application/json`。", + "ResourceNotFound": "目标资源不存在。注意 HTTP 状态码是 400 而非 404(历史设计)。", + "NoLicense": "功能需要有效授权,但未找到可用的 license。", + "ReferenceExist": "该资源仍被其他实体引用,无法删除。", + "Unauthorized": "`app_key` 缺失、无效或已过期。", + "BalanceNotEnough": "账户余额不足,无法执行需要计费的操作。", + "AccessDenied": "身份认证通过,但 RBAC 权限不足以执行该操作。", + "RouteNotFound": "请求的 URL 路径不是已知路由。", + "MethodNotAllowed": "当前路径不接受所使用的 HTTP 方法。", + "UndonedOrderExist": "账户存在未完成的订单,请稍后重试。", + "RequestLocked": "因连续失败被临时锁定。", + "EntityTooLarge": "请求体超过允许的最大长度。", + "RequestTooFrequently": "命中限流(全局、账户级或集成级)。", + "RequestVerifyRequired": "操作需要二次验证码,但未提供。", + "DangerousOperation": "危险操作,需要进行 MFA 验证。", + "InternalError": "服务端未预期错误。反馈问题请附上 `request_id`。", + "ServiceUnavailable": "后端依赖不可用,请稍后重试。" + }, + "example": "InvalidParameter" + }, + "ErrorResponse": { + "type": "object", + "description": "错误响应结构。`error` 必填,`data` 不存在。", + "properties": { + "request_id": { + "type": "string", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "error": { + "$ref": "#/components/schemas/DutyError" + } + }, + "required": [ + "request_id", + "error" + ] + }, + "IDRequest": { + "type": "object", + "required": [ + "id" + ], + "description": "包含单个数字 ID 的请求。", + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "资源 ID。" + } + } + }, + "NameMessage": { + "type": "object", + "description": "批量规则操作中,单条规则的处理结果。", + "required": [ + "name", + "message" + ], + "properties": { + "name": { + "type": "string", + "description": "规则名称。" + }, + "message": { + "type": "string", + "description": "成功时为空,失败时为错误信息。" + } + } + }, + "RuleAuditListResponse": { + "type": "array", + "description": "按创建时间倒序排列的规则审计记录列表,不含 `content` 字段。", + "items": { + "$ref": "#/components/schemas/AlertRuleAudit" + } + }, + "RuleBasicListResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertRuleBasic" + }, + "description": "告警规则基础信息列表。" + }, + "RuleConfigs": { + "type": "object", + "description": "规则评估配置。", + "properties": { + "queries": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "查询标识符(字母,如 `A`)。`R` 为保留名称,不可使用。" + }, + "expr": { + "type": "string", + "description": "查询表达式。" + }, + "label_fields": { + "type": "array", + "items": { + "type": "string" + } + }, + "value_fields": { + "type": "array", + "items": { + "type": "string" + } + }, + "args": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "relate_queries": { + "type": "array", + "description": "可选的辅助查询,其结果作为上下文附加到告警事件中。每项须有唯一的 `name`(不与任何 query 名称重复)且 `expr` 非空。", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "辅助查询标识符。" + }, + "expr": { + "type": "string", + "description": "查询表达式。" + }, + "args": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "check_threshold": { + "type": "object", + "description": "阈值检查配置。", + "properties": { + "enabled": { + "type": "boolean" + }, + "alerting_check_times": { + "type": "integer" + }, + "recovery_check_times": { + "type": "integer" + }, + "push_recovery_event": { + "type": "boolean" + }, + "critical": { + "type": "string" + }, + "warning": { + "type": "string" + }, + "info": { + "type": "string" + }, + "recovery": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "invert", + "threshold", + "ql" + ] + }, + "condition": { + "type": "string" + } + } + } + } + }, + "check_anydata": { + "type": "object", + "description": "有数据检查配置。查询返回任意数据行时触发告警。", + "properties": { + "enabled": { + "type": "boolean" + }, + "alerting_check_times": { + "type": "integer" + }, + "recovery_check_times": { + "type": "integer" + }, + "push_recovery_event": { + "type": "boolean" + }, + "severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info" + ] + }, + "recovery": { + "type": "object", + "description": "有数据检查的恢复条件。省略或 `mode` 为空时按 `nodata` 处理。", + "properties": { + "mode": { + "type": "string", + "enum": [ + "nodata", + "ql" + ], + "description": "`nodata` = 查询无数据时恢复;`ql` = `condition` 表达式为真时恢复。`mode` 为 `ql` 时,仅允许单个查询(`name=A`)。" + }, + "condition": { + "type": "string", + "description": "恢复表达式,`mode` 为 `ql` 时必填。" + }, + "args": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "check_nodata": { + "type": "object", + "description": "无数据检查配置。", + "properties": { + "enabled": { + "type": "boolean" + }, + "alerting_check_times": { + "type": "integer" + }, + "recovery_check_times": { + "type": "integer" + }, + "push_recovery_event": { + "type": "boolean" + }, + "severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info" + ] + }, + "resolve_timeout": { + "type": "integer", + "description": "自动恢复等待时间(秒)。" + } + } + } + } + }, + "RuleCounterChannelResponse": { + "type": "object", + "description": "协作空间名称到规则数量的映射,无法解析的协作空间以其 ID 的字符串形式作为 key。", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + }, + "RuleCounterNodeResponse": { + "type": "object", + "description": "顶层文件夹名称到规则数量的映射。", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + }, + "RuleCounterTotalResponse": { + "type": "array", + "description": "按 `clock` 升序排列的规则数量历史采样。", + "items": { + "$ref": "#/components/schemas/AlertRuleCounter" + } + }, + "RuleDsTypesResponse": { + "type": "array", + "description": "当前账户可使用的数据源类型列表,包括全局类型和账户自定义类型。", + "items": { + "$ref": "#/components/schemas/DSType" + } + }, + "RuleEmptyRequest": { + "type": "object", + "description": "不需要任何参数。", + "additionalProperties": false + }, + "RuleEmptyResponse": { + "type": "object", + "description": "成功时返回空对象。", + "additionalProperties": false + }, + "RuleFieldsUpdateRequest": { + "type": "object", + "required": [ + "ids", + "fields" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "要更新的规则 ID 列表。" + }, + "fields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "要更新的字段名列表。" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "ds_type": { + "type": "string" + }, + "ds_list": { + "type": "array", + "items": { + "type": "string" + } + }, + "ds_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + } + }, + "enabled": { + "type": "boolean" + }, + "debug_log_enabled": { + "type": "boolean" + }, + "cron_pattern": { + "type": "string" + }, + "delay_seconds": { + "type": "integer" + }, + "enabled_times": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnabledTime" + } + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description": { + "type": "string" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + } + }, + "repeat_interval": { + "type": "integer", + "format": "int64" + }, + "repeat_total": { + "type": "integer", + "format": "int64" + } + } + }, + "RuleFolderIDRequest": { + "type": "object", + "properties": { + "folder_id": { + "type": "integer", + "format": "uint64", + "description": "文件夹 ID,0 表示所有。" + } + } + }, + "RuleIDRequest": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "规则 ID。" + } + } + }, + "RuleIDsRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "规则 ID 列表。" + } + } + }, + "RuleImportRequest": { + "type": "array", + "description": "要导入的告警规则导出对象数组。", + "items": { + "$ref": "#/components/schemas/AlertRule" + } + }, + "RuleImportResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameMessage" + }, + "description": "每条规则的导入结果。" + }, + "RuleListRequest": { + "type": "object", + "description": "按文件夹查询规则的过滤参数。", + "properties": { + "folder_id": { + "type": "integer", + "format": "uint64", + "description": "文件夹 ID,设为 0 可列出所有可访问规则。" + } + } + }, + "RuleMoveRequest": { + "type": "object", + "required": [ + "ids", + "dest_folder_id" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "要移动的规则 ID 列表。" + }, + "dest_folder_id": { + "type": "integer", + "format": "uint64", + "description": "目标文件夹 ID。" + } + } + }, + "RuleNameMessageListResponse": { + "type": "array", + "description": "批量规则操作中每条规则的处理结果列表。", + "items": { + "$ref": "#/components/schemas/NameMessage" + } + }, + "RuleStatusResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertRuleStatus" + } + }, + "SLSLogstoresRequest": { + "type": "object", + "description": "查询 SLS 日志库列表的参数。", + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "SLS 数据源 ID。" + }, + "project": { + "type": "string", + "description": "SLS 项目名称。" + }, + "offset": { + "type": "integer", + "description": "分页偏移量。" + }, + "size": { + "type": "integer", + "description": "每页大小。" + } + } + }, + "SLSLogstoresResponse": { + "type": "array", + "description": "SLS 日志库名称列表。", + "items": { + "type": "string" + } + }, + "SLSProjectsRequest": { + "type": "object", + "description": "查询 SLS 项目列表的参数。", + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "SLS 数据源 ID。" + }, + "query": { + "type": "string", + "description": "名称前缀过滤。" + }, + "offset": { + "type": "integer", + "description": "分页偏移量。" + }, + "size": { + "type": "integer", + "description": "每页大小。" + } + } + }, + "SLSProjectsResponse": { + "type": "array", + "description": "SLS 项目名称列表。", + "items": { + "type": "string" + } + }, + "StoreRulesetItem": { + "type": "object", + "description": "单个规则仓库规则集。", + "required": [ + "id", + "type_ident", + "note", + "open_flag", + "creator_account_id", + "creator_id", + "creator_name", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "规则集 ID。" + }, + "type_ident": { + "type": "string", + "description": "该规则集适用的数据源类型标识符。" + }, + "note": { + "type": "string", + "description": "规则集描述或标题。" + }, + "open_flag": { + "type": "integer", + "enum": [ + 0, + 1, + 2 + ], + "description": "共享范围:`0` 仅创建者可见,`1` 账户内共享,`2` 公开。" + }, + "payload": { + "type": "string", + "description": "包含告警规则定义的 JSON 字符串,列表接口中省略。" + }, + "creator_account_id": { + "type": "integer", + "format": "uint64", + "description": "创建者的账户 ID。" + }, + "creator_id": { + "type": "integer", + "format": "uint64", + "description": "创建者的成员 ID。" + }, + "creator_name": { + "type": "string", + "description": "创建者显示名称。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 时间戳(秒)。" + } + } + }, + "StoreRulesetListRequest": { + "type": "object", + "required": [ + "type_ident" + ], + "description": "按数据源类型过滤规则集。", + "properties": { + "type_ident": { + "type": "string", + "description": "数据源类型标识符,如 `prometheus`。" + } + } + }, + "StoreRulesetListResponse": { + "type": "array", + "description": "当前用户有权访问的规则集列表,不含 `payload` 字段。", + "items": { + "$ref": "#/components/schemas/StoreRulesetItem" + } + }, + "StoreRulesetUpdateRequest": { + "type": "object", + "required": [ + "id", + "note", + "payload" + ], + "description": "更新规则集的参数。", + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "要更新的规则集 ID。" + }, + "note": { + "type": "string", + "description": "新的描述。" + }, + "open_flag": { + "type": "integer", + "enum": [ + 0, + 1, + 2 + ], + "description": "新的共享范围:`0` 仅创建者,`1` 账户共享,`2` 公开。" + }, + "payload": { + "type": "string", + "description": "新的告警规则定义 JSON 字符串。" + } + } + }, + "StoreRulesetUpsertRequest": { + "type": "object", + "description": "创建规则集的请求体,所有字段均经服务端 `Validate()` 校验。", + "required": [ + "type_ident", + "note", + "payload" + ], + "properties": { + "type_ident": { + "type": "string", + "description": "该规则集适用的数据源类型标识符,如 `prometheus`。" + }, + "note": { + "type": "string", + "description": "规则集描述或标题。" + }, + "open_flag": { + "type": "integer", + "enum": [ + 0, + 1, + 2 + ], + "description": "共享范围:`0` 仅创建者可见,`1` 账户内共享,`2` 公开。省略时默认为 `0`。" + }, + "payload": { + "type": "string", + "description": "包含告警规则定义的 JSON 字符串。" + } + } + }, + "SuccessEnvelope": { + "type": "object", + "description": "成功响应结构。2xx 响应中 `request_id` 标识本次调用(同时出现在 `Flashcat-Request-Id` 响应头中),`data` 为接口业务 payload。失败响应使用不同结构,参见 `ErrorResponse`。", + "properties": { + "request_id": { + "type": "string", + "description": "本次请求的唯一 ID,也会在 Flashcat-Request-Id 响应头中返回。反馈问题时请一并附上。", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "data": { + "description": "每个接口自己的业务 payload,详见各接口的 200 响应 schema。" + } + }, + "required": [ + "request_id", + "data" + ] + } + } + } +} diff --git a/api-reference/on-call.openapi.en.json b/api-reference/on-call.openapi.en.json new file mode 100644 index 0000000..2215e67 --- /dev/null +++ b/api-reference/on-call.openapi.en.json @@ -0,0 +1,24581 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Flashduty Open API", + "description": "Public HTTP API for the Flashduty incident management platform — incidents, notification templates, channels, schedules, monitors, RUM, and platform administration. Every operation is authenticated with an `app_key` query parameter issued from the Flashduty console under Account → APP Keys. Responses follow a uniform envelope: `{ request_id, data }` on success, `{ request_id, error }` on failure.", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://api.flashcat.cloud", + "description": "Flashduty Open API" + } + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "tags": [ + { + "name": "On-call/Incidents", + "description": "" + }, + { + "name": "On-call/Channels", + "description": "" + }, + { + "name": "On-call/Alerts", + "description": "Search, inspect, and act on alerts. Manage card views and alert processing pipelines." + }, + { + "name": "On-call/Integrations", + "description": "" + }, + { + "name": "On-call/Schedules", + "description": "" + }, + { + "name": "On-call/Calendars", + "description": "" + }, + { + "name": "On-call/Notification templates", + "description": "" + }, + { + "name": "On-call/Alert enrichment", + "description": "Custom fields, enrichment rules, and data mapping (schema, data, API)." + }, + { + "name": "On-call/Analytics", + "description": "" + }, + { + "name": "On-call/Status pages", + "description": "" + } + ], + "paths": { + "/channel/inhibit/rule/delete": { + "post": { + "operationId": "channelInhibitRuleDelete", + "summary": "Delete inhibit rule", + "description": "Delete an inhibit rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-delete", + "metadata": { + "sidebarTitle": "Delete inhibit rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/enrichment/mapping/data/truncate": { + "post": { + "operationId": "mapping-data-write-truncate", + "summary": "Truncate mapping data", + "description": "Delete all data rows in a mapping schema.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- This is an irreversible bulk-delete operation.\n- High-risk operation. Console JWT callers must pass a second-factor code; `app_key` callers bypass the MFA prompt but remain audited — treat the key as a secret.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-write-truncate", + "metadata": { + "sidebarTitle": "Truncate mapping data" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingSchemaIDRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + } + } + } + } + } + }, + "/enrichment/mapping/api/info": { + "post": { + "operationId": "mapping-api-read-info", + "summary": "Get mapping API detail", + "description": "Return detail of a single mapping API by its ID.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- Returns `null` if the API does not exist.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-read-info", + "metadata": { + "sidebarTitle": "Get mapping API detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingAPIItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "api_id": "665f1a2b3c4d5e6f7a8b9c02", + "api_name": "CMDB API", + "url": "https://cmdb.example.com/api/lookup", + "timeout": 2, + "retry_count": 1, + "insecure_skip_verify": false, + "status": "enabled", + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + } + } + } + }, + "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/MappingAPIIDRequest" + }, + "example": { + "api_id": "665f1a2b3c4d5e6f7a8b9c02" + } + } + } + } + } + }, + "/status-page/migration/status": { + "get": { + "operationId": "statusPageMigrationStatus", + "summary": "Get migration status", + "description": "Get the current status and progress of a status page migration job.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/status-pages/status-page-migration-status", + "metadata": { + "sidebarTitle": "Get migration status" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageMigrationJob" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "job_id": "01KP0311872NVYFRRQ82FW0001", + "account_id": 2451002751131, + "source_page_id": "abcdefghij", + "target_page_id": 5750613685214, + "phase": "history", + "status": "completed", + "progress": { + "total_steps": 5, + "completed_steps": 5, + "components_imported": 8, + "sections_imported": 3, + "incidents_imported": 12, + "maintenances_imported": 2, + "subscribers_imported": 0, + "templates_imported": 0, + "subscribers_skipped": 0 + }, + "created_at": 1766736878, + "updated_at": 1766740000 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "parameters": [ + { + "name": "job_id", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "description": "Migration job ID returned by `migrate-structure` or `migrate-email-subscribers`." + } + ] + } + }, + "/channel/escalate/rule/info": { + "post": { + "operationId": "channelEscalateRuleInfo", + "summary": "Get escalation rule detail", + "description": "Retrieve detailed information for a specific escalation rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-escalate-rule-info", + "metadata": { + "sidebarTitle": "Get escalation rule detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EscalateRuleItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_id": 2451002751131, + "channel_id": 6193426913131, + "priority": 0, + "aggr_window": 0, + "rule_name": "Default", + "description": "", + "layers": [ + { + "max_times": 1, + "notify_step": 10, + "target": { + "person_ids": [ + 3790925372131 + ], + "by": { + "follow_preference": true + }, + "webhooks": null + }, + "escalate_window": 30, + "force_escalate": false + } + ], + "time_filters": [], + "filters": [], + "status": "enabled", + "template_id": "6321aad26c12104586a88916", + "rule_id": "69bd0ce95a238693176c1d66", + "updated_by": 3790925372131, + "created_at": 1773997289, + "updated_at": 1773997289 + } + } + } + } + }, + "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/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 1001, + "rule_id": "6621b23f4a2c5e0012ab34d0" + } + } + } + } + } + }, + "/enrichment/mapping/data/list": { + "post": { + "operationId": "mapping-data-read-list", + "summary": "List mapping data", + "description": "Return paginated mapping data rows for a schema, with optional exact-match filtering on source label values.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- If `query` is provided, all source labels must be specified — partial source label queries are rejected.\n- Pagination uses cursor-based (`search_after_ctx`) or page-based (`p`, `limit`) navigation. `limit` defaults to 20, max 100.\n- The `search_after_ctx` token from a response can be passed back to retrieve the next page.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-read-list", + "metadata": { + "sidebarTitle": "List mapping data" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingDataListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "key": "server01", + "fields": { + "host": "server01", + "owner": "alice", + "team": "sre", + "service": "api" + }, + "created_at": 1710000000, + "updated_at": 1710000000 + } + ], + "total": 1, + "has_next_page": false + } + } + } + } + }, + "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/MappingDataListRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "orderby": "updated_at", + "asc": false, + "p": 1, + "limit": 20 + } + } + } + } + } + }, + "/incident/past/list": { + "post": { + "operationId": "incidentPastList", + "summary": "List past incidents", + "description": "List historical incidents related to the current incident for reference during triage.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/minute**; **20 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-past-list", + "metadata": { + "sidebarTitle": "List past incidents" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListPastIncidentsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [] + } + } + } + } + }, + "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/ListPastIncidentsRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "limit": 5 + } + } + } + } + } + }, + "/incident/snooze": { + "post": { + "operationId": "incidentSnooze", + "summary": "Snooze incident", + "description": "Temporarily snooze notifications for an incident until a specified time.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-snooze", + "metadata": { + "sidebarTitle": "Snooze incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnoozeIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ], + "minutes": 60 + } + } + } + } + } + }, + "/status-page/subscriber/export": { + "post": { + "operationId": "statusPageSubscriberExport", + "summary": "Export subscribers", + "description": "Export subscribers list for a status page as a CSV attachment. The response is a `text/csv` file with columns: Method, Recipient, Components, Subscribe All, Locale.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-subscriber-export", + "metadata": { + "sidebarTitle": "Export subscribers" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageSubscriberExportResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": "Method,Recipient,Components,Subscribe All,Locale\nemail,alice@example.com,,true,zh-CN\nemail,bob@example.com,,true,en-US" + } + } + } + }, + "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/ExportStatusPageSubscribersRequest" + }, + "example": { + "page_id": 5750613685214 + } + } + } + } + } + }, + "/insight/team": { + "post": { + "operationId": "insightByTeam", + "summary": "Get team insight", + "description": "Return insight metrics aggregated by team.", + "tags": [ + "On-call/Analytics" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/analytics/insight-by-team", + "metadata": { + "sidebarTitle": "Get team insight" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DimensionInsightResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "ts": 1740844800, + "team_id": 4295771902131, + "team_name": "SRE Team", + "total_incident_cnt": 2, + "total_incidents_acknowledged": 2, + "total_incidents_closed": 2, + "total_incidents_auto_closed": 0, + "total_incidents_manually_closed": 2, + "total_incidents_timeout_closed": 0, + "total_incidents_escalated": 0, + "total_incidents_manually_escalated": 0, + "total_incidents_timeout_escalated": 0, + "total_incidents_reassigned": 2, + "total_interruptions": 3, + "total_notifications": 6, + "total_engaged_seconds": 3317709, + "total_seconds_to_ack": 3317709, + "total_seconds_to_close": 3749514, + "mean_seconds_to_ack": 1658854.5, + "mean_seconds_to_close": 1874757, + "noise_reduction_pct": 0, + "acknowledgement_pct": 100, + "total_alert_cnt": 0, + "total_alert_event_cnt": 0 + } + ] + } + } + } + } + }, + "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/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "team_ids": [ + 4295771902131 + ], + "aggregate_unit": "day" + } + } + } + } + } + }, + "/insight/channel/export": { + "post": { + "operationId": "insightChannelExport", + "summary": "Export channel insight", + "description": "Export channel insight metrics as a CSV file. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope.", + "tags": [ + "On-call/Analytics" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/analytics/insight-channel-export", + "metadata": { + "sidebarTitle": "Export channel insight" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "channel_ids": [ + 4321322010131 + ], + "severities": [ + "Critical", + "Warning" + ] + } + } + } + } + } + }, + "/alert/pipeline/upsert": { + "post": { + "operationId": "alert-write-pipeline-upsert", + "summary": "Create or update alert pipeline", + "description": "Set the alert processing pipeline for an integration. Replaces the existing configuration entirely.", + "tags": [ + "On-call/Alerts" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Maximum 50 rules per pipeline.\n- Each rule has a `kind` (one of `title_reset`, `description_reset`, `severity_reset`, `alert_drop`, `alert_inhibit`), an optional `if` filter, and `settings` specific to the kind.\n- The `alert_inhibit` kind requires the Standard license or higher.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/alerts/alert-write-pipeline-upsert", + "metadata": { + "sidebarTitle": "Create or update alert pipeline" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlertPipelineUpsertRequest" + }, + "example": { + "integration_id": 10001, + "rules": [ + { + "kind": "severity_reset", + "if": null, + "settings": { + "severity": "Warning" + } + } + ] + } + } + } + } + } + }, + "/status-page/change/info": { + "get": { + "operationId": "statusPageChangeInfo", + "summary": "Get status page event detail", + "description": "Retrieve details of a specific status page event (incident or maintenance).", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-info", + "metadata": { + "sidebarTitle": "Get status page event detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageChangeItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "change_id": 5821693893131, + "page_id": 5750613685214, + "type": "incident", + "title": "Web Console Degraded Performance", + "description": "The issue has been resolved, and all services are operating normally.\n\nThank you for your patience.", + "status": "resolved", + "affected_components": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", + "name": "Web Console", + "available_since_seconds": 1765349358, + "order_id": 1, + "status": "operational" + } + ], + "start_at_seconds": 1766736878, + "close_at_seconds": 1775529742, + "updates": [ + { + "update_id": "01KDCVJQ88SZPHWPTDV2Z2AZW8", + "at_seconds": 1766736876, + "status": "investigating", + "description": "We are currently investigating an issue affecting some services.", + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "component_name": "Web Console", + "status": "degraded" + } + ] + }, + { + "update_id": "01KNJX3KW873ZZSRZC14SGFYS3", + "at_seconds": 1775529742, + "status": "resolved", + "description": "The issue has been resolved, and all services are operating normally.", + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "component_name": "Web Console", + "status": "operational" + } + ] + } + ], + "notify_subscribers": true + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Status page ID." + }, + { + "name": "change_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Event (change) ID." + } + ] + } + }, + "/channel/notify/rule/enable": { + "post": { + "operationId": "channelNotifyRuleEnable", + "summary": "Enable channel notification rule", + "description": "Enable a disabled channel notification rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-notify-rule-enable", + "metadata": { + "sidebarTitle": "Enable channel notification rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/incident/resolve": { + "post": { + "operationId": "incidentResolve", + "summary": "Resolve incident", + "description": "Mark an incident as resolved.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-resolve", + "metadata": { + "sidebarTitle": "Resolve incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResolveIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ], + "root_cause": "Memory leak in the connection pool caused by a missing cleanup call.", + "resolution": "Deployed hotfix v2.3.1 and restarted the affected service." + } + } + } + } + } + }, + "/incident/war-room/list": { + "post": { + "operationId": "incidentWarRoomList", + "summary": "List war rooms", + "description": "List all war rooms associated with an incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-war-room-list", + "metadata": { + "sidebarTitle": "List war rooms" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListWarRoomsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [] + } + } + } + } + }, + "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/ListWarRoomsRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee" + } + } + } + } + } + }, + "/alert/list": { + "post": { + "operationId": "alert-read-list", + "summary": "List alerts", + "description": "Return a cursor-paginated list of alerts matching the given filters.", + "tags": [ + "On-call/Alerts" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Both `start_time` and `end_time` are required Unix epoch seconds. Maximum span is 31 days.\n- Use `search_after_ctx` from the previous response to fetch the next page.\n- Results are filtered by the caller's channel data-access permissions.\n- Set `is_active` to `true` to retrieve only active (firing) alerts; `false` to retrieve resolved alerts.", + "href": "/en/api-reference/on-call/alerts/alert-read-list", + "metadata": { + "sidebarTitle": "List alerts" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "has_next_page": false, + "search_after_ctx": "", + "items": [ + { + "alert_id": "663a1b2c3d4e5f6789abcdef", + "integration_id": 10001, + "channel_id": 20001, + "account_id": 10023, + "title": "CPU usage > 90%", + "alert_severity": "Critical", + "alert_status": "Critical", + "start_time": 1712650000, + "last_time": 1712655000, + "end_time": 0, + "labels": { + "host": "web-01" + }, + "ever_muted": false, + "created_at": 1712650000, + "updated_at": 1712655000, + "integration_name": "Prometheus", + "integration_type": "prometheus", + "channel_name": "Production", + "event_cnt": 3 + } + ] + } + } + } + } + }, + "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/AlertListRequest" + }, + "example": { + "start_time": 1712620800, + "end_time": 1712707200, + "limit": 20, + "is_active": true + } + } + } + } + } + }, + "/status-page/change/update": { + "post": { + "operationId": "statusPageChangeUpdate", + "summary": "Update status page event", + "description": "Update an existing status page event.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-update", + "metadata": { + "sidebarTitle": "Update status page event" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateStatusPageChangeRequest" + }, + "example": { + "page_id": 5750613685214, + "change_id": 5821693893131, + "title": "Web Console Degraded Performance (Updated)" + } + } + } + } + } + }, + "/incident/alert/list": { + "post": { + "operationId": "incidentAlertList", + "summary": "List alerts of incident", + "description": "List all alerts merged into a specific incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-alert-list", + "metadata": { + "sidebarTitle": "List alerts of incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListIncidentAlertsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "items": [ + { + "alert_id": "69da451df77b1b51f40e83de", + "integration_id": 2490562293131, + "data_source_id": 2490562293131, + "channel_id": 2551105804131, + "account_id": 2451002751131, + "description": "", + "title": "CPU usage high - web-server-01", + "title_rule": "", + "alert_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata", + "alert_severity": "Critical", + "alert_status": "Critical", + "start_time": 1775912219, + "last_time": 1775969819, + "end_time": 0, + "labels": { + "check": "cpu_usage_high", + "resource": "web-server-01" + }, + "ever_muted": false, + "created_at": 1775912221, + "updated_at": 1775969821, + "integration_name": "FlashMonit", + "integration_type": "monit.alert", + "integration_ref_id": "a_2451002751131", + "channel_name": "Ops Channel", + "channel_status": "enabled", + "responder_name": "", + "responder_email": "", + "incident": { + "incident_id": "69da451ef77b1b51f40e83ee", + "title": "CPU usage high - web-server-01", + "progress": "Triggered" + }, + "event_cnt": 17, + "images": null, + "data_source_name": "FlashMonit", + "data_source_type": "monit.alert", + "data_source_ref_id": "a_2451002751131" + } + ] + } + } + } + } + }, + "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/ListIncidentAlertsRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "is_active": true, + "limit": 100, + "p": 1 + } + } + } + } + } + }, + "/channel/escalate/rule/update": { + "post": { + "operationId": "channelEscalateRuleUpdate", + "summary": "Update escalation rule", + "description": "Update an existing escalation rule configuration.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-escalate-rule-update", + "metadata": { + "sidebarTitle": "Update escalation rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateEscalationRuleRequest" + }, + "example": { + "channel_id": 1001, + "rule_id": "6621b23f4a2c5e0012ab34d0", + "template_id": "6621b23f4a2c5e0012ab34d1", + "rule_name": "Default escalation", + "layers": [ + { + "target": { + "person_ids": [ + 42 + ], + "by": { + "critical": [ + "voice" + ], + "warning": [ + "sms" + ] + } + } + } + ] + } + } + } + } + } + }, + "/calendar/event/upsert": { + "post": { + "operationId": "calEventUpsert", + "summary": "Upsert calendar event", + "description": "Create or update a calendar event (holiday or workday override). Omit event_id to create a new event.", + "tags": [ + "On-call/Calendars" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/calendars/cal-event-upsert", + "metadata": { + "sidebarTitle": "Upsert calendar event" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalEventUpsertResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4", + "summary": "Test Holiday" + } + } + } + } + }, + "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/CalEventUpsertRequest" + }, + "example": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "summary": "Labour Day", + "start_at": "2024-05-01", + "end_at": "2024-05-06", + "is_off": true, + "description": "International Workers Day holiday" + } + } + } + } + } + }, + "/status-page/change/delete": { + "post": { + "operationId": "statusPageChangeDelete", + "summary": "Delete status page event", + "description": "Delete a status page event.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-delete", + "metadata": { + "sidebarTitle": "Delete status page event" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteStatusPageChangeRequest" + }, + "example": { + "page_id": 5750613685214, + "change_id": 5821693893131 + } + } + } + } + } + }, + "/incident/war-room/detail": { + "post": { + "operationId": "incidentWarRoomDetail", + "summary": "Get war room detail", + "description": "Retrieve the war room configuration and members for an incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-war-room-detail", + "metadata": { + "sidebarTitle": "Get war room detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/WarRoom" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000", + "chat_name": "Incident #0E83EE war room", + "share_link": "" + } + } + } + } + }, + "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/GetWarRoomDetailRequest" + }, + "example": { + "integration_id": 2490562293131, + "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000" + } + } + } + } + } + }, + "/calendar/delete": { + "post": { + "operationId": "calendarDelete", + "summary": "Delete calendar", + "description": "Delete a personal service calendar. The call fails when referenced by escalation or silence rules.", + "tags": [ + "On-call/Calendars" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/calendars/calendar-delete", + "metadata": { + "sidebarTitle": "Delete calendar" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CalendarIDRequest" + }, + "example": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM" + } + } + } + } + } + }, + "/alert/event/list": { + "post": { + "operationId": "alert-read-event-list", + "summary": "List events for an alert", + "description": "Return all raw events that have been ingested into a specific alert, in chronological order.", + "tags": [ + "On-call/Alerts" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Each alert accumulates raw events from the integration. This endpoint exposes the raw event history for a given alert.", + "href": "/en/api-reference/on-call/alerts/alert-read-event-list", + "metadata": { + "sidebarTitle": "List events for an alert" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertEventListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "event_id": "663a1b2c3d4e5f6789abc001", + "alert_id": "663a1b2c3d4e5f6789abcdef", + "title": "CPU usage > 90%", + "event_severity": "Critical", + "event_status": "Critical", + "event_time": 1712650000, + "labels": { + "host": "web-01" + } + } + ] + } + } + } + } + }, + "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/AlertEventListRequest" + }, + "example": { + "alert_id": "663a1b2c3d4e5f6789abcdef" + } + } + } + } + } + }, + "/incident/merge": { + "post": { + "operationId": "incidentMerge", + "summary": "Merge incidents", + "description": "Merge one or more incidents into a target incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-merge", + "metadata": { + "sidebarTitle": "Merge incidents" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MergeIncidentsRequest" + }, + "example": { + "source_incident_ids": [ + "69da451ef77b1b51f40e83ef", + "69da451ef77b1b51f40e83f0" + ], + "target_incident_id": "69da451ef77b1b51f40e83ee", + "comment": "Merging related database connectivity incidents into one." + } + } + } + } + } + }, + "/enrichment/mapping/data/delete": { + "post": { + "operationId": "mapping-data-write-delete", + "summary": "Delete mapping data rows", + "description": "Delete up to 100 mapping data rows by their keys.", + "tags": [ + "On-call/Alert enrichment" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-write-delete", + "metadata": { + "sidebarTitle": "Delete mapping data rows" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingDataDeleteRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "keys": [ + "server01", + "server02" + ] + } + } + } + } + } + }, + "/incident/post-mortem/delete": { + "post": { + "operationId": "incidentPostMortemDelete", + "summary": "Delete post-mortem", + "description": "Delete a post-mortem report.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-post-mortem-delete", + "metadata": { + "sidebarTitle": "Delete post-mortem" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePostMortemRequest" + }, + "example": { + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e" + } + } + } + } + } + }, + "/calendar/update": { + "post": { + "operationId": "calendarUpdate", + "summary": "Update calendar", + "description": "Update a personal service calendar. Only non-null fields are updated.", + "tags": [ + "On-call/Calendars" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/calendars/calendar-update", + "metadata": { + "sidebarTitle": "Update calendar" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CalendarUpdateRequest" + }, + "example": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "cal_name": "Production On-Call Calendar (Updated)", + "timezone": "America/New_York", + "workdays": [ + 1, + 2, + 3, + 4, + 5 + ] + } + } + } + } + } + }, + "/incident/war-room/delete": { + "post": { + "operationId": "incidentWarRoomDelete", + "summary": "Delete war room", + "description": "Delete an incident war room.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-war-room-delete", + "metadata": { + "sidebarTitle": "Delete war room" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteWarRoomRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "integration_id": 2490562293131 + } + } + } + } + } + }, + "/incident/remove": { + "post": { + "operationId": "incidentRemove", + "summary": "Delete an incident", + "description": "Permanently delete an incident and all associated data.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-remove", + "metadata": { + "sidebarTitle": "Delete an incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RemoveIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] + } + } + } + } + } + }, + "/channel/unsubscribe/rule/enable": { + "post": { + "operationId": "channelUnsubscribeRuleEnable", + "summary": "Enable drop rule", + "description": "Enable a disabled drop rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-enable", + "metadata": { + "sidebarTitle": "Enable drop rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/insight/incident/list": { + "post": { + "operationId": "insightIncidentList", + "summary": "List insight incidents", + "description": "Return a paged list of incidents with per-incident handling metrics used by the analytics dashboard.", + "tags": [ + "On-call/Analytics" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/analytics/insight-incident-list", + "metadata": { + "sidebarTitle": "List insight incidents" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/InsightIncidentListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 2, + "has_next_page": false, + "items": [ + { + "incident_id": "67ca560c381a4fedb664f5f8", + "title": "CPU spike on prod-web-01", + "description": "CPU usage exceeded 90% threshold", + "team_id": 4295771902131, + "team_name": "SRE Team", + "channel_id": 4321322010131, + "channel_name": "Production Alerts", + "progress": "Closed", + "severity": "Info", + "created_at": 1741313548, + "closed_by": "manually", + "seconds_to_ack": 1052085, + "seconds_to_close": 1483880, + "engaged_seconds": 1052085, + "hours": "work", + "responders": [ + { + "person_id": 3790925372131, + "assigned_at": 1741313548, + "acknowledged_at": 1742365633, + "person_name": "alice", + "email": "alice@example.com" + } + ], + "assigned_to": { + "person_ids": [ + 3790925372131 + ], + "escalate_rule_id": "000000000000000000000000", + "layer_idx": 0, + "type": "reassign" + }, + "labels": {}, + "fields": {}, + "notifications": 4, + "interruptions": 2, + "assignments": 2, + "reassignments": 1, + "acknowledgements": 1, + "escalations": 0, + "timeout_escalations": 0, + "manual_escalations": 0, + "creator_id": 3790925372131, + "creator_name": "alice" + } + ] + } + } + } + } + }, + "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/InsightIncidentListRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "p": 1, + "limit": 20, + "severities": [ + "Critical" + ] + } + } + } + } + } + }, + "/status-page/change/create": { + "post": { + "operationId": "statusPageChangeCreate", + "summary": "Create status page event", + "description": "Create a new incident or maintenance event on a status page.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-create", + "metadata": { + "sidebarTitle": "Create status page event" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageChangeCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "change_id": 6294539747131, + "change_name": "API Test Incident" + } + } + } + } + }, + "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/CreateStatusPageChangeRequest" + }, + "example": { + "page_id": 5750613685214, + "type": "incident", + "title": "Web Console Degraded Performance", + "description": "We are investigating degraded performance affecting the web console.", + "status": "investigating", + "start_at_seconds": 1712000000, + "notify_subscribers": true, + "updates": [ + { + "status": "investigating", + "description": "We are currently investigating an issue affecting some users.", + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "status": "degraded" + } + ] + } + ] + } + } + } + } + } + }, + "/schedule/preview": { + "post": { + "operationId": "schedulePreview", + "summary": "Preview schedule", + "description": "Preview the coverage generated by a schedule configuration without persisting it. The request accepts the same body as create/update plus a required start/end window (max 45 days).", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **60 requests/minute**; **10 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/schedules/schedule-preview", + "metadata": { + "sidebarTitle": "Preview schedule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": null, + "name": null, + "account_id": 0, + "group_id": null, + "disabled": null, + "create_at": 0, + "create_by": 0, + "update_at": 0, + "update_by": 0, + "layers": [ + { + "account_id": 0, + "name": "Layer 1", + "schedule_id": 0, + "hidden": 0, + "mode": 0, + "weight": 0, + "groups": [ + { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 0, + "end": 0 + }, + { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2476123212131 + ] + } + ], + "start": 0, + "end": 0 + } + ], + "rotation_duration": 86400, + "handoff_time": 0, + "enable_time": 1775980800, + "expire_time": 0, + "restrict_mode": 0, + "restrict_start": 0, + "restrict_end": 0, + "restrict_periods": [], + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "create_at": 0, + "create_by": 0, + "update_at": 0, + "update_by": 0, + "layer_name": "Layer 1", + "fair_rotation": false, + "layer_start": 1775980800, + "layer_end": null, + "rotation_unit": "day", + "rotation_value": 1, + "mask_continuous_enabled": false + } + ], + "schedule_layers": [ + { + "layer_name": "Layer 1", + "name": "Layer 1", + "mode": 0, + "schedules": [ + { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "index": 0 + }, + { + "start": 1776096000, + "end": 1776182400, + "group": { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2476123212131 + ] + } + ], + "start": 1776096000, + "end": 1776182400 + }, + "index": 0 + } + ] + } + ], + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": [ + { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "index": 0 + } + ] + }, + "start": 1775980800, + "end": 1776240000, + "notify": null, + "schedule_id": 0, + "schedule_name": null, + "team_id": null, + "description": null, + "layer_schedules": null, + "status": null, + "cur_oncall": null, + "next_oncall": null + } + } + } + } + }, + "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/ScheduleUpsertRequest" + }, + "example": { + "schedule_name": "Preview Schedule", + "start": 1712000000, + "end": 1712086400, + "layers": [ + { + "layer_name": "Layer 1", + "name": "Layer 1", + "mode": 0, + "weight": 0, + "hidden": 0, + "groups": [ + { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 0, + "end": 0 + } + ], + "rotation_unit": "day", + "rotation_value": 1, + "rotation_duration": 86400, + "handoff_time": 0, + "enable_time": 1712000000, + "expire_time": 0, + "restrict_mode": 0, + "restrict_start": 0, + "restrict_end": 0, + "restrict_periods": [], + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "fair_rotation": false, + "mask_continuous_enabled": false + } + ] + } + } + } + } + } + }, + "/webhook/history/list": { + "post": { + "operationId": "webhookHistoryList", + "summary": "List webhook delivery history", + "description": "List the delivery history for outbound webhook notifications.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |", + "href": "/en/api-reference/on-call/integrations/webhook-history-list", + "metadata": { + "sidebarTitle": "List webhook delivery history" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListWebhookHistoryResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "integration_id": 5321026051131, + "event_id": "20260412Xatt9hrXsgmFkBR78WF655", + "webhook_type": "alert", + "event_type": "a_update", + "channel_id": 2551105804131, + "ref_id": "69da3f0ef77b1b51f40e83cc", + "endpoint": "https://example.com/webhook", + "attempt": 1, + "duration": 132, + "status": "success", + "status_code": 200, + "event_time": "2026-04-12T13:31:11.357472+08:00" + } + ], + "search_after_ctx": "eyJldmVudF90aW1lIjoiMjAyNi0wNC0xMlQxMzoxNToyNi4zODI1NDcrMDg6MDAiLCJldmVudF9pZCI6IjIwMjYwNDEybUdzeFAzZHJwRmZzNFpDUWQycFNEcCJ9", + "total": 346 + } + } + } + } + }, + "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/ListWebhookHistoryRequest" + }, + "example": { + "limit": 20, + "start_time": 1775116800000, + "end_time": 1775203200000, + "integration_id": 6113996590131, + "status": "success" + } + } + } + } + } + }, + "/incident/wake": { + "post": { + "operationId": "incidentWake", + "summary": "Wake incident", + "description": "Cancel the snooze on an incident and resume notifications.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-wake", + "metadata": { + "sidebarTitle": "Wake incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WakeIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] + } + } + } + } + } + }, + "/channel/silence/rule/enable": { + "post": { + "operationId": "channelSilenceRuleEnable", + "summary": "Enable silence rule", + "description": "Enable a disabled silence rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-silence-rule-enable", + "metadata": { + "sidebarTitle": "Enable silence rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/silence/rule/update": { + "post": { + "operationId": "channelSilenceRuleUpdate", + "summary": "Update silence rule", + "description": "Update an existing silence rule configuration.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-silence-rule-update", + "metadata": { + "sidebarTitle": "Update silence rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSilenceRuleRequest" + }, + "example": { + "channel_id": 1001, + "rule_id": "6621b23f4a2c5e0012ab34cd", + "rule_name": "Mute during maintenance", + "time_filter": { + "start_time": 1710000000, + "end_time": 1710086400 + }, + "filters": [ + [ + { + "key": "labels.service", + "oper": "IN", + "vals": [ + "billing" + ] + } + ] + ] + } + } + } + } + } + }, + "/channel/notify/rule/create": { + "post": { + "operationId": "channelNotifyRuleCreate", + "summary": "Create channel notification rule", + "description": "Create a notification rule for a channel.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-notify-rule-create", + "metadata": { + "sidebarTitle": "Create channel notification rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/incident/feed": { + "post": { + "operationId": "incidentFeed", + "summary": "Get incident timeline", + "description": "Retrieve the timeline feed for a specific incident, including state changes, comments and system events.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-feed", + "metadata": { + "sidebarTitle": "Get incident timeline" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListIncidentFeedResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "has_next_page": true, + "items": [ + { + "ref_id": "69da451ef77b1b51f40e83ee", + "type": "i_new", + "detail": { + "severity": "Critical", + "title": "CPU usage high - web-server-01" + }, + "account_id": 2451002751131, + "creator_id": 0, + "created_at": 1775912222661, + "updated_at": 1775912222661 + }, + { + "ref_id": "69da451ef77b1b51f40e83ee", + "type": "i_notify", + "detail": { + "rid": "5e9ccfabcd154b41a0005fd0f52b674b", + "msg_id": "naFudJYCawBWsChdV6ErPH", + "fire_type": "fire", + "escalate_rule_id": "000000000000000000000000", + "layer_idx": 0, + "by": "email", + "persons": [ + { + "person_id": 2476444212131 + } + ] + }, + "account_id": 2451002751131, + "creator_id": 0, + "created_at": 1775972130174, + "updated_at": 1775972130174 + } + ] + } + } + } + } + }, + "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/ListIncidentFeedRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "p": 1, + "limit": 20 + } + } + } + } + } + }, + "/channel/inhibit/rule/create": { + "post": { + "operationId": "channelInhibitRuleCreate", + "summary": "Create inhibit rule", + "description": "Create an inhibit rule to suppress lower-priority alerts when higher-priority ones are firing.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-create", + "metadata": { + "sidebarTitle": "Create inhibit rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "rule_id": "69db2f69a0fe7db6448b1504", + "rule_name": "Test inhibit rule" + } + } + } + } + }, + "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/CreateInhibitRuleRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_name": "Suppress Info when Critical fires", + "description": "When a Critical alert fires, suppress matching Info alerts", + "equals": [ + "labels.cluster", + "labels.service" + ], + "source_filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Critical" + ] + } + ] + ], + "target_filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "is_directly_discard": false + } + } + } + } + } + }, + "/channel/inhibit/rule/enable": { + "post": { + "operationId": "channelInhibitRuleEnable", + "summary": "Enable inhibit rule", + "description": "Enable a disabled inhibit rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-enable", + "metadata": { + "sidebarTitle": "Enable inhibit rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/enrichment/mapping/schema/list": { + "post": { + "operationId": "mapping-schema-read-list", + "summary": "List mapping schemas", + "description": "Return all mapping schemas for the account, sorted by creation time ascending.", + "tags": [ + "On-call/Alert enrichment" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-read-list", + "metadata": { + "sidebarTitle": "List mapping schemas" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingSchemaListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "items": [ + { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "schema_name": "CMDB Lookup", + "description": "Enrich alerts with CMDB data", + "source_labels": [ + "host" + ], + "result_labels": [ + "owner", + "team", + "service" + ], + "status": "enabled", + "team_id": 0, + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + ] + } + } + } + } + }, + "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/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/channel/unsubscribe/rule/delete": { + "post": { + "operationId": "channelUnsubscribeRuleDelete", + "summary": "Delete drop rule", + "description": "Delete a drop rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-delete", + "metadata": { + "sidebarTitle": "Delete drop rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/alert/pipeline/info": { + "post": { + "operationId": "alert-read-pipeline-info", + "summary": "Get alert pipeline", + "description": "Return the alert processing pipeline configured for a specific integration.", + "tags": [ + "On-call/Alerts" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |\n\n## Usage\n\n- Returns `null` data if no pipeline has been configured for the given integration.\n- Requires the caller to have access to the integration.", + "href": "/en/api-reference/on-call/alerts/alert-read-pipeline-info", + "metadata": { + "sidebarTitle": "Get alert pipeline" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertPipelineItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 10001, + "rules": [ + { + "kind": "severity_reset", + "if": null, + "settings": { + "severity": "Warning" + } + } + ], + "status": "enabled", + "creator_id": 80011, + "updated_by": 80011, + "created_at": 1710000000, + "updated_at": 1712000000 + } + } + } + } + }, + "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/AlertPipelineInfoRequest" + }, + "example": { + "integration_id": 10001 + } + } + } + } + } + }, + "/enrichment/mapping/schema/delete": { + "post": { + "operationId": "mapping-schema-write-delete", + "summary": "Delete mapping schema", + "description": "Delete a mapping schema and all its associated data. Deletion is blocked if the schema is referenced by any enrichment rule or webhook.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- If the schema is still referenced, the response returns HTTP 400 with a `refs` list of blocking references.\n- Only the schema creator, account admin, or team member can delete the schema.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.\n- High-risk operation. Console JWT callers must pass a second-factor code; `app_key` callers bypass the MFA prompt but remain audited — treat the key as a secret.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-write-delete", + "metadata": { + "sidebarTitle": "Delete mapping schema" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingSchemaIDRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + } + } + } + } + } + }, + "/insight/account": { + "post": { + "operationId": "insightByAccount", + "summary": "Get account-level insight", + "description": "Return aggregated incident insight metrics for the entire account.", + "tags": [ + "On-call/Analytics" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/analytics/insight-by-account", + "metadata": { + "sidebarTitle": "Get account-level insight" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DimensionInsightResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "ts": 1740844800, + "total_incident_cnt": 2, + "total_incidents_acknowledged": 2, + "total_incidents_closed": 2, + "total_incidents_auto_closed": 0, + "total_incidents_manually_closed": 2, + "total_incidents_timeout_closed": 0, + "total_incidents_escalated": 0, + "total_incidents_manually_escalated": 0, + "total_incidents_timeout_escalated": 0, + "total_incidents_reassigned": 2, + "total_interruptions": 3, + "total_notifications": 6, + "total_engaged_seconds": 3317709, + "total_seconds_to_ack": 3317709, + "total_seconds_to_close": 3749514, + "mean_seconds_to_ack": 1658854.5, + "mean_seconds_to_close": 1874757, + "noise_reduction_pct": 0, + "acknowledgement_pct": 100, + "total_alert_cnt": 0, + "total_alert_event_cnt": 0 + } + ] + } + } + } + } + }, + "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/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "aggregate_unit": "day", + "severities": [ + "Critical", + "Warning" + ] + } + } + } + } + } + }, + "/insight/incident/export": { + "post": { + "operationId": "insightIncidentExport", + "summary": "Export insight incidents", + "description": "Export the filtered incident analytics list as a CSV file. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope.", + "tags": [ + "On-call/Analytics" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/analytics/insight-incident-export", + "metadata": { + "sidebarTitle": "Export insight incidents" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightIncidentExportRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "severities": [ + "Critical", + "Warning" + ], + "export_fields": [ + "incident_id", + "title", + "severity", + "created_at", + "seconds_to_close" + ], + "description_html_to_text": true + } + } + } + } + } + }, + "/schedule/info": { + "post": { + "operationId": "scheduleInfo", + "summary": "Get schedule info", + "description": "Return details of an on-call schedule including the computed schedule layers for the requested time window (max 45 days).", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/schedules/schedule-info", + "metadata": { + "sidebarTitle": "Get schedule info" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 5789640530410, + "name": "test-000001", + "account_id": 2451002751131, + "group_id": 4291079133131, + "disabled": 0, + "create_at": 1766110836, + "create_by": 2476123212131, + "update_at": 1775205795, + "update_by": 2476123212131, + "layers": [ + { + "account_id": 2451002751131, + "name": "Layer 1", + "schedule_id": 5789640530410, + "hidden": 0, + "mode": 0, + "weight": 0, + "groups": [ + { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 3122470302131 + ] + } + ], + "start": 0, + "end": 0 + }, + { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2659460982131 + ] + } + ], + "start": 0, + "end": 0 + } + ], + "rotation_duration": 86400, + "handoff_time": 0, + "enable_time": 1767542400, + "expire_time": 0, + "restrict_mode": 0, + "restrict_start": 0, + "restrict_end": 0, + "restrict_periods": [], + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "create_at": 1775205795, + "create_by": 2476123212131, + "update_at": 1775205795, + "update_by": 2476123212131, + "layer_name": "Layer 1", + "fair_rotation": false, + "layer_start": 1767542400, + "layer_end": null, + "rotation_unit": "day", + "rotation_value": 1, + "mask_continuous_enabled": false + } + ], + "schedule_layers": [ + { + "layer_name": "Layer 1", + "name": "Layer 1", + "mode": 0, + "schedules": [ + { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 3122470302131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "index": 0 + }, + { + "start": 1776096000, + "end": 1776182400, + "group": { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2659460982131 + ] + } + ], + "start": 1776096000, + "end": 1776182400 + }, + "index": 0 + } + ] + } + ], + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": [ + { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 3122470302131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "index": 0 + } + ] + }, + "notify": { + "advance_in_time": 300, + "fixed_time": null, + "by": { + "follow_preference": false, + "personal_channels": [ + "email" + ] + }, + "webhooks": [ + { + "type": "feishu_app", + "settings": { + "token": "", + "alias": "", + "data_source_id": 5427276014131, + "chat_ids": [ + "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d" + ], + "verify_token": "", + "sign_secret": "" + } + } + ] + }, + "schedule_id": 5789640530410, + "schedule_name": "test-000001", + "team_id": 4291079133131, + "description": "abc", + "layer_schedules": [ + { + "layer_name": "Layer 1", + "name": "Layer 1", + "mode": 0, + "schedules": [ + { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 3122470302131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "index": 0 + } + ] + } + ], + "status": 0, + "cur_oncall": { + "start": 1775972040, + "end": 1776009600, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 1775972040, + "end": 1776009600 + }, + "update_at": 0, + "weight": 0, + "index": 0 + }, + "next_oncall": { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 3122470302131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "update_at": 0, + "weight": 0, + "index": 0 + } + } + } + } + } + }, + "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/ScheduleInfoRequest" + }, + "example": { + "schedule_id": 2001, + "start": 1712000000, + "end": 1712086400 + } + } + } + } + } + }, + "/template/update": { + "post": { + "operationId": "template-write-update", + "summary": "Update a template", + "description": "Replace the content of every channel on an existing template.", + "tags": [ + "On-call/Notification templates" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Templates Manage** (`on-call`) |\n\n## Usage\n\n- Every channel field in the request overwrites the stored value — send an empty string to clear a channel.\n- The caller needs data-permission on the template's team; otherwise the response is `AccessDenied`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/notification-templates/template-write-update", + "metadata": { + "sidebarTitle": "Update a template" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TemplateUpdateRequest" + }, + "example": { + "template_id": "6605a1b2c3d4e5f6a7b8c9d0", + "template_name": "Prod incident default", + "description": "Updated description.", + "email": "Incident {{ .IncidentName }} on {{ .Severity }}", + "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}" + } + } + } + } + } + }, + "/channel/infos": { + "post": { + "operationId": "channelInfos", + "summary": "Batch get channels", + "description": "Retrieve multiple channels by their IDs.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-infos", + "metadata": { + "sidebarTitle": "Batch get channels" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ChannelInfosResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "channel_id": 1001, + "channel_name": "Production Alerts", + "status": "enabled" + } + ] + } + } + } + } + }, + "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/ChannelInfosRequest" + }, + "example": { + "channel_ids": [ + 1001, + 1002 + ] + } + } + } + } + } + }, + "/schedule/infos": { + "post": { + "operationId": "scheduleInfos", + "summary": "Batch get schedules", + "description": "Return details of multiple on-call schedules by their IDs.", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/schedules/schedule-infos", + "metadata": { + "sidebarTitle": "Batch get schedules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleSelfResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "id": 5789640530410, + "name": "test-000001", + "account_id": 2451002751131, + "group_id": 4291079133131, + "disabled": 0, + "create_at": 1766110836, + "create_by": 2476123212131, + "update_at": 1775205795, + "update_by": 2476123212131, + "layers": null, + "schedule_layers": null, + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": null + }, + "notify": { + "advance_in_time": 300, + "fixed_time": null, + "by": { + "follow_preference": false, + "personal_channels": [ + "email" + ] + }, + "webhooks": [ + { + "type": "feishu_app", + "settings": { + "token": "", + "alias": "", + "data_source_id": 5427276014131, + "chat_ids": [ + "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d" + ], + "verify_token": "", + "sign_secret": "" + } + } + ] + }, + "schedule_id": 5789640530410, + "schedule_name": "test-000001", + "team_id": 4291079133131, + "description": "abc", + "layer_schedules": null, + "status": 0, + "cur_oncall": null, + "next_oncall": null + } + ] + } + } + } + } + }, + "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/ScheduleIDsRequest" + }, + "example": { + "schedule_ids": [ + 2001, + 2002, + 2003 + ] + } + } + } + } + } + }, + "/template/info": { + "post": { + "operationId": "template-read-info", + "summary": "Get template detail", + "description": "Return a single notification template by ID.", + "tags": [ + "On-call/Notification templates" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Templates Read** (`on-call`) |\n\n## Usage\n\n- Pass `000000000000000000000001` as `template_id` to retrieve the built-in preset template for the caller's account locale.", + "href": "/en/api-reference/on-call/notification-templates/template-read-info", + "metadata": { + "sidebarTitle": "Get template detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TemplateItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_id": 10023, + "team_id": 0, + "template_id": "6605a1b2c3d4e5f6a7b8c9d0", + "template_name": "Prod incident default", + "description": "Default template for production incidents.", + "email": "Incident {{ .IncidentName }} on {{ .Severity }}", + "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}", + "voice": "", + "dingtalk": "", + "wecom": "", + "feishu": "", + "feishu_app": "", + "dingtalk_app": "", + "wecom_app": "", + "slack_app": "", + "teams_app": "", + "telegram": "", + "slack": "", + "zoom": "", + "status": "enabled", + "creator_id": 80011, + "updated_by": 80011, + "created_at": 1712700000, + "updated_at": 1712702400 + } + } + } + } + }, + "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/TemplateIDRequest" + }, + "example": { + "template_id": "6605a1b2c3d4e5f6a7b8c9d0" + } + } + } + } + } + }, + "/channel/escalate/rule/disable": { + "post": { + "operationId": "channelEscalateRuleDisable", + "summary": "Disable escalation rule", + "description": "Disable an escalation rule without deleting it.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-escalate-rule-disable", + "metadata": { + "sidebarTitle": "Disable escalation rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/incident/reset": { + "post": { + "operationId": "incidentReset", + "summary": "Update incident fields", + "description": "Update one or more editable fields of an incident in a single call, including title, description, impact, root cause, resolution, and severity. At least one field must be provided.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-reset", + "metadata": { + "sidebarTitle": "Update incident fields" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateIncidentFieldsRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "title": "Database connection timeout - prod-db-01 primary", + "incident_severity": "Critical" + } + } + } + } + } + }, + "/channel/disable": { + "post": { + "operationId": "channelDisable", + "summary": "Disable channel", + "description": "Disable a channel to stop incident routing without deleting it.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-disable", + "metadata": { + "sidebarTitle": "Disable channel" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelIDRequest" + }, + "example": { + "channel_id": 3521074710131 + } + } + } + } + } + }, + "/webhook/history/detail": { + "post": { + "operationId": "webhookHistoryDetail", + "summary": "Get webhook delivery detail", + "description": "Retrieve the detailed payload and response for a specific webhook delivery attempt.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |", + "href": "/en/api-reference/on-call/integrations/webhook-history-detail", + "metadata": { + "sidebarTitle": "Get webhook delivery detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/WebhookHistoryDetail" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 5321026051131, + "event_id": "20260412Xatt9hrXsgmFkBR78WF655", + "webhook_type": "alert", + "event_type": "a_update", + "channel_id": 2551105804131, + "ref_id": "69da3f0ef77b1b51f40e83cc", + "request_headers": "{\"Content-Type\":\"application/json\"}", + "request_body": "{\"event_type\":\"a_update\",\"event_id\":\"d789d65951c0532ea9b6a1d99b707054\"}", + "endpoint": "https://example.com/webhook", + "attempt": 1, + "duration": 132, + "status": "success", + "status_code": 200, + "response_headers": "{\"Content-Type\":\"application/json\"}", + "response_body": "{\"ok\":true}", + "event_time": "2026-04-12T13:31:11.357472+08:00", + "ref_title": "High CPU Usage on host-01", + "channel_name": "Production Alerts" + } + } + } + } + }, + "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/GetWebhookHistoryDetailRequest" + }, + "example": { + "event_id": "20260412Xatt9hrXsgmFkBR78WF655", + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/schedule/list": { + "post": { + "operationId": "scheduleList", + "summary": "List schedules", + "description": "Return a paginated list of on-call schedules. When both start and end are provided (max 45 days apart), computed layer schedules are included.", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/schedules/schedule-list", + "metadata": { + "sidebarTitle": "List schedules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "id": 5789640530410, + "name": "test-000001", + "account_id": 2451002751131, + "group_id": 4291079133131, + "disabled": 0, + "create_at": 1766110836, + "create_by": 2476123212131, + "update_at": 1775205795, + "update_by": 2476123212131, + "layers": null, + "schedule_layers": null, + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": null + }, + "notify": { + "advance_in_time": 300, + "fixed_time": null, + "by": { + "follow_preference": false, + "personal_channels": [ + "email" + ] + }, + "webhooks": [ + { + "type": "feishu_app", + "settings": { + "token": "", + "alias": "", + "data_source_id": 5427276014131, + "chat_ids": [ + "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d" + ], + "verify_token": "", + "sign_secret": "" + } + } + ] + }, + "schedule_id": 5789640530410, + "schedule_name": "test-000001", + "team_id": 4291079133131, + "description": "abc", + "layer_schedules": null, + "status": 0, + "cur_oncall": null, + "next_oncall": null + }, + { + "id": 5432326025106, + "name": "test-2509300001", + "account_id": 2451002751131, + "group_id": 2477033058131, + "disabled": 0, + "create_at": 1759132037, + "create_by": 2476123212131, + "update_at": 1775207501, + "update_by": 2476123212131, + "layers": null, + "schedule_layers": null, + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": null + }, + "notify": { + "advance_in_time": 300, + "fixed_time": null, + "by": { + "follow_preference": true, + "personal_channels": null + }, + "webhooks": null + }, + "schedule_id": 5432326025106, + "schedule_name": "test-2509300001", + "team_id": 2477033058131, + "description": "", + "layer_schedules": null, + "status": 0, + "cur_oncall": null, + "next_oncall": null + } + ], + "total": 41 + } + } + } + } + }, + "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/ScheduleListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "query": "production", + "is_my_team": true + } + } + } + } + } + }, + "/enrichment/mapping/schema/create": { + "post": { + "operationId": "mapping-schema-write-create", + "summary": "Create mapping schema", + "description": "Create a new mapping schema defining source lookup labels and the result labels to populate. Requires a Pro plan.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- Schema names must be unique within an account.\n- `source_labels` (1–3 labels) are used as lookup keys; `result_labels` (1–10 labels) are the labels written on match.\n- Label names must match `^[a-z][a-z0-9_]{0,39}$` (lowercase).\n- `source_labels` and `result_labels` must not overlap.\n- An account can have at most 20 mapping schemas.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-write-create", + "metadata": { + "sidebarTitle": "Create mapping schema" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingSchemaCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "schema_name": "CMDB Lookup" + } + } + } + } + }, + "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/MappingSchemaCreateRequest" + }, + "example": { + "schema_name": "CMDB Lookup", + "description": "Enrich alerts with CMDB data", + "source_labels": [ + "host" + ], + "result_labels": [ + "owner", + "team", + "service" + ] + } + } + } + } + } + }, + "/enrichment/mapping/api/update": { + "post": { + "operationId": "mapping-api-write-update", + "summary": "Update mapping API", + "description": "Update configuration of an existing mapping API.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- Only the API creator, account admin, or team member can update the API.\n- All updatable fields are optional — only provided fields are changed.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-write-update", + "metadata": { + "sidebarTitle": "Update mapping API" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingAPIUpdateRequest" + }, + "example": { + "api_id": "665f1a2b3c4d5e6f7a8b9c02", + "timeout": 3, + "retry_count": 1 + } + } + } + } + } + }, + "/calendar/list": { + "post": { + "operationId": "calendarList", + "summary": "List calendars", + "description": "Return the list of service calendars visible to the current account.", + "tags": [ + "On-call/Calendars" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/calendars/calendar-list", + "metadata": { + "sidebarTitle": "List calendars" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "team_id": 2477033058131, + "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg", + "cal_name": "Stock Exchange Calendar", + "description": "A stock market trading calendar example", + "timezone": "Asia/Shanghai", + "kind": "personal", + "workdays": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], + "created_at": 1702455630, + "updated_at": 1775529526, + "creator_id": 2476444212131, + "updated_by": 3790925372131, + "status": "enabled" + }, + { + "account_id": 2451002751131, + "team_id": 0, + "cal_id": "cal.VZYkchxJhGELSF4jzkUAud", + "cal_name": "HK Stock Exchange Calendar", + "description": "Hong Kong Stock Exchange trading days calendar", + "timezone": "Asia/Shanghai", + "kind": "personal", + "extra_cal_ids": [ + "zh-cn.china.official" + ], + "created_at": 1702968470, + "updated_at": 1775188967, + "creator_id": 2451002751131, + "updated_by": 3790925372131, + "status": "enabled" + } + ], + "total": 8 + } + } + } + } + }, + "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/CalendarListRequest" + }, + "example": { + "kind": "personal" + } + } + } + } + } + }, + "/incident/responder/add": { + "post": { + "operationId": "incidentResponderAdd", + "summary": "Add incident responder", + "description": "Add a responder to an existing incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-responder-add", + "metadata": { + "sidebarTitle": "Add incident responder" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddIncidentResponderRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "person_ids": [ + 2476444212131, + 2476444212132 + ] + } + } + } + } + } + }, + "/insight/team/export": { + "post": { + "operationId": "insightTeamExport", + "summary": "Export team insight", + "description": "Export team insight metrics as a CSV file. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope.", + "tags": [ + "On-call/Analytics" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/analytics/insight-team-export", + "metadata": { + "sidebarTitle": "Export team insight" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "team_ids": [ + 4295771902131 + ], + "severities": [ + "Critical", + "Warning" + ] + } + } + } + } + } + }, + "/schedule/delete": { + "post": { + "operationId": "scheduleDelete", + "summary": "Delete schedules", + "description": "Delete one or more on-call schedules by ID.", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/schedules/schedule-delete", + "metadata": { + "sidebarTitle": "Delete schedules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScheduleIDsBodyRequest" + }, + "example": { + "schedule_ids": [ + 2001 + ] + } + } + } + } + } + }, + "/status-page/change/timeline/delete": { + "post": { + "operationId": "statusPageChangeTimelineDelete", + "summary": "Delete event timeline entry", + "description": "Delete a timeline entry from a status page event.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-timeline-delete", + "metadata": { + "sidebarTitle": "Delete event timeline entry" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteStatusPageChangeTimelineRequest" + }, + "example": { + "page_id": 5750613685214, + "change_id": 5821693893131, + "update_id": "01KP0311872NVYFRRQ82FWXAP4" + } + } + } + } + } + }, + "/incident/war-room/create": { + "post": { + "operationId": "incidentWarRoomCreate", + "summary": "Create war room", + "description": "Create a war room channel for collaborative incident response.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-war-room-create", + "metadata": { + "sidebarTitle": "Create war room" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/WarRoom" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000", + "chat_name": "Incident #0E83EE war room", + "share_link": "" + } + } + } + } + }, + "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/CreateWarRoomRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "integration_id": 2490562293131, + "add_observers": true + } + } + } + } + } + }, + "/channel/unsubscribe/rule/update": { + "post": { + "operationId": "channelUnsubscribeRuleUpdate", + "summary": "Update drop rule", + "description": "Update an existing drop rule configuration.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-update", + "metadata": { + "sidebarTitle": "Update drop rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateDropRuleRequest" + }, + "example": { + "channel_id": 1001, + "rule_id": "6621b23f4a2c5e0012ab34cf", + "rule_name": "Drop test alerts", + "filters": [ + [ + { + "key": "labels.env", + "oper": "IN", + "vals": [ + "test" + ] + } + ] + ] + } + } + } + } + } + }, + "/route/upsert": { + "post": { + "operationId": "routeUpsert", + "summary": "Upsert routing rule", + "description": "Create or update routing rules for an integration to direct alerts to specific channels. At least one of `cases` or `default` must be provided.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/route-upsert", + "metadata": { + "sidebarTitle": "Upsert routing rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertRouteRequest" + }, + "example": { + "integration_id": 6113996590131, + "cases": [ + { + "if": [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Critical" + ] + } + ], + "channel_ids": [ + 3521074710131 + ], + "fallthrough": false, + "routing_mode": "standard" + } + ], + "default": { + "channel_ids": [ + 3521074710131 + ] + } + } + } + } + } + } + }, + "/channel/notify/rule/delete": { + "post": { + "operationId": "channelNotifyRuleDelete", + "summary": "Delete channel notification rule", + "description": "Delete a channel notification rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-notify-rule-delete", + "metadata": { + "sidebarTitle": "Delete channel notification rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/calendar/create": { + "post": { + "operationId": "calendarCreate", + "summary": "Create calendar", + "description": "Create a personal service calendar. Each account is limited to 5 calendars unless the Flashcat-Break-Cal-Limit header is set.", + "tags": [ + "On-call/Calendars" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/calendars/calendar-create", + "metadata": { + "sidebarTitle": "Create calendar" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "cal_name": "API Test Calendar" + } + } + } + } + }, + "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/CalendarCreateRequest" + }, + "example": { + "cal_name": "Production On-Call Calendar", + "description": "Calendar for production on-call team", + "timezone": "Asia/Shanghai", + "workdays": [ + 1, + 2, + 3, + 4, + 5 + ] + } + } + } + } + } + }, + "/incident/ack": { + "post": { + "operationId": "incidentAck", + "summary": "Acknowledge incident", + "description": "Acknowledge an incident to indicate you are actively working on it.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-ack", + "metadata": { + "sidebarTitle": "Acknowledge incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AckIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] + } + } + } + } + } + }, + "/channel/notify/rule/list": { + "post": { + "operationId": "channelNotifyRuleList", + "summary": "List channel notification rules", + "description": "List all notification rules configured for a channel.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-notify-rule-list", + "metadata": { + "sidebarTitle": "List channel notification rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/channel/escalate/rule/list": { + "post": { + "operationId": "channelEscalateRuleList", + "summary": "List escalation rules", + "description": "List all escalation rules for a channel.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-escalate-rule-list", + "metadata": { + "sidebarTitle": "List escalation rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListEscalationRulesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "channel_id": 6193426913131, + "priority": 0, + "aggr_window": 0, + "rule_name": "Default", + "description": "", + "layers": [ + { + "max_times": 1, + "notify_step": 10, + "target": { + "person_ids": [ + 3790925372131 + ], + "by": { + "follow_preference": true + }, + "webhooks": null + }, + "escalate_window": 30, + "force_escalate": false + } + ], + "time_filters": [], + "filters": [], + "status": "enabled", + "template_id": "6321aad26c12104586a88916", + "rule_id": "69bd0ce95a238693176c1d66", + "updated_by": 3790925372131, + "created_at": 1773997289, + "updated_at": 1773997289 + } + ] + } + } + } + } + }, + "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/ChannelScopedListRequest" + }, + "example": { + "channel_id": 1001 + } + } + } + } + } + }, + "/channel/create": { + "post": { + "operationId": "channelCreate", + "summary": "Create channel", + "description": "Create a new channel for incident management.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-create", + "metadata": { + "sidebarTitle": "Create channel" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ChannelCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "channel_id": 6294542005131, + "channel_name": "API Test Channel" + } + } + } + } + }, + "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/CreateChannelRequest" + }, + "example": { + "team_id": 3521074710131, + "channel_name": "Production Alerts", + "description": "Handles all production environment alerts", + "group": { + "method": "p", + "time_window": 10, + "window_type": "tumbling" + }, + "auto_resolve_timeout": 86400, + "auto_resolve_mode": "trigger" + } + } + } + } + } + }, + "/status-page/subscriber/list": { + "get": { + "operationId": "statusPageSubscriberList", + "summary": "List status page subscribers", + "description": "List subscribers who have signed up for status page notifications.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/status-pages/status-page-subscriber-list", + "metadata": { + "sidebarTitle": "List status page subscribers" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageSubscriberListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 2, + "has_next_page": false, + "items": [ + { + "recipient": "alice@example.com", + "method": "email", + "components": [], + "all": true, + "locale": "zh-CN" + }, + { + "recipient": "bob@example.com", + "method": "email", + "components": [], + "all": true, + "locale": "en-US" + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Status page ID." + }, + { + "name": "component_ids", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Comma-separated component IDs to filter subscribers by." + }, + { + "name": "p", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "default": 1 + }, + "description": "Page number (1-based)." + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 100, + "default": 10 + }, + "description": "Page size (1-100)." + } + ] + } + }, + "/incident/info": { + "post": { + "operationId": "incidentInfo", + "summary": "Get incident detail", + "description": "Retrieve detailed information for a single incident including timeline, alerts, responders and custom fields.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-info", + "metadata": { + "sidebarTitle": "Get incident detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/IncidentInfo" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "incident_id": "69da451ef77b1b51f40e83ee", + "account_id": 2451002751131, + "channel_id": 2551105804131, + "integration_id": 2490562293131, + "integration_ids": [ + 2490562293131 + ], + "integration_types": [ + "monit.alert" + ], + "dedup_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata", + "equals_md5": "", + "start_time": 1775912219, + "end_time": 0, + "last_time": 1775969819, + "ack_time": 0, + "close_time": 0, + "creator_id": 0, + "closer_id": 0, + "owner_id": 0, + "incident_status": "Critical", + "incident_severity": "Critical", + "progress": "Triggered", + "title": "CPU usage high - web-server-01", + "description": "", + "ai_summary": "", + "impact": "", + "root_cause": "", + "resolution": "", + "num": "0E83EE", + "frequency": "frequent", + "created_at": 1775912222, + "updated_at": 1775972145, + "snoozed_before": 0, + "group_method": "n", + "ever_muted": false, + "labels": { + "check": "cpu_usage_high", + "resource": "web-server-01", + "env": "production" + }, + "fields": {}, + "assigned_to": { + "person_ids": [ + 2476444212131 + ], + "escalate_rule_id": "000000000000000000000000", + "layer_idx": 0, + "type": "assign", + "assigned_at": 1775972128, + "id": "MvQfH9Dc8eNS8k79jmrWn6", + "escalate_rule_name": "" + }, + "alert_cnt": 1, + "active_alert_cnt": 1, + "alert_event_cnt": 17, + "responders": [ + { + "person_id": 2476444212131, + "assigned_at": 1775972128, + "acknowledged_at": 0 + } + ], + "account_name": "", + "account_locale": "", + "account_time_zone": "", + "channel_name": "Ops Channel", + "channel_status": "enabled", + "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee", + "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee", + "integration_type": "monit.alert", + "post_mortem_id": "", + "images": null, + "manual_overrides": [ + "title" + ] + } + } + } + } + }, + "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/IncidentInfoRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee" + } + } + } + } + } + }, + "/channel/notify/rule/disable": { + "post": { + "operationId": "channelNotifyRuleDisable", + "summary": "Disable channel notification rule", + "description": "Disable a channel notification rule without deleting it.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-notify-rule-disable", + "metadata": { + "sidebarTitle": "Disable channel notification rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/enrichment/mapping/schema/info": { + "post": { + "operationId": "mapping-schema-read-info", + "summary": "Get mapping schema detail", + "description": "Return detail of a single mapping schema by its ID.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- Returns `null` if the schema does not exist.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-read-info", + "metadata": { + "sidebarTitle": "Get mapping schema detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingSchemaItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "schema_name": "CMDB Lookup", + "description": "Enrich alerts with CMDB data", + "source_labels": [ + "host" + ], + "result_labels": [ + "owner", + "team", + "service" + ], + "status": "enabled", + "team_id": 0, + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + } + } + } + }, + "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/MappingSchemaIDRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + } + } + } + } + } + }, + "/status-page/subscriber/import": { + "post": { + "operationId": "statusPageSubscriberImport", + "summary": "Import subscribers", + "description": "Bulk import subscribers for a status page.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **20 requests/minute**; **2 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-subscriber-import", + "metadata": { + "sidebarTitle": "Import subscribers" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportStatusPageSubscribersRequest" + }, + "example": { + "page_id": 5750613685214, + "method": "email", + "subscribers": [ + { + "recipient": "alice@example.com", + "all": true, + "locale": "en-US" + }, + { + "recipient": "bob@example.com", + "component_ids": [ + "01KC3GAZ6ZJE40H55GM31RPWZE" + ], + "all": false, + "locale": "zh-CN" + } + ] + } + } + } + } + } + }, + "/alert-event/list": { + "post": { + "operationId": "alert-event-read-list", + "summary": "List raw alert events", + "description": "Return a cursor-paginated list of raw alert events across all alerts, with filtering by integration, channel, time range, and severity.", + "tags": [ + "On-call/Alerts" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Results are filtered by the caller's channel data-access permissions.\n- `severities` is a comma-separated string, e.g. `\"Critical,Warning\"`.", + "href": "/en/api-reference/on-call/alerts/alert-event-read-list", + "metadata": { + "sidebarTitle": "List raw alert events" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertEventGlobalListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "has_next_page": false, + "items": [ + { + "event_id": "663a1b2c3d4e5f6789abc001", + "alert_id": "663a1b2c3d4e5f6789abcdef", + "title": "CPU usage > 90%", + "event_severity": "Critical", + "event_time": 1712650000 + } + ] + } + } + } + } + }, + "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/AlertEventGlobalListRequest" + }, + "example": { + "start_time": 1712620800, + "end_time": 1712707200, + "limit": 20, + "severities": "Critical" + } + } + } + } + } + }, + "/calendar/event/delete": { + "post": { + "operationId": "calEventDelete", + "summary": "Delete calendar event", + "description": "Delete a calendar event by calendar ID and event ID.", + "tags": [ + "On-call/Calendars" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/calendars/cal-event-delete", + "metadata": { + "sidebarTitle": "Delete calendar event" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CalEventIDRequest" + }, + "example": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4" + } + } + } + } + } + }, + "/alert/pipeline/list": { + "post": { + "operationId": "alert-read-pipeline-list", + "summary": "List alert pipelines", + "description": "Return the alert processing pipelines configured for multiple integrations.", + "tags": [ + "On-call/Alerts" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |\n\n## Usage\n\n- All `integration_ids` must be accessible to the caller.", + "href": "/en/api-reference/on-call/alerts/alert-read-pipeline-list", + "metadata": { + "sidebarTitle": "List alert pipelines" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertPipelineListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "integration_id": 10001, + "rules": [], + "status": "enabled", + "creator_id": 80011, + "updated_by": 80011, + "created_at": 1710000000, + "updated_at": 1712000000 + } + ] + } + } + } + } + }, + "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/AlertPipelineListRequest" + }, + "example": { + "integration_ids": [ + 10001, + 10002 + ] + } + } + } + } + } + }, + "/incident/post-mortem/info": { + "get": { + "operationId": "incidentPostMortemInfo", + "summary": "Get post-mortem", + "description": "Retrieve the post-mortem report for a specific incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-post-mortem-info", + "metadata": { + "sidebarTitle": "Get post-mortem" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PostMortemItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "meta": { + "account_id": 2451002751131, + "title": "Postmortem1", + "status": "published", + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "template_id": "post_mortem_default_tmpl_en-us", + "incident_ids": [ + "69bb9233331067560c718ecd" + ], + "media_count": 0, + "author_ids": [ + 2477273692131 + ], + "team_id": 2477033058131, + "channel_id": 3047621227131, + "is_private": false, + "channel_name": "Ops Channel", + "created_at_seconds": 1773900354, + "updated_at_seconds": 1773909012 + }, + "basics": { + "incidents_highest_severity": "Warning", + "incidents_earliest_start_seconds": 1761133512, + "incidents_latest_close_seconds": 1761133632, + "incidents_total_duration_seconds": 120, + "responders": [ + { + "person_id": 3790925372131, + "assigned_at": 1761133515, + "acknowledged_at": 0 + } + ] + }, + "content": { + "content": "{\"type\":\"doc\",\"content\":[]}" + }, + "follow_ups": "" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "parameters": [ + { + "name": "post_mortem_id", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "description": "Post-mortem ID. Deterministic hash derived from account ID and the set of linked incident IDs." + } + ] + } + }, + "/calendar/event/list": { + "post": { + "operationId": "calEventList", + "summary": "List calendar events", + "description": "Return events for a personal calendar within a year/month/day scope. When month and day are both omitted the whole year is returned.", + "tags": [ + "On-call/Calendars" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/calendars/cal-event-list", + "metadata": { + "sidebarTitle": "List calendar events" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalEventListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "creator_id": 2476444212131, + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4", + "summary": "Test Holiday", + "description": "A test holiday event", + "start_at": "2026-05-01", + "end_at": "2026-05-02", + "is_off": true, + "created_at": 1775972034, + "updated_at": 1775972034 + }, + { + "account_id": 2451002751131, + "creator_id": 2451002751131, + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "event_id": "non_work.20260502", + "summary": "non-working day (Saturday)", + "description": "", + "start_at": "2026-05-02", + "end_at": "2026-05-03", + "is_off": true, + "created_at": 0, + "updated_at": 0 + } + ], + "total": 11 + } + } + } + } + }, + "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/CalEventListRequest" + }, + "example": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "year": 2024, + "month": 5 + } + } + } + } + } + }, + "/status-page/change/timeline/create": { + "post": { + "operationId": "statusPageChangeTimelineCreate", + "summary": "Create event timeline entry", + "description": "Add a timeline update to a status page event.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-timeline-create", + "metadata": { + "sidebarTitle": "Create event timeline entry" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageChangeTimelineCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "update_id": "01KP0311872NVYFRRQ82FWXAP4" + } + } + } + } + }, + "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/CreateStatusPageChangeTimelineRequest" + }, + "example": { + "page_id": 5750613685214, + "change_id": 5821693893131, + "status": "identified", + "description": "We have identified the root cause and are working on a fix.", + "at_seconds": 1712003600, + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "status": "partial_outage" + } + ] + } + } + } + } + } + }, + "/incident/disable-merge": { + "post": { + "operationId": "incidentDisableMerge", + "summary": "Disable incident merge", + "description": "Disable automatic merging for a specific incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-disable-merge", + "metadata": { + "sidebarTitle": "Disable incident merge" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DisableIncidentMergeRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] + } + } + } + } + } + }, + "/status-page/migration/cancel": { + "post": { + "operationId": "statusPageMigrationCancel", + "summary": "Cancel status page migration", + "description": "Cancel an in-progress status page migration job. Only jobs currently in the `running` state can be cancelled.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-migration-cancel", + "metadata": { + "sidebarTitle": "Cancel status page migration" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CancelStatusPageMigrationRequest" + }, + "example": { + "job_id": "01KP0311872NVYFRRQ82FW0001" + } + } + } + } + } + }, + "/enrichment/upsert": { + "post": { + "operationId": "enrichment-write-upsert", + "summary": "Upsert enrichment rules", + "description": "Create or fully replace the enrichment rule set for an integration. The entire `rules` array is replaced atomically.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- Enrichment rules are evaluated in order.\n- Each rule has a `kind`: `extraction` (regex/gjson extraction), `composition` (template-based label composition), `mapping` (lookup via mapping schema or API), or `drop` (remove labels).\n- The optional `if` field is an `AndFilters` condition: if it does not match, the rule is skipped.\n- For `kind: extraction`: `source_field` must be `title`, `description`, or a `labels.*` key; specify exactly one of `pattern` (regex with named group `result`) or `g_json` (GJson path).\n- For `kind: composition`: `template` uses Go text/template syntax referencing `labels.*` keys.\n- For `kind: mapping`: `mapping_type` is `schema` (default) or `api`; provide `schema_id` or `api_id` accordingly.\n- For `kind: drop`: `drop_labels` lists the label keys to remove.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/alert-enrichment/enrichment-write-upsert", + "metadata": { + "sidebarTitle": "Upsert enrichment rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnrichmentUpsertRequest" + }, + "example": { + "integration_id": 5001, + "rules": [ + { + "kind": "extraction", + "settings": { + "source_field": "labels.env", + "result_label": "environment", + "pattern": "(?Pprod|staging|dev)", + "override": true + } + }, + { + "kind": "composition", + "settings": { + "result_label": "full_env", + "template": "{{.labels.region}}-{{.labels.environment}}", + "override": false + } + } + ] + } + } + } + } + } + }, + "/alert/list-by-ids": { + "post": { + "operationId": "alert-read-list-by-ids", + "summary": "List alerts by IDs", + "description": "Return the details of multiple alerts by their IDs in a single request.", + "tags": [ + "On-call/Alerts" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- All provided `alert_ids` must belong to the caller's account; any invalid ID causes the entire request to fail.", + "href": "/en/api-reference/on-call/alerts/alert-read-list-by-ids", + "metadata": { + "sidebarTitle": "List alerts by IDs" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "has_next_page": false, + "items": [ + { + "alert_id": "663a1b2c3d4e5f6789abcdef", + "title": "CPU usage > 90%" + } + ] + } + } + } + } + }, + "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/AlertListByIDsRequest" + }, + "example": { + "alert_ids": [ + "663a1b2c3d4e5f6789abcdef" + ] + } + } + } + } + } + }, + "/channel/escalate/rule/enable": { + "post": { + "operationId": "channelEscalateRuleEnable", + "summary": "Enable escalation rule", + "description": "Enable a disabled escalation rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-escalate-rule-enable", + "metadata": { + "sidebarTitle": "Enable escalation rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/incident/list": { + "post": { + "operationId": "incidentList", + "summary": "List incidents", + "description": "Query a paginated list of incidents with filters by channel, severity, status, responder, and time range.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-list", + "metadata": { + "sidebarTitle": "List incidents" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/IncidentListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 88, + "has_next_page": true, + "search_after_ctx": "69da451ef77b1b51f40e83eb", + "items": [ + { + "incident_id": "69da451ef77b1b51f40e83ee", + "account_id": 2451002751131, + "channel_id": 2551105804131, + "integration_id": 2490562293131, + "integration_ids": [ + 2490562293131 + ], + "integration_types": [ + "monit.alert" + ], + "dedup_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata", + "equals_md5": "", + "start_time": 1775912219, + "end_time": 0, + "last_time": 1775969819, + "ack_time": 0, + "close_time": 0, + "creator_id": 0, + "closer_id": 0, + "owner_id": 0, + "incident_status": "Critical", + "incident_severity": "Critical", + "progress": "Triggered", + "title": "CPU usage high - web-server-01", + "description": "", + "ai_summary": "", + "impact": "", + "root_cause": "", + "resolution": "", + "num": "0E83EE", + "frequency": "frequent", + "created_at": 1775912222, + "updated_at": 1775972145, + "snoozed_before": 0, + "group_method": "n", + "ever_muted": false, + "labels": { + "check": "cpu_usage_high", + "resource": "web-server-01", + "env": "production" + }, + "fields": {}, + "assigned_to": { + "person_ids": [ + 2476444212131 + ], + "escalate_rule_id": "000000000000000000000000", + "layer_idx": 0, + "type": "assign", + "assigned_at": 1775972128, + "id": "MvQfH9Dc8eNS8k79jmrWn6", + "escalate_rule_name": "" + }, + "alert_cnt": 1, + "active_alert_cnt": 1, + "alert_event_cnt": 17, + "responders": [ + { + "person_id": 2476444212131, + "assigned_at": 1775972128, + "acknowledged_at": 0 + } + ], + "account_name": "", + "account_locale": "", + "account_time_zone": "", + "channel_name": "Ops Channel", + "channel_status": "enabled", + "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee", + "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee", + "integration_type": "monit.alert", + "post_mortem_id": "", + "images": null, + "manual_overrides": [ + "title" + ] + } + ] + } + } + } + } + }, + "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/ListIncidentsRequest" + }, + "example": { + "start_time": 1711900800, + "end_time": 1712000000, + "progress": "Triggered,Processing", + "incident_severity": "Critical,Warning", + "channel_ids": [ + 2551105804131 + ], + "limit": 20, + "p": 1 + } + } + } + } + } + }, + "/insight/alert/topk-by-label": { + "post": { + "operationId": "insightTopkAlertsByLabel", + "summary": "Get top-K alerts grouped by check or resource", + "description": "Return the top-K alert groups aggregated either by `check` or by `resource` label over the specified time range.", + "tags": [ + "On-call/Analytics" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/analytics/insight-topk-alerts-by-label", + "metadata": { + "sidebarTitle": "Get top-K alerts grouped by check or resource" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/InsightAlertByLabelResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "label": "cpu-high", + "total_alert_cnt": 312, + "total_alert_event_cnt": 987 + }, + { + "label": "disk-full", + "total_alert_cnt": 178, + "total_alert_event_cnt": 452 + }, + { + "label": "memory-oom", + "total_alert_cnt": 94, + "total_alert_event_cnt": 231 + } + ] + } + } + } + } + }, + "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/InsightTopkAlertByLabelRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "label": "check", + "k": 10, + "orderby": "total_alert_cnt" + } + } + } + } + } + }, + "/enrichment/list": { + "post": { + "operationId": "enrichment-read-list", + "summary": "List enrichment rules", + "description": "Return the enrichment rule sets for a list of integration IDs.", + "tags": [ + "On-call/Alert enrichment" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/alert-enrichment/enrichment-read-list", + "metadata": { + "sidebarTitle": "List enrichment rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EnrichmentListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "integration_id": 5001, + "rules": [], + "status": "enabled", + "updated_by": 80011, + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + ] + } + } + } + } + }, + "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/EnrichmentListRequest" + }, + "example": { + "integration_ids": [ + 5001, + 5002 + ] + } + } + } + } + } + }, + "/channel/silence/rule/disable": { + "post": { + "operationId": "channelSilenceRuleDisable", + "summary": "Disable silence rule", + "description": "Disable a silence rule without deleting it.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-silence-rule-disable", + "metadata": { + "sidebarTitle": "Disable silence rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/incident/custom-action/do": { + "post": { + "operationId": "incidentCustomActionDo", + "summary": "Execute custom action", + "description": "Execute a custom action configured for an incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-custom-action-do", + "metadata": { + "sidebarTitle": "Execute custom action" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DoIncidentCustomActionResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "message": "" + } + } + } + } + }, + "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/DoIncidentCustomActionRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "integration_id": 2490562293131 + } + } + } + } + } + }, + "/alert/feed": { + "post": { + "operationId": "alert-read-feed", + "summary": "List alert activity feed", + "description": "Return the activity feed (comments, state changes, merges, silence events) for a single alert, with page-based pagination.", + "tags": [ + "On-call/Alerts" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Use `p` (page number, starting at 1) and `limit` (max 100, default 20) for pagination.\n- Set `asc` to `true` for chronological order.\n- Use `types` to filter by specific feed types (e.g. `alert_comment`, `alert_merge`).", + "href": "/en/api-reference/on-call/alerts/alert-read-feed", + "metadata": { + "sidebarTitle": "List alert activity feed" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertFeedResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "has_next_page": false, + "items": [ + { + "ref_id": "663a1b2c3d4e5f6789abcdef", + "type": "alert_comment", + "detail": { + "comment": "Investigating now." + }, + "creator_id": 80011, + "created_at": 1712651000 + } + ] + } + } + } + } + }, + "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/AlertFeedRequest" + }, + "example": { + "alert_id": "663a1b2c3d4e5f6789abcdef", + "limit": 20, + "asc": false + } + } + } + } + } + }, + "/insight/responder/export": { + "post": { + "operationId": "insightResponderExport", + "summary": "Export responder insight", + "description": "Export responder insight metrics as a CSV file. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope.", + "tags": [ + "On-call/Analytics" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/analytics/insight-responder-export", + "metadata": { + "sidebarTitle": "Export responder insight" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "responder_ids": [ + 3790925372131 + ], + "severities": [ + "Critical", + "Warning" + ] + } + } + } + } + } + }, + "/incident/list-by-ids": { + "post": { + "operationId": "incidentListByIds", + "summary": "List incidents by IDs", + "description": "Retrieve multiple incidents by their IDs in a single request.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-list-by-ids", + "metadata": { + "sidebarTitle": "List incidents by IDs" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/IncidentListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 2, + "has_next_page": false, + "items": [ + { + "incident_id": "69da451ef77b1b51f40e83ee", + "account_id": 2451002751131, + "channel_id": 2551105804131, + "integration_id": 2490562293131, + "integration_ids": [ + 2490562293131 + ], + "integration_types": [ + "monit.alert" + ], + "dedup_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata", + "equals_md5": "", + "start_time": 1775912219, + "end_time": 0, + "last_time": 1775969819, + "ack_time": 0, + "close_time": 0, + "creator_id": 0, + "closer_id": 0, + "owner_id": 0, + "incident_status": "Critical", + "incident_severity": "Critical", + "progress": "Triggered", + "title": "CPU usage high - web-server-01", + "description": "", + "ai_summary": "", + "impact": "", + "root_cause": "", + "resolution": "", + "num": "0E83EE", + "frequency": "frequent", + "created_at": 1775912222, + "updated_at": 1775972145, + "snoozed_before": 0, + "group_method": "n", + "ever_muted": false, + "labels": {}, + "fields": {}, + "assigned_to": { + "escalate_rule_id": "000000000000000000000000", + "layer_idx": 0, + "type": "", + "assigned_at": 0, + "id": "", + "escalate_rule_name": "" + }, + "alert_cnt": 1, + "active_alert_cnt": 1, + "alert_event_cnt": 17, + "responders": [], + "account_name": "", + "account_locale": "", + "account_time_zone": "", + "channel_name": "Ops Channel", + "channel_status": "enabled", + "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee", + "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee", + "integration_type": "monit.alert", + "post_mortem_id": "", + "images": null, + "manual_overrides": null + } + ] + } + } + } + } + }, + "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/ListIncidentsByIdsRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee", + "69da451ef77b1b51f40e83ef" + ] + } + } + } + } + } + }, + "/incident/post-mortem/list": { + "post": { + "operationId": "incidentPostMortemList", + "summary": "List post-mortems", + "description": "List post-mortem reports with optional filters.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-post-mortem-list", + "metadata": { + "sidebarTitle": "List post-mortems" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListPostMortemsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 3, + "has_next_page": false, + "items": [ + { + "account_id": 2451002751131, + "title": "Postmortem1", + "status": "published", + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "template_id": "post_mortem_default_tmpl_en-us", + "incident_ids": [ + "69bb9233331067560c718ecd" + ], + "media_count": 0, + "author_ids": [ + 2477273692131 + ], + "team_id": 2477033058131, + "channel_id": 3047621227131, + "is_private": false, + "channel_name": "Ops Channel", + "created_at_seconds": 1773900354, + "updated_at_seconds": 1773909012 + } + ] + } + } + } + } + }, + "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/ListPostMortemsRequest" + }, + "example": { + "status": "published", + "p": 1, + "limit": 20 + } + } + } + } + } + }, + "/enrichment/mapping/api/list": { + "post": { + "operationId": "mapping-api-read-list", + "summary": "List mapping APIs", + "description": "Return all mapping APIs configured for the account.", + "tags": [ + "On-call/Alert enrichment" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-read-list", + "metadata": { + "sidebarTitle": "List mapping APIs" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingAPIListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "items": [ + { + "api_id": "665f1a2b3c4d5e6f7a8b9c02", + "api_name": "CMDB API", + "description": "Query CMDB for host metadata", + "url": "https://cmdb.example.com/api/lookup", + "headers": { + "X-Token": "***" + }, + "timeout": 2, + "retry_count": 1, + "insecure_skip_verify": false, + "status": "enabled", + "team_id": 0, + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + ] + } + } + } + } + }, + "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/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/incident/unack": { + "post": { + "operationId": "incidentUnack", + "summary": "Unacknowledge incident", + "description": "Remove the acknowledge status from an incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-unack", + "metadata": { + "sidebarTitle": "Unacknowledge incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnackIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] + } + } + } + } + } + }, + "/enrichment/mapping/schema/update": { + "post": { + "operationId": "mapping-schema-write-update", + "summary": "Update mapping schema", + "description": "Update the name, description, or owning team of a mapping schema. Source and result labels cannot be changed after creation.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- Only the schema creator, account admin, or team member can update the schema.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-write-update", + "metadata": { + "sidebarTitle": "Update mapping schema" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingSchemaUpdateRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "schema_name": "CMDB Lookup v2", + "description": "Updated description" + } + } + } + } + } + }, + "/schedule/create": { + "post": { + "operationId": "scheduleCreate", + "summary": "Create schedule", + "description": "Create a new on-call schedule (escalation rule schedule).", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/schedules/schedule-create", + "metadata": { + "sidebarTitle": "Create schedule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleIDResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "schedule_id": 6294534917601 + } + } + } + } + }, + "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/ScheduleUpsertRequest" + }, + "example": { + "schedule_name": "Production On-Call", + "description": "Primary on-call rotation for the production team", + "team_id": 4291079133131, + "layers": [ + { + "layer_name": "Layer 1", + "name": "Layer 1", + "mode": 0, + "weight": 0, + "hidden": 0, + "groups": [ + { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 0, + "end": 0 + }, + { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2476123212131 + ] + } + ], + "start": 0, + "end": 0 + } + ], + "rotation_unit": "day", + "rotation_value": 1, + "rotation_duration": 86400, + "handoff_time": 0, + "enable_time": 1712000000, + "expire_time": 0, + "restrict_mode": 0, + "restrict_start": 0, + "restrict_end": 0, + "restrict_periods": [], + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "fair_rotation": false, + "mask_continuous_enabled": false + } + ], + "notify": { + "advance_in_time": 300, + "fixed_time": null, + "by": { + "follow_preference": true, + "personal_channels": null + }, + "webhooks": null + } + } + } + } + } + } + }, + "/insight/channel": { + "post": { + "operationId": "insightByChannel", + "summary": "Get channel insight", + "description": "Return insight metrics aggregated by channel.", + "tags": [ + "On-call/Analytics" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/analytics/insight-by-channel", + "metadata": { + "sidebarTitle": "Get channel insight" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DimensionInsightResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "ts": 1740844800, + "channel_id": 4321322010131, + "channel_name": "Production Alerts", + "total_incident_cnt": 2, + "total_incidents_acknowledged": 2, + "total_incidents_closed": 2, + "total_incidents_auto_closed": 0, + "total_incidents_manually_closed": 2, + "total_incidents_timeout_closed": 0, + "total_incidents_escalated": 0, + "total_incidents_manually_escalated": 0, + "total_incidents_timeout_escalated": 0, + "total_incidents_reassigned": 2, + "total_interruptions": 3, + "total_notifications": 6, + "total_engaged_seconds": 3317709, + "total_seconds_to_ack": 3317709, + "total_seconds_to_close": 3749514, + "mean_seconds_to_ack": 1658854.5, + "mean_seconds_to_close": 1874757, + "noise_reduction_pct": 0, + "acknowledgement_pct": 100, + "total_alert_cnt": 0, + "total_alert_event_cnt": 0 + } + ] + } + } + } + } + }, + "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/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "channel_ids": [ + 4321322010131 + ], + "aggregate_unit": "day" + } + } + } + } + } + }, + "/channel/delete": { + "post": { + "operationId": "channelDelete", + "summary": "Delete channel", + "description": "Delete a channel and all associated configuration.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-delete", + "metadata": { + "sidebarTitle": "Delete channel" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelIDRequest" + }, + "example": { + "channel_id": 3521074710131 + } + } + } + } + } + }, + "/channel/unsubscribe/rule/create": { + "post": { + "operationId": "channelUnsubscribeRuleCreate", + "summary": "Create drop rule", + "description": "Create a drop rule to filter out unwanted alerts before they become incidents.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-create", + "metadata": { + "sidebarTitle": "Create drop rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "rule_id": "69db2f6ba0fe7db6448b1505", + "rule_name": "Test drop rule" + } + } + } + } + }, + "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/CreateDropRuleRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_name": "Drop test environment alerts", + "description": "Discard all alerts from the test environment before they create incidents", + "filters": [ + [ + { + "key": "labels.env", + "oper": "IN", + "vals": [ + "test", + "dev" + ] + } + ] + ] + } + } + } + } + } + }, + "/channel/inhibit/rule/update": { + "post": { + "operationId": "channelInhibitRuleUpdate", + "summary": "Update inhibit rule", + "description": "Update an existing inhibit rule configuration.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-update", + "metadata": { + "sidebarTitle": "Update inhibit rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateInhibitRuleRequest" + }, + "example": { + "channel_id": 1001, + "rule_id": "6621b23f4a2c5e0012ab34ce", + "rule_name": "Suppress downstream", + "equals": [ + "labels.cluster" + ] + } + } + } + } + } + }, + "/alert/merge": { + "post": { + "operationId": "alert-write-merge", + "summary": "Merge alerts into an incident", + "description": "Associate one or more alerts with an existing incident. If a source alert previously belonged to a different incident and that incident becomes empty after the merge, it will be automatically closed.", + "tags": [ + "On-call/Alerts" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- All `alert_ids` and the `incident_id` must belong to the caller's account.\n- Optionally set `title` and `owner_id` to update the target incident at the same time.", + "href": "/en/api-reference/on-call/alerts/alert-write-merge", + "metadata": { + "sidebarTitle": "Merge alerts into an incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlertMergeRequest" + }, + "example": { + "alert_ids": [ + "663a1b2c3d4e5f6789abcdef" + ], + "incident_id": "663a000000000000deadbeef" + } + } + } + } + } + }, + "/status-page/change/timeline/update": { + "post": { + "operationId": "statusPageChangeTimelineUpdate", + "summary": "Update event timeline entry", + "description": "Update a timeline entry for a status page event.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-timeline-update", + "metadata": { + "sidebarTitle": "Update event timeline entry" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateStatusPageChangeTimelineRequest" + }, + "example": { + "page_id": 5750613685214, + "change_id": 5821693893131, + "update_id": "01KP0311872NVYFRRQ82FWXAP4", + "description": "Corrected description: root cause identified in database layer.", + "at_seconds": 1712003600 + } + } + } + } + } + }, + "/incident/reopen": { + "post": { + "operationId": "incidentReopen", + "summary": "Reopen incident", + "description": "Reopen a previously resolved incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-reopen", + "metadata": { + "sidebarTitle": "Reopen incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReopenIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ], + "reason": "Monitoring detected the issue recurred after the initial fix." + } + } + } + } + } + }, + "/incident/comment": { + "post": { + "operationId": "incidentComment", + "summary": "Add comment to incident", + "description": "Add a text comment to the incident timeline.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-comment", + "metadata": { + "sidebarTitle": "Add comment to incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ], + "comment": "Identified the root cause. Rolling back the deployment now." + } + } + } + } + } + }, + "/enrichment/mapping/data/download": { + "post": { + "operationId": "mapping-data-read-download", + "summary": "Download mapping data as CSV", + "description": "Export all data rows of a mapping schema as a CSV file download.", + "tags": [ + "On-call/Alert enrichment" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The response is a CSV file with `Content-Disposition: attachment` header.\n- The CSV header row matches the schema's source and result labels in order.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-read-download", + "metadata": { + "sidebarTitle": "Download mapping data as CSV" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CsvFileResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": "host,owner,team,service\nserver01,alice,sre,api\n" + } + } + } + }, + "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/MappingSchemaIDRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + } + } + } + } + } + }, + "/channel/unsubscribe/rule/list": { + "post": { + "operationId": "channelUnsubscribeRuleList", + "summary": "List drop rules", + "description": "List drop rules for a channel.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-list", + "metadata": { + "sidebarTitle": "List drop rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListDropRulesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "channel_id": 5967964835131, + "priority": 0, + "rule_name": "Drop test alerts", + "description": "", + "filters": [ + [ + { + "key": "data_source_id", + "oper": "IN", + "vals": [ + "6113996590131" + ] + } + ] + ], + "status": "enabled", + "rule_id": "69bcc530b9e63df36603e421", + "updated_by": 3790925372131, + "created_at": 1773978928, + "updated_at": 1773978928 + } + ] + } + } + } + } + }, + "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/ChannelScopedListRequest" + }, + "example": { + "channel_id": 1001 + } + } + } + } + } + }, + "/route/list": { + "post": { + "operationId": "routeList", + "summary": "List routing rules", + "description": "Return routing rules for the specified integrations. Integrations without a configured rule are omitted from the response.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/route-list", + "metadata": { + "sidebarTitle": "List routing rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListRoutesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "integration_id": 6113996590131, + "cases": [ + { + "if": [ + { + "key": "labels.check", + "oper": "IN", + "vals": [ + "cpu.idle<20%" + ] + } + ], + "channel_ids": [ + 2533748993131 + ], + "fallthrough": false, + "routing_mode": "standard" + } + ], + "default": { + "channel_ids": [ + 3521074710131 + ] + }, + "status": "enabled", + "version": 6, + "updated_by": 3790925372131, + "creator_id": 3790925372131, + "created_at": 1774606136, + "updated_at": 1774606136 + } + ] + } + } + } + } + }, + "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/ListRoutesRequest" + }, + "example": { + "integration_ids": [ + 6113996590131, + 6113996590132 + ] + } + } + } + } + } + }, + "/channel/list": { + "post": { + "operationId": "channelList", + "summary": "List channels", + "description": "List channels accessible to the current user with optional filters.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-list", + "metadata": { + "sidebarTitle": "List channels" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListChannelsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 42, + "has_next_page": true, + "items": [ + { + "channel_id": 1001, + "channel_name": "Production Alerts", + "status": "enabled" + } + ] + } + } + } + } + }, + "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/ListChannelsRequest" + }, + "example": { + "p": 1, + "limit": 20, + "orderby": "created_at", + "asc": false + } + } + } + } + } + }, + "/channel/escalate/rule/create": { + "post": { + "operationId": "channelEscalateRuleCreate", + "summary": "Create escalation rule", + "description": "Create an escalation rule defining who gets notified and when during an incident.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-escalate-rule-create", + "metadata": { + "sidebarTitle": "Create escalation rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "rule_id": "69db2f72a0fe7db6448b1506", + "rule_name": "Test escalation rule" + } + } + } + } + }, + "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/CreateEscalationRuleRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_name": "On-call escalation", + "template_id": "6321aad26c12104586a88916", + "description": "Notify primary on-call, then escalate to secondary after 30 minutes", + "layers": [ + { + "target": { + "person_ids": [ + 3790925372131 + ], + "by": { + "follow_preference": true + } + }, + "max_times": 3, + "notify_step": 10, + "escalate_window": 30, + "force_escalate": false + } + ] + } + } + } + } + } + }, + "/channel/update": { + "post": { + "operationId": "channelUpdate", + "summary": "Update channel", + "description": "Update an existing channel's configuration and settings.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-update", + "metadata": { + "sidebarTitle": "Update channel" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/UpdateChannelResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "external_report_token": "" + } + } + } + } + }, + "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/UpdateChannelRequest" + }, + "example": { + "channel_id": 1001, + "channel_name": "Production Alerts (v2)", + "description": "Updated description" + } + } + } + } + } + }, + "/channel/enable": { + "post": { + "operationId": "channelEnable", + "summary": "Enable channel", + "description": "Enable a disabled channel to resume incident routing.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-enable", + "metadata": { + "sidebarTitle": "Enable channel" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelIDRequest" + }, + "example": { + "channel_id": 3521074710131 + } + } + } + } + } + }, + "/channel/escalate/rule/delete": { + "post": { + "operationId": "channelEscalateRuleDelete", + "summary": "Delete escalation rule", + "description": "Delete an escalation rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-escalate-rule-delete", + "metadata": { + "sidebarTitle": "Delete escalation rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/enrichment/mapping/api/delete": { + "post": { + "operationId": "mapping-api-write-delete", + "summary": "Delete mapping API", + "description": "Delete a mapping API. Deletion is blocked if the API is referenced by any enrichment rule.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- If the API is still referenced, the response returns HTTP 400 with a `refs` list.\n- Only the API creator, account admin, or team member can delete the API.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-write-delete", + "metadata": { + "sidebarTitle": "Delete mapping API" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingAPIIDRequest" + }, + "example": { + "api_id": "665f1a2b3c4d5e6f7a8b9c02" + } + } + } + } + } + }, + "/channel/inhibit/rule/list": { + "post": { + "operationId": "channelInhibitRuleList", + "summary": "List inhibit rules", + "description": "List all inhibit rules configured for a channel.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-list", + "metadata": { + "sidebarTitle": "List inhibit rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListInhibitRulesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "channel_id": 5967964835131, + "priority": 0, + "rule_name": "Suppress downstream alerts", + "description": "", + "source_filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "target_filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "equals": [ + "data_source_id", + "labels._account_id" + ], + "is_directly_discard": false, + "status": "enabled", + "rule_id": "69bcc630b9e63df36603e425", + "updated_by": 3790925372131, + "created_at": 1773979184, + "updated_at": 1773979184 + } + ] + } + } + } + } + }, + "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/ChannelScopedListRequest" + }, + "example": { + "channel_id": 1001 + } + } + } + } + } + }, + "/enrichment/mapping/data/upload": { + "post": { + "operationId": "mapping-data-write-upload", + "summary": "Upload mapping data via CSV", + "description": "Upload a CSV file to bulk-load mapping data. By default the existing data is truncated before loading the new rows.", + "tags": [ + "On-call/Alert enrichment" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **20 requests/minute**; **2 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The request must use `Content-Type: multipart/form-data`. The file field name is `file` and `schema_id` is a query parameter.\n- CSV header row must include all source and result label names.\n- Maximum file size: 100 MB.\n- By default the schema's existing data is truncated before import. Pass query param `do_not_truncate_first=TRUE` to append instead.\n- Duplicate source label value combinations in the CSV cause a 400 error.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-write-upload", + "metadata": { + "sidebarTitle": "Upload mapping data via CSV" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingDataUploadRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + } + } + } + } + } + }, + "/alert/info": { + "post": { + "operationId": "alert-read-info", + "summary": "Get alert detail", + "description": "Return the full details of a single alert by its ID, including its associated incident and event count.", + "tags": [ + "On-call/Alerts" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- `alert_id` is an ObjectID hex string returned by `POST /alert/list` or `POST /alert-event/list`.", + "href": "/en/api-reference/on-call/alerts/alert-read-info", + "metadata": { + "sidebarTitle": "Get alert detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "alert_id": "663a1b2c3d4e5f6789abcdef", + "title": "CPU usage > 90%", + "alert_severity": "Critical", + "alert_status": "Critical", + "start_time": 1712650000, + "event_cnt": 3 + } + } + } + } + }, + "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/AlertInfoRequest" + }, + "example": { + "alert_id": "663a1b2c3d4e5f6789abcdef" + } + } + } + } + } + }, + "/channel/notify/rule/update": { + "post": { + "operationId": "channelNotifyRuleUpdate", + "summary": "Update channel notification rule", + "description": "Update an existing channel notification rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-notify-rule-update", + "metadata": { + "sidebarTitle": "Update channel notification rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/incident/assign": { + "post": { + "operationId": "incidentAssign", + "summary": "Assign incident", + "description": "Dispatch an incident to a specific escalation level or responder.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-assign", + "metadata": { + "sidebarTitle": "Assign incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssignIncidentRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "assigned_to": { + "person_ids": [ + 2476444212131 + ], + "type": "assign" + } + } + } + } + } + } + }, + "/channel/inhibit/rule/disable": { + "post": { + "operationId": "channelInhibitRuleDisable", + "summary": "Disable inhibit rule", + "description": "Disable an inhibit rule without deleting it.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-disable", + "metadata": { + "sidebarTitle": "Disable inhibit rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/calendar/info": { + "post": { + "operationId": "calendarInfo", + "summary": "Get calendar info", + "description": "Return details of a service calendar.", + "tags": [ + "On-call/Calendars" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/calendars/calendar-info", + "metadata": { + "sidebarTitle": "Get calendar info" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_id": 2451002751131, + "team_id": 2477033058131, + "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg", + "cal_name": "Stock Exchange Calendar", + "description": "A stock market trading calendar example", + "timezone": "Asia/Shanghai", + "kind": "personal", + "workdays": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], + "created_at": 1702455630, + "updated_at": 1775529526, + "creator_id": 2476444212131, + "updated_by": 3790925372131, + "status": "enabled" + } + } + } + } + }, + "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/CalendarIDRequest" + }, + "example": { + "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg" + } + } + } + } + } + }, + "/channel/silence/rule/create": { + "post": { + "operationId": "channelSilenceRuleCreate", + "summary": "Create silence rule", + "description": "Create a silence rule to suppress notifications matching specified conditions.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-silence-rule-create", + "metadata": { + "sidebarTitle": "Create silence rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "rule_id": "69db2f66a0fe7db6448b1503", + "rule_name": "Test silence rule" + } + } + } + } + }, + "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/CreateSilenceRuleRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_name": "Maintenance window silence", + "description": "Silence all Info alerts during planned maintenance", + "time_filter": { + "start_time": 1773388800, + "end_time": 1773414000 + }, + "filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "is_directly_discard": false + } + } + } + } + } + }, + "/channel/silence/rule/delete": { + "post": { + "operationId": "channelSilenceRuleDelete", + "summary": "Delete silence rule", + "description": "Delete a silence rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-silence-rule-delete", + "metadata": { + "sidebarTitle": "Delete silence rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/status-page/migrate-structure": { + "post": { + "operationId": "statusPageMigrateStructure", + "summary": "Migrate status page structure", + "description": "Start a migration job that imports the structure and historical events of an Atlassian Statuspage into a new Flashduty status page.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-migrate-structure", + "metadata": { + "sidebarTitle": "Migrate status page structure" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageMigrationStartResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "job_id": "01KP0311872NVYFRRQ82FW0001" + } + } + } + } + }, + "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/MigrateStatusPageStructureRequest" + }, + "example": { + "api_key": "sk-stsp-xxxxxxxxxxxxxxxxxxxx", + "source_page_id": "abcdefghij" + } + } + } + } + } + }, + "/status-page/migrate-email-subscribers": { + "post": { + "operationId": "statusPageMigrateEmailSubscribers", + "summary": "Migrate email subscribers", + "description": "Start a migration job that imports email subscribers from an Atlassian Statuspage into an existing Flashduty status page.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-migrate-email-subscribers", + "metadata": { + "sidebarTitle": "Migrate email subscribers" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageMigrationStartResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "job_id": "01KP0311872NVYFRRQ82FW0002" + } + } + } + } + }, + "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/MigrateStatusPageEmailSubscribersRequest" + }, + "example": { + "api_key": "sk-stsp-xxxxxxxxxxxxxxxxxxxx", + "source_page_id": "abcdefghij", + "target_page_id": 5750613685214 + } + } + } + } + } + }, + "/template/create": { + "post": { + "operationId": "template-write-create", + "summary": "Create a template", + "description": "Create a new notification template.", + "tags": [ + "On-call/Notification templates" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Templates Manage** (`on-call`) |\n\n## Usage\n\n- `template_name` must be unique within the account; duplicates return `InvalidParameter`.\n- The server validates every non-empty channel template by rendering it against a mock incident — a syntactic error in any channel fails the whole request with `InvalidParameter`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/notification-templates/template-write-create", + "metadata": { + "sidebarTitle": "Create a template" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TemplateCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "template_id": "6605a1b2c3d4e5f6a7b8c9d0", + "template_name": "Prod incident default" + } + } + } + } + }, + "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/TemplateCreateRequest" + }, + "example": { + "team_id": 0, + "template_name": "Prod incident default", + "description": "Default template for production incidents.", + "email": "Incident {{ .IncidentName }} on {{ .Severity }}", + "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}" + } + } + } + } + } + }, + "/route/info": { + "post": { + "operationId": "routeInfo", + "summary": "Get routing rule detail", + "description": "Retrieve the routing rule configuration for a specific integration. Returns null when the integration has no routing rule configured.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/route-info", + "metadata": { + "sidebarTitle": "Get routing rule detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RouteItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "cases": [ + { + "if": [ + { + "key": "labels.check", + "oper": "IN", + "vals": [ + "cpu.idle<20%" + ] + } + ], + "channel_ids": [ + 2533748993131 + ], + "fallthrough": false, + "routing_mode": "standard" + }, + { + "if": [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Warning" + ] + } + ], + "channel_ids": null, + "fallthrough": false, + "routing_mode": "name_mapping", + "name_mapping_label": "labels.service" + } + ], + "default": { + "channel_ids": [ + 3521074710131 + ] + }, + "status": "enabled", + "version": 6, + "updated_by": 3790925372131, + "creator_id": 3790925372131, + "created_at": 1774606136, + "updated_at": 1774606136 + } + } + } + } + }, + "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/RouteInfoRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/enrichment/info": { + "post": { + "operationId": "enrichment-read-info", + "summary": "Get enrichment rules", + "description": "Return the enrichment rule set configured for a specific integration.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- Returns `null` if no enrichment rules have been configured for the integration.", + "href": "/en/api-reference/on-call/alert-enrichment/enrichment-read-info", + "metadata": { + "sidebarTitle": "Get enrichment rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EnrichmentItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 5001, + "rules": [ + { + "kind": "extraction", + "settings": { + "source_field": "labels.env", + "result_label": "environment", + "pattern": "^(prod|staging|dev).*$", + "override": true + } + } + ], + "status": "enabled", + "updated_by": 80011, + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + } + } + } + }, + "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/EnrichmentInfoRequest" + }, + "example": { + "integration_id": 5001 + } + } + } + } + } + }, + "/channel/info": { + "post": { + "operationId": "channelInfo", + "summary": "Get channel detail", + "description": "Retrieve detailed information for a specific channel.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-info", + "metadata": { + "sidebarTitle": "Get channel detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ChannelItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "channel_id": 1001, + "channel_name": "Production Alerts", + "status": "enabled", + "team_id": 10 + } + } + } + } + }, + "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/ChannelInfoRequest" + }, + "example": { + "channel_id": 1001 + } + } + } + } + } + }, + "/template/list": { + "post": { + "operationId": "template-read-list", + "summary": "List templates", + "description": "Return a paginated list of notification templates.", + "tags": [ + "On-call/Notification templates" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Templates Read** (`on-call`) or **Templates Manage** (`on-call`) |\n\n## Usage\n\n- Pagination defaults to page 1 with 20 rows. The response's `has_next_page` tells you whether another page exists without needing a separate count request.\n- When `is_my_team` is `true`, `team_ids` is ignored.", + "href": "/en/api-reference/on-call/notification-templates/template-read-list", + "metadata": { + "sidebarTitle": "List templates" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TemplateListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 47, + "has_next_page": true, + "items": [ + { + "account_id": 10023, + "team_id": 0, + "template_id": "6605a1b2c3d4e5f6a7b8c9d0", + "template_name": "Prod incident default", + "description": "Default template for production incidents.", + "email": "Incident {{ .IncidentName }} on {{ .Severity }}", + "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}", + "voice": "", + "dingtalk": "", + "wecom": "", + "feishu": "", + "feishu_app": "", + "dingtalk_app": "", + "wecom_app": "", + "slack_app": "", + "teams_app": "", + "telegram": "", + "slack": "", + "zoom": "", + "status": "enabled", + "creator_id": 80011, + "updated_by": 80011, + "created_at": 1712700000, + "updated_at": 1712702400 + } + ] + } + } + } + } + }, + "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/TemplateListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "orderby": "updated_at", + "asc": false, + "is_my_team": false + } + } + } + } + } + }, + "/insight/responder": { + "post": { + "operationId": "insightByResponder", + "summary": "Get responder insight", + "description": "Return insight metrics aggregated by responder.", + "tags": [ + "On-call/Analytics" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/analytics/insight-by-responder", + "metadata": { + "sidebarTitle": "Get responder insight" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ResponderInsightResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "ts": 1740844800, + "responder_id": 3790925372131, + "responder_name": "alice", + "total_incident_cnt": 1, + "total_incidents_acknowledged": 1, + "total_incidents_reassigned": 0, + "total_incidents_escalated": 0, + "total_incidents_timeout_escalated": 0, + "total_incidents_manually_escalated": 0, + "total_interruptions": 1, + "total_notifications": 2, + "total_engaged_seconds": 10, + "total_seconds_to_ack": 2265624, + "mean_seconds_to_ack": 2265624, + "acknowledgement_pct": 100 + } + ] + } + } + } + } + }, + "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/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "responder_ids": [ + 3790925372131 + ], + "aggregate_unit": "day" + } + } + } + } + } + }, + "/status-page/change/list": { + "get": { + "operationId": "statusPageChangeList", + "summary": "List status page events", + "description": "List events (incidents and maintenances) for a status page.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-list", + "metadata": { + "sidebarTitle": "List status page events" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageChangeListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "change_id": 5821693893131, + "page_id": 5750613685214, + "type": "incident", + "title": "Web Console Degraded Performance", + "description": "The issue has been resolved, and all services are operating normally.", + "status": "resolved", + "affected_components": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", + "name": "Web Console", + "available_since_seconds": 1765349358, + "order_id": 1, + "status": "operational" + } + ], + "start_at_seconds": 1766736878, + "close_at_seconds": 1775529742, + "updates": [ + { + "update_id": "01KDCVJQ88SZPHWPTDV2Z2AZW8", + "at_seconds": 1766736876, + "status": "investigating", + "description": "We are currently investigating an issue affecting some services.", + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "component_name": "Web Console", + "status": "degraded" + } + ] + }, + { + "update_id": "01KNJX3KW873ZZSRZC14SGFYS3", + "at_seconds": 1775529742, + "status": "resolved", + "description": "The issue has been resolved, and all services are operating normally.", + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "component_name": "Web Console", + "status": "operational" + } + ] + } + ], + "notify_subscribers": true + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Status page ID." + }, + { + "name": "start_at_seconds", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Filter events started at or after this unix timestamp (seconds)." + }, + { + "name": "end_at_seconds", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Filter events started at or before this unix timestamp (seconds)." + }, + { + "name": "type", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "incident", + "maintenance" + ] + }, + "description": "Event type filter. Required." + }, + { + "name": "status", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ] + }, + "description": "Event status filter. Required. Must be a status valid for the given `type` (e.g. `investigating`/`identified`/`monitoring`/`resolved` for incidents; `scheduled`/`ongoing`/`completed` for maintenances)." + } + ] + } + }, + "/enrichment/mapping/api/create": { + "post": { + "operationId": "mapping-api-write-create", + "summary": "Create mapping API", + "description": "Create a new external HTTP API endpoint used to enrich alerts via HTTP lookup.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- `url` must start with `http://` or `https://` and cannot resolve to an internal IP (in SaaS mode).\n- `timeout` is the HTTP read timeout in seconds (1–3, default 2).\n- `retry_count` is the number of retries on failure (0–1, default 0).\n- Headers with security-sensitive names (e.g. `authorization`, `cookie`) are rejected in SaaS mode.\n- An account can have at most 50 mapping APIs.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-write-create", + "metadata": { + "sidebarTitle": "Create mapping API" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingAPICreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "api_id": "665f1a2b3c4d5e6f7a8b9c02", + "api_name": "CMDB API" + } + } + } + } + }, + "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/MappingAPICreateRequest" + }, + "example": { + "api_name": "CMDB API", + "description": "Query CMDB for host metadata", + "url": "https://cmdb.example.com/api/lookup", + "headers": { + "X-Token": "mytoken" + }, + "timeout": 2, + "retry_count": 1, + "insecure_skip_verify": false + } + } + } + } + } + }, + "/schedule/update": { + "post": { + "operationId": "scheduleUpdate", + "summary": "Update schedule", + "description": "Update an existing on-call schedule. Provide schedule_id to identify the schedule.", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/schedules/schedule-update", + "metadata": { + "sidebarTitle": "Update schedule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScheduleUpsertRequest" + }, + "example": { + "schedule_id": 2001, + "schedule_name": "Production On-Call (Updated)", + "description": "Updated primary on-call rotation", + "team_id": 4291079133131 + } + } + } + } + } + }, + "/template/delete": { + "post": { + "operationId": "template-write-delete", + "summary": "Delete a template", + "description": "Soft-delete a template by ID.", + "tags": [ + "On-call/Notification templates" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Templates Manage** (`on-call`) |\n\n## Usage\n\n- Fails with `400 ReferenceExist` if the template is still referenced by any channel, escalation rule, or notification subscription.\n- Deletion is soft — `deleted_at` is set. The record remains for audit, but the template stops appearing in listings.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/notification-templates/template-write-delete", + "metadata": { + "sidebarTitle": "Delete a template" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TemplateIDRequest" + }, + "example": { + "template_id": "6605a1b2c3d4e5f6a7b8c9d0" + } + } + } + } + } + }, + "/enrichment/mapping/data/upsert": { + "post": { + "operationId": "mapping-data-write-upsert", + "summary": "Upsert mapping data rows", + "description": "Insert or update up to 1000 data rows in a mapping schema. Each row must contain all source and result labels.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- Each doc must contain values for all labels defined in `source_labels` and `result_labels`.\n- Values for unknown labels are silently dropped.\n- Each value must be at most 2048 characters.\n- Upsert is keyed on the combination of source label values — existing rows with the same source key are updated.\n- A schema can hold at most 10,000 rows by default.\n- The operation is locked per schema; concurrent upserts to the same schema may fail with `ErrRequestTooFrequently`.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-write-upsert", + "metadata": { + "sidebarTitle": "Upsert mapping data rows" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingDataUpsertResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "keys": [ + "server01", + "server02" + ] + } + } + } + } + }, + "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/MappingDataUpsertRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "docs": [ + { + "host": "server01", + "owner": "alice", + "team": "sre", + "service": "api" + }, + { + "host": "server02", + "owner": "bob", + "team": "platform", + "service": "gateway" + } + ] + } + } + } + } + } + }, + "/incident/field/reset": { + "post": { + "operationId": "incidentFieldReset", + "summary": "Update incident custom field", + "description": "Update a custom field value on an incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-field-reset", + "metadata": { + "sidebarTitle": "Update incident custom field" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetIncidentFieldRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "field_name": "affected_service", + "field_value": "payment-service" + } + } + } + } + } + }, + "/schedule/self": { + "post": { + "operationId": "scheduleSelf", + "summary": "List my schedules", + "description": "Return on-call schedules where the current user is assigned.", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/schedules/schedule-self", + "metadata": { + "sidebarTitle": "List my schedules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleSelfResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "id": 2539108069860, + "name": "Open Source Q&A", + "account_id": 2451002751131, + "group_id": 2477033058131, + "disabled": 0, + "create_at": 1702623874, + "create_by": 2451002751131, + "update_at": 1710468081, + "update_by": 2476444212131, + "layers": [ + { + "account_id": 2451002751131, + "name": "Rule 1", + "schedule_id": 2539108069860, + "hidden": 0, + "mode": 0, + "weight": 0, + "groups": [ + { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2476444212131 + ] + } + ], + "start": 0, + "end": 0 + }, + { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2469167612131 + ] + } + ], + "start": 0, + "end": 0 + } + ], + "rotation_duration": 86400, + "handoff_time": 0, + "enable_time": 1702623874, + "expire_time": 0, + "restrict_mode": 0, + "restrict_start": 0, + "restrict_end": 0, + "restrict_periods": [], + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "create_at": 1702623874, + "create_by": 2451002751131, + "update_at": 1710468081, + "update_by": 2476444212131, + "layer_name": "Rule 1", + "fair_rotation": false, + "layer_start": 1702623874, + "layer_end": null, + "rotation_unit": "day", + "rotation_value": 1, + "mask_continuous_enabled": false + } + ], + "schedule_layers": null, + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": null + }, + "notify": { + "fixed_time": null, + "by": null, + "webhooks": null + }, + "schedule_id": 2539108069860, + "schedule_name": "Open Source Q&A", + "team_id": 2477033058131, + "description": "", + "layer_schedules": null, + "status": 0, + "cur_oncall": null, + "next_oncall": null + } + ] + } + } + } + } + }, + "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/ScheduleSelfRequest" + }, + "example": { + "start": 1712000000, + "end": 1712086400 + } + } + } + } + } + }, + "/channel/unsubscribe/rule/disable": { + "post": { + "operationId": "channelUnsubscribeRuleDisable", + "summary": "Disable drop rule", + "description": "Disable a drop rule without deleting it.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-disable", + "metadata": { + "sidebarTitle": "Disable drop rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/silence/rule/list": { + "post": { + "operationId": "channelSilenceRuleList", + "summary": "List silence rules", + "description": "List all silence rules configured for a channel.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-silence-rule-list", + "metadata": { + "sidebarTitle": "List silence rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListSilenceRulesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "channel_id": 5967964835131, + "priority": 0, + "rule_name": "Silence Info alerts", + "description": "", + "from_incident_id": "000000000000000000000000", + "time_filters": [], + "time_filter": { + "start_time": 1773388800, + "end_time": 1773414000 + }, + "filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "is_directly_discard": true, + "status": "enabled", + "rule_id": "69b3c426b4a6f5abf1f54873", + "updated_by": 3790925372131, + "created_at": 1773388838, + "updated_at": 1773388838, + "is_effective": false + } + ] + } + } + } + } + }, + "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/ChannelScopedListRequest" + }, + "example": { + "channel_id": 1001 + } + } + } + } + } + }, + "/incident/create": { + "post": { + "operationId": "incidentCreate", + "summary": "Create incident", + "description": "Manually create a new incident and assign responders.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-create", + "metadata": { + "sidebarTitle": "Create incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CreateIncidentResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "incident_id": "69db2ef1a0fe7db6448b14f1", + "title": "API test incident for docs" + } + } + } + } + }, + "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/CreateIncidentRequest" + }, + "example": { + "incident_severity": "Critical", + "title": "Database connection timeout on prod-db-01", + "channel_id": 2551105804131, + "assigned_to": { + "person_ids": [ + 2476444212131 + ] + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "AppKeyAuth": { + "type": "apiKey", + "in": "query", + "name": "app_key", + "description": "App key issued from the Flashduty console under Account → APP Keys. Required on every public API call. Keep it secret — it grants the same access as the owning account." + } + }, + "responses": { + "BadRequest": { + "description": "Invalid request — usually a missing or malformed parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "missingParameter": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "InvalidParameter", + "message": "The specified parameter is not valid." + } + } + } + } + } + } + }, + "Unauthorized": { + "description": "Missing or invalid app_key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "missingAppKey": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "Unauthorized", + "message": "You are unauthorized." + } + } + } + } + } + } + }, + "Forbidden": { + "description": "The app_key is valid but lacks permission for this operation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "noEditPermission": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "AccessDenied", + "message": "Access Denied." + } + } + } + } + } + } + }, + "NotFound": { + "description": "The referenced resource does not exist or has been deleted. Note: Flashduty historically returns HTTP 400 with code `ResourceNotFound` for missing domain entities; a true 404 is reserved for unknown routes.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "resourceMissing": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "ResourceNotFound", + "message": "The resource you request is not found" + } + } + } + } + } + } + }, + "TooManyRequests": { + "description": "Rate limit hit. Either the global API limit, a per-account limit, or a per-integration limit.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "rateLimited": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "RequestTooFrequently", + "message": "Request too frequently." + } + } + } + } + } + } + }, + "ServerError": { + "description": "Unexpected server-side error. Include the request_id when reporting.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "internal": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "InternalError", + "message": "We encountered an internal error, and it has been reported. Please try again later." + } + } + } + } + } + } + } + }, + "schemas": { + "AckIncidentRequest": { + "type": "object", + "description": "Parameters for acknowledging one or more incidents.", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "Incident IDs to acknowledge. At most 100 per call.", + "minItems": 1 + } + } + }, + "AddIncidentResponderRequest": { + "type": "object", + "description": "Parameters for adding responders to an existing incident.", + "required": [ + "incident_id", + "person_ids" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + }, + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs to add as responders." + }, + "notify": { + "type": "object", + "description": "Optional notification override. Defaults to following each person's personal preference.", + "properties": { + "follow_preference": { + "type": "boolean", + "description": "When true, fall back to each responder's personal preference." + }, + "personal_channels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels to use (e.g. `voice`, `sms`, `email`)." + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Notification template ID (MongoDB ObjectID)." + } + } + } + } + }, + "AffectedStatusPageComponentItem": { + "type": "object", + "description": "A status page component currently affected by an event, embedding component metadata plus its resulting status.", + "required": [ + "name", + "status" + ], + "properties": { + "component_id": { + "type": "string", + "description": "Component ID." + }, + "section_id": { + "type": "string", + "description": "Parent section ID." + }, + "name": { + "type": "string", + "description": "Component display name." + }, + "description": { + "type": "string", + "description": "Component description." + }, + "available_since_seconds": { + "type": "integer", + "format": "int64", + "description": "Timestamp when the component was first available, in unix seconds." + }, + "order_id": { + "type": "integer", + "format": "int64", + "description": "Display order within its section." + }, + "hide_uptime": { + "type": "boolean", + "description": "When true, uptime data is hidden from summary responses." + }, + "hide_all": { + "type": "boolean", + "description": "When true, the component is hidden entirely from summary endpoints." + }, + "status": { + "type": "string", + "enum": [ + "operational", + "degraded", + "partial_outage", + "full_outage", + "under_maintenance" + ], + "description": "Current component status resulting from the event." + } + } + }, + "AlertEventGlobalListRequest": { + "type": "object", + "description": "Filter and pagination criteria for the global raw event list.", + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "Start of search window, Unix epoch seconds." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "End of search window, Unix epoch seconds." + }, + "p": { + "type": "integer", + "format": "int64", + "description": "Page number, starting at 1. Used when `search_after_ctx` is not provided." + }, + "limit": { + "type": "integer", + "format": "int64", + "description": "Page size, max 100, default 20." + }, + "search_after_ctx": { + "type": "string", + "description": "Opaque cursor for the next page." + }, + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by integration IDs." + }, + "integration_types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by integration types (plugin keys)." + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by channel IDs. Max 100." + }, + "severities": { + "type": "string", + "description": "Comma-separated severity filter, e.g. `Critical,Warning`." + }, + "orderby": { + "type": "string", + "description": "Sort field (ES field name).", + "enum": [ + "event_time" + ] + }, + "asc": { + "type": "boolean", + "description": "Sort ascending when `true`." + } + } + }, + "AlertEventGlobalListResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64" + }, + "has_next_page": { + "type": "boolean" + }, + "search_after_ctx": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertEventItem" + } + } + } + }, + "AlertEventItem": { + "type": "object", + "description": "A raw alert event.", + "properties": { + "event_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Event ID (MongoDB ObjectID)." + }, + "alert_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Parent alert ID (MongoDB ObjectID)." + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel ID the event is routed to." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration that produced this event." + }, + "integration_type": { + "type": "string", + "description": "Type/plugin key of the integration that produced this event." + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "Deprecated. Use `integration_id` instead." + }, + "title": { + "type": "string", + "description": "Event title." + }, + "title_rule": { + "type": "string", + "description": "Title template used to derive `title` from labels." + }, + "description": { + "type": "string", + "description": "Event description." + }, + "alert_key": { + "type": "string", + "description": "Deduplication key used to merge events into an alert." + }, + "event_severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "Severity of this event." + }, + "event_status": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "Status of this event." + }, + "event_time": { + "type": "integer", + "format": "int64", + "description": "Event timestamp, Unix epoch seconds." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Label key-value pairs." + }, + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertImage" + }, + "description": "Images attached to the event." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Record creation time, Unix epoch seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Record update time, Unix epoch seconds." + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "Soft-delete timestamp (seconds). Zero if not deleted." + } + } + }, + "AlertEventListRequest": { + "type": "object", + "required": [ + "alert_id" + ], + "properties": { + "alert_id": { + "type": "string", + "description": "Alert ID (ObjectID hex string)." + } + } + }, + "AlertEventListResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertEventItem" + } + } + } + }, + "AlertFeedRequest": { + "type": "object", + "required": [ + "alert_id" + ], + "properties": { + "alert_id": { + "type": "string", + "description": "Alert ID." + }, + "p": { + "type": "integer", + "format": "int64", + "description": "Page number, starting at 1.", + "default": 1 + }, + "limit": { + "type": "integer", + "format": "int64", + "description": "Page size, max 100, default 20." + }, + "asc": { + "type": "boolean", + "description": "Sort ascending." + }, + "types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by feed types." + } + } + }, + "AlertFeedResponse": { + "type": "object", + "properties": { + "has_next_page": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeedItem" + } + } + } + }, + "AlertFeedType": { + "type": "string", + "description": "Alert activity feed entry type. Each value identifies one alert lifecycle event; the matching `detail` payload shape is determined by this field.\n\n| Type | Meaning |\n|---|---|\n| `a_new` | Alert triggered. |\n| `a_comm` | Comment added on the alert. |\n| `a_close` | Alert closed. |", + "enum": [ + "a_new", + "a_comm", + "a_close" + ] + }, + "AlertImage": { + "type": "object", + "description": "An image attachment on an alert or event.", + "required": [ + "src" + ], + "properties": { + "href": { + "type": "string", + "description": "Optional link URL when the image is clicked." + }, + "src": { + "type": "string", + "description": "Image source URL or internal image reference (starts with `img_` or `http`)." + }, + "alt": { + "type": "string", + "description": "Alt text." + } + } + }, + "AlertInfo": { + "type": "object", + "description": "Detailed alert item.", + "required": [ + "alert_id", + "integration_id", + "data_source_id", + "channel_id", + "account_id", + "description", + "title", + "title_rule", + "alert_key", + "alert_severity", + "alert_status", + "start_time", + "last_time", + "end_time", + "labels", + "ever_muted", + "created_at", + "updated_at", + "integration_name", + "integration_type", + "integration_ref_id", + "channel_name", + "channel_status", + "responder_name", + "responder_email", + "event_cnt", + "images", + "data_source_name", + "data_source_ref_id" + ], + "properties": { + "alert_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Alert ID (MongoDB ObjectID)." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID that produced the alert." + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "Deprecated. Use `integration_id` instead." + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel ID." + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." + }, + "description": { + "type": "string", + "description": "Alert description." + }, + "title": { + "type": "string", + "description": "Alert title." + }, + "title_rule": { + "type": "string", + "description": "Title rendering rule." + }, + "alert_key": { + "type": "string", + "description": "Deduplication key used to merge events into the alert." + }, + "alert_severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "Current severity." + }, + "alert_status": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "Current status." + }, + "start_time": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) when the alert first fired." + }, + "last_time": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) of the most recent event." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) when the alert recovered. 0 if still active." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Alert labels." + }, + "ever_muted": { + "type": "boolean", + "description": "Whether this alert has ever been silenced." + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "Soft-delete timestamp (seconds). Zero if not deleted." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (seconds)." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp (seconds)." + }, + "integration_name": { + "type": "string", + "description": "Integration display name." + }, + "integration_type": { + "type": "string", + "description": "Integration type string." + }, + "integration_ref_id": { + "type": "string", + "description": "Integration reference ID." + }, + "channel_name": { + "type": "string", + "description": "Channel display name." + }, + "channel_status": { + "type": "string", + "description": "Channel status." + }, + "responder_name": { + "type": "string", + "description": "Primary responder name, if any." + }, + "responder_email": { + "type": "string", + "description": "Primary responder email, if any." + }, + "incident": { + "$ref": "#/components/schemas/IncidentShort", + "description": "Parent incident reference, if the alert has been merged into one." + }, + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertEventItem" + }, + "description": "Raw alert events, populated when the caller opts in." + }, + "event_cnt": { + "type": "integer", + "format": "int64", + "description": "Total number of raw events merged into this alert." + }, + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Image" + }, + "description": "Attached images." + }, + "data_source_name": { + "type": "string", + "description": "Deprecated. Use `integration_name`." + }, + "data_source_type": { + "type": "string", + "description": "Deprecated. Use `integration_type`." + }, + "data_source_ref_id": { + "type": "string", + "description": "Deprecated. Use `integration_ref_id`." + } + } + }, + "AlertInfoRequest": { + "type": "object", + "required": [ + "alert_id" + ], + "properties": { + "alert_id": { + "type": "string", + "description": "Alert ID (ObjectID hex string)." + } + } + }, + "AlertItem": { + "type": "object", + "description": "A single alert with full detail.", + "properties": { + "alert_id": { + "type": "string", + "description": "Unique alert ID (ObjectID hex string)." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "ID of the integration that produced this alert." + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "Deprecated. Use `integration_id` instead. Deprecated: use `integration_id` instead.", + "deprecated": true + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "ID of the channel the alert belongs to." + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." + }, + "title": { + "type": "string", + "description": "Alert title." + }, + "title_rule": { + "type": "string", + "description": "Title template used to derive `title` from the event labels (e.g. `$service::$cluster`)." + }, + "description": { + "type": "string", + "description": "Alert description." + }, + "alert_severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "Current severity." + }, + "alert_status": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "Current status." + }, + "alert_key": { + "type": "string", + "description": "Deduplication key." + }, + "start_time": { + "type": "integer", + "format": "int64", + "description": "First-seen time, Unix epoch seconds." + }, + "last_time": { + "type": "integer", + "format": "int64", + "description": "Last-event time, Unix epoch seconds." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "Resolution time, Unix epoch seconds. 0 if still active." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Label key-value pairs." + }, + "ever_muted": { + "type": "boolean", + "description": "True if this alert has ever been silenced." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp, Unix epoch seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp, Unix epoch seconds." + }, + "integration_name": { + "type": "string", + "description": "Display name of the integration." + }, + "integration_type": { + "type": "string", + "description": "Type/plugin key of the integration." + }, + "integration_ref_id": { + "type": "string", + "description": "External reference ID of the integration." + }, + "channel_name": { + "type": "string", + "description": "Display name of the channel." + }, + "channel_status": { + "type": "string", + "description": "Status of the channel (e.g. `enabled`, `disabled`)." + }, + "responder_name": { + "type": "string", + "description": "Display name of the current responder (from the associated incident)." + }, + "responder_email": { + "type": "string", + "description": "Email of the current responder (from the associated incident)." + }, + "event_cnt": { + "type": "integer", + "format": "int64", + "description": "Total number of raw events received by this alert." + }, + "incident": { + "$ref": "#/components/schemas/IncidentShort", + "description": "Associated incident, if any." + }, + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertEventItem" + }, + "description": "Recent raw events attached to this alert. Populated only by some endpoints." + }, + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertImage" + }, + "description": "Images attached to the alert." + }, + "data_source_name": { + "type": "string", + "description": "Deprecated. Use `integration_name` instead." + }, + "data_source_type": { + "type": "string", + "description": "Deprecated. Use `integration_type` instead." + }, + "data_source_ref_id": { + "type": "string", + "description": "Deprecated. Use `integration_ref_id` instead." + } + } + }, + "AlertListByIDsRequest": { + "type": "object", + "required": [ + "alert_ids" + ], + "properties": { + "alert_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of alert IDs (ObjectID hex strings)." + } + } + }, + "AlertListRequest": { + "type": "object", + "description": "Filter and pagination criteria for alert list queries. Time range is required.", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "Start of the search window, Unix epoch seconds." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "End of the search window, Unix epoch seconds. Max span 31 days." + }, + "p": { + "type": "integer", + "format": "int64", + "description": "Page number, starting at 1. Used when `search_after_ctx` is not provided." + }, + "limit": { + "type": "integer", + "format": "int64", + "description": "Page size. Max 100, default 20." + }, + "search_after_ctx": { + "type": "string", + "description": "Opaque cursor from the previous response for the next page." + }, + "is_active": { + "type": "boolean", + "description": "Filter by active (`true`) or resolved (`false`) status." + }, + "ever_muted": { + "type": "boolean", + "description": "Filter by whether the alert has ever been silenced." + }, + "alert_severity": { + "type": "string", + "description": "Comma-separated severity filter, e.g. `Critical,Warning`. Allowed values: `Critical`, `Warning`, `Info`, `Ok`." + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by channel IDs." + }, + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by integration IDs." + }, + "alert_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter to specific alert IDs (ObjectID hex strings)." + }, + "alert_keys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by alert deduplication keys." + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "Sort field." + }, + "asc": { + "type": "boolean", + "description": "Sort ascending when `true`. Default descending." + }, + "by_updated_at": { + "type": "boolean", + "description": "When `true`, the time range filter is applied on `updated_at` rather than `start_time`." + } + } + }, + "AlertListResponse": { + "type": "object", + "description": "Paginated list of alerts.", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total matching alerts." + }, + "has_next_page": { + "type": "boolean", + "description": "True if more pages are available." + }, + "search_after_ctx": { + "type": "string", + "description": "Cursor for the next page." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertItem" + } + } + } + }, + "AlertMergeRequest": { + "type": "object", + "required": [ + "alert_ids", + "incident_id" + ], + "properties": { + "alert_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Alert IDs to merge." + }, + "incident_id": { + "type": "string", + "description": "Target incident ID." + }, + "comment": { + "type": "string", + "description": "Optional comment on the merge action." + }, + "title": { + "type": "string", + "description": "Optional new title for the target incident." + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "Optional new owner for the target incident." + } + } + }, + "AlertPipeline": { + "type": "object", + "description": "A single alert processing rule.", + "properties": { + "kind": { + "type": "string", + "enum": [ + "title_reset", + "description_reset", + "severity_reset", + "alert_drop", + "alert_inhibit" + ], + "description": "Rule type." + }, + "if": { + "$ref": "#/components/schemas/OrFilterGroup", + "description": "Optional OR-of-AND filter. When omitted, the rule applies to all alerts." + }, + "settings": { + "type": "object", + "description": "Kind-specific settings. Shape depends on `kind`:\n- `title_reset`: `{ \"title\": \"\" }`\n- `description_reset`: `{ \"description\": \"\" }`\n- `severity_reset`: `{ \"severity\": \"Critical\"|\"Warning\"|\"Info\" }`\n- `alert_drop`: `{}` (empty object)\n- `alert_inhibit`: `{ \"equals\": [\"\", ...], \"source_filters\": }`", + "oneOf": [ + { + "$ref": "#/components/schemas/ApTitleReset" + }, + { + "$ref": "#/components/schemas/ApDescriptionReset" + }, + { + "$ref": "#/components/schemas/ApSeverityReset" + }, + { + "$ref": "#/components/schemas/ApAlertDrop" + }, + { + "$ref": "#/components/schemas/ApAlertInhibit" + } + ] + } + } + }, + "AlertPipelineInfoRequest": { + "type": "object", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID." + } + } + }, + "AlertPipelineItem": { + "type": "object", + "description": "Alert processing pipeline for an integration.", + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID this pipeline applies to." + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertPipeline" + }, + "description": "Ordered list of processing rules." + }, + "status": { + "type": "string", + "description": "Pipeline status. Possible values: `enabled`, `disabled`." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "Member ID who created the pipeline." + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "Member ID who last updated the pipeline." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp, Unix epoch seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp, Unix epoch seconds." + } + } + }, + "AlertPipelineListRequest": { + "type": "object", + "required": [ + "integration_ids" + ], + "properties": { + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Integration IDs." + } + } + }, + "AlertPipelineListResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertPipelineItem" + } + } + } + }, + "AlertPipelineUpsertRequest": { + "type": "object", + "required": [ + "integration_id", + "rules" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID to configure." + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertPipeline" + }, + "description": "Rules to apply. Max 50.", + "maxItems": 50 + } + } + }, + "ApAlertDrop": { + "type": "object", + "description": "Settings for `alert_drop` rule: no additional settings required. Matched alerts are silently discarded.", + "properties": {} + }, + "ApAlertInhibit": { + "type": "object", + "description": "Settings for `alert_inhibit` rule: suppresses source alerts that match the filter when they share the same label values as the current alert.", + "required": [ + "equals", + "source_filters" + ], + "properties": { + "equals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Label keys whose values must be equal between the source and current alert for inhibition to apply." + }, + "source_filters": { + "$ref": "#/components/schemas/OrFilterGroup", + "description": "Filter that identifies the source alerts to inhibit." + } + } + }, + "ApDescriptionReset": { + "type": "object", + "description": "Settings for `description_reset` rule: overrides the alert description.", + "required": [ + "description" + ], + "properties": { + "description": { + "type": "string", + "description": "New description template." + } + } + }, + "ApSeverityReset": { + "type": "object", + "description": "Settings for `severity_reset` rule: forces the alert severity to a fixed value.", + "required": [ + "severity" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info" + ], + "description": "Target severity level." + } + } + }, + "ApTitleReset": { + "type": "object", + "description": "Settings for `title_reset` rule: overrides the alert title with a template string.", + "required": [ + "title" + ], + "properties": { + "title": { + "type": "string", + "description": "New title template. Supports Golang template syntax referencing alert fields." + } + } + }, + "AssignIncidentRequest": { + "type": "object", + "description": "Parameters for dispatching one or more incidents to a target. Provide `incident_id` or `incident_ids` but not both.", + "required": [ + "assigned_to" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Single incident ID. Ignored when `incident_ids` is also provided." + }, + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "minItems": 1, + "maxItems": 100, + "description": "Batch incident IDs." + }, + "assigned_to": { + "$ref": "#/components/schemas/AssignedTo" + } + } + }, + "AssignedTo": { + "type": "object", + "description": "Incident assignment target. Either `person_ids` or `escalate_rule_id` must be provided.", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "minItems": 1, + "maxItems": 100, + "description": "Member IDs to assign directly." + }, + "escalate_rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Escalation rule ID (MongoDB ObjectID) to drive assignment." + }, + "layer_idx": { + "type": "integer", + "description": "Current level index within the escalation rule." + }, + "type": { + "type": "string", + "description": "Assignment type: `assign` direct assignment, `reassign` reassignment, `escalate` escalation-rule driven, `reopen` automatic reassignment on reopen.", + "enum": [ + "assign", + "reassign", + "escalate", + "reopen" + ] + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "minItems": 1, + "maxItems": 100, + "description": "Email recipients, used by integrations such as ServiceNow." + }, + "escalate_rule_name": { + "type": "string", + "description": "Escalation rule display name, filled by the server." + }, + "assigned_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) when the assignment was made." + }, + "id": { + "type": "string", + "description": "Opaque assignment ID generated by the server." + } + } + }, + "CalEventIDRequest": { + "type": "object", + "description": "Calendar event delete request.", + "required": [ + "cal_id", + "event_id" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "Calendar ID." + }, + "event_id": { + "type": "string", + "description": "Event ID." + } + } + }, + "CalEventItem": { + "type": "object", + "description": "Calendar event entry.", + "required": [ + "cal_id", + "event_id", + "summary", + "description", + "start_at", + "end_at", + "is_off", + "created_at", + "updated_at" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "Account ID. Only present for private events." + }, + "creator_id": { + "type": "integer", + "format": "uint64", + "description": "Creator person ID. Only present for private events." + }, + "cal_id": { + "type": "string", + "description": "Calendar ID. For public events this is a locale key such as zh-cn.china.official." + }, + "event_id": { + "type": "string", + "description": "Event ID." + }, + "summary": { + "type": "string", + "description": "Event summary." + }, + "description": { + "type": "string", + "description": "Event description." + }, + "start_at": { + "type": "string", + "description": "Event start date (YYYY-MM-DD)." + }, + "end_at": { + "type": "string", + "description": "Event end date (YYYY-MM-DD, exclusive)." + }, + "is_off": { + "type": "boolean", + "description": "Whether the event marks a non-working day." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (Unix seconds)." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp (Unix seconds)." + } + } + }, + "CalEventListRequest": { + "type": "object", + "description": "Calendar event list request. When day > 0 month must also be specified. month and day accept 0 to mean \"not filtered\".", + "required": [ + "cal_id" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "Calendar ID." + }, + "year": { + "type": "integer", + "description": "Year. Defaults to the current year when omitted.", + "minimum": 2023 + }, + "month": { + "type": "integer", + "description": "Month (1-12). 0 means no month filter.", + "minimum": 0, + "maximum": 12 + }, + "day": { + "type": "integer", + "description": "Day (1-31). 0 means no day filter.", + "minimum": 0, + "maximum": 31 + } + } + }, + "CalEventListResponse": { + "type": "object", + "description": "Calendar event list response.", + "required": [ + "items", + "total" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CalEventItem" + }, + "description": "Calendar events sorted by start_at." + }, + "total": { + "type": "integer", + "description": "Total number of events returned." + } + } + }, + "CalEventUpsertRequest": { + "type": "object", + "description": "Calendar event upsert request. Provide event_id to update an existing event; omit it to create a new one.", + "required": [ + "cal_id", + "summary", + "start_at", + "end_at", + "is_off" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "Calendar ID." + }, + "event_id": { + "type": "string", + "description": "Event ID. Omit when creating.", + "maxLength": 63 + }, + "summary": { + "type": "string", + "description": "Event summary.", + "minLength": 1, + "maxLength": 39 + }, + "description": { + "type": "string", + "description": "Event description.", + "maxLength": 499 + }, + "start_at": { + "type": "string", + "description": "Event start date in YYYY-MM-DD." + }, + "end_at": { + "type": "string", + "description": "Event end date in YYYY-MM-DD (exclusive)." + }, + "is_off": { + "type": "boolean", + "description": "Whether the event marks a non-working day. true = day off, false = working day override." + } + } + }, + "CalEventUpsertResponse": { + "type": "object", + "description": "Response returned by /calendar/event/upsert.", + "required": [ + "cal_id", + "event_id", + "summary" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "Calendar ID." + }, + "event_id": { + "type": "string", + "description": "Event ID (existing or newly generated)." + }, + "summary": { + "type": "string", + "description": "Event summary." + } + } + }, + "CalendarCreateRequest": { + "type": "object", + "description": "Create calendar request. cal_name is required.", + "required": [ + "cal_name" + ], + "properties": { + "cal_name": { + "type": "string", + "description": "Calendar display name.", + "minLength": 1, + "maxLength": 39 + }, + "description": { + "type": "string", + "description": "Calendar description.", + "maxLength": 499 + }, + "timezone": { + "type": "string", + "description": "IANA timezone. Defaults to Asia/Shanghai when empty.", + "default": "Asia/Shanghai" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID. 0 means no team." + }, + "workdays": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0, + "maximum": 6 + }, + "description": "Workday numbers (0 = Sunday, 6 = Saturday)." + }, + "extra_cal_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Additional public-holiday calendar IDs to inherit events from (for example zh-cn.china.official)." + } + } + }, + "CalendarCreateResponse": { + "type": "object", + "description": "Create calendar response.", + "required": [ + "cal_id", + "cal_name" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "ID of the newly created calendar (format cal.)." + }, + "cal_name": { + "type": "string", + "description": "Calendar display name." + } + } + }, + "CalendarEmptyObject": { + "type": "object", + "description": "Empty response body.", + "properties": {} + }, + "CalendarIDRequest": { + "type": "object", + "description": "Request body carrying a calendar ID.", + "required": [ + "cal_id" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "Calendar ID." + } + } + }, + "CalendarItem": { + "type": "object", + "description": "Service calendar detail.", + "required": [ + "account_id", + "team_id", + "cal_id", + "cal_name", + "description", + "timezone", + "kind", + "created_at", + "updated_at", + "creator_id", + "updated_by", + "status" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "Account ID." + }, + "team_id": { + "type": "integer", + "format": "uint64", + "description": "Owning team ID (0 when not assigned)." + }, + "cal_id": { + "type": "string", + "description": "Calendar ID." + }, + "cal_name": { + "type": "string", + "description": "Calendar display name." + }, + "description": { + "type": "string", + "description": "Calendar description." + }, + "timezone": { + "type": "string", + "description": "IANA timezone." + }, + "kind": { + "type": "string", + "description": "Calendar kind.", + "enum": [ + "region.official.holiday", + "religion.holiday", + "personal" + ] + }, + "workdays": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0, + "maximum": 6 + }, + "description": "Workday numbers (0 = Sunday, 6 = Saturday)." + }, + "extra_cal_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Inherited public-holiday calendar IDs." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (Unix seconds)." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp (Unix seconds)." + }, + "creator_id": { + "type": "integer", + "format": "uint64", + "description": "Creator person ID." + }, + "updated_by": { + "type": "integer", + "format": "uint64", + "description": "Last updater person ID." + }, + "status": { + "type": "string", + "description": "Calendar status.", + "enum": [ + "enabled", + "deleted" + ] + } + } + }, + "CalendarListRequest": { + "type": "object", + "description": "Calendar list request. kind filters by calendar kind; no_locale disables locale filtering for public holiday calendars.", + "properties": { + "kind": { + "type": "string", + "description": "Calendar kind filter. Defaults to personal when empty.", + "enum": [ + "region.official.holiday", + "personal" + ] + }, + "no_locale": { + "type": "boolean", + "description": "Disable locale filtering when listing public-holiday calendars." + } + } + }, + "CalendarListResponse": { + "type": "object", + "description": "Calendar list response.", + "required": [ + "items", + "total" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CalendarItem" + }, + "description": "Calendar items." + }, + "total": { + "type": "integer", + "description": "Total number of calendars returned." + } + } + }, + "CalendarUpdateRequest": { + "type": "object", + "description": "Update calendar request. cal_id is required; all other fields are optional and only applied when provided.", + "required": [ + "cal_id" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "Calendar ID." + }, + "cal_name": { + "type": "string", + "description": "New calendar name.", + "minLength": 1, + "maxLength": 39 + }, + "description": { + "type": "string", + "description": "New description.", + "maxLength": 499 + }, + "timezone": { + "type": "string", + "description": "New IANA timezone." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "New owning team ID." + }, + "workdays": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0, + "maximum": 6 + }, + "description": "Workday numbers (0 = Sunday, 6 = Saturday)." + }, + "extra_cal_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Additional public-holiday calendar IDs to inherit events from." + } + } + }, + "CancelStatusPageMigrationRequest": { + "type": "object", + "description": "Parameters for cancelling an in-progress migration job.", + "required": [ + "job_id" + ], + "properties": { + "job_id": { + "type": "string", + "description": "Migration job ID." + } + } + }, + "ChannelCreateResponse": { + "type": "object", + "required": [ + "channel_id", + "channel_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Newly created channel ID." + }, + "channel_name": { + "type": "string", + "description": "Channel name echoed back from the request." + }, + "external_report_token": { + "type": "string", + "description": "External report token. Emitted only when external reporting is enabled." + } + } + }, + "ChannelIDRequest": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel ID." + } + } + }, + "ChannelInfoRequest": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel ID to fetch." + } + } + }, + "ChannelInfosRequest": { + "type": "object", + "required": [ + "channel_ids" + ], + "properties": { + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "maxItems": 1000, + "description": "Channel IDs to look up. Up to 1000." + } + } + }, + "ChannelInfosResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelShort" + } + } + } + }, + "ChannelItem": { + "type": "object", + "description": "Channel detail record. All fields are optional; they are emitted only when populated.", + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel ID." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID." + }, + "managing_team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Additional teams that can manage the channel." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "Member ID who created the channel." + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "Owning account ID." + }, + "channel_name": { + "type": "string", + "description": "Channel name." + }, + "description": { + "type": "string", + "description": "Free-form description." + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled", + "deleted" + ], + "description": "Channel status." + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "Deletion timestamp (unix seconds). Non-zero only for soft-deleted channels." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (unix seconds)." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp (unix seconds)." + }, + "auto_resolve_timeout": { + "type": "integer", + "format": "int64", + "description": "Auto-resolve timeout in seconds. 0 disables auto-resolve." + }, + "auto_resolve_mode": { + "type": "string", + "enum": [ + "trigger", + "update" + ], + "description": "Auto-resolve timer reset mode." + }, + "is_private": { + "type": "boolean", + "description": "When true, the channel is visible only to its managing teams." + }, + "disable_outlier_detection": { + "type": "boolean", + "description": "When true, outlier incident detection is disabled." + }, + "disable_auto_close": { + "type": "boolean", + "description": "When true, automatic incident closing is disabled." + }, + "group": { + "$ref": "#/components/schemas/Group" + }, + "flapping": { + "$ref": "#/components/schemas/Flapping" + }, + "progress_to_incident_cnts": { + "$ref": "#/components/schemas/IncProgressCnts" + }, + "is_starred": { + "type": "boolean", + "description": "Whether the current user has starred this channel." + }, + "active_incident_highest_severity": { + "type": "string", + "description": "Highest severity among active incidents in the channel." + }, + "last_incident_at": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the most recent incident (unix seconds)." + }, + "is_external_report_enabled": { + "type": "boolean", + "description": "Whether external reporters can file incidents into this channel." + }, + "external_report_token": { + "type": "string", + "description": "Token granted to external reporters when external reporting is enabled." + } + } + }, + "ChannelRuleIDRequest": { + "type": "object", + "required": [ + "channel_id", + "rule_id" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel the rule belongs to." + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Rule ID (MongoDB ObjectID)." + } + } + }, + "ChannelScopedListRequest": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel to list rules for." + } + } + }, + "ChannelShort": { + "type": "object", + "required": [ + "channel_id", + "channel_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel ID." + }, + "channel_name": { + "type": "string", + "description": "Channel name." + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "Channel status." + } + } + }, + "CommentIncidentRequest": { + "type": "object", + "description": "Parameters for adding a comment to one or more incidents.", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "Incident IDs to comment on. At most 100 per call.", + "minItems": 1 + }, + "comment": { + "type": "string", + "maxLength": 1024, + "description": "Comment body." + }, + "mute_reply": { + "type": "boolean", + "description": "When true, do not trigger webhook reply actions for this comment." + } + } + }, + "CreateChannelRequest": { + "type": "object", + "description": "Parameters for creating a channel.", + "required": [ + "team_id", + "channel_name" + ], + "properties": { + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID." + }, + "managing_team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "maxItems": 3, + "description": "Additional teams that can manage the channel. Up to 3 entries." + }, + "channel_name": { + "type": "string", + "minLength": 1, + "maxLength": 59, + "description": "Channel name. 1 to 59 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Free-form description. Up to 500 characters." + }, + "escalate_rule": { + "type": "object", + "description": "Default escalation rule applied to the channel. Omit to skip default escalation.", + "required": [ + "template_id", + "target" + ], + "properties": { + "aggr_window": { + "type": "integer", + "minimum": 0, + "maximum": 3600, + "description": "Aggregation window in seconds. 0 disables aggregation." + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Notification template ID (MongoDB ObjectID)." + }, + "target": { + "type": "object", + "description": "Notification target. At least one of `person_ids`, `team_ids`, `schedule_to_role_ids`, or `emails` must be set, together with either `by` or `webhooks`.", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs to notify directly." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Team IDs to notify." + }, + "schedule_to_role_ids": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "description": "Map of schedule ID to the role IDs on that schedule to notify." + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "description": "Email addresses to notify (push-only scenarios)." + }, + "by": { + "type": "object", + "description": "Per-severity personal notification channels. Required unless `webhooks` is provided.", + "properties": { + "follow_preference": { + "type": "boolean", + "description": "When true, use each responder's personal preference instead of the lists below." + }, + "critical": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels for Critical events (e.g. `voice`, `sms`, `email`, `feishu`)." + }, + "warning": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels for Warning events." + }, + "info": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels for Info events." + } + } + }, + "webhooks": { + "type": "array", + "description": "Group chat / webhook targets. Required unless `by` is provided.", + "items": { + "type": "object", + "required": [ + "type", + "settings" + ], + "properties": { + "type": { + "type": "string", + "description": "Webhook type (e.g. `feishu`, `dingtalk_app`, `wecom_app`, `slack`, `teams`, `custom`)." + }, + "settings": { + "type": "object", + "additionalProperties": true, + "description": "Type-specific settings (chat IDs, URLs, etc.)." + } + } + } + } + } + } + } + }, + "group": { + "type": "object", + "description": "Alert grouping configuration.", + "required": [ + "method" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "i", + "p", + "n" + ], + "description": "Grouping method: `i` intelligent, `p` pattern, `n` none." + }, + "equals": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "maxItems": 5, + "description": "Groups of label keys whose equality defines a bucket." + }, + "cases": { + "type": "array", + "maxItems": 100, + "description": "Per-filter grouping overrides.", + "items": { + "type": "object" + } + }, + "all_equals_required": { + "type": "boolean", + "description": "When true, all listed keys must be present for grouping." + }, + "time_window": { + "type": "integer", + "minimum": 0, + "description": "Grouping time window in seconds." + }, + "window_type": { + "type": "string", + "enum": [ + "tumbling", + "sliding" + ], + "description": "Window type. Defaults to `tumbling`." + }, + "storm_threshold": { + "type": "integer", + "minimum": 0, + "maximum": 10000, + "description": "Alert storm threshold." + }, + "storm_thresholds": { + "type": "array", + "items": { + "type": "integer" + }, + "maxItems": 5, + "description": "Multi-level storm thresholds." + }, + "i_keys": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 10, + "description": "Label keys used for intelligent grouping embeddings." + }, + "i_score_threshold": { + "type": "number", + "format": "float", + "minimum": 0.5, + "maximum": 1, + "description": "Intelligent grouping similarity threshold." + } + } + }, + "flapping": { + "type": "object", + "description": "Flapping detection configuration.", + "properties": { + "is_disabled": { + "type": "boolean", + "description": "Disable flapping detection." + }, + "max_changes": { + "type": "integer", + "minimum": 2, + "maximum": 100, + "description": "Max state changes allowed within `in_mins`." + }, + "in_mins": { + "type": "integer", + "minimum": 1, + "maximum": 1440, + "description": "Observation window in minutes." + }, + "mute_mins": { + "type": "integer", + "minimum": 0, + "maximum": 1440, + "description": "Mute duration in minutes after flapping is detected." + } + } + }, + "auto_resolve_timeout": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 2592000, + "description": "Auto-resolve timeout in seconds. 0 disables auto-resolve. Max 30 days." + }, + "auto_resolve_mode": { + "type": "string", + "enum": [ + "trigger", + "update" + ], + "description": "Auto-resolve timer reset mode." + }, + "plugin_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "IDs of plugins (integrations) subscribed to this channel." + }, + "is_private": { + "type": "boolean", + "description": "When true, the channel is visible only to its managing teams." + }, + "disable_outlier_detection": { + "type": "boolean", + "description": "Disable outlier incident detection." + }, + "disable_auto_close": { + "type": "boolean", + "description": "Disable automatic incident closing." + }, + "is_external_report_enabled": { + "type": "boolean", + "description": "Allow external reporters to file incidents into this channel." + } + } + }, + "CreateDropRuleRequest": { + "type": "object", + "description": "Parameters for creating a channel drop rule.", + "required": [ + "channel_id", + "rule_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel the rule belongs to." + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower runs first." + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Rule name, 1 to 39 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Rule description, up to 500 characters." + }, + "filters": { + "type": "array", + "description": "Or-of-and filter tree. Each outer element is an AND group; within each group, all conditions must match.", + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "Field key (e.g. `alert_severity`, `labels.service`)." + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "Filter operator." + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Values to match." + } + } + } + } + } + } + }, + "CreateEscalationRuleRequest": { + "type": "object", + "description": "Parameters for creating an escalation rule.", + "required": [ + "channel_id", + "template_id", + "rule_name", + "layers" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel the rule belongs to." + }, + "priority": { + "type": "integer", + "minimum": 0, + "maximum": 200, + "description": "Evaluation priority. Lower runs first." + }, + "aggr_window": { + "type": "integer", + "minimum": 0, + "maximum": 3600, + "description": "Aggregation window in seconds. 0 disables aggregation." + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Notification template ID (MongoDB ObjectID)." + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Rule name, 1 to 39 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Rule description, up to 500 characters." + }, + "layers": { + "type": "array", + "description": "Escalation levels in order. At least one level is required.", + "items": { + "type": "object", + "required": [ + "target" + ], + "properties": { + "max_times": { + "type": "integer", + "minimum": 0, + "maximum": 6, + "description": "Max repeat notifications within the level." + }, + "notify_step": { + "type": "number", + "format": "float", + "minimum": 0.5, + "maximum": 120, + "description": "Repeat interval in minutes." + }, + "target": { + "type": "object", + "description": "Notification target. At least one of `person_ids`, `team_ids`, `schedule_to_role_ids`, or `emails` must be set, together with either `by` or `webhooks`.", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs to notify directly." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Team IDs to notify." + }, + "schedule_to_role_ids": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "description": "Map of schedule ID to the role IDs on that schedule to notify." + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "description": "Email addresses to notify (push-only scenarios)." + }, + "by": { + "type": "object", + "description": "Per-severity personal notification channels. Required unless `webhooks` is provided.", + "properties": { + "follow_preference": { + "type": "boolean", + "description": "When true, use each responder's personal preference instead of the lists below." + }, + "critical": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels for Critical events (e.g. `voice`, `sms`, `email`, `feishu`)." + }, + "warning": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels for Warning events." + }, + "info": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels for Info events." + } + } + }, + "webhooks": { + "type": "array", + "description": "Group chat / webhook targets. Required unless `by` is provided.", + "items": { + "type": "object", + "required": [ + "type", + "settings" + ], + "properties": { + "type": { + "type": "string", + "description": "Webhook type (e.g. `feishu`, `dingtalk_app`, `wecom_app`, `slack`, `teams`, `custom`)." + }, + "settings": { + "type": "object", + "additionalProperties": true, + "description": "Type-specific settings (chat IDs, URLs, etc.)." + } + } + } + } + } + }, + "escalate_window": { + "type": "integer", + "minimum": 0, + "maximum": 720, + "description": "Wait before moving to the next level, in minutes." + }, + "force_escalate": { + "type": "boolean", + "description": "When true, always escalate regardless of acknowledgement." + } + } + } + }, + "time_filters": { + "type": "array", + "items": { + "type": "object", + "description": "Recurring time window. `start`/`end` use 24-hour `HH:MM` format; `repeat` uses ISO-style weekday indices (0=Sunday … 6=Saturday).", + "properties": { + "start": { + "type": "string", + "description": "Start of the window in `HH:MM`." + }, + "end": { + "type": "string", + "description": "End of the window in `HH:MM`." + }, + "repeat": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Days of the week this window repeats on. Empty means every day." + }, + "cal_id": { + "type": "string", + "description": "Optional calendar ID; restricts the window to days matching the calendar." + }, + "is_off": { + "type": "boolean", + "description": "When true, match days marked as days-off in the calendar." + } + } + }, + "description": "Optional recurring time windows during which the rule applies." + }, + "filters": { + "type": "array", + "description": "Or-of-and filter tree. Each outer element is an AND group; within each group, all conditions must match.", + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "Field key (e.g. `alert_severity`, `labels.service`)." + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "Filter operator." + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Values to match." + } + } + } + } + } + } + }, + "CreateIncidentRequest": { + "type": "object", + "description": "Parameters for manually creating an incident.", + "required": [ + "incident_severity" + ], + "properties": { + "incident_severity": { + "type": "string", + "enum": [ + "Info", + "Warning", + "Critical" + ], + "description": "Incident severity." + }, + "title": { + "type": "string", + "maxLength": 512, + "description": "Incident title, up to 512 characters." + }, + "description": { + "type": "string", + "maxLength": 1024, + "description": "Incident description, up to 1024 characters." + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel to file the incident into. Optional; leave unset for a standalone incident." + }, + "assigned_to": { + "type": "object", + "description": "Incident assignment target. Either `person_ids` or `escalate_rule_id` must be provided.", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "minItems": 1, + "maxItems": 100, + "description": "Member IDs to assign directly." + }, + "escalate_rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Escalation rule ID (MongoDB ObjectID) to drive assignment." + }, + "layer_idx": { + "type": "integer", + "description": "Starting layer index when using an escalation rule." + }, + "type": { + "type": "string", + "description": "Assignment type." + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "minItems": 1, + "maxItems": 100, + "description": "Email recipients, used for ServiceNow-style integrations." + }, + "notify": { + "type": "object", + "description": "Override the notification channels used for this assignment.", + "properties": { + "follow_preference": { + "type": "boolean", + "description": "When true, fall back to each responder's personal preference." + }, + "personal_channels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels to use (e.g. `voice`, `sms`, `email`)." + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Notification template ID (MongoDB ObjectID)." + } + } + } + } + } + } + }, + "CreateIncidentResponse": { + "type": "object", + "description": "Result of manually creating an incident.", + "required": [ + "incident_id", + "title" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Newly created incident ID (MongoDB ObjectID)." + }, + "title": { + "type": "string", + "description": "Echoes the incident title from the request." + } + } + }, + "CreateInhibitRuleRequest": { + "type": "object", + "description": "Parameters for creating an inhibit rule.", + "required": [ + "channel_id", + "rule_name", + "equals" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel the rule belongs to." + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower runs first." + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Rule name, 1 to 39 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Rule description, up to 500 characters." + }, + "equals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Label keys used to pair source and target alerts." + }, + "source_filters": { + "type": "array", + "description": "Or-of-and filter tree. Each outer element is an AND group; within each group, all conditions must match.", + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "Field key (e.g. `alert_severity`, `labels.service`)." + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "Filter operator." + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Values to match." + } + } + } + } + }, + "target_filters": { + "type": "array", + "description": "Or-of-and filter tree. Each outer element is an AND group; within each group, all conditions must match.", + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "Field key (e.g. `alert_severity`, `labels.service`)." + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "Filter operator." + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Values to match." + } + } + } + } + }, + "is_directly_discard": { + "type": "boolean", + "description": "When true, suppressed target alerts are dropped instead of merged." + } + } + }, + "CreateSilenceRuleRequest": { + "type": "object", + "description": "Parameters for creating a silence rule. Exactly one of `time_filter` or `time_filters` must be provided, and `filters` must be non-empty.", + "required": [ + "channel_id", + "rule_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel the rule belongs to." + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower runs first." + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Rule name, 1 to 39 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Rule description, up to 500 characters." + }, + "from_incident_id": { + "type": "string", + "description": "Source incident ID when the silence was created from an incident." + }, + "time_filters": { + "type": "array", + "items": { + "type": "object", + "description": "Recurring time window. `start`/`end` use 24-hour `HH:MM` format; `repeat` uses ISO-style weekday indices (0=Sunday … 6=Saturday).", + "properties": { + "start": { + "type": "string", + "description": "Start of the window in `HH:MM`." + }, + "end": { + "type": "string", + "description": "End of the window in `HH:MM`." + }, + "repeat": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Days of the week this window repeats on. Empty means every day." + }, + "cal_id": { + "type": "string", + "description": "Optional calendar ID; restricts the window to days matching the calendar." + }, + "is_off": { + "type": "boolean", + "description": "When true, match days marked as days-off in the calendar." + } + } + }, + "description": "Recurring time windows during which silencing applies. Mutually exclusive with `time_filter`." + }, + "time_filter": { + "type": "object", + "description": "One-off time window defined by unix seconds.", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "Window start (unix seconds). Must be less than `end_time`." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "Window end (unix seconds)." + } + } + }, + "filters": { + "type": "array", + "description": "Or-of-and filter tree. Each outer element is an AND group; within each group, all conditions must match.", + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "Field key (e.g. `alert_severity`, `labels.service`)." + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "Filter operator." + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Values to match." + } + } + } + } + }, + "is_directly_discard": { + "type": "boolean", + "description": "When true, silenced alerts are dropped instead of suppressed into incidents." + } + } + }, + "CreateStatusPageChangeRequest": { + "type": "object", + "description": "Parameters for creating a status page incident or maintenance event. The first update must contain `component_changes` to define affected components; retrospective events require at least 2 updates.", + "required": [ + "page_id", + "type", + "title", + "status", + "updates" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "Status page ID." + }, + "type": { + "type": "string", + "enum": [ + "incident", + "maintenance" + ], + "description": "Event type." + }, + "title": { + "type": "string", + "maxLength": 255, + "description": "Event title, up to 255 characters." + }, + "description": { + "type": "string", + "description": "Event description (Markdown). Required by the validator." + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "Initial event status. `investigating`/`identified`/`monitoring`/`resolved` apply to incidents; `scheduled`/`ongoing`/`completed` apply to maintenances." + }, + "start_at_seconds": { + "type": "integer", + "format": "int64", + "description": "Event start time in unix seconds. Defaults to now when omitted." + }, + "responders": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs responsible for this event." + }, + "linked_changes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Linked change IDs (related incidents, deployments, etc.)." + }, + "close_at_seconds": { + "type": "integer", + "format": "int64", + "description": "Scheduled close time for retrospective events. Must be greater than `start_at_seconds`." + }, + "updates": { + "type": "array", + "items": { + "type": "object", + "description": "One timeline update entry.", + "properties": { + "update_id": { + "type": "string", + "description": "Update ID. Server-assigned on create; supply when replaying historical updates." + }, + "at_seconds": { + "type": "integer", + "format": "int64", + "description": "Update timestamp in unix seconds." + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "Change status after this update. Omit if the overall status does not change." + }, + "description": { + "type": "string", + "description": "Update description (Markdown)." + }, + "component_changes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "component_id", + "status" + ], + "properties": { + "component_id": { + "type": "string", + "description": "Component ID." + }, + "status": { + "type": "string", + "enum": [ + "operational", + "degraded", + "partial_outage", + "full_outage", + "under_maintenance" + ], + "description": "New component status. `operational`/`degraded`/`partial_outage`/`full_outage` apply to incidents; `operational`/`under_maintenance` apply to maintenances." + } + } + }, + "description": "Component status transitions applied by this update." + } + } + }, + "description": "Timeline updates. Immediate events normally pass one update; retrospective events must pass all historical updates." + }, + "notify_subscribers": { + "type": "boolean", + "description": "Notify subscribers about this event and all its updates." + }, + "auto_update_by_schedule": { + "type": "boolean", + "description": "Maintenance only: automatically advance the status based on the scheduled window." + }, + "is_retrospective": { + "type": "boolean", + "description": "Mark this event as a retrospective (historical) one." + } + } + }, + "CreateStatusPageChangeTimelineRequest": { + "type": "object", + "description": "Parameters for appending an update to a status page event timeline.", + "required": [ + "page_id", + "change_id", + "status" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "Status page ID." + }, + "change_id": { + "type": "integer", + "format": "int64", + "description": "Target event ID." + }, + "at_seconds": { + "type": "integer", + "format": "int64", + "description": "Update timestamp in unix seconds. Defaults to now when omitted." + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "New event status. Must match the event type. When the status transitions to `resolved` or `completed`, all referenced components must become `operational`." + }, + "description": { + "type": "string", + "description": "Update description (Markdown). Required." + }, + "component_changes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "component_id", + "status" + ], + "properties": { + "component_id": { + "type": "string", + "description": "Component ID." + }, + "status": { + "type": "string", + "enum": [ + "operational", + "degraded", + "partial_outage", + "full_outage", + "under_maintenance" + ], + "description": "New component status. `operational`/`degraded`/`partial_outage`/`full_outage` apply to incidents; `operational`/`under_maintenance` apply to maintenances." + } + } + }, + "description": "Component status transitions applied by this update. Component IDs must be unique." + } + } + }, + "CreateWarRoomRequest": { + "type": "object", + "description": "Parameters for opening an incident war room in an IM integration.", + "required": [ + "incident_id", + "integration_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "IM integration ID. Must have war room enabled; Feishu, DingTalk, WeCom (self-built), Slack and Teams are supported." + }, + "member_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Additional member IDs to add to the war room." + }, + "add_observers": { + "type": "boolean", + "description": "When true, also add historical responders of the incident as observers." + } + } + }, + "CsvFileResponse": { + "type": "string", + "description": "CSV file content returned as an attachment download." + }, + "DeletePostMortemRequest": { + "type": "object", + "description": "Parameters for deleting a post-mortem report.", + "required": [ + "post_mortem_id" + ], + "properties": { + "post_mortem_id": { + "type": "string", + "description": "Post-mortem ID." + } + } + }, + "DeleteStatusPageChangeRequest": { + "type": "object", + "description": "Parameters for deleting a status page event.", + "required": [ + "page_id", + "change_id" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "Status page ID." + }, + "change_id": { + "type": "integer", + "format": "int64", + "description": "Target event ID." + } + } + }, + "DeleteStatusPageChangeTimelineRequest": { + "type": "object", + "description": "Parameters for deleting a timeline entry on a status page event.", + "required": [ + "page_id", + "change_id", + "update_id" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "Status page ID." + }, + "change_id": { + "type": "integer", + "format": "int64", + "description": "Parent event ID." + }, + "update_id": { + "type": "string", + "description": "Timeline update ID to delete." + } + } + }, + "DeleteWarRoomRequest": { + "type": "object", + "description": "Parameters for deleting an incident war room.", + "required": [ + "incident_id", + "integration_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "IM integration ID." + } + } + }, + "DimensionInsightItem": { + "allOf": [ + { + "$ref": "#/components/schemas/MetricsBase" + }, + { + "type": "object", + "description": "Aggregated incident + alert metrics for an account/team/channel bucket.", + "properties": { + "total_incident_cnt": { + "type": "integer", + "format": "int64" + }, + "total_incidents_acknowledged": { + "type": "integer", + "format": "int64" + }, + "total_incidents_closed": { + "type": "integer", + "format": "int64" + }, + "total_incidents_auto_closed": { + "type": "integer", + "format": "int64" + }, + "total_incidents_manually_closed": { + "type": "integer", + "format": "int64" + }, + "total_incidents_timeout_closed": { + "type": "integer", + "format": "int64" + }, + "total_incidents_escalated": { + "type": "integer", + "format": "int64" + }, + "total_incidents_manually_escalated": { + "type": "integer", + "format": "int64" + }, + "total_incidents_timeout_escalated": { + "type": "integer", + "format": "int64" + }, + "total_incidents_reassigned": { + "type": "integer", + "format": "int64" + }, + "total_interruptions": { + "type": "integer", + "format": "int64" + }, + "total_notifications": { + "type": "integer", + "format": "int64" + }, + "total_engaged_seconds": { + "type": "integer", + "format": "int64" + }, + "total_seconds_to_ack": { + "type": "integer", + "format": "int64" + }, + "total_seconds_to_close": { + "type": "integer", + "format": "int64" + }, + "mean_seconds_to_ack": { + "type": "number", + "format": "double" + }, + "mean_seconds_to_close": { + "type": "number", + "format": "double" + }, + "noise_reduction_pct": { + "type": "number", + "format": "double" + }, + "acknowledgement_pct": { + "type": "number", + "format": "double" + }, + "total_alert_cnt": { + "type": "integer", + "format": "int64" + }, + "total_alert_event_cnt": { + "type": "integer", + "format": "int64" + } + } + } + ] + }, + "DimensionInsightResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DimensionInsightItem" + } + } + } + }, + "DisableIncidentMergeRequest": { + "type": "object", + "description": "Parameters for disabling automatic merging on incidents.", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "description": "Incident IDs whose automatic merge should be disabled." + } + } + }, + "DoIncidentCustomActionRequest": { + "type": "object", + "description": "Parameters for invoking a custom action integration on an incident.", + "required": [ + "incident_id", + "integration_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Custom action integration ID. Must be enabled and associated with the incident's channel." + } + } + }, + "DoIncidentCustomActionResponse": { + "type": "object", + "description": "Result of a custom action dispatch.", + "properties": { + "message": { + "type": "string", + "description": "Error message if the action's HTTP call failed; omitted on success." + } + } + }, + "DutyError": { + "type": "object", + "description": "Error payload inside the response envelope. Present only on non-2xx responses.", + "properties": { + "code": { + "$ref": "#/components/schemas/ErrorCode" + }, + "message": { + "type": "string", + "description": "Human-readable error message, localized by the caller's Accept-Language. May contain field names, IDs, or other context from the failing request.", + "example": "The specified parameter template_id is not valid." + } + }, + "required": [ + "code", + "message" + ] + }, + "EmptyObject": { + "type": "object", + "description": "An empty object. Returned as the `data` payload by operations whose success signal is simply the absence of an error.", + "additionalProperties": false + }, + "EmptyRequest": { + "type": "object", + "description": "No parameters required.", + "additionalProperties": false + }, + "EmptyResponse": { + "type": "object", + "description": "Empty response body. The server returns `data: null` on success.", + "properties": {} + }, + "EnrichFilter": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "description": "A single label filter condition.", + "properties": { + "key": { + "type": "string", + "description": "Alert label key." + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "Match operator. `IN` matches when any value matches; `NOTIN` matches when none of the values match." + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Values to match against." + } + } + }, + "EnrichRule": { + "type": "object", + "required": [ + "kind", + "settings" + ], + "description": "An enrichment rule with an optional condition and type-specific settings.", + "properties": { + "kind": { + "type": "string", + "enum": [ + "extraction", + "composition", + "mapping", + "drop" + ], + "description": "Rule type. `extraction` extracts a label via regex or GJson. `composition` builds a label from a template. `mapping` looks up values from a schema or API. `drop` removes labels." + }, + "if": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnrichFilter" + }, + "description": "Optional AND-filter list. The rule is skipped if the condition does not match." + }, + "settings": { + "description": "Rule-kind–specific settings. The shape depends on `kind`.", + "discriminator": { + "propertyName": "kind", + "mapping": { + "extraction": "#/components/schemas/ErsExtraction", + "composition": "#/components/schemas/ErsComposition", + "mapping": "#/components/schemas/ErsMapping", + "drop": "#/components/schemas/ErsDrop" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/ErsExtraction" + }, + { + "$ref": "#/components/schemas/ErsComposition" + }, + { + "$ref": "#/components/schemas/ErsMapping" + }, + { + "$ref": "#/components/schemas/ErsDrop" + } + ] + } + } + }, + "EnrichmentInfoRequest": { + "type": "object", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "Integration ID to query enrichment rules for. Must be greater than 0." + } + } + }, + "EnrichmentItem": { + "type": "object", + "description": "Enrichment rule set for an integration.", + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID." + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnrichRule" + }, + "description": "Ordered enrichment rules." + }, + "status": { + "type": "string", + "description": "Rule set status." + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "Last updater member ID." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "Creator member ID." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp, Unix seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp, Unix seconds." + } + }, + "required": [ + "integration_id", + "rules", + "status", + "updated_by", + "creator_id", + "created_at", + "updated_at" + ] + }, + "EnrichmentListRequest": { + "type": "object", + "required": [ + "integration_ids" + ], + "properties": { + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "List of integration IDs to query." + } + } + }, + "EnrichmentListResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnrichmentItem" + }, + "description": "Enrichment rule sets." + } + }, + "required": [ + "items" + ] + }, + "EnrichmentUpsertRequest": { + "type": "object", + "required": [ + "integration_id", + "rules" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID to configure enrichment rules for." + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnrichRule" + }, + "description": "Ordered list of enrichment rules. Replaces all existing rules." + } + } + }, + "ErrorCode": { + "type": "string", + "description": "Flashduty error code enum. Every failed API response sets `error.code` to one of these stable wire strings. HTTP status is informational — the authoritative signal is the enum value.\n\n| Code | HTTP | Meaning |\n|---|---|---|\n| `OK` | 200 | Reserved — not returned on real errors. |\n| `InvalidParameter` | 400 | A required parameter is missing or failed validation. |\n| `BadRequest` | 400 | Generic 400 used when no more specific code fits. |\n| `InvalidContentType` | 400 | The `Content-Type` header is not `application/json`. |\n| `ResourceNotFound` | 400 | The referenced resource does not exist. Note: returned as HTTP 400, not 404 (historical choice). |\n| `NoLicense` | 400 | The feature is license-gated and no active license was found. |\n| `ReferenceExist` | 400 | Deletion blocked — other entities still reference this resource. |\n| `Unauthorized` | 401 | `app_key` is missing, invalid, or expired. |\n| `BalanceNotEnough` | 402 | Billing-gated operation with insufficient account balance. |\n| `AccessDenied` | 403 | Authenticated but lacking the permission required for this operation. |\n| `RouteNotFound` | 404 | The request URL path is not a known route. |\n| `MethodNotAllowed` | 405 | The HTTP method is not allowed on this otherwise-known path. |\n| `UndonedOrderExist` | 409 | An outstanding billing order blocks this new one. Wait and retry. |\n| `RequestLocked` | 423 | Operation temporarily locked due to repeated failures. |\n| `EntityTooLarge` | 413 | Request body exceeds the configured max size. |\n| `RequestTooFrequently` | 429 | Rate limit hit — API-global, per-account, or per-integration. |\n| `RequestVerifyRequired` | 428 | Second-factor verification required but not supplied. |\n| `DangerousOperation` | 428 | High-risk operation requires MFA verification. |\n| `InternalError` | 500 | Unhandled server-side error. Include `request_id` in the bug report. |\n| `ServiceUnavailable` | 503 | A backend dependency is unavailable. Try again later. |", + "enum": [ + "OK", + "InvalidParameter", + "BadRequest", + "InvalidContentType", + "ResourceNotFound", + "NoLicense", + "ReferenceExist", + "Unauthorized", + "BalanceNotEnough", + "AccessDenied", + "RouteNotFound", + "MethodNotAllowed", + "UndonedOrderExist", + "RequestLocked", + "EntityTooLarge", + "RequestTooFrequently", + "RequestVerifyRequired", + "DangerousOperation", + "InternalError", + "ServiceUnavailable" + ], + "x-enumDescriptions": { + "OK": "Reserved — not returned on real errors.", + "InvalidParameter": "A required parameter is missing or failed validation.", + "BadRequest": "Generic 400 used when no more specific code fits.", + "InvalidContentType": "The `Content-Type` header is not `application/json`.", + "ResourceNotFound": "The referenced resource does not exist. Note: returned as HTTP 400, not 404 (historical choice).", + "NoLicense": "The feature is license-gated and no active license was found.", + "ReferenceExist": "Deletion blocked — other entities still reference this resource.", + "Unauthorized": "`app_key` is missing, invalid, or expired.", + "BalanceNotEnough": "Billing-gated operation with insufficient account balance.", + "AccessDenied": "Authenticated but lacking the permission required for this operation.", + "RouteNotFound": "The request URL path is not a known route.", + "MethodNotAllowed": "The HTTP method is not allowed on this otherwise-known path.", + "UndonedOrderExist": "An outstanding billing order blocks this new one. Wait and retry.", + "RequestLocked": "Operation temporarily locked due to repeated failures.", + "EntityTooLarge": "Request body exceeds the configured max size.", + "RequestTooFrequently": "Rate limit hit — API-global, per-account, or per-integration.", + "RequestVerifyRequired": "Second-factor verification required but not supplied.", + "DangerousOperation": "High-risk operation requires MFA verification.", + "InternalError": "Unhandled server-side error. Include `request_id` in the bug report.", + "ServiceUnavailable": "A backend dependency is unavailable. Try again later." + }, + "example": "InvalidParameter" + }, + "ErrorResponse": { + "type": "object", + "description": "Response envelope for errors. `error` is required; `data` is absent.", + "properties": { + "request_id": { + "type": "string", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "error": { + "$ref": "#/components/schemas/DutyError" + } + }, + "required": [ + "request_id", + "error" + ] + }, + "ErsComposition": { + "type": "object", + "title": "composition", + "required": [ + "result_label", + "template" + ], + "properties": { + "result_label": { + "type": "string", + "description": "Destination label key to write the composed value into. Must match `^[a-z][a-z0-9_]{0,62}$`." + }, + "template": { + "type": "string", + "maxLength": 500, + "description": "Go `text/template` string. Alert fields are available as `{{.title}}`, `{{.description}}`, and `{{.labels.key}}`. Example: `{{.labels.region}}-{{.labels.env}}`." + }, + "override": { + "type": "boolean", + "description": "When `true`, overwrite the label if it already exists. Defaults to `false`." + } + } + }, + "ErsDrop": { + "type": "object", + "title": "drop", + "required": [ + "drop_labels" + ], + "properties": { + "drop_labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of label keys to remove from the alert." + } + } + }, + "ErsExtraction": { + "type": "object", + "title": "extraction", + "required": [ + "source_field", + "result_label" + ], + "properties": { + "source_field": { + "type": "string", + "description": "Source field to extract from. Must be `title`, `description`, or a label key prefixed with `labels.` (e.g. `labels.env`)." + }, + "result_label": { + "type": "string", + "description": "Destination label key to write the extracted value into. Must match `^[a-z][a-z0-9_]{0,62}$`." + }, + "pattern": { + "type": "string", + "description": "RE2 regular expression. Use a named capture group `(?P...)` to extract a sub-match; without a named group the full match is used. Mutually exclusive with `g_json`." + }, + "g_json": { + "type": "string", + "description": "GJson path expression used to extract a value from a JSON-encoded field. Mutually exclusive with `pattern`." + }, + "override": { + "type": "boolean", + "description": "When `true`, overwrite the label if it already exists. Defaults to `false`." + } + } + }, + "ErsMapping": { + "type": "object", + "title": "mapping", + "required": [ + "result_labels" + ], + "properties": { + "result_labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Label keys to populate from the mapping lookup result." + }, + "mapping_type": { + "type": "string", + "enum": [ + "schema", + "api" + ], + "default": "schema", + "description": "Mapping source type. `schema` uses a mapping schema table; `api` calls an external HTTP API." + }, + "schema_id": { + "type": "string", + "description": "Mapping schema ID (MongoDB ObjectID hex). Required when `mapping_type` is `schema`." + }, + "api_id": { + "type": "string", + "description": "Mapping API ID (MongoDB ObjectID hex). Required when `mapping_type` is `api`." + }, + "override": { + "type": "boolean", + "description": "When `true`, overwrite labels that already exist. Defaults to `false`." + } + } + }, + "EscalateLayer": { + "type": "object", + "required": [ + "target" + ], + "properties": { + "max_times": { + "type": "integer", + "minimum": 0, + "maximum": 6, + "description": "Max repeat notifications within the level." + }, + "notify_step": { + "type": "number", + "format": "float", + "minimum": 0.5, + "maximum": 120, + "description": "Repeat interval in minutes." + }, + "target": { + "$ref": "#/components/schemas/EscalateTarget" + }, + "escalate_window": { + "type": "integer", + "minimum": 0, + "maximum": 720, + "description": "Wait before moving to the next level, in minutes." + }, + "force_escalate": { + "type": "boolean", + "description": "When true, always escalate regardless of acknowledgement." + } + } + }, + "EscalateRuleItem": { + "type": "object", + "required": [ + "account_id", + "channel_id", + "priority", + "aggr_window", + "rule_name", + "description", + "layers", + "time_filters", + "filters", + "status", + "template_id", + "rule_id", + "updated_by", + "created_at", + "updated_at" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "Owning account ID." + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel the rule belongs to." + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower runs first." + }, + "aggr_window": { + "type": "integer", + "description": "Aggregation window in seconds." + }, + "rule_name": { + "type": "string", + "description": "Rule name." + }, + "description": { + "type": "string", + "description": "Rule description." + }, + "layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EscalateLayer" + }, + "description": "Escalation levels in order." + }, + "time_filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimeFilter" + }, + "description": "Recurring time windows during which the rule applies." + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "Rule status." + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Notification template ID (MongoDB ObjectID)." + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Escalation rule ID (MongoDB ObjectID)." + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "Member ID that last updated the rule." + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "Deletion timestamp (unix seconds). Emitted only for soft-deleted rules." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (unix seconds)." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp (unix seconds)." + }, + "channel_name": { + "type": "string", + "description": "Channel name, populated for cross-channel listing responses." + } + } + }, + "EscalateTarget": { + "type": "object", + "description": "Notification target. At least one of `person_ids`, `team_ids`, `schedule_to_role_ids`, or `emails` must be set, together with either `by` or `webhooks`.", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs to notify directly." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Team IDs to notify." + }, + "schedule_to_role_ids": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "description": "Map of schedule ID to the role IDs on that schedule to notify." + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "description": "Email addresses to notify (push-only scenarios)." + }, + "by": { + "type": "object", + "description": "Per-severity personal notification channels. Required unless `webhooks` is provided.", + "properties": { + "follow_preference": { + "type": "boolean", + "description": "When true, use each responder's personal preference instead of the lists below." + }, + "critical": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels for Critical events (e.g. `voice`, `sms`, `email`, `feishu`)." + }, + "warning": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels for Warning events." + }, + "info": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels for Info events." + } + } + }, + "webhooks": { + "type": "array", + "description": "Group chat / webhook targets. Required unless `by` is provided.", + "items": { + "type": "object", + "required": [ + "type", + "settings" + ], + "properties": { + "type": { + "type": "string", + "description": "Webhook type (e.g. `feishu`, `dingtalk_app`, `wecom_app`, `slack`, `teams`, `custom`)." + }, + "settings": { + "type": "object", + "additionalProperties": true, + "description": "Type-specific settings (chat IDs, URLs, etc.)." + } + } + } + } + } + }, + "ExportStatusPageSubscribersRequest": { + "type": "object", + "description": "Parameters for exporting a status page subscriber list.", + "required": [ + "page_id" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "Status page ID." + }, + "component_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Optional component IDs to filter subscribers by." + } + } + }, + "ExportedStatusPageSubscriberItem": { + "type": "object", + "description": "A status page subscriber, as returned by the subscriber list and export endpoints.", + "required": [ + "recipient", + "method", + "components", + "all" + ], + "properties": { + "recipient": { + "type": "string", + "description": "Subscriber recipient: email address for public pages, user ID for internal pages." + }, + "method": { + "type": "string", + "enum": [ + "email", + "im" + ], + "description": "Subscription delivery method." + }, + "components": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusPageComponentItem" + }, + "description": "Components this subscriber has subscribed to." + }, + "all": { + "type": "boolean", + "description": "Whether the subscriber is subscribed to all components." + }, + "locale": { + "type": "string", + "description": "Preferred locale for notifications." + } + } + }, + "FeedDetailAlertClose": { + "type": "object", + "description": "Detail payload for `a_close`. No fields.", + "properties": {}, + "additionalProperties": false, + "title": "a_close" + }, + "FeedDetailAlertComment": { + "type": "object", + "description": "Detail payload for `a_comm`.", + "properties": { + "comment": { + "type": "string", + "description": "Comment body." + } + }, + "title": "a_comm" + }, + "FeedDetailAlertTrigger": { + "type": "object", + "description": "Detail payload for `a_new`.", + "properties": { + "severity": { + "$ref": "#/components/schemas/FeedSeverity" + }, + "status": { + "$ref": "#/components/schemas/FeedSeverity" + } + }, + "title": "a_new" + }, + "FeedDetailIncidentAck": { + "type": "object", + "description": "Detail payload for `i_ack`.", + "properties": { + "progress": { + "type": "string", + "description": "Progress note entered at acknowledgement." + } + }, + "title": "i_ack" + }, + "FeedDetailIncidentAddRspd": { + "type": "object", + "description": "Detail payload for `i_a_rspd`.", + "properties": { + "to": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs added as responders." + } + }, + "title": "i_a_rspd" + }, + "FeedDetailIncidentAssign": { + "type": "object", + "description": "Detail payload for `i_assign`. Extends `AssignedTo` with the set of target member IDs.", + "allOf": [ + { + "$ref": "#/components/schemas/AssignedTo" + }, + { + "type": "object", + "properties": { + "to": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs that received the assignment." + } + } + } + ], + "title": "i_assign" + }, + "FeedDetailIncidentAutoRefreshCard": { + "type": "object", + "description": "Detail payload for `i_auto_refresh`. No fields.", + "properties": {}, + "additionalProperties": false, + "title": "i_auto_refresh" + }, + "FeedDetailIncidentComment": { + "type": "object", + "description": "Detail payload for `i_comm`.", + "properties": { + "comment": { + "type": "string", + "description": "Comment body." + }, + "mute_reply": { + "type": "boolean", + "description": "Whether replies to this comment are muted." + } + }, + "title": "i_comm" + }, + "FeedDetailIncidentCustomAction": { + "type": "object", + "description": "Detail payload for `i_custom`.", + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID that executed the action." + }, + "integration_name": { + "type": "string", + "description": "Integration display name." + } + }, + "title": "i_custom" + }, + "FeedDetailIncidentMerge": { + "type": "object", + "description": "Detail payload for `i_merge`.", + "properties": { + "comment": { + "type": "string", + "description": "Merge comment." + }, + "source_incidents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentShort" + }, + "description": "Source incidents that were merged." + }, + "target_incident": { + "$ref": "#/components/schemas/IncidentShort" + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "Member ID that performed the merge." + }, + "title": { + "type": "string", + "description": "Resulting incident title." + }, + "remove_source_incidents": { + "type": "boolean", + "description": "True if the source incidents were removed after merging." + }, + "source_responders": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Responder member IDs carried over from the source incidents." + } + }, + "title": "i_merge" + }, + "FeedDetailIncidentMuteByFlapping": { + "type": "object", + "description": "Detail payload for `i_m_flapping`.", + "properties": { + "max_changes": { + "type": "integer", + "description": "Maximum state changes allowed within the window." + }, + "in_mins": { + "type": "integer", + "description": "Window length in minutes." + }, + "mute_mins": { + "type": "integer", + "description": "Mute duration in minutes once flapping is detected." + } + }, + "title": "i_m_flapping" + }, + "FeedDetailIncidentMuteReply": { + "type": "object", + "description": "Detail payload for `i_m_reply`. No fields.", + "properties": {}, + "additionalProperties": false, + "title": "i_m_reply" + }, + "FeedDetailIncidentNew": { + "type": "object", + "description": "Detail payload for `i_new`.", + "properties": { + "severity": { + "$ref": "#/components/schemas/FeedSeverity" + }, + "title": { + "type": "string", + "description": "Initial incident title." + }, + "reporter_email": { + "type": "string", + "description": "Email of the reporter when the incident was created externally." + } + }, + "title": "i_new" + }, + "FeedDetailIncidentNotify": { + "type": "object", + "description": "Detail payload for `i_notify`.", + "required": [ + "layer_idx" + ], + "properties": { + "rid": { + "type": "string", + "description": "Notification record ID." + }, + "msg_id": { + "type": "string", + "description": "Upstream message ID returned by the delivery channel." + }, + "fire_type": { + "type": "string", + "enum": [ + "fire", + "refire" + ], + "description": "Whether this is the first fire or a refire." + }, + "escalate_rule_name": { + "type": "string", + "description": "Escalation rule display name." + }, + "escalate_rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Escalation rule ID (MongoDB ObjectID)." + }, + "layer_idx": { + "type": "integer", + "description": "Escalation level index used for this notification." + }, + "by": { + "type": "string", + "description": "Delivery channel or method label." + }, + "persons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotifyPerson" + }, + "description": "Per-person delivery records." + }, + "chats": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotifyChat" + }, + "description": "Per-chat delivery records." + }, + "robots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotifyRobot" + }, + "description": "Per-robot delivery records." + } + }, + "title": "i_notify" + }, + "FeedDetailIncidentReopen": { + "type": "object", + "description": "Detail payload for `i_reopen`.", + "properties": { + "reason": { + "type": "string", + "description": "Reason why the incident was reopened." + } + }, + "title": "i_reopen" + }, + "FeedDetailIncidentResetDescription": { + "type": "object", + "description": "Detail payload for `i_r_desc`. No fields.", + "properties": {}, + "additionalProperties": false, + "title": "i_r_desc" + }, + "FeedDetailIncidentResetField": { + "type": "object", + "description": "Detail payload for `i_r_field`.", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string", + "description": "Name of the custom field that was updated." + }, + "to": { + "description": "New value of the custom field. Type depends on the field definition." + } + }, + "title": "i_r_field" + }, + "FeedDetailIncidentResetImpact": { + "type": "object", + "description": "Detail payload for `i_r_impact`. No fields.", + "properties": {}, + "additionalProperties": false, + "title": "i_r_impact" + }, + "FeedDetailIncidentResetResolution": { + "type": "object", + "description": "Detail payload for `i_r_rsltn`. No fields.", + "properties": {}, + "additionalProperties": false, + "title": "i_r_rsltn" + }, + "FeedDetailIncidentResetRootCause": { + "type": "object", + "description": "Detail payload for `i_r_rc`. No fields.", + "properties": {}, + "additionalProperties": false, + "title": "i_r_rc" + }, + "FeedDetailIncidentResetSeverity": { + "type": "object", + "description": "Detail payload for `i_r_severity`.", + "properties": { + "from": { + "$ref": "#/components/schemas/FeedSeverity" + }, + "to": { + "$ref": "#/components/schemas/FeedSeverity" + } + }, + "title": "i_r_severity" + }, + "FeedDetailIncidentResetTitle": { + "type": "object", + "description": "Detail payload for `i_r_title`.", + "properties": { + "from": { + "type": "string", + "description": "Previous title." + }, + "to": { + "type": "string", + "description": "New title." + } + }, + "title": "i_r_title" + }, + "FeedDetailIncidentResolve": { + "type": "object", + "description": "Detail payload for `i_rslv`.", + "required": [ + "from" + ], + "properties": { + "from": { + "type": "string", + "enum": [ + "voice", + "console", + "card", + "wcard", + "event", + "autorslv", + "autorefresh", + "escalation" + ], + "description": "Source that triggered the resolve action." + } + }, + "title": "i_rslv" + }, + "FeedDetailIncidentSnooze": { + "type": "object", + "description": "Detail payload for `i_snooze`.", + "properties": { + "minutes": { + "type": "integer", + "format": "int64", + "description": "Snooze duration in minutes." + } + }, + "title": "i_snooze" + }, + "FeedDetailIncidentStorm": { + "type": "object", + "description": "Detail payload for `i_storm`.", + "properties": { + "threshold": { + "type": "integer", + "description": "Storm threshold that was reached." + } + }, + "title": "i_storm" + }, + "FeedDetailIncidentUnack": { + "type": "object", + "description": "Detail payload for `i_unack`.", + "properties": { + "progress": { + "type": "string", + "description": "Progress note entered when acknowledgement was removed." + } + }, + "title": "i_unack" + }, + "FeedDetailIncidentWake": { + "type": "object", + "description": "Detail payload for `i_wake`.", + "properties": { + "snoozedBefore": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp at which the prior snooze was scheduled to end." + } + }, + "title": "i_wake" + }, + "FeedDetailIncidentWarRoomCreate": { + "type": "object", + "description": "Detail payload for `i_wr_create`.", + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID that hosts the war room chat group." + }, + "chat_id": { + "type": "string", + "description": "Chat group identifier." + }, + "chat_name": { + "type": "string", + "description": "Chat group display name." + }, + "plugin_type": { + "type": "string", + "description": "Chat integration plugin type." + }, + "integration_name": { + "type": "string", + "description": "Integration display name." + }, + "share_link": { + "type": "string", + "description": "Shareable join link for the war room." + } + }, + "title": "i_wr_create" + }, + "FeedDetailIncidentWarRoomDelete": { + "type": "object", + "description": "Detail payload for `i_wr_delete`.", + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID that hosted the war room chat group." + }, + "chat_id": { + "type": "string", + "description": "Chat group identifier." + }, + "chat_name": { + "type": "string", + "description": "Chat group display name." + }, + "plugin_type": { + "type": "string", + "description": "Chat integration plugin type." + }, + "integration_name": { + "type": "string", + "description": "Integration display name." + } + }, + "title": "i_wr_delete" + }, + "FeedItem": { + "type": "object", + "description": "A single alert activity feed entry. The `detail` field is discriminated by `type`; see the per-type `FeedDetailAlert*` schemas.", + "required": [ + "ref_id", + "type", + "detail", + "account_id", + "creator_id", + "created_at", + "updated_at" + ], + "properties": { + "ref_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "ObjectID of the alert this entry references." + }, + "type": { + "$ref": "#/components/schemas/AlertFeedType" + }, + "detail": { + "description": "Type-specific payload. The concrete shape is determined by `type`.", + "oneOf": [ + { + "$ref": "#/components/schemas/FeedDetailAlertTrigger" + }, + { + "$ref": "#/components/schemas/FeedDetailAlertComment" + }, + { + "$ref": "#/components/schemas/FeedDetailAlertClose" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "a_new": "#/components/schemas/FeedDetailAlertTrigger", + "a_comm": "#/components/schemas/FeedDetailAlertComment", + "a_close": "#/components/schemas/FeedDetailAlertClose" + } + } + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "Member ID of the creator. 0 for system-generated entries." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp in Unix epoch milliseconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp in Unix epoch milliseconds." + } + } + }, + "FeedSeverity": { + "type": "string", + "enum": [ + "Ok", + "Critical", + "Warning", + "Info" + ], + "description": "Severity level." + }, + "FilterCondition": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "Field name to filter on. Use plain names for built-in alert fields (e.g. `alert_severity`, `alert_key`, `check`, `resource`, `service`, `cluster`) or the `labels.` prefix for custom alert labels (e.g. `labels.env`, `labels.region`)." + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "Filter operator. `IN` — value must match one of `vals`; `NOTIN` — value must not match any of `vals`. Supports regex patterns wrapped in `/pattern/`." + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of values to match against. Each entry is a plain string or a `/regex/` pattern." + } + } + }, + "FilterGroup": { + "$ref": "#/components/schemas/OrFilterGroup" + }, + "Flapping": { + "type": "object", + "description": "Flapping detection configuration.", + "properties": { + "is_disabled": { + "type": "boolean", + "description": "Disable flapping detection." + }, + "max_changes": { + "type": "integer", + "minimum": 2, + "maximum": 100, + "description": "Max state changes allowed within `in_mins`." + }, + "in_mins": { + "type": "integer", + "minimum": 1, + "maximum": 1440, + "description": "Observation window in minutes." + }, + "mute_mins": { + "type": "integer", + "minimum": 0, + "maximum": 1440, + "description": "Mute duration in minutes after flapping is detected." + } + } + }, + "GetWarRoomDetailRequest": { + "type": "object", + "description": "Parameters for retrieving a war room's live detail.", + "required": [ + "integration_id", + "chat_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "IM integration ID that hosts the war room." + }, + "chat_id": { + "type": "string", + "description": "Chat/group ID on the IM side." + } + } + }, + "GetWebhookHistoryDetailRequest": { + "type": "object", + "description": "Lookup parameters for a single webhook delivery record.", + "required": [ + "event_id", + "integration_id" + ], + "properties": { + "event_id": { + "type": "string", + "description": "Event ID returned by `ListWebhookHistory`." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "Integration ID the event belongs to." + } + } + }, + "Group": { + "type": "object", + "description": "Alert grouping configuration.", + "required": [ + "method" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "i", + "p", + "n" + ], + "description": "Grouping method: `i` intelligent, `p` pattern, `n` none." + }, + "equals": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "maxItems": 5, + "description": "Groups of label keys whose equality defines a bucket." + }, + "cases": { + "type": "array", + "maxItems": 100, + "description": "Per-filter grouping overrides.", + "items": { + "type": "object" + } + }, + "all_equals_required": { + "type": "boolean", + "description": "When true, all listed keys must be present for grouping." + }, + "time_window": { + "type": "integer", + "minimum": 0, + "description": "Grouping time window in minutes. Default max is 1440 minutes (24 h); extended accounts may allow up to 43200 minutes (30 days)." + }, + "window_type": { + "type": "string", + "enum": [ + "tumbling", + "sliding" + ], + "description": "Window type. Defaults to `tumbling`." + }, + "storm_threshold": { + "type": "integer", + "minimum": 0, + "maximum": 10000, + "description": "Alert storm threshold." + }, + "storm_thresholds": { + "type": "array", + "items": { + "type": "integer" + }, + "maxItems": 5, + "description": "Multi-level storm thresholds." + }, + "i_keys": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 10, + "description": "Label keys used for intelligent grouping embeddings." + }, + "i_score_threshold": { + "type": "number", + "format": "float", + "minimum": 0.5, + "maximum": 1, + "description": "Intelligent grouping similarity threshold." + } + } + }, + "Image": { + "type": "object", + "description": "Image or attachment reference.", + "required": [ + "src" + ], + "properties": { + "src": { + "type": "string", + "description": "Image source. Either an `img_` upload token or an `http(s)` URL." + }, + "href": { + "type": "string", + "description": "Optional link the image points to." + }, + "alt": { + "type": "string", + "description": "Alt text." + } + } + }, + "ImportStatusPageSubscriberItem": { + "type": "object", + "description": "A single subscriber to import.", + "required": [ + "recipient" + ], + "properties": { + "recipient": { + "type": "string", + "maxLength": 255, + "description": "Email address (for public pages) or user ID (for internal pages)." + }, + "component_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Component IDs the subscriber should receive notifications for." + }, + "change_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Specific event IDs the subscriber should receive notifications for." + }, + "all": { + "type": "boolean", + "description": "When true, the subscriber receives notifications for all components. Must be true when `component_ids` and `change_ids` are both empty." + }, + "locale": { + "type": "string", + "description": "Preferred locale for notifications. Defaults to the request locale when omitted." + } + } + }, + "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`.", + "required": [ + "page_id", + "method" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "Target status page ID." + }, + "method": { + "type": "string", + "enum": [ + "email", + "im" + ], + "description": "Subscription method. `email` is only valid for public pages; `im` is only valid for internal pages." + }, + "subscribers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportStatusPageSubscriberItem" + }, + "description": "Subscribers to import." + } + } + }, + "IncProgressCnts": { + "type": "object", + "required": [ + "Triggered", + "Processing" + ], + "properties": { + "Triggered": { + "type": "integer", + "format": "int64", + "description": "Count of triggered incidents in the last 30 days." + }, + "Processing": { + "type": "integer", + "format": "int64", + "description": "Count of processing incidents in the last 30 days." + } + } + }, + "IncidentFeedItem": { + "type": "object", + "description": "Single incident timeline entry. The `detail` field is discriminated by `type`; see the per-type `FeedDetail*` schemas.", + "required": [ + "ref_id", + "type", + "detail", + "account_id", + "creator_id", + "created_at", + "updated_at" + ], + "properties": { + "ref_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "ObjectID of the source alert or incident this entry references." + }, + "type": { + "$ref": "#/components/schemas/IncidentFeedType" + }, + "detail": { + "description": "Type-specific payload. The concrete shape is determined by `type`.", + "oneOf": [ + { + "$ref": "#/components/schemas/FeedDetailIncidentNew" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentAssign" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentAddRspd" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentNotify" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentStorm" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentSnooze" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentWake" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentAck" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentUnack" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentComment" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResolve" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentReopen" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentMerge" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetTitle" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetDescription" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetImpact" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetRootCause" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetResolution" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetSeverity" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetField" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentMuteByFlapping" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentMuteReply" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentCustomAction" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentWarRoomCreate" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentWarRoomDelete" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentAutoRefreshCard" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "i_new": "#/components/schemas/FeedDetailIncidentNew", + "i_assign": "#/components/schemas/FeedDetailIncidentAssign", + "i_a_rspd": "#/components/schemas/FeedDetailIncidentAddRspd", + "i_notify": "#/components/schemas/FeedDetailIncidentNotify", + "i_storm": "#/components/schemas/FeedDetailIncidentStorm", + "i_snooze": "#/components/schemas/FeedDetailIncidentSnooze", + "i_wake": "#/components/schemas/FeedDetailIncidentWake", + "i_ack": "#/components/schemas/FeedDetailIncidentAck", + "i_unack": "#/components/schemas/FeedDetailIncidentUnack", + "i_comm": "#/components/schemas/FeedDetailIncidentComment", + "i_rslv": "#/components/schemas/FeedDetailIncidentResolve", + "i_reopen": "#/components/schemas/FeedDetailIncidentReopen", + "i_merge": "#/components/schemas/FeedDetailIncidentMerge", + "i_r_title": "#/components/schemas/FeedDetailIncidentResetTitle", + "i_r_desc": "#/components/schemas/FeedDetailIncidentResetDescription", + "i_r_impact": "#/components/schemas/FeedDetailIncidentResetImpact", + "i_r_rc": "#/components/schemas/FeedDetailIncidentResetRootCause", + "i_r_rsltn": "#/components/schemas/FeedDetailIncidentResetResolution", + "i_r_severity": "#/components/schemas/FeedDetailIncidentResetSeverity", + "i_r_field": "#/components/schemas/FeedDetailIncidentResetField", + "i_m_flapping": "#/components/schemas/FeedDetailIncidentMuteByFlapping", + "i_m_reply": "#/components/schemas/FeedDetailIncidentMuteReply", + "i_custom": "#/components/schemas/FeedDetailIncidentCustomAction", + "i_wr_create": "#/components/schemas/FeedDetailIncidentWarRoomCreate", + "i_wr_delete": "#/components/schemas/FeedDetailIncidentWarRoomDelete", + "i_auto_refresh": "#/components/schemas/FeedDetailIncidentAutoRefreshCard" + } + } + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "User ID of the actor. `0` means system-generated." + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "Soft-delete timestamp (ms). Zero if not deleted." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp in milliseconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp in milliseconds." + } + } + }, + "IncidentFeedType": { + "type": "string", + "description": "Incident timeline entry type. Each value identifies one lifecycle event; the matching `detail` payload shape is determined by this field. Incident types are prefixed with `i_`.\n\n| Type | Meaning |\n|---|---|\n| `i_new` | Incident Created: A new incident was created automatically or manually. |\n| `i_assign` | Assigned: Incident was assigned to responders. |\n| `i_a_rspd` | Responder Added: Additional responders joined the incident. |\n| `i_notify` | Notification dispatched through a channel at a specific escalation level. |\n| `i_storm` | Alert storm threshold reached on the incident. |\n| `i_snooze` | Notifications snoozed for a given duration. |\n| `i_wake` | Snooze cancelled and notifications resumed. |\n| `i_ack` | Acknowledged: Responder confirmed they are working on the incident. |\n| `i_unack` | Acknowledgement removed. |\n| `i_comm` | Comment: Responder logged progress or key information. |\n| `i_rslv` | Resolved: Incident was marked as resolved. |\n| `i_reopen` | Reopened: Resolved incident was reopened, possibly due to recurrence. |\n| `i_merge` | Merged: Multiple related incidents were merged into one. |\n| `i_r_title` | Title updated. |\n| `i_r_desc` | Description updated. |\n| `i_r_impact` | Impact updated. |\n| `i_r_rc` | Root cause updated. |\n| `i_r_rsltn` | Resolution updated. |\n| `i_r_severity` | Severity Changed: Incident severity level was adjusted. |\n| `i_r_field` | Custom field value updated. |\n| `i_m_flapping` | Incident muted by flapping detection. |\n| `i_m_reply` | Mute reply marker on a comment. |\n| `i_custom` | Action: Automated action or script was triggered. |\n| `i_wr_create` | War Room Created: Chat group was created for collaborative response. |\n| `i_wr_delete` | War room chat group deleted. |\n| `i_auto_refresh` | Card auto-refresh event posted back to the timeline. |\n| `a_merge` | Alert Merged: An alert was merged into an existing incident. |", + "enum": [ + "i_new", + "i_assign", + "i_a_rspd", + "i_notify", + "i_storm", + "i_snooze", + "i_wake", + "i_ack", + "i_unack", + "i_comm", + "i_rslv", + "i_reopen", + "i_merge", + "i_r_title", + "i_r_desc", + "i_r_impact", + "i_r_rc", + "i_r_rsltn", + "i_r_severity", + "i_r_field", + "i_m_flapping", + "i_m_reply", + "i_custom", + "i_wr_create", + "i_wr_delete", + "i_auto_refresh", + "a_merge" + ] + }, + "IncidentInfo": { + "type": "object", + "description": "Detailed incident record.", + "required": [ + "incident_id", + "account_id", + "channel_id", + "integration_id", + "integration_ids", + "integration_types", + "dedup_key", + "equals_md5", + "start_time", + "end_time", + "last_time", + "ack_time", + "close_time", + "creator_id", + "closer_id", + "owner_id", + "incident_status", + "incident_severity", + "progress", + "title", + "description", + "ai_summary", + "impact", + "root_cause", + "resolution", + "num", + "created_at", + "updated_at", + "snoozed_before", + "group_method", + "ever_muted", + "labels", + "fields", + "assigned_to", + "alert_cnt", + "active_alert_cnt", + "alert_event_cnt", + "responders", + "account_name", + "account_locale", + "account_time_zone", + "channel_name", + "channel_status", + "detail_url", + "silence_url", + "post_mortem_id", + "images", + "manual_overrides" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID that owns the incident." + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel ID. 0 for standalone incidents." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "First integration associated with the incident." + }, + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "All integration IDs contributing alerts to this incident." + }, + "integration_types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Integration type strings for all contributing integrations." + }, + "dedup_key": { + "type": "string", + "description": "Deduplication key used to coalesce alerts." + }, + "equals_md5": { + "type": "string", + "description": "MD5 hash used for content-equality checks." + }, + "start_time": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) when the incident started." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) when the incident ended. 0 if still active." + }, + "last_time": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) of the most recent update." + }, + "ack_time": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) when the incident was first acknowledged. 0 if unacknowledged." + }, + "close_time": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) when the incident was closed. 0 if still open." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "Member ID that created the incident. 0 if auto-created by the system." + }, + "closer_id": { + "type": "integer", + "format": "int64", + "description": "Member ID that closed the incident. 0 if auto-closed." + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "Primary owner member ID. 0 if none." + }, + "incident_status": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "Current incident status, derived from alert statuses." + }, + "incident_severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "Configured incident severity." + }, + "progress": { + "type": "string", + "enum": [ + "Triggered", + "Processing", + "Closed" + ], + "description": "Incident progress state." + }, + "title": { + "type": "string", + "description": "Incident title." + }, + "description": { + "type": "string", + "description": "Incident description." + }, + "ai_summary": { + "type": "string", + "description": "AI-generated summary of the incident." + }, + "impact": { + "type": "string", + "description": "Impact description." + }, + "root_cause": { + "type": "string", + "description": "Root cause analysis." + }, + "resolution": { + "type": "string", + "description": "Resolution notes." + }, + "num": { + "type": "string", + "description": "Short display identifier; not guaranteed unique." + }, + "frequency": { + "type": "string", + "description": "Frequency bucket for recurrence analysis: `frequent` or `rare`.", + "enum": [ + "frequent", + "rare" + ] + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "Soft-delete timestamp (seconds). Zero if not deleted." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (seconds)." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp (seconds)." + }, + "snoozed_before": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) until which notifications are snoozed. 0 if not snoozed." + }, + "group_method": { + "type": "string", + "description": "Alert grouping method: `i` intelligent, `p` pattern, `n` none.", + "enum": [ + "i", + "p", + "n" + ] + }, + "ever_muted": { + "type": "boolean", + "description": "Whether the incident has ever been silenced." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Labels propagated from alerts." + }, + "fields": { + "type": "object", + "additionalProperties": true, + "description": "Custom field values keyed by field name." + }, + "assigned_to": { + "$ref": "#/components/schemas/AssignedTo", + "description": "Current assignment target for the incident." + }, + "reporter_email": { + "type": "string", + "description": "Reporter email for manually created incidents." + }, + "alert_cnt": { + "type": "integer", + "format": "int64", + "description": "Total count of alerts merged into this incident." + }, + "active_alert_cnt": { + "type": "integer", + "format": "int64", + "description": "Count of alerts currently in Critical/Warning/Info state." + }, + "alert_event_cnt": { + "type": "integer", + "format": "int64", + "description": "Total raw alert event count across all merged alerts." + }, + "alerts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertInfo" + }, + "description": "Embedded alerts, only populated for notification templates and custom actions." + }, + "closer": { + "$ref": "#/components/schemas/PersonShort", + "description": "Closer member info." + }, + "creator": { + "$ref": "#/components/schemas/PersonShort", + "description": "Creator member info." + }, + "owner": { + "$ref": "#/components/schemas/PersonShort", + "description": "Owner member info. May be deprecated.", + "deprecated": true + }, + "responders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Responder" + }, + "description": "Current responders with assignment/acknowledgement state." + }, + "account_name": { + "type": "string", + "description": "Account name." + }, + "account_locale": { + "type": "string", + "description": "Account locale." + }, + "account_time_zone": { + "type": "string", + "description": "Account time zone." + }, + "channel_name": { + "type": "string", + "description": "Channel display name." + }, + "channel_status": { + "type": "string", + "description": "Channel status." + }, + "detail_url": { + "type": "string", + "description": "Web console URL for the incident." + }, + "silence_url": { + "type": "string", + "description": "Quick-silence URL for this incident." + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LinkItem" + }, + "description": "Channel-level link integrations rendered for this incident." + }, + "integration_type": { + "type": "string", + "description": "First alert's integration type string, used by the detail page for label mappings." + }, + "post_mortem_id": { + "type": "string", + "description": "Associated post-mortem ID, if any. One incident can only link to a single post-mortem." + }, + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Image" + }, + "description": "Attached images." + }, + "manual_overrides": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Fields that were manually overridden after auto-population." + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "Deprecated. Use `integration_id` instead.", + "deprecated": true + }, + "data_source_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Deprecated. Use `integration_ids` instead.", + "deprecated": true + }, + "data_source_type": { + "type": "string", + "description": "Deprecated. Use `integration_type` instead.", + "deprecated": true + }, + "data_source_types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Deprecated. Use `integration_types` instead.", + "deprecated": true + } + } + }, + "IncidentInfoRequest": { + "type": "object", + "description": "Lookup parameters for a single incident.", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + } + } + }, + "IncidentListResponse": { + "type": "object", + "description": "Paginated list of incidents.", + "required": [ + "items", + "total", + "has_next_page" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentInfo" + }, + "description": "Incident list for the current page." + }, + "total": { + "type": "integer", + "format": "int64", + "description": "Total number of matching incidents." + }, + "has_next_page": { + "type": "boolean", + "description": "True when more results are available beyond this page." + }, + "search_after_ctx": { + "type": "string", + "description": "Opaque cursor to pass as `search_after_ctx` on the next request." + } + } + }, + "IncidentRawItem": { + "type": "object", + "description": "Raw incident row returned by the analytics incident list, with per-incident handling metrics attached.", + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "team_id": { + "type": "integer", + "format": "int64" + }, + "team_name": { + "type": "string" + }, + "channel_id": { + "type": "integer", + "format": "int64" + }, + "channel_name": { + "type": "string" + }, + "progress": { + "type": "string", + "description": "Incident progress state (e.g. `Triggered`, `Acknowledged`, `Closed`)." + }, + "severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ] + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "closed_by": { + "type": "string", + "enum": [ + "auto", + "timeout", + "manually" + ] + }, + "seconds_to_ack": { + "type": "integer", + "format": "int64" + }, + "seconds_to_close": { + "type": "integer", + "format": "int64" + }, + "engaged_seconds": { + "type": "integer", + "format": "int64" + }, + "hours": { + "type": "string" + }, + "responders": { + "type": "array", + "items": { + "type": "object", + "description": "Responder entry (see Incident module for full shape)." + } + }, + "assigned_to": { + "type": "object", + "description": "Current assignment target for the incident.", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs assigned directly to this incident." + }, + "escalate_rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Escalation rule ID (MongoDB ObjectID) driving the assignment." + }, + "escalate_rule_name": { + "type": "string", + "description": "Display name of the escalation rule." + }, + "layer_idx": { + "type": "integer", + "description": "Current level index within the escalation rule." + }, + "type": { + "type": "string", + "enum": [ + "assign", + "reassign", + "escalate", + "reopen" + ], + "description": "Assignment type." + }, + "assigned_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) when this assignment was made." + }, + "id": { + "type": "string", + "description": "Internal assignment record ID." + } + } + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "fields": { + "type": "object", + "additionalProperties": true + }, + "notifications": { + "type": "integer", + "format": "int64" + }, + "interruptions": { + "type": "integer", + "format": "int64" + }, + "assignments": { + "type": "integer", + "format": "int64" + }, + "reassignments": { + "type": "integer", + "format": "int64" + }, + "acknowledgements": { + "type": "integer", + "format": "int64" + }, + "escalations": { + "type": "integer", + "format": "int64" + }, + "timeout_escalations": { + "type": "integer", + "format": "int64" + }, + "manual_escalations": { + "type": "integer", + "format": "int64" + }, + "creator_id": { + "type": "integer", + "format": "int64" + }, + "creator_name": { + "type": "string" + } + } + }, + "IncidentShort": { + "type": "object", + "description": "Brief incident reference embedded in an alert.", + "properties": { + "incident_id": { + "type": "string", + "description": "Incident ID (ObjectID hex string)." + }, + "title": { + "type": "string", + "description": "Incident title." + }, + "progress": { + "type": "string", + "description": "Incident progress (e.g. `Processing`, `Resolved`)." + } + } + }, + "InhibitRuleItem": { + "type": "object", + "required": [ + "account_id", + "channel_id", + "priority", + "rule_name", + "description", + "source_filters", + "target_filters", + "equals", + "is_directly_discard", + "status", + "rule_id", + "updated_by", + "created_at", + "updated_at" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64" + }, + "channel_id": { + "type": "integer", + "format": "int64" + }, + "priority": { + "type": "integer" + }, + "rule_name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "source_filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "target_filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "equals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Label keys used to pair source and target alerts." + }, + "is_directly_discard": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ] + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "updated_by": { + "type": "integer", + "format": "int64" + }, + "deleted_at": { + "type": "integer", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + } + } + }, + "InsightAlertByLabelItem": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "Aggregation key value (check name or resource identifier)." + }, + "hours": { + "type": "string", + "description": "Hour bucket when `split_hours` is enabled." + }, + "total_alert_cnt": { + "type": "integer", + "format": "int64" + }, + "total_alert_event_cnt": { + "type": "integer", + "format": "int64" + } + } + }, + "InsightAlertByLabelResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InsightAlertByLabelItem" + } + } + } + }, + "InsightFilter": { + "type": "object", + "description": "Shared filter envelope for insight and export endpoints. Severities accept up to 3 values; team/channel/responder/incident filters accept up to 100 IDs each. The time range cannot exceed one year.", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "Start time, Unix seconds. Must be greater than 0." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "End time, Unix seconds. Must be greater than `start_time`." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by team IDs. At most 100 entries." + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by channel IDs. At most 100 entries." + }, + "responder_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by responder person IDs. At most 100 entries." + }, + "severities": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ] + }, + "description": "Filter by severity. At most 3 entries." + }, + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "description": "Filter by incident IDs (MongoDB ObjectIDs). At most 100 entries." + }, + "query": { + "type": "string", + "description": "Full-text query applied to incident title and description." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Label filters (exact match)." + }, + "fields": { + "type": "object", + "additionalProperties": true, + "description": "Custom-field filters (exact match)." + }, + "orderby": { + "type": "string", + "enum": [ + "created_at" + ], + "description": "Field to sort the underlying incident set by." + }, + "asc": { + "type": "boolean", + "description": "Sort ascending when `true`, descending otherwise." + }, + "is_my_team": { + "type": "boolean", + "description": "Restrict results to teams the caller belongs to. When true and the caller has no teams, the result set is empty." + }, + "time_zone": { + "type": "string", + "description": "IANA time zone name used to interpret the time range (e.g. `Asia/Shanghai`). Defaults to the account time zone." + }, + "seconds_to_close_from": { + "type": "integer", + "format": "int64", + "description": "Lower bound (inclusive) on time-to-close, in seconds." + }, + "seconds_to_close_to": { + "type": "integer", + "format": "int64", + "description": "Upper bound (exclusive) on time-to-close, in seconds. Must be greater than `seconds_to_close_from` when both are set." + }, + "seconds_to_ack_from": { + "type": "integer", + "format": "int64", + "description": "Lower bound (inclusive) on time-to-acknowledge, in seconds." + }, + "seconds_to_ack_to": { + "type": "integer", + "format": "int64", + "description": "Upper bound (exclusive) on time-to-acknowledge, in seconds. Must be greater than `seconds_to_ack_from` when both are set." + }, + "export_fields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Subset of CSV column keys to include in the export. At most 50 entries. Only used by the export endpoints." + }, + "description_html_to_text": { + "type": "boolean", + "description": "Strip HTML markup from the description column when exporting." + } + } + }, + "InsightIncidentExportRequest": { + "$ref": "#/components/schemas/InsightFilter" + }, + "InsightIncidentListRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightFilter" + }, + { + "type": "object", + "description": "Paged incident list request. Extends InsightFilter with pagination.", + "properties": { + "p": { + "type": "integer", + "minimum": 1, + "default": 1, + "description": "Page number, starting at 1. Defaults to 1." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 20, + "description": "Page size, between 1 and 100. Defaults to 20." + }, + "search_after_ctx": { + "type": "string", + "description": "Cursor token returned by a previous page. Pass it back to fetch the next page." + } + } + } + ] + }, + "InsightIncidentListResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total matching incidents." + }, + "has_next_page": { + "type": "boolean" + }, + "search_after_ctx": { + "type": "string", + "description": "Cursor token to fetch the next page. Pass it back in the next request's `search_after_ctx`." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentRawItem" + } + } + } + }, + "InsightQueryRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightFilter" + }, + { + "type": "object", + "description": "Insight dimension-aggregation request. Extends InsightFilter with aggregation controls.", + "properties": { + "split_hours": { + "type": "boolean", + "description": "When true, metrics are split into `work`/`sleep`/`off` hour buckets." + }, + "aggregate_unit": { + "type": "string", + "enum": [ + "day", + "week", + "month" + ], + "description": "Aggregate metrics into time buckets. When set, the time range must cover at least 24 hours; `day` additionally caps the range at 31 days." + } + } + } + ] + }, + "InsightTopkAlertByLabelRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightQueryRequest" + }, + { + "type": "object", + "required": [ + "label" + ], + "properties": { + "label": { + "type": "string", + "enum": [ + "check", + "resource" + ], + "description": "Dimension to aggregate by." + }, + "k": { + "type": "integer", + "description": "Number of top entries to return, between 1 and 100." + }, + "orderby": { + "type": "string", + "enum": [ + "total_alert_cnt", + "total_alert_event_cnt" + ], + "description": "Field to sort results by." + }, + "asc": { + "type": "boolean", + "description": "Sort ascending when `true`, descending otherwise." + } + } + } + ] + }, + "LinkItem": { + "type": "object", + "description": "Channel-level link integration reference rendered from a template.", + "required": [ + "name", + "endpoint", + "open_type" + ], + "properties": { + "name": { + "type": "string", + "description": "Display name of the link." + }, + "endpoint": { + "type": "string", + "description": "Rendered URL for the link." + }, + "open_type": { + "type": "string", + "enum": [ + "popup", + "tab" + ], + "description": "How the link should be opened." + } + } + }, + "ListChannelsRequest": { + "type": "object", + "properties": { + "p": { + "type": "integer", + "minimum": 1, + "description": "Page number (1-based)." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 100, + "description": "Page size. Defaults to 100 when omitted." + }, + "orderby": { + "type": "string", + "enum": [ + "ranking", + "created_at", + "updated_at", + "channel_name", + "last_incident_at" + ], + "description": "Field used to order results." + }, + "asc": { + "type": "boolean", + "description": "When true, sort ascending." + }, + "is_my_managed": { + "type": "boolean", + "description": "When true, return only channels the caller manages." + }, + "is_my_starred": { + "type": "boolean", + "description": "When true, return only channels the caller has starred. Mutually exclusive with `is_my_team`." + }, + "is_brief": { + "type": "boolean", + "description": "When true, return only brief fields (`channel_id`, `channel_name`, `description`, `status`)." + }, + "is_my_team": { + "type": "boolean", + "description": "When true, return channels owned by the caller's teams. Mutually exclusive with `is_my_starred`." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by team IDs." + }, + "query": { + "type": "string", + "description": "Free-text query against channel name/description." + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by explicit channel IDs." + }, + "channel_name": { + "type": "string", + "description": "Exact-match filter on channel name. Takes priority over `query` for name filtering." + } + } + }, + "ListChannelsResponse": { + "type": "object", + "required": [ + "items", + "total", + "has_next_page" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelItem" + } + }, + "total": { + "type": "integer", + "format": "int64", + "description": "Total matching channels." + }, + "has_next_page": { + "type": "boolean", + "description": "Whether more pages are available." + } + } + }, + "ListDropRulesResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UnsubscribeRuleItem" + } + } + } + }, + "ListEscalationRulesResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EscalateRuleItem" + } + } + } + }, + "ListIncidentAlertsRequest": { + "type": "object", + "description": "Filters for alerts belonging to an incident.", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + }, + "include_events": { + "type": "boolean", + "description": "When true, include raw alert events in each alert item." + }, + "is_active": { + "type": "boolean", + "description": "When true return only active alerts (Critical/Warning/Info); when false return only recovered alerts (Ok). Omit to include all." + }, + "limit": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 1000, + "default": 1000, + "description": "Page size, at most 1000." + }, + "p": { + "type": "integer", + "format": "int64", + "minimum": 0, + "default": 1, + "description": "Page number starting at 1." + } + } + }, + "ListIncidentAlertsResponse": { + "type": "object", + "description": "Paginated list of alerts merged into an incident.", + "required": [ + "items", + "total" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertInfo" + }, + "description": "Alert list." + }, + "total": { + "type": "integer", + "format": "int64", + "description": "Total matching alerts." + } + } + }, + "ListIncidentFeedRequest": { + "type": "object", + "description": "Filters for the incident timeline query.", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + }, + "p": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "Page number starting at 1." + }, + "limit": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 100, + "default": 20, + "description": "Page size, at most 100." + }, + "asc": { + "type": "boolean", + "description": "Ascending chronological order when true." + }, + "types": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentFeedType" + }, + "description": "Optional filter restricting the returned entries to specific types." + } + } + }, + "ListIncidentFeedResponse": { + "type": "object", + "description": "Page of incident timeline entries.", + "required": [ + "has_next_page", + "items" + ], + "properties": { + "has_next_page": { + "type": "boolean", + "description": "True when more entries are available." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentFeedItem" + }, + "description": "Timeline entries for the current page." + } + } + }, + "ListIncidentsByIdsRequest": { + "type": "object", + "description": "Batch lookup parameters for incidents.", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "description": "Incident IDs to fetch." + } + } + }, + "ListIncidentsRequest": { + "type": "object", + "description": "Filters for the incident list query. `start_time` and `end_time` are required; the window must not exceed 31 days.", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "Window start, Unix seconds." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "Window end, Unix seconds. Must be greater than `start_time` and within 31 days." + }, + "asc": { + "type": "boolean", + "description": "Ascending order when true." + }, + "is_snoozed": { + "type": "boolean", + "description": "When true, include only snoozed incidents." + }, + "is_my_team": { + "type": "boolean", + "description": "When true, restrict to incidents in channels owned by the user's teams." + }, + "is_my_channel": { + "type": "boolean", + "description": "When true, restrict to incidents in channels the user personally owns." + }, + "ever_muted": { + "type": "boolean", + "description": "When true, include only incidents that were ever silenced." + }, + "is_rare": { + "type": "boolean", + "description": "When true, include only outlier (rare) incidents." + }, + "progress": { + "type": "string", + "description": "Comma-separated list of progress states to match (e.g. `Triggered,Processing`)." + }, + "query": { + "type": "string", + "description": "Full-text search query." + }, + "incident_severity": { + "type": "string", + "description": "Comma-separated list of severities (`Critical,Warning,Info`)." + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Channel IDs to filter by. Use 0 for standalone (global) incidents." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Team IDs; resolved to channels via channel ownership." + }, + "responder_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Responder member IDs." + }, + "acker_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Acknowledger member IDs." + }, + "creator_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Creator member IDs. Use 0 for automatically created incidents." + }, + "closer_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Closer member IDs. Use 0 for automatically closed incidents." + }, + "incident_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Restrict to the given incident IDs." + }, + "nums": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Restrict to the given short display identifiers." + }, + "p": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "Page number starting at 1." + }, + "limit": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 100, + "default": 20, + "description": "Page size, at most 100." + }, + "search_after_ctx": { + "type": "string", + "description": "Cursor from a previous response for forward pagination." + } + } + }, + "ListInhibitRulesResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InhibitRuleItem" + } + } + } + }, + "ListPastIncidentsRequest": { + "type": "object", + "description": "Parameters for the similar-past-incidents query.", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Reference incident ID (MongoDB ObjectID)." + }, + "limit": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 100, + "default": 5, + "description": "Maximum number of similar incidents to return." + } + } + }, + "ListPastIncidentsResponse": { + "type": "object", + "description": "List of similar historical incidents, ranked by relevance.", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PastIncidentItem" + }, + "description": "Similar past incidents with similarity scores." + } + } + }, + "ListPostMortemsRequest": { + "type": "object", + "description": "Filters for the post-mortem report list.", + "properties": { + "status": { + "type": "string", + "enum": [ + "drafting", + "published" + ], + "description": "Report status. Defaults to `published` on the server when omitted." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Team IDs to restrict the query to." + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Channel IDs to restrict the query to." + }, + "created_at_start_seconds": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "Filter by creation time: lower bound in seconds." + }, + "created_at_end_seconds": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "Filter by creation time: upper bound in seconds." + }, + "order_by": { + "type": "string", + "enum": [ + "created_at_seconds", + "updated_at_seconds" + ], + "description": "Field used to order results." + }, + "asc": { + "type": "boolean", + "description": "Ascending order when true." + }, + "p": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "Page number starting at 1." + }, + "limit": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 100, + "default": 20, + "description": "Page size, at most 100." + }, + "search_after_ctx": { + "type": "string", + "description": "Cursor from a previous response for forward pagination." + } + } + }, + "ListPostMortemsResponse": { + "type": "object", + "description": "Paginated list of post-mortem reports.", + "required": [ + "items", + "total", + "has_next_page" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PostMortemMeta" + }, + "description": "Post-mortem metadata for the current page." + }, + "total": { + "type": "integer", + "format": "int64", + "description": "Total matching reports." + }, + "has_next_page": { + "type": "boolean", + "description": "True when more results are available beyond this page." + }, + "search_after_ctx": { + "type": "string", + "description": "Cursor for forward pagination." + } + } + }, + "ListRoutesRequest": { + "type": "object", + "description": "Parameters for listing routing rules across multiple integrations.", + "required": [ + "integration_ids" + ], + "properties": { + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Integration IDs to fetch routing rules for." + } + } + }, + "ListRoutesResponse": { + "type": "object", + "description": "Response wrapper for the routing rule list.", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteItem" + }, + "description": "Routing rules of the requested integrations. Integrations without a configured rule are omitted." + } + } + }, + "ListSilenceRulesResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SilenceRuleItem" + } + } + } + }, + "ListWarRoomsRequest": { + "type": "object", + "description": "Parameters for listing war rooms linked to an incident.", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Optional filter: only return war rooms for this IM integration." + } + } + }, + "ListWarRoomsResponse": { + "type": "object", + "description": "List of war rooms associated with the incident.", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WarRoomItem" + }, + "description": "War room records." + } + } + }, + "ListWebhookHistoryRequest": { + "type": "object", + "description": "Filter parameters for listing outbound webhook delivery history. The query is bounded by a required millisecond time window; use `search_after_ctx` for cursor-based pagination.", + "required": [ + "limit", + "start_time", + "end_time" + ], + "properties": { + "search_after_ctx": { + "type": "string", + "description": "Opaque cursor returned by a previous call for fetching the next page." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "description": "Page size." + }, + "asc": { + "type": "boolean", + "description": "Ascending order by `event_time` when true; otherwise descending." + }, + "orderby": { + "type": "string", + "enum": [ + "event_time" + ], + "description": "Sort field. Currently only `event_time` is supported." + }, + "ref_id": { + "type": "string", + "maxLength": 128, + "description": "Reference ID filter (incident or alert ID)." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "Filter by integration ID." + }, + "event_types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by event type values." + }, + "status": { + "type": "string", + "enum": [ + "success", + "failed" + ], + "description": "Filter by delivery status." + }, + "start_time": { + "type": "integer", + "format": "int64", + "minimum": 1000000000000, + "maximum": 9999999999999, + "description": "Window start time in Unix milliseconds." + }, + "end_time": { + "type": "integer", + "format": "int64", + "minimum": 1000000000000, + "maximum": 9999999999999, + "description": "Window end time in Unix milliseconds. Must be greater than `start_time`." + } + } + }, + "ListWebhookHistoryResponse": { + "type": "object", + "description": "Paginated webhook delivery history.", + "required": [ + "items", + "total", + "search_after_ctx" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookHistoryItem" + } + }, + "total": { + "type": "integer", + "description": "Total number of matching records." + }, + "search_after_ctx": { + "type": "string", + "description": "Cursor to pass as `search_after_ctx` to fetch the next page. Empty when no further pages are available." + } + } + }, + "MappingAPICreateRequest": { + "type": "object", + "required": [ + "api_name", + "url" + ], + "properties": { + "api_name": { + "type": "string", + "maxLength": 199, + "description": "Unique API name (max 199 chars)." + }, + "description": { + "type": "string", + "description": "Optional description." + }, + "url": { + "type": "string", + "format": "uri", + "maxLength": 500, + "description": "HTTP/HTTPS endpoint URL (max 500 chars)." + }, + "insecure_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate verification. Default `false`." + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom HTTP request headers." + }, + "timeout": { + "type": "integer", + "description": "Request timeout in seconds (1–3). Default 2." + }, + "retry_count": { + "type": "integer", + "description": "Number of retries on failure (0–1). Default 0." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID." + } + } + }, + "MappingAPICreateResponse": { + "type": "object", + "properties": { + "api_id": { + "type": "string", + "description": "Created API ID (MongoDB ObjectID hex)." + }, + "api_name": { + "type": "string", + "description": "API name." + } + }, + "required": [ + "api_id", + "api_name" + ] + }, + "MappingAPIIDRequest": { + "type": "object", + "required": [ + "api_id" + ], + "properties": { + "api_id": { + "type": "string", + "description": "Mapping API ID (MongoDB ObjectID hex)." + } + } + }, + "MappingAPIItem": { + "type": "object", + "description": "Mapping API configuration.", + "properties": { + "api_id": { + "type": "string", + "description": "API ID (MongoDB ObjectID hex)." + }, + "api_name": { + "type": "string", + "description": "API name." + }, + "description": { + "type": "string", + "description": "Description." + }, + "url": { + "type": "string", + "description": "Endpoint URL." + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom request headers." + }, + "timeout": { + "type": "integer", + "description": "Request timeout in seconds." + }, + "retry_count": { + "type": "integer", + "description": "Retry count." + }, + "insecure_skip_verify": { + "type": "boolean", + "description": "Whether TLS verification is skipped." + }, + "status": { + "type": "string", + "description": "API status." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "Creator member ID." + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "Last updater member ID." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp, Unix seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp, Unix seconds." + } + }, + "required": [ + "api_id", + "api_name", + "description", + "url", + "headers", + "timeout", + "retry_count", + "insecure_skip_verify", + "status", + "team_id", + "updated_by", + "creator_id" + ] + }, + "MappingAPIListResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total API count." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MappingAPIItem" + }, + "description": "Mapping APIs." + } + }, + "required": [ + "total", + "items" + ] + }, + "MappingAPIUpdateRequest": { + "type": "object", + "required": [ + "api_id" + ], + "properties": { + "api_id": { + "type": "string", + "description": "Mapping API ID (MongoDB ObjectID hex)." + }, + "api_name": { + "type": "string", + "maxLength": 199, + "description": "New API name (max 199 chars)." + }, + "description": { + "type": "string", + "description": "New description." + }, + "url": { + "type": "string", + "format": "uri", + "maxLength": 500, + "description": "New endpoint URL (max 500 chars)." + }, + "insecure_skip_verify": { + "type": "boolean", + "description": "New TLS skip-verify setting." + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "New headers map (replaces existing)." + }, + "timeout": { + "type": "integer", + "description": "New timeout in seconds." + }, + "retry_count": { + "type": "integer", + "description": "New retry count." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "New owning team ID." + } + } + }, + "MappingDataDeleteRequest": { + "type": "object", + "required": [ + "schema_id", + "keys" + ], + "properties": { + "schema_id": { + "type": "string", + "description": "Mapping schema ID (MongoDB ObjectID hex)." + }, + "keys": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 100, + "description": "Keys of rows to delete." + } + } + }, + "MappingDataItem": { + "type": "object", + "description": "A single mapping data row.", + "properties": { + "key": { + "type": "string", + "description": "Composite key derived from source label values." + }, + "fields": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "All label key-value pairs for this row." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp, Unix seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp, Unix seconds." + } + } + }, + "MappingDataListRequest": { + "type": "object", + "required": [ + "schema_id" + ], + "properties": { + "schema_id": { + "type": "string", + "description": "Mapping schema ID (MongoDB ObjectID hex)." + }, + "query": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Exact-match filter on source label values. All source labels must be provided if any are specified." + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "Sort field." + }, + "asc": { + "type": "boolean", + "description": "Sort ascending when `true`." + }, + "p": { + "type": "integer", + "format": "int64", + "description": "Page number (1-based). Used for offset-based pagination." + }, + "limit": { + "type": "integer", + "format": "int64", + "description": "Page size (1–100, default 20)." + }, + "search_after_ctx": { + "type": "string", + "description": "Opaque cursor token for cursor-based pagination." + } + } + }, + "MappingDataListResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MappingDataItem" + }, + "description": "Data rows." + }, + "total": { + "type": "integer", + "format": "int64", + "description": "Total matching rows." + }, + "has_next_page": { + "type": "boolean", + "description": "Whether more pages exist." + }, + "search_after_ctx": { + "type": "string", + "description": "Cursor token for the next page." + } + }, + "required": [ + "items", + "total", + "has_next_page" + ] + }, + "MappingDataUploadRequest": { + "type": "object", + "description": "Multipart form-data upload request. `schema_id` is passed as a query parameter; `file` is the CSV file field.", + "properties": { + "schema_id": { + "type": "string", + "description": "Mapping schema ID (query parameter)." + }, + "file": { + "type": "string", + "format": "binary", + "description": "CSV file to upload." + } + } + }, + "MappingDataUpsertRequest": { + "type": "object", + "required": [ + "schema_id", + "docs" + ], + "properties": { + "schema_id": { + "type": "string", + "description": "Mapping schema ID (MongoDB ObjectID hex)." + }, + "docs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxItems": 1000, + "description": "Rows to insert or update. Each row must include all source and result labels." + } + } + }, + "MappingDataUpsertResponse": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Composite keys of upserted rows." + } + }, + "required": [ + "keys" + ] + }, + "MappingSchemaCreateRequest": { + "type": "object", + "required": [ + "schema_name", + "source_labels", + "result_labels" + ], + "properties": { + "schema_name": { + "type": "string", + "maxLength": 39, + "description": "Unique schema name (max 39 chars)." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Optional description (max 500 chars)." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID. `0` means no team." + }, + "source_labels": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 3, + "description": "Lookup key label names (1–3). Must not overlap with `result_labels`." + }, + "result_labels": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 10, + "description": "Output label names (1–10). Must not overlap with `source_labels`." + } + } + }, + "MappingSchemaCreateResponse": { + "type": "object", + "properties": { + "schema_id": { + "type": "string", + "description": "Created schema ID (MongoDB ObjectID hex)." + }, + "schema_name": { + "type": "string", + "description": "Schema name." + } + }, + "required": [ + "schema_id", + "schema_name" + ] + }, + "MappingSchemaIDRequest": { + "type": "object", + "required": [ + "schema_id" + ], + "properties": { + "schema_id": { + "type": "string", + "description": "Mapping schema ID (MongoDB ObjectID hex)." + } + } + }, + "MappingSchemaItem": { + "type": "object", + "description": "Mapping schema definition.", + "properties": { + "schema_id": { + "type": "string", + "description": "Schema ID (MongoDB ObjectID hex)." + }, + "schema_name": { + "type": "string", + "description": "Schema name." + }, + "description": { + "type": "string", + "description": "Schema description." + }, + "source_labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Lookup key label names." + }, + "result_labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Output label names." + }, + "status": { + "type": "string", + "description": "Schema status." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "Creator member ID." + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "Last updater member ID." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp, Unix seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp, Unix seconds." + } + }, + "required": [ + "schema_id", + "schema_name", + "description", + "source_labels", + "result_labels", + "status", + "team_id", + "updated_by", + "creator_id" + ] + }, + "MappingSchemaListResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total schema count." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MappingSchemaItem" + }, + "description": "Mapping schemas." + } + }, + "required": [ + "total", + "items" + ] + }, + "MappingSchemaUpdateRequest": { + "type": "object", + "required": [ + "schema_id" + ], + "properties": { + "schema_id": { + "type": "string", + "description": "Schema ID (MongoDB ObjectID hex)." + }, + "schema_name": { + "type": "string", + "maxLength": 39, + "description": "New schema name (max 39 chars)." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "New description (max 500 chars)." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "New owning team ID. `0` removes the team association." + } + } + }, + "MergeIncidentsRequest": { + "type": "object", + "description": "Parameters for merging source incidents into a target.", + "required": [ + "source_incident_ids", + "target_incident_id" + ], + "properties": { + "source_incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "minItems": 1, + "maxItems": 100, + "description": "Source incident IDs. The target incident is removed from this set automatically." + }, + "target_incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Target incident ID that source incidents will be merged into." + }, + "title": { + "type": "string", + "maxLength": 512, + "description": "Optional new title for the target incident." + }, + "comment": { + "type": "string", + "maxLength": 1024, + "description": "Optional comment recorded on the merge timeline entry." + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "Optional new owner member ID for the target incident." + }, + "remove_source_incidents": { + "type": "boolean", + "description": "When true, soft-delete the source incidents after merging instead of closing them." + } + } + }, + "MetricsBase": { + "type": "object", + "description": "Shared dimension identifiers attached to every aggregated insight row.", + "properties": { + "hours": { + "type": "string", + "enum": [ + "work", + "sleep", + "off" + ], + "description": "Hour bucket when `split_hours` is enabled." + }, + "ts": { + "type": "integer", + "format": "int64", + "description": "Aggregation bucket start time, Unix seconds. Present when `aggregate_unit` is used." + }, + "channel_id": { + "type": "integer", + "format": "int64" + }, + "team_id": { + "type": "integer", + "format": "int64" + }, + "responder_id": { + "type": "integer", + "format": "int64" + }, + "account_id": { + "type": "integer", + "format": "int64" + }, + "team_name": { + "type": "string" + }, + "channel_name": { + "type": "string" + }, + "responder_name": { + "type": "string" + } + } + }, + "MigrateStatusPageEmailSubscribersRequest": { + "type": "object", + "description": "Parameters for starting an Atlassian Statuspage email subscriber migration job.", + "required": [ + "api_key", + "source_page_id", + "target_page_id" + ], + "properties": { + "api_key": { + "type": "string", + "description": "Atlassian Statuspage API key with access to the source page." + }, + "source_page_id": { + "type": "string", + "description": "Atlassian Statuspage source page ID." + }, + "target_page_id": { + "type": "integer", + "format": "int64", + "description": "Flashduty target status page ID that will receive the imported subscribers." + } + } + }, + "MigrateStatusPageStructureRequest": { + "type": "object", + "description": "Parameters for starting an Atlassian Statuspage structure and history migration job.", + "required": [ + "api_key", + "source_page_id" + ], + "properties": { + "api_key": { + "type": "string", + "description": "Atlassian Statuspage API key with access to the source page." + }, + "source_page_id": { + "type": "string", + "description": "Atlassian Statuspage source page ID." + } + } + }, + "NotifyChat": { + "type": "object", + "description": "Notification delivery record for a chat group recipient.", + "properties": { + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "Integration data source ID used to send the notification." + }, + "chat_id": { + "type": "string", + "description": "Chat group identifier." + }, + "chat_name": { + "type": "string", + "description": "Chat group display name." + }, + "failed_reason": { + "type": "string", + "description": "Failure reason if delivery did not succeed." + } + } + }, + "NotifyPerson": { + "type": "object", + "description": "Notification delivery record for a single person recipient.", + "properties": { + "person_id": { + "type": "integer", + "format": "int64", + "description": "Recipient member ID." + }, + "failed_reason": { + "type": "string", + "description": "Failure reason if delivery did not succeed." + } + } + }, + "NotifyRobot": { + "type": "object", + "description": "Notification delivery record for a robot webhook recipient.", + "properties": { + "token": { + "type": "string", + "description": "Robot token or identifier." + }, + "alias": { + "type": "string", + "description": "Robot alias." + }, + "failed_reason": { + "type": "string", + "description": "Failure reason if delivery did not succeed." + } + } + }, + "OnceTimeFilter": { + "type": "object", + "description": "One-off time window defined by unix seconds.", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "Window start (unix seconds). Must be > 0 and less than `end_time`.", + "exclusiveMinimum": 0 + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "Window end (unix seconds). Must be > 0.", + "exclusiveMinimum": 0 + } + } + }, + "OrFilterGroup": { + "type": "array", + "description": "OR-of-AND filter tree. Outer array is a list of AND groups; the condition passes if **any** AND group matches. Within each AND group, **all** conditions must match.", + "items": { + "type": "array", + "description": "AND group — all conditions in this array must match.", + "items": { + "$ref": "#/components/schemas/FilterCondition" + } + } + }, + "PastIncidentItem": { + "allOf": [ + { + "$ref": "#/components/schemas/IncidentInfo" + }, + { + "type": "object", + "required": [ + "score" + ], + "properties": { + "score": { + "type": "number", + "format": "float", + "description": "Similarity score from the vector search." + } + } + } + ] + }, + "PersonShort": { + "type": "object", + "description": "A Flashduty member reference.", + "properties": { + "person_id": { + "type": "integer", + "format": "int64", + "description": "Member ID." + }, + "person_name": { + "type": "string", + "description": "Member display name." + }, + "email": { + "type": "string", + "format": "email", + "description": "Member email address." + }, + "as": { + "type": "string", + "description": "Role label for this member in the context of the current object." + } + } + }, + "PostMortemItem": { + "type": "object", + "description": "Full post-mortem report including basics, content and follow-ups.", + "required": [ + "meta", + "basics", + "content", + "follow_ups" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/PostMortemMeta" + }, + "basics": { + "type": "object", + "required": [ + "incidents_highest_severity", + "incidents_earliest_start_seconds", + "incidents_latest_close_seconds", + "incidents_total_duration_seconds", + "responders" + ], + "properties": { + "incidents_highest_severity": { + "type": "string", + "description": "Highest severity among linked incidents." + }, + "incidents_earliest_start_seconds": { + "type": "integer", + "format": "int64", + "description": "Earliest start time among linked incidents (seconds)." + }, + "incidents_latest_close_seconds": { + "type": "integer", + "format": "int64", + "description": "Latest close time among linked incidents (seconds)." + }, + "incidents_total_duration_seconds": { + "type": "integer", + "format": "int64", + "description": "Cumulative duration in seconds." + }, + "responders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Responder" + }, + "description": "Responders involved in the incident(s)." + } + } + }, + "content": { + "type": "object", + "required": [ + "content" + ], + "properties": { + "content": { + "type": "string", + "description": "Report body content (BlockNote JSON)." + } + } + }, + "follow_ups": { + "type": "string", + "description": "Follow-up action items rendered as a single string." + } + } + }, + "PostMortemMeta": { + "type": "object", + "description": "Post-mortem metadata (lightweight shape used in lists).", + "required": [ + "account_id", + "title", + "status", + "post_mortem_id", + "template_id", + "incident_ids", + "media_count", + "author_ids", + "team_id", + "channel_id", + "is_private", + "channel_name", + "created_at_seconds", + "updated_at_seconds" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." + }, + "title": { + "type": "string", + "description": "Report title." + }, + "status": { + "type": "string", + "enum": [ + "drafting", + "published" + ], + "description": "Report status." + }, + "post_mortem_id": { + "type": "string", + "description": "Deterministic post-mortem ID derived from account and incident IDs." + }, + "template_id": { + "type": "string", + "description": "Template used to initialize the report." + }, + "incident_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Linked incident IDs." + }, + "media_count": { + "type": "integer", + "description": "Number of uploaded media files." + }, + "author_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs that contributed to the report." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID. 0 if none." + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Owning channel ID. 0 if none." + }, + "is_private": { + "type": "boolean", + "description": "When true, only team members and admins can view." + }, + "channel_name": { + "type": "string", + "description": "Channel name, filled by the server." + }, + "created_at_seconds": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (seconds)." + }, + "updated_at_seconds": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp (seconds)." + } + } + }, + "RemoveIncidentRequest": { + "type": "object", + "description": "Parameters for permanently removing incidents.", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "Incident IDs to remove. At most 100 per call. The caller must have access to every channel the incidents belong to." + } + } + }, + "ReopenIncidentRequest": { + "type": "object", + "description": "Parameters for reopening one or more closed incidents.", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "Incident IDs to reopen. At most 100 per call.", + "minItems": 1 + }, + "reason": { + "type": "string", + "maxLength": 1024, + "description": "Optional reason recorded on the timeline." + } + } + }, + "ResetIncidentFieldRequest": { + "type": "object", + "description": "Parameters for updating a custom field value on an incident.", + "required": [ + "incident_id", + "field_name" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + }, + "field_name": { + "type": "string", + "description": "Custom field name; must match a field defined on the account." + }, + "field_value": { + "description": "New field value. Type must match the field definition." + } + } + }, + "ResolveIncidentRequest": { + "type": "object", + "description": "Parameters for resolving one or more incidents.", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "Incident IDs to resolve. At most 100 per call.", + "minItems": 1 + }, + "root_cause": { + "type": "string", + "maxLength": 1024, + "description": "Optional root cause note applied to every resolved incident." + }, + "resolution": { + "type": "string", + "maxLength": 1024, + "description": "Optional resolution note applied to every resolved incident." + } + } + }, + "Responder": { + "type": "object", + "description": "Incident responder with assignment/acknowledgement timestamps.", + "required": [ + "person_id", + "assigned_at", + "acknowledged_at" + ], + "properties": { + "person_id": { + "type": "integer", + "format": "int64", + "description": "Responder member ID." + }, + "assigned_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) when the member was assigned." + }, + "acknowledged_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) when the member acknowledged. 0 if not yet acknowledged." + }, + "person_name": { + "type": "string", + "description": "Member display name, filled by the server." + }, + "email": { + "type": "string", + "format": "email", + "description": "Member email, filled by the server." + }, + "as": { + "type": "string", + "description": "Role label of this responder." + } + } + }, + "ResponderInsightItem": { + "allOf": [ + { + "$ref": "#/components/schemas/MetricsBase" + }, + { + "type": "object", + "description": "Aggregated incident metrics for a single responder.", + "properties": { + "total_incident_cnt": { + "type": "integer", + "format": "int64" + }, + "total_incidents_acknowledged": { + "type": "integer", + "format": "int64" + }, + "total_incidents_reassigned": { + "type": "integer", + "format": "int64" + }, + "total_incidents_escalated": { + "type": "integer", + "format": "int64" + }, + "total_incidents_timeout_escalated": { + "type": "integer", + "format": "int64" + }, + "total_incidents_manually_escalated": { + "type": "integer", + "format": "int64" + }, + "total_interruptions": { + "type": "integer", + "format": "int64" + }, + "total_notifications": { + "type": "integer", + "format": "int64" + }, + "total_engaged_seconds": { + "type": "integer", + "format": "int64" + }, + "total_seconds_to_ack": { + "type": "integer", + "format": "int64" + }, + "mean_seconds_to_ack": { + "type": "number", + "format": "double" + }, + "acknowledgement_pct": { + "type": "number", + "format": "double" + } + } + } + ] + }, + "ResponderInsightResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResponderInsightItem" + } + } + } + }, + "RouteCase": { + "type": "object", + "description": "A single case branch in the routing rule. When all of its conditions match, the alert is dispatched to the configured channels.", + "required": [ + "if", + "channel_ids", + "fallthrough" + ], + "properties": { + "if": { + "type": "array", + "description": "List of match conditions that are AND-ed together.", + "items": { + "$ref": "#/components/schemas/RouteMatchCondition" + } + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Target channel IDs. Required when `routing_mode` is `standard` (or empty)." + }, + "fallthrough": { + "type": "boolean", + "description": "If `true`, evaluation continues to the next case after this one matches; otherwise matching stops at the first hit." + }, + "routing_mode": { + "type": "string", + "enum": [ + "standard", + "name_mapping" + ], + "description": "Routing mode. `standard` (default, also used when left empty) routes to the fixed channel IDs; `name_mapping` resolves channels by reading a label value from the alert event." + }, + "name_mapping_label": { + "type": "string", + "description": "Label key whose value is used as the target channel name. Required when `routing_mode` is `name_mapping`." + } + } + }, + "RouteDefault": { + "type": "object", + "description": "Default branch used when no case matches (or all matched cases yield no valid channels).", + "properties": { + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Channel IDs to fall back to." + } + } + }, + "RouteInfoRequest": { + "type": "object", + "description": "Parameters for retrieving the routing rule of one integration.", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID. Must be greater than 0." + } + } + }, + "RouteItem": { + "type": "object", + "description": "Routing rule of an integration. Alerts are evaluated against `cases` in order; unmatched alerts fall through to `default`. Returns `null` when the integration has no configured rule.", + "required": [ + "version", + "updated_by", + "creator_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration the rule belongs to." + }, + "cases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteCase" + }, + "description": "Ordered list of case branches." + }, + "sections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteSection" + }, + "description": "Optional sections that visually group cases." + }, + "default": { + "$ref": "#/components/schemas/RouteDefault" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "deleted" + ], + "description": "Rule status." + }, + "version": { + "type": "integer", + "format": "int64", + "description": "Monotonic version number, incremented on each update. Use it for optimistic concurrency control." + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "ID of the person who performed the last update." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "ID of the person who created the rule." + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "Soft-delete timestamp, Unix seconds. Omitted when the rule is active." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation time, Unix timestamp in seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update time, Unix timestamp in seconds." + } + } + }, + "RouteMatchCondition": { + "type": "object", + "description": "A single match condition. All conditions inside one case form an AND group.", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "Field key to match against the alert event (e.g. `alert_severity`, `labels.service`)." + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "Match operator. `IN` matches when the field value is one of `vals`; `NOTIN` matches when it is not." + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Values to compare against. Each value may be a literal string, a wildcard (`*`, `?`), a regular expression wrapped in slashes (`/pattern/`), a CIDR (`cidr:10.0.0.0/8`), or a numeric comparison (`num:lt:100`)." + } + } + }, + "RouteSection": { + "type": "object", + "description": "A logical section that groups consecutive cases for display purposes.", + "required": [ + "name", + "position" + ], + "properties": { + "name": { + "type": "string", + "description": "Section name. Must be unique within the rule." + }, + "position": { + "type": "integer", + "description": "Index in `cases` where this section starts. Must be between 0 and the length of `cases`." + } + } + }, + "RuleCreateResponse": { + "type": "object", + "required": [ + "rule_id", + "rule_name" + ], + "properties": { + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Newly created rule ID (MongoDB ObjectID)." + }, + "rule_name": { + "type": "string", + "description": "Rule name echoed back from the request." + } + } + }, + "ScheduleCalculatedLayer": { + "type": "object", + "description": "Computed schedule for a single layer.", + "required": [ + "layer_name", + "name", + "mode", + "schedules" + ], + "properties": { + "layer_name": { + "type": "string", + "description": "Layer display name." + }, + "name": { + "type": "string", + "description": "Layer internal name." + }, + "mode": { + "type": "integer", + "description": "Layer mode: 0 = common rotation, 1 = override." + }, + "schedules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleCalculatedSchedule" + }, + "description": "Computed shifts." + } + } + }, + "ScheduleCalculatedSchedule": { + "type": "object", + "description": "Computed shift inside a schedule layer.", + "required": [ + "start", + "end", + "group", + "index" + ], + "properties": { + "start": { + "type": "integer", + "format": "int64", + "description": "Shift start timestamp (Unix seconds)." + }, + "end": { + "type": "integer", + "format": "int64", + "description": "Shift end timestamp (Unix seconds)." + }, + "group": { + "$ref": "#/components/schemas/ScheduleGroup" + }, + "index": { + "type": "integer", + "description": "Index inside the rotation." + } + } + }, + "ScheduleDayMask": { + "type": "object", + "description": "Day-of-week mask for a rotation layer.", + "properties": { + "repeat": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Weekday numbers (0 = Sunday) included in the rotation." + } + } + }, + "ScheduleEmptyObject": { + "type": "object", + "description": "Empty response.", + "properties": {} + }, + "ScheduleFixedTimeNotifyInfo": { + "type": "object", + "description": "Fixed-time notification config.", + "required": [ + "cycle", + "start" + ], + "properties": { + "cycle": { + "type": "string", + "description": "Notification cycle." + }, + "start": { + "type": "string", + "description": "Notification start time within the cycle." + } + } + }, + "ScheduleGroup": { + "type": "object", + "description": "Oncall group definition within a rotation layer.", + "required": [ + "group_name", + "name", + "members", + "start", + "end" + ], + "properties": { + "group_name": { + "type": "string", + "description": "Group display name." + }, + "name": { + "type": "string", + "description": "Legacy group name." + }, + "members": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleMember" + }, + "description": "Members of this group." + }, + "start": { + "type": "integer", + "format": "int64", + "description": "Group start timestamp (Unix seconds)." + }, + "end": { + "type": "integer", + "format": "int64", + "description": "Group end timestamp (Unix seconds)." + } + } + }, + "ScheduleIDResponse": { + "type": "object", + "description": "Schedule ID response returned after create.", + "required": [ + "schedule_id" + ], + "properties": { + "schedule_id": { + "type": "integer", + "format": "int64", + "description": "ID of the newly created schedule." + } + } + }, + "ScheduleIDsBodyRequest": { + "type": "object", + "description": "Request carrying a list of schedule IDs (used by delete/enable/disable).", + "required": [ + "schedule_ids" + ], + "properties": { + "schedule_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Schedule IDs to operate on." + } + } + }, + "ScheduleIDsRequest": { + "type": "object", + "description": "Request carrying a list of schedule IDs (used by batch info).", + "required": [ + "schedule_ids" + ], + "properties": { + "schedule_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Schedule ID list." + } + } + }, + "ScheduleImNotify": { + "type": "object", + "description": "IM webhook notification entry.", + "required": [ + "type", + "settings" + ], + "properties": { + "type": { + "type": "string", + "description": "IM provider type (for example feishu_app, dingtalk_app, wecom_app, teams_app, slack_app)." + }, + "settings": { + "$ref": "#/components/schemas/ScheduleImNotifySettings" + } + } + }, + "ScheduleImNotifySettings": { + "type": "object", + "description": "Settings for an IM webhook notification channel.", + "required": [ + "token", + "alias", + "data_source_id", + "chat_ids", + "verify_token", + "sign_secret" + ], + "properties": { + "token": { + "type": "string", + "description": "Webhook token." + }, + "alias": { + "type": "string", + "description": "Channel alias." + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "Data source ID." + }, + "chat_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Chat IDs." + }, + "verify_token": { + "type": "string", + "description": "Verification token." + }, + "sign_secret": { + "type": "string", + "description": "Signature secret." + } + } + }, + "ScheduleInfoRequest": { + "type": "object", + "description": "Schedule detail request. start/end define the window for computed layers; the span must be less than 45 days.", + "required": [ + "schedule_id", + "start", + "end" + ], + "properties": { + "schedule_id": { + "type": "integer", + "format": "int64", + "description": "Schedule ID." + }, + "start": { + "type": "integer", + "format": "int64", + "description": "Preview start timestamp (Unix seconds, 10 digits)." + }, + "end": { + "type": "integer", + "format": "int64", + "description": "Preview end timestamp (Unix seconds, 10 digits)." + } + } + }, + "ScheduleItem": { + "type": "object", + "description": "Full schedule detail returned by info/preview/list.", + "required": [ + "id", + "name", + "account_id", + "group_id", + "disabled", + "create_at", + "create_by", + "update_at", + "update_by", + "layers", + "schedule_layers", + "final_schedule", + "notify", + "schedule_id", + "schedule_name", + "team_id", + "description", + "layer_schedules", + "status", + "cur_oncall", + "next_oncall" + ], + "properties": { + "id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "description": "Schedule ID. null when returned from /schedule/preview." + }, + "name": { + "type": [ + "string", + "null" + ], + "description": "Schedule name (legacy field; mirrors schedule_name). null when returned from /schedule/preview." + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." + }, + "group_id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "description": "Legacy team/group ID. null when returned from /schedule/preview." + }, + "disabled": { + "type": [ + "integer", + "null" + ], + "description": "Disabled flag (0 = enabled, 1 = disabled). Deprecated. null when returned from /schedule/preview." + }, + "create_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (Unix seconds)." + }, + "create_by": { + "type": "integer", + "format": "int64", + "description": "Creator person ID." + }, + "update_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp (Unix seconds)." + }, + "update_by": { + "type": "integer", + "format": "int64", + "description": "Last updater person ID." + }, + "layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleLayer" + }, + "description": "Rotation layers defined on the schedule." + }, + "field": { + "type": "string", + "description": "Field name used by the legacy update-field endpoint." + }, + "schedule_layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleCalculatedLayer" + }, + "description": "Computed layers for the requested window." + }, + "final_schedule": { + "$ref": "#/components/schemas/ScheduleCalculatedLayer", + "description": "Collapsed final schedule across all layers." + }, + "start": { + "type": "integer", + "format": "int64", + "description": "Window start (Unix seconds)." + }, + "end": { + "type": "integer", + "format": "int64", + "description": "Window end (Unix seconds)." + }, + "notify": { + "$ref": "#/components/schemas/ScheduleNotify" + }, + "schedule_id": { + "type": "integer", + "format": "int64", + "description": "Schedule ID." + }, + "schedule_name": { + "type": [ + "string", + "null" + ], + "description": "Schedule display name. null when returned from /schedule/preview." + }, + "team_id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "description": "Owning team ID. null when returned from /schedule/preview." + }, + "description": { + "type": [ + "string", + "null" + ], + "description": "Schedule description. null when returned from /schedule/preview." + }, + "layer_schedules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleCalculatedLayer" + }, + "description": "Alias of schedule_layers returned for compatibility." + }, + "status": { + "type": [ + "integer", + "null" + ], + "description": "Legacy status flag. Deprecated. null when returned from /schedule/preview." + }, + "cur_oncall": { + "$ref": "#/components/schemas/ScheduleOncallGroup", + "description": "Current on-call group, or null when nobody is on-call." + }, + "next_oncall": { + "$ref": "#/components/schemas/ScheduleOncallGroup", + "description": "Next on-call group, or null when unknown." + } + } + }, + "ScheduleLayer": { + "type": "object", + "description": "One rotation layer inside a schedule.", + "required": [ + "account_id", + "name", + "schedule_id", + "hidden", + "mode", + "weight", + "groups", + "rotation_duration", + "handoff_time", + "enable_time", + "expire_time", + "restrict_mode", + "restrict_start", + "restrict_end", + "restrict_periods", + "day_mask", + "create_at", + "create_by", + "update_at", + "update_by", + "fair_rotation", + "rotation_unit", + "rotation_value", + "mask_continuous_enabled" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." + }, + "name": { + "type": "string", + "description": "Layer internal name." + }, + "schedule_id": { + "type": "integer", + "format": "int64", + "description": "Parent schedule ID." + }, + "hidden": { + "type": "integer", + "description": "Whether the layer is hidden in the UI (0 = no, 1 = yes)." + }, + "mode": { + "type": "integer", + "description": "Layer mode: 0 = common rotation, 1 = override.", + "enum": [ + 0, + 1 + ] + }, + "weight": { + "type": "integer", + "description": "Layer weight for ordering." + }, + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleGroup" + }, + "description": "Oncall groups participating in the rotation." + }, + "rotation_duration": { + "type": "integer", + "format": "int64", + "description": "Rotation duration in seconds." + }, + "handoff_time": { + "type": "integer", + "format": "int64", + "description": "Handoff time inside the rotation cycle (seconds)." + }, + "enable_time": { + "type": "integer", + "format": "int64", + "description": "When the layer becomes effective (Unix seconds)." + }, + "expire_time": { + "type": "integer", + "format": "int64", + "description": "When the layer expires (Unix seconds, 0 means never)." + }, + "restrict_mode": { + "type": "integer", + "description": "Restriction mode: 0 = none, 1 = day, 2 = week.", + "enum": [ + 0, + 1, + 2 + ] + }, + "restrict_start": { + "type": "integer", + "format": "int64", + "description": "Legacy start offset inside the restriction window (seconds)." + }, + "restrict_end": { + "type": "integer", + "format": "int64", + "description": "Legacy end offset inside the restriction window (seconds)." + }, + "restrict_periods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleRestrictPeriod" + }, + "description": "Restriction windows inside each rotation cycle." + }, + "day_mask": { + "$ref": "#/components/schemas/ScheduleDayMask", + "description": "Day-of-week mask." + }, + "create_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (Unix seconds)." + }, + "create_by": { + "type": "integer", + "format": "int64", + "description": "Creator person ID." + }, + "update_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp (Unix seconds)." + }, + "update_by": { + "type": "integer", + "format": "int64", + "description": "Last updater person ID." + }, + "layer_name": { + "type": "string", + "description": "User-facing layer name." + }, + "fair_rotation": { + "type": "boolean", + "description": "Whether fair rotation is enabled." + }, + "layer_start": { + "type": "integer", + "format": "int64", + "description": "Layer start timestamp (Unix seconds)." + }, + "layer_end": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "description": "Layer end timestamp (Unix seconds). null means open-ended." + }, + "rotation_unit": { + "type": "string", + "description": "Rotation unit.", + "enum": [ + "hour", + "day", + "week", + "month" + ] + }, + "rotation_value": { + "type": "integer", + "format": "int64", + "description": "Rotation quantity (number of rotation_unit per cycle)." + }, + "mask_continuous_enabled": { + "type": "boolean", + "description": "Whether continuous masking is enabled." + } + } + }, + "ScheduleListRequest": { + "type": "object", + "description": "Schedule list request. limit defaults to 10 and is capped at 100; p defaults to 1. is_my_team and is_my_manage are mutually exclusive.", + "properties": { + "query": { + "type": "string", + "description": "Search keyword matched against schedule names." + }, + "p": { + "type": "integer", + "description": "Page number (1-indexed).", + "default": 1 + }, + "limit": { + "type": "integer", + "description": "Page size. Default 10, max 100.", + "default": 10, + "maximum": 100 + }, + "is_my_team": { + "type": "boolean", + "description": "Only return schedules whose owning team the current user belongs to." + }, + "is_my_manage": { + "type": "boolean", + "description": "Only return schedules created by the current user within their teams." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by team IDs." + }, + "start": { + "type": "integer", + "format": "int64", + "description": "When set together with end, computed layer schedules are returned. Span must be less than 45 days." + }, + "end": { + "type": "integer", + "format": "int64", + "description": "Window end timestamp (Unix seconds)." + } + } + }, + "ScheduleListResponse": { + "type": "object", + "description": "Schedule list response.", + "required": [ + "items", + "total" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleItem" + }, + "description": "Schedules on this page." + }, + "total": { + "type": "integer", + "format": "int64", + "description": "Total number of schedules matching the filters." + } + } + }, + "ScheduleMember": { + "type": "object", + "description": "Schedule group member reference.", + "required": [ + "role_id", + "person_ids" + ], + "properties": { + "role_id": { + "type": "integer", + "format": "int64", + "description": "Oncall role ID." + }, + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Person IDs in this slot." + } + } + }, + "ScheduleNotify": { + "type": "object", + "description": "Notification configuration attached to a schedule.", + "required": [ + "fixed_time", + "by", + "webhooks" + ], + "properties": { + "advance_in_time": { + "type": "integer", + "format": "int64", + "description": "Advance notification lead time (seconds)." + }, + "fixed_time": { + "$ref": "#/components/schemas/ScheduleFixedTimeNotifyInfo" + }, + "by": { + "$ref": "#/components/schemas/ScheduleNotifyBy" + }, + "im": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Legacy IM-type to token map." + }, + "webhooks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleImNotify" + }, + "description": "IM webhook notification channels." + } + } + }, + "ScheduleNotifyBy": { + "type": "object", + "description": "Per-recipient notification preference.", + "required": [ + "follow_preference", + "personal_channels" + ], + "properties": { + "follow_preference": { + "type": "boolean", + "description": "Whether to follow each responder's personal notification preference." + }, + "personal_channels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Personal notification channel keys." + } + } + }, + "ScheduleOncallGroup": { + "type": "object", + "description": "Snapshot of the currently or next on-call group.", + "required": [ + "start", + "end", + "group", + "update_at", + "weight", + "index" + ], + "properties": { + "start": { + "type": "integer", + "format": "int64", + "description": "Shift start timestamp (Unix seconds)." + }, + "end": { + "type": "integer", + "format": "int64", + "description": "Shift end timestamp (Unix seconds)." + }, + "group": { + "$ref": "#/components/schemas/ScheduleGroup" + }, + "update_at": { + "type": "integer", + "format": "int64", + "description": "Update timestamp (Unix seconds)." + }, + "weight": { + "type": "integer", + "description": "Layer weight the shift comes from." + }, + "index": { + "type": "integer", + "description": "Index inside the rotation." + } + } + }, + "ScheduleRestrictPeriod": { + "type": "object", + "description": "Restrict window inside a rotation cycle.", + "required": [ + "restrict_start", + "restrict_end" + ], + "properties": { + "restrict_start": { + "type": "integer", + "format": "int64", + "description": "Start offset inside the rotation cycle." + }, + "restrict_end": { + "type": "integer", + "format": "int64", + "description": "End offset inside the rotation cycle." + } + } + }, + "ScheduleSelfRequest": { + "type": "object", + "description": "Query parameters for listing the current user's schedules. Both start and end are Unix timestamps (seconds). If omitted they default to 0. The window must not exceed 30 days.", + "properties": { + "start": { + "type": "integer", + "format": "int64", + "description": "Window start (Unix seconds, 10 digits)." + }, + "end": { + "type": "integer", + "format": "int64", + "description": "Window end (Unix seconds, 10 digits). Must be within 30 days of start." + } + } + }, + "ScheduleSelfResponse": { + "type": "object", + "description": "Response of /schedule/self and /schedule/infos. Only the items field is populated.", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleItem" + }, + "description": "Schedules assigned to the current user (or matching the requested IDs)." + } + } + }, + "ScheduleUpsertRequest": { + "type": "object", + "description": "Schedule create/update/preview request body. The server accepts the same shape as the schedule detail model; only the key fields are listed here. For update, set schedule_id. For preview, start and end are required.", + "properties": { + "schedule_id": { + "type": "integer", + "format": "int64", + "description": "Schedule ID. Required on update." + }, + "schedule_name": { + "type": "string", + "description": "Schedule display name. Max 40 characters.", + "maxLength": 40 + }, + "name": { + "type": "string", + "description": "Legacy schedule name field. Used when schedule_name is empty.", + "maxLength": 40 + }, + "description": { + "type": "string", + "description": "Schedule description. Max 500 characters.", + "maxLength": 500 + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID." + }, + "layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleLayer" + }, + "description": "Rotation layers." + }, + "notify": { + "$ref": "#/components/schemas/ScheduleNotify" + }, + "start": { + "type": "integer", + "format": "int64", + "description": "Preview window start (Unix seconds, 10 digits). Required for /schedule/preview." + }, + "end": { + "type": "integer", + "format": "int64", + "description": "Preview window end (Unix seconds, 10 digits). Required for /schedule/preview. Max 45 days after start." + } + } + }, + "SilenceRuleItem": { + "type": "object", + "required": [ + "account_id", + "channel_id", + "priority", + "rule_name", + "description", + "time_filters", + "time_filter", + "filters", + "is_directly_discard", + "status", + "rule_id", + "updated_by", + "created_at", + "updated_at", + "is_effective" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64" + }, + "channel_id": { + "type": "integer", + "format": "int64" + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower runs first." + }, + "rule_name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "from_incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Source incident ID when the silence was created from an incident." + }, + "time_filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimeFilter" + }, + "description": "Recurring time windows." + }, + "time_filter": { + "$ref": "#/components/schemas/OnceTimeFilter" + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "is_directly_discard": { + "type": "boolean", + "description": "When true, silenced alerts are dropped instead of suppressed into incidents." + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ] + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "updated_by": { + "type": "integer", + "format": "int64" + }, + "deleted_at": { + "type": "integer", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "is_effective": { + "type": "boolean", + "description": "Whether the rule is currently in effect." + } + } + }, + "SnoozeIncidentRequest": { + "type": "object", + "description": "Parameters for snoozing notifications on one or more incidents.", + "required": [ + "incident_ids", + "minutes" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "Incident IDs to snooze. At most 100 per call." + }, + "minutes": { + "type": "integer", + "format": "int64", + "exclusiveMinimum": 0, + "maximum": 1440, + "description": "Duration in minutes. Must be greater than 0 and at most 1440 (24h)." + } + } + }, + "StatusPageChangeCreateResponse": { + "type": "object", + "description": "Result of creating a status page event.", + "required": [ + "change_id", + "change_name" + ], + "properties": { + "change_id": { + "type": "integer", + "format": "int64", + "description": "Newly created event ID." + }, + "change_name": { + "type": "string", + "description": "Event title (echoed from the request)." + } + } + }, + "StatusPageChangeItem": { + "type": "object", + "description": "A status page event (incident or maintenance).", + "required": [ + "change_id", + "type", + "title" + ], + "properties": { + "change_id": { + "type": "integer", + "format": "int64", + "description": "Event ID." + }, + "page_id": { + "type": "integer", + "format": "int64", + "description": "Parent status page ID." + }, + "type": { + "type": "string", + "enum": [ + "incident", + "maintenance" + ], + "description": "Event type." + }, + "title": { + "type": "string", + "description": "Event title." + }, + "description": { + "type": "string", + "description": "Event description (Markdown)." + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "Current event status. Incident statuses: `investigating`/`identified`/`monitoring`/`resolved`. Maintenance statuses: `scheduled`/`ongoing`/`completed`." + }, + "affected_components": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AffectedStatusPageComponentItem" + }, + "description": "Components currently affected by this event, with their resulting status." + }, + "responder_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs responsible for this event." + }, + "linked_change_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Linked event IDs (related incidents, deployments, etc.)." + }, + "start_at_seconds": { + "type": "integer", + "format": "int64", + "description": "Event start time in unix seconds." + }, + "close_at_seconds": { + "type": "integer", + "format": "int64", + "description": "Scheduled close time in unix seconds. Set for retrospective and maintenance events." + }, + "is_retrospective": { + "type": "boolean", + "description": "Whether this event is a retrospective (historical) one." + }, + "updates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusPageChangeUpdateItem" + }, + "description": "Timeline updates attached to this event, ordered by time." + }, + "notify_subscribers": { + "type": "boolean", + "description": "Whether subscribers were notified about this event." + }, + "auto_update_by_schedule": { + "type": "boolean", + "description": "Maintenance only: whether the status advances automatically based on the scheduled window." + } + } + }, + "StatusPageChangeListResponse": { + "type": "object", + "description": "List of status page events.", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusPageChangeItem" + } + } + } + }, + "StatusPageChangeTimelineCreateResponse": { + "type": "object", + "description": "Result of appending a timeline update to a status page event.", + "required": [ + "update_id" + ], + "properties": { + "update_id": { + "type": "string", + "description": "Newly created update ID." + } + } + }, + "StatusPageChangeUpdateItem": { + "type": "object", + "description": "A single timeline update on a status page event.", + "required": [ + "update_id", + "at_seconds" + ], + "properties": { + "update_id": { + "type": "string", + "description": "Update ID." + }, + "at_seconds": { + "type": "integer", + "format": "int64", + "description": "Update timestamp in unix seconds." + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "Event status after this update. Omitted when the update does not change the overall status." + }, + "description": { + "type": "string", + "description": "Update description (Markdown)." + }, + "component_changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusPageComponentChangeItem" + }, + "description": "Component status transitions applied by this update." + } + } + }, + "StatusPageComponentChangeItem": { + "type": "object", + "description": "Component status transition applied in a timeline update.", + "required": [ + "component_id", + "status" + ], + "properties": { + "component_id": { + "type": "string", + "description": "Component ID." + }, + "component_name": { + "type": "string", + "description": "Component display name. Populated by the backend on read; ignored on write." + }, + "status": { + "type": "string", + "enum": [ + "operational", + "degraded", + "partial_outage", + "full_outage", + "under_maintenance" + ], + "description": "New component status. Incidents support `operational`/`degraded`/`partial_outage`/`full_outage`; maintenances support `operational`/`under_maintenance`." + } + } + }, + "StatusPageComponentItem": { + "type": "object", + "description": "A status page component.", + "required": [ + "name" + ], + "properties": { + "component_id": { + "type": "string", + "description": "Component ID." + }, + "section_id": { + "type": "string", + "description": "Parent section ID." + }, + "name": { + "type": "string", + "description": "Component display name." + }, + "description": { + "type": "string", + "description": "Component description." + }, + "available_since_seconds": { + "type": "integer", + "format": "int64", + "description": "Timestamp when the component was first available, in unix seconds." + }, + "order_id": { + "type": "integer", + "format": "int64", + "description": "Display order within its section." + }, + "hide_uptime": { + "type": "boolean", + "description": "When true, uptime data is hidden from summary responses." + }, + "hide_all": { + "type": "boolean", + "description": "When true, the component is hidden entirely from summary endpoints." + } + } + }, + "StatusPageMigrationJob": { + "type": "object", + "description": "A migration job's current state and progress.", + "required": [ + "job_id", + "account_id", + "source_page_id", + "target_page_id", + "phase", + "status", + "progress", + "created_at", + "updated_at" + ], + "properties": { + "job_id": { + "type": "string", + "description": "Migration job ID." + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "Owner account ID." + }, + "source_page_id": { + "type": "string", + "description": "Atlassian Statuspage source page ID." + }, + "target_page_id": { + "type": "integer", + "format": "int64", + "description": "Flashduty target status page ID. Set once the job produces one, or supplied up front for subscriber migration." + }, + "phase": { + "type": "string", + "enum": [ + "structure", + "history", + "subscribers" + ], + "description": "Current migration phase." + }, + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "completed", + "failed", + "cancelled" + ], + "description": "Current job status." + }, + "progress": { + "$ref": "#/components/schemas/StatusPageMigrationProgress", + "description": "Per-entity progress counters." + }, + "error": { + "type": "string", + "description": "Terminal error message when `status` is `failed`." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Job creation time, unix seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last status update time, unix seconds." + } + } + }, + "StatusPageMigrationProgress": { + "type": "object", + "description": "Progress counters for a migration job.", + "required": [ + "total_steps", + "completed_steps", + "components_imported", + "sections_imported", + "incidents_imported", + "maintenances_imported", + "subscribers_imported", + "templates_imported", + "subscribers_skipped" + ], + "properties": { + "total_steps": { + "type": "integer", + "description": "Total steps this job will perform." + }, + "completed_steps": { + "type": "integer", + "description": "Steps completed so far." + }, + "components_imported": { + "type": "integer" + }, + "sections_imported": { + "type": "integer" + }, + "incidents_imported": { + "type": "integer" + }, + "maintenances_imported": { + "type": "integer" + }, + "subscribers_imported": { + "type": "integer" + }, + "templates_imported": { + "type": "integer" + }, + "subscribers_skipped": { + "type": "integer", + "description": "Number of subscribers skipped (e.g. because they would create duplicates)." + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Non-fatal warnings recorded during the job." + } + } + }, + "StatusPageMigrationStartResponse": { + "type": "object", + "description": "Result of starting a migration job.", + "required": [ + "job_id" + ], + "properties": { + "job_id": { + "type": "string", + "description": "Migration job ID. Use this to poll status or request cancellation." + } + } + }, + "StatusPageSubscriberExportResponse": { + "type": "string", + "format": "binary", + "description": "A CSV file (Content-Type: text/csv; charset=utf-8) containing columns: Method, Recipient, Components, Subscribe All, Locale." + }, + "StatusPageSubscriberListResponse": { + "type": "object", + "description": "Paginated list of status page subscribers.", + "required": [ + "total", + "has_next_page", + "items" + ], + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total matching subscribers." + }, + "has_next_page": { + "type": "boolean", + "description": "Whether there is at least one more page after the current one." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportedStatusPageSubscriberItem" + } + } + } + }, + "SuccessEnvelope": { + "type": "object", + "description": "Success response envelope. On every 2xx response, `request_id` identifies the call (also mirrored in the `Flashcat-Request-Id` header) and `data` holds the endpoint-specific payload. Failure responses use a different shape — see `ErrorResponse`.", + "properties": { + "request_id": { + "type": "string", + "description": "Unique ID for this request. Mirrored in the Flashcat-Request-Id response header. Include it when reporting issues.", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "data": { + "description": "Endpoint-specific payload. See each operation's 200 response schema." + } + }, + "required": [ + "request_id", + "data" + ] + }, + "TemplateCreateRequest": { + "type": "object", + "description": "Create a new notification template.", + "required": [ + "template_name" + ], + "properties": { + "team_id": { + "type": "integer", + "format": "int64", + "description": "Team scope. 0 for account-wide.", + "default": 0 + }, + "template_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Template name, unique per account. 1–39 characters.", + "example": "Prod incident default" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Free-form description. Up to 500 characters." + }, + "email": { + "type": "string", + "description": "Email body template source (Go `html/template` syntax)." + }, + "sms": { + "type": "string", + "description": "SMS template source (Go `text/template` syntax)." + }, + "voice": { + "type": "string", + "description": "Voice call script template source." + }, + "dingtalk": { + "type": "string", + "description": "DingTalk robot message template source." + }, + "wecom": { + "type": "string", + "description": "WeCom robot message template source." + }, + "feishu": { + "type": "string", + "description": "Feishu robot message template source." + }, + "feishu_app": { + "type": "string", + "description": "Feishu app message template source." + }, + "dingtalk_app": { + "type": "string", + "description": "DingTalk app message template source." + }, + "wecom_app": { + "type": "string", + "description": "WeCom app message template source." + }, + "slack_app": { + "type": "string", + "description": "Slack app message template source." + }, + "teams_app": { + "type": "string", + "description": "Microsoft Teams app message template source." + }, + "telegram": { + "type": "string", + "description": "Telegram bot message template source." + }, + "slack": { + "type": "string", + "description": "Slack robot message template source." + }, + "zoom": { + "type": "string", + "description": "Zoom bot message template source." + } + } + }, + "TemplateCreateResponse": { + "type": "object", + "required": [ + "template_id", + "template_name" + ], + "properties": { + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Newly created template ID.", + "example": "6605a1b2c3d4e5f6a7b8c9d0" + }, + "template_name": { + "type": "string", + "description": "Template name echoed from the request.", + "example": "Prod incident default" + } + } + }, + "TemplateIDRequest": { + "type": "object", + "required": [ + "template_id" + ], + "properties": { + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Target template ID. Pass `000000000000000000000001` to address the built-in preset.", + "example": "6605a1b2c3d4e5f6a7b8c9d0" + } + } + }, + "TemplateItem": { + "type": "object", + "description": "A notification template. Each channel field holds the template source string for that delivery channel; an empty string means 'no custom template for that channel'.", + "required": [ + "account_id", + "team_id", + "template_id", + "template_name", + "description", + "email", + "sms", + "voice", + "dingtalk", + "wecom", + "feishu", + "feishu_app", + "dingtalk_app", + "wecom_app", + "slack_app", + "teams_app", + "telegram", + "slack", + "zoom", + "status", + "creator_id", + "updated_by", + "created_at", + "updated_at" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "ID of the owning account." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "ID of the team this template is scoped to, or 0 for account-wide." + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Template ID.", + "example": "6605a1b2c3d4e5f6a7b8c9d0" + }, + "template_name": { + "type": "string", + "description": "Unique template name within the account." + }, + "description": { + "type": "string", + "description": "Free-form description." + }, + "email": { + "type": "string", + "description": "Email body template source (Go `html/template` syntax)." + }, + "sms": { + "type": "string", + "description": "SMS template source (Go `text/template` syntax)." + }, + "voice": { + "type": "string", + "description": "Voice call script template source." + }, + "dingtalk": { + "type": "string", + "description": "DingTalk robot message template source." + }, + "wecom": { + "type": "string", + "description": "WeCom robot message template source." + }, + "feishu": { + "type": "string", + "description": "Feishu robot message template source." + }, + "feishu_app": { + "type": "string", + "description": "Feishu app message template source." + }, + "dingtalk_app": { + "type": "string", + "description": "DingTalk app message template source." + }, + "wecom_app": { + "type": "string", + "description": "WeCom app message template source." + }, + "slack_app": { + "type": "string", + "description": "Slack app message template source." + }, + "teams_app": { + "type": "string", + "description": "Microsoft Teams app message template source." + }, + "telegram": { + "type": "string", + "description": "Telegram bot message template source." + }, + "slack": { + "type": "string", + "description": "Slack robot message template source." + }, + "zoom": { + "type": "string", + "description": "Zoom bot message template source." + }, + "status": { + "type": "string", + "description": "Template lifecycle status.", + "enum": [ + "enabled", + "disabled", + "deleted" + ] + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "Member ID of the creator." + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "Member ID of the last editor." + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "Unix epoch seconds the template was soft-deleted. Absent (omitempty) when the template is live." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Unix epoch seconds the template was created." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Unix epoch seconds the template was last updated." + } + } + }, + "TemplateListRequest": { + "type": "object", + "description": "Paginated list filters. Defaults: p=1, limit=20. Max limit=100.", + "properties": { + "p": { + "type": "integer", + "description": "Page number, starting at 1.", + "minimum": 1, + "default": 1, + "example": 1 + }, + "limit": { + "type": "integer", + "description": "Page size. Capped at 100.", + "minimum": 1, + "maximum": 100, + "default": 20, + "example": 20 + }, + "orderby": { + "type": "string", + "description": "Sort field.", + "enum": [ + "created_at", + "updated_at" + ] + }, + "asc": { + "type": "boolean", + "description": "Ascending sort order.", + "default": false + }, + "is_my_team": { + "type": "boolean", + "description": "When true, only return templates scoped to teams the caller belongs to.", + "default": false + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by specific team IDs." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "Filter by creator member ID." + }, + "query": { + "type": "string", + "description": "Regex or substring match on template_name." + } + } + }, + "TemplateListResponse": { + "type": "object", + "description": "Paginated template list.", + "required": [ + "total", + "has_next_page", + "items" + ], + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total number of templates matching the filter, across all pages.", + "example": 47 + }, + "has_next_page": { + "type": "boolean", + "description": "True if another page exists after the returned one.", + "example": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TemplateItem" + } + } + } + }, + "TemplateUpdateRequest": { + "type": "object", + "description": "Update an existing template.", + "required": [ + "template_id", + "template_name" + ], + "properties": { + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Target template ID.", + "example": "6605a1b2c3d4e5f6a7b8c9d0" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Team scope. 0 for account-wide.", + "default": 0 + }, + "template_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Template name. 1–39 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Free-form description. Up to 500 characters." + }, + "email": { + "type": "string", + "description": "Email body template source (Go `html/template` syntax)." + }, + "sms": { + "type": "string", + "description": "SMS template source (Go `text/template` syntax)." + }, + "voice": { + "type": "string", + "description": "Voice call script template source." + }, + "dingtalk": { + "type": "string", + "description": "DingTalk robot message template source." + }, + "wecom": { + "type": "string", + "description": "WeCom robot message template source." + }, + "feishu": { + "type": "string", + "description": "Feishu robot message template source." + }, + "feishu_app": { + "type": "string", + "description": "Feishu app message template source." + }, + "dingtalk_app": { + "type": "string", + "description": "DingTalk app message template source." + }, + "wecom_app": { + "type": "string", + "description": "WeCom app message template source." + }, + "slack_app": { + "type": "string", + "description": "Slack app message template source." + }, + "teams_app": { + "type": "string", + "description": "Microsoft Teams app message template source." + }, + "telegram": { + "type": "string", + "description": "Telegram bot message template source." + }, + "slack": { + "type": "string", + "description": "Slack robot message template source." + }, + "zoom": { + "type": "string", + "description": "Zoom bot message template source." + } + } + }, + "TimeFilter": { + "type": "object", + "description": "Recurring time window. `start`/`end` use 24-hour `HH:MM` format; `repeat` lists ISO-style weekday indices (0=Sunday … 6=Saturday).", + "properties": { + "start": { + "type": "string", + "description": "Start of the window in `HH:MM`." + }, + "end": { + "type": "string", + "description": "End of the window in `HH:MM`." + }, + "repeat": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Days of the week this window repeats on. Empty means every day." + }, + "cal_id": { + "type": "string", + "description": "Optional calendar ID; restricts the window to days matching the calendar." + }, + "is_off": { + "type": "boolean", + "description": "When true, match days marked as days-off in the calendar." + } + } + }, + "UnackIncidentRequest": { + "type": "object", + "description": "Parameters for removing acknowledgement from one or more incidents.", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "Incident IDs to unacknowledge. At most 100 per call.", + "minItems": 1 + } + } + }, + "UnsubscribeRuleItem": { + "type": "object", + "description": "Drop (unsubscribe) rule record.", + "required": [ + "account_id", + "channel_id", + "priority", + "rule_name", + "description", + "filters", + "status", + "rule_id", + "updated_by", + "created_at", + "updated_at" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64" + }, + "channel_id": { + "type": "integer", + "format": "int64" + }, + "priority": { + "type": "integer" + }, + "rule_name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ] + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "updated_by": { + "type": "integer", + "format": "int64" + }, + "deleted_at": { + "type": "integer", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + } + } + }, + "UpdateChannelRequest": { + "type": "object", + "required": [ + "channel_id" + ], + "description": "Parameters for updating a channel. Only the fields you pass are updated.", + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel ID to update." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "New owning team ID." + }, + "managing_team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "maxItems": 3, + "description": "Additional teams that can manage the channel. Up to 3 entries." + }, + "channel_name": { + "type": "string", + "minLength": 1, + "maxLength": 59, + "description": "New channel name. 1 to 59 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "New description. Up to 500 characters." + }, + "auto_resolve_timeout": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 2592000, + "description": "Auto-resolve timeout in seconds. 0 disables auto-resolve. Max 30 days." + }, + "auto_resolve_mode": { + "type": "string", + "enum": [ + "trigger", + "update" + ], + "description": "Auto-resolve timer reset mode." + }, + "is_private": { + "type": "boolean", + "description": "When true, the channel is visible only to its managing teams." + }, + "group": { + "$ref": "#/components/schemas/Group" + }, + "flapping": { + "$ref": "#/components/schemas/Flapping" + }, + "disable_outlier_detection": { + "type": "boolean", + "description": "Disable outlier incident detection." + }, + "disable_auto_close": { + "type": "boolean", + "description": "Disable automatic incident closing." + }, + "is_external_report_enabled": { + "type": "boolean", + "description": "Allow external reporters to file incidents into this channel." + } + } + }, + "UpdateChannelResponse": { + "type": "object", + "description": "Response from updating a channel. Only populated when `is_external_report_enabled` is set to `true`; otherwise all fields are empty.", + "properties": { + "external_report_token": { + "type": "string", + "description": "Newly generated token for external reporters. Only returned when `is_external_report_enabled` is set to `true` in the request. Callers should store this value; it cannot be retrieved afterwards." + } + } + }, + "UpdateDropRuleRequest": { + "type": "object", + "description": "Parameters for updating a channel drop rule.", + "required": [ + "channel_id", + "rule_id", + "rule_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel the rule belongs to." + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Drop rule ID (MongoDB ObjectID)." + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower runs first." + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Rule name, 1 to 39 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Rule description, up to 500 characters." + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + } + } + }, + "UpdateEscalationRuleRequest": { + "type": "object", + "description": "Parameters for updating an escalation rule.", + "required": [ + "channel_id", + "rule_id", + "template_id", + "rule_name", + "layers" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel the rule belongs to." + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Escalation rule ID (MongoDB ObjectID)." + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower runs first." + }, + "aggr_window": { + "type": "integer", + "description": "Aggregation window in seconds. 0 disables aggregation." + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Notification template ID (MongoDB ObjectID)." + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Rule name, 1 to 39 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Rule description, up to 500 characters." + }, + "layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EscalateLayer" + }, + "description": "Escalation levels in order. At least one level is required." + }, + "time_filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimeFilter" + }, + "description": "Optional recurring time windows during which the rule applies." + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + } + } + }, + "UpdateIncidentFieldsRequest": { + "type": "object", + "description": "Parameters for updating user-editable fields of an incident. At least one field must be provided; the handler will update only the fields you supply.", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + }, + "title": { + "type": "string", + "minLength": 3, + "maxLength": 200, + "description": "New incident title." + }, + "description": { + "type": "string", + "minLength": 3, + "maxLength": 6144, + "description": "New description." + }, + "impact": { + "type": "string", + "minLength": 3, + "maxLength": 6144, + "description": "New impact description." + }, + "root_cause": { + "type": "string", + "minLength": 3, + "maxLength": 6144, + "description": "New root cause analysis." + }, + "resolution": { + "type": "string", + "minLength": 3, + "maxLength": 6144, + "description": "New resolution notes." + }, + "incident_severity": { + "type": "string", + "enum": [ + "Info", + "Warning", + "Critical" + ], + "description": "New severity." + } + } + }, + "UpdateInhibitRuleRequest": { + "type": "object", + "description": "Parameters for updating an inhibit rule.", + "required": [ + "channel_id", + "rule_id", + "rule_name", + "equals" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel the rule belongs to." + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Inhibit rule ID (MongoDB ObjectID)." + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower runs first." + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Rule name, 1 to 39 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Rule description, up to 500 characters." + }, + "equals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Label keys used to pair source and target alerts." + }, + "source_filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "target_filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "is_directly_discard": { + "type": "boolean", + "description": "When true, suppressed target alerts are dropped instead of merged." + } + } + }, + "UpdateSilenceRuleRequest": { + "type": "object", + "description": "Parameters for updating a silence rule. Exactly one of `time_filter` or `time_filters` must be provided, and `filters` must be non-empty.", + "required": [ + "channel_id", + "rule_id", + "rule_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel the rule belongs to." + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Silence rule ID (MongoDB ObjectID)." + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower runs first." + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Rule name, 1 to 39 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Rule description, up to 500 characters." + }, + "time_filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimeFilter" + }, + "description": "Recurring time windows. Mutually exclusive with `time_filter`." + }, + "time_filter": { + "$ref": "#/components/schemas/OnceTimeFilter" + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "is_directly_discard": { + "type": "boolean", + "description": "When true, silenced alerts are dropped instead of suppressed into incidents." + } + } + }, + "UpdateStatusPageChangeRequest": { + "type": "object", + "description": "Parameters for updating the editable fields of a status page event.", + "required": [ + "page_id", + "change_id" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "Status page ID." + }, + "change_id": { + "type": "integer", + "format": "int64", + "description": "Target event ID." + }, + "title": { + "type": "string", + "maxLength": 255, + "description": "New event title, up to 255 characters. Omit to keep the existing value." + }, + "responders": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs responsible for this event. Pass the full replacement list." + }, + "linked_changes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Linked event IDs. Pass the full replacement list." + } + } + }, + "UpdateStatusPageChangeTimelineRequest": { + "type": "object", + "description": "Parameters for updating an existing timeline entry on a status page event.", + "required": [ + "page_id", + "change_id", + "update_id" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "Status page ID." + }, + "change_id": { + "type": "integer", + "format": "int64", + "description": "Parent event ID." + }, + "update_id": { + "type": "string", + "description": "Target timeline update ID." + }, + "at_seconds": { + "type": "integer", + "format": "int64", + "description": "New update timestamp in unix seconds." + }, + "description": { + "type": "string", + "description": "New update description (Markdown)." + } + } + }, + "UpsertRouteRequest": { + "type": "object", + "description": "Parameters for creating or updating the routing rule of an integration. The handler creates a rule when none exists for the integration, otherwise it overwrites the existing one. At least one of `cases` or `default` must be provided.", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration the rule belongs to." + }, + "cases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteCase" + }, + "description": "Ordered list of case branches. Cases are evaluated top to bottom." + }, + "sections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteSection" + }, + "description": "Optional sections that group consecutive cases for display." + }, + "default": { + "$ref": "#/components/schemas/RouteDefault" + }, + "version": { + "type": "integer", + "format": "int64", + "description": "Expected current version for optimistic concurrency control. Pass the value returned by the latest read." + } + } + }, + "WakeIncidentRequest": { + "type": "object", + "description": "Parameters for waking snoozed incidents.", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "Incident IDs to wake. At most 100 per call.", + "minItems": 1 + } + } + }, + "WarRoom": { + "type": "object", + "description": "Live war room details fetched from the IM side. Returns an empty object if the group was deleted externally.", + "required": [ + "chat_id", + "chat_name", + "share_link" + ], + "properties": { + "chat_id": { + "type": "string", + "description": "Chat/group ID on the IM side." + }, + "chat_name": { + "type": "string", + "description": "Chat/group display name." + }, + "share_link": { + "type": "string", + "description": "Join link for the war room, if provided by the IM." + } + } + }, + "WarRoomItem": { + "type": "object", + "description": "Stored war room record.", + "required": [ + "account_id", + "integration_id", + "created_by", + "chat_id", + "incident_id", + "status", + "created_at", + "plugin_type" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "IM integration ID." + }, + "created_by": { + "type": "integer", + "format": "int64", + "description": "Member ID that created the war room." + }, + "chat_id": { + "type": "string", + "description": "Chat/group ID on the IM side." + }, + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Associated incident ID (MongoDB ObjectID)." + }, + "status": { + "type": "string", + "description": "War room status." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (seconds)." + }, + "plugin_type": { + "type": "string", + "description": "IM plugin type (e.g. `feishu`, `dingtalk`, `wecom`, `slack`)." + } + } + }, + "WebhookHistoryDetail": { + "type": "object", + "description": "Full detail for a webhook delivery attempt. Extends `WebhookHistoryItem` with human-friendly reference metadata resolved at query time.", + "required": [ + "integration_id", + "event_id", + "webhook_type", + "event_type", + "endpoint", + "attempt", + "duration", + "status", + "status_code", + "event_time" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID." + }, + "event_id": { + "type": "string", + "description": "Event ID." + }, + "webhook_type": { + "type": "string", + "description": "Source object kind. `incident` or `alert`." + }, + "event_type": { + "type": "string", + "description": "Event type." + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel ID when applicable." + }, + "ref_id": { + "type": "string", + "description": "Source object ID." + }, + "request_headers": { + "type": "string", + "description": "Serialized outbound request headers." + }, + "request_body": { + "type": "string", + "description": "Outbound request body payload." + }, + "endpoint": { + "type": "string", + "description": "Destination URL." + }, + "attempt": { + "type": "integer", + "description": "Attempt sequence number." + }, + "duration": { + "type": "integer", + "description": "Total elapsed time of the attempt in milliseconds." + }, + "status": { + "type": "string", + "enum": [ + "success", + "failed" + ], + "description": "Delivery outcome." + }, + "status_code": { + "type": "integer", + "description": "HTTP status code." + }, + "error_message": { + "type": "string", + "description": "Error message when delivery failed." + }, + "response_headers": { + "type": "string", + "description": "Serialized response headers." + }, + "response_body": { + "type": "string", + "description": "Response body." + }, + "event_time": { + "type": "string", + "description": "Event time as a formatted timestamp string." + }, + "ref_title": { + "type": "string", + "description": "Title of the source incident or alert, resolved at query time." + }, + "channel_name": { + "type": "string", + "description": "Name of the associated channel, resolved at query time." + } + } + }, + "WebhookHistoryItem": { + "type": "object", + "description": "A single webhook delivery attempt. Fields with `omitempty` are absent when zero-valued.", + "required": [ + "integration_id", + "event_id", + "webhook_type", + "event_type", + "endpoint", + "attempt", + "duration", + "status", + "status_code", + "event_time" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID that triggered the webhook." + }, + "event_id": { + "type": "string", + "description": "Unique event identifier for the delivery attempt." + }, + "webhook_type": { + "type": "string", + "description": "Source object kind. `incident` or `alert`." + }, + "event_type": { + "type": "string", + "description": "Event type (e.g. `created`, `acknowledged`, `closed`)." + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel ID associated with the event, when applicable." + }, + "ref_id": { + "type": "string", + "description": "Source object ID (incident ID or alert ID)." + }, + "request_headers": { + "type": "string", + "description": "Serialized outbound request headers." + }, + "request_body": { + "type": "string", + "description": "Outbound request body payload." + }, + "endpoint": { + "type": "string", + "description": "Destination URL." + }, + "attempt": { + "type": "integer", + "description": "Attempt sequence number." + }, + "duration": { + "type": "integer", + "description": "Total elapsed time of the attempt in milliseconds." + }, + "status": { + "type": "string", + "enum": [ + "success", + "failed" + ], + "description": "Delivery outcome." + }, + "status_code": { + "type": "integer", + "description": "HTTP status code returned by the destination." + }, + "error_message": { + "type": "string", + "description": "Error message when delivery failed." + }, + "response_headers": { + "type": "string", + "description": "Serialized response headers from the destination." + }, + "response_body": { + "type": "string", + "description": "Response body returned by the destination." + }, + "event_time": { + "type": "string", + "description": "Event time as a formatted timestamp string." + } + } + } + } + } +} diff --git a/api-reference/on-call.openapi.zh.json b/api-reference/on-call.openapi.zh.json new file mode 100644 index 0000000..60c14fa --- /dev/null +++ b/api-reference/on-call.openapi.zh.json @@ -0,0 +1,24572 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Flashduty 开放 API", + "description": "Flashduty 事件管理平台的公开 HTTP API —— 覆盖故障、通知模板、协作空间、值班排班、监控、RUM、以及平台管理。每次调用都需在 query 中携带 `app_key`,该 key 在 Flashduty 控制台 账户 → APP Key 中签发。所有响应使用统一结构:成功时为 `{ request_id, data }`,失败时为 `{ request_id, error }`。", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://api.flashcat.cloud", + "description": "Flashduty Open API" + } + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "tags": [ + { + "name": "On-call/故障管理", + "description": "" + }, + { + "name": "On-call/协作空间", + "description": "" + }, + { + "name": "On-call/告警管理", + "description": "查询、查看和处理告警,管理卡片视图与告警处理规则。" + }, + { + "name": "On-call/集成中心", + "description": "" + }, + { + "name": "On-call/值班排班", + "description": "" + }, + { + "name": "On-call/日历管理", + "description": "" + }, + { + "name": "On-call/通知模板", + "description": "" + }, + { + "name": "On-call/标签增强", + "description": "自定义字段、富化规则及数据映射(映射规则、映射数据、映射 API)管理。" + }, + { + "name": "On-call/分析看板", + "description": "" + }, + { + "name": "On-call/状态页", + "description": "" + } + ], + "paths": { + "/channel/inhibit/rule/delete": { + "post": { + "operationId": "channelInhibitRuleDelete", + "summary": "删除抑制策略", + "description": "删除指定的抑制策略。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-inhibit-rule-delete", + "metadata": { + "sidebarTitle": "删除抑制策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/enrichment/mapping/data/truncate": { + "post": { + "operationId": "mapping-data-write-truncate", + "summary": "清空映射数据", + "description": "删除指定映射规则的全部数据行。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 此操作不可逆,将删除映射规则中的所有数据。\n- 本接口为高危操作。控制台 JWT 调用需二次验证码;`app_key` 调用跳过 MFA 但仍会被完整记录,请妥善保管 app_key。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-data-write-truncate", + "metadata": { + "sidebarTitle": "清空映射数据" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingSchemaIDRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + } + } + } + } + } + }, + "/enrichment/mapping/api/info": { + "post": { + "operationId": "mapping-api-read-info", + "summary": "查看映射 API 详情", + "description": "根据映射 API ID 返回单个映射 API 的详细信息。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 映射 API 不存在时返回 `null`。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-api-read-info", + "metadata": { + "sidebarTitle": "查看映射 API 详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingAPIItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "api_id": "665f1a2b3c4d5e6f7a8b9c02", + "api_name": "CMDB API", + "url": "https://cmdb.example.com/api/lookup", + "timeout": 2, + "retry_count": 1, + "insecure_skip_verify": false, + "status": "enabled", + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + } + } + } + }, + "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/MappingAPIIDRequest" + }, + "example": { + "api_id": "665f1a2b3c4d5e6f7a8b9c02" + } + } + } + } + } + }, + "/status-page/migration/status": { + "get": { + "operationId": "statusPageMigrationStatus", + "summary": "获取迁移状态", + "description": "获取状态页迁移任务的当前状态和进度。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/status-pages/status-page-migration-status", + "metadata": { + "sidebarTitle": "获取迁移状态" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageMigrationJob" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "job_id": "01KP0311872NVYFRRQ82FW0001", + "account_id": 2451002751131, + "source_page_id": "abcdefghij", + "target_page_id": 5750613685214, + "phase": "history", + "status": "completed", + "progress": { + "total_steps": 5, + "completed_steps": 5, + "components_imported": 8, + "sections_imported": 3, + "incidents_imported": 12, + "maintenances_imported": 2, + "subscribers_imported": 0, + "templates_imported": 0, + "subscribers_skipped": 0 + }, + "created_at": 1766736878, + "updated_at": 1766740000 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "parameters": [ + { + "name": "job_id", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "description": "Migration job ID returned by `migrate-structure` or `migrate-email-subscribers`." + } + ] + } + }, + "/channel/escalate/rule/info": { + "post": { + "operationId": "channelEscalateRuleInfo", + "summary": "获取分派策略详情", + "description": "获取指定分派策略的详细信息。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-escalate-rule-info", + "metadata": { + "sidebarTitle": "获取分派策略详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EscalateRuleItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_id": 2451002751131, + "channel_id": 6193426913131, + "priority": 0, + "aggr_window": 0, + "rule_name": "Default", + "description": "", + "layers": [ + { + "max_times": 1, + "notify_step": 10, + "target": { + "person_ids": [ + 3790925372131 + ], + "by": { + "follow_preference": true + }, + "webhooks": null + }, + "escalate_window": 30, + "force_escalate": false + } + ], + "time_filters": [], + "filters": [], + "status": "enabled", + "template_id": "6321aad26c12104586a88916", + "rule_id": "69bd0ce95a238693176c1d66", + "updated_by": 3790925372131, + "created_at": 1773997289, + "updated_at": 1773997289 + } + } + } + } + }, + "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/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 1001, + "rule_id": "6621b23f4a2c5e0012ab34d0" + } + } + } + } + } + }, + "/enrichment/mapping/data/list": { + "post": { + "operationId": "mapping-data-read-list", + "summary": "查询映射数据列表", + "description": "分页返回指定映射规则的数据行,可按来源标签值进行精确过滤。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 若提供 `query`,须包含全部来源标签——不支持部分来源标签查询。\n- 支持游标分页(`search_after_ctx`)或页码分页(`p`、`limit`)。`limit` 默认 20,最大 100。\n- 响应中的 `search_after_ctx` 可用于获取下一页。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-data-read-list", + "metadata": { + "sidebarTitle": "查询映射数据列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingDataListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "key": "server01", + "fields": { + "host": "server01", + "owner": "alice", + "team": "sre", + "service": "api" + }, + "created_at": 1710000000, + "updated_at": 1710000000 + } + ], + "total": 1, + "has_next_page": false + } + } + } + } + }, + "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/MappingDataListRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "orderby": "updated_at", + "asc": false, + "p": 1, + "limit": 20 + } + } + } + } + } + }, + "/incident/past/list": { + "post": { + "operationId": "incidentPastList", + "summary": "查询历史相似故障", + "description": "查询与当前故障相关的历史故障列表,用于参考排查。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **100 次/分钟**;**20 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-past-list", + "metadata": { + "sidebarTitle": "查询历史相似故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListPastIncidentsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [] + } + } + } + } + }, + "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/ListPastIncidentsRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "limit": 5 + } + } + } + } + } + }, + "/incident/snooze": { + "post": { + "operationId": "incidentSnooze", + "summary": "暂停故障通知", + "description": "暂时屏蔽故障通知直到指定时间。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-snooze", + "metadata": { + "sidebarTitle": "暂停故障通知" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnoozeIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ], + "minutes": 60 + } + } + } + } + } + }, + "/status-page/subscriber/export": { + "post": { + "operationId": "statusPageSubscriberExport", + "summary": "导出订阅者", + "description": "以 CSV 附件形式导出状态页的订阅者列表。响应为 `text/csv` 文件,包含列:Method、Recipient、Components、Subscribe All、Locale。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**;**1 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-subscriber-export", + "metadata": { + "sidebarTitle": "导出订阅者" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageSubscriberExportResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": "Method,Recipient,Components,Subscribe All,Locale\nemail,alice@example.com,,true,zh-CN\nemail,bob@example.com,,true,en-US" + } + } + } + }, + "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/ExportStatusPageSubscribersRequest" + }, + "example": { + "page_id": 5750613685214 + } + } + } + } + } + }, + "/insight/team": { + "post": { + "operationId": "insightByTeam", + "summary": "查看团队洞察", + "description": "返回按团队聚合的洞察指标。", + "tags": [ + "On-call/分析看板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/analytics/insight-by-team", + "metadata": { + "sidebarTitle": "查看团队洞察" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DimensionInsightResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "ts": 1740844800, + "team_id": 4295771902131, + "team_name": "SRE Team", + "total_incident_cnt": 2, + "total_incidents_acknowledged": 2, + "total_incidents_closed": 2, + "total_incidents_auto_closed": 0, + "total_incidents_manually_closed": 2, + "total_incidents_timeout_closed": 0, + "total_incidents_escalated": 0, + "total_incidents_manually_escalated": 0, + "total_incidents_timeout_escalated": 0, + "total_incidents_reassigned": 2, + "total_interruptions": 3, + "total_notifications": 6, + "total_engaged_seconds": 3317709, + "total_seconds_to_ack": 3317709, + "total_seconds_to_close": 3749514, + "mean_seconds_to_ack": 1658854.5, + "mean_seconds_to_close": 1874757, + "noise_reduction_pct": 0, + "acknowledgement_pct": 100, + "total_alert_cnt": 0, + "total_alert_event_cnt": 0 + } + ] + } + } + } + } + }, + "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/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "team_ids": [ + 4295771902131 + ], + "aggregate_unit": "day" + } + } + } + } + } + }, + "/insight/channel/export": { + "post": { + "operationId": "insightChannelExport", + "summary": "导出协作空间洞察", + "description": "将协作空间洞察指标以 CSV 文件形式导出。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", + "tags": [ + "On-call/分析看板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**;**1 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/analytics/insight-channel-export", + "metadata": { + "sidebarTitle": "导出协作空间洞察" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "channel_ids": [ + 4321322010131 + ], + "severities": [ + "Critical", + "Warning" + ] + } + } + } + } + } + }, + "/alert/pipeline/upsert": { + "post": { + "operationId": "alert-write-pipeline-upsert", + "summary": "创建或更新告警处理规则", + "description": "为集成设置告警处理规则,将完全替换已有配置。", + "tags": [ + "On-call/告警管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 每条处理规则最多 50 条规则。\n- 每条规则包含 `kind`(`title_reset`、`description_reset`、`severity_reset`、`alert_drop`、`alert_inhibit` 之一)、可选的 `if` 过滤器,以及与 kind 对应的 `settings`。\n- `alert_inhibit` 类型需要 Standard 及以上许可证。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/alerts/alert-write-pipeline-upsert", + "metadata": { + "sidebarTitle": "创建或更新告警处理规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlertPipelineUpsertRequest" + }, + "example": { + "integration_id": 10001, + "rules": [ + { + "kind": "severity_reset", + "if": null, + "settings": { + "severity": "Warning" + } + } + ] + } + } + } + } + } + }, + "/status-page/change/info": { + "get": { + "operationId": "statusPageChangeInfo", + "summary": "获取状态页事件详情", + "description": "获取状态页指定事件(故障或维护)的详细信息。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/status-pages/status-page-change-info", + "metadata": { + "sidebarTitle": "获取状态页事件详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageChangeItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "change_id": 5821693893131, + "page_id": 5750613685214, + "type": "incident", + "title": "Web Console Degraded Performance", + "description": "The issue has been resolved, and all services are operating normally.\n\nThank you for your patience.", + "status": "resolved", + "affected_components": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", + "name": "Web Console", + "available_since_seconds": 1765349358, + "order_id": 1, + "status": "operational" + } + ], + "start_at_seconds": 1766736878, + "close_at_seconds": 1775529742, + "updates": [ + { + "update_id": "01KDCVJQ88SZPHWPTDV2Z2AZW8", + "at_seconds": 1766736876, + "status": "investigating", + "description": "We are currently investigating an issue affecting some services.", + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "component_name": "Web Console", + "status": "degraded" + } + ] + }, + { + "update_id": "01KNJX3KW873ZZSRZC14SGFYS3", + "at_seconds": 1775529742, + "status": "resolved", + "description": "The issue has been resolved, and all services are operating normally.", + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "component_name": "Web Console", + "status": "operational" + } + ] + } + ], + "notify_subscribers": true + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Status page ID." + }, + { + "name": "change_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Event (change) ID." + } + ] + } + }, + "/channel/notify/rule/enable": { + "post": { + "operationId": "channelNotifyRuleEnable", + "summary": "启用协作空间通知规则", + "description": "启用已禁用的协作空间通知规则。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-notify-rule-enable", + "metadata": { + "sidebarTitle": "启用协作空间通知规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/incident/resolve": { + "post": { + "operationId": "incidentResolve", + "summary": "恢复故障", + "description": "将故障标记为已恢复。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-resolve", + "metadata": { + "sidebarTitle": "恢复故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResolveIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ], + "root_cause": "Memory leak in the connection pool caused by a missing cleanup call.", + "resolution": "Deployed hotfix v2.3.1 and restarted the affected service." + } + } + } + } + } + }, + "/incident/war-room/list": { + "post": { + "operationId": "incidentWarRoomList", + "summary": "查询战情室列表", + "description": "查询故障关联的所有战情室。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-war-room-list", + "metadata": { + "sidebarTitle": "查询战情室列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListWarRoomsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [] + } + } + } + } + }, + "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/ListWarRoomsRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee" + } + } + } + } + } + }, + "/alert/list": { + "post": { + "operationId": "alert-read-list", + "summary": "查询告警列表", + "description": "返回满足过滤条件的告警列表,支持游标分页。", + "tags": [ + "On-call/告警管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |\n\n## 使用说明\n\n- `start_time` 和 `end_time` 均为必填的 Unix 时间戳(秒),最大跨度 31 天。\n- 使用上次响应中的 `search_after_ctx` 获取下一页。\n- 结果会根据调用方的协作空间数据访问权限进行过滤。\n- 将 `is_active` 设为 `true` 可仅返回活跃(触发中)告警;设为 `false` 返回已恢复告警。", + "href": "/zh/api-reference/on-call/alerts/alert-read-list", + "metadata": { + "sidebarTitle": "查询告警列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "has_next_page": false, + "search_after_ctx": "", + "items": [ + { + "alert_id": "663a1b2c3d4e5f6789abcdef", + "integration_id": 10001, + "channel_id": 20001, + "account_id": 10023, + "title": "CPU 使用率 > 90%", + "alert_severity": "Critical", + "alert_status": "Critical", + "start_time": 1712650000, + "last_time": 1712655000, + "end_time": 0, + "labels": { + "host": "web-01" + }, + "ever_muted": false, + "created_at": 1712650000, + "updated_at": 1712655000, + "integration_name": "Prometheus", + "integration_type": "prometheus", + "channel_name": "生产", + "event_cnt": 3 + } + ] + } + } + } + } + }, + "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/AlertListRequest" + }, + "example": { + "start_time": 1712620800, + "end_time": 1712707200, + "limit": 20, + "is_active": true + } + } + } + } + } + }, + "/status-page/change/update": { + "post": { + "operationId": "statusPageChangeUpdate", + "summary": "更新状态页事件", + "description": "更新已有状态页事件。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面事件管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-change-update", + "metadata": { + "sidebarTitle": "更新状态页事件" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateStatusPageChangeRequest" + }, + "example": { + "page_id": 5750613685214, + "change_id": 5821693893131, + "title": "Web Console Degraded Performance (Updated)" + } + } + } + } + } + }, + "/incident/alert/list": { + "post": { + "operationId": "incidentAlertList", + "summary": "查询故障关联告警", + "description": "查询合并到指定故障中的所有告警列表。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-alert-list", + "metadata": { + "sidebarTitle": "查询故障关联告警" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListIncidentAlertsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "items": [ + { + "alert_id": "69da451df77b1b51f40e83de", + "integration_id": 2490562293131, + "data_source_id": 2490562293131, + "channel_id": 2551105804131, + "account_id": 2451002751131, + "description": "", + "title": "CPU usage high - web-server-01", + "title_rule": "", + "alert_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata", + "alert_severity": "Critical", + "alert_status": "Critical", + "start_time": 1775912219, + "last_time": 1775969819, + "end_time": 0, + "labels": { + "check": "cpu_usage_high", + "resource": "web-server-01" + }, + "ever_muted": false, + "created_at": 1775912221, + "updated_at": 1775969821, + "integration_name": "FlashMonit", + "integration_type": "monit.alert", + "integration_ref_id": "a_2451002751131", + "channel_name": "Ops Channel", + "channel_status": "enabled", + "responder_name": "", + "responder_email": "", + "incident": { + "incident_id": "69da451ef77b1b51f40e83ee", + "title": "CPU usage high - web-server-01", + "progress": "Triggered" + }, + "event_cnt": 17, + "images": null, + "data_source_name": "FlashMonit", + "data_source_type": "monit.alert", + "data_source_ref_id": "a_2451002751131" + } + ] + } + } + } + } + }, + "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/ListIncidentAlertsRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "is_active": true, + "limit": 100, + "p": 1 + } + } + } + } + } + }, + "/channel/escalate/rule/update": { + "post": { + "operationId": "channelEscalateRuleUpdate", + "summary": "更新分派策略", + "description": "更新已有分派策略的配置。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-escalate-rule-update", + "metadata": { + "sidebarTitle": "更新分派策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateEscalationRuleRequest" + }, + "example": { + "channel_id": 1001, + "rule_id": "6621b23f4a2c5e0012ab34d0", + "template_id": "6621b23f4a2c5e0012ab34d1", + "rule_name": "Default escalation", + "layers": [ + { + "target": { + "person_ids": [ + 42 + ], + "by": { + "critical": [ + "voice" + ], + "warning": [ + "sms" + ] + } + } + } + ] + } + } + } + } + } + }, + "/calendar/event/upsert": { + "post": { + "operationId": "calEventUpsert", + "summary": "创建或更新日历事件", + "description": "创建或更新日历事件(节假日或工作日覆盖)。不传 event_id 时会创建新事件。", + "tags": [ + "On-call/日历管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/calendars/cal-event-upsert", + "metadata": { + "sidebarTitle": "创建或更新日历事件" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalEventUpsertResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4", + "summary": "Test Holiday" + } + } + } + } + }, + "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/CalEventUpsertRequest" + }, + "example": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "summary": "Labour Day", + "start_at": "2024-05-01", + "end_at": "2024-05-06", + "is_off": true, + "description": "International Workers Day holiday" + } + } + } + } + } + }, + "/status-page/change/delete": { + "post": { + "operationId": "statusPageChangeDelete", + "summary": "删除状态页事件", + "description": "删除指定的状态页事件。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面事件管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-change-delete", + "metadata": { + "sidebarTitle": "删除状态页事件" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteStatusPageChangeRequest" + }, + "example": { + "page_id": 5750613685214, + "change_id": 5821693893131 + } + } + } + } + } + }, + "/incident/war-room/detail": { + "post": { + "operationId": "incidentWarRoomDetail", + "summary": "获取战情室详情", + "description": "获取故障的战情室配置和成员信息。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-war-room-detail", + "metadata": { + "sidebarTitle": "获取战情室详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/WarRoom" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000", + "chat_name": "Incident #0E83EE war room", + "share_link": "" + } + } + } + } + }, + "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/GetWarRoomDetailRequest" + }, + "example": { + "integration_id": 2490562293131, + "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000" + } + } + } + } + } + }, + "/calendar/delete": { + "post": { + "operationId": "calendarDelete", + "summary": "删除服务日历", + "description": "删除个人服务日历。当日历被分派或静默策略引用时删除会失败。", + "tags": [ + "On-call/日历管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/calendars/calendar-delete", + "metadata": { + "sidebarTitle": "删除服务日历" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CalendarIDRequest" + }, + "example": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM" + } + } + } + } + } + }, + "/alert/event/list": { + "post": { + "operationId": "alert-read-event-list", + "summary": "查询告警事件列表", + "description": "返回特定告警收到的所有原始事件,按时间顺序排列。", + "tags": [ + "On-call/告警管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |\n\n## 使用说明\n\n- 每条告警会从集成持续接收原始事件,此接口展示指定告警的原始事件历史。", + "href": "/zh/api-reference/on-call/alerts/alert-read-event-list", + "metadata": { + "sidebarTitle": "查询告警事件列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertEventListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "event_id": "663a1b2c3d4e5f6789abc001", + "alert_id": "663a1b2c3d4e5f6789abcdef", + "title": "CPU 使用率 > 90%", + "event_severity": "Critical", + "event_status": "Critical", + "event_time": 1712650000, + "labels": { + "host": "web-01" + } + } + ] + } + } + } + } + }, + "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/AlertEventListRequest" + }, + "example": { + "alert_id": "663a1b2c3d4e5f6789abcdef" + } + } + } + } + } + }, + "/incident/merge": { + "post": { + "operationId": "incidentMerge", + "summary": "合并故障", + "description": "将一个或多个故障合并到目标故障中。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-merge", + "metadata": { + "sidebarTitle": "合并故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MergeIncidentsRequest" + }, + "example": { + "source_incident_ids": [ + "69da451ef77b1b51f40e83ef", + "69da451ef77b1b51f40e83f0" + ], + "target_incident_id": "69da451ef77b1b51f40e83ee", + "comment": "Merging related database connectivity incidents into one." + } + } + } + } + } + }, + "/enrichment/mapping/data/delete": { + "post": { + "operationId": "mapping-data-write-delete", + "summary": "删除映射数据", + "description": "按键名批量删除最多 100 条映射数据行。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-data-write-delete", + "metadata": { + "sidebarTitle": "删除映射数据" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingDataDeleteRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "keys": [ + "server01", + "server02" + ] + } + } + } + } + } + }, + "/incident/post-mortem/delete": { + "post": { + "operationId": "incidentPostMortemDelete", + "summary": "删除复盘报告", + "description": "删除指定的复盘报告。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-post-mortem-delete", + "metadata": { + "sidebarTitle": "删除复盘报告" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePostMortemRequest" + }, + "example": { + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e" + } + } + } + } + } + }, + "/calendar/update": { + "post": { + "operationId": "calendarUpdate", + "summary": "更新服务日历", + "description": "更新个人服务日历,仅更新传入的非空字段。", + "tags": [ + "On-call/日历管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/calendars/calendar-update", + "metadata": { + "sidebarTitle": "更新服务日历" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CalendarUpdateRequest" + }, + "example": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "cal_name": "Production On-Call Calendar (Updated)", + "timezone": "America/New_York", + "workdays": [ + 1, + 2, + 3, + 4, + 5 + ] + } + } + } + } + } + }, + "/incident/war-room/delete": { + "post": { + "operationId": "incidentWarRoomDelete", + "summary": "删除战情室", + "description": "删除指定的故障战情室。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-war-room-delete", + "metadata": { + "sidebarTitle": "删除战情室" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteWarRoomRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "integration_id": 2490562293131 + } + } + } + } + } + }, + "/incident/remove": { + "post": { + "operationId": "incidentRemove", + "summary": "删除故障", + "description": "永久删除一个故障及其关联数据。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-remove", + "metadata": { + "sidebarTitle": "删除故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RemoveIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] + } + } + } + } + } + }, + "/channel/unsubscribe/rule/enable": { + "post": { + "operationId": "channelUnsubscribeRuleEnable", + "summary": "启用排除规则", + "description": "启用已禁用的排除规则。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/channel-unsubscribe-rule-enable", + "metadata": { + "sidebarTitle": "启用排除规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/insight/incident/list": { + "post": { + "operationId": "insightIncidentList", + "summary": "查询洞察故障列表", + "description": "返回用于分析看板的故障分页列表,包含每条故障的处理效能指标。", + "tags": [ + "On-call/分析看板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/analytics/insight-incident-list", + "metadata": { + "sidebarTitle": "查询洞察故障列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/InsightIncidentListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 2, + "has_next_page": false, + "items": [ + { + "incident_id": "67ca560c381a4fedb664f5f8", + "title": "CPU spike on prod-web-01", + "description": "CPU usage exceeded 90% threshold", + "team_id": 4295771902131, + "team_name": "SRE Team", + "channel_id": 4321322010131, + "channel_name": "Production Alerts", + "progress": "Closed", + "severity": "Info", + "created_at": 1741313548, + "closed_by": "manually", + "seconds_to_ack": 1052085, + "seconds_to_close": 1483880, + "engaged_seconds": 1052085, + "hours": "work", + "responders": [ + { + "person_id": 3790925372131, + "assigned_at": 1741313548, + "acknowledged_at": 1742365633, + "person_name": "alice", + "email": "alice@example.com" + } + ], + "assigned_to": { + "person_ids": [ + 3790925372131 + ], + "escalate_rule_id": "000000000000000000000000", + "layer_idx": 0, + "type": "reassign" + }, + "labels": {}, + "fields": {}, + "notifications": 4, + "interruptions": 2, + "assignments": 2, + "reassignments": 1, + "acknowledgements": 1, + "escalations": 0, + "timeout_escalations": 0, + "manual_escalations": 0, + "creator_id": 3790925372131, + "creator_name": "alice" + } + ] + } + } + } + } + }, + "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/InsightIncidentListRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "p": 1, + "limit": 20, + "severities": [ + "Critical" + ] + } + } + } + } + } + }, + "/status-page/change/create": { + "post": { + "operationId": "statusPageChangeCreate", + "summary": "创建状态页事件", + "description": "在状态页上创建新的故障或维护事件。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面事件管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-change-create", + "metadata": { + "sidebarTitle": "创建状态页事件" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageChangeCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "change_id": 6294539747131, + "change_name": "API Test Incident" + } + } + } + } + }, + "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/CreateStatusPageChangeRequest" + }, + "example": { + "page_id": 5750613685214, + "type": "incident", + "title": "Web Console Degraded Performance", + "description": "We are investigating degraded performance affecting the web console.", + "status": "investigating", + "start_at_seconds": 1712000000, + "notify_subscribers": true, + "updates": [ + { + "status": "investigating", + "description": "We are currently investigating an issue affecting some users.", + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "status": "degraded" + } + ] + } + ] + } + } + } + } + } + }, + "/schedule/preview": { + "post": { + "operationId": "schedulePreview", + "summary": "预览值班表", + "description": "预览值班表配置生成的排班结果,不会持久化。请求体与创建/更新相同,并需要指定 start 和 end 时间窗口(最多 45 天)。", + "tags": [ + "On-call/值班排班" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **60 次/分钟**;**10 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/schedules/schedule-preview", + "metadata": { + "sidebarTitle": "预览值班表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": null, + "name": null, + "account_id": 0, + "group_id": null, + "disabled": null, + "create_at": 0, + "create_by": 0, + "update_at": 0, + "update_by": 0, + "layers": [ + { + "account_id": 0, + "name": "Layer 1", + "schedule_id": 0, + "hidden": 0, + "mode": 0, + "weight": 0, + "groups": [ + { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 0, + "end": 0 + }, + { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2476123212131 + ] + } + ], + "start": 0, + "end": 0 + } + ], + "rotation_duration": 86400, + "handoff_time": 0, + "enable_time": 1775980800, + "expire_time": 0, + "restrict_mode": 0, + "restrict_start": 0, + "restrict_end": 0, + "restrict_periods": [], + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "create_at": 0, + "create_by": 0, + "update_at": 0, + "update_by": 0, + "layer_name": "Layer 1", + "fair_rotation": false, + "layer_start": 1775980800, + "layer_end": null, + "rotation_unit": "day", + "rotation_value": 1, + "mask_continuous_enabled": false + } + ], + "schedule_layers": [ + { + "layer_name": "Layer 1", + "name": "Layer 1", + "mode": 0, + "schedules": [ + { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "index": 0 + }, + { + "start": 1776096000, + "end": 1776182400, + "group": { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2476123212131 + ] + } + ], + "start": 1776096000, + "end": 1776182400 + }, + "index": 0 + } + ] + } + ], + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": [ + { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "index": 0 + } + ] + }, + "start": 1775980800, + "end": 1776240000, + "notify": null, + "schedule_id": 0, + "schedule_name": null, + "team_id": null, + "description": null, + "layer_schedules": null, + "status": null, + "cur_oncall": null, + "next_oncall": null + } + } + } + } + }, + "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/ScheduleUpsertRequest" + }, + "example": { + "schedule_name": "Preview Schedule", + "start": 1712000000, + "end": 1712086400, + "layers": [ + { + "layer_name": "Layer 1", + "name": "Layer 1", + "mode": 0, + "weight": 0, + "hidden": 0, + "groups": [ + { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 0, + "end": 0 + } + ], + "rotation_unit": "day", + "rotation_value": 1, + "rotation_duration": 86400, + "handoff_time": 0, + "enable_time": 1712000000, + "expire_time": 0, + "restrict_mode": 0, + "restrict_start": 0, + "restrict_end": 0, + "restrict_periods": [], + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "fair_rotation": false, + "mask_continuous_enabled": false + } + ] + } + } + } + } + } + }, + "/webhook/history/list": { + "post": { + "operationId": "webhookHistoryList", + "summary": "查询 Webhook 推送历史", + "description": "查询出站 Webhook 通知的推送历史记录。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/integrations/webhook-history-list", + "metadata": { + "sidebarTitle": "查询 Webhook 推送历史" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListWebhookHistoryResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "integration_id": 5321026051131, + "event_id": "20260412Xatt9hrXsgmFkBR78WF655", + "webhook_type": "alert", + "event_type": "a_update", + "channel_id": 2551105804131, + "ref_id": "69da3f0ef77b1b51f40e83cc", + "endpoint": "https://example.com/webhook", + "attempt": 1, + "duration": 132, + "status": "success", + "status_code": 200, + "event_time": "2026-04-12T13:31:11.357472+08:00" + } + ], + "search_after_ctx": "eyJldmVudF90aW1lIjoiMjAyNi0wNC0xMlQxMzoxNToyNi4zODI1NDcrMDg6MDAiLCJldmVudF9pZCI6IjIwMjYwNDEybUdzeFAzZHJwRmZzNFpDUWQycFNEcCJ9", + "total": 346 + } + } + } + } + }, + "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/ListWebhookHistoryRequest" + }, + "example": { + "limit": 20, + "start_time": 1775116800000, + "end_time": 1775203200000, + "integration_id": 6113996590131, + "status": "success" + } + } + } + } + } + }, + "/incident/wake": { + "post": { + "operationId": "incidentWake", + "summary": "恢复故障通知", + "description": "取消故障的暂停状态,恢复通知。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-wake", + "metadata": { + "sidebarTitle": "恢复故障通知" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WakeIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] + } + } + } + } + } + }, + "/channel/silence/rule/enable": { + "post": { + "operationId": "channelSilenceRuleEnable", + "summary": "启用静默策略", + "description": "启用已禁用的静默策略。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-silence-rule-enable", + "metadata": { + "sidebarTitle": "启用静默策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/silence/rule/update": { + "post": { + "operationId": "channelSilenceRuleUpdate", + "summary": "更新静默策略", + "description": "更新已有静默策略的配置。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-silence-rule-update", + "metadata": { + "sidebarTitle": "更新静默策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSilenceRuleRequest" + }, + "example": { + "channel_id": 1001, + "rule_id": "6621b23f4a2c5e0012ab34cd", + "rule_name": "Mute during maintenance", + "time_filter": { + "start_time": 1710000000, + "end_time": 1710086400 + }, + "filters": [ + [ + { + "key": "labels.service", + "oper": "IN", + "vals": [ + "billing" + ] + } + ] + ] + } + } + } + } + } + }, + "/channel/notify/rule/create": { + "post": { + "operationId": "channelNotifyRuleCreate", + "summary": "创建协作空间通知规则", + "description": "为协作空间创建通知规则。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-notify-rule-create", + "metadata": { + "sidebarTitle": "创建协作空间通知规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/incident/feed": { + "post": { + "operationId": "incidentFeed", + "summary": "获取故障时间线", + "description": "获取指定故障的时间线动态,包括状态变更、评论和系统事件。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-feed", + "metadata": { + "sidebarTitle": "获取故障时间线" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListIncidentFeedResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "has_next_page": true, + "items": [ + { + "ref_id": "69da451ef77b1b51f40e83ee", + "type": "i_new", + "detail": { + "severity": "Critical", + "title": "CPU usage high - web-server-01" + }, + "account_id": 2451002751131, + "creator_id": 0, + "created_at": 1775912222661, + "updated_at": 1775912222661 + }, + { + "ref_id": "69da451ef77b1b51f40e83ee", + "type": "i_notify", + "detail": { + "rid": "5e9ccfabcd154b41a0005fd0f52b674b", + "msg_id": "naFudJYCawBWsChdV6ErPH", + "fire_type": "fire", + "escalate_rule_id": "000000000000000000000000", + "layer_idx": 0, + "by": "email", + "persons": [ + { + "person_id": 2476444212131 + } + ] + }, + "account_id": 2451002751131, + "creator_id": 0, + "created_at": 1775972130174, + "updated_at": 1775972130174 + } + ] + } + } + } + } + }, + "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/ListIncidentFeedRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "p": 1, + "limit": 20 + } + } + } + } + } + }, + "/channel/inhibit/rule/create": { + "post": { + "operationId": "channelInhibitRuleCreate", + "summary": "创建抑制策略", + "description": "创建一条抑制策略,当高优先级告警触发时抑制低优先级告警。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-inhibit-rule-create", + "metadata": { + "sidebarTitle": "创建抑制策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "rule_id": "69db2f69a0fe7db6448b1504", + "rule_name": "Test inhibit rule" + } + } + } + } + }, + "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/CreateInhibitRuleRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_name": "Suppress Info when Critical fires", + "description": "When a Critical alert fires, suppress matching Info alerts", + "equals": [ + "labels.cluster", + "labels.service" + ], + "source_filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Critical" + ] + } + ] + ], + "target_filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "is_directly_discard": false + } + } + } + } + } + }, + "/channel/inhibit/rule/enable": { + "post": { + "operationId": "channelInhibitRuleEnable", + "summary": "启用抑制策略", + "description": "启用已禁用的抑制策略。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-inhibit-rule-enable", + "metadata": { + "sidebarTitle": "启用抑制策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/enrichment/mapping/schema/list": { + "post": { + "operationId": "mapping-schema-read-list", + "summary": "查询映射规则列表", + "description": "返回账户下所有映射规则,按创建时间升序排列。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-schema-read-list", + "metadata": { + "sidebarTitle": "查询映射规则列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingSchemaListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "items": [ + { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "schema_name": "CMDB 查询", + "description": "用 CMDB 数据富化告警", + "source_labels": [ + "host" + ], + "result_labels": [ + "owner", + "team", + "service" + ], + "status": "enabled", + "team_id": 0, + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + ] + } + } + } + } + }, + "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/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/channel/unsubscribe/rule/delete": { + "post": { + "operationId": "channelUnsubscribeRuleDelete", + "summary": "删除排除规则", + "description": "删除指定的排除规则。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/channel-unsubscribe-rule-delete", + "metadata": { + "sidebarTitle": "删除排除规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/alert/pipeline/info": { + "post": { + "operationId": "alert-read-pipeline-info", + "summary": "查看告警处理规则", + "description": "返回指定集成的告警处理规则配置。", + "tags": [ + "On-call/告警管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心查看**(`on-call`) |\n\n## 使用说明\n\n- 若该集成尚未配置告警处理规则,则 data 为 `null`。\n- 调用方需有该集成的访问权限。", + "href": "/zh/api-reference/on-call/alerts/alert-read-pipeline-info", + "metadata": { + "sidebarTitle": "查看告警处理规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertPipelineItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 10001, + "rules": [ + { + "kind": "severity_reset", + "if": null, + "settings": { + "severity": "Warning" + } + } + ], + "status": "enabled", + "creator_id": 80011, + "updated_by": 80011, + "created_at": 1710000000, + "updated_at": 1712000000 + } + } + } + } + }, + "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/AlertPipelineInfoRequest" + }, + "example": { + "integration_id": 10001 + } + } + } + } + } + }, + "/enrichment/mapping/schema/delete": { + "post": { + "operationId": "mapping-schema-write-delete", + "summary": "删除映射规则", + "description": "删除映射规则及其所有关联数据。若该规则被富化规则或 Webhook 引用,则拒绝删除。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 若映射规则仍被引用,响应返回 HTTP 400,`refs` 字段列出所有阻止删除的引用。\n- 仅映射规则创建者、账户管理员或所属团队成员可删除。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。\n- 本接口为高危操作。控制台 JWT 调用需二次验证码;`app_key` 调用跳过 MFA 但仍会被完整记录,请妥善保管 app_key。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-schema-write-delete", + "metadata": { + "sidebarTitle": "删除映射规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingSchemaIDRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + } + } + } + } + } + }, + "/insight/account": { + "post": { + "operationId": "insightByAccount", + "summary": "查看账户级别洞察", + "description": "返回整个账户的聚合故障洞察指标。", + "tags": [ + "On-call/分析看板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/analytics/insight-by-account", + "metadata": { + "sidebarTitle": "查看账户级别洞察" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DimensionInsightResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "ts": 1740844800, + "total_incident_cnt": 2, + "total_incidents_acknowledged": 2, + "total_incidents_closed": 2, + "total_incidents_auto_closed": 0, + "total_incidents_manually_closed": 2, + "total_incidents_timeout_closed": 0, + "total_incidents_escalated": 0, + "total_incidents_manually_escalated": 0, + "total_incidents_timeout_escalated": 0, + "total_incidents_reassigned": 2, + "total_interruptions": 3, + "total_notifications": 6, + "total_engaged_seconds": 3317709, + "total_seconds_to_ack": 3317709, + "total_seconds_to_close": 3749514, + "mean_seconds_to_ack": 1658854.5, + "mean_seconds_to_close": 1874757, + "noise_reduction_pct": 0, + "acknowledgement_pct": 100, + "total_alert_cnt": 0, + "total_alert_event_cnt": 0 + } + ] + } + } + } + } + }, + "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/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "aggregate_unit": "day", + "severities": [ + "Critical", + "Warning" + ] + } + } + } + } + } + }, + "/insight/incident/export": { + "post": { + "operationId": "insightIncidentExport", + "summary": "导出洞察故障", + "description": "将故障分析列表以 CSV 文件形式导出。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", + "tags": [ + "On-call/分析看板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**;**1 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/analytics/insight-incident-export", + "metadata": { + "sidebarTitle": "导出洞察故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightIncidentExportRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "severities": [ + "Critical", + "Warning" + ], + "export_fields": [ + "incident_id", + "title", + "severity", + "created_at", + "seconds_to_close" + ], + "description_html_to_text": true + } + } + } + } + } + }, + "/schedule/info": { + "post": { + "operationId": "scheduleInfo", + "summary": "获取值班表详情", + "description": "返回值班表的详细信息,并按照指定时间窗口(最多 45 天)返回计算出的值班分层。", + "tags": [ + "On-call/值班排班" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/schedules/schedule-info", + "metadata": { + "sidebarTitle": "获取值班表详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 5789640530410, + "name": "test-000001", + "account_id": 2451002751131, + "group_id": 4291079133131, + "disabled": 0, + "create_at": 1766110836, + "create_by": 2476123212131, + "update_at": 1775205795, + "update_by": 2476123212131, + "layers": [ + { + "account_id": 2451002751131, + "name": "Layer 1", + "schedule_id": 5789640530410, + "hidden": 0, + "mode": 0, + "weight": 0, + "groups": [ + { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 3122470302131 + ] + } + ], + "start": 0, + "end": 0 + }, + { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2659460982131 + ] + } + ], + "start": 0, + "end": 0 + } + ], + "rotation_duration": 86400, + "handoff_time": 0, + "enable_time": 1767542400, + "expire_time": 0, + "restrict_mode": 0, + "restrict_start": 0, + "restrict_end": 0, + "restrict_periods": [], + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "create_at": 1775205795, + "create_by": 2476123212131, + "update_at": 1775205795, + "update_by": 2476123212131, + "layer_name": "Layer 1", + "fair_rotation": false, + "layer_start": 1767542400, + "layer_end": null, + "rotation_unit": "day", + "rotation_value": 1, + "mask_continuous_enabled": false + } + ], + "schedule_layers": [ + { + "layer_name": "Layer 1", + "name": "Layer 1", + "mode": 0, + "schedules": [ + { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 3122470302131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "index": 0 + }, + { + "start": 1776096000, + "end": 1776182400, + "group": { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2659460982131 + ] + } + ], + "start": 1776096000, + "end": 1776182400 + }, + "index": 0 + } + ] + } + ], + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": [ + { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 3122470302131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "index": 0 + } + ] + }, + "notify": { + "advance_in_time": 300, + "fixed_time": null, + "by": { + "follow_preference": false, + "personal_channels": [ + "email" + ] + }, + "webhooks": [ + { + "type": "feishu_app", + "settings": { + "token": "", + "alias": "", + "data_source_id": 5427276014131, + "chat_ids": [ + "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d" + ], + "verify_token": "", + "sign_secret": "" + } + } + ] + }, + "schedule_id": 5789640530410, + "schedule_name": "test-000001", + "team_id": 4291079133131, + "description": "abc", + "layer_schedules": [ + { + "layer_name": "Layer 1", + "name": "Layer 1", + "mode": 0, + "schedules": [ + { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 3122470302131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "index": 0 + } + ] + } + ], + "status": 0, + "cur_oncall": { + "start": 1775972040, + "end": 1776009600, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 1775972040, + "end": 1776009600 + }, + "update_at": 0, + "weight": 0, + "index": 0 + }, + "next_oncall": { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 3122470302131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "update_at": 0, + "weight": 0, + "index": 0 + } + } + } + } + } + }, + "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/ScheduleInfoRequest" + }, + "example": { + "schedule_id": 2001, + "start": 1712000000, + "end": 1712086400 + } + } + } + } + } + }, + "/template/update": { + "post": { + "operationId": "template-write-update", + "summary": "更新模板", + "description": "替换指定模板在所有通道上的内容。", + "tags": [ + "On-call/通知模板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **模板管理**(`on-call`) |\n\n## 使用说明\n\n- 请求中的每个通道字段会覆盖存储值——想清空某通道时,把该字段设置为空字符串即可。\n- 调用者必须对目标模板所属团队拥有数据权限,否则返回 `AccessDenied`。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/notification-templates/template-write-update", + "metadata": { + "sidebarTitle": "更新模板" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TemplateUpdateRequest" + }, + "example": { + "template_id": "6605a1b2c3d4e5f6a7b8c9d0", + "template_name": "生产环境默认模板", + "description": "已更新的描述。", + "email": "Incident {{ .IncidentName }} on {{ .Severity }}", + "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}" + } + } + } + } + } + }, + "/channel/infos": { + "post": { + "operationId": "channelInfos", + "summary": "批量获取协作空间", + "description": "通过 ID 列表批量获取协作空间信息。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/channel-infos", + "metadata": { + "sidebarTitle": "批量获取协作空间" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ChannelInfosResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "channel_id": 1001, + "channel_name": "Production Alerts", + "status": "enabled" + } + ] + } + } + } + } + }, + "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/ChannelInfosRequest" + }, + "example": { + "channel_ids": [ + 1001, + 1002 + ] + } + } + } + } + } + }, + "/schedule/infos": { + "post": { + "operationId": "scheduleInfos", + "summary": "批量获取值班表", + "description": "根据 ID 列表批量返回值班表信息。", + "tags": [ + "On-call/值班排班" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/schedules/schedule-infos", + "metadata": { + "sidebarTitle": "批量获取值班表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleSelfResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "id": 5789640530410, + "name": "test-000001", + "account_id": 2451002751131, + "group_id": 4291079133131, + "disabled": 0, + "create_at": 1766110836, + "create_by": 2476123212131, + "update_at": 1775205795, + "update_by": 2476123212131, + "layers": null, + "schedule_layers": null, + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": null + }, + "notify": { + "advance_in_time": 300, + "fixed_time": null, + "by": { + "follow_preference": false, + "personal_channels": [ + "email" + ] + }, + "webhooks": [ + { + "type": "feishu_app", + "settings": { + "token": "", + "alias": "", + "data_source_id": 5427276014131, + "chat_ids": [ + "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d" + ], + "verify_token": "", + "sign_secret": "" + } + } + ] + }, + "schedule_id": 5789640530410, + "schedule_name": "test-000001", + "team_id": 4291079133131, + "description": "abc", + "layer_schedules": null, + "status": 0, + "cur_oncall": null, + "next_oncall": null + } + ] + } + } + } + } + }, + "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/ScheduleIDsRequest" + }, + "example": { + "schedule_ids": [ + 2001, + 2002, + 2003 + ] + } + } + } + } + } + }, + "/template/info": { + "post": { + "operationId": "template-read-info", + "summary": "查看模板详情", + "description": "按 ID 返回单个通知模板。", + "tags": [ + "On-call/通知模板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **模板查看**(`on-call`) |\n\n## 使用说明\n\n- 传入 `000000000000000000000001` 作为 `template_id` 可以获取当前账户语种下的系统预置模板。", + "href": "/zh/api-reference/on-call/notification-templates/template-read-info", + "metadata": { + "sidebarTitle": "查看模板详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TemplateItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_id": 10023, + "team_id": 0, + "template_id": "6605a1b2c3d4e5f6a7b8c9d0", + "template_name": "生产环境默认模板", + "description": "Default template for production incidents.", + "email": "Incident {{ .IncidentName }} on {{ .Severity }}", + "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}", + "voice": "", + "dingtalk": "", + "wecom": "", + "feishu": "", + "feishu_app": "", + "dingtalk_app": "", + "wecom_app": "", + "slack_app": "", + "teams_app": "", + "telegram": "", + "slack": "", + "zoom": "", + "status": "enabled", + "creator_id": 80011, + "updated_by": 80011, + "created_at": 1712700000, + "updated_at": 1712702400 + } + } + } + } + }, + "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/TemplateIDRequest" + }, + "example": { + "template_id": "6605a1b2c3d4e5f6a7b8c9d0" + } + } + } + } + } + }, + "/channel/escalate/rule/disable": { + "post": { + "operationId": "channelEscalateRuleDisable", + "summary": "禁用分派策略", + "description": "禁用分派策略而不删除。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-escalate-rule-disable", + "metadata": { + "sidebarTitle": "禁用分派策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/incident/reset": { + "post": { + "operationId": "incidentReset", + "summary": "更新故障信息", + "description": "一次调用更新故障的多个可编辑字段,包括标题、描述、影响范围、根因、恢复方案和严重程度。至少需要提供一个字段。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-reset", + "metadata": { + "sidebarTitle": "更新故障信息" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateIncidentFieldsRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "title": "Database connection timeout - prod-db-01 primary", + "incident_severity": "Critical" + } + } + } + } + } + }, + "/channel/disable": { + "post": { + "operationId": "channelDisable", + "summary": "禁用协作空间", + "description": "禁用协作空间以停止故障路由,而不删除该空间。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-disable", + "metadata": { + "sidebarTitle": "禁用协作空间" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelIDRequest" + }, + "example": { + "channel_id": 3521074710131 + } + } + } + } + } + }, + "/webhook/history/detail": { + "post": { + "operationId": "webhookHistoryDetail", + "summary": "获取 Webhook 推送详情", + "description": "获取指定 Webhook 推送尝试的详细请求体和响应信息。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/integrations/webhook-history-detail", + "metadata": { + "sidebarTitle": "获取 Webhook 推送详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/WebhookHistoryDetail" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 5321026051131, + "event_id": "20260412Xatt9hrXsgmFkBR78WF655", + "webhook_type": "alert", + "event_type": "a_update", + "channel_id": 2551105804131, + "ref_id": "69da3f0ef77b1b51f40e83cc", + "request_headers": "{\"Content-Type\":\"application/json\"}", + "request_body": "{\"event_type\":\"a_update\",\"event_id\":\"d789d65951c0532ea9b6a1d99b707054\"}", + "endpoint": "https://example.com/webhook", + "attempt": 1, + "duration": 132, + "status": "success", + "status_code": 200, + "response_headers": "{\"Content-Type\":\"application/json\"}", + "response_body": "{\"ok\":true}", + "event_time": "2026-04-12T13:31:11.357472+08:00", + "ref_title": "High CPU Usage on host-01", + "channel_name": "Production Alerts" + } + } + } + } + }, + "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/GetWebhookHistoryDetailRequest" + }, + "example": { + "event_id": "20260412Xatt9hrXsgmFkBR78WF655", + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/schedule/list": { + "post": { + "operationId": "scheduleList", + "summary": "查询值班表列表", + "description": "返回值班表的分页列表。若同时传入 start 与 end(间隔不超过 45 天),响应会包含计算后的排班分层。", + "tags": [ + "On-call/值班排班" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/schedules/schedule-list", + "metadata": { + "sidebarTitle": "查询值班表列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "id": 5789640530410, + "name": "test-000001", + "account_id": 2451002751131, + "group_id": 4291079133131, + "disabled": 0, + "create_at": 1766110836, + "create_by": 2476123212131, + "update_at": 1775205795, + "update_by": 2476123212131, + "layers": null, + "schedule_layers": null, + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": null + }, + "notify": { + "advance_in_time": 300, + "fixed_time": null, + "by": { + "follow_preference": false, + "personal_channels": [ + "email" + ] + }, + "webhooks": [ + { + "type": "feishu_app", + "settings": { + "token": "", + "alias": "", + "data_source_id": 5427276014131, + "chat_ids": [ + "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d" + ], + "verify_token": "", + "sign_secret": "" + } + } + ] + }, + "schedule_id": 5789640530410, + "schedule_name": "test-000001", + "team_id": 4291079133131, + "description": "abc", + "layer_schedules": null, + "status": 0, + "cur_oncall": null, + "next_oncall": null + }, + { + "id": 5432326025106, + "name": "test-2509300001", + "account_id": 2451002751131, + "group_id": 2477033058131, + "disabled": 0, + "create_at": 1759132037, + "create_by": 2476123212131, + "update_at": 1775207501, + "update_by": 2476123212131, + "layers": null, + "schedule_layers": null, + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": null + }, + "notify": { + "advance_in_time": 300, + "fixed_time": null, + "by": { + "follow_preference": true, + "personal_channels": null + }, + "webhooks": null + }, + "schedule_id": 5432326025106, + "schedule_name": "test-2509300001", + "team_id": 2477033058131, + "description": "", + "layer_schedules": null, + "status": 0, + "cur_oncall": null, + "next_oncall": null + } + ], + "total": 41 + } + } + } + } + }, + "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/ScheduleListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "query": "production", + "is_my_team": true + } + } + } + } + } + }, + "/enrichment/mapping/schema/create": { + "post": { + "operationId": "mapping-schema-write-create", + "summary": "创建映射规则", + "description": "创建新的映射规则,定义查找来源标签和待填充的结果标签。需要 Pro 计划。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 映射规则名称在账户内唯一。\n- `source_labels`(1–3 个)为查找键,`result_labels`(1–10 个)为匹配后写入的标签。\n- 标签名须符合 `^[a-z][a-z0-9_]{0,39}$`(小写)。\n- `source_labels` 与 `result_labels` 不得重叠。\n- 账户最多可创建 20 个映射规则。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-schema-write-create", + "metadata": { + "sidebarTitle": "创建映射规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingSchemaCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "schema_name": "CMDB 查询" + } + } + } + } + }, + "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/MappingSchemaCreateRequest" + }, + "example": { + "schema_name": "CMDB 查询", + "description": "用 CMDB 数据富化告警", + "source_labels": [ + "host" + ], + "result_labels": [ + "owner", + "team", + "service" + ] + } + } + } + } + } + }, + "/enrichment/mapping/api/update": { + "post": { + "operationId": "mapping-api-write-update", + "summary": "更新映射 API", + "description": "更新现有映射 API 的配置。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 仅 API 创建者、账户管理员或所属团队成员可更新。\n- 所有可更新字段均为可选,仅更新提供的字段。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-api-write-update", + "metadata": { + "sidebarTitle": "更新映射 API" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingAPIUpdateRequest" + }, + "example": { + "api_id": "665f1a2b3c4d5e6f7a8b9c02", + "timeout": 3, + "retry_count": 1 + } + } + } + } + } + }, + "/calendar/list": { + "post": { + "operationId": "calendarList", + "summary": "查询服务日历列表", + "description": "返回当前账户可见的服务日历列表。", + "tags": [ + "On-call/日历管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/calendars/calendar-list", + "metadata": { + "sidebarTitle": "查询服务日历列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "team_id": 2477033058131, + "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg", + "cal_name": "Stock Exchange Calendar", + "description": "A stock market trading calendar example", + "timezone": "Asia/Shanghai", + "kind": "personal", + "workdays": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], + "created_at": 1702455630, + "updated_at": 1775529526, + "creator_id": 2476444212131, + "updated_by": 3790925372131, + "status": "enabled" + }, + { + "account_id": 2451002751131, + "team_id": 0, + "cal_id": "cal.VZYkchxJhGELSF4jzkUAud", + "cal_name": "HK Stock Exchange Calendar", + "description": "Hong Kong Stock Exchange trading days calendar", + "timezone": "Asia/Shanghai", + "kind": "personal", + "extra_cal_ids": [ + "zh-cn.china.official" + ], + "created_at": 1702968470, + "updated_at": 1775188967, + "creator_id": 2451002751131, + "updated_by": 3790925372131, + "status": "enabled" + } + ], + "total": 8 + } + } + } + } + }, + "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/CalendarListRequest" + }, + "example": { + "kind": "personal" + } + } + } + } + } + }, + "/incident/responder/add": { + "post": { + "operationId": "incidentResponderAdd", + "summary": "添加故障处理人员", + "description": "向已有故障添加处理人员。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-responder-add", + "metadata": { + "sidebarTitle": "添加故障处理人员" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddIncidentResponderRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "person_ids": [ + 2476444212131, + 2476444212132 + ] + } + } + } + } + } + }, + "/insight/team/export": { + "post": { + "operationId": "insightTeamExport", + "summary": "导出团队洞察", + "description": "将团队洞察指标以 CSV 文件形式导出。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", + "tags": [ + "On-call/分析看板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**;**1 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/analytics/insight-team-export", + "metadata": { + "sidebarTitle": "导出团队洞察" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "team_ids": [ + 4295771902131 + ], + "severities": [ + "Critical", + "Warning" + ] + } + } + } + } + } + }, + "/schedule/delete": { + "post": { + "operationId": "scheduleDelete", + "summary": "删除值班表", + "description": "根据 ID 删除一个或多个值班表。", + "tags": [ + "On-call/值班排班" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/schedules/schedule-delete", + "metadata": { + "sidebarTitle": "删除值班表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScheduleIDsBodyRequest" + }, + "example": { + "schedule_ids": [ + 2001 + ] + } + } + } + } + } + }, + "/status-page/change/timeline/delete": { + "post": { + "operationId": "statusPageChangeTimelineDelete", + "summary": "删除事件时间线", + "description": "从状态页事件中删除时间线条目。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面事件管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-change-timeline-delete", + "metadata": { + "sidebarTitle": "删除事件时间线" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteStatusPageChangeTimelineRequest" + }, + "example": { + "page_id": 5750613685214, + "change_id": 5821693893131, + "update_id": "01KP0311872NVYFRRQ82FWXAP4" + } + } + } + } + } + }, + "/incident/war-room/create": { + "post": { + "operationId": "incidentWarRoomCreate", + "summary": "创建战情室", + "description": "为故障协同响应创建战情室频道。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-war-room-create", + "metadata": { + "sidebarTitle": "创建战情室" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/WarRoom" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000", + "chat_name": "Incident #0E83EE war room", + "share_link": "" + } + } + } + } + }, + "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/CreateWarRoomRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "integration_id": 2490562293131, + "add_observers": true + } + } + } + } + } + }, + "/channel/unsubscribe/rule/update": { + "post": { + "operationId": "channelUnsubscribeRuleUpdate", + "summary": "更新排除规则", + "description": "更新已有排除规则的配置。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/channel-unsubscribe-rule-update", + "metadata": { + "sidebarTitle": "更新排除规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateDropRuleRequest" + }, + "example": { + "channel_id": 1001, + "rule_id": "6621b23f4a2c5e0012ab34cf", + "rule_name": "Drop test alerts", + "filters": [ + [ + { + "key": "labels.env", + "oper": "IN", + "vals": [ + "test" + ] + } + ] + ] + } + } + } + } + } + }, + "/route/upsert": { + "post": { + "operationId": "routeUpsert", + "summary": "创建或更新路由规则", + "description": "创建或更新集成的路由规则,将告警导向特定协作空间。`cases` 与 `default` 至少需要提供其一。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/route-upsert", + "metadata": { + "sidebarTitle": "创建或更新路由规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertRouteRequest" + }, + "example": { + "integration_id": 6113996590131, + "cases": [ + { + "if": [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Critical" + ] + } + ], + "channel_ids": [ + 3521074710131 + ], + "fallthrough": false, + "routing_mode": "standard" + } + ], + "default": { + "channel_ids": [ + 3521074710131 + ] + } + } + } + } + } + } + }, + "/channel/notify/rule/delete": { + "post": { + "operationId": "channelNotifyRuleDelete", + "summary": "删除协作空间通知规则", + "description": "删除指定的协作空间通知规则。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-notify-rule-delete", + "metadata": { + "sidebarTitle": "删除协作空间通知规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/calendar/create": { + "post": { + "operationId": "calendarCreate", + "summary": "创建服务日历", + "description": "创建个人服务日历。每个账户默认最多 5 个日历,可通过 Flashcat-Break-Cal-Limit 请求头突破限制。", + "tags": [ + "On-call/日历管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/calendars/calendar-create", + "metadata": { + "sidebarTitle": "创建服务日历" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "cal_name": "API Test Calendar" + } + } + } + } + }, + "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/CalendarCreateRequest" + }, + "example": { + "cal_name": "Production On-Call Calendar", + "description": "Calendar for production on-call team", + "timezone": "Asia/Shanghai", + "workdays": [ + 1, + 2, + 3, + 4, + 5 + ] + } + } + } + } + } + }, + "/incident/ack": { + "post": { + "operationId": "incidentAck", + "summary": "认领故障", + "description": "认领一个故障以表明正在积极处理。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-ack", + "metadata": { + "sidebarTitle": "认领故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AckIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] + } + } + } + } + } + }, + "/channel/notify/rule/list": { + "post": { + "operationId": "channelNotifyRuleList", + "summary": "查询协作空间通知规则", + "description": "查询为指定协作空间配置的所有通知规则。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/channel-notify-rule-list", + "metadata": { + "sidebarTitle": "查询协作空间通知规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/channel/escalate/rule/list": { + "post": { + "operationId": "channelEscalateRuleList", + "summary": "查询分派策略列表", + "description": "查询协作空间下的所有分派策略。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-escalate-rule-list", + "metadata": { + "sidebarTitle": "查询分派策略列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListEscalationRulesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "channel_id": 6193426913131, + "priority": 0, + "aggr_window": 0, + "rule_name": "Default", + "description": "", + "layers": [ + { + "max_times": 1, + "notify_step": 10, + "target": { + "person_ids": [ + 3790925372131 + ], + "by": { + "follow_preference": true + }, + "webhooks": null + }, + "escalate_window": 30, + "force_escalate": false + } + ], + "time_filters": [], + "filters": [], + "status": "enabled", + "template_id": "6321aad26c12104586a88916", + "rule_id": "69bd0ce95a238693176c1d66", + "updated_by": 3790925372131, + "created_at": 1773997289, + "updated_at": 1773997289 + } + ] + } + } + } + } + }, + "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/ChannelScopedListRequest" + }, + "example": { + "channel_id": 1001 + } + } + } + } + } + }, + "/channel/create": { + "post": { + "operationId": "channelCreate", + "summary": "创建协作空间", + "description": "创建一个新的协作空间用于故障管理。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-create", + "metadata": { + "sidebarTitle": "创建协作空间" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ChannelCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "channel_id": 6294542005131, + "channel_name": "API Test Channel" + } + } + } + } + }, + "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/CreateChannelRequest" + }, + "example": { + "team_id": 3521074710131, + "channel_name": "Production Alerts", + "description": "Handles all production environment alerts", + "group": { + "method": "p", + "time_window": 10, + "window_type": "tumbling" + }, + "auto_resolve_timeout": 86400, + "auto_resolve_mode": "trigger" + } + } + } + } + } + }, + "/status-page/subscriber/list": { + "get": { + "operationId": "statusPageSubscriberList", + "summary": "查询状态页订阅者列表", + "description": "查询已订阅状态页通知的用户列表。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/status-pages/status-page-subscriber-list", + "metadata": { + "sidebarTitle": "查询状态页订阅者列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageSubscriberListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 2, + "has_next_page": false, + "items": [ + { + "recipient": "alice@example.com", + "method": "email", + "components": [], + "all": true, + "locale": "zh-CN" + }, + { + "recipient": "bob@example.com", + "method": "email", + "components": [], + "all": true, + "locale": "en-US" + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Status page ID." + }, + { + "name": "component_ids", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Comma-separated component IDs to filter subscribers by." + }, + { + "name": "p", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "default": 1 + }, + "description": "Page number (1-based)." + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 100, + "default": 10 + }, + "description": "Page size (1-100)." + } + ] + } + }, + "/incident/info": { + "post": { + "operationId": "incidentInfo", + "summary": "获取故障详情", + "description": "获取单个故障的详细信息,包括时间线、关联告警、处理人员和自定义字段。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-info", + "metadata": { + "sidebarTitle": "获取故障详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/IncidentInfo" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "incident_id": "69da451ef77b1b51f40e83ee", + "account_id": 2451002751131, + "channel_id": 2551105804131, + "integration_id": 2490562293131, + "integration_ids": [ + 2490562293131 + ], + "integration_types": [ + "monit.alert" + ], + "dedup_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata", + "equals_md5": "", + "start_time": 1775912219, + "end_time": 0, + "last_time": 1775969819, + "ack_time": 0, + "close_time": 0, + "creator_id": 0, + "closer_id": 0, + "owner_id": 0, + "incident_status": "Critical", + "incident_severity": "Critical", + "progress": "Triggered", + "title": "CPU usage high - web-server-01", + "description": "", + "ai_summary": "", + "impact": "", + "root_cause": "", + "resolution": "", + "num": "0E83EE", + "frequency": "frequent", + "created_at": 1775912222, + "updated_at": 1775972145, + "snoozed_before": 0, + "group_method": "n", + "ever_muted": false, + "labels": { + "check": "cpu_usage_high", + "resource": "web-server-01", + "env": "production" + }, + "fields": {}, + "assigned_to": { + "person_ids": [ + 2476444212131 + ], + "escalate_rule_id": "000000000000000000000000", + "layer_idx": 0, + "type": "assign", + "assigned_at": 1775972128, + "id": "MvQfH9Dc8eNS8k79jmrWn6", + "escalate_rule_name": "" + }, + "alert_cnt": 1, + "active_alert_cnt": 1, + "alert_event_cnt": 17, + "responders": [ + { + "person_id": 2476444212131, + "assigned_at": 1775972128, + "acknowledged_at": 0 + } + ], + "account_name": "", + "account_locale": "", + "account_time_zone": "", + "channel_name": "Ops Channel", + "channel_status": "enabled", + "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee", + "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee", + "integration_type": "monit.alert", + "post_mortem_id": "", + "images": null, + "manual_overrides": [ + "title" + ] + } + } + } + } + }, + "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/IncidentInfoRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee" + } + } + } + } + } + }, + "/channel/notify/rule/disable": { + "post": { + "operationId": "channelNotifyRuleDisable", + "summary": "禁用协作空间通知规则", + "description": "禁用协作空间通知规则而不删除。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-notify-rule-disable", + "metadata": { + "sidebarTitle": "禁用协作空间通知规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/enrichment/mapping/schema/info": { + "post": { + "operationId": "mapping-schema-read-info", + "summary": "查看映射规则详情", + "description": "根据映射规则 ID 返回单个映射规则的详细信息。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 映射规则不存在时返回 `null`。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-schema-read-info", + "metadata": { + "sidebarTitle": "查看映射规则详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingSchemaItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "schema_name": "CMDB 查询", + "description": "用 CMDB 数据富化告警", + "source_labels": [ + "host" + ], + "result_labels": [ + "owner", + "team", + "service" + ], + "status": "enabled", + "team_id": 0, + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + } + } + } + }, + "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/MappingSchemaIDRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + } + } + } + } + } + }, + "/status-page/subscriber/import": { + "post": { + "operationId": "statusPageSubscriberImport", + "summary": "批量导入订阅者", + "description": "批量导入状态页的订阅者。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **20 次/分钟**;**2 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-subscriber-import", + "metadata": { + "sidebarTitle": "批量导入订阅者" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportStatusPageSubscribersRequest" + }, + "example": { + "page_id": 5750613685214, + "method": "email", + "subscribers": [ + { + "recipient": "alice@example.com", + "all": true, + "locale": "en-US" + }, + { + "recipient": "bob@example.com", + "component_ids": [ + "01KC3GAZ6ZJE40H55GM31RPWZE" + ], + "all": false, + "locale": "zh-CN" + } + ] + } + } + } + } + } + }, + "/alert-event/list": { + "post": { + "operationId": "alert-event-read-list", + "summary": "查询原始告警事件列表", + "description": "返回跨所有告警的原始告警事件分页列表,支持按集成、协作空间、时间范围和严重程度过滤。", + "tags": [ + "On-call/告警管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |\n\n## 使用说明\n\n- 结果会根据调用方的协作空间数据访问权限进行过滤。\n- `severities` 为逗号分隔的字符串,如 `\"Critical,Warning\"`。", + "href": "/zh/api-reference/on-call/alerts/alert-event-read-list", + "metadata": { + "sidebarTitle": "查询原始告警事件列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertEventGlobalListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "has_next_page": false, + "items": [ + { + "event_id": "663a1b2c3d4e5f6789abc001", + "alert_id": "663a1b2c3d4e5f6789abcdef", + "title": "CPU 使用率 > 90%", + "event_severity": "Critical", + "event_time": 1712650000 + } + ] + } + } + } + } + }, + "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/AlertEventGlobalListRequest" + }, + "example": { + "start_time": 1712620800, + "end_time": 1712707200, + "limit": 20, + "severities": "Critical" + } + } + } + } + } + }, + "/calendar/event/delete": { + "post": { + "operationId": "calEventDelete", + "summary": "删除日历事件", + "description": "根据日历 ID 与事件 ID 删除日历事件。", + "tags": [ + "On-call/日历管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/calendars/cal-event-delete", + "metadata": { + "sidebarTitle": "删除日历事件" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CalEventIDRequest" + }, + "example": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4" + } + } + } + } + } + }, + "/alert/pipeline/list": { + "post": { + "operationId": "alert-read-pipeline-list", + "summary": "批量查询告警处理规则", + "description": "返回多个集成的告警处理规则配置。", + "tags": [ + "On-call/告警管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心查看**(`on-call`) |\n\n## 使用说明\n\n- 所有 `integration_ids` 必须对调用方可访问。", + "href": "/zh/api-reference/on-call/alerts/alert-read-pipeline-list", + "metadata": { + "sidebarTitle": "批量查询告警处理规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertPipelineListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "integration_id": 10001, + "rules": [], + "status": "enabled", + "creator_id": 80011, + "updated_by": 80011, + "created_at": 1710000000, + "updated_at": 1712000000 + } + ] + } + } + } + } + }, + "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/AlertPipelineListRequest" + }, + "example": { + "integration_ids": [ + 10001, + 10002 + ] + } + } + } + } + } + }, + "/incident/post-mortem/info": { + "get": { + "operationId": "incidentPostMortemInfo", + "summary": "获取复盘报告", + "description": "获取指定故障的复盘报告。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-post-mortem-info", + "metadata": { + "sidebarTitle": "获取复盘报告" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PostMortemItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "meta": { + "account_id": 2451002751131, + "title": "Postmortem1", + "status": "published", + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "template_id": "post_mortem_default_tmpl_en-us", + "incident_ids": [ + "69bb9233331067560c718ecd" + ], + "media_count": 0, + "author_ids": [ + 2477273692131 + ], + "team_id": 2477033058131, + "channel_id": 3047621227131, + "is_private": false, + "channel_name": "Ops Channel", + "created_at_seconds": 1773900354, + "updated_at_seconds": 1773909012 + }, + "basics": { + "incidents_highest_severity": "Warning", + "incidents_earliest_start_seconds": 1761133512, + "incidents_latest_close_seconds": 1761133632, + "incidents_total_duration_seconds": 120, + "responders": [ + { + "person_id": 3790925372131, + "assigned_at": 1761133515, + "acknowledged_at": 0 + } + ] + }, + "content": { + "content": "{\"type\":\"doc\",\"content\":[]}" + }, + "follow_ups": "" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "parameters": [ + { + "name": "post_mortem_id", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "description": "Post-mortem ID. Deterministic hash derived from account ID and the set of linked incident IDs." + } + ] + } + }, + "/calendar/event/list": { + "post": { + "operationId": "calEventList", + "summary": "查询日历事件列表", + "description": "返回个人日历在指定年/月/日范围内的事件列表。未同时传入 month 和 day 时返回整年数据。", + "tags": [ + "On-call/日历管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/calendars/cal-event-list", + "metadata": { + "sidebarTitle": "查询日历事件列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalEventListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "creator_id": 2476444212131, + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4", + "summary": "Test Holiday", + "description": "A test holiday event", + "start_at": "2026-05-01", + "end_at": "2026-05-02", + "is_off": true, + "created_at": 1775972034, + "updated_at": 1775972034 + }, + { + "account_id": 2451002751131, + "creator_id": 2451002751131, + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "event_id": "non_work.20260502", + "summary": "non-working day (Saturday)", + "description": "", + "start_at": "2026-05-02", + "end_at": "2026-05-03", + "is_off": true, + "created_at": 0, + "updated_at": 0 + } + ], + "total": 11 + } + } + } + } + }, + "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/CalEventListRequest" + }, + "example": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "year": 2024, + "month": 5 + } + } + } + } + } + }, + "/status-page/change/timeline/create": { + "post": { + "operationId": "statusPageChangeTimelineCreate", + "summary": "创建事件时间线", + "description": "在状态页事件上添加时间线更新。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面事件管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-change-timeline-create", + "metadata": { + "sidebarTitle": "创建事件时间线" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageChangeTimelineCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "update_id": "01KP0311872NVYFRRQ82FWXAP4" + } + } + } + } + }, + "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/CreateStatusPageChangeTimelineRequest" + }, + "example": { + "page_id": 5750613685214, + "change_id": 5821693893131, + "status": "identified", + "description": "We have identified the root cause and are working on a fix.", + "at_seconds": 1712003600, + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "status": "partial_outage" + } + ] + } + } + } + } + } + }, + "/incident/disable-merge": { + "post": { + "operationId": "incidentDisableMerge", + "summary": "禁止故障合并", + "description": "禁用指定故障的自动合并功能。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-disable-merge", + "metadata": { + "sidebarTitle": "禁止故障合并" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DisableIncidentMergeRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] + } + } + } + } + } + }, + "/status-page/migration/cancel": { + "post": { + "operationId": "statusPageMigrationCancel", + "summary": "取消状态页迁移", + "description": "取消正在进行的状态页迁移任务。只能取消处于 `running` 状态的任务。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-migration-cancel", + "metadata": { + "sidebarTitle": "取消状态页迁移" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CancelStatusPageMigrationRequest" + }, + "example": { + "job_id": "01KP0311872NVYFRRQ82FW0001" + } + } + } + } + } + }, + "/enrichment/upsert": { + "post": { + "operationId": "enrichment-write-upsert", + "summary": "创建或替换富化规则", + "description": "创建或全量替换指定集成的告警富化规则集,`rules` 数组将被原子替换。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 富化规则按顺序依次执行。\n- 每条规则有一个 `kind`:`extraction`(正则/gjson 提取)、`composition`(模板组合标签)、`mapping`(通过映射规则或 API 查找)、`drop`(删除标签)。\n- 可选的 `if` 字段为 `AndFilters` 条件,不匹配时跳过该规则。\n- `kind: extraction`:`source_field` 须为 `title`、`description` 或 `labels.*` 前缀的键;`pattern`(正则,须包含命名分组 `result`)和 `g_json`(GJson 路径)二选一。\n- `kind: composition`:`template` 使用 Go text/template 语法,可引用 `labels.*` 键。\n- `kind: mapping`:`mapping_type` 为 `schema`(默认)或 `api`;分别提供 `schema_id` 或 `api_id`。\n- `kind: drop`:`drop_labels` 列出要删除的标签键名。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/alert-enrichment/enrichment-write-upsert", + "metadata": { + "sidebarTitle": "创建或替换富化规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnrichmentUpsertRequest" + }, + "example": { + "integration_id": 5001, + "rules": [ + { + "kind": "extraction", + "settings": { + "source_field": "labels.env", + "result_label": "environment", + "pattern": "(?Pprod|staging|dev)", + "override": true + } + } + ] + } + } + } + } + } + }, + "/alert/list-by-ids": { + "post": { + "operationId": "alert-read-list-by-ids", + "summary": "批量查询告警", + "description": "通过多个告警 ID 一次性返回多条告警详情。", + "tags": [ + "On-call/告警管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |\n\n## 使用说明\n\n- 所有 `alert_ids` 必须属于调用方账户,任何无效 ID 都会导致整个请求失败。", + "href": "/zh/api-reference/on-call/alerts/alert-read-list-by-ids", + "metadata": { + "sidebarTitle": "批量查询告警" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "has_next_page": false, + "items": [ + { + "alert_id": "663a1b2c3d4e5f6789abcdef", + "title": "CPU 使用率 > 90%" + } + ] + } + } + } + } + }, + "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/AlertListByIDsRequest" + }, + "example": { + "alert_ids": [ + "663a1b2c3d4e5f6789abcdef" + ] + } + } + } + } + } + }, + "/channel/escalate/rule/enable": { + "post": { + "operationId": "channelEscalateRuleEnable", + "summary": "启用分派策略", + "description": "启用已禁用的分派策略。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-escalate-rule-enable", + "metadata": { + "sidebarTitle": "启用分派策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/incident/list": { + "post": { + "operationId": "incidentList", + "summary": "查询故障列表", + "description": "分页查询故障列表,支持按协作空间、严重程度、状态、处理人员和时间范围过滤。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-list", + "metadata": { + "sidebarTitle": "查询故障列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/IncidentListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 88, + "has_next_page": true, + "search_after_ctx": "69da451ef77b1b51f40e83eb", + "items": [ + { + "incident_id": "69da451ef77b1b51f40e83ee", + "account_id": 2451002751131, + "channel_id": 2551105804131, + "integration_id": 2490562293131, + "integration_ids": [ + 2490562293131 + ], + "integration_types": [ + "monit.alert" + ], + "dedup_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata", + "equals_md5": "", + "start_time": 1775912219, + "end_time": 0, + "last_time": 1775969819, + "ack_time": 0, + "close_time": 0, + "creator_id": 0, + "closer_id": 0, + "owner_id": 0, + "incident_status": "Critical", + "incident_severity": "Critical", + "progress": "Triggered", + "title": "CPU usage high - web-server-01", + "description": "", + "ai_summary": "", + "impact": "", + "root_cause": "", + "resolution": "", + "num": "0E83EE", + "frequency": "frequent", + "created_at": 1775912222, + "updated_at": 1775972145, + "snoozed_before": 0, + "group_method": "n", + "ever_muted": false, + "labels": { + "check": "cpu_usage_high", + "resource": "web-server-01", + "env": "production" + }, + "fields": {}, + "assigned_to": { + "person_ids": [ + 2476444212131 + ], + "escalate_rule_id": "000000000000000000000000", + "layer_idx": 0, + "type": "assign", + "assigned_at": 1775972128, + "id": "MvQfH9Dc8eNS8k79jmrWn6", + "escalate_rule_name": "" + }, + "alert_cnt": 1, + "active_alert_cnt": 1, + "alert_event_cnt": 17, + "responders": [ + { + "person_id": 2476444212131, + "assigned_at": 1775972128, + "acknowledged_at": 0 + } + ], + "account_name": "", + "account_locale": "", + "account_time_zone": "", + "channel_name": "Ops Channel", + "channel_status": "enabled", + "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee", + "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee", + "integration_type": "monit.alert", + "post_mortem_id": "", + "images": null, + "manual_overrides": [ + "title" + ] + } + ] + } + } + } + } + }, + "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/ListIncidentsRequest" + }, + "example": { + "start_time": 1711900800, + "end_time": 1712000000, + "progress": "Triggered,Processing", + "incident_severity": "Critical,Warning", + "channel_ids": [ + 2551105804131 + ], + "limit": 20, + "p": 1 + } + } + } + } + } + }, + "/insight/alert/topk-by-label": { + "post": { + "operationId": "insightTopkAlertsByLabel", + "summary": "查看按 check/resource 聚合的 Top-K 告警", + "description": "返回指定时间范围内按 `check` 或 `resource` 聚合的 Top-K 告警组。", + "tags": [ + "On-call/分析看板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/analytics/insight-topk-alerts-by-label", + "metadata": { + "sidebarTitle": "查看按 check/resource 聚合的 Top-K 告警" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/InsightAlertByLabelResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "label": "cpu-high", + "total_alert_cnt": 312, + "total_alert_event_cnt": 987 + }, + { + "label": "disk-full", + "total_alert_cnt": 178, + "total_alert_event_cnt": 452 + }, + { + "label": "memory-oom", + "total_alert_cnt": 94, + "total_alert_event_cnt": 231 + } + ] + } + } + } + } + }, + "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/InsightTopkAlertByLabelRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "label": "check", + "k": 10, + "orderby": "total_alert_cnt" + } + } + } + } + } + }, + "/enrichment/list": { + "post": { + "operationId": "enrichment-read-list", + "summary": "批量查询富化规则", + "description": "批量返回指定集成 ID 列表的告警富化规则集。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/alert-enrichment/enrichment-read-list", + "metadata": { + "sidebarTitle": "批量查询富化规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EnrichmentListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "integration_id": 5001, + "rules": [], + "status": "enabled", + "updated_by": 80011, + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + ] + } + } + } + } + }, + "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/EnrichmentListRequest" + }, + "example": { + "integration_ids": [ + 5001, + 5002 + ] + } + } + } + } + } + }, + "/channel/silence/rule/disable": { + "post": { + "operationId": "channelSilenceRuleDisable", + "summary": "禁用静默策略", + "description": "禁用静默策略而不删除。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-silence-rule-disable", + "metadata": { + "sidebarTitle": "禁用静默策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/incident/custom-action/do": { + "post": { + "operationId": "incidentCustomActionDo", + "summary": "执行自定义操作", + "description": "执行为故障配置的自定义操作。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-custom-action-do", + "metadata": { + "sidebarTitle": "执行自定义操作" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DoIncidentCustomActionResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "message": "" + } + } + } + } + }, + "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/DoIncidentCustomActionRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "integration_id": 2490562293131 + } + } + } + } + } + }, + "/alert/feed": { + "post": { + "operationId": "alert-read-feed", + "summary": "查询告警动态", + "description": "返回单条告警的动态记录(评论、状态变更、合并、静默事件),支持分页查询。", + "tags": [ + "On-call/告警管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |\n\n## 使用说明\n\n- 使用 `p`(页码,从 1 开始)和 `limit`(最大 100,默认 20)进行分页。\n- 将 `asc` 设为 `true` 可按时间正序返回。\n- 使用 `types` 过滤特定动态类型(如 `alert_comment`、`alert_merge`)。", + "href": "/zh/api-reference/on-call/alerts/alert-read-feed", + "metadata": { + "sidebarTitle": "查询告警动态" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertFeedResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "has_next_page": false, + "items": [ + { + "ref_id": "663a1b2c3d4e5f6789abcdef", + "type": "alert_comment", + "detail": { + "comment": "正在排查中。" + }, + "creator_id": 80011, + "created_at": 1712651000 + } + ] + } + } + } + } + }, + "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/AlertFeedRequest" + }, + "example": { + "alert_id": "663a1b2c3d4e5f6789abcdef", + "limit": 20, + "asc": false + } + } + } + } + } + }, + "/insight/responder/export": { + "post": { + "operationId": "insightResponderExport", + "summary": "导出处理人员洞察", + "description": "将处理人员洞察指标以 CSV 文件形式导出。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", + "tags": [ + "On-call/分析看板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**;**1 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/analytics/insight-responder-export", + "metadata": { + "sidebarTitle": "导出处理人员洞察" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "responder_ids": [ + 3790925372131 + ], + "severities": [ + "Critical", + "Warning" + ] + } + } + } + } + } + }, + "/incident/list-by-ids": { + "post": { + "operationId": "incidentListByIds", + "summary": "批量查询故障", + "description": "通过故障 ID 列表批量获取故障信息。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-list-by-ids", + "metadata": { + "sidebarTitle": "批量查询故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/IncidentListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 2, + "has_next_page": false, + "items": [ + { + "incident_id": "69da451ef77b1b51f40e83ee", + "account_id": 2451002751131, + "channel_id": 2551105804131, + "integration_id": 2490562293131, + "integration_ids": [ + 2490562293131 + ], + "integration_types": [ + "monit.alert" + ], + "dedup_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata", + "equals_md5": "", + "start_time": 1775912219, + "end_time": 0, + "last_time": 1775969819, + "ack_time": 0, + "close_time": 0, + "creator_id": 0, + "closer_id": 0, + "owner_id": 0, + "incident_status": "Critical", + "incident_severity": "Critical", + "progress": "Triggered", + "title": "CPU usage high - web-server-01", + "description": "", + "ai_summary": "", + "impact": "", + "root_cause": "", + "resolution": "", + "num": "0E83EE", + "frequency": "frequent", + "created_at": 1775912222, + "updated_at": 1775972145, + "snoozed_before": 0, + "group_method": "n", + "ever_muted": false, + "labels": {}, + "fields": {}, + "assigned_to": { + "escalate_rule_id": "000000000000000000000000", + "layer_idx": 0, + "type": "", + "assigned_at": 0, + "id": "", + "escalate_rule_name": "" + }, + "alert_cnt": 1, + "active_alert_cnt": 1, + "alert_event_cnt": 17, + "responders": [], + "account_name": "", + "account_locale": "", + "account_time_zone": "", + "channel_name": "Ops Channel", + "channel_status": "enabled", + "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee", + "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee", + "integration_type": "monit.alert", + "post_mortem_id": "", + "images": null, + "manual_overrides": null + } + ] + } + } + } + } + }, + "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/ListIncidentsByIdsRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee", + "69da451ef77b1b51f40e83ef" + ] + } + } + } + } + } + }, + "/incident/post-mortem/list": { + "post": { + "operationId": "incidentPostMortemList", + "summary": "查询复盘报告列表", + "description": "分页查询复盘报告列表,支持过滤条件。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-post-mortem-list", + "metadata": { + "sidebarTitle": "查询复盘报告列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListPostMortemsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 3, + "has_next_page": false, + "items": [ + { + "account_id": 2451002751131, + "title": "Postmortem1", + "status": "published", + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "template_id": "post_mortem_default_tmpl_en-us", + "incident_ids": [ + "69bb9233331067560c718ecd" + ], + "media_count": 0, + "author_ids": [ + 2477273692131 + ], + "team_id": 2477033058131, + "channel_id": 3047621227131, + "is_private": false, + "channel_name": "Ops Channel", + "created_at_seconds": 1773900354, + "updated_at_seconds": 1773909012 + } + ] + } + } + } + } + }, + "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/ListPostMortemsRequest" + }, + "example": { + "status": "published", + "p": 1, + "limit": 20 + } + } + } + } + } + }, + "/enrichment/mapping/api/list": { + "post": { + "operationId": "mapping-api-read-list", + "summary": "查询映射 API 列表", + "description": "返回账户下所有配置的映射 API。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-api-read-list", + "metadata": { + "sidebarTitle": "查询映射 API 列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingAPIListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "items": [ + { + "api_id": "665f1a2b3c4d5e6f7a8b9c02", + "api_name": "CMDB API", + "description": "查询 CMDB 主机元数据", + "url": "https://cmdb.example.com/api/lookup", + "headers": { + "X-Token": "***" + }, + "timeout": 2, + "retry_count": 1, + "insecure_skip_verify": false, + "status": "enabled", + "team_id": 0, + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + ] + } + } + } + } + }, + "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/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/incident/unack": { + "post": { + "operationId": "incidentUnack", + "summary": "取消认领故障", + "description": "取消故障的认领状态。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-unack", + "metadata": { + "sidebarTitle": "取消认领故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnackIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] + } + } + } + } + } + }, + "/enrichment/mapping/schema/update": { + "post": { + "operationId": "mapping-schema-write-update", + "summary": "更新映射规则", + "description": "更新映射规则的名称、描述或所属团队。来源标签和结果标签创建后不可更改。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 仅映射规则创建者、账户管理员或所属团队成员可更新。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-schema-write-update", + "metadata": { + "sidebarTitle": "更新映射规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingSchemaUpdateRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "schema_name": "CMDB 查询 v2", + "description": "更新后的描述" + } + } + } + } + } + }, + "/schedule/create": { + "post": { + "operationId": "scheduleCreate", + "summary": "创建值班表", + "description": "创建新的值班表(分派策略值班表)。", + "tags": [ + "On-call/值班排班" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/schedules/schedule-create", + "metadata": { + "sidebarTitle": "创建值班表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleIDResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "schedule_id": 6294534917601 + } + } + } + } + }, + "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/ScheduleUpsertRequest" + }, + "example": { + "schedule_name": "Production On-Call", + "description": "Primary on-call rotation for the production team", + "team_id": 4291079133131, + "layers": [ + { + "layer_name": "Layer 1", + "name": "Layer 1", + "mode": 0, + "weight": 0, + "hidden": 0, + "groups": [ + { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 0, + "end": 0 + }, + { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2476123212131 + ] + } + ], + "start": 0, + "end": 0 + } + ], + "rotation_unit": "day", + "rotation_value": 1, + "rotation_duration": 86400, + "handoff_time": 0, + "enable_time": 1712000000, + "expire_time": 0, + "restrict_mode": 0, + "restrict_start": 0, + "restrict_end": 0, + "restrict_periods": [], + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "fair_rotation": false, + "mask_continuous_enabled": false + } + ], + "notify": { + "advance_in_time": 300, + "fixed_time": null, + "by": { + "follow_preference": true, + "personal_channels": null + }, + "webhooks": null + } + } + } + } + } + } + }, + "/insight/channel": { + "post": { + "operationId": "insightByChannel", + "summary": "查看协作空间洞察", + "description": "返回按协作空间聚合的洞察指标。", + "tags": [ + "On-call/分析看板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/analytics/insight-by-channel", + "metadata": { + "sidebarTitle": "查看协作空间洞察" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DimensionInsightResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "ts": 1740844800, + "channel_id": 4321322010131, + "channel_name": "Production Alerts", + "total_incident_cnt": 2, + "total_incidents_acknowledged": 2, + "total_incidents_closed": 2, + "total_incidents_auto_closed": 0, + "total_incidents_manually_closed": 2, + "total_incidents_timeout_closed": 0, + "total_incidents_escalated": 0, + "total_incidents_manually_escalated": 0, + "total_incidents_timeout_escalated": 0, + "total_incidents_reassigned": 2, + "total_interruptions": 3, + "total_notifications": 6, + "total_engaged_seconds": 3317709, + "total_seconds_to_ack": 3317709, + "total_seconds_to_close": 3749514, + "mean_seconds_to_ack": 1658854.5, + "mean_seconds_to_close": 1874757, + "noise_reduction_pct": 0, + "acknowledgement_pct": 100, + "total_alert_cnt": 0, + "total_alert_event_cnt": 0 + } + ] + } + } + } + } + }, + "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/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "channel_ids": [ + 4321322010131 + ], + "aggregate_unit": "day" + } + } + } + } + } + }, + "/channel/delete": { + "post": { + "operationId": "channelDelete", + "summary": "删除协作空间", + "description": "删除协作空间及其所有关联配置。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-delete", + "metadata": { + "sidebarTitle": "删除协作空间" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelIDRequest" + }, + "example": { + "channel_id": 3521074710131 + } + } + } + } + } + }, + "/channel/unsubscribe/rule/create": { + "post": { + "operationId": "channelUnsubscribeRuleCreate", + "summary": "创建排除规则", + "description": "创建排除规则,在告警成为故障之前过滤不需要的告警。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/channel-unsubscribe-rule-create", + "metadata": { + "sidebarTitle": "创建排除规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "rule_id": "69db2f6ba0fe7db6448b1505", + "rule_name": "Test drop rule" + } + } + } + } + }, + "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/CreateDropRuleRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_name": "Drop test environment alerts", + "description": "Discard all alerts from the test environment before they create incidents", + "filters": [ + [ + { + "key": "labels.env", + "oper": "IN", + "vals": [ + "test", + "dev" + ] + } + ] + ] + } + } + } + } + } + }, + "/channel/inhibit/rule/update": { + "post": { + "operationId": "channelInhibitRuleUpdate", + "summary": "更新抑制策略", + "description": "更新已有抑制策略的配置。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-inhibit-rule-update", + "metadata": { + "sidebarTitle": "更新抑制策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateInhibitRuleRequest" + }, + "example": { + "channel_id": 1001, + "rule_id": "6621b23f4a2c5e0012ab34ce", + "rule_name": "Suppress downstream", + "equals": [ + "labels.cluster" + ] + } + } + } + } + } + }, + "/alert/merge": { + "post": { + "operationId": "alert-write-merge", + "summary": "将告警合并到故障", + "description": "将一条或多条告警关联到已有故障。若来源告警之前属于其他故障,且合并后该故障中没有其他告警,则该故障将自动关闭。", + "tags": [ + "On-call/告警管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |\n\n## 使用说明\n\n- 所有 `alert_ids` 和 `incident_id` 必须属于调用方账户。\n- 可选填 `title` 和 `owner_id` 以同时更新目标故障。", + "href": "/zh/api-reference/on-call/alerts/alert-write-merge", + "metadata": { + "sidebarTitle": "将告警合并到故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlertMergeRequest" + }, + "example": { + "alert_ids": [ + "663a1b2c3d4e5f6789abcdef" + ], + "incident_id": "663a000000000000deadbeef" + } + } + } + } + } + }, + "/status-page/change/timeline/update": { + "post": { + "operationId": "statusPageChangeTimelineUpdate", + "summary": "更新事件时间线", + "description": "更新状态页事件的时间线条目。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面事件管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-change-timeline-update", + "metadata": { + "sidebarTitle": "更新事件时间线" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateStatusPageChangeTimelineRequest" + }, + "example": { + "page_id": 5750613685214, + "change_id": 5821693893131, + "update_id": "01KP0311872NVYFRRQ82FWXAP4", + "description": "Corrected description: root cause identified in database layer.", + "at_seconds": 1712003600 + } + } + } + } + } + }, + "/incident/reopen": { + "post": { + "operationId": "incidentReopen", + "summary": "重开故障", + "description": "重新打开一个已恢复的故障。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-reopen", + "metadata": { + "sidebarTitle": "重开故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReopenIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ], + "reason": "Monitoring detected the issue recurred after the initial fix." + } + } + } + } + } + }, + "/incident/comment": { + "post": { + "operationId": "incidentComment", + "summary": "评论故障", + "description": "在故障时间线上添加文字评论。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-comment", + "metadata": { + "sidebarTitle": "评论故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ], + "comment": "Identified the root cause. Rolling back the deployment now." + } + } + } + } + } + }, + "/enrichment/mapping/data/download": { + "post": { + "operationId": "mapping-data-read-download", + "summary": "下载映射数据 CSV", + "description": "将映射规则的所有数据行导出为 CSV 文件。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 响应为 CSV 文件,包含 `Content-Disposition: attachment` 响应头。\n- CSV 标题行按顺序对应映射规则的来源标签和结果标签。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-data-read-download", + "metadata": { + "sidebarTitle": "下载映射数据 CSV" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CsvFileResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": "host,owner,team,service\nserver01,alice,sre,api\n" + } + } + } + }, + "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/MappingSchemaIDRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + } + } + } + } + } + }, + "/channel/unsubscribe/rule/list": { + "post": { + "operationId": "channelUnsubscribeRuleList", + "summary": "查询排除规则列表", + "description": "查询协作空间的排除规则列表。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/channel-unsubscribe-rule-list", + "metadata": { + "sidebarTitle": "查询排除规则列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListDropRulesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "channel_id": 5967964835131, + "priority": 0, + "rule_name": "Drop test alerts", + "description": "", + "filters": [ + [ + { + "key": "data_source_id", + "oper": "IN", + "vals": [ + "6113996590131" + ] + } + ] + ], + "status": "enabled", + "rule_id": "69bcc530b9e63df36603e421", + "updated_by": 3790925372131, + "created_at": 1773978928, + "updated_at": 1773978928 + } + ] + } + } + } + } + }, + "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/ChannelScopedListRequest" + }, + "example": { + "channel_id": 1001 + } + } + } + } + } + }, + "/route/list": { + "post": { + "operationId": "routeList", + "summary": "查询路由规则列表", + "description": "返回指定集成的路由规则列表。未配置路由规则的集成将不出现在响应中。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/route-list", + "metadata": { + "sidebarTitle": "查询路由规则列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListRoutesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "integration_id": 6113996590131, + "cases": [ + { + "if": [ + { + "key": "labels.check", + "oper": "IN", + "vals": [ + "cpu.idle<20%" + ] + } + ], + "channel_ids": [ + 2533748993131 + ], + "fallthrough": false, + "routing_mode": "standard" + } + ], + "default": { + "channel_ids": [ + 3521074710131 + ] + }, + "status": "enabled", + "version": 6, + "updated_by": 3790925372131, + "creator_id": 3790925372131, + "created_at": 1774606136, + "updated_at": 1774606136 + } + ] + } + } + } + } + }, + "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/ListRoutesRequest" + }, + "example": { + "integration_ids": [ + 6113996590131, + 6113996590132 + ] + } + } + } + } + } + }, + "/channel/list": { + "post": { + "operationId": "channelList", + "summary": "查询协作空间列表", + "description": "查询当前用户可访问的协作空间列表,支持过滤条件。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/channel-list", + "metadata": { + "sidebarTitle": "查询协作空间列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListChannelsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 42, + "has_next_page": true, + "items": [ + { + "channel_id": 1001, + "channel_name": "Production Alerts", + "status": "enabled" + } + ] + } + } + } + } + }, + "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/ListChannelsRequest" + }, + "example": { + "p": 1, + "limit": 20, + "orderby": "created_at", + "asc": false + } + } + } + } + } + }, + "/channel/escalate/rule/create": { + "post": { + "operationId": "channelEscalateRuleCreate", + "summary": "创建分派策略", + "description": "创建分派策略,定义故障发生时通知谁以及何时通知。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-escalate-rule-create", + "metadata": { + "sidebarTitle": "创建分派策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "rule_id": "69db2f72a0fe7db6448b1506", + "rule_name": "Test escalation rule" + } + } + } + } + }, + "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/CreateEscalationRuleRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_name": "On-call escalation", + "template_id": "6321aad26c12104586a88916", + "description": "Notify primary on-call, then escalate to secondary after 30 minutes", + "layers": [ + { + "target": { + "person_ids": [ + 3790925372131 + ], + "by": { + "follow_preference": true + } + }, + "max_times": 3, + "notify_step": 10, + "escalate_window": 30, + "force_escalate": false + } + ] + } + } + } + } + } + }, + "/channel/update": { + "post": { + "operationId": "channelUpdate", + "summary": "更新协作空间", + "description": "更新已有协作空间的配置和设置。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-update", + "metadata": { + "sidebarTitle": "更新协作空间" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/UpdateChannelResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "external_report_token": "" + } + } + } + } + }, + "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/UpdateChannelRequest" + }, + "example": { + "channel_id": 1001, + "channel_name": "生产告警(v2)", + "description": "更新后的描述" + } + } + } + } + } + }, + "/channel/enable": { + "post": { + "operationId": "channelEnable", + "summary": "启用协作空间", + "description": "启用已禁用的协作空间以恢复故障路由。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-enable", + "metadata": { + "sidebarTitle": "启用协作空间" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelIDRequest" + }, + "example": { + "channel_id": 3521074710131 + } + } + } + } + } + }, + "/channel/escalate/rule/delete": { + "post": { + "operationId": "channelEscalateRuleDelete", + "summary": "删除分派策略", + "description": "删除指定的分派策略。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-escalate-rule-delete", + "metadata": { + "sidebarTitle": "删除分派策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/enrichment/mapping/api/delete": { + "post": { + "operationId": "mapping-api-write-delete", + "summary": "删除映射 API", + "description": "删除映射 API。若该 API 被富化规则引用,则拒绝删除。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 若 API 仍被引用,响应返回 HTTP 400,`refs` 字段列出所有阻止删除的引用。\n- 仅 API 创建者、账户管理员或所属团队成员可删除。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-api-write-delete", + "metadata": { + "sidebarTitle": "删除映射 API" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingAPIIDRequest" + }, + "example": { + "api_id": "665f1a2b3c4d5e6f7a8b9c02" + } + } + } + } + } + }, + "/channel/inhibit/rule/list": { + "post": { + "operationId": "channelInhibitRuleList", + "summary": "查询抑制策略列表", + "description": "查询为指定协作空间配置的所有抑制策略。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-inhibit-rule-list", + "metadata": { + "sidebarTitle": "查询抑制策略列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListInhibitRulesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "channel_id": 5967964835131, + "priority": 0, + "rule_name": "Suppress downstream alerts", + "description": "", + "source_filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "target_filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "equals": [ + "data_source_id", + "labels._account_id" + ], + "is_directly_discard": false, + "status": "enabled", + "rule_id": "69bcc630b9e63df36603e425", + "updated_by": 3790925372131, + "created_at": 1773979184, + "updated_at": 1773979184 + } + ] + } + } + } + } + }, + "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/ChannelScopedListRequest" + }, + "example": { + "channel_id": 1001 + } + } + } + } + } + }, + "/enrichment/mapping/data/upload": { + "post": { + "operationId": "mapping-data-write-upload", + "summary": "通过 CSV 上传映射数据", + "description": "上传 CSV 文件批量导入映射数据。默认情况下,导入前先清空现有数据。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **20 次/分钟**;**2 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 请求须使用 `Content-Type: multipart/form-data`,文件字段名为 `file`,`schema_id` 通过查询参数传入。\n- CSV 标题行须包含所有来源标签和结果标签名称。\n- 文件大小上限:100 MB。\n- 默认情况下,导入前先清空现有数据;传入查询参数 `do_not_truncate_first=TRUE` 可改为追加模式。\n- CSV 中存在重复来源标签组合时返回 400 错误。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-data-write-upload", + "metadata": { + "sidebarTitle": "通过 CSV 上传映射数据" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingDataUploadRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + } + } + } + } + } + }, + "/alert/info": { + "post": { + "operationId": "alert-read-info", + "summary": "查看告警详情", + "description": "通过告警 ID 返回单条告警的完整详情,包括关联故障和事件数量。", + "tags": [ + "On-call/告警管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |\n\n## 使用说明\n\n- `alert_id` 为 ObjectID 十六进制字符串,可从 `POST /alert/list` 或 `POST /alert-event/list` 获取。", + "href": "/zh/api-reference/on-call/alerts/alert-read-info", + "metadata": { + "sidebarTitle": "查看告警详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "alert_id": "663a1b2c3d4e5f6789abcdef", + "title": "CPU 使用率 > 90%", + "alert_severity": "Critical", + "alert_status": "Critical", + "start_time": 1712650000, + "event_cnt": 3 + } + } + } + } + }, + "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/AlertInfoRequest" + }, + "example": { + "alert_id": "663a1b2c3d4e5f6789abcdef" + } + } + } + } + } + }, + "/channel/notify/rule/update": { + "post": { + "operationId": "channelNotifyRuleUpdate", + "summary": "更新协作空间通知规则", + "description": "更新已有协作空间通知规则的配置。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-notify-rule-update", + "metadata": { + "sidebarTitle": "更新协作空间通知规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/incident/assign": { + "post": { + "operationId": "incidentAssign", + "summary": "分派故障", + "description": "将故障分派到指定的升级环节或处理人员。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-assign", + "metadata": { + "sidebarTitle": "分派故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssignIncidentRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "assigned_to": { + "person_ids": [ + 2476444212131 + ], + "type": "assign" + } + } + } + } + } + } + }, + "/channel/inhibit/rule/disable": { + "post": { + "operationId": "channelInhibitRuleDisable", + "summary": "禁用抑制策略", + "description": "禁用抑制策略而不删除。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-inhibit-rule-disable", + "metadata": { + "sidebarTitle": "禁用抑制策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/calendar/info": { + "post": { + "operationId": "calendarInfo", + "summary": "获取服务日历详情", + "description": "返回服务日历的详细信息。", + "tags": [ + "On-call/日历管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/calendars/calendar-info", + "metadata": { + "sidebarTitle": "获取服务日历详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_id": 2451002751131, + "team_id": 2477033058131, + "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg", + "cal_name": "Stock Exchange Calendar", + "description": "A stock market trading calendar example", + "timezone": "Asia/Shanghai", + "kind": "personal", + "workdays": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], + "created_at": 1702455630, + "updated_at": 1775529526, + "creator_id": 2476444212131, + "updated_by": 3790925372131, + "status": "enabled" + } + } + } + } + }, + "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/CalendarIDRequest" + }, + "example": { + "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg" + } + } + } + } + } + }, + "/channel/silence/rule/create": { + "post": { + "operationId": "channelSilenceRuleCreate", + "summary": "创建静默策略", + "description": "创建一条静默策略,用于抑制满足特定条件的通知。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-silence-rule-create", + "metadata": { + "sidebarTitle": "创建静默策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "rule_id": "69db2f66a0fe7db6448b1503", + "rule_name": "Test silence rule" + } + } + } + } + }, + "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/CreateSilenceRuleRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_name": "Maintenance window silence", + "description": "Silence all Info alerts during planned maintenance", + "time_filter": { + "start_time": 1773388800, + "end_time": 1773414000 + }, + "filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "is_directly_discard": false + } + } + } + } + } + }, + "/channel/silence/rule/delete": { + "post": { + "operationId": "channelSilenceRuleDelete", + "summary": "删除静默策略", + "description": "删除指定的静默策略。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-silence-rule-delete", + "metadata": { + "sidebarTitle": "删除静默策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/status-page/migrate-structure": { + "post": { + "operationId": "statusPageMigrateStructure", + "summary": "迁移状态页结构", + "description": "启动迁移任务,从 Atlassian Statuspage 导入结构和历史事件到新的 Flashduty 状态页。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-migrate-structure", + "metadata": { + "sidebarTitle": "迁移状态页结构" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageMigrationStartResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "job_id": "01KP0311872NVYFRRQ82FW0001" + } + } + } + } + }, + "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/MigrateStatusPageStructureRequest" + }, + "example": { + "api_key": "sk-stsp-xxxxxxxxxxxxxxxxxxxx", + "source_page_id": "abcdefghij" + } + } + } + } + } + }, + "/status-page/migrate-email-subscribers": { + "post": { + "operationId": "statusPageMigrateEmailSubscribers", + "summary": "迁移邮件订阅者", + "description": "启动迁移任务,从 Atlassian Statuspage 将邮件订阅者导入到已有的 Flashduty 状态页。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-migrate-email-subscribers", + "metadata": { + "sidebarTitle": "迁移邮件订阅者" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageMigrationStartResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "job_id": "01KP0311872NVYFRRQ82FW0002" + } + } + } + } + }, + "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/MigrateStatusPageEmailSubscribersRequest" + }, + "example": { + "api_key": "sk-stsp-xxxxxxxxxxxxxxxxxxxx", + "source_page_id": "abcdefghij", + "target_page_id": 5750613685214 + } + } + } + } + } + }, + "/template/create": { + "post": { + "operationId": "template-write-create", + "summary": "创建模板", + "description": "创建一个新的通知模板。", + "tags": [ + "On-call/通知模板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **模板管理**(`on-call`) |\n\n## 使用说明\n\n- `template_name` 必须在账户内唯一,重名会返回 `InvalidParameter`。\n- 服务端会对所有非空通道按 Mock 故障做一次渲染校验,任何通道的语法错误都会导致整个请求返回 `InvalidParameter`。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/notification-templates/template-write-create", + "metadata": { + "sidebarTitle": "创建模板" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TemplateCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "template_id": "6605a1b2c3d4e5f6a7b8c9d0", + "template_name": "生产环境默认模板" + } + } + } + } + }, + "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/TemplateCreateRequest" + }, + "example": { + "team_id": 0, + "template_name": "生产环境默认模板", + "description": "生产环境故障的默认模板。", + "email": "Incident {{ .IncidentName }} on {{ .Severity }}", + "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}" + } + } + } + } + } + }, + "/route/info": { + "post": { + "operationId": "routeInfo", + "summary": "获取路由规则详情", + "description": "获取指定集成的路由规则配置。当集成尚未配置路由规则时返回 null。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/route-info", + "metadata": { + "sidebarTitle": "获取路由规则详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RouteItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "cases": [ + { + "if": [ + { + "key": "labels.check", + "oper": "IN", + "vals": [ + "cpu.idle<20%" + ] + } + ], + "channel_ids": [ + 2533748993131 + ], + "fallthrough": false, + "routing_mode": "standard" + }, + { + "if": [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Warning" + ] + } + ], + "channel_ids": null, + "fallthrough": false, + "routing_mode": "name_mapping", + "name_mapping_label": "labels.service" + } + ], + "default": { + "channel_ids": [ + 3521074710131 + ] + }, + "status": "enabled", + "version": 6, + "updated_by": 3790925372131, + "creator_id": 3790925372131, + "created_at": 1774606136, + "updated_at": 1774606136 + } + } + } + } + }, + "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/RouteInfoRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/enrichment/info": { + "post": { + "operationId": "enrichment-read-info", + "summary": "查看富化规则", + "description": "返回指定集成配置的告警富化规则集。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 若该集成尚未配置富化规则,返回 `null`。", + "href": "/zh/api-reference/on-call/alert-enrichment/enrichment-read-info", + "metadata": { + "sidebarTitle": "查看富化规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EnrichmentItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 5001, + "rules": [ + { + "kind": "extraction", + "settings": { + "source_field": "labels.env", + "result_label": "environment", + "pattern": "^(prod|staging|dev).*$", + "override": true + } + } + ], + "status": "enabled", + "updated_by": 80011, + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + } + } + } + }, + "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/EnrichmentInfoRequest" + }, + "example": { + "integration_id": 5001 + } + } + } + } + } + }, + "/channel/info": { + "post": { + "operationId": "channelInfo", + "summary": "获取协作空间详情", + "description": "获取指定协作空间的详细信息。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/channel-info", + "metadata": { + "sidebarTitle": "获取协作空间详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ChannelItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "channel_id": 1001, + "channel_name": "Production Alerts", + "status": "enabled", + "team_id": 10 + } + } + } + } + }, + "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/ChannelInfoRequest" + }, + "example": { + "channel_id": 1001 + } + } + } + } + } + }, + "/template/list": { + "post": { + "operationId": "template-read-list", + "summary": "查询模板列表", + "description": "分页返回当前账户下的通知模板列表。", + "tags": [ + "On-call/通知模板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **模板查看**(`on-call`) 或 **模板管理**(`on-call`) |\n\n## 使用说明\n\n- 默认返回第 1 页、每页 20 条。响应中的 `has_next_page` 可以直接告知是否还有下一页,无需额外计数请求。\n- 当 `is_my_team=true` 时 `team_ids` 字段会被忽略。", + "href": "/zh/api-reference/on-call/notification-templates/template-read-list", + "metadata": { + "sidebarTitle": "查询模板列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TemplateListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 47, + "has_next_page": true, + "items": [ + { + "account_id": 10023, + "team_id": 0, + "template_id": "6605a1b2c3d4e5f6a7b8c9d0", + "template_name": "生产环境默认模板", + "description": "Default template for production incidents.", + "email": "Incident {{ .IncidentName }} on {{ .Severity }}", + "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}", + "voice": "", + "dingtalk": "", + "wecom": "", + "feishu": "", + "feishu_app": "", + "dingtalk_app": "", + "wecom_app": "", + "slack_app": "", + "teams_app": "", + "telegram": "", + "slack": "", + "zoom": "", + "status": "enabled", + "creator_id": 80011, + "updated_by": 80011, + "created_at": 1712700000, + "updated_at": 1712702400 + } + ] + } + } + } + } + }, + "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/TemplateListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "orderby": "updated_at", + "asc": false, + "is_my_team": false + } + } + } + } + } + }, + "/insight/responder": { + "post": { + "operationId": "insightByResponder", + "summary": "查看处理人员洞察", + "description": "返回按处理人员聚合的洞察指标。", + "tags": [ + "On-call/分析看板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/analytics/insight-by-responder", + "metadata": { + "sidebarTitle": "查看处理人员洞察" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ResponderInsightResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "ts": 1740844800, + "responder_id": 3790925372131, + "responder_name": "alice", + "total_incident_cnt": 1, + "total_incidents_acknowledged": 1, + "total_incidents_reassigned": 0, + "total_incidents_escalated": 0, + "total_incidents_timeout_escalated": 0, + "total_incidents_manually_escalated": 0, + "total_interruptions": 1, + "total_notifications": 2, + "total_engaged_seconds": 10, + "total_seconds_to_ack": 2265624, + "mean_seconds_to_ack": 2265624, + "acknowledgement_pct": 100 + } + ] + } + } + } + } + }, + "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/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "responder_ids": [ + 3790925372131 + ], + "aggregate_unit": "day" + } + } + } + } + } + }, + "/status-page/change/list": { + "get": { + "operationId": "statusPageChangeList", + "summary": "查询状态页事件列表", + "description": "查询状态页的事件列表(故障和维护)。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/status-pages/status-page-change-list", + "metadata": { + "sidebarTitle": "查询状态页事件列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageChangeListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "change_id": 5821693893131, + "page_id": 5750613685214, + "type": "incident", + "title": "Web Console Degraded Performance", + "description": "The issue has been resolved, and all services are operating normally.", + "status": "resolved", + "affected_components": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", + "name": "Web Console", + "available_since_seconds": 1765349358, + "order_id": 1, + "status": "operational" + } + ], + "start_at_seconds": 1766736878, + "close_at_seconds": 1775529742, + "updates": [ + { + "update_id": "01KDCVJQ88SZPHWPTDV2Z2AZW8", + "at_seconds": 1766736876, + "status": "investigating", + "description": "We are currently investigating an issue affecting some services.", + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "component_name": "Web Console", + "status": "degraded" + } + ] + }, + { + "update_id": "01KNJX3KW873ZZSRZC14SGFYS3", + "at_seconds": 1775529742, + "status": "resolved", + "description": "The issue has been resolved, and all services are operating normally.", + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "component_name": "Web Console", + "status": "operational" + } + ] + } + ], + "notify_subscribers": true + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Status page ID." + }, + { + "name": "start_at_seconds", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Filter events started at or after this unix timestamp (seconds)." + }, + { + "name": "end_at_seconds", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Filter events started at or before this unix timestamp (seconds)." + }, + { + "name": "type", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "incident", + "maintenance" + ] + }, + "description": "Event type filter. Required." + }, + { + "name": "status", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ] + }, + "description": "Event status filter. Required. Must be a status valid for the given `type` (e.g. `investigating`/`identified`/`monitoring`/`resolved` for incidents; `scheduled`/`ongoing`/`completed` for maintenances)." + } + ] + } + }, + "/enrichment/mapping/api/create": { + "post": { + "operationId": "mapping-api-write-create", + "summary": "创建映射 API", + "description": "创建新的外部 HTTP API 端点,用于通过 HTTP 查询富化告警。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- `url` 须以 `http://` 或 `https://` 开头,SaaS 模式下不得解析为内网 IP。\n- `timeout` 为 HTTP 读取超时秒数(1–3,默认 2)。\n- `retry_count` 为失败重试次数(0–1,默认 0)。\n- SaaS 模式下,含敏感名称的请求头(如 `authorization`、`cookie`)将被拒绝。\n- 账户最多可创建 50 个映射 API。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-api-write-create", + "metadata": { + "sidebarTitle": "创建映射 API" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingAPICreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "api_id": "665f1a2b3c4d5e6f7a8b9c02", + "api_name": "CMDB API" + } + } + } + } + }, + "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/MappingAPICreateRequest" + }, + "example": { + "api_name": "CMDB API", + "description": "查询 CMDB 主机元数据", + "url": "https://cmdb.example.com/api/lookup", + "headers": { + "X-Token": "mytoken" + }, + "timeout": 2, + "retry_count": 1, + "insecure_skip_verify": false + } + } + } + } + } + }, + "/schedule/update": { + "post": { + "operationId": "scheduleUpdate", + "summary": "更新值班表", + "description": "更新已有的值班表,需要通过 schedule_id 指定值班表。", + "tags": [ + "On-call/值班排班" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/schedules/schedule-update", + "metadata": { + "sidebarTitle": "更新值班表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScheduleUpsertRequest" + }, + "example": { + "schedule_id": 2001, + "schedule_name": "Production On-Call (Updated)", + "description": "Updated primary on-call rotation", + "team_id": 4291079133131 + } + } + } + } + } + }, + "/template/delete": { + "post": { + "operationId": "template-write-delete", + "summary": "删除模板", + "description": "按 ID 软删除一个模板。", + "tags": [ + "On-call/通知模板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **模板管理**(`on-call`) |\n\n## 使用说明\n\n- 若模板仍被任何协作空间、分派策略或通知订阅引用,会返回 `400 ReferenceExist`。\n- 删除是软删除(`deleted_at` 被置值),记录仍保留用于审计,但模板不会再出现在列表中。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/notification-templates/template-write-delete", + "metadata": { + "sidebarTitle": "删除模板" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TemplateIDRequest" + }, + "example": { + "template_id": "6605a1b2c3d4e5f6a7b8c9d0" + } + } + } + } + } + }, + "/enrichment/mapping/data/upsert": { + "post": { + "operationId": "mapping-data-write-upsert", + "summary": "写入映射数据", + "description": "向映射规则中插入或更新最多 1000 条数据行,每行须包含所有来源标签和结果标签。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 每条数据须包含映射规则中定义的所有来源标签和结果标签的值。\n- 未知标签的值将被静默忽略。\n- 每个值最多 2048 个字符。\n- Upsert 以来源标签组合为键,来源键相同的行将被更新。\n- 单个映射规则默认最多存储 10,000 条数据。\n- 每个映射规则的写入操作有锁保护,并发 Upsert 可能返回 `ErrRequestTooFrequently`。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-data-write-upsert", + "metadata": { + "sidebarTitle": "写入映射数据" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingDataUpsertResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "keys": [ + "server01", + "server02" + ] + } + } + } + } + }, + "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/MappingDataUpsertRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "docs": [ + { + "host": "server01", + "owner": "alice", + "team": "sre", + "service": "api" + }, + { + "host": "server02", + "owner": "bob", + "team": "平台", + "service": "gateway" + } + ] + } + } + } + } + } + }, + "/incident/field/reset": { + "post": { + "operationId": "incidentFieldReset", + "summary": "更新故障自定义字段", + "description": "更新故障的自定义字段值。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-field-reset", + "metadata": { + "sidebarTitle": "更新故障自定义字段" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetIncidentFieldRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "field_name": "affected_service", + "field_value": "payment-service" + } + } + } + } + } + }, + "/schedule/self": { + "post": { + "operationId": "scheduleSelf", + "summary": "查询我的值班表", + "description": "返回当前用户被分配的值班表列表。", + "tags": [ + "On-call/值班排班" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/schedules/schedule-self", + "metadata": { + "sidebarTitle": "查询我的值班表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleSelfResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "id": 2539108069860, + "name": "Open Source Q&A", + "account_id": 2451002751131, + "group_id": 2477033058131, + "disabled": 0, + "create_at": 1702623874, + "create_by": 2451002751131, + "update_at": 1710468081, + "update_by": 2476444212131, + "layers": [ + { + "account_id": 2451002751131, + "name": "Rule 1", + "schedule_id": 2539108069860, + "hidden": 0, + "mode": 0, + "weight": 0, + "groups": [ + { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2476444212131 + ] + } + ], + "start": 0, + "end": 0 + }, + { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2469167612131 + ] + } + ], + "start": 0, + "end": 0 + } + ], + "rotation_duration": 86400, + "handoff_time": 0, + "enable_time": 1702623874, + "expire_time": 0, + "restrict_mode": 0, + "restrict_start": 0, + "restrict_end": 0, + "restrict_periods": [], + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "create_at": 1702623874, + "create_by": 2451002751131, + "update_at": 1710468081, + "update_by": 2476444212131, + "layer_name": "Rule 1", + "fair_rotation": false, + "layer_start": 1702623874, + "layer_end": null, + "rotation_unit": "day", + "rotation_value": 1, + "mask_continuous_enabled": false + } + ], + "schedule_layers": null, + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": null + }, + "notify": { + "fixed_time": null, + "by": null, + "webhooks": null + }, + "schedule_id": 2539108069860, + "schedule_name": "Open Source Q&A", + "team_id": 2477033058131, + "description": "", + "layer_schedules": null, + "status": 0, + "cur_oncall": null, + "next_oncall": null + } + ] + } + } + } + } + }, + "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/ScheduleSelfRequest" + }, + "example": { + "start": 1712000000, + "end": 1712086400 + } + } + } + } + } + }, + "/channel/unsubscribe/rule/disable": { + "post": { + "operationId": "channelUnsubscribeRuleDisable", + "summary": "禁用排除规则", + "description": "禁用排除规则而不删除。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/channel-unsubscribe-rule-disable", + "metadata": { + "sidebarTitle": "禁用排除规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/silence/rule/list": { + "post": { + "operationId": "channelSilenceRuleList", + "summary": "查询静默策略列表", + "description": "查询为指定协作空间配置的所有静默策略。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-silence-rule-list", + "metadata": { + "sidebarTitle": "查询静默策略列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListSilenceRulesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "channel_id": 5967964835131, + "priority": 0, + "rule_name": "Silence Info alerts", + "description": "", + "from_incident_id": "000000000000000000000000", + "time_filters": [], + "time_filter": { + "start_time": 1773388800, + "end_time": 1773414000 + }, + "filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "is_directly_discard": true, + "status": "enabled", + "rule_id": "69b3c426b4a6f5abf1f54873", + "updated_by": 3790925372131, + "created_at": 1773388838, + "updated_at": 1773388838, + "is_effective": false + } + ] + } + } + } + } + }, + "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/ChannelScopedListRequest" + }, + "example": { + "channel_id": 1001 + } + } + } + } + } + }, + "/incident/create": { + "post": { + "operationId": "incidentCreate", + "summary": "创建故障", + "description": "手动创建一个新故障并分派处理人员。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-create", + "metadata": { + "sidebarTitle": "创建故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CreateIncidentResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "incident_id": "69db2ef1a0fe7db6448b14f1", + "title": "API test incident for docs" + } + } + } + } + }, + "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/CreateIncidentRequest" + }, + "example": { + "incident_severity": "Critical", + "title": "Database connection timeout on prod-db-01", + "channel_id": 2551105804131, + "assigned_to": { + "person_ids": [ + 2476444212131 + ] + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "AppKeyAuth": { + "type": "apiKey", + "in": "query", + "name": "app_key", + "description": "在 Flashduty 控制台 账户 → APP Key 中签发的 app_key。调用任何公开 API 时都必须携带。它等同于所属账户的身份凭证,请妥善保管。" + } + }, + "responses": { + "BadRequest": { + "description": "请求非法 — 通常是参数缺失或格式不正确。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "missingParameter": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "InvalidParameter", + "message": "The specified parameter is not valid." + } + } + } + } + } + } + }, + "Unauthorized": { + "description": "app_key 缺失或无效。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "missingAppKey": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "Unauthorized", + "message": "You are unauthorized." + } + } + } + } + } + } + }, + "Forbidden": { + "description": "app_key 有效但没有执行该操作的权限。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "noEditPermission": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "AccessDenied", + "message": "Access Denied." + } + } + } + } + } + } + }, + "NotFound": { + "description": "目标资源不存在或已被删除。注意:Flashduty 对业务实体的缺失通常返回 HTTP 400 + code=`ResourceNotFound`,真正的 404 只用于未知路由。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "resourceMissing": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "ResourceNotFound", + "message": "The resource you request is not found" + } + } + } + } + } + } + }, + "TooManyRequests": { + "description": "命中限流。可能是全局 API 限流、账户级限流或集成级限流。限流按账户聚合。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "rateLimited": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "RequestTooFrequently", + "message": "Request too frequently." + } + } + } + } + } + } + }, + "ServerError": { + "description": "服务端未预期错误。反馈问题时请携带 request_id。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "internal": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "InternalError", + "message": "We encountered an internal error, and it has been reported. Please try again later." + } + } + } + } + } + } + } + }, + "schemas": { + "AckIncidentRequest": { + "type": "object", + "description": "认领故障的参数。", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "待认领的故障 ID 列表,单次最多 100 条。", + "minItems": 1 + } + } + }, + "AddIncidentResponderRequest": { + "type": "object", + "description": "向已有故障添加处理人员的参数。", + "required": [ + "incident_id", + "person_ids" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + }, + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "要添加的处理人员成员 ID 列表。" + }, + "notify": { + "type": "object", + "description": "通知配置,默认跟随每人的个人通知偏好。", + "properties": { + "follow_preference": { + "type": "boolean", + "description": "为 true 时跟随处理人员的个人偏好。" + }, + "personal_channels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "使用的通知渠道(如 `voice`、`sms`、`email`)。" + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "通知模板 ID(MongoDB ObjectID)。" + } + } + } + } + }, + "AffectedStatusPageComponentItem": { + "type": "object", + "description": "事件当前影响的状态页组件,包含组件元数据及其状态。", + "required": [ + "name", + "status" + ], + "properties": { + "component_id": { + "type": "string", + "description": "组件 ID。" + }, + "section_id": { + "type": "string", + "description": "所属区域 ID。" + }, + "name": { + "type": "string", + "description": "组件显示名称。" + }, + "description": { + "type": "string", + "description": "组件描述。" + }, + "available_since_seconds": { + "type": "integer", + "format": "int64", + "description": "组件首次可用时间(Unix 秒)。" + }, + "order_id": { + "type": "integer", + "format": "int64", + "description": "在所属区域内的显示顺序。" + }, + "hide_uptime": { + "type": "boolean", + "description": "为 true 时在摘要响应中隐藏可用率数据。" + }, + "hide_all": { + "type": "boolean", + "description": "为 true 时从摘要接口中完全隐藏该组件。" + }, + "status": { + "type": "string", + "enum": [ + "operational", + "degraded", + "partial_outage", + "full_outage", + "under_maintenance" + ], + "description": "事件导致的组件当前状态。" + } + } + }, + "AlertEventGlobalListRequest": { + "type": "object", + "description": "全局原始事件列表的过滤和分页条件。", + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "检索窗口开始时间,Unix 时间戳(秒)。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "检索窗口结束时间,Unix 时间戳(秒)。" + }, + "p": { + "type": "integer", + "format": "int64", + "description": "页码,从 1 开始。未提供 `search_after_ctx` 时使用。" + }, + "limit": { + "type": "integer", + "format": "int64", + "description": "每页条数,最大 100,默认 20。" + }, + "search_after_ctx": { + "type": "string", + "description": "下一页的不透明游标。" + }, + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按集成 ID 过滤。" + }, + "integration_types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按集成类型(插件键)过滤。" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按协作空间 ID 过滤,最多 100 个。" + }, + "severities": { + "type": "string", + "description": "逗号分隔的严重程度过滤,如 `Critical,Warning`。" + }, + "orderby": { + "type": "string", + "description": "排序字段(ES 字段名)。", + "enum": [ + "event_time" + ] + }, + "asc": { + "type": "boolean", + "description": "为 true 时升序排序。" + } + } + }, + "AlertEventGlobalListResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64" + }, + "has_next_page": { + "type": "boolean" + }, + "search_after_ctx": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertEventItem" + } + } + } + }, + "AlertEventItem": { + "type": "object", + "description": "单条原始告警事件。", + "properties": { + "event_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "事件 ID(MongoDB ObjectID)。" + }, + "alert_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "父告警 ID(MongoDB ObjectID)。" + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "账户 ID。" + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "事件路由到的协作空间 ID。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "产生该事件的集成 ID。" + }, + "integration_type": { + "type": "string", + "description": "产生该事件的集成类型/插件键。" + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "已废弃,请使用 `integration_id`。" + }, + "title": { + "type": "string", + "description": "事件标题。" + }, + "title_rule": { + "type": "string", + "description": "用于从标签派生 `title` 的标题模板。" + }, + "description": { + "type": "string", + "description": "事件描述。" + }, + "alert_key": { + "type": "string", + "description": "用于将事件合并到告警的去重键。" + }, + "event_severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "事件严重程度。" + }, + "event_status": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "事件状态。" + }, + "event_time": { + "type": "integer", + "format": "int64", + "description": "事件时间戳,Unix 时间戳(秒)。" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "标签键值对。" + }, + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertImage" + }, + "description": "事件附加的图片。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "记录创建时间,Unix 时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "记录更新时间,Unix 时间戳(秒)。" + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "软删除时间戳(秒),未删除时为 0。" + } + } + }, + "AlertEventListRequest": { + "type": "object", + "required": [ + "alert_id" + ], + "properties": { + "alert_id": { + "type": "string", + "description": "告警 ID(ObjectID 十六进制字符串)。" + } + } + }, + "AlertEventListResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertEventItem" + } + } + } + }, + "AlertFeedRequest": { + "type": "object", + "required": [ + "alert_id" + ], + "properties": { + "alert_id": { + "type": "string", + "description": "告警 ID。" + }, + "p": { + "type": "integer", + "format": "int64", + "description": "页码,从 1 开始。", + "default": 1 + }, + "limit": { + "type": "integer", + "format": "int64", + "description": "每页条数,最大 100,默认 20。" + }, + "asc": { + "type": "boolean", + "description": "升序排序。" + }, + "types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按动态类型过滤。" + } + } + }, + "AlertFeedResponse": { + "type": "object", + "properties": { + "has_next_page": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeedItem" + } + } + } + }, + "AlertFeedType": { + "type": "string", + "description": "告警动态记录类型。每个值标识一个告警生命周期事件;`detail` 的具体结构由该字段决定。\n\n| 类型 | 含义 |\n|---|---|\n| `a_new` | 告警触发。 |\n| `a_comm` | 在告警上添加了评论。 |\n| `a_close` | 告警关闭。 |", + "enum": [ + "a_new", + "a_comm", + "a_close" + ] + }, + "AlertImage": { + "type": "object", + "description": "告警或事件的图片附件。", + "required": [ + "src" + ], + "properties": { + "href": { + "type": "string", + "description": "点击图片时的跳转链接(可选)。" + }, + "src": { + "type": "string", + "description": "图片源地址或内部引用(以 `img_` 或 `http` 开头)。" + }, + "alt": { + "type": "string", + "description": "替代文本。" + } + } + }, + "AlertInfo": { + "type": "object", + "description": "告警详情。", + "required": [ + "alert_id", + "integration_id", + "data_source_id", + "channel_id", + "account_id", + "description", + "title", + "title_rule", + "alert_key", + "alert_severity", + "alert_status", + "start_time", + "last_time", + "end_time", + "labels", + "ever_muted", + "created_at", + "updated_at", + "integration_name", + "integration_type", + "integration_ref_id", + "channel_name", + "channel_status", + "responder_name", + "responder_email", + "event_cnt", + "images", + "data_source_name", + "data_source_ref_id" + ], + "properties": { + "alert_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "告警 ID(MongoDB ObjectID)。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "产生告警的集成 ID。" + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "已废弃,请使用 `integration_id`。" + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "协作空间 ID。" + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "账号 ID。" + }, + "description": { + "type": "string", + "description": "告警描述。" + }, + "title": { + "type": "string", + "description": "告警标题。" + }, + "title_rule": { + "type": "string", + "description": "标题生成规则。" + }, + "alert_key": { + "type": "string", + "description": "用于合并事件的去重键。" + }, + "alert_severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "当前严重程度。" + }, + "alert_status": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "当前状态。" + }, + "start_time": { + "type": "integer", + "format": "int64", + "description": "告警首次触发的 Unix 时间戳(秒)。" + }, + "last_time": { + "type": "integer", + "format": "int64", + "description": "最近一次事件的 Unix 时间戳(秒)。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "告警恢复的 Unix 时间戳(秒),仍活跃时为 0。" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "告警标签。" + }, + "ever_muted": { + "type": "boolean", + "description": "该告警是否曾被静默。" + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "软删除时间戳(秒),未删除时为 0。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间戳(秒)。" + }, + "integration_name": { + "type": "string", + "description": "集成显示名称。" + }, + "integration_type": { + "type": "string", + "description": "集成类型。" + }, + "integration_ref_id": { + "type": "string", + "description": "集成引用 ID。" + }, + "channel_name": { + "type": "string", + "description": "协作空间名称。" + }, + "channel_status": { + "type": "string", + "description": "协作空间状态。" + }, + "responder_name": { + "type": "string", + "description": "主处理人员名称。" + }, + "responder_email": { + "type": "string", + "description": "主处理人员邮箱。" + }, + "incident": { + "$ref": "#/components/schemas/IncidentShort", + "description": "所属故障引用,若告警已被合并。" + }, + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertEventItem" + }, + "description": "原始告警事件,调用方显式请求时返回。" + }, + "event_cnt": { + "type": "integer", + "format": "int64", + "description": "合并到该告警的原始事件总数。" + }, + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Image" + }, + "description": "附加图片。" + }, + "data_source_name": { + "type": "string", + "description": "已废弃,请使用 `integration_name`。" + }, + "data_source_type": { + "type": "string", + "description": "已废弃,请使用 `integration_type`。" + }, + "data_source_ref_id": { + "type": "string", + "description": "已废弃,请使用 `integration_ref_id`。" + } + } + }, + "AlertInfoRequest": { + "type": "object", + "required": [ + "alert_id" + ], + "properties": { + "alert_id": { + "type": "string", + "description": "告警 ID(ObjectID 十六进制字符串)。" + } + } + }, + "AlertItem": { + "type": "object", + "description": "包含完整详情的单条告警。", + "properties": { + "alert_id": { + "type": "string", + "description": "告警唯一 ID(ObjectID 十六进制字符串)。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "产生该告警的集成 ID。" + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "已废弃,请使用 `integration_id`。 Deprecated: use `integration_id` instead.", + "deprecated": true + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "告警所属协作空间 ID。" + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "账户 ID。" + }, + "title": { + "type": "string", + "description": "告警标题。" + }, + "title_rule": { + "type": "string", + "description": "用于从事件标签派生 `title` 的标题模板(如 `$service::$cluster`)。" + }, + "description": { + "type": "string", + "description": "告警描述。" + }, + "alert_severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "当前严重程度。" + }, + "alert_status": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "当前状态。" + }, + "alert_key": { + "type": "string", + "description": "去重键。" + }, + "start_time": { + "type": "integer", + "format": "int64", + "description": "首次触发时间,Unix 时间戳(秒)。" + }, + "last_time": { + "type": "integer", + "format": "int64", + "description": "最后事件时间,Unix 时间戳(秒)。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "恢复时间,Unix 时间戳(秒)。活跃时为 0。" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "标签键值对。" + }, + "ever_muted": { + "type": "boolean", + "description": "是否曾被静默。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 时间戳(秒)。" + }, + "integration_name": { + "type": "string", + "description": "集成显示名称。" + }, + "integration_type": { + "type": "string", + "description": "集成类型/插件键。" + }, + "integration_ref_id": { + "type": "string", + "description": "集成外部参考 ID。" + }, + "channel_name": { + "type": "string", + "description": "协作空间显示名称。" + }, + "channel_status": { + "type": "string", + "description": "协作空间状态(如 `enabled`、`disabled`)。" + }, + "responder_name": { + "type": "string", + "description": "当前处理人姓名(来自关联故障)。" + }, + "responder_email": { + "type": "string", + "description": "当前处理人邮箱(来自关联故障)。" + }, + "event_cnt": { + "type": "integer", + "format": "int64", + "description": "该告警收到的原始事件总数。" + }, + "incident": { + "$ref": "#/components/schemas/IncidentShort", + "description": "关联故障(如有)。" + }, + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertEventItem" + }, + "description": "附加到该告警的最近原始事件,仅部分接口返回。" + }, + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertImage" + }, + "description": "告警附加的图片。" + }, + "data_source_name": { + "type": "string", + "description": "已废弃,请使用 `integration_name`。" + }, + "data_source_type": { + "type": "string", + "description": "已废弃,请使用 `integration_type`。" + }, + "data_source_ref_id": { + "type": "string", + "description": "已废弃,请使用 `integration_ref_id`。" + } + } + }, + "AlertListByIDsRequest": { + "type": "object", + "required": [ + "alert_ids" + ], + "properties": { + "alert_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "告警 ID 列表(十六进制字符串)。" + } + } + }, + "AlertListRequest": { + "type": "object", + "description": "告警列表查询的过滤和分页条件,时间范围必填。", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "检索窗口开始时间,Unix 时间戳(秒)。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "检索窗口结束时间,Unix 时间戳(秒)。最大跨度 31 天。" + }, + "p": { + "type": "integer", + "format": "int64", + "description": "页码,从 1 开始。未提供 `search_after_ctx` 时使用。" + }, + "limit": { + "type": "integer", + "format": "int64", + "description": "每页条数,最大 100,默认 20。" + }, + "search_after_ctx": { + "type": "string", + "description": "上次响应返回的不透明游标,用于获取下一页。" + }, + "is_active": { + "type": "boolean", + "description": "过滤活跃(true)或已恢复(false)状态告警。" + }, + "ever_muted": { + "type": "boolean", + "description": "按告警是否曾被静默过滤。" + }, + "alert_severity": { + "type": "string", + "description": "逗号分隔的严重程度过滤,如 `Critical,Warning`。可选值:`Critical`、`Warning`、`Info`、`Ok`。" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按协作空间 ID 过滤。" + }, + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按集成 ID 过滤。" + }, + "alert_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按告警 ID(ObjectID 十六进制字符串)过滤。" + }, + "alert_keys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按告警去重键过滤。" + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "排序字段。" + }, + "asc": { + "type": "boolean", + "description": "为 true 时升序排序,默认降序。" + }, + "by_updated_at": { + "type": "boolean", + "description": "为 true 时,时间范围过滤作用于 `updated_at` 而非 `start_time`。" + } + } + }, + "AlertListResponse": { + "type": "object", + "description": "分页的告警列表。", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "符合条件的告警总数。" + }, + "has_next_page": { + "type": "boolean", + "description": "是否有更多页。" + }, + "search_after_ctx": { + "type": "string", + "description": "下一页的游标。" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertItem" + } + } + } + }, + "AlertMergeRequest": { + "type": "object", + "required": [ + "alert_ids", + "incident_id" + ], + "properties": { + "alert_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "要合并的告警 ID 列表。" + }, + "incident_id": { + "type": "string", + "description": "目标故障 ID。" + }, + "comment": { + "type": "string", + "description": "合并操作的可选评论。" + }, + "title": { + "type": "string", + "description": "目标故障的可选新标题。" + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "目标故障的可选新负责人。" + } + } + }, + "AlertPipeline": { + "type": "object", + "description": "单条告警处理规则。", + "properties": { + "kind": { + "type": "string", + "enum": [ + "title_reset", + "description_reset", + "severity_reset", + "alert_drop", + "alert_inhibit" + ], + "description": "规则类型。" + }, + "if": { + "$ref": "#/components/schemas/OrFilterGroup", + "description": "可选的过滤条件,省略时对所有告警生效。" + }, + "settings": { + "type": "object", + "description": "与 `kind` 对应的配置。取值结构因 `kind` 而异:\n- `title_reset`:`{ \"title\": \"<模板字符串>\" }`\n- `description_reset`:`{ \"description\": \"<模板字符串>\" }`\n- `severity_reset`:`{ \"severity\": \"Critical\"|\"Warning\"|\"Info\" }`\n- `alert_drop`:`{}` (空对象)\n- `alert_inhibit`:`{ \"equals\": [\"<标签键>\", ...], \"source_filters\": }`", + "oneOf": [ + { + "$ref": "#/components/schemas/ApTitleReset" + }, + { + "$ref": "#/components/schemas/ApDescriptionReset" + }, + { + "$ref": "#/components/schemas/ApSeverityReset" + }, + { + "$ref": "#/components/schemas/ApAlertDrop" + }, + { + "$ref": "#/components/schemas/ApAlertInhibit" + } + ] + } + } + }, + "AlertPipelineInfoRequest": { + "type": "object", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "集成 ID。" + } + } + }, + "AlertPipelineItem": { + "type": "object", + "description": "集成的告警处理规则配置。", + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "该处理规则所属的集成 ID。" + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertPipeline" + }, + "description": "有序的处理规则列表。" + }, + "status": { + "type": "string", + "description": "规则状态(如 `active`)。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "创建规则的成员 ID。" + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "最后更新规则的成员 ID。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 时间戳(秒)。" + } + } + }, + "AlertPipelineListRequest": { + "type": "object", + "required": [ + "integration_ids" + ], + "properties": { + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "集成 ID 列表。" + } + } + }, + "AlertPipelineListResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertPipelineItem" + } + } + } + }, + "AlertPipelineUpsertRequest": { + "type": "object", + "required": [ + "integration_id", + "rules" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "要配置的集成 ID。" + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertPipeline" + }, + "description": "处理规则列表,最多 50 条。", + "maxItems": 50 + } + } + }, + "ApAlertDrop": { + "type": "object", + "description": "`alert_drop` 规则的配置:无需额外配置,匹配的告警将被静默丢弃。", + "properties": {} + }, + "ApAlertInhibit": { + "type": "object", + "description": "`alert_inhibit` 规则的配置:当来源告警与当前告警共享相同标签值时,抑制匹配过滤条件的来源告警。", + "required": [ + "equals", + "source_filters" + ], + "properties": { + "equals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "需要在来源告警与当前告警之间值相等的标签键列表。" + }, + "source_filters": { + "$ref": "#/components/schemas/OrFilterGroup", + "description": "用于匹配待抑制来源告警的过滤条件。" + } + } + }, + "ApDescriptionReset": { + "type": "object", + "description": "`description_reset` 规则的配置:使用模板字符串覆盖告警描述。", + "required": [ + "description" + ], + "properties": { + "description": { + "type": "string", + "description": "新描述模板。" + } + } + }, + "ApSeverityReset": { + "type": "object", + "description": "`severity_reset` 规则的配置:将告警严重程度强制设置为固定值。", + "required": [ + "severity" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info" + ], + "description": "目标严重程度级别。" + } + } + }, + "ApTitleReset": { + "type": "object", + "description": "`title_reset` 规则的配置:使用模板字符串覆盖告警标题。", + "required": [ + "title" + ], + "properties": { + "title": { + "type": "string", + "description": "新标题模板,支持引用告警字段的 Golang 模板语法。" + } + } + }, + "AssignIncidentRequest": { + "type": "object", + "description": "分派故障的参数。`incident_id` 与 `incident_ids` 二选一。", + "required": [ + "assigned_to" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "单个故障 ID。当 `incident_ids` 也传入时将被忽略。" + }, + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "minItems": 1, + "maxItems": 100, + "description": "批量故障 ID 列表。" + }, + "assigned_to": { + "$ref": "#/components/schemas/AssignedTo" + } + } + }, + "AssignedTo": { + "type": "object", + "description": "故障分派目标。`person_ids` 与 `escalate_rule_id` 至少设置一项。", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "minItems": 1, + "maxItems": 100, + "description": "直接指派的成员 ID 列表。" + }, + "escalate_rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "按分派策略指派时使用的策略 ID(MongoDB ObjectID)。" + }, + "layer_idx": { + "type": "integer", + "description": "当前环节索引。" + }, + "type": { + "type": "string", + "description": "指派类型:`assign` 直接指派、`reassign` 重新指派、`escalate` 分派策略驱动、`reopen` 重新打开时自动指派。", + "enum": [ + "assign", + "reassign", + "escalate", + "reopen" + ] + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "minItems": 1, + "maxItems": 100, + "description": "邮箱接收人列表,用于 ServiceNow 等外部系统。" + }, + "escalate_rule_name": { + "type": "string", + "description": "分派策略名称,由服务端填充。" + }, + "assigned_at": { + "type": "integer", + "format": "int64", + "description": "指派发生的 Unix 时间戳(秒)。" + }, + "id": { + "type": "string", + "description": "服务端生成的指派 ID。" + } + } + }, + "CalEventIDRequest": { + "type": "object", + "description": "日历事件删除请求。", + "required": [ + "cal_id", + "event_id" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "日历 ID。" + }, + "event_id": { + "type": "string", + "description": "事件 ID。" + } + } + }, + "CalEventItem": { + "type": "object", + "description": "日历事件条目。", + "required": [ + "cal_id", + "event_id", + "summary", + "description", + "start_at", + "end_at", + "is_off", + "created_at", + "updated_at" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "账户 ID,仅私有事件返回。" + }, + "creator_id": { + "type": "integer", + "format": "uint64", + "description": "创建人 ID,仅私有事件返回。" + }, + "cal_id": { + "type": "string", + "description": "日历 ID,公共事件为 locale key(如 zh-cn.china.official)。" + }, + "event_id": { + "type": "string", + "description": "事件 ID。" + }, + "summary": { + "type": "string", + "description": "事件摘要。" + }, + "description": { + "type": "string", + "description": "事件描述。" + }, + "start_at": { + "type": "string", + "description": "事件开始日期(YYYY-MM-DD)。" + }, + "end_at": { + "type": "string", + "description": "事件结束日期(YYYY-MM-DD,不含)。" + }, + "is_off": { + "type": "boolean", + "description": "是否为非工作日。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间(Unix 秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "更新时间(Unix 秒)。" + } + } + }, + "CalEventListRequest": { + "type": "object", + "description": "日历事件列表请求。day > 0 时必须同时指定 month;month 与 day 为 0 表示不过滤。", + "required": [ + "cal_id" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "日历 ID。" + }, + "year": { + "type": "integer", + "description": "年份,留空时默认当前年。", + "minimum": 2023 + }, + "month": { + "type": "integer", + "description": "月份(1-12),0 表示不按月过滤。", + "minimum": 0, + "maximum": 12 + }, + "day": { + "type": "integer", + "description": "日(1-31),0 表示不按日过滤。", + "minimum": 0, + "maximum": 31 + } + } + }, + "CalEventListResponse": { + "type": "object", + "description": "日历事件列表响应。", + "required": [ + "items", + "total" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CalEventItem" + }, + "description": "按 start_at 排序的日历事件列表。" + }, + "total": { + "type": "integer", + "description": "返回的事件总数。" + } + } + }, + "CalEventUpsertRequest": { + "type": "object", + "description": "日历事件创建/更新请求。传入 event_id 表示更新,留空表示创建。", + "required": [ + "cal_id", + "summary", + "start_at", + "end_at", + "is_off" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "日历 ID。" + }, + "event_id": { + "type": "string", + "description": "事件 ID,创建时留空。", + "maxLength": 63 + }, + "summary": { + "type": "string", + "description": "事件摘要。", + "minLength": 1, + "maxLength": 39 + }, + "description": { + "type": "string", + "description": "事件描述。", + "maxLength": 499 + }, + "start_at": { + "type": "string", + "description": "事件开始日期,格式 YYYY-MM-DD。" + }, + "end_at": { + "type": "string", + "description": "事件结束日期(不含),格式 YYYY-MM-DD。" + }, + "is_off": { + "type": "boolean", + "description": "是否为非工作日。true = 休息日,false = 工作日覆盖。" + } + } + }, + "CalEventUpsertResponse": { + "type": "object", + "description": "/calendar/event/upsert 的响应。", + "required": [ + "cal_id", + "event_id", + "summary" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "日历 ID。" + }, + "event_id": { + "type": "string", + "description": "事件 ID(已存在的或新生成的)。" + }, + "summary": { + "type": "string", + "description": "事件摘要。" + } + } + }, + "CalendarCreateRequest": { + "type": "object", + "description": "创建日历请求,cal_name 必填。", + "required": [ + "cal_name" + ], + "properties": { + "cal_name": { + "type": "string", + "description": "日历显示名称。", + "minLength": 1, + "maxLength": 39 + }, + "description": { + "type": "string", + "description": "日历描述。", + "maxLength": 499 + }, + "timezone": { + "type": "string", + "description": "IANA 时区,为空时默认 Asia/Shanghai。", + "default": "Asia/Shanghai" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID,0 表示不关联团队。" + }, + "workdays": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0, + "maximum": 6 + }, + "description": "工作日(0 = 周日,6 = 周六)。" + }, + "extra_cal_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "需要继承事件的公共节假日日历 ID 列表(例如 zh-cn.china.official)。" + } + } + }, + "CalendarCreateResponse": { + "type": "object", + "description": "创建日历响应。", + "required": [ + "cal_id", + "cal_name" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "新建日历的 ID(格式 cal.)。" + }, + "cal_name": { + "type": "string", + "description": "日历显示名称。" + } + } + }, + "CalendarEmptyObject": { + "type": "object", + "description": "空响应体。", + "properties": {} + }, + "CalendarIDRequest": { + "type": "object", + "description": "携带日历 ID 的请求体。", + "required": [ + "cal_id" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "日历 ID。" + } + } + }, + "CalendarItem": { + "type": "object", + "description": "服务日历详情。", + "required": [ + "account_id", + "team_id", + "cal_id", + "cal_name", + "description", + "timezone", + "kind", + "created_at", + "updated_at", + "creator_id", + "updated_by", + "status" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "账户 ID。" + }, + "team_id": { + "type": "integer", + "format": "uint64", + "description": "所属团队 ID(0 表示未关联团队)。" + }, + "cal_id": { + "type": "string", + "description": "日历 ID。" + }, + "cal_name": { + "type": "string", + "description": "日历显示名称。" + }, + "description": { + "type": "string", + "description": "日历描述。" + }, + "timezone": { + "type": "string", + "description": "IANA 时区。" + }, + "kind": { + "type": "string", + "description": "日历类型。", + "enum": [ + "region.official.holiday", + "religion.holiday", + "personal" + ] + }, + "workdays": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0, + "maximum": 6 + }, + "description": "工作日(0 = 周日,6 = 周六)。" + }, + "extra_cal_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "继承的公共节假日日历 ID 列表。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间(Unix 秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "更新时间(Unix 秒)。" + }, + "creator_id": { + "type": "integer", + "format": "uint64", + "description": "创建人 ID。" + }, + "updated_by": { + "type": "integer", + "format": "uint64", + "description": "最后更新人 ID。" + }, + "status": { + "type": "string", + "description": "日历状态。", + "enum": [ + "enabled", + "deleted" + ] + } + } + }, + "CalendarListRequest": { + "type": "object", + "description": "日历列表请求。kind 用于按类型过滤;no_locale 在查询公共节假日日历时关闭 locale 过滤。", + "properties": { + "kind": { + "type": "string", + "description": "日历类型过滤条件,为空时默认 personal。", + "enum": [ + "region.official.holiday", + "personal" + ] + }, + "no_locale": { + "type": "boolean", + "description": "查询公共节假日日历时关闭 locale 过滤。" + } + } + }, + "CalendarListResponse": { + "type": "object", + "description": "日历列表响应。", + "required": [ + "items", + "total" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CalendarItem" + }, + "description": "日历列表。" + }, + "total": { + "type": "integer", + "description": "返回的日历总数。" + } + } + }, + "CalendarUpdateRequest": { + "type": "object", + "description": "更新日历请求。cal_id 必填,其他字段均为可选,仅在传入时更新。", + "required": [ + "cal_id" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "日历 ID。" + }, + "cal_name": { + "type": "string", + "description": "新的日历名称。", + "minLength": 1, + "maxLength": 39 + }, + "description": { + "type": "string", + "description": "新的描述。", + "maxLength": 499 + }, + "timezone": { + "type": "string", + "description": "新的 IANA 时区。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "新的所属团队 ID。" + }, + "workdays": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0, + "maximum": 6 + }, + "description": "工作日(0 = 周日,6 = 周六)。" + }, + "extra_cal_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "需要继承事件的公共节假日日历 ID 列表。" + } + } + }, + "CancelStatusPageMigrationRequest": { + "type": "object", + "description": "取消进行中迁移任务所需的参数。", + "required": [ + "job_id" + ], + "properties": { + "job_id": { + "type": "string", + "description": "迁移任务 ID。" + } + } + }, + "ChannelCreateResponse": { + "type": "object", + "required": [ + "channel_id", + "channel_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "新建协作空间的 ID。" + }, + "channel_name": { + "type": "string", + "description": "请求中回显的协作空间名称。" + }, + "external_report_token": { + "type": "string", + "description": "外部上报 token,仅在启用外部上报时返回。" + } + } + }, + "ChannelIDRequest": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "协作空间 ID。" + } + } + }, + "ChannelInfoRequest": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "要查询的协作空间 ID。" + } + } + }, + "ChannelInfosRequest": { + "type": "object", + "required": [ + "channel_ids" + ], + "properties": { + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "maxItems": 1000, + "description": "要查询的协作空间 ID 列表,最多 1000 个。" + } + } + }, + "ChannelInfosResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelShort" + } + } + } + }, + "ChannelItem": { + "type": "object", + "description": "协作空间详情记录,所有字段可选,仅在有值时返回。", + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "协作空间 ID。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID。" + }, + "managing_team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "可管理该协作空间的其他团队 ID 列表。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "创建者成员 ID。" + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "所属账户 ID。" + }, + "channel_name": { + "type": "string", + "description": "协作空间名称。" + }, + "description": { + "type": "string", + "description": "描述信息。" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled", + "deleted" + ], + "description": "协作空间状态。" + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "删除时间(Unix 秒),仅软删除的协作空间非零。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间(Unix 秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最近更新时间(Unix 秒)。" + }, + "auto_resolve_timeout": { + "type": "integer", + "format": "int64", + "description": "自动恢复超时,单位秒。0 表示不自动恢复。" + }, + "auto_resolve_mode": { + "type": "string", + "enum": [ + "trigger", + "update" + ], + "description": "自动恢复计时重置方式。" + }, + "is_private": { + "type": "boolean", + "description": "为 true 时仅管理团队可见。" + }, + "disable_outlier_detection": { + "type": "boolean", + "description": "为 true 时禁用新奇故障检测。" + }, + "disable_auto_close": { + "type": "boolean", + "description": "为 true 时禁用故障自动关闭。" + }, + "group": { + "$ref": "#/components/schemas/Group" + }, + "flapping": { + "$ref": "#/components/schemas/Flapping" + }, + "progress_to_incident_cnts": { + "$ref": "#/components/schemas/IncProgressCnts" + }, + "is_starred": { + "type": "boolean", + "description": "当前用户是否已收藏该协作空间。" + }, + "active_incident_highest_severity": { + "type": "string", + "description": "协作空间内活跃故障的最高严重程度。" + }, + "last_incident_at": { + "type": "integer", + "format": "int64", + "description": "最近一次故障时间(Unix 秒)。" + }, + "is_external_report_enabled": { + "type": "boolean", + "description": "是否允许外部上报人向该协作空间上报故障。" + }, + "external_report_token": { + "type": "string", + "description": "启用外部上报时授予外部上报人的 token。" + } + } + }, + "ChannelRuleIDRequest": { + "type": "object", + "required": [ + "channel_id", + "rule_id" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID。" + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "规则 ID(MongoDB ObjectID)。" + } + } + }, + "ChannelScopedListRequest": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "要列出规则的协作空间 ID。" + } + } + }, + "ChannelShort": { + "type": "object", + "required": [ + "channel_id", + "channel_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "协作空间 ID。" + }, + "channel_name": { + "type": "string", + "description": "协作空间名称。" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "协作空间状态。" + } + } + }, + "CommentIncidentRequest": { + "type": "object", + "description": "为故障添加评论的参数。", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "目标故障 ID 列表,单次最多 100 条。", + "minItems": 1 + }, + "comment": { + "type": "string", + "maxLength": 1024, + "description": "评论内容。" + }, + "mute_reply": { + "type": "boolean", + "description": "为 true 时不触发 webhook 回复动作。" + } + } + }, + "CreateChannelRequest": { + "type": "object", + "description": "创建协作空间所需的参数。", + "required": [ + "team_id", + "channel_name" + ], + "properties": { + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID。" + }, + "managing_team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "maxItems": 3, + "description": "可管理该协作空间的其他团队 ID,最多 3 个。" + }, + "channel_name": { + "type": "string", + "minLength": 1, + "maxLength": 59, + "description": "协作空间名称,1 到 59 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "描述信息,最多 500 个字符。" + }, + "escalate_rule": { + "type": "object", + "description": "协作空间的默认分派策略,不需要时可省略。", + "required": [ + "template_id", + "target" + ], + "properties": { + "aggr_window": { + "type": "integer", + "minimum": 0, + "maximum": 3600, + "description": "聚合窗口,单位秒,0 表示不聚合。" + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "通知模板 ID(MongoDB ObjectID)。" + }, + "target": { + "type": "object", + "description": "通知目标。`person_ids`、`team_ids`、`schedule_to_role_ids`、`emails` 至少设置一项,且 `by` 与 `webhooks` 至少设置一项。", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "直接通知的成员 ID 列表。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "通知的团队 ID 列表。" + }, + "schedule_to_role_ids": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "description": "值班表 ID 到角色 ID 列表的映射,用于按值班角色通知。" + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "description": "邮箱地址列表(推送场景)。" + }, + "by": { + "type": "object", + "description": "按告警等级配置的个人通知渠道。未提供 `webhooks` 时必填。", + "properties": { + "follow_preference": { + "type": "boolean", + "description": "为 true 时跟随处理人员的个人偏好,忽略下方列表。" + }, + "critical": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Critical 级别使用的通知渠道(如 `voice`、`sms`、`email`、`feishu`)。" + }, + "warning": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Warning 级别使用的通知渠道。" + }, + "info": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Info 级别使用的通知渠道。" + } + } + }, + "webhooks": { + "type": "array", + "description": "群聊/Webhook 通知目标。未提供 `by` 时必填。", + "items": { + "type": "object", + "required": [ + "type", + "settings" + ], + "properties": { + "type": { + "type": "string", + "description": "Webhook 类型(如 `feishu`、`dingtalk_app`、`wecom_app`、`slack`、`teams`、`custom`)。" + }, + "settings": { + "type": "object", + "additionalProperties": true, + "description": "类型相关的配置参数(群聊 ID、URL 等)。" + } + } + } + } + } + } + } + }, + "group": { + "type": "object", + "description": "告警聚合配置。", + "required": [ + "method" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "i", + "p", + "n" + ], + "description": "聚合方式:`i` 智能、`p` 规则、`n` 不聚合。" + }, + "equals": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "maxItems": 5, + "description": "用于聚合判定的 label 键分组。" + }, + "cases": { + "type": "array", + "maxItems": 100, + "description": "按过滤条件的聚合策略覆盖。", + "items": { + "type": "object" + } + }, + "all_equals_required": { + "type": "boolean", + "description": "为 true 时要求所有键同时存在才能参与聚合。" + }, + "time_window": { + "type": "integer", + "minimum": 0, + "description": "聚合时间窗口,单位秒。" + }, + "window_type": { + "type": "string", + "enum": [ + "tumbling", + "sliding" + ], + "description": "窗口类型,默认 `tumbling`。" + }, + "storm_threshold": { + "type": "integer", + "minimum": 0, + "maximum": 10000, + "description": "告警风暴阈值。" + }, + "storm_thresholds": { + "type": "array", + "items": { + "type": "integer" + }, + "maxItems": 5, + "description": "多级告警风暴阈值。" + }, + "i_keys": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 10, + "description": "用于智能聚合向量化的 label 键。" + }, + "i_score_threshold": { + "type": "number", + "format": "float", + "minimum": 0.5, + "maximum": 1, + "description": "智能聚合相似度阈值。" + } + } + }, + "flapping": { + "type": "object", + "description": "抖动检测配置。", + "properties": { + "is_disabled": { + "type": "boolean", + "description": "禁用抖动检测。" + }, + "max_changes": { + "type": "integer", + "minimum": 2, + "maximum": 100, + "description": "`in_mins` 内允许的最大状态变更次数。" + }, + "in_mins": { + "type": "integer", + "minimum": 1, + "maximum": 1440, + "description": "观察窗口,单位分钟。" + }, + "mute_mins": { + "type": "integer", + "minimum": 0, + "maximum": 1440, + "description": "检测到抖动后的静音时长,单位分钟。" + } + } + }, + "auto_resolve_timeout": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 2592000, + "description": "自动恢复超时,单位秒。0 表示不自动恢复,最长 30 天。" + }, + "auto_resolve_mode": { + "type": "string", + "enum": [ + "trigger", + "update" + ], + "description": "自动恢复计时重置方式。" + }, + "plugin_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "订阅该协作空间的集成 ID 列表。" + }, + "is_private": { + "type": "boolean", + "description": "为 true 时仅管理团队可见。" + }, + "disable_outlier_detection": { + "type": "boolean", + "description": "禁用新奇故障检测。" + }, + "disable_auto_close": { + "type": "boolean", + "description": "禁用故障自动关闭。" + }, + "is_external_report_enabled": { + "type": "boolean", + "description": "允许外部上报人向该协作空间上报故障。" + } + } + }, + "CreateDropRuleRequest": { + "type": "object", + "description": "创建排除规则所需的参数。", + "required": [ + "channel_id", + "rule_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID。" + }, + "priority": { + "type": "integer", + "description": "匹配优先级,数值越小越优先。" + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "规则名称,1 到 39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "规则描述,最多 500 个字符。" + }, + "filters": { + "type": "array", + "description": "或-与组合条件树。每个外层元素为一组 AND 条件,组内所有条件需同时满足。", + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "字段键(如 `alert_severity`、`labels.service`)。" + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "过滤运算符。" + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "匹配值列表。" + } + } + } + } + } + } + }, + "CreateEscalationRuleRequest": { + "type": "object", + "description": "创建分派策略所需的参数。", + "required": [ + "channel_id", + "template_id", + "rule_name", + "layers" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID。" + }, + "priority": { + "type": "integer", + "minimum": 0, + "maximum": 200, + "description": "匹配优先级,数值越小越优先。" + }, + "aggr_window": { + "type": "integer", + "minimum": 0, + "maximum": 3600, + "description": "聚合窗口,单位秒,0 表示不聚合。" + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "通知模板 ID(MongoDB ObjectID)。" + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "策略名称,1 到 39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "策略描述,最多 500 个字符。" + }, + "layers": { + "type": "array", + "description": "分派环节列表,至少包含一个环节。", + "items": { + "type": "object", + "required": [ + "target" + ], + "properties": { + "max_times": { + "type": "integer", + "minimum": 0, + "maximum": 6, + "description": "当前环节内的最大重复通知次数。" + }, + "notify_step": { + "type": "number", + "format": "float", + "minimum": 0.5, + "maximum": 120, + "description": "重复通知间隔,单位分钟。" + }, + "target": { + "type": "object", + "description": "通知目标。`person_ids`、`team_ids`、`schedule_to_role_ids`、`emails` 至少设置一项,且 `by` 与 `webhooks` 至少设置一项。", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "直接通知的成员 ID 列表。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "通知的团队 ID 列表。" + }, + "schedule_to_role_ids": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "description": "值班表 ID 到角色 ID 列表的映射,用于按值班角色通知。" + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "description": "邮箱地址列表(推送场景)。" + }, + "by": { + "type": "object", + "description": "按告警等级配置的个人通知渠道。未提供 `webhooks` 时必填。", + "properties": { + "follow_preference": { + "type": "boolean", + "description": "为 true 时跟随处理人员的个人偏好,忽略下方列表。" + }, + "critical": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Critical 级别使用的通知渠道(如 `voice`、`sms`、`email`、`feishu`)。" + }, + "warning": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Warning 级别使用的通知渠道。" + }, + "info": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Info 级别使用的通知渠道。" + } + } + }, + "webhooks": { + "type": "array", + "description": "群聊/Webhook 通知目标。未提供 `by` 时必填。", + "items": { + "type": "object", + "required": [ + "type", + "settings" + ], + "properties": { + "type": { + "type": "string", + "description": "Webhook 类型(如 `feishu`、`dingtalk_app`、`wecom_app`、`slack`、`teams`、`custom`)。" + }, + "settings": { + "type": "object", + "additionalProperties": true, + "description": "类型相关的配置参数(群聊 ID、URL 等)。" + } + } + } + } + } + }, + "escalate_window": { + "type": "integer", + "minimum": 0, + "maximum": 720, + "description": "升级到下一环节前的等待时长,单位分钟。" + }, + "force_escalate": { + "type": "boolean", + "description": "为 true 时,即便未认领也强制升级。" + } + } + } + }, + "time_filters": { + "type": "array", + "items": { + "type": "object", + "description": "周期性时间窗口。`start`/`end` 使用 24 小时制 `HH:MM` 格式;`repeat` 使用星期索引(0=周日 … 6=周六)。", + "properties": { + "start": { + "type": "string", + "description": "窗口起始时间,`HH:MM`。" + }, + "end": { + "type": "string", + "description": "窗口结束时间,`HH:MM`。" + }, + "repeat": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "生效的星期列表,留空表示每天。" + }, + "cal_id": { + "type": "string", + "description": "可选日历 ID,限制窗口仅在日历匹配的日期生效。" + }, + "is_off": { + "type": "boolean", + "description": "为 true 时匹配日历中的休息日。" + } + } + }, + "description": "可选的周期性生效时间窗口。" + }, + "filters": { + "type": "array", + "description": "或-与组合条件树。每个外层元素为一组 AND 条件,组内所有条件需同时满足。", + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "字段键(如 `alert_severity`、`labels.service`)。" + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "过滤运算符。" + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "匹配值列表。" + } + } + } + } + } + } + }, + "CreateIncidentRequest": { + "type": "object", + "description": "手动创建故障所需的参数。", + "required": [ + "incident_severity" + ], + "properties": { + "incident_severity": { + "type": "string", + "enum": [ + "Info", + "Warning", + "Critical" + ], + "description": "故障严重程度。" + }, + "title": { + "type": "string", + "maxLength": 512, + "description": "故障标题,最多 512 个字符。" + }, + "description": { + "type": "string", + "maxLength": 1024, + "description": "故障描述,最多 1024 个字符。" + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "归属的协作空间 ID,留空表示独立故障。" + }, + "assigned_to": { + "type": "object", + "description": "故障处理人员指派目标。`person_ids` 与 `escalate_rule_id` 至少设置一项。", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "minItems": 1, + "maxItems": 100, + "description": "直接指派的成员 ID 列表。" + }, + "escalate_rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "按分派策略指派时使用的策略 ID(MongoDB ObjectID)。" + }, + "layer_idx": { + "type": "integer", + "description": "使用分派策略时的起始环节索引。" + }, + "type": { + "type": "string", + "description": "指派类型。" + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "minItems": 1, + "maxItems": 100, + "description": "邮箱接收人列表,用于 ServiceNow 等外部系统。" + }, + "notify": { + "type": "object", + "description": "为本次指派覆盖的通知渠道。", + "properties": { + "follow_preference": { + "type": "boolean", + "description": "为 true 时跟随处理人员的个人偏好。" + }, + "personal_channels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "使用的通知渠道(如 `voice`、`sms`、`email`)。" + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "通知模板 ID(MongoDB ObjectID)。" + } + } + } + } + } + } + }, + "CreateIncidentResponse": { + "type": "object", + "description": "手动创建故障的返回结果。", + "required": [ + "incident_id", + "title" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "新建故障的 ID(MongoDB ObjectID)。" + }, + "title": { + "type": "string", + "description": "回显请求中传入的故障标题。" + } + } + }, + "CreateInhibitRuleRequest": { + "type": "object", + "description": "创建抑制策略所需的参数。", + "required": [ + "channel_id", + "rule_name", + "equals" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID。" + }, + "priority": { + "type": "integer", + "description": "匹配优先级,数值越小越优先。" + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "策略名称,1 到 39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "策略描述,最多 500 个字符。" + }, + "equals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "用于匹配源告警与目标告警的 label 键列表。" + }, + "source_filters": { + "type": "array", + "description": "或-与组合条件树。每个外层元素为一组 AND 条件,组内所有条件需同时满足。", + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "字段键(如 `alert_severity`、`labels.service`)。" + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "过滤运算符。" + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "匹配值列表。" + } + } + } + } + }, + "target_filters": { + "type": "array", + "description": "或-与组合条件树。每个外层元素为一组 AND 条件,组内所有条件需同时满足。", + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "字段键(如 `alert_severity`、`labels.service`)。" + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "过滤运算符。" + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "匹配值列表。" + } + } + } + } + }, + "is_directly_discard": { + "type": "boolean", + "description": "为 true 时被抑制的目标告警将直接丢弃而非合并。" + } + } + }, + "CreateSilenceRuleRequest": { + "type": "object", + "description": "创建静默策略所需的参数。`time_filter` 与 `time_filters` 必须且只能设置其一,`filters` 不能为空。", + "required": [ + "channel_id", + "rule_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID。" + }, + "priority": { + "type": "integer", + "description": "匹配优先级,数值越小越优先。" + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "策略名称,1 到 39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "策略描述,最多 500 个字符。" + }, + "from_incident_id": { + "type": "string", + "description": "当静默策略从故障创建时对应的源故障 ID。" + }, + "time_filters": { + "type": "array", + "items": { + "type": "object", + "description": "周期性时间窗口。`start`/`end` 使用 24 小时制 `HH:MM` 格式;`repeat` 使用星期索引(0=周日 … 6=周六)。", + "properties": { + "start": { + "type": "string", + "description": "窗口起始时间,`HH:MM`。" + }, + "end": { + "type": "string", + "description": "窗口结束时间,`HH:MM`。" + }, + "repeat": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "生效的星期列表,留空表示每天。" + }, + "cal_id": { + "type": "string", + "description": "可选日历 ID,限制窗口仅在日历匹配的日期生效。" + }, + "is_off": { + "type": "boolean", + "description": "为 true 时匹配日历中的休息日。" + } + } + }, + "description": "生效的周期性时间窗口列表,与 `time_filter` 互斥。" + }, + "time_filter": { + "type": "object", + "description": "一次性时间窗口,使用 Unix 秒定义。", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "窗口起始时间戳(Unix 秒),需小于 `end_time`。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "窗口结束时间戳(Unix 秒)。" + } + } + }, + "filters": { + "type": "array", + "description": "或-与组合条件树。每个外层元素为一组 AND 条件,组内所有条件需同时满足。", + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "字段键(如 `alert_severity`、`labels.service`)。" + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "过滤运算符。" + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "匹配值列表。" + } + } + } + } + }, + "is_directly_discard": { + "type": "boolean", + "description": "为 true 时被静默的告警将直接丢弃而非并入故障。" + } + } + }, + "CreateStatusPageChangeRequest": { + "type": "object", + "description": "创建状态页故障或维护事件所需的参数。首条更新必须包含 `component_changes` 以声明受影响组件;回溯事件至少需要 2 条更新。", + "required": [ + "page_id", + "type", + "title", + "status", + "updates" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "状态页 ID。" + }, + "type": { + "type": "string", + "enum": [ + "incident", + "maintenance" + ], + "description": "事件类型。" + }, + "title": { + "type": "string", + "maxLength": 255, + "description": "事件标题,最多 255 个字符。" + }, + "description": { + "type": "string", + "description": "事件描述(支持 Markdown),必填。" + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "事件初始状态。故障事件支持 `investigating`/`identified`/`monitoring`/`resolved`;维护事件支持 `scheduled`/`ongoing`/`completed`。" + }, + "start_at_seconds": { + "type": "integer", + "format": "int64", + "description": "事件开始时间(Unix 秒)。留空时默认为当前时间。" + }, + "responders": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "事件负责成员 ID 列表。" + }, + "linked_changes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "关联的事件 ID 列表(相关故障、发布等)。" + }, + "close_at_seconds": { + "type": "integer", + "format": "int64", + "description": "回溯事件的结束时间,需大于 `start_at_seconds`。" + }, + "updates": { + "type": "array", + "items": { + "type": "object", + "description": "时间线更新条目。", + "properties": { + "update_id": { + "type": "string", + "description": "更新 ID。创建时由服务端生成;回溯历史更新时可手动指定。" + }, + "at_seconds": { + "type": "integer", + "format": "int64", + "description": "更新时间戳(Unix 秒)。" + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "更新后的事件状态。若整体状态未变化可省略。" + }, + "description": { + "type": "string", + "description": "更新说明(支持 Markdown)。" + }, + "component_changes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "component_id", + "status" + ], + "properties": { + "component_id": { + "type": "string", + "description": "组件 ID。" + }, + "status": { + "type": "string", + "enum": [ + "operational", + "degraded", + "partial_outage", + "full_outage", + "under_maintenance" + ], + "description": "组件新状态。故障事件支持 `operational`/`degraded`/`partial_outage`/`full_outage`;维护事件支持 `operational`/`under_maintenance`。" + } + } + }, + "description": "本次更新应用的组件状态变更。" + } + } + }, + "description": "时间线更新列表。即时事件一般只传一条;回溯事件需传入全部历史更新。" + }, + "notify_subscribers": { + "type": "boolean", + "description": "是否通知订阅者本事件及其所有更新。" + }, + "auto_update_by_schedule": { + "type": "boolean", + "description": "仅维护事件:根据计划窗口自动推进状态。" + }, + "is_retrospective": { + "type": "boolean", + "description": "标记为回溯(历史)事件。" + } + } + }, + "CreateStatusPageChangeTimelineRequest": { + "type": "object", + "description": "向状态页事件时间线追加一条更新所需的参数。", + "required": [ + "page_id", + "change_id", + "status" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "状态页 ID。" + }, + "change_id": { + "type": "integer", + "format": "int64", + "description": "目标事件 ID。" + }, + "at_seconds": { + "type": "integer", + "format": "int64", + "description": "更新时间戳(Unix 秒),留空时默认为当前时间。" + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "更新后的事件状态,需与事件类型匹配。当状态切换为 `resolved` 或 `completed` 时,所有关联组件必须恢复为 `operational`。" + }, + "description": { + "type": "string", + "description": "更新说明(支持 Markdown),必填。" + }, + "component_changes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "component_id", + "status" + ], + "properties": { + "component_id": { + "type": "string", + "description": "组件 ID。" + }, + "status": { + "type": "string", + "enum": [ + "operational", + "degraded", + "partial_outage", + "full_outage", + "under_maintenance" + ], + "description": "组件新状态。故障事件支持 `operational`/`degraded`/`partial_outage`/`full_outage`;维护事件支持 `operational`/`under_maintenance`。" + } + } + }, + "description": "本次更新应用的组件状态变更。组件 ID 不能重复。" + } + } + }, + "CreateWarRoomRequest": { + "type": "object", + "description": "为故障开启 IM 作战室所需的参数。", + "required": [ + "incident_id", + "integration_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "IM 集成 ID。需开启作战室能力;当前支持飞书、钉钉、企业自建企业微信、Slack 与 Teams。" + }, + "member_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "额外加入作战室的成员 ID 列表。" + }, + "add_observers": { + "type": "boolean", + "description": "为 true 时同时将历史处理人员加入作战室作为观察员。" + } + } + }, + "CsvFileResponse": { + "type": "string", + "description": "以附件形式返回的 CSV 文件内容。" + }, + "DeletePostMortemRequest": { + "type": "object", + "description": "删除复盘报告的参数。", + "required": [ + "post_mortem_id" + ], + "properties": { + "post_mortem_id": { + "type": "string", + "description": "复盘报告 ID。" + } + } + }, + "DeleteStatusPageChangeRequest": { + "type": "object", + "description": "删除状态页事件所需的参数。", + "required": [ + "page_id", + "change_id" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "状态页 ID。" + }, + "change_id": { + "type": "integer", + "format": "int64", + "description": "目标事件 ID。" + } + } + }, + "DeleteStatusPageChangeTimelineRequest": { + "type": "object", + "description": "删除状态页事件时间线条目所需的参数。", + "required": [ + "page_id", + "change_id", + "update_id" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "状态页 ID。" + }, + "change_id": { + "type": "integer", + "format": "int64", + "description": "所属事件 ID。" + }, + "update_id": { + "type": "string", + "description": "要删除的时间线更新 ID。" + } + } + }, + "DeleteWarRoomRequest": { + "type": "object", + "description": "删除故障战情室的参数。", + "required": [ + "incident_id", + "integration_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "IM 集成 ID。" + } + } + }, + "DimensionInsightItem": { + "allOf": [ + { + "$ref": "#/components/schemas/MetricsBase" + }, + { + "type": "object", + "description": "按账户/团队/协作空间聚合的故障与告警指标。", + "properties": { + "total_incident_cnt": { + "type": "integer", + "format": "int64" + }, + "total_incidents_acknowledged": { + "type": "integer", + "format": "int64" + }, + "total_incidents_closed": { + "type": "integer", + "format": "int64" + }, + "total_incidents_auto_closed": { + "type": "integer", + "format": "int64" + }, + "total_incidents_manually_closed": { + "type": "integer", + "format": "int64" + }, + "total_incidents_timeout_closed": { + "type": "integer", + "format": "int64" + }, + "total_incidents_escalated": { + "type": "integer", + "format": "int64" + }, + "total_incidents_manually_escalated": { + "type": "integer", + "format": "int64" + }, + "total_incidents_timeout_escalated": { + "type": "integer", + "format": "int64" + }, + "total_incidents_reassigned": { + "type": "integer", + "format": "int64" + }, + "total_interruptions": { + "type": "integer", + "format": "int64" + }, + "total_notifications": { + "type": "integer", + "format": "int64" + }, + "total_engaged_seconds": { + "type": "integer", + "format": "int64" + }, + "total_seconds_to_ack": { + "type": "integer", + "format": "int64" + }, + "total_seconds_to_close": { + "type": "integer", + "format": "int64" + }, + "mean_seconds_to_ack": { + "type": "number", + "format": "double" + }, + "mean_seconds_to_close": { + "type": "number", + "format": "double" + }, + "noise_reduction_pct": { + "type": "number", + "format": "double" + }, + "acknowledgement_pct": { + "type": "number", + "format": "double" + }, + "total_alert_cnt": { + "type": "integer", + "format": "int64" + }, + "total_alert_event_cnt": { + "type": "integer", + "format": "int64" + } + } + } + ] + }, + "DimensionInsightResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DimensionInsightItem" + } + } + } + }, + "DisableIncidentMergeRequest": { + "type": "object", + "description": "禁用故障自动合并的参数。", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "description": "需禁用自动合并的故障 ID 列表。" + } + } + }, + "DoIncidentCustomActionRequest": { + "type": "object", + "description": "对故障执行自定义操作集成的参数。", + "required": [ + "incident_id", + "integration_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "自定义操作集成 ID,必须已启用且关联故障所在协作空间。" + } + } + }, + "DoIncidentCustomActionResponse": { + "type": "object", + "description": "自定义操作的执行结果。", + "properties": { + "message": { + "type": "string", + "description": "HTTP 调用失败时的错误信息,成功时不返回。" + } + } + }, + "DutyError": { + "type": "object", + "description": "响应结构中的错误 payload,仅在非 2xx 响应时出现。", + "properties": { + "code": { + "$ref": "#/components/schemas/ErrorCode" + }, + "message": { + "type": "string", + "description": "用户可读的错误描述,语言会跟随调用方的 Accept-Language。可能包含字段名、ID 等请求上下文。", + "example": "The specified parameter template_id is not valid." + } + }, + "required": [ + "code", + "message" + ] + }, + "EmptyObject": { + "type": "object", + "description": "空对象。当操作的成功信号就是不报错时,作为 `data` 返回。", + "additionalProperties": false + }, + "EmptyRequest": { + "type": "object", + "description": "无参数。", + "additionalProperties": false + }, + "EmptyResponse": { + "type": "object", + "description": "空响应体。成功时服务端返回 `data: null`。", + "properties": {} + }, + "EnrichFilter": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "description": "单个标签过滤条件。", + "properties": { + "key": { + "type": "string", + "description": "告警标签键。" + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "匹配操作符。`IN` 表示任一值匹配即通过;`NOTIN` 表示所有值均不匹配时通过。" + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "待匹配的值列表。" + } + } + }, + "EnrichRule": { + "type": "object", + "required": [ + "kind", + "settings" + ], + "description": "带可选条件的富化规则,包含特定类型配置。", + "properties": { + "kind": { + "type": "string", + "enum": [ + "extraction", + "composition", + "mapping", + "drop" + ], + "description": "规则类型。`extraction` 通过正则或 GJson 提取标签;`composition` 通过模板组合标签;`mapping` 通过映射规则或 API 查找填充标签;`drop` 删除标签。" + }, + "if": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnrichFilter" + }, + "description": "可选 AND 过滤条件列表,不匹配时跳过该规则。" + }, + "settings": { + "description": "与规则类型对应的配置,具体结构由 `kind` 字段决定。", + "discriminator": { + "propertyName": "kind", + "mapping": { + "extraction": "#/components/schemas/ErsExtraction", + "composition": "#/components/schemas/ErsComposition", + "mapping": "#/components/schemas/ErsMapping", + "drop": "#/components/schemas/ErsDrop" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/ErsExtraction" + }, + { + "$ref": "#/components/schemas/ErsComposition" + }, + { + "$ref": "#/components/schemas/ErsMapping" + }, + { + "$ref": "#/components/schemas/ErsDrop" + } + ] + } + } + }, + "EnrichmentInfoRequest": { + "type": "object", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "待查询富化规则的集成 ID,必须大于 0。" + } + } + }, + "EnrichmentItem": { + "type": "object", + "description": "集成的富化规则集。", + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "集成 ID。" + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnrichRule" + }, + "description": "有序富化规则列表。" + }, + "status": { + "type": "string", + "description": "规则集状态。" + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "最后更新者成员 ID。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "创建者成员 ID。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 时间戳(秒)。" + } + }, + "required": [ + "integration_id", + "rules", + "status", + "updated_by", + "creator_id", + "created_at", + "updated_at" + ] + }, + "EnrichmentListRequest": { + "type": "object", + "required": [ + "integration_ids" + ], + "properties": { + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "待查询的集成 ID 列表。" + } + } + }, + "EnrichmentListResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnrichmentItem" + }, + "description": "富化规则集列表。" + } + }, + "required": [ + "items" + ] + }, + "EnrichmentUpsertRequest": { + "type": "object", + "required": [ + "integration_id", + "rules" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "待配置富化规则的集成 ID。" + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnrichRule" + }, + "description": "富化规则有序列表,将原子替换现有全部规则。" + } + } + }, + "ErrorCode": { + "type": "string", + "description": "Flashduty 错误码枚举。每个失败响应的 `error.code` 都是下列稳定值之一,HTTP 状态码仅作参考。\n\n| 错误码 | HTTP | 含义 |\n|---|---|---|\n| `OK` | 200 | 保留值,正常错误响应不会返回。 |\n| `InvalidParameter` | 400 | 必填参数缺失或未通过校验。 |\n| `BadRequest` | 400 | 通用的 400 错误,通常是请求本身不合法。 |\n| `InvalidContentType` | 400 | 请求头 `Content-Type` 不是 `application/json`。 |\n| `ResourceNotFound` | 400 | 目标资源不存在。注意 HTTP 状态码是 400 而非 404(历史设计)。 |\n| `NoLicense` | 400 | 功能需要有效授权,但未找到可用的 license。 |\n| `ReferenceExist` | 400 | 该资源仍被其他实体引用,无法删除。 |\n| `Unauthorized` | 401 | `app_key` 缺失、无效或已过期。 |\n| `BalanceNotEnough` | 402 | 账户余额不足,无法执行需要计费的操作。 |\n| `AccessDenied` | 403 | 身份认证通过,但 RBAC 权限不足以执行该操作。 |\n| `RouteNotFound` | 404 | 请求的 URL 路径不是已知路由。 |\n| `MethodNotAllowed` | 405 | 当前路径不接受所使用的 HTTP 方法。 |\n| `UndonedOrderExist` | 409 | 账户存在未完成的订单,请稍后重试。 |\n| `RequestLocked` | 423 | 因连续失败被临时锁定。 |\n| `EntityTooLarge` | 413 | 请求体超过允许的最大长度。 |\n| `RequestTooFrequently` | 429 | 命中限流(全局、账户级或集成级)。 |\n| `RequestVerifyRequired` | 428 | 操作需要二次验证码,但未提供。 |\n| `DangerousOperation` | 428 | 危险操作,需要进行 MFA 验证。 |\n| `InternalError` | 500 | 服务端未预期错误。反馈问题请附上 `request_id`。 |\n| `ServiceUnavailable` | 503 | 后端依赖不可用,请稍后重试。 |", + "enum": [ + "OK", + "InvalidParameter", + "BadRequest", + "InvalidContentType", + "ResourceNotFound", + "NoLicense", + "ReferenceExist", + "Unauthorized", + "BalanceNotEnough", + "AccessDenied", + "RouteNotFound", + "MethodNotAllowed", + "UndonedOrderExist", + "RequestLocked", + "EntityTooLarge", + "RequestTooFrequently", + "RequestVerifyRequired", + "DangerousOperation", + "InternalError", + "ServiceUnavailable" + ], + "x-enumDescriptions": { + "OK": "保留值,正常错误响应不会返回。", + "InvalidParameter": "必填参数缺失或未通过校验。", + "BadRequest": "通用的 400 错误,通常是请求本身不合法。", + "InvalidContentType": "请求头 `Content-Type` 不是 `application/json`。", + "ResourceNotFound": "目标资源不存在。注意 HTTP 状态码是 400 而非 404(历史设计)。", + "NoLicense": "功能需要有效授权,但未找到可用的 license。", + "ReferenceExist": "该资源仍被其他实体引用,无法删除。", + "Unauthorized": "`app_key` 缺失、无效或已过期。", + "BalanceNotEnough": "账户余额不足,无法执行需要计费的操作。", + "AccessDenied": "身份认证通过,但 RBAC 权限不足以执行该操作。", + "RouteNotFound": "请求的 URL 路径不是已知路由。", + "MethodNotAllowed": "当前路径不接受所使用的 HTTP 方法。", + "UndonedOrderExist": "账户存在未完成的订单,请稍后重试。", + "RequestLocked": "因连续失败被临时锁定。", + "EntityTooLarge": "请求体超过允许的最大长度。", + "RequestTooFrequently": "命中限流(全局、账户级或集成级)。", + "RequestVerifyRequired": "操作需要二次验证码,但未提供。", + "DangerousOperation": "危险操作,需要进行 MFA 验证。", + "InternalError": "服务端未预期错误。反馈问题请附上 `request_id`。", + "ServiceUnavailable": "后端依赖不可用,请稍后重试。" + }, + "example": "InvalidParameter" + }, + "ErrorResponse": { + "type": "object", + "description": "错误响应结构。`error` 必填,`data` 不存在。", + "properties": { + "request_id": { + "type": "string", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "error": { + "$ref": "#/components/schemas/DutyError" + } + }, + "required": [ + "request_id", + "error" + ] + }, + "ErsComposition": { + "type": "object", + "title": "composition", + "required": [ + "result_label", + "template" + ], + "properties": { + "result_label": { + "type": "string", + "description": "写入组合值的目标标签键,须符合 `^[a-z][a-z0-9_]{0,62}$`。" + }, + "template": { + "type": "string", + "maxLength": 500, + "description": "Go `text/template` 字符串,可引用告警字段 `{{.title}}`、`{{.description}}`、`{{.labels.key}}`。示例:`{{.labels.region}}-{{.labels.env}}`。" + }, + "override": { + "type": "boolean", + "description": "为 `true` 时若标签已存在则覆盖,默认为 `false`。" + } + } + }, + "ErsDrop": { + "type": "object", + "title": "drop", + "required": [ + "drop_labels" + ], + "properties": { + "drop_labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "待从告警中删除的标签键列表。" + } + } + }, + "ErsExtraction": { + "type": "object", + "title": "extraction", + "required": [ + "source_field", + "result_label" + ], + "properties": { + "source_field": { + "type": "string", + "description": "待提取的源字段。可为 `title`、`description` 或以 `labels.` 为前缀的标签键(如 `labels.env`)。" + }, + "result_label": { + "type": "string", + "description": "写入提取值的目标标签键,须符合 `^[a-z][a-z0-9_]{0,62}$`。" + }, + "pattern": { + "type": "string", + "description": "RE2 正则表达式。使用命名捕获组 `(?P...)` 提取子匹配;无命名组时取全匹配。与 `g_json` 互斥。" + }, + "g_json": { + "type": "string", + "description": "GJson 路径表达式,用于从 JSON 编码的字段中提取值。与 `pattern` 互斥。" + }, + "override": { + "type": "boolean", + "description": "为 `true` 时若标签已存在则覆盖,默认为 `false`。" + } + } + }, + "ErsMapping": { + "type": "object", + "title": "mapping", + "required": [ + "result_labels" + ], + "properties": { + "result_labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "从映射查找结果中填充的目标标签键列表。" + }, + "mapping_type": { + "type": "string", + "enum": [ + "schema", + "api" + ], + "default": "schema", + "description": "映射来源类型。`schema` 使用映射规则表;`api` 调用外部 HTTP API。" + }, + "schema_id": { + "type": "string", + "description": "映射规则 ID(MongoDB ObjectID 十六进制)。`mapping_type` 为 `schema` 时必填。" + }, + "api_id": { + "type": "string", + "description": "映射 API ID(MongoDB ObjectID 十六进制)。`mapping_type` 为 `api` 时必填。" + }, + "override": { + "type": "boolean", + "description": "为 `true` 时若标签已存在则覆盖,默认为 `false`。" + } + } + }, + "EscalateLayer": { + "type": "object", + "required": [ + "target" + ], + "properties": { + "max_times": { + "type": "integer", + "minimum": 0, + "maximum": 6, + "description": "当前环节内的最大重复通知次数。" + }, + "notify_step": { + "type": "number", + "format": "float", + "minimum": 0.5, + "maximum": 120, + "description": "重复通知间隔,单位分钟。" + }, + "target": { + "$ref": "#/components/schemas/EscalateTarget" + }, + "escalate_window": { + "type": "integer", + "minimum": 0, + "maximum": 720, + "description": "进入下一环节前的等待时间,单位分钟。" + }, + "force_escalate": { + "type": "boolean", + "description": "为 true 时无论是否认领都强制升级。" + } + } + }, + "EscalateRuleItem": { + "type": "object", + "required": [ + "account_id", + "channel_id", + "priority", + "aggr_window", + "rule_name", + "description", + "layers", + "time_filters", + "filters", + "status", + "template_id", + "rule_id", + "updated_by", + "created_at", + "updated_at" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "所属账户 ID。" + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID。" + }, + "priority": { + "type": "integer", + "description": "匹配优先级,数值越小越优先。" + }, + "aggr_window": { + "type": "integer", + "description": "聚合窗口,单位秒。" + }, + "rule_name": { + "type": "string", + "description": "策略名称。" + }, + "description": { + "type": "string", + "description": "策略描述。" + }, + "layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EscalateLayer" + }, + "description": "分派环节列表。" + }, + "time_filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimeFilter" + }, + "description": "策略生效的周期性时间窗口。" + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "策略状态。" + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "通知模板 ID(MongoDB ObjectID)。" + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "分派策略 ID(MongoDB ObjectID)。" + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "最近更新该策略的成员 ID。" + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "删除时间(Unix 秒),仅软删除时返回。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间(Unix 秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最近更新时间(Unix 秒)。" + }, + "channel_name": { + "type": "string", + "description": "协作空间名称,跨空间列表响应会填充该字段。" + } + } + }, + "EscalateTarget": { + "type": "object", + "description": "通知目标。`person_ids`、`team_ids`、`schedule_to_role_ids`、`emails` 至少设置一项,且 `by` 与 `webhooks` 至少设置一项。", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "直接通知的成员 ID 列表。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "通知的团队 ID 列表。" + }, + "schedule_to_role_ids": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "description": "值班表 ID 到角色 ID 列表的映射,用于按值班角色通知。" + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "description": "邮箱地址列表(推送场景)。" + }, + "by": { + "type": "object", + "description": "按告警等级配置的个人通知渠道。未提供 `webhooks` 时必填。", + "properties": { + "follow_preference": { + "type": "boolean", + "description": "为 true 时跟随处理人员的个人偏好,忽略下方列表。" + }, + "critical": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Critical 级别使用的通知渠道(如 `voice`、`sms`、`email`、`feishu`)。" + }, + "warning": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Warning 级别使用的通知渠道。" + }, + "info": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Info 级别使用的通知渠道。" + } + } + }, + "webhooks": { + "type": "array", + "description": "群聊/Webhook 通知目标。未提供 `by` 时必填。", + "items": { + "type": "object", + "required": [ + "type", + "settings" + ], + "properties": { + "type": { + "type": "string", + "description": "Webhook 类型(如 `feishu`、`dingtalk_app`、`wecom_app`、`slack`、`teams`、`custom`)。" + }, + "settings": { + "type": "object", + "additionalProperties": true, + "description": "类型相关的配置参数(群聊 ID、URL 等)。" + } + } + } + } + } + }, + "ExportStatusPageSubscribersRequest": { + "type": "object", + "description": "导出状态页订阅者列表所需的参数。", + "required": [ + "page_id" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "状态页 ID。" + }, + "component_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "可选:按组件 ID 过滤订阅者。" + } + } + }, + "ExportedStatusPageSubscriberItem": { + "type": "object", + "description": "状态页订阅者,供订阅者列表和导出接口返回。", + "required": [ + "recipient", + "method", + "components", + "all" + ], + "properties": { + "recipient": { + "type": "string", + "description": "订阅接收方:公开状态页为邮箱地址,内部状态页为用户 ID。" + }, + "method": { + "type": "string", + "enum": [ + "email", + "im" + ], + "description": "订阅通知方式。" + }, + "components": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusPageComponentItem" + }, + "description": "该订阅者订阅的组件列表。" + }, + "all": { + "type": "boolean", + "description": "是否订阅全部组件。" + }, + "locale": { + "type": "string", + "description": "通知的首选语言。" + } + } + }, + "FeedDetailAlertClose": { + "type": "object", + "description": "`a_close` 的详情数据,无字段。", + "properties": {}, + "additionalProperties": false, + "title": "a_close" + }, + "FeedDetailAlertComment": { + "type": "object", + "description": "`a_comm` 的详情数据。", + "properties": { + "comment": { + "type": "string", + "description": "评论内容。" + } + }, + "title": "a_comm" + }, + "FeedDetailAlertTrigger": { + "type": "object", + "description": "`a_new` 的详情数据。", + "properties": { + "severity": { + "$ref": "#/components/schemas/FeedSeverity" + }, + "status": { + "$ref": "#/components/schemas/FeedSeverity" + } + }, + "title": "a_new" + }, + "FeedDetailIncidentAck": { + "type": "object", + "description": "`i_ack` 的 detail 载荷。", + "properties": { + "progress": { + "type": "string", + "description": "认领时记录的处理进展。" + } + }, + "title": "i_ack" + }, + "FeedDetailIncidentAddRspd": { + "type": "object", + "description": "`i_a_rspd` 的 detail 载荷。", + "properties": { + "to": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "新增为响应人的成员 ID 列表。" + } + }, + "title": "i_a_rspd" + }, + "FeedDetailIncidentAssign": { + "type": "object", + "description": "`i_assign` 的 detail 载荷。在 `AssignedTo` 基础上附加目标成员 ID 列表。", + "allOf": [ + { + "$ref": "#/components/schemas/AssignedTo" + }, + { + "type": "object", + "properties": { + "to": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "被分派的成员 ID 列表。" + } + } + } + ], + "title": "i_assign" + }, + "FeedDetailIncidentAutoRefreshCard": { + "type": "object", + "description": "`i_auto_refresh` 的 detail 载荷,无字段。", + "properties": {}, + "additionalProperties": false, + "title": "i_auto_refresh" + }, + "FeedDetailIncidentComment": { + "type": "object", + "description": "`i_comm` 的 detail 载荷。", + "properties": { + "comment": { + "type": "string", + "description": "评论正文。" + }, + "mute_reply": { + "type": "boolean", + "description": "是否静音该评论的回复。" + } + }, + "title": "i_comm" + }, + "FeedDetailIncidentCustomAction": { + "type": "object", + "description": "`i_custom` 的 detail 载荷。", + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "执行动作的集成 ID。" + }, + "integration_name": { + "type": "string", + "description": "集成显示名称。" + } + }, + "title": "i_custom" + }, + "FeedDetailIncidentMerge": { + "type": "object", + "description": "`i_merge` 的 detail 载荷。", + "properties": { + "comment": { + "type": "string", + "description": "合并时的评论。" + }, + "source_incidents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentShort" + }, + "description": "被合并的源故障列表。" + }, + "target_incident": { + "$ref": "#/components/schemas/IncidentShort" + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "执行合并操作的成员 ID。" + }, + "title": { + "type": "string", + "description": "合并后的故障标题。" + }, + "remove_source_incidents": { + "type": "boolean", + "description": "合并后是否移除源故障。" + }, + "source_responders": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "从源故障继承的响应人成员 ID 列表。" + } + }, + "title": "i_merge" + }, + "FeedDetailIncidentMuteByFlapping": { + "type": "object", + "description": "`i_m_flapping` 的 detail 载荷。", + "properties": { + "max_changes": { + "type": "integer", + "description": "窗口内允许的最大状态变化次数。" + }, + "in_mins": { + "type": "integer", + "description": "统计窗口长度(分钟)。" + }, + "mute_mins": { + "type": "integer", + "description": "触发抖动检测后的静音时长(分钟)。" + } + }, + "title": "i_m_flapping" + }, + "FeedDetailIncidentMuteReply": { + "type": "object", + "description": "`i_m_reply` 的 detail 载荷,无字段。", + "properties": {}, + "additionalProperties": false, + "title": "i_m_reply" + }, + "FeedDetailIncidentNew": { + "type": "object", + "description": "`i_new` 的 detail 载荷。", + "properties": { + "severity": { + "$ref": "#/components/schemas/FeedSeverity" + }, + "title": { + "type": "string", + "description": "故障初始标题。" + }, + "reporter_email": { + "type": "string", + "description": "外部创建故障时的上报人邮箱。" + } + }, + "title": "i_new" + }, + "FeedDetailIncidentNotify": { + "type": "object", + "description": "`i_notify` 的 detail 载荷。", + "required": [ + "layer_idx" + ], + "properties": { + "rid": { + "type": "string", + "description": "通知记录 ID。" + }, + "msg_id": { + "type": "string", + "description": "投递渠道返回的上游消息 ID。" + }, + "fire_type": { + "type": "string", + "enum": [ + "fire", + "refire" + ], + "description": "首次触发或再次触发。" + }, + "escalate_rule_name": { + "type": "string", + "description": "分派策略名称。" + }, + "escalate_rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "分派策略 ID(MongoDB ObjectID)。" + }, + "layer_idx": { + "type": "integer", + "description": "本次通知所处的环节索引。" + }, + "by": { + "type": "string", + "description": "投递渠道或方式标签。" + }, + "persons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotifyPerson" + }, + "description": "个人投递记录。" + }, + "chats": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotifyChat" + }, + "description": "群聊投递记录。" + }, + "robots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotifyRobot" + }, + "description": "机器人投递记录。" + } + }, + "title": "i_notify" + }, + "FeedDetailIncidentReopen": { + "type": "object", + "description": "`i_reopen` 的 detail 载荷。", + "properties": { + "reason": { + "type": "string", + "description": "重新打开故障的原因。" + } + }, + "title": "i_reopen" + }, + "FeedDetailIncidentResetDescription": { + "type": "object", + "description": "`i_r_desc` 的 detail 载荷,无字段。", + "properties": {}, + "additionalProperties": false, + "title": "i_r_desc" + }, + "FeedDetailIncidentResetField": { + "type": "object", + "description": "`i_r_field` 的 detail 载荷。", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string", + "description": "被更新的自定义字段名称。" + }, + "to": { + "description": "自定义字段的新值,类型取决于字段定义。" + } + }, + "title": "i_r_field" + }, + "FeedDetailIncidentResetImpact": { + "type": "object", + "description": "`i_r_impact` 的 detail 载荷,无字段。", + "properties": {}, + "additionalProperties": false, + "title": "i_r_impact" + }, + "FeedDetailIncidentResetResolution": { + "type": "object", + "description": "`i_r_rsltn` 的 detail 载荷,无字段。", + "properties": {}, + "additionalProperties": false, + "title": "i_r_rsltn" + }, + "FeedDetailIncidentResetRootCause": { + "type": "object", + "description": "`i_r_rc` 的 detail 载荷,无字段。", + "properties": {}, + "additionalProperties": false, + "title": "i_r_rc" + }, + "FeedDetailIncidentResetSeverity": { + "type": "object", + "description": "`i_r_severity` 的 detail 载荷。", + "properties": { + "from": { + "$ref": "#/components/schemas/FeedSeverity" + }, + "to": { + "$ref": "#/components/schemas/FeedSeverity" + } + }, + "title": "i_r_severity" + }, + "FeedDetailIncidentResetTitle": { + "type": "object", + "description": "`i_r_title` 的 detail 载荷。", + "properties": { + "from": { + "type": "string", + "description": "变更前的标题。" + }, + "to": { + "type": "string", + "description": "变更后的标题。" + } + }, + "title": "i_r_title" + }, + "FeedDetailIncidentResolve": { + "type": "object", + "description": "`i_rslv` 的 detail 载荷。", + "required": [ + "from" + ], + "properties": { + "from": { + "type": "string", + "enum": [ + "voice", + "console", + "card", + "wcard", + "event", + "autorslv", + "autorefresh", + "escalation" + ], + "description": "触发恢复操作的来源。" + } + }, + "title": "i_rslv" + }, + "FeedDetailIncidentSnooze": { + "type": "object", + "description": "`i_snooze` 的 detail 载荷。", + "properties": { + "minutes": { + "type": "integer", + "format": "int64", + "description": "暂停时长(分钟)。" + } + }, + "title": "i_snooze" + }, + "FeedDetailIncidentStorm": { + "type": "object", + "description": "`i_storm` 的 detail 载荷。", + "properties": { + "threshold": { + "type": "integer", + "description": "触发的风暴阈值。" + } + }, + "title": "i_storm" + }, + "FeedDetailIncidentUnack": { + "type": "object", + "description": "`i_unack` 的 detail 载荷。", + "properties": { + "progress": { + "type": "string", + "description": "取消认领时记录的处理进展。" + } + }, + "title": "i_unack" + }, + "FeedDetailIncidentWake": { + "type": "object", + "description": "`i_wake` 的 detail 载荷。", + "properties": { + "snoozedBefore": { + "type": "integer", + "format": "int64", + "description": "原本计划结束暂停的 Unix 时间戳。" + } + }, + "title": "i_wake" + }, + "FeedDetailIncidentWarRoomCreate": { + "type": "object", + "description": "`i_wr_create` 的 detail 载荷。", + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "承载作战室群聊的集成 ID。" + }, + "chat_id": { + "type": "string", + "description": "群聊 ID。" + }, + "chat_name": { + "type": "string", + "description": "群聊显示名称。" + }, + "plugin_type": { + "type": "string", + "description": "聊天集成插件类型。" + }, + "integration_name": { + "type": "string", + "description": "集成显示名称。" + }, + "share_link": { + "type": "string", + "description": "作战室的可分享加入链接。" + } + }, + "title": "i_wr_create" + }, + "FeedDetailIncidentWarRoomDelete": { + "type": "object", + "description": "`i_wr_delete` 的 detail 载荷。", + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "承载作战室群聊的集成 ID。" + }, + "chat_id": { + "type": "string", + "description": "群聊 ID。" + }, + "chat_name": { + "type": "string", + "description": "群聊显示名称。" + }, + "plugin_type": { + "type": "string", + "description": "聊天集成插件类型。" + }, + "integration_name": { + "type": "string", + "description": "集成显示名称。" + } + }, + "title": "i_wr_delete" + }, + "FeedItem": { + "type": "object", + "description": "单条告警动态记录。`detail` 字段依 `type` 判别;具体结构参见各 `FeedDetailAlert*` schema。", + "required": [ + "ref_id", + "type", + "detail", + "account_id", + "creator_id", + "created_at", + "updated_at" + ], + "properties": { + "ref_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "本条记录引用的告警 ObjectID。" + }, + "type": { + "$ref": "#/components/schemas/AlertFeedType" + }, + "detail": { + "description": "类型特定的详情数据,结构依 `type` 而定。", + "oneOf": [ + { + "$ref": "#/components/schemas/FeedDetailAlertTrigger" + }, + { + "$ref": "#/components/schemas/FeedDetailAlertComment" + }, + { + "$ref": "#/components/schemas/FeedDetailAlertClose" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "a_new": "#/components/schemas/FeedDetailAlertTrigger", + "a_comm": "#/components/schemas/FeedDetailAlertComment", + "a_close": "#/components/schemas/FeedDetailAlertClose" + } + } + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "账户 ID。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "创建者成员 ID。系统生成的记录为 0。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 毫秒时间戳。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 毫秒时间戳。" + } + } + }, + "FeedSeverity": { + "type": "string", + "enum": [ + "Ok", + "Critical", + "Warning", + "Info" + ], + "description": "严重等级。" + }, + "FilterCondition": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "过滤字段名。内置告警字段使用字段名(如 `alert_severity`、`alert_key`、`check`、`resource`、`service`、`cluster`),自定义标签使用 `labels.` 前缀(如 `labels.env`、`labels.region`)。" + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "过滤操作符。`IN`:值必须匹配 `vals` 中的某一项;`NOTIN`:值不能匹配 `vals` 中任何一项。支持 `/pattern/` 格式的正则表达式。" + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "匹配值列表。每一项为普通字符串或 `/regex/` 正则模式。" + } + } + }, + "FilterGroup": { + "$ref": "#/components/schemas/OrFilterGroup" + }, + "Flapping": { + "type": "object", + "description": "抖动检测配置。", + "properties": { + "is_disabled": { + "type": "boolean", + "description": "禁用抖动检测。" + }, + "max_changes": { + "type": "integer", + "minimum": 2, + "maximum": 100, + "description": "`in_mins` 内允许的最大状态变更次数。" + }, + "in_mins": { + "type": "integer", + "minimum": 1, + "maximum": 1440, + "description": "观察窗口,单位分钟。" + }, + "mute_mins": { + "type": "integer", + "minimum": 0, + "maximum": 1440, + "description": "检测到抖动后的静音时长,单位分钟。" + } + } + }, + "GetWarRoomDetailRequest": { + "type": "object", + "description": "获取战情室实时详情的参数。", + "required": [ + "integration_id", + "chat_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "托管该战情室的 IM 集成 ID。" + }, + "chat_id": { + "type": "string", + "description": "IM 侧的群/会话 ID。" + } + } + }, + "GetWebhookHistoryDetailRequest": { + "type": "object", + "description": "获取单条 Webhook 推送详情的参数。", + "required": [ + "event_id", + "integration_id" + ], + "properties": { + "event_id": { + "type": "string", + "description": "由 `ListWebhookHistory` 返回的事件 ID。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "事件所属的集成 ID。" + } + } + }, + "Group": { + "type": "object", + "description": "告警聚合配置。", + "required": [ + "method" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "i", + "p", + "n" + ], + "description": "聚合方式:`i` 智能、`p` 规则、`n` 不聚合。" + }, + "equals": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "maxItems": 5, + "description": "用于聚合判定的 label 键分组。" + }, + "cases": { + "type": "array", + "maxItems": 100, + "description": "按过滤条件的聚合策略覆盖。", + "items": { + "type": "object" + } + }, + "all_equals_required": { + "type": "boolean", + "description": "为 true 时要求所有键同时存在才能参与聚合。" + }, + "time_window": { + "type": "integer", + "minimum": 0, + "description": "聚合时间窗口,单位分钟。默认最大值为 1440 分钟(24 小时);开启扩展功能的账号最大可设置 43200 分钟(30 天)。" + }, + "window_type": { + "type": "string", + "enum": [ + "tumbling", + "sliding" + ], + "description": "窗口类型,默认 `tumbling`。" + }, + "storm_threshold": { + "type": "integer", + "minimum": 0, + "maximum": 10000, + "description": "告警风暴阈值。" + }, + "storm_thresholds": { + "type": "array", + "items": { + "type": "integer" + }, + "maxItems": 5, + "description": "多级告警风暴阈值。" + }, + "i_keys": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 10, + "description": "用于智能聚合向量化的 label 键。" + }, + "i_score_threshold": { + "type": "number", + "format": "float", + "minimum": 0.5, + "maximum": 1, + "description": "智能聚合相似度阈值。" + } + } + }, + "Image": { + "type": "object", + "description": "图片或附件引用。", + "required": [ + "src" + ], + "properties": { + "src": { + "type": "string", + "description": "图片来源,可以是 `img_` 上传 token 或 `http(s)` URL。" + }, + "href": { + "type": "string", + "description": "可选的图片跳转链接。" + }, + "alt": { + "type": "string", + "description": "替代文本。" + } + } + }, + "ImportStatusPageSubscriberItem": { + "type": "object", + "description": "单个待导入的订阅者。", + "required": [ + "recipient" + ], + "properties": { + "recipient": { + "type": "string", + "maxLength": 255, + "description": "邮箱地址(公开状态页)或用户 ID(内部状态页)。" + }, + "component_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "订阅者需要接收通知的组件 ID 列表。" + }, + "change_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "订阅者需要接收通知的特定事件 ID 列表。" + }, + "all": { + "type": "boolean", + "description": "为 true 时订阅所有组件。当 `component_ids` 与 `change_ids` 均为空时必须为 true。" + }, + "locale": { + "type": "string", + "description": "通知的首选语言。留空时使用请求语言。" + } + } + }, + "ImportStatusPageSubscribersRequest": { + "type": "object", + "description": "批量导入订阅者所需的参数。每个订阅者的 `recipient` 非空且不超过 255 字符;并且至少订阅一个组件/事件,或将 `all` 置为 true。", + "required": [ + "page_id", + "method" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "目标状态页 ID。" + }, + "method": { + "type": "string", + "enum": [ + "email", + "im" + ], + "description": "订阅通知方式。`email` 仅适用于公开状态页,`im` 仅适用于内部状态页。" + }, + "subscribers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportStatusPageSubscriberItem" + }, + "description": "要导入的订阅者列表。" + } + } + }, + "IncProgressCnts": { + "type": "object", + "required": [ + "Triggered", + "Processing" + ], + "properties": { + "Triggered": { + "type": "integer", + "format": "int64", + "description": "近 30 天触发中的故障数量。" + }, + "Processing": { + "type": "integer", + "format": "int64", + "description": "近 30 天处理中的故障数量。" + } + } + }, + "IncidentFeedItem": { + "type": "object", + "description": "单条故障时间线条目。`detail` 字段由 `type` 决定具体结构,详见各 `FeedDetail*` 结构。", + "required": [ + "ref_id", + "type", + "detail", + "account_id", + "creator_id", + "created_at", + "updated_at" + ], + "properties": { + "ref_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "引用对象 ObjectID,根据 type 不同可能指向故障或告警。" + }, + "type": { + "$ref": "#/components/schemas/IncidentFeedType" + }, + "detail": { + "description": "类型相关的负载,具体结构由 `type` 决定。", + "oneOf": [ + { + "$ref": "#/components/schemas/FeedDetailIncidentNew" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentAssign" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentAddRspd" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentNotify" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentStorm" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentSnooze" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentWake" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentAck" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentUnack" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentComment" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResolve" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentReopen" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentMerge" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetTitle" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetDescription" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetImpact" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetRootCause" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetResolution" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetSeverity" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetField" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentMuteByFlapping" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentMuteReply" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentCustomAction" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentWarRoomCreate" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentWarRoomDelete" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentAutoRefreshCard" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "i_new": "#/components/schemas/FeedDetailIncidentNew", + "i_assign": "#/components/schemas/FeedDetailIncidentAssign", + "i_a_rspd": "#/components/schemas/FeedDetailIncidentAddRspd", + "i_notify": "#/components/schemas/FeedDetailIncidentNotify", + "i_storm": "#/components/schemas/FeedDetailIncidentStorm", + "i_snooze": "#/components/schemas/FeedDetailIncidentSnooze", + "i_wake": "#/components/schemas/FeedDetailIncidentWake", + "i_ack": "#/components/schemas/FeedDetailIncidentAck", + "i_unack": "#/components/schemas/FeedDetailIncidentUnack", + "i_comm": "#/components/schemas/FeedDetailIncidentComment", + "i_rslv": "#/components/schemas/FeedDetailIncidentResolve", + "i_reopen": "#/components/schemas/FeedDetailIncidentReopen", + "i_merge": "#/components/schemas/FeedDetailIncidentMerge", + "i_r_title": "#/components/schemas/FeedDetailIncidentResetTitle", + "i_r_desc": "#/components/schemas/FeedDetailIncidentResetDescription", + "i_r_impact": "#/components/schemas/FeedDetailIncidentResetImpact", + "i_r_rc": "#/components/schemas/FeedDetailIncidentResetRootCause", + "i_r_rsltn": "#/components/schemas/FeedDetailIncidentResetResolution", + "i_r_severity": "#/components/schemas/FeedDetailIncidentResetSeverity", + "i_r_field": "#/components/schemas/FeedDetailIncidentResetField", + "i_m_flapping": "#/components/schemas/FeedDetailIncidentMuteByFlapping", + "i_m_reply": "#/components/schemas/FeedDetailIncidentMuteReply", + "i_custom": "#/components/schemas/FeedDetailIncidentCustomAction", + "i_wr_create": "#/components/schemas/FeedDetailIncidentWarRoomCreate", + "i_wr_delete": "#/components/schemas/FeedDetailIncidentWarRoomDelete", + "i_auto_refresh": "#/components/schemas/FeedDetailIncidentAutoRefreshCard" + } + } + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "账号 ID。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "操作人成员 ID,`0` 表示系统生成。" + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "软删除时间戳(毫秒),未删除时为 0。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间戳(毫秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间戳(毫秒)。" + } + } + }, + "IncidentFeedType": { + "type": "string", + "description": "故障时间线条目类型。每个值对应一个生命周期事件,其 `detail` 载荷结构由该字段决定。故障级事件前缀为 `i_`;向上冒泡到故障时间线的告警级事件前缀为 `a_`。\n\n| 类型 | 含义 |\n|---|---|\n| `i_new` | 故障创建:系统自动或人工创建了新故障。 |\n| `i_assign` | 分派响应人:故障被分派给指定人员处理。 |\n| `i_a_rspd` | 添加响应人:有新的响应人被加入处理。 |\n| `i_notify` | 通过某个渠道在指定环节发送通知。 |\n| `i_storm` | 故障触发告警风暴阈值。 |\n| `i_snooze` | 暂停通知指定时长。 |\n| `i_wake` | 取消暂停并恢复通知。 |\n| `i_ack` | 确认故障:响应人确认已开始处理故障。 |\n| `i_unack` | 取消认领。 |\n| `i_comm` | 添加评论:响应人记录了处理进展或关键信息。 |\n| `i_rslv` | 解决故障:故障被标记为已解决。 |\n| `i_reopen` | 重新打开:已解决的故障被重新打开,可能问题复发。 |\n| `i_merge` | 合并故障:多个相关故障被合并为一个。 |\n| `i_r_title` | 标题更新。 |\n| `i_r_desc` | 描述更新。 |\n| `i_r_impact` | 影响范围更新。 |\n| `i_r_rc` | 根因更新。 |\n| `i_r_rsltn` | 解决方案更新。 |\n| `i_r_severity` | 严重等级变更:故障的严重程度被调整。 |\n| `i_r_field` | 自定义字段值更新。 |\n| `i_m_flapping` | 因抖动检测被静默。 |\n| `i_m_reply` | 评论静音回复标记。 |\n| `i_custom` | 执行动作:触发了自动化操作或脚本。 |\n| `i_wr_create` | 创建作战室:建立了即时通讯群组用于协作处理。 |\n| `i_wr_delete` | 删除作战室群组。 |\n| `i_auto_refresh` | 卡片自动刷新事件。 |", + "enum": [ + "i_new", + "i_assign", + "i_a_rspd", + "i_notify", + "i_storm", + "i_snooze", + "i_wake", + "i_ack", + "i_unack", + "i_comm", + "i_rslv", + "i_reopen", + "i_merge", + "i_r_title", + "i_r_desc", + "i_r_impact", + "i_r_rc", + "i_r_rsltn", + "i_r_severity", + "i_r_field", + "i_m_flapping", + "i_m_reply", + "i_custom", + "i_wr_create", + "i_wr_delete", + "i_auto_refresh", + "a_merge" + ] + }, + "IncidentInfo": { + "type": "object", + "description": "故障详细信息。", + "required": [ + "incident_id", + "account_id", + "channel_id", + "integration_id", + "integration_ids", + "integration_types", + "dedup_key", + "equals_md5", + "start_time", + "end_time", + "last_time", + "ack_time", + "close_time", + "creator_id", + "closer_id", + "owner_id", + "incident_status", + "incident_severity", + "progress", + "title", + "description", + "ai_summary", + "impact", + "root_cause", + "resolution", + "num", + "created_at", + "updated_at", + "snoozed_before", + "group_method", + "ever_muted", + "labels", + "fields", + "assigned_to", + "alert_cnt", + "active_alert_cnt", + "alert_event_cnt", + "responders", + "account_name", + "account_locale", + "account_time_zone", + "channel_name", + "channel_status", + "detail_url", + "silence_url", + "post_mortem_id", + "images", + "manual_overrides" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "所属账号 ID。" + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "协作空间 ID,独立故障为 0。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "故障关联的首个集成 ID。" + }, + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "所有为此故障贡献告警的集成 ID。" + }, + "integration_types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "所有相关集成的类型。" + }, + "dedup_key": { + "type": "string", + "description": "合并告警时使用的去重键。" + }, + "equals_md5": { + "type": "string", + "description": "用于内容比对的 MD5 哈希。" + }, + "start_time": { + "type": "integer", + "format": "int64", + "description": "故障开始的 Unix 时间戳(秒)。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "故障结束的 Unix 时间戳(秒),仍活跃时为 0。" + }, + "last_time": { + "type": "integer", + "format": "int64", + "description": "最近一次更新的 Unix 时间戳(秒)。" + }, + "ack_time": { + "type": "integer", + "format": "int64", + "description": "首次认领的 Unix 时间戳(秒),未认领时为 0。" + }, + "close_time": { + "type": "integer", + "format": "int64", + "description": "关闭时间的 Unix 时间戳(秒),仍开启时为 0。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "创建者成员 ID,系统自动创建时为 0。" + }, + "closer_id": { + "type": "integer", + "format": "int64", + "description": "关闭者成员 ID,自动关闭时为 0。" + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "主负责人成员 ID,无则为 0。" + }, + "incident_status": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "当前故障状态,由告警状态推导。" + }, + "incident_severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "配置的故障严重程度。" + }, + "progress": { + "type": "string", + "enum": [ + "Triggered", + "Processing", + "Closed" + ], + "description": "故障进展状态。" + }, + "title": { + "type": "string", + "description": "故障标题。" + }, + "description": { + "type": "string", + "description": "故障描述。" + }, + "ai_summary": { + "type": "string", + "description": "AI 生成的故障摘要。" + }, + "impact": { + "type": "string", + "description": "影响范围描述。" + }, + "root_cause": { + "type": "string", + "description": "根因分析。" + }, + "resolution": { + "type": "string", + "description": "解决方案说明。" + }, + "num": { + "type": "string", + "description": "短标识,可能重复。" + }, + "frequency": { + "type": "string", + "description": "频率分布桶,用于分析故障发生模式:`frequent`(频繁)或 `rare`(偶发)。", + "enum": [ + "frequent", + "rare" + ] + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "软删除时间戳(秒),未删除时为 0。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间戳(秒)。" + }, + "snoozed_before": { + "type": "integer", + "format": "int64", + "description": "通知暂停截止时间(Unix 秒),0 表示未暂停。" + }, + "group_method": { + "type": "string", + "description": "构建故障时使用的告警聚合方法:`i` 智能聚合、`p` 规则聚合、`n` 不聚合。", + "enum": [ + "i", + "p", + "n" + ] + }, + "ever_muted": { + "type": "boolean", + "description": "该故障是否曾被静默。" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "从告警继承的标签。" + }, + "fields": { + "type": "object", + "additionalProperties": true, + "description": "自定义字段取值,按字段名索引。" + }, + "assigned_to": { + "$ref": "#/components/schemas/AssignedTo" + }, + "reporter_email": { + "type": "string", + "description": "手工创建故障时的上报者邮箱。" + }, + "alert_cnt": { + "type": "integer", + "format": "int64", + "description": "合并到此故障的告警总数。" + }, + "active_alert_cnt": { + "type": "integer", + "format": "int64", + "description": "当前处于 Critical/Warning/Info 状态的告警数量。" + }, + "alert_event_cnt": { + "type": "integer", + "format": "int64", + "description": "所有合并告警的原始事件总数。" + }, + "alerts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertInfo" + }, + "description": "关联告警列表,仅在通知模板与自定义动作中填充。" + }, + "closer": { + "$ref": "#/components/schemas/PersonShort", + "description": "关闭人信息。" + }, + "creator": { + "$ref": "#/components/schemas/PersonShort", + "description": "创建人信息。" + }, + "owner": { + "$ref": "#/components/schemas/PersonShort", + "description": "负责人信息,可能已废弃。", + "deprecated": true + }, + "responders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Responder" + }, + "description": "当前处理人员列表。" + }, + "account_name": { + "type": "string", + "description": "账号名称。" + }, + "account_locale": { + "type": "string", + "description": "账号语言。" + }, + "account_time_zone": { + "type": "string", + "description": "账号时区。" + }, + "channel_name": { + "type": "string", + "description": "协作空间名称。" + }, + "channel_status": { + "type": "string", + "description": "协作空间状态。" + }, + "detail_url": { + "type": "string", + "description": "前端详情页地址。" + }, + "silence_url": { + "type": "string", + "description": "快速静默页面地址。" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LinkItem" + }, + "description": "协作空间配置的链接集成。" + }, + "integration_type": { + "type": "string", + "description": "首个告警的集成类型,详情页用于标签映射。" + }, + "post_mortem_id": { + "type": "string", + "description": "关联的复盘报告 ID,一条故障只能关联一份复盘报告。" + }, + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Image" + }, + "description": "附加图片。" + }, + "manual_overrides": { + "type": "array", + "items": { + "type": "string" + }, + "description": "被手工覆盖过的字段名列表。" + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "已废弃。请使用 `integration_id`。", + "deprecated": true + }, + "data_source_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "已废弃。请使用 `integration_ids`。", + "deprecated": true + }, + "data_source_type": { + "type": "string", + "description": "已废弃。请使用 `integration_type`。", + "deprecated": true + }, + "data_source_types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "已废弃。请使用 `integration_types`。", + "deprecated": true + } + } + }, + "IncidentInfoRequest": { + "type": "object", + "description": "单个故障查询参数。", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + } + } + }, + "IncidentListResponse": { + "type": "object", + "description": "故障分页列表。", + "required": [ + "items", + "total", + "has_next_page" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentInfo" + }, + "description": "当前页故障列表。" + }, + "total": { + "type": "integer", + "format": "int64", + "description": "命中总数。" + }, + "has_next_page": { + "type": "boolean", + "description": "是否还有更多页。" + }, + "search_after_ctx": { + "type": "string", + "description": "下一页翻页游标。" + } + } + }, + "IncidentRawItem": { + "type": "object", + "description": "分析看板故障列表返回的原始故障记录,附带每条故障的处理效能指标。", + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "team_id": { + "type": "integer", + "format": "int64" + }, + "team_name": { + "type": "string" + }, + "channel_id": { + "type": "integer", + "format": "int64" + }, + "channel_name": { + "type": "string" + }, + "progress": { + "type": "string", + "description": "故障进度状态(如 `Triggered`、`Acknowledged`、`Closed`)。" + }, + "severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ] + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "closed_by": { + "type": "string", + "enum": [ + "auto", + "timeout", + "manually" + ] + }, + "seconds_to_ack": { + "type": "integer", + "format": "int64" + }, + "seconds_to_close": { + "type": "integer", + "format": "int64" + }, + "engaged_seconds": { + "type": "integer", + "format": "int64" + }, + "hours": { + "type": "string" + }, + "responders": { + "type": "array", + "items": { + "type": "object", + "description": "处理人员条目(结构详见故障模块)。" + } + }, + "assigned_to": { + "type": "object", + "description": "故障的当前分派目标。", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "直接分派给该故障的成员 ID 列表。" + }, + "escalate_rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "驱动分派的升级规则 ID(MongoDB ObjectID)。" + }, + "escalate_rule_name": { + "type": "string", + "description": "升级规则的显示名称。" + }, + "layer_idx": { + "type": "integer", + "description": "升级规则中的当前级别索引。" + }, + "type": { + "type": "string", + "enum": [ + "assign", + "reassign", + "escalate", + "reopen" + ], + "description": "分派类型。" + }, + "assigned_at": { + "type": "integer", + "format": "int64", + "description": "本次分派发生的时间戳(Unix 秒)。" + }, + "id": { + "type": "string", + "description": "内部分派记录 ID。" + } + } + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "fields": { + "type": "object", + "additionalProperties": true + }, + "notifications": { + "type": "integer", + "format": "int64" + }, + "interruptions": { + "type": "integer", + "format": "int64" + }, + "assignments": { + "type": "integer", + "format": "int64" + }, + "reassignments": { + "type": "integer", + "format": "int64" + }, + "acknowledgements": { + "type": "integer", + "format": "int64" + }, + "escalations": { + "type": "integer", + "format": "int64" + }, + "timeout_escalations": { + "type": "integer", + "format": "int64" + }, + "manual_escalations": { + "type": "integer", + "format": "int64" + }, + "creator_id": { + "type": "integer", + "format": "int64" + }, + "creator_name": { + "type": "string" + } + } + }, + "IncidentShort": { + "type": "object", + "description": "嵌入告警中的故障简要信息。", + "properties": { + "incident_id": { + "type": "string", + "description": "故障 ID(ObjectID 十六进制字符串)。" + }, + "title": { + "type": "string", + "description": "故障标题。" + }, + "progress": { + "type": "string", + "description": "故障处理进度(如 `Processing`、`Resolved`)。" + } + } + }, + "InhibitRuleItem": { + "type": "object", + "required": [ + "account_id", + "channel_id", + "priority", + "rule_name", + "description", + "source_filters", + "target_filters", + "equals", + "is_directly_discard", + "status", + "rule_id", + "updated_by", + "created_at", + "updated_at" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64" + }, + "channel_id": { + "type": "integer", + "format": "int64" + }, + "priority": { + "type": "integer" + }, + "rule_name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "source_filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "target_filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "equals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "用于配对源告警与目标告警的 label 键列表。" + }, + "is_directly_discard": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ] + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "updated_by": { + "type": "integer", + "format": "int64" + }, + "deleted_at": { + "type": "integer", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + } + } + }, + "InsightAlertByLabelItem": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "聚合键取值(check 名或 resource 标识)。" + }, + "hours": { + "type": "string", + "description": "启用 `split_hours` 时的时段桶。" + }, + "total_alert_cnt": { + "type": "integer", + "format": "int64" + }, + "total_alert_event_cnt": { + "type": "integer", + "format": "int64" + } + } + }, + "InsightAlertByLabelResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InsightAlertByLabelItem" + } + } + } + }, + "InsightFilter": { + "type": "object", + "description": "洞察与导出接口共享的过滤参数。`severities` 至多 3 项,team/channel/responder/incident 过滤条件每项至多 100 条,时间范围不能超过一年。", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "起始时间,Unix 秒,必须大于 0。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "结束时间,Unix 秒,必须大于 `start_time`。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按团队 ID 过滤,至多 100 项。" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按协作空间 ID 过滤,至多 100 项。" + }, + "responder_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按处理人员 ID 过滤,至多 100 项。" + }, + "severities": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ] + }, + "description": "按严重程度过滤,至多 3 项。" + }, + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "description": "按故障 ID(MongoDB ObjectID)过滤,至多 100 项。" + }, + "query": { + "type": "string", + "description": "作用于故障标题与描述的全文关键字。" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "标签过滤(精确匹配)。" + }, + "fields": { + "type": "object", + "additionalProperties": true, + "description": "自定义字段过滤(精确匹配)。" + }, + "orderby": { + "type": "string", + "enum": [ + "created_at" + ], + "description": "底层故障集合的排序字段。" + }, + "asc": { + "type": "boolean", + "description": "为 `true` 时升序,否则降序。" + }, + "is_my_team": { + "type": "boolean", + "description": "是否仅返回调用者所属团队的数据。若调用者无任何团队,返回空集合。" + }, + "time_zone": { + "type": "string", + "description": "IANA 时区名(如 `Asia/Shanghai`),用于解释时间范围。默认使用账户时区。" + }, + "seconds_to_close_from": { + "type": "integer", + "format": "int64", + "description": "解决时长下界(秒,包含)。" + }, + "seconds_to_close_to": { + "type": "integer", + "format": "int64", + "description": "解决时长上界(秒,不包含)。两端同时设置时,必须大于 `seconds_to_close_from`。" + }, + "seconds_to_ack_from": { + "type": "integer", + "format": "int64", + "description": "认领时长下界(秒,包含)。" + }, + "seconds_to_ack_to": { + "type": "integer", + "format": "int64", + "description": "认领时长上界(秒,不包含)。两端同时设置时,必须大于 `seconds_to_ack_from`。" + }, + "export_fields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "导出 CSV 时要包含的列键子集,至多 50 项。仅导出接口会读取。" + }, + "description_html_to_text": { + "type": "boolean", + "description": "导出时是否将描述列中的 HTML 标签转换为纯文本。" + } + } + }, + "InsightIncidentExportRequest": { + "$ref": "#/components/schemas/InsightFilter" + }, + "InsightIncidentListRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightFilter" + }, + { + "type": "object", + "description": "故障分页列表请求。在 InsightFilter 基础上增加分页字段。", + "properties": { + "p": { + "type": "integer", + "minimum": 1, + "default": 1, + "description": "页码,从 1 开始,默认 1。" + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 20, + "description": "每页条数,范围 1-100,默认 20。" + }, + "search_after_ctx": { + "type": "string", + "description": "上一页返回的游标 token,下一页请求时回传。" + } + } + } + ] + }, + "InsightIncidentListResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "匹配的故障总数。" + }, + "has_next_page": { + "type": "boolean" + }, + "search_after_ctx": { + "type": "string", + "description": "用于翻下一页的游标 token,下次请求时通过 `search_after_ctx` 回传。" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentRawItem" + } + } + } + }, + "InsightQueryRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightFilter" + }, + { + "type": "object", + "description": "洞察维度聚合请求。在 InsightFilter 基础上增加聚合控制字段。", + "properties": { + "split_hours": { + "type": "boolean", + "description": "为 `true` 时将指标拆分为 `work`/`sleep`/`off` 时段。" + }, + "aggregate_unit": { + "type": "string", + "enum": [ + "day", + "week", + "month" + ], + "description": "将指标按时间粒度聚合。设置后时间范围须不少于 24 小时;`day` 粒度时范围不得超过 31 天。" + } + } + } + ] + }, + "InsightTopkAlertByLabelRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightQueryRequest" + }, + { + "type": "object", + "required": [ + "label" + ], + "properties": { + "label": { + "type": "string", + "enum": [ + "check", + "resource" + ], + "description": "聚合维度。" + }, + "k": { + "type": "integer", + "description": "返回前 K 条记录,取值范围 1-100。" + }, + "orderby": { + "type": "string", + "enum": [ + "total_alert_cnt", + "total_alert_event_cnt" + ], + "description": "排序字段。" + }, + "asc": { + "type": "boolean", + "description": "为 `true` 时升序,否则降序。" + } + } + } + ] + }, + "LinkItem": { + "type": "object", + "description": "协作空间级别的链接集成,通过模板渲染生成。", + "required": [ + "name", + "endpoint", + "open_type" + ], + "properties": { + "name": { + "type": "string", + "description": "链接显示名称。" + }, + "endpoint": { + "type": "string", + "description": "渲染后的链接 URL。" + }, + "open_type": { + "type": "string", + "enum": [ + "popup", + "tab" + ], + "description": "链接打开方式。" + } + } + }, + "ListChannelsRequest": { + "type": "object", + "properties": { + "p": { + "type": "integer", + "minimum": 1, + "description": "页码,从 1 开始。" + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 100, + "description": "每页大小,未传时默认为 100。" + }, + "orderby": { + "type": "string", + "enum": [ + "ranking", + "created_at", + "updated_at", + "channel_name", + "last_incident_at" + ], + "description": "排序字段。" + }, + "asc": { + "type": "boolean", + "description": "为 true 时升序排序。" + }, + "is_my_managed": { + "type": "boolean", + "description": "为 true 时仅返回当前用户可管理的协作空间。" + }, + "is_my_starred": { + "type": "boolean", + "description": "为 true 时仅返回当前用户收藏的协作空间,与 `is_my_team` 互斥。" + }, + "is_brief": { + "type": "boolean", + "description": "为 true 时仅返回简要字段(`channel_id`、`channel_name`、`description`、`status`)。" + }, + "is_my_team": { + "type": "boolean", + "description": "为 true 时仅返回当前用户所在团队持有的协作空间,与 `is_my_starred` 互斥。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按团队 ID 过滤。" + }, + "query": { + "type": "string", + "description": "按名称/描述的全文查询串。" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按指定协作空间 ID 过滤。" + }, + "channel_name": { + "type": "string", + "description": "协作空间名称精确匹配,优先级高于 `query` 的名称过滤。" + } + } + }, + "ListChannelsResponse": { + "type": "object", + "required": [ + "items", + "total", + "has_next_page" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelItem" + } + }, + "total": { + "type": "integer", + "format": "int64", + "description": "匹配到的协作空间总数。" + }, + "has_next_page": { + "type": "boolean", + "description": "是否还有下一页。" + } + } + }, + "ListDropRulesResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UnsubscribeRuleItem" + } + } + } + }, + "ListEscalationRulesResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EscalateRuleItem" + } + } + } + }, + "ListIncidentAlertsRequest": { + "type": "object", + "description": "查询故障关联告警的过滤条件。", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + }, + "include_events": { + "type": "boolean", + "description": "true 时返回每条告警下的原始事件。" + }, + "is_active": { + "type": "boolean", + "description": "true 时只返回活跃告警(Critical/Warning/Info),false 时只返回已恢复告警(Ok),不传则返回全部。" + }, + "limit": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 1000, + "default": 1000, + "description": "分页大小,最大 1000。" + }, + "p": { + "type": "integer", + "format": "int64", + "minimum": 0, + "default": 1, + "description": "页码,从 1 开始。" + } + } + }, + "ListIncidentAlertsResponse": { + "type": "object", + "description": "故障下的告警分页列表。", + "required": [ + "items", + "total" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertInfo" + }, + "description": "告警列表。" + }, + "total": { + "type": "integer", + "format": "int64", + "description": "命中总数。" + } + } + }, + "ListIncidentFeedRequest": { + "type": "object", + "description": "获取故障时间线的参数。", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + }, + "p": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "页码,从 1 开始。" + }, + "limit": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 100, + "default": 20, + "description": "分页大小,最大 100。" + }, + "asc": { + "type": "boolean", + "description": "true 为按时间升序。" + }, + "types": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentFeedType" + }, + "description": "可选类型过滤,仅返回指定类型的时间线条目。" + } + } + }, + "ListIncidentFeedResponse": { + "type": "object", + "description": "故障时间线分页结果。", + "required": [ + "has_next_page", + "items" + ], + "properties": { + "has_next_page": { + "type": "boolean", + "description": "是否还有更多条目。" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentFeedItem" + }, + "description": "当前页的时间线条目。" + } + } + }, + "ListIncidentsByIdsRequest": { + "type": "object", + "description": "按 ID 批量查询故障的参数。", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "description": "待查询的故障 ID 列表。" + } + } + }, + "ListIncidentsRequest": { + "type": "object", + "description": "查询故障列表的过滤条件。`start_time` 与 `end_time` 必填,时间窗口不超过 31 天。", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "时间窗口起点(Unix 秒)。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "时间窗口终点(Unix 秒),必须大于 `start_time` 且不超过 31 天。" + }, + "asc": { + "type": "boolean", + "description": "true 为升序。" + }, + "is_snoozed": { + "type": "boolean", + "description": "true 时仅返回已暂停通知的故障。" + }, + "is_my_team": { + "type": "boolean", + "description": "true 时仅返回用户所属团队管理的协作空间中的故障。" + }, + "is_my_channel": { + "type": "boolean", + "description": "true 时仅返回用户个人管理的协作空间中的故障。" + }, + "ever_muted": { + "type": "boolean", + "description": "true 时仅返回曾被静默的故障。" + }, + "is_rare": { + "type": "boolean", + "description": "true 时仅返回新奇故障。" + }, + "progress": { + "type": "string", + "description": "进展状态过滤,逗号分隔(如 `Triggered,Processing`)。" + }, + "query": { + "type": "string", + "description": "全文搜索关键词。" + }, + "incident_severity": { + "type": "string", + "description": "严重程度过滤,逗号分隔(`Critical,Warning,Info`)。" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "协作空间 ID 列表,0 表示独立故障。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "团队 ID 列表,通过协作空间所属团队进行解析。" + }, + "responder_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "处理人员成员 ID。" + }, + "acker_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "认领人员成员 ID。" + }, + "creator_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "创建人员成员 ID,0 表示自动创建。" + }, + "closer_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "关闭人员成员 ID,0 表示自动关闭。" + }, + "incident_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "指定故障 ID 列表进行过滤。" + }, + "nums": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按短标识过滤。" + }, + "p": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "页码,从 1 开始。" + }, + "limit": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 100, + "default": 20, + "description": "分页大小,最大 100。" + }, + "search_after_ctx": { + "type": "string", + "description": "上一次响应返回的翻页游标。" + } + } + }, + "ListInhibitRulesResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InhibitRuleItem" + } + } + } + }, + "ListPastIncidentsRequest": { + "type": "object", + "description": "查询历史相似故障的参数。", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "基准故障 ID(MongoDB ObjectID)。" + }, + "limit": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 100, + "default": 5, + "description": "返回的相似故障最大数量。" + } + } + }, + "ListPastIncidentsResponse": { + "type": "object", + "description": "历史相似故障列表,按相关性排序。", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PastIncidentItem" + }, + "description": "相似故障及其评分。" + } + } + }, + "ListPostMortemsRequest": { + "type": "object", + "description": "查询复盘报告列表的过滤条件。", + "properties": { + "status": { + "type": "string", + "enum": [ + "drafting", + "published" + ], + "description": "复盘状态,缺省时服务端默认按 `published` 过滤。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "限定查询的团队 ID。" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "限定查询的协作空间 ID。" + }, + "created_at_start_seconds": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "创建时间下界(秒)。" + }, + "created_at_end_seconds": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "创建时间上界(秒)。" + }, + "order_by": { + "type": "string", + "enum": [ + "created_at_seconds", + "updated_at_seconds" + ], + "description": "排序字段。" + }, + "asc": { + "type": "boolean", + "description": "true 为升序。" + }, + "p": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "页码,从 1 开始。" + }, + "limit": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 100, + "default": 20, + "description": "分页大小,最大 100。" + }, + "search_after_ctx": { + "type": "string", + "description": "上一次响应返回的翻页游标。" + } + } + }, + "ListPostMortemsResponse": { + "type": "object", + "description": "复盘报告分页列表。", + "required": [ + "items", + "total", + "has_next_page" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PostMortemMeta" + }, + "description": "当前页复盘元信息。" + }, + "total": { + "type": "integer", + "format": "int64", + "description": "命中总数。" + }, + "has_next_page": { + "type": "boolean", + "description": "是否还有更多页。" + }, + "search_after_ctx": { + "type": "string", + "description": "翻页游标。" + } + } + }, + "ListRoutesRequest": { + "type": "object", + "description": "批量查询多个集成路由规则所需的参数。", + "required": [ + "integration_ids" + ], + "properties": { + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "需要查询路由规则的集成 ID 列表。" + } + } + }, + "ListRoutesResponse": { + "type": "object", + "description": "路由规则列表的响应包装。", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteItem" + }, + "description": "已请求集成的路由规则列表。未配置规则的集成不会出现在结果中。" + } + } + }, + "ListSilenceRulesResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SilenceRuleItem" + } + } + } + }, + "ListWarRoomsRequest": { + "type": "object", + "description": "查询故障战情室列表的参数。", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "可选过滤:仅返回指定 IM 集成下的战情室。" + } + } + }, + "ListWarRoomsResponse": { + "type": "object", + "description": "故障关联战情室列表。", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WarRoomItem" + }, + "description": "战情室记录列表。" + } + } + }, + "ListWebhookHistoryRequest": { + "type": "object", + "description": "出站 Webhook 推送历史的筛选参数。查询必须指定毫秒级的时间窗口;使用 `search_after_ctx` 进行游标分页。", + "required": [ + "limit", + "start_time", + "end_time" + ], + "properties": { + "search_after_ctx": { + "type": "string", + "description": "上一次调用返回的不透明游标,用于获取下一页。" + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "description": "每页数量。" + }, + "asc": { + "type": "boolean", + "description": "为 true 时按 `event_time` 升序排序,否则降序。" + }, + "orderby": { + "type": "string", + "enum": [ + "event_time" + ], + "description": "排序字段,目前仅支持 `event_time`。" + }, + "ref_id": { + "type": "string", + "maxLength": 128, + "description": "按引用 ID 过滤(故障或告警 ID)。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "按集成 ID 过滤。" + }, + "event_types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按事件类型过滤。" + }, + "status": { + "type": "string", + "enum": [ + "success", + "failed" + ], + "description": "按投递状态过滤。" + }, + "start_time": { + "type": "integer", + "format": "int64", + "minimum": 1000000000000, + "maximum": 9999999999999, + "description": "时间窗口起始时间(Unix 毫秒)。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "minimum": 1000000000000, + "maximum": 9999999999999, + "description": "时间窗口结束时间(Unix 毫秒),必须大于 `start_time`。" + } + } + }, + "ListWebhookHistoryResponse": { + "type": "object", + "description": "分页的 Webhook 推送历史。", + "required": [ + "items", + "total", + "search_after_ctx" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookHistoryItem" + } + }, + "total": { + "type": "integer", + "description": "匹配记录总数。" + }, + "search_after_ctx": { + "type": "string", + "description": "下一页游标,传入下次请求的 `search_after_ctx`。无更多数据时为空。" + } + } + }, + "MappingAPICreateRequest": { + "type": "object", + "required": [ + "api_name", + "url" + ], + "properties": { + "api_name": { + "type": "string", + "maxLength": 199, + "description": "唯一的 API 名称(最多 199 个字符)。" + }, + "description": { + "type": "string", + "description": "可选描述。" + }, + "url": { + "type": "string", + "format": "uri", + "maxLength": 500, + "description": "HTTP/HTTPS 端点 URL(最多 500 个字符)。" + }, + "insecure_skip_verify": { + "type": "boolean", + "description": "是否跳过 TLS 证书验证,默认 `false`。" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "自定义 HTTP 请求头。" + }, + "timeout": { + "type": "integer", + "description": "请求超时秒数(1–3),默认 2。" + }, + "retry_count": { + "type": "integer", + "description": "失败重试次数(0–1),默认 0。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID。" + } + } + }, + "MappingAPICreateResponse": { + "type": "object", + "properties": { + "api_id": { + "type": "string", + "description": "创建的映射 API ID(MongoDB ObjectID 十六进制)。" + }, + "api_name": { + "type": "string", + "description": "API 名称。" + } + }, + "required": [ + "api_id", + "api_name" + ] + }, + "MappingAPIIDRequest": { + "type": "object", + "required": [ + "api_id" + ], + "properties": { + "api_id": { + "type": "string", + "description": "映射 API ID(MongoDB ObjectID 十六进制)。" + } + } + }, + "MappingAPIItem": { + "type": "object", + "description": "映射 API 配置。", + "properties": { + "api_id": { + "type": "string", + "description": "API ID(MongoDB ObjectID 十六进制)。" + }, + "api_name": { + "type": "string", + "description": "API 名称。" + }, + "description": { + "type": "string", + "description": "描述。" + }, + "url": { + "type": "string", + "description": "端点 URL。" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "自定义请求头。" + }, + "timeout": { + "type": "integer", + "description": "请求超时秒数。" + }, + "retry_count": { + "type": "integer", + "description": "重试次数。" + }, + "insecure_skip_verify": { + "type": "boolean", + "description": "是否跳过 TLS 验证。" + }, + "status": { + "type": "string", + "description": "API 状态。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "创建者成员 ID。" + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "最后更新者成员 ID。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 时间戳(秒)。" + } + }, + "required": [ + "api_id", + "api_name", + "description", + "url", + "headers", + "timeout", + "retry_count", + "insecure_skip_verify", + "status", + "team_id", + "updated_by", + "creator_id" + ] + }, + "MappingAPIListResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "映射 API 总数。" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MappingAPIItem" + }, + "description": "映射 API 列表。" + } + }, + "required": [ + "total", + "items" + ] + }, + "MappingAPIUpdateRequest": { + "type": "object", + "required": [ + "api_id" + ], + "properties": { + "api_id": { + "type": "string", + "description": "映射 API ID(MongoDB ObjectID 十六进制)。" + }, + "api_name": { + "type": "string", + "maxLength": 199, + "description": "新 API 名称(最多 199 个字符)。" + }, + "description": { + "type": "string", + "description": "新描述。" + }, + "url": { + "type": "string", + "format": "uri", + "maxLength": 500, + "description": "新端点 URL(最多 500 个字符)。" + }, + "insecure_skip_verify": { + "type": "boolean", + "description": "新 TLS 跳过验证设置。" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "新请求头映射(覆盖原有值)。" + }, + "timeout": { + "type": "integer", + "description": "新超时秒数。" + }, + "retry_count": { + "type": "integer", + "description": "新重试次数。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "新所属团队 ID。" + } + } + }, + "MappingDataDeleteRequest": { + "type": "object", + "required": [ + "schema_id", + "keys" + ], + "properties": { + "schema_id": { + "type": "string", + "description": "映射规则 ID(MongoDB ObjectID 十六进制)。" + }, + "keys": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 100, + "description": "待删除的数据行键名列表。" + } + } + }, + "MappingDataItem": { + "type": "object", + "description": "单条映射数据行。", + "properties": { + "key": { + "type": "string", + "description": "由来源标签值组合生成的唯一键。" + }, + "fields": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "该行所有标签的键值对。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 时间戳(秒)。" + } + } + }, + "MappingDataListRequest": { + "type": "object", + "required": [ + "schema_id" + ], + "properties": { + "schema_id": { + "type": "string", + "description": "映射规则 ID(MongoDB ObjectID 十六进制)。" + }, + "query": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "按来源标签值精确过滤。若指定 query,须包含全部来源标签。" + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "排序字段。" + }, + "asc": { + "type": "boolean", + "description": "为 `true` 时升序排列。" + }, + "p": { + "type": "integer", + "format": "int64", + "description": "页码(从 1 开始),用于页码分页。" + }, + "limit": { + "type": "integer", + "format": "int64", + "description": "每页数量(1–100,默认 20)。" + }, + "search_after_ctx": { + "type": "string", + "description": "用于游标分页的不透明游标令牌。" + } + } + }, + "MappingDataListResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MappingDataItem" + }, + "description": "数据行列表。" + }, + "total": { + "type": "integer", + "format": "int64", + "description": "匹配的总行数。" + }, + "has_next_page": { + "type": "boolean", + "description": "是否存在更多页。" + }, + "search_after_ctx": { + "type": "string", + "description": "用于获取下一页的游标令牌。" + } + }, + "required": [ + "items", + "total", + "has_next_page" + ] + }, + "MappingDataUploadRequest": { + "type": "object", + "description": "Multipart form-data 上传请求。`schema_id` 通过查询参数传入,`file` 为 CSV 文件字段。", + "properties": { + "schema_id": { + "type": "string", + "description": "映射规则 ID(查询参数)。" + }, + "file": { + "type": "string", + "format": "binary", + "description": "待上传的 CSV 文件。" + } + } + }, + "MappingDataUpsertRequest": { + "type": "object", + "required": [ + "schema_id", + "docs" + ], + "properties": { + "schema_id": { + "type": "string", + "description": "映射规则 ID(MongoDB ObjectID 十六进制)。" + }, + "docs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxItems": 1000, + "description": "待插入或更新的数据行,每行须包含所有来源标签和结果标签的值。" + } + } + }, + "MappingDataUpsertResponse": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "已 Upsert 数据行的组合键列表。" + } + }, + "required": [ + "keys" + ] + }, + "MappingSchemaCreateRequest": { + "type": "object", + "required": [ + "schema_name", + "source_labels", + "result_labels" + ], + "properties": { + "schema_name": { + "type": "string", + "maxLength": 39, + "description": "唯一的映射规则名称(最多 39 个字符)。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "可选描述(最多 500 个字符)。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID,`0` 表示无团队。" + }, + "source_labels": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 3, + "description": "查找键标签名(1–3 个),不得与 `result_labels` 重叠。" + }, + "result_labels": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 10, + "description": "输出标签名(1–10 个),不得与 `source_labels` 重叠。" + } + } + }, + "MappingSchemaCreateResponse": { + "type": "object", + "properties": { + "schema_id": { + "type": "string", + "description": "创建的映射规则 ID(MongoDB ObjectID 十六进制)。" + }, + "schema_name": { + "type": "string", + "description": "映射规则名称。" + } + }, + "required": [ + "schema_id", + "schema_name" + ] + }, + "MappingSchemaIDRequest": { + "type": "object", + "required": [ + "schema_id" + ], + "properties": { + "schema_id": { + "type": "string", + "description": "映射规则 ID(MongoDB ObjectID 十六进制)。" + } + } + }, + "MappingSchemaItem": { + "type": "object", + "description": "映射规则定义。", + "properties": { + "schema_id": { + "type": "string", + "description": "映射规则 ID(MongoDB ObjectID 十六进制)。" + }, + "schema_name": { + "type": "string", + "description": "映射规则名称。" + }, + "description": { + "type": "string", + "description": "描述。" + }, + "source_labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "查找键标签名。" + }, + "result_labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "输出标签名。" + }, + "status": { + "type": "string", + "description": "映射规则状态。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "创建者成员 ID。" + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "最后更新者成员 ID。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 时间戳(秒)。" + } + }, + "required": [ + "schema_id", + "schema_name", + "description", + "source_labels", + "result_labels", + "status", + "team_id", + "updated_by", + "creator_id" + ] + }, + "MappingSchemaListResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "映射规则总数。" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MappingSchemaItem" + }, + "description": "映射规则列表。" + } + }, + "required": [ + "total", + "items" + ] + }, + "MappingSchemaUpdateRequest": { + "type": "object", + "required": [ + "schema_id" + ], + "properties": { + "schema_id": { + "type": "string", + "description": "映射规则 ID(MongoDB ObjectID 十六进制)。" + }, + "schema_name": { + "type": "string", + "maxLength": 39, + "description": "新的映射规则名称(最多 39 个字符)。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "新的描述(最多 500 个字符)。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "新的所属团队 ID,`0` 表示移除团队关联。" + } + } + }, + "MergeIncidentsRequest": { + "type": "object", + "description": "合并故障的参数。", + "required": [ + "source_incident_ids", + "target_incident_id" + ], + "properties": { + "source_incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "minItems": 1, + "maxItems": 100, + "description": "待合并的源故障 ID 列表。若其中包含目标故障 ID,系统会自动去除。" + }, + "target_incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "合并目标故障 ID。" + }, + "title": { + "type": "string", + "maxLength": 512, + "description": "可选,为目标故障设置新标题。" + }, + "comment": { + "type": "string", + "maxLength": 1024, + "description": "可选,合并时间线上的备注。" + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "可选,为目标故障设置新负责人。" + }, + "remove_source_incidents": { + "type": "boolean", + "description": "为 true 时合并后软删除源故障,否则将源故障关闭。" + } + } + }, + "MetricsBase": { + "type": "object", + "description": "每条聚合洞察行都带有的共享维度字段。", + "properties": { + "hours": { + "type": "string", + "enum": [ + "work", + "sleep", + "off" + ], + "description": "启用 `split_hours` 时的时段桶。" + }, + "ts": { + "type": "integer", + "format": "int64", + "description": "聚合桶的起始时间(Unix 秒)。在使用 `aggregate_unit` 时返回。" + }, + "channel_id": { + "type": "integer", + "format": "int64" + }, + "team_id": { + "type": "integer", + "format": "int64" + }, + "responder_id": { + "type": "integer", + "format": "int64" + }, + "account_id": { + "type": "integer", + "format": "int64" + }, + "team_name": { + "type": "string" + }, + "channel_name": { + "type": "string" + }, + "responder_name": { + "type": "string" + } + } + }, + "MigrateStatusPageEmailSubscribersRequest": { + "type": "object", + "description": "启动 Atlassian Statuspage 邮件订阅者迁移任务所需的参数。", + "required": [ + "api_key", + "source_page_id", + "target_page_id" + ], + "properties": { + "api_key": { + "type": "string", + "description": "可访问源状态页的 Atlassian Statuspage API Key。" + }, + "source_page_id": { + "type": "string", + "description": "Atlassian Statuspage 源状态页 ID。" + }, + "target_page_id": { + "type": "integer", + "format": "int64", + "description": "接收导入订阅者的 Flashduty 目标状态页 ID。" + } + } + }, + "MigrateStatusPageStructureRequest": { + "type": "object", + "description": "启动 Atlassian Statuspage 结构与历史迁移任务所需的参数。", + "required": [ + "api_key", + "source_page_id" + ], + "properties": { + "api_key": { + "type": "string", + "description": "可访问源状态页的 Atlassian Statuspage API Key。" + }, + "source_page_id": { + "type": "string", + "description": "Atlassian Statuspage 源状态页 ID。" + } + } + }, + "NotifyChat": { + "type": "object", + "description": "群聊通知投递记录。", + "properties": { + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "发送通知所用的集成数据源 ID。" + }, + "chat_id": { + "type": "string", + "description": "群聊 ID。" + }, + "chat_name": { + "type": "string", + "description": "群聊显示名称。" + }, + "failed_reason": { + "type": "string", + "description": "投递失败原因。" + } + } + }, + "NotifyPerson": { + "type": "object", + "description": "个人通知投递记录。", + "properties": { + "person_id": { + "type": "integer", + "format": "int64", + "description": "接收人成员 ID。" + }, + "failed_reason": { + "type": "string", + "description": "投递失败原因。" + } + } + }, + "NotifyRobot": { + "type": "object", + "description": "机器人 webhook 通知投递记录。", + "properties": { + "token": { + "type": "string", + "description": "机器人 token 或标识。" + }, + "alias": { + "type": "string", + "description": "机器人别名。" + }, + "failed_reason": { + "type": "string", + "description": "投递失败原因。" + } + } + }, + "OnceTimeFilter": { + "type": "object", + "description": "以 Unix 秒定义的一次性时间窗口。", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "窗口起始时间(Unix 秒),必须大于 0 且小于 `end_time`。", + "exclusiveMinimum": 0 + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "窗口结束时间(Unix 秒),必须大于 0。", + "exclusiveMinimum": 0 + } + } + }, + "OrFilterGroup": { + "type": "array", + "description": "OR-of-AND 过滤树。外层数组为 AND 组列表,任意一个 AND 组匹配即通过;AND 组内所有条件须同时满足。", + "items": { + "type": "array", + "description": "AND 组——组内所有条件须同时满足。", + "items": { + "$ref": "#/components/schemas/FilterCondition" + } + } + }, + "PastIncidentItem": { + "allOf": [ + { + "$ref": "#/components/schemas/IncidentInfo" + }, + { + "type": "object", + "required": [ + "score" + ], + "properties": { + "score": { + "type": "number", + "format": "float", + "description": "向量检索返回的相似度分值。" + } + } + } + ] + }, + "PersonShort": { + "type": "object", + "description": "Flashduty 成员信息。", + "properties": { + "person_id": { + "type": "integer", + "format": "int64", + "description": "成员 ID。" + }, + "person_name": { + "type": "string", + "description": "成员显示名称。" + }, + "email": { + "type": "string", + "format": "email", + "description": "成员邮箱。" + }, + "as": { + "type": "string", + "description": "成员在当前上下文中的角色标签。" + } + } + }, + "PostMortemItem": { + "type": "object", + "description": "完整复盘报告,包含基础信息、正文与跟进项。", + "required": [ + "meta", + "basics", + "content", + "follow_ups" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/PostMortemMeta" + }, + "basics": { + "type": "object", + "required": [ + "incidents_highest_severity", + "incidents_earliest_start_seconds", + "incidents_latest_close_seconds", + "incidents_total_duration_seconds", + "responders" + ], + "properties": { + "incidents_highest_severity": { + "type": "string", + "description": "关联故障的最高严重程度。" + }, + "incidents_earliest_start_seconds": { + "type": "integer", + "format": "int64", + "description": "关联故障中最早的开始时间(秒)。" + }, + "incidents_latest_close_seconds": { + "type": "integer", + "format": "int64", + "description": "关联故障中最晚的关闭时间(秒)。" + }, + "incidents_total_duration_seconds": { + "type": "integer", + "format": "int64", + "description": "累计持续时长(秒)。" + }, + "responders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Responder" + }, + "description": "参与处理的成员。" + } + } + }, + "content": { + "type": "object", + "required": [ + "content" + ], + "properties": { + "content": { + "type": "string", + "description": "正文内容(BlockNote JSON)。" + } + } + }, + "follow_ups": { + "type": "string", + "description": "跟进行动项,单字符串表示。" + } + } + }, + "PostMortemMeta": { + "type": "object", + "description": "复盘报告元信息(列表中使用的精简结构)。", + "required": [ + "account_id", + "title", + "status", + "post_mortem_id", + "template_id", + "incident_ids", + "media_count", + "author_ids", + "team_id", + "channel_id", + "is_private", + "channel_name", + "created_at_seconds", + "updated_at_seconds" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "账号 ID。" + }, + "title": { + "type": "string", + "description": "复盘标题。" + }, + "status": { + "type": "string", + "enum": [ + "drafting", + "published" + ], + "description": "复盘状态。" + }, + "post_mortem_id": { + "type": "string", + "description": "按账号和故障 ID 确定性派生的复盘报告 ID。" + }, + "template_id": { + "type": "string", + "description": "初始化时使用的模板 ID。" + }, + "incident_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "关联的故障 ID 列表。" + }, + "media_count": { + "type": "integer", + "description": "已上传的媒体文件数量。" + }, + "author_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "贡献过该复盘的成员 ID 列表。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID,为 0 表示无。" + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID,为 0 表示无。" + }, + "is_private": { + "type": "boolean", + "description": "为 true 时仅团队成员和管理员可查看。" + }, + "channel_name": { + "type": "string", + "description": "协作空间名称,由服务端填充。" + }, + "created_at_seconds": { + "type": "integer", + "format": "int64", + "description": "创建时间戳(秒)。" + }, + "updated_at_seconds": { + "type": "integer", + "format": "int64", + "description": "最后更新时间戳(秒)。" + } + } + }, + "RemoveIncidentRequest": { + "type": "object", + "description": "永久删除故障的参数。", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "待删除的故障 ID 列表,单次最多 100 条。调用方必须拥有所有故障所在协作空间的访问权限。" + } + } + }, + "ReopenIncidentRequest": { + "type": "object", + "description": "重新打开故障的参数。", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "待重开的故障 ID 列表,单次最多 100 条。", + "minItems": 1 + }, + "reason": { + "type": "string", + "maxLength": 1024, + "description": "可选,记录到时间线的重开原因。" + } + } + }, + "ResetIncidentFieldRequest": { + "type": "object", + "description": "更新故障自定义字段值的参数。", + "required": [ + "incident_id", + "field_name" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + }, + "field_name": { + "type": "string", + "description": "自定义字段名称,必须与账号下定义的字段匹配。" + }, + "field_value": { + "description": "字段新值,类型需与字段定义一致。" + } + } + }, + "ResolveIncidentRequest": { + "type": "object", + "description": "恢复故障的参数。", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "待恢复的故障 ID 列表,单次最多 100 条。", + "minItems": 1 + }, + "root_cause": { + "type": "string", + "maxLength": 1024, + "description": "可选,应用到所有故障的根因说明。" + }, + "resolution": { + "type": "string", + "maxLength": 1024, + "description": "可选,应用到所有故障的解决方案说明。" + } + } + }, + "Responder": { + "type": "object", + "description": "故障处理人员,包含指派与认领时间戳。", + "required": [ + "person_id", + "assigned_at", + "acknowledged_at" + ], + "properties": { + "person_id": { + "type": "integer", + "format": "int64", + "description": "处理人员成员 ID。" + }, + "assigned_at": { + "type": "integer", + "format": "int64", + "description": "被指派时的 Unix 时间戳(秒)。" + }, + "acknowledged_at": { + "type": "integer", + "format": "int64", + "description": "认领故障的 Unix 时间戳(秒),未认领时为 0。" + }, + "person_name": { + "type": "string", + "description": "成员名称,由服务端填充。" + }, + "email": { + "type": "string", + "format": "email", + "description": "成员邮箱,由服务端填充。" + }, + "as": { + "type": "string", + "description": "处理人员角色标签。" + } + } + }, + "ResponderInsightItem": { + "allOf": [ + { + "$ref": "#/components/schemas/MetricsBase" + }, + { + "type": "object", + "description": "按单个处理人员聚合的故障指标。", + "properties": { + "total_incident_cnt": { + "type": "integer", + "format": "int64" + }, + "total_incidents_acknowledged": { + "type": "integer", + "format": "int64" + }, + "total_incidents_reassigned": { + "type": "integer", + "format": "int64" + }, + "total_incidents_escalated": { + "type": "integer", + "format": "int64" + }, + "total_incidents_timeout_escalated": { + "type": "integer", + "format": "int64" + }, + "total_incidents_manually_escalated": { + "type": "integer", + "format": "int64" + }, + "total_interruptions": { + "type": "integer", + "format": "int64" + }, + "total_notifications": { + "type": "integer", + "format": "int64" + }, + "total_engaged_seconds": { + "type": "integer", + "format": "int64" + }, + "total_seconds_to_ack": { + "type": "integer", + "format": "int64" + }, + "mean_seconds_to_ack": { + "type": "number", + "format": "double" + }, + "acknowledgement_pct": { + "type": "number", + "format": "double" + } + } + } + ] + }, + "ResponderInsightResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResponderInsightItem" + } + } + } + }, + "RouteCase": { + "type": "object", + "description": "路由规则中的单个 case 分支。当其全部条件命中后,告警将分发到所配置的协作空间。", + "required": [ + "if", + "channel_ids", + "fallthrough" + ], + "properties": { + "if": { + "type": "array", + "description": "匹配条件列表,条件之间为 AND 关系。", + "items": { + "$ref": "#/components/schemas/RouteMatchCondition" + } + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "目标协作空间 ID。当 `routing_mode` 为 `standard`(或为空)时必填。" + }, + "fallthrough": { + "type": "boolean", + "description": "为 `true` 时,本 case 命中后继续向下匹配;为 `false` 则在首次命中后停止。" + }, + "routing_mode": { + "type": "string", + "enum": [ + "standard", + "name_mapping" + ], + "description": "路由模式。`standard`(默认,留空时亦按此处理)按固定的协作空间 ID 路由;`name_mapping` 通过读取告警事件中某个标签的值来动态匹配协作空间名称。" + }, + "name_mapping_label": { + "type": "string", + "description": "用作目标协作空间名的标签键。当 `routing_mode` 为 `name_mapping` 时必填。" + } + } + }, + "RouteDefault": { + "type": "object", + "description": "默认分支。当所有 case 均未命中(或命中的 case 没有有效协作空间)时使用。", + "properties": { + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "兜底使用的协作空间 ID 列表。" + } + } + }, + "RouteInfoRequest": { + "type": "object", + "description": "查询单个集成路由规则所需的参数。", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "集成 ID,必须大于 0。" + } + } + }, + "RouteItem": { + "type": "object", + "description": "集成的路由规则。告警按 `cases` 顺序依次匹配,未命中的将进入 `default` 分支。当集成未配置规则时返回 `null`。", + "required": [ + "version", + "updated_by", + "creator_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "所属集成 ID。" + }, + "cases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteCase" + }, + "description": "有序的 case 分支列表。" + }, + "sections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteSection" + }, + "description": "可选的分区,用于将多个 case 进行视觉分组。" + }, + "default": { + "$ref": "#/components/schemas/RouteDefault" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "deleted" + ], + "description": "规则状态。" + }, + "version": { + "type": "integer", + "format": "int64", + "description": "单调递增的版本号,每次更新加 1,可用于乐观并发控制。" + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "最后一次修改人员 ID。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "创建人员 ID。" + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "软删除时间戳(Unix 秒)。规则有效时不返回此字段。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 秒级时间戳。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 秒级时间戳。" + } + } + }, + "RouteMatchCondition": { + "type": "object", + "description": "单个匹配条件。同一 case 内的所有条件之间为 AND 关系。", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "用于与告警事件比对的字段键(如 `alert_severity`、`labels.service`)。" + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "匹配运算符。`IN` 表示字段值命中 `vals` 中任一项;`NOTIN` 表示均不命中。" + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "用于比对的值列表。每项支持字面量、通配符(`*`、`?`)、以斜杠包裹的正则表达式(`/pattern/`)、CIDR(`cidr:10.0.0.0/8`)以及数值比较(`num:lt:100`)。" + } + } + }, + "RouteSection": { + "type": "object", + "description": "用于将连续的多个 case 在视觉上分组的逻辑分区。", + "required": [ + "name", + "position" + ], + "properties": { + "name": { + "type": "string", + "description": "分区名称,在同一规则内必须唯一。" + }, + "position": { + "type": "integer", + "description": "分区在 `cases` 中的起始下标,取值范围为 0 到 `cases` 长度。" + } + } + }, + "RuleCreateResponse": { + "type": "object", + "required": [ + "rule_id", + "rule_name" + ], + "properties": { + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "新建规则的 ID(MongoDB ObjectID)。" + }, + "rule_name": { + "type": "string", + "description": "请求中回显的规则名称。" + } + } + }, + "ScheduleCalculatedLayer": { + "type": "object", + "description": "单个分层的计算结果。", + "required": [ + "layer_name", + "name", + "mode", + "schedules" + ], + "properties": { + "layer_name": { + "type": "string", + "description": "分层显示名称。" + }, + "name": { + "type": "string", + "description": "分层内部名称。" + }, + "mode": { + "type": "integer", + "description": "分层模式:0 = 普通轮转,1 = 覆盖。" + }, + "schedules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleCalculatedSchedule" + }, + "description": "计算出的值班时段。" + } + } + }, + "ScheduleCalculatedSchedule": { + "type": "object", + "description": "分层内计算出的值班时段。", + "required": [ + "start", + "end", + "group", + "index" + ], + "properties": { + "start": { + "type": "integer", + "format": "int64", + "description": "时段开始时间(Unix 秒)。" + }, + "end": { + "type": "integer", + "format": "int64", + "description": "时段结束时间(Unix 秒)。" + }, + "group": { + "$ref": "#/components/schemas/ScheduleGroup" + }, + "index": { + "type": "integer", + "description": "轮转内索引。" + } + } + }, + "ScheduleDayMask": { + "type": "object", + "description": "按星期几生效的掩码配置。", + "properties": { + "repeat": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "生效的星期几(0 = 周日)。" + } + } + }, + "ScheduleEmptyObject": { + "type": "object", + "description": "空响应。", + "properties": {} + }, + "ScheduleFixedTimeNotifyInfo": { + "type": "object", + "description": "固定时间通知配置。", + "required": [ + "cycle", + "start" + ], + "properties": { + "cycle": { + "type": "string", + "description": "通知周期。" + }, + "start": { + "type": "string", + "description": "周期内的通知开始时间。" + } + } + }, + "ScheduleGroup": { + "type": "object", + "description": "值班分层内的值班组。", + "required": [ + "group_name", + "name", + "members", + "start", + "end" + ], + "properties": { + "group_name": { + "type": "string", + "description": "值班组显示名称。" + }, + "name": { + "type": "string", + "description": "值班组内部名称。" + }, + "members": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleMember" + }, + "description": "值班组成员。" + }, + "start": { + "type": "integer", + "format": "int64", + "description": "值班组开始时间(Unix 秒)。" + }, + "end": { + "type": "integer", + "format": "int64", + "description": "值班组结束时间(Unix 秒)。" + } + } + }, + "ScheduleIDResponse": { + "type": "object", + "description": "创建值班表后返回的 ID 响应。", + "required": [ + "schedule_id" + ], + "properties": { + "schedule_id": { + "type": "integer", + "format": "int64", + "description": "新建值班表的 ID。" + } + } + }, + "ScheduleIDsBodyRequest": { + "type": "object", + "description": "携带值班表 ID 列表的请求体(删除/启用/禁用使用)。", + "required": [ + "schedule_ids" + ], + "properties": { + "schedule_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "要操作的值班表 ID 列表。" + } + } + }, + "ScheduleIDsRequest": { + "type": "object", + "description": "批量查询值班表使用的请求体。", + "required": [ + "schedule_ids" + ], + "properties": { + "schedule_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "值班表 ID 列表。" + } + } + }, + "ScheduleImNotify": { + "type": "object", + "description": "IM Webhook 通知条目。", + "required": [ + "type", + "settings" + ], + "properties": { + "type": { + "type": "string", + "description": "IM 提供方类型(如 feishu_app、dingtalk_app、wecom_app、teams_app、slack_app)。" + }, + "settings": { + "$ref": "#/components/schemas/ScheduleImNotifySettings" + } + } + }, + "ScheduleImNotifySettings": { + "type": "object", + "description": "IM Webhook 通知通道配置。", + "required": [ + "token", + "alias", + "data_source_id", + "chat_ids", + "verify_token", + "sign_secret" + ], + "properties": { + "token": { + "type": "string", + "description": "Webhook token。" + }, + "alias": { + "type": "string", + "description": "通道别名。" + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "数据源 ID。" + }, + "chat_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "会话 ID 列表。" + }, + "verify_token": { + "type": "string", + "description": "验签 token。" + }, + "sign_secret": { + "type": "string", + "description": "签名密钥。" + } + } + }, + "ScheduleInfoRequest": { + "type": "object", + "description": "值班表详情请求。start/end 指定计算值班分层的时间窗口,跨度必须小于 45 天。", + "required": [ + "schedule_id", + "start", + "end" + ], + "properties": { + "schedule_id": { + "type": "integer", + "format": "int64", + "description": "值班表 ID。" + }, + "start": { + "type": "integer", + "format": "int64", + "description": "窗口开始时间(Unix 秒,10 位)。" + }, + "end": { + "type": "integer", + "format": "int64", + "description": "窗口结束时间(Unix 秒,10 位)。" + } + } + }, + "ScheduleItem": { + "type": "object", + "description": "/schedule/info、/schedule/preview、/schedule/list 返回的完整值班表详情。", + "required": [ + "id", + "name", + "account_id", + "group_id", + "disabled", + "create_at", + "create_by", + "update_at", + "update_by", + "layers", + "schedule_layers", + "final_schedule", + "notify", + "schedule_id", + "schedule_name", + "team_id", + "description", + "layer_schedules", + "status", + "cur_oncall", + "next_oncall" + ], + "properties": { + "id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "description": "值班表 ID。/schedule/preview 返回时为 null。" + }, + "name": { + "type": [ + "string", + "null" + ], + "description": "旧版值班表名称字段(与 schedule_name 同义)。/schedule/preview 返回时为 null。" + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "账户 ID。" + }, + "group_id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "description": "旧版团队/组 ID。/schedule/preview 返回时为 null。" + }, + "disabled": { + "type": [ + "integer", + "null" + ], + "description": "禁用标记(0 = 启用,1 = 禁用),已废弃。/schedule/preview 返回时为 null。" + }, + "create_at": { + "type": "integer", + "format": "int64", + "description": "创建时间(Unix 秒)。" + }, + "create_by": { + "type": "integer", + "format": "int64", + "description": "创建人 ID。" + }, + "update_at": { + "type": "integer", + "format": "int64", + "description": "更新时间(Unix 秒)。" + }, + "update_by": { + "type": "integer", + "format": "int64", + "description": "更新人 ID。" + }, + "layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleLayer" + }, + "description": "值班表的轮转分层。" + }, + "field": { + "type": "string", + "description": "旧版字段更新接口使用的字段名。" + }, + "schedule_layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleCalculatedLayer" + }, + "description": "按窗口计算出的分层值班结果。" + }, + "final_schedule": { + "$ref": "#/components/schemas/ScheduleCalculatedLayer", + "description": "所有分层合并后的最终值班结果。" + }, + "start": { + "type": "integer", + "format": "int64", + "description": "窗口开始时间(Unix 秒)。" + }, + "end": { + "type": "integer", + "format": "int64", + "description": "窗口结束时间(Unix 秒)。" + }, + "notify": { + "$ref": "#/components/schemas/ScheduleNotify" + }, + "schedule_id": { + "type": "integer", + "format": "int64", + "description": "值班表 ID。" + }, + "schedule_name": { + "type": [ + "string", + "null" + ], + "description": "值班表显示名称。/schedule/preview 返回时为 null。" + }, + "team_id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "description": "所属团队 ID。/schedule/preview 返回时为 null。" + }, + "description": { + "type": [ + "string", + "null" + ], + "description": "值班表描述。/schedule/preview 返回时为 null。" + }, + "layer_schedules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleCalculatedLayer" + }, + "description": "与 schedule_layers 等价,用于旧版兼容。" + }, + "status": { + "type": [ + "integer", + "null" + ], + "description": "旧版状态字段,已废弃。/schedule/preview 返回时为 null。" + }, + "cur_oncall": { + "$ref": "#/components/schemas/ScheduleOncallGroup", + "description": "当前正在值班的组,无人值班时为 null。" + }, + "next_oncall": { + "$ref": "#/components/schemas/ScheduleOncallGroup", + "description": "下一次值班的组,未知时为 null。" + } + } + }, + "ScheduleLayer": { + "type": "object", + "description": "值班表中的单个分层。", + "required": [ + "account_id", + "name", + "schedule_id", + "hidden", + "mode", + "weight", + "groups", + "rotation_duration", + "handoff_time", + "enable_time", + "expire_time", + "restrict_mode", + "restrict_start", + "restrict_end", + "restrict_periods", + "day_mask", + "create_at", + "create_by", + "update_at", + "update_by", + "fair_rotation", + "rotation_unit", + "rotation_value", + "mask_continuous_enabled" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "账户 ID。" + }, + "name": { + "type": "string", + "description": "分层内部名称。" + }, + "schedule_id": { + "type": "integer", + "format": "int64", + "description": "所属值班表 ID。" + }, + "hidden": { + "type": "integer", + "description": "是否在页面上隐藏(0 = 否,1 = 是)。" + }, + "mode": { + "type": "integer", + "description": "分层模式:0 = 普通轮转,1 = 覆盖。", + "enum": [ + 0, + 1 + ] + }, + "weight": { + "type": "integer", + "description": "分层权重,用于排序。" + }, + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleGroup" + }, + "description": "参与轮转的值班组。" + }, + "rotation_duration": { + "type": "integer", + "format": "int64", + "description": "轮转周期(秒)。" + }, + "handoff_time": { + "type": "integer", + "format": "int64", + "description": "值班交接时间(秒)。" + }, + "enable_time": { + "type": "integer", + "format": "int64", + "description": "分层生效时间(Unix 秒)。" + }, + "expire_time": { + "type": "integer", + "format": "int64", + "description": "分层失效时间(Unix 秒,0 表示永不过期)。" + }, + "restrict_mode": { + "type": "integer", + "description": "限制模式:0 = 不限制,1 = day,2 = week。", + "enum": [ + 0, + 1, + 2 + ] + }, + "restrict_start": { + "type": "integer", + "format": "int64", + "description": "旧版限制区间开始偏移(秒)。" + }, + "restrict_end": { + "type": "integer", + "format": "int64", + "description": "旧版限制区间结束偏移(秒)。" + }, + "restrict_periods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleRestrictPeriod" + }, + "description": "每个值班周期内的限制区间集合。" + }, + "day_mask": { + "$ref": "#/components/schemas/ScheduleDayMask", + "description": "星期掩码。" + }, + "create_at": { + "type": "integer", + "format": "int64", + "description": "创建时间(Unix 秒)。" + }, + "create_by": { + "type": "integer", + "format": "int64", + "description": "创建人 ID。" + }, + "update_at": { + "type": "integer", + "format": "int64", + "description": "更新时间(Unix 秒)。" + }, + "update_by": { + "type": "integer", + "format": "int64", + "description": "更新人 ID。" + }, + "layer_name": { + "type": "string", + "description": "分层显示名称。" + }, + "fair_rotation": { + "type": "boolean", + "description": "是否启用公平轮转。" + }, + "layer_start": { + "type": "integer", + "format": "int64", + "description": "分层开始时间(Unix 秒)。" + }, + "layer_end": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "description": "分层结束时间(Unix 秒)。null 表示无结束时间。" + }, + "rotation_unit": { + "type": "string", + "description": "轮转单位。", + "enum": [ + "hour", + "day", + "week", + "month" + ] + }, + "rotation_value": { + "type": "integer", + "format": "int64", + "description": "轮转数量(每周期的 rotation_unit 个数)。" + }, + "mask_continuous_enabled": { + "type": "boolean", + "description": "是否启用连续掩码。" + } + } + }, + "ScheduleListRequest": { + "type": "object", + "description": "值班表列表请求。limit 默认 10、最大 100,p 默认 1。is_my_team 与 is_my_manage 不能同时为 true。", + "properties": { + "query": { + "type": "string", + "description": "搜索关键字,匹配值班表名称。" + }, + "p": { + "type": "integer", + "description": "页码(从 1 开始)。", + "default": 1 + }, + "limit": { + "type": "integer", + "description": "每页条数,默认 10、最大 100。", + "default": 10, + "maximum": 100 + }, + "is_my_team": { + "type": "boolean", + "description": "仅返回当前用户所在团队的值班表。" + }, + "is_my_manage": { + "type": "boolean", + "description": "仅返回当前用户在其团队内创建的值班表。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按团队 ID 过滤。" + }, + "start": { + "type": "integer", + "format": "int64", + "description": "与 end 同时传入时,响应会包含计算后的分层值班结果;跨度必须小于 45 天。" + }, + "end": { + "type": "integer", + "format": "int64", + "description": "窗口结束时间(Unix 秒)。" + } + } + }, + "ScheduleListResponse": { + "type": "object", + "description": "值班表列表响应。", + "required": [ + "items", + "total" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleItem" + }, + "description": "当前页的值班表列表。" + }, + "total": { + "type": "integer", + "format": "int64", + "description": "符合过滤条件的总条数。" + } + } + }, + "ScheduleMember": { + "type": "object", + "description": "值班组内成员条目。", + "required": [ + "role_id", + "person_ids" + ], + "properties": { + "role_id": { + "type": "integer", + "format": "int64", + "description": "值班角色 ID。" + }, + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "该角色下的用户 ID 列表。" + } + } + }, + "ScheduleNotify": { + "type": "object", + "description": "值班表的通知配置。", + "required": [ + "fixed_time", + "by", + "webhooks" + ], + "properties": { + "advance_in_time": { + "type": "integer", + "format": "int64", + "description": "提前通知时间(秒)。" + }, + "fixed_time": { + "$ref": "#/components/schemas/ScheduleFixedTimeNotifyInfo" + }, + "by": { + "$ref": "#/components/schemas/ScheduleNotifyBy" + }, + "im": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "旧版 IM 类型到 token 的映射。" + }, + "webhooks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleImNotify" + }, + "description": "IM Webhook 通知通道。" + } + } + }, + "ScheduleNotifyBy": { + "type": "object", + "description": "接收人的通知偏好。", + "required": [ + "follow_preference", + "personal_channels" + ], + "properties": { + "follow_preference": { + "type": "boolean", + "description": "是否跟随个人通知偏好。" + }, + "personal_channels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "个人通知通道列表。" + } + } + }, + "ScheduleOncallGroup": { + "type": "object", + "description": "当前或下一次值班组快照。", + "required": [ + "start", + "end", + "group", + "update_at", + "weight", + "index" + ], + "properties": { + "start": { + "type": "integer", + "format": "int64", + "description": "时段开始时间(Unix 秒)。" + }, + "end": { + "type": "integer", + "format": "int64", + "description": "时段结束时间(Unix 秒)。" + }, + "group": { + "$ref": "#/components/schemas/ScheduleGroup" + }, + "update_at": { + "type": "integer", + "format": "int64", + "description": "更新时间(Unix 秒)。" + }, + "weight": { + "type": "integer", + "description": "来源分层权重。" + }, + "index": { + "type": "integer", + "description": "轮转内索引。" + } + } + }, + "ScheduleRestrictPeriod": { + "type": "object", + "description": "单个值班周期内的限制区间。", + "required": [ + "restrict_start", + "restrict_end" + ], + "properties": { + "restrict_start": { + "type": "integer", + "format": "int64", + "description": "限制区间开始偏移。" + }, + "restrict_end": { + "type": "integer", + "format": "int64", + "description": "限制区间结束偏移。" + } + } + }, + "ScheduleSelfRequest": { + "type": "object", + "description": "查询当前用户值班表的参数。start 和 end 为 Unix 时间戳(秒),缺省时默认为 0。时间窗口不得超过 30 天。", + "properties": { + "start": { + "type": "integer", + "format": "int64", + "description": "时间窗口开始时间(Unix 秒,10 位)。" + }, + "end": { + "type": "integer", + "format": "int64", + "description": "时间窗口结束时间(Unix 秒,10 位),与 start 的差值不得超过 30 天。" + } + } + }, + "ScheduleSelfResponse": { + "type": "object", + "description": "/schedule/self 与 /schedule/infos 的响应,仅返回 items。", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleItem" + }, + "description": "当前用户被分配到的值班表(或请求指定的 ID 对应的值班表)。" + } + } + }, + "ScheduleUpsertRequest": { + "type": "object", + "description": "值班表创建/更新/预览共用的请求体,结构与值班表详情一致,此处仅列出常用字段。更新时需要 schedule_id;预览时 start、end 必填。", + "properties": { + "schedule_id": { + "type": "integer", + "format": "int64", + "description": "值班表 ID,更新时必填。" + }, + "schedule_name": { + "type": "string", + "description": "值班表显示名称,最长 40 字符。", + "maxLength": 40 + }, + "name": { + "type": "string", + "description": "旧版名称字段,当 schedule_name 为空时使用。", + "maxLength": 40 + }, + "description": { + "type": "string", + "description": "值班表描述,最长 500 字符。", + "maxLength": 500 + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID。" + }, + "layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleLayer" + }, + "description": "轮转分层。" + }, + "notify": { + "$ref": "#/components/schemas/ScheduleNotify" + }, + "start": { + "type": "integer", + "format": "int64", + "description": "预览窗口开始时间(Unix 秒,10 位),/schedule/preview 必填。" + }, + "end": { + "type": "integer", + "format": "int64", + "description": "预览窗口结束时间(Unix 秒,10 位),/schedule/preview 必填,且距 start 不超过 45 天。" + } + } + }, + "SilenceRuleItem": { + "type": "object", + "required": [ + "account_id", + "channel_id", + "priority", + "rule_name", + "description", + "time_filters", + "time_filter", + "filters", + "is_directly_discard", + "status", + "rule_id", + "updated_by", + "created_at", + "updated_at", + "is_effective" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64" + }, + "channel_id": { + "type": "integer", + "format": "int64" + }, + "priority": { + "type": "integer", + "description": "匹配优先级,数值越小越优先。" + }, + "rule_name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "from_incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "从故障创建静默时的源故障 ID。" + }, + "time_filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimeFilter" + }, + "description": "周期性时间窗口。" + }, + "time_filter": { + "$ref": "#/components/schemas/OnceTimeFilter" + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "is_directly_discard": { + "type": "boolean", + "description": "为 true 时静默的告警直接丢弃,不会生成故障。" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ] + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "updated_by": { + "type": "integer", + "format": "int64" + }, + "deleted_at": { + "type": "integer", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "is_effective": { + "type": "boolean", + "description": "当前是否正在生效。" + } + } + }, + "SnoozeIncidentRequest": { + "type": "object", + "description": "暂停故障通知的参数。", + "required": [ + "incident_ids", + "minutes" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "待暂停的故障 ID 列表,单次最多 100 条。" + }, + "minutes": { + "type": "integer", + "format": "int64", + "exclusiveMinimum": 0, + "maximum": 1440, + "description": "暂停时长(分钟),必须大于 0 且不超过 1440(24 小时)。" + } + } + }, + "StatusPageChangeCreateResponse": { + "type": "object", + "description": "创建状态页事件的结果。", + "required": [ + "change_id", + "change_name" + ], + "properties": { + "change_id": { + "type": "integer", + "format": "int64", + "description": "新创建的事件 ID。" + }, + "change_name": { + "type": "string", + "description": "事件标题(来自请求)。" + } + } + }, + "StatusPageChangeItem": { + "type": "object", + "description": "状态页事件(故障或维护)。", + "required": [ + "change_id", + "type", + "title" + ], + "properties": { + "change_id": { + "type": "integer", + "format": "int64", + "description": "事件 ID。" + }, + "page_id": { + "type": "integer", + "format": "int64", + "description": "所属状态页 ID。" + }, + "type": { + "type": "string", + "enum": [ + "incident", + "maintenance" + ], + "description": "事件类型。" + }, + "title": { + "type": "string", + "description": "事件标题。" + }, + "description": { + "type": "string", + "description": "事件描述(Markdown)。" + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "事件当前状态。故障事件支持 `investigating`/`identified`/`monitoring`/`resolved`;维护事件支持 `scheduled`/`ongoing`/`completed`。" + }, + "affected_components": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AffectedStatusPageComponentItem" + }, + "description": "当前受此事件影响的组件及其状态。" + }, + "responder_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "事件负责成员 ID 列表。" + }, + "linked_change_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "关联的事件 ID 列表(相关故障、发布等)。" + }, + "start_at_seconds": { + "type": "integer", + "format": "int64", + "description": "事件开始时间(Unix 秒)。" + }, + "close_at_seconds": { + "type": "integer", + "format": "int64", + "description": "计划结束时间(Unix 秒)。回溯事件和维护事件会设置此字段。" + }, + "is_retrospective": { + "type": "boolean", + "description": "是否为回溯(历史)事件。" + }, + "updates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusPageChangeUpdateItem" + }, + "description": "事件的时间线更新列表,按时间排序。" + }, + "notify_subscribers": { + "type": "boolean", + "description": "创建本事件时是否通知订阅者。" + }, + "auto_update_by_schedule": { + "type": "boolean", + "description": "仅维护事件:是否根据计划窗口自动推进状态。" + } + } + }, + "StatusPageChangeListResponse": { + "type": "object", + "description": "状态页事件列表。", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusPageChangeItem" + } + } + } + }, + "StatusPageChangeTimelineCreateResponse": { + "type": "object", + "description": "向状态页事件追加时间线更新的结果。", + "required": [ + "update_id" + ], + "properties": { + "update_id": { + "type": "string", + "description": "新创建的更新 ID。" + } + } + }, + "StatusPageChangeUpdateItem": { + "type": "object", + "description": "状态页事件的单条时间线更新。", + "required": [ + "update_id", + "at_seconds" + ], + "properties": { + "update_id": { + "type": "string", + "description": "更新 ID。" + }, + "at_seconds": { + "type": "integer", + "format": "int64", + "description": "更新时间戳(Unix 秒)。" + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "本次更新后的事件状态。当更新不改变整体状态时省略。" + }, + "description": { + "type": "string", + "description": "更新说明(Markdown)。" + }, + "component_changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusPageComponentChangeItem" + }, + "description": "本次更新应用的组件状态变更。" + } + } + }, + "StatusPageComponentChangeItem": { + "type": "object", + "description": "时间线更新中的组件状态变更。", + "required": [ + "component_id", + "status" + ], + "properties": { + "component_id": { + "type": "string", + "description": "组件 ID。" + }, + "component_name": { + "type": "string", + "description": "组件显示名称。读取时由后端填充,写入时忽略。" + }, + "status": { + "type": "string", + "enum": [ + "operational", + "degraded", + "partial_outage", + "full_outage", + "under_maintenance" + ], + "description": "组件新状态。故障事件支持 `operational`/`degraded`/`partial_outage`/`full_outage`;维护事件支持 `operational`/`under_maintenance`。" + } + } + }, + "StatusPageComponentItem": { + "type": "object", + "description": "状态页组件。", + "required": [ + "name" + ], + "properties": { + "component_id": { + "type": "string", + "description": "组件 ID。" + }, + "section_id": { + "type": "string", + "description": "所属区域 ID。" + }, + "name": { + "type": "string", + "description": "组件显示名称。" + }, + "description": { + "type": "string", + "description": "组件描述。" + }, + "available_since_seconds": { + "type": "integer", + "format": "int64", + "description": "组件首次可用时间(Unix 秒)。" + }, + "order_id": { + "type": "integer", + "format": "int64", + "description": "在所属区域内的显示顺序。" + }, + "hide_uptime": { + "type": "boolean", + "description": "为 true 时在摘要响应中隐藏可用率数据。" + }, + "hide_all": { + "type": "boolean", + "description": "为 true 时从摘要接口中完全隐藏该组件。" + } + } + }, + "StatusPageMigrationJob": { + "type": "object", + "description": "迁移任务的当前状态及进度。", + "required": [ + "job_id", + "account_id", + "source_page_id", + "target_page_id", + "phase", + "status", + "progress", + "created_at", + "updated_at" + ], + "properties": { + "job_id": { + "type": "string", + "description": "迁移任务 ID。" + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "所属账户 ID。" + }, + "source_page_id": { + "type": "string", + "description": "Atlassian Statuspage 源状态页 ID。" + }, + "target_page_id": { + "type": "integer", + "format": "int64", + "description": "Flashduty 目标状态页 ID。任务产出后设置,或由订阅者迁移接口上游传入。" + }, + "phase": { + "type": "string", + "enum": [ + "structure", + "history", + "subscribers" + ], + "description": "当前迁移阶段。" + }, + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "completed", + "failed", + "cancelled" + ], + "description": "任务当前状态。" + }, + "progress": { + "$ref": "#/components/schemas/StatusPageMigrationProgress", + "description": "按实体类型的进度计数。" + }, + "error": { + "type": "string", + "description": "`status` 为 `failed` 时的终态错误信息。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "任务创建时间(Unix 秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "任务最近一次状态更新时间(Unix 秒)。" + } + } + }, + "StatusPageMigrationProgress": { + "type": "object", + "description": "迁移任务的进度计数。", + "required": [ + "total_steps", + "completed_steps", + "components_imported", + "sections_imported", + "incidents_imported", + "maintenances_imported", + "subscribers_imported", + "templates_imported", + "subscribers_skipped" + ], + "properties": { + "total_steps": { + "type": "integer", + "description": "任务包含的总步骤数。" + }, + "completed_steps": { + "type": "integer", + "description": "已完成的步骤数。" + }, + "components_imported": { + "type": "integer" + }, + "sections_imported": { + "type": "integer" + }, + "incidents_imported": { + "type": "integer" + }, + "maintenances_imported": { + "type": "integer" + }, + "subscribers_imported": { + "type": "integer" + }, + "templates_imported": { + "type": "integer" + }, + "subscribers_skipped": { + "type": "integer", + "description": "跳过的订阅者数量(例如重复)。" + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + }, + "description": "任务执行过程中记录的非致命警告。" + } + } + }, + "StatusPageMigrationStartResponse": { + "type": "object", + "description": "启动迁移任务的结果。", + "required": [ + "job_id" + ], + "properties": { + "job_id": { + "type": "string", + "description": "迁移任务 ID。用于查询状态或请求取消。" + } + } + }, + "StatusPageSubscriberExportResponse": { + "type": "string", + "format": "binary", + "description": "CSV 文件(Content-Type: text/csv; charset=utf-8),包含列:Method、Recipient、Components、Subscribe All、Locale。" + }, + "StatusPageSubscriberListResponse": { + "type": "object", + "description": "状态页订阅者分页列表。", + "required": [ + "total", + "has_next_page", + "items" + ], + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "匹配的订阅者总数。" + }, + "has_next_page": { + "type": "boolean", + "description": "当前页之后是否还有下一页。" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportedStatusPageSubscriberItem" + } + } + } + }, + "SuccessEnvelope": { + "type": "object", + "description": "成功响应结构。2xx 响应中 `request_id` 标识本次调用(同时出现在 `Flashcat-Request-Id` 响应头中),`data` 为接口业务 payload。失败响应使用不同结构,参见 `ErrorResponse`。", + "properties": { + "request_id": { + "type": "string", + "description": "本次请求的唯一 ID,也会在 Flashcat-Request-Id 响应头中返回。反馈问题时请一并附上。", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "data": { + "description": "每个接口自己的业务 payload,详见各接口的 200 响应 schema。" + } + }, + "required": [ + "request_id", + "data" + ] + }, + "TemplateCreateRequest": { + "type": "object", + "description": "创建通知模板。", + "required": [ + "template_name" + ], + "properties": { + "team_id": { + "type": "integer", + "format": "int64", + "description": "团队归属。0 表示账户全局共享。", + "default": 0 + }, + "template_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "模板名称,同一账户内唯一,长度 1–39 个字符。", + "example": "生产环境默认模板" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "自定义描述。最多 500 字符。" + }, + "email": { + "type": "string", + "description": "邮件正文模板源(Go `html/template` 语法)。" + }, + "sms": { + "type": "string", + "description": "短信模板源(Go `text/template` 语法)。" + }, + "voice": { + "type": "string", + "description": "语音呼叫脚本模板源。" + }, + "dingtalk": { + "type": "string", + "description": "钉钉群机器人消息模板源。" + }, + "wecom": { + "type": "string", + "description": "企业微信群机器人消息模板源。" + }, + "feishu": { + "type": "string", + "description": "飞书群机器人消息模板源。" + }, + "feishu_app": { + "type": "string", + "description": "飞书应用消息模板源。" + }, + "dingtalk_app": { + "type": "string", + "description": "钉钉应用消息模板源。" + }, + "wecom_app": { + "type": "string", + "description": "企业微信应用消息模板源。" + }, + "slack_app": { + "type": "string", + "description": "Slack 应用消息模板源。" + }, + "teams_app": { + "type": "string", + "description": "Microsoft Teams 应用消息模板源。" + }, + "telegram": { + "type": "string", + "description": "Telegram 机器人消息模板源。" + }, + "slack": { + "type": "string", + "description": "Slack 机器人消息模板源。" + }, + "zoom": { + "type": "string", + "description": "Zoom 机器人消息模板源。" + } + } + }, + "TemplateCreateResponse": { + "type": "object", + "required": [ + "template_id", + "template_name" + ], + "properties": { + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "新创建的模板 ID。", + "example": "6605a1b2c3d4e5f6a7b8c9d0" + }, + "template_name": { + "type": "string", + "description": "从请求中回显的模板名称。", + "example": "生产环境默认模板" + } + } + }, + "TemplateIDRequest": { + "type": "object", + "required": [ + "template_id" + ], + "properties": { + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "要操作的模板 ID。传入 `000000000000000000000001` 可访问系统预置模板。", + "example": "6605a1b2c3d4e5f6a7b8c9d0" + } + } + }, + "TemplateItem": { + "type": "object", + "description": "一个通知模板。每个通道字段中存放该通道的模板源字符串;空字符串表示该通道没有自定义模板。", + "required": [ + "account_id", + "team_id", + "template_id", + "template_name", + "description", + "email", + "sms", + "voice", + "dingtalk", + "wecom", + "feishu", + "feishu_app", + "dingtalk_app", + "wecom_app", + "slack_app", + "teams_app", + "telegram", + "slack", + "zoom", + "status", + "creator_id", + "updated_by", + "created_at", + "updated_at" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "所属账户 ID。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID,0 表示账户全局共享。" + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "模板 ID。", + "example": "6605a1b2c3d4e5f6a7b8c9d0" + }, + "template_name": { + "type": "string", + "description": "模板名称,同一账户内唯一。" + }, + "description": { + "type": "string", + "description": "自定义描述。" + }, + "email": { + "type": "string", + "description": "邮件正文模板源(Go `html/template` 语法)。" + }, + "sms": { + "type": "string", + "description": "短信模板源(Go `text/template` 语法)。" + }, + "voice": { + "type": "string", + "description": "语音呼叫脚本模板源。" + }, + "dingtalk": { + "type": "string", + "description": "钉钉群机器人消息模板源。" + }, + "wecom": { + "type": "string", + "description": "企业微信群机器人消息模板源。" + }, + "feishu": { + "type": "string", + "description": "飞书群机器人消息模板源。" + }, + "feishu_app": { + "type": "string", + "description": "飞书应用消息模板源。" + }, + "dingtalk_app": { + "type": "string", + "description": "钉钉应用消息模板源。" + }, + "wecom_app": { + "type": "string", + "description": "企业微信应用消息模板源。" + }, + "slack_app": { + "type": "string", + "description": "Slack 应用消息模板源。" + }, + "teams_app": { + "type": "string", + "description": "Microsoft Teams 应用消息模板源。" + }, + "telegram": { + "type": "string", + "description": "Telegram 机器人消息模板源。" + }, + "slack": { + "type": "string", + "description": "Slack 机器人消息模板源。" + }, + "zoom": { + "type": "string", + "description": "Zoom 机器人消息模板源。" + }, + "status": { + "type": "string", + "description": "模板生命周期状态。", + "enum": [ + "enabled", + "disabled", + "deleted" + ] + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "创建人成员 ID。" + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "最后修改人成员 ID。" + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "软删除时间(Unix 秒)。模板未删除时字段缺省(omitempty)。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间(Unix 秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最近更新时间(Unix 秒)。" + } + } + }, + "TemplateListRequest": { + "type": "object", + "description": "分页过滤条件。默认 p=1、limit=20,limit 上限为 100。", + "properties": { + "p": { + "type": "integer", + "description": "页码,从 1 开始。", + "minimum": 1, + "default": 1, + "example": 1 + }, + "limit": { + "type": "integer", + "description": "分页大小,最大 100。", + "minimum": 1, + "maximum": 100, + "default": 20, + "example": 20 + }, + "orderby": { + "type": "string", + "description": "排序字段。", + "enum": [ + "created_at", + "updated_at" + ] + }, + "asc": { + "type": "boolean", + "description": "升序排序。", + "default": false + }, + "is_my_team": { + "type": "boolean", + "description": "为 true 时只返回当前成员所属团队范围内的模板。", + "default": false + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按团队 ID 列表过滤。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "按创建人成员 ID 过滤。" + }, + "query": { + "type": "string", + "description": "按模板名称做正则或子串匹配。" + } + } + }, + "TemplateListResponse": { + "type": "object", + "description": "通知模板的分页列表。", + "required": [ + "total", + "has_next_page", + "items" + ], + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "符合过滤条件的模板总数。", + "example": 47 + }, + "has_next_page": { + "type": "boolean", + "description": "是否还有下一页。", + "example": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TemplateItem" + } + } + } + }, + "TemplateUpdateRequest": { + "type": "object", + "description": "更新已存在的模板。", + "required": [ + "template_id", + "template_name" + ], + "properties": { + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "目标模板 ID。", + "example": "6605a1b2c3d4e5f6a7b8c9d0" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "团队归属。0 表示账户全局共享。", + "default": 0 + }, + "template_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "模板名称,长度 1–39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "自定义描述。最多 500 字符。" + }, + "email": { + "type": "string", + "description": "邮件正文模板源(Go `html/template` 语法)。" + }, + "sms": { + "type": "string", + "description": "短信模板源(Go `text/template` 语法)。" + }, + "voice": { + "type": "string", + "description": "语音呼叫脚本模板源。" + }, + "dingtalk": { + "type": "string", + "description": "钉钉群机器人消息模板源。" + }, + "wecom": { + "type": "string", + "description": "企业微信群机器人消息模板源。" + }, + "feishu": { + "type": "string", + "description": "飞书群机器人消息模板源。" + }, + "feishu_app": { + "type": "string", + "description": "飞书应用消息模板源。" + }, + "dingtalk_app": { + "type": "string", + "description": "钉钉应用消息模板源。" + }, + "wecom_app": { + "type": "string", + "description": "企业微信应用消息模板源。" + }, + "slack_app": { + "type": "string", + "description": "Slack 应用消息模板源。" + }, + "teams_app": { + "type": "string", + "description": "Microsoft Teams 应用消息模板源。" + }, + "telegram": { + "type": "string", + "description": "Telegram 机器人消息模板源。" + }, + "slack": { + "type": "string", + "description": "Slack 机器人消息模板源。" + }, + "zoom": { + "type": "string", + "description": "Zoom 机器人消息模板源。" + } + } + }, + "TimeFilter": { + "type": "object", + "description": "周期性时间窗口。`start`/`end` 采用 24 小时制 `HH:MM`;`repeat` 采用 ISO 风格的星期索引(0=周日 … 6=周六)。", + "properties": { + "start": { + "type": "string", + "description": "窗口开始时间(`HH:MM`)。" + }, + "end": { + "type": "string", + "description": "窗口结束时间(`HH:MM`)。" + }, + "repeat": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "窗口每周生效的日期,空表示每天。" + }, + "cal_id": { + "type": "string", + "description": "可选日历 ID,将窗口限制为日历中的匹配日期。" + }, + "is_off": { + "type": "boolean", + "description": "为 true 时匹配日历中标记为休息日的日期。" + } + } + }, + "UnackIncidentRequest": { + "type": "object", + "description": "取消认领故障的参数。", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "待取消认领的故障 ID 列表,单次最多 100 条。", + "minItems": 1 + } + } + }, + "UnsubscribeRuleItem": { + "type": "object", + "description": "排除规则记录。", + "required": [ + "account_id", + "channel_id", + "priority", + "rule_name", + "description", + "filters", + "status", + "rule_id", + "updated_by", + "created_at", + "updated_at" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64" + }, + "channel_id": { + "type": "integer", + "format": "int64" + }, + "priority": { + "type": "integer" + }, + "rule_name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ] + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "updated_by": { + "type": "integer", + "format": "int64" + }, + "deleted_at": { + "type": "integer", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + } + } + }, + "UpdateChannelRequest": { + "type": "object", + "required": [ + "channel_id" + ], + "description": "更新协作空间所需参数,仅传入的字段会被更新。", + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "要更新的协作空间 ID。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "新的所属团队 ID。" + }, + "managing_team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "maxItems": 3, + "description": "可管理该协作空间的其他团队 ID,最多 3 个。" + }, + "channel_name": { + "type": "string", + "minLength": 1, + "maxLength": 59, + "description": "新的协作空间名称,1 到 59 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "新的描述信息,最多 500 个字符。" + }, + "auto_resolve_timeout": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 2592000, + "description": "自动恢复超时,单位秒。0 表示不自动恢复,最长 30 天。" + }, + "auto_resolve_mode": { + "type": "string", + "enum": [ + "trigger", + "update" + ], + "description": "自动恢复计时重置方式。" + }, + "is_private": { + "type": "boolean", + "description": "为 true 时仅管理团队可见。" + }, + "group": { + "$ref": "#/components/schemas/Group" + }, + "flapping": { + "$ref": "#/components/schemas/Flapping" + }, + "disable_outlier_detection": { + "type": "boolean", + "description": "禁用新奇故障检测。" + }, + "disable_auto_close": { + "type": "boolean", + "description": "禁用故障自动关闭。" + }, + "is_external_report_enabled": { + "type": "boolean", + "description": "允许外部上报人向该协作空间上报故障。" + } + } + }, + "UpdateChannelResponse": { + "type": "object", + "description": "更新协作空间的响应。仅在请求中将 `is_external_report_enabled` 设为 `true` 时返回有效字段,否则所有字段为空。", + "properties": { + "external_report_token": { + "type": "string", + "description": "新生成的外部上报令牌。仅在请求中将 `is_external_report_enabled` 设为 `true` 时返回。调用方应保存此值,之后无法再次获取。" + } + } + }, + "UpdateDropRuleRequest": { + "type": "object", + "description": "更新排除规则所需参数。", + "required": [ + "channel_id", + "rule_id", + "rule_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID。" + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "排除规则 ID(MongoDB ObjectID)。" + }, + "priority": { + "type": "integer", + "description": "匹配优先级,数值越小越优先。" + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "规则名称,1 到 39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "规则描述,最多 500 个字符。" + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + } + } + }, + "UpdateEscalationRuleRequest": { + "type": "object", + "description": "更新分派策略所需参数。", + "required": [ + "channel_id", + "rule_id", + "template_id", + "rule_name", + "layers" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID。" + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "分派策略 ID(MongoDB ObjectID)。" + }, + "priority": { + "type": "integer", + "description": "匹配优先级,数值越小越优先。" + }, + "aggr_window": { + "type": "integer", + "description": "聚合窗口,单位秒,0 表示不聚合。" + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "通知模板 ID(MongoDB ObjectID)。" + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "策略名称,1 到 39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "策略描述,最多 500 个字符。" + }, + "layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EscalateLayer" + }, + "description": "分派环节列表,至少包含一个环节。" + }, + "time_filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimeFilter" + }, + "description": "可选的周期性生效时间窗口。" + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + } + } + }, + "UpdateIncidentFieldsRequest": { + "type": "object", + "description": "更新故障可编辑字段的参数。至少需要提供一个字段;handler 只会更新显式传入的字段。", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + }, + "title": { + "type": "string", + "minLength": 3, + "maxLength": 200, + "description": "新标题。" + }, + "description": { + "type": "string", + "minLength": 3, + "maxLength": 6144, + "description": "新描述。" + }, + "impact": { + "type": "string", + "minLength": 3, + "maxLength": 6144, + "description": "新影响描述。" + }, + "root_cause": { + "type": "string", + "minLength": 3, + "maxLength": 6144, + "description": "新根因分析。" + }, + "resolution": { + "type": "string", + "minLength": 3, + "maxLength": 6144, + "description": "新解决方案说明。" + }, + "incident_severity": { + "type": "string", + "enum": [ + "Info", + "Warning", + "Critical" + ], + "description": "新严重程度。" + } + } + }, + "UpdateInhibitRuleRequest": { + "type": "object", + "description": "更新抑制策略所需参数。", + "required": [ + "channel_id", + "rule_id", + "rule_name", + "equals" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID。" + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "抑制策略 ID(MongoDB ObjectID)。" + }, + "priority": { + "type": "integer", + "description": "匹配优先级,数值越小越优先。" + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "策略名称,1 到 39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "策略描述,最多 500 个字符。" + }, + "equals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "用于配对源告警与目标告警的 label 键列表。" + }, + "source_filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "target_filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "is_directly_discard": { + "type": "boolean", + "description": "为 true 时被抑制的目标告警直接丢弃,而非合并。" + } + } + }, + "UpdateSilenceRuleRequest": { + "type": "object", + "description": "更新静默策略所需参数。`time_filter` 与 `time_filters` 必须且只能传一个,`filters` 不能为空。", + "required": [ + "channel_id", + "rule_id", + "rule_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID。" + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "静默策略 ID(MongoDB ObjectID)。" + }, + "priority": { + "type": "integer", + "description": "匹配优先级,数值越小越优先。" + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "策略名称,1 到 39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "策略描述,最多 500 个字符。" + }, + "time_filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimeFilter" + }, + "description": "周期性时间窗口,与 `time_filter` 互斥。" + }, + "time_filter": { + "$ref": "#/components/schemas/OnceTimeFilter" + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "is_directly_discard": { + "type": "boolean", + "description": "为 true 时静默的告警直接丢弃,而非抑制为故障。" + } + } + }, + "UpdateStatusPageChangeRequest": { + "type": "object", + "description": "更新状态页事件可编辑字段所需的参数。", + "required": [ + "page_id", + "change_id" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "状态页 ID。" + }, + "change_id": { + "type": "integer", + "format": "int64", + "description": "目标事件 ID。" + }, + "title": { + "type": "string", + "maxLength": 255, + "description": "新的事件标题,最多 255 个字符。留空表示保持原值。" + }, + "responders": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "事件负责成员 ID 列表。传入完整替换列表。" + }, + "linked_changes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "关联的事件 ID 列表。传入完整替换列表。" + } + } + }, + "UpdateStatusPageChangeTimelineRequest": { + "type": "object", + "description": "更新状态页事件已有时间线条目所需的参数。", + "required": [ + "page_id", + "change_id", + "update_id" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "状态页 ID。" + }, + "change_id": { + "type": "integer", + "format": "int64", + "description": "所属事件 ID。" + }, + "update_id": { + "type": "string", + "description": "目标时间线更新 ID。" + }, + "at_seconds": { + "type": "integer", + "format": "int64", + "description": "新的更新时间戳(Unix 秒)。" + }, + "description": { + "type": "string", + "description": "新的更新说明(Markdown)。" + } + } + }, + "UpsertRouteRequest": { + "type": "object", + "description": "创建或更新集成路由规则的参数。当指定集成尚无规则时执行创建,否则覆盖原有规则。`cases` 与 `default` 至少需要提供其一。", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "所属集成 ID。" + }, + "cases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteCase" + }, + "description": "有序的 case 分支列表,自上而下依次匹配。" + }, + "sections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteSection" + }, + "description": "可选的分区,用于将连续的 case 进行视觉分组。" + }, + "default": { + "$ref": "#/components/schemas/RouteDefault" + }, + "version": { + "type": "integer", + "format": "int64", + "description": "用于乐观并发控制的当前版本号,传入最近一次读取时返回的值。" + } + } + }, + "WakeIncidentRequest": { + "type": "object", + "description": "恢复故障通知的参数。", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "待恢复通知的故障 ID 列表,单次最多 100 条。", + "minItems": 1 + } + } + }, + "WarRoom": { + "type": "object", + "description": "从 IM 侧拉取的战情室实时详情。若群组已在 IM 侧被删除则返回空对象。", + "required": [ + "chat_id", + "chat_name", + "share_link" + ], + "properties": { + "chat_id": { + "type": "string", + "description": "IM 侧的群/会话 ID。" + }, + "chat_name": { + "type": "string", + "description": "群组显示名称。" + }, + "share_link": { + "type": "string", + "description": "加入链接,若 IM 提供。" + } + } + }, + "WarRoomItem": { + "type": "object", + "description": "战情室记录。", + "required": [ + "account_id", + "integration_id", + "created_by", + "chat_id", + "incident_id", + "status", + "created_at", + "plugin_type" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "账号 ID。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "IM 集成 ID。" + }, + "created_by": { + "type": "integer", + "format": "int64", + "description": "创建成员 ID。" + }, + "chat_id": { + "type": "string", + "description": "IM 侧的群/会话 ID。" + }, + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "关联的故障 ID(MongoDB ObjectID)。" + }, + "status": { + "type": "string", + "description": "战情室状态。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间戳(秒)。" + }, + "plugin_type": { + "type": "string", + "description": "IM 插件类型(如 `feishu`、`dingtalk`、`wecom`、`slack`)。" + } + } + }, + "WebhookHistoryDetail": { + "type": "object", + "description": "Webhook 推送的完整详情。相较 `WebhookHistoryItem`,额外附带查询时解析出的引用元信息。", + "required": [ + "integration_id", + "event_id", + "webhook_type", + "event_type", + "endpoint", + "attempt", + "duration", + "status", + "status_code", + "event_time" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "集成 ID。" + }, + "event_id": { + "type": "string", + "description": "事件 ID。" + }, + "webhook_type": { + "type": "string", + "description": "来源对象类型:`incident` 或 `alert`。" + }, + "event_type": { + "type": "string", + "description": "事件类型。" + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "协作空间 ID(若有)。" + }, + "ref_id": { + "type": "string", + "description": "来源对象 ID。" + }, + "request_headers": { + "type": "string", + "description": "序列化的出站请求头。" + }, + "request_body": { + "type": "string", + "description": "出站请求体。" + }, + "endpoint": { + "type": "string", + "description": "目标地址。" + }, + "attempt": { + "type": "integer", + "description": "尝试次数。" + }, + "duration": { + "type": "integer", + "description": "整次尝试耗时(毫秒)。" + }, + "status": { + "type": "string", + "enum": [ + "success", + "failed" + ], + "description": "投递结果。" + }, + "status_code": { + "type": "integer", + "description": "HTTP 状态码。" + }, + "error_message": { + "type": "string", + "description": "投递失败时的错误信息。" + }, + "response_headers": { + "type": "string", + "description": "序列化的响应头。" + }, + "response_body": { + "type": "string", + "description": "响应体。" + }, + "event_time": { + "type": "string", + "description": "事件时间的格式化时间串。" + }, + "ref_title": { + "type": "string", + "description": "查询时解析出的来源故障或告警标题。" + }, + "channel_name": { + "type": "string", + "description": "查询时解析出的关联协作空间名称。" + } + } + }, + "WebhookHistoryItem": { + "type": "object", + "description": "一次 Webhook 投递记录。带 `omitempty` 的字段在取零值时会被省略。", + "required": [ + "integration_id", + "event_id", + "webhook_type", + "event_type", + "endpoint", + "attempt", + "duration", + "status", + "status_code", + "event_time" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "触发 Webhook 的集成 ID。" + }, + "event_id": { + "type": "string", + "description": "本次投递的唯一事件 ID。" + }, + "webhook_type": { + "type": "string", + "description": "来源对象类型:`incident` 或 `alert`。" + }, + "event_type": { + "type": "string", + "description": "事件类型(如 `created`、`acknowledged`、`closed`)。" + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "事件所属协作空间 ID(若有)。" + }, + "ref_id": { + "type": "string", + "description": "来源对象 ID(故障或告警 ID)。" + }, + "request_headers": { + "type": "string", + "description": "序列化的出站请求头。" + }, + "request_body": { + "type": "string", + "description": "出站请求体。" + }, + "endpoint": { + "type": "string", + "description": "目标地址。" + }, + "attempt": { + "type": "integer", + "description": "尝试次数。" + }, + "duration": { + "type": "integer", + "description": "整次尝试耗时(毫秒)。" + }, + "status": { + "type": "string", + "enum": [ + "success", + "failed" + ], + "description": "投递结果。" + }, + "status_code": { + "type": "integer", + "description": "目标返回的 HTTP 状态码。" + }, + "error_message": { + "type": "string", + "description": "投递失败时的错误信息。" + }, + "response_headers": { + "type": "string", + "description": "序列化的响应头。" + }, + "response_body": { + "type": "string", + "description": "目标返回的响应体。" + }, + "event_time": { + "type": "string", + "description": "事件时间的格式化时间串。" + } + } + } + } + } +} diff --git a/api-reference/openapi.en.json b/api-reference/openapi.en.json new file mode 100644 index 0000000..63b6aa6 --- /dev/null +++ b/api-reference/openapi.en.json @@ -0,0 +1,34256 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Flashduty Open API", + "description": "Public HTTP API for the Flashduty incident management platform — incidents, notification templates, channels, schedules, monitors, RUM, and platform administration. Every operation is authenticated with an `app_key` query parameter issued from the Flashduty console under Account → APP Keys. Responses follow a uniform envelope: `{ request_id, data }` on success, `{ request_id, error }` on failure.", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://api.flashcat.cloud", + "description": "Flashduty Open API" + } + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "tags": [ + { + "name": "On-call/Incidents", + "description": "" + }, + { + "name": "On-call/Channels", + "description": "" + }, + { + "name": "On-call/Alerts", + "description": "Search, inspect, and act on alerts. Manage card views and alert processing pipelines." + }, + { + "name": "On-call/Integrations", + "description": "" + }, + { + "name": "On-call/Schedules", + "description": "" + }, + { + "name": "On-call/Calendars", + "description": "" + }, + { + "name": "On-call/Notification templates", + "description": "" + }, + { + "name": "On-call/Alert enrichment", + "description": "Custom fields, enrichment rules, and data mapping (schema, data, API)." + }, + { + "name": "On-call/Analytics", + "description": "" + }, + { + "name": "On-call/Status pages", + "description": "" + }, + { + "name": "Monitors/Alert rules", + "description": "Create, manage, and export monitor alert rules. Query rule counters and audit history." + }, + { + "name": "Monitors/Data sources", + "description": "Manage monitoring data sources used by alert rules to query metrics." + }, + { + "name": "Monitors/Rule sets", + "description": "Manage shared rule sets (rulesets) in the Monitors rule repository. Rulesets can be shared publicly or within an account." + }, + { + "name": "RUM/Applications", + "description": "Manage Real User Monitoring (RUM) applications." + }, + { + "name": "RUM/Issues", + "description": "Query and manage RUM error tracking issues and preset severity rules." + }, + { + "name": "RUM/Sourcemaps", + "description": "Manage and query RUM sourcemap files for browser, Android, and iOS error symbolication." + }, + { + "name": "Platform/Members", + "description": "" + }, + { + "name": "Platform/Teams", + "description": "" + }, + { + "name": "Platform/Roles & permissions", + "description": "" + }, + { + "name": "Platform/Audit logs", + "description": "Search and retrieve account operation audit logs." + } + ], + "paths": { + "/incident/list": { + "post": { + "operationId": "incidentList", + "summary": "List incidents", + "description": "Query a paginated list of incidents with filters by channel, severity, status, responder, and time range.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-list", + "metadata": { + "sidebarTitle": "List incidents" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/IncidentListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 88, + "has_next_page": true, + "search_after_ctx": "69da451ef77b1b51f40e83eb", + "items": [ + { + "incident_id": "69da451ef77b1b51f40e83ee", + "account_id": 2451002751131, + "channel_id": 2551105804131, + "integration_id": 2490562293131, + "integration_ids": [ + 2490562293131 + ], + "integration_types": [ + "monit.alert" + ], + "dedup_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata", + "equals_md5": "", + "start_time": 1775912219, + "end_time": 0, + "last_time": 1775969819, + "ack_time": 0, + "close_time": 0, + "creator_id": 0, + "closer_id": 0, + "owner_id": 0, + "incident_status": "Critical", + "incident_severity": "Critical", + "progress": "Triggered", + "title": "CPU usage high - web-server-01", + "description": "", + "ai_summary": "", + "impact": "", + "root_cause": "", + "resolution": "", + "num": "0E83EE", + "frequency": "frequent", + "created_at": 1775912222, + "updated_at": 1775972145, + "snoozed_before": 0, + "group_method": "n", + "ever_muted": false, + "labels": { + "check": "cpu_usage_high", + "resource": "web-server-01", + "env": "production" + }, + "fields": {}, + "assigned_to": { + "person_ids": [ + 2476444212131 + ], + "escalate_rule_id": "000000000000000000000000", + "layer_idx": 0, + "type": "assign", + "assigned_at": 1775972128, + "id": "MvQfH9Dc8eNS8k79jmrWn6", + "escalate_rule_name": "" + }, + "alert_cnt": 1, + "active_alert_cnt": 1, + "alert_event_cnt": 17, + "responders": [ + { + "person_id": 2476444212131, + "assigned_at": 1775972128, + "acknowledged_at": 0 + } + ], + "account_name": "", + "account_locale": "", + "account_time_zone": "", + "channel_name": "Ops Channel", + "channel_status": "enabled", + "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee", + "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee", + "integration_type": "monit.alert", + "post_mortem_id": "", + "images": null, + "manual_overrides": [ + "title" + ] + } + ] + } + } + } + } + }, + "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/ListIncidentsRequest" + }, + "example": { + "start_time": 1711900800, + "end_time": 1712000000, + "progress": "Triggered,Processing", + "incident_severity": "Critical,Warning", + "channel_ids": [ + 2551105804131 + ], + "limit": 20, + "p": 1 + } + } + } + } + } + }, + "/incident/info": { + "post": { + "operationId": "incidentInfo", + "summary": "Get incident detail", + "description": "Retrieve detailed information for a single incident including timeline, alerts, responders and custom fields.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-info", + "metadata": { + "sidebarTitle": "Get incident detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/IncidentInfo" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "incident_id": "69da451ef77b1b51f40e83ee", + "account_id": 2451002751131, + "channel_id": 2551105804131, + "integration_id": 2490562293131, + "integration_ids": [ + 2490562293131 + ], + "integration_types": [ + "monit.alert" + ], + "dedup_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata", + "equals_md5": "", + "start_time": 1775912219, + "end_time": 0, + "last_time": 1775969819, + "ack_time": 0, + "close_time": 0, + "creator_id": 0, + "closer_id": 0, + "owner_id": 0, + "incident_status": "Critical", + "incident_severity": "Critical", + "progress": "Triggered", + "title": "CPU usage high - web-server-01", + "description": "", + "ai_summary": "", + "impact": "", + "root_cause": "", + "resolution": "", + "num": "0E83EE", + "frequency": "frequent", + "created_at": 1775912222, + "updated_at": 1775972145, + "snoozed_before": 0, + "group_method": "n", + "ever_muted": false, + "labels": { + "check": "cpu_usage_high", + "resource": "web-server-01", + "env": "production" + }, + "fields": {}, + "assigned_to": { + "person_ids": [ + 2476444212131 + ], + "escalate_rule_id": "000000000000000000000000", + "layer_idx": 0, + "type": "assign", + "assigned_at": 1775972128, + "id": "MvQfH9Dc8eNS8k79jmrWn6", + "escalate_rule_name": "" + }, + "alert_cnt": 1, + "active_alert_cnt": 1, + "alert_event_cnt": 17, + "responders": [ + { + "person_id": 2476444212131, + "assigned_at": 1775972128, + "acknowledged_at": 0 + } + ], + "account_name": "", + "account_locale": "", + "account_time_zone": "", + "channel_name": "Ops Channel", + "channel_status": "enabled", + "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee", + "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee", + "integration_type": "monit.alert", + "post_mortem_id": "", + "images": null, + "manual_overrides": [ + "title" + ] + } + } + } + } + }, + "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/IncidentInfoRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee" + } + } + } + } + } + }, + "/incident/list-by-ids": { + "post": { + "operationId": "incidentListByIds", + "summary": "List incidents by IDs", + "description": "Retrieve multiple incidents by their IDs in a single request.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-list-by-ids", + "metadata": { + "sidebarTitle": "List incidents by IDs" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/IncidentListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 2, + "has_next_page": false, + "items": [ + { + "incident_id": "69da451ef77b1b51f40e83ee", + "account_id": 2451002751131, + "channel_id": 2551105804131, + "integration_id": 2490562293131, + "integration_ids": [ + 2490562293131 + ], + "integration_types": [ + "monit.alert" + ], + "dedup_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata", + "equals_md5": "", + "start_time": 1775912219, + "end_time": 0, + "last_time": 1775969819, + "ack_time": 0, + "close_time": 0, + "creator_id": 0, + "closer_id": 0, + "owner_id": 0, + "incident_status": "Critical", + "incident_severity": "Critical", + "progress": "Triggered", + "title": "CPU usage high - web-server-01", + "description": "", + "ai_summary": "", + "impact": "", + "root_cause": "", + "resolution": "", + "num": "0E83EE", + "frequency": "frequent", + "created_at": 1775912222, + "updated_at": 1775972145, + "snoozed_before": 0, + "group_method": "n", + "ever_muted": false, + "labels": {}, + "fields": {}, + "assigned_to": { + "escalate_rule_id": "000000000000000000000000", + "layer_idx": 0, + "type": "", + "assigned_at": 0, + "id": "", + "escalate_rule_name": "" + }, + "alert_cnt": 1, + "active_alert_cnt": 1, + "alert_event_cnt": 17, + "responders": [], + "account_name": "", + "account_locale": "", + "account_time_zone": "", + "channel_name": "Ops Channel", + "channel_status": "enabled", + "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee", + "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee", + "integration_type": "monit.alert", + "post_mortem_id": "", + "images": null, + "manual_overrides": null + } + ] + } + } + } + } + }, + "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/ListIncidentsByIdsRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee", + "69da451ef77b1b51f40e83ef" + ] + } + } + } + } + } + }, + "/incident/alert/list": { + "post": { + "operationId": "incidentAlertList", + "summary": "List alerts of incident", + "description": "List all alerts merged into a specific incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-alert-list", + "metadata": { + "sidebarTitle": "List alerts of incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListIncidentAlertsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "items": [ + { + "alert_id": "69da451df77b1b51f40e83de", + "integration_id": 2490562293131, + "data_source_id": 2490562293131, + "channel_id": 2551105804131, + "account_id": 2451002751131, + "description": "", + "title": "CPU usage high - web-server-01", + "title_rule": "", + "alert_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata", + "alert_severity": "Critical", + "alert_status": "Critical", + "start_time": 1775912219, + "last_time": 1775969819, + "end_time": 0, + "labels": { + "check": "cpu_usage_high", + "resource": "web-server-01" + }, + "ever_muted": false, + "created_at": 1775912221, + "updated_at": 1775969821, + "integration_name": "FlashMonit", + "integration_type": "monit.alert", + "integration_ref_id": "a_2451002751131", + "channel_name": "Ops Channel", + "channel_status": "enabled", + "responder_name": "", + "responder_email": "", + "incident": { + "incident_id": "69da451ef77b1b51f40e83ee", + "title": "CPU usage high - web-server-01", + "progress": "Triggered" + }, + "event_cnt": 17, + "images": null, + "data_source_name": "FlashMonit", + "data_source_type": "monit.alert", + "data_source_ref_id": "a_2451002751131" + } + ] + } + } + } + } + }, + "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/ListIncidentAlertsRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "is_active": true, + "limit": 100, + "p": 1 + } + } + } + } + } + }, + "/incident/feed": { + "post": { + "operationId": "incidentFeed", + "summary": "Get incident timeline", + "description": "Retrieve the timeline feed for a specific incident, including state changes, comments and system events.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-feed", + "metadata": { + "sidebarTitle": "Get incident timeline" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListIncidentFeedResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "has_next_page": true, + "items": [ + { + "ref_id": "69da451ef77b1b51f40e83ee", + "type": "i_new", + "detail": { + "severity": "Critical", + "title": "CPU usage high - web-server-01" + }, + "account_id": 2451002751131, + "creator_id": 0, + "created_at": 1775912222661, + "updated_at": 1775912222661 + }, + { + "ref_id": "69da451ef77b1b51f40e83ee", + "type": "i_notify", + "detail": { + "rid": "5e9ccfabcd154b41a0005fd0f52b674b", + "msg_id": "naFudJYCawBWsChdV6ErPH", + "fire_type": "fire", + "escalate_rule_id": "000000000000000000000000", + "layer_idx": 0, + "by": "email", + "persons": [ + { + "person_id": 2476444212131 + } + ] + }, + "account_id": 2451002751131, + "creator_id": 0, + "created_at": 1775972130174, + "updated_at": 1775972130174 + } + ] + } + } + } + } + }, + "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/ListIncidentFeedRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "p": 1, + "limit": 20 + } + } + } + } + } + }, + "/incident/past/list": { + "post": { + "operationId": "incidentPastList", + "summary": "List past incidents", + "description": "List historical incidents related to the current incident for reference during triage.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/minute**; **20 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-past-list", + "metadata": { + "sidebarTitle": "List past incidents" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListPastIncidentsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [] + } + } + } + } + }, + "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/ListPastIncidentsRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "limit": 5 + } + } + } + } + } + }, + "/incident/create": { + "post": { + "operationId": "incidentCreate", + "summary": "Create incident", + "description": "Manually create a new incident and assign responders.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-create", + "metadata": { + "sidebarTitle": "Create incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CreateIncidentResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "incident_id": "69db2ef1a0fe7db6448b14f1", + "title": "API test incident for docs" + } + } + } + } + }, + "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/CreateIncidentRequest" + }, + "example": { + "incident_severity": "Critical", + "title": "Database connection timeout on prod-db-01", + "channel_id": 2551105804131, + "assigned_to": { + "person_ids": [ + 2476444212131 + ] + } + } + } + } + } + } + }, + "/incident/ack": { + "post": { + "operationId": "incidentAck", + "summary": "Acknowledge incident", + "description": "Acknowledge an incident to indicate you are actively working on it.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-ack", + "metadata": { + "sidebarTitle": "Acknowledge incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AckIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] + } + } + } + } + } + }, + "/incident/unack": { + "post": { + "operationId": "incidentUnack", + "summary": "Unacknowledge incident", + "description": "Remove the acknowledge status from an incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-unack", + "metadata": { + "sidebarTitle": "Unacknowledge incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnackIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] + } + } + } + } + } + }, + "/incident/resolve": { + "post": { + "operationId": "incidentResolve", + "summary": "Resolve incident", + "description": "Mark an incident as resolved.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-resolve", + "metadata": { + "sidebarTitle": "Resolve incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResolveIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ], + "root_cause": "Memory leak in the connection pool caused by a missing cleanup call.", + "resolution": "Deployed hotfix v2.3.1 and restarted the affected service." + } + } + } + } + } + }, + "/incident/reopen": { + "post": { + "operationId": "incidentReopen", + "summary": "Reopen incident", + "description": "Reopen a previously resolved incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-reopen", + "metadata": { + "sidebarTitle": "Reopen incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReopenIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ], + "reason": "Monitoring detected the issue recurred after the initial fix." + } + } + } + } + } + }, + "/incident/snooze": { + "post": { + "operationId": "incidentSnooze", + "summary": "Snooze incident", + "description": "Temporarily snooze notifications for an incident until a specified time.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-snooze", + "metadata": { + "sidebarTitle": "Snooze incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnoozeIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ], + "minutes": 60 + } + } + } + } + } + }, + "/incident/wake": { + "post": { + "operationId": "incidentWake", + "summary": "Wake incident", + "description": "Cancel the snooze on an incident and resume notifications.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-wake", + "metadata": { + "sidebarTitle": "Wake incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WakeIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] + } + } + } + } + } + }, + "/incident/merge": { + "post": { + "operationId": "incidentMerge", + "summary": "Merge incidents", + "description": "Merge one or more incidents into a target incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-merge", + "metadata": { + "sidebarTitle": "Merge incidents" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MergeIncidentsRequest" + }, + "example": { + "source_incident_ids": [ + "69da451ef77b1b51f40e83ef", + "69da451ef77b1b51f40e83f0" + ], + "target_incident_id": "69da451ef77b1b51f40e83ee", + "comment": "Merging related database connectivity incidents into one." + } + } + } + } + } + }, + "/incident/disable-merge": { + "post": { + "operationId": "incidentDisableMerge", + "summary": "Disable incident merge", + "description": "Disable automatic merging for a specific incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-disable-merge", + "metadata": { + "sidebarTitle": "Disable incident merge" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DisableIncidentMergeRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] + } + } + } + } + } + }, + "/incident/reset": { + "post": { + "operationId": "incidentReset", + "summary": "Update incident fields", + "description": "Update one or more editable fields of an incident in a single call, including title, description, impact, root cause, resolution, and severity. At least one field must be provided.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-reset", + "metadata": { + "sidebarTitle": "Update incident fields" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateIncidentFieldsRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "title": "Database connection timeout - prod-db-01 primary", + "incident_severity": "Critical" + } + } + } + } + } + }, + "/incident/remove": { + "post": { + "operationId": "incidentRemove", + "summary": "Delete an incident", + "description": "Permanently delete an incident and all associated data.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-remove", + "metadata": { + "sidebarTitle": "Delete an incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RemoveIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] + } + } + } + } + } + }, + "/incident/comment": { + "post": { + "operationId": "incidentComment", + "summary": "Add comment to incident", + "description": "Add a text comment to the incident timeline.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-comment", + "metadata": { + "sidebarTitle": "Add comment to incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ], + "comment": "Identified the root cause. Rolling back the deployment now." + } + } + } + } + } + }, + "/incident/assign": { + "post": { + "operationId": "incidentAssign", + "summary": "Assign incident", + "description": "Dispatch an incident to a specific escalation level or responder.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-assign", + "metadata": { + "sidebarTitle": "Assign incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssignIncidentRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "assigned_to": { + "person_ids": [ + 2476444212131 + ], + "type": "assign" + } + } + } + } + } + } + }, + "/incident/responder/add": { + "post": { + "operationId": "incidentResponderAdd", + "summary": "Add incident responder", + "description": "Add a responder to an existing incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-responder-add", + "metadata": { + "sidebarTitle": "Add incident responder" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddIncidentResponderRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "person_ids": [ + 2476444212131, + 2476444212132 + ] + } + } + } + } + } + }, + "/incident/field/reset": { + "post": { + "operationId": "incidentFieldReset", + "summary": "Update incident custom field", + "description": "Update a custom field value on an incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-field-reset", + "metadata": { + "sidebarTitle": "Update incident custom field" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetIncidentFieldRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "field_name": "affected_service", + "field_value": "payment-service" + } + } + } + } + } + }, + "/incident/custom-action/do": { + "post": { + "operationId": "incidentCustomActionDo", + "summary": "Execute custom action", + "description": "Execute a custom action configured for an incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-custom-action-do", + "metadata": { + "sidebarTitle": "Execute custom action" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DoIncidentCustomActionResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "message": "" + } + } + } + } + }, + "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/DoIncidentCustomActionRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "integration_id": 2490562293131 + } + } + } + } + } + }, + "/incident/war-room/detail": { + "post": { + "operationId": "incidentWarRoomDetail", + "summary": "Get war room detail", + "description": "Retrieve the war room configuration and members for an incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-war-room-detail", + "metadata": { + "sidebarTitle": "Get war room detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/WarRoom" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000", + "chat_name": "Incident #0E83EE war room", + "share_link": "" + } + } + } + } + }, + "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/GetWarRoomDetailRequest" + }, + "example": { + "integration_id": 2490562293131, + "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000" + } + } + } + } + } + }, + "/incident/war-room/list": { + "post": { + "operationId": "incidentWarRoomList", + "summary": "List war rooms", + "description": "List all war rooms associated with an incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-war-room-list", + "metadata": { + "sidebarTitle": "List war rooms" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListWarRoomsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [] + } + } + } + } + }, + "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/ListWarRoomsRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee" + } + } + } + } + } + }, + "/incident/war-room/create": { + "post": { + "operationId": "incidentWarRoomCreate", + "summary": "Create war room", + "description": "Create a war room channel for collaborative incident response.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-war-room-create", + "metadata": { + "sidebarTitle": "Create war room" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/WarRoom" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000", + "chat_name": "Incident #0E83EE war room", + "share_link": "" + } + } + } + } + }, + "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/CreateWarRoomRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "integration_id": 2490562293131, + "add_observers": true + } + } + } + } + } + }, + "/incident/war-room/delete": { + "post": { + "operationId": "incidentWarRoomDelete", + "summary": "Delete war room", + "description": "Delete an incident war room.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-war-room-delete", + "metadata": { + "sidebarTitle": "Delete war room" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteWarRoomRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "integration_id": 2490562293131 + } + } + } + } + } + }, + "/incident/post-mortem/info": { + "get": { + "operationId": "incidentPostMortemInfo", + "summary": "Get post-mortem", + "description": "Retrieve the post-mortem report for a specific incident.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-post-mortem-info", + "metadata": { + "sidebarTitle": "Get post-mortem" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PostMortemItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "meta": { + "account_id": 2451002751131, + "title": "Postmortem1", + "status": "published", + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "template_id": "post_mortem_default_tmpl_en-us", + "incident_ids": [ + "69bb9233331067560c718ecd" + ], + "media_count": 0, + "author_ids": [ + 2477273692131 + ], + "team_id": 2477033058131, + "channel_id": 3047621227131, + "is_private": false, + "channel_name": "Ops Channel", + "created_at_seconds": 1773900354, + "updated_at_seconds": 1773909012 + }, + "basics": { + "incidents_highest_severity": "Warning", + "incidents_earliest_start_seconds": 1761133512, + "incidents_latest_close_seconds": 1761133632, + "incidents_total_duration_seconds": 120, + "responders": [ + { + "person_id": 3790925372131, + "assigned_at": 1761133515, + "acknowledged_at": 0 + } + ] + }, + "content": { + "content": "{\"type\":\"doc\",\"content\":[]}" + }, + "follow_ups": "" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "parameters": [ + { + "name": "post_mortem_id", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "description": "Post-mortem ID. Deterministic hash derived from account ID and the set of linked incident IDs." + } + ] + } + }, + "/incident/post-mortem/list": { + "post": { + "operationId": "incidentPostMortemList", + "summary": "List post-mortems", + "description": "List post-mortem reports with optional filters.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-post-mortem-list", + "metadata": { + "sidebarTitle": "List post-mortems" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListPostMortemsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 3, + "has_next_page": false, + "items": [ + { + "account_id": 2451002751131, + "title": "Postmortem1", + "status": "published", + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "template_id": "post_mortem_default_tmpl_en-us", + "incident_ids": [ + "69bb9233331067560c718ecd" + ], + "media_count": 0, + "author_ids": [ + 2477273692131 + ], + "team_id": 2477033058131, + "channel_id": 3047621227131, + "is_private": false, + "channel_name": "Ops Channel", + "created_at_seconds": 1773900354, + "updated_at_seconds": 1773909012 + } + ] + } + } + } + } + }, + "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/ListPostMortemsRequest" + }, + "example": { + "status": "published", + "p": 1, + "limit": 20 + } + } + } + } + } + }, + "/incident/post-mortem/delete": { + "post": { + "operationId": "incidentPostMortemDelete", + "summary": "Delete post-mortem", + "description": "Delete a post-mortem report.", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-post-mortem-delete", + "metadata": { + "sidebarTitle": "Delete post-mortem" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePostMortemRequest" + }, + "example": { + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e" + } + } + } + } + } + }, + "/channel/info": { + "post": { + "operationId": "channelInfo", + "summary": "Get channel detail", + "description": "Retrieve detailed information for a specific channel.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-info", + "metadata": { + "sidebarTitle": "Get channel detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ChannelItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "channel_id": 1001, + "channel_name": "Production Alerts", + "status": "enabled", + "team_id": 10 + } + } + } + } + }, + "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/ChannelInfoRequest" + }, + "example": { + "channel_id": 1001 + } + } + } + } + } + }, + "/channel/list": { + "post": { + "operationId": "channelList", + "summary": "List channels", + "description": "List channels accessible to the current user with optional filters.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-list", + "metadata": { + "sidebarTitle": "List channels" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListChannelsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 42, + "has_next_page": true, + "items": [ + { + "channel_id": 1001, + "channel_name": "Production Alerts", + "status": "enabled" + } + ] + } + } + } + } + }, + "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/ListChannelsRequest" + }, + "example": { + "p": 1, + "limit": 20, + "orderby": "created_at", + "asc": false + } + } + } + } + } + }, + "/channel/infos": { + "post": { + "operationId": "channelInfos", + "summary": "Batch get channels", + "description": "Retrieve multiple channels by their IDs.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-infos", + "metadata": { + "sidebarTitle": "Batch get channels" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ChannelInfosResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "channel_id": 1001, + "channel_name": "Production Alerts", + "status": "enabled" + } + ] + } + } + } + } + }, + "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/ChannelInfosRequest" + }, + "example": { + "channel_ids": [ + 1001, + 1002 + ] + } + } + } + } + } + }, + "/channel/create": { + "post": { + "operationId": "channelCreate", + "summary": "Create channel", + "description": "Create a new channel for incident management.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-create", + "metadata": { + "sidebarTitle": "Create channel" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ChannelCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "channel_id": 6294542005131, + "channel_name": "API Test Channel" + } + } + } + } + }, + "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/CreateChannelRequest" + }, + "example": { + "team_id": 3521074710131, + "channel_name": "Production Alerts", + "description": "Handles all production environment alerts", + "group": { + "method": "p", + "time_window": 10, + "window_type": "tumbling" + }, + "auto_resolve_timeout": 86400, + "auto_resolve_mode": "trigger" + } + } + } + } + } + }, + "/channel/update": { + "post": { + "operationId": "channelUpdate", + "summary": "Update channel", + "description": "Update an existing channel's configuration and settings.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-update", + "metadata": { + "sidebarTitle": "Update channel" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/UpdateChannelResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "external_report_token": "" + } + } + } + } + }, + "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/UpdateChannelRequest" + }, + "example": { + "channel_id": 1001, + "channel_name": "Production Alerts (v2)", + "description": "Updated description" + } + } + } + } + } + }, + "/channel/delete": { + "post": { + "operationId": "channelDelete", + "summary": "Delete channel", + "description": "Delete a channel and all associated configuration.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-delete", + "metadata": { + "sidebarTitle": "Delete channel" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelIDRequest" + }, + "example": { + "channel_id": 3521074710131 + } + } + } + } + } + }, + "/channel/enable": { + "post": { + "operationId": "channelEnable", + "summary": "Enable channel", + "description": "Enable a disabled channel to resume incident routing.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-enable", + "metadata": { + "sidebarTitle": "Enable channel" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelIDRequest" + }, + "example": { + "channel_id": 3521074710131 + } + } + } + } + } + }, + "/channel/disable": { + "post": { + "operationId": "channelDisable", + "summary": "Disable channel", + "description": "Disable a channel to stop incident routing without deleting it.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-disable", + "metadata": { + "sidebarTitle": "Disable channel" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelIDRequest" + }, + "example": { + "channel_id": 3521074710131 + } + } + } + } + } + }, + "/channel/notify/rule/list": { + "post": { + "operationId": "channelNotifyRuleList", + "summary": "List channel notification rules", + "description": "List all notification rules configured for a channel.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-notify-rule-list", + "metadata": { + "sidebarTitle": "List channel notification rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/channel/notify/rule/create": { + "post": { + "operationId": "channelNotifyRuleCreate", + "summary": "Create channel notification rule", + "description": "Create a notification rule for a channel.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-notify-rule-create", + "metadata": { + "sidebarTitle": "Create channel notification rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/channel/notify/rule/update": { + "post": { + "operationId": "channelNotifyRuleUpdate", + "summary": "Update channel notification rule", + "description": "Update an existing channel notification rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-notify-rule-update", + "metadata": { + "sidebarTitle": "Update channel notification rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/channel/notify/rule/delete": { + "post": { + "operationId": "channelNotifyRuleDelete", + "summary": "Delete channel notification rule", + "description": "Delete a channel notification rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-notify-rule-delete", + "metadata": { + "sidebarTitle": "Delete channel notification rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/channel/notify/rule/enable": { + "post": { + "operationId": "channelNotifyRuleEnable", + "summary": "Enable channel notification rule", + "description": "Enable a disabled channel notification rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-notify-rule-enable", + "metadata": { + "sidebarTitle": "Enable channel notification rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/channel/notify/rule/disable": { + "post": { + "operationId": "channelNotifyRuleDisable", + "summary": "Disable channel notification rule", + "description": "Disable a channel notification rule without deleting it.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-notify-rule-disable", + "metadata": { + "sidebarTitle": "Disable channel notification rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/channel/silence/rule/list": { + "post": { + "operationId": "channelSilenceRuleList", + "summary": "List silence rules", + "description": "List all silence rules configured for a channel.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-silence-rule-list", + "metadata": { + "sidebarTitle": "List silence rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListSilenceRulesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "channel_id": 5967964835131, + "priority": 0, + "rule_name": "Silence Info alerts", + "description": "", + "from_incident_id": "000000000000000000000000", + "time_filters": [], + "time_filter": { + "start_time": 1773388800, + "end_time": 1773414000 + }, + "filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "is_directly_discard": true, + "status": "enabled", + "rule_id": "69b3c426b4a6f5abf1f54873", + "updated_by": 3790925372131, + "created_at": 1773388838, + "updated_at": 1773388838, + "is_effective": false + } + ] + } + } + } + } + }, + "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/ChannelScopedListRequest" + }, + "example": { + "channel_id": 1001 + } + } + } + } + } + }, + "/channel/silence/rule/create": { + "post": { + "operationId": "channelSilenceRuleCreate", + "summary": "Create silence rule", + "description": "Create a silence rule to suppress notifications matching specified conditions.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-silence-rule-create", + "metadata": { + "sidebarTitle": "Create silence rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "rule_id": "69db2f66a0fe7db6448b1503", + "rule_name": "Test silence rule" + } + } + } + } + }, + "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/CreateSilenceRuleRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_name": "Maintenance window silence", + "description": "Silence all Info alerts during planned maintenance", + "time_filter": { + "start_time": 1773388800, + "end_time": 1773414000 + }, + "filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "is_directly_discard": false + } + } + } + } + } + }, + "/channel/silence/rule/update": { + "post": { + "operationId": "channelSilenceRuleUpdate", + "summary": "Update silence rule", + "description": "Update an existing silence rule configuration.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-silence-rule-update", + "metadata": { + "sidebarTitle": "Update silence rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSilenceRuleRequest" + }, + "example": { + "channel_id": 1001, + "rule_id": "6621b23f4a2c5e0012ab34cd", + "rule_name": "Mute during maintenance", + "time_filter": { + "start_time": 1710000000, + "end_time": 1710086400 + }, + "filters": [ + [ + { + "key": "labels.service", + "oper": "IN", + "vals": [ + "billing" + ] + } + ] + ] + } + } + } + } + } + }, + "/channel/silence/rule/delete": { + "post": { + "operationId": "channelSilenceRuleDelete", + "summary": "Delete silence rule", + "description": "Delete a silence rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-silence-rule-delete", + "metadata": { + "sidebarTitle": "Delete silence rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/silence/rule/enable": { + "post": { + "operationId": "channelSilenceRuleEnable", + "summary": "Enable silence rule", + "description": "Enable a disabled silence rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-silence-rule-enable", + "metadata": { + "sidebarTitle": "Enable silence rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/silence/rule/disable": { + "post": { + "operationId": "channelSilenceRuleDisable", + "summary": "Disable silence rule", + "description": "Disable a silence rule without deleting it.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-silence-rule-disable", + "metadata": { + "sidebarTitle": "Disable silence rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/inhibit/rule/list": { + "post": { + "operationId": "channelInhibitRuleList", + "summary": "List inhibit rules", + "description": "List all inhibit rules configured for a channel.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-list", + "metadata": { + "sidebarTitle": "List inhibit rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListInhibitRulesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "channel_id": 5967964835131, + "priority": 0, + "rule_name": "Suppress downstream alerts", + "description": "", + "source_filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "target_filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "equals": [ + "data_source_id", + "labels._account_id" + ], + "is_directly_discard": false, + "status": "enabled", + "rule_id": "69bcc630b9e63df36603e425", + "updated_by": 3790925372131, + "created_at": 1773979184, + "updated_at": 1773979184 + } + ] + } + } + } + } + }, + "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/ChannelScopedListRequest" + }, + "example": { + "channel_id": 1001 + } + } + } + } + } + }, + "/channel/inhibit/rule/create": { + "post": { + "operationId": "channelInhibitRuleCreate", + "summary": "Create inhibit rule", + "description": "Create an inhibit rule to suppress lower-priority alerts when higher-priority ones are firing.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-create", + "metadata": { + "sidebarTitle": "Create inhibit rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "rule_id": "69db2f69a0fe7db6448b1504", + "rule_name": "Test inhibit rule" + } + } + } + } + }, + "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/CreateInhibitRuleRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_name": "Suppress Info when Critical fires", + "description": "When a Critical alert fires, suppress matching Info alerts", + "equals": [ + "labels.cluster", + "labels.service" + ], + "source_filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Critical" + ] + } + ] + ], + "target_filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "is_directly_discard": false + } + } + } + } + } + }, + "/channel/inhibit/rule/update": { + "post": { + "operationId": "channelInhibitRuleUpdate", + "summary": "Update inhibit rule", + "description": "Update an existing inhibit rule configuration.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-update", + "metadata": { + "sidebarTitle": "Update inhibit rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateInhibitRuleRequest" + }, + "example": { + "channel_id": 1001, + "rule_id": "6621b23f4a2c5e0012ab34ce", + "rule_name": "Suppress downstream", + "equals": [ + "labels.cluster" + ] + } + } + } + } + } + }, + "/channel/inhibit/rule/delete": { + "post": { + "operationId": "channelInhibitRuleDelete", + "summary": "Delete inhibit rule", + "description": "Delete an inhibit rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-delete", + "metadata": { + "sidebarTitle": "Delete inhibit rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/inhibit/rule/enable": { + "post": { + "operationId": "channelInhibitRuleEnable", + "summary": "Enable inhibit rule", + "description": "Enable a disabled inhibit rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-enable", + "metadata": { + "sidebarTitle": "Enable inhibit rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/inhibit/rule/disable": { + "post": { + "operationId": "channelInhibitRuleDisable", + "summary": "Disable inhibit rule", + "description": "Disable an inhibit rule without deleting it.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-disable", + "metadata": { + "sidebarTitle": "Disable inhibit rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/unsubscribe/rule/list": { + "post": { + "operationId": "channelUnsubscribeRuleList", + "summary": "List drop rules", + "description": "List drop rules for a channel.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-list", + "metadata": { + "sidebarTitle": "List drop rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListDropRulesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "channel_id": 5967964835131, + "priority": 0, + "rule_name": "Drop test alerts", + "description": "", + "filters": [ + [ + { + "key": "data_source_id", + "oper": "IN", + "vals": [ + "6113996590131" + ] + } + ] + ], + "status": "enabled", + "rule_id": "69bcc530b9e63df36603e421", + "updated_by": 3790925372131, + "created_at": 1773978928, + "updated_at": 1773978928 + } + ] + } + } + } + } + }, + "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/ChannelScopedListRequest" + }, + "example": { + "channel_id": 1001 + } + } + } + } + } + }, + "/channel/unsubscribe/rule/create": { + "post": { + "operationId": "channelUnsubscribeRuleCreate", + "summary": "Create drop rule", + "description": "Create a drop rule to filter out unwanted alerts before they become incidents.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-create", + "metadata": { + "sidebarTitle": "Create drop rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "rule_id": "69db2f6ba0fe7db6448b1505", + "rule_name": "Test drop rule" + } + } + } + } + }, + "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/CreateDropRuleRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_name": "Drop test environment alerts", + "description": "Discard all alerts from the test environment before they create incidents", + "filters": [ + [ + { + "key": "labels.env", + "oper": "IN", + "vals": [ + "test", + "dev" + ] + } + ] + ] + } + } + } + } + } + }, + "/channel/unsubscribe/rule/update": { + "post": { + "operationId": "channelUnsubscribeRuleUpdate", + "summary": "Update drop rule", + "description": "Update an existing drop rule configuration.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-update", + "metadata": { + "sidebarTitle": "Update drop rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateDropRuleRequest" + }, + "example": { + "channel_id": 1001, + "rule_id": "6621b23f4a2c5e0012ab34cf", + "rule_name": "Drop test alerts", + "filters": [ + [ + { + "key": "labels.env", + "oper": "IN", + "vals": [ + "test" + ] + } + ] + ] + } + } + } + } + } + }, + "/channel/unsubscribe/rule/delete": { + "post": { + "operationId": "channelUnsubscribeRuleDelete", + "summary": "Delete drop rule", + "description": "Delete a drop rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-delete", + "metadata": { + "sidebarTitle": "Delete drop rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/unsubscribe/rule/enable": { + "post": { + "operationId": "channelUnsubscribeRuleEnable", + "summary": "Enable drop rule", + "description": "Enable a disabled drop rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-enable", + "metadata": { + "sidebarTitle": "Enable drop rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/unsubscribe/rule/disable": { + "post": { + "operationId": "channelUnsubscribeRuleDisable", + "summary": "Disable drop rule", + "description": "Disable a drop rule without deleting it.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-disable", + "metadata": { + "sidebarTitle": "Disable drop rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/escalate/rule/info": { + "post": { + "operationId": "channelEscalateRuleInfo", + "summary": "Get escalation rule detail", + "description": "Retrieve detailed information for a specific escalation rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-escalate-rule-info", + "metadata": { + "sidebarTitle": "Get escalation rule detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EscalateRuleItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_id": 2451002751131, + "channel_id": 6193426913131, + "priority": 0, + "aggr_window": 0, + "rule_name": "Default", + "description": "", + "layers": [ + { + "max_times": 1, + "notify_step": 10, + "target": { + "person_ids": [ + 3790925372131 + ], + "by": { + "follow_preference": true + }, + "webhooks": null + }, + "escalate_window": 30, + "force_escalate": false + } + ], + "time_filters": [], + "filters": [], + "status": "enabled", + "template_id": "6321aad26c12104586a88916", + "rule_id": "69bd0ce95a238693176c1d66", + "updated_by": 3790925372131, + "created_at": 1773997289, + "updated_at": 1773997289 + } + } + } + } + }, + "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/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 1001, + "rule_id": "6621b23f4a2c5e0012ab34d0" + } + } + } + } + } + }, + "/channel/escalate/rule/list": { + "post": { + "operationId": "channelEscalateRuleList", + "summary": "List escalation rules", + "description": "List all escalation rules for a channel.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-escalate-rule-list", + "metadata": { + "sidebarTitle": "List escalation rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListEscalationRulesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "channel_id": 6193426913131, + "priority": 0, + "aggr_window": 0, + "rule_name": "Default", + "description": "", + "layers": [ + { + "max_times": 1, + "notify_step": 10, + "target": { + "person_ids": [ + 3790925372131 + ], + "by": { + "follow_preference": true + }, + "webhooks": null + }, + "escalate_window": 30, + "force_escalate": false + } + ], + "time_filters": [], + "filters": [], + "status": "enabled", + "template_id": "6321aad26c12104586a88916", + "rule_id": "69bd0ce95a238693176c1d66", + "updated_by": 3790925372131, + "created_at": 1773997289, + "updated_at": 1773997289 + } + ] + } + } + } + } + }, + "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/ChannelScopedListRequest" + }, + "example": { + "channel_id": 1001 + } + } + } + } + } + }, + "/channel/escalate/rule/create": { + "post": { + "operationId": "channelEscalateRuleCreate", + "summary": "Create escalation rule", + "description": "Create an escalation rule defining who gets notified and when during an incident.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-escalate-rule-create", + "metadata": { + "sidebarTitle": "Create escalation rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "rule_id": "69db2f72a0fe7db6448b1506", + "rule_name": "Test escalation rule" + } + } + } + } + }, + "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/CreateEscalationRuleRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_name": "On-call escalation", + "template_id": "6321aad26c12104586a88916", + "description": "Notify primary on-call, then escalate to secondary after 30 minutes", + "layers": [ + { + "target": { + "person_ids": [ + 3790925372131 + ], + "by": { + "follow_preference": true + } + }, + "max_times": 3, + "notify_step": 10, + "escalate_window": 30, + "force_escalate": false + } + ] + } + } + } + } + } + }, + "/channel/escalate/rule/update": { + "post": { + "operationId": "channelEscalateRuleUpdate", + "summary": "Update escalation rule", + "description": "Update an existing escalation rule configuration.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-escalate-rule-update", + "metadata": { + "sidebarTitle": "Update escalation rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateEscalationRuleRequest" + }, + "example": { + "channel_id": 1001, + "rule_id": "6621b23f4a2c5e0012ab34d0", + "template_id": "6621b23f4a2c5e0012ab34d1", + "rule_name": "Default escalation", + "layers": [ + { + "target": { + "person_ids": [ + 42 + ], + "by": { + "critical": [ + "voice" + ], + "warning": [ + "sms" + ] + } + } + } + ] + } + } + } + } + } + }, + "/channel/escalate/rule/delete": { + "post": { + "operationId": "channelEscalateRuleDelete", + "summary": "Delete escalation rule", + "description": "Delete an escalation rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-escalate-rule-delete", + "metadata": { + "sidebarTitle": "Delete escalation rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/escalate/rule/enable": { + "post": { + "operationId": "channelEscalateRuleEnable", + "summary": "Enable escalation rule", + "description": "Enable a disabled escalation rule.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-escalate-rule-enable", + "metadata": { + "sidebarTitle": "Enable escalation rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/escalate/rule/disable": { + "post": { + "operationId": "channelEscalateRuleDisable", + "summary": "Disable escalation rule", + "description": "Disable an escalation rule without deleting it.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-escalate-rule-disable", + "metadata": { + "sidebarTitle": "Disable escalation rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/route/info": { + "post": { + "operationId": "routeInfo", + "summary": "Get routing rule detail", + "description": "Retrieve the routing rule configuration for a specific integration. Returns null when the integration has no routing rule configured.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/route-info", + "metadata": { + "sidebarTitle": "Get routing rule detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RouteItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "cases": [ + { + "if": [ + { + "key": "labels.check", + "oper": "IN", + "vals": [ + "cpu.idle<20%" + ] + } + ], + "channel_ids": [ + 2533748993131 + ], + "fallthrough": false, + "routing_mode": "standard" + }, + { + "if": [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Warning" + ] + } + ], + "channel_ids": null, + "fallthrough": false, + "routing_mode": "name_mapping", + "name_mapping_label": "labels.service" + } + ], + "default": { + "channel_ids": [ + 3521074710131 + ] + }, + "status": "enabled", + "version": 6, + "updated_by": 3790925372131, + "creator_id": 3790925372131, + "created_at": 1774606136, + "updated_at": 1774606136 + } + } + } + } + }, + "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/RouteInfoRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/route/list": { + "post": { + "operationId": "routeList", + "summary": "List routing rules", + "description": "Return routing rules for the specified integrations. Integrations without a configured rule are omitted from the response.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/route-list", + "metadata": { + "sidebarTitle": "List routing rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListRoutesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "integration_id": 6113996590131, + "cases": [ + { + "if": [ + { + "key": "labels.check", + "oper": "IN", + "vals": [ + "cpu.idle<20%" + ] + } + ], + "channel_ids": [ + 2533748993131 + ], + "fallthrough": false, + "routing_mode": "standard" + } + ], + "default": { + "channel_ids": [ + 3521074710131 + ] + }, + "status": "enabled", + "version": 6, + "updated_by": 3790925372131, + "creator_id": 3790925372131, + "created_at": 1774606136, + "updated_at": 1774606136 + } + ] + } + } + } + } + }, + "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/ListRoutesRequest" + }, + "example": { + "integration_ids": [ + 6113996590131, + 6113996590132 + ] + } + } + } + } + } + }, + "/route/upsert": { + "post": { + "operationId": "routeUpsert", + "summary": "Upsert routing rule", + "description": "Create or update routing rules for an integration to direct alerts to specific channels. At least one of `cases` or `default` must be provided.", + "tags": [ + "On-call/Channels" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/route-upsert", + "metadata": { + "sidebarTitle": "Upsert routing rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertRouteRequest" + }, + "example": { + "integration_id": 6113996590131, + "cases": [ + { + "if": [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Critical" + ] + } + ], + "channel_ids": [ + 3521074710131 + ], + "fallthrough": false, + "routing_mode": "standard" + } + ], + "default": { + "channel_ids": [ + 3521074710131 + ] + } + } + } + } + } + } + }, + "/alert/list": { + "post": { + "operationId": "alert-read-list", + "summary": "List alerts", + "description": "Return a cursor-paginated list of alerts matching the given filters.", + "tags": [ + "On-call/Alerts" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Both `start_time` and `end_time` are required Unix epoch seconds. Maximum span is 31 days.\n- Use `search_after_ctx` from the previous response to fetch the next page.\n- Results are filtered by the caller's channel data-access permissions.\n- Set `is_active` to `true` to retrieve only active (firing) alerts; `false` to retrieve resolved alerts.", + "href": "/en/api-reference/on-call/alerts/alert-read-list", + "metadata": { + "sidebarTitle": "List alerts" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "has_next_page": false, + "search_after_ctx": "", + "items": [ + { + "alert_id": "663a1b2c3d4e5f6789abcdef", + "integration_id": 10001, + "channel_id": 20001, + "account_id": 10023, + "title": "CPU usage > 90%", + "alert_severity": "Critical", + "alert_status": "Critical", + "start_time": 1712650000, + "last_time": 1712655000, + "end_time": 0, + "labels": { + "host": "web-01" + }, + "ever_muted": false, + "created_at": 1712650000, + "updated_at": 1712655000, + "integration_name": "Prometheus", + "integration_type": "prometheus", + "channel_name": "Production", + "event_cnt": 3 + } + ] + } + } + } + } + }, + "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/AlertListRequest" + }, + "example": { + "start_time": 1712620800, + "end_time": 1712707200, + "limit": 20, + "is_active": true + } + } + } + } + } + }, + "/alert/info": { + "post": { + "operationId": "alert-read-info", + "summary": "Get alert detail", + "description": "Return the full details of a single alert by its ID, including its associated incident and event count.", + "tags": [ + "On-call/Alerts" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- `alert_id` is an ObjectID hex string returned by `POST /alert/list` or `POST /alert-event/list`.", + "href": "/en/api-reference/on-call/alerts/alert-read-info", + "metadata": { + "sidebarTitle": "Get alert detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "alert_id": "663a1b2c3d4e5f6789abcdef", + "title": "CPU usage > 90%", + "alert_severity": "Critical", + "alert_status": "Critical", + "start_time": 1712650000, + "event_cnt": 3 + } + } + } + } + }, + "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/AlertInfoRequest" + }, + "example": { + "alert_id": "663a1b2c3d4e5f6789abcdef" + } + } + } + } + } + }, + "/alert/list-by-ids": { + "post": { + "operationId": "alert-read-list-by-ids", + "summary": "List alerts by IDs", + "description": "Return the details of multiple alerts by their IDs in a single request.", + "tags": [ + "On-call/Alerts" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- All provided `alert_ids` must belong to the caller's account; any invalid ID causes the entire request to fail.", + "href": "/en/api-reference/on-call/alerts/alert-read-list-by-ids", + "metadata": { + "sidebarTitle": "List alerts by IDs" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "has_next_page": false, + "items": [ + { + "alert_id": "663a1b2c3d4e5f6789abcdef", + "title": "CPU usage > 90%" + } + ] + } + } + } + } + }, + "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/AlertListByIDsRequest" + }, + "example": { + "alert_ids": [ + "663a1b2c3d4e5f6789abcdef" + ] + } + } + } + } + } + }, + "/alert/event/list": { + "post": { + "operationId": "alert-read-event-list", + "summary": "List events for an alert", + "description": "Return all raw events that have been ingested into a specific alert, in chronological order.", + "tags": [ + "On-call/Alerts" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Each alert accumulates raw events from the integration. This endpoint exposes the raw event history for a given alert.", + "href": "/en/api-reference/on-call/alerts/alert-read-event-list", + "metadata": { + "sidebarTitle": "List events for an alert" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertEventListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "event_id": "663a1b2c3d4e5f6789abc001", + "alert_id": "663a1b2c3d4e5f6789abcdef", + "title": "CPU usage > 90%", + "event_severity": "Critical", + "event_status": "Critical", + "event_time": 1712650000, + "labels": { + "host": "web-01" + } + } + ] + } + } + } + } + }, + "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/AlertEventListRequest" + }, + "example": { + "alert_id": "663a1b2c3d4e5f6789abcdef" + } + } + } + } + } + }, + "/alert/feed": { + "post": { + "operationId": "alert-read-feed", + "summary": "List alert activity feed", + "description": "Return the activity feed (comments, state changes, merges, silence events) for a single alert, with page-based pagination.", + "tags": [ + "On-call/Alerts" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Use `p` (page number, starting at 1) and `limit` (max 100, default 20) for pagination.\n- Set `asc` to `true` for chronological order.\n- Use `types` to filter by specific feed types (e.g. `alert_comment`, `alert_merge`).", + "href": "/en/api-reference/on-call/alerts/alert-read-feed", + "metadata": { + "sidebarTitle": "List alert activity feed" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertFeedResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "has_next_page": false, + "items": [ + { + "ref_id": "663a1b2c3d4e5f6789abcdef", + "type": "alert_comment", + "detail": { + "comment": "Investigating now." + }, + "creator_id": 80011, + "created_at": 1712651000 + } + ] + } + } + } + } + }, + "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/AlertFeedRequest" + }, + "example": { + "alert_id": "663a1b2c3d4e5f6789abcdef", + "limit": 20, + "asc": false + } + } + } + } + } + }, + "/alert/merge": { + "post": { + "operationId": "alert-write-merge", + "summary": "Merge alerts into an incident", + "description": "Associate one or more alerts with an existing incident. If a source alert previously belonged to a different incident and that incident becomes empty after the merge, it will be automatically closed.", + "tags": [ + "On-call/Alerts" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- All `alert_ids` and the `incident_id` must belong to the caller's account.\n- Optionally set `title` and `owner_id` to update the target incident at the same time.", + "href": "/en/api-reference/on-call/alerts/alert-write-merge", + "metadata": { + "sidebarTitle": "Merge alerts into an incident" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlertMergeRequest" + }, + "example": { + "alert_ids": [ + "663a1b2c3d4e5f6789abcdef" + ], + "incident_id": "663a000000000000deadbeef" + } + } + } + } + } + }, + "/alert/pipeline/info": { + "post": { + "operationId": "alert-read-pipeline-info", + "summary": "Get alert pipeline", + "description": "Return the alert processing pipeline configured for a specific integration.", + "tags": [ + "On-call/Alerts" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |\n\n## Usage\n\n- Returns `null` data if no pipeline has been configured for the given integration.\n- Requires the caller to have access to the integration.", + "href": "/en/api-reference/on-call/alerts/alert-read-pipeline-info", + "metadata": { + "sidebarTitle": "Get alert pipeline" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertPipelineItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 10001, + "rules": [ + { + "kind": "severity_reset", + "if": null, + "settings": { + "severity": "Warning" + } + } + ], + "status": "enabled", + "creator_id": 80011, + "updated_by": 80011, + "created_at": 1710000000, + "updated_at": 1712000000 + } + } + } + } + }, + "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/AlertPipelineInfoRequest" + }, + "example": { + "integration_id": 10001 + } + } + } + } + } + }, + "/alert/pipeline/list": { + "post": { + "operationId": "alert-read-pipeline-list", + "summary": "List alert pipelines", + "description": "Return the alert processing pipelines configured for multiple integrations.", + "tags": [ + "On-call/Alerts" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |\n\n## Usage\n\n- All `integration_ids` must be accessible to the caller.", + "href": "/en/api-reference/on-call/alerts/alert-read-pipeline-list", + "metadata": { + "sidebarTitle": "List alert pipelines" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertPipelineListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "integration_id": 10001, + "rules": [], + "status": "enabled", + "creator_id": 80011, + "updated_by": 80011, + "created_at": 1710000000, + "updated_at": 1712000000 + } + ] + } + } + } + } + }, + "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/AlertPipelineListRequest" + }, + "example": { + "integration_ids": [ + 10001, + 10002 + ] + } + } + } + } + } + }, + "/alert/pipeline/upsert": { + "post": { + "operationId": "alert-write-pipeline-upsert", + "summary": "Create or update alert pipeline", + "description": "Set the alert processing pipeline for an integration. Replaces the existing configuration entirely.", + "tags": [ + "On-call/Alerts" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Maximum 50 rules per pipeline.\n- Each rule has a `kind` (one of `title_reset`, `description_reset`, `severity_reset`, `alert_drop`, `alert_inhibit`), an optional `if` filter, and `settings` specific to the kind.\n- The `alert_inhibit` kind requires the Standard license or higher.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/alerts/alert-write-pipeline-upsert", + "metadata": { + "sidebarTitle": "Create or update alert pipeline" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlertPipelineUpsertRequest" + }, + "example": { + "integration_id": 10001, + "rules": [ + { + "kind": "severity_reset", + "if": null, + "settings": { + "severity": "Warning" + } + } + ] + } + } + } + } + } + }, + "/alert-event/list": { + "post": { + "operationId": "alert-event-read-list", + "summary": "List raw alert events", + "description": "Return a cursor-paginated list of raw alert events across all alerts, with filtering by integration, channel, time range, and severity.", + "tags": [ + "On-call/Alerts" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Results are filtered by the caller's channel data-access permissions.\n- `severities` is a comma-separated string, e.g. `\"Critical,Warning\"`.", + "href": "/en/api-reference/on-call/alerts/alert-event-read-list", + "metadata": { + "sidebarTitle": "List raw alert events" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertEventGlobalListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "has_next_page": false, + "items": [ + { + "event_id": "663a1b2c3d4e5f6789abc001", + "alert_id": "663a1b2c3d4e5f6789abcdef", + "title": "CPU usage > 90%", + "event_severity": "Critical", + "event_time": 1712650000 + } + ] + } + } + } + } + }, + "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/AlertEventGlobalListRequest" + }, + "example": { + "start_time": 1712620800, + "end_time": 1712707200, + "limit": 20, + "severities": "Critical" + } + } + } + } + } + }, + "/webhook/history/list": { + "post": { + "operationId": "webhookHistoryList", + "summary": "List webhook delivery history", + "description": "List the delivery history for outbound webhook notifications.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |", + "href": "/en/api-reference/on-call/integrations/webhook-history-list", + "metadata": { + "sidebarTitle": "List webhook delivery history" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListWebhookHistoryResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "integration_id": 5321026051131, + "event_id": "20260412Xatt9hrXsgmFkBR78WF655", + "webhook_type": "alert", + "event_type": "a_update", + "channel_id": 2551105804131, + "ref_id": "69da3f0ef77b1b51f40e83cc", + "endpoint": "https://example.com/webhook", + "attempt": 1, + "duration": 132, + "status": "success", + "status_code": 200, + "event_time": "2026-04-12T13:31:11.357472+08:00" + } + ], + "search_after_ctx": "eyJldmVudF90aW1lIjoiMjAyNi0wNC0xMlQxMzoxNToyNi4zODI1NDcrMDg6MDAiLCJldmVudF9pZCI6IjIwMjYwNDEybUdzeFAzZHJwRmZzNFpDUWQycFNEcCJ9", + "total": 346 + } + } + } + } + }, + "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/ListWebhookHistoryRequest" + }, + "example": { + "limit": 20, + "start_time": 1775116800000, + "end_time": 1775203200000, + "integration_id": 6113996590131, + "status": "success" + } + } + } + } + } + }, + "/webhook/history/detail": { + "post": { + "operationId": "webhookHistoryDetail", + "summary": "Get webhook delivery detail", + "description": "Retrieve the detailed payload and response for a specific webhook delivery attempt.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |", + "href": "/en/api-reference/on-call/integrations/webhook-history-detail", + "metadata": { + "sidebarTitle": "Get webhook delivery detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/WebhookHistoryDetail" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 5321026051131, + "event_id": "20260412Xatt9hrXsgmFkBR78WF655", + "webhook_type": "alert", + "event_type": "a_update", + "channel_id": 2551105804131, + "ref_id": "69da3f0ef77b1b51f40e83cc", + "request_headers": "{\"Content-Type\":\"application/json\"}", + "request_body": "{\"event_type\":\"a_update\",\"event_id\":\"d789d65951c0532ea9b6a1d99b707054\"}", + "endpoint": "https://example.com/webhook", + "attempt": 1, + "duration": 132, + "status": "success", + "status_code": 200, + "response_headers": "{\"Content-Type\":\"application/json\"}", + "response_body": "{\"ok\":true}", + "event_time": "2026-04-12T13:31:11.357472+08:00", + "ref_title": "High CPU Usage on host-01", + "channel_name": "Production Alerts" + } + } + } + } + }, + "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/GetWebhookHistoryDetailRequest" + }, + "example": { + "event_id": "20260412Xatt9hrXsgmFkBR78WF655", + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/schedule/create": { + "post": { + "operationId": "scheduleCreate", + "summary": "Create schedule", + "description": "Create a new on-call schedule (escalation rule schedule).", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/schedules/schedule-create", + "metadata": { + "sidebarTitle": "Create schedule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleIDResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "schedule_id": 6294534917601 + } + } + } + } + }, + "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/ScheduleUpsertRequest" + }, + "example": { + "schedule_name": "Production On-Call", + "description": "Primary on-call rotation for the production team", + "team_id": 4291079133131, + "layers": [ + { + "layer_name": "Layer 1", + "name": "Layer 1", + "mode": 0, + "weight": 0, + "hidden": 0, + "groups": [ + { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 0, + "end": 0 + }, + { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2476123212131 + ] + } + ], + "start": 0, + "end": 0 + } + ], + "rotation_unit": "day", + "rotation_value": 1, + "rotation_duration": 86400, + "handoff_time": 0, + "enable_time": 1712000000, + "expire_time": 0, + "restrict_mode": 0, + "restrict_start": 0, + "restrict_end": 0, + "restrict_periods": [], + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "fair_rotation": false, + "mask_continuous_enabled": false + } + ], + "notify": { + "advance_in_time": 300, + "fixed_time": null, + "by": { + "follow_preference": true, + "personal_channels": null + }, + "webhooks": null + } + } + } + } + } + } + }, + "/schedule/update": { + "post": { + "operationId": "scheduleUpdate", + "summary": "Update schedule", + "description": "Update an existing on-call schedule. Provide schedule_id to identify the schedule.", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/schedules/schedule-update", + "metadata": { + "sidebarTitle": "Update schedule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScheduleUpsertRequest" + }, + "example": { + "schedule_id": 2001, + "schedule_name": "Production On-Call (Updated)", + "description": "Updated primary on-call rotation", + "team_id": 4291079133131 + } + } + } + } + } + }, + "/schedule/preview": { + "post": { + "operationId": "schedulePreview", + "summary": "Preview schedule", + "description": "Preview the coverage generated by a schedule configuration without persisting it. The request accepts the same body as create/update plus a required start/end window (max 45 days).", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **60 requests/minute**; **10 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/schedules/schedule-preview", + "metadata": { + "sidebarTitle": "Preview schedule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": null, + "name": null, + "account_id": 0, + "group_id": null, + "disabled": null, + "create_at": 0, + "create_by": 0, + "update_at": 0, + "update_by": 0, + "layers": [ + { + "account_id": 0, + "name": "Layer 1", + "schedule_id": 0, + "hidden": 0, + "mode": 0, + "weight": 0, + "groups": [ + { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 0, + "end": 0 + }, + { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2476123212131 + ] + } + ], + "start": 0, + "end": 0 + } + ], + "rotation_duration": 86400, + "handoff_time": 0, + "enable_time": 1775980800, + "expire_time": 0, + "restrict_mode": 0, + "restrict_start": 0, + "restrict_end": 0, + "restrict_periods": [], + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "create_at": 0, + "create_by": 0, + "update_at": 0, + "update_by": 0, + "layer_name": "Layer 1", + "fair_rotation": false, + "layer_start": 1775980800, + "layer_end": null, + "rotation_unit": "day", + "rotation_value": 1, + "mask_continuous_enabled": false + } + ], + "schedule_layers": [ + { + "layer_name": "Layer 1", + "name": "Layer 1", + "mode": 0, + "schedules": [ + { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "index": 0 + }, + { + "start": 1776096000, + "end": 1776182400, + "group": { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2476123212131 + ] + } + ], + "start": 1776096000, + "end": 1776182400 + }, + "index": 0 + } + ] + } + ], + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": [ + { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "index": 0 + } + ] + }, + "start": 1775980800, + "end": 1776240000, + "notify": null, + "schedule_id": 0, + "schedule_name": null, + "team_id": null, + "description": null, + "layer_schedules": null, + "status": null, + "cur_oncall": null, + "next_oncall": null + } + } + } + } + }, + "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/ScheduleUpsertRequest" + }, + "example": { + "schedule_name": "Preview Schedule", + "start": 1712000000, + "end": 1712086400, + "layers": [ + { + "layer_name": "Layer 1", + "name": "Layer 1", + "mode": 0, + "weight": 0, + "hidden": 0, + "groups": [ + { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 0, + "end": 0 + } + ], + "rotation_unit": "day", + "rotation_value": 1, + "rotation_duration": 86400, + "handoff_time": 0, + "enable_time": 1712000000, + "expire_time": 0, + "restrict_mode": 0, + "restrict_start": 0, + "restrict_end": 0, + "restrict_periods": [], + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "fair_rotation": false, + "mask_continuous_enabled": false + } + ] + } + } + } + } + } + }, + "/schedule/delete": { + "post": { + "operationId": "scheduleDelete", + "summary": "Delete schedules", + "description": "Delete one or more on-call schedules by ID.", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/schedules/schedule-delete", + "metadata": { + "sidebarTitle": "Delete schedules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScheduleIDsBodyRequest" + }, + "example": { + "schedule_ids": [ + 2001 + ] + } + } + } + } + } + }, + "/schedule/info": { + "post": { + "operationId": "scheduleInfo", + "summary": "Get schedule info", + "description": "Return details of an on-call schedule including the computed schedule layers for the requested time window (max 45 days).", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/schedules/schedule-info", + "metadata": { + "sidebarTitle": "Get schedule info" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 5789640530410, + "name": "test-000001", + "account_id": 2451002751131, + "group_id": 4291079133131, + "disabled": 0, + "create_at": 1766110836, + "create_by": 2476123212131, + "update_at": 1775205795, + "update_by": 2476123212131, + "layers": [ + { + "account_id": 2451002751131, + "name": "Layer 1", + "schedule_id": 5789640530410, + "hidden": 0, + "mode": 0, + "weight": 0, + "groups": [ + { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 3122470302131 + ] + } + ], + "start": 0, + "end": 0 + }, + { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2659460982131 + ] + } + ], + "start": 0, + "end": 0 + } + ], + "rotation_duration": 86400, + "handoff_time": 0, + "enable_time": 1767542400, + "expire_time": 0, + "restrict_mode": 0, + "restrict_start": 0, + "restrict_end": 0, + "restrict_periods": [], + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "create_at": 1775205795, + "create_by": 2476123212131, + "update_at": 1775205795, + "update_by": 2476123212131, + "layer_name": "Layer 1", + "fair_rotation": false, + "layer_start": 1767542400, + "layer_end": null, + "rotation_unit": "day", + "rotation_value": 1, + "mask_continuous_enabled": false + } + ], + "schedule_layers": [ + { + "layer_name": "Layer 1", + "name": "Layer 1", + "mode": 0, + "schedules": [ + { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 3122470302131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "index": 0 + }, + { + "start": 1776096000, + "end": 1776182400, + "group": { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2659460982131 + ] + } + ], + "start": 1776096000, + "end": 1776182400 + }, + "index": 0 + } + ] + } + ], + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": [ + { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 3122470302131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "index": 0 + } + ] + }, + "notify": { + "advance_in_time": 300, + "fixed_time": null, + "by": { + "follow_preference": false, + "personal_channels": [ + "email" + ] + }, + "webhooks": [ + { + "type": "feishu_app", + "settings": { + "token": "", + "alias": "", + "data_source_id": 5427276014131, + "chat_ids": [ + "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d" + ], + "verify_token": "", + "sign_secret": "" + } + } + ] + }, + "schedule_id": 5789640530410, + "schedule_name": "test-000001", + "team_id": 4291079133131, + "description": "abc", + "layer_schedules": [ + { + "layer_name": "Layer 1", + "name": "Layer 1", + "mode": 0, + "schedules": [ + { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 3122470302131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "index": 0 + } + ] + } + ], + "status": 0, + "cur_oncall": { + "start": 1775972040, + "end": 1776009600, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 1775972040, + "end": 1776009600 + }, + "update_at": 0, + "weight": 0, + "index": 0 + }, + "next_oncall": { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 3122470302131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "update_at": 0, + "weight": 0, + "index": 0 + } + } + } + } + } + }, + "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/ScheduleInfoRequest" + }, + "example": { + "schedule_id": 2001, + "start": 1712000000, + "end": 1712086400 + } + } + } + } + } + }, + "/schedule/list": { + "post": { + "operationId": "scheduleList", + "summary": "List schedules", + "description": "Return a paginated list of on-call schedules. When both start and end are provided (max 45 days apart), computed layer schedules are included.", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/schedules/schedule-list", + "metadata": { + "sidebarTitle": "List schedules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "id": 5789640530410, + "name": "test-000001", + "account_id": 2451002751131, + "group_id": 4291079133131, + "disabled": 0, + "create_at": 1766110836, + "create_by": 2476123212131, + "update_at": 1775205795, + "update_by": 2476123212131, + "layers": null, + "schedule_layers": null, + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": null + }, + "notify": { + "advance_in_time": 300, + "fixed_time": null, + "by": { + "follow_preference": false, + "personal_channels": [ + "email" + ] + }, + "webhooks": [ + { + "type": "feishu_app", + "settings": { + "token": "", + "alias": "", + "data_source_id": 5427276014131, + "chat_ids": [ + "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d" + ], + "verify_token": "", + "sign_secret": "" + } + } + ] + }, + "schedule_id": 5789640530410, + "schedule_name": "test-000001", + "team_id": 4291079133131, + "description": "abc", + "layer_schedules": null, + "status": 0, + "cur_oncall": null, + "next_oncall": null + }, + { + "id": 5432326025106, + "name": "test-2509300001", + "account_id": 2451002751131, + "group_id": 2477033058131, + "disabled": 0, + "create_at": 1759132037, + "create_by": 2476123212131, + "update_at": 1775207501, + "update_by": 2476123212131, + "layers": null, + "schedule_layers": null, + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": null + }, + "notify": { + "advance_in_time": 300, + "fixed_time": null, + "by": { + "follow_preference": true, + "personal_channels": null + }, + "webhooks": null + }, + "schedule_id": 5432326025106, + "schedule_name": "test-2509300001", + "team_id": 2477033058131, + "description": "", + "layer_schedules": null, + "status": 0, + "cur_oncall": null, + "next_oncall": null + } + ], + "total": 41 + } + } + } + } + }, + "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/ScheduleListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "query": "production", + "is_my_team": true + } + } + } + } + } + }, + "/schedule/self": { + "post": { + "operationId": "scheduleSelf", + "summary": "List my schedules", + "description": "Return on-call schedules where the current user is assigned.", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/schedules/schedule-self", + "metadata": { + "sidebarTitle": "List my schedules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleSelfResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "id": 2539108069860, + "name": "Open Source Q&A", + "account_id": 2451002751131, + "group_id": 2477033058131, + "disabled": 0, + "create_at": 1702623874, + "create_by": 2451002751131, + "update_at": 1710468081, + "update_by": 2476444212131, + "layers": [ + { + "account_id": 2451002751131, + "name": "Rule 1", + "schedule_id": 2539108069860, + "hidden": 0, + "mode": 0, + "weight": 0, + "groups": [ + { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2476444212131 + ] + } + ], + "start": 0, + "end": 0 + }, + { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2469167612131 + ] + } + ], + "start": 0, + "end": 0 + } + ], + "rotation_duration": 86400, + "handoff_time": 0, + "enable_time": 1702623874, + "expire_time": 0, + "restrict_mode": 0, + "restrict_start": 0, + "restrict_end": 0, + "restrict_periods": [], + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "create_at": 1702623874, + "create_by": 2451002751131, + "update_at": 1710468081, + "update_by": 2476444212131, + "layer_name": "Rule 1", + "fair_rotation": false, + "layer_start": 1702623874, + "layer_end": null, + "rotation_unit": "day", + "rotation_value": 1, + "mask_continuous_enabled": false + } + ], + "schedule_layers": null, + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": null + }, + "notify": { + "fixed_time": null, + "by": null, + "webhooks": null + }, + "schedule_id": 2539108069860, + "schedule_name": "Open Source Q&A", + "team_id": 2477033058131, + "description": "", + "layer_schedules": null, + "status": 0, + "cur_oncall": null, + "next_oncall": null + } + ] + } + } + } + } + }, + "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/ScheduleSelfRequest" + }, + "example": { + "start": 1712000000, + "end": 1712086400 + } + } + } + } + } + }, + "/schedule/infos": { + "post": { + "operationId": "scheduleInfos", + "summary": "Batch get schedules", + "description": "Return details of multiple on-call schedules by their IDs.", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/schedules/schedule-infos", + "metadata": { + "sidebarTitle": "Batch get schedules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleSelfResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "id": 5789640530410, + "name": "test-000001", + "account_id": 2451002751131, + "group_id": 4291079133131, + "disabled": 0, + "create_at": 1766110836, + "create_by": 2476123212131, + "update_at": 1775205795, + "update_by": 2476123212131, + "layers": null, + "schedule_layers": null, + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": null + }, + "notify": { + "advance_in_time": 300, + "fixed_time": null, + "by": { + "follow_preference": false, + "personal_channels": [ + "email" + ] + }, + "webhooks": [ + { + "type": "feishu_app", + "settings": { + "token": "", + "alias": "", + "data_source_id": 5427276014131, + "chat_ids": [ + "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d" + ], + "verify_token": "", + "sign_secret": "" + } + } + ] + }, + "schedule_id": 5789640530410, + "schedule_name": "test-000001", + "team_id": 4291079133131, + "description": "abc", + "layer_schedules": null, + "status": 0, + "cur_oncall": null, + "next_oncall": null + } + ] + } + } + } + } + }, + "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/ScheduleIDsRequest" + }, + "example": { + "schedule_ids": [ + 2001, + 2002, + 2003 + ] + } + } + } + } + } + }, + "/calendar/create": { + "post": { + "operationId": "calendarCreate", + "summary": "Create calendar", + "description": "Create a personal service calendar. Each account is limited to 5 calendars unless the Flashcat-Break-Cal-Limit header is set.", + "tags": [ + "On-call/Calendars" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/calendars/calendar-create", + "metadata": { + "sidebarTitle": "Create calendar" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "cal_name": "API Test Calendar" + } + } + } + } + }, + "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/CalendarCreateRequest" + }, + "example": { + "cal_name": "Production On-Call Calendar", + "description": "Calendar for production on-call team", + "timezone": "Asia/Shanghai", + "workdays": [ + 1, + 2, + 3, + 4, + 5 + ] + } + } + } + } + } + }, + "/calendar/update": { + "post": { + "operationId": "calendarUpdate", + "summary": "Update calendar", + "description": "Update a personal service calendar. Only non-null fields are updated.", + "tags": [ + "On-call/Calendars" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/calendars/calendar-update", + "metadata": { + "sidebarTitle": "Update calendar" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CalendarUpdateRequest" + }, + "example": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "cal_name": "Production On-Call Calendar (Updated)", + "timezone": "America/New_York", + "workdays": [ + 1, + 2, + 3, + 4, + 5 + ] + } + } + } + } + } + }, + "/calendar/delete": { + "post": { + "operationId": "calendarDelete", + "summary": "Delete calendar", + "description": "Delete a personal service calendar. The call fails when referenced by escalation or silence rules.", + "tags": [ + "On-call/Calendars" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/calendars/calendar-delete", + "metadata": { + "sidebarTitle": "Delete calendar" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CalendarIDRequest" + }, + "example": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM" + } + } + } + } + } + }, + "/calendar/info": { + "post": { + "operationId": "calendarInfo", + "summary": "Get calendar info", + "description": "Return details of a service calendar.", + "tags": [ + "On-call/Calendars" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/calendars/calendar-info", + "metadata": { + "sidebarTitle": "Get calendar info" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_id": 2451002751131, + "team_id": 2477033058131, + "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg", + "cal_name": "Stock Exchange Calendar", + "description": "A stock market trading calendar example", + "timezone": "Asia/Shanghai", + "kind": "personal", + "workdays": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], + "created_at": 1702455630, + "updated_at": 1775529526, + "creator_id": 2476444212131, + "updated_by": 3790925372131, + "status": "enabled" + } + } + } + } + }, + "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/CalendarIDRequest" + }, + "example": { + "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg" + } + } + } + } + } + }, + "/calendar/list": { + "post": { + "operationId": "calendarList", + "summary": "List calendars", + "description": "Return the list of service calendars visible to the current account.", + "tags": [ + "On-call/Calendars" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/calendars/calendar-list", + "metadata": { + "sidebarTitle": "List calendars" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "team_id": 2477033058131, + "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg", + "cal_name": "Stock Exchange Calendar", + "description": "A stock market trading calendar example", + "timezone": "Asia/Shanghai", + "kind": "personal", + "workdays": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], + "created_at": 1702455630, + "updated_at": 1775529526, + "creator_id": 2476444212131, + "updated_by": 3790925372131, + "status": "enabled" + }, + { + "account_id": 2451002751131, + "team_id": 0, + "cal_id": "cal.VZYkchxJhGELSF4jzkUAud", + "cal_name": "HK Stock Exchange Calendar", + "description": "Hong Kong Stock Exchange trading days calendar", + "timezone": "Asia/Shanghai", + "kind": "personal", + "extra_cal_ids": [ + "zh-cn.china.official" + ], + "created_at": 1702968470, + "updated_at": 1775188967, + "creator_id": 2451002751131, + "updated_by": 3790925372131, + "status": "enabled" + } + ], + "total": 8 + } + } + } + } + }, + "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/CalendarListRequest" + }, + "example": { + "kind": "personal" + } + } + } + } + } + }, + "/calendar/event/upsert": { + "post": { + "operationId": "calEventUpsert", + "summary": "Upsert calendar event", + "description": "Create or update a calendar event (holiday or workday override). Omit event_id to create a new event.", + "tags": [ + "On-call/Calendars" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/calendars/cal-event-upsert", + "metadata": { + "sidebarTitle": "Upsert calendar event" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalEventUpsertResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4", + "summary": "Test Holiday" + } + } + } + } + }, + "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/CalEventUpsertRequest" + }, + "example": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "summary": "Labour Day", + "start_at": "2024-05-01", + "end_at": "2024-05-06", + "is_off": true, + "description": "International Workers Day holiday" + } + } + } + } + } + }, + "/calendar/event/delete": { + "post": { + "operationId": "calEventDelete", + "summary": "Delete calendar event", + "description": "Delete a calendar event by calendar ID and event ID.", + "tags": [ + "On-call/Calendars" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/calendars/cal-event-delete", + "metadata": { + "sidebarTitle": "Delete calendar event" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CalEventIDRequest" + }, + "example": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4" + } + } + } + } + } + }, + "/calendar/event/list": { + "post": { + "operationId": "calEventList", + "summary": "List calendar events", + "description": "Return events for a personal calendar within a year/month/day scope. When month and day are both omitted the whole year is returned.", + "tags": [ + "On-call/Calendars" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/calendars/cal-event-list", + "metadata": { + "sidebarTitle": "List calendar events" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalEventListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "creator_id": 2476444212131, + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4", + "summary": "Test Holiday", + "description": "A test holiday event", + "start_at": "2026-05-01", + "end_at": "2026-05-02", + "is_off": true, + "created_at": 1775972034, + "updated_at": 1775972034 + }, + { + "account_id": 2451002751131, + "creator_id": 2451002751131, + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "event_id": "non_work.20260502", + "summary": "non-working day (Saturday)", + "description": "", + "start_at": "2026-05-02", + "end_at": "2026-05-03", + "is_off": true, + "created_at": 0, + "updated_at": 0 + } + ], + "total": 11 + } + } + } + } + }, + "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/CalEventListRequest" + }, + "example": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "year": 2024, + "month": 5 + } + } + } + } + } + }, + "/template/info": { + "post": { + "operationId": "template-read-info", + "summary": "Get template detail", + "description": "Return a single notification template by ID.", + "tags": [ + "On-call/Notification templates" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Templates Read** (`on-call`) |\n\n## Usage\n\n- Pass `000000000000000000000001` as `template_id` to retrieve the built-in preset template for the caller's account locale.", + "href": "/en/api-reference/on-call/notification-templates/template-read-info", + "metadata": { + "sidebarTitle": "Get template detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TemplateItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_id": 10023, + "team_id": 0, + "template_id": "6605a1b2c3d4e5f6a7b8c9d0", + "template_name": "Prod incident default", + "description": "Default template for production incidents.", + "email": "Incident {{ .IncidentName }} on {{ .Severity }}", + "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}", + "voice": "", + "dingtalk": "", + "wecom": "", + "feishu": "", + "feishu_app": "", + "dingtalk_app": "", + "wecom_app": "", + "slack_app": "", + "teams_app": "", + "telegram": "", + "slack": "", + "zoom": "", + "status": "enabled", + "creator_id": 80011, + "updated_by": 80011, + "created_at": 1712700000, + "updated_at": 1712702400 + } + } + } + } + }, + "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/TemplateIDRequest" + }, + "example": { + "template_id": "6605a1b2c3d4e5f6a7b8c9d0" + } + } + } + } + } + }, + "/template/list": { + "post": { + "operationId": "template-read-list", + "summary": "List templates", + "description": "Return a paginated list of notification templates.", + "tags": [ + "On-call/Notification templates" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Templates Read** (`on-call`) or **Templates Manage** (`on-call`) |\n\n## Usage\n\n- Pagination defaults to page 1 with 20 rows. The response's `has_next_page` tells you whether another page exists without needing a separate count request.\n- When `is_my_team` is `true`, `team_ids` is ignored.", + "href": "/en/api-reference/on-call/notification-templates/template-read-list", + "metadata": { + "sidebarTitle": "List templates" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TemplateListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 47, + "has_next_page": true, + "items": [ + { + "account_id": 10023, + "team_id": 0, + "template_id": "6605a1b2c3d4e5f6a7b8c9d0", + "template_name": "Prod incident default", + "description": "Default template for production incidents.", + "email": "Incident {{ .IncidentName }} on {{ .Severity }}", + "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}", + "voice": "", + "dingtalk": "", + "wecom": "", + "feishu": "", + "feishu_app": "", + "dingtalk_app": "", + "wecom_app": "", + "slack_app": "", + "teams_app": "", + "telegram": "", + "slack": "", + "zoom": "", + "status": "enabled", + "creator_id": 80011, + "updated_by": 80011, + "created_at": 1712700000, + "updated_at": 1712702400 + } + ] + } + } + } + } + }, + "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/TemplateListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "orderby": "updated_at", + "asc": false, + "is_my_team": false + } + } + } + } + } + }, + "/template/create": { + "post": { + "operationId": "template-write-create", + "summary": "Create a template", + "description": "Create a new notification template.", + "tags": [ + "On-call/Notification templates" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Templates Manage** (`on-call`) |\n\n## Usage\n\n- `template_name` must be unique within the account; duplicates return `InvalidParameter`.\n- The server validates every non-empty channel template by rendering it against a mock incident — a syntactic error in any channel fails the whole request with `InvalidParameter`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/notification-templates/template-write-create", + "metadata": { + "sidebarTitle": "Create a template" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TemplateCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "template_id": "6605a1b2c3d4e5f6a7b8c9d0", + "template_name": "Prod incident default" + } + } + } + } + }, + "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/TemplateCreateRequest" + }, + "example": { + "team_id": 0, + "template_name": "Prod incident default", + "description": "Default template for production incidents.", + "email": "Incident {{ .IncidentName }} on {{ .Severity }}", + "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}" + } + } + } + } + } + }, + "/template/update": { + "post": { + "operationId": "template-write-update", + "summary": "Update a template", + "description": "Replace the content of every channel on an existing template.", + "tags": [ + "On-call/Notification templates" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Templates Manage** (`on-call`) |\n\n## Usage\n\n- Every channel field in the request overwrites the stored value — send an empty string to clear a channel.\n- The caller needs data-permission on the template's team; otherwise the response is `AccessDenied`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/notification-templates/template-write-update", + "metadata": { + "sidebarTitle": "Update a template" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TemplateUpdateRequest" + }, + "example": { + "template_id": "6605a1b2c3d4e5f6a7b8c9d0", + "template_name": "Prod incident default", + "description": "Updated description.", + "email": "Incident {{ .IncidentName }} on {{ .Severity }}", + "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}" + } + } + } + } + } + }, + "/template/delete": { + "post": { + "operationId": "template-write-delete", + "summary": "Delete a template", + "description": "Soft-delete a template by ID.", + "tags": [ + "On-call/Notification templates" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Templates Manage** (`on-call`) |\n\n## Usage\n\n- Fails with `400 ReferenceExist` if the template is still referenced by any channel, escalation rule, or notification subscription.\n- Deletion is soft — `deleted_at` is set. The record remains for audit, but the template stops appearing in listings.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/notification-templates/template-write-delete", + "metadata": { + "sidebarTitle": "Delete a template" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TemplateIDRequest" + }, + "example": { + "template_id": "6605a1b2c3d4e5f6a7b8c9d0" + } + } + } + } + } + }, + "/enrichment/info": { + "post": { + "operationId": "enrichment-read-info", + "summary": "Get enrichment rules", + "description": "Return the enrichment rule set configured for a specific integration.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- Returns `null` if no enrichment rules have been configured for the integration.", + "href": "/en/api-reference/on-call/alert-enrichment/enrichment-read-info", + "metadata": { + "sidebarTitle": "Get enrichment rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EnrichmentItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 5001, + "rules": [ + { + "kind": "extraction", + "settings": { + "source_field": "labels.env", + "result_label": "environment", + "pattern": "^(prod|staging|dev).*$", + "override": true + } + } + ], + "status": "enabled", + "updated_by": 80011, + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + } + } + } + }, + "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/EnrichmentInfoRequest" + }, + "example": { + "integration_id": 5001 + } + } + } + } + } + }, + "/enrichment/list": { + "post": { + "operationId": "enrichment-read-list", + "summary": "List enrichment rules", + "description": "Return the enrichment rule sets for a list of integration IDs.", + "tags": [ + "On-call/Alert enrichment" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/alert-enrichment/enrichment-read-list", + "metadata": { + "sidebarTitle": "List enrichment rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EnrichmentListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "integration_id": 5001, + "rules": [], + "status": "enabled", + "updated_by": 80011, + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + ] + } + } + } + } + }, + "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/EnrichmentListRequest" + }, + "example": { + "integration_ids": [ + 5001, + 5002 + ] + } + } + } + } + } + }, + "/enrichment/upsert": { + "post": { + "operationId": "enrichment-write-upsert", + "summary": "Upsert enrichment rules", + "description": "Create or fully replace the enrichment rule set for an integration. The entire `rules` array is replaced atomically.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- Enrichment rules are evaluated in order.\n- Each rule has a `kind`: `extraction` (regex/gjson extraction), `composition` (template-based label composition), `mapping` (lookup via mapping schema or API), or `drop` (remove labels).\n- The optional `if` field is an `AndFilters` condition: if it does not match, the rule is skipped.\n- For `kind: extraction`: `source_field` must be `title`, `description`, or a `labels.*` key; specify exactly one of `pattern` (regex with named group `result`) or `g_json` (GJson path).\n- For `kind: composition`: `template` uses Go text/template syntax referencing `labels.*` keys.\n- For `kind: mapping`: `mapping_type` is `schema` (default) or `api`; provide `schema_id` or `api_id` accordingly.\n- For `kind: drop`: `drop_labels` lists the label keys to remove.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/alert-enrichment/enrichment-write-upsert", + "metadata": { + "sidebarTitle": "Upsert enrichment rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnrichmentUpsertRequest" + }, + "example": { + "integration_id": 5001, + "rules": [ + { + "kind": "extraction", + "settings": { + "source_field": "labels.env", + "result_label": "environment", + "pattern": "(?Pprod|staging|dev)", + "override": true + } + }, + { + "kind": "composition", + "settings": { + "result_label": "full_env", + "template": "{{.labels.region}}-{{.labels.environment}}", + "override": false + } + } + ] + } + } + } + } + } + }, + "/enrichment/mapping/schema/list": { + "post": { + "operationId": "mapping-schema-read-list", + "summary": "List mapping schemas", + "description": "Return all mapping schemas for the account, sorted by creation time ascending.", + "tags": [ + "On-call/Alert enrichment" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-read-list", + "metadata": { + "sidebarTitle": "List mapping schemas" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingSchemaListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "items": [ + { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "schema_name": "CMDB Lookup", + "description": "Enrich alerts with CMDB data", + "source_labels": [ + "host" + ], + "result_labels": [ + "owner", + "team", + "service" + ], + "status": "enabled", + "team_id": 0, + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + ] + } + } + } + } + }, + "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/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/enrichment/mapping/schema/info": { + "post": { + "operationId": "mapping-schema-read-info", + "summary": "Get mapping schema detail", + "description": "Return detail of a single mapping schema by its ID.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- Returns `null` if the schema does not exist.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-read-info", + "metadata": { + "sidebarTitle": "Get mapping schema detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingSchemaItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "schema_name": "CMDB Lookup", + "description": "Enrich alerts with CMDB data", + "source_labels": [ + "host" + ], + "result_labels": [ + "owner", + "team", + "service" + ], + "status": "enabled", + "team_id": 0, + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + } + } + } + }, + "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/MappingSchemaIDRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + } + } + } + } + } + }, + "/enrichment/mapping/schema/create": { + "post": { + "operationId": "mapping-schema-write-create", + "summary": "Create mapping schema", + "description": "Create a new mapping schema defining source lookup labels and the result labels to populate. Requires a Pro plan.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- Schema names must be unique within an account.\n- `source_labels` (1–3 labels) are used as lookup keys; `result_labels` (1–10 labels) are the labels written on match.\n- Label names must match `^[a-z][a-z0-9_]{0,39}$` (lowercase).\n- `source_labels` and `result_labels` must not overlap.\n- An account can have at most 20 mapping schemas.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-write-create", + "metadata": { + "sidebarTitle": "Create mapping schema" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingSchemaCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "schema_name": "CMDB Lookup" + } + } + } + } + }, + "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/MappingSchemaCreateRequest" + }, + "example": { + "schema_name": "CMDB Lookup", + "description": "Enrich alerts with CMDB data", + "source_labels": [ + "host" + ], + "result_labels": [ + "owner", + "team", + "service" + ] + } + } + } + } + } + }, + "/enrichment/mapping/schema/update": { + "post": { + "operationId": "mapping-schema-write-update", + "summary": "Update mapping schema", + "description": "Update the name, description, or owning team of a mapping schema. Source and result labels cannot be changed after creation.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- Only the schema creator, account admin, or team member can update the schema.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-write-update", + "metadata": { + "sidebarTitle": "Update mapping schema" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingSchemaUpdateRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "schema_name": "CMDB Lookup v2", + "description": "Updated description" + } + } + } + } + } + }, + "/enrichment/mapping/schema/delete": { + "post": { + "operationId": "mapping-schema-write-delete", + "summary": "Delete mapping schema", + "description": "Delete a mapping schema and all its associated data. Deletion is blocked if the schema is referenced by any enrichment rule or webhook.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- If the schema is still referenced, the response returns HTTP 400 with a `refs` list of blocking references.\n- Only the schema creator, account admin, or team member can delete the schema.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.\n- High-risk operation. Console JWT callers must pass a second-factor code; `app_key` callers bypass the MFA prompt but remain audited — treat the key as a secret.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-write-delete", + "metadata": { + "sidebarTitle": "Delete mapping schema" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingSchemaIDRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + } + } + } + } + } + }, + "/enrichment/mapping/data/list": { + "post": { + "operationId": "mapping-data-read-list", + "summary": "List mapping data", + "description": "Return paginated mapping data rows for a schema, with optional exact-match filtering on source label values.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- If `query` is provided, all source labels must be specified — partial source label queries are rejected.\n- Pagination uses cursor-based (`search_after_ctx`) or page-based (`p`, `limit`) navigation. `limit` defaults to 20, max 100.\n- The `search_after_ctx` token from a response can be passed back to retrieve the next page.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-read-list", + "metadata": { + "sidebarTitle": "List mapping data" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingDataListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "key": "server01", + "fields": { + "host": "server01", + "owner": "alice", + "team": "sre", + "service": "api" + }, + "created_at": 1710000000, + "updated_at": 1710000000 + } + ], + "total": 1, + "has_next_page": false + } + } + } + } + }, + "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/MappingDataListRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "orderby": "updated_at", + "asc": false, + "p": 1, + "limit": 20 + } + } + } + } + } + }, + "/enrichment/mapping/data/upsert": { + "post": { + "operationId": "mapping-data-write-upsert", + "summary": "Upsert mapping data rows", + "description": "Insert or update up to 1000 data rows in a mapping schema. Each row must contain all source and result labels.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- Each doc must contain values for all labels defined in `source_labels` and `result_labels`.\n- Values for unknown labels are silently dropped.\n- Each value must be at most 2048 characters.\n- Upsert is keyed on the combination of source label values — existing rows with the same source key are updated.\n- A schema can hold at most 10,000 rows by default.\n- The operation is locked per schema; concurrent upserts to the same schema may fail with `ErrRequestTooFrequently`.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-write-upsert", + "metadata": { + "sidebarTitle": "Upsert mapping data rows" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingDataUpsertResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "keys": [ + "server01", + "server02" + ] + } + } + } + } + }, + "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/MappingDataUpsertRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "docs": [ + { + "host": "server01", + "owner": "alice", + "team": "sre", + "service": "api" + }, + { + "host": "server02", + "owner": "bob", + "team": "platform", + "service": "gateway" + } + ] + } + } + } + } + } + }, + "/enrichment/mapping/data/delete": { + "post": { + "operationId": "mapping-data-write-delete", + "summary": "Delete mapping data rows", + "description": "Delete up to 100 mapping data rows by their keys.", + "tags": [ + "On-call/Alert enrichment" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-write-delete", + "metadata": { + "sidebarTitle": "Delete mapping data rows" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingDataDeleteRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "keys": [ + "server01", + "server02" + ] + } + } + } + } + } + }, + "/enrichment/mapping/data/truncate": { + "post": { + "operationId": "mapping-data-write-truncate", + "summary": "Truncate mapping data", + "description": "Delete all data rows in a mapping schema.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- This is an irreversible bulk-delete operation.\n- High-risk operation. Console JWT callers must pass a second-factor code; `app_key` callers bypass the MFA prompt but remain audited — treat the key as a secret.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-write-truncate", + "metadata": { + "sidebarTitle": "Truncate mapping data" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingSchemaIDRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + } + } + } + } + } + }, + "/enrichment/mapping/data/upload": { + "post": { + "operationId": "mapping-data-write-upload", + "summary": "Upload mapping data via CSV", + "description": "Upload a CSV file to bulk-load mapping data. By default the existing data is truncated before loading the new rows.", + "tags": [ + "On-call/Alert enrichment" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **20 requests/minute**; **2 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The request must use `Content-Type: multipart/form-data`. The file field name is `file` and `schema_id` is a query parameter.\n- CSV header row must include all source and result label names.\n- Maximum file size: 100 MB.\n- By default the schema's existing data is truncated before import. Pass query param `do_not_truncate_first=TRUE` to append instead.\n- Duplicate source label value combinations in the CSV cause a 400 error.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-write-upload", + "metadata": { + "sidebarTitle": "Upload mapping data via CSV" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingDataUploadRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + } + } + } + } + } + }, + "/enrichment/mapping/data/download": { + "post": { + "operationId": "mapping-data-read-download", + "summary": "Download mapping data as CSV", + "description": "Export all data rows of a mapping schema as a CSV file download.", + "tags": [ + "On-call/Alert enrichment" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The response is a CSV file with `Content-Disposition: attachment` header.\n- The CSV header row matches the schema's source and result labels in order.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-read-download", + "metadata": { + "sidebarTitle": "Download mapping data as CSV" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CsvFileResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": "host,owner,team,service\nserver01,alice,sre,api\n" + } + } + } + }, + "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/MappingSchemaIDRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + } + } + } + } + } + }, + "/enrichment/mapping/api/list": { + "post": { + "operationId": "mapping-api-read-list", + "summary": "List mapping APIs", + "description": "Return all mapping APIs configured for the account.", + "tags": [ + "On-call/Alert enrichment" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-read-list", + "metadata": { + "sidebarTitle": "List mapping APIs" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingAPIListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "items": [ + { + "api_id": "665f1a2b3c4d5e6f7a8b9c02", + "api_name": "CMDB API", + "description": "Query CMDB for host metadata", + "url": "https://cmdb.example.com/api/lookup", + "headers": { + "X-Token": "***" + }, + "timeout": 2, + "retry_count": 1, + "insecure_skip_verify": false, + "status": "enabled", + "team_id": 0, + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + ] + } + } + } + } + }, + "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/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/enrichment/mapping/api/info": { + "post": { + "operationId": "mapping-api-read-info", + "summary": "Get mapping API detail", + "description": "Return detail of a single mapping API by its ID.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- Returns `null` if the API does not exist.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-read-info", + "metadata": { + "sidebarTitle": "Get mapping API detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingAPIItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "api_id": "665f1a2b3c4d5e6f7a8b9c02", + "api_name": "CMDB API", + "url": "https://cmdb.example.com/api/lookup", + "timeout": 2, + "retry_count": 1, + "insecure_skip_verify": false, + "status": "enabled", + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + } + } + } + }, + "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/MappingAPIIDRequest" + }, + "example": { + "api_id": "665f1a2b3c4d5e6f7a8b9c02" + } + } + } + } + } + }, + "/enrichment/mapping/api/create": { + "post": { + "operationId": "mapping-api-write-create", + "summary": "Create mapping API", + "description": "Create a new external HTTP API endpoint used to enrich alerts via HTTP lookup.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- `url` must start with `http://` or `https://` and cannot resolve to an internal IP (in SaaS mode).\n- `timeout` is the HTTP read timeout in seconds (1–3, default 2).\n- `retry_count` is the number of retries on failure (0–1, default 0).\n- Headers with security-sensitive names (e.g. `authorization`, `cookie`) are rejected in SaaS mode.\n- An account can have at most 50 mapping APIs.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-write-create", + "metadata": { + "sidebarTitle": "Create mapping API" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingAPICreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "api_id": "665f1a2b3c4d5e6f7a8b9c02", + "api_name": "CMDB API" + } + } + } + } + }, + "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/MappingAPICreateRequest" + }, + "example": { + "api_name": "CMDB API", + "description": "Query CMDB for host metadata", + "url": "https://cmdb.example.com/api/lookup", + "headers": { + "X-Token": "mytoken" + }, + "timeout": 2, + "retry_count": 1, + "insecure_skip_verify": false + } + } + } + } + } + }, + "/enrichment/mapping/api/update": { + "post": { + "operationId": "mapping-api-write-update", + "summary": "Update mapping API", + "description": "Update configuration of an existing mapping API.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- Only the API creator, account admin, or team member can update the API.\n- All updatable fields are optional — only provided fields are changed.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-write-update", + "metadata": { + "sidebarTitle": "Update mapping API" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingAPIUpdateRequest" + }, + "example": { + "api_id": "665f1a2b3c4d5e6f7a8b9c02", + "timeout": 3, + "retry_count": 1 + } + } + } + } + } + }, + "/enrichment/mapping/api/delete": { + "post": { + "operationId": "mapping-api-write-delete", + "summary": "Delete mapping API", + "description": "Delete a mapping API. Deletion is blocked if the API is referenced by any enrichment rule.", + "tags": [ + "On-call/Alert enrichment" + ], + "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- If the API is still referenced, the response returns HTTP 400 with a `refs` list.\n- Only the API creator, account admin, or team member can delete the API.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-write-delete", + "metadata": { + "sidebarTitle": "Delete mapping API" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingAPIIDRequest" + }, + "example": { + "api_id": "665f1a2b3c4d5e6f7a8b9c02" + } + } + } + } + } + }, + "/insight/alert/topk-by-label": { + "post": { + "operationId": "insightTopkAlertsByLabel", + "summary": "Get top-K alerts grouped by check or resource", + "description": "Return the top-K alert groups aggregated either by `check` or by `resource` label over the specified time range.", + "tags": [ + "On-call/Analytics" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/analytics/insight-topk-alerts-by-label", + "metadata": { + "sidebarTitle": "Get top-K alerts grouped by check or resource" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/InsightAlertByLabelResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "label": "cpu-high", + "total_alert_cnt": 312, + "total_alert_event_cnt": 987 + }, + { + "label": "disk-full", + "total_alert_cnt": 178, + "total_alert_event_cnt": 452 + }, + { + "label": "memory-oom", + "total_alert_cnt": 94, + "total_alert_event_cnt": 231 + } + ] + } + } + } + } + }, + "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/InsightTopkAlertByLabelRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "label": "check", + "k": 10, + "orderby": "total_alert_cnt" + } + } + } + } + } + }, + "/insight/account": { + "post": { + "operationId": "insightByAccount", + "summary": "Get account-level insight", + "description": "Return aggregated incident insight metrics for the entire account.", + "tags": [ + "On-call/Analytics" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/analytics/insight-by-account", + "metadata": { + "sidebarTitle": "Get account-level insight" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DimensionInsightResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "ts": 1740844800, + "total_incident_cnt": 2, + "total_incidents_acknowledged": 2, + "total_incidents_closed": 2, + "total_incidents_auto_closed": 0, + "total_incidents_manually_closed": 2, + "total_incidents_timeout_closed": 0, + "total_incidents_escalated": 0, + "total_incidents_manually_escalated": 0, + "total_incidents_timeout_escalated": 0, + "total_incidents_reassigned": 2, + "total_interruptions": 3, + "total_notifications": 6, + "total_engaged_seconds": 3317709, + "total_seconds_to_ack": 3317709, + "total_seconds_to_close": 3749514, + "mean_seconds_to_ack": 1658854.5, + "mean_seconds_to_close": 1874757, + "noise_reduction_pct": 0, + "acknowledgement_pct": 100, + "total_alert_cnt": 0, + "total_alert_event_cnt": 0 + } + ] + } + } + } + } + }, + "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/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "aggregate_unit": "day", + "severities": [ + "Critical", + "Warning" + ] + } + } + } + } + } + }, + "/insight/incident/list": { + "post": { + "operationId": "insightIncidentList", + "summary": "List insight incidents", + "description": "Return a paged list of incidents with per-incident handling metrics used by the analytics dashboard.", + "tags": [ + "On-call/Analytics" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/analytics/insight-incident-list", + "metadata": { + "sidebarTitle": "List insight incidents" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/InsightIncidentListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 2, + "has_next_page": false, + "items": [ + { + "incident_id": "67ca560c381a4fedb664f5f8", + "title": "CPU spike on prod-web-01", + "description": "CPU usage exceeded 90% threshold", + "team_id": 4295771902131, + "team_name": "SRE Team", + "channel_id": 4321322010131, + "channel_name": "Production Alerts", + "progress": "Closed", + "severity": "Info", + "created_at": 1741313548, + "closed_by": "manually", + "seconds_to_ack": 1052085, + "seconds_to_close": 1483880, + "engaged_seconds": 1052085, + "hours": "work", + "responders": [ + { + "person_id": 3790925372131, + "assigned_at": 1741313548, + "acknowledged_at": 1742365633, + "person_name": "alice", + "email": "alice@example.com" + } + ], + "assigned_to": { + "person_ids": [ + 3790925372131 + ], + "escalate_rule_id": "000000000000000000000000", + "layer_idx": 0, + "type": "reassign" + }, + "labels": {}, + "fields": {}, + "notifications": 4, + "interruptions": 2, + "assignments": 2, + "reassignments": 1, + "acknowledgements": 1, + "escalations": 0, + "timeout_escalations": 0, + "manual_escalations": 0, + "creator_id": 3790925372131, + "creator_name": "alice" + } + ] + } + } + } + } + }, + "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/InsightIncidentListRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "p": 1, + "limit": 20, + "severities": [ + "Critical" + ] + } + } + } + } + } + }, + "/insight/incident/export": { + "post": { + "operationId": "insightIncidentExport", + "summary": "Export insight incidents", + "description": "Export the filtered incident analytics list as a CSV file. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope.", + "tags": [ + "On-call/Analytics" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/analytics/insight-incident-export", + "metadata": { + "sidebarTitle": "Export insight incidents" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightIncidentExportRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "severities": [ + "Critical", + "Warning" + ], + "export_fields": [ + "incident_id", + "title", + "severity", + "created_at", + "seconds_to_close" + ], + "description_html_to_text": true + } + } + } + } + } + }, + "/insight/channel": { + "post": { + "operationId": "insightByChannel", + "summary": "Get channel insight", + "description": "Return insight metrics aggregated by channel.", + "tags": [ + "On-call/Analytics" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/analytics/insight-by-channel", + "metadata": { + "sidebarTitle": "Get channel insight" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DimensionInsightResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "ts": 1740844800, + "channel_id": 4321322010131, + "channel_name": "Production Alerts", + "total_incident_cnt": 2, + "total_incidents_acknowledged": 2, + "total_incidents_closed": 2, + "total_incidents_auto_closed": 0, + "total_incidents_manually_closed": 2, + "total_incidents_timeout_closed": 0, + "total_incidents_escalated": 0, + "total_incidents_manually_escalated": 0, + "total_incidents_timeout_escalated": 0, + "total_incidents_reassigned": 2, + "total_interruptions": 3, + "total_notifications": 6, + "total_engaged_seconds": 3317709, + "total_seconds_to_ack": 3317709, + "total_seconds_to_close": 3749514, + "mean_seconds_to_ack": 1658854.5, + "mean_seconds_to_close": 1874757, + "noise_reduction_pct": 0, + "acknowledgement_pct": 100, + "total_alert_cnt": 0, + "total_alert_event_cnt": 0 + } + ] + } + } + } + } + }, + "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/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "channel_ids": [ + 4321322010131 + ], + "aggregate_unit": "day" + } + } + } + } + } + }, + "/insight/channel/export": { + "post": { + "operationId": "insightChannelExport", + "summary": "Export channel insight", + "description": "Export channel insight metrics as a CSV file. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope.", + "tags": [ + "On-call/Analytics" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/analytics/insight-channel-export", + "metadata": { + "sidebarTitle": "Export channel insight" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "channel_ids": [ + 4321322010131 + ], + "severities": [ + "Critical", + "Warning" + ] + } + } + } + } + } + }, + "/insight/team": { + "post": { + "operationId": "insightByTeam", + "summary": "Get team insight", + "description": "Return insight metrics aggregated by team.", + "tags": [ + "On-call/Analytics" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/analytics/insight-by-team", + "metadata": { + "sidebarTitle": "Get team insight" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DimensionInsightResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "ts": 1740844800, + "team_id": 4295771902131, + "team_name": "SRE Team", + "total_incident_cnt": 2, + "total_incidents_acknowledged": 2, + "total_incidents_closed": 2, + "total_incidents_auto_closed": 0, + "total_incidents_manually_closed": 2, + "total_incidents_timeout_closed": 0, + "total_incidents_escalated": 0, + "total_incidents_manually_escalated": 0, + "total_incidents_timeout_escalated": 0, + "total_incidents_reassigned": 2, + "total_interruptions": 3, + "total_notifications": 6, + "total_engaged_seconds": 3317709, + "total_seconds_to_ack": 3317709, + "total_seconds_to_close": 3749514, + "mean_seconds_to_ack": 1658854.5, + "mean_seconds_to_close": 1874757, + "noise_reduction_pct": 0, + "acknowledgement_pct": 100, + "total_alert_cnt": 0, + "total_alert_event_cnt": 0 + } + ] + } + } + } + } + }, + "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/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "team_ids": [ + 4295771902131 + ], + "aggregate_unit": "day" + } + } + } + } + } + }, + "/insight/team/export": { + "post": { + "operationId": "insightTeamExport", + "summary": "Export team insight", + "description": "Export team insight metrics as a CSV file. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope.", + "tags": [ + "On-call/Analytics" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/analytics/insight-team-export", + "metadata": { + "sidebarTitle": "Export team insight" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "team_ids": [ + 4295771902131 + ], + "severities": [ + "Critical", + "Warning" + ] + } + } + } + } + } + }, + "/insight/responder": { + "post": { + "operationId": "insightByResponder", + "summary": "Get responder insight", + "description": "Return insight metrics aggregated by responder.", + "tags": [ + "On-call/Analytics" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/analytics/insight-by-responder", + "metadata": { + "sidebarTitle": "Get responder insight" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ResponderInsightResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "ts": 1740844800, + "responder_id": 3790925372131, + "responder_name": "alice", + "total_incident_cnt": 1, + "total_incidents_acknowledged": 1, + "total_incidents_reassigned": 0, + "total_incidents_escalated": 0, + "total_incidents_timeout_escalated": 0, + "total_incidents_manually_escalated": 0, + "total_interruptions": 1, + "total_notifications": 2, + "total_engaged_seconds": 10, + "total_seconds_to_ack": 2265624, + "mean_seconds_to_ack": 2265624, + "acknowledgement_pct": 100 + } + ] + } + } + } + } + }, + "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/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "responder_ids": [ + 3790925372131 + ], + "aggregate_unit": "day" + } + } + } + } + } + }, + "/insight/responder/export": { + "post": { + "operationId": "insightResponderExport", + "summary": "Export responder insight", + "description": "Export responder insight metrics as a CSV file. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope.", + "tags": [ + "On-call/Analytics" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/analytics/insight-responder-export", + "metadata": { + "sidebarTitle": "Export responder insight" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "responder_ids": [ + 3790925372131 + ], + "severities": [ + "Critical", + "Warning" + ] + } + } + } + } + } + }, + "/status-page/change/info": { + "get": { + "operationId": "statusPageChangeInfo", + "summary": "Get status page event detail", + "description": "Retrieve details of a specific status page event (incident or maintenance).", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-info", + "metadata": { + "sidebarTitle": "Get status page event detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageChangeItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "change_id": 5821693893131, + "page_id": 5750613685214, + "type": "incident", + "title": "Web Console Degraded Performance", + "description": "The issue has been resolved, and all services are operating normally.\n\nThank you for your patience.", + "status": "resolved", + "affected_components": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", + "name": "Web Console", + "available_since_seconds": 1765349358, + "order_id": 1, + "status": "operational" + } + ], + "start_at_seconds": 1766736878, + "close_at_seconds": 1775529742, + "updates": [ + { + "update_id": "01KDCVJQ88SZPHWPTDV2Z2AZW8", + "at_seconds": 1766736876, + "status": "investigating", + "description": "We are currently investigating an issue affecting some services.", + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "component_name": "Web Console", + "status": "degraded" + } + ] + }, + { + "update_id": "01KNJX3KW873ZZSRZC14SGFYS3", + "at_seconds": 1775529742, + "status": "resolved", + "description": "The issue has been resolved, and all services are operating normally.", + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "component_name": "Web Console", + "status": "operational" + } + ] + } + ], + "notify_subscribers": true + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Status page ID." + }, + { + "name": "change_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Event (change) ID." + } + ] + } + }, + "/status-page/change/list": { + "get": { + "operationId": "statusPageChangeList", + "summary": "List status page events", + "description": "List events (incidents and maintenances) for a status page.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-list", + "metadata": { + "sidebarTitle": "List status page events" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageChangeListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "change_id": 5821693893131, + "page_id": 5750613685214, + "type": "incident", + "title": "Web Console Degraded Performance", + "description": "The issue has been resolved, and all services are operating normally.", + "status": "resolved", + "affected_components": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", + "name": "Web Console", + "available_since_seconds": 1765349358, + "order_id": 1, + "status": "operational" + } + ], + "start_at_seconds": 1766736878, + "close_at_seconds": 1775529742, + "updates": [ + { + "update_id": "01KDCVJQ88SZPHWPTDV2Z2AZW8", + "at_seconds": 1766736876, + "status": "investigating", + "description": "We are currently investigating an issue affecting some services.", + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "component_name": "Web Console", + "status": "degraded" + } + ] + }, + { + "update_id": "01KNJX3KW873ZZSRZC14SGFYS3", + "at_seconds": 1775529742, + "status": "resolved", + "description": "The issue has been resolved, and all services are operating normally.", + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "component_name": "Web Console", + "status": "operational" + } + ] + } + ], + "notify_subscribers": true + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Status page ID." + }, + { + "name": "start_at_seconds", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Filter events started at or after this unix timestamp (seconds)." + }, + { + "name": "end_at_seconds", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Filter events started at or before this unix timestamp (seconds)." + }, + { + "name": "type", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "incident", + "maintenance" + ] + }, + "description": "Event type filter. Required." + }, + { + "name": "status", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ] + }, + "description": "Event status filter. Required. Must be a status valid for the given `type` (e.g. `investigating`/`identified`/`monitoring`/`resolved` for incidents; `scheduled`/`ongoing`/`completed` for maintenances)." + } + ] + } + }, + "/status-page/change/create": { + "post": { + "operationId": "statusPageChangeCreate", + "summary": "Create status page event", + "description": "Create a new incident or maintenance event on a status page.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-create", + "metadata": { + "sidebarTitle": "Create status page event" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageChangeCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "change_id": 6294539747131, + "change_name": "API Test Incident" + } + } + } + } + }, + "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/CreateStatusPageChangeRequest" + }, + "example": { + "page_id": 5750613685214, + "type": "incident", + "title": "Web Console Degraded Performance", + "description": "We are investigating degraded performance affecting the web console.", + "status": "investigating", + "start_at_seconds": 1712000000, + "notify_subscribers": true, + "updates": [ + { + "status": "investigating", + "description": "We are currently investigating an issue affecting some users.", + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "status": "degraded" + } + ] + } + ] + } + } + } + } + } + }, + "/status-page/change/update": { + "post": { + "operationId": "statusPageChangeUpdate", + "summary": "Update status page event", + "description": "Update an existing status page event.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-update", + "metadata": { + "sidebarTitle": "Update status page event" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateStatusPageChangeRequest" + }, + "example": { + "page_id": 5750613685214, + "change_id": 5821693893131, + "title": "Web Console Degraded Performance (Updated)" + } + } + } + } + } + }, + "/status-page/change/delete": { + "post": { + "operationId": "statusPageChangeDelete", + "summary": "Delete status page event", + "description": "Delete a status page event.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-delete", + "metadata": { + "sidebarTitle": "Delete status page event" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteStatusPageChangeRequest" + }, + "example": { + "page_id": 5750613685214, + "change_id": 5821693893131 + } + } + } + } + } + }, + "/status-page/change/timeline/create": { + "post": { + "operationId": "statusPageChangeTimelineCreate", + "summary": "Create event timeline entry", + "description": "Add a timeline update to a status page event.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-timeline-create", + "metadata": { + "sidebarTitle": "Create event timeline entry" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageChangeTimelineCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "update_id": "01KP0311872NVYFRRQ82FWXAP4" + } + } + } + } + }, + "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/CreateStatusPageChangeTimelineRequest" + }, + "example": { + "page_id": 5750613685214, + "change_id": 5821693893131, + "status": "identified", + "description": "We have identified the root cause and are working on a fix.", + "at_seconds": 1712003600, + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "status": "partial_outage" + } + ] + } + } + } + } + } + }, + "/status-page/change/timeline/update": { + "post": { + "operationId": "statusPageChangeTimelineUpdate", + "summary": "Update event timeline entry", + "description": "Update a timeline entry for a status page event.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-timeline-update", + "metadata": { + "sidebarTitle": "Update event timeline entry" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateStatusPageChangeTimelineRequest" + }, + "example": { + "page_id": 5750613685214, + "change_id": 5821693893131, + "update_id": "01KP0311872NVYFRRQ82FWXAP4", + "description": "Corrected description: root cause identified in database layer.", + "at_seconds": 1712003600 + } + } + } + } + } + }, + "/status-page/change/timeline/delete": { + "post": { + "operationId": "statusPageChangeTimelineDelete", + "summary": "Delete event timeline entry", + "description": "Delete a timeline entry from a status page event.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-timeline-delete", + "metadata": { + "sidebarTitle": "Delete event timeline entry" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteStatusPageChangeTimelineRequest" + }, + "example": { + "page_id": 5750613685214, + "change_id": 5821693893131, + "update_id": "01KP0311872NVYFRRQ82FWXAP4" + } + } + } + } + } + }, + "/status-page/subscriber/list": { + "get": { + "operationId": "statusPageSubscriberList", + "summary": "List status page subscribers", + "description": "List subscribers who have signed up for status page notifications.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/status-pages/status-page-subscriber-list", + "metadata": { + "sidebarTitle": "List status page subscribers" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageSubscriberListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 2, + "has_next_page": false, + "items": [ + { + "recipient": "alice@example.com", + "method": "email", + "components": [], + "all": true, + "locale": "zh-CN" + }, + { + "recipient": "bob@example.com", + "method": "email", + "components": [], + "all": true, + "locale": "en-US" + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Status page ID." + }, + { + "name": "component_ids", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Comma-separated component IDs to filter subscribers by." + }, + { + "name": "p", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "default": 1 + }, + "description": "Page number (1-based)." + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 100, + "default": 10 + }, + "description": "Page size (1-100)." + } + ] + } + }, + "/status-page/subscriber/import": { + "post": { + "operationId": "statusPageSubscriberImport", + "summary": "Import subscribers", + "description": "Bulk import subscribers for a status page.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **20 requests/minute**; **2 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-subscriber-import", + "metadata": { + "sidebarTitle": "Import subscribers" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportStatusPageSubscribersRequest" + }, + "example": { + "page_id": 5750613685214, + "method": "email", + "subscribers": [ + { + "recipient": "alice@example.com", + "all": true, + "locale": "en-US" + }, + { + "recipient": "bob@example.com", + "component_ids": [ + "01KC3GAZ6ZJE40H55GM31RPWZE" + ], + "all": false, + "locale": "zh-CN" + } + ] + } + } + } + } + } + }, + "/status-page/subscriber/export": { + "post": { + "operationId": "statusPageSubscriberExport", + "summary": "Export subscribers", + "description": "Export subscribers list for a status page as a CSV attachment. The response is a `text/csv` file with columns: Method, Recipient, Components, Subscribe All, Locale.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-subscriber-export", + "metadata": { + "sidebarTitle": "Export subscribers" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageSubscriberExportResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": "Method,Recipient,Components,Subscribe All,Locale\nemail,alice@example.com,,true,zh-CN\nemail,bob@example.com,,true,en-US" + } + } + } + }, + "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/ExportStatusPageSubscribersRequest" + }, + "example": { + "page_id": 5750613685214 + } + } + } + } + } + }, + "/status-page/migrate-structure": { + "post": { + "operationId": "statusPageMigrateStructure", + "summary": "Migrate status page structure", + "description": "Start a migration job that imports the structure and historical events of an Atlassian Statuspage into a new Flashduty status page.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-migrate-structure", + "metadata": { + "sidebarTitle": "Migrate status page structure" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageMigrationStartResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "job_id": "01KP0311872NVYFRRQ82FW0001" + } + } + } + } + }, + "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/MigrateStatusPageStructureRequest" + }, + "example": { + "api_key": "sk-stsp-xxxxxxxxxxxxxxxxxxxx", + "source_page_id": "abcdefghij" + } + } + } + } + } + }, + "/status-page/migrate-email-subscribers": { + "post": { + "operationId": "statusPageMigrateEmailSubscribers", + "summary": "Migrate email subscribers", + "description": "Start a migration job that imports email subscribers from an Atlassian Statuspage into an existing Flashduty status page.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-migrate-email-subscribers", + "metadata": { + "sidebarTitle": "Migrate email subscribers" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageMigrationStartResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "job_id": "01KP0311872NVYFRRQ82FW0002" + } + } + } + } + }, + "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/MigrateStatusPageEmailSubscribersRequest" + }, + "example": { + "api_key": "sk-stsp-xxxxxxxxxxxxxxxxxxxx", + "source_page_id": "abcdefghij", + "target_page_id": 5750613685214 + } + } + } + } + } + }, + "/status-page/migration/status": { + "get": { + "operationId": "statusPageMigrationStatus", + "summary": "Get migration status", + "description": "Get the current status and progress of a status page migration job.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/status-pages/status-page-migration-status", + "metadata": { + "sidebarTitle": "Get migration status" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageMigrationJob" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "job_id": "01KP0311872NVYFRRQ82FW0001", + "account_id": 2451002751131, + "source_page_id": "abcdefghij", + "target_page_id": 5750613685214, + "phase": "history", + "status": "completed", + "progress": { + "total_steps": 5, + "completed_steps": 5, + "components_imported": 8, + "sections_imported": 3, + "incidents_imported": 12, + "maintenances_imported": 2, + "subscribers_imported": 0, + "templates_imported": 0, + "subscribers_skipped": 0 + }, + "created_at": 1766736878, + "updated_at": 1766740000 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "parameters": [ + { + "name": "job_id", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "description": "Migration job ID returned by `migrate-structure` or `migrate-email-subscribers`." + } + ] + } + }, + "/status-page/migration/cancel": { + "post": { + "operationId": "statusPageMigrationCancel", + "summary": "Cancel status page migration", + "description": "Cancel an in-progress status page migration job. Only jobs currently in the `running` state can be cancelled.", + "tags": [ + "On-call/Status pages" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-migration-cancel", + "metadata": { + "sidebarTitle": "Cancel status page migration" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CancelStatusPageMigrationRequest" + }, + "example": { + "job_id": "01KP0311872NVYFRRQ82FW0001" + } + } + } + } + } + }, + "/monit/rule/list/basic": { + "post": { + "operationId": "monit-rule-read-list", + "summary": "List alert rules", + "description": "Return the basic information of all alert rules in a folder. For full rule details, call `POST /monit/rule/info`.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |\n\n## Usage\n\n- Set `folder_id` to `0` to list all rules across all folders visible to the current user.\n- The `triggered` field indicates whether the rule has any currently active alerts.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-list", + "metadata": { + "sidebarTitle": "List alert rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleBasicListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 50001, + "folder_id": 100, + "name": "CPU High", + "ds_type": "prometheus", + "enabled": true, + "triggered": true, + "created_at": 1710000000 + } + ] + } + } + } + }, + "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/RuleListRequest" + }, + "example": { + "folder_id": 100 + } + } + } + } + } + }, + "/monit/rule/info": { + "post": { + "operationId": "monit-rule-read-info", + "summary": "Get alert rule detail", + "description": "Return the full configuration of an alert rule by its ID, including rule queries, thresholds, and notification settings.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-info", + "metadata": { + "sidebarTitle": "Get alert rule detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertRuleInfoResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 50001, + "folder_id": 100, + "name": "CPU High", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "* * * * *", + "channel_ids": [ + 20001 + ] + } + } + } + } + }, + "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/RuleIDRequest" + }, + "example": { + "id": 50001 + } + } + } + } + } + }, + "/monit/rule/create": { + "post": { + "operationId": "monit-rule-write-create", + "summary": "Create alert rule", + "description": "Create a new alert rule. Returns the created rule with its assigned ID.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- `name`, `ds_type`, `cron_pattern`, and `rule_configs.queries` are required.\n- Either `ds_list` (supports wildcards) or `ds_ids` must be non-empty.\n- `cron_pattern` uses standard 5-field cron syntax.\n- `channel_ids` can be empty; alerts will then route through the global integration.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-create", + "metadata": { + "sidebarTitle": "Create alert rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertRule" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 50001, + "folder_id": 100, + "name": "CPU High", + "ds_type": "prometheus", + "created_at": 1712000000 + } + } + } + } + }, + "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/AlertRule" + }, + "example": { + "folder_id": 100, + "name": "CPU High", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "* * * * *", + "channel_ids": [ + 20001 + ], + "rule_configs": { + "queries": [ + { + "name": "A", + "expr": "avg(cpu_usage_idle) < 10" + } + ], + "check_threshold": { + "enabled": true, + "critical": "A", + "alerting_check_times": 1, + "recovery_check_times": 1, + "push_recovery_event": true, + "recovery": { + "mode": "invert" + } + } + } + } + } + } + } + } + }, + "/monit/rule/update": { + "post": { + "operationId": "monit-rule-write-update", + "summary": "Update alert rule", + "description": "Replace the full configuration of an existing alert rule. All fields are overwritten.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- `id` is required. All other fields follow the same rules as `POST /monit/rule/create`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-update", + "metadata": { + "sidebarTitle": "Update alert rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertRule" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 50001, + "updated_at": 1712100000 + } + } + } + } + }, + "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/AlertRule" + }, + "example": { + "id": 50001, + "folder_id": 100, + "name": "CPU High v2", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "* * * * *", + "rule_configs": { + "queries": [ + { + "name": "A", + "expr": "avg(cpu_usage_idle) < 5" + } + ] + } + } + } + } + } + } + }, + "/monit/rule/delete": { + "post": { + "operationId": "monit-rule-write-delete", + "summary": "Delete alert rule", + "description": "Delete a single alert rule by its ID.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-delete", + "metadata": { + "sidebarTitle": "Delete alert rule" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleEmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleIDRequest" + }, + "example": { + "id": 50001 + } + } + } + } + } + }, + "/monit/rule/delete/batch": { + "post": { + "operationId": "monit-rule-write-delete-batch", + "summary": "Batch delete alert rules", + "description": "Delete multiple alert rules in a single request.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **30 requests/minute**; **5 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-delete-batch", + "metadata": { + "sidebarTitle": "Batch delete alert rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleEmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleIDsRequest" + }, + "example": { + "ids": [ + 50001, + 50002 + ] + } + } + } + } + } + }, + "/monit/rule/update/fields": { + "post": { + "operationId": "monit-rule-write-fields-update", + "summary": "Batch update rule fields", + "description": "Update specific fields across multiple alert rules at once. Only the fields listed in `fields` are applied.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Include the field names you want to update in the `fields` array, e.g. `[\"enabled\", \"channel_ids\"]`.\n- Only the specified fields are updated; others are left unchanged.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-fields-update", + "metadata": { + "sidebarTitle": "Batch update rule fields" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleNameMessageListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "name": "CPU High", + "message": "" + }, + { + "name": "Disk High", + "message": "" + } + ] + } + } + } + }, + "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/RuleFieldsUpdateRequest" + }, + "example": { + "ids": [ + 50001, + 50002 + ], + "fields": [ + "enabled" + ], + "enabled": false + } + } + } + } + } + }, + "/monit/rule/import": { + "post": { + "operationId": "monit-rule-write-import", + "summary": "Import alert rules", + "description": "Import one or more alert rules from a JSON array. Returns the result for each rule, indicating success or failure.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **20 requests/minute**; **2 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- The request body is a JSON array of rule export objects (compatible with the output of `POST /monit/rule/export`).\n- Each object must include `folder_id`, `ds_type`, and either `ds_list` or `ds_ids`.\n- Some rules may fail (e.g. duplicate name). Check each result for individual status.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-import", + "metadata": { + "sidebarTitle": "Import alert rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleImportResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "name": "CPU High", + "message": "" + } + ] + } + } + } + }, + "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/RuleImportRequest" + }, + "example": [ + { + "folder_id": 100, + "name": "CPU High", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "* * * * *", + "rule_configs": { + "queries": [ + { + "name": "A", + "expr": "avg(cpu_usage_idle) < 10" + } + ] + } + } + ] + } + } + } + } + }, + "/monit/rule/export": { + "post": { + "operationId": "monit-rule-read-export", + "summary": "Export alert rules", + "description": "Export the configuration of selected alert rules as a portable JSON array, compatible with `POST /monit/rule/import`.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-export", + "metadata": { + "sidebarTitle": "Export alert rules" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertRuleExportListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "name": "CPU High", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "* * * * *" + } + ] + } + } + } + }, + "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/RuleIDsRequest" + }, + "example": { + "ids": [ + 50001 + ] + } + } + } + } + } + }, + "/monit/rule/move": { + "post": { + "operationId": "monit-rule-write-move", + "summary": "Move alert rules to folder", + "description": "Move one or more alert rules to a different folder.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-move", + "metadata": { + "sidebarTitle": "Move alert rules to folder" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleNameMessageListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "name": "CPU High", + "message": "" + } + ] + } + } + } + }, + "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/RuleMoveRequest" + }, + "example": { + "ids": [ + 50001, + 50002 + ], + "dest_folder_id": 200 + } + } + } + } + } + }, + "/monit/rule/status": { + "post": { + "operationId": "monit-rule-write-status", + "summary": "Get rule trigger status under folder", + "description": "Return the rule trigger summary for all rules under a folder node and its descendants.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Set `folder_id` to `0` to get summary across all folders.\n- If the folder contains too many rules, computation is skipped for self-protection.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-status", + "metadata": { + "sidebarTitle": "Get rule trigger status under folder" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleStatusResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "folder_id": 100, + "folder_name": "Production", + "rule_total": 10, + "triggered_rule_count": 2 + } + ] + } + } + } + }, + "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/RuleFolderIDRequest" + }, + "example": { + "folder_id": 100 + } + } + } + } + } + }, + "/monit/rule/audits": { + "post": { + "operationId": "monit-rule-read-audits", + "summary": "List rule change history", + "description": "Return the change history (audit records) for an alert rule.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-audits", + "metadata": { + "sidebarTitle": "List rule change history" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleAuditListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 9001, + "account_id": 10023, + "alert_rule_id": 50001, + "action": "update", + "creator_id": 80011, + "creator_name": "Alice", + "created_at": 1712000000 + } + ] + } + } + } + }, + "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/RuleIDRequest" + }, + "example": { + "id": 50001 + } + } + } + } + } + }, + "/monit/rule/audit/detail": { + "post": { + "operationId": "monit-rule-read-audit-detail", + "summary": "Get rule audit snapshot", + "description": "Return the audit record (including the `content` field, a JSON string of the rule snapshot at that point in time).", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |\n\n## Usage\n\n- Pass the audit record `id` (not the rule `id`) from `POST /monit/rule/audits`.\n- `content` is a JSON string — parse it to get the full rule snapshot.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-audit-detail", + "metadata": { + "sidebarTitle": "Get rule audit snapshot" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertRuleAudit" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 9001, + "account_id": 10023, + "alert_rule_id": 50001, + "action": "update", + "content": "{\"id\":50001,\"name\":\"CPU High\"}", + "creator_id": 80011, + "creator_name": "Alice", + "created_at": 1712000000 + } + } + } + } + }, + "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/RuleIDRequest" + }, + "example": { + "id": 9001 + } + } + } + } + } + }, + "/monit/rule/dstypes": { + "post": { + "operationId": "monit-rule-read-dstypes", + "summary": "List available datasource types", + "description": "Return the list of datasource types (`DSType` records) that the current account can use when authoring alert rules — combines global types and account-scoped types.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-dstypes", + "metadata": { + "sidebarTitle": "List available datasource types" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleDsTypesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 1, + "name": "Prometheus", + "ident": "prometheus", + "account_id": 0, + "weight": 100 + } + ] + } + } + } + }, + "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/RuleEmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/monit/rule/counter/total": { + "post": { + "operationId": "monit-rule-read-counter-total", + "summary": "Get rule counter time series", + "description": "Return the stored time series of the total rule count across the account — one sample per `clock` timestamp.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |\n\n## Usage\n\n- Each item is a historical snapshot: `num` is the total rule count at the given `clock` (Unix epoch seconds).", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-counter-total", + "metadata": { + "sidebarTitle": "Get rule counter time series" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCounterTotalResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 1, + "account_id": 10023, + "num": 50, + "clock": 1712000000 + } + ] + } + } + } + }, + "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/RuleEmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/monit/rule/counter/node": { + "post": { + "operationId": "monit-rule-read-counter-node", + "summary": "Get rule counts by folder node", + "description": "Return an object mapping top-level folder name to the total number of rules under that folder and all its descendants.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-counter-node", + "metadata": { + "sidebarTitle": "Get rule counts by folder node" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCounterNodeResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "Production": 10, + "Staging": 3 + } + } + } + } + }, + "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/RuleEmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/monit/rule/counter/channel": { + "post": { + "operationId": "monit-rule-read-counter-channel", + "summary": "Get rule counts by channel", + "description": "Return an object mapping channel name to the number of rules routing alerts to that channel. If a channel name cannot be resolved, the channel ID (as a string) is used as the key.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-counter-channel", + "metadata": { + "sidebarTitle": "Get rule counts by channel" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCounterChannelResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "Production": 8 + } + } + } + } + }, + "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/RuleEmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/monit/rule/counter/status": { + "post": { + "operationId": "monit-rule-read-counter-status", + "summary": "Get rule status counters for top-level folders", + "description": "Return trigger status summary for all top-level folder nodes — used for the overview dashboard.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-counter-status", + "metadata": { + "sidebarTitle": "Get rule status counters for top-level folders" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleStatusResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "folder_id": 100, + "folder_name": "Production", + "rule_total": 10, + "triggered_rule_count": 2 + } + ] + } + } + } + }, + "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/RuleEmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/monit/datasource/list": { + "post": { + "operationId": "monit-datasource-read-list", + "summary": "List datasources", + "description": "Return all data sources for the current account. Optionally filter by `type_ident`.", + "tags": [ + "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.", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-list", + "metadata": { + "sidebarTitle": "List datasources" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DataSourceListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 10, + "account_id": 10023, + "type_ident": "prometheus", + "name": "Prometheus Prod", + "enabled": true, + "note": "Production Prometheus", + "address": "http://prometheus.example.com:9090", + "edge_cluster_name": "default", + "updated_at": 1712000000 + } + ] + } + } + } + }, + "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/DataSourceListRequest" + }, + "example": { + "type": "prometheus" + } + } + } + } + } + }, + "/monit/datasource/info": { + "post": { + "operationId": "monit-datasource-read-info", + "summary": "Get datasource detail", + "description": "Retrieve full details of a single data source by its ID, including the `payload` configuration.", + "tags": [ + "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`) |", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-info", + "metadata": { + "sidebarTitle": "Get datasource detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DataSourceItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 10, + "account_id": 10023, + "type_ident": "prometheus", + "name": "Prometheus Prod", + "enabled": true, + "note": "Production Prometheus", + "address": "http://prometheus.example.com:9090", + "payload": { + "prometheus": { + "basic_auth_enabled": false, + "basic_auth_username": "", + "basic_auth_password": "", + "tls_skip_verify": false + } + }, + "edge_cluster_name": "default", + "updated_at": 1712000000 + } + } + } + } + }, + "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/IDRequest" + }, + "example": { + "id": 10 + } + } + } + } + } + }, + "/monit/datasource/create": { + "post": { + "operationId": "monit-datasource-write-create", + "summary": "Create datasource", + "description": "Create a new monitoring data source. The `payload` must include the type-specific configuration block.", + "tags": [ + "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`, `victorialogs`.\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. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-write-create", + "metadata": { + "sidebarTitle": "Create datasource" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DataSourceItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 10, + "type_ident": "prometheus", + "name": "Prometheus Prod", + "enabled": true, + "edge_cluster_name": "default", + "updated_at": 1712000000 + } + } + } + } + }, + "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/DataSourceUpsertRequest" + }, + "example": { + "type_ident": "prometheus", + "name": "Prometheus Prod", + "note": "Production Prometheus", + "address": "http://prometheus.example.com:9090", + "edge_cluster_name": "default", + "payload": { + "prometheus": { + "basic_auth_enabled": false + } + } + } + } + } + } + } + }, + "/monit/datasource/update": { + "post": { + "operationId": "monit-datasource-write-update", + "summary": "Update datasource", + "description": "Update an existing data source. Supply `id` plus the fields to change.", + "tags": [ + "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. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-write-update", + "metadata": { + "sidebarTitle": "Update datasource" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DataSourceItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 10, + "type_ident": "prometheus", + "name": "Prometheus Prod v2", + "enabled": true, + "edge_cluster_name": "default", + "updated_at": 1712100000 + } + } + } + } + }, + "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/DataSourceUpsertRequest" + }, + "example": { + "id": 10, + "type_ident": "prometheus", + "name": "Prometheus Prod v2", + "note": "Updated", + "address": "http://prometheus-v2.example.com:9090", + "edge_cluster_name": "default", + "payload": { + "prometheus": { + "basic_auth_enabled": false + } + } + } + } + } + } + } + }, + "/monit/datasource/delete": { + "post": { + "operationId": "monit-datasource-write-delete", + "summary": "Delete datasource", + "description": "Delete a data source by ID. Alert rules referencing this datasource must be updated or deleted first.", + "tags": [ + "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. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-write-delete", + "metadata": { + "sidebarTitle": "Delete datasource" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IDRequest" + }, + "example": { + "id": 10 + } + } + } + } + } + }, + "/monit/datasource/sls/projects": { + "post": { + "operationId": "monit-datasource-read-sls-projects", + "summary": "List SLS projects", + "description": "List Alibaba Cloud SLS (Simple Log Service) projects available in the specified SLS datasource.", + "tags": [ + "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- The datasource identified by `id` must be of type `sls`.\n- Use `query` to filter projects by name prefix. Use `offset` and `size` for pagination.", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-sls-projects", + "metadata": { + "sidebarTitle": "List SLS projects" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/SLSProjectsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + "project-a", + "project-b" + ] + } + } + } + }, + "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/SLSProjectsRequest" + }, + "example": { + "id": 10, + "query": "", + "offset": 0, + "size": 50 + } + } + } + } + } + }, + "/monit/datasource/sls/logstores": { + "post": { + "operationId": "monit-datasource-read-sls-logstores", + "summary": "List SLS logstores", + "description": "List logstores within an SLS project for the specified SLS datasource.", + "tags": [ + "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- The datasource identified by `id` must be of type `sls`.\n- Supply `project` to select the SLS project whose logstores to list.", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-sls-logstores", + "metadata": { + "sidebarTitle": "List SLS logstores" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/SLSLogstoresResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + "logstore-1", + "logstore-2" + ] + } + } + } + }, + "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/SLSLogstoresRequest" + }, + "example": { + "id": 10, + "project": "project-a", + "offset": 0, + "size": 50 + } + } + } + } + } + }, + "/monit/store/ruleset/list": { + "post": { + "operationId": "monit-store-ruleset-list", + "summary": "List rulesets", + "description": "Return all rulesets for a given datasource type that are accessible to the current user.", + "tags": [ + "Monitors/Rule sets" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Rule Repository Read** (`monit`) |\n\n## Usage\n\n- A ruleset is visible if its `open_flag` is `2` (public), if the current user is the creator (`open_flag=0`), or if it belongs to the same account (`open_flag=1`).\n- The list does not include the `payload` field. Call `/monit/store/ruleset/info` to get the full ruleset content.", + "href": "/en/api-reference/monitors/rule-sets/monit-store-ruleset-list", + "metadata": { + "sidebarTitle": "List rulesets" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StoreRulesetListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 1, + "type_ident": "prometheus", + "note": "CPU usage alerts", + "open_flag": 2, + "creator_account_id": 10023, + "creator_id": 80011, + "creator_name": "Alice", + "created_at": 1710000000, + "updated_at": 1712000000 + } + ] + } + } + } + }, + "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/StoreRulesetListRequest" + }, + "example": { + "type_ident": "prometheus" + } + } + } + } + } + }, + "/monit/store/ruleset/info": { + "post": { + "operationId": "monit-store-ruleset-info", + "summary": "Get ruleset detail", + "description": "Retrieve the full details of a ruleset including its `payload` (the alert rule definitions as a JSON string).", + "tags": [ + "Monitors/Rule sets" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Rule Repository Read** (`monit`) |", + "href": "/en/api-reference/monitors/rule-sets/monit-store-ruleset-info", + "metadata": { + "sidebarTitle": "Get ruleset detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StoreRulesetItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 1, + "type_ident": "prometheus", + "note": "CPU usage alerts", + "open_flag": 2, + "payload": "[{\"prom_ql\":\"...\"}]", + "creator_account_id": 10023, + "creator_id": 80011, + "creator_name": "Alice", + "created_at": 1710000000, + "updated_at": 1712000000 + } + } + } + } + }, + "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/IDRequest" + }, + "example": { + "id": 1 + } + } + } + } + } + }, + "/monit/store/ruleset/create": { + "post": { + "operationId": "monit-store-ruleset-create", + "summary": "Create ruleset", + "description": "Create a new ruleset in the rule repository.", + "tags": [ + "Monitors/Rule sets" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Rule Repository Manage** (`monit`) |\n\n## Usage\n\n- `open_flag`: `0` = private (creator only), `1` = account-shared, `2` = public.\n- `payload` is a required JSON string containing the alert rule definitions.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/rule-sets/monit-store-ruleset-create", + "metadata": { + "sidebarTitle": "Create ruleset" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StoreRulesetItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 1, + "type_ident": "prometheus", + "note": "CPU usage alerts", + "open_flag": 1, + "created_at": 1712000000, + "updated_at": 1712000000 + } + } + } + } + }, + "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/StoreRulesetUpsertRequest" + }, + "example": { + "type_ident": "prometheus", + "note": "CPU usage alerts", + "open_flag": 1, + "payload": "[{\"prom_ql\":\"rate(cpu_usage[5m]) > 0.8\"}]" + } + } + } + } + } + }, + "/monit/store/ruleset/update": { + "post": { + "operationId": "monit-store-ruleset-update", + "summary": "Update ruleset", + "description": "Update the note, sharing flag, and payload of an existing ruleset.", + "tags": [ + "Monitors/Rule sets" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Rule Repository Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/rule-sets/monit-store-ruleset-update", + "metadata": { + "sidebarTitle": "Update ruleset" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StoreRulesetItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 1, + "note": "Updated CPU alerts", + "open_flag": 2, + "updated_at": 1712100000 + } + } + } + } + }, + "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/StoreRulesetUpdateRequest" + }, + "example": { + "id": 1, + "note": "Updated CPU alerts", + "open_flag": 2, + "payload": "[{\"prom_ql\":\"rate(cpu_usage[5m]) > 0.9\"}]" + } + } + } + } + } + }, + "/monit/store/ruleset/delete": { + "post": { + "operationId": "monit-store-ruleset-delete", + "summary": "Delete ruleset", + "description": "Delete a ruleset from the rule repository by ID.", + "tags": [ + "Monitors/Rule sets" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Rule Repository Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/rule-sets/monit-store-ruleset-delete", + "metadata": { + "sidebarTitle": "Delete ruleset" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IDRequest" + }, + "example": { + "id": 1 + } + } + } + } + } + }, + "/rum/application/list": { + "post": { + "operationId": "rum-application-read-list", + "summary": "List applications", + "description": "Return a paginated list of RUM applications accessible to the current user.", + "tags": [ + "RUM/Applications" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Use `is_my_team` to filter applications belonging to the current user's teams.\n- Default page size is 20, maximum is 100.\n- `orderby` accepts `created_at` or `updated_at`.", + "href": "/en/api-reference/rum/applications/rum-application-read-list", + "metadata": { + "sidebarTitle": "List applications" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumApplicationListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "has_next_page": true, + "total": 7, + "items": [ + { + "account_id": 2451002751131, + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "application_name": "flashcat-rum", + "type": "browser", + "client_token": "a3cea433a8685a398cdfd68f54a45e06131", + "team_id": 2477033058131, + "is_private": true, + "no_ip": true, + "no_geo": false, + "alerting": { + "enabled": true, + "channel_ids": [ + 2490121812131 + ], + "integration_id": 4759595678131 + }, + "tracing": { + "enabled": false, + "open_type": "", + "endpoint": "" + }, + "status": "enabled", + "created_by": 4441703362131, + "updated_by": 3790925372131, + "created_at": 1746673831462, + "updated_at": 1773398630657 + }, + { + "account_id": 2451002751131, + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "type": "browser", + "client_token": "ce8d1be90fc6534f89ce36ebf526765e131", + "team_id": 2477033058131, + "is_private": false, + "no_ip": false, + "no_geo": false, + "alerting": { + "enabled": true, + "channel_ids": [ + 5962711836131, + 5967875767131 + ], + "integration_id": 4759595678131 + }, + "tracing": { + "enabled": true, + "open_type": "popup", + "endpoint": "https://www.tracing.com/${trace_id}" + }, + "status": "enabled", + "created_by": 2476444212131, + "updated_by": 3122470302131, + "created_at": 1742958482000, + "updated_at": 1772096392711 + } + ] + } + } + } + } + }, + "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/RumApplicationListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "query": "", + "is_my_team": false + } + } + } + } + } + }, + "/rum/application/info": { + "post": { + "operationId": "rum-application-read-info", + "summary": "Get application detail", + "description": "Retrieve full details of a single RUM application by `application_id`.", + "tags": [ + "RUM/Applications" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/rum/applications/rum-application-read-info", + "metadata": { + "sidebarTitle": "Get application detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumApplicationItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_id": 2451002751131, + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "application_name": "flashcat-rum", + "type": "browser", + "client_token": "a3cea433a8685a398cdfd68f54a45e06131", + "team_id": 2477033058131, + "is_private": true, + "no_ip": true, + "no_geo": false, + "alerting": { + "enabled": true, + "channel_ids": [ + 2490121812131 + ], + "integration_id": 4759595678131 + }, + "tracing": { + "enabled": false, + "open_type": "", + "endpoint": "" + }, + "status": "enabled", + "created_by": 4441703362131, + "updated_by": 3790925372131, + "created_at": 1746673831462, + "updated_at": 1773398630657 + } + } + } + } + }, + "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/RumApplicationIDRequest" + }, + "example": { + "application_id": "WoyQQ3BohkdtPivubEvE8o" + } + } + } + } + } + }, + "/rum/application/infos": { + "post": { + "operationId": "rum-application-read-infos", + "summary": "Batch get applications", + "description": "Retrieve details for multiple RUM applications by their IDs in one request.", + "tags": [ + "RUM/Applications" + ], + "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- Maximum 200 IDs per request.", + "href": "/en/api-reference/rum/applications/rum-application-read-infos", + "metadata": { + "sidebarTitle": "Batch get applications" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumApplicationInfosResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "type": "browser", + "client_token": "ce8d1be90fc6534f89ce36ebf526765e131", + "team_id": 2477033058131, + "is_private": false, + "no_ip": false, + "no_geo": false, + "alerting": { + "enabled": true, + "channel_ids": [ + 5962711836131, + 5967875767131 + ], + "integration_id": 4759595678131 + }, + "tracing": { + "enabled": true, + "open_type": "popup", + "endpoint": "https://www.tracing.com/${trace_id}" + }, + "status": "enabled", + "created_by": 2476444212131, + "updated_by": 3122470302131, + "created_at": 1742958482000, + "updated_at": 1772096392711 + }, + { + "account_id": 2451002751131, + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "application_name": "flashcat-rum", + "type": "browser", + "client_token": "a3cea433a8685a398cdfd68f54a45e06131", + "team_id": 2477033058131, + "is_private": true, + "no_ip": true, + "no_geo": false, + "alerting": { + "enabled": true, + "channel_ids": [ + 2490121812131 + ], + "integration_id": 4759595678131 + }, + "tracing": { + "enabled": false, + "open_type": "", + "endpoint": "" + }, + "status": "enabled", + "created_by": 4441703362131, + "updated_by": 3790925372131, + "created_at": 1746673831462, + "updated_at": 1773398630657 + } + ] + } + } + } + } + }, + "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/RumApplicationInfosRequest" + }, + "example": { + "application_ids": [ + "eWbr4xk3ZRnLabRa6unqwD", + "WoyQQ3BohkdtPivubEvE8o" + ] + } + } + } + } + } + }, + "/rum/application/create": { + "post": { + "operationId": "rum-application-write-create", + "summary": "Create application", + "description": "Create a new RUM application. Returns the generated `application_id` and `client_token`.", + "tags": [ + "RUM/Applications" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- `type` must be one of: `browser`, `ios`, `android`, `react-native`, `flutter`, `kotlin-multiplatform`, `roku`, `unity`.\n- `client_token` is auto-generated and used to initialize the RUM SDK.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/applications/rum-application-write-create", + "metadata": { + "sidebarTitle": "Create application" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumApplicationCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "application_id": "qLpu24Dz4CAzWsESPbJYWA", + "application_name": "My Web App", + "client_token": "e090078724855a4ca168c3884880dfbc131" + } + } + } + } + }, + "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/RumApplicationCreateRequest" + }, + "example": { + "application_name": "My Web App", + "type": "browser", + "team_id": 2477033058131, + "is_private": false + } + } + } + } + } + }, + "/rum/application/update": { + "post": { + "operationId": "rum-application-write-update", + "summary": "Update application", + "description": "Update an existing RUM application. All fields except `application_id` are optional — only provided fields are updated.", + "tags": [ + "RUM/Applications" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/applications/rum-application-write-update", + "metadata": { + "sidebarTitle": "Update application" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RumApplicationUpdateRequest" + }, + "example": { + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "application_name": "My Web App v2", + "alerting": { + "enabled": true, + "channel_ids": [ + 2490121812131 + ] + } + } + } + } + } + } + }, + "/rum/application/delete": { + "post": { + "operationId": "rum-application-write-delete", + "summary": "Delete application", + "description": "Delete a RUM application by `application_id`.", + "tags": [ + "RUM/Applications" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/applications/rum-application-write-delete", + "metadata": { + "sidebarTitle": "Delete application" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RumApplicationIDRequest" + }, + "example": { + "application_id": "qLpu24Dz4CAzWsESPbJYWA" + } + } + } + } + } + }, + "/rum/issue/list": { + "post": { + "operationId": "rum-issue-read-list", + "summary": "List issues", + "description": "Return a paginated list of RUM error tracking issues matching the given filters.", + "tags": [ + "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.", + "href": "/en/api-reference/rum/issues/rum-issue-read-list", + "metadata": { + "sidebarTitle": "List issues" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumIssueListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "team_id": 2477033058131, + "issue_id": "NHEacQHi2DhXqobr9qPQz9", + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "service": "fd-console", + "status": "for_review", + "error_count": 752, + "session_count": 381, + "is_crash": false, + "age": 5078684, + "resolved_at": 0, + "resolved_by": 0, + "created_at": 1770883154944, + "updated_at": 1775961914595, + "first_seen": { + "timestamp": 1770883154944, + "version": "1.0.0" + }, + "last_seen": { + "timestamp": 1775961839090, + "version": "1.0.0" + }, + "error": { + "message": "Script error.", + "type": "Error" + }, + "suspected_cause": { + "source": "auto", + "value": "code.exception", + "reason": "The error message 'Script error.' typically indicates an unhandled exception in JavaScript.", + "person_id": 0 + }, + "versions": [ + "1.0.0" + ], + "severity": "Info" + }, + { + "team_id": 2477033058131, + "issue_id": "H8kZSmxiE7EgdyD4fCyyNa", + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "service": "fd-console", + "status": "for_review", + "error_count": 3, + "session_count": 1, + "is_crash": false, + "age": 48, + "resolved_at": 0, + "resolved_by": 0, + "created_at": 1775189479566, + "updated_at": 1775191284163, + "first_seen": { + "timestamp": 1775189479566, + "version": "1.0.0" + }, + "last_seen": { + "timestamp": 1775189527762, + "version": "1.0.0" + }, + "error": { + "message": "API ERROR: We encountered an internal error | POST /api/access/logout", + "type": "Error" + }, + "suspected_cause": { + "source": "auto", + "value": "api.failed_request", + "reason": "The error indicates an internal server error during a POST request to /api/access/logout.", + "person_id": 0 + }, + "versions": [ + "1.0.0" + ], + "severity": "Info" + } + ], + "has_next_page": true, + "total": 111 + } + } + } + } + }, + "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/RumIssueListRequest" + }, + "example": { + "start_time": 1772611200000, + "end_time": 1775961914595, + "application_ids": [ + "eWbr4xk3ZRnLabRa6unqwD" + ], + "statuses": [ + "for_review" + ], + "p": 1, + "limit": 20, + "orderby": "updated_at" + } + } + } + } + } + }, + "/rum/issue/info": { + "post": { + "operationId": "rum-issue-read-info", + "summary": "Get issue detail", + "description": "Retrieve full details of a single issue by `issue_id`.", + "tags": [ + "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 |", + "href": "/en/api-reference/rum/issues/rum-issue-read-info", + "metadata": { + "sidebarTitle": "Get issue detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumIssueItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "team_id": 2477033058131, + "issue_id": "NHEacQHi2DhXqobr9qPQz9", + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "service": "fd-console", + "status": "for_review", + "error_count": 752, + "session_count": 381, + "is_crash": false, + "age": 5078684, + "resolved_at": 0, + "resolved_by": 0, + "created_at": 1770883154944, + "updated_at": 1775961914595, + "first_seen": { + "timestamp": 1770883154944, + "version": "1.0.0" + }, + "last_seen": { + "timestamp": 1775961839090, + "version": "1.0.0" + }, + "error": { + "message": "Script error.", + "type": "Error" + }, + "suspected_cause": { + "source": "auto", + "value": "code.exception", + "reason": "The error message 'Script error.' typically indicates an unhandled exception in JavaScript.", + "person_id": 0 + }, + "versions": [ + "1.0.0" + ], + "severity": "Info" + } + } + } + } + }, + "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/RumIssueIDRequest" + }, + "example": { + "issue_id": "NHEacQHi2DhXqobr9qPQz9" + } + } + } + } + } + }, + "/rum/issue/update": { + "post": { + "operationId": "rum-issue-write-update", + "summary": "Update issue", + "description": "Update the status or suspected cause of an issue.", + "tags": [ + "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- `status` valid values: `for_review`, `reviewed`, `ignored`, `resolved`.\n- `suspected_cause` valid values: `api.failed_request`, `network.error`, `code.exception`, `code.invalid_object_access`, `code.invalid_argument`, `unknown`.\n- Setting `status` to `resolved` also stamps `resolved_at` and `resolved_by` on the issue; moving a resolved issue back to another status clears them.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/issues/rum-issue-write-update", + "metadata": { + "sidebarTitle": "Update issue" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RumIssueUpdateRequest" + }, + "example": { + "issue_id": "NHEacQHi2DhXqobr9qPQz9", + "status": "resolved" + } + } + } + } + } + }, + "/sourcemap/list": { + "post": { + "operationId": "sourcemap-read-list", + "summary": "List sourcemaps", + "description": "Return a paginated list of uploaded sourcemap files filtered by platform type, service, and version.", + "tags": [ + "RUM/Sourcemaps" + ], + "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 required — both use Unix epoch **milliseconds**. Maximum window is 365 days.\n- The `type` field selects the platform: `browser` (JavaScript), `android`, or `ios`. Defaults to `browser` when omitted.\n- Default page size is 20; maximum is 100. Default sort is `created_at` descending.\n- For Android, `build_id` matches the Gradle plugin build identifier. For iOS, `uuid` matches the dSYM bundle UUID.", + "href": "/en/api-reference/rum/sourcemaps/sourcemap-read-list", + "metadata": { + "sidebarTitle": "List sourcemaps" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/SourcemapListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 3, + "items": [ + { + "key": "browser/my-web-app/1.0.0/main.js.map", + "type": "browser", + "service": "my-web-app", + "version": "1.0.0", + "size": 204800, + "git_repository_url": "https://github.com/example/my-web-app", + "git_commit_sha": "abc1234def5678", + "created_at": 1712700000, + "updated_at": 1712700000, + "metadata": {} + } + ] + } + } + } + } + }, + "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/SourcemapListRequest" + }, + "example": { + "start_time": 1712000000000, + "end_time": 1712700000000, + "type": "browser", + "services": [ + "my-web-app" + ], + "p": 1, + "limit": 20 + } + } + } + } + } + }, + "/member/info": { + "post": { + "operationId": "memberInfo", + "summary": "Get current member info", + "description": "Return the current session member's full profile.", + "tags": [ + "Platform/Members" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/members/member-info", + "metadata": { + "sidebarTitle": "Get current member info" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberInfoResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_avatar": "", + "account_email": "alice@example.com", + "account_id": 2451002751131, + "account_locale": "en-US", + "account_name": "Acme Corp", + "account_role_ids": [ + 6 + ], + "account_time_zone": "Asia/Shanghai", + "avatar": "/image/avatar1.png", + "country_code": "CN", + "created_at": 1701399971, + "domain": "acme", + "email": "alice@example.com", + "email_verified": true, + "is_external": false, + "locale": "zh-CN", + "member_id": 2476444212131, + "member_name": "Alice", + "phone": "+86185****0300", + "phone_verified": true, + "time_zone": "Asia/Shanghai" + } + } + } + } + }, + "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/MemberInfoRequest" + }, + "example": {} + } + } + } + } + }, + "/member/list": { + "post": { + "operationId": "memberList", + "summary": "List members", + "description": "Return a paginated list of organization members.", + "tags": [ + "Platform/Members" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/members/member-list", + "metadata": { + "sidebarTitle": "List members" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "p": 1, + "limit": 5, + "total": 148, + "items": [ + { + "account_id": 2451002751131, + "member_id": 5068740052131, + "member_name": "Bob", + "country_code": "", + "phone": "+86151****6519", + "email": "bob@example.com", + "phone_verified": true, + "email_verified": true, + "avatar": "", + "status": "enabled", + "account_role_ids": [ + 2, + 6 + ], + "created_at": 1752030749, + "updated_at": 1775962064, + "ref_id": "", + "is_external": false + }, + { + "account_id": 2451002751131, + "member_id": 2476444212131, + "member_name": "Alice", + "country_code": "CN", + "phone": "+86185****0300", + "email": "alice@example.com", + "phone_verified": true, + "email_verified": true, + "avatar": "/image/avatar1.png", + "status": "enabled", + "account_role_ids": [ + 6 + ], + "created_at": 1701399971, + "updated_at": 1775809507, + "ref_id": "", + "is_external": false + } + ] + } + } + } + } + }, + "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/MemberListRequest" + }, + "example": { + "p": 1, + "limit": 5 + } + } + } + } + } + }, + "/member/delete": { + "post": { + "operationId": "memberDelete", + "summary": "Delete member", + "description": "Remove a member from the organization by ID, email, phone, or name.", + "tags": [ + "Platform/Members" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/members/member-delete", + "metadata": { + "sidebarTitle": "Delete member" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberDeleteRequest" + }, + "example": { + "member_id": 5068740052131 + } + } + } + } + } + }, + "/member/invite": { + "post": { + "operationId": "memberInvite", + "summary": "Invite members", + "description": "Batch invite new members to the organization by email or phone.", + "tags": [ + "Platform/Members" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/members/member-invite", + "metadata": { + "sidebarTitle": "Invite members" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberInviteResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "member_id": 5068740052131, + "member_name": "Charlie" + } + ] + } + } + } + } + }, + "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/MemberInviteRequest" + }, + "example": { + "members": [ + { + "member_name": "Charlie", + "email": "charlie@example.com", + "locale": "en-US", + "time_zone": "Asia/Shanghai", + "role_ids": [ + 6 + ] + } + ] + } + } + } + } + } + }, + "/member/role/grant": { + "post": { + "operationId": "memberGrantRole", + "summary": "Grant role to member", + "description": "Add a role assignment to a member.", + "tags": [ + "Platform/Members" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/members/member-grant-role", + "metadata": { + "sidebarTitle": "Grant role to member" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberRoleGrantRequest" + }, + "example": { + "member_id": 5068740052131, + "role_ids": [ + 6 + ] + } + } + } + } + } + }, + "/member/role/revoke": { + "post": { + "operationId": "memberRevokeRole", + "summary": "Revoke role from member", + "description": "Remove a role assignment from a member.", + "tags": [ + "Platform/Members" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/members/member-revoke-role", + "metadata": { + "sidebarTitle": "Revoke role from member" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberRoleRevokeRequest" + }, + "example": { + "member_id": 5068740052131, + "role_ids": [ + 6 + ] + } + } + } + } + } + }, + "/member/role/update": { + "post": { + "operationId": "memberUpdateRole", + "summary": "Update member roles", + "description": "Replace all role assignments for a member at once.", + "tags": [ + "Platform/Members" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/members/member-update-role", + "metadata": { + "sidebarTitle": "Update member roles" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberRoleUpdateRequest" + }, + "example": { + "member_id": 5068740052131, + "role_ids": [ + 2, + 6 + ] + } + } + } + } + } + }, + "/member/info/reset": { + "post": { + "operationId": "memberResetInfo", + "summary": "Reset member info", + "description": "Batch-update multiple profile fields of the current member.", + "tags": [ + "Platform/Members" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/members/member-reset-info", + "metadata": { + "sidebarTitle": "Reset member info" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberResetInfoRequest" + }, + "example": { + "member_id": 2476444212131, + "member_name": "Alice", + "locale": "zh-CN", + "time_zone": "Asia/Shanghai" + } + } + } + } + } + }, + "/person/infos": { + "post": { + "operationId": "personInfos", + "summary": "Batch get persons", + "description": "Return profile information for a batch of person IDs (members or accounts).", + "tags": [ + "Platform/Members" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/members/person-infos", + "metadata": { + "sidebarTitle": "Batch get persons" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PersonInfosResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "person_id": 2476444212131, + "person_name": "Alice", + "avatar": "/image/avatar1.png", + "locale": "zh-CN", + "time_zone": "Asia/Shanghai", + "email": "alice@example.com", + "phone_verified": false, + "email_verified": true, + "as": "member", + "status": "enabled" + }, + { + "account_id": 2451002751131, + "person_id": 3790925372131, + "person_name": "Bob", + "email": "bob@example.com", + "phone_verified": false, + "email_verified": true, + "as": "member", + "status": "enabled" + } + ] + } + } + } + } + }, + "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/PersonInfosRequest" + }, + "example": { + "person_ids": [ + 2476444212131, + 3790925372131 + ] + } + } + } + } + } + }, + "/team/info": { + "post": { + "operationId": "team-read-info", + "summary": "Get team detail", + "description": "Return a single team by ID, name, or external reference ID.", + "tags": [ + "Platform/Teams" + ], + "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- At least one of `team_id`, `team_name`, or `ref_id` must be provided.", + "href": "/en/api-reference/platform/teams/team-read-info", + "metadata": { + "sidebarTitle": "Get team detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TeamItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_id": 10023, + "team_id": 1001, + "team_name": "Backend SRE", + "description": "Backend reliability engineering team", + "status": "enabled", + "updated_by_name": "alice", + "updated_by": 80011, + "creator_id": 80011, + "creator_name": "alice", + "created_at": 1710000000, + "updated_at": 1712000000, + "person_ids": [ + 80011, + 80012 + ], + "ref_id": "" + } + } + } + } + }, + "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/TeamInfoRequest" + }, + "example": { + "team_id": 1001 + } + } + } + } + } + }, + "/team/infos": { + "post": { + "operationId": "team-read-infos", + "summary": "Batch get teams", + "description": "Return basic info for multiple teams by their IDs in a single request.", + "tags": [ + "Platform/Teams" + ], + "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- Up to 100 team IDs per request.", + "href": "/en/api-reference/platform/teams/team-read-infos", + "metadata": { + "sidebarTitle": "Batch get teams" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TeamInfosResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "team_id": 1001, + "team_name": "Backend SRE", + "person_ids": [ + 80011, + 80012 + ] + }, + { + "team_id": 1002, + "team_name": "Frontend", + "person_ids": [ + 80013 + ] + } + ] + } + } + } + } + }, + "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/TeamInfosRequest" + }, + "example": { + "team_ids": [ + 1001, + 1002 + ] + } + } + } + } + } + }, + "/team/list": { + "post": { + "operationId": "team-read-list", + "summary": "List teams", + "description": "Return a paginated list of teams in the current account.", + "tags": [ + "Platform/Teams" + ], + "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- Filter by `person_id` to return teams that a specific person belongs to.\n- Defaults: p=1, limit=20.", + "href": "/en/api-reference/platform/teams/team-read-list", + "metadata": { + "sidebarTitle": "List teams" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TeamListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "p": 1, + "limit": 20, + "total": 5, + "items": [ + { + "account_id": 10023, + "team_id": 1001, + "team_name": "Backend SRE", + "status": "enabled", + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1712000000, + "person_ids": [ + 80011 + ], + "description": "", + "updated_by_name": "", + "updated_by": 0, + "creator_name": "alice", + "ref_id": "" + } + ] + } + } + } + } + }, + "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/TeamListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "orderby": "created_at", + "asc": false + } + } + } + } + } + }, + "/team/upsert": { + "post": { + "operationId": "team-write-upsert", + "summary": "Create or update a team", + "description": "Create a new team or update an existing one. Pass `team_id` to update.", + "tags": [ + "Platform/Teams" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Teams Manage** (`organization`) |\n\n## Usage\n\n- Omit `team_id` (or set to 0) to create a new team; pass an existing ID to update.\n- `team_name` must be 1–39 characters and unique within the account.\n- Pass `person_ids` to set team membership; this replaces the entire member list.\n- Pass `emails` or `phones` to invite members who don't yet have accounts.\n- `ref_id` is an external identifier for integration with third-party HR systems.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/teams/team-write-upsert", + "metadata": { + "sidebarTitle": "Create or update a team" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TeamUpsertResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "team_id": 1001, + "team_name": "Backend SRE" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamUpsertRequest" + }, + "example": { + "team_name": "Backend SRE", + "description": "Backend reliability engineering team", + "person_ids": [ + 80011, + 80012 + ] + } + } + } + } + } + }, + "/team/delete": { + "post": { + "operationId": "team-write-delete", + "summary": "Delete a team", + "description": "Permanently delete a team by ID, name, or external reference ID.", + "tags": [ + "Platform/Teams" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Teams Manage** (`organization`) |\n\n## Usage\n\n- At least one of `team_id`, `team_name`, or `ref_id` must be provided.\n- Fails with `400 ReferenceExist` if the team is still referenced by schedules, escalation rules, or other resources.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/teams/team-write-delete", + "metadata": { + "sidebarTitle": "Delete a team" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamDeleteRequest" + }, + "example": { + "team_id": 1001 + } + } + } + } + } + }, + "/role/info": { + "post": { + "operationId": "role-read-info", + "summary": "Get role detail", + "description": "Return the detail of a single role by its ID.", + "tags": [ + "Platform/Roles & permissions" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/roles-permissions/role-read-info", + "metadata": { + "sidebarTitle": "Get role detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RoleItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "role_id": 2, + "role_name": "Account Admin", + "description": "Account admin with all permissions.", + "status": "enabled", + "permission_ids": [ + 101, + 102, + 201 + ], + "editable": false, + "created_at": 1700000000, + "updated_at": 1700000000 + } + } + } + } + }, + "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/RoleInfoRequest" + }, + "example": { + "role_id": 2 + } + } + } + } + } + }, + "/role/list": { + "post": { + "operationId": "role-read-list", + "summary": "List roles", + "description": "Return all custom and built-in roles for the current account.", + "tags": [ + "Platform/Roles & permissions" + ], + "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- Built-in roles (`editable: false`) cannot be modified or deleted.", + "href": "/en/api-reference/platform/roles-permissions/role-read-list", + "metadata": { + "sidebarTitle": "List roles" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RoleListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 3, + "items": [ + { + "role_id": 2, + "role_name": "Account Admin", + "description": "", + "status": "enabled", + "permission_ids": [], + "editable": false, + "created_at": 1700000000, + "updated_at": 1700000000 + } + ] + } + } + } + } + }, + "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/RoleListRequest" + }, + "example": { + "orderby": "created_at", + "asc": false + } + } + } + } + } + }, + "/role/upsert": { + "post": { + "operationId": "role-write-upsert", + "summary": "Create or update a role", + "description": "Create a new custom role or update an existing one. Pass `role_id` to update.", + "tags": [ + "Platform/Roles & permissions" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Omit `role_id` (or set to 0) to create; pass an existing ID to update.\n- `role_name` must be 1–39 characters and unique within the account.\n- `permission_ids` sets the full permission set for the role, replacing any previous assignment.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/roles-permissions/role-write-upsert", + "metadata": { + "sidebarTitle": "Create or update a role" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RoleUpsertResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "role_id": 150, + "role_name": "On-call Manager" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleUpsertRequest" + }, + "example": { + "role_name": "On-call Manager", + "description": "Manage on-call rotations and incidents.", + "permission_ids": [ + 501, + 502 + ] + } + } + } + } + } + }, + "/role/enable": { + "post": { + "operationId": "role-write-enable", + "summary": "Enable a role", + "description": "Re-enable a previously disabled custom role.", + "tags": [ + "Platform/Roles & permissions" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Only custom roles can be enabled/disabled. Built-in roles always remain enabled.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/roles-permissions/role-write-enable", + "metadata": { + "sidebarTitle": "Enable a role" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleIDRequest" + }, + "example": { + "role_id": 150 + } + } + } + } + } + }, + "/role/disable": { + "post": { + "operationId": "role-write-disable", + "summary": "Disable a role", + "description": "Disable a custom role to prevent it from granting permissions.", + "tags": [ + "Platform/Roles & permissions" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Members who held this role lose its permissions immediately.\n- Only custom roles can be disabled.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/roles-permissions/role-write-disable", + "metadata": { + "sidebarTitle": "Disable a role" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleIDRequest" + }, + "example": { + "role_id": 150 + } + } + } + } + } + }, + "/role/delete": { + "post": { + "operationId": "role-write-delete", + "summary": "Delete a role", + "description": "Permanently delete a custom role and revoke it from all members.", + "tags": [ + "Platform/Roles & permissions" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Built-in roles cannot be deleted.\n- All members who held this role lose its permissions immediately.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/roles-permissions/role-write-delete", + "metadata": { + "sidebarTitle": "Delete a role" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleIDRequest" + }, + "example": { + "role_id": 150 + } + } + } + } + } + }, + "/role/permission/list": { + "post": { + "operationId": "role-read-list-permission", + "summary": "List permissions", + "description": "Return all available permissions, optionally filtered to those granted to specific roles.", + "tags": [ + "Platform/Roles & permissions" + ], + "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- Pass `role_ids` to filter permissions to those granted to those roles.\n- Pass `with_all: true` to include all permissions regardless of role filter, with `is_granted` set to indicate which are granted to the specified roles.", + "href": "/en/api-reference/platform/roles-permissions/role-read-list-permission", + "metadata": { + "sidebarTitle": "List permissions" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RolePermissionListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "id": 501, + "permission_name": "Templates Read", + "permission_type": "read", + "description": "View notification templates", + "class": "On-call", + "scope": "on-call", + "status": "enabled", + "is_granted": true + } + ] + } + } + } + } + }, + "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/RolePermissionListRequest" + }, + "example": { + "role_ids": [ + 150 + ], + "with_all": true + } + } + } + } + } + }, + "/role/permission/factor/list": { + "post": { + "operationId": "role-read-list-permission-factor", + "summary": "List permission factors", + "description": "Return all permission factors (API, button, menu, URL, visit) optionally filtered by type.", + "tags": [ + "Platform/Roles & permissions" + ], + "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- Permission factors are the fine-grained controls that make up each permission.\n- `factor_types` accepts: `api`, `button`, `visit`, `menu`, `url`.", + "href": "/en/api-reference/platform/roles-permissions/role-read-list-permission-factor", + "metadata": { + "sidebarTitle": "List permission factors" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PermissionFactorListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "factor_name": "template:read:info", + "factor_type": "api" + } + ] + } + } + } + }, + "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/PermissionFactorListRequest" + }, + "example": { + "factor_types": [ + "api" + ] + } + } + } + } + } + }, + "/role/member/grant": { + "post": { + "operationId": "role-write-grant-role", + "summary": "Grant role to members", + "description": "Assign a role to one or more members, giving them its permissions.", + "tags": [ + "Platform/Roles & permissions" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Up to 100 member IDs per request.\n- Members who already have the role are silently skipped.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/roles-permissions/role-write-grant-role", + "metadata": { + "sidebarTitle": "Grant role to members" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleGrantRequest" + }, + "example": { + "member_ids": [ + 80011, + 80012 + ], + "role_id": 150 + } + } + } + } + } + }, + "/role/member/revoke": { + "post": { + "operationId": "role-write-revoke-role", + "summary": "Revoke role from members", + "description": "Remove a role from one or more members, revoking the permissions it granted.", + "tags": [ + "Platform/Roles & permissions" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Members who don't have the role are silently skipped.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/roles-permissions/role-write-revoke-role", + "metadata": { + "sidebarTitle": "Revoke role from members" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleGrantRequest" + }, + "example": { + "member_ids": [ + 80011 + ], + "role_id": 150 + } + } + } + } + } + }, + "/audit/search": { + "post": { + "operationId": "audit-read-search", + "summary": "Search audit logs", + "description": "Return a cursor-paginated list of audit log entries within a time range.", + "tags": [ + "Platform/Audit logs" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Audit Read** (`organization`) |\n\n## Usage\n\n- Time range is required. Maximum span is 90 days. Both `start_time` and `end_time` are Unix epoch **seconds**.\n- Use `search_after_ctx` from the previous response to fetch the next page. The token is opaque — do not construct it manually.\n- The retention window depends on the account's license. Queries beyond the retention boundary silently return an empty result rather than an error.\n- Default page size is 20 rows; maximum is 99.", + "href": "/en/api-reference/platform/audit-logs/audit-read-search", + "metadata": { + "sidebarTitle": "Search audit logs" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AuditSearchResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 2, + "search_after_ctx": "", + "docs": [ + { + "created_at": 1712700123456, + "account_id": 10023, + "member_id": 80011, + "member_name": "Alice", + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "ip": "203.0.113.42", + "operation": "template:write:create", + "operation_name": "创建模板", + "body": "{\"template_name\":\"Prod default\"}", + "params": [], + "is_dangerous": false, + "is_write": true + } + ] + } + } + } + } + }, + "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/AuditSearchRequest" + }, + "example": { + "start_time": 1712620800, + "end_time": 1712707200, + "limit": 20, + "operations": [ + "template:write:create", + "template:write:delete" + ] + } + } + } + } + } + }, + "/audit/operation/list": { + "post": { + "operationId": "audit-read-operation-list", + "summary": "List auditable operation types", + "description": "Return all operation names that are recorded in the audit log, for use as `operations` filter values.", + "tags": [ + "Platform/Audit logs" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Audit Read** (`organization`) |\n\n## Usage\n\n- Use the `name` values from this response as `operations` filter values in `POST /audit/search`.\n- `name_cn` is the human-readable Chinese label shown in the console; `name` is the stable wire value to filter on.", + "href": "/en/api-reference/platform/audit-logs/audit-read-operation-list", + "metadata": { + "sidebarTitle": "List auditable operation types" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AuditOperationListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "name": "template:write:create", + "name_cn": "创建模板" + }, + { + "name": "template:write:delete", + "name_cn": "删除模板" + }, + { + "name": "incident:write:acknowledge", + "name_cn": "认领故障" + } + ] + } + } + } + } + }, + "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/AuditOperationListRequest" + }, + "example": {} + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "AppKeyAuth": { + "type": "apiKey", + "in": "query", + "name": "app_key", + "description": "App key issued from the Flashduty console under Account → APP Keys. Required on every public API call. Keep it secret — it grants the same access as the owning account." + } + }, + "responses": { + "BadRequest": { + "description": "Invalid request — usually a missing or malformed parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "missingParameter": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "InvalidParameter", + "message": "The specified parameter is not valid." + } + } + } + } + } + } + }, + "Unauthorized": { + "description": "Missing or invalid app_key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "missingAppKey": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "Unauthorized", + "message": "You are unauthorized." + } + } + } + } + } + } + }, + "Forbidden": { + "description": "The app_key is valid but lacks permission for this operation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "noEditPermission": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "AccessDenied", + "message": "Access Denied." + } + } + } + } + } + } + }, + "NotFound": { + "description": "The referenced resource does not exist or has been deleted. Note: Flashduty historically returns HTTP 400 with code `ResourceNotFound` for missing domain entities; a true 404 is reserved for unknown routes.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "resourceMissing": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "ResourceNotFound", + "message": "The resource you request is not found" + } + } + } + } + } + } + }, + "TooManyRequests": { + "description": "Rate limit hit. Either the global API limit, a per-account limit, or a per-integration limit.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "rateLimited": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "RequestTooFrequently", + "message": "Request too frequently." + } + } + } + } + } + } + }, + "ServerError": { + "description": "Unexpected server-side error. Include the request_id when reporting.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "internal": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "InternalError", + "message": "We encountered an internal error, and it has been reported. Please try again later." + } + } + } + } + } + } + } + }, + "schemas": { + "ErrorCode": { + "type": "string", + "description": "Flashduty error code enum. Every failed API response sets `error.code` to one of these stable wire strings. HTTP status is informational — the authoritative signal is the enum value.\n\n| Code | HTTP | Meaning |\n|---|---|---|\n| `OK` | 200 | Reserved — not returned on real errors. |\n| `InvalidParameter` | 400 | A required parameter is missing or failed validation. |\n| `BadRequest` | 400 | Generic 400 used when no more specific code fits. |\n| `InvalidContentType` | 400 | The `Content-Type` header is not `application/json`. |\n| `ResourceNotFound` | 400 | The referenced resource does not exist. Note: returned as HTTP 400, not 404 (historical choice). |\n| `NoLicense` | 400 | The feature is license-gated and no active license was found. |\n| `ReferenceExist` | 400 | Deletion blocked — other entities still reference this resource. |\n| `Unauthorized` | 401 | `app_key` is missing, invalid, or expired. |\n| `BalanceNotEnough` | 402 | Billing-gated operation with insufficient account balance. |\n| `AccessDenied` | 403 | Authenticated but lacking the permission required for this operation. |\n| `RouteNotFound` | 404 | The request URL path is not a known route. |\n| `MethodNotAllowed` | 405 | The HTTP method is not allowed on this otherwise-known path. |\n| `UndonedOrderExist` | 409 | An outstanding billing order blocks this new one. Wait and retry. |\n| `RequestLocked` | 423 | Operation temporarily locked due to repeated failures. |\n| `EntityTooLarge` | 413 | Request body exceeds the configured max size. |\n| `RequestTooFrequently` | 429 | Rate limit hit — API-global, per-account, or per-integration. |\n| `RequestVerifyRequired` | 428 | Second-factor verification required but not supplied. |\n| `DangerousOperation` | 428 | High-risk operation requires MFA verification. |\n| `InternalError` | 500 | Unhandled server-side error. Include `request_id` in the bug report. |\n| `ServiceUnavailable` | 503 | A backend dependency is unavailable. Try again later. |", + "enum": [ + "OK", + "InvalidParameter", + "BadRequest", + "InvalidContentType", + "ResourceNotFound", + "NoLicense", + "ReferenceExist", + "Unauthorized", + "BalanceNotEnough", + "AccessDenied", + "RouteNotFound", + "MethodNotAllowed", + "UndonedOrderExist", + "RequestLocked", + "EntityTooLarge", + "RequestTooFrequently", + "RequestVerifyRequired", + "DangerousOperation", + "InternalError", + "ServiceUnavailable" + ], + "x-enumDescriptions": { + "OK": "Reserved — not returned on real errors.", + "InvalidParameter": "A required parameter is missing or failed validation.", + "BadRequest": "Generic 400 used when no more specific code fits.", + "InvalidContentType": "The `Content-Type` header is not `application/json`.", + "ResourceNotFound": "The referenced resource does not exist. Note: returned as HTTP 400, not 404 (historical choice).", + "NoLicense": "The feature is license-gated and no active license was found.", + "ReferenceExist": "Deletion blocked — other entities still reference this resource.", + "Unauthorized": "`app_key` is missing, invalid, or expired.", + "BalanceNotEnough": "Billing-gated operation with insufficient account balance.", + "AccessDenied": "Authenticated but lacking the permission required for this operation.", + "RouteNotFound": "The request URL path is not a known route.", + "MethodNotAllowed": "The HTTP method is not allowed on this otherwise-known path.", + "UndonedOrderExist": "An outstanding billing order blocks this new one. Wait and retry.", + "RequestLocked": "Operation temporarily locked due to repeated failures.", + "EntityTooLarge": "Request body exceeds the configured max size.", + "RequestTooFrequently": "Rate limit hit — API-global, per-account, or per-integration.", + "RequestVerifyRequired": "Second-factor verification required but not supplied.", + "DangerousOperation": "High-risk operation requires MFA verification.", + "InternalError": "Unhandled server-side error. Include `request_id` in the bug report.", + "ServiceUnavailable": "A backend dependency is unavailable. Try again later." + }, + "example": "InvalidParameter" + }, + "DutyError": { + "type": "object", + "description": "Error payload inside the response envelope. Present only on non-2xx responses.", + "properties": { + "code": { + "$ref": "#/components/schemas/ErrorCode" + }, + "message": { + "type": "string", + "description": "Human-readable error message, localized by the caller's Accept-Language. May contain field names, IDs, or other context from the failing request.", + "example": "The specified parameter template_id is not valid." + } + }, + "required": [ + "code", + "message" + ] + }, + "SuccessEnvelope": { + "type": "object", + "description": "Success response envelope. On every 2xx response, `request_id` identifies the call (also mirrored in the `Flashcat-Request-Id` header) and `data` holds the endpoint-specific payload. Failure responses use a different shape — see `ErrorResponse`.", + "properties": { + "request_id": { + "type": "string", + "description": "Unique ID for this request. Mirrored in the Flashcat-Request-Id response header. Include it when reporting issues.", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "data": { + "description": "Endpoint-specific payload. See each operation's 200 response schema." + } + }, + "required": [ + "request_id", + "data" + ] + }, + "ErrorResponse": { + "type": "object", + "description": "Response envelope for errors. `error` is required; `data` is absent.", + "properties": { + "request_id": { + "type": "string", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "error": { + "$ref": "#/components/schemas/DutyError" + } + }, + "required": [ + "request_id", + "error" + ] + }, + "EmptyObject": { + "type": "object", + "description": "An empty object. Returned as the `data` payload by operations whose success signal is simply the absence of an error.", + "additionalProperties": false + }, + "EmptyResponse": { + "type": "object", + "description": "Empty response body. The server returns `data: null` on success.", + "properties": {} + }, + "EmptyRequest": { + "type": "object", + "description": "No parameters required.", + "additionalProperties": false + }, + "CreateIncidentRequest": { + "type": "object", + "description": "Parameters for manually creating an incident.", + "required": [ + "incident_severity" + ], + "properties": { + "incident_severity": { + "type": "string", + "enum": [ + "Info", + "Warning", + "Critical" + ], + "description": "Incident severity." + }, + "title": { + "type": "string", + "maxLength": 512, + "description": "Incident title, up to 512 characters." + }, + "description": { + "type": "string", + "maxLength": 1024, + "description": "Incident description, up to 1024 characters." + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel to file the incident into. Optional; leave unset for a standalone incident." + }, + "assigned_to": { + "type": "object", + "description": "Incident assignment target. Either `person_ids` or `escalate_rule_id` must be provided.", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "minItems": 1, + "maxItems": 100, + "description": "Member IDs to assign directly." + }, + "escalate_rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Escalation rule ID (MongoDB ObjectID) to drive assignment." + }, + "layer_idx": { + "type": "integer", + "description": "Starting layer index when using an escalation rule." + }, + "type": { + "type": "string", + "description": "Assignment type." + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "minItems": 1, + "maxItems": 100, + "description": "Email recipients, used for ServiceNow-style integrations." + }, + "notify": { + "type": "object", + "description": "Override the notification channels used for this assignment.", + "properties": { + "follow_preference": { + "type": "boolean", + "description": "When true, fall back to each responder's personal preference." + }, + "personal_channels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels to use (e.g. `voice`, `sms`, `email`)." + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Notification template ID (MongoDB ObjectID)." + } + } + } + } + } + } + }, + "CreateWarRoomRequest": { + "type": "object", + "description": "Parameters for opening an incident war room in an IM integration.", + "required": [ + "incident_id", + "integration_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "IM integration ID. Must have war room enabled; Feishu, DingTalk, WeCom (self-built), Slack and Teams are supported." + }, + "member_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Additional member IDs to add to the war room." + }, + "add_observers": { + "type": "boolean", + "description": "When true, also add historical responders of the incident as observers." + } + } + }, + "AssignedTo": { + "type": "object", + "description": "Incident assignment target. Either `person_ids` or `escalate_rule_id` must be provided.", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "minItems": 1, + "maxItems": 100, + "description": "Member IDs to assign directly." + }, + "escalate_rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Escalation rule ID (MongoDB ObjectID) to drive assignment." + }, + "layer_idx": { + "type": "integer", + "description": "Current level index within the escalation rule." + }, + "type": { + "type": "string", + "description": "Assignment type: `assign` direct assignment, `reassign` reassignment, `escalate` escalation-rule driven, `reopen` automatic reassignment on reopen.", + "enum": [ + "assign", + "reassign", + "escalate", + "reopen" + ] + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "minItems": 1, + "maxItems": 100, + "description": "Email recipients, used by integrations such as ServiceNow." + }, + "escalate_rule_name": { + "type": "string", + "description": "Escalation rule display name, filled by the server." + }, + "assigned_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) when the assignment was made." + }, + "id": { + "type": "string", + "description": "Opaque assignment ID generated by the server." + } + } + }, + "PersonShort": { + "type": "object", + "description": "A Flashduty member reference.", + "properties": { + "person_id": { + "type": "integer", + "format": "int64", + "description": "Member ID." + }, + "person_name": { + "type": "string", + "description": "Member display name." + }, + "email": { + "type": "string", + "format": "email", + "description": "Member email address." + }, + "as": { + "type": "string", + "description": "Role label for this member in the context of the current object." + } + } + }, + "Responder": { + "type": "object", + "description": "Incident responder with assignment/acknowledgement timestamps.", + "required": [ + "person_id", + "assigned_at", + "acknowledged_at" + ], + "properties": { + "person_id": { + "type": "integer", + "format": "int64", + "description": "Responder member ID." + }, + "assigned_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) when the member was assigned." + }, + "acknowledged_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) when the member acknowledged. 0 if not yet acknowledged." + }, + "person_name": { + "type": "string", + "description": "Member display name, filled by the server." + }, + "email": { + "type": "string", + "format": "email", + "description": "Member email, filled by the server." + }, + "as": { + "type": "string", + "description": "Role label of this responder." + } + } + }, + "LinkItem": { + "type": "object", + "description": "Channel-level link integration reference rendered from a template.", + "required": [ + "name", + "endpoint", + "open_type" + ], + "properties": { + "name": { + "type": "string", + "description": "Display name of the link." + }, + "endpoint": { + "type": "string", + "description": "Rendered URL for the link." + }, + "open_type": { + "type": "string", + "enum": [ + "popup", + "tab" + ], + "description": "How the link should be opened." + } + } + }, + "Image": { + "type": "object", + "description": "Image or attachment reference.", + "required": [ + "src" + ], + "properties": { + "src": { + "type": "string", + "description": "Image source. Either an `img_` upload token or an `http(s)` URL." + }, + "href": { + "type": "string", + "description": "Optional link the image points to." + }, + "alt": { + "type": "string", + "description": "Alt text." + } + } + }, + "IncidentShort": { + "type": "object", + "description": "Brief incident reference embedded in an alert.", + "properties": { + "incident_id": { + "type": "string", + "description": "Incident ID (ObjectID hex string)." + }, + "title": { + "type": "string", + "description": "Incident title." + }, + "progress": { + "type": "string", + "description": "Incident progress (e.g. `Processing`, `Resolved`)." + } + } + }, + "AlertEventItem": { + "type": "object", + "description": "A raw alert event.", + "properties": { + "event_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Event ID (MongoDB ObjectID)." + }, + "alert_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Parent alert ID (MongoDB ObjectID)." + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel ID the event is routed to." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration that produced this event." + }, + "integration_type": { + "type": "string", + "description": "Type/plugin key of the integration that produced this event." + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "Deprecated. Use `integration_id` instead." + }, + "title": { + "type": "string", + "description": "Event title." + }, + "title_rule": { + "type": "string", + "description": "Title template used to derive `title` from labels." + }, + "description": { + "type": "string", + "description": "Event description." + }, + "alert_key": { + "type": "string", + "description": "Deduplication key used to merge events into an alert." + }, + "event_severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "Severity of this event." + }, + "event_status": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "Status of this event." + }, + "event_time": { + "type": "integer", + "format": "int64", + "description": "Event timestamp, Unix epoch seconds." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Label key-value pairs." + }, + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertImage" + }, + "description": "Images attached to the event." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Record creation time, Unix epoch seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Record update time, Unix epoch seconds." + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "Soft-delete timestamp (seconds). Zero if not deleted." + } + } + }, + "AlertInfo": { + "type": "object", + "description": "Detailed alert item.", + "required": [ + "alert_id", + "integration_id", + "data_source_id", + "channel_id", + "account_id", + "description", + "title", + "title_rule", + "alert_key", + "alert_severity", + "alert_status", + "start_time", + "last_time", + "end_time", + "labels", + "ever_muted", + "created_at", + "updated_at", + "integration_name", + "integration_type", + "integration_ref_id", + "channel_name", + "channel_status", + "responder_name", + "responder_email", + "event_cnt", + "images", + "data_source_name", + "data_source_ref_id" + ], + "properties": { + "alert_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Alert ID (MongoDB ObjectID)." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID that produced the alert." + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "Deprecated. Use `integration_id` instead." + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel ID." + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." + }, + "description": { + "type": "string", + "description": "Alert description." + }, + "title": { + "type": "string", + "description": "Alert title." + }, + "title_rule": { + "type": "string", + "description": "Title rendering rule." + }, + "alert_key": { + "type": "string", + "description": "Deduplication key used to merge events into the alert." + }, + "alert_severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "Current severity." + }, + "alert_status": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "Current status." + }, + "start_time": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) when the alert first fired." + }, + "last_time": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) of the most recent event." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) when the alert recovered. 0 if still active." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Alert labels." + }, + "ever_muted": { + "type": "boolean", + "description": "Whether this alert has ever been silenced." + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "Soft-delete timestamp (seconds). Zero if not deleted." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (seconds)." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp (seconds)." + }, + "integration_name": { + "type": "string", + "description": "Integration display name." + }, + "integration_type": { + "type": "string", + "description": "Integration type string." + }, + "integration_ref_id": { + "type": "string", + "description": "Integration reference ID." + }, + "channel_name": { + "type": "string", + "description": "Channel display name." + }, + "channel_status": { + "type": "string", + "description": "Channel status." + }, + "responder_name": { + "type": "string", + "description": "Primary responder name, if any." + }, + "responder_email": { + "type": "string", + "description": "Primary responder email, if any." + }, + "incident": { + "$ref": "#/components/schemas/IncidentShort", + "description": "Parent incident reference, if the alert has been merged into one." + }, + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertEventItem" + }, + "description": "Raw alert events, populated when the caller opts in." + }, + "event_cnt": { + "type": "integer", + "format": "int64", + "description": "Total number of raw events merged into this alert." + }, + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Image" + }, + "description": "Attached images." + }, + "data_source_name": { + "type": "string", + "description": "Deprecated. Use `integration_name`." + }, + "data_source_type": { + "type": "string", + "description": "Deprecated. Use `integration_type`." + }, + "data_source_ref_id": { + "type": "string", + "description": "Deprecated. Use `integration_ref_id`." + } + } + }, + "IncidentInfo": { + "type": "object", + "description": "Detailed incident record.", + "required": [ + "incident_id", + "account_id", + "channel_id", + "integration_id", + "integration_ids", + "integration_types", + "dedup_key", + "equals_md5", + "start_time", + "end_time", + "last_time", + "ack_time", + "close_time", + "creator_id", + "closer_id", + "owner_id", + "incident_status", + "incident_severity", + "progress", + "title", + "description", + "ai_summary", + "impact", + "root_cause", + "resolution", + "num", + "created_at", + "updated_at", + "snoozed_before", + "group_method", + "ever_muted", + "labels", + "fields", + "assigned_to", + "alert_cnt", + "active_alert_cnt", + "alert_event_cnt", + "responders", + "account_name", + "account_locale", + "account_time_zone", + "channel_name", + "channel_status", + "detail_url", + "silence_url", + "post_mortem_id", + "images", + "manual_overrides" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID that owns the incident." + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel ID. 0 for standalone incidents." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "First integration associated with the incident." + }, + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "All integration IDs contributing alerts to this incident." + }, + "integration_types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Integration type strings for all contributing integrations." + }, + "dedup_key": { + "type": "string", + "description": "Deduplication key used to coalesce alerts." + }, + "equals_md5": { + "type": "string", + "description": "MD5 hash used for content-equality checks." + }, + "start_time": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) when the incident started." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) when the incident ended. 0 if still active." + }, + "last_time": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) of the most recent update." + }, + "ack_time": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) when the incident was first acknowledged. 0 if unacknowledged." + }, + "close_time": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) when the incident was closed. 0 if still open." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "Member ID that created the incident. 0 if auto-created by the system." + }, + "closer_id": { + "type": "integer", + "format": "int64", + "description": "Member ID that closed the incident. 0 if auto-closed." + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "Primary owner member ID. 0 if none." + }, + "incident_status": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "Current incident status, derived from alert statuses." + }, + "incident_severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "Configured incident severity." + }, + "progress": { + "type": "string", + "enum": [ + "Triggered", + "Processing", + "Closed" + ], + "description": "Incident progress state." + }, + "title": { + "type": "string", + "description": "Incident title." + }, + "description": { + "type": "string", + "description": "Incident description." + }, + "ai_summary": { + "type": "string", + "description": "AI-generated summary of the incident." + }, + "impact": { + "type": "string", + "description": "Impact description." + }, + "root_cause": { + "type": "string", + "description": "Root cause analysis." + }, + "resolution": { + "type": "string", + "description": "Resolution notes." + }, + "num": { + "type": "string", + "description": "Short display identifier; not guaranteed unique." + }, + "frequency": { + "type": "string", + "description": "Frequency bucket for recurrence analysis: `frequent` or `rare`.", + "enum": [ + "frequent", + "rare" + ] + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "Soft-delete timestamp (seconds). Zero if not deleted." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (seconds)." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp (seconds)." + }, + "snoozed_before": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) until which notifications are snoozed. 0 if not snoozed." + }, + "group_method": { + "type": "string", + "description": "Alert grouping method: `i` intelligent, `p` pattern, `n` none.", + "enum": [ + "i", + "p", + "n" + ] + }, + "ever_muted": { + "type": "boolean", + "description": "Whether the incident has ever been silenced." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Labels propagated from alerts." + }, + "fields": { + "type": "object", + "additionalProperties": true, + "description": "Custom field values keyed by field name." + }, + "assigned_to": { + "$ref": "#/components/schemas/AssignedTo", + "description": "Current assignment target for the incident." + }, + "reporter_email": { + "type": "string", + "description": "Reporter email for manually created incidents." + }, + "alert_cnt": { + "type": "integer", + "format": "int64", + "description": "Total count of alerts merged into this incident." + }, + "active_alert_cnt": { + "type": "integer", + "format": "int64", + "description": "Count of alerts currently in Critical/Warning/Info state." + }, + "alert_event_cnt": { + "type": "integer", + "format": "int64", + "description": "Total raw alert event count across all merged alerts." + }, + "alerts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertInfo" + }, + "description": "Embedded alerts, only populated for notification templates and custom actions." + }, + "closer": { + "$ref": "#/components/schemas/PersonShort", + "description": "Closer member info." + }, + "creator": { + "$ref": "#/components/schemas/PersonShort", + "description": "Creator member info." + }, + "owner": { + "$ref": "#/components/schemas/PersonShort", + "description": "Owner member info. May be deprecated.", + "deprecated": true + }, + "responders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Responder" + }, + "description": "Current responders with assignment/acknowledgement state." + }, + "account_name": { + "type": "string", + "description": "Account name." + }, + "account_locale": { + "type": "string", + "description": "Account locale." + }, + "account_time_zone": { + "type": "string", + "description": "Account time zone." + }, + "channel_name": { + "type": "string", + "description": "Channel display name." + }, + "channel_status": { + "type": "string", + "description": "Channel status." + }, + "detail_url": { + "type": "string", + "description": "Web console URL for the incident." + }, + "silence_url": { + "type": "string", + "description": "Quick-silence URL for this incident." + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LinkItem" + }, + "description": "Channel-level link integrations rendered for this incident." + }, + "integration_type": { + "type": "string", + "description": "First alert's integration type string, used by the detail page for label mappings." + }, + "post_mortem_id": { + "type": "string", + "description": "Associated post-mortem ID, if any. One incident can only link to a single post-mortem." + }, + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Image" + }, + "description": "Attached images." + }, + "manual_overrides": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Fields that were manually overridden after auto-population." + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "Deprecated. Use `integration_id` instead.", + "deprecated": true + }, + "data_source_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Deprecated. Use `integration_ids` instead.", + "deprecated": true + }, + "data_source_type": { + "type": "string", + "description": "Deprecated. Use `integration_type` instead.", + "deprecated": true + }, + "data_source_types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Deprecated. Use `integration_types` instead.", + "deprecated": true + } + } + }, + "IncidentListResponse": { + "type": "object", + "description": "Paginated list of incidents.", + "required": [ + "items", + "total", + "has_next_page" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentInfo" + }, + "description": "Incident list for the current page." + }, + "total": { + "type": "integer", + "format": "int64", + "description": "Total number of matching incidents." + }, + "has_next_page": { + "type": "boolean", + "description": "True when more results are available beyond this page." + }, + "search_after_ctx": { + "type": "string", + "description": "Opaque cursor to pass as `search_after_ctx` on the next request." + } + } + }, + "ListIncidentsRequest": { + "type": "object", + "description": "Filters for the incident list query. `start_time` and `end_time` are required; the window must not exceed 31 days.", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "Window start, Unix seconds." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "Window end, Unix seconds. Must be greater than `start_time` and within 31 days." + }, + "asc": { + "type": "boolean", + "description": "Ascending order when true." + }, + "is_snoozed": { + "type": "boolean", + "description": "When true, include only snoozed incidents." + }, + "is_my_team": { + "type": "boolean", + "description": "When true, restrict to incidents in channels owned by the user's teams." + }, + "is_my_channel": { + "type": "boolean", + "description": "When true, restrict to incidents in channels the user personally owns." + }, + "ever_muted": { + "type": "boolean", + "description": "When true, include only incidents that were ever silenced." + }, + "is_rare": { + "type": "boolean", + "description": "When true, include only outlier (rare) incidents." + }, + "progress": { + "type": "string", + "description": "Comma-separated list of progress states to match (e.g. `Triggered,Processing`)." + }, + "query": { + "type": "string", + "description": "Full-text search query." + }, + "incident_severity": { + "type": "string", + "description": "Comma-separated list of severities (`Critical,Warning,Info`)." + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Channel IDs to filter by. Use 0 for standalone (global) incidents." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Team IDs; resolved to channels via channel ownership." + }, + "responder_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Responder member IDs." + }, + "acker_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Acknowledger member IDs." + }, + "creator_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Creator member IDs. Use 0 for automatically created incidents." + }, + "closer_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Closer member IDs. Use 0 for automatically closed incidents." + }, + "incident_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Restrict to the given incident IDs." + }, + "nums": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Restrict to the given short display identifiers." + }, + "p": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "Page number starting at 1." + }, + "limit": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 100, + "default": 20, + "description": "Page size, at most 100." + }, + "search_after_ctx": { + "type": "string", + "description": "Cursor from a previous response for forward pagination." + } + } + }, + "IncidentInfoRequest": { + "type": "object", + "description": "Lookup parameters for a single incident.", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + } + } + }, + "ListIncidentsByIdsRequest": { + "type": "object", + "description": "Batch lookup parameters for incidents.", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "description": "Incident IDs to fetch." + } + } + }, + "ListIncidentAlertsRequest": { + "type": "object", + "description": "Filters for alerts belonging to an incident.", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + }, + "include_events": { + "type": "boolean", + "description": "When true, include raw alert events in each alert item." + }, + "is_active": { + "type": "boolean", + "description": "When true return only active alerts (Critical/Warning/Info); when false return only recovered alerts (Ok). Omit to include all." + }, + "limit": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 1000, + "default": 1000, + "description": "Page size, at most 1000." + }, + "p": { + "type": "integer", + "format": "int64", + "minimum": 0, + "default": 1, + "description": "Page number starting at 1." + } + } + }, + "ListIncidentAlertsResponse": { + "type": "object", + "description": "Paginated list of alerts merged into an incident.", + "required": [ + "items", + "total" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertInfo" + }, + "description": "Alert list." + }, + "total": { + "type": "integer", + "format": "int64", + "description": "Total matching alerts." + } + } + }, + "IncidentFeedType": { + "type": "string", + "description": "Incident timeline entry type. Each value identifies one lifecycle event; the matching `detail` payload shape is determined by this field. Incident types are prefixed with `i_`.\n\n| Type | Meaning |\n|---|---|\n| `i_new` | Incident Created: A new incident was created automatically or manually. |\n| `i_assign` | Assigned: Incident was assigned to responders. |\n| `i_a_rspd` | Responder Added: Additional responders joined the incident. |\n| `i_notify` | Notification dispatched through a channel at a specific escalation level. |\n| `i_storm` | Alert storm threshold reached on the incident. |\n| `i_snooze` | Notifications snoozed for a given duration. |\n| `i_wake` | Snooze cancelled and notifications resumed. |\n| `i_ack` | Acknowledged: Responder confirmed they are working on the incident. |\n| `i_unack` | Acknowledgement removed. |\n| `i_comm` | Comment: Responder logged progress or key information. |\n| `i_rslv` | Resolved: Incident was marked as resolved. |\n| `i_reopen` | Reopened: Resolved incident was reopened, possibly due to recurrence. |\n| `i_merge` | Merged: Multiple related incidents were merged into one. |\n| `i_r_title` | Title updated. |\n| `i_r_desc` | Description updated. |\n| `i_r_impact` | Impact updated. |\n| `i_r_rc` | Root cause updated. |\n| `i_r_rsltn` | Resolution updated. |\n| `i_r_severity` | Severity Changed: Incident severity level was adjusted. |\n| `i_r_field` | Custom field value updated. |\n| `i_m_flapping` | Incident muted by flapping detection. |\n| `i_m_reply` | Mute reply marker on a comment. |\n| `i_custom` | Action: Automated action or script was triggered. |\n| `i_wr_create` | War Room Created: Chat group was created for collaborative response. |\n| `i_wr_delete` | War room chat group deleted. |\n| `i_auto_refresh` | Card auto-refresh event posted back to the timeline. |\n| `a_merge` | Alert Merged: An alert was merged into an existing incident. |", + "enum": [ + "i_new", + "i_assign", + "i_a_rspd", + "i_notify", + "i_storm", + "i_snooze", + "i_wake", + "i_ack", + "i_unack", + "i_comm", + "i_rslv", + "i_reopen", + "i_merge", + "i_r_title", + "i_r_desc", + "i_r_impact", + "i_r_rc", + "i_r_rsltn", + "i_r_severity", + "i_r_field", + "i_m_flapping", + "i_m_reply", + "i_custom", + "i_wr_create", + "i_wr_delete", + "i_auto_refresh", + "a_merge" + ] + }, + "FeedSeverity": { + "type": "string", + "enum": [ + "Ok", + "Critical", + "Warning", + "Info" + ], + "description": "Severity level." + }, + "NotifyPerson": { + "type": "object", + "description": "Notification delivery record for a single person recipient.", + "properties": { + "person_id": { + "type": "integer", + "format": "int64", + "description": "Recipient member ID." + }, + "failed_reason": { + "type": "string", + "description": "Failure reason if delivery did not succeed." + } + } + }, + "NotifyChat": { + "type": "object", + "description": "Notification delivery record for a chat group recipient.", + "properties": { + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "Integration data source ID used to send the notification." + }, + "chat_id": { + "type": "string", + "description": "Chat group identifier." + }, + "chat_name": { + "type": "string", + "description": "Chat group display name." + }, + "failed_reason": { + "type": "string", + "description": "Failure reason if delivery did not succeed." + } + } + }, + "NotifyRobot": { + "type": "object", + "description": "Notification delivery record for a robot webhook recipient.", + "properties": { + "token": { + "type": "string", + "description": "Robot token or identifier." + }, + "alias": { + "type": "string", + "description": "Robot alias." + }, + "failed_reason": { + "type": "string", + "description": "Failure reason if delivery did not succeed." + } + } + }, + "FeedDetailIncidentNew": { + "type": "object", + "description": "Detail payload for `i_new`.", + "properties": { + "severity": { + "$ref": "#/components/schemas/FeedSeverity" + }, + "title": { + "type": "string", + "description": "Initial incident title." + }, + "reporter_email": { + "type": "string", + "description": "Email of the reporter when the incident was created externally." + } + }, + "title": "i_new" + }, + "FeedDetailIncidentComment": { + "type": "object", + "description": "Detail payload for `i_comm`.", + "properties": { + "comment": { + "type": "string", + "description": "Comment body." + }, + "mute_reply": { + "type": "boolean", + "description": "Whether replies to this comment are muted." + } + }, + "title": "i_comm" + }, + "FeedDetailIncidentAck": { + "type": "object", + "description": "Detail payload for `i_ack`.", + "properties": { + "progress": { + "type": "string", + "description": "Progress note entered at acknowledgement." + } + }, + "title": "i_ack" + }, + "FeedDetailIncidentUnack": { + "type": "object", + "description": "Detail payload for `i_unack`.", + "properties": { + "progress": { + "type": "string", + "description": "Progress note entered when acknowledgement was removed." + } + }, + "title": "i_unack" + }, + "FeedDetailIncidentSnooze": { + "type": "object", + "description": "Detail payload for `i_snooze`.", + "properties": { + "minutes": { + "type": "integer", + "format": "int64", + "description": "Snooze duration in minutes." + } + }, + "title": "i_snooze" + }, + "FeedDetailIncidentWake": { + "type": "object", + "description": "Detail payload for `i_wake`.", + "properties": { + "snoozedBefore": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp at which the prior snooze was scheduled to end." + } + }, + "title": "i_wake" + }, + "FeedDetailIncidentResolve": { + "type": "object", + "description": "Detail payload for `i_rslv`.", + "required": [ + "from" + ], + "properties": { + "from": { + "type": "string", + "enum": [ + "voice", + "console", + "card", + "wcard", + "event", + "autorslv", + "autorefresh", + "escalation" + ], + "description": "Source that triggered the resolve action." + } + }, + "title": "i_rslv" + }, + "FeedDetailIncidentReopen": { + "type": "object", + "description": "Detail payload for `i_reopen`.", + "properties": { + "reason": { + "type": "string", + "description": "Reason why the incident was reopened." + } + }, + "title": "i_reopen" + }, + "FeedDetailIncidentMerge": { + "type": "object", + "description": "Detail payload for `i_merge`.", + "properties": { + "comment": { + "type": "string", + "description": "Merge comment." + }, + "source_incidents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentShort" + }, + "description": "Source incidents that were merged." + }, + "target_incident": { + "$ref": "#/components/schemas/IncidentShort" + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "Member ID that performed the merge." + }, + "title": { + "type": "string", + "description": "Resulting incident title." + }, + "remove_source_incidents": { + "type": "boolean", + "description": "True if the source incidents were removed after merging." + }, + "source_responders": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Responder member IDs carried over from the source incidents." + } + }, + "title": "i_merge" + }, + "FeedDetailIncidentAssign": { + "type": "object", + "description": "Detail payload for `i_assign`. Extends `AssignedTo` with the set of target member IDs.", + "allOf": [ + { + "$ref": "#/components/schemas/AssignedTo" + }, + { + "type": "object", + "properties": { + "to": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs that received the assignment." + } + } + } + ], + "title": "i_assign" + }, + "FeedDetailIncidentAddRspd": { + "type": "object", + "description": "Detail payload for `i_a_rspd`.", + "properties": { + "to": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs added as responders." + } + }, + "title": "i_a_rspd" + }, + "FeedDetailIncidentResetTitle": { + "type": "object", + "description": "Detail payload for `i_r_title`.", + "properties": { + "from": { + "type": "string", + "description": "Previous title." + }, + "to": { + "type": "string", + "description": "New title." + } + }, + "title": "i_r_title" + }, + "FeedDetailIncidentResetDescription": { + "type": "object", + "description": "Detail payload for `i_r_desc`. No fields.", + "properties": {}, + "additionalProperties": false, + "title": "i_r_desc" + }, + "FeedDetailIncidentResetImpact": { + "type": "object", + "description": "Detail payload for `i_r_impact`. No fields.", + "properties": {}, + "additionalProperties": false, + "title": "i_r_impact" + }, + "FeedDetailIncidentResetRootCause": { + "type": "object", + "description": "Detail payload for `i_r_rc`. No fields.", + "properties": {}, + "additionalProperties": false, + "title": "i_r_rc" + }, + "FeedDetailIncidentResetResolution": { + "type": "object", + "description": "Detail payload for `i_r_rsltn`. No fields.", + "properties": {}, + "additionalProperties": false, + "title": "i_r_rsltn" + }, + "FeedDetailIncidentResetSeverity": { + "type": "object", + "description": "Detail payload for `i_r_severity`.", + "properties": { + "from": { + "$ref": "#/components/schemas/FeedSeverity" + }, + "to": { + "$ref": "#/components/schemas/FeedSeverity" + } + }, + "title": "i_r_severity" + }, + "FeedDetailIncidentResetField": { + "type": "object", + "description": "Detail payload for `i_r_field`.", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string", + "description": "Name of the custom field that was updated." + }, + "to": { + "description": "New value of the custom field. Type depends on the field definition." + } + }, + "title": "i_r_field" + }, + "FeedDetailIncidentNotify": { + "type": "object", + "description": "Detail payload for `i_notify`.", + "required": [ + "layer_idx" + ], + "properties": { + "rid": { + "type": "string", + "description": "Notification record ID." + }, + "msg_id": { + "type": "string", + "description": "Upstream message ID returned by the delivery channel." + }, + "fire_type": { + "type": "string", + "enum": [ + "fire", + "refire" + ], + "description": "Whether this is the first fire or a refire." + }, + "escalate_rule_name": { + "type": "string", + "description": "Escalation rule display name." + }, + "escalate_rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Escalation rule ID (MongoDB ObjectID)." + }, + "layer_idx": { + "type": "integer", + "description": "Escalation level index used for this notification." + }, + "by": { + "type": "string", + "description": "Delivery channel or method label." + }, + "persons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotifyPerson" + }, + "description": "Per-person delivery records." + }, + "chats": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotifyChat" + }, + "description": "Per-chat delivery records." + }, + "robots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotifyRobot" + }, + "description": "Per-robot delivery records." + } + }, + "title": "i_notify" + }, + "FeedDetailIncidentStorm": { + "type": "object", + "description": "Detail payload for `i_storm`.", + "properties": { + "threshold": { + "type": "integer", + "description": "Storm threshold that was reached." + } + }, + "title": "i_storm" + }, + "FeedDetailIncidentMuteByFlapping": { + "type": "object", + "description": "Detail payload for `i_m_flapping`.", + "properties": { + "max_changes": { + "type": "integer", + "description": "Maximum state changes allowed within the window." + }, + "in_mins": { + "type": "integer", + "description": "Window length in minutes." + }, + "mute_mins": { + "type": "integer", + "description": "Mute duration in minutes once flapping is detected." + } + }, + "title": "i_m_flapping" + }, + "FeedDetailIncidentMuteReply": { + "type": "object", + "description": "Detail payload for `i_m_reply`. No fields.", + "properties": {}, + "additionalProperties": false, + "title": "i_m_reply" + }, + "FeedDetailIncidentCustomAction": { + "type": "object", + "description": "Detail payload for `i_custom`.", + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID that executed the action." + }, + "integration_name": { + "type": "string", + "description": "Integration display name." + } + }, + "title": "i_custom" + }, + "FeedDetailIncidentWarRoomCreate": { + "type": "object", + "description": "Detail payload for `i_wr_create`.", + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID that hosts the war room chat group." + }, + "chat_id": { + "type": "string", + "description": "Chat group identifier." + }, + "chat_name": { + "type": "string", + "description": "Chat group display name." + }, + "plugin_type": { + "type": "string", + "description": "Chat integration plugin type." + }, + "integration_name": { + "type": "string", + "description": "Integration display name." + }, + "share_link": { + "type": "string", + "description": "Shareable join link for the war room." + } + }, + "title": "i_wr_create" + }, + "FeedDetailIncidentWarRoomDelete": { + "type": "object", + "description": "Detail payload for `i_wr_delete`.", + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID that hosted the war room chat group." + }, + "chat_id": { + "type": "string", + "description": "Chat group identifier." + }, + "chat_name": { + "type": "string", + "description": "Chat group display name." + }, + "plugin_type": { + "type": "string", + "description": "Chat integration plugin type." + }, + "integration_name": { + "type": "string", + "description": "Integration display name." + } + }, + "title": "i_wr_delete" + }, + "FeedDetailIncidentAutoRefreshCard": { + "type": "object", + "description": "Detail payload for `i_auto_refresh`. No fields.", + "properties": {}, + "additionalProperties": false, + "title": "i_auto_refresh" + }, + "IncidentFeedItem": { + "type": "object", + "description": "Single incident timeline entry. The `detail` field is discriminated by `type`; see the per-type `FeedDetail*` schemas.", + "required": [ + "ref_id", + "type", + "detail", + "account_id", + "creator_id", + "created_at", + "updated_at" + ], + "properties": { + "ref_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "ObjectID of the source alert or incident this entry references." + }, + "type": { + "$ref": "#/components/schemas/IncidentFeedType" + }, + "detail": { + "description": "Type-specific payload. The concrete shape is determined by `type`.", + "oneOf": [ + { + "$ref": "#/components/schemas/FeedDetailIncidentNew" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentAssign" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentAddRspd" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentNotify" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentStorm" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentSnooze" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentWake" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentAck" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentUnack" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentComment" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResolve" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentReopen" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentMerge" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetTitle" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetDescription" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetImpact" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetRootCause" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetResolution" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetSeverity" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetField" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentMuteByFlapping" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentMuteReply" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentCustomAction" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentWarRoomCreate" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentWarRoomDelete" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentAutoRefreshCard" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "i_new": "#/components/schemas/FeedDetailIncidentNew", + "i_assign": "#/components/schemas/FeedDetailIncidentAssign", + "i_a_rspd": "#/components/schemas/FeedDetailIncidentAddRspd", + "i_notify": "#/components/schemas/FeedDetailIncidentNotify", + "i_storm": "#/components/schemas/FeedDetailIncidentStorm", + "i_snooze": "#/components/schemas/FeedDetailIncidentSnooze", + "i_wake": "#/components/schemas/FeedDetailIncidentWake", + "i_ack": "#/components/schemas/FeedDetailIncidentAck", + "i_unack": "#/components/schemas/FeedDetailIncidentUnack", + "i_comm": "#/components/schemas/FeedDetailIncidentComment", + "i_rslv": "#/components/schemas/FeedDetailIncidentResolve", + "i_reopen": "#/components/schemas/FeedDetailIncidentReopen", + "i_merge": "#/components/schemas/FeedDetailIncidentMerge", + "i_r_title": "#/components/schemas/FeedDetailIncidentResetTitle", + "i_r_desc": "#/components/schemas/FeedDetailIncidentResetDescription", + "i_r_impact": "#/components/schemas/FeedDetailIncidentResetImpact", + "i_r_rc": "#/components/schemas/FeedDetailIncidentResetRootCause", + "i_r_rsltn": "#/components/schemas/FeedDetailIncidentResetResolution", + "i_r_severity": "#/components/schemas/FeedDetailIncidentResetSeverity", + "i_r_field": "#/components/schemas/FeedDetailIncidentResetField", + "i_m_flapping": "#/components/schemas/FeedDetailIncidentMuteByFlapping", + "i_m_reply": "#/components/schemas/FeedDetailIncidentMuteReply", + "i_custom": "#/components/schemas/FeedDetailIncidentCustomAction", + "i_wr_create": "#/components/schemas/FeedDetailIncidentWarRoomCreate", + "i_wr_delete": "#/components/schemas/FeedDetailIncidentWarRoomDelete", + "i_auto_refresh": "#/components/schemas/FeedDetailIncidentAutoRefreshCard" + } + } + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "User ID of the actor. `0` means system-generated." + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "Soft-delete timestamp (ms). Zero if not deleted." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp in milliseconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp in milliseconds." + } + } + }, + "ListIncidentFeedRequest": { + "type": "object", + "description": "Filters for the incident timeline query.", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + }, + "p": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "Page number starting at 1." + }, + "limit": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 100, + "default": 20, + "description": "Page size, at most 100." + }, + "asc": { + "type": "boolean", + "description": "Ascending chronological order when true." + }, + "types": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentFeedType" + }, + "description": "Optional filter restricting the returned entries to specific types." + } + } + }, + "ListIncidentFeedResponse": { + "type": "object", + "description": "Page of incident timeline entries.", + "required": [ + "has_next_page", + "items" + ], + "properties": { + "has_next_page": { + "type": "boolean", + "description": "True when more entries are available." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentFeedItem" + }, + "description": "Timeline entries for the current page." + } + } + }, + "ListPastIncidentsRequest": { + "type": "object", + "description": "Parameters for the similar-past-incidents query.", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Reference incident ID (MongoDB ObjectID)." + }, + "limit": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 100, + "default": 5, + "description": "Maximum number of similar incidents to return." + } + } + }, + "PastIncidentItem": { + "allOf": [ + { + "$ref": "#/components/schemas/IncidentInfo" + }, + { + "type": "object", + "required": [ + "score" + ], + "properties": { + "score": { + "type": "number", + "format": "float", + "description": "Similarity score from the vector search." + } + } + } + ] + }, + "ListPastIncidentsResponse": { + "type": "object", + "description": "List of similar historical incidents, ranked by relevance.", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PastIncidentItem" + }, + "description": "Similar past incidents with similarity scores." + } + } + }, + "AckIncidentRequest": { + "type": "object", + "description": "Parameters for acknowledging one or more incidents.", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "Incident IDs to acknowledge. At most 100 per call.", + "minItems": 1 + } + } + }, + "UnackIncidentRequest": { + "type": "object", + "description": "Parameters for removing acknowledgement from one or more incidents.", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "Incident IDs to unacknowledge. At most 100 per call.", + "minItems": 1 + } + } + }, + "ResolveIncidentRequest": { + "type": "object", + "description": "Parameters for resolving one or more incidents.", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "Incident IDs to resolve. At most 100 per call.", + "minItems": 1 + }, + "root_cause": { + "type": "string", + "maxLength": 1024, + "description": "Optional root cause note applied to every resolved incident." + }, + "resolution": { + "type": "string", + "maxLength": 1024, + "description": "Optional resolution note applied to every resolved incident." + } + } + }, + "ReopenIncidentRequest": { + "type": "object", + "description": "Parameters for reopening one or more closed incidents.", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "Incident IDs to reopen. At most 100 per call.", + "minItems": 1 + }, + "reason": { + "type": "string", + "maxLength": 1024, + "description": "Optional reason recorded on the timeline." + } + } + }, + "SnoozeIncidentRequest": { + "type": "object", + "description": "Parameters for snoozing notifications on one or more incidents.", + "required": [ + "incident_ids", + "minutes" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "Incident IDs to snooze. At most 100 per call." + }, + "minutes": { + "type": "integer", + "format": "int64", + "exclusiveMinimum": 0, + "maximum": 1440, + "description": "Duration in minutes. Must be greater than 0 and at most 1440 (24h)." + } + } + }, + "WakeIncidentRequest": { + "type": "object", + "description": "Parameters for waking snoozed incidents.", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "Incident IDs to wake. At most 100 per call.", + "minItems": 1 + } + } + }, + "MergeIncidentsRequest": { + "type": "object", + "description": "Parameters for merging source incidents into a target.", + "required": [ + "source_incident_ids", + "target_incident_id" + ], + "properties": { + "source_incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "minItems": 1, + "maxItems": 100, + "description": "Source incident IDs. The target incident is removed from this set automatically." + }, + "target_incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Target incident ID that source incidents will be merged into." + }, + "title": { + "type": "string", + "maxLength": 512, + "description": "Optional new title for the target incident." + }, + "comment": { + "type": "string", + "maxLength": 1024, + "description": "Optional comment recorded on the merge timeline entry." + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "Optional new owner member ID for the target incident." + }, + "remove_source_incidents": { + "type": "boolean", + "description": "When true, soft-delete the source incidents after merging instead of closing them." + } + } + }, + "DisableIncidentMergeRequest": { + "type": "object", + "description": "Parameters for disabling automatic merging on incidents.", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "description": "Incident IDs whose automatic merge should be disabled." + } + } + }, + "UpdateIncidentFieldsRequest": { + "type": "object", + "description": "Parameters for updating user-editable fields of an incident. At least one field must be provided; the handler will update only the fields you supply.", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + }, + "title": { + "type": "string", + "minLength": 3, + "maxLength": 200, + "description": "New incident title." + }, + "description": { + "type": "string", + "minLength": 3, + "maxLength": 6144, + "description": "New description." + }, + "impact": { + "type": "string", + "minLength": 3, + "maxLength": 6144, + "description": "New impact description." + }, + "root_cause": { + "type": "string", + "minLength": 3, + "maxLength": 6144, + "description": "New root cause analysis." + }, + "resolution": { + "type": "string", + "minLength": 3, + "maxLength": 6144, + "description": "New resolution notes." + }, + "incident_severity": { + "type": "string", + "enum": [ + "Info", + "Warning", + "Critical" + ], + "description": "New severity." + } + } + }, + "RemoveIncidentRequest": { + "type": "object", + "description": "Parameters for permanently removing incidents.", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "Incident IDs to remove. At most 100 per call. The caller must have access to every channel the incidents belong to." + } + } + }, + "CommentIncidentRequest": { + "type": "object", + "description": "Parameters for adding a comment to one or more incidents.", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "Incident IDs to comment on. At most 100 per call.", + "minItems": 1 + }, + "comment": { + "type": "string", + "maxLength": 1024, + "description": "Comment body." + }, + "mute_reply": { + "type": "boolean", + "description": "When true, do not trigger webhook reply actions for this comment." + } + } + }, + "AssignIncidentRequest": { + "type": "object", + "description": "Parameters for dispatching one or more incidents to a target. Provide `incident_id` or `incident_ids` but not both.", + "required": [ + "assigned_to" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Single incident ID. Ignored when `incident_ids` is also provided." + }, + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "minItems": 1, + "maxItems": 100, + "description": "Batch incident IDs." + }, + "assigned_to": { + "$ref": "#/components/schemas/AssignedTo" + } + } + }, + "AddIncidentResponderRequest": { + "type": "object", + "description": "Parameters for adding responders to an existing incident.", + "required": [ + "incident_id", + "person_ids" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + }, + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs to add as responders." + }, + "notify": { + "type": "object", + "description": "Optional notification override. Defaults to following each person's personal preference.", + "properties": { + "follow_preference": { + "type": "boolean", + "description": "When true, fall back to each responder's personal preference." + }, + "personal_channels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels to use (e.g. `voice`, `sms`, `email`)." + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Notification template ID (MongoDB ObjectID)." + } + } + } + } + }, + "ResetIncidentFieldRequest": { + "type": "object", + "description": "Parameters for updating a custom field value on an incident.", + "required": [ + "incident_id", + "field_name" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + }, + "field_name": { + "type": "string", + "description": "Custom field name; must match a field defined on the account." + }, + "field_value": { + "description": "New field value. Type must match the field definition." + } + } + }, + "DoIncidentCustomActionRequest": { + "type": "object", + "description": "Parameters for invoking a custom action integration on an incident.", + "required": [ + "incident_id", + "integration_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Custom action integration ID. Must be enabled and associated with the incident's channel." + } + } + }, + "DoIncidentCustomActionResponse": { + "type": "object", + "description": "Result of a custom action dispatch.", + "properties": { + "message": { + "type": "string", + "description": "Error message if the action's HTTP call failed; omitted on success." + } + } + }, + "GetWarRoomDetailRequest": { + "type": "object", + "description": "Parameters for retrieving a war room's live detail.", + "required": [ + "integration_id", + "chat_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "IM integration ID that hosts the war room." + }, + "chat_id": { + "type": "string", + "description": "Chat/group ID on the IM side." + } + } + }, + "WarRoom": { + "type": "object", + "description": "Live war room details fetched from the IM side. Returns an empty object if the group was deleted externally.", + "required": [ + "chat_id", + "chat_name", + "share_link" + ], + "properties": { + "chat_id": { + "type": "string", + "description": "Chat/group ID on the IM side." + }, + "chat_name": { + "type": "string", + "description": "Chat/group display name." + }, + "share_link": { + "type": "string", + "description": "Join link for the war room, if provided by the IM." + } + } + }, + "ListWarRoomsRequest": { + "type": "object", + "description": "Parameters for listing war rooms linked to an incident.", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Optional filter: only return war rooms for this IM integration." + } + } + }, + "WarRoomItem": { + "type": "object", + "description": "Stored war room record.", + "required": [ + "account_id", + "integration_id", + "created_by", + "chat_id", + "incident_id", + "status", + "created_at", + "plugin_type" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "IM integration ID." + }, + "created_by": { + "type": "integer", + "format": "int64", + "description": "Member ID that created the war room." + }, + "chat_id": { + "type": "string", + "description": "Chat/group ID on the IM side." + }, + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Associated incident ID (MongoDB ObjectID)." + }, + "status": { + "type": "string", + "description": "War room status." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (seconds)." + }, + "plugin_type": { + "type": "string", + "description": "IM plugin type (e.g. `feishu`, `dingtalk`, `wecom`, `slack`)." + } + } + }, + "ListWarRoomsResponse": { + "type": "object", + "description": "List of war rooms associated with the incident.", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WarRoomItem" + }, + "description": "War room records." + } + } + }, + "DeleteWarRoomRequest": { + "type": "object", + "description": "Parameters for deleting an incident war room.", + "required": [ + "incident_id", + "integration_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID)." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "IM integration ID." + } + } + }, + "ListPostMortemsRequest": { + "type": "object", + "description": "Filters for the post-mortem report list.", + "properties": { + "status": { + "type": "string", + "enum": [ + "drafting", + "published" + ], + "description": "Report status. Defaults to `published` on the server when omitted." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Team IDs to restrict the query to." + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Channel IDs to restrict the query to." + }, + "created_at_start_seconds": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "Filter by creation time: lower bound in seconds." + }, + "created_at_end_seconds": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "Filter by creation time: upper bound in seconds." + }, + "order_by": { + "type": "string", + "enum": [ + "created_at_seconds", + "updated_at_seconds" + ], + "description": "Field used to order results." + }, + "asc": { + "type": "boolean", + "description": "Ascending order when true." + }, + "p": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "Page number starting at 1." + }, + "limit": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 100, + "default": 20, + "description": "Page size, at most 100." + }, + "search_after_ctx": { + "type": "string", + "description": "Cursor from a previous response for forward pagination." + } + } + }, + "PostMortemMeta": { + "type": "object", + "description": "Post-mortem metadata (lightweight shape used in lists).", + "required": [ + "account_id", + "title", + "status", + "post_mortem_id", + "template_id", + "incident_ids", + "media_count", + "author_ids", + "team_id", + "channel_id", + "is_private", + "channel_name", + "created_at_seconds", + "updated_at_seconds" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." + }, + "title": { + "type": "string", + "description": "Report title." + }, + "status": { + "type": "string", + "enum": [ + "drafting", + "published" + ], + "description": "Report status." + }, + "post_mortem_id": { + "type": "string", + "description": "Deterministic post-mortem ID derived from account and incident IDs." + }, + "template_id": { + "type": "string", + "description": "Template used to initialize the report." + }, + "incident_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Linked incident IDs." + }, + "media_count": { + "type": "integer", + "description": "Number of uploaded media files." + }, + "author_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs that contributed to the report." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID. 0 if none." + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Owning channel ID. 0 if none." + }, + "is_private": { + "type": "boolean", + "description": "When true, only team members and admins can view." + }, + "channel_name": { + "type": "string", + "description": "Channel name, filled by the server." + }, + "created_at_seconds": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (seconds)." + }, + "updated_at_seconds": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp (seconds)." + } + } + }, + "ListPostMortemsResponse": { + "type": "object", + "description": "Paginated list of post-mortem reports.", + "required": [ + "items", + "total", + "has_next_page" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PostMortemMeta" + }, + "description": "Post-mortem metadata for the current page." + }, + "total": { + "type": "integer", + "format": "int64", + "description": "Total matching reports." + }, + "has_next_page": { + "type": "boolean", + "description": "True when more results are available beyond this page." + }, + "search_after_ctx": { + "type": "string", + "description": "Cursor for forward pagination." + } + } + }, + "PostMortemItem": { + "type": "object", + "description": "Full post-mortem report including basics, content and follow-ups.", + "required": [ + "meta", + "basics", + "content", + "follow_ups" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/PostMortemMeta" + }, + "basics": { + "type": "object", + "required": [ + "incidents_highest_severity", + "incidents_earliest_start_seconds", + "incidents_latest_close_seconds", + "incidents_total_duration_seconds", + "responders" + ], + "properties": { + "incidents_highest_severity": { + "type": "string", + "description": "Highest severity among linked incidents." + }, + "incidents_earliest_start_seconds": { + "type": "integer", + "format": "int64", + "description": "Earliest start time among linked incidents (seconds)." + }, + "incidents_latest_close_seconds": { + "type": "integer", + "format": "int64", + "description": "Latest close time among linked incidents (seconds)." + }, + "incidents_total_duration_seconds": { + "type": "integer", + "format": "int64", + "description": "Cumulative duration in seconds." + }, + "responders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Responder" + }, + "description": "Responders involved in the incident(s)." + } + } + }, + "content": { + "type": "object", + "required": [ + "content" + ], + "properties": { + "content": { + "type": "string", + "description": "Report body content (BlockNote JSON)." + } + } + }, + "follow_ups": { + "type": "string", + "description": "Follow-up action items rendered as a single string." + } + } + }, + "DeletePostMortemRequest": { + "type": "object", + "description": "Parameters for deleting a post-mortem report.", + "required": [ + "post_mortem_id" + ], + "properties": { + "post_mortem_id": { + "type": "string", + "description": "Post-mortem ID." + } + } + }, + "CreateIncidentResponse": { + "type": "object", + "description": "Result of manually creating an incident.", + "required": [ + "incident_id", + "title" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Newly created incident ID (MongoDB ObjectID)." + }, + "title": { + "type": "string", + "description": "Echoes the incident title from the request." + } + } + }, + "FilterCondition": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "Field name to filter on. Use plain names for built-in alert fields (e.g. `alert_severity`, `alert_key`, `check`, `resource`, `service`, `cluster`) or the `labels.` prefix for custom alert labels (e.g. `labels.env`, `labels.region`)." + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "Filter operator. `IN` — value must match one of `vals`; `NOTIN` — value must not match any of `vals`. Supports regex patterns wrapped in `/pattern/`." + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of values to match against. Each entry is a plain string or a `/regex/` pattern." + } + } + }, + "OrFilterGroup": { + "type": "array", + "description": "OR-of-AND filter tree. Outer array is a list of AND groups; the condition passes if **any** AND group matches. Within each AND group, **all** conditions must match.", + "items": { + "type": "array", + "description": "AND group — all conditions in this array must match.", + "items": { + "$ref": "#/components/schemas/FilterCondition" + } + } + }, + "CreateChannelRequest": { + "type": "object", + "description": "Parameters for creating a channel.", + "required": [ + "team_id", + "channel_name" + ], + "properties": { + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID." + }, + "managing_team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "maxItems": 3, + "description": "Additional teams that can manage the channel. Up to 3 entries." + }, + "channel_name": { + "type": "string", + "minLength": 1, + "maxLength": 59, + "description": "Channel name. 1 to 59 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Free-form description. Up to 500 characters." + }, + "escalate_rule": { + "type": "object", + "description": "Default escalation rule applied to the channel. Omit to skip default escalation.", + "required": [ + "template_id", + "target" + ], + "properties": { + "aggr_window": { + "type": "integer", + "minimum": 0, + "maximum": 3600, + "description": "Aggregation window in seconds. 0 disables aggregation." + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Notification template ID (MongoDB ObjectID)." + }, + "target": { + "type": "object", + "description": "Notification target. At least one of `person_ids`, `team_ids`, `schedule_to_role_ids`, or `emails` must be set, together with either `by` or `webhooks`.", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs to notify directly." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Team IDs to notify." + }, + "schedule_to_role_ids": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "description": "Map of schedule ID to the role IDs on that schedule to notify." + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "description": "Email addresses to notify (push-only scenarios)." + }, + "by": { + "type": "object", + "description": "Per-severity personal notification channels. Required unless `webhooks` is provided.", + "properties": { + "follow_preference": { + "type": "boolean", + "description": "When true, use each responder's personal preference instead of the lists below." + }, + "critical": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels for Critical events (e.g. `voice`, `sms`, `email`, `feishu`)." + }, + "warning": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels for Warning events." + }, + "info": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels for Info events." + } + } + }, + "webhooks": { + "type": "array", + "description": "Group chat / webhook targets. Required unless `by` is provided.", + "items": { + "type": "object", + "required": [ + "type", + "settings" + ], + "properties": { + "type": { + "type": "string", + "description": "Webhook type (e.g. `feishu`, `dingtalk_app`, `wecom_app`, `slack`, `teams`, `custom`)." + }, + "settings": { + "type": "object", + "additionalProperties": true, + "description": "Type-specific settings (chat IDs, URLs, etc.)." + } + } + } + } + } + } + } + }, + "group": { + "type": "object", + "description": "Alert grouping configuration.", + "required": [ + "method" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "i", + "p", + "n" + ], + "description": "Grouping method: `i` intelligent, `p` pattern, `n` none." + }, + "equals": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "maxItems": 5, + "description": "Groups of label keys whose equality defines a bucket." + }, + "cases": { + "type": "array", + "maxItems": 100, + "description": "Per-filter grouping overrides.", + "items": { + "type": "object" + } + }, + "all_equals_required": { + "type": "boolean", + "description": "When true, all listed keys must be present for grouping." + }, + "time_window": { + "type": "integer", + "minimum": 0, + "description": "Grouping time window in seconds." + }, + "window_type": { + "type": "string", + "enum": [ + "tumbling", + "sliding" + ], + "description": "Window type. Defaults to `tumbling`." + }, + "storm_threshold": { + "type": "integer", + "minimum": 0, + "maximum": 10000, + "description": "Alert storm threshold." + }, + "storm_thresholds": { + "type": "array", + "items": { + "type": "integer" + }, + "maxItems": 5, + "description": "Multi-level storm thresholds." + }, + "i_keys": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 10, + "description": "Label keys used for intelligent grouping embeddings." + }, + "i_score_threshold": { + "type": "number", + "format": "float", + "minimum": 0.5, + "maximum": 1, + "description": "Intelligent grouping similarity threshold." + } + } + }, + "flapping": { + "type": "object", + "description": "Flapping detection configuration.", + "properties": { + "is_disabled": { + "type": "boolean", + "description": "Disable flapping detection." + }, + "max_changes": { + "type": "integer", + "minimum": 2, + "maximum": 100, + "description": "Max state changes allowed within `in_mins`." + }, + "in_mins": { + "type": "integer", + "minimum": 1, + "maximum": 1440, + "description": "Observation window in minutes." + }, + "mute_mins": { + "type": "integer", + "minimum": 0, + "maximum": 1440, + "description": "Mute duration in minutes after flapping is detected." + } + } + }, + "auto_resolve_timeout": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 2592000, + "description": "Auto-resolve timeout in seconds. 0 disables auto-resolve. Max 30 days." + }, + "auto_resolve_mode": { + "type": "string", + "enum": [ + "trigger", + "update" + ], + "description": "Auto-resolve timer reset mode." + }, + "plugin_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "IDs of plugins (integrations) subscribed to this channel." + }, + "is_private": { + "type": "boolean", + "description": "When true, the channel is visible only to its managing teams." + }, + "disable_outlier_detection": { + "type": "boolean", + "description": "Disable outlier incident detection." + }, + "disable_auto_close": { + "type": "boolean", + "description": "Disable automatic incident closing." + }, + "is_external_report_enabled": { + "type": "boolean", + "description": "Allow external reporters to file incidents into this channel." + } + } + }, + "CreateEscalationRuleRequest": { + "type": "object", + "description": "Parameters for creating an escalation rule.", + "required": [ + "channel_id", + "template_id", + "rule_name", + "layers" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel the rule belongs to." + }, + "priority": { + "type": "integer", + "minimum": 0, + "maximum": 200, + "description": "Evaluation priority. Lower runs first." + }, + "aggr_window": { + "type": "integer", + "minimum": 0, + "maximum": 3600, + "description": "Aggregation window in seconds. 0 disables aggregation." + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Notification template ID (MongoDB ObjectID)." + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Rule name, 1 to 39 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Rule description, up to 500 characters." + }, + "layers": { + "type": "array", + "description": "Escalation levels in order. At least one level is required.", + "items": { + "type": "object", + "required": [ + "target" + ], + "properties": { + "max_times": { + "type": "integer", + "minimum": 0, + "maximum": 6, + "description": "Max repeat notifications within the level." + }, + "notify_step": { + "type": "number", + "format": "float", + "minimum": 0.5, + "maximum": 120, + "description": "Repeat interval in minutes." + }, + "target": { + "type": "object", + "description": "Notification target. At least one of `person_ids`, `team_ids`, `schedule_to_role_ids`, or `emails` must be set, together with either `by` or `webhooks`.", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs to notify directly." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Team IDs to notify." + }, + "schedule_to_role_ids": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "description": "Map of schedule ID to the role IDs on that schedule to notify." + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "description": "Email addresses to notify (push-only scenarios)." + }, + "by": { + "type": "object", + "description": "Per-severity personal notification channels. Required unless `webhooks` is provided.", + "properties": { + "follow_preference": { + "type": "boolean", + "description": "When true, use each responder's personal preference instead of the lists below." + }, + "critical": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels for Critical events (e.g. `voice`, `sms`, `email`, `feishu`)." + }, + "warning": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels for Warning events." + }, + "info": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels for Info events." + } + } + }, + "webhooks": { + "type": "array", + "description": "Group chat / webhook targets. Required unless `by` is provided.", + "items": { + "type": "object", + "required": [ + "type", + "settings" + ], + "properties": { + "type": { + "type": "string", + "description": "Webhook type (e.g. `feishu`, `dingtalk_app`, `wecom_app`, `slack`, `teams`, `custom`)." + }, + "settings": { + "type": "object", + "additionalProperties": true, + "description": "Type-specific settings (chat IDs, URLs, etc.)." + } + } + } + } + } + }, + "escalate_window": { + "type": "integer", + "minimum": 0, + "maximum": 720, + "description": "Wait before moving to the next level, in minutes." + }, + "force_escalate": { + "type": "boolean", + "description": "When true, always escalate regardless of acknowledgement." + } + } + } + }, + "time_filters": { + "type": "array", + "items": { + "type": "object", + "description": "Recurring time window. `start`/`end` use 24-hour `HH:MM` format; `repeat` uses ISO-style weekday indices (0=Sunday … 6=Saturday).", + "properties": { + "start": { + "type": "string", + "description": "Start of the window in `HH:MM`." + }, + "end": { + "type": "string", + "description": "End of the window in `HH:MM`." + }, + "repeat": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Days of the week this window repeats on. Empty means every day." + }, + "cal_id": { + "type": "string", + "description": "Optional calendar ID; restricts the window to days matching the calendar." + }, + "is_off": { + "type": "boolean", + "description": "When true, match days marked as days-off in the calendar." + } + } + }, + "description": "Optional recurring time windows during which the rule applies." + }, + "filters": { + "type": "array", + "description": "Or-of-and filter tree. Each outer element is an AND group; within each group, all conditions must match.", + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "Field key (e.g. `alert_severity`, `labels.service`)." + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "Filter operator." + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Values to match." + } + } + } + } + } + } + }, + "CreateInhibitRuleRequest": { + "type": "object", + "description": "Parameters for creating an inhibit rule.", + "required": [ + "channel_id", + "rule_name", + "equals" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel the rule belongs to." + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower runs first." + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Rule name, 1 to 39 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Rule description, up to 500 characters." + }, + "equals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Label keys used to pair source and target alerts." + }, + "source_filters": { + "type": "array", + "description": "Or-of-and filter tree. Each outer element is an AND group; within each group, all conditions must match.", + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "Field key (e.g. `alert_severity`, `labels.service`)." + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "Filter operator." + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Values to match." + } + } + } + } + }, + "target_filters": { + "type": "array", + "description": "Or-of-and filter tree. Each outer element is an AND group; within each group, all conditions must match.", + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "Field key (e.g. `alert_severity`, `labels.service`)." + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "Filter operator." + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Values to match." + } + } + } + } + }, + "is_directly_discard": { + "type": "boolean", + "description": "When true, suppressed target alerts are dropped instead of merged." + } + } + }, + "CreateSilenceRuleRequest": { + "type": "object", + "description": "Parameters for creating a silence rule. Exactly one of `time_filter` or `time_filters` must be provided, and `filters` must be non-empty.", + "required": [ + "channel_id", + "rule_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel the rule belongs to." + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower runs first." + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Rule name, 1 to 39 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Rule description, up to 500 characters." + }, + "from_incident_id": { + "type": "string", + "description": "Source incident ID when the silence was created from an incident." + }, + "time_filters": { + "type": "array", + "items": { + "type": "object", + "description": "Recurring time window. `start`/`end` use 24-hour `HH:MM` format; `repeat` uses ISO-style weekday indices (0=Sunday … 6=Saturday).", + "properties": { + "start": { + "type": "string", + "description": "Start of the window in `HH:MM`." + }, + "end": { + "type": "string", + "description": "End of the window in `HH:MM`." + }, + "repeat": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Days of the week this window repeats on. Empty means every day." + }, + "cal_id": { + "type": "string", + "description": "Optional calendar ID; restricts the window to days matching the calendar." + }, + "is_off": { + "type": "boolean", + "description": "When true, match days marked as days-off in the calendar." + } + } + }, + "description": "Recurring time windows during which silencing applies. Mutually exclusive with `time_filter`." + }, + "time_filter": { + "type": "object", + "description": "One-off time window defined by unix seconds.", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "Window start (unix seconds). Must be less than `end_time`." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "Window end (unix seconds)." + } + } + }, + "filters": { + "type": "array", + "description": "Or-of-and filter tree. Each outer element is an AND group; within each group, all conditions must match.", + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "Field key (e.g. `alert_severity`, `labels.service`)." + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "Filter operator." + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Values to match." + } + } + } + } + }, + "is_directly_discard": { + "type": "boolean", + "description": "When true, silenced alerts are dropped instead of suppressed into incidents." + } + } + }, + "CreateDropRuleRequest": { + "type": "object", + "description": "Parameters for creating a channel drop rule.", + "required": [ + "channel_id", + "rule_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel the rule belongs to." + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower runs first." + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Rule name, 1 to 39 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Rule description, up to 500 characters." + }, + "filters": { + "type": "array", + "description": "Or-of-and filter tree. Each outer element is an AND group; within each group, all conditions must match.", + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "Field key (e.g. `alert_severity`, `labels.service`)." + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "Filter operator." + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Values to match." + } + } + } + } + } + } + }, + "TimeFilter": { + "type": "object", + "description": "Recurring time window. `start`/`end` use 24-hour `HH:MM` format; `repeat` lists ISO-style weekday indices (0=Sunday … 6=Saturday).", + "properties": { + "start": { + "type": "string", + "description": "Start of the window in `HH:MM`." + }, + "end": { + "type": "string", + "description": "End of the window in `HH:MM`." + }, + "repeat": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Days of the week this window repeats on. Empty means every day." + }, + "cal_id": { + "type": "string", + "description": "Optional calendar ID; restricts the window to days matching the calendar." + }, + "is_off": { + "type": "boolean", + "description": "When true, match days marked as days-off in the calendar." + } + } + }, + "OnceTimeFilter": { + "type": "object", + "description": "One-off time window defined by unix seconds.", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "Window start (unix seconds). Must be > 0 and less than `end_time`.", + "exclusiveMinimum": 0 + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "Window end (unix seconds). Must be > 0.", + "exclusiveMinimum": 0 + } + } + }, + "FilterGroup": { + "$ref": "#/components/schemas/OrFilterGroup" + }, + "EscalateTarget": { + "type": "object", + "description": "Notification target. At least one of `person_ids`, `team_ids`, `schedule_to_role_ids`, or `emails` must be set, together with either `by` or `webhooks`.", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs to notify directly." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Team IDs to notify." + }, + "schedule_to_role_ids": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "description": "Map of schedule ID to the role IDs on that schedule to notify." + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "description": "Email addresses to notify (push-only scenarios)." + }, + "by": { + "type": "object", + "description": "Per-severity personal notification channels. Required unless `webhooks` is provided.", + "properties": { + "follow_preference": { + "type": "boolean", + "description": "When true, use each responder's personal preference instead of the lists below." + }, + "critical": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels for Critical events (e.g. `voice`, `sms`, `email`, `feishu`)." + }, + "warning": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels for Warning events." + }, + "info": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels for Info events." + } + } + }, + "webhooks": { + "type": "array", + "description": "Group chat / webhook targets. Required unless `by` is provided.", + "items": { + "type": "object", + "required": [ + "type", + "settings" + ], + "properties": { + "type": { + "type": "string", + "description": "Webhook type (e.g. `feishu`, `dingtalk_app`, `wecom_app`, `slack`, `teams`, `custom`)." + }, + "settings": { + "type": "object", + "additionalProperties": true, + "description": "Type-specific settings (chat IDs, URLs, etc.)." + } + } + } + } + } + }, + "EscalateLayer": { + "type": "object", + "required": [ + "target" + ], + "properties": { + "max_times": { + "type": "integer", + "minimum": 0, + "maximum": 6, + "description": "Max repeat notifications within the level." + }, + "notify_step": { + "type": "number", + "format": "float", + "minimum": 0.5, + "maximum": 120, + "description": "Repeat interval in minutes." + }, + "target": { + "$ref": "#/components/schemas/EscalateTarget" + }, + "escalate_window": { + "type": "integer", + "minimum": 0, + "maximum": 720, + "description": "Wait before moving to the next level, in minutes." + }, + "force_escalate": { + "type": "boolean", + "description": "When true, always escalate regardless of acknowledgement." + } + } + }, + "Group": { + "type": "object", + "description": "Alert grouping configuration.", + "required": [ + "method" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "i", + "p", + "n" + ], + "description": "Grouping method: `i` intelligent, `p` pattern, `n` none." + }, + "equals": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "maxItems": 5, + "description": "Groups of label keys whose equality defines a bucket." + }, + "cases": { + "type": "array", + "maxItems": 100, + "description": "Per-filter grouping overrides.", + "items": { + "type": "object" + } + }, + "all_equals_required": { + "type": "boolean", + "description": "When true, all listed keys must be present for grouping." + }, + "time_window": { + "type": "integer", + "minimum": 0, + "description": "Grouping time window in minutes. Default max is 1440 minutes (24 h); extended accounts may allow up to 43200 minutes (30 days)." + }, + "window_type": { + "type": "string", + "enum": [ + "tumbling", + "sliding" + ], + "description": "Window type. Defaults to `tumbling`." + }, + "storm_threshold": { + "type": "integer", + "minimum": 0, + "maximum": 10000, + "description": "Alert storm threshold." + }, + "storm_thresholds": { + "type": "array", + "items": { + "type": "integer" + }, + "maxItems": 5, + "description": "Multi-level storm thresholds." + }, + "i_keys": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 10, + "description": "Label keys used for intelligent grouping embeddings." + }, + "i_score_threshold": { + "type": "number", + "format": "float", + "minimum": 0.5, + "maximum": 1, + "description": "Intelligent grouping similarity threshold." + } + } + }, + "Flapping": { + "type": "object", + "description": "Flapping detection configuration.", + "properties": { + "is_disabled": { + "type": "boolean", + "description": "Disable flapping detection." + }, + "max_changes": { + "type": "integer", + "minimum": 2, + "maximum": 100, + "description": "Max state changes allowed within `in_mins`." + }, + "in_mins": { + "type": "integer", + "minimum": 1, + "maximum": 1440, + "description": "Observation window in minutes." + }, + "mute_mins": { + "type": "integer", + "minimum": 0, + "maximum": 1440, + "description": "Mute duration in minutes after flapping is detected." + } + } + }, + "IncProgressCnts": { + "type": "object", + "required": [ + "Triggered", + "Processing" + ], + "properties": { + "Triggered": { + "type": "integer", + "format": "int64", + "description": "Count of triggered incidents in the last 30 days." + }, + "Processing": { + "type": "integer", + "format": "int64", + "description": "Count of processing incidents in the last 30 days." + } + } + }, + "ChannelItem": { + "type": "object", + "description": "Channel detail record. All fields are optional; they are emitted only when populated.", + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel ID." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID." + }, + "managing_team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Additional teams that can manage the channel." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "Member ID who created the channel." + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "Owning account ID." + }, + "channel_name": { + "type": "string", + "description": "Channel name." + }, + "description": { + "type": "string", + "description": "Free-form description." + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled", + "deleted" + ], + "description": "Channel status." + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "Deletion timestamp (unix seconds). Non-zero only for soft-deleted channels." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (unix seconds)." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp (unix seconds)." + }, + "auto_resolve_timeout": { + "type": "integer", + "format": "int64", + "description": "Auto-resolve timeout in seconds. 0 disables auto-resolve." + }, + "auto_resolve_mode": { + "type": "string", + "enum": [ + "trigger", + "update" + ], + "description": "Auto-resolve timer reset mode." + }, + "is_private": { + "type": "boolean", + "description": "When true, the channel is visible only to its managing teams." + }, + "disable_outlier_detection": { + "type": "boolean", + "description": "When true, outlier incident detection is disabled." + }, + "disable_auto_close": { + "type": "boolean", + "description": "When true, automatic incident closing is disabled." + }, + "group": { + "$ref": "#/components/schemas/Group" + }, + "flapping": { + "$ref": "#/components/schemas/Flapping" + }, + "progress_to_incident_cnts": { + "$ref": "#/components/schemas/IncProgressCnts" + }, + "is_starred": { + "type": "boolean", + "description": "Whether the current user has starred this channel." + }, + "active_incident_highest_severity": { + "type": "string", + "description": "Highest severity among active incidents in the channel." + }, + "last_incident_at": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the most recent incident (unix seconds)." + }, + "is_external_report_enabled": { + "type": "boolean", + "description": "Whether external reporters can file incidents into this channel." + }, + "external_report_token": { + "type": "string", + "description": "Token granted to external reporters when external reporting is enabled." + } + } + }, + "ChannelShort": { + "type": "object", + "required": [ + "channel_id", + "channel_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel ID." + }, + "channel_name": { + "type": "string", + "description": "Channel name." + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "Channel status." + } + } + }, + "EscalateRuleItem": { + "type": "object", + "required": [ + "account_id", + "channel_id", + "priority", + "aggr_window", + "rule_name", + "description", + "layers", + "time_filters", + "filters", + "status", + "template_id", + "rule_id", + "updated_by", + "created_at", + "updated_at" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "Owning account ID." + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel the rule belongs to." + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower runs first." + }, + "aggr_window": { + "type": "integer", + "description": "Aggregation window in seconds." + }, + "rule_name": { + "type": "string", + "description": "Rule name." + }, + "description": { + "type": "string", + "description": "Rule description." + }, + "layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EscalateLayer" + }, + "description": "Escalation levels in order." + }, + "time_filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimeFilter" + }, + "description": "Recurring time windows during which the rule applies." + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "Rule status." + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Notification template ID (MongoDB ObjectID)." + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Escalation rule ID (MongoDB ObjectID)." + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "Member ID that last updated the rule." + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "Deletion timestamp (unix seconds). Emitted only for soft-deleted rules." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (unix seconds)." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp (unix seconds)." + }, + "channel_name": { + "type": "string", + "description": "Channel name, populated for cross-channel listing responses." + } + } + }, + "SilenceRuleItem": { + "type": "object", + "required": [ + "account_id", + "channel_id", + "priority", + "rule_name", + "description", + "time_filters", + "time_filter", + "filters", + "is_directly_discard", + "status", + "rule_id", + "updated_by", + "created_at", + "updated_at", + "is_effective" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64" + }, + "channel_id": { + "type": "integer", + "format": "int64" + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower runs first." + }, + "rule_name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "from_incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Source incident ID when the silence was created from an incident." + }, + "time_filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimeFilter" + }, + "description": "Recurring time windows." + }, + "time_filter": { + "$ref": "#/components/schemas/OnceTimeFilter" + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "is_directly_discard": { + "type": "boolean", + "description": "When true, silenced alerts are dropped instead of suppressed into incidents." + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ] + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "updated_by": { + "type": "integer", + "format": "int64" + }, + "deleted_at": { + "type": "integer", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "is_effective": { + "type": "boolean", + "description": "Whether the rule is currently in effect." + } + } + }, + "InhibitRuleItem": { + "type": "object", + "required": [ + "account_id", + "channel_id", + "priority", + "rule_name", + "description", + "source_filters", + "target_filters", + "equals", + "is_directly_discard", + "status", + "rule_id", + "updated_by", + "created_at", + "updated_at" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64" + }, + "channel_id": { + "type": "integer", + "format": "int64" + }, + "priority": { + "type": "integer" + }, + "rule_name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "source_filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "target_filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "equals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Label keys used to pair source and target alerts." + }, + "is_directly_discard": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ] + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "updated_by": { + "type": "integer", + "format": "int64" + }, + "deleted_at": { + "type": "integer", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + } + } + }, + "UnsubscribeRuleItem": { + "type": "object", + "description": "Drop (unsubscribe) rule record.", + "required": [ + "account_id", + "channel_id", + "priority", + "rule_name", + "description", + "filters", + "status", + "rule_id", + "updated_by", + "created_at", + "updated_at" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64" + }, + "channel_id": { + "type": "integer", + "format": "int64" + }, + "priority": { + "type": "integer" + }, + "rule_name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ] + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "updated_by": { + "type": "integer", + "format": "int64" + }, + "deleted_at": { + "type": "integer", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + } + } + }, + "ChannelInfoRequest": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel ID to fetch." + } + } + }, + "ListChannelsRequest": { + "type": "object", + "properties": { + "p": { + "type": "integer", + "minimum": 1, + "description": "Page number (1-based)." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 100, + "description": "Page size. Defaults to 100 when omitted." + }, + "orderby": { + "type": "string", + "enum": [ + "ranking", + "created_at", + "updated_at", + "channel_name", + "last_incident_at" + ], + "description": "Field used to order results." + }, + "asc": { + "type": "boolean", + "description": "When true, sort ascending." + }, + "is_my_managed": { + "type": "boolean", + "description": "When true, return only channels the caller manages." + }, + "is_my_starred": { + "type": "boolean", + "description": "When true, return only channels the caller has starred. Mutually exclusive with `is_my_team`." + }, + "is_brief": { + "type": "boolean", + "description": "When true, return only brief fields (`channel_id`, `channel_name`, `description`, `status`)." + }, + "is_my_team": { + "type": "boolean", + "description": "When true, return channels owned by the caller's teams. Mutually exclusive with `is_my_starred`." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by team IDs." + }, + "query": { + "type": "string", + "description": "Free-text query against channel name/description." + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by explicit channel IDs." + }, + "channel_name": { + "type": "string", + "description": "Exact-match filter on channel name. Takes priority over `query` for name filtering." + } + } + }, + "ChannelInfosRequest": { + "type": "object", + "required": [ + "channel_ids" + ], + "properties": { + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "maxItems": 1000, + "description": "Channel IDs to look up. Up to 1000." + } + } + }, + "UpdateChannelRequest": { + "type": "object", + "required": [ + "channel_id" + ], + "description": "Parameters for updating a channel. Only the fields you pass are updated.", + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel ID to update." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "New owning team ID." + }, + "managing_team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "maxItems": 3, + "description": "Additional teams that can manage the channel. Up to 3 entries." + }, + "channel_name": { + "type": "string", + "minLength": 1, + "maxLength": 59, + "description": "New channel name. 1 to 59 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "New description. Up to 500 characters." + }, + "auto_resolve_timeout": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 2592000, + "description": "Auto-resolve timeout in seconds. 0 disables auto-resolve. Max 30 days." + }, + "auto_resolve_mode": { + "type": "string", + "enum": [ + "trigger", + "update" + ], + "description": "Auto-resolve timer reset mode." + }, + "is_private": { + "type": "boolean", + "description": "When true, the channel is visible only to its managing teams." + }, + "group": { + "$ref": "#/components/schemas/Group" + }, + "flapping": { + "$ref": "#/components/schemas/Flapping" + }, + "disable_outlier_detection": { + "type": "boolean", + "description": "Disable outlier incident detection." + }, + "disable_auto_close": { + "type": "boolean", + "description": "Disable automatic incident closing." + }, + "is_external_report_enabled": { + "type": "boolean", + "description": "Allow external reporters to file incidents into this channel." + } + } + }, + "UpdateChannelResponse": { + "type": "object", + "description": "Response from updating a channel. Only populated when `is_external_report_enabled` is set to `true`; otherwise all fields are empty.", + "properties": { + "external_report_token": { + "type": "string", + "description": "Newly generated token for external reporters. Only returned when `is_external_report_enabled` is set to `true` in the request. Callers should store this value; it cannot be retrieved afterwards." + } + } + }, + "ChannelIDRequest": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel ID." + } + } + }, + "ChannelScopedListRequest": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel to list rules for." + } + } + }, + "UpdateSilenceRuleRequest": { + "type": "object", + "description": "Parameters for updating a silence rule. Exactly one of `time_filter` or `time_filters` must be provided, and `filters` must be non-empty.", + "required": [ + "channel_id", + "rule_id", + "rule_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel the rule belongs to." + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Silence rule ID (MongoDB ObjectID)." + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower runs first." + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Rule name, 1 to 39 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Rule description, up to 500 characters." + }, + "time_filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimeFilter" + }, + "description": "Recurring time windows. Mutually exclusive with `time_filter`." + }, + "time_filter": { + "$ref": "#/components/schemas/OnceTimeFilter" + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "is_directly_discard": { + "type": "boolean", + "description": "When true, silenced alerts are dropped instead of suppressed into incidents." + } + } + }, + "ChannelRuleIDRequest": { + "type": "object", + "required": [ + "channel_id", + "rule_id" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel the rule belongs to." + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Rule ID (MongoDB ObjectID)." + } + } + }, + "UpdateInhibitRuleRequest": { + "type": "object", + "description": "Parameters for updating an inhibit rule.", + "required": [ + "channel_id", + "rule_id", + "rule_name", + "equals" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel the rule belongs to." + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Inhibit rule ID (MongoDB ObjectID)." + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower runs first." + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Rule name, 1 to 39 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Rule description, up to 500 characters." + }, + "equals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Label keys used to pair source and target alerts." + }, + "source_filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "target_filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "is_directly_discard": { + "type": "boolean", + "description": "When true, suppressed target alerts are dropped instead of merged." + } + } + }, + "UpdateDropRuleRequest": { + "type": "object", + "description": "Parameters for updating a channel drop rule.", + "required": [ + "channel_id", + "rule_id", + "rule_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel the rule belongs to." + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Drop rule ID (MongoDB ObjectID)." + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower runs first." + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Rule name, 1 to 39 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Rule description, up to 500 characters." + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + } + } + }, + "UpdateEscalationRuleRequest": { + "type": "object", + "description": "Parameters for updating an escalation rule.", + "required": [ + "channel_id", + "rule_id", + "template_id", + "rule_name", + "layers" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel the rule belongs to." + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Escalation rule ID (MongoDB ObjectID)." + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower runs first." + }, + "aggr_window": { + "type": "integer", + "description": "Aggregation window in seconds. 0 disables aggregation." + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Notification template ID (MongoDB ObjectID)." + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Rule name, 1 to 39 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Rule description, up to 500 characters." + }, + "layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EscalateLayer" + }, + "description": "Escalation levels in order. At least one level is required." + }, + "time_filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimeFilter" + }, + "description": "Optional recurring time windows during which the rule applies." + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + } + } + }, + "ListChannelsResponse": { + "type": "object", + "required": [ + "items", + "total", + "has_next_page" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelItem" + } + }, + "total": { + "type": "integer", + "format": "int64", + "description": "Total matching channels." + }, + "has_next_page": { + "type": "boolean", + "description": "Whether more pages are available." + } + } + }, + "ChannelInfosResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelShort" + } + } + } + }, + "ListSilenceRulesResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SilenceRuleItem" + } + } + } + }, + "ListInhibitRulesResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InhibitRuleItem" + } + } + } + }, + "ListDropRulesResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UnsubscribeRuleItem" + } + } + } + }, + "ListEscalationRulesResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EscalateRuleItem" + } + } + } + }, + "ChannelCreateResponse": { + "type": "object", + "required": [ + "channel_id", + "channel_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Newly created channel ID." + }, + "channel_name": { + "type": "string", + "description": "Channel name echoed back from the request." + }, + "external_report_token": { + "type": "string", + "description": "External report token. Emitted only when external reporting is enabled." + } + } + }, + "RuleCreateResponse": { + "type": "object", + "required": [ + "rule_id", + "rule_name" + ], + "properties": { + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Newly created rule ID (MongoDB ObjectID)." + }, + "rule_name": { + "type": "string", + "description": "Rule name echoed back from the request." + } + } + }, + "RouteMatchCondition": { + "type": "object", + "description": "A single match condition. All conditions inside one case form an AND group.", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "Field key to match against the alert event (e.g. `alert_severity`, `labels.service`)." + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "Match operator. `IN` matches when the field value is one of `vals`; `NOTIN` matches when it is not." + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Values to compare against. Each value may be a literal string, a wildcard (`*`, `?`), a regular expression wrapped in slashes (`/pattern/`), a CIDR (`cidr:10.0.0.0/8`), or a numeric comparison (`num:lt:100`)." + } + } + }, + "RouteCase": { + "type": "object", + "description": "A single case branch in the routing rule. When all of its conditions match, the alert is dispatched to the configured channels.", + "required": [ + "if", + "channel_ids", + "fallthrough" + ], + "properties": { + "if": { + "type": "array", + "description": "List of match conditions that are AND-ed together.", + "items": { + "$ref": "#/components/schemas/RouteMatchCondition" + } + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Target channel IDs. Required when `routing_mode` is `standard` (or empty)." + }, + "fallthrough": { + "type": "boolean", + "description": "If `true`, evaluation continues to the next case after this one matches; otherwise matching stops at the first hit." + }, + "routing_mode": { + "type": "string", + "enum": [ + "standard", + "name_mapping" + ], + "description": "Routing mode. `standard` (default, also used when left empty) routes to the fixed channel IDs; `name_mapping` resolves channels by reading a label value from the alert event." + }, + "name_mapping_label": { + "type": "string", + "description": "Label key whose value is used as the target channel name. Required when `routing_mode` is `name_mapping`." + } + } + }, + "RouteSection": { + "type": "object", + "description": "A logical section that groups consecutive cases for display purposes.", + "required": [ + "name", + "position" + ], + "properties": { + "name": { + "type": "string", + "description": "Section name. Must be unique within the rule." + }, + "position": { + "type": "integer", + "description": "Index in `cases` where this section starts. Must be between 0 and the length of `cases`." + } + } + }, + "RouteDefault": { + "type": "object", + "description": "Default branch used when no case matches (or all matched cases yield no valid channels).", + "properties": { + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Channel IDs to fall back to." + } + } + }, + "RouteItem": { + "type": "object", + "description": "Routing rule of an integration. Alerts are evaluated against `cases` in order; unmatched alerts fall through to `default`. Returns `null` when the integration has no configured rule.", + "required": [ + "version", + "updated_by", + "creator_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration the rule belongs to." + }, + "cases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteCase" + }, + "description": "Ordered list of case branches." + }, + "sections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteSection" + }, + "description": "Optional sections that visually group cases." + }, + "default": { + "$ref": "#/components/schemas/RouteDefault" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "deleted" + ], + "description": "Rule status." + }, + "version": { + "type": "integer", + "format": "int64", + "description": "Monotonic version number, incremented on each update. Use it for optimistic concurrency control." + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "ID of the person who performed the last update." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "ID of the person who created the rule." + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "Soft-delete timestamp, Unix seconds. Omitted when the rule is active." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation time, Unix timestamp in seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update time, Unix timestamp in seconds." + } + } + }, + "RouteInfoRequest": { + "type": "object", + "description": "Parameters for retrieving the routing rule of one integration.", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID. Must be greater than 0." + } + } + }, + "ListRoutesRequest": { + "type": "object", + "description": "Parameters for listing routing rules across multiple integrations.", + "required": [ + "integration_ids" + ], + "properties": { + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Integration IDs to fetch routing rules for." + } + } + }, + "ListRoutesResponse": { + "type": "object", + "description": "Response wrapper for the routing rule list.", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteItem" + }, + "description": "Routing rules of the requested integrations. Integrations without a configured rule are omitted." + } + } + }, + "UpsertRouteRequest": { + "type": "object", + "description": "Parameters for creating or updating the routing rule of an integration. The handler creates a rule when none exists for the integration, otherwise it overwrites the existing one. At least one of `cases` or `default` must be provided.", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration the rule belongs to." + }, + "cases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteCase" + }, + "description": "Ordered list of case branches. Cases are evaluated top to bottom." + }, + "sections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteSection" + }, + "description": "Optional sections that group consecutive cases for display." + }, + "default": { + "$ref": "#/components/schemas/RouteDefault" + }, + "version": { + "type": "integer", + "format": "int64", + "description": "Expected current version for optimistic concurrency control. Pass the value returned by the latest read." + } + } + }, + "AlertListRequest": { + "type": "object", + "description": "Filter and pagination criteria for alert list queries. Time range is required.", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "Start of the search window, Unix epoch seconds." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "End of the search window, Unix epoch seconds. Max span 31 days." + }, + "p": { + "type": "integer", + "format": "int64", + "description": "Page number, starting at 1. Used when `search_after_ctx` is not provided." + }, + "limit": { + "type": "integer", + "format": "int64", + "description": "Page size. Max 100, default 20." + }, + "search_after_ctx": { + "type": "string", + "description": "Opaque cursor from the previous response for the next page." + }, + "is_active": { + "type": "boolean", + "description": "Filter by active (`true`) or resolved (`false`) status." + }, + "ever_muted": { + "type": "boolean", + "description": "Filter by whether the alert has ever been silenced." + }, + "alert_severity": { + "type": "string", + "description": "Comma-separated severity filter, e.g. `Critical,Warning`. Allowed values: `Critical`, `Warning`, `Info`, `Ok`." + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by channel IDs." + }, + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by integration IDs." + }, + "alert_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter to specific alert IDs (ObjectID hex strings)." + }, + "alert_keys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by alert deduplication keys." + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "Sort field." + }, + "asc": { + "type": "boolean", + "description": "Sort ascending when `true`. Default descending." + }, + "by_updated_at": { + "type": "boolean", + "description": "When `true`, the time range filter is applied on `updated_at` rather than `start_time`." + } + } + }, + "AlertItem": { + "type": "object", + "description": "A single alert with full detail.", + "properties": { + "alert_id": { + "type": "string", + "description": "Unique alert ID (ObjectID hex string)." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "ID of the integration that produced this alert." + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "Deprecated. Use `integration_id` instead. Deprecated: use `integration_id` instead.", + "deprecated": true + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "ID of the channel the alert belongs to." + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." + }, + "title": { + "type": "string", + "description": "Alert title." + }, + "title_rule": { + "type": "string", + "description": "Title template used to derive `title` from the event labels (e.g. `$service::$cluster`)." + }, + "description": { + "type": "string", + "description": "Alert description." + }, + "alert_severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "Current severity." + }, + "alert_status": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "Current status." + }, + "alert_key": { + "type": "string", + "description": "Deduplication key." + }, + "start_time": { + "type": "integer", + "format": "int64", + "description": "First-seen time, Unix epoch seconds." + }, + "last_time": { + "type": "integer", + "format": "int64", + "description": "Last-event time, Unix epoch seconds." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "Resolution time, Unix epoch seconds. 0 if still active." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Label key-value pairs." + }, + "ever_muted": { + "type": "boolean", + "description": "True if this alert has ever been silenced." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp, Unix epoch seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp, Unix epoch seconds." + }, + "integration_name": { + "type": "string", + "description": "Display name of the integration." + }, + "integration_type": { + "type": "string", + "description": "Type/plugin key of the integration." + }, + "integration_ref_id": { + "type": "string", + "description": "External reference ID of the integration." + }, + "channel_name": { + "type": "string", + "description": "Display name of the channel." + }, + "channel_status": { + "type": "string", + "description": "Status of the channel (e.g. `enabled`, `disabled`)." + }, + "responder_name": { + "type": "string", + "description": "Display name of the current responder (from the associated incident)." + }, + "responder_email": { + "type": "string", + "description": "Email of the current responder (from the associated incident)." + }, + "event_cnt": { + "type": "integer", + "format": "int64", + "description": "Total number of raw events received by this alert." + }, + "incident": { + "$ref": "#/components/schemas/IncidentShort", + "description": "Associated incident, if any." + }, + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertEventItem" + }, + "description": "Recent raw events attached to this alert. Populated only by some endpoints." + }, + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertImage" + }, + "description": "Images attached to the alert." + }, + "data_source_name": { + "type": "string", + "description": "Deprecated. Use `integration_name` instead." + }, + "data_source_type": { + "type": "string", + "description": "Deprecated. Use `integration_type` instead." + }, + "data_source_ref_id": { + "type": "string", + "description": "Deprecated. Use `integration_ref_id` instead." + } + } + }, + "AlertImage": { + "type": "object", + "description": "An image attachment on an alert or event.", + "required": [ + "src" + ], + "properties": { + "href": { + "type": "string", + "description": "Optional link URL when the image is clicked." + }, + "src": { + "type": "string", + "description": "Image source URL or internal image reference (starts with `img_` or `http`)." + }, + "alt": { + "type": "string", + "description": "Alt text." + } + } + }, + "AlertListResponse": { + "type": "object", + "description": "Paginated list of alerts.", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total matching alerts." + }, + "has_next_page": { + "type": "boolean", + "description": "True if more pages are available." + }, + "search_after_ctx": { + "type": "string", + "description": "Cursor for the next page." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertItem" + } + } + } + }, + "AlertInfoRequest": { + "type": "object", + "required": [ + "alert_id" + ], + "properties": { + "alert_id": { + "type": "string", + "description": "Alert ID (ObjectID hex string)." + } + } + }, + "AlertListByIDsRequest": { + "type": "object", + "required": [ + "alert_ids" + ], + "properties": { + "alert_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of alert IDs (ObjectID hex strings)." + } + } + }, + "AlertEventListRequest": { + "type": "object", + "required": [ + "alert_id" + ], + "properties": { + "alert_id": { + "type": "string", + "description": "Alert ID (ObjectID hex string)." + } + } + }, + "AlertEventListResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertEventItem" + } + } + } + }, + "AlertFeedRequest": { + "type": "object", + "required": [ + "alert_id" + ], + "properties": { + "alert_id": { + "type": "string", + "description": "Alert ID." + }, + "p": { + "type": "integer", + "format": "int64", + "description": "Page number, starting at 1.", + "default": 1 + }, + "limit": { + "type": "integer", + "format": "int64", + "description": "Page size, max 100, default 20." + }, + "asc": { + "type": "boolean", + "description": "Sort ascending." + }, + "types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by feed types." + } + } + }, + "AlertFeedType": { + "type": "string", + "description": "Alert activity feed entry type. Each value identifies one alert lifecycle event; the matching `detail` payload shape is determined by this field.\n\n| Type | Meaning |\n|---|---|\n| `a_new` | Alert triggered. |\n| `a_comm` | Comment added on the alert. |\n| `a_close` | Alert closed. |", + "enum": [ + "a_new", + "a_comm", + "a_close" + ] + }, + "FeedDetailAlertTrigger": { + "type": "object", + "description": "Detail payload for `a_new`.", + "properties": { + "severity": { + "$ref": "#/components/schemas/FeedSeverity" + }, + "status": { + "$ref": "#/components/schemas/FeedSeverity" + } + }, + "title": "a_new" + }, + "FeedDetailAlertComment": { + "type": "object", + "description": "Detail payload for `a_comm`.", + "properties": { + "comment": { + "type": "string", + "description": "Comment body." + } + }, + "title": "a_comm" + }, + "FeedDetailAlertClose": { + "type": "object", + "description": "Detail payload for `a_close`. No fields.", + "properties": {}, + "additionalProperties": false, + "title": "a_close" + }, + "FeedItem": { + "type": "object", + "description": "A single alert activity feed entry. The `detail` field is discriminated by `type`; see the per-type `FeedDetailAlert*` schemas.", + "required": [ + "ref_id", + "type", + "detail", + "account_id", + "creator_id", + "created_at", + "updated_at" + ], + "properties": { + "ref_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "ObjectID of the alert this entry references." + }, + "type": { + "$ref": "#/components/schemas/AlertFeedType" + }, + "detail": { + "description": "Type-specific payload. The concrete shape is determined by `type`.", + "oneOf": [ + { + "$ref": "#/components/schemas/FeedDetailAlertTrigger" + }, + { + "$ref": "#/components/schemas/FeedDetailAlertComment" + }, + { + "$ref": "#/components/schemas/FeedDetailAlertClose" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "a_new": "#/components/schemas/FeedDetailAlertTrigger", + "a_comm": "#/components/schemas/FeedDetailAlertComment", + "a_close": "#/components/schemas/FeedDetailAlertClose" + } + } + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "Member ID of the creator. 0 for system-generated entries." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp in Unix epoch milliseconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp in Unix epoch milliseconds." + } + } + }, + "AlertFeedResponse": { + "type": "object", + "properties": { + "has_next_page": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeedItem" + } + } + } + }, + "AlertMergeRequest": { + "type": "object", + "required": [ + "alert_ids", + "incident_id" + ], + "properties": { + "alert_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Alert IDs to merge." + }, + "incident_id": { + "type": "string", + "description": "Target incident ID." + }, + "comment": { + "type": "string", + "description": "Optional comment on the merge action." + }, + "title": { + "type": "string", + "description": "Optional new title for the target incident." + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "Optional new owner for the target incident." + } + } + }, + "AlertPipelineInfoRequest": { + "type": "object", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID." + } + } + }, + "AlertPipeline": { + "type": "object", + "description": "A single alert processing rule.", + "properties": { + "kind": { + "type": "string", + "enum": [ + "title_reset", + "description_reset", + "severity_reset", + "alert_drop", + "alert_inhibit" + ], + "description": "Rule type." + }, + "if": { + "$ref": "#/components/schemas/OrFilterGroup", + "description": "Optional OR-of-AND filter. When omitted, the rule applies to all alerts." + }, + "settings": { + "type": "object", + "description": "Kind-specific settings. Shape depends on `kind`:\n- `title_reset`: `{ \"title\": \"\" }`\n- `description_reset`: `{ \"description\": \"\" }`\n- `severity_reset`: `{ \"severity\": \"Critical\"|\"Warning\"|\"Info\" }`\n- `alert_drop`: `{}` (empty object)\n- `alert_inhibit`: `{ \"equals\": [\"\", ...], \"source_filters\": }`", + "oneOf": [ + { + "$ref": "#/components/schemas/ApTitleReset" + }, + { + "$ref": "#/components/schemas/ApDescriptionReset" + }, + { + "$ref": "#/components/schemas/ApSeverityReset" + }, + { + "$ref": "#/components/schemas/ApAlertDrop" + }, + { + "$ref": "#/components/schemas/ApAlertInhibit" + } + ] + } + } + }, + "AlertPipelineItem": { + "type": "object", + "description": "Alert processing pipeline for an integration.", + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID this pipeline applies to." + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertPipeline" + }, + "description": "Ordered list of processing rules." + }, + "status": { + "type": "string", + "description": "Pipeline status. Possible values: `enabled`, `disabled`." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "Member ID who created the pipeline." + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "Member ID who last updated the pipeline." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp, Unix epoch seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp, Unix epoch seconds." + } + } + }, + "AlertPipelineListRequest": { + "type": "object", + "required": [ + "integration_ids" + ], + "properties": { + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Integration IDs." + } + } + }, + "AlertPipelineListResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertPipelineItem" + } + } + } + }, + "AlertPipelineUpsertRequest": { + "type": "object", + "required": [ + "integration_id", + "rules" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID to configure." + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertPipeline" + }, + "description": "Rules to apply. Max 50.", + "maxItems": 50 + } + } + }, + "AlertEventGlobalListRequest": { + "type": "object", + "description": "Filter and pagination criteria for the global raw event list.", + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "Start of search window, Unix epoch seconds." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "End of search window, Unix epoch seconds." + }, + "p": { + "type": "integer", + "format": "int64", + "description": "Page number, starting at 1. Used when `search_after_ctx` is not provided." + }, + "limit": { + "type": "integer", + "format": "int64", + "description": "Page size, max 100, default 20." + }, + "search_after_ctx": { + "type": "string", + "description": "Opaque cursor for the next page." + }, + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by integration IDs." + }, + "integration_types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by integration types (plugin keys)." + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by channel IDs. Max 100." + }, + "severities": { + "type": "string", + "description": "Comma-separated severity filter, e.g. `Critical,Warning`." + }, + "orderby": { + "type": "string", + "description": "Sort field (ES field name).", + "enum": [ + "event_time" + ] + }, + "asc": { + "type": "boolean", + "description": "Sort ascending when `true`." + } + } + }, + "AlertEventGlobalListResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64" + }, + "has_next_page": { + "type": "boolean" + }, + "search_after_ctx": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertEventItem" + } + } + } + }, + "ApTitleReset": { + "type": "object", + "description": "Settings for `title_reset` rule: overrides the alert title with a template string.", + "required": [ + "title" + ], + "properties": { + "title": { + "type": "string", + "description": "New title template. Supports Golang template syntax referencing alert fields." + } + } + }, + "ApDescriptionReset": { + "type": "object", + "description": "Settings for `description_reset` rule: overrides the alert description.", + "required": [ + "description" + ], + "properties": { + "description": { + "type": "string", + "description": "New description template." + } + } + }, + "ApSeverityReset": { + "type": "object", + "description": "Settings for `severity_reset` rule: forces the alert severity to a fixed value.", + "required": [ + "severity" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info" + ], + "description": "Target severity level." + } + } + }, + "ApAlertDrop": { + "type": "object", + "description": "Settings for `alert_drop` rule: no additional settings required. Matched alerts are silently discarded.", + "properties": {} + }, + "ApAlertInhibit": { + "type": "object", + "description": "Settings for `alert_inhibit` rule: suppresses source alerts that match the filter when they share the same label values as the current alert.", + "required": [ + "equals", + "source_filters" + ], + "properties": { + "equals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Label keys whose values must be equal between the source and current alert for inhibition to apply." + }, + "source_filters": { + "$ref": "#/components/schemas/OrFilterGroup", + "description": "Filter that identifies the source alerts to inhibit." + } + } + }, + "ListWebhookHistoryRequest": { + "type": "object", + "description": "Filter parameters for listing outbound webhook delivery history. The query is bounded by a required millisecond time window; use `search_after_ctx` for cursor-based pagination.", + "required": [ + "limit", + "start_time", + "end_time" + ], + "properties": { + "search_after_ctx": { + "type": "string", + "description": "Opaque cursor returned by a previous call for fetching the next page." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "description": "Page size." + }, + "asc": { + "type": "boolean", + "description": "Ascending order by `event_time` when true; otherwise descending." + }, + "orderby": { + "type": "string", + "enum": [ + "event_time" + ], + "description": "Sort field. Currently only `event_time` is supported." + }, + "ref_id": { + "type": "string", + "maxLength": 128, + "description": "Reference ID filter (incident or alert ID)." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "Filter by integration ID." + }, + "event_types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by event type values." + }, + "status": { + "type": "string", + "enum": [ + "success", + "failed" + ], + "description": "Filter by delivery status." + }, + "start_time": { + "type": "integer", + "format": "int64", + "minimum": 1000000000000, + "maximum": 9999999999999, + "description": "Window start time in Unix milliseconds." + }, + "end_time": { + "type": "integer", + "format": "int64", + "minimum": 1000000000000, + "maximum": 9999999999999, + "description": "Window end time in Unix milliseconds. Must be greater than `start_time`." + } + } + }, + "ListWebhookHistoryResponse": { + "type": "object", + "description": "Paginated webhook delivery history.", + "required": [ + "items", + "total", + "search_after_ctx" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookHistoryItem" + } + }, + "total": { + "type": "integer", + "description": "Total number of matching records." + }, + "search_after_ctx": { + "type": "string", + "description": "Cursor to pass as `search_after_ctx` to fetch the next page. Empty when no further pages are available." + } + } + }, + "WebhookHistoryItem": { + "type": "object", + "description": "A single webhook delivery attempt. Fields with `omitempty` are absent when zero-valued.", + "required": [ + "integration_id", + "event_id", + "webhook_type", + "event_type", + "endpoint", + "attempt", + "duration", + "status", + "status_code", + "event_time" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID that triggered the webhook." + }, + "event_id": { + "type": "string", + "description": "Unique event identifier for the delivery attempt." + }, + "webhook_type": { + "type": "string", + "description": "Source object kind. `incident` or `alert`." + }, + "event_type": { + "type": "string", + "description": "Event type (e.g. `created`, `acknowledged`, `closed`)." + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel ID associated with the event, when applicable." + }, + "ref_id": { + "type": "string", + "description": "Source object ID (incident ID or alert ID)." + }, + "request_headers": { + "type": "string", + "description": "Serialized outbound request headers." + }, + "request_body": { + "type": "string", + "description": "Outbound request body payload." + }, + "endpoint": { + "type": "string", + "description": "Destination URL." + }, + "attempt": { + "type": "integer", + "description": "Attempt sequence number." + }, + "duration": { + "type": "integer", + "description": "Total elapsed time of the attempt in milliseconds." + }, + "status": { + "type": "string", + "enum": [ + "success", + "failed" + ], + "description": "Delivery outcome." + }, + "status_code": { + "type": "integer", + "description": "HTTP status code returned by the destination." + }, + "error_message": { + "type": "string", + "description": "Error message when delivery failed." + }, + "response_headers": { + "type": "string", + "description": "Serialized response headers from the destination." + }, + "response_body": { + "type": "string", + "description": "Response body returned by the destination." + }, + "event_time": { + "type": "string", + "description": "Event time as a formatted timestamp string." + } + } + }, + "GetWebhookHistoryDetailRequest": { + "type": "object", + "description": "Lookup parameters for a single webhook delivery record.", + "required": [ + "event_id", + "integration_id" + ], + "properties": { + "event_id": { + "type": "string", + "description": "Event ID returned by `ListWebhookHistory`." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "Integration ID the event belongs to." + } + } + }, + "WebhookHistoryDetail": { + "type": "object", + "description": "Full detail for a webhook delivery attempt. Extends `WebhookHistoryItem` with human-friendly reference metadata resolved at query time.", + "required": [ + "integration_id", + "event_id", + "webhook_type", + "event_type", + "endpoint", + "attempt", + "duration", + "status", + "status_code", + "event_time" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID." + }, + "event_id": { + "type": "string", + "description": "Event ID." + }, + "webhook_type": { + "type": "string", + "description": "Source object kind. `incident` or `alert`." + }, + "event_type": { + "type": "string", + "description": "Event type." + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Channel ID when applicable." + }, + "ref_id": { + "type": "string", + "description": "Source object ID." + }, + "request_headers": { + "type": "string", + "description": "Serialized outbound request headers." + }, + "request_body": { + "type": "string", + "description": "Outbound request body payload." + }, + "endpoint": { + "type": "string", + "description": "Destination URL." + }, + "attempt": { + "type": "integer", + "description": "Attempt sequence number." + }, + "duration": { + "type": "integer", + "description": "Total elapsed time of the attempt in milliseconds." + }, + "status": { + "type": "string", + "enum": [ + "success", + "failed" + ], + "description": "Delivery outcome." + }, + "status_code": { + "type": "integer", + "description": "HTTP status code." + }, + "error_message": { + "type": "string", + "description": "Error message when delivery failed." + }, + "response_headers": { + "type": "string", + "description": "Serialized response headers." + }, + "response_body": { + "type": "string", + "description": "Response body." + }, + "event_time": { + "type": "string", + "description": "Event time as a formatted timestamp string." + }, + "ref_title": { + "type": "string", + "description": "Title of the source incident or alert, resolved at query time." + }, + "channel_name": { + "type": "string", + "description": "Name of the associated channel, resolved at query time." + } + } + }, + "ScheduleEmptyObject": { + "type": "object", + "description": "Empty response.", + "properties": {} + }, + "ScheduleSelfRequest": { + "type": "object", + "description": "Query parameters for listing the current user's schedules. Both start and end are Unix timestamps (seconds). If omitted they default to 0. The window must not exceed 30 days.", + "properties": { + "start": { + "type": "integer", + "format": "int64", + "description": "Window start (Unix seconds, 10 digits)." + }, + "end": { + "type": "integer", + "format": "int64", + "description": "Window end (Unix seconds, 10 digits). Must be within 30 days of start." + } + } + }, + "ScheduleIDResponse": { + "type": "object", + "description": "Schedule ID response returned after create.", + "required": [ + "schedule_id" + ], + "properties": { + "schedule_id": { + "type": "integer", + "format": "int64", + "description": "ID of the newly created schedule." + } + } + }, + "ScheduleIDsBodyRequest": { + "type": "object", + "description": "Request carrying a list of schedule IDs (used by delete/enable/disable).", + "required": [ + "schedule_ids" + ], + "properties": { + "schedule_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Schedule IDs to operate on." + } + } + }, + "ScheduleIDsRequest": { + "type": "object", + "description": "Request carrying a list of schedule IDs (used by batch info).", + "required": [ + "schedule_ids" + ], + "properties": { + "schedule_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Schedule ID list." + } + } + }, + "ScheduleInfoRequest": { + "type": "object", + "description": "Schedule detail request. start/end define the window for computed layers; the span must be less than 45 days.", + "required": [ + "schedule_id", + "start", + "end" + ], + "properties": { + "schedule_id": { + "type": "integer", + "format": "int64", + "description": "Schedule ID." + }, + "start": { + "type": "integer", + "format": "int64", + "description": "Preview start timestamp (Unix seconds, 10 digits)." + }, + "end": { + "type": "integer", + "format": "int64", + "description": "Preview end timestamp (Unix seconds, 10 digits)." + } + } + }, + "ScheduleMember": { + "type": "object", + "description": "Schedule group member reference.", + "required": [ + "role_id", + "person_ids" + ], + "properties": { + "role_id": { + "type": "integer", + "format": "int64", + "description": "Oncall role ID." + }, + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Person IDs in this slot." + } + } + }, + "ScheduleGroup": { + "type": "object", + "description": "Oncall group definition within a rotation layer.", + "required": [ + "group_name", + "name", + "members", + "start", + "end" + ], + "properties": { + "group_name": { + "type": "string", + "description": "Group display name." + }, + "name": { + "type": "string", + "description": "Legacy group name." + }, + "members": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleMember" + }, + "description": "Members of this group." + }, + "start": { + "type": "integer", + "format": "int64", + "description": "Group start timestamp (Unix seconds)." + }, + "end": { + "type": "integer", + "format": "int64", + "description": "Group end timestamp (Unix seconds)." + } + } + }, + "ScheduleRestrictPeriod": { + "type": "object", + "description": "Restrict window inside a rotation cycle.", + "required": [ + "restrict_start", + "restrict_end" + ], + "properties": { + "restrict_start": { + "type": "integer", + "format": "int64", + "description": "Start offset inside the rotation cycle." + }, + "restrict_end": { + "type": "integer", + "format": "int64", + "description": "End offset inside the rotation cycle." + } + } + }, + "ScheduleDayMask": { + "type": "object", + "description": "Day-of-week mask for a rotation layer.", + "properties": { + "repeat": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Weekday numbers (0 = Sunday) included in the rotation." + } + } + }, + "ScheduleLayer": { + "type": "object", + "description": "One rotation layer inside a schedule.", + "required": [ + "account_id", + "name", + "schedule_id", + "hidden", + "mode", + "weight", + "groups", + "rotation_duration", + "handoff_time", + "enable_time", + "expire_time", + "restrict_mode", + "restrict_start", + "restrict_end", + "restrict_periods", + "day_mask", + "create_at", + "create_by", + "update_at", + "update_by", + "fair_rotation", + "rotation_unit", + "rotation_value", + "mask_continuous_enabled" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." + }, + "name": { + "type": "string", + "description": "Layer internal name." + }, + "schedule_id": { + "type": "integer", + "format": "int64", + "description": "Parent schedule ID." + }, + "hidden": { + "type": "integer", + "description": "Whether the layer is hidden in the UI (0 = no, 1 = yes)." + }, + "mode": { + "type": "integer", + "description": "Layer mode: 0 = common rotation, 1 = override.", + "enum": [ + 0, + 1 + ] + }, + "weight": { + "type": "integer", + "description": "Layer weight for ordering." + }, + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleGroup" + }, + "description": "Oncall groups participating in the rotation." + }, + "rotation_duration": { + "type": "integer", + "format": "int64", + "description": "Rotation duration in seconds." + }, + "handoff_time": { + "type": "integer", + "format": "int64", + "description": "Handoff time inside the rotation cycle (seconds)." + }, + "enable_time": { + "type": "integer", + "format": "int64", + "description": "When the layer becomes effective (Unix seconds)." + }, + "expire_time": { + "type": "integer", + "format": "int64", + "description": "When the layer expires (Unix seconds, 0 means never)." + }, + "restrict_mode": { + "type": "integer", + "description": "Restriction mode: 0 = none, 1 = day, 2 = week.", + "enum": [ + 0, + 1, + 2 + ] + }, + "restrict_start": { + "type": "integer", + "format": "int64", + "description": "Legacy start offset inside the restriction window (seconds)." + }, + "restrict_end": { + "type": "integer", + "format": "int64", + "description": "Legacy end offset inside the restriction window (seconds)." + }, + "restrict_periods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleRestrictPeriod" + }, + "description": "Restriction windows inside each rotation cycle." + }, + "day_mask": { + "$ref": "#/components/schemas/ScheduleDayMask", + "description": "Day-of-week mask." + }, + "create_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (Unix seconds)." + }, + "create_by": { + "type": "integer", + "format": "int64", + "description": "Creator person ID." + }, + "update_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp (Unix seconds)." + }, + "update_by": { + "type": "integer", + "format": "int64", + "description": "Last updater person ID." + }, + "layer_name": { + "type": "string", + "description": "User-facing layer name." + }, + "fair_rotation": { + "type": "boolean", + "description": "Whether fair rotation is enabled." + }, + "layer_start": { + "type": "integer", + "format": "int64", + "description": "Layer start timestamp (Unix seconds)." + }, + "layer_end": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "description": "Layer end timestamp (Unix seconds). null means open-ended." + }, + "rotation_unit": { + "type": "string", + "description": "Rotation unit.", + "enum": [ + "hour", + "day", + "week", + "month" + ] + }, + "rotation_value": { + "type": "integer", + "format": "int64", + "description": "Rotation quantity (number of rotation_unit per cycle)." + }, + "mask_continuous_enabled": { + "type": "boolean", + "description": "Whether continuous masking is enabled." + } + } + }, + "ScheduleImNotifySettings": { + "type": "object", + "description": "Settings for an IM webhook notification channel.", + "required": [ + "token", + "alias", + "data_source_id", + "chat_ids", + "verify_token", + "sign_secret" + ], + "properties": { + "token": { + "type": "string", + "description": "Webhook token." + }, + "alias": { + "type": "string", + "description": "Channel alias." + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "Data source ID." + }, + "chat_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Chat IDs." + }, + "verify_token": { + "type": "string", + "description": "Verification token." + }, + "sign_secret": { + "type": "string", + "description": "Signature secret." + } + } + }, + "ScheduleImNotify": { + "type": "object", + "description": "IM webhook notification entry.", + "required": [ + "type", + "settings" + ], + "properties": { + "type": { + "type": "string", + "description": "IM provider type (for example feishu_app, dingtalk_app, wecom_app, teams_app, slack_app)." + }, + "settings": { + "$ref": "#/components/schemas/ScheduleImNotifySettings" + } + } + }, + "ScheduleFixedTimeNotifyInfo": { + "type": "object", + "description": "Fixed-time notification config.", + "required": [ + "cycle", + "start" + ], + "properties": { + "cycle": { + "type": "string", + "description": "Notification cycle." + }, + "start": { + "type": "string", + "description": "Notification start time within the cycle." + } + } + }, + "ScheduleNotifyBy": { + "type": "object", + "description": "Per-recipient notification preference.", + "required": [ + "follow_preference", + "personal_channels" + ], + "properties": { + "follow_preference": { + "type": "boolean", + "description": "Whether to follow each responder's personal notification preference." + }, + "personal_channels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Personal notification channel keys." + } + } + }, + "ScheduleNotify": { + "type": "object", + "description": "Notification configuration attached to a schedule.", + "required": [ + "fixed_time", + "by", + "webhooks" + ], + "properties": { + "advance_in_time": { + "type": "integer", + "format": "int64", + "description": "Advance notification lead time (seconds)." + }, + "fixed_time": { + "$ref": "#/components/schemas/ScheduleFixedTimeNotifyInfo" + }, + "by": { + "$ref": "#/components/schemas/ScheduleNotifyBy" + }, + "im": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Legacy IM-type to token map." + }, + "webhooks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleImNotify" + }, + "description": "IM webhook notification channels." + } + } + }, + "ScheduleCalculatedSchedule": { + "type": "object", + "description": "Computed shift inside a schedule layer.", + "required": [ + "start", + "end", + "group", + "index" + ], + "properties": { + "start": { + "type": "integer", + "format": "int64", + "description": "Shift start timestamp (Unix seconds)." + }, + "end": { + "type": "integer", + "format": "int64", + "description": "Shift end timestamp (Unix seconds)." + }, + "group": { + "$ref": "#/components/schemas/ScheduleGroup" + }, + "index": { + "type": "integer", + "description": "Index inside the rotation." + } + } + }, + "ScheduleCalculatedLayer": { + "type": "object", + "description": "Computed schedule for a single layer.", + "required": [ + "layer_name", + "name", + "mode", + "schedules" + ], + "properties": { + "layer_name": { + "type": "string", + "description": "Layer display name." + }, + "name": { + "type": "string", + "description": "Layer internal name." + }, + "mode": { + "type": "integer", + "description": "Layer mode: 0 = common rotation, 1 = override." + }, + "schedules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleCalculatedSchedule" + }, + "description": "Computed shifts." + } + } + }, + "ScheduleOncallGroup": { + "type": "object", + "description": "Snapshot of the currently or next on-call group.", + "required": [ + "start", + "end", + "group", + "update_at", + "weight", + "index" + ], + "properties": { + "start": { + "type": "integer", + "format": "int64", + "description": "Shift start timestamp (Unix seconds)." + }, + "end": { + "type": "integer", + "format": "int64", + "description": "Shift end timestamp (Unix seconds)." + }, + "group": { + "$ref": "#/components/schemas/ScheduleGroup" + }, + "update_at": { + "type": "integer", + "format": "int64", + "description": "Update timestamp (Unix seconds)." + }, + "weight": { + "type": "integer", + "description": "Layer weight the shift comes from." + }, + "index": { + "type": "integer", + "description": "Index inside the rotation." + } + } + }, + "ScheduleItem": { + "type": "object", + "description": "Full schedule detail returned by info/preview/list.", + "required": [ + "id", + "name", + "account_id", + "group_id", + "disabled", + "create_at", + "create_by", + "update_at", + "update_by", + "layers", + "schedule_layers", + "final_schedule", + "notify", + "schedule_id", + "schedule_name", + "team_id", + "description", + "layer_schedules", + "status", + "cur_oncall", + "next_oncall" + ], + "properties": { + "id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "description": "Schedule ID. null when returned from /schedule/preview." + }, + "name": { + "type": [ + "string", + "null" + ], + "description": "Schedule name (legacy field; mirrors schedule_name). null when returned from /schedule/preview." + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." + }, + "group_id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "description": "Legacy team/group ID. null when returned from /schedule/preview." + }, + "disabled": { + "type": [ + "integer", + "null" + ], + "description": "Disabled flag (0 = enabled, 1 = disabled). Deprecated. null when returned from /schedule/preview." + }, + "create_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (Unix seconds)." + }, + "create_by": { + "type": "integer", + "format": "int64", + "description": "Creator person ID." + }, + "update_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp (Unix seconds)." + }, + "update_by": { + "type": "integer", + "format": "int64", + "description": "Last updater person ID." + }, + "layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleLayer" + }, + "description": "Rotation layers defined on the schedule." + }, + "field": { + "type": "string", + "description": "Field name used by the legacy update-field endpoint." + }, + "schedule_layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleCalculatedLayer" + }, + "description": "Computed layers for the requested window." + }, + "final_schedule": { + "$ref": "#/components/schemas/ScheduleCalculatedLayer", + "description": "Collapsed final schedule across all layers." + }, + "start": { + "type": "integer", + "format": "int64", + "description": "Window start (Unix seconds)." + }, + "end": { + "type": "integer", + "format": "int64", + "description": "Window end (Unix seconds)." + }, + "notify": { + "$ref": "#/components/schemas/ScheduleNotify" + }, + "schedule_id": { + "type": "integer", + "format": "int64", + "description": "Schedule ID." + }, + "schedule_name": { + "type": [ + "string", + "null" + ], + "description": "Schedule display name. null when returned from /schedule/preview." + }, + "team_id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "description": "Owning team ID. null when returned from /schedule/preview." + }, + "description": { + "type": [ + "string", + "null" + ], + "description": "Schedule description. null when returned from /schedule/preview." + }, + "layer_schedules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleCalculatedLayer" + }, + "description": "Alias of schedule_layers returned for compatibility." + }, + "status": { + "type": [ + "integer", + "null" + ], + "description": "Legacy status flag. Deprecated. null when returned from /schedule/preview." + }, + "cur_oncall": { + "$ref": "#/components/schemas/ScheduleOncallGroup", + "description": "Current on-call group, or null when nobody is on-call." + }, + "next_oncall": { + "$ref": "#/components/schemas/ScheduleOncallGroup", + "description": "Next on-call group, or null when unknown." + } + } + }, + "ScheduleUpsertRequest": { + "type": "object", + "description": "Schedule create/update/preview request body. The server accepts the same shape as the schedule detail model; only the key fields are listed here. For update, set schedule_id. For preview, start and end are required.", + "properties": { + "schedule_id": { + "type": "integer", + "format": "int64", + "description": "Schedule ID. Required on update." + }, + "schedule_name": { + "type": "string", + "description": "Schedule display name. Max 40 characters.", + "maxLength": 40 + }, + "name": { + "type": "string", + "description": "Legacy schedule name field. Used when schedule_name is empty.", + "maxLength": 40 + }, + "description": { + "type": "string", + "description": "Schedule description. Max 500 characters.", + "maxLength": 500 + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID." + }, + "layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleLayer" + }, + "description": "Rotation layers." + }, + "notify": { + "$ref": "#/components/schemas/ScheduleNotify" + }, + "start": { + "type": "integer", + "format": "int64", + "description": "Preview window start (Unix seconds, 10 digits). Required for /schedule/preview." + }, + "end": { + "type": "integer", + "format": "int64", + "description": "Preview window end (Unix seconds, 10 digits). Required for /schedule/preview. Max 45 days after start." + } + } + }, + "ScheduleListRequest": { + "type": "object", + "description": "Schedule list request. limit defaults to 10 and is capped at 100; p defaults to 1. is_my_team and is_my_manage are mutually exclusive.", + "properties": { + "query": { + "type": "string", + "description": "Search keyword matched against schedule names." + }, + "p": { + "type": "integer", + "description": "Page number (1-indexed).", + "default": 1 + }, + "limit": { + "type": "integer", + "description": "Page size. Default 10, max 100.", + "default": 10, + "maximum": 100 + }, + "is_my_team": { + "type": "boolean", + "description": "Only return schedules whose owning team the current user belongs to." + }, + "is_my_manage": { + "type": "boolean", + "description": "Only return schedules created by the current user within their teams." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by team IDs." + }, + "start": { + "type": "integer", + "format": "int64", + "description": "When set together with end, computed layer schedules are returned. Span must be less than 45 days." + }, + "end": { + "type": "integer", + "format": "int64", + "description": "Window end timestamp (Unix seconds)." + } + } + }, + "ScheduleListResponse": { + "type": "object", + "description": "Schedule list response.", + "required": [ + "items", + "total" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleItem" + }, + "description": "Schedules on this page." + }, + "total": { + "type": "integer", + "format": "int64", + "description": "Total number of schedules matching the filters." + } + } + }, + "ScheduleSelfResponse": { + "type": "object", + "description": "Response of /schedule/self and /schedule/infos. Only the items field is populated.", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleItem" + }, + "description": "Schedules assigned to the current user (or matching the requested IDs)." + } + } + }, + "CalendarEmptyObject": { + "type": "object", + "description": "Empty response body.", + "properties": {} + }, + "CalendarCreateRequest": { + "type": "object", + "description": "Create calendar request. cal_name is required.", + "required": [ + "cal_name" + ], + "properties": { + "cal_name": { + "type": "string", + "description": "Calendar display name.", + "minLength": 1, + "maxLength": 39 + }, + "description": { + "type": "string", + "description": "Calendar description.", + "maxLength": 499 + }, + "timezone": { + "type": "string", + "description": "IANA timezone. Defaults to Asia/Shanghai when empty.", + "default": "Asia/Shanghai" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID. 0 means no team." + }, + "workdays": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0, + "maximum": 6 + }, + "description": "Workday numbers (0 = Sunday, 6 = Saturday)." + }, + "extra_cal_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Additional public-holiday calendar IDs to inherit events from (for example zh-cn.china.official)." + } + } + }, + "CalendarCreateResponse": { + "type": "object", + "description": "Create calendar response.", + "required": [ + "cal_id", + "cal_name" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "ID of the newly created calendar (format cal.)." + }, + "cal_name": { + "type": "string", + "description": "Calendar display name." + } + } + }, + "CalendarUpdateRequest": { + "type": "object", + "description": "Update calendar request. cal_id is required; all other fields are optional and only applied when provided.", + "required": [ + "cal_id" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "Calendar ID." + }, + "cal_name": { + "type": "string", + "description": "New calendar name.", + "minLength": 1, + "maxLength": 39 + }, + "description": { + "type": "string", + "description": "New description.", + "maxLength": 499 + }, + "timezone": { + "type": "string", + "description": "New IANA timezone." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "New owning team ID." + }, + "workdays": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0, + "maximum": 6 + }, + "description": "Workday numbers (0 = Sunday, 6 = Saturday)." + }, + "extra_cal_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Additional public-holiday calendar IDs to inherit events from." + } + } + }, + "CalendarIDRequest": { + "type": "object", + "description": "Request body carrying a calendar ID.", + "required": [ + "cal_id" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "Calendar ID." + } + } + }, + "CalendarItem": { + "type": "object", + "description": "Service calendar detail.", + "required": [ + "account_id", + "team_id", + "cal_id", + "cal_name", + "description", + "timezone", + "kind", + "created_at", + "updated_at", + "creator_id", + "updated_by", + "status" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "Account ID." + }, + "team_id": { + "type": "integer", + "format": "uint64", + "description": "Owning team ID (0 when not assigned)." + }, + "cal_id": { + "type": "string", + "description": "Calendar ID." + }, + "cal_name": { + "type": "string", + "description": "Calendar display name." + }, + "description": { + "type": "string", + "description": "Calendar description." + }, + "timezone": { + "type": "string", + "description": "IANA timezone." + }, + "kind": { + "type": "string", + "description": "Calendar kind.", + "enum": [ + "region.official.holiday", + "religion.holiday", + "personal" + ] + }, + "workdays": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0, + "maximum": 6 + }, + "description": "Workday numbers (0 = Sunday, 6 = Saturday)." + }, + "extra_cal_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Inherited public-holiday calendar IDs." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (Unix seconds)." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp (Unix seconds)." + }, + "creator_id": { + "type": "integer", + "format": "uint64", + "description": "Creator person ID." + }, + "updated_by": { + "type": "integer", + "format": "uint64", + "description": "Last updater person ID." + }, + "status": { + "type": "string", + "description": "Calendar status.", + "enum": [ + "enabled", + "deleted" + ] + } + } + }, + "CalendarListRequest": { + "type": "object", + "description": "Calendar list request. kind filters by calendar kind; no_locale disables locale filtering for public holiday calendars.", + "properties": { + "kind": { + "type": "string", + "description": "Calendar kind filter. Defaults to personal when empty.", + "enum": [ + "region.official.holiday", + "personal" + ] + }, + "no_locale": { + "type": "boolean", + "description": "Disable locale filtering when listing public-holiday calendars." + } + } + }, + "CalendarListResponse": { + "type": "object", + "description": "Calendar list response.", + "required": [ + "items", + "total" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CalendarItem" + }, + "description": "Calendar items." + }, + "total": { + "type": "integer", + "description": "Total number of calendars returned." + } + } + }, + "CalEventUpsertRequest": { + "type": "object", + "description": "Calendar event upsert request. Provide event_id to update an existing event; omit it to create a new one.", + "required": [ + "cal_id", + "summary", + "start_at", + "end_at", + "is_off" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "Calendar ID." + }, + "event_id": { + "type": "string", + "description": "Event ID. Omit when creating.", + "maxLength": 63 + }, + "summary": { + "type": "string", + "description": "Event summary.", + "minLength": 1, + "maxLength": 39 + }, + "description": { + "type": "string", + "description": "Event description.", + "maxLength": 499 + }, + "start_at": { + "type": "string", + "description": "Event start date in YYYY-MM-DD." + }, + "end_at": { + "type": "string", + "description": "Event end date in YYYY-MM-DD (exclusive)." + }, + "is_off": { + "type": "boolean", + "description": "Whether the event marks a non-working day. true = day off, false = working day override." + } + } + }, + "CalEventUpsertResponse": { + "type": "object", + "description": "Response returned by /calendar/event/upsert.", + "required": [ + "cal_id", + "event_id", + "summary" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "Calendar ID." + }, + "event_id": { + "type": "string", + "description": "Event ID (existing or newly generated)." + }, + "summary": { + "type": "string", + "description": "Event summary." + } + } + }, + "CalEventIDRequest": { + "type": "object", + "description": "Calendar event delete request.", + "required": [ + "cal_id", + "event_id" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "Calendar ID." + }, + "event_id": { + "type": "string", + "description": "Event ID." + } + } + }, + "CalEventListRequest": { + "type": "object", + "description": "Calendar event list request. When day > 0 month must also be specified. month and day accept 0 to mean \"not filtered\".", + "required": [ + "cal_id" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "Calendar ID." + }, + "year": { + "type": "integer", + "description": "Year. Defaults to the current year when omitted.", + "minimum": 2023 + }, + "month": { + "type": "integer", + "description": "Month (1-12). 0 means no month filter.", + "minimum": 0, + "maximum": 12 + }, + "day": { + "type": "integer", + "description": "Day (1-31). 0 means no day filter.", + "minimum": 0, + "maximum": 31 + } + } + }, + "CalEventItem": { + "type": "object", + "description": "Calendar event entry.", + "required": [ + "cal_id", + "event_id", + "summary", + "description", + "start_at", + "end_at", + "is_off", + "created_at", + "updated_at" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "Account ID. Only present for private events." + }, + "creator_id": { + "type": "integer", + "format": "uint64", + "description": "Creator person ID. Only present for private events." + }, + "cal_id": { + "type": "string", + "description": "Calendar ID. For public events this is a locale key such as zh-cn.china.official." + }, + "event_id": { + "type": "string", + "description": "Event ID." + }, + "summary": { + "type": "string", + "description": "Event summary." + }, + "description": { + "type": "string", + "description": "Event description." + }, + "start_at": { + "type": "string", + "description": "Event start date (YYYY-MM-DD)." + }, + "end_at": { + "type": "string", + "description": "Event end date (YYYY-MM-DD, exclusive)." + }, + "is_off": { + "type": "boolean", + "description": "Whether the event marks a non-working day." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (Unix seconds)." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp (Unix seconds)." + } + } + }, + "CalEventListResponse": { + "type": "object", + "description": "Calendar event list response.", + "required": [ + "items", + "total" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CalEventItem" + }, + "description": "Calendar events sorted by start_at." + }, + "total": { + "type": "integer", + "description": "Total number of events returned." + } + } + }, + "TemplateItem": { + "type": "object", + "description": "A notification template. Each channel field holds the template source string for that delivery channel; an empty string means 'no custom template for that channel'.", + "required": [ + "account_id", + "team_id", + "template_id", + "template_name", + "description", + "email", + "sms", + "voice", + "dingtalk", + "wecom", + "feishu", + "feishu_app", + "dingtalk_app", + "wecom_app", + "slack_app", + "teams_app", + "telegram", + "slack", + "zoom", + "status", + "creator_id", + "updated_by", + "created_at", + "updated_at" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "ID of the owning account." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "ID of the team this template is scoped to, or 0 for account-wide." + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Template ID.", + "example": "6605a1b2c3d4e5f6a7b8c9d0" + }, + "template_name": { + "type": "string", + "description": "Unique template name within the account." + }, + "description": { + "type": "string", + "description": "Free-form description." + }, + "email": { + "type": "string", + "description": "Email body template source (Go `html/template` syntax)." + }, + "sms": { + "type": "string", + "description": "SMS template source (Go `text/template` syntax)." + }, + "voice": { + "type": "string", + "description": "Voice call script template source." + }, + "dingtalk": { + "type": "string", + "description": "DingTalk robot message template source." + }, + "wecom": { + "type": "string", + "description": "WeCom robot message template source." + }, + "feishu": { + "type": "string", + "description": "Feishu robot message template source." + }, + "feishu_app": { + "type": "string", + "description": "Feishu app message template source." + }, + "dingtalk_app": { + "type": "string", + "description": "DingTalk app message template source." + }, + "wecom_app": { + "type": "string", + "description": "WeCom app message template source." + }, + "slack_app": { + "type": "string", + "description": "Slack app message template source." + }, + "teams_app": { + "type": "string", + "description": "Microsoft Teams app message template source." + }, + "telegram": { + "type": "string", + "description": "Telegram bot message template source." + }, + "slack": { + "type": "string", + "description": "Slack robot message template source." + }, + "zoom": { + "type": "string", + "description": "Zoom bot message template source." + }, + "status": { + "type": "string", + "description": "Template lifecycle status.", + "enum": [ + "enabled", + "disabled", + "deleted" + ] + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "Member ID of the creator." + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "Member ID of the last editor." + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "Unix epoch seconds the template was soft-deleted. Absent (omitempty) when the template is live." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Unix epoch seconds the template was created." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Unix epoch seconds the template was last updated." + } + } + }, + "TemplateIDRequest": { + "type": "object", + "required": [ + "template_id" + ], + "properties": { + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Target template ID. Pass `000000000000000000000001` to address the built-in preset.", + "example": "6605a1b2c3d4e5f6a7b8c9d0" + } + } + }, + "TemplateListRequest": { + "type": "object", + "description": "Paginated list filters. Defaults: p=1, limit=20. Max limit=100.", + "properties": { + "p": { + "type": "integer", + "description": "Page number, starting at 1.", + "minimum": 1, + "default": 1, + "example": 1 + }, + "limit": { + "type": "integer", + "description": "Page size. Capped at 100.", + "minimum": 1, + "maximum": 100, + "default": 20, + "example": 20 + }, + "orderby": { + "type": "string", + "description": "Sort field.", + "enum": [ + "created_at", + "updated_at" + ] + }, + "asc": { + "type": "boolean", + "description": "Ascending sort order.", + "default": false + }, + "is_my_team": { + "type": "boolean", + "description": "When true, only return templates scoped to teams the caller belongs to.", + "default": false + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by specific team IDs." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "Filter by creator member ID." + }, + "query": { + "type": "string", + "description": "Regex or substring match on template_name." + } + } + }, + "TemplateListResponse": { + "type": "object", + "description": "Paginated template list.", + "required": [ + "total", + "has_next_page", + "items" + ], + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total number of templates matching the filter, across all pages.", + "example": 47 + }, + "has_next_page": { + "type": "boolean", + "description": "True if another page exists after the returned one.", + "example": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TemplateItem" + } + } + } + }, + "TemplateCreateRequest": { + "type": "object", + "description": "Create a new notification template.", + "required": [ + "template_name" + ], + "properties": { + "team_id": { + "type": "integer", + "format": "int64", + "description": "Team scope. 0 for account-wide.", + "default": 0 + }, + "template_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Template name, unique per account. 1–39 characters.", + "example": "Prod incident default" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Free-form description. Up to 500 characters." + }, + "email": { + "type": "string", + "description": "Email body template source (Go `html/template` syntax)." + }, + "sms": { + "type": "string", + "description": "SMS template source (Go `text/template` syntax)." + }, + "voice": { + "type": "string", + "description": "Voice call script template source." + }, + "dingtalk": { + "type": "string", + "description": "DingTalk robot message template source." + }, + "wecom": { + "type": "string", + "description": "WeCom robot message template source." + }, + "feishu": { + "type": "string", + "description": "Feishu robot message template source." + }, + "feishu_app": { + "type": "string", + "description": "Feishu app message template source." + }, + "dingtalk_app": { + "type": "string", + "description": "DingTalk app message template source." + }, + "wecom_app": { + "type": "string", + "description": "WeCom app message template source." + }, + "slack_app": { + "type": "string", + "description": "Slack app message template source." + }, + "teams_app": { + "type": "string", + "description": "Microsoft Teams app message template source." + }, + "telegram": { + "type": "string", + "description": "Telegram bot message template source." + }, + "slack": { + "type": "string", + "description": "Slack robot message template source." + }, + "zoom": { + "type": "string", + "description": "Zoom bot message template source." + } + } + }, + "TemplateCreateResponse": { + "type": "object", + "required": [ + "template_id", + "template_name" + ], + "properties": { + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Newly created template ID.", + "example": "6605a1b2c3d4e5f6a7b8c9d0" + }, + "template_name": { + "type": "string", + "description": "Template name echoed from the request.", + "example": "Prod incident default" + } + } + }, + "TemplateUpdateRequest": { + "type": "object", + "description": "Update an existing template.", + "required": [ + "template_id", + "template_name" + ], + "properties": { + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Target template ID.", + "example": "6605a1b2c3d4e5f6a7b8c9d0" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Team scope. 0 for account-wide.", + "default": 0 + }, + "template_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Template name. 1–39 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Free-form description. Up to 500 characters." + }, + "email": { + "type": "string", + "description": "Email body template source (Go `html/template` syntax)." + }, + "sms": { + "type": "string", + "description": "SMS template source (Go `text/template` syntax)." + }, + "voice": { + "type": "string", + "description": "Voice call script template source." + }, + "dingtalk": { + "type": "string", + "description": "DingTalk robot message template source." + }, + "wecom": { + "type": "string", + "description": "WeCom robot message template source." + }, + "feishu": { + "type": "string", + "description": "Feishu robot message template source." + }, + "feishu_app": { + "type": "string", + "description": "Feishu app message template source." + }, + "dingtalk_app": { + "type": "string", + "description": "DingTalk app message template source." + }, + "wecom_app": { + "type": "string", + "description": "WeCom app message template source." + }, + "slack_app": { + "type": "string", + "description": "Slack app message template source." + }, + "teams_app": { + "type": "string", + "description": "Microsoft Teams app message template source." + }, + "telegram": { + "type": "string", + "description": "Telegram bot message template source." + }, + "slack": { + "type": "string", + "description": "Slack robot message template source." + }, + "zoom": { + "type": "string", + "description": "Zoom bot message template source." + } + } + }, + "CsvFileResponse": { + "type": "string", + "description": "CSV file content returned as an attachment download." + }, + "EnrichmentInfoRequest": { + "type": "object", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "Integration ID to query enrichment rules for. Must be greater than 0." + } + } + }, + "EnrichmentListRequest": { + "type": "object", + "required": [ + "integration_ids" + ], + "properties": { + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "List of integration IDs to query." + } + } + }, + "EnrichmentUpsertRequest": { + "type": "object", + "required": [ + "integration_id", + "rules" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID to configure enrichment rules for." + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnrichRule" + }, + "description": "Ordered list of enrichment rules. Replaces all existing rules." + } + } + }, + "EnrichRule": { + "type": "object", + "required": [ + "kind", + "settings" + ], + "description": "An enrichment rule with an optional condition and type-specific settings.", + "properties": { + "kind": { + "type": "string", + "enum": [ + "extraction", + "composition", + "mapping", + "drop" + ], + "description": "Rule type. `extraction` extracts a label via regex or GJson. `composition` builds a label from a template. `mapping` looks up values from a schema or API. `drop` removes labels." + }, + "if": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnrichFilter" + }, + "description": "Optional AND-filter list. The rule is skipped if the condition does not match." + }, + "settings": { + "description": "Rule-kind–specific settings. The shape depends on `kind`.", + "discriminator": { + "propertyName": "kind", + "mapping": { + "extraction": "#/components/schemas/ErsExtraction", + "composition": "#/components/schemas/ErsComposition", + "mapping": "#/components/schemas/ErsMapping", + "drop": "#/components/schemas/ErsDrop" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/ErsExtraction" + }, + { + "$ref": "#/components/schemas/ErsComposition" + }, + { + "$ref": "#/components/schemas/ErsMapping" + }, + { + "$ref": "#/components/schemas/ErsDrop" + } + ] + } + } + }, + "ErsExtraction": { + "type": "object", + "title": "extraction", + "required": [ + "source_field", + "result_label" + ], + "properties": { + "source_field": { + "type": "string", + "description": "Source field to extract from. Must be `title`, `description`, or a label key prefixed with `labels.` (e.g. `labels.env`)." + }, + "result_label": { + "type": "string", + "description": "Destination label key to write the extracted value into. Must match `^[a-z][a-z0-9_]{0,62}$`." + }, + "pattern": { + "type": "string", + "description": "RE2 regular expression. Use a named capture group `(?P...)` to extract a sub-match; without a named group the full match is used. Mutually exclusive with `g_json`." + }, + "g_json": { + "type": "string", + "description": "GJson path expression used to extract a value from a JSON-encoded field. Mutually exclusive with `pattern`." + }, + "override": { + "type": "boolean", + "description": "When `true`, overwrite the label if it already exists. Defaults to `false`." + } + } + }, + "ErsComposition": { + "type": "object", + "title": "composition", + "required": [ + "result_label", + "template" + ], + "properties": { + "result_label": { + "type": "string", + "description": "Destination label key to write the composed value into. Must match `^[a-z][a-z0-9_]{0,62}$`." + }, + "template": { + "type": "string", + "maxLength": 500, + "description": "Go `text/template` string. Alert fields are available as `{{.title}}`, `{{.description}}`, and `{{.labels.key}}`. Example: `{{.labels.region}}-{{.labels.env}}`." + }, + "override": { + "type": "boolean", + "description": "When `true`, overwrite the label if it already exists. Defaults to `false`." + } + } + }, + "ErsMapping": { + "type": "object", + "title": "mapping", + "required": [ + "result_labels" + ], + "properties": { + "result_labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Label keys to populate from the mapping lookup result." + }, + "mapping_type": { + "type": "string", + "enum": [ + "schema", + "api" + ], + "default": "schema", + "description": "Mapping source type. `schema` uses a mapping schema table; `api` calls an external HTTP API." + }, + "schema_id": { + "type": "string", + "description": "Mapping schema ID (MongoDB ObjectID hex). Required when `mapping_type` is `schema`." + }, + "api_id": { + "type": "string", + "description": "Mapping API ID (MongoDB ObjectID hex). Required when `mapping_type` is `api`." + }, + "override": { + "type": "boolean", + "description": "When `true`, overwrite labels that already exist. Defaults to `false`." + } + } + }, + "ErsDrop": { + "type": "object", + "title": "drop", + "required": [ + "drop_labels" + ], + "properties": { + "drop_labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of label keys to remove from the alert." + } + } + }, + "EnrichFilter": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "description": "A single label filter condition.", + "properties": { + "key": { + "type": "string", + "description": "Alert label key." + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "Match operator. `IN` matches when any value matches; `NOTIN` matches when none of the values match." + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Values to match against." + } + } + }, + "EnrichmentItem": { + "type": "object", + "description": "Enrichment rule set for an integration.", + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID." + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnrichRule" + }, + "description": "Ordered enrichment rules." + }, + "status": { + "type": "string", + "description": "Rule set status." + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "Last updater member ID." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "Creator member ID." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp, Unix seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp, Unix seconds." + } + }, + "required": [ + "integration_id", + "rules", + "status", + "updated_by", + "creator_id", + "created_at", + "updated_at" + ] + }, + "EnrichmentListResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnrichmentItem" + }, + "description": "Enrichment rule sets." + } + }, + "required": [ + "items" + ] + }, + "MappingSchemaIDRequest": { + "type": "object", + "required": [ + "schema_id" + ], + "properties": { + "schema_id": { + "type": "string", + "description": "Mapping schema ID (MongoDB ObjectID hex)." + } + } + }, + "MappingSchemaCreateRequest": { + "type": "object", + "required": [ + "schema_name", + "source_labels", + "result_labels" + ], + "properties": { + "schema_name": { + "type": "string", + "maxLength": 39, + "description": "Unique schema name (max 39 chars)." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Optional description (max 500 chars)." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID. `0` means no team." + }, + "source_labels": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 3, + "description": "Lookup key label names (1–3). Must not overlap with `result_labels`." + }, + "result_labels": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 10, + "description": "Output label names (1–10). Must not overlap with `source_labels`." + } + } + }, + "MappingSchemaCreateResponse": { + "type": "object", + "properties": { + "schema_id": { + "type": "string", + "description": "Created schema ID (MongoDB ObjectID hex)." + }, + "schema_name": { + "type": "string", + "description": "Schema name." + } + }, + "required": [ + "schema_id", + "schema_name" + ] + }, + "MappingSchemaUpdateRequest": { + "type": "object", + "required": [ + "schema_id" + ], + "properties": { + "schema_id": { + "type": "string", + "description": "Schema ID (MongoDB ObjectID hex)." + }, + "schema_name": { + "type": "string", + "maxLength": 39, + "description": "New schema name (max 39 chars)." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "New description (max 500 chars)." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "New owning team ID. `0` removes the team association." + } + } + }, + "MappingSchemaItem": { + "type": "object", + "description": "Mapping schema definition.", + "properties": { + "schema_id": { + "type": "string", + "description": "Schema ID (MongoDB ObjectID hex)." + }, + "schema_name": { + "type": "string", + "description": "Schema name." + }, + "description": { + "type": "string", + "description": "Schema description." + }, + "source_labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Lookup key label names." + }, + "result_labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Output label names." + }, + "status": { + "type": "string", + "description": "Schema status." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "Creator member ID." + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "Last updater member ID." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp, Unix seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp, Unix seconds." + } + }, + "required": [ + "schema_id", + "schema_name", + "description", + "source_labels", + "result_labels", + "status", + "team_id", + "updated_by", + "creator_id" + ] + }, + "MappingSchemaListResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total schema count." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MappingSchemaItem" + }, + "description": "Mapping schemas." + } + }, + "required": [ + "total", + "items" + ] + }, + "MappingDataListRequest": { + "type": "object", + "required": [ + "schema_id" + ], + "properties": { + "schema_id": { + "type": "string", + "description": "Mapping schema ID (MongoDB ObjectID hex)." + }, + "query": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Exact-match filter on source label values. All source labels must be provided if any are specified." + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "Sort field." + }, + "asc": { + "type": "boolean", + "description": "Sort ascending when `true`." + }, + "p": { + "type": "integer", + "format": "int64", + "description": "Page number (1-based). Used for offset-based pagination." + }, + "limit": { + "type": "integer", + "format": "int64", + "description": "Page size (1–100, default 20)." + }, + "search_after_ctx": { + "type": "string", + "description": "Opaque cursor token for cursor-based pagination." + } + } + }, + "MappingDataItem": { + "type": "object", + "description": "A single mapping data row.", + "properties": { + "key": { + "type": "string", + "description": "Composite key derived from source label values." + }, + "fields": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "All label key-value pairs for this row." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp, Unix seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp, Unix seconds." + } + } + }, + "MappingDataListResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MappingDataItem" + }, + "description": "Data rows." + }, + "total": { + "type": "integer", + "format": "int64", + "description": "Total matching rows." + }, + "has_next_page": { + "type": "boolean", + "description": "Whether more pages exist." + }, + "search_after_ctx": { + "type": "string", + "description": "Cursor token for the next page." + } + }, + "required": [ + "items", + "total", + "has_next_page" + ] + }, + "MappingDataUpsertRequest": { + "type": "object", + "required": [ + "schema_id", + "docs" + ], + "properties": { + "schema_id": { + "type": "string", + "description": "Mapping schema ID (MongoDB ObjectID hex)." + }, + "docs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxItems": 1000, + "description": "Rows to insert or update. Each row must include all source and result labels." + } + } + }, + "MappingDataUpsertResponse": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Composite keys of upserted rows." + } + }, + "required": [ + "keys" + ] + }, + "MappingDataDeleteRequest": { + "type": "object", + "required": [ + "schema_id", + "keys" + ], + "properties": { + "schema_id": { + "type": "string", + "description": "Mapping schema ID (MongoDB ObjectID hex)." + }, + "keys": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 100, + "description": "Keys of rows to delete." + } + } + }, + "MappingDataUploadRequest": { + "type": "object", + "description": "Multipart form-data upload request. `schema_id` is passed as a query parameter; `file` is the CSV file field.", + "properties": { + "schema_id": { + "type": "string", + "description": "Mapping schema ID (query parameter)." + }, + "file": { + "type": "string", + "format": "binary", + "description": "CSV file to upload." + } + } + }, + "MappingAPIIDRequest": { + "type": "object", + "required": [ + "api_id" + ], + "properties": { + "api_id": { + "type": "string", + "description": "Mapping API ID (MongoDB ObjectID hex)." + } + } + }, + "MappingAPICreateRequest": { + "type": "object", + "required": [ + "api_name", + "url" + ], + "properties": { + "api_name": { + "type": "string", + "maxLength": 199, + "description": "Unique API name (max 199 chars)." + }, + "description": { + "type": "string", + "description": "Optional description." + }, + "url": { + "type": "string", + "format": "uri", + "maxLength": 500, + "description": "HTTP/HTTPS endpoint URL (max 500 chars)." + }, + "insecure_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate verification. Default `false`." + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom HTTP request headers." + }, + "timeout": { + "type": "integer", + "description": "Request timeout in seconds (1–3). Default 2." + }, + "retry_count": { + "type": "integer", + "description": "Number of retries on failure (0–1). Default 0." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID." + } + } + }, + "MappingAPICreateResponse": { + "type": "object", + "properties": { + "api_id": { + "type": "string", + "description": "Created API ID (MongoDB ObjectID hex)." + }, + "api_name": { + "type": "string", + "description": "API name." + } + }, + "required": [ + "api_id", + "api_name" + ] + }, + "MappingAPIUpdateRequest": { + "type": "object", + "required": [ + "api_id" + ], + "properties": { + "api_id": { + "type": "string", + "description": "Mapping API ID (MongoDB ObjectID hex)." + }, + "api_name": { + "type": "string", + "maxLength": 199, + "description": "New API name (max 199 chars)." + }, + "description": { + "type": "string", + "description": "New description." + }, + "url": { + "type": "string", + "format": "uri", + "maxLength": 500, + "description": "New endpoint URL (max 500 chars)." + }, + "insecure_skip_verify": { + "type": "boolean", + "description": "New TLS skip-verify setting." + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "New headers map (replaces existing)." + }, + "timeout": { + "type": "integer", + "description": "New timeout in seconds." + }, + "retry_count": { + "type": "integer", + "description": "New retry count." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "New owning team ID." + } + } + }, + "MappingAPIItem": { + "type": "object", + "description": "Mapping API configuration.", + "properties": { + "api_id": { + "type": "string", + "description": "API ID (MongoDB ObjectID hex)." + }, + "api_name": { + "type": "string", + "description": "API name." + }, + "description": { + "type": "string", + "description": "Description." + }, + "url": { + "type": "string", + "description": "Endpoint URL." + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom request headers." + }, + "timeout": { + "type": "integer", + "description": "Request timeout in seconds." + }, + "retry_count": { + "type": "integer", + "description": "Retry count." + }, + "insecure_skip_verify": { + "type": "boolean", + "description": "Whether TLS verification is skipped." + }, + "status": { + "type": "string", + "description": "API status." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID." + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "Creator member ID." + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "Last updater member ID." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp, Unix seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp, Unix seconds." + } + }, + "required": [ + "api_id", + "api_name", + "description", + "url", + "headers", + "timeout", + "retry_count", + "insecure_skip_verify", + "status", + "team_id", + "updated_by", + "creator_id" + ] + }, + "MappingAPIListResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total API count." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MappingAPIItem" + }, + "description": "Mapping APIs." + } + }, + "required": [ + "total", + "items" + ] + }, + "InsightFilter": { + "type": "object", + "description": "Shared filter envelope for insight and export endpoints. Severities accept up to 3 values; team/channel/responder/incident filters accept up to 100 IDs each. The time range cannot exceed one year.", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "Start time, Unix seconds. Must be greater than 0." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "End time, Unix seconds. Must be greater than `start_time`." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by team IDs. At most 100 entries." + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by channel IDs. At most 100 entries." + }, + "responder_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by responder person IDs. At most 100 entries." + }, + "severities": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ] + }, + "description": "Filter by severity. At most 3 entries." + }, + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "description": "Filter by incident IDs (MongoDB ObjectIDs). At most 100 entries." + }, + "query": { + "type": "string", + "description": "Full-text query applied to incident title and description." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Label filters (exact match)." + }, + "fields": { + "type": "object", + "additionalProperties": true, + "description": "Custom-field filters (exact match)." + }, + "orderby": { + "type": "string", + "enum": [ + "created_at" + ], + "description": "Field to sort the underlying incident set by." + }, + "asc": { + "type": "boolean", + "description": "Sort ascending when `true`, descending otherwise." + }, + "is_my_team": { + "type": "boolean", + "description": "Restrict results to teams the caller belongs to. When true and the caller has no teams, the result set is empty." + }, + "time_zone": { + "type": "string", + "description": "IANA time zone name used to interpret the time range (e.g. `Asia/Shanghai`). Defaults to the account time zone." + }, + "seconds_to_close_from": { + "type": "integer", + "format": "int64", + "description": "Lower bound (inclusive) on time-to-close, in seconds." + }, + "seconds_to_close_to": { + "type": "integer", + "format": "int64", + "description": "Upper bound (exclusive) on time-to-close, in seconds. Must be greater than `seconds_to_close_from` when both are set." + }, + "seconds_to_ack_from": { + "type": "integer", + "format": "int64", + "description": "Lower bound (inclusive) on time-to-acknowledge, in seconds." + }, + "seconds_to_ack_to": { + "type": "integer", + "format": "int64", + "description": "Upper bound (exclusive) on time-to-acknowledge, in seconds. Must be greater than `seconds_to_ack_from` when both are set." + }, + "export_fields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Subset of CSV column keys to include in the export. At most 50 entries. Only used by the export endpoints." + }, + "description_html_to_text": { + "type": "boolean", + "description": "Strip HTML markup from the description column when exporting." + } + } + }, + "InsightQueryRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightFilter" + }, + { + "type": "object", + "description": "Insight dimension-aggregation request. Extends InsightFilter with aggregation controls.", + "properties": { + "split_hours": { + "type": "boolean", + "description": "When true, metrics are split into `work`/`sleep`/`off` hour buckets." + }, + "aggregate_unit": { + "type": "string", + "enum": [ + "day", + "week", + "month" + ], + "description": "Aggregate metrics into time buckets. When set, the time range must cover at least 24 hours; `day` additionally caps the range at 31 days." + } + } + } + ] + }, + "InsightIncidentListRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightFilter" + }, + { + "type": "object", + "description": "Paged incident list request. Extends InsightFilter with pagination.", + "properties": { + "p": { + "type": "integer", + "minimum": 1, + "default": 1, + "description": "Page number, starting at 1. Defaults to 1." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 20, + "description": "Page size, between 1 and 100. Defaults to 20." + }, + "search_after_ctx": { + "type": "string", + "description": "Cursor token returned by a previous page. Pass it back to fetch the next page." + } + } + } + ] + }, + "InsightIncidentExportRequest": { + "$ref": "#/components/schemas/InsightFilter" + }, + "InsightTopkAlertByLabelRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightQueryRequest" + }, + { + "type": "object", + "required": [ + "label" + ], + "properties": { + "label": { + "type": "string", + "enum": [ + "check", + "resource" + ], + "description": "Dimension to aggregate by." + }, + "k": { + "type": "integer", + "description": "Number of top entries to return, between 1 and 100." + }, + "orderby": { + "type": "string", + "enum": [ + "total_alert_cnt", + "total_alert_event_cnt" + ], + "description": "Field to sort results by." + }, + "asc": { + "type": "boolean", + "description": "Sort ascending when `true`, descending otherwise." + } + } + } + ] + }, + "MetricsBase": { + "type": "object", + "description": "Shared dimension identifiers attached to every aggregated insight row.", + "properties": { + "hours": { + "type": "string", + "enum": [ + "work", + "sleep", + "off" + ], + "description": "Hour bucket when `split_hours` is enabled." + }, + "ts": { + "type": "integer", + "format": "int64", + "description": "Aggregation bucket start time, Unix seconds. Present when `aggregate_unit` is used." + }, + "channel_id": { + "type": "integer", + "format": "int64" + }, + "team_id": { + "type": "integer", + "format": "int64" + }, + "responder_id": { + "type": "integer", + "format": "int64" + }, + "account_id": { + "type": "integer", + "format": "int64" + }, + "team_name": { + "type": "string" + }, + "channel_name": { + "type": "string" + }, + "responder_name": { + "type": "string" + } + } + }, + "DimensionInsightItem": { + "allOf": [ + { + "$ref": "#/components/schemas/MetricsBase" + }, + { + "type": "object", + "description": "Aggregated incident + alert metrics for an account/team/channel bucket.", + "properties": { + "total_incident_cnt": { + "type": "integer", + "format": "int64" + }, + "total_incidents_acknowledged": { + "type": "integer", + "format": "int64" + }, + "total_incidents_closed": { + "type": "integer", + "format": "int64" + }, + "total_incidents_auto_closed": { + "type": "integer", + "format": "int64" + }, + "total_incidents_manually_closed": { + "type": "integer", + "format": "int64" + }, + "total_incidents_timeout_closed": { + "type": "integer", + "format": "int64" + }, + "total_incidents_escalated": { + "type": "integer", + "format": "int64" + }, + "total_incidents_manually_escalated": { + "type": "integer", + "format": "int64" + }, + "total_incidents_timeout_escalated": { + "type": "integer", + "format": "int64" + }, + "total_incidents_reassigned": { + "type": "integer", + "format": "int64" + }, + "total_interruptions": { + "type": "integer", + "format": "int64" + }, + "total_notifications": { + "type": "integer", + "format": "int64" + }, + "total_engaged_seconds": { + "type": "integer", + "format": "int64" + }, + "total_seconds_to_ack": { + "type": "integer", + "format": "int64" + }, + "total_seconds_to_close": { + "type": "integer", + "format": "int64" + }, + "mean_seconds_to_ack": { + "type": "number", + "format": "double" + }, + "mean_seconds_to_close": { + "type": "number", + "format": "double" + }, + "noise_reduction_pct": { + "type": "number", + "format": "double" + }, + "acknowledgement_pct": { + "type": "number", + "format": "double" + }, + "total_alert_cnt": { + "type": "integer", + "format": "int64" + }, + "total_alert_event_cnt": { + "type": "integer", + "format": "int64" + } + } + } + ] + }, + "ResponderInsightItem": { + "allOf": [ + { + "$ref": "#/components/schemas/MetricsBase" + }, + { + "type": "object", + "description": "Aggregated incident metrics for a single responder.", + "properties": { + "total_incident_cnt": { + "type": "integer", + "format": "int64" + }, + "total_incidents_acknowledged": { + "type": "integer", + "format": "int64" + }, + "total_incidents_reassigned": { + "type": "integer", + "format": "int64" + }, + "total_incidents_escalated": { + "type": "integer", + "format": "int64" + }, + "total_incidents_timeout_escalated": { + "type": "integer", + "format": "int64" + }, + "total_incidents_manually_escalated": { + "type": "integer", + "format": "int64" + }, + "total_interruptions": { + "type": "integer", + "format": "int64" + }, + "total_notifications": { + "type": "integer", + "format": "int64" + }, + "total_engaged_seconds": { + "type": "integer", + "format": "int64" + }, + "total_seconds_to_ack": { + "type": "integer", + "format": "int64" + }, + "mean_seconds_to_ack": { + "type": "number", + "format": "double" + }, + "acknowledgement_pct": { + "type": "number", + "format": "double" + } + } + } + ] + }, + "DimensionInsightResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DimensionInsightItem" + } + } + } + }, + "ResponderInsightResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResponderInsightItem" + } + } + } + }, + "IncidentRawItem": { + "type": "object", + "description": "Raw incident row returned by the analytics incident list, with per-incident handling metrics attached.", + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "team_id": { + "type": "integer", + "format": "int64" + }, + "team_name": { + "type": "string" + }, + "channel_id": { + "type": "integer", + "format": "int64" + }, + "channel_name": { + "type": "string" + }, + "progress": { + "type": "string", + "description": "Incident progress state (e.g. `Triggered`, `Acknowledged`, `Closed`)." + }, + "severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ] + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "closed_by": { + "type": "string", + "enum": [ + "auto", + "timeout", + "manually" + ] + }, + "seconds_to_ack": { + "type": "integer", + "format": "int64" + }, + "seconds_to_close": { + "type": "integer", + "format": "int64" + }, + "engaged_seconds": { + "type": "integer", + "format": "int64" + }, + "hours": { + "type": "string" + }, + "responders": { + "type": "array", + "items": { + "type": "object", + "description": "Responder entry (see Incident module for full shape)." + } + }, + "assigned_to": { + "type": "object", + "description": "Current assignment target for the incident.", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs assigned directly to this incident." + }, + "escalate_rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Escalation rule ID (MongoDB ObjectID) driving the assignment." + }, + "escalate_rule_name": { + "type": "string", + "description": "Display name of the escalation rule." + }, + "layer_idx": { + "type": "integer", + "description": "Current level index within the escalation rule." + }, + "type": { + "type": "string", + "enum": [ + "assign", + "reassign", + "escalate", + "reopen" + ], + "description": "Assignment type." + }, + "assigned_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp (seconds) when this assignment was made." + }, + "id": { + "type": "string", + "description": "Internal assignment record ID." + } + } + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "fields": { + "type": "object", + "additionalProperties": true + }, + "notifications": { + "type": "integer", + "format": "int64" + }, + "interruptions": { + "type": "integer", + "format": "int64" + }, + "assignments": { + "type": "integer", + "format": "int64" + }, + "reassignments": { + "type": "integer", + "format": "int64" + }, + "acknowledgements": { + "type": "integer", + "format": "int64" + }, + "escalations": { + "type": "integer", + "format": "int64" + }, + "timeout_escalations": { + "type": "integer", + "format": "int64" + }, + "manual_escalations": { + "type": "integer", + "format": "int64" + }, + "creator_id": { + "type": "integer", + "format": "int64" + }, + "creator_name": { + "type": "string" + } + } + }, + "InsightIncidentListResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total matching incidents." + }, + "has_next_page": { + "type": "boolean" + }, + "search_after_ctx": { + "type": "string", + "description": "Cursor token to fetch the next page. Pass it back in the next request's `search_after_ctx`." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentRawItem" + } + } + } + }, + "InsightAlertByLabelItem": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "Aggregation key value (check name or resource identifier)." + }, + "hours": { + "type": "string", + "description": "Hour bucket when `split_hours` is enabled." + }, + "total_alert_cnt": { + "type": "integer", + "format": "int64" + }, + "total_alert_event_cnt": { + "type": "integer", + "format": "int64" + } + } + }, + "InsightAlertByLabelResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InsightAlertByLabelItem" + } + } + } + }, + "StatusPageChangeItem": { + "type": "object", + "description": "A status page event (incident or maintenance).", + "required": [ + "change_id", + "type", + "title" + ], + "properties": { + "change_id": { + "type": "integer", + "format": "int64", + "description": "Event ID." + }, + "page_id": { + "type": "integer", + "format": "int64", + "description": "Parent status page ID." + }, + "type": { + "type": "string", + "enum": [ + "incident", + "maintenance" + ], + "description": "Event type." + }, + "title": { + "type": "string", + "description": "Event title." + }, + "description": { + "type": "string", + "description": "Event description (Markdown)." + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "Current event status. Incident statuses: `investigating`/`identified`/`monitoring`/`resolved`. Maintenance statuses: `scheduled`/`ongoing`/`completed`." + }, + "affected_components": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AffectedStatusPageComponentItem" + }, + "description": "Components currently affected by this event, with their resulting status." + }, + "responder_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs responsible for this event." + }, + "linked_change_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Linked event IDs (related incidents, deployments, etc.)." + }, + "start_at_seconds": { + "type": "integer", + "format": "int64", + "description": "Event start time in unix seconds." + }, + "close_at_seconds": { + "type": "integer", + "format": "int64", + "description": "Scheduled close time in unix seconds. Set for retrospective and maintenance events." + }, + "is_retrospective": { + "type": "boolean", + "description": "Whether this event is a retrospective (historical) one." + }, + "updates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusPageChangeUpdateItem" + }, + "description": "Timeline updates attached to this event, ordered by time." + }, + "notify_subscribers": { + "type": "boolean", + "description": "Whether subscribers were notified about this event." + }, + "auto_update_by_schedule": { + "type": "boolean", + "description": "Maintenance only: whether the status advances automatically based on the scheduled window." + } + } + }, + "AffectedStatusPageComponentItem": { + "type": "object", + "description": "A status page component currently affected by an event, embedding component metadata plus its resulting status.", + "required": [ + "name", + "status" + ], + "properties": { + "component_id": { + "type": "string", + "description": "Component ID." + }, + "section_id": { + "type": "string", + "description": "Parent section ID." + }, + "name": { + "type": "string", + "description": "Component display name." + }, + "description": { + "type": "string", + "description": "Component description." + }, + "available_since_seconds": { + "type": "integer", + "format": "int64", + "description": "Timestamp when the component was first available, in unix seconds." + }, + "order_id": { + "type": "integer", + "format": "int64", + "description": "Display order within its section." + }, + "hide_uptime": { + "type": "boolean", + "description": "When true, uptime data is hidden from summary responses." + }, + "hide_all": { + "type": "boolean", + "description": "When true, the component is hidden entirely from summary endpoints." + }, + "status": { + "type": "string", + "enum": [ + "operational", + "degraded", + "partial_outage", + "full_outage", + "under_maintenance" + ], + "description": "Current component status resulting from the event." + } + } + }, + "StatusPageChangeUpdateItem": { + "type": "object", + "description": "A single timeline update on a status page event.", + "required": [ + "update_id", + "at_seconds" + ], + "properties": { + "update_id": { + "type": "string", + "description": "Update ID." + }, + "at_seconds": { + "type": "integer", + "format": "int64", + "description": "Update timestamp in unix seconds." + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "Event status after this update. Omitted when the update does not change the overall status." + }, + "description": { + "type": "string", + "description": "Update description (Markdown)." + }, + "component_changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusPageComponentChangeItem" + }, + "description": "Component status transitions applied by this update." + } + } + }, + "StatusPageComponentChangeItem": { + "type": "object", + "description": "Component status transition applied in a timeline update.", + "required": [ + "component_id", + "status" + ], + "properties": { + "component_id": { + "type": "string", + "description": "Component ID." + }, + "component_name": { + "type": "string", + "description": "Component display name. Populated by the backend on read; ignored on write." + }, + "status": { + "type": "string", + "enum": [ + "operational", + "degraded", + "partial_outage", + "full_outage", + "under_maintenance" + ], + "description": "New component status. Incidents support `operational`/`degraded`/`partial_outage`/`full_outage`; maintenances support `operational`/`under_maintenance`." + } + } + }, + "StatusPageChangeListResponse": { + "type": "object", + "description": "List of status page events.", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusPageChangeItem" + } + } + } + }, + "StatusPageChangeCreateResponse": { + "type": "object", + "description": "Result of creating a status page event.", + "required": [ + "change_id", + "change_name" + ], + "properties": { + "change_id": { + "type": "integer", + "format": "int64", + "description": "Newly created event ID." + }, + "change_name": { + "type": "string", + "description": "Event title (echoed from the request)." + } + } + }, + "UpdateStatusPageChangeRequest": { + "type": "object", + "description": "Parameters for updating the editable fields of a status page event.", + "required": [ + "page_id", + "change_id" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "Status page ID." + }, + "change_id": { + "type": "integer", + "format": "int64", + "description": "Target event ID." + }, + "title": { + "type": "string", + "maxLength": 255, + "description": "New event title, up to 255 characters. Omit to keep the existing value." + }, + "responders": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs responsible for this event. Pass the full replacement list." + }, + "linked_changes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Linked event IDs. Pass the full replacement list." + } + } + }, + "DeleteStatusPageChangeRequest": { + "type": "object", + "description": "Parameters for deleting a status page event.", + "required": [ + "page_id", + "change_id" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "Status page ID." + }, + "change_id": { + "type": "integer", + "format": "int64", + "description": "Target event ID." + } + } + }, + "StatusPageChangeTimelineCreateResponse": { + "type": "object", + "description": "Result of appending a timeline update to a status page event.", + "required": [ + "update_id" + ], + "properties": { + "update_id": { + "type": "string", + "description": "Newly created update ID." + } + } + }, + "UpdateStatusPageChangeTimelineRequest": { + "type": "object", + "description": "Parameters for updating an existing timeline entry on a status page event.", + "required": [ + "page_id", + "change_id", + "update_id" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "Status page ID." + }, + "change_id": { + "type": "integer", + "format": "int64", + "description": "Parent event ID." + }, + "update_id": { + "type": "string", + "description": "Target timeline update ID." + }, + "at_seconds": { + "type": "integer", + "format": "int64", + "description": "New update timestamp in unix seconds." + }, + "description": { + "type": "string", + "description": "New update description (Markdown)." + } + } + }, + "DeleteStatusPageChangeTimelineRequest": { + "type": "object", + "description": "Parameters for deleting a timeline entry on a status page event.", + "required": [ + "page_id", + "change_id", + "update_id" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "Status page ID." + }, + "change_id": { + "type": "integer", + "format": "int64", + "description": "Parent event ID." + }, + "update_id": { + "type": "string", + "description": "Timeline update ID to delete." + } + } + }, + "StatusPageSubscriberListResponse": { + "type": "object", + "description": "Paginated list of status page subscribers.", + "required": [ + "total", + "has_next_page", + "items" + ], + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total matching subscribers." + }, + "has_next_page": { + "type": "boolean", + "description": "Whether there is at least one more page after the current one." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportedStatusPageSubscriberItem" + } + } + } + }, + "ExportedStatusPageSubscriberItem": { + "type": "object", + "description": "A status page subscriber, as returned by the subscriber list and export endpoints.", + "required": [ + "recipient", + "method", + "components", + "all" + ], + "properties": { + "recipient": { + "type": "string", + "description": "Subscriber recipient: email address for public pages, user ID for internal pages." + }, + "method": { + "type": "string", + "enum": [ + "email", + "im" + ], + "description": "Subscription delivery method." + }, + "components": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusPageComponentItem" + }, + "description": "Components this subscriber has subscribed to." + }, + "all": { + "type": "boolean", + "description": "Whether the subscriber is subscribed to all components." + }, + "locale": { + "type": "string", + "description": "Preferred locale for notifications." + } + } + }, + "StatusPageComponentItem": { + "type": "object", + "description": "A status page component.", + "required": [ + "name" + ], + "properties": { + "component_id": { + "type": "string", + "description": "Component ID." + }, + "section_id": { + "type": "string", + "description": "Parent section ID." + }, + "name": { + "type": "string", + "description": "Component display name." + }, + "description": { + "type": "string", + "description": "Component description." + }, + "available_since_seconds": { + "type": "integer", + "format": "int64", + "description": "Timestamp when the component was first available, in unix seconds." + }, + "order_id": { + "type": "integer", + "format": "int64", + "description": "Display order within its section." + }, + "hide_uptime": { + "type": "boolean", + "description": "When true, uptime data is hidden from summary responses." + }, + "hide_all": { + "type": "boolean", + "description": "When true, the component is hidden entirely from summary endpoints." + } + } + }, + "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`.", + "required": [ + "page_id", + "method" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "Target status page ID." + }, + "method": { + "type": "string", + "enum": [ + "email", + "im" + ], + "description": "Subscription method. `email` is only valid for public pages; `im` is only valid for internal pages." + }, + "subscribers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportStatusPageSubscriberItem" + }, + "description": "Subscribers to import." + } + } + }, + "ImportStatusPageSubscriberItem": { + "type": "object", + "description": "A single subscriber to import.", + "required": [ + "recipient" + ], + "properties": { + "recipient": { + "type": "string", + "maxLength": 255, + "description": "Email address (for public pages) or user ID (for internal pages)." + }, + "component_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Component IDs the subscriber should receive notifications for." + }, + "change_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Specific event IDs the subscriber should receive notifications for." + }, + "all": { + "type": "boolean", + "description": "When true, the subscriber receives notifications for all components. Must be true when `component_ids` and `change_ids` are both empty." + }, + "locale": { + "type": "string", + "description": "Preferred locale for notifications. Defaults to the request locale when omitted." + } + } + }, + "ExportStatusPageSubscribersRequest": { + "type": "object", + "description": "Parameters for exporting a status page subscriber list.", + "required": [ + "page_id" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "Status page ID." + }, + "component_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Optional component IDs to filter subscribers by." + } + } + }, + "StatusPageSubscriberExportResponse": { + "type": "string", + "format": "binary", + "description": "A CSV file (Content-Type: text/csv; charset=utf-8) containing columns: Method, Recipient, Components, Subscribe All, Locale." + }, + "MigrateStatusPageStructureRequest": { + "type": "object", + "description": "Parameters for starting an Atlassian Statuspage structure and history migration job.", + "required": [ + "api_key", + "source_page_id" + ], + "properties": { + "api_key": { + "type": "string", + "description": "Atlassian Statuspage API key with access to the source page." + }, + "source_page_id": { + "type": "string", + "description": "Atlassian Statuspage source page ID." + } + } + }, + "MigrateStatusPageEmailSubscribersRequest": { + "type": "object", + "description": "Parameters for starting an Atlassian Statuspage email subscriber migration job.", + "required": [ + "api_key", + "source_page_id", + "target_page_id" + ], + "properties": { + "api_key": { + "type": "string", + "description": "Atlassian Statuspage API key with access to the source page." + }, + "source_page_id": { + "type": "string", + "description": "Atlassian Statuspage source page ID." + }, + "target_page_id": { + "type": "integer", + "format": "int64", + "description": "Flashduty target status page ID that will receive the imported subscribers." + } + } + }, + "StatusPageMigrationStartResponse": { + "type": "object", + "description": "Result of starting a migration job.", + "required": [ + "job_id" + ], + "properties": { + "job_id": { + "type": "string", + "description": "Migration job ID. Use this to poll status or request cancellation." + } + } + }, + "StatusPageMigrationJob": { + "type": "object", + "description": "A migration job's current state and progress.", + "required": [ + "job_id", + "account_id", + "source_page_id", + "target_page_id", + "phase", + "status", + "progress", + "created_at", + "updated_at" + ], + "properties": { + "job_id": { + "type": "string", + "description": "Migration job ID." + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "Owner account ID." + }, + "source_page_id": { + "type": "string", + "description": "Atlassian Statuspage source page ID." + }, + "target_page_id": { + "type": "integer", + "format": "int64", + "description": "Flashduty target status page ID. Set once the job produces one, or supplied up front for subscriber migration." + }, + "phase": { + "type": "string", + "enum": [ + "structure", + "history", + "subscribers" + ], + "description": "Current migration phase." + }, + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "completed", + "failed", + "cancelled" + ], + "description": "Current job status." + }, + "progress": { + "$ref": "#/components/schemas/StatusPageMigrationProgress", + "description": "Per-entity progress counters." + }, + "error": { + "type": "string", + "description": "Terminal error message when `status` is `failed`." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Job creation time, unix seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last status update time, unix seconds." + } + } + }, + "StatusPageMigrationProgress": { + "type": "object", + "description": "Progress counters for a migration job.", + "required": [ + "total_steps", + "completed_steps", + "components_imported", + "sections_imported", + "incidents_imported", + "maintenances_imported", + "subscribers_imported", + "templates_imported", + "subscribers_skipped" + ], + "properties": { + "total_steps": { + "type": "integer", + "description": "Total steps this job will perform." + }, + "completed_steps": { + "type": "integer", + "description": "Steps completed so far." + }, + "components_imported": { + "type": "integer" + }, + "sections_imported": { + "type": "integer" + }, + "incidents_imported": { + "type": "integer" + }, + "maintenances_imported": { + "type": "integer" + }, + "subscribers_imported": { + "type": "integer" + }, + "templates_imported": { + "type": "integer" + }, + "subscribers_skipped": { + "type": "integer", + "description": "Number of subscribers skipped (e.g. because they would create duplicates)." + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Non-fatal warnings recorded during the job." + } + } + }, + "CancelStatusPageMigrationRequest": { + "type": "object", + "description": "Parameters for cancelling an in-progress migration job.", + "required": [ + "job_id" + ], + "properties": { + "job_id": { + "type": "string", + "description": "Migration job ID." + } + } + }, + "CreateStatusPageChangeRequest": { + "type": "object", + "description": "Parameters for creating a status page incident or maintenance event. The first update must contain `component_changes` to define affected components; retrospective events require at least 2 updates.", + "required": [ + "page_id", + "type", + "title", + "status", + "updates" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "Status page ID." + }, + "type": { + "type": "string", + "enum": [ + "incident", + "maintenance" + ], + "description": "Event type." + }, + "title": { + "type": "string", + "maxLength": 255, + "description": "Event title, up to 255 characters." + }, + "description": { + "type": "string", + "description": "Event description (Markdown). Required by the validator." + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "Initial event status. `investigating`/`identified`/`monitoring`/`resolved` apply to incidents; `scheduled`/`ongoing`/`completed` apply to maintenances." + }, + "start_at_seconds": { + "type": "integer", + "format": "int64", + "description": "Event start time in unix seconds. Defaults to now when omitted." + }, + "responders": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs responsible for this event." + }, + "linked_changes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Linked change IDs (related incidents, deployments, etc.)." + }, + "close_at_seconds": { + "type": "integer", + "format": "int64", + "description": "Scheduled close time for retrospective events. Must be greater than `start_at_seconds`." + }, + "updates": { + "type": "array", + "items": { + "type": "object", + "description": "One timeline update entry.", + "properties": { + "update_id": { + "type": "string", + "description": "Update ID. Server-assigned on create; supply when replaying historical updates." + }, + "at_seconds": { + "type": "integer", + "format": "int64", + "description": "Update timestamp in unix seconds." + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "Change status after this update. Omit if the overall status does not change." + }, + "description": { + "type": "string", + "description": "Update description (Markdown)." + }, + "component_changes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "component_id", + "status" + ], + "properties": { + "component_id": { + "type": "string", + "description": "Component ID." + }, + "status": { + "type": "string", + "enum": [ + "operational", + "degraded", + "partial_outage", + "full_outage", + "under_maintenance" + ], + "description": "New component status. `operational`/`degraded`/`partial_outage`/`full_outage` apply to incidents; `operational`/`under_maintenance` apply to maintenances." + } + } + }, + "description": "Component status transitions applied by this update." + } + } + }, + "description": "Timeline updates. Immediate events normally pass one update; retrospective events must pass all historical updates." + }, + "notify_subscribers": { + "type": "boolean", + "description": "Notify subscribers about this event and all its updates." + }, + "auto_update_by_schedule": { + "type": "boolean", + "description": "Maintenance only: automatically advance the status based on the scheduled window." + }, + "is_retrospective": { + "type": "boolean", + "description": "Mark this event as a retrospective (historical) one." + } + } + }, + "CreateStatusPageChangeTimelineRequest": { + "type": "object", + "description": "Parameters for appending an update to a status page event timeline.", + "required": [ + "page_id", + "change_id", + "status" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "Status page ID." + }, + "change_id": { + "type": "integer", + "format": "int64", + "description": "Target event ID." + }, + "at_seconds": { + "type": "integer", + "format": "int64", + "description": "Update timestamp in unix seconds. Defaults to now when omitted." + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "New event status. Must match the event type. When the status transitions to `resolved` or `completed`, all referenced components must become `operational`." + }, + "description": { + "type": "string", + "description": "Update description (Markdown). Required." + }, + "component_changes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "component_id", + "status" + ], + "properties": { + "component_id": { + "type": "string", + "description": "Component ID." + }, + "status": { + "type": "string", + "enum": [ + "operational", + "degraded", + "partial_outage", + "full_outage", + "under_maintenance" + ], + "description": "New component status. `operational`/`degraded`/`partial_outage`/`full_outage` apply to incidents; `operational`/`under_maintenance` apply to maintenances." + } + } + }, + "description": "Component status transitions applied by this update. Component IDs must be unique." + } + } + }, + "RuleListRequest": { + "type": "object", + "description": "Filter parameter for listing rules in a folder.", + "properties": { + "folder_id": { + "type": "integer", + "format": "uint64", + "description": "Folder ID. 0 to list all accessible rules." + } + } + }, + "AlertRuleBasic": { + "type": "object", + "description": "Basic alert rule information for list views.", + "required": [ + "id", + "account_id", + "folder_id", + "name", + "ds_type", + "enabled", + "debug_log_enabled", + "cron_pattern", + "delay_seconds", + "creator_id", + "creator_name", + "updater_id", + "updater_name", + "created_at", + "updated_at", + "triggered" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "Unique rule ID." + }, + "account_id": { + "type": "integer", + "format": "uint64", + "description": "Account ID." + }, + "folder_id": { + "type": "integer", + "format": "uint64", + "description": "Folder ID." + }, + "name": { + "type": "string", + "description": "Rule name." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom labels." + }, + "ds_type": { + "type": "string", + "description": "Data source type, e.g. `prometheus`." + }, + "enabled": { + "type": "boolean", + "description": "Whether the rule is enabled." + }, + "debug_log_enabled": { + "type": "boolean", + "description": "Whether debug logging is enabled." + }, + "cron_pattern": { + "type": "string", + "description": "5-field cron schedule, e.g. `* * * * *`." + }, + "delay_seconds": { + "type": "integer", + "description": "Evaluation delay in seconds." + }, + "creator_id": { + "type": "integer", + "format": "uint64" + }, + "creator_name": { + "type": "string" + }, + "updater_id": { + "type": "integer", + "format": "uint64" + }, + "updater_name": { + "type": "string" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "triggered": { + "type": "boolean", + "description": "True if the rule currently has active alerts." + } + } + }, + "RuleBasicListResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertRuleBasic" + }, + "description": "List of alert rules (basic info)." + }, + "RuleConfigs": { + "type": "object", + "description": "Rule evaluation configuration.", + "properties": { + "queries": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Query identifier (letter, e.g. `A`). The name `R` is reserved and must not be used." + }, + "expr": { + "type": "string", + "description": "Query expression." + }, + "label_fields": { + "type": "array", + "items": { + "type": "string" + } + }, + "value_fields": { + "type": "array", + "items": { + "type": "string" + } + }, + "args": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "relate_queries": { + "type": "array", + "description": "Optional auxiliary queries whose results are attached to alert events as context. Each entry must have a unique `name` (not duplicating any query name) and a non-empty `expr`.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Relate-query identifier." + }, + "expr": { + "type": "string", + "description": "Query expression." + }, + "args": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "check_threshold": { + "type": "object", + "description": "Threshold check configuration.", + "properties": { + "enabled": { + "type": "boolean" + }, + "alerting_check_times": { + "type": "integer" + }, + "recovery_check_times": { + "type": "integer" + }, + "push_recovery_event": { + "type": "boolean" + }, + "critical": { + "type": "string" + }, + "warning": { + "type": "string" + }, + "info": { + "type": "string" + }, + "recovery": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "invert", + "threshold", + "ql" + ] + }, + "condition": { + "type": "string" + } + } + } + } + }, + "check_anydata": { + "type": "object", + "description": "Any-data check configuration. Fires when the query returns any data rows.", + "properties": { + "enabled": { + "type": "boolean" + }, + "alerting_check_times": { + "type": "integer" + }, + "recovery_check_times": { + "type": "integer" + }, + "push_recovery_event": { + "type": "boolean" + }, + "severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info" + ] + }, + "recovery": { + "type": "object", + "description": "Recovery condition for any-data check. If omitted or `mode` is empty, treated as `nodata`.", + "properties": { + "mode": { + "type": "string", + "enum": [ + "nodata", + "ql" + ], + "description": "`nodata` = recover when the query returns no data; `ql` = recover when the `condition` expression evaluates to true. When `mode` is `ql`, only a single query (`name=A`) is permitted." + }, + "condition": { + "type": "string", + "description": "Recovery expression. Required when `mode` is `ql`." + }, + "args": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "check_nodata": { + "type": "object", + "description": "No-data check configuration.", + "properties": { + "enabled": { + "type": "boolean" + }, + "alerting_check_times": { + "type": "integer" + }, + "recovery_check_times": { + "type": "integer" + }, + "push_recovery_event": { + "type": "boolean" + }, + "severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info" + ] + }, + "resolve_timeout": { + "type": "integer", + "description": "Auto-resolve after N seconds." + } + } + } + } + }, + "AlertRule": { + "type": "object", + "description": "Full alert rule configuration.", + "properties": { + "id": { + "type": "integer", + "format": "uint64" + }, + "account_id": { + "type": "integer", + "format": "uint64" + }, + "folder_id": { + "type": "integer", + "format": "uint64", + "description": "Folder the rule belongs to." + }, + "name": { + "type": "string", + "description": "Rule name." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom labels." + }, + "ds_type": { + "type": "string", + "description": "Data source type." + }, + "ds_list": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Data source name patterns (supports wildcards)." + }, + "ds_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Specific data source IDs." + }, + "enabled": { + "type": "boolean" + }, + "debug_log_enabled": { + "type": "boolean" + }, + "rule_configs": { + "$ref": "#/components/schemas/RuleConfigs" + }, + "cron_pattern": { + "type": "string", + "description": "5-field cron schedule." + }, + "delay_seconds": { + "type": "integer" + }, + "enabled_times": { + "type": "array", + "description": "Time windows when the rule is active.", + "items": { + "type": "object", + "properties": { + "days": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Days of week (0=Sunday)." + }, + "stime": { + "type": "string", + "description": "Start time, e.g. `09:00`." + }, + "etime": { + "type": "string", + "description": "End time, e.g. `18:00`." + } + } + } + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description_type": { + "type": "string", + "enum": [ + "text", + "markdown" + ] + }, + "description": { + "type": "string" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Channel IDs to send alerts to." + }, + "repeat_interval": { + "type": "integer", + "format": "int64", + "description": "Notification repeat interval in seconds." + }, + "repeat_total": { + "type": "integer", + "format": "int64", + "description": "Max number of repeat notifications." + }, + "creator_id": { + "type": "integer", + "format": "uint64" + }, + "creator_name": { + "type": "string" + }, + "updater_id": { + "type": "integer", + "format": "uint64" + }, + "updater_name": { + "type": "string" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + } + } + }, + "AlertRuleInfoResponse": { + "allOf": [ + { + "$ref": "#/components/schemas/AlertRule" + } + ], + "description": "Full alert rule returned by the info endpoint. All server-assigned fields are guaranteed present.", + "required": [ + "id", + "account_id", + "folder_id", + "name", + "ds_type", + "enabled", + "debug_log_enabled", + "cron_pattern", + "delay_seconds", + "creator_id", + "creator_name", + "updater_id", + "updater_name", + "created_at", + "updated_at" + ] + }, + "RuleIDRequest": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "Rule ID." + } + } + }, + "RuleIDsRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Rule IDs." + } + } + }, + "RuleEmptyRequest": { + "type": "object", + "description": "No parameters required.", + "additionalProperties": false + }, + "RuleEmptyResponse": { + "type": "object", + "description": "Empty response on success.", + "additionalProperties": false + }, + "RuleFolderIDRequest": { + "type": "object", + "properties": { + "folder_id": { + "type": "integer", + "format": "uint64", + "description": "Folder ID. 0 for all." + } + } + }, + "RuleFieldsUpdateRequest": { + "type": "object", + "required": [ + "ids", + "fields" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Rule IDs to update." + }, + "fields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Field names to update." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "ds_type": { + "type": "string" + }, + "ds_list": { + "type": "array", + "items": { + "type": "string" + } + }, + "ds_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + } + }, + "enabled": { + "type": "boolean" + }, + "debug_log_enabled": { + "type": "boolean" + }, + "cron_pattern": { + "type": "string" + }, + "delay_seconds": { + "type": "integer" + }, + "enabled_times": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnabledTime" + } + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description": { + "type": "string" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + } + }, + "repeat_interval": { + "type": "integer", + "format": "int64" + }, + "repeat_total": { + "type": "integer", + "format": "int64" + } + } + }, + "RuleMoveRequest": { + "type": "object", + "required": [ + "ids", + "dest_folder_id" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Rule IDs to move." + }, + "dest_folder_id": { + "type": "integer", + "format": "uint64", + "description": "Destination folder ID." + } + } + }, + "RuleImportRequest": { + "type": "array", + "description": "Array of alert rule export objects to import.", + "items": { + "$ref": "#/components/schemas/AlertRule" + } + }, + "RuleImportResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameMessage" + }, + "description": "Import result for each rule." + }, + "AlertRuleStatus": { + "type": "object", + "description": "Rule trigger status for a folder node.", + "required": [ + "folder_id", + "rule_total", + "triggered_rule_count" + ], + "properties": { + "folder_id": { + "type": "integer", + "format": "uint64" + }, + "folder_name": { + "type": "string" + }, + "rule_total": { + "type": "integer", + "format": "int64", + "description": "Total rules in the folder family." + }, + "triggered_rule_count": { + "type": "integer", + "format": "int64", + "description": "Rules with active alerts." + } + } + }, + "RuleStatusResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertRuleStatus" + } + }, + "AlertRuleAudit": { + "type": "object", + "description": "An audit record capturing a rule snapshot at a point in time.", + "required": [ + "id", + "account_id", + "alert_rule_id", + "action", + "creator_id", + "creator_name", + "created_at" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "Audit record ID." + }, + "account_id": { + "type": "integer", + "format": "uint64" + }, + "alert_rule_id": { + "type": "integer", + "format": "uint64", + "description": "ID of the alert rule this record belongs to." + }, + "action": { + "type": "string", + "description": "Action performed, e.g. `create`, `update`." + }, + "content": { + "type": "string", + "description": "JSON string of the full rule snapshot at audit time. Populated on `/monit/rule/audit/detail`, omitted on list responses." + }, + "creator_id": { + "type": "integer", + "format": "uint64" + }, + "creator_name": { + "type": "string" + }, + "created_at": { + "type": "integer", + "format": "int64" + } + } + }, + "RuleAuditListResponse": { + "type": "array", + "description": "Audit records for a rule, ordered by creation time descending. The `content` field is omitted.", + "items": { + "$ref": "#/components/schemas/AlertRuleAudit" + } + }, + "DSType": { + "type": "object", + "description": "A datasource type definition usable by alert rules.", + "required": [ + "id", + "name", + "ident", + "account_id", + "weight" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64" + }, + "name": { + "type": "string", + "description": "Display name, e.g. `Prometheus`." + }, + "ident": { + "type": "string", + "description": "Identifier used as the `ds_type` of rules, e.g. `prometheus`." + }, + "account_id": { + "type": "integer", + "format": "uint64", + "description": "Owning account ID. `0` for global types." + }, + "weight": { + "type": "integer", + "description": "Display order weight; higher appears first." + } + } + }, + "RuleDsTypesResponse": { + "type": "array", + "description": "Datasource types available to the account — global types plus account-scoped types.", + "items": { + "$ref": "#/components/schemas/DSType" + } + }, + "AlertRuleCounter": { + "type": "object", + "description": "One historical snapshot of the account's alert rule total.", + "required": [ + "id", + "account_id", + "num", + "clock" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64" + }, + "account_id": { + "type": "integer", + "format": "uint64" + }, + "num": { + "type": "integer", + "format": "int64", + "description": "Rule count at the sample time." + }, + "clock": { + "type": "integer", + "format": "int64", + "description": "Sample timestamp, Unix epoch seconds." + } + } + }, + "RuleCounterTotalResponse": { + "type": "array", + "description": "Historical rule-count samples ordered by `clock` ascending.", + "items": { + "$ref": "#/components/schemas/AlertRuleCounter" + } + }, + "RuleCounterNodeResponse": { + "type": "object", + "description": "Map of top-level folder name to rule count.", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + }, + "RuleCounterChannelResponse": { + "type": "object", + "description": "Map of channel name to rule count. Unresolved channel IDs appear as stringified IDs.", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + }, + "NameMessage": { + "type": "object", + "description": "Per-item result for batch rule operations.", + "required": [ + "name", + "message" + ], + "properties": { + "name": { + "type": "string", + "description": "Rule name." + }, + "message": { + "type": "string", + "description": "Empty on success, error message on failure." + } + } + }, + "RuleNameMessageListResponse": { + "type": "array", + "description": "Per-rule batch-operation results.", + "items": { + "$ref": "#/components/schemas/NameMessage" + } + }, + "AlertRuleExport": { + "type": "object", + "description": "Portable alert rule representation for import/export. Omits identifying fields like `id`, `account_id`, and audit metadata.", + "required": [ + "name", + "ds_type", + "enabled", + "debug_log_enabled", + "cron_pattern" + ], + "properties": { + "name": { + "type": "string" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "ds_type": { + "type": "string" + }, + "ds_list": { + "type": "array", + "items": { + "type": "string" + } + }, + "ds_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + } + }, + "enabled": { + "type": "boolean" + }, + "debug_log_enabled": { + "type": "boolean" + }, + "rule_configs": { + "$ref": "#/components/schemas/RuleConfigs" + }, + "cron_pattern": { + "type": "string" + }, + "delay_seconds": { + "type": "integer" + }, + "enabled_times": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnabledTime" + } + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description_type": { + "type": "string", + "enum": [ + "text", + "markdown" + ] + }, + "description": { + "type": "string" + }, + "repeat_interval": { + "type": "integer", + "format": "int64" + }, + "repeat_total": { + "type": "integer", + "format": "int64" + } + } + }, + "AlertRuleExportListResponse": { + "type": "array", + "description": "List of exported rule configurations, compatible with `POST /monit/rule/import`.", + "items": { + "$ref": "#/components/schemas/AlertRuleExport" + } + }, + "EnabledTime": { + "type": "object", + "description": "Time window in which the rule is active.", + "properties": { + "days": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Days of week, 0 = Sunday." + }, + "stime": { + "type": "string", + "description": "Start time, e.g. `09:00`." + }, + "etime": { + "type": "string", + "description": "End time, e.g. `18:00`." + } + } + }, + "DataSourceListRequest": { + "type": "object", + "description": "Filter parameters for listing datasources.", + "properties": { + "type": { + "type": "string", + "description": "Filter by datasource type identifier. Omit to return all types. Allowed values: `prometheus`, `loki`, `mysql`, `oracle`, `postgres`, `clickhouse`, `elasticsearch`, `sls`, `victorialogs`." + } + } + }, + "DSPayload": { + "type": "object", + "description": "Type-specific datasource configuration. Include only the block matching `type_ident`.", + "properties": { + "prometheus": { + "$ref": "#/components/schemas/DSPrometheusConfig" + }, + "loki": { + "$ref": "#/components/schemas/DSLokiConfig" + }, + "mysql": { + "$ref": "#/components/schemas/DSMySQLConfig" + }, + "oracle": { + "$ref": "#/components/schemas/DSOracleConfig" + }, + "postgres": { + "$ref": "#/components/schemas/DSPostgresConfig" + }, + "clickhouse": { + "$ref": "#/components/schemas/DSClickHouseConfig" + }, + "elasticsearch": { + "$ref": "#/components/schemas/DSElasticSearchConfig" + }, + "sls": { + "$ref": "#/components/schemas/DSSLSConfig" + }, + "victorialogs": { + "$ref": "#/components/schemas/DSVictoriaLogsConfig" + } + } + }, + "DSPrometheusConfig": { + "type": "object", + "description": "Prometheus datasource configuration. TLS fields are inherited from TLSClientConfig.", + "properties": { + "basic_auth_enabled": { + "type": "boolean", + "description": "Enable HTTP Basic Auth." + }, + "basic_auth_username": { + "type": "string", + "description": "Basic auth username." + }, + "basic_auth_password": { + "type": "string", + "description": "Basic auth password." + }, + "headers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Custom HTTP headers in `Key: Value` format." + }, + "params": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Custom query parameters in `key=value` format." + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + }, + "tls_key_pwd": { + "type": "string" + }, + "tls_skip_verify": { + "type": "boolean" + }, + "tls_server_name": { + "type": "string" + }, + "tls_min_version": { + "type": "string" + }, + "tls_max_version": { + "type": "string" + } + } + }, + "DSLokiConfig": { + "type": "object", + "description": "Loki datasource configuration. TLS fields are inherited from TLSClientConfig.", + "properties": { + "basic_auth_enabled": { + "type": "boolean" + }, + "basic_auth_username": { + "type": "string" + }, + "basic_auth_password": { + "type": "string" + }, + "headers": { + "type": "array", + "items": { + "type": "string" + } + }, + "params": { + "type": "array", + "items": { + "type": "string" + } + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + }, + "tls_key_pwd": { + "type": "string" + }, + "tls_skip_verify": { + "type": "boolean" + }, + "tls_server_name": { + "type": "string" + }, + "tls_min_version": { + "type": "string" + }, + "tls_max_version": { + "type": "string" + } + } + }, + "DSMySQLConfig": { + "type": "object", + "description": "MySQL datasource configuration. TLS fields are inherited from TLSClientConfig.", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "open_conns": { + "type": "integer", + "description": "Maximum open connections." + }, + "idle_conns": { + "type": "integer", + "description": "Maximum idle connections." + }, + "lifetime_seconds": { + "type": "integer", + "format": "int64", + "description": "Connection maximum lifetime in seconds." + }, + "timeout_mills": { + "type": "integer", + "format": "int64", + "description": "Query timeout in milliseconds." + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + }, + "tls_key_pwd": { + "type": "string" + }, + "tls_skip_verify": { + "type": "boolean" + }, + "tls_server_name": { + "type": "string" + }, + "tls_min_version": { + "type": "string" + }, + "tls_max_version": { + "type": "string" + } + } + }, + "DSOracleConfig": { + "type": "object", + "description": "Oracle datasource configuration.", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "options": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Extra connection options as key-value pairs." + }, + "open_conns": { + "type": "integer" + }, + "idle_conns": { + "type": "integer" + }, + "lifetime_seconds": { + "type": "integer", + "format": "int64" + }, + "timeout_mills": { + "type": "integer", + "format": "int64" + } + } + }, + "DSPostgresConfig": { + "type": "object", + "description": "PostgreSQL datasource configuration.", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "open_conns": { + "type": "integer" + }, + "idle_conns": { + "type": "integer" + }, + "lifetime_seconds": { + "type": "integer", + "format": "int64" + }, + "timeout_mills": { + "type": "integer", + "format": "int64" + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + } + } + }, + "DSClickHouseConfig": { + "type": "object", + "description": "ClickHouse datasource configuration. TLS fields are inherited from TLSClientConfig.", + "properties": { + "database": { + "type": "string", + "description": "Default database for authentication." + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "open_conns": { + "type": "integer" + }, + "idle_conns": { + "type": "integer" + }, + "lifetime_seconds": { + "type": "integer", + "format": "int64" + }, + "timeout_mills": { + "type": "integer", + "format": "int64" + }, + "max_execution_seconds": { + "type": "integer", + "format": "int64", + "description": "Max query execution time in seconds." + }, + "dial_timeout_mills": { + "type": "integer", + "format": "int64", + "description": "Dial timeout in milliseconds." + }, + "tls_enabled": { + "type": "boolean" + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + }, + "tls_key_pwd": { + "type": "string" + }, + "tls_skip_verify": { + "type": "boolean" + }, + "tls_server_name": { + "type": "string" + }, + "tls_min_version": { + "type": "string" + }, + "tls_max_version": { + "type": "string" + } + } + }, + "DSElasticSearchConfig": { + "type": "object", + "description": "Elasticsearch datasource configuration.", + "properties": { + "deployment": { + "type": "string", + "enum": [ + "cloud", + "self-managed" + ], + "description": "Deployment type. `cloud` uses Elastic Cloud; `self-managed` uses a self-hosted cluster." + }, + "timeout_mills": { + "type": "integer", + "format": "int64" + }, + "cloud_id": { + "type": "string", + "description": "Elastic Cloud deployment ID. Only for `cloud` deployment." + }, + "api_key": { + "type": "string", + "description": "Elastic Cloud API key. Only for `cloud` deployment." + }, + "username": { + "type": "string", + "description": "Username for `self-managed` deployment." + }, + "password": { + "type": "string" + }, + "service_token": { + "type": "string", + "description": "Service token; overrides username/password if set." + }, + "tls_ca": { + "type": "string" + }, + "certificate_fingerprint": { + "type": "string" + }, + "headers": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "DSSLSConfig": { + "type": "object", + "description": "Alibaba Cloud SLS datasource configuration.", + "properties": { + "access_key_id": { + "type": "string", + "description": "Alibaba Cloud Access Key ID." + }, + "access_key_secret": { + "type": "string", + "description": "Alibaba Cloud Access Key Secret." + }, + "headers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Custom HTTP headers." + } + } + }, + "DSVictoriaLogsConfig": { + "type": "object", + "description": "VictoriaLogs datasource configuration. TLS fields are inherited from TLSClientConfig.", + "properties": { + "basic_auth_enabled": { + "type": "boolean" + }, + "basic_auth_username": { + "type": "string" + }, + "basic_auth_password": { + "type": "string" + }, + "headers": { + "type": "array", + "items": { + "type": "string" + } + }, + "params": { + "type": "array", + "items": { + "type": "string" + } + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + }, + "tls_key_pwd": { + "type": "string" + }, + "tls_skip_verify": { + "type": "boolean" + }, + "tls_server_name": { + "type": "string" + }, + "tls_min_version": { + "type": "string" + }, + "tls_max_version": { + "type": "string" + } + } + }, + "DataSourceItem": { + "type": "object", + "description": "A monitoring datasource.", + "required": [ + "id", + "account_id", + "type_ident", + "name", + "enabled", + "note", + "address", + "edge_cluster_name", + "updated_at" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "Unique datasource ID." + }, + "account_id": { + "type": "integer", + "format": "uint64", + "description": "Account ID." + }, + "type_ident": { + "type": "string", + "description": "Datasource type identifier. Allowed: `prometheus`, `loki`, `mysql`, `oracle`, `postgres`, `clickhouse`, `elasticsearch`, `sls`, `victorialogs`." + }, + "name": { + "type": "string", + "description": "Datasource display name." + }, + "enabled": { + "type": "boolean", + "description": "Whether the datasource is active." + }, + "note": { + "type": "string", + "description": "Optional description." + }, + "address": { + "type": "string", + "description": "Connection address. For Prometheus/Loki/VictoriaLogs: HTTP URL. For MySQL/Oracle/Postgres/ClickHouse: `host:port`. For SLS: endpoint without http/https prefix." + }, + "payload": { + "$ref": "#/components/schemas/DSPayload" + }, + "edge_cluster_name": { + "type": "string", + "description": "Monitors edge cluster name responsible for evaluating rules using this datasource." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp, Unix epoch seconds." + } + } + }, + "DataSourceUpsertRequest": { + "type": "object", + "description": "Request body for creating or updating a datasource. `id` is required only for update. `address` is required for all types except Elasticsearch with `deployment=cloud`.", + "required": [ + "type_ident", + "name", + "edge_cluster_name", + "payload" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "Datasource ID. Required for update; omit for create." + }, + "type_ident": { + "type": "string", + "description": "Datasource type identifier. Allowed: `prometheus`, `loki`, `mysql`, `oracle`, `postgres`, `clickhouse`, `elasticsearch`, `sls`, `victorialogs`." + }, + "name": { + "type": "string", + "description": "Datasource display name." + }, + "note": { + "type": "string", + "description": "Optional description." + }, + "address": { + "type": "string", + "description": "Connection address. For Prometheus/Loki/VictoriaLogs: HTTP URL. For MySQL/Oracle/Postgres/ClickHouse: `host:port`. For SLS: endpoint without http/https prefix. Not required for Elasticsearch cloud deployment." + }, + "payload": { + "$ref": "#/components/schemas/DSPayload", + "description": "Type-specific configuration block. Must include the key matching `type_ident`." + }, + "edge_cluster_name": { + "type": "string", + "description": "Monitors edge cluster name responsible for evaluating rules using this datasource." + } + } + }, + "DataSourceListResponse": { + "type": "array", + "description": "List of datasources. Sensitive credential fields are omitted.", + "items": { + "$ref": "#/components/schemas/DataSourceItem" + } + }, + "IDRequest": { + "type": "object", + "required": [ + "id" + ], + "description": "Request with a single numeric ID.", + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "Resource ID." + } + } + }, + "SLSProjectsRequest": { + "type": "object", + "description": "Parameters for listing SLS projects.", + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "SLS datasource ID." + }, + "query": { + "type": "string", + "description": "Name prefix filter." + }, + "offset": { + "type": "integer", + "description": "Pagination offset." + }, + "size": { + "type": "integer", + "description": "Page size." + } + } + }, + "SLSProjectsResponse": { + "type": "array", + "description": "List of SLS project names.", + "items": { + "type": "string" + } + }, + "SLSLogstoresRequest": { + "type": "object", + "description": "Parameters for listing SLS logstores.", + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "SLS datasource ID." + }, + "project": { + "type": "string", + "description": "SLS project name." + }, + "offset": { + "type": "integer", + "description": "Pagination offset." + }, + "size": { + "type": "integer", + "description": "Page size." + } + } + }, + "SLSLogstoresResponse": { + "type": "array", + "description": "List of SLS logstore names.", + "items": { + "type": "string" + } + }, + "StoreRulesetUpsertRequest": { + "type": "object", + "description": "Request body for creating a ruleset. All fields are validated by `Validate()` on the server.", + "required": [ + "type_ident", + "note", + "payload" + ], + "properties": { + "type_ident": { + "type": "string", + "description": "Datasource type identifier this ruleset applies to, e.g. `prometheus`." + }, + "note": { + "type": "string", + "description": "Description or title of the ruleset." + }, + "open_flag": { + "type": "integer", + "enum": [ + 0, + 1, + 2 + ], + "description": "Sharing scope. `0` = private (creator only), `1` = account-shared, `2` = public. Defaults to `0` if omitted." + }, + "payload": { + "type": "string", + "description": "JSON string containing the alert rule definitions." + } + } + }, + "StoreRulesetItem": { + "type": "object", + "description": "A rule repository ruleset.", + "required": [ + "id", + "type_ident", + "note", + "open_flag", + "creator_account_id", + "creator_id", + "creator_name", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "Ruleset ID." + }, + "type_ident": { + "type": "string", + "description": "Datasource type identifier this ruleset applies to." + }, + "note": { + "type": "string", + "description": "Description or title of the ruleset." + }, + "open_flag": { + "type": "integer", + "enum": [ + 0, + 1, + 2 + ], + "description": "Sharing scope. `0` = private (creator only), `1` = account-shared, `2` = public." + }, + "payload": { + "type": "string", + "description": "JSON string containing the alert rule definitions. Omitted in list responses." + }, + "creator_account_id": { + "type": "integer", + "format": "uint64", + "description": "Account ID of the creator." + }, + "creator_id": { + "type": "integer", + "format": "uint64", + "description": "Member ID of the creator." + }, + "creator_name": { + "type": "string", + "description": "Display name of the creator." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp, Unix epoch seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp, Unix epoch seconds." + } + } + }, + "StoreRulesetListRequest": { + "type": "object", + "required": [ + "type_ident" + ], + "description": "Filter rulesets by datasource type.", + "properties": { + "type_ident": { + "type": "string", + "description": "Datasource type identifier to filter by, e.g. `prometheus`." + } + } + }, + "StoreRulesetListResponse": { + "type": "array", + "description": "Rulesets accessible to the current user. The `payload` field is omitted.", + "items": { + "$ref": "#/components/schemas/StoreRulesetItem" + } + }, + "StoreRulesetUpdateRequest": { + "type": "object", + "required": [ + "id", + "note", + "payload" + ], + "description": "Parameters for updating a ruleset.", + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "Ruleset ID to update." + }, + "note": { + "type": "string", + "description": "New description." + }, + "open_flag": { + "type": "integer", + "enum": [ + 0, + 1, + 2 + ], + "description": "New sharing scope. `0` = private, `1` = account-shared, `2` = public." + }, + "payload": { + "type": "string", + "description": "New JSON string of alert rule definitions." + } + } + }, + "RumApplicationListRequest": { + "type": "object", + "description": "Filters for listing RUM applications.", + "properties": { + "p": { + "type": "integer", + "description": "Page number (1-based). Default: 1." + }, + "limit": { + "type": "integer", + "description": "Page size. Range: 1–100. Default: 20." + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "Sort field." + }, + "asc": { + "type": "boolean", + "description": "Sort ascending if `true`." + }, + "query": { + "type": "string", + "description": "Search query to filter by application name." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Filter by team ID." + }, + "is_my_team": { + "type": "boolean", + "description": "If `true`, return only applications belonging to the current user's teams." + } + } + }, + "RumApplicationAlerting": { + "type": "object", + "description": "Alert settings for the application.", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether alerting is enabled." + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Channel IDs to send alerts to." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Associated on-call integration ID (read-only, auto-assigned)." + } + } + }, + "RumApplicationTracing": { + "type": "object", + "description": "APM tracing integration settings.", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether tracing integration is enabled." + }, + "open_type": { + "type": "string", + "enum": [ + "popup", + "tab" + ], + "description": "How to open the trace link." + }, + "endpoint": { + "type": "string", + "description": "Trace endpoint URL (http or https)." + } + } + }, + "RumApplicationItem": { + "type": "object", + "description": "A RUM application.", + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." + }, + "application_id": { + "type": "string", + "description": "Unique application ID." + }, + "application_name": { + "type": "string", + "description": "Application display name." + }, + "type": { + "type": "string", + "enum": [ + "browser", + "ios", + "android", + "react-native", + "flutter", + "kotlin-multiplatform", + "roku", + "unity" + ], + "description": "Application type." + }, + "client_token": { + "type": "string", + "description": "Token used to initialize the RUM SDK." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID." + }, + "is_private": { + "type": "boolean", + "description": "If `true`, the application is only accessible to team members." + }, + "no_ip": { + "type": "boolean", + "description": "If `true`, IP addresses are not collected." + }, + "no_geo": { + "type": "boolean", + "description": "If `true`, geographic location is not inferred from IP." + }, + "alerting": { + "$ref": "#/components/schemas/RumApplicationAlerting" + }, + "tracing": { + "$ref": "#/components/schemas/RumApplicationTracing" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled", + "deleted" + ], + "description": "Application status." + }, + "created_by": { + "type": "integer", + "format": "int64", + "description": "Creator member ID." + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "Last updater member ID." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp, Unix epoch seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp, Unix epoch seconds." + } + } + }, + "RumApplicationListResponse": { + "type": "object", + "description": "Paginated list of RUM applications.", + "properties": { + "has_next_page": { + "type": "boolean" + }, + "total": { + "type": "integer" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumApplicationItem" + } + } + } + }, + "RumApplicationIDRequest": { + "type": "object", + "required": [ + "application_id" + ], + "description": "Request with a single application ID.", + "properties": { + "application_id": { + "type": "string", + "description": "RUM application ID." + } + } + }, + "RumApplicationInfosRequest": { + "type": "object", + "required": [ + "application_ids" + ], + "description": "Batch application info request.", + "properties": { + "application_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Up to 200 application IDs." + } + } + }, + "RumApplicationInfosResponse": { + "type": "object", + "description": "Batch application info response.", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumApplicationItem" + } + } + } + }, + "RumApplicationCreateRequest": { + "type": "object", + "required": [ + "application_name", + "type", + "team_id" + ], + "description": "Parameters for creating a RUM application.", + "properties": { + "application_name": { + "type": "string", + "description": "Application name. 1–40 characters." + }, + "type": { + "type": "string", + "enum": [ + "browser", + "ios", + "android", + "react-native", + "flutter", + "kotlin-multiplatform", + "roku", + "unity" + ], + "description": "Application type." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID." + }, + "is_private": { + "type": "boolean", + "description": "Restrict access to team members only." + }, + "no_ip": { + "type": "boolean", + "description": "Do not collect IP addresses." + }, + "no_geo": { + "type": "boolean", + "description": "Do not infer geographic location." + }, + "alerting": { + "$ref": "#/components/schemas/RumApplicationAlerting" + }, + "tracing": { + "$ref": "#/components/schemas/RumApplicationTracing" + } + } + }, + "RumApplicationCreateResponse": { + "type": "object", + "description": "Result of creating a RUM application.", + "properties": { + "application_id": { + "type": "string", + "description": "Auto-generated unique application ID." + }, + "application_name": { + "type": "string", + "description": "Application display name." + }, + "client_token": { + "type": "string", + "description": "Token for RUM SDK initialization." + } + } + }, + "RumApplicationUpdateRequest": { + "type": "object", + "required": [ + "application_id" + ], + "description": "Parameters for updating a RUM application. All fields except `application_id` are optional.", + "properties": { + "application_id": { + "type": "string", + "description": "Application ID to update." + }, + "application_name": { + "type": "string", + "description": "New application name." + }, + "type": { + "type": "string", + "enum": [ + "browser", + "ios", + "android", + "react-native", + "flutter", + "kotlin-multiplatform", + "roku", + "unity" + ] + }, + "team_id": { + "type": "integer", + "format": "int64" + }, + "is_private": { + "type": "boolean" + }, + "no_ip": { + "type": "boolean" + }, + "no_geo": { + "type": "boolean" + }, + "alerting": { + "$ref": "#/components/schemas/RumApplicationAlerting" + }, + "tracing": { + "$ref": "#/components/schemas/RumApplicationTracing" + } + } + }, + "RumIssueItem": { + "type": "object", + "description": "A RUM error tracking issue.", + "properties": { + "team_id": { + "type": "integer", + "format": "int64" + }, + "issue_id": { + "type": "string", + "description": "Unique issue ID." + }, + "application_id": { + "type": "string" + }, + "application_name": { + "type": "string" + }, + "service": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "for_review", + "reviewed", + "ignored", + "resolved" + ] + }, + "error_count": { + "type": "integer", + "format": "int64", + "description": "Total error occurrences." + }, + "session_count": { + "type": "integer", + "format": "int64", + "description": "Affected user sessions." + }, + "is_crash": { + "type": "boolean", + "description": "Whether the error caused an app crash." + }, + "age": { + "type": "integer", + "format": "int64" + }, + "resolved_at": { + "type": "integer", + "format": "int64" + }, + "resolved_by": { + "type": "integer", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "first_seen": { + "type": "object", + "properties": { + "timestamp": { + "type": "integer", + "format": "int64" + }, + "version": { + "type": "string" + } + } + }, + "last_seen": { + "type": "object", + "properties": { + "timestamp": { + "type": "integer", + "format": "int64" + }, + "version": { + "type": "string" + } + } + }, + "error": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "suspected_cause": { + "type": "object", + "properties": { + "source": { + "type": "string", + "enum": [ + "auto", + "user" + ] + }, + "value": { + "type": "string", + "enum": [ + "api.failed_request", + "network.error", + "code.exception", + "code.invalid_object_access", + "code.invalid_argument", + "unknown" + ] + }, + "reason": { + "type": "string" + }, + "person_id": { + "type": "integer", + "format": "int64" + } + } + }, + "regression": { + "type": "object", + "description": "Regression metadata. Present only when a previously resolved issue re-occurred.", + "properties": { + "regressed_at": { + "type": "integer", + "format": "int64", + "description": "Timestamp when the regression was detected." + }, + "regressed_at_version": { + "type": "string", + "description": "Application version in which the regression was observed." + }, + "resolved_at": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the previous resolution before the regression." + } + } + }, + "versions": { + "type": "array", + "items": { + "type": "string" + } + }, + "severity": { + "type": "string", + "description": "Issue severity level." + } + } + }, + "RumIssueListRequest": { + "type": "object", + "required": [ + "start_time", + "end_time" + ], + "description": "Filters for listing issues.", + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "Start of time range, millisecond timestamp." + }, + "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." + }, + "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 statuses." + }, + "suspected_causes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by suspected causes." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by team IDs." + }, + "p": { + "type": "integer", + "description": "Page number. Default: 1." + }, + "limit": { + "type": "integer", + "description": "Page size. Range: 1–100. Default: 20." + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at", + "session_count", + "error_count" + ] + }, + "asc": { + "type": "boolean" + }, + "error_required": { + "type": "boolean", + "description": "If `true`, only return issues with at least one associated error event." + }, + "by_intersection": { + "type": "boolean" + } + } + }, + "RumIssueListResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumIssueItem" + } + }, + "has_next_page": { + "type": "boolean" + }, + "total": { + "type": "integer" + } + } + }, + "RumIssueIDRequest": { + "type": "object", + "required": [ + "issue_id" + ], + "properties": { + "issue_id": { + "type": "string", + "description": "Issue ID." + } + } + }, + "RumIssueUpdateRequest": { + "type": "object", + "required": [ + "issue_id" + ], + "description": "Parameters for updating an issue.", + "properties": { + "issue_id": { + "type": "string", + "description": "Issue ID to update." + }, + "status": { + "type": "string", + "enum": [ + "for_review", + "reviewed", + "ignored", + "resolved" + ], + "description": "New status." + }, + "suspected_cause": { + "type": "string", + "enum": [ + "api.failed_request", + "network.error", + "code.exception", + "code.invalid_object_access", + "code.invalid_argument", + "unknown" + ], + "description": "Suspected cause." + } + } + }, + "SourcemapListRequest": { + "type": "object", + "description": "Paginated filter for sourcemap listings.", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "Start of upload time range, Unix epoch milliseconds. Must be > 0 and before `end_time`." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "End of upload time range, Unix epoch milliseconds. Maximum window: 365 days." + }, + "type": { + "type": "string", + "description": "Platform type. Defaults to `browser` when omitted.", + "enum": [ + "browser", + "android", + "ios" + ] + }, + "services": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by service names. Up to 100 values." + }, + "versions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by version strings. Up to 100 values." + }, + "query": { + "type": "string", + "description": "Substring match on the minified URL (browser) or build ID (android). Max 200 characters." + }, + "build_id": { + "type": "string", + "description": "Android only. Filter by Gradle plugin build identifier. Max 200 characters." + }, + "uuid": { + "type": "string", + "description": "iOS only. Filter by dSYM bundle UUID. Max 200 characters." + }, + "p": { + "type": "integer", + "description": "Page number, starting at 1.", + "minimum": 1, + "default": 1, + "example": 1 + }, + "limit": { + "type": "integer", + "description": "Page size. Maximum 100. Default 20.", + "maximum": 100, + "default": 20, + "example": 20 + }, + "orderby": { + "type": "string", + "description": "Sort field.", + "enum": [ + "created_at", + "updated_at" + ] + }, + "asc": { + "type": "boolean", + "description": "Sort ascending. Default false (descending).", + "default": false + } + } + }, + "SourcemapItem": { + "type": "object", + "description": "A single uploaded sourcemap record.", + "properties": { + "key": { + "type": "string", + "description": "Storage key uniquely identifying this sourcemap file." + }, + "type": { + "type": "string", + "description": "Platform type: `browser`, `android`, or `ios`.", + "enum": [ + "browser", + "android", + "ios" + ] + }, + "service": { + "type": "string", + "description": "Application or service name." + }, + "version": { + "type": "string", + "description": "Application version string." + }, + "size": { + "type": "integer", + "format": "int64", + "description": "File size in bytes." + }, + "git_repository_url": { + "type": "string", + "description": "Git repository URL associated with this build." + }, + "git_commit_sha": { + "type": "string", + "description": "Git commit SHA for this build." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Upload timestamp, Unix epoch seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp, Unix epoch seconds." + }, + "metadata": { + "type": "object", + "description": "Free-form key-value metadata attached to the sourcemap. Shape depends on the upload client; common keys include `git_repository_url` and `git_commit_sha` (though those are also promoted to top-level fields).", + "additionalProperties": true + } + } + }, + "SourcemapListResponse": { + "type": "object", + "description": "Paginated list of sourcemap records.", + "required": [ + "total", + "items" + ], + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total number of matching records.", + "example": 3 + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SourcemapItem" + } + } + } + }, + "MemberEmptyObject": { + "type": "object", + "description": "Empty response", + "properties": {} + }, + "MemberInfoRequest": { + "type": "object", + "description": "Get member info request", + "properties": {} + }, + "MemberInfoResponse": { + "type": "object", + "description": "Current member profile", + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "Account ID" + }, + "account_name": { + "type": "string", + "description": "Account name" + }, + "account_avatar": { + "type": "string", + "description": "Account avatar URL" + }, + "account_email": { + "type": "string", + "description": "Account email" + }, + "account_role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Assigned role IDs" + }, + "account_locale": { + "type": "string", + "description": "Account-level locale preference (e.g. zh-CN or en-US)" + }, + "account_time_zone": { + "type": "string", + "description": "Account-level time zone (e.g. Asia/Shanghai)" + }, + "domain": { + "type": "string", + "description": "Account domain" + }, + "member_id": { + "type": "integer", + "format": "uint64", + "description": "Member ID" + }, + "member_name": { + "type": "string", + "description": "Member display name" + }, + "phone": { + "type": "string", + "description": "Masked phone number" + }, + "phone_verified": { + "type": "boolean", + "description": "Whether phone is verified" + }, + "email": { + "type": "string", + "description": "Email address" + }, + "email_verified": { + "type": "boolean", + "description": "Whether email is verified" + }, + "country_code": { + "type": "string", + "description": "Phone country code" + }, + "avatar": { + "type": "string", + "description": "Member avatar URL" + }, + "locale": { + "type": "string", + "description": "Locale preference" + }, + "time_zone": { + "type": "string", + "description": "Time zone" + }, + "is_external": { + "type": "boolean", + "description": "Whether provisioned via SSO" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "pending", + "deleted" + ], + "description": "Member status. `enabled` — active member; `pending` — invited but not yet accepted; `deleted` — removed from the organization." + } + } + }, + "MemberListRequest": { + "type": "object", + "description": "List members request", + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "Filter by role ID" + }, + "p": { + "type": "integer", + "minimum": 1, + "description": "Page number" + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "description": "Page size" + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "Sort field" + }, + "asc": { + "type": "boolean", + "description": "Ascending order" + }, + "query": { + "type": "string", + "description": "Search keyword" + } + } + }, + "MemberItem": { + "type": "object", + "description": "Member item", + "required": [ + "account_id", + "member_id", + "member_name", + "country_code", + "phone", + "email", + "phone_verified", + "email_verified", + "avatar", + "status", + "account_role_ids", + "created_at", + "updated_at", + "ref_id", + "is_external" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "Account ID" + }, + "member_id": { + "type": "integer", + "format": "uint64", + "description": "Member ID" + }, + "member_name": { + "type": "string", + "description": "Display name" + }, + "country_code": { + "type": "string", + "description": "Phone country code" + }, + "phone": { + "type": "string", + "description": "Masked phone number" + }, + "email": { + "type": "string", + "description": "Email address" + }, + "locale": { + "type": "string", + "description": "Locale" + }, + "time_zone": { + "type": "string", + "description": "Time zone" + }, + "phone_verified": { + "type": "boolean", + "description": "Phone verified" + }, + "email_verified": { + "type": "boolean", + "description": "Email verified" + }, + "avatar": { + "type": "string", + "description": "Avatar URL" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "pending", + "deleted" + ], + "description": "Member status. `enabled` — active member; `pending` — invited but not yet accepted; `deleted` — removed from the organization." + }, + "account_role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Role IDs" + }, + "is_external": { + "type": "boolean", + "description": "Provisioned via SSO" + }, + "ref_id": { + "type": "string", + "description": "External reference ID" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (Unix seconds)" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Update timestamp (Unix seconds)" + } + } + }, + "MemberListResponse": { + "type": "object", + "description": "Member list response", + "properties": { + "p": { + "type": "integer", + "description": "Current page" + }, + "limit": { + "type": "integer", + "description": "Page size" + }, + "total": { + "type": "integer", + "description": "Total count" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MemberItem" + }, + "description": "Member items" + } + } + }, + "MemberDeleteRequest": { + "type": "object", + "description": "Delete member request (provide one of the lookup fields)", + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "Member ID" + }, + "member_name": { + "type": "string", + "description": "Member name" + }, + "email": { + "type": "string", + "description": "Email address" + }, + "phone": { + "type": "string", + "description": "Phone number" + }, + "country_code": { + "type": "string", + "description": "Phone country code" + }, + "ref_id": { + "type": "string", + "description": "External reference ID" + } + } + }, + "InviteMemberItem": { + "type": "object", + "description": "Member to invite", + "properties": { + "member_name": { + "type": "string", + "minLength": 2, + "maxLength": 39, + "description": "Display name" + }, + "email": { + "type": "string", + "description": "Email address" + }, + "phone": { + "type": "string", + "description": "Phone number" + }, + "country_code": { + "type": "string", + "description": "Country code" + }, + "role_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Role IDs to assign" + }, + "locale": { + "type": "string", + "enum": [ + "zh-CN", + "en-US" + ], + "description": "Locale" + }, + "time_zone": { + "type": "string", + "description": "Time zone" + }, + "ref_id": { + "type": "string", + "description": "External reference ID" + } + } + }, + "MemberInviteRequest": { + "type": "object", + "description": "Invite members request", + "required": [ + "members" + ], + "properties": { + "members": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InviteMemberItem" + }, + "description": "Members to invite (max 20)" + }, + "from": { + "type": "string", + "description": "Invite source context" + } + } + }, + "NewMemberItem": { + "type": "object", + "description": "Newly created member", + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "Member ID" + }, + "member_name": { + "type": "string", + "description": "Member display name" + } + } + }, + "MemberInviteResponse": { + "type": "object", + "description": "Invite members response", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NewMemberItem" + }, + "description": "Newly created members" + } + } + }, + "MemberRoleGrantRequest": { + "type": "object", + "description": "Grant role to member request", + "required": [ + "member_id", + "role_ids" + ], + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "Member ID" + }, + "role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Role IDs to grant; appended to the member's current roles (duplicates are deduplicated)." + } + } + }, + "MemberRoleRevokeRequest": { + "type": "object", + "description": "Revoke role from member request", + "required": [ + "member_id", + "role_ids" + ], + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "Member ID" + }, + "role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Role IDs to remove from the member." + } + } + }, + "MemberRoleUpdateRequest": { + "type": "object", + "description": "Update member roles request", + "required": [ + "member_id", + "role_ids" + ], + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "Member ID" + }, + "role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "New set of role IDs" + } + } + }, + "MemberResetInfoRequest": { + "type": "object", + "description": "Reset member info request", + "required": [ + "member_id" + ], + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "Member ID of the member to update" + }, + "member_name": { + "type": "string", + "minLength": 2, + "maxLength": 39, + "description": "Display name" + }, + "email": { + "type": "string", + "description": "Email address" + }, + "phone": { + "type": "string", + "description": "Phone number" + }, + "country_code": { + "type": "string", + "description": "Country code" + }, + "avatar": { + "type": "string", + "description": "Avatar URL" + }, + "locale": { + "type": "string", + "enum": [ + "zh-CN", + "en-US" + ], + "description": "Locale" + }, + "time_zone": { + "type": "string", + "description": "Time zone" + } + } + }, + "PersonInfosRequest": { + "type": "object", + "description": "Get person info by IDs request", + "required": [ + "person_ids" + ], + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "List of person IDs" + } + } + }, + "PersonItem": { + "type": "object", + "description": "Person profile", + "required": [ + "account_id", + "person_id", + "phone_verified", + "email_verified" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "Account ID" + }, + "person_id": { + "type": "integer", + "format": "uint64", + "description": "Person ID" + }, + "person_name": { + "type": "string", + "description": "Display name" + }, + "avatar": { + "type": "string", + "description": "Avatar URL" + }, + "locale": { + "type": "string", + "description": "Locale" + }, + "time_zone": { + "type": "string", + "description": "Time zone" + }, + "email": { + "type": "string", + "description": "Email address" + }, + "phone": { + "type": "string", + "description": "Phone number" + }, + "phone_verified": { + "type": "boolean", + "description": "Phone verified" + }, + "email_verified": { + "type": "boolean", + "description": "Email verified" + }, + "as": { + "type": "string", + "description": "Login role (account/member)" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "pending", + "deleted" + ], + "description": "Person status. `enabled` — active; `pending` — invited but not yet accepted; `deleted` — removed." + } + } + }, + "PersonInfosResponse": { + "type": "object", + "description": "Person info by IDs response", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PersonItem" + }, + "description": "Person profiles" + } + } + }, + "TeamItem": { + "type": "object", + "description": "A team and its membership.", + "required": [ + "account_id", + "team_id", + "team_name", + "description", + "status", + "updated_by_name", + "updated_by", + "creator_id", + "creator_name", + "created_at", + "updated_at", + "person_ids", + "ref_id" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "Owning account ID." + }, + "team_id": { + "type": "integer", + "format": "uint64", + "description": "Unique team ID." + }, + "team_name": { + "type": "string", + "description": "Team display name. 1–39 characters, unique per account." + }, + "description": { + "type": "string", + "description": "Free-form description." + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "Team status." + }, + "updated_by_name": { + "type": "string", + "description": "Display name of the last editor." + }, + "updated_by": { + "type": "integer", + "format": "uint64", + "description": "Member ID of the last editor." + }, + "creator_id": { + "type": "integer", + "format": "uint64", + "description": "Member ID of the creator." + }, + "creator_name": { + "type": "string", + "description": "Display name of the creator." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Unix epoch seconds the team was created." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Unix epoch seconds the team was last updated." + }, + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Member IDs of team members." + }, + "ref_id": { + "type": "string", + "description": "External reference ID for third-party HR system integration." + } + } + }, + "TeamInfoRequest": { + "type": "object", + "description": "Request identifying a team by one of ID, name, or external ref.", + "properties": { + "team_id": { + "type": "integer", + "format": "uint64", + "description": "Team ID." + }, + "team_name": { + "type": "string", + "description": "Team name." + }, + "ref_id": { + "type": "string", + "description": "External reference ID." + } + } + }, + "TeamInfosRequest": { + "type": "object", + "required": [ + "team_ids" + ], + "description": "Request for batch team lookup by IDs.", + "properties": { + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "List of team IDs to look up. Max 100." + } + } + }, + "TeamBriefItem": { + "type": "object", + "description": "Brief team info for batch responses.", + "properties": { + "team_id": { + "type": "integer", + "format": "uint64" + }, + "team_name": { + "type": "string" + }, + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + } + } + } + }, + "TeamInfosResponse": { + "type": "object", + "description": "Batch team info result.", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamBriefItem" + } + } + } + }, + "TeamListRequest": { + "type": "object", + "description": "Filters for listing teams.", + "properties": { + "p": { + "type": "integer", + "description": "Page number. Default: 1.", + "minimum": 1, + "default": 1 + }, + "limit": { + "type": "integer", + "description": "Page size. Max: 100. Default: 20.", + "minimum": 1, + "maximum": 100, + "default": 20 + }, + "orderby": { + "type": "string", + "description": "Sort field.", + "enum": [ + "created_at", + "updated_at", + "team_name" + ] + }, + "asc": { + "type": "boolean", + "description": "Ascending sort order." + }, + "person_id": { + "type": "integer", + "format": "uint64", + "description": "Filter by member ID — return only teams this person belongs to." + }, + "query": { + "type": "string", + "description": "Substring match on team name." + } + } + }, + "TeamListResponse": { + "type": "object", + "description": "Paginated team list.", + "required": [ + "p", + "limit", + "total", + "items" + ], + "properties": { + "p": { + "type": "integer", + "description": "Current page number." + }, + "limit": { + "type": "integer", + "description": "Page size used." + }, + "total": { + "type": "integer", + "description": "Total number of teams matching the filter." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamItem" + } + } + } + }, + "TeamUpsertRequest": { + "type": "object", + "required": [ + "team_name" + ], + "description": "Parameters for creating or updating a team.", + "properties": { + "team_id": { + "type": "integer", + "format": "uint64", + "description": "Team ID. Omit or set to 0 to create a new team." + }, + "team_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Team display name. 1–39 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Free-form description." + }, + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Member IDs to set as team members. Replaces the existing member list." + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "description": "Email addresses to invite as members." + }, + "phones": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Phone numbers to invite as members." + }, + "countryCode": { + "type": "string", + "description": "Default country code applied to any `phones` entries that are not in E.164 format." + }, + "ref_id": { + "type": "string", + "description": "External reference ID for HR system integration." + }, + "reset_if_name_exist": { + "type": "boolean", + "description": "If true and a team with the same name already exists, reset its membership to the provided person_ids." + } + } + }, + "TeamUpsertResponse": { + "type": "object", + "description": "Team create/update result.", + "required": [ + "team_id", + "team_name" + ], + "properties": { + "team_id": { + "type": "integer", + "format": "uint64", + "description": "Created or updated team ID." + }, + "team_name": { + "type": "string", + "description": "Team name echoed from the request." + } + } + }, + "TeamDeleteRequest": { + "type": "object", + "description": "Request identifying a team to delete.", + "properties": { + "team_id": { + "type": "integer", + "format": "uint64", + "description": "Team ID." + }, + "team_name": { + "type": "string", + "description": "Team name." + }, + "ref_id": { + "type": "string", + "description": "External reference ID." + } + } + }, + "PlatformEmptyObject": { + "type": "object", + "description": "Empty object returned on success for operations with no meaningful payload.", + "additionalProperties": false + }, + "RoleItem": { + "type": "object", + "description": "A role and its permission set.", + "required": [ + "role_id", + "role_name", + "description", + "status", + "permission_ids", + "editable", + "created_at", + "updated_at" + ], + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "Unique role ID." + }, + "role_name": { + "type": "string", + "description": "Role display name." + }, + "description": { + "type": "string", + "description": "Role description." + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "Role status." + }, + "permission_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "IDs of permissions granted by this role." + }, + "editable": { + "type": "boolean", + "description": "False for built-in roles which cannot be modified." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Unix epoch seconds the role was created." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Unix epoch seconds the role was last updated." + } + } + }, + "RoleInfoRequest": { + "type": "object", + "required": [ + "role_id" + ], + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "Role ID." + } + } + }, + "RoleIDRequest": { + "type": "object", + "required": [ + "role_id" + ], + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "Role ID." + } + } + }, + "RoleListRequest": { + "type": "object", + "description": "Filters for listing roles.", + "properties": { + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "Sort field." + }, + "asc": { + "type": "boolean", + "description": "Ascending sort order." + } + } + }, + "RoleListResponse": { + "type": "object", + "description": "Role list result.", + "required": [ + "total", + "items" + ], + "properties": { + "total": { + "type": "integer", + "description": "Total role count." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoleItem" + } + } + } + }, + "RoleUpsertRequest": { + "type": "object", + "required": [ + "role_name" + ], + "description": "Parameters for creating or updating a custom role.", + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "Role ID. Omit or set to 0 to create." + }, + "role_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Role display name. 1–39 characters." + }, + "description": { + "type": "string", + "maxLength": 499, + "description": "Role description." + }, + "permission_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Permission IDs to grant. Replaces the existing set." + } + } + }, + "RoleUpsertResponse": { + "type": "object", + "description": "Role create/update result.", + "required": [ + "role_id", + "role_name" + ], + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "Created or updated role ID." + }, + "role_name": { + "type": "string", + "description": "Role name echoed from the request." + } + } + }, + "RolePermissionListRequest": { + "type": "object", + "description": "Filters for listing permissions.", + "properties": { + "role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Filter to permissions granted to these roles." + }, + "with_all": { + "type": "boolean", + "description": "If true, return all permissions with is_granted set to indicate which are granted." + } + } + }, + "PermissionItem": { + "type": "object", + "description": "A permission entry.", + "required": [ + "id", + "permission_name", + "permission_type", + "description", + "class", + "scope", + "status" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "Unique permission ID." + }, + "permission_name": { + "type": "string", + "description": "Permission display name." + }, + "permission_type": { + "type": "string", + "enum": [ + "read", + "manage" + ], + "description": "Whether this is a read or manage permission." + }, + "description": { + "type": "string", + "description": "Human-readable permission description." + }, + "class": { + "type": "string", + "description": "Permission class (e.g., 'On-call', 'Organization')." + }, + "scope": { + "type": "string", + "description": "Permission scope (e.g., 'on-call', 'organization')." + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "Permission status." + }, + "is_granted": { + "type": "boolean", + "description": "Present when with_all is true. Indicates whether this permission is granted to the requested roles." + } + } + }, + "RolePermissionListResponse": { + "type": "object", + "description": "Permission list result.", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PermissionItem" + } + } + } + }, + "PermissionFactorListRequest": { + "type": "object", + "description": "Filters for listing permission factors.", + "properties": { + "factor_types": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "api", + "button", + "visit", + "menu", + "url" + ] + }, + "description": "Filter by factor type." + } + } + }, + "PermissionFactorItem": { + "type": "object", + "description": "A permission factor.", + "required": [ + "factor_name", + "factor_type" + ], + "properties": { + "factor_name": { + "type": "string", + "description": "Factor identifier (e.g., 'template:read:info')." + }, + "factor_type": { + "type": "string", + "enum": [ + "api", + "button", + "visit", + "menu", + "url" + ], + "description": "Factor type." + } + } + }, + "PermissionFactorListResponse": { + "type": "array", + "description": "List of permission factors.", + "items": { + "$ref": "#/components/schemas/PermissionFactorItem" + } + }, + "RoleGrantRequest": { + "type": "object", + "required": [ + "member_ids", + "role_id" + ], + "description": "Request to grant or revoke a role from members.", + "properties": { + "member_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Member IDs to grant/revoke the role. Max 100." + }, + "role_id": { + "type": "integer", + "format": "uint64", + "description": "Role ID to grant or revoke." + } + } + }, + "AuditSearchRequest": { + "type": "object", + "description": "Filter criteria for audit log search. Time range is required.", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "Start of the search window, Unix epoch seconds.", + "example": 1712620800 + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "End of the search window, Unix epoch seconds. Must be after `start_time`. Maximum span 90 days.", + "example": 1712707200 + }, + "limit": { + "type": "integer", + "description": "Page size. Minimum 0, maximum 99.", + "minimum": 0, + "maximum": 99, + "example": 20 + }, + "request_id": { + "type": "string", + "description": "Filter to a single request by its unique request ID." + }, + "search_after_ctx": { + "type": "string", + "description": "Opaque pagination cursor returned by the previous response. Leave empty for the first page." + }, + "operations": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter to specific operation names. Use `POST /audit/operation/list` to get the valid set." + }, + "person_id": { + "type": "integer", + "format": "uint64", + "description": "Filter by the member who performed the action." + }, + "is_dangerous": { + "type": "boolean", + "description": "When true, return only high-risk (dangerous) operations." + }, + "is_write": { + "type": "boolean", + "description": "When true, return only write operations; when false, return only read operations." + } + } + }, + "AuditLog": { + "type": "object", + "description": "A single audit log entry.", + "required": [ + "created_at", + "account_id", + "member_id", + "member_name", + "request_id", + "ip", + "operation", + "operation_name", + "body", + "params", + "is_dangerous", + "is_write" + ], + "properties": { + "created_at": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the operation in Unix epoch milliseconds." + }, + "account_id": { + "type": "integer", + "format": "uint64", + "description": "ID of the account." + }, + "member_id": { + "type": "integer", + "format": "uint64", + "description": "ID of the member who performed the action." + }, + "member_name": { + "type": "string", + "description": "Display name of the member." + }, + "request_id": { + "type": "string", + "description": "Unique request ID for correlation." + }, + "ip": { + "type": "string", + "description": "Client IP address of the caller." + }, + "operation": { + "type": "string", + "description": "Stable machine-readable operation name, e.g. `template:write:create`." + }, + "operation_name": { + "type": "string", + "description": "Human-readable operation label in the account's locale." + }, + "body": { + "type": "string", + "description": "JSON-encoded request body (may be truncated at 10 KB)." + }, + "params": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Key": { + "type": "string" + }, + "Value": { + "type": "string" + } + } + }, + "description": "URL path parameters as an array of key-value pairs, or an empty array when none." + }, + "is_dangerous": { + "type": "boolean", + "description": "True if this is flagged as a high-risk operation." + }, + "is_write": { + "type": "boolean", + "description": "True for mutating operations; false for read-only ones." + } + } + }, + "AuditSearchResponse": { + "type": "object", + "description": "Cursor-paginated audit log search result.", + "required": [ + "total", + "search_after_ctx" + ], + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total matching entries in the search window.", + "example": 2 + }, + "search_after_ctx": { + "type": "string", + "description": "Opaque cursor for the next page. Empty string when there are no more results." + }, + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuditLog" + }, + "description": "Audit log entries for this page." + } + } + }, + "AuditOperationListRequest": { + "type": "object", + "description": "No parameters required.", + "additionalProperties": false + }, + "AuditOperationTypeItem": { + "type": "object", + "description": "An auditable operation type.", + "required": [ + "name", + "name_cn" + ], + "properties": { + "name": { + "type": "string", + "description": "Stable machine-readable operation name for use as a filter.", + "example": "template:write:create" + }, + "name_cn": { + "type": "string", + "description": "Human-readable Chinese label shown in the console.", + "example": "创建模板" + } + } + }, + "AuditOperationListResponse": { + "type": "object", + "description": "List of auditable operation types.", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuditOperationTypeItem" + } + } + } + } + } + } +} diff --git a/api-reference/openapi.zh.json b/api-reference/openapi.zh.json new file mode 100644 index 0000000..374a653 --- /dev/null +++ b/api-reference/openapi.zh.json @@ -0,0 +1,34247 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Flashduty 开放 API", + "description": "Flashduty 事件管理平台的公开 HTTP API —— 覆盖故障、通知模板、协作空间、值班排班、监控、RUM、以及平台管理。每次调用都需在 query 中携带 `app_key`,该 key 在 Flashduty 控制台 账户 → APP Key 中签发。所有响应使用统一结构:成功时为 `{ request_id, data }`,失败时为 `{ request_id, error }`。", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://api.flashcat.cloud", + "description": "Flashduty Open API" + } + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "tags": [ + { + "name": "On-call/故障管理", + "description": "" + }, + { + "name": "On-call/协作空间", + "description": "" + }, + { + "name": "On-call/告警管理", + "description": "查询、查看和处理告警,管理卡片视图与告警处理规则。" + }, + { + "name": "On-call/集成中心", + "description": "" + }, + { + "name": "On-call/值班排班", + "description": "" + }, + { + "name": "On-call/日历管理", + "description": "" + }, + { + "name": "On-call/通知模板", + "description": "" + }, + { + "name": "On-call/标签增强", + "description": "自定义字段、富化规则及数据映射(映射规则、映射数据、映射 API)管理。" + }, + { + "name": "On-call/分析看板", + "description": "" + }, + { + "name": "On-call/状态页", + "description": "" + }, + { + "name": "Monitors/告警规则", + "description": "创建、管理和导出监控告警规则,查询规则统计和审计历史。" + }, + { + "name": "Monitors/告警数据源", + "description": "管理监控告警规则用于查询指标的数据源。" + }, + { + "name": "Monitors/规则集", + "description": "管理 Monitors 规则仓库中的共享规则集,规则集可在账户内或公开共享。" + }, + { + "name": "RUM/应用管理", + "description": "管理前端性能监控(RUM)应用。" + }, + { + "name": "RUM/RUM 问题跟踪", + "description": "查询和管理 RUM 异常追踪 Issue 及预设严重性规则。" + }, + { + "name": "RUM/RUM Sourcemap", + "description": "管理和查询用于 Browser、Android、iOS 错误符号化的 RUM Sourcemap 文件。" + }, + { + "name": "平台/成员管理", + "description": "" + }, + { + "name": "平台/团队管理", + "description": "" + }, + { + "name": "平台/角色与权限", + "description": "" + }, + { + "name": "平台/审计日志", + "description": "检索和读取账户操作审计日志。" + } + ], + "paths": { + "/incident/list": { + "post": { + "operationId": "incidentList", + "summary": "查询故障列表", + "description": "分页查询故障列表,支持按协作空间、严重程度、状态、处理人员和时间范围过滤。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-list", + "metadata": { + "sidebarTitle": "查询故障列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/IncidentListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 88, + "has_next_page": true, + "search_after_ctx": "69da451ef77b1b51f40e83eb", + "items": [ + { + "incident_id": "69da451ef77b1b51f40e83ee", + "account_id": 2451002751131, + "channel_id": 2551105804131, + "integration_id": 2490562293131, + "integration_ids": [ + 2490562293131 + ], + "integration_types": [ + "monit.alert" + ], + "dedup_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata", + "equals_md5": "", + "start_time": 1775912219, + "end_time": 0, + "last_time": 1775969819, + "ack_time": 0, + "close_time": 0, + "creator_id": 0, + "closer_id": 0, + "owner_id": 0, + "incident_status": "Critical", + "incident_severity": "Critical", + "progress": "Triggered", + "title": "CPU usage high - web-server-01", + "description": "", + "ai_summary": "", + "impact": "", + "root_cause": "", + "resolution": "", + "num": "0E83EE", + "frequency": "frequent", + "created_at": 1775912222, + "updated_at": 1775972145, + "snoozed_before": 0, + "group_method": "n", + "ever_muted": false, + "labels": { + "check": "cpu_usage_high", + "resource": "web-server-01", + "env": "production" + }, + "fields": {}, + "assigned_to": { + "person_ids": [ + 2476444212131 + ], + "escalate_rule_id": "000000000000000000000000", + "layer_idx": 0, + "type": "assign", + "assigned_at": 1775972128, + "id": "MvQfH9Dc8eNS8k79jmrWn6", + "escalate_rule_name": "" + }, + "alert_cnt": 1, + "active_alert_cnt": 1, + "alert_event_cnt": 17, + "responders": [ + { + "person_id": 2476444212131, + "assigned_at": 1775972128, + "acknowledged_at": 0 + } + ], + "account_name": "", + "account_locale": "", + "account_time_zone": "", + "channel_name": "Ops Channel", + "channel_status": "enabled", + "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee", + "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee", + "integration_type": "monit.alert", + "post_mortem_id": "", + "images": null, + "manual_overrides": [ + "title" + ] + } + ] + } + } + } + } + }, + "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/ListIncidentsRequest" + }, + "example": { + "start_time": 1711900800, + "end_time": 1712000000, + "progress": "Triggered,Processing", + "incident_severity": "Critical,Warning", + "channel_ids": [ + 2551105804131 + ], + "limit": 20, + "p": 1 + } + } + } + } + } + }, + "/incident/info": { + "post": { + "operationId": "incidentInfo", + "summary": "获取故障详情", + "description": "获取单个故障的详细信息,包括时间线、关联告警、处理人员和自定义字段。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-info", + "metadata": { + "sidebarTitle": "获取故障详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/IncidentInfo" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "incident_id": "69da451ef77b1b51f40e83ee", + "account_id": 2451002751131, + "channel_id": 2551105804131, + "integration_id": 2490562293131, + "integration_ids": [ + 2490562293131 + ], + "integration_types": [ + "monit.alert" + ], + "dedup_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata", + "equals_md5": "", + "start_time": 1775912219, + "end_time": 0, + "last_time": 1775969819, + "ack_time": 0, + "close_time": 0, + "creator_id": 0, + "closer_id": 0, + "owner_id": 0, + "incident_status": "Critical", + "incident_severity": "Critical", + "progress": "Triggered", + "title": "CPU usage high - web-server-01", + "description": "", + "ai_summary": "", + "impact": "", + "root_cause": "", + "resolution": "", + "num": "0E83EE", + "frequency": "frequent", + "created_at": 1775912222, + "updated_at": 1775972145, + "snoozed_before": 0, + "group_method": "n", + "ever_muted": false, + "labels": { + "check": "cpu_usage_high", + "resource": "web-server-01", + "env": "production" + }, + "fields": {}, + "assigned_to": { + "person_ids": [ + 2476444212131 + ], + "escalate_rule_id": "000000000000000000000000", + "layer_idx": 0, + "type": "assign", + "assigned_at": 1775972128, + "id": "MvQfH9Dc8eNS8k79jmrWn6", + "escalate_rule_name": "" + }, + "alert_cnt": 1, + "active_alert_cnt": 1, + "alert_event_cnt": 17, + "responders": [ + { + "person_id": 2476444212131, + "assigned_at": 1775972128, + "acknowledged_at": 0 + } + ], + "account_name": "", + "account_locale": "", + "account_time_zone": "", + "channel_name": "Ops Channel", + "channel_status": "enabled", + "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee", + "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee", + "integration_type": "monit.alert", + "post_mortem_id": "", + "images": null, + "manual_overrides": [ + "title" + ] + } + } + } + } + }, + "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/IncidentInfoRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee" + } + } + } + } + } + }, + "/incident/list-by-ids": { + "post": { + "operationId": "incidentListByIds", + "summary": "批量查询故障", + "description": "通过故障 ID 列表批量获取故障信息。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-list-by-ids", + "metadata": { + "sidebarTitle": "批量查询故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/IncidentListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 2, + "has_next_page": false, + "items": [ + { + "incident_id": "69da451ef77b1b51f40e83ee", + "account_id": 2451002751131, + "channel_id": 2551105804131, + "integration_id": 2490562293131, + "integration_ids": [ + 2490562293131 + ], + "integration_types": [ + "monit.alert" + ], + "dedup_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata", + "equals_md5": "", + "start_time": 1775912219, + "end_time": 0, + "last_time": 1775969819, + "ack_time": 0, + "close_time": 0, + "creator_id": 0, + "closer_id": 0, + "owner_id": 0, + "incident_status": "Critical", + "incident_severity": "Critical", + "progress": "Triggered", + "title": "CPU usage high - web-server-01", + "description": "", + "ai_summary": "", + "impact": "", + "root_cause": "", + "resolution": "", + "num": "0E83EE", + "frequency": "frequent", + "created_at": 1775912222, + "updated_at": 1775972145, + "snoozed_before": 0, + "group_method": "n", + "ever_muted": false, + "labels": {}, + "fields": {}, + "assigned_to": { + "escalate_rule_id": "000000000000000000000000", + "layer_idx": 0, + "type": "", + "assigned_at": 0, + "id": "", + "escalate_rule_name": "" + }, + "alert_cnt": 1, + "active_alert_cnt": 1, + "alert_event_cnt": 17, + "responders": [], + "account_name": "", + "account_locale": "", + "account_time_zone": "", + "channel_name": "Ops Channel", + "channel_status": "enabled", + "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee", + "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee", + "integration_type": "monit.alert", + "post_mortem_id": "", + "images": null, + "manual_overrides": null + } + ] + } + } + } + } + }, + "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/ListIncidentsByIdsRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee", + "69da451ef77b1b51f40e83ef" + ] + } + } + } + } + } + }, + "/incident/alert/list": { + "post": { + "operationId": "incidentAlertList", + "summary": "查询故障关联告警", + "description": "查询合并到指定故障中的所有告警列表。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-alert-list", + "metadata": { + "sidebarTitle": "查询故障关联告警" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListIncidentAlertsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "items": [ + { + "alert_id": "69da451df77b1b51f40e83de", + "integration_id": 2490562293131, + "data_source_id": 2490562293131, + "channel_id": 2551105804131, + "account_id": 2451002751131, + "description": "", + "title": "CPU usage high - web-server-01", + "title_rule": "", + "alert_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata", + "alert_severity": "Critical", + "alert_status": "Critical", + "start_time": 1775912219, + "last_time": 1775969819, + "end_time": 0, + "labels": { + "check": "cpu_usage_high", + "resource": "web-server-01" + }, + "ever_muted": false, + "created_at": 1775912221, + "updated_at": 1775969821, + "integration_name": "FlashMonit", + "integration_type": "monit.alert", + "integration_ref_id": "a_2451002751131", + "channel_name": "Ops Channel", + "channel_status": "enabled", + "responder_name": "", + "responder_email": "", + "incident": { + "incident_id": "69da451ef77b1b51f40e83ee", + "title": "CPU usage high - web-server-01", + "progress": "Triggered" + }, + "event_cnt": 17, + "images": null, + "data_source_name": "FlashMonit", + "data_source_type": "monit.alert", + "data_source_ref_id": "a_2451002751131" + } + ] + } + } + } + } + }, + "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/ListIncidentAlertsRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "is_active": true, + "limit": 100, + "p": 1 + } + } + } + } + } + }, + "/incident/feed": { + "post": { + "operationId": "incidentFeed", + "summary": "获取故障时间线", + "description": "获取指定故障的时间线动态,包括状态变更、评论和系统事件。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-feed", + "metadata": { + "sidebarTitle": "获取故障时间线" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListIncidentFeedResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "has_next_page": true, + "items": [ + { + "ref_id": "69da451ef77b1b51f40e83ee", + "type": "i_new", + "detail": { + "severity": "Critical", + "title": "CPU usage high - web-server-01" + }, + "account_id": 2451002751131, + "creator_id": 0, + "created_at": 1775912222661, + "updated_at": 1775912222661 + }, + { + "ref_id": "69da451ef77b1b51f40e83ee", + "type": "i_notify", + "detail": { + "rid": "5e9ccfabcd154b41a0005fd0f52b674b", + "msg_id": "naFudJYCawBWsChdV6ErPH", + "fire_type": "fire", + "escalate_rule_id": "000000000000000000000000", + "layer_idx": 0, + "by": "email", + "persons": [ + { + "person_id": 2476444212131 + } + ] + }, + "account_id": 2451002751131, + "creator_id": 0, + "created_at": 1775972130174, + "updated_at": 1775972130174 + } + ] + } + } + } + } + }, + "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/ListIncidentFeedRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "p": 1, + "limit": 20 + } + } + } + } + } + }, + "/incident/past/list": { + "post": { + "operationId": "incidentPastList", + "summary": "查询历史相似故障", + "description": "查询与当前故障相关的历史故障列表,用于参考排查。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **100 次/分钟**;**20 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-past-list", + "metadata": { + "sidebarTitle": "查询历史相似故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListPastIncidentsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [] + } + } + } + } + }, + "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/ListPastIncidentsRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "limit": 5 + } + } + } + } + } + }, + "/incident/create": { + "post": { + "operationId": "incidentCreate", + "summary": "创建故障", + "description": "手动创建一个新故障并分派处理人员。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-create", + "metadata": { + "sidebarTitle": "创建故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CreateIncidentResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "incident_id": "69db2ef1a0fe7db6448b14f1", + "title": "API test incident for docs" + } + } + } + } + }, + "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/CreateIncidentRequest" + }, + "example": { + "incident_severity": "Critical", + "title": "Database connection timeout on prod-db-01", + "channel_id": 2551105804131, + "assigned_to": { + "person_ids": [ + 2476444212131 + ] + } + } + } + } + } + } + }, + "/incident/ack": { + "post": { + "operationId": "incidentAck", + "summary": "认领故障", + "description": "认领一个故障以表明正在积极处理。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-ack", + "metadata": { + "sidebarTitle": "认领故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AckIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] + } + } + } + } + } + }, + "/incident/unack": { + "post": { + "operationId": "incidentUnack", + "summary": "取消认领故障", + "description": "取消故障的认领状态。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-unack", + "metadata": { + "sidebarTitle": "取消认领故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnackIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] + } + } + } + } + } + }, + "/incident/resolve": { + "post": { + "operationId": "incidentResolve", + "summary": "恢复故障", + "description": "将故障标记为已恢复。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-resolve", + "metadata": { + "sidebarTitle": "恢复故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResolveIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ], + "root_cause": "Memory leak in the connection pool caused by a missing cleanup call.", + "resolution": "Deployed hotfix v2.3.1 and restarted the affected service." + } + } + } + } + } + }, + "/incident/reopen": { + "post": { + "operationId": "incidentReopen", + "summary": "重开故障", + "description": "重新打开一个已恢复的故障。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-reopen", + "metadata": { + "sidebarTitle": "重开故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReopenIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ], + "reason": "Monitoring detected the issue recurred after the initial fix." + } + } + } + } + } + }, + "/incident/snooze": { + "post": { + "operationId": "incidentSnooze", + "summary": "暂停故障通知", + "description": "暂时屏蔽故障通知直到指定时间。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-snooze", + "metadata": { + "sidebarTitle": "暂停故障通知" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnoozeIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ], + "minutes": 60 + } + } + } + } + } + }, + "/incident/wake": { + "post": { + "operationId": "incidentWake", + "summary": "恢复故障通知", + "description": "取消故障的暂停状态,恢复通知。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-wake", + "metadata": { + "sidebarTitle": "恢复故障通知" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WakeIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] + } + } + } + } + } + }, + "/incident/merge": { + "post": { + "operationId": "incidentMerge", + "summary": "合并故障", + "description": "将一个或多个故障合并到目标故障中。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-merge", + "metadata": { + "sidebarTitle": "合并故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MergeIncidentsRequest" + }, + "example": { + "source_incident_ids": [ + "69da451ef77b1b51f40e83ef", + "69da451ef77b1b51f40e83f0" + ], + "target_incident_id": "69da451ef77b1b51f40e83ee", + "comment": "Merging related database connectivity incidents into one." + } + } + } + } + } + }, + "/incident/disable-merge": { + "post": { + "operationId": "incidentDisableMerge", + "summary": "禁止故障合并", + "description": "禁用指定故障的自动合并功能。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-disable-merge", + "metadata": { + "sidebarTitle": "禁止故障合并" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DisableIncidentMergeRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] + } + } + } + } + } + }, + "/incident/reset": { + "post": { + "operationId": "incidentReset", + "summary": "更新故障信息", + "description": "一次调用更新故障的多个可编辑字段,包括标题、描述、影响范围、根因、恢复方案和严重程度。至少需要提供一个字段。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-reset", + "metadata": { + "sidebarTitle": "更新故障信息" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateIncidentFieldsRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "title": "Database connection timeout - prod-db-01 primary", + "incident_severity": "Critical" + } + } + } + } + } + }, + "/incident/remove": { + "post": { + "operationId": "incidentRemove", + "summary": "删除故障", + "description": "永久删除一个故障及其关联数据。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-remove", + "metadata": { + "sidebarTitle": "删除故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RemoveIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] + } + } + } + } + } + }, + "/incident/comment": { + "post": { + "operationId": "incidentComment", + "summary": "评论故障", + "description": "在故障时间线上添加文字评论。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-comment", + "metadata": { + "sidebarTitle": "评论故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentIncidentRequest" + }, + "example": { + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ], + "comment": "Identified the root cause. Rolling back the deployment now." + } + } + } + } + } + }, + "/incident/assign": { + "post": { + "operationId": "incidentAssign", + "summary": "分派故障", + "description": "将故障分派到指定的升级环节或处理人员。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-assign", + "metadata": { + "sidebarTitle": "分派故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssignIncidentRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "assigned_to": { + "person_ids": [ + 2476444212131 + ], + "type": "assign" + } + } + } + } + } + } + }, + "/incident/responder/add": { + "post": { + "operationId": "incidentResponderAdd", + "summary": "添加故障处理人员", + "description": "向已有故障添加处理人员。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-responder-add", + "metadata": { + "sidebarTitle": "添加故障处理人员" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddIncidentResponderRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "person_ids": [ + 2476444212131, + 2476444212132 + ] + } + } + } + } + } + }, + "/incident/field/reset": { + "post": { + "operationId": "incidentFieldReset", + "summary": "更新故障自定义字段", + "description": "更新故障的自定义字段值。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-field-reset", + "metadata": { + "sidebarTitle": "更新故障自定义字段" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetIncidentFieldRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "field_name": "affected_service", + "field_value": "payment-service" + } + } + } + } + } + }, + "/incident/custom-action/do": { + "post": { + "operationId": "incidentCustomActionDo", + "summary": "执行自定义操作", + "description": "执行为故障配置的自定义操作。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-custom-action-do", + "metadata": { + "sidebarTitle": "执行自定义操作" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DoIncidentCustomActionResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "message": "" + } + } + } + } + }, + "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/DoIncidentCustomActionRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "integration_id": 2490562293131 + } + } + } + } + } + }, + "/incident/war-room/detail": { + "post": { + "operationId": "incidentWarRoomDetail", + "summary": "获取战情室详情", + "description": "获取故障的战情室配置和成员信息。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-war-room-detail", + "metadata": { + "sidebarTitle": "获取战情室详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/WarRoom" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000", + "chat_name": "Incident #0E83EE war room", + "share_link": "" + } + } + } + } + }, + "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/GetWarRoomDetailRequest" + }, + "example": { + "integration_id": 2490562293131, + "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000" + } + } + } + } + } + }, + "/incident/war-room/list": { + "post": { + "operationId": "incidentWarRoomList", + "summary": "查询战情室列表", + "description": "查询故障关联的所有战情室。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-war-room-list", + "metadata": { + "sidebarTitle": "查询战情室列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListWarRoomsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [] + } + } + } + } + }, + "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/ListWarRoomsRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee" + } + } + } + } + } + }, + "/incident/war-room/create": { + "post": { + "operationId": "incidentWarRoomCreate", + "summary": "创建战情室", + "description": "为故障协同响应创建战情室频道。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-war-room-create", + "metadata": { + "sidebarTitle": "创建战情室" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/WarRoom" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000", + "chat_name": "Incident #0E83EE war room", + "share_link": "" + } + } + } + } + }, + "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/CreateWarRoomRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "integration_id": 2490562293131, + "add_observers": true + } + } + } + } + } + }, + "/incident/war-room/delete": { + "post": { + "operationId": "incidentWarRoomDelete", + "summary": "删除战情室", + "description": "删除指定的故障战情室。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-war-room-delete", + "metadata": { + "sidebarTitle": "删除战情室" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteWarRoomRequest" + }, + "example": { + "incident_id": "69da451ef77b1b51f40e83ee", + "integration_id": 2490562293131 + } + } + } + } + } + }, + "/incident/post-mortem/info": { + "get": { + "operationId": "incidentPostMortemInfo", + "summary": "获取复盘报告", + "description": "获取指定故障的复盘报告。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-post-mortem-info", + "metadata": { + "sidebarTitle": "获取复盘报告" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PostMortemItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "meta": { + "account_id": 2451002751131, + "title": "Postmortem1", + "status": "published", + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "template_id": "post_mortem_default_tmpl_en-us", + "incident_ids": [ + "69bb9233331067560c718ecd" + ], + "media_count": 0, + "author_ids": [ + 2477273692131 + ], + "team_id": 2477033058131, + "channel_id": 3047621227131, + "is_private": false, + "channel_name": "Ops Channel", + "created_at_seconds": 1773900354, + "updated_at_seconds": 1773909012 + }, + "basics": { + "incidents_highest_severity": "Warning", + "incidents_earliest_start_seconds": 1761133512, + "incidents_latest_close_seconds": 1761133632, + "incidents_total_duration_seconds": 120, + "responders": [ + { + "person_id": 3790925372131, + "assigned_at": 1761133515, + "acknowledged_at": 0 + } + ] + }, + "content": { + "content": "{\"type\":\"doc\",\"content\":[]}" + }, + "follow_ups": "" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "parameters": [ + { + "name": "post_mortem_id", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "description": "Post-mortem ID. Deterministic hash derived from account ID and the set of linked incident IDs." + } + ] + } + }, + "/incident/post-mortem/list": { + "post": { + "operationId": "incidentPostMortemList", + "summary": "查询复盘报告列表", + "description": "分页查询复盘报告列表,支持过滤条件。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-post-mortem-list", + "metadata": { + "sidebarTitle": "查询复盘报告列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListPostMortemsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 3, + "has_next_page": false, + "items": [ + { + "account_id": 2451002751131, + "title": "Postmortem1", + "status": "published", + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "template_id": "post_mortem_default_tmpl_en-us", + "incident_ids": [ + "69bb9233331067560c718ecd" + ], + "media_count": 0, + "author_ids": [ + 2477273692131 + ], + "team_id": 2477033058131, + "channel_id": 3047621227131, + "is_private": false, + "channel_name": "Ops Channel", + "created_at_seconds": 1773900354, + "updated_at_seconds": 1773909012 + } + ] + } + } + } + } + }, + "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/ListPostMortemsRequest" + }, + "example": { + "status": "published", + "p": 1, + "limit": 20 + } + } + } + } + } + }, + "/incident/post-mortem/delete": { + "post": { + "operationId": "incidentPostMortemDelete", + "summary": "删除复盘报告", + "description": "删除指定的复盘报告。", + "tags": [ + "On-call/故障管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/incidents/incident-post-mortem-delete", + "metadata": { + "sidebarTitle": "删除复盘报告" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePostMortemRequest" + }, + "example": { + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e" + } + } + } + } + } + }, + "/channel/info": { + "post": { + "operationId": "channelInfo", + "summary": "获取协作空间详情", + "description": "获取指定协作空间的详细信息。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/channel-info", + "metadata": { + "sidebarTitle": "获取协作空间详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ChannelItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "channel_id": 1001, + "channel_name": "Production Alerts", + "status": "enabled", + "team_id": 10 + } + } + } + } + }, + "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/ChannelInfoRequest" + }, + "example": { + "channel_id": 1001 + } + } + } + } + } + }, + "/channel/list": { + "post": { + "operationId": "channelList", + "summary": "查询协作空间列表", + "description": "查询当前用户可访问的协作空间列表,支持过滤条件。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/channel-list", + "metadata": { + "sidebarTitle": "查询协作空间列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListChannelsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 42, + "has_next_page": true, + "items": [ + { + "channel_id": 1001, + "channel_name": "Production Alerts", + "status": "enabled" + } + ] + } + } + } + } + }, + "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/ListChannelsRequest" + }, + "example": { + "p": 1, + "limit": 20, + "orderby": "created_at", + "asc": false + } + } + } + } + } + }, + "/channel/infos": { + "post": { + "operationId": "channelInfos", + "summary": "批量获取协作空间", + "description": "通过 ID 列表批量获取协作空间信息。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/channel-infos", + "metadata": { + "sidebarTitle": "批量获取协作空间" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ChannelInfosResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "channel_id": 1001, + "channel_name": "Production Alerts", + "status": "enabled" + } + ] + } + } + } + } + }, + "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/ChannelInfosRequest" + }, + "example": { + "channel_ids": [ + 1001, + 1002 + ] + } + } + } + } + } + }, + "/channel/create": { + "post": { + "operationId": "channelCreate", + "summary": "创建协作空间", + "description": "创建一个新的协作空间用于故障管理。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-create", + "metadata": { + "sidebarTitle": "创建协作空间" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ChannelCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "channel_id": 6294542005131, + "channel_name": "API Test Channel" + } + } + } + } + }, + "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/CreateChannelRequest" + }, + "example": { + "team_id": 3521074710131, + "channel_name": "Production Alerts", + "description": "Handles all production environment alerts", + "group": { + "method": "p", + "time_window": 10, + "window_type": "tumbling" + }, + "auto_resolve_timeout": 86400, + "auto_resolve_mode": "trigger" + } + } + } + } + } + }, + "/channel/update": { + "post": { + "operationId": "channelUpdate", + "summary": "更新协作空间", + "description": "更新已有协作空间的配置和设置。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-update", + "metadata": { + "sidebarTitle": "更新协作空间" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/UpdateChannelResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "external_report_token": "" + } + } + } + } + }, + "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/UpdateChannelRequest" + }, + "example": { + "channel_id": 1001, + "channel_name": "生产告警(v2)", + "description": "更新后的描述" + } + } + } + } + } + }, + "/channel/delete": { + "post": { + "operationId": "channelDelete", + "summary": "删除协作空间", + "description": "删除协作空间及其所有关联配置。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-delete", + "metadata": { + "sidebarTitle": "删除协作空间" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelIDRequest" + }, + "example": { + "channel_id": 3521074710131 + } + } + } + } + } + }, + "/channel/enable": { + "post": { + "operationId": "channelEnable", + "summary": "启用协作空间", + "description": "启用已禁用的协作空间以恢复故障路由。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-enable", + "metadata": { + "sidebarTitle": "启用协作空间" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelIDRequest" + }, + "example": { + "channel_id": 3521074710131 + } + } + } + } + } + }, + "/channel/disable": { + "post": { + "operationId": "channelDisable", + "summary": "禁用协作空间", + "description": "禁用协作空间以停止故障路由,而不删除该空间。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-disable", + "metadata": { + "sidebarTitle": "禁用协作空间" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelIDRequest" + }, + "example": { + "channel_id": 3521074710131 + } + } + } + } + } + }, + "/channel/notify/rule/list": { + "post": { + "operationId": "channelNotifyRuleList", + "summary": "查询协作空间通知规则", + "description": "查询为指定协作空间配置的所有通知规则。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/channel-notify-rule-list", + "metadata": { + "sidebarTitle": "查询协作空间通知规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/channel/notify/rule/create": { + "post": { + "operationId": "channelNotifyRuleCreate", + "summary": "创建协作空间通知规则", + "description": "为协作空间创建通知规则。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-notify-rule-create", + "metadata": { + "sidebarTitle": "创建协作空间通知规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/channel/notify/rule/update": { + "post": { + "operationId": "channelNotifyRuleUpdate", + "summary": "更新协作空间通知规则", + "description": "更新已有协作空间通知规则的配置。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-notify-rule-update", + "metadata": { + "sidebarTitle": "更新协作空间通知规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/channel/notify/rule/delete": { + "post": { + "operationId": "channelNotifyRuleDelete", + "summary": "删除协作空间通知规则", + "description": "删除指定的协作空间通知规则。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-notify-rule-delete", + "metadata": { + "sidebarTitle": "删除协作空间通知规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/channel/notify/rule/enable": { + "post": { + "operationId": "channelNotifyRuleEnable", + "summary": "启用协作空间通知规则", + "description": "启用已禁用的协作空间通知规则。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-notify-rule-enable", + "metadata": { + "sidebarTitle": "启用协作空间通知规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/channel/notify/rule/disable": { + "post": { + "operationId": "channelNotifyRuleDisable", + "summary": "禁用协作空间通知规则", + "description": "禁用协作空间通知规则而不删除。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-notify-rule-disable", + "metadata": { + "sidebarTitle": "禁用协作空间通知规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/channel/silence/rule/list": { + "post": { + "operationId": "channelSilenceRuleList", + "summary": "查询静默策略列表", + "description": "查询为指定协作空间配置的所有静默策略。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-silence-rule-list", + "metadata": { + "sidebarTitle": "查询静默策略列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListSilenceRulesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "channel_id": 5967964835131, + "priority": 0, + "rule_name": "Silence Info alerts", + "description": "", + "from_incident_id": "000000000000000000000000", + "time_filters": [], + "time_filter": { + "start_time": 1773388800, + "end_time": 1773414000 + }, + "filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "is_directly_discard": true, + "status": "enabled", + "rule_id": "69b3c426b4a6f5abf1f54873", + "updated_by": 3790925372131, + "created_at": 1773388838, + "updated_at": 1773388838, + "is_effective": false + } + ] + } + } + } + } + }, + "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/ChannelScopedListRequest" + }, + "example": { + "channel_id": 1001 + } + } + } + } + } + }, + "/channel/silence/rule/create": { + "post": { + "operationId": "channelSilenceRuleCreate", + "summary": "创建静默策略", + "description": "创建一条静默策略,用于抑制满足特定条件的通知。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-silence-rule-create", + "metadata": { + "sidebarTitle": "创建静默策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "rule_id": "69db2f66a0fe7db6448b1503", + "rule_name": "Test silence rule" + } + } + } + } + }, + "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/CreateSilenceRuleRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_name": "Maintenance window silence", + "description": "Silence all Info alerts during planned maintenance", + "time_filter": { + "start_time": 1773388800, + "end_time": 1773414000 + }, + "filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "is_directly_discard": false + } + } + } + } + } + }, + "/channel/silence/rule/update": { + "post": { + "operationId": "channelSilenceRuleUpdate", + "summary": "更新静默策略", + "description": "更新已有静默策略的配置。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-silence-rule-update", + "metadata": { + "sidebarTitle": "更新静默策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSilenceRuleRequest" + }, + "example": { + "channel_id": 1001, + "rule_id": "6621b23f4a2c5e0012ab34cd", + "rule_name": "Mute during maintenance", + "time_filter": { + "start_time": 1710000000, + "end_time": 1710086400 + }, + "filters": [ + [ + { + "key": "labels.service", + "oper": "IN", + "vals": [ + "billing" + ] + } + ] + ] + } + } + } + } + } + }, + "/channel/silence/rule/delete": { + "post": { + "operationId": "channelSilenceRuleDelete", + "summary": "删除静默策略", + "description": "删除指定的静默策略。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-silence-rule-delete", + "metadata": { + "sidebarTitle": "删除静默策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/silence/rule/enable": { + "post": { + "operationId": "channelSilenceRuleEnable", + "summary": "启用静默策略", + "description": "启用已禁用的静默策略。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-silence-rule-enable", + "metadata": { + "sidebarTitle": "启用静默策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/silence/rule/disable": { + "post": { + "operationId": "channelSilenceRuleDisable", + "summary": "禁用静默策略", + "description": "禁用静默策略而不删除。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-silence-rule-disable", + "metadata": { + "sidebarTitle": "禁用静默策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/inhibit/rule/list": { + "post": { + "operationId": "channelInhibitRuleList", + "summary": "查询抑制策略列表", + "description": "查询为指定协作空间配置的所有抑制策略。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-inhibit-rule-list", + "metadata": { + "sidebarTitle": "查询抑制策略列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListInhibitRulesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "channel_id": 5967964835131, + "priority": 0, + "rule_name": "Suppress downstream alerts", + "description": "", + "source_filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "target_filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "equals": [ + "data_source_id", + "labels._account_id" + ], + "is_directly_discard": false, + "status": "enabled", + "rule_id": "69bcc630b9e63df36603e425", + "updated_by": 3790925372131, + "created_at": 1773979184, + "updated_at": 1773979184 + } + ] + } + } + } + } + }, + "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/ChannelScopedListRequest" + }, + "example": { + "channel_id": 1001 + } + } + } + } + } + }, + "/channel/inhibit/rule/create": { + "post": { + "operationId": "channelInhibitRuleCreate", + "summary": "创建抑制策略", + "description": "创建一条抑制策略,当高优先级告警触发时抑制低优先级告警。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-inhibit-rule-create", + "metadata": { + "sidebarTitle": "创建抑制策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "rule_id": "69db2f69a0fe7db6448b1504", + "rule_name": "Test inhibit rule" + } + } + } + } + }, + "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/CreateInhibitRuleRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_name": "Suppress Info when Critical fires", + "description": "When a Critical alert fires, suppress matching Info alerts", + "equals": [ + "labels.cluster", + "labels.service" + ], + "source_filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Critical" + ] + } + ] + ], + "target_filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "is_directly_discard": false + } + } + } + } + } + }, + "/channel/inhibit/rule/update": { + "post": { + "operationId": "channelInhibitRuleUpdate", + "summary": "更新抑制策略", + "description": "更新已有抑制策略的配置。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-inhibit-rule-update", + "metadata": { + "sidebarTitle": "更新抑制策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateInhibitRuleRequest" + }, + "example": { + "channel_id": 1001, + "rule_id": "6621b23f4a2c5e0012ab34ce", + "rule_name": "Suppress downstream", + "equals": [ + "labels.cluster" + ] + } + } + } + } + } + }, + "/channel/inhibit/rule/delete": { + "post": { + "operationId": "channelInhibitRuleDelete", + "summary": "删除抑制策略", + "description": "删除指定的抑制策略。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-inhibit-rule-delete", + "metadata": { + "sidebarTitle": "删除抑制策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/inhibit/rule/enable": { + "post": { + "operationId": "channelInhibitRuleEnable", + "summary": "启用抑制策略", + "description": "启用已禁用的抑制策略。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-inhibit-rule-enable", + "metadata": { + "sidebarTitle": "启用抑制策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/inhibit/rule/disable": { + "post": { + "operationId": "channelInhibitRuleDisable", + "summary": "禁用抑制策略", + "description": "禁用抑制策略而不删除。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-inhibit-rule-disable", + "metadata": { + "sidebarTitle": "禁用抑制策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/unsubscribe/rule/list": { + "post": { + "operationId": "channelUnsubscribeRuleList", + "summary": "查询排除规则列表", + "description": "查询协作空间的排除规则列表。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/channel-unsubscribe-rule-list", + "metadata": { + "sidebarTitle": "查询排除规则列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListDropRulesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "channel_id": 5967964835131, + "priority": 0, + "rule_name": "Drop test alerts", + "description": "", + "filters": [ + [ + { + "key": "data_source_id", + "oper": "IN", + "vals": [ + "6113996590131" + ] + } + ] + ], + "status": "enabled", + "rule_id": "69bcc530b9e63df36603e421", + "updated_by": 3790925372131, + "created_at": 1773978928, + "updated_at": 1773978928 + } + ] + } + } + } + } + }, + "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/ChannelScopedListRequest" + }, + "example": { + "channel_id": 1001 + } + } + } + } + } + }, + "/channel/unsubscribe/rule/create": { + "post": { + "operationId": "channelUnsubscribeRuleCreate", + "summary": "创建排除规则", + "description": "创建排除规则,在告警成为故障之前过滤不需要的告警。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/channel-unsubscribe-rule-create", + "metadata": { + "sidebarTitle": "创建排除规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "rule_id": "69db2f6ba0fe7db6448b1505", + "rule_name": "Test drop rule" + } + } + } + } + }, + "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/CreateDropRuleRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_name": "Drop test environment alerts", + "description": "Discard all alerts from the test environment before they create incidents", + "filters": [ + [ + { + "key": "labels.env", + "oper": "IN", + "vals": [ + "test", + "dev" + ] + } + ] + ] + } + } + } + } + } + }, + "/channel/unsubscribe/rule/update": { + "post": { + "operationId": "channelUnsubscribeRuleUpdate", + "summary": "更新排除规则", + "description": "更新已有排除规则的配置。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/channel-unsubscribe-rule-update", + "metadata": { + "sidebarTitle": "更新排除规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateDropRuleRequest" + }, + "example": { + "channel_id": 1001, + "rule_id": "6621b23f4a2c5e0012ab34cf", + "rule_name": "Drop test alerts", + "filters": [ + [ + { + "key": "labels.env", + "oper": "IN", + "vals": [ + "test" + ] + } + ] + ] + } + } + } + } + } + }, + "/channel/unsubscribe/rule/delete": { + "post": { + "operationId": "channelUnsubscribeRuleDelete", + "summary": "删除排除规则", + "description": "删除指定的排除规则。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/channel-unsubscribe-rule-delete", + "metadata": { + "sidebarTitle": "删除排除规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/unsubscribe/rule/enable": { + "post": { + "operationId": "channelUnsubscribeRuleEnable", + "summary": "启用排除规则", + "description": "启用已禁用的排除规则。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/channel-unsubscribe-rule-enable", + "metadata": { + "sidebarTitle": "启用排除规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/unsubscribe/rule/disable": { + "post": { + "operationId": "channelUnsubscribeRuleDisable", + "summary": "禁用排除规则", + "description": "禁用排除规则而不删除。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/channel-unsubscribe-rule-disable", + "metadata": { + "sidebarTitle": "禁用排除规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/escalate/rule/info": { + "post": { + "operationId": "channelEscalateRuleInfo", + "summary": "获取分派策略详情", + "description": "获取指定分派策略的详细信息。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-escalate-rule-info", + "metadata": { + "sidebarTitle": "获取分派策略详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EscalateRuleItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_id": 2451002751131, + "channel_id": 6193426913131, + "priority": 0, + "aggr_window": 0, + "rule_name": "Default", + "description": "", + "layers": [ + { + "max_times": 1, + "notify_step": 10, + "target": { + "person_ids": [ + 3790925372131 + ], + "by": { + "follow_preference": true + }, + "webhooks": null + }, + "escalate_window": 30, + "force_escalate": false + } + ], + "time_filters": [], + "filters": [], + "status": "enabled", + "template_id": "6321aad26c12104586a88916", + "rule_id": "69bd0ce95a238693176c1d66", + "updated_by": 3790925372131, + "created_at": 1773997289, + "updated_at": 1773997289 + } + } + } + } + }, + "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/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 1001, + "rule_id": "6621b23f4a2c5e0012ab34d0" + } + } + } + } + } + }, + "/channel/escalate/rule/list": { + "post": { + "operationId": "channelEscalateRuleList", + "summary": "查询分派策略列表", + "description": "查询协作空间下的所有分派策略。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-escalate-rule-list", + "metadata": { + "sidebarTitle": "查询分派策略列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListEscalationRulesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "channel_id": 6193426913131, + "priority": 0, + "aggr_window": 0, + "rule_name": "Default", + "description": "", + "layers": [ + { + "max_times": 1, + "notify_step": 10, + "target": { + "person_ids": [ + 3790925372131 + ], + "by": { + "follow_preference": true + }, + "webhooks": null + }, + "escalate_window": 30, + "force_escalate": false + } + ], + "time_filters": [], + "filters": [], + "status": "enabled", + "template_id": "6321aad26c12104586a88916", + "rule_id": "69bd0ce95a238693176c1d66", + "updated_by": 3790925372131, + "created_at": 1773997289, + "updated_at": 1773997289 + } + ] + } + } + } + } + }, + "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/ChannelScopedListRequest" + }, + "example": { + "channel_id": 1001 + } + } + } + } + } + }, + "/channel/escalate/rule/create": { + "post": { + "operationId": "channelEscalateRuleCreate", + "summary": "创建分派策略", + "description": "创建分派策略,定义故障发生时通知谁以及何时通知。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-escalate-rule-create", + "metadata": { + "sidebarTitle": "创建分派策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "rule_id": "69db2f72a0fe7db6448b1506", + "rule_name": "Test escalation rule" + } + } + } + } + }, + "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/CreateEscalationRuleRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_name": "On-call escalation", + "template_id": "6321aad26c12104586a88916", + "description": "Notify primary on-call, then escalate to secondary after 30 minutes", + "layers": [ + { + "target": { + "person_ids": [ + 3790925372131 + ], + "by": { + "follow_preference": true + } + }, + "max_times": 3, + "notify_step": 10, + "escalate_window": 30, + "force_escalate": false + } + ] + } + } + } + } + } + }, + "/channel/escalate/rule/update": { + "post": { + "operationId": "channelEscalateRuleUpdate", + "summary": "更新分派策略", + "description": "更新已有分派策略的配置。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-escalate-rule-update", + "metadata": { + "sidebarTitle": "更新分派策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateEscalationRuleRequest" + }, + "example": { + "channel_id": 1001, + "rule_id": "6621b23f4a2c5e0012ab34d0", + "template_id": "6621b23f4a2c5e0012ab34d1", + "rule_name": "Default escalation", + "layers": [ + { + "target": { + "person_ids": [ + 42 + ], + "by": { + "critical": [ + "voice" + ], + "warning": [ + "sms" + ] + } + } + } + ] + } + } + } + } + } + }, + "/channel/escalate/rule/delete": { + "post": { + "operationId": "channelEscalateRuleDelete", + "summary": "删除分派策略", + "description": "删除指定的分派策略。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-escalate-rule-delete", + "metadata": { + "sidebarTitle": "删除分派策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/escalate/rule/enable": { + "post": { + "operationId": "channelEscalateRuleEnable", + "summary": "启用分派策略", + "description": "启用已禁用的分派策略。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-escalate-rule-enable", + "metadata": { + "sidebarTitle": "启用分派策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/channel/escalate/rule/disable": { + "post": { + "operationId": "channelEscalateRuleDisable", + "summary": "禁用分派策略", + "description": "禁用分派策略而不删除。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/channels/channel-escalate-rule-disable", + "metadata": { + "sidebarTitle": "禁用分派策略" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelRuleIDRequest" + }, + "example": { + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" + } + } + } + } + } + }, + "/route/info": { + "post": { + "operationId": "routeInfo", + "summary": "获取路由规则详情", + "description": "获取指定集成的路由规则配置。当集成尚未配置路由规则时返回 null。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/route-info", + "metadata": { + "sidebarTitle": "获取路由规则详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RouteItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "cases": [ + { + "if": [ + { + "key": "labels.check", + "oper": "IN", + "vals": [ + "cpu.idle<20%" + ] + } + ], + "channel_ids": [ + 2533748993131 + ], + "fallthrough": false, + "routing_mode": "standard" + }, + { + "if": [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Warning" + ] + } + ], + "channel_ids": null, + "fallthrough": false, + "routing_mode": "name_mapping", + "name_mapping_label": "labels.service" + } + ], + "default": { + "channel_ids": [ + 3521074710131 + ] + }, + "status": "enabled", + "version": 6, + "updated_by": 3790925372131, + "creator_id": 3790925372131, + "created_at": 1774606136, + "updated_at": 1774606136 + } + } + } + } + }, + "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/RouteInfoRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/route/list": { + "post": { + "operationId": "routeList", + "summary": "查询路由规则列表", + "description": "返回指定集成的路由规则列表。未配置路由规则的集成将不出现在响应中。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/route-list", + "metadata": { + "sidebarTitle": "查询路由规则列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListRoutesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "integration_id": 6113996590131, + "cases": [ + { + "if": [ + { + "key": "labels.check", + "oper": "IN", + "vals": [ + "cpu.idle<20%" + ] + } + ], + "channel_ids": [ + 2533748993131 + ], + "fallthrough": false, + "routing_mode": "standard" + } + ], + "default": { + "channel_ids": [ + 3521074710131 + ] + }, + "status": "enabled", + "version": 6, + "updated_by": 3790925372131, + "creator_id": 3790925372131, + "created_at": 1774606136, + "updated_at": 1774606136 + } + ] + } + } + } + } + }, + "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/ListRoutesRequest" + }, + "example": { + "integration_ids": [ + 6113996590131, + 6113996590132 + ] + } + } + } + } + } + }, + "/route/upsert": { + "post": { + "operationId": "routeUpsert", + "summary": "创建或更新路由规则", + "description": "创建或更新集成的路由规则,将告警导向特定协作空间。`cases` 与 `default` 至少需要提供其一。", + "tags": [ + "On-call/协作空间" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/channels/route-upsert", + "metadata": { + "sidebarTitle": "创建或更新路由规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertRouteRequest" + }, + "example": { + "integration_id": 6113996590131, + "cases": [ + { + "if": [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Critical" + ] + } + ], + "channel_ids": [ + 3521074710131 + ], + "fallthrough": false, + "routing_mode": "standard" + } + ], + "default": { + "channel_ids": [ + 3521074710131 + ] + } + } + } + } + } + } + }, + "/alert/list": { + "post": { + "operationId": "alert-read-list", + "summary": "查询告警列表", + "description": "返回满足过滤条件的告警列表,支持游标分页。", + "tags": [ + "On-call/告警管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |\n\n## 使用说明\n\n- `start_time` 和 `end_time` 均为必填的 Unix 时间戳(秒),最大跨度 31 天。\n- 使用上次响应中的 `search_after_ctx` 获取下一页。\n- 结果会根据调用方的协作空间数据访问权限进行过滤。\n- 将 `is_active` 设为 `true` 可仅返回活跃(触发中)告警;设为 `false` 返回已恢复告警。", + "href": "/zh/api-reference/on-call/alerts/alert-read-list", + "metadata": { + "sidebarTitle": "查询告警列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "has_next_page": false, + "search_after_ctx": "", + "items": [ + { + "alert_id": "663a1b2c3d4e5f6789abcdef", + "integration_id": 10001, + "channel_id": 20001, + "account_id": 10023, + "title": "CPU 使用率 > 90%", + "alert_severity": "Critical", + "alert_status": "Critical", + "start_time": 1712650000, + "last_time": 1712655000, + "end_time": 0, + "labels": { + "host": "web-01" + }, + "ever_muted": false, + "created_at": 1712650000, + "updated_at": 1712655000, + "integration_name": "Prometheus", + "integration_type": "prometheus", + "channel_name": "生产", + "event_cnt": 3 + } + ] + } + } + } + } + }, + "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/AlertListRequest" + }, + "example": { + "start_time": 1712620800, + "end_time": 1712707200, + "limit": 20, + "is_active": true + } + } + } + } + } + }, + "/alert/info": { + "post": { + "operationId": "alert-read-info", + "summary": "查看告警详情", + "description": "通过告警 ID 返回单条告警的完整详情,包括关联故障和事件数量。", + "tags": [ + "On-call/告警管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |\n\n## 使用说明\n\n- `alert_id` 为 ObjectID 十六进制字符串,可从 `POST /alert/list` 或 `POST /alert-event/list` 获取。", + "href": "/zh/api-reference/on-call/alerts/alert-read-info", + "metadata": { + "sidebarTitle": "查看告警详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "alert_id": "663a1b2c3d4e5f6789abcdef", + "title": "CPU 使用率 > 90%", + "alert_severity": "Critical", + "alert_status": "Critical", + "start_time": 1712650000, + "event_cnt": 3 + } + } + } + } + }, + "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/AlertInfoRequest" + }, + "example": { + "alert_id": "663a1b2c3d4e5f6789abcdef" + } + } + } + } + } + }, + "/alert/list-by-ids": { + "post": { + "operationId": "alert-read-list-by-ids", + "summary": "批量查询告警", + "description": "通过多个告警 ID 一次性返回多条告警详情。", + "tags": [ + "On-call/告警管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |\n\n## 使用说明\n\n- 所有 `alert_ids` 必须属于调用方账户,任何无效 ID 都会导致整个请求失败。", + "href": "/zh/api-reference/on-call/alerts/alert-read-list-by-ids", + "metadata": { + "sidebarTitle": "批量查询告警" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "has_next_page": false, + "items": [ + { + "alert_id": "663a1b2c3d4e5f6789abcdef", + "title": "CPU 使用率 > 90%" + } + ] + } + } + } + } + }, + "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/AlertListByIDsRequest" + }, + "example": { + "alert_ids": [ + "663a1b2c3d4e5f6789abcdef" + ] + } + } + } + } + } + }, + "/alert/event/list": { + "post": { + "operationId": "alert-read-event-list", + "summary": "查询告警事件列表", + "description": "返回特定告警收到的所有原始事件,按时间顺序排列。", + "tags": [ + "On-call/告警管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |\n\n## 使用说明\n\n- 每条告警会从集成持续接收原始事件,此接口展示指定告警的原始事件历史。", + "href": "/zh/api-reference/on-call/alerts/alert-read-event-list", + "metadata": { + "sidebarTitle": "查询告警事件列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertEventListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "event_id": "663a1b2c3d4e5f6789abc001", + "alert_id": "663a1b2c3d4e5f6789abcdef", + "title": "CPU 使用率 > 90%", + "event_severity": "Critical", + "event_status": "Critical", + "event_time": 1712650000, + "labels": { + "host": "web-01" + } + } + ] + } + } + } + } + }, + "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/AlertEventListRequest" + }, + "example": { + "alert_id": "663a1b2c3d4e5f6789abcdef" + } + } + } + } + } + }, + "/alert/feed": { + "post": { + "operationId": "alert-read-feed", + "summary": "查询告警动态", + "description": "返回单条告警的动态记录(评论、状态变更、合并、静默事件),支持分页查询。", + "tags": [ + "On-call/告警管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |\n\n## 使用说明\n\n- 使用 `p`(页码,从 1 开始)和 `limit`(最大 100,默认 20)进行分页。\n- 将 `asc` 设为 `true` 可按时间正序返回。\n- 使用 `types` 过滤特定动态类型(如 `alert_comment`、`alert_merge`)。", + "href": "/zh/api-reference/on-call/alerts/alert-read-feed", + "metadata": { + "sidebarTitle": "查询告警动态" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertFeedResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "has_next_page": false, + "items": [ + { + "ref_id": "663a1b2c3d4e5f6789abcdef", + "type": "alert_comment", + "detail": { + "comment": "正在排查中。" + }, + "creator_id": 80011, + "created_at": 1712651000 + } + ] + } + } + } + } + }, + "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/AlertFeedRequest" + }, + "example": { + "alert_id": "663a1b2c3d4e5f6789abcdef", + "limit": 20, + "asc": false + } + } + } + } + } + }, + "/alert/merge": { + "post": { + "operationId": "alert-write-merge", + "summary": "将告警合并到故障", + "description": "将一条或多条告警关联到已有故障。若来源告警之前属于其他故障,且合并后该故障中没有其他告警,则该故障将自动关闭。", + "tags": [ + "On-call/告警管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |\n\n## 使用说明\n\n- 所有 `alert_ids` 和 `incident_id` 必须属于调用方账户。\n- 可选填 `title` 和 `owner_id` 以同时更新目标故障。", + "href": "/zh/api-reference/on-call/alerts/alert-write-merge", + "metadata": { + "sidebarTitle": "将告警合并到故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlertMergeRequest" + }, + "example": { + "alert_ids": [ + "663a1b2c3d4e5f6789abcdef" + ], + "incident_id": "663a000000000000deadbeef" + } + } + } + } + } + }, + "/alert/pipeline/info": { + "post": { + "operationId": "alert-read-pipeline-info", + "summary": "查看告警处理规则", + "description": "返回指定集成的告警处理规则配置。", + "tags": [ + "On-call/告警管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心查看**(`on-call`) |\n\n## 使用说明\n\n- 若该集成尚未配置告警处理规则,则 data 为 `null`。\n- 调用方需有该集成的访问权限。", + "href": "/zh/api-reference/on-call/alerts/alert-read-pipeline-info", + "metadata": { + "sidebarTitle": "查看告警处理规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertPipelineItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 10001, + "rules": [ + { + "kind": "severity_reset", + "if": null, + "settings": { + "severity": "Warning" + } + } + ], + "status": "enabled", + "creator_id": 80011, + "updated_by": 80011, + "created_at": 1710000000, + "updated_at": 1712000000 + } + } + } + } + }, + "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/AlertPipelineInfoRequest" + }, + "example": { + "integration_id": 10001 + } + } + } + } + } + }, + "/alert/pipeline/list": { + "post": { + "operationId": "alert-read-pipeline-list", + "summary": "批量查询告警处理规则", + "description": "返回多个集成的告警处理规则配置。", + "tags": [ + "On-call/告警管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心查看**(`on-call`) |\n\n## 使用说明\n\n- 所有 `integration_ids` 必须对调用方可访问。", + "href": "/zh/api-reference/on-call/alerts/alert-read-pipeline-list", + "metadata": { + "sidebarTitle": "批量查询告警处理规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertPipelineListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "integration_id": 10001, + "rules": [], + "status": "enabled", + "creator_id": 80011, + "updated_by": 80011, + "created_at": 1710000000, + "updated_at": 1712000000 + } + ] + } + } + } + } + }, + "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/AlertPipelineListRequest" + }, + "example": { + "integration_ids": [ + 10001, + 10002 + ] + } + } + } + } + } + }, + "/alert/pipeline/upsert": { + "post": { + "operationId": "alert-write-pipeline-upsert", + "summary": "创建或更新告警处理规则", + "description": "为集成设置告警处理规则,将完全替换已有配置。", + "tags": [ + "On-call/告警管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 每条处理规则最多 50 条规则。\n- 每条规则包含 `kind`(`title_reset`、`description_reset`、`severity_reset`、`alert_drop`、`alert_inhibit` 之一)、可选的 `if` 过滤器,以及与 kind 对应的 `settings`。\n- `alert_inhibit` 类型需要 Standard 及以上许可证。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/alerts/alert-write-pipeline-upsert", + "metadata": { + "sidebarTitle": "创建或更新告警处理规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlertPipelineUpsertRequest" + }, + "example": { + "integration_id": 10001, + "rules": [ + { + "kind": "severity_reset", + "if": null, + "settings": { + "severity": "Warning" + } + } + ] + } + } + } + } + } + }, + "/alert-event/list": { + "post": { + "operationId": "alert-event-read-list", + "summary": "查询原始告警事件列表", + "description": "返回跨所有告警的原始告警事件分页列表,支持按集成、协作空间、时间范围和严重程度过滤。", + "tags": [ + "On-call/告警管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **协作空间查看**(`on-call`) |\n\n## 使用说明\n\n- 结果会根据调用方的协作空间数据访问权限进行过滤。\n- `severities` 为逗号分隔的字符串,如 `\"Critical,Warning\"`。", + "href": "/zh/api-reference/on-call/alerts/alert-event-read-list", + "metadata": { + "sidebarTitle": "查询原始告警事件列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertEventGlobalListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "has_next_page": false, + "items": [ + { + "event_id": "663a1b2c3d4e5f6789abc001", + "alert_id": "663a1b2c3d4e5f6789abcdef", + "title": "CPU 使用率 > 90%", + "event_severity": "Critical", + "event_time": 1712650000 + } + ] + } + } + } + } + }, + "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/AlertEventGlobalListRequest" + }, + "example": { + "start_time": 1712620800, + "end_time": 1712707200, + "limit": 20, + "severities": "Critical" + } + } + } + } + } + }, + "/webhook/history/list": { + "post": { + "operationId": "webhookHistoryList", + "summary": "查询 Webhook 推送历史", + "description": "查询出站 Webhook 通知的推送历史记录。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/integrations/webhook-history-list", + "metadata": { + "sidebarTitle": "查询 Webhook 推送历史" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListWebhookHistoryResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "integration_id": 5321026051131, + "event_id": "20260412Xatt9hrXsgmFkBR78WF655", + "webhook_type": "alert", + "event_type": "a_update", + "channel_id": 2551105804131, + "ref_id": "69da3f0ef77b1b51f40e83cc", + "endpoint": "https://example.com/webhook", + "attempt": 1, + "duration": 132, + "status": "success", + "status_code": 200, + "event_time": "2026-04-12T13:31:11.357472+08:00" + } + ], + "search_after_ctx": "eyJldmVudF90aW1lIjoiMjAyNi0wNC0xMlQxMzoxNToyNi4zODI1NDcrMDg6MDAiLCJldmVudF9pZCI6IjIwMjYwNDEybUdzeFAzZHJwRmZzNFpDUWQycFNEcCJ9", + "total": 346 + } + } + } + } + }, + "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/ListWebhookHistoryRequest" + }, + "example": { + "limit": 20, + "start_time": 1775116800000, + "end_time": 1775203200000, + "integration_id": 6113996590131, + "status": "success" + } + } + } + } + } + }, + "/webhook/history/detail": { + "post": { + "operationId": "webhookHistoryDetail", + "summary": "获取 Webhook 推送详情", + "description": "获取指定 Webhook 推送尝试的详细请求体和响应信息。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心查看**(`on-call`) |", + "href": "/zh/api-reference/on-call/integrations/webhook-history-detail", + "metadata": { + "sidebarTitle": "获取 Webhook 推送详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/WebhookHistoryDetail" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 5321026051131, + "event_id": "20260412Xatt9hrXsgmFkBR78WF655", + "webhook_type": "alert", + "event_type": "a_update", + "channel_id": 2551105804131, + "ref_id": "69da3f0ef77b1b51f40e83cc", + "request_headers": "{\"Content-Type\":\"application/json\"}", + "request_body": "{\"event_type\":\"a_update\",\"event_id\":\"d789d65951c0532ea9b6a1d99b707054\"}", + "endpoint": "https://example.com/webhook", + "attempt": 1, + "duration": 132, + "status": "success", + "status_code": 200, + "response_headers": "{\"Content-Type\":\"application/json\"}", + "response_body": "{\"ok\":true}", + "event_time": "2026-04-12T13:31:11.357472+08:00", + "ref_title": "High CPU Usage on host-01", + "channel_name": "Production Alerts" + } + } + } + } + }, + "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/GetWebhookHistoryDetailRequest" + }, + "example": { + "event_id": "20260412Xatt9hrXsgmFkBR78WF655", + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/schedule/create": { + "post": { + "operationId": "scheduleCreate", + "summary": "创建值班表", + "description": "创建新的值班表(分派策略值班表)。", + "tags": [ + "On-call/值班排班" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/schedules/schedule-create", + "metadata": { + "sidebarTitle": "创建值班表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleIDResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "schedule_id": 6294534917601 + } + } + } + } + }, + "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/ScheduleUpsertRequest" + }, + "example": { + "schedule_name": "Production On-Call", + "description": "Primary on-call rotation for the production team", + "team_id": 4291079133131, + "layers": [ + { + "layer_name": "Layer 1", + "name": "Layer 1", + "mode": 0, + "weight": 0, + "hidden": 0, + "groups": [ + { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 0, + "end": 0 + }, + { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2476123212131 + ] + } + ], + "start": 0, + "end": 0 + } + ], + "rotation_unit": "day", + "rotation_value": 1, + "rotation_duration": 86400, + "handoff_time": 0, + "enable_time": 1712000000, + "expire_time": 0, + "restrict_mode": 0, + "restrict_start": 0, + "restrict_end": 0, + "restrict_periods": [], + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "fair_rotation": false, + "mask_continuous_enabled": false + } + ], + "notify": { + "advance_in_time": 300, + "fixed_time": null, + "by": { + "follow_preference": true, + "personal_channels": null + }, + "webhooks": null + } + } + } + } + } + } + }, + "/schedule/update": { + "post": { + "operationId": "scheduleUpdate", + "summary": "更新值班表", + "description": "更新已有的值班表,需要通过 schedule_id 指定值班表。", + "tags": [ + "On-call/值班排班" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/schedules/schedule-update", + "metadata": { + "sidebarTitle": "更新值班表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScheduleUpsertRequest" + }, + "example": { + "schedule_id": 2001, + "schedule_name": "Production On-Call (Updated)", + "description": "Updated primary on-call rotation", + "team_id": 4291079133131 + } + } + } + } + } + }, + "/schedule/preview": { + "post": { + "operationId": "schedulePreview", + "summary": "预览值班表", + "description": "预览值班表配置生成的排班结果,不会持久化。请求体与创建/更新相同,并需要指定 start 和 end 时间窗口(最多 45 天)。", + "tags": [ + "On-call/值班排班" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **60 次/分钟**;**10 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/schedules/schedule-preview", + "metadata": { + "sidebarTitle": "预览值班表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": null, + "name": null, + "account_id": 0, + "group_id": null, + "disabled": null, + "create_at": 0, + "create_by": 0, + "update_at": 0, + "update_by": 0, + "layers": [ + { + "account_id": 0, + "name": "Layer 1", + "schedule_id": 0, + "hidden": 0, + "mode": 0, + "weight": 0, + "groups": [ + { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 0, + "end": 0 + }, + { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2476123212131 + ] + } + ], + "start": 0, + "end": 0 + } + ], + "rotation_duration": 86400, + "handoff_time": 0, + "enable_time": 1775980800, + "expire_time": 0, + "restrict_mode": 0, + "restrict_start": 0, + "restrict_end": 0, + "restrict_periods": [], + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "create_at": 0, + "create_by": 0, + "update_at": 0, + "update_by": 0, + "layer_name": "Layer 1", + "fair_rotation": false, + "layer_start": 1775980800, + "layer_end": null, + "rotation_unit": "day", + "rotation_value": 1, + "mask_continuous_enabled": false + } + ], + "schedule_layers": [ + { + "layer_name": "Layer 1", + "name": "Layer 1", + "mode": 0, + "schedules": [ + { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "index": 0 + }, + { + "start": 1776096000, + "end": 1776182400, + "group": { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2476123212131 + ] + } + ], + "start": 1776096000, + "end": 1776182400 + }, + "index": 0 + } + ] + } + ], + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": [ + { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "index": 0 + } + ] + }, + "start": 1775980800, + "end": 1776240000, + "notify": null, + "schedule_id": 0, + "schedule_name": null, + "team_id": null, + "description": null, + "layer_schedules": null, + "status": null, + "cur_oncall": null, + "next_oncall": null + } + } + } + } + }, + "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/ScheduleUpsertRequest" + }, + "example": { + "schedule_name": "Preview Schedule", + "start": 1712000000, + "end": 1712086400, + "layers": [ + { + "layer_name": "Layer 1", + "name": "Layer 1", + "mode": 0, + "weight": 0, + "hidden": 0, + "groups": [ + { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 0, + "end": 0 + } + ], + "rotation_unit": "day", + "rotation_value": 1, + "rotation_duration": 86400, + "handoff_time": 0, + "enable_time": 1712000000, + "expire_time": 0, + "restrict_mode": 0, + "restrict_start": 0, + "restrict_end": 0, + "restrict_periods": [], + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "fair_rotation": false, + "mask_continuous_enabled": false + } + ] + } + } + } + } + } + }, + "/schedule/delete": { + "post": { + "operationId": "scheduleDelete", + "summary": "删除值班表", + "description": "根据 ID 删除一个或多个值班表。", + "tags": [ + "On-call/值班排班" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/schedules/schedule-delete", + "metadata": { + "sidebarTitle": "删除值班表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScheduleIDsBodyRequest" + }, + "example": { + "schedule_ids": [ + 2001 + ] + } + } + } + } + } + }, + "/schedule/info": { + "post": { + "operationId": "scheduleInfo", + "summary": "获取值班表详情", + "description": "返回值班表的详细信息,并按照指定时间窗口(最多 45 天)返回计算出的值班分层。", + "tags": [ + "On-call/值班排班" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/schedules/schedule-info", + "metadata": { + "sidebarTitle": "获取值班表详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 5789640530410, + "name": "test-000001", + "account_id": 2451002751131, + "group_id": 4291079133131, + "disabled": 0, + "create_at": 1766110836, + "create_by": 2476123212131, + "update_at": 1775205795, + "update_by": 2476123212131, + "layers": [ + { + "account_id": 2451002751131, + "name": "Layer 1", + "schedule_id": 5789640530410, + "hidden": 0, + "mode": 0, + "weight": 0, + "groups": [ + { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 3122470302131 + ] + } + ], + "start": 0, + "end": 0 + }, + { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2659460982131 + ] + } + ], + "start": 0, + "end": 0 + } + ], + "rotation_duration": 86400, + "handoff_time": 0, + "enable_time": 1767542400, + "expire_time": 0, + "restrict_mode": 0, + "restrict_start": 0, + "restrict_end": 0, + "restrict_periods": [], + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "create_at": 1775205795, + "create_by": 2476123212131, + "update_at": 1775205795, + "update_by": 2476123212131, + "layer_name": "Layer 1", + "fair_rotation": false, + "layer_start": 1767542400, + "layer_end": null, + "rotation_unit": "day", + "rotation_value": 1, + "mask_continuous_enabled": false + } + ], + "schedule_layers": [ + { + "layer_name": "Layer 1", + "name": "Layer 1", + "mode": 0, + "schedules": [ + { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 3122470302131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "index": 0 + }, + { + "start": 1776096000, + "end": 1776182400, + "group": { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2659460982131 + ] + } + ], + "start": 1776096000, + "end": 1776182400 + }, + "index": 0 + } + ] + } + ], + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": [ + { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 3122470302131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "index": 0 + } + ] + }, + "notify": { + "advance_in_time": 300, + "fixed_time": null, + "by": { + "follow_preference": false, + "personal_channels": [ + "email" + ] + }, + "webhooks": [ + { + "type": "feishu_app", + "settings": { + "token": "", + "alias": "", + "data_source_id": 5427276014131, + "chat_ids": [ + "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d" + ], + "verify_token": "", + "sign_secret": "" + } + } + ] + }, + "schedule_id": 5789640530410, + "schedule_name": "test-000001", + "team_id": 4291079133131, + "description": "abc", + "layer_schedules": [ + { + "layer_name": "Layer 1", + "name": "Layer 1", + "mode": 0, + "schedules": [ + { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 3122470302131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "index": 0 + } + ] + } + ], + "status": 0, + "cur_oncall": { + "start": 1775972040, + "end": 1776009600, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2451002751131 + ] + } + ], + "start": 1775972040, + "end": 1776009600 + }, + "update_at": 0, + "weight": 0, + "index": 0 + }, + "next_oncall": { + "start": 1776009600, + "end": 1776096000, + "group": { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 3122470302131 + ] + } + ], + "start": 1776009600, + "end": 1776096000 + }, + "update_at": 0, + "weight": 0, + "index": 0 + } + } + } + } + } + }, + "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/ScheduleInfoRequest" + }, + "example": { + "schedule_id": 2001, + "start": 1712000000, + "end": 1712086400 + } + } + } + } + } + }, + "/schedule/list": { + "post": { + "operationId": "scheduleList", + "summary": "查询值班表列表", + "description": "返回值班表的分页列表。若同时传入 start 与 end(间隔不超过 45 天),响应会包含计算后的排班分层。", + "tags": [ + "On-call/值班排班" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/schedules/schedule-list", + "metadata": { + "sidebarTitle": "查询值班表列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "id": 5789640530410, + "name": "test-000001", + "account_id": 2451002751131, + "group_id": 4291079133131, + "disabled": 0, + "create_at": 1766110836, + "create_by": 2476123212131, + "update_at": 1775205795, + "update_by": 2476123212131, + "layers": null, + "schedule_layers": null, + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": null + }, + "notify": { + "advance_in_time": 300, + "fixed_time": null, + "by": { + "follow_preference": false, + "personal_channels": [ + "email" + ] + }, + "webhooks": [ + { + "type": "feishu_app", + "settings": { + "token": "", + "alias": "", + "data_source_id": 5427276014131, + "chat_ids": [ + "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d" + ], + "verify_token": "", + "sign_secret": "" + } + } + ] + }, + "schedule_id": 5789640530410, + "schedule_name": "test-000001", + "team_id": 4291079133131, + "description": "abc", + "layer_schedules": null, + "status": 0, + "cur_oncall": null, + "next_oncall": null + }, + { + "id": 5432326025106, + "name": "test-2509300001", + "account_id": 2451002751131, + "group_id": 2477033058131, + "disabled": 0, + "create_at": 1759132037, + "create_by": 2476123212131, + "update_at": 1775207501, + "update_by": 2476123212131, + "layers": null, + "schedule_layers": null, + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": null + }, + "notify": { + "advance_in_time": 300, + "fixed_time": null, + "by": { + "follow_preference": true, + "personal_channels": null + }, + "webhooks": null + }, + "schedule_id": 5432326025106, + "schedule_name": "test-2509300001", + "team_id": 2477033058131, + "description": "", + "layer_schedules": null, + "status": 0, + "cur_oncall": null, + "next_oncall": null + } + ], + "total": 41 + } + } + } + } + }, + "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/ScheduleListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "query": "production", + "is_my_team": true + } + } + } + } + } + }, + "/schedule/self": { + "post": { + "operationId": "scheduleSelf", + "summary": "查询我的值班表", + "description": "返回当前用户被分配的值班表列表。", + "tags": [ + "On-call/值班排班" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/schedules/schedule-self", + "metadata": { + "sidebarTitle": "查询我的值班表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleSelfResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "id": 2539108069860, + "name": "Open Source Q&A", + "account_id": 2451002751131, + "group_id": 2477033058131, + "disabled": 0, + "create_at": 1702623874, + "create_by": 2451002751131, + "update_at": 1710468081, + "update_by": 2476444212131, + "layers": [ + { + "account_id": 2451002751131, + "name": "Rule 1", + "schedule_id": 2539108069860, + "hidden": 0, + "mode": 0, + "weight": 0, + "groups": [ + { + "group_name": "A", + "name": "A", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2476444212131 + ] + } + ], + "start": 0, + "end": 0 + }, + { + "group_name": "B", + "name": "B", + "members": [ + { + "role_id": 0, + "person_ids": [ + 2469167612131 + ] + } + ], + "start": 0, + "end": 0 + } + ], + "rotation_duration": 86400, + "handoff_time": 0, + "enable_time": 1702623874, + "expire_time": 0, + "restrict_mode": 0, + "restrict_start": 0, + "restrict_end": 0, + "restrict_periods": [], + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "create_at": 1702623874, + "create_by": 2451002751131, + "update_at": 1710468081, + "update_by": 2476444212131, + "layer_name": "Rule 1", + "fair_rotation": false, + "layer_start": 1702623874, + "layer_end": null, + "rotation_unit": "day", + "rotation_value": 1, + "mask_continuous_enabled": false + } + ], + "schedule_layers": null, + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": null + }, + "notify": { + "fixed_time": null, + "by": null, + "webhooks": null + }, + "schedule_id": 2539108069860, + "schedule_name": "Open Source Q&A", + "team_id": 2477033058131, + "description": "", + "layer_schedules": null, + "status": 0, + "cur_oncall": null, + "next_oncall": null + } + ] + } + } + } + } + }, + "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/ScheduleSelfRequest" + }, + "example": { + "start": 1712000000, + "end": 1712086400 + } + } + } + } + } + }, + "/schedule/infos": { + "post": { + "operationId": "scheduleInfos", + "summary": "批量获取值班表", + "description": "根据 ID 列表批量返回值班表信息。", + "tags": [ + "On-call/值班排班" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/schedules/schedule-infos", + "metadata": { + "sidebarTitle": "批量获取值班表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleSelfResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "id": 5789640530410, + "name": "test-000001", + "account_id": 2451002751131, + "group_id": 4291079133131, + "disabled": 0, + "create_at": 1766110836, + "create_by": 2476123212131, + "update_at": 1775205795, + "update_by": 2476123212131, + "layers": null, + "schedule_layers": null, + "final_schedule": { + "layer_name": "", + "name": "", + "mode": 0, + "schedules": null + }, + "notify": { + "advance_in_time": 300, + "fixed_time": null, + "by": { + "follow_preference": false, + "personal_channels": [ + "email" + ] + }, + "webhooks": [ + { + "type": "feishu_app", + "settings": { + "token": "", + "alias": "", + "data_source_id": 5427276014131, + "chat_ids": [ + "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d" + ], + "verify_token": "", + "sign_secret": "" + } + } + ] + }, + "schedule_id": 5789640530410, + "schedule_name": "test-000001", + "team_id": 4291079133131, + "description": "abc", + "layer_schedules": null, + "status": 0, + "cur_oncall": null, + "next_oncall": null + } + ] + } + } + } + } + }, + "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/ScheduleIDsRequest" + }, + "example": { + "schedule_ids": [ + 2001, + 2002, + 2003 + ] + } + } + } + } + } + }, + "/calendar/create": { + "post": { + "operationId": "calendarCreate", + "summary": "创建服务日历", + "description": "创建个人服务日历。每个账户默认最多 5 个日历,可通过 Flashcat-Break-Cal-Limit 请求头突破限制。", + "tags": [ + "On-call/日历管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/calendars/calendar-create", + "metadata": { + "sidebarTitle": "创建服务日历" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "cal_name": "API Test Calendar" + } + } + } + } + }, + "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/CalendarCreateRequest" + }, + "example": { + "cal_name": "Production On-Call Calendar", + "description": "Calendar for production on-call team", + "timezone": "Asia/Shanghai", + "workdays": [ + 1, + 2, + 3, + 4, + 5 + ] + } + } + } + } + } + }, + "/calendar/update": { + "post": { + "operationId": "calendarUpdate", + "summary": "更新服务日历", + "description": "更新个人服务日历,仅更新传入的非空字段。", + "tags": [ + "On-call/日历管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/calendars/calendar-update", + "metadata": { + "sidebarTitle": "更新服务日历" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CalendarUpdateRequest" + }, + "example": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "cal_name": "Production On-Call Calendar (Updated)", + "timezone": "America/New_York", + "workdays": [ + 1, + 2, + 3, + 4, + 5 + ] + } + } + } + } + } + }, + "/calendar/delete": { + "post": { + "operationId": "calendarDelete", + "summary": "删除服务日历", + "description": "删除个人服务日历。当日历被分派或静默策略引用时删除会失败。", + "tags": [ + "On-call/日历管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/calendars/calendar-delete", + "metadata": { + "sidebarTitle": "删除服务日历" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CalendarIDRequest" + }, + "example": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM" + } + } + } + } + } + }, + "/calendar/info": { + "post": { + "operationId": "calendarInfo", + "summary": "获取服务日历详情", + "description": "返回服务日历的详细信息。", + "tags": [ + "On-call/日历管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/calendars/calendar-info", + "metadata": { + "sidebarTitle": "获取服务日历详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_id": 2451002751131, + "team_id": 2477033058131, + "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg", + "cal_name": "Stock Exchange Calendar", + "description": "A stock market trading calendar example", + "timezone": "Asia/Shanghai", + "kind": "personal", + "workdays": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], + "created_at": 1702455630, + "updated_at": 1775529526, + "creator_id": 2476444212131, + "updated_by": 3790925372131, + "status": "enabled" + } + } + } + } + }, + "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/CalendarIDRequest" + }, + "example": { + "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg" + } + } + } + } + } + }, + "/calendar/list": { + "post": { + "operationId": "calendarList", + "summary": "查询服务日历列表", + "description": "返回当前账户可见的服务日历列表。", + "tags": [ + "On-call/日历管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/calendars/calendar-list", + "metadata": { + "sidebarTitle": "查询服务日历列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "team_id": 2477033058131, + "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg", + "cal_name": "Stock Exchange Calendar", + "description": "A stock market trading calendar example", + "timezone": "Asia/Shanghai", + "kind": "personal", + "workdays": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], + "created_at": 1702455630, + "updated_at": 1775529526, + "creator_id": 2476444212131, + "updated_by": 3790925372131, + "status": "enabled" + }, + { + "account_id": 2451002751131, + "team_id": 0, + "cal_id": "cal.VZYkchxJhGELSF4jzkUAud", + "cal_name": "HK Stock Exchange Calendar", + "description": "Hong Kong Stock Exchange trading days calendar", + "timezone": "Asia/Shanghai", + "kind": "personal", + "extra_cal_ids": [ + "zh-cn.china.official" + ], + "created_at": 1702968470, + "updated_at": 1775188967, + "creator_id": 2451002751131, + "updated_by": 3790925372131, + "status": "enabled" + } + ], + "total": 8 + } + } + } + } + }, + "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/CalendarListRequest" + }, + "example": { + "kind": "personal" + } + } + } + } + } + }, + "/calendar/event/upsert": { + "post": { + "operationId": "calEventUpsert", + "summary": "创建或更新日历事件", + "description": "创建或更新日历事件(节假日或工作日覆盖)。不传 event_id 时会创建新事件。", + "tags": [ + "On-call/日历管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/calendars/cal-event-upsert", + "metadata": { + "sidebarTitle": "创建或更新日历事件" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalEventUpsertResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4", + "summary": "Test Holiday" + } + } + } + } + }, + "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/CalEventUpsertRequest" + }, + "example": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "summary": "Labour Day", + "start_at": "2024-05-01", + "end_at": "2024-05-06", + "is_off": true, + "description": "International Workers Day holiday" + } + } + } + } + } + }, + "/calendar/event/delete": { + "post": { + "operationId": "calEventDelete", + "summary": "删除日历事件", + "description": "根据日历 ID 与事件 ID 删除日历事件。", + "tags": [ + "On-call/日历管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/calendars/cal-event-delete", + "metadata": { + "sidebarTitle": "删除日历事件" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalendarEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CalEventIDRequest" + }, + "example": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4" + } + } + } + } + } + }, + "/calendar/event/list": { + "post": { + "operationId": "calEventList", + "summary": "查询日历事件列表", + "description": "返回个人日历在指定年/月/日范围内的事件列表。未同时传入 month 和 day 时返回整年数据。", + "tags": [ + "On-call/日历管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/calendars/cal-event-list", + "metadata": { + "sidebarTitle": "查询日历事件列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CalEventListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "creator_id": 2476444212131, + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4", + "summary": "Test Holiday", + "description": "A test holiday event", + "start_at": "2026-05-01", + "end_at": "2026-05-02", + "is_off": true, + "created_at": 1775972034, + "updated_at": 1775972034 + }, + { + "account_id": 2451002751131, + "creator_id": 2451002751131, + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "event_id": "non_work.20260502", + "summary": "non-working day (Saturday)", + "description": "", + "start_at": "2026-05-02", + "end_at": "2026-05-03", + "is_off": true, + "created_at": 0, + "updated_at": 0 + } + ], + "total": 11 + } + } + } + } + }, + "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/CalEventListRequest" + }, + "example": { + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "year": 2024, + "month": 5 + } + } + } + } + } + }, + "/template/info": { + "post": { + "operationId": "template-read-info", + "summary": "查看模板详情", + "description": "按 ID 返回单个通知模板。", + "tags": [ + "On-call/通知模板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **模板查看**(`on-call`) |\n\n## 使用说明\n\n- 传入 `000000000000000000000001` 作为 `template_id` 可以获取当前账户语种下的系统预置模板。", + "href": "/zh/api-reference/on-call/notification-templates/template-read-info", + "metadata": { + "sidebarTitle": "查看模板详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TemplateItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_id": 10023, + "team_id": 0, + "template_id": "6605a1b2c3d4e5f6a7b8c9d0", + "template_name": "生产环境默认模板", + "description": "Default template for production incidents.", + "email": "Incident {{ .IncidentName }} on {{ .Severity }}", + "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}", + "voice": "", + "dingtalk": "", + "wecom": "", + "feishu": "", + "feishu_app": "", + "dingtalk_app": "", + "wecom_app": "", + "slack_app": "", + "teams_app": "", + "telegram": "", + "slack": "", + "zoom": "", + "status": "enabled", + "creator_id": 80011, + "updated_by": 80011, + "created_at": 1712700000, + "updated_at": 1712702400 + } + } + } + } + }, + "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/TemplateIDRequest" + }, + "example": { + "template_id": "6605a1b2c3d4e5f6a7b8c9d0" + } + } + } + } + } + }, + "/template/list": { + "post": { + "operationId": "template-read-list", + "summary": "查询模板列表", + "description": "分页返回当前账户下的通知模板列表。", + "tags": [ + "On-call/通知模板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **模板查看**(`on-call`) 或 **模板管理**(`on-call`) |\n\n## 使用说明\n\n- 默认返回第 1 页、每页 20 条。响应中的 `has_next_page` 可以直接告知是否还有下一页,无需额外计数请求。\n- 当 `is_my_team=true` 时 `team_ids` 字段会被忽略。", + "href": "/zh/api-reference/on-call/notification-templates/template-read-list", + "metadata": { + "sidebarTitle": "查询模板列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TemplateListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 47, + "has_next_page": true, + "items": [ + { + "account_id": 10023, + "team_id": 0, + "template_id": "6605a1b2c3d4e5f6a7b8c9d0", + "template_name": "生产环境默认模板", + "description": "Default template for production incidents.", + "email": "Incident {{ .IncidentName }} on {{ .Severity }}", + "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}", + "voice": "", + "dingtalk": "", + "wecom": "", + "feishu": "", + "feishu_app": "", + "dingtalk_app": "", + "wecom_app": "", + "slack_app": "", + "teams_app": "", + "telegram": "", + "slack": "", + "zoom": "", + "status": "enabled", + "creator_id": 80011, + "updated_by": 80011, + "created_at": 1712700000, + "updated_at": 1712702400 + } + ] + } + } + } + } + }, + "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/TemplateListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "orderby": "updated_at", + "asc": false, + "is_my_team": false + } + } + } + } + } + }, + "/template/create": { + "post": { + "operationId": "template-write-create", + "summary": "创建模板", + "description": "创建一个新的通知模板。", + "tags": [ + "On-call/通知模板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **模板管理**(`on-call`) |\n\n## 使用说明\n\n- `template_name` 必须在账户内唯一,重名会返回 `InvalidParameter`。\n- 服务端会对所有非空通道按 Mock 故障做一次渲染校验,任何通道的语法错误都会导致整个请求返回 `InvalidParameter`。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/notification-templates/template-write-create", + "metadata": { + "sidebarTitle": "创建模板" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TemplateCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "template_id": "6605a1b2c3d4e5f6a7b8c9d0", + "template_name": "生产环境默认模板" + } + } + } + } + }, + "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/TemplateCreateRequest" + }, + "example": { + "team_id": 0, + "template_name": "生产环境默认模板", + "description": "生产环境故障的默认模板。", + "email": "Incident {{ .IncidentName }} on {{ .Severity }}", + "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}" + } + } + } + } + } + }, + "/template/update": { + "post": { + "operationId": "template-write-update", + "summary": "更新模板", + "description": "替换指定模板在所有通道上的内容。", + "tags": [ + "On-call/通知模板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **模板管理**(`on-call`) |\n\n## 使用说明\n\n- 请求中的每个通道字段会覆盖存储值——想清空某通道时,把该字段设置为空字符串即可。\n- 调用者必须对目标模板所属团队拥有数据权限,否则返回 `AccessDenied`。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/notification-templates/template-write-update", + "metadata": { + "sidebarTitle": "更新模板" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TemplateUpdateRequest" + }, + "example": { + "template_id": "6605a1b2c3d4e5f6a7b8c9d0", + "template_name": "生产环境默认模板", + "description": "已更新的描述。", + "email": "Incident {{ .IncidentName }} on {{ .Severity }}", + "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}" + } + } + } + } + } + }, + "/template/delete": { + "post": { + "operationId": "template-write-delete", + "summary": "删除模板", + "description": "按 ID 软删除一个模板。", + "tags": [ + "On-call/通知模板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **模板管理**(`on-call`) |\n\n## 使用说明\n\n- 若模板仍被任何协作空间、分派策略或通知订阅引用,会返回 `400 ReferenceExist`。\n- 删除是软删除(`deleted_at` 被置值),记录仍保留用于审计,但模板不会再出现在列表中。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/notification-templates/template-write-delete", + "metadata": { + "sidebarTitle": "删除模板" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TemplateIDRequest" + }, + "example": { + "template_id": "6605a1b2c3d4e5f6a7b8c9d0" + } + } + } + } + } + }, + "/enrichment/info": { + "post": { + "operationId": "enrichment-read-info", + "summary": "查看富化规则", + "description": "返回指定集成配置的告警富化规则集。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 若该集成尚未配置富化规则,返回 `null`。", + "href": "/zh/api-reference/on-call/alert-enrichment/enrichment-read-info", + "metadata": { + "sidebarTitle": "查看富化规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EnrichmentItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 5001, + "rules": [ + { + "kind": "extraction", + "settings": { + "source_field": "labels.env", + "result_label": "environment", + "pattern": "^(prod|staging|dev).*$", + "override": true + } + } + ], + "status": "enabled", + "updated_by": 80011, + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + } + } + } + }, + "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/EnrichmentInfoRequest" + }, + "example": { + "integration_id": 5001 + } + } + } + } + } + }, + "/enrichment/list": { + "post": { + "operationId": "enrichment-read-list", + "summary": "批量查询富化规则", + "description": "批量返回指定集成 ID 列表的告警富化规则集。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/alert-enrichment/enrichment-read-list", + "metadata": { + "sidebarTitle": "批量查询富化规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EnrichmentListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "integration_id": 5001, + "rules": [], + "status": "enabled", + "updated_by": 80011, + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + ] + } + } + } + } + }, + "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/EnrichmentListRequest" + }, + "example": { + "integration_ids": [ + 5001, + 5002 + ] + } + } + } + } + } + }, + "/enrichment/upsert": { + "post": { + "operationId": "enrichment-write-upsert", + "summary": "创建或替换富化规则", + "description": "创建或全量替换指定集成的告警富化规则集,`rules` 数组将被原子替换。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 富化规则按顺序依次执行。\n- 每条规则有一个 `kind`:`extraction`(正则/gjson 提取)、`composition`(模板组合标签)、`mapping`(通过映射规则或 API 查找)、`drop`(删除标签)。\n- 可选的 `if` 字段为 `AndFilters` 条件,不匹配时跳过该规则。\n- `kind: extraction`:`source_field` 须为 `title`、`description` 或 `labels.*` 前缀的键;`pattern`(正则,须包含命名分组 `result`)和 `g_json`(GJson 路径)二选一。\n- `kind: composition`:`template` 使用 Go text/template 语法,可引用 `labels.*` 键。\n- `kind: mapping`:`mapping_type` 为 `schema`(默认)或 `api`;分别提供 `schema_id` 或 `api_id`。\n- `kind: drop`:`drop_labels` 列出要删除的标签键名。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/alert-enrichment/enrichment-write-upsert", + "metadata": { + "sidebarTitle": "创建或替换富化规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnrichmentUpsertRequest" + }, + "example": { + "integration_id": 5001, + "rules": [ + { + "kind": "extraction", + "settings": { + "source_field": "labels.env", + "result_label": "environment", + "pattern": "(?Pprod|staging|dev)", + "override": true + } + } + ] + } + } + } + } + } + }, + "/enrichment/mapping/schema/list": { + "post": { + "operationId": "mapping-schema-read-list", + "summary": "查询映射规则列表", + "description": "返回账户下所有映射规则,按创建时间升序排列。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-schema-read-list", + "metadata": { + "sidebarTitle": "查询映射规则列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingSchemaListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "items": [ + { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "schema_name": "CMDB 查询", + "description": "用 CMDB 数据富化告警", + "source_labels": [ + "host" + ], + "result_labels": [ + "owner", + "team", + "service" + ], + "status": "enabled", + "team_id": 0, + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + ] + } + } + } + } + }, + "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/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/enrichment/mapping/schema/info": { + "post": { + "operationId": "mapping-schema-read-info", + "summary": "查看映射规则详情", + "description": "根据映射规则 ID 返回单个映射规则的详细信息。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 映射规则不存在时返回 `null`。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-schema-read-info", + "metadata": { + "sidebarTitle": "查看映射规则详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingSchemaItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "schema_name": "CMDB 查询", + "description": "用 CMDB 数据富化告警", + "source_labels": [ + "host" + ], + "result_labels": [ + "owner", + "team", + "service" + ], + "status": "enabled", + "team_id": 0, + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + } + } + } + }, + "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/MappingSchemaIDRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + } + } + } + } + } + }, + "/enrichment/mapping/schema/create": { + "post": { + "operationId": "mapping-schema-write-create", + "summary": "创建映射规则", + "description": "创建新的映射规则,定义查找来源标签和待填充的结果标签。需要 Pro 计划。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 映射规则名称在账户内唯一。\n- `source_labels`(1–3 个)为查找键,`result_labels`(1–10 个)为匹配后写入的标签。\n- 标签名须符合 `^[a-z][a-z0-9_]{0,39}$`(小写)。\n- `source_labels` 与 `result_labels` 不得重叠。\n- 账户最多可创建 20 个映射规则。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-schema-write-create", + "metadata": { + "sidebarTitle": "创建映射规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingSchemaCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "schema_name": "CMDB 查询" + } + } + } + } + }, + "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/MappingSchemaCreateRequest" + }, + "example": { + "schema_name": "CMDB 查询", + "description": "用 CMDB 数据富化告警", + "source_labels": [ + "host" + ], + "result_labels": [ + "owner", + "team", + "service" + ] + } + } + } + } + } + }, + "/enrichment/mapping/schema/update": { + "post": { + "operationId": "mapping-schema-write-update", + "summary": "更新映射规则", + "description": "更新映射规则的名称、描述或所属团队。来源标签和结果标签创建后不可更改。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 仅映射规则创建者、账户管理员或所属团队成员可更新。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-schema-write-update", + "metadata": { + "sidebarTitle": "更新映射规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingSchemaUpdateRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "schema_name": "CMDB 查询 v2", + "description": "更新后的描述" + } + } + } + } + } + }, + "/enrichment/mapping/schema/delete": { + "post": { + "operationId": "mapping-schema-write-delete", + "summary": "删除映射规则", + "description": "删除映射规则及其所有关联数据。若该规则被富化规则或 Webhook 引用,则拒绝删除。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 若映射规则仍被引用,响应返回 HTTP 400,`refs` 字段列出所有阻止删除的引用。\n- 仅映射规则创建者、账户管理员或所属团队成员可删除。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。\n- 本接口为高危操作。控制台 JWT 调用需二次验证码;`app_key` 调用跳过 MFA 但仍会被完整记录,请妥善保管 app_key。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-schema-write-delete", + "metadata": { + "sidebarTitle": "删除映射规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingSchemaIDRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + } + } + } + } + } + }, + "/enrichment/mapping/data/list": { + "post": { + "operationId": "mapping-data-read-list", + "summary": "查询映射数据列表", + "description": "分页返回指定映射规则的数据行,可按来源标签值进行精确过滤。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 若提供 `query`,须包含全部来源标签——不支持部分来源标签查询。\n- 支持游标分页(`search_after_ctx`)或页码分页(`p`、`limit`)。`limit` 默认 20,最大 100。\n- 响应中的 `search_after_ctx` 可用于获取下一页。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-data-read-list", + "metadata": { + "sidebarTitle": "查询映射数据列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingDataListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "key": "server01", + "fields": { + "host": "server01", + "owner": "alice", + "team": "sre", + "service": "api" + }, + "created_at": 1710000000, + "updated_at": 1710000000 + } + ], + "total": 1, + "has_next_page": false + } + } + } + } + }, + "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/MappingDataListRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "orderby": "updated_at", + "asc": false, + "p": 1, + "limit": 20 + } + } + } + } + } + }, + "/enrichment/mapping/data/upsert": { + "post": { + "operationId": "mapping-data-write-upsert", + "summary": "写入映射数据", + "description": "向映射规则中插入或更新最多 1000 条数据行,每行须包含所有来源标签和结果标签。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 每条数据须包含映射规则中定义的所有来源标签和结果标签的值。\n- 未知标签的值将被静默忽略。\n- 每个值最多 2048 个字符。\n- Upsert 以来源标签组合为键,来源键相同的行将被更新。\n- 单个映射规则默认最多存储 10,000 条数据。\n- 每个映射规则的写入操作有锁保护,并发 Upsert 可能返回 `ErrRequestTooFrequently`。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-data-write-upsert", + "metadata": { + "sidebarTitle": "写入映射数据" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingDataUpsertResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "keys": [ + "server01", + "server02" + ] + } + } + } + } + }, + "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/MappingDataUpsertRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "docs": [ + { + "host": "server01", + "owner": "alice", + "team": "sre", + "service": "api" + }, + { + "host": "server02", + "owner": "bob", + "team": "平台", + "service": "gateway" + } + ] + } + } + } + } + } + }, + "/enrichment/mapping/data/delete": { + "post": { + "operationId": "mapping-data-write-delete", + "summary": "删除映射数据", + "description": "按键名批量删除最多 100 条映射数据行。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-data-write-delete", + "metadata": { + "sidebarTitle": "删除映射数据" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingDataDeleteRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "keys": [ + "server01", + "server02" + ] + } + } + } + } + } + }, + "/enrichment/mapping/data/truncate": { + "post": { + "operationId": "mapping-data-write-truncate", + "summary": "清空映射数据", + "description": "删除指定映射规则的全部数据行。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 此操作不可逆,将删除映射规则中的所有数据。\n- 本接口为高危操作。控制台 JWT 调用需二次验证码;`app_key` 调用跳过 MFA 但仍会被完整记录,请妥善保管 app_key。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-data-write-truncate", + "metadata": { + "sidebarTitle": "清空映射数据" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingSchemaIDRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + } + } + } + } + } + }, + "/enrichment/mapping/data/upload": { + "post": { + "operationId": "mapping-data-write-upload", + "summary": "通过 CSV 上传映射数据", + "description": "上传 CSV 文件批量导入映射数据。默认情况下,导入前先清空现有数据。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **20 次/分钟**;**2 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 请求须使用 `Content-Type: multipart/form-data`,文件字段名为 `file`,`schema_id` 通过查询参数传入。\n- CSV 标题行须包含所有来源标签和结果标签名称。\n- 文件大小上限:100 MB。\n- 默认情况下,导入前先清空现有数据;传入查询参数 `do_not_truncate_first=TRUE` 可改为追加模式。\n- CSV 中存在重复来源标签组合时返回 400 错误。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-data-write-upload", + "metadata": { + "sidebarTitle": "通过 CSV 上传映射数据" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingDataUploadRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + } + } + } + } + } + }, + "/enrichment/mapping/data/download": { + "post": { + "operationId": "mapping-data-read-download", + "summary": "下载映射数据 CSV", + "description": "将映射规则的所有数据行导出为 CSV 文件。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 响应为 CSV 文件,包含 `Content-Disposition: attachment` 响应头。\n- CSV 标题行按顺序对应映射规则的来源标签和结果标签。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-data-read-download", + "metadata": { + "sidebarTitle": "下载映射数据 CSV" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CsvFileResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": "host,owner,team,service\nserver01,alice,sre,api\n" + } + } + } + }, + "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/MappingSchemaIDRequest" + }, + "example": { + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + } + } + } + } + } + }, + "/enrichment/mapping/api/list": { + "post": { + "operationId": "mapping-api-read-list", + "summary": "查询映射 API 列表", + "description": "返回账户下所有配置的映射 API。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-api-read-list", + "metadata": { + "sidebarTitle": "查询映射 API 列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingAPIListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 1, + "items": [ + { + "api_id": "665f1a2b3c4d5e6f7a8b9c02", + "api_name": "CMDB API", + "description": "查询 CMDB 主机元数据", + "url": "https://cmdb.example.com/api/lookup", + "headers": { + "X-Token": "***" + }, + "timeout": 2, + "retry_count": 1, + "insecure_skip_verify": false, + "status": "enabled", + "team_id": 0, + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + ] + } + } + } + } + }, + "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/EmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/enrichment/mapping/api/info": { + "post": { + "operationId": "mapping-api-read-info", + "summary": "查看映射 API 详情", + "description": "根据映射 API ID 返回单个映射 API 的详细信息。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 映射 API 不存在时返回 `null`。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-api-read-info", + "metadata": { + "sidebarTitle": "查看映射 API 详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingAPIItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "api_id": "665f1a2b3c4d5e6f7a8b9c02", + "api_name": "CMDB API", + "url": "https://cmdb.example.com/api/lookup", + "timeout": 2, + "retry_count": 1, + "insecure_skip_verify": false, + "status": "enabled", + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1710000000 + } + } + } + } + }, + "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/MappingAPIIDRequest" + }, + "example": { + "api_id": "665f1a2b3c4d5e6f7a8b9c02" + } + } + } + } + } + }, + "/enrichment/mapping/api/create": { + "post": { + "operationId": "mapping-api-write-create", + "summary": "创建映射 API", + "description": "创建新的外部 HTTP API 端点,用于通过 HTTP 查询富化告警。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- `url` 须以 `http://` 或 `https://` 开头,SaaS 模式下不得解析为内网 IP。\n- `timeout` 为 HTTP 读取超时秒数(1–3,默认 2)。\n- `retry_count` 为失败重试次数(0–1,默认 0)。\n- SaaS 模式下,含敏感名称的请求头(如 `authorization`、`cookie`)将被拒绝。\n- 账户最多可创建 50 个映射 API。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-api-write-create", + "metadata": { + "sidebarTitle": "创建映射 API" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MappingAPICreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "api_id": "665f1a2b3c4d5e6f7a8b9c02", + "api_name": "CMDB API" + } + } + } + } + }, + "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/MappingAPICreateRequest" + }, + "example": { + "api_name": "CMDB API", + "description": "查询 CMDB 主机元数据", + "url": "https://cmdb.example.com/api/lookup", + "headers": { + "X-Token": "mytoken" + }, + "timeout": 2, + "retry_count": 1, + "insecure_skip_verify": false + } + } + } + } + } + }, + "/enrichment/mapping/api/update": { + "post": { + "operationId": "mapping-api-write-update", + "summary": "更新映射 API", + "description": "更新现有映射 API 的配置。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 仅 API 创建者、账户管理员或所属团队成员可更新。\n- 所有可更新字段均为可选,仅更新提供的字段。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-api-write-update", + "metadata": { + "sidebarTitle": "更新映射 API" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingAPIUpdateRequest" + }, + "example": { + "api_id": "665f1a2b3c4d5e6f7a8b9c02", + "timeout": 3, + "retry_count": 1 + } + } + } + } + } + }, + "/enrichment/mapping/api/delete": { + "post": { + "operationId": "mapping-api-write-delete", + "summary": "删除映射 API", + "description": "删除映射 API。若该 API 被富化规则引用,则拒绝删除。", + "tags": [ + "On-call/标签增强" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 若 API 仍被引用,响应返回 HTTP 400,`refs` 字段列出所有阻止删除的引用。\n- 仅 API 创建者、账户管理员或所属团队成员可删除。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/alert-enrichment/mapping-api-write-delete", + "metadata": { + "sidebarTitle": "删除映射 API" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MappingAPIIDRequest" + }, + "example": { + "api_id": "665f1a2b3c4d5e6f7a8b9c02" + } + } + } + } + } + }, + "/insight/alert/topk-by-label": { + "post": { + "operationId": "insightTopkAlertsByLabel", + "summary": "查看按 check/resource 聚合的 Top-K 告警", + "description": "返回指定时间范围内按 `check` 或 `resource` 聚合的 Top-K 告警组。", + "tags": [ + "On-call/分析看板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/analytics/insight-topk-alerts-by-label", + "metadata": { + "sidebarTitle": "查看按 check/resource 聚合的 Top-K 告警" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/InsightAlertByLabelResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "label": "cpu-high", + "total_alert_cnt": 312, + "total_alert_event_cnt": 987 + }, + { + "label": "disk-full", + "total_alert_cnt": 178, + "total_alert_event_cnt": 452 + }, + { + "label": "memory-oom", + "total_alert_cnt": 94, + "total_alert_event_cnt": 231 + } + ] + } + } + } + } + }, + "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/InsightTopkAlertByLabelRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "label": "check", + "k": 10, + "orderby": "total_alert_cnt" + } + } + } + } + } + }, + "/insight/account": { + "post": { + "operationId": "insightByAccount", + "summary": "查看账户级别洞察", + "description": "返回整个账户的聚合故障洞察指标。", + "tags": [ + "On-call/分析看板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/analytics/insight-by-account", + "metadata": { + "sidebarTitle": "查看账户级别洞察" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DimensionInsightResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "ts": 1740844800, + "total_incident_cnt": 2, + "total_incidents_acknowledged": 2, + "total_incidents_closed": 2, + "total_incidents_auto_closed": 0, + "total_incidents_manually_closed": 2, + "total_incidents_timeout_closed": 0, + "total_incidents_escalated": 0, + "total_incidents_manually_escalated": 0, + "total_incidents_timeout_escalated": 0, + "total_incidents_reassigned": 2, + "total_interruptions": 3, + "total_notifications": 6, + "total_engaged_seconds": 3317709, + "total_seconds_to_ack": 3317709, + "total_seconds_to_close": 3749514, + "mean_seconds_to_ack": 1658854.5, + "mean_seconds_to_close": 1874757, + "noise_reduction_pct": 0, + "acknowledgement_pct": 100, + "total_alert_cnt": 0, + "total_alert_event_cnt": 0 + } + ] + } + } + } + } + }, + "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/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "aggregate_unit": "day", + "severities": [ + "Critical", + "Warning" + ] + } + } + } + } + } + }, + "/insight/incident/list": { + "post": { + "operationId": "insightIncidentList", + "summary": "查询洞察故障列表", + "description": "返回用于分析看板的故障分页列表,包含每条故障的处理效能指标。", + "tags": [ + "On-call/分析看板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/analytics/insight-incident-list", + "metadata": { + "sidebarTitle": "查询洞察故障列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/InsightIncidentListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 2, + "has_next_page": false, + "items": [ + { + "incident_id": "67ca560c381a4fedb664f5f8", + "title": "CPU spike on prod-web-01", + "description": "CPU usage exceeded 90% threshold", + "team_id": 4295771902131, + "team_name": "SRE Team", + "channel_id": 4321322010131, + "channel_name": "Production Alerts", + "progress": "Closed", + "severity": "Info", + "created_at": 1741313548, + "closed_by": "manually", + "seconds_to_ack": 1052085, + "seconds_to_close": 1483880, + "engaged_seconds": 1052085, + "hours": "work", + "responders": [ + { + "person_id": 3790925372131, + "assigned_at": 1741313548, + "acknowledged_at": 1742365633, + "person_name": "alice", + "email": "alice@example.com" + } + ], + "assigned_to": { + "person_ids": [ + 3790925372131 + ], + "escalate_rule_id": "000000000000000000000000", + "layer_idx": 0, + "type": "reassign" + }, + "labels": {}, + "fields": {}, + "notifications": 4, + "interruptions": 2, + "assignments": 2, + "reassignments": 1, + "acknowledgements": 1, + "escalations": 0, + "timeout_escalations": 0, + "manual_escalations": 0, + "creator_id": 3790925372131, + "creator_name": "alice" + } + ] + } + } + } + } + }, + "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/InsightIncidentListRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "p": 1, + "limit": 20, + "severities": [ + "Critical" + ] + } + } + } + } + } + }, + "/insight/incident/export": { + "post": { + "operationId": "insightIncidentExport", + "summary": "导出洞察故障", + "description": "将故障分析列表以 CSV 文件形式导出。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", + "tags": [ + "On-call/分析看板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**;**1 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/analytics/insight-incident-export", + "metadata": { + "sidebarTitle": "导出洞察故障" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightIncidentExportRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "severities": [ + "Critical", + "Warning" + ], + "export_fields": [ + "incident_id", + "title", + "severity", + "created_at", + "seconds_to_close" + ], + "description_html_to_text": true + } + } + } + } + } + }, + "/insight/channel": { + "post": { + "operationId": "insightByChannel", + "summary": "查看协作空间洞察", + "description": "返回按协作空间聚合的洞察指标。", + "tags": [ + "On-call/分析看板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/analytics/insight-by-channel", + "metadata": { + "sidebarTitle": "查看协作空间洞察" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DimensionInsightResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "ts": 1740844800, + "channel_id": 4321322010131, + "channel_name": "Production Alerts", + "total_incident_cnt": 2, + "total_incidents_acknowledged": 2, + "total_incidents_closed": 2, + "total_incidents_auto_closed": 0, + "total_incidents_manually_closed": 2, + "total_incidents_timeout_closed": 0, + "total_incidents_escalated": 0, + "total_incidents_manually_escalated": 0, + "total_incidents_timeout_escalated": 0, + "total_incidents_reassigned": 2, + "total_interruptions": 3, + "total_notifications": 6, + "total_engaged_seconds": 3317709, + "total_seconds_to_ack": 3317709, + "total_seconds_to_close": 3749514, + "mean_seconds_to_ack": 1658854.5, + "mean_seconds_to_close": 1874757, + "noise_reduction_pct": 0, + "acknowledgement_pct": 100, + "total_alert_cnt": 0, + "total_alert_event_cnt": 0 + } + ] + } + } + } + } + }, + "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/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "channel_ids": [ + 4321322010131 + ], + "aggregate_unit": "day" + } + } + } + } + } + }, + "/insight/channel/export": { + "post": { + "operationId": "insightChannelExport", + "summary": "导出协作空间洞察", + "description": "将协作空间洞察指标以 CSV 文件形式导出。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", + "tags": [ + "On-call/分析看板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**;**1 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/analytics/insight-channel-export", + "metadata": { + "sidebarTitle": "导出协作空间洞察" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "channel_ids": [ + 4321322010131 + ], + "severities": [ + "Critical", + "Warning" + ] + } + } + } + } + } + }, + "/insight/team": { + "post": { + "operationId": "insightByTeam", + "summary": "查看团队洞察", + "description": "返回按团队聚合的洞察指标。", + "tags": [ + "On-call/分析看板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/analytics/insight-by-team", + "metadata": { + "sidebarTitle": "查看团队洞察" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DimensionInsightResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "ts": 1740844800, + "team_id": 4295771902131, + "team_name": "SRE Team", + "total_incident_cnt": 2, + "total_incidents_acknowledged": 2, + "total_incidents_closed": 2, + "total_incidents_auto_closed": 0, + "total_incidents_manually_closed": 2, + "total_incidents_timeout_closed": 0, + "total_incidents_escalated": 0, + "total_incidents_manually_escalated": 0, + "total_incidents_timeout_escalated": 0, + "total_incidents_reassigned": 2, + "total_interruptions": 3, + "total_notifications": 6, + "total_engaged_seconds": 3317709, + "total_seconds_to_ack": 3317709, + "total_seconds_to_close": 3749514, + "mean_seconds_to_ack": 1658854.5, + "mean_seconds_to_close": 1874757, + "noise_reduction_pct": 0, + "acknowledgement_pct": 100, + "total_alert_cnt": 0, + "total_alert_event_cnt": 0 + } + ] + } + } + } + } + }, + "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/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "team_ids": [ + 4295771902131 + ], + "aggregate_unit": "day" + } + } + } + } + } + }, + "/insight/team/export": { + "post": { + "operationId": "insightTeamExport", + "summary": "导出团队洞察", + "description": "将团队洞察指标以 CSV 文件形式导出。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", + "tags": [ + "On-call/分析看板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**;**1 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/analytics/insight-team-export", + "metadata": { + "sidebarTitle": "导出团队洞察" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "team_ids": [ + 4295771902131 + ], + "severities": [ + "Critical", + "Warning" + ] + } + } + } + } + } + }, + "/insight/responder": { + "post": { + "operationId": "insightByResponder", + "summary": "查看处理人员洞察", + "description": "返回按处理人员聚合的洞察指标。", + "tags": [ + "On-call/分析看板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/analytics/insight-by-responder", + "metadata": { + "sidebarTitle": "查看处理人员洞察" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ResponderInsightResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "ts": 1740844800, + "responder_id": 3790925372131, + "responder_name": "alice", + "total_incident_cnt": 1, + "total_incidents_acknowledged": 1, + "total_incidents_reassigned": 0, + "total_incidents_escalated": 0, + "total_incidents_timeout_escalated": 0, + "total_incidents_manually_escalated": 0, + "total_interruptions": 1, + "total_notifications": 2, + "total_engaged_seconds": 10, + "total_seconds_to_ack": 2265624, + "mean_seconds_to_ack": 2265624, + "acknowledgement_pct": 100 + } + ] + } + } + } + } + }, + "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/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "responder_ids": [ + 3790925372131 + ], + "aggregate_unit": "day" + } + } + } + } + } + }, + "/insight/responder/export": { + "post": { + "operationId": "insightResponderExport", + "summary": "导出处理人员洞察", + "description": "将处理人员洞察指标以 CSV 文件形式导出。响应为 CSV 字节流(`Content-Disposition: attachment`),不是 JSON 响应包。", + "tags": [ + "On-call/分析看板" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**;**1 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/analytics/insight-responder-export", + "metadata": { + "sidebarTitle": "导出处理人员洞察" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightQueryRequest" + }, + "example": { + "start_time": 1712000000, + "end_time": 1712604800, + "responder_ids": [ + 3790925372131 + ], + "severities": [ + "Critical", + "Warning" + ] + } + } + } + } + } + }, + "/status-page/change/info": { + "get": { + "operationId": "statusPageChangeInfo", + "summary": "获取状态页事件详情", + "description": "获取状态页指定事件(故障或维护)的详细信息。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/status-pages/status-page-change-info", + "metadata": { + "sidebarTitle": "获取状态页事件详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageChangeItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "change_id": 5821693893131, + "page_id": 5750613685214, + "type": "incident", + "title": "Web Console Degraded Performance", + "description": "The issue has been resolved, and all services are operating normally.\n\nThank you for your patience.", + "status": "resolved", + "affected_components": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", + "name": "Web Console", + "available_since_seconds": 1765349358, + "order_id": 1, + "status": "operational" + } + ], + "start_at_seconds": 1766736878, + "close_at_seconds": 1775529742, + "updates": [ + { + "update_id": "01KDCVJQ88SZPHWPTDV2Z2AZW8", + "at_seconds": 1766736876, + "status": "investigating", + "description": "We are currently investigating an issue affecting some services.", + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "component_name": "Web Console", + "status": "degraded" + } + ] + }, + { + "update_id": "01KNJX3KW873ZZSRZC14SGFYS3", + "at_seconds": 1775529742, + "status": "resolved", + "description": "The issue has been resolved, and all services are operating normally.", + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "component_name": "Web Console", + "status": "operational" + } + ] + } + ], + "notify_subscribers": true + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Status page ID." + }, + { + "name": "change_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Event (change) ID." + } + ] + } + }, + "/status-page/change/list": { + "get": { + "operationId": "statusPageChangeList", + "summary": "查询状态页事件列表", + "description": "查询状态页的事件列表(故障和维护)。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/status-pages/status-page-change-list", + "metadata": { + "sidebarTitle": "查询状态页事件列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageChangeListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "change_id": 5821693893131, + "page_id": 5750613685214, + "type": "incident", + "title": "Web Console Degraded Performance", + "description": "The issue has been resolved, and all services are operating normally.", + "status": "resolved", + "affected_components": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", + "name": "Web Console", + "available_since_seconds": 1765349358, + "order_id": 1, + "status": "operational" + } + ], + "start_at_seconds": 1766736878, + "close_at_seconds": 1775529742, + "updates": [ + { + "update_id": "01KDCVJQ88SZPHWPTDV2Z2AZW8", + "at_seconds": 1766736876, + "status": "investigating", + "description": "We are currently investigating an issue affecting some services.", + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "component_name": "Web Console", + "status": "degraded" + } + ] + }, + { + "update_id": "01KNJX3KW873ZZSRZC14SGFYS3", + "at_seconds": 1775529742, + "status": "resolved", + "description": "The issue has been resolved, and all services are operating normally.", + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "component_name": "Web Console", + "status": "operational" + } + ] + } + ], + "notify_subscribers": true + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Status page ID." + }, + { + "name": "start_at_seconds", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Filter events started at or after this unix timestamp (seconds)." + }, + { + "name": "end_at_seconds", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Filter events started at or before this unix timestamp (seconds)." + }, + { + "name": "type", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "incident", + "maintenance" + ] + }, + "description": "Event type filter. Required." + }, + { + "name": "status", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ] + }, + "description": "Event status filter. Required. Must be a status valid for the given `type` (e.g. `investigating`/`identified`/`monitoring`/`resolved` for incidents; `scheduled`/`ongoing`/`completed` for maintenances)." + } + ] + } + }, + "/status-page/change/create": { + "post": { + "operationId": "statusPageChangeCreate", + "summary": "创建状态页事件", + "description": "在状态页上创建新的故障或维护事件。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面事件管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-change-create", + "metadata": { + "sidebarTitle": "创建状态页事件" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageChangeCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "change_id": 6294539747131, + "change_name": "API Test Incident" + } + } + } + } + }, + "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/CreateStatusPageChangeRequest" + }, + "example": { + "page_id": 5750613685214, + "type": "incident", + "title": "Web Console Degraded Performance", + "description": "We are investigating degraded performance affecting the web console.", + "status": "investigating", + "start_at_seconds": 1712000000, + "notify_subscribers": true, + "updates": [ + { + "status": "investigating", + "description": "We are currently investigating an issue affecting some users.", + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "status": "degraded" + } + ] + } + ] + } + } + } + } + } + }, + "/status-page/change/update": { + "post": { + "operationId": "statusPageChangeUpdate", + "summary": "更新状态页事件", + "description": "更新已有状态页事件。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面事件管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-change-update", + "metadata": { + "sidebarTitle": "更新状态页事件" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateStatusPageChangeRequest" + }, + "example": { + "page_id": 5750613685214, + "change_id": 5821693893131, + "title": "Web Console Degraded Performance (Updated)" + } + } + } + } + } + }, + "/status-page/change/delete": { + "post": { + "operationId": "statusPageChangeDelete", + "summary": "删除状态页事件", + "description": "删除指定的状态页事件。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面事件管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-change-delete", + "metadata": { + "sidebarTitle": "删除状态页事件" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteStatusPageChangeRequest" + }, + "example": { + "page_id": 5750613685214, + "change_id": 5821693893131 + } + } + } + } + } + }, + "/status-page/change/timeline/create": { + "post": { + "operationId": "statusPageChangeTimelineCreate", + "summary": "创建事件时间线", + "description": "在状态页事件上添加时间线更新。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面事件管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-change-timeline-create", + "metadata": { + "sidebarTitle": "创建事件时间线" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageChangeTimelineCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "update_id": "01KP0311872NVYFRRQ82FWXAP4" + } + } + } + } + }, + "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/CreateStatusPageChangeTimelineRequest" + }, + "example": { + "page_id": 5750613685214, + "change_id": 5821693893131, + "status": "identified", + "description": "We have identified the root cause and are working on a fix.", + "at_seconds": 1712003600, + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "status": "partial_outage" + } + ] + } + } + } + } + } + }, + "/status-page/change/timeline/update": { + "post": { + "operationId": "statusPageChangeTimelineUpdate", + "summary": "更新事件时间线", + "description": "更新状态页事件的时间线条目。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面事件管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-change-timeline-update", + "metadata": { + "sidebarTitle": "更新事件时间线" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateStatusPageChangeTimelineRequest" + }, + "example": { + "page_id": 5750613685214, + "change_id": 5821693893131, + "update_id": "01KP0311872NVYFRRQ82FWXAP4", + "description": "Corrected description: root cause identified in database layer.", + "at_seconds": 1712003600 + } + } + } + } + } + }, + "/status-page/change/timeline/delete": { + "post": { + "operationId": "statusPageChangeTimelineDelete", + "summary": "删除事件时间线", + "description": "从状态页事件中删除时间线条目。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面事件管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-change-timeline-delete", + "metadata": { + "sidebarTitle": "删除事件时间线" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteStatusPageChangeTimelineRequest" + }, + "example": { + "page_id": 5750613685214, + "change_id": 5821693893131, + "update_id": "01KP0311872NVYFRRQ82FWXAP4" + } + } + } + } + } + }, + "/status-page/subscriber/list": { + "get": { + "operationId": "statusPageSubscriberList", + "summary": "查询状态页订阅者列表", + "description": "查询已订阅状态页通知的用户列表。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/status-pages/status-page-subscriber-list", + "metadata": { + "sidebarTitle": "查询状态页订阅者列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageSubscriberListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 2, + "has_next_page": false, + "items": [ + { + "recipient": "alice@example.com", + "method": "email", + "components": [], + "all": true, + "locale": "zh-CN" + }, + { + "recipient": "bob@example.com", + "method": "email", + "components": [], + "all": true, + "locale": "en-US" + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Status page ID." + }, + { + "name": "component_ids", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Comma-separated component IDs to filter subscribers by." + }, + { + "name": "p", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "default": 1 + }, + "description": "Page number (1-based)." + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 100, + "default": 10 + }, + "description": "Page size (1-100)." + } + ] + } + }, + "/status-page/subscriber/import": { + "post": { + "operationId": "statusPageSubscriberImport", + "summary": "批量导入订阅者", + "description": "批量导入状态页的订阅者。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **20 次/分钟**;**2 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-subscriber-import", + "metadata": { + "sidebarTitle": "批量导入订阅者" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportStatusPageSubscribersRequest" + }, + "example": { + "page_id": 5750613685214, + "method": "email", + "subscribers": [ + { + "recipient": "alice@example.com", + "all": true, + "locale": "en-US" + }, + { + "recipient": "bob@example.com", + "component_ids": [ + "01KC3GAZ6ZJE40H55GM31RPWZE" + ], + "all": false, + "locale": "zh-CN" + } + ] + } + } + } + } + } + }, + "/status-page/subscriber/export": { + "post": { + "operationId": "statusPageSubscriberExport", + "summary": "导出订阅者", + "description": "以 CSV 附件形式导出状态页的订阅者列表。响应为 `text/csv` 文件,包含列:Method、Recipient、Components、Subscribe All、Locale。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**;**1 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-subscriber-export", + "metadata": { + "sidebarTitle": "导出订阅者" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageSubscriberExportResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": "Method,Recipient,Components,Subscribe All,Locale\nemail,alice@example.com,,true,zh-CN\nemail,bob@example.com,,true,en-US" + } + } + } + }, + "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/ExportStatusPageSubscribersRequest" + }, + "example": { + "page_id": 5750613685214 + } + } + } + } + } + }, + "/status-page/migrate-structure": { + "post": { + "operationId": "statusPageMigrateStructure", + "summary": "迁移状态页结构", + "description": "启动迁移任务,从 Atlassian Statuspage 导入结构和历史事件到新的 Flashduty 状态页。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-migrate-structure", + "metadata": { + "sidebarTitle": "迁移状态页结构" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageMigrationStartResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "job_id": "01KP0311872NVYFRRQ82FW0001" + } + } + } + } + }, + "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/MigrateStatusPageStructureRequest" + }, + "example": { + "api_key": "sk-stsp-xxxxxxxxxxxxxxxxxxxx", + "source_page_id": "abcdefghij" + } + } + } + } + } + }, + "/status-page/migrate-email-subscribers": { + "post": { + "operationId": "statusPageMigrateEmailSubscribers", + "summary": "迁移邮件订阅者", + "description": "启动迁移任务,从 Atlassian Statuspage 将邮件订阅者导入到已有的 Flashduty 状态页。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-migrate-email-subscribers", + "metadata": { + "sidebarTitle": "迁移邮件订阅者" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageMigrationStartResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "job_id": "01KP0311872NVYFRRQ82FW0002" + } + } + } + } + }, + "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/MigrateStatusPageEmailSubscribersRequest" + }, + "example": { + "api_key": "sk-stsp-xxxxxxxxxxxxxxxxxxxx", + "source_page_id": "abcdefghij", + "target_page_id": 5750613685214 + } + } + } + } + } + }, + "/status-page/migration/status": { + "get": { + "operationId": "statusPageMigrationStatus", + "summary": "获取迁移状态", + "description": "获取状态页迁移任务的当前状态和进度。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/on-call/status-pages/status-page-migration-status", + "metadata": { + "sidebarTitle": "获取迁移状态" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StatusPageMigrationJob" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "job_id": "01KP0311872NVYFRRQ82FW0001", + "account_id": 2451002751131, + "source_page_id": "abcdefghij", + "target_page_id": 5750613685214, + "phase": "history", + "status": "completed", + "progress": { + "total_steps": 5, + "completed_steps": 5, + "components_imported": 8, + "sections_imported": 3, + "incidents_imported": 12, + "maintenances_imported": 2, + "subscribers_imported": 0, + "templates_imported": 0, + "subscribers_skipped": 0 + }, + "created_at": 1766736878, + "updated_at": 1766740000 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "parameters": [ + { + "name": "job_id", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "description": "Migration job ID returned by `migrate-structure` or `migrate-email-subscribers`." + } + ] + } + }, + "/status-page/migration/cancel": { + "post": { + "operationId": "statusPageMigrationCancel", + "summary": "取消状态页迁移", + "description": "取消正在进行的状态页迁移任务。只能取消处于 `running` 状态的任务。", + "tags": [ + "On-call/状态页" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **状态页面管理**(`on-call`) |", + "href": "/zh/api-reference/on-call/status-pages/status-page-migration-cancel", + "metadata": { + "sidebarTitle": "取消状态页迁移" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CancelStatusPageMigrationRequest" + }, + "example": { + "job_id": "01KP0311872NVYFRRQ82FW0001" + } + } + } + } + } + }, + "/monit/rule/list/basic": { + "post": { + "operationId": "monit-rule-read-list", + "summary": "查询告警规则列表", + "description": "返回指定文件夹下所有告警规则的基础信息。如需完整规则详情,请调用 `POST /monit/rule/info`。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |\n\n## 使用说明\n\n- 将 `folder_id` 设为 `0` 可列出当前用户有权查看的所有文件夹下的规则。\n- `triggered` 字段表示该规则当前是否有活跃告警。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-list", + "metadata": { + "sidebarTitle": "查询告警规则列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleBasicListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 50001, + "folder_id": 100, + "name": "CPU 过高", + "ds_type": "prometheus", + "enabled": true, + "triggered": true, + "created_at": 1710000000 + } + ] + } + } + } + }, + "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/RuleListRequest" + }, + "example": { + "folder_id": 100 + } + } + } + } + } + }, + "/monit/rule/info": { + "post": { + "operationId": "monit-rule-read-info", + "summary": "查看告警规则详情", + "description": "通过 ID 返回告警规则的完整配置,包括规则查询、阈值和通知设置。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-info", + "metadata": { + "sidebarTitle": "查看告警规则详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertRuleInfoResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 50001, + "folder_id": 100, + "name": "CPU 过高", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "* * * * *", + "channel_ids": [ + 20001 + ] + } + } + } + } + }, + "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/RuleIDRequest" + }, + "example": { + "id": 50001 + } + } + } + } + } + }, + "/monit/rule/create": { + "post": { + "operationId": "monit-rule-write-create", + "summary": "创建告警规则", + "description": "创建新的告警规则,返回带有分配 ID 的已创建规则。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- `name`、`ds_type`、`cron_pattern` 和 `rule_configs.queries` 为必填项。\n- `ds_list`(支持通配符)或 `ds_ids` 必须有一个非空。\n- `cron_pattern` 使用标准 5 字段 cron 语法。\n- `channel_ids` 可为空,告警将通过全局集成路由。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-create", + "metadata": { + "sidebarTitle": "创建告警规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertRule" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 50001, + "folder_id": 100, + "name": "CPU 过高", + "ds_type": "prometheus", + "created_at": 1712000000 + } + } + } + } + }, + "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/AlertRule" + }, + "example": { + "folder_id": 100, + "name": "CPU 过高", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "* * * * *", + "channel_ids": [ + 20001 + ], + "rule_configs": { + "queries": [ + { + "name": "A", + "expr": "avg(cpu_usage_idle) < 10" + } + ], + "check_threshold": { + "enabled": true, + "critical": "A", + "alerting_check_times": 1, + "recovery_check_times": 1, + "push_recovery_event": true, + "recovery": { + "mode": "invert" + } + } + } + } + } + } + } + } + }, + "/monit/rule/update": { + "post": { + "operationId": "monit-rule-write-update", + "summary": "更新告警规则", + "description": "替换已有告警规则的完整配置,所有字段将被覆盖。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- `id` 为必填项。其他字段与 `POST /monit/rule/create` 的规则相同。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-update", + "metadata": { + "sidebarTitle": "更新告警规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertRule" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 50001, + "updated_at": 1712100000 + } + } + } + } + }, + "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/AlertRule" + }, + "example": { + "id": 50001, + "folder_id": 100, + "name": "CPU 过高 v2", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "* * * * *", + "rule_configs": { + "queries": [ + { + "name": "A", + "expr": "avg(cpu_usage_idle) < 5" + } + ] + } + } + } + } + } + } + }, + "/monit/rule/delete": { + "post": { + "operationId": "monit-rule-write-delete", + "summary": "删除告警规则", + "description": "通过 ID 删除单条告警规则。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-delete", + "metadata": { + "sidebarTitle": "删除告警规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleEmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleIDRequest" + }, + "example": { + "id": 50001 + } + } + } + } + } + }, + "/monit/rule/delete/batch": { + "post": { + "operationId": "monit-rule-write-delete-batch", + "summary": "批量删除告警规则", + "description": "在单次请求中删除多条告警规则。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **30 次/分钟**;**5 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-delete-batch", + "metadata": { + "sidebarTitle": "批量删除告警规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleEmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleIDsRequest" + }, + "example": { + "ids": [ + 50001, + 50002 + ] + } + } + } + } + } + }, + "/monit/rule/update/fields": { + "post": { + "operationId": "monit-rule-write-fields-update", + "summary": "批量更新规则字段", + "description": "一次性更新多条告警规则的特定字段,仅应用 `fields` 列表中指定的字段。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- 在 `fields` 数组中指定要更新的字段名,如 `[\"enabled\", \"channel_ids\"]`。\n- 仅更新指定字段,其他字段保持不变。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-fields-update", + "metadata": { + "sidebarTitle": "批量更新规则字段" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleNameMessageListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "name": "CPU 过高", + "message": "" + }, + { + "name": "磁盘告警", + "message": "" + } + ] + } + } + } + }, + "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/RuleFieldsUpdateRequest" + }, + "example": { + "ids": [ + 50001, + 50002 + ], + "fields": [ + "enabled" + ], + "enabled": false + } + } + } + } + } + }, + "/monit/rule/import": { + "post": { + "operationId": "monit-rule-write-import", + "summary": "导入告警规则", + "description": "从 JSON 数组导入一条或多条告警规则,返回每条规则的导入结果(成功或失败)。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **20 次/分钟**;**2 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- 请求体为规则导出对象的 JSON 数组(与 `POST /monit/rule/export` 输出兼容)。\n- 每个对象必须包含 `folder_id`、`ds_type` 以及 `ds_list` 或 `ds_ids` 之一。\n- 部分规则可能失败(如名称重复),请检查每条结果的状态。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-import", + "metadata": { + "sidebarTitle": "导入告警规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleImportResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "name": "CPU 过高", + "message": "" + } + ] + } + } + } + }, + "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/RuleImportRequest" + }, + "example": [ + { + "folder_id": 100, + "name": "CPU 过高", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "* * * * *", + "rule_configs": { + "queries": [ + { + "name": "A", + "expr": "avg(cpu_usage_idle) < 10" + } + ] + } + } + ] + } + } + } + } + }, + "/monit/rule/export": { + "post": { + "operationId": "monit-rule-read-export", + "summary": "导出告警规则", + "description": "将选定告警规则的配置导出为可移植的 JSON 数组,与 `POST /monit/rule/import` 兼容。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**;**1 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-export", + "metadata": { + "sidebarTitle": "导出告警规则" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertRuleExportListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "name": "CPU 过高", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "* * * * *" + } + ] + } + } + } + }, + "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/RuleIDsRequest" + }, + "example": { + "ids": [ + 50001 + ] + } + } + } + } + } + }, + "/monit/rule/move": { + "post": { + "operationId": "monit-rule-write-move", + "summary": "移动告警规则到文件夹", + "description": "将一条或多条告警规则移动到其他文件夹。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-move", + "metadata": { + "sidebarTitle": "移动告警规则到文件夹" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleNameMessageListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "name": "CPU 过高", + "message": "" + } + ] + } + } + } + }, + "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/RuleMoveRequest" + }, + "example": { + "ids": [ + 50001, + 50002 + ], + "dest_folder_id": 200 + } + } + } + } + } + }, + "/monit/rule/status": { + "post": { + "operationId": "monit-rule-write-status", + "summary": "查看文件夹下规则触发状态", + "description": "返回指定文件夹节点及其子孙节点下所有规则的触发情况汇总。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- 将 `folder_id` 设为 `0` 可获取所有文件夹的汇总。\n- 若文件夹包含规则数量过多,为保护系统会跳过计算。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-status", + "metadata": { + "sidebarTitle": "查看文件夹下规则触发状态" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleStatusResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "folder_id": 100, + "folder_name": "生产环境", + "rule_total": 10, + "triggered_rule_count": 2 + } + ] + } + } + } + }, + "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/RuleFolderIDRequest" + }, + "example": { + "folder_id": 100 + } + } + } + } + } + }, + "/monit/rule/audits": { + "post": { + "operationId": "monit-rule-read-audits", + "summary": "查询规则变更历史", + "description": "返回告警规则的变更历史(审计记录)。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-audits", + "metadata": { + "sidebarTitle": "查询规则变更历史" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleAuditListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 9001, + "account_id": 10023, + "alert_rule_id": 50001, + "action": "update", + "creator_id": 80011, + "creator_name": "Alice", + "created_at": 1712000000 + } + ] + } + } + } + }, + "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/RuleIDRequest" + }, + "example": { + "id": 50001 + } + } + } + } + } + }, + "/monit/rule/audit/detail": { + "post": { + "operationId": "monit-rule-read-audit-detail", + "summary": "查看规则审计快照", + "description": "返回审计记录(包含 `content` 字段,即该时间点规则配置的 JSON 字符串快照)。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |\n\n## 使用说明\n\n- 传入来自 `POST /monit/rule/audits` 的审计记录 `id`(非规则 `id`)。\n- `content` 为 JSON 字符串,解析后可获得完整的规则快照。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-audit-detail", + "metadata": { + "sidebarTitle": "查看规则审计快照" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AlertRuleAudit" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 9001, + "account_id": 10023, + "alert_rule_id": 50001, + "action": "update", + "content": "{\"id\":50001,\"name\":\"CPU 过高\"}", + "creator_id": 80011, + "creator_name": "Alice", + "created_at": 1712000000 + } + } + } + } + }, + "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/RuleIDRequest" + }, + "example": { + "id": 9001 + } + } + } + } + } + }, + "/monit/rule/dstypes": { + "post": { + "operationId": "monit-rule-read-dstypes", + "summary": "查询可用的数据源类型", + "description": "返回当前账户在创建告警规则时可使用的数据源类型(`DSType` 记录)列表,包括全局类型和账户自定义类型。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-dstypes", + "metadata": { + "sidebarTitle": "查询可用的数据源类型" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleDsTypesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 1, + "name": "Prometheus", + "ident": "prometheus", + "account_id": 0, + "weight": 100 + } + ] + } + } + } + }, + "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/RuleEmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/monit/rule/counter/total": { + "post": { + "operationId": "monit-rule-read-counter-total", + "summary": "查看规则数量时序", + "description": "返回当前账户下规则总数的历史时序数据,每个 `clock` 时间戳对应一个采样。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |\n\n## 使用说明\n\n- 每一项为一次历史快照:`num` 为 `clock`(Unix 时间戳,秒)时刻的规则总数。", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-counter-total", + "metadata": { + "sidebarTitle": "查看规则数量时序" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCounterTotalResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 1, + "account_id": 10023, + "num": 50, + "clock": 1712000000 + } + ] + } + } + } + }, + "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/RuleEmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/monit/rule/counter/node": { + "post": { + "operationId": "monit-rule-read-counter-node", + "summary": "按文件夹节点查询规则统计", + "description": "返回一个对象,key 为顶层文件夹名称,value 为该文件夹及其子孙下的规则总数。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-counter-node", + "metadata": { + "sidebarTitle": "按文件夹节点查询规则统计" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCounterNodeResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "生产环境": 10, + "预发环境": 3 + } + } + } + } + }, + "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/RuleEmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/monit/rule/counter/channel": { + "post": { + "operationId": "monit-rule-read-counter-channel", + "summary": "按协作空间查询规则统计", + "description": "返回一个对象,key 为协作空间名称,value 为将告警路由到该协作空间的规则数量。若协作空间名称无法解析,则以协作空间 ID(字符串形式)作为 key。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-counter-channel", + "metadata": { + "sidebarTitle": "按协作空间查询规则统计" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleCounterChannelResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "生产": 8 + } + } + } + } + }, + "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/RuleEmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/monit/rule/counter/status": { + "post": { + "operationId": "monit-rule-read-counter-status", + "summary": "查看顶层文件夹规则状态统计", + "description": "返回所有顶层文件夹节点的规则触发状态汇总,用于概览看板。", + "tags": [ + "Monitors/告警规则" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |", + "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-counter-status", + "metadata": { + "sidebarTitle": "查看顶层文件夹规则状态统计" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RuleStatusResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "folder_id": 100, + "folder_name": "生产环境", + "rule_total": 10, + "triggered_rule_count": 2 + } + ] + } + } + } + }, + "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/RuleEmptyRequest" + }, + "example": {} + } + } + } + } + }, + "/monit/datasource/list": { + "post": { + "operationId": "monit-datasource-read-list", + "summary": "查询数据源列表", + "description": "返回当前账户下的所有数据源,可通过 `type_ident` 过滤类型。", + "tags": [ + "Monitors/告警数据源" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源查看**(`monit`) |\n\n## 使用说明\n\n- 省略 `type_ident` 可返回所有类型的数据源。\n- 列表响应中不返回敏感凭证字段(密码、密钥)。", + "href": "/zh/api-reference/monitors/data-sources/monit-datasource-read-list", + "metadata": { + "sidebarTitle": "查询数据源列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DataSourceListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 10, + "account_id": 10023, + "type_ident": "prometheus", + "name": "生产 Prometheus", + "enabled": true, + "note": "生产环境 Prometheus", + "address": "http://prometheus.example.com:9090", + "edge_cluster_name": "default", + "updated_at": 1712000000 + } + ] + } + } + } + }, + "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/DataSourceListRequest" + }, + "example": { + "type": "prometheus" + } + } + } + } + } + }, + "/monit/datasource/info": { + "post": { + "operationId": "monit-datasource-read-info", + "summary": "查看数据源详情", + "description": "通过 ID 获取单个数据源的完整信息,包括 `payload` 配置。", + "tags": [ + "Monitors/告警数据源" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源查看**(`monit`) |", + "href": "/zh/api-reference/monitors/data-sources/monit-datasource-read-info", + "metadata": { + "sidebarTitle": "查看数据源详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DataSourceItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 10, + "account_id": 10023, + "type_ident": "prometheus", + "name": "生产 Prometheus", + "enabled": true, + "note": "生产环境 Prometheus", + "address": "http://prometheus.example.com:9090", + "payload": { + "prometheus": { + "basic_auth_enabled": false, + "basic_auth_username": "", + "basic_auth_password": "", + "tls_skip_verify": false + } + }, + "edge_cluster_name": "default", + "updated_at": 1712000000 + } + } + } + } + }, + "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/IDRequest" + }, + "example": { + "id": 10 + } + } + } + } + } + }, + "/monit/datasource/create": { + "post": { + "operationId": "monit-datasource-write-create", + "summary": "创建数据源", + "description": "创建新的监控数据源,`payload` 中须包含对应类型的配置块。", + "tags": [ + "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`、`victorialogs`。\n- `edge_cluster_name` 指定使用该数据源进行规则评估的 Monitors Edge 集群。\n- 对于 `elasticsearch`,`payload.elasticsearch.deployment` 须设为 `cloud` 或 `self-managed`。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/data-sources/monit-datasource-write-create", + "metadata": { + "sidebarTitle": "创建数据源" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DataSourceItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 10, + "type_ident": "prometheus", + "name": "生产 Prometheus", + "enabled": true, + "edge_cluster_name": "default", + "updated_at": 1712000000 + } + } + } + } + }, + "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/DataSourceUpsertRequest" + }, + "example": { + "type_ident": "prometheus", + "name": "生产 Prometheus", + "note": "生产环境 Prometheus", + "address": "http://prometheus.example.com:9090", + "edge_cluster_name": "default", + "payload": { + "prometheus": { + "basic_auth_enabled": false + } + } + } + } + } + } + } + }, + "/monit/datasource/update": { + "post": { + "operationId": "monit-datasource-write-update", + "summary": "更新数据源", + "description": "更新已有数据源,需提供 `id` 及待修改的字段。", + "tags": [ + "Monitors/告警数据源" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源管理**(`monit`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/data-sources/monit-datasource-write-update", + "metadata": { + "sidebarTitle": "更新数据源" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DataSourceItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 10, + "type_ident": "prometheus", + "name": "生产 Prometheus v2", + "enabled": true, + "edge_cluster_name": "default", + "updated_at": 1712100000 + } + } + } + } + }, + "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/DataSourceUpsertRequest" + }, + "example": { + "id": 10, + "type_ident": "prometheus", + "name": "生产 Prometheus v2", + "note": "已更新", + "address": "http://prometheus-v2.example.com:9090", + "edge_cluster_name": "default", + "payload": { + "prometheus": { + "basic_auth_enabled": false + } + } + } + } + } + } + } + }, + "/monit/datasource/delete": { + "post": { + "operationId": "monit-datasource-write-delete", + "summary": "删除数据源", + "description": "通过 ID 删除数据源。引用该数据源的告警规则需提前更新或删除。", + "tags": [ + "Monitors/告警数据源" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源管理**(`monit`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/data-sources/monit-datasource-write-delete", + "metadata": { + "sidebarTitle": "删除数据源" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IDRequest" + }, + "example": { + "id": 10 + } + } + } + } + } + }, + "/monit/datasource/sls/projects": { + "post": { + "operationId": "monit-datasource-read-sls-projects", + "summary": "查询 SLS 项目列表", + "description": "列出指定 SLS 数据源中可用的阿里云日志服务(SLS)项目。", + "tags": [ + "Monitors/告警数据源" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源查看**(`monit`) |\n\n## 使用说明\n\n- `id` 指定的数据源类型必须为 `sls`。\n- 使用 `query` 按名称前缀过滤项目,使用 `offset` 和 `size` 分页。", + "href": "/zh/api-reference/monitors/data-sources/monit-datasource-read-sls-projects", + "metadata": { + "sidebarTitle": "查询 SLS 项目列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/SLSProjectsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + "project-a", + "project-b" + ] + } + } + } + }, + "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/SLSProjectsRequest" + }, + "example": { + "id": 10, + "query": "", + "offset": 0, + "size": 50 + } + } + } + } + } + }, + "/monit/datasource/sls/logstores": { + "post": { + "operationId": "monit-datasource-read-sls-logstores", + "summary": "查询 SLS 日志库列表", + "description": "列出指定 SLS 数据源中某个项目下的日志库。", + "tags": [ + "Monitors/告警数据源" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **数据源查看**(`monit`) |\n\n## 使用说明\n\n- `id` 指定的数据源类型必须为 `sls`。\n- 通过 `project` 指定要列出日志库的 SLS 项目。", + "href": "/zh/api-reference/monitors/data-sources/monit-datasource-read-sls-logstores", + "metadata": { + "sidebarTitle": "查询 SLS 日志库列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/SLSLogstoresResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + "logstore-1", + "logstore-2" + ] + } + } + } + }, + "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/SLSLogstoresRequest" + }, + "example": { + "id": 10, + "project": "project-a", + "offset": 0, + "size": 50 + } + } + } + } + } + }, + "/monit/store/ruleset/list": { + "post": { + "operationId": "monit-store-ruleset-list", + "summary": "查询规则集列表", + "description": "返回指定数据源类型下当前用户有权访问的所有规则集。", + "tags": [ + "Monitors/规则集" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **规则仓库查看**(`monit`) |\n\n## 使用说明\n\n- 当 `open_flag` 为 `2`(公开)、当前用户为创建者(`open_flag=0`)或与账户共享(`open_flag=1`)时,规则集对当前用户可见。\n- 列表不包含 `payload` 字段,完整内容请调用 `/monit/store/ruleset/info`。", + "href": "/zh/api-reference/monitors/rule-sets/monit-store-ruleset-list", + "metadata": { + "sidebarTitle": "查询规则集列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StoreRulesetListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "id": 1, + "type_ident": "prometheus", + "note": "CPU 用量告警", + "open_flag": 2, + "creator_account_id": 10023, + "creator_id": 80011, + "creator_name": "Alice", + "created_at": 1710000000, + "updated_at": 1712000000 + } + ] + } + } + } + }, + "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/StoreRulesetListRequest" + }, + "example": { + "type_ident": "prometheus" + } + } + } + } + } + }, + "/monit/store/ruleset/info": { + "post": { + "operationId": "monit-store-ruleset-info", + "summary": "查看规则集详情", + "description": "获取规则集的完整信息,包括 `payload`(JSON 字符串形式的告警规则定义)。", + "tags": [ + "Monitors/规则集" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **规则仓库查看**(`monit`) |", + "href": "/zh/api-reference/monitors/rule-sets/monit-store-ruleset-info", + "metadata": { + "sidebarTitle": "查看规则集详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StoreRulesetItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 1, + "type_ident": "prometheus", + "note": "CPU 用量告警", + "open_flag": 2, + "payload": "[{\"prom_ql\":\"...\"}]", + "creator_account_id": 10023, + "creator_id": 80011, + "creator_name": "Alice", + "created_at": 1710000000, + "updated_at": 1712000000 + } + } + } + } + }, + "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/IDRequest" + }, + "example": { + "id": 1 + } + } + } + } + } + }, + "/monit/store/ruleset/create": { + "post": { + "operationId": "monit-store-ruleset-create", + "summary": "创建规则集", + "description": "在规则仓库中创建新的规则集。", + "tags": [ + "Monitors/规则集" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **规则仓库管理**(`monit`) |\n\n## 使用说明\n\n- `open_flag`:`0` 仅创建者可见,`1` 账户内共享,`2` 公开。\n- `payload` 为必填 JSON 字符串,包含告警规则定义。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/rule-sets/monit-store-ruleset-create", + "metadata": { + "sidebarTitle": "创建规则集" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StoreRulesetItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 1, + "type_ident": "prometheus", + "note": "CPU 用量告警", + "open_flag": 1, + "created_at": 1712000000, + "updated_at": 1712000000 + } + } + } + } + }, + "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/StoreRulesetUpsertRequest" + }, + "example": { + "type_ident": "prometheus", + "note": "CPU 用量告警", + "open_flag": 1, + "payload": "[{\"prom_ql\":\"rate(cpu_usage[5m]) > 0.8\"}]" + } + } + } + } + } + }, + "/monit/store/ruleset/update": { + "post": { + "operationId": "monit-store-ruleset-update", + "summary": "更新规则集", + "description": "更新已有规则集的备注、共享标志及 payload。", + "tags": [ + "Monitors/规则集" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **规则仓库管理**(`monit`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/rule-sets/monit-store-ruleset-update", + "metadata": { + "sidebarTitle": "更新规则集" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StoreRulesetItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 1, + "note": "更新后的 CPU 告警", + "open_flag": 2, + "updated_at": 1712100000 + } + } + } + } + }, + "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/StoreRulesetUpdateRequest" + }, + "example": { + "id": 1, + "note": "更新后的 CPU 告警", + "open_flag": 2, + "payload": "[{\"prom_ql\":\"rate(cpu_usage[5m]) > 0.9\"}]" + } + } + } + } + } + }, + "/monit/store/ruleset/delete": { + "post": { + "operationId": "monit-store-ruleset-delete", + "summary": "删除规则集", + "description": "通过 ID 从规则仓库中删除规则集。", + "tags": [ + "Monitors/规则集" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **规则仓库管理**(`monit`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/monitors/rule-sets/monit-store-ruleset-delete", + "metadata": { + "sidebarTitle": "删除规则集" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IDRequest" + }, + "example": { + "id": 1 + } + } + } + } + } + }, + "/rum/application/list": { + "post": { + "operationId": "rum-application-read-list", + "summary": "查询应用列表", + "description": "返回当前用户可访问的 RUM 应用分页列表。", + "tags": [ + "RUM/应用管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 使用 `is_my_team` 可过滤当前用户所在团队的应用。\n- 默认每页 20 条,最大 100 条。\n- `orderby` 支持 `created_at` 或 `updated_at`。", + "href": "/zh/api-reference/rum/applications/rum-application-read-list", + "metadata": { + "sidebarTitle": "查询应用列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumApplicationListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "has_next_page": true, + "total": 7, + "items": [ + { + "account_id": 2451002751131, + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "application_name": "flashcat-rum", + "type": "browser", + "client_token": "a3cea433a8685a398cdfd68f54a45e06131", + "team_id": 2477033058131, + "is_private": true, + "no_ip": true, + "no_geo": false, + "alerting": { + "enabled": true, + "channel_ids": [ + 2490121812131 + ], + "integration_id": 4759595678131 + }, + "tracing": { + "enabled": false, + "open_type": "", + "endpoint": "" + }, + "status": "enabled", + "created_by": 4441703362131, + "updated_by": 3790925372131, + "created_at": 1746673831462, + "updated_at": 1773398630657 + }, + { + "account_id": 2451002751131, + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "type": "browser", + "client_token": "ce8d1be90fc6534f89ce36ebf526765e131", + "team_id": 2477033058131, + "is_private": false, + "no_ip": false, + "no_geo": false, + "alerting": { + "enabled": true, + "channel_ids": [ + 5962711836131, + 5967875767131 + ], + "integration_id": 4759595678131 + }, + "tracing": { + "enabled": true, + "open_type": "popup", + "endpoint": "https://www.tracing.com/${trace_id}" + }, + "status": "enabled", + "created_by": 2476444212131, + "updated_by": 3122470302131, + "created_at": 1742958482000, + "updated_at": 1772096392711 + } + ] + } + } + } + } + }, + "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/RumApplicationListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "query": "", + "is_my_team": false + } + } + } + } + } + }, + "/rum/application/info": { + "post": { + "operationId": "rum-application-read-info", + "summary": "查看应用详情", + "description": "通过 `application_id` 获取单个 RUM 应用的完整信息。", + "tags": [ + "RUM/应用管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/rum/applications/rum-application-read-info", + "metadata": { + "sidebarTitle": "查看应用详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumApplicationItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_id": 2451002751131, + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "application_name": "flashcat-rum", + "type": "browser", + "client_token": "a3cea433a8685a398cdfd68f54a45e06131", + "team_id": 2477033058131, + "is_private": true, + "no_ip": true, + "no_geo": false, + "alerting": { + "enabled": true, + "channel_ids": [ + 2490121812131 + ], + "integration_id": 4759595678131 + }, + "tracing": { + "enabled": false, + "open_type": "", + "endpoint": "" + }, + "status": "enabled", + "created_by": 4441703362131, + "updated_by": 3790925372131, + "created_at": 1746673831462, + "updated_at": 1773398630657 + } + } + } + } + }, + "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/RumApplicationIDRequest" + }, + "example": { + "application_id": "WoyQQ3BohkdtPivubEvE8o" + } + } + } + } + } + }, + "/rum/application/infos": { + "post": { + "operationId": "rum-application-read-infos", + "summary": "批量查询应用详情", + "description": "通过 ID 列表批量获取多个 RUM 应用的详情。", + "tags": [ + "RUM/应用管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 每次请求最多传入 200 个 ID。", + "href": "/zh/api-reference/rum/applications/rum-application-read-infos", + "metadata": { + "sidebarTitle": "批量查询应用详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumApplicationInfosResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "type": "browser", + "client_token": "ce8d1be90fc6534f89ce36ebf526765e131", + "team_id": 2477033058131, + "is_private": false, + "no_ip": false, + "no_geo": false, + "alerting": { + "enabled": true, + "channel_ids": [ + 5962711836131, + 5967875767131 + ], + "integration_id": 4759595678131 + }, + "tracing": { + "enabled": true, + "open_type": "popup", + "endpoint": "https://www.tracing.com/${trace_id}" + }, + "status": "enabled", + "created_by": 2476444212131, + "updated_by": 3122470302131, + "created_at": 1742958482000, + "updated_at": 1772096392711 + }, + { + "account_id": 2451002751131, + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "application_name": "flashcat-rum", + "type": "browser", + "client_token": "a3cea433a8685a398cdfd68f54a45e06131", + "team_id": 2477033058131, + "is_private": true, + "no_ip": true, + "no_geo": false, + "alerting": { + "enabled": true, + "channel_ids": [ + 2490121812131 + ], + "integration_id": 4759595678131 + }, + "tracing": { + "enabled": false, + "open_type": "", + "endpoint": "" + }, + "status": "enabled", + "created_by": 4441703362131, + "updated_by": 3790925372131, + "created_at": 1746673831462, + "updated_at": 1773398630657 + } + ] + } + } + } + } + }, + "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/RumApplicationInfosRequest" + }, + "example": { + "application_ids": [ + "eWbr4xk3ZRnLabRa6unqwD", + "WoyQQ3BohkdtPivubEvE8o" + ] + } + } + } + } + } + }, + "/rum/application/create": { + "post": { + "operationId": "rum-application-write-create", + "summary": "创建应用", + "description": "创建新的 RUM 应用,返回生成的 `application_id` 和 `client_token`。", + "tags": [ + "RUM/应用管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **应用管理**(`rum`) |\n\n## 使用说明\n\n- `type` 须为以下之一:`browser`、`ios`、`android`、`react-native`、`flutter`、`kotlin-multiplatform`、`roku`、`unity`。\n- `client_token` 自动生成,用于初始化 RUM SDK。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/rum/applications/rum-application-write-create", + "metadata": { + "sidebarTitle": "创建应用" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumApplicationCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "application_id": "qLpu24Dz4CAzWsESPbJYWA", + "application_name": "我的 Web 应用", + "client_token": "e090078724855a4ca168c3884880dfbc131" + } + } + } + } + }, + "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/RumApplicationCreateRequest" + }, + "example": { + "application_name": "我的 Web 应用", + "type": "browser", + "team_id": 2477033058131, + "is_private": false + } + } + } + } + } + }, + "/rum/application/update": { + "post": { + "operationId": "rum-application-write-update", + "summary": "更新应用", + "description": "更新已有 RUM 应用,除 `application_id` 外均为可选,仅更新提供的字段。", + "tags": [ + "RUM/应用管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **应用管理**(`rum`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/rum/applications/rum-application-write-update", + "metadata": { + "sidebarTitle": "更新应用" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RumApplicationUpdateRequest" + }, + "example": { + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "application_name": "我的 Web 应用 v2", + "alerting": { + "enabled": true, + "channel_ids": [ + 2490121812131 + ] + } + } + } + } + } + } + }, + "/rum/application/delete": { + "post": { + "operationId": "rum-application-write-delete", + "summary": "删除应用", + "description": "通过 `application_id` 删除 RUM 应用。", + "tags": [ + "RUM/应用管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **应用管理**(`rum`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/rum/applications/rum-application-write-delete", + "metadata": { + "sidebarTitle": "删除应用" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RumApplicationIDRequest" + }, + "example": { + "application_id": "qLpu24Dz4CAzWsESPbJYWA" + } + } + } + } + } + }, + "/rum/issue/list": { + "post": { + "operationId": "rum-issue-read-list", + "summary": "查询 Issue 列表", + "description": "返回符合过滤条件的 RUM 异常追踪 Issue 分页列表。", + "tags": [ + "RUM/RUM 问题跟踪" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- `start_time` 和 `end_time` 为毫秒时间戳,最大范围 183 天。\n- `statuses` 按状态过滤,可选值:`for_review`、`reviewed`、`ignored`、`resolved`。\n- `orderby` 支持:`created_at`、`updated_at`、`session_count`、`error_count`。\n- 使用 `dql` 或 `sql` 进行高级过滤,两者不可同时使用。", + "href": "/zh/api-reference/rum/issues/rum-issue-read-list", + "metadata": { + "sidebarTitle": "查询 Issue 列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumIssueListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "team_id": 2477033058131, + "issue_id": "NHEacQHi2DhXqobr9qPQz9", + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "service": "fd-console", + "status": "for_review", + "error_count": 752, + "session_count": 381, + "is_crash": false, + "age": 5078684, + "resolved_at": 0, + "resolved_by": 0, + "created_at": 1770883154944, + "updated_at": 1775961914595, + "first_seen": { + "timestamp": 1770883154944, + "version": "1.0.0" + }, + "last_seen": { + "timestamp": 1775961839090, + "version": "1.0.0" + }, + "error": { + "message": "Script error.", + "type": "Error" + }, + "suspected_cause": { + "source": "auto", + "value": "code.exception", + "reason": "错误信息 'Script error.' 通常表示 JavaScript 中的未处理异常。", + "person_id": 0 + }, + "versions": [ + "1.0.0" + ], + "severity": "Info" + }, + { + "team_id": 2477033058131, + "issue_id": "H8kZSmxiE7EgdyD4fCyyNa", + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "service": "fd-console", + "status": "for_review", + "error_count": 3, + "session_count": 1, + "is_crash": false, + "age": 48, + "resolved_at": 0, + "resolved_by": 0, + "created_at": 1775189479566, + "updated_at": 1775191284163, + "first_seen": { + "timestamp": 1775189479566, + "version": "1.0.0" + }, + "last_seen": { + "timestamp": 1775189527762, + "version": "1.0.0" + }, + "error": { + "message": "API ERROR: We encountered an internal error | POST /api/access/logout", + "type": "Error" + }, + "suspected_cause": { + "source": "auto", + "value": "api.failed_request", + "reason": "错误信息表明 POST /api/access/logout 请求时服务端发生内部错误。", + "person_id": 0 + }, + "versions": [ + "1.0.0" + ], + "severity": "Info" + } + ], + "has_next_page": true, + "total": 111 + } + } + } + } + }, + "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/RumIssueListRequest" + }, + "example": { + "start_time": 1772611200000, + "end_time": 1775961914595, + "application_ids": [ + "eWbr4xk3ZRnLabRa6unqwD" + ], + "statuses": [ + "for_review" + ], + "p": 1, + "limit": 20, + "orderby": "updated_at" + } + } + } + } + } + }, + "/rum/issue/info": { + "post": { + "operationId": "rum-issue-read-info", + "summary": "查看 Issue 详情", + "description": "通过 `issue_id` 获取单个 Issue 的完整信息。", + "tags": [ + "RUM/RUM 问题跟踪" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/rum/issues/rum-issue-read-info", + "metadata": { + "sidebarTitle": "查看 Issue 详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumIssueItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "team_id": 2477033058131, + "issue_id": "NHEacQHi2DhXqobr9qPQz9", + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "service": "fd-console", + "status": "for_review", + "error_count": 752, + "session_count": 381, + "is_crash": false, + "age": 5078684, + "resolved_at": 0, + "resolved_by": 0, + "created_at": 1770883154944, + "updated_at": 1775961914595, + "first_seen": { + "timestamp": 1770883154944, + "version": "1.0.0" + }, + "last_seen": { + "timestamp": 1775961839090, + "version": "1.0.0" + }, + "error": { + "message": "Script error.", + "type": "Error" + }, + "suspected_cause": { + "source": "auto", + "value": "code.exception", + "reason": "错误信息 'Script error.' 通常表示 JavaScript 中的未处理异常。", + "person_id": 0 + }, + "versions": [ + "1.0.0" + ], + "severity": "Info" + } + } + } + } + }, + "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/RumIssueIDRequest" + }, + "example": { + "issue_id": "NHEacQHi2DhXqobr9qPQz9" + } + } + } + } + } + }, + "/rum/issue/update": { + "post": { + "operationId": "rum-issue-write-update", + "summary": "更新 Issue", + "description": "更新 Issue 的状态或疑似原因。", + "tags": [ + "RUM/RUM 问题跟踪" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- `status` 可选值:`for_review`、`reviewed`、`ignored`、`resolved`。\n- `suspected_cause` 可选值:`api.failed_request`、`network.error`、`code.exception`、`code.invalid_object_access`、`code.invalid_argument`、`unknown`。\n- 将 `status` 设为 `resolved` 会同时记录 `resolved_at` 和 `resolved_by`;从 resolved 切回其他状态则会清空这两个字段。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/rum/issues/rum-issue-write-update", + "metadata": { + "sidebarTitle": "更新 Issue" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RumIssueUpdateRequest" + }, + "example": { + "issue_id": "NHEacQHi2DhXqobr9qPQz9", + "status": "resolved" + } + } + } + } + } + }, + "/sourcemap/list": { + "post": { + "operationId": "sourcemap-read-list", + "summary": "查询 Sourcemap 列表", + "description": "分页返回已上传的 Sourcemap 文件列表,可按平台类型、服务和版本过滤。", + "tags": [ + "RUM/RUM Sourcemap" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- `start_time` 和 `end_time` 为必填字段,均使用 Unix 时间戳(**毫秒**),最大时间跨度 365 天。\n- `type` 字段用于选择平台:`browser`(JavaScript)、`android` 或 `ios`。省略时默认为 `browser`。\n- 默认每页 20 条,最大 100 条,默认按 `created_at` 倒序排列。\n- Android 平台可用 `build_id` 匹配 Gradle 插件的构建标识;iOS 平台可用 `uuid` 匹配 dSYM bundle UUID。", + "href": "/zh/api-reference/rum/sourcemaps/sourcemap-read-list", + "metadata": { + "sidebarTitle": "查询 Sourcemap 列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/SourcemapListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 3, + "items": [ + { + "key": "browser/my-web-app/1.0.0/main.js.map", + "type": "browser", + "service": "my-web-app", + "version": "1.0.0", + "size": 204800, + "git_repository_url": "https://github.com/example/my-web-app", + "git_commit_sha": "abc1234def5678", + "created_at": 1712700000, + "updated_at": 1712700000, + "metadata": {} + } + ] + } + } + } + } + }, + "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/SourcemapListRequest" + }, + "example": { + "start_time": 1712000000000, + "end_time": 1712700000000, + "type": "browser", + "services": [ + "my-web-app" + ], + "p": 1, + "limit": 20 + } + } + } + } + } + }, + "/member/info": { + "post": { + "operationId": "memberInfo", + "summary": "获取当前成员信息", + "description": "返回当前会话成员的完整资料。", + "tags": [ + "平台/成员管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/platform/members/member-info", + "metadata": { + "sidebarTitle": "获取当前成员信息" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberInfoResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_avatar": "", + "account_email": "alice@example.com", + "account_id": 2451002751131, + "account_locale": "en-US", + "account_name": "Acme Corp", + "account_role_ids": [ + 6 + ], + "account_time_zone": "Asia/Shanghai", + "avatar": "/image/avatar1.png", + "country_code": "CN", + "created_at": 1701399971, + "domain": "acme", + "email": "alice@example.com", + "email_verified": true, + "is_external": false, + "locale": "zh-CN", + "member_id": 2476444212131, + "member_name": "Alice", + "phone": "+86185****0300", + "phone_verified": true, + "time_zone": "Asia/Shanghai" + } + } + } + } + }, + "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/MemberInfoRequest" + }, + "example": {} + } + } + } + } + }, + "/member/list": { + "post": { + "operationId": "memberList", + "summary": "查询成员列表", + "description": "返回组织成员的分页列表。", + "tags": [ + "平台/成员管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/platform/members/member-list", + "metadata": { + "sidebarTitle": "查询成员列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "p": 1, + "limit": 5, + "total": 148, + "items": [ + { + "account_id": 2451002751131, + "member_id": 5068740052131, + "member_name": "Bob", + "country_code": "", + "phone": "+86151****6519", + "email": "bob@example.com", + "phone_verified": true, + "email_verified": true, + "avatar": "", + "status": "enabled", + "account_role_ids": [ + 2, + 6 + ], + "created_at": 1752030749, + "updated_at": 1775962064, + "ref_id": "", + "is_external": false + }, + { + "account_id": 2451002751131, + "member_id": 2476444212131, + "member_name": "Alice", + "country_code": "CN", + "phone": "+86185****0300", + "email": "alice@example.com", + "phone_verified": true, + "email_verified": true, + "avatar": "/image/avatar1.png", + "status": "enabled", + "account_role_ids": [ + 6 + ], + "created_at": 1701399971, + "updated_at": 1775809507, + "ref_id": "", + "is_external": false + } + ] + } + } + } + } + }, + "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/MemberListRequest" + }, + "example": { + "p": 1, + "limit": 5 + } + } + } + } + } + }, + "/member/delete": { + "post": { + "operationId": "memberDelete", + "summary": "删除成员", + "description": "通过 ID、邮箱、手机号或名称从组织中移除成员。", + "tags": [ + "平台/成员管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/platform/members/member-delete", + "metadata": { + "sidebarTitle": "删除成员" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberDeleteRequest" + }, + "example": { + "member_id": 5068740052131 + } + } + } + } + } + }, + "/member/invite": { + "post": { + "operationId": "memberInvite", + "summary": "邀请成员", + "description": "通过邮箱或手机号批量邀请新成员加入组织。", + "tags": [ + "平台/成员管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/platform/members/member-invite", + "metadata": { + "sidebarTitle": "邀请成员" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberInviteResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "member_id": 5068740052131, + "member_name": "Charlie" + } + ] + } + } + } + } + }, + "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/MemberInviteRequest" + }, + "example": { + "members": [ + { + "member_name": "Charlie", + "email": "charlie@example.com", + "locale": "en-US", + "time_zone": "Asia/Shanghai", + "role_ids": [ + 6 + ] + } + ] + } + } + } + } + } + }, + "/member/role/grant": { + "post": { + "operationId": "memberGrantRole", + "summary": "授予成员角色", + "description": "为成员添加角色授权。", + "tags": [ + "平台/成员管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/platform/members/member-grant-role", + "metadata": { + "sidebarTitle": "授予成员角色" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberRoleGrantRequest" + }, + "example": { + "member_id": 5068740052131, + "role_ids": [ + 6 + ] + } + } + } + } + } + }, + "/member/role/revoke": { + "post": { + "operationId": "memberRevokeRole", + "summary": "解除成员角色", + "description": "移除成员的角色授权。", + "tags": [ + "平台/成员管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/platform/members/member-revoke-role", + "metadata": { + "sidebarTitle": "解除成员角色" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberRoleRevokeRequest" + }, + "example": { + "member_id": 5068740052131, + "role_ids": [ + 6 + ] + } + } + } + } + } + }, + "/member/role/update": { + "post": { + "operationId": "memberUpdateRole", + "summary": "更新成员角色", + "description": "一次性替换成员的全部角色授权。", + "tags": [ + "平台/成员管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/platform/members/member-update-role", + "metadata": { + "sidebarTitle": "更新成员角色" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberRoleUpdateRequest" + }, + "example": { + "member_id": 5068740052131, + "role_ids": [ + 2, + 6 + ] + } + } + } + } + } + }, + "/member/info/reset": { + "post": { + "operationId": "memberResetInfo", + "summary": "重置成员信息", + "description": "批量更新当前成员的多个资料字段。", + "tags": [ + "平台/成员管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/platform/members/member-reset-info", + "metadata": { + "sidebarTitle": "重置成员信息" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberResetInfoRequest" + }, + "example": { + "member_id": 2476444212131, + "member_name": "Alice", + "locale": "zh-CN", + "time_zone": "Asia/Shanghai" + } + } + } + } + } + }, + "/person/infos": { + "post": { + "operationId": "personInfos", + "summary": "批量获取人员信息", + "description": "根据 ID 批量返回成员或账户的资料信息。", + "tags": [ + "平台/成员管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/platform/members/person-infos", + "metadata": { + "sidebarTitle": "批量获取人员信息" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PersonInfosResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "person_id": 2476444212131, + "person_name": "Alice", + "avatar": "/image/avatar1.png", + "locale": "zh-CN", + "time_zone": "Asia/Shanghai", + "email": "alice@example.com", + "phone_verified": false, + "email_verified": true, + "as": "member", + "status": "enabled" + }, + { + "account_id": 2451002751131, + "person_id": 3790925372131, + "person_name": "Bob", + "email": "bob@example.com", + "phone_verified": false, + "email_verified": true, + "as": "member", + "status": "enabled" + } + ] + } + } + } + } + }, + "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/PersonInfosRequest" + }, + "example": { + "person_ids": [ + 2476444212131, + 3790925372131 + ] + } + } + } + } + } + }, + "/team/info": { + "post": { + "operationId": "team-read-info", + "summary": "查看团队详情", + "description": "按 ID、名称或外部引用 ID 返回单个团队的详细信息。", + "tags": [ + "平台/团队管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- `team_id`、`team_name`、`ref_id` 三者至少提供一个。", + "href": "/zh/api-reference/platform/teams/team-read-info", + "metadata": { + "sidebarTitle": "查看团队详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TeamItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_id": 10023, + "team_id": 1001, + "team_name": "后端 SRE", + "description": "后端可靠性工程团队", + "status": "enabled", + "updated_by_name": "alice", + "updated_by": 80011, + "creator_id": 80011, + "creator_name": "alice", + "created_at": 1710000000, + "updated_at": 1712000000, + "person_ids": [ + 80011, + 80012 + ], + "ref_id": "" + } + } + } + } + }, + "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/TeamInfoRequest" + }, + "example": { + "team_id": 1001 + } + } + } + } + } + }, + "/team/infos": { + "post": { + "operationId": "team-read-infos", + "summary": "批量查看团队信息", + "description": "一次请求按 ID 列表批量返回多个团队的基本信息。", + "tags": [ + "平台/团队管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 每次最多传入 100 个团队 ID。", + "href": "/zh/api-reference/platform/teams/team-read-infos", + "metadata": { + "sidebarTitle": "批量查看团队信息" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TeamInfosResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "team_id": 1001, + "team_name": "后端 SRE", + "person_ids": [ + 80011, + 80012 + ] + }, + { + "team_id": 1002, + "team_name": "前端", + "person_ids": [ + 80013 + ] + } + ] + } + } + } + } + }, + "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/TeamInfosRequest" + }, + "example": { + "team_ids": [ + 1001, + 1002 + ] + } + } + } + } + } + }, + "/team/list": { + "post": { + "operationId": "team-read-list", + "summary": "查看团队列表", + "description": "分页返回当前账户下的团队列表。", + "tags": [ + "平台/团队管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 传入 `person_id` 可过滤返回指定人员所属的团队。\n- 默认 p=1、limit=20。", + "href": "/zh/api-reference/platform/teams/team-read-list", + "metadata": { + "sidebarTitle": "查看团队列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TeamListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "p": 1, + "limit": 20, + "total": 5, + "items": [ + { + "account_id": 10023, + "team_id": 1001, + "team_name": "后端 SRE", + "status": "enabled", + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1712000000, + "person_ids": [ + 80011 + ], + "description": "", + "updated_by_name": "", + "updated_by": 0, + "creator_name": "alice", + "ref_id": "" + } + ] + } + } + } + } + }, + "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/TeamListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "orderby": "created_at", + "asc": false + } + } + } + } + } + }, + "/team/upsert": { + "post": { + "operationId": "team-write-upsert", + "summary": "变更团队信息", + "description": "创建新团队或更新已有团队,更新时传入 `team_id`。", + "tags": [ + "平台/团队管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **团队管理**(`organization`) |\n\n## 使用说明\n\n- 省略 `team_id`(或置为 0)表示创建新团队;传入已有 ID 表示更新。\n- `team_name` 须为 1–39 个字符且在账户内唯一。\n- 传入 `person_ids` 可设置团队成员,会替换整个成员列表。\n- 传入 `emails` 或 `phones` 可邀请尚未注册的成员。\n- `ref_id` 是供第三方 HR 系统集成使用的外部标识。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/platform/teams/team-write-upsert", + "metadata": { + "sidebarTitle": "变更团队信息" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TeamUpsertResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "team_id": 1001, + "team_name": "后端 SRE" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamUpsertRequest" + }, + "example": { + "team_name": "后端 SRE", + "description": "后端可靠性工程团队", + "person_ids": [ + 80011, + 80012 + ] + } + } + } + } + } + }, + "/team/delete": { + "post": { + "operationId": "team-write-delete", + "summary": "删除团队", + "description": "按 ID、名称或外部引用 ID 永久删除一个团队。", + "tags": [ + "平台/团队管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **团队管理**(`organization`) |\n\n## 使用说明\n\n- `team_id`、`team_name`、`ref_id` 三者至少提供一个。\n- 若团队仍被排班、分派策略等资源引用,会返回 `400 ReferenceExist`。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/platform/teams/team-write-delete", + "metadata": { + "sidebarTitle": "删除团队" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamDeleteRequest" + }, + "example": { + "team_id": 1001 + } + } + } + } + } + }, + "/role/info": { + "post": { + "operationId": "role-read-info", + "summary": "查看角色详情", + "description": "按角色 ID 返回单个角色的详细信息。", + "tags": [ + "平台/角色与权限" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/platform/roles-permissions/role-read-info", + "metadata": { + "sidebarTitle": "查看角色详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RoleItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "role_id": 2, + "role_name": "账户管理员", + "description": "拥有所有权限的账户管理员。", + "status": "enabled", + "permission_ids": [ + 101, + 102, + 201 + ], + "editable": false, + "created_at": 1700000000, + "updated_at": 1700000000 + } + } + } + } + }, + "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/RoleInfoRequest" + }, + "example": { + "role_id": 2 + } + } + } + } + } + }, + "/role/list": { + "post": { + "operationId": "role-read-list", + "summary": "查看角色列表", + "description": "返回当前账户下所有自定义及内置角色。", + "tags": [ + "平台/角色与权限" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 内置角色(`editable: false`)不可修改或删除。", + "href": "/zh/api-reference/platform/roles-permissions/role-read-list", + "metadata": { + "sidebarTitle": "查看角色列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RoleListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 3, + "items": [ + { + "role_id": 2, + "role_name": "账户管理员", + "description": "", + "status": "enabled", + "permission_ids": [], + "editable": false, + "created_at": 1700000000, + "updated_at": 1700000000 + } + ] + } + } + } + } + }, + "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/RoleListRequest" + }, + "example": { + "orderby": "created_at", + "asc": false + } + } + } + } + } + }, + "/role/upsert": { + "post": { + "operationId": "role-write-upsert", + "summary": "创建或更新角色", + "description": "创建新的自定义角色或更新已有角色,更新时传入 `role_id`。", + "tags": [ + "平台/角色与权限" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **角色管理**(`organization`) |\n\n## 使用说明\n\n- 省略 `role_id`(或置为 0)表示创建;传入已有 ID 表示更新。\n- `role_name` 须为 1–39 个字符且在账户内唯一。\n- `permission_ids` 会完整替换角色的权限集合。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/platform/roles-permissions/role-write-upsert", + "metadata": { + "sidebarTitle": "创建或更新角色" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RoleUpsertResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "role_id": 150, + "role_name": "值班管理员" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleUpsertRequest" + }, + "example": { + "role_name": "值班管理员", + "description": "管理值班排班和故障处理。", + "permission_ids": [ + 501, + 502 + ] + } + } + } + } + } + }, + "/role/enable": { + "post": { + "operationId": "role-write-enable", + "summary": "启用角色", + "description": "重新启用已被禁用的自定义角色。", + "tags": [ + "平台/角色与权限" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **角色管理**(`organization`) |\n\n## 使用说明\n\n- 只有自定义角色可以被启用/禁用,内置角色始终保持启用状态。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/platform/roles-permissions/role-write-enable", + "metadata": { + "sidebarTitle": "启用角色" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleIDRequest" + }, + "example": { + "role_id": 150 + } + } + } + } + } + }, + "/role/disable": { + "post": { + "operationId": "role-write-disable", + "summary": "禁用角色", + "description": "禁用自定义角色,使其停止授予权限。", + "tags": [ + "平台/角色与权限" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **角色管理**(`organization`) |\n\n## 使用说明\n\n- 持有该角色的成员将立即失去其权限。\n- 只有自定义角色可被禁用。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/platform/roles-permissions/role-write-disable", + "metadata": { + "sidebarTitle": "禁用角色" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleIDRequest" + }, + "example": { + "role_id": 150 + } + } + } + } + } + }, + "/role/delete": { + "post": { + "operationId": "role-write-delete", + "summary": "删除角色", + "description": "永久删除自定义角色并从所有成员处撤销授权。", + "tags": [ + "平台/角色与权限" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **角色管理**(`organization`) |\n\n## 使用说明\n\n- 内置角色无法删除。\n- 持有该角色的所有成员将立即失去其权限。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/platform/roles-permissions/role-write-delete", + "metadata": { + "sidebarTitle": "删除角色" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleIDRequest" + }, + "example": { + "role_id": 150 + } + } + } + } + } + }, + "/role/permission/list": { + "post": { + "operationId": "role-read-list-permission", + "summary": "查看角色权限集合", + "description": "返回所有可用权限,可按角色 ID 过滤仅返回指定角色已授予的权限。", + "tags": [ + "平台/角色与权限" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 传入 `role_ids` 可过滤只返回指定角色已授予的权限。\n- 传入 `with_all: true` 可返回全部权限,并在每项中通过 `is_granted` 标记是否已授予。", + "href": "/zh/api-reference/platform/roles-permissions/role-read-list-permission", + "metadata": { + "sidebarTitle": "查看角色权限集合" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RolePermissionListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "id": 501, + "permission_name": "模板查看", + "permission_type": "read", + "description": "查看通知模板", + "class": "On-call", + "scope": "on-call", + "status": "enabled", + "is_granted": true + } + ] + } + } + } + } + }, + "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/RolePermissionListRequest" + }, + "example": { + "role_ids": [ + 150 + ], + "with_all": true + } + } + } + } + } + }, + "/role/permission/factor/list": { + "post": { + "operationId": "role-read-list-permission-factor", + "summary": "查看权限因子集合", + "description": "返回所有权限因子(API、按钮、菜单、URL、访问),可按类型过滤。", + "tags": [ + "平台/角色与权限" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 权限因子是每个权限的细粒度控制项。\n- `factor_types` 可选值:`api`、`button`、`visit`、`menu`、`url`。", + "href": "/zh/api-reference/platform/roles-permissions/role-read-list-permission-factor", + "metadata": { + "sidebarTitle": "查看权限因子集合" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PermissionFactorListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "factor_name": "template:read:info", + "factor_type": "api" + } + ] + } + } + } + }, + "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/PermissionFactorListRequest" + }, + "example": { + "factor_types": [ + "api" + ] + } + } + } + } + } + }, + "/role/member/grant": { + "post": { + "operationId": "role-write-grant-role", + "summary": "授予成员账户权限", + "description": "将角色授予一个或多个成员,赋予其该角色包含的权限。", + "tags": [ + "平台/角色与权限" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **角色管理**(`organization`) |\n\n## 使用说明\n\n- 每次最多传入 100 个成员 ID。\n- 已持有该角色的成员会被静默跳过。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/platform/roles-permissions/role-write-grant-role", + "metadata": { + "sidebarTitle": "授予成员账户权限" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleGrantRequest" + }, + "example": { + "member_ids": [ + 80011, + 80012 + ], + "role_id": 150 + } + } + } + } + } + }, + "/role/member/revoke": { + "post": { + "operationId": "role-write-revoke-role", + "summary": "解除成员账户权限", + "description": "从一个或多个成员处撤销角色授权。", + "tags": [ + "平台/角色与权限" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **角色管理**(`organization`) |\n\n## 使用说明\n\n- 未持有该角色的成员会被静默跳过。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/platform/roles-permissions/role-write-revoke-role", + "metadata": { + "sidebarTitle": "解除成员账户权限" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleGrantRequest" + }, + "example": { + "member_ids": [ + 80011 + ], + "role_id": 150 + } + } + } + } + } + }, + "/audit/search": { + "post": { + "operationId": "audit-read-search", + "summary": "检索审计日志", + "description": "按时间范围返回游标分页的操作审计日志列表。", + "tags": [ + "平台/审计日志" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **审计查看**(`organization`) |\n\n## 使用说明\n\n- 时间范围必填。最大跨度 90 天,`start_time` 和 `end_time` 均为 Unix 时间戳(**秒**)。\n- 使用上次响应中的 `search_after_ctx` 获取下一页。该 token 是不透明的,请勿手动构造。\n- 可查询的时间窗口受账户许可证限制,超出保留期的查询会静默返回空结果,而不是报错。\n- 默认每页 20 条,最大 99 条。", + "href": "/zh/api-reference/platform/audit-logs/audit-read-search", + "metadata": { + "sidebarTitle": "检索审计日志" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AuditSearchResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 2, + "search_after_ctx": "", + "docs": [ + { + "created_at": 1712700123456, + "account_id": 10023, + "member_id": 80011, + "member_name": "Alice", + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "ip": "203.0.113.42", + "operation": "template:write:create", + "operation_name": "创建模板", + "body": "{\"template_name\":\"生产默认模板\"}", + "params": [], + "is_dangerous": false, + "is_write": true + } + ] + } + } + } + } + }, + "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/AuditSearchRequest" + }, + "example": { + "start_time": 1712620800, + "end_time": 1712707200, + "limit": 20, + "operations": [ + "template:write:create", + "template:write:delete" + ] + } + } + } + } + } + }, + "/audit/operation/list": { + "post": { + "operationId": "audit-read-operation-list", + "summary": "查看事件类型列表", + "description": "返回所有会记录到审计日志中的操作名称,可用于 `operations` 过滤参数。", + "tags": [ + "平台/审计日志" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **审计查看**(`organization`) |\n\n## 使用说明\n\n- 将本接口返回的 `name` 值作为 `POST /audit/search` 的 `operations` 过滤参数使用。\n- `name_cn` 是控制台展示的中文标签;`name` 是用于过滤的稳定字段值。", + "href": "/zh/api-reference/platform/audit-logs/audit-read-operation-list", + "metadata": { + "sidebarTitle": "查看事件类型列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AuditOperationListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "name": "template:write:create", + "name_cn": "创建模板" + }, + { + "name": "template:write:delete", + "name_cn": "删除模板" + }, + { + "name": "incident:write:acknowledge", + "name_cn": "认领故障" + } + ] + } + } + } + } + }, + "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/AuditOperationListRequest" + }, + "example": {} + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "AppKeyAuth": { + "type": "apiKey", + "in": "query", + "name": "app_key", + "description": "在 Flashduty 控制台 账户 → APP Key 中签发的 app_key。调用任何公开 API 时都必须携带。它等同于所属账户的身份凭证,请妥善保管。" + } + }, + "responses": { + "BadRequest": { + "description": "请求非法 — 通常是参数缺失或格式不正确。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "missingParameter": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "InvalidParameter", + "message": "The specified parameter is not valid." + } + } + } + } + } + } + }, + "Unauthorized": { + "description": "app_key 缺失或无效。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "missingAppKey": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "Unauthorized", + "message": "You are unauthorized." + } + } + } + } + } + } + }, + "Forbidden": { + "description": "app_key 有效但没有执行该操作的权限。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "noEditPermission": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "AccessDenied", + "message": "Access Denied." + } + } + } + } + } + } + }, + "NotFound": { + "description": "目标资源不存在或已被删除。注意:Flashduty 对业务实体的缺失通常返回 HTTP 400 + code=`ResourceNotFound`,真正的 404 只用于未知路由。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "resourceMissing": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "ResourceNotFound", + "message": "The resource you request is not found" + } + } + } + } + } + } + }, + "TooManyRequests": { + "description": "命中限流。可能是全局 API 限流、账户级限流或集成级限流。限流按账户聚合。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "rateLimited": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "RequestTooFrequently", + "message": "Request too frequently." + } + } + } + } + } + } + }, + "ServerError": { + "description": "服务端未预期错误。反馈问题时请携带 request_id。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "internal": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "InternalError", + "message": "We encountered an internal error, and it has been reported. Please try again later." + } + } + } + } + } + } + } + }, + "schemas": { + "ErrorCode": { + "type": "string", + "description": "Flashduty 错误码枚举。每个失败响应的 `error.code` 都是下列稳定值之一,HTTP 状态码仅作参考。\n\n| 错误码 | HTTP | 含义 |\n|---|---|---|\n| `OK` | 200 | 保留值,正常错误响应不会返回。 |\n| `InvalidParameter` | 400 | 必填参数缺失或未通过校验。 |\n| `BadRequest` | 400 | 通用的 400 错误,通常是请求本身不合法。 |\n| `InvalidContentType` | 400 | 请求头 `Content-Type` 不是 `application/json`。 |\n| `ResourceNotFound` | 400 | 目标资源不存在。注意 HTTP 状态码是 400 而非 404(历史设计)。 |\n| `NoLicense` | 400 | 功能需要有效授权,但未找到可用的 license。 |\n| `ReferenceExist` | 400 | 该资源仍被其他实体引用,无法删除。 |\n| `Unauthorized` | 401 | `app_key` 缺失、无效或已过期。 |\n| `BalanceNotEnough` | 402 | 账户余额不足,无法执行需要计费的操作。 |\n| `AccessDenied` | 403 | 身份认证通过,但 RBAC 权限不足以执行该操作。 |\n| `RouteNotFound` | 404 | 请求的 URL 路径不是已知路由。 |\n| `MethodNotAllowed` | 405 | 当前路径不接受所使用的 HTTP 方法。 |\n| `UndonedOrderExist` | 409 | 账户存在未完成的订单,请稍后重试。 |\n| `RequestLocked` | 423 | 因连续失败被临时锁定。 |\n| `EntityTooLarge` | 413 | 请求体超过允许的最大长度。 |\n| `RequestTooFrequently` | 429 | 命中限流(全局、账户级或集成级)。 |\n| `RequestVerifyRequired` | 428 | 操作需要二次验证码,但未提供。 |\n| `DangerousOperation` | 428 | 危险操作,需要进行 MFA 验证。 |\n| `InternalError` | 500 | 服务端未预期错误。反馈问题请附上 `request_id`。 |\n| `ServiceUnavailable` | 503 | 后端依赖不可用,请稍后重试。 |", + "enum": [ + "OK", + "InvalidParameter", + "BadRequest", + "InvalidContentType", + "ResourceNotFound", + "NoLicense", + "ReferenceExist", + "Unauthorized", + "BalanceNotEnough", + "AccessDenied", + "RouteNotFound", + "MethodNotAllowed", + "UndonedOrderExist", + "RequestLocked", + "EntityTooLarge", + "RequestTooFrequently", + "RequestVerifyRequired", + "DangerousOperation", + "InternalError", + "ServiceUnavailable" + ], + "x-enumDescriptions": { + "OK": "保留值,正常错误响应不会返回。", + "InvalidParameter": "必填参数缺失或未通过校验。", + "BadRequest": "通用的 400 错误,通常是请求本身不合法。", + "InvalidContentType": "请求头 `Content-Type` 不是 `application/json`。", + "ResourceNotFound": "目标资源不存在。注意 HTTP 状态码是 400 而非 404(历史设计)。", + "NoLicense": "功能需要有效授权,但未找到可用的 license。", + "ReferenceExist": "该资源仍被其他实体引用,无法删除。", + "Unauthorized": "`app_key` 缺失、无效或已过期。", + "BalanceNotEnough": "账户余额不足,无法执行需要计费的操作。", + "AccessDenied": "身份认证通过,但 RBAC 权限不足以执行该操作。", + "RouteNotFound": "请求的 URL 路径不是已知路由。", + "MethodNotAllowed": "当前路径不接受所使用的 HTTP 方法。", + "UndonedOrderExist": "账户存在未完成的订单,请稍后重试。", + "RequestLocked": "因连续失败被临时锁定。", + "EntityTooLarge": "请求体超过允许的最大长度。", + "RequestTooFrequently": "命中限流(全局、账户级或集成级)。", + "RequestVerifyRequired": "操作需要二次验证码,但未提供。", + "DangerousOperation": "危险操作,需要进行 MFA 验证。", + "InternalError": "服务端未预期错误。反馈问题请附上 `request_id`。", + "ServiceUnavailable": "后端依赖不可用,请稍后重试。" + }, + "example": "InvalidParameter" + }, + "DutyError": { + "type": "object", + "description": "响应结构中的错误 payload,仅在非 2xx 响应时出现。", + "properties": { + "code": { + "$ref": "#/components/schemas/ErrorCode" + }, + "message": { + "type": "string", + "description": "用户可读的错误描述,语言会跟随调用方的 Accept-Language。可能包含字段名、ID 等请求上下文。", + "example": "The specified parameter template_id is not valid." + } + }, + "required": [ + "code", + "message" + ] + }, + "SuccessEnvelope": { + "type": "object", + "description": "成功响应结构。2xx 响应中 `request_id` 标识本次调用(同时出现在 `Flashcat-Request-Id` 响应头中),`data` 为接口业务 payload。失败响应使用不同结构,参见 `ErrorResponse`。", + "properties": { + "request_id": { + "type": "string", + "description": "本次请求的唯一 ID,也会在 Flashcat-Request-Id 响应头中返回。反馈问题时请一并附上。", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "data": { + "description": "每个接口自己的业务 payload,详见各接口的 200 响应 schema。" + } + }, + "required": [ + "request_id", + "data" + ] + }, + "ErrorResponse": { + "type": "object", + "description": "错误响应结构。`error` 必填,`data` 不存在。", + "properties": { + "request_id": { + "type": "string", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "error": { + "$ref": "#/components/schemas/DutyError" + } + }, + "required": [ + "request_id", + "error" + ] + }, + "EmptyObject": { + "type": "object", + "description": "空对象。当操作的成功信号就是不报错时,作为 `data` 返回。", + "additionalProperties": false + }, + "EmptyResponse": { + "type": "object", + "description": "空响应体。成功时服务端返回 `data: null`。", + "properties": {} + }, + "EmptyRequest": { + "type": "object", + "description": "无参数。", + "additionalProperties": false + }, + "CreateIncidentRequest": { + "type": "object", + "description": "手动创建故障所需的参数。", + "required": [ + "incident_severity" + ], + "properties": { + "incident_severity": { + "type": "string", + "enum": [ + "Info", + "Warning", + "Critical" + ], + "description": "故障严重程度。" + }, + "title": { + "type": "string", + "maxLength": 512, + "description": "故障标题,最多 512 个字符。" + }, + "description": { + "type": "string", + "maxLength": 1024, + "description": "故障描述,最多 1024 个字符。" + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "归属的协作空间 ID,留空表示独立故障。" + }, + "assigned_to": { + "type": "object", + "description": "故障处理人员指派目标。`person_ids` 与 `escalate_rule_id` 至少设置一项。", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "minItems": 1, + "maxItems": 100, + "description": "直接指派的成员 ID 列表。" + }, + "escalate_rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "按分派策略指派时使用的策略 ID(MongoDB ObjectID)。" + }, + "layer_idx": { + "type": "integer", + "description": "使用分派策略时的起始环节索引。" + }, + "type": { + "type": "string", + "description": "指派类型。" + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "minItems": 1, + "maxItems": 100, + "description": "邮箱接收人列表,用于 ServiceNow 等外部系统。" + }, + "notify": { + "type": "object", + "description": "为本次指派覆盖的通知渠道。", + "properties": { + "follow_preference": { + "type": "boolean", + "description": "为 true 时跟随处理人员的个人偏好。" + }, + "personal_channels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "使用的通知渠道(如 `voice`、`sms`、`email`)。" + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "通知模板 ID(MongoDB ObjectID)。" + } + } + } + } + } + } + }, + "CreateWarRoomRequest": { + "type": "object", + "description": "为故障开启 IM 作战室所需的参数。", + "required": [ + "incident_id", + "integration_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "IM 集成 ID。需开启作战室能力;当前支持飞书、钉钉、企业自建企业微信、Slack 与 Teams。" + }, + "member_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "额外加入作战室的成员 ID 列表。" + }, + "add_observers": { + "type": "boolean", + "description": "为 true 时同时将历史处理人员加入作战室作为观察员。" + } + } + }, + "AssignedTo": { + "type": "object", + "description": "故障分派目标。`person_ids` 与 `escalate_rule_id` 至少设置一项。", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "minItems": 1, + "maxItems": 100, + "description": "直接指派的成员 ID 列表。" + }, + "escalate_rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "按分派策略指派时使用的策略 ID(MongoDB ObjectID)。" + }, + "layer_idx": { + "type": "integer", + "description": "当前环节索引。" + }, + "type": { + "type": "string", + "description": "指派类型:`assign` 直接指派、`reassign` 重新指派、`escalate` 分派策略驱动、`reopen` 重新打开时自动指派。", + "enum": [ + "assign", + "reassign", + "escalate", + "reopen" + ] + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "minItems": 1, + "maxItems": 100, + "description": "邮箱接收人列表,用于 ServiceNow 等外部系统。" + }, + "escalate_rule_name": { + "type": "string", + "description": "分派策略名称,由服务端填充。" + }, + "assigned_at": { + "type": "integer", + "format": "int64", + "description": "指派发生的 Unix 时间戳(秒)。" + }, + "id": { + "type": "string", + "description": "服务端生成的指派 ID。" + } + } + }, + "PersonShort": { + "type": "object", + "description": "Flashduty 成员信息。", + "properties": { + "person_id": { + "type": "integer", + "format": "int64", + "description": "成员 ID。" + }, + "person_name": { + "type": "string", + "description": "成员显示名称。" + }, + "email": { + "type": "string", + "format": "email", + "description": "成员邮箱。" + }, + "as": { + "type": "string", + "description": "成员在当前上下文中的角色标签。" + } + } + }, + "Responder": { + "type": "object", + "description": "故障处理人员,包含指派与认领时间戳。", + "required": [ + "person_id", + "assigned_at", + "acknowledged_at" + ], + "properties": { + "person_id": { + "type": "integer", + "format": "int64", + "description": "处理人员成员 ID。" + }, + "assigned_at": { + "type": "integer", + "format": "int64", + "description": "被指派时的 Unix 时间戳(秒)。" + }, + "acknowledged_at": { + "type": "integer", + "format": "int64", + "description": "认领故障的 Unix 时间戳(秒),未认领时为 0。" + }, + "person_name": { + "type": "string", + "description": "成员名称,由服务端填充。" + }, + "email": { + "type": "string", + "format": "email", + "description": "成员邮箱,由服务端填充。" + }, + "as": { + "type": "string", + "description": "处理人员角色标签。" + } + } + }, + "LinkItem": { + "type": "object", + "description": "协作空间级别的链接集成,通过模板渲染生成。", + "required": [ + "name", + "endpoint", + "open_type" + ], + "properties": { + "name": { + "type": "string", + "description": "链接显示名称。" + }, + "endpoint": { + "type": "string", + "description": "渲染后的链接 URL。" + }, + "open_type": { + "type": "string", + "enum": [ + "popup", + "tab" + ], + "description": "链接打开方式。" + } + } + }, + "Image": { + "type": "object", + "description": "图片或附件引用。", + "required": [ + "src" + ], + "properties": { + "src": { + "type": "string", + "description": "图片来源,可以是 `img_` 上传 token 或 `http(s)` URL。" + }, + "href": { + "type": "string", + "description": "可选的图片跳转链接。" + }, + "alt": { + "type": "string", + "description": "替代文本。" + } + } + }, + "IncidentShort": { + "type": "object", + "description": "嵌入告警中的故障简要信息。", + "properties": { + "incident_id": { + "type": "string", + "description": "故障 ID(ObjectID 十六进制字符串)。" + }, + "title": { + "type": "string", + "description": "故障标题。" + }, + "progress": { + "type": "string", + "description": "故障处理进度(如 `Processing`、`Resolved`)。" + } + } + }, + "AlertEventItem": { + "type": "object", + "description": "单条原始告警事件。", + "properties": { + "event_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "事件 ID(MongoDB ObjectID)。" + }, + "alert_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "父告警 ID(MongoDB ObjectID)。" + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "账户 ID。" + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "事件路由到的协作空间 ID。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "产生该事件的集成 ID。" + }, + "integration_type": { + "type": "string", + "description": "产生该事件的集成类型/插件键。" + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "已废弃,请使用 `integration_id`。" + }, + "title": { + "type": "string", + "description": "事件标题。" + }, + "title_rule": { + "type": "string", + "description": "用于从标签派生 `title` 的标题模板。" + }, + "description": { + "type": "string", + "description": "事件描述。" + }, + "alert_key": { + "type": "string", + "description": "用于将事件合并到告警的去重键。" + }, + "event_severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "事件严重程度。" + }, + "event_status": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "事件状态。" + }, + "event_time": { + "type": "integer", + "format": "int64", + "description": "事件时间戳,Unix 时间戳(秒)。" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "标签键值对。" + }, + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertImage" + }, + "description": "事件附加的图片。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "记录创建时间,Unix 时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "记录更新时间,Unix 时间戳(秒)。" + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "软删除时间戳(秒),未删除时为 0。" + } + } + }, + "AlertInfo": { + "type": "object", + "description": "告警详情。", + "required": [ + "alert_id", + "integration_id", + "data_source_id", + "channel_id", + "account_id", + "description", + "title", + "title_rule", + "alert_key", + "alert_severity", + "alert_status", + "start_time", + "last_time", + "end_time", + "labels", + "ever_muted", + "created_at", + "updated_at", + "integration_name", + "integration_type", + "integration_ref_id", + "channel_name", + "channel_status", + "responder_name", + "responder_email", + "event_cnt", + "images", + "data_source_name", + "data_source_ref_id" + ], + "properties": { + "alert_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "告警 ID(MongoDB ObjectID)。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "产生告警的集成 ID。" + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "已废弃,请使用 `integration_id`。" + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "协作空间 ID。" + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "账号 ID。" + }, + "description": { + "type": "string", + "description": "告警描述。" + }, + "title": { + "type": "string", + "description": "告警标题。" + }, + "title_rule": { + "type": "string", + "description": "标题生成规则。" + }, + "alert_key": { + "type": "string", + "description": "用于合并事件的去重键。" + }, + "alert_severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "当前严重程度。" + }, + "alert_status": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "当前状态。" + }, + "start_time": { + "type": "integer", + "format": "int64", + "description": "告警首次触发的 Unix 时间戳(秒)。" + }, + "last_time": { + "type": "integer", + "format": "int64", + "description": "最近一次事件的 Unix 时间戳(秒)。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "告警恢复的 Unix 时间戳(秒),仍活跃时为 0。" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "告警标签。" + }, + "ever_muted": { + "type": "boolean", + "description": "该告警是否曾被静默。" + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "软删除时间戳(秒),未删除时为 0。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间戳(秒)。" + }, + "integration_name": { + "type": "string", + "description": "集成显示名称。" + }, + "integration_type": { + "type": "string", + "description": "集成类型。" + }, + "integration_ref_id": { + "type": "string", + "description": "集成引用 ID。" + }, + "channel_name": { + "type": "string", + "description": "协作空间名称。" + }, + "channel_status": { + "type": "string", + "description": "协作空间状态。" + }, + "responder_name": { + "type": "string", + "description": "主处理人员名称。" + }, + "responder_email": { + "type": "string", + "description": "主处理人员邮箱。" + }, + "incident": { + "$ref": "#/components/schemas/IncidentShort", + "description": "所属故障引用,若告警已被合并。" + }, + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertEventItem" + }, + "description": "原始告警事件,调用方显式请求时返回。" + }, + "event_cnt": { + "type": "integer", + "format": "int64", + "description": "合并到该告警的原始事件总数。" + }, + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Image" + }, + "description": "附加图片。" + }, + "data_source_name": { + "type": "string", + "description": "已废弃,请使用 `integration_name`。" + }, + "data_source_type": { + "type": "string", + "description": "已废弃,请使用 `integration_type`。" + }, + "data_source_ref_id": { + "type": "string", + "description": "已废弃,请使用 `integration_ref_id`。" + } + } + }, + "IncidentInfo": { + "type": "object", + "description": "故障详细信息。", + "required": [ + "incident_id", + "account_id", + "channel_id", + "integration_id", + "integration_ids", + "integration_types", + "dedup_key", + "equals_md5", + "start_time", + "end_time", + "last_time", + "ack_time", + "close_time", + "creator_id", + "closer_id", + "owner_id", + "incident_status", + "incident_severity", + "progress", + "title", + "description", + "ai_summary", + "impact", + "root_cause", + "resolution", + "num", + "created_at", + "updated_at", + "snoozed_before", + "group_method", + "ever_muted", + "labels", + "fields", + "assigned_to", + "alert_cnt", + "active_alert_cnt", + "alert_event_cnt", + "responders", + "account_name", + "account_locale", + "account_time_zone", + "channel_name", + "channel_status", + "detail_url", + "silence_url", + "post_mortem_id", + "images", + "manual_overrides" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "所属账号 ID。" + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "协作空间 ID,独立故障为 0。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "故障关联的首个集成 ID。" + }, + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "所有为此故障贡献告警的集成 ID。" + }, + "integration_types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "所有相关集成的类型。" + }, + "dedup_key": { + "type": "string", + "description": "合并告警时使用的去重键。" + }, + "equals_md5": { + "type": "string", + "description": "用于内容比对的 MD5 哈希。" + }, + "start_time": { + "type": "integer", + "format": "int64", + "description": "故障开始的 Unix 时间戳(秒)。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "故障结束的 Unix 时间戳(秒),仍活跃时为 0。" + }, + "last_time": { + "type": "integer", + "format": "int64", + "description": "最近一次更新的 Unix 时间戳(秒)。" + }, + "ack_time": { + "type": "integer", + "format": "int64", + "description": "首次认领的 Unix 时间戳(秒),未认领时为 0。" + }, + "close_time": { + "type": "integer", + "format": "int64", + "description": "关闭时间的 Unix 时间戳(秒),仍开启时为 0。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "创建者成员 ID,系统自动创建时为 0。" + }, + "closer_id": { + "type": "integer", + "format": "int64", + "description": "关闭者成员 ID,自动关闭时为 0。" + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "主负责人成员 ID,无则为 0。" + }, + "incident_status": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "当前故障状态,由告警状态推导。" + }, + "incident_severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "配置的故障严重程度。" + }, + "progress": { + "type": "string", + "enum": [ + "Triggered", + "Processing", + "Closed" + ], + "description": "故障进展状态。" + }, + "title": { + "type": "string", + "description": "故障标题。" + }, + "description": { + "type": "string", + "description": "故障描述。" + }, + "ai_summary": { + "type": "string", + "description": "AI 生成的故障摘要。" + }, + "impact": { + "type": "string", + "description": "影响范围描述。" + }, + "root_cause": { + "type": "string", + "description": "根因分析。" + }, + "resolution": { + "type": "string", + "description": "解决方案说明。" + }, + "num": { + "type": "string", + "description": "短标识,可能重复。" + }, + "frequency": { + "type": "string", + "description": "频率分布桶,用于分析故障发生模式:`frequent`(频繁)或 `rare`(偶发)。", + "enum": [ + "frequent", + "rare" + ] + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "软删除时间戳(秒),未删除时为 0。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间戳(秒)。" + }, + "snoozed_before": { + "type": "integer", + "format": "int64", + "description": "通知暂停截止时间(Unix 秒),0 表示未暂停。" + }, + "group_method": { + "type": "string", + "description": "构建故障时使用的告警聚合方法:`i` 智能聚合、`p` 规则聚合、`n` 不聚合。", + "enum": [ + "i", + "p", + "n" + ] + }, + "ever_muted": { + "type": "boolean", + "description": "该故障是否曾被静默。" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "从告警继承的标签。" + }, + "fields": { + "type": "object", + "additionalProperties": true, + "description": "自定义字段取值,按字段名索引。" + }, + "assigned_to": { + "$ref": "#/components/schemas/AssignedTo" + }, + "reporter_email": { + "type": "string", + "description": "手工创建故障时的上报者邮箱。" + }, + "alert_cnt": { + "type": "integer", + "format": "int64", + "description": "合并到此故障的告警总数。" + }, + "active_alert_cnt": { + "type": "integer", + "format": "int64", + "description": "当前处于 Critical/Warning/Info 状态的告警数量。" + }, + "alert_event_cnt": { + "type": "integer", + "format": "int64", + "description": "所有合并告警的原始事件总数。" + }, + "alerts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertInfo" + }, + "description": "关联告警列表,仅在通知模板与自定义动作中填充。" + }, + "closer": { + "$ref": "#/components/schemas/PersonShort", + "description": "关闭人信息。" + }, + "creator": { + "$ref": "#/components/schemas/PersonShort", + "description": "创建人信息。" + }, + "owner": { + "$ref": "#/components/schemas/PersonShort", + "description": "负责人信息,可能已废弃。", + "deprecated": true + }, + "responders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Responder" + }, + "description": "当前处理人员列表。" + }, + "account_name": { + "type": "string", + "description": "账号名称。" + }, + "account_locale": { + "type": "string", + "description": "账号语言。" + }, + "account_time_zone": { + "type": "string", + "description": "账号时区。" + }, + "channel_name": { + "type": "string", + "description": "协作空间名称。" + }, + "channel_status": { + "type": "string", + "description": "协作空间状态。" + }, + "detail_url": { + "type": "string", + "description": "前端详情页地址。" + }, + "silence_url": { + "type": "string", + "description": "快速静默页面地址。" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LinkItem" + }, + "description": "协作空间配置的链接集成。" + }, + "integration_type": { + "type": "string", + "description": "首个告警的集成类型,详情页用于标签映射。" + }, + "post_mortem_id": { + "type": "string", + "description": "关联的复盘报告 ID,一条故障只能关联一份复盘报告。" + }, + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Image" + }, + "description": "附加图片。" + }, + "manual_overrides": { + "type": "array", + "items": { + "type": "string" + }, + "description": "被手工覆盖过的字段名列表。" + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "已废弃。请使用 `integration_id`。", + "deprecated": true + }, + "data_source_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "已废弃。请使用 `integration_ids`。", + "deprecated": true + }, + "data_source_type": { + "type": "string", + "description": "已废弃。请使用 `integration_type`。", + "deprecated": true + }, + "data_source_types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "已废弃。请使用 `integration_types`。", + "deprecated": true + } + } + }, + "IncidentListResponse": { + "type": "object", + "description": "故障分页列表。", + "required": [ + "items", + "total", + "has_next_page" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentInfo" + }, + "description": "当前页故障列表。" + }, + "total": { + "type": "integer", + "format": "int64", + "description": "命中总数。" + }, + "has_next_page": { + "type": "boolean", + "description": "是否还有更多页。" + }, + "search_after_ctx": { + "type": "string", + "description": "下一页翻页游标。" + } + } + }, + "ListIncidentsRequest": { + "type": "object", + "description": "查询故障列表的过滤条件。`start_time` 与 `end_time` 必填,时间窗口不超过 31 天。", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "时间窗口起点(Unix 秒)。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "时间窗口终点(Unix 秒),必须大于 `start_time` 且不超过 31 天。" + }, + "asc": { + "type": "boolean", + "description": "true 为升序。" + }, + "is_snoozed": { + "type": "boolean", + "description": "true 时仅返回已暂停通知的故障。" + }, + "is_my_team": { + "type": "boolean", + "description": "true 时仅返回用户所属团队管理的协作空间中的故障。" + }, + "is_my_channel": { + "type": "boolean", + "description": "true 时仅返回用户个人管理的协作空间中的故障。" + }, + "ever_muted": { + "type": "boolean", + "description": "true 时仅返回曾被静默的故障。" + }, + "is_rare": { + "type": "boolean", + "description": "true 时仅返回新奇故障。" + }, + "progress": { + "type": "string", + "description": "进展状态过滤,逗号分隔(如 `Triggered,Processing`)。" + }, + "query": { + "type": "string", + "description": "全文搜索关键词。" + }, + "incident_severity": { + "type": "string", + "description": "严重程度过滤,逗号分隔(`Critical,Warning,Info`)。" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "协作空间 ID 列表,0 表示独立故障。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "团队 ID 列表,通过协作空间所属团队进行解析。" + }, + "responder_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "处理人员成员 ID。" + }, + "acker_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "认领人员成员 ID。" + }, + "creator_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "创建人员成员 ID,0 表示自动创建。" + }, + "closer_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "关闭人员成员 ID,0 表示自动关闭。" + }, + "incident_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "指定故障 ID 列表进行过滤。" + }, + "nums": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按短标识过滤。" + }, + "p": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "页码,从 1 开始。" + }, + "limit": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 100, + "default": 20, + "description": "分页大小,最大 100。" + }, + "search_after_ctx": { + "type": "string", + "description": "上一次响应返回的翻页游标。" + } + } + }, + "IncidentInfoRequest": { + "type": "object", + "description": "单个故障查询参数。", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + } + } + }, + "ListIncidentsByIdsRequest": { + "type": "object", + "description": "按 ID 批量查询故障的参数。", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "description": "待查询的故障 ID 列表。" + } + } + }, + "ListIncidentAlertsRequest": { + "type": "object", + "description": "查询故障关联告警的过滤条件。", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + }, + "include_events": { + "type": "boolean", + "description": "true 时返回每条告警下的原始事件。" + }, + "is_active": { + "type": "boolean", + "description": "true 时只返回活跃告警(Critical/Warning/Info),false 时只返回已恢复告警(Ok),不传则返回全部。" + }, + "limit": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 1000, + "default": 1000, + "description": "分页大小,最大 1000。" + }, + "p": { + "type": "integer", + "format": "int64", + "minimum": 0, + "default": 1, + "description": "页码,从 1 开始。" + } + } + }, + "ListIncidentAlertsResponse": { + "type": "object", + "description": "故障下的告警分页列表。", + "required": [ + "items", + "total" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertInfo" + }, + "description": "告警列表。" + }, + "total": { + "type": "integer", + "format": "int64", + "description": "命中总数。" + } + } + }, + "IncidentFeedType": { + "type": "string", + "description": "故障时间线条目类型。每个值对应一个生命周期事件,其 `detail` 载荷结构由该字段决定。故障级事件前缀为 `i_`;向上冒泡到故障时间线的告警级事件前缀为 `a_`。\n\n| 类型 | 含义 |\n|---|---|\n| `i_new` | 故障创建:系统自动或人工创建了新故障。 |\n| `i_assign` | 分派响应人:故障被分派给指定人员处理。 |\n| `i_a_rspd` | 添加响应人:有新的响应人被加入处理。 |\n| `i_notify` | 通过某个渠道在指定环节发送通知。 |\n| `i_storm` | 故障触发告警风暴阈值。 |\n| `i_snooze` | 暂停通知指定时长。 |\n| `i_wake` | 取消暂停并恢复通知。 |\n| `i_ack` | 确认故障:响应人确认已开始处理故障。 |\n| `i_unack` | 取消认领。 |\n| `i_comm` | 添加评论:响应人记录了处理进展或关键信息。 |\n| `i_rslv` | 解决故障:故障被标记为已解决。 |\n| `i_reopen` | 重新打开:已解决的故障被重新打开,可能问题复发。 |\n| `i_merge` | 合并故障:多个相关故障被合并为一个。 |\n| `i_r_title` | 标题更新。 |\n| `i_r_desc` | 描述更新。 |\n| `i_r_impact` | 影响范围更新。 |\n| `i_r_rc` | 根因更新。 |\n| `i_r_rsltn` | 解决方案更新。 |\n| `i_r_severity` | 严重等级变更:故障的严重程度被调整。 |\n| `i_r_field` | 自定义字段值更新。 |\n| `i_m_flapping` | 因抖动检测被静默。 |\n| `i_m_reply` | 评论静音回复标记。 |\n| `i_custom` | 执行动作:触发了自动化操作或脚本。 |\n| `i_wr_create` | 创建作战室:建立了即时通讯群组用于协作处理。 |\n| `i_wr_delete` | 删除作战室群组。 |\n| `i_auto_refresh` | 卡片自动刷新事件。 |", + "enum": [ + "i_new", + "i_assign", + "i_a_rspd", + "i_notify", + "i_storm", + "i_snooze", + "i_wake", + "i_ack", + "i_unack", + "i_comm", + "i_rslv", + "i_reopen", + "i_merge", + "i_r_title", + "i_r_desc", + "i_r_impact", + "i_r_rc", + "i_r_rsltn", + "i_r_severity", + "i_r_field", + "i_m_flapping", + "i_m_reply", + "i_custom", + "i_wr_create", + "i_wr_delete", + "i_auto_refresh", + "a_merge" + ] + }, + "FeedSeverity": { + "type": "string", + "enum": [ + "Ok", + "Critical", + "Warning", + "Info" + ], + "description": "严重等级。" + }, + "NotifyPerson": { + "type": "object", + "description": "个人通知投递记录。", + "properties": { + "person_id": { + "type": "integer", + "format": "int64", + "description": "接收人成员 ID。" + }, + "failed_reason": { + "type": "string", + "description": "投递失败原因。" + } + } + }, + "NotifyChat": { + "type": "object", + "description": "群聊通知投递记录。", + "properties": { + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "发送通知所用的集成数据源 ID。" + }, + "chat_id": { + "type": "string", + "description": "群聊 ID。" + }, + "chat_name": { + "type": "string", + "description": "群聊显示名称。" + }, + "failed_reason": { + "type": "string", + "description": "投递失败原因。" + } + } + }, + "NotifyRobot": { + "type": "object", + "description": "机器人 webhook 通知投递记录。", + "properties": { + "token": { + "type": "string", + "description": "机器人 token 或标识。" + }, + "alias": { + "type": "string", + "description": "机器人别名。" + }, + "failed_reason": { + "type": "string", + "description": "投递失败原因。" + } + } + }, + "FeedDetailIncidentNew": { + "type": "object", + "description": "`i_new` 的 detail 载荷。", + "properties": { + "severity": { + "$ref": "#/components/schemas/FeedSeverity" + }, + "title": { + "type": "string", + "description": "故障初始标题。" + }, + "reporter_email": { + "type": "string", + "description": "外部创建故障时的上报人邮箱。" + } + }, + "title": "i_new" + }, + "FeedDetailIncidentComment": { + "type": "object", + "description": "`i_comm` 的 detail 载荷。", + "properties": { + "comment": { + "type": "string", + "description": "评论正文。" + }, + "mute_reply": { + "type": "boolean", + "description": "是否静音该评论的回复。" + } + }, + "title": "i_comm" + }, + "FeedDetailIncidentAck": { + "type": "object", + "description": "`i_ack` 的 detail 载荷。", + "properties": { + "progress": { + "type": "string", + "description": "认领时记录的处理进展。" + } + }, + "title": "i_ack" + }, + "FeedDetailIncidentUnack": { + "type": "object", + "description": "`i_unack` 的 detail 载荷。", + "properties": { + "progress": { + "type": "string", + "description": "取消认领时记录的处理进展。" + } + }, + "title": "i_unack" + }, + "FeedDetailIncidentSnooze": { + "type": "object", + "description": "`i_snooze` 的 detail 载荷。", + "properties": { + "minutes": { + "type": "integer", + "format": "int64", + "description": "暂停时长(分钟)。" + } + }, + "title": "i_snooze" + }, + "FeedDetailIncidentWake": { + "type": "object", + "description": "`i_wake` 的 detail 载荷。", + "properties": { + "snoozedBefore": { + "type": "integer", + "format": "int64", + "description": "原本计划结束暂停的 Unix 时间戳。" + } + }, + "title": "i_wake" + }, + "FeedDetailIncidentResolve": { + "type": "object", + "description": "`i_rslv` 的 detail 载荷。", + "required": [ + "from" + ], + "properties": { + "from": { + "type": "string", + "enum": [ + "voice", + "console", + "card", + "wcard", + "event", + "autorslv", + "autorefresh", + "escalation" + ], + "description": "触发恢复操作的来源。" + } + }, + "title": "i_rslv" + }, + "FeedDetailIncidentReopen": { + "type": "object", + "description": "`i_reopen` 的 detail 载荷。", + "properties": { + "reason": { + "type": "string", + "description": "重新打开故障的原因。" + } + }, + "title": "i_reopen" + }, + "FeedDetailIncidentMerge": { + "type": "object", + "description": "`i_merge` 的 detail 载荷。", + "properties": { + "comment": { + "type": "string", + "description": "合并时的评论。" + }, + "source_incidents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentShort" + }, + "description": "被合并的源故障列表。" + }, + "target_incident": { + "$ref": "#/components/schemas/IncidentShort" + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "执行合并操作的成员 ID。" + }, + "title": { + "type": "string", + "description": "合并后的故障标题。" + }, + "remove_source_incidents": { + "type": "boolean", + "description": "合并后是否移除源故障。" + }, + "source_responders": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "从源故障继承的响应人成员 ID 列表。" + } + }, + "title": "i_merge" + }, + "FeedDetailIncidentAssign": { + "type": "object", + "description": "`i_assign` 的 detail 载荷。在 `AssignedTo` 基础上附加目标成员 ID 列表。", + "allOf": [ + { + "$ref": "#/components/schemas/AssignedTo" + }, + { + "type": "object", + "properties": { + "to": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "被分派的成员 ID 列表。" + } + } + } + ], + "title": "i_assign" + }, + "FeedDetailIncidentAddRspd": { + "type": "object", + "description": "`i_a_rspd` 的 detail 载荷。", + "properties": { + "to": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "新增为响应人的成员 ID 列表。" + } + }, + "title": "i_a_rspd" + }, + "FeedDetailIncidentResetTitle": { + "type": "object", + "description": "`i_r_title` 的 detail 载荷。", + "properties": { + "from": { + "type": "string", + "description": "变更前的标题。" + }, + "to": { + "type": "string", + "description": "变更后的标题。" + } + }, + "title": "i_r_title" + }, + "FeedDetailIncidentResetDescription": { + "type": "object", + "description": "`i_r_desc` 的 detail 载荷,无字段。", + "properties": {}, + "additionalProperties": false, + "title": "i_r_desc" + }, + "FeedDetailIncidentResetImpact": { + "type": "object", + "description": "`i_r_impact` 的 detail 载荷,无字段。", + "properties": {}, + "additionalProperties": false, + "title": "i_r_impact" + }, + "FeedDetailIncidentResetRootCause": { + "type": "object", + "description": "`i_r_rc` 的 detail 载荷,无字段。", + "properties": {}, + "additionalProperties": false, + "title": "i_r_rc" + }, + "FeedDetailIncidentResetResolution": { + "type": "object", + "description": "`i_r_rsltn` 的 detail 载荷,无字段。", + "properties": {}, + "additionalProperties": false, + "title": "i_r_rsltn" + }, + "FeedDetailIncidentResetSeverity": { + "type": "object", + "description": "`i_r_severity` 的 detail 载荷。", + "properties": { + "from": { + "$ref": "#/components/schemas/FeedSeverity" + }, + "to": { + "$ref": "#/components/schemas/FeedSeverity" + } + }, + "title": "i_r_severity" + }, + "FeedDetailIncidentResetField": { + "type": "object", + "description": "`i_r_field` 的 detail 载荷。", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string", + "description": "被更新的自定义字段名称。" + }, + "to": { + "description": "自定义字段的新值,类型取决于字段定义。" + } + }, + "title": "i_r_field" + }, + "FeedDetailIncidentNotify": { + "type": "object", + "description": "`i_notify` 的 detail 载荷。", + "required": [ + "layer_idx" + ], + "properties": { + "rid": { + "type": "string", + "description": "通知记录 ID。" + }, + "msg_id": { + "type": "string", + "description": "投递渠道返回的上游消息 ID。" + }, + "fire_type": { + "type": "string", + "enum": [ + "fire", + "refire" + ], + "description": "首次触发或再次触发。" + }, + "escalate_rule_name": { + "type": "string", + "description": "分派策略名称。" + }, + "escalate_rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "分派策略 ID(MongoDB ObjectID)。" + }, + "layer_idx": { + "type": "integer", + "description": "本次通知所处的环节索引。" + }, + "by": { + "type": "string", + "description": "投递渠道或方式标签。" + }, + "persons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotifyPerson" + }, + "description": "个人投递记录。" + }, + "chats": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotifyChat" + }, + "description": "群聊投递记录。" + }, + "robots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotifyRobot" + }, + "description": "机器人投递记录。" + } + }, + "title": "i_notify" + }, + "FeedDetailIncidentStorm": { + "type": "object", + "description": "`i_storm` 的 detail 载荷。", + "properties": { + "threshold": { + "type": "integer", + "description": "触发的风暴阈值。" + } + }, + "title": "i_storm" + }, + "FeedDetailIncidentMuteByFlapping": { + "type": "object", + "description": "`i_m_flapping` 的 detail 载荷。", + "properties": { + "max_changes": { + "type": "integer", + "description": "窗口内允许的最大状态变化次数。" + }, + "in_mins": { + "type": "integer", + "description": "统计窗口长度(分钟)。" + }, + "mute_mins": { + "type": "integer", + "description": "触发抖动检测后的静音时长(分钟)。" + } + }, + "title": "i_m_flapping" + }, + "FeedDetailIncidentMuteReply": { + "type": "object", + "description": "`i_m_reply` 的 detail 载荷,无字段。", + "properties": {}, + "additionalProperties": false, + "title": "i_m_reply" + }, + "FeedDetailIncidentCustomAction": { + "type": "object", + "description": "`i_custom` 的 detail 载荷。", + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "执行动作的集成 ID。" + }, + "integration_name": { + "type": "string", + "description": "集成显示名称。" + } + }, + "title": "i_custom" + }, + "FeedDetailIncidentWarRoomCreate": { + "type": "object", + "description": "`i_wr_create` 的 detail 载荷。", + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "承载作战室群聊的集成 ID。" + }, + "chat_id": { + "type": "string", + "description": "群聊 ID。" + }, + "chat_name": { + "type": "string", + "description": "群聊显示名称。" + }, + "plugin_type": { + "type": "string", + "description": "聊天集成插件类型。" + }, + "integration_name": { + "type": "string", + "description": "集成显示名称。" + }, + "share_link": { + "type": "string", + "description": "作战室的可分享加入链接。" + } + }, + "title": "i_wr_create" + }, + "FeedDetailIncidentWarRoomDelete": { + "type": "object", + "description": "`i_wr_delete` 的 detail 载荷。", + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "承载作战室群聊的集成 ID。" + }, + "chat_id": { + "type": "string", + "description": "群聊 ID。" + }, + "chat_name": { + "type": "string", + "description": "群聊显示名称。" + }, + "plugin_type": { + "type": "string", + "description": "聊天集成插件类型。" + }, + "integration_name": { + "type": "string", + "description": "集成显示名称。" + } + }, + "title": "i_wr_delete" + }, + "FeedDetailIncidentAutoRefreshCard": { + "type": "object", + "description": "`i_auto_refresh` 的 detail 载荷,无字段。", + "properties": {}, + "additionalProperties": false, + "title": "i_auto_refresh" + }, + "IncidentFeedItem": { + "type": "object", + "description": "单条故障时间线条目。`detail` 字段由 `type` 决定具体结构,详见各 `FeedDetail*` 结构。", + "required": [ + "ref_id", + "type", + "detail", + "account_id", + "creator_id", + "created_at", + "updated_at" + ], + "properties": { + "ref_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "引用对象 ObjectID,根据 type 不同可能指向故障或告警。" + }, + "type": { + "$ref": "#/components/schemas/IncidentFeedType" + }, + "detail": { + "description": "类型相关的负载,具体结构由 `type` 决定。", + "oneOf": [ + { + "$ref": "#/components/schemas/FeedDetailIncidentNew" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentAssign" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentAddRspd" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentNotify" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentStorm" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentSnooze" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentWake" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentAck" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentUnack" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentComment" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResolve" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentReopen" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentMerge" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetTitle" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetDescription" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetImpact" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetRootCause" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetResolution" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetSeverity" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentResetField" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentMuteByFlapping" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentMuteReply" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentCustomAction" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentWarRoomCreate" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentWarRoomDelete" + }, + { + "$ref": "#/components/schemas/FeedDetailIncidentAutoRefreshCard" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "i_new": "#/components/schemas/FeedDetailIncidentNew", + "i_assign": "#/components/schemas/FeedDetailIncidentAssign", + "i_a_rspd": "#/components/schemas/FeedDetailIncidentAddRspd", + "i_notify": "#/components/schemas/FeedDetailIncidentNotify", + "i_storm": "#/components/schemas/FeedDetailIncidentStorm", + "i_snooze": "#/components/schemas/FeedDetailIncidentSnooze", + "i_wake": "#/components/schemas/FeedDetailIncidentWake", + "i_ack": "#/components/schemas/FeedDetailIncidentAck", + "i_unack": "#/components/schemas/FeedDetailIncidentUnack", + "i_comm": "#/components/schemas/FeedDetailIncidentComment", + "i_rslv": "#/components/schemas/FeedDetailIncidentResolve", + "i_reopen": "#/components/schemas/FeedDetailIncidentReopen", + "i_merge": "#/components/schemas/FeedDetailIncidentMerge", + "i_r_title": "#/components/schemas/FeedDetailIncidentResetTitle", + "i_r_desc": "#/components/schemas/FeedDetailIncidentResetDescription", + "i_r_impact": "#/components/schemas/FeedDetailIncidentResetImpact", + "i_r_rc": "#/components/schemas/FeedDetailIncidentResetRootCause", + "i_r_rsltn": "#/components/schemas/FeedDetailIncidentResetResolution", + "i_r_severity": "#/components/schemas/FeedDetailIncidentResetSeverity", + "i_r_field": "#/components/schemas/FeedDetailIncidentResetField", + "i_m_flapping": "#/components/schemas/FeedDetailIncidentMuteByFlapping", + "i_m_reply": "#/components/schemas/FeedDetailIncidentMuteReply", + "i_custom": "#/components/schemas/FeedDetailIncidentCustomAction", + "i_wr_create": "#/components/schemas/FeedDetailIncidentWarRoomCreate", + "i_wr_delete": "#/components/schemas/FeedDetailIncidentWarRoomDelete", + "i_auto_refresh": "#/components/schemas/FeedDetailIncidentAutoRefreshCard" + } + } + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "账号 ID。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "操作人成员 ID,`0` 表示系统生成。" + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "软删除时间戳(毫秒),未删除时为 0。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间戳(毫秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间戳(毫秒)。" + } + } + }, + "ListIncidentFeedRequest": { + "type": "object", + "description": "获取故障时间线的参数。", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + }, + "p": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "页码,从 1 开始。" + }, + "limit": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 100, + "default": 20, + "description": "分页大小,最大 100。" + }, + "asc": { + "type": "boolean", + "description": "true 为按时间升序。" + }, + "types": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentFeedType" + }, + "description": "可选类型过滤,仅返回指定类型的时间线条目。" + } + } + }, + "ListIncidentFeedResponse": { + "type": "object", + "description": "故障时间线分页结果。", + "required": [ + "has_next_page", + "items" + ], + "properties": { + "has_next_page": { + "type": "boolean", + "description": "是否还有更多条目。" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentFeedItem" + }, + "description": "当前页的时间线条目。" + } + } + }, + "ListPastIncidentsRequest": { + "type": "object", + "description": "查询历史相似故障的参数。", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "基准故障 ID(MongoDB ObjectID)。" + }, + "limit": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 100, + "default": 5, + "description": "返回的相似故障最大数量。" + } + } + }, + "PastIncidentItem": { + "allOf": [ + { + "$ref": "#/components/schemas/IncidentInfo" + }, + { + "type": "object", + "required": [ + "score" + ], + "properties": { + "score": { + "type": "number", + "format": "float", + "description": "向量检索返回的相似度分值。" + } + } + } + ] + }, + "ListPastIncidentsResponse": { + "type": "object", + "description": "历史相似故障列表,按相关性排序。", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PastIncidentItem" + }, + "description": "相似故障及其评分。" + } + } + }, + "AckIncidentRequest": { + "type": "object", + "description": "认领故障的参数。", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "待认领的故障 ID 列表,单次最多 100 条。", + "minItems": 1 + } + } + }, + "UnackIncidentRequest": { + "type": "object", + "description": "取消认领故障的参数。", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "待取消认领的故障 ID 列表,单次最多 100 条。", + "minItems": 1 + } + } + }, + "ResolveIncidentRequest": { + "type": "object", + "description": "恢复故障的参数。", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "待恢复的故障 ID 列表,单次最多 100 条。", + "minItems": 1 + }, + "root_cause": { + "type": "string", + "maxLength": 1024, + "description": "可选,应用到所有故障的根因说明。" + }, + "resolution": { + "type": "string", + "maxLength": 1024, + "description": "可选,应用到所有故障的解决方案说明。" + } + } + }, + "ReopenIncidentRequest": { + "type": "object", + "description": "重新打开故障的参数。", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "待重开的故障 ID 列表,单次最多 100 条。", + "minItems": 1 + }, + "reason": { + "type": "string", + "maxLength": 1024, + "description": "可选,记录到时间线的重开原因。" + } + } + }, + "SnoozeIncidentRequest": { + "type": "object", + "description": "暂停故障通知的参数。", + "required": [ + "incident_ids", + "minutes" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "待暂停的故障 ID 列表,单次最多 100 条。" + }, + "minutes": { + "type": "integer", + "format": "int64", + "exclusiveMinimum": 0, + "maximum": 1440, + "description": "暂停时长(分钟),必须大于 0 且不超过 1440(24 小时)。" + } + } + }, + "WakeIncidentRequest": { + "type": "object", + "description": "恢复故障通知的参数。", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "待恢复通知的故障 ID 列表,单次最多 100 条。", + "minItems": 1 + } + } + }, + "MergeIncidentsRequest": { + "type": "object", + "description": "合并故障的参数。", + "required": [ + "source_incident_ids", + "target_incident_id" + ], + "properties": { + "source_incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "minItems": 1, + "maxItems": 100, + "description": "待合并的源故障 ID 列表。若其中包含目标故障 ID,系统会自动去除。" + }, + "target_incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "合并目标故障 ID。" + }, + "title": { + "type": "string", + "maxLength": 512, + "description": "可选,为目标故障设置新标题。" + }, + "comment": { + "type": "string", + "maxLength": 1024, + "description": "可选,合并时间线上的备注。" + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "可选,为目标故障设置新负责人。" + }, + "remove_source_incidents": { + "type": "boolean", + "description": "为 true 时合并后软删除源故障,否则将源故障关闭。" + } + } + }, + "DisableIncidentMergeRequest": { + "type": "object", + "description": "禁用故障自动合并的参数。", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "description": "需禁用自动合并的故障 ID 列表。" + } + } + }, + "UpdateIncidentFieldsRequest": { + "type": "object", + "description": "更新故障可编辑字段的参数。至少需要提供一个字段;handler 只会更新显式传入的字段。", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + }, + "title": { + "type": "string", + "minLength": 3, + "maxLength": 200, + "description": "新标题。" + }, + "description": { + "type": "string", + "minLength": 3, + "maxLength": 6144, + "description": "新描述。" + }, + "impact": { + "type": "string", + "minLength": 3, + "maxLength": 6144, + "description": "新影响描述。" + }, + "root_cause": { + "type": "string", + "minLength": 3, + "maxLength": 6144, + "description": "新根因分析。" + }, + "resolution": { + "type": "string", + "minLength": 3, + "maxLength": 6144, + "description": "新解决方案说明。" + }, + "incident_severity": { + "type": "string", + "enum": [ + "Info", + "Warning", + "Critical" + ], + "description": "新严重程度。" + } + } + }, + "RemoveIncidentRequest": { + "type": "object", + "description": "永久删除故障的参数。", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "待删除的故障 ID 列表,单次最多 100 条。调用方必须拥有所有故障所在协作空间的访问权限。" + } + } + }, + "CommentIncidentRequest": { + "type": "object", + "description": "为故障添加评论的参数。", + "required": [ + "incident_ids" + ], + "properties": { + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "maxItems": 100, + "description": "目标故障 ID 列表,单次最多 100 条。", + "minItems": 1 + }, + "comment": { + "type": "string", + "maxLength": 1024, + "description": "评论内容。" + }, + "mute_reply": { + "type": "boolean", + "description": "为 true 时不触发 webhook 回复动作。" + } + } + }, + "AssignIncidentRequest": { + "type": "object", + "description": "分派故障的参数。`incident_id` 与 `incident_ids` 二选一。", + "required": [ + "assigned_to" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "单个故障 ID。当 `incident_ids` 也传入时将被忽略。" + }, + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "minItems": 1, + "maxItems": 100, + "description": "批量故障 ID 列表。" + }, + "assigned_to": { + "$ref": "#/components/schemas/AssignedTo" + } + } + }, + "AddIncidentResponderRequest": { + "type": "object", + "description": "向已有故障添加处理人员的参数。", + "required": [ + "incident_id", + "person_ids" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + }, + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "要添加的处理人员成员 ID 列表。" + }, + "notify": { + "type": "object", + "description": "通知配置,默认跟随每人的个人通知偏好。", + "properties": { + "follow_preference": { + "type": "boolean", + "description": "为 true 时跟随处理人员的个人偏好。" + }, + "personal_channels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "使用的通知渠道(如 `voice`、`sms`、`email`)。" + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "通知模板 ID(MongoDB ObjectID)。" + } + } + } + } + }, + "ResetIncidentFieldRequest": { + "type": "object", + "description": "更新故障自定义字段值的参数。", + "required": [ + "incident_id", + "field_name" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + }, + "field_name": { + "type": "string", + "description": "自定义字段名称,必须与账号下定义的字段匹配。" + }, + "field_value": { + "description": "字段新值,类型需与字段定义一致。" + } + } + }, + "DoIncidentCustomActionRequest": { + "type": "object", + "description": "对故障执行自定义操作集成的参数。", + "required": [ + "incident_id", + "integration_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "自定义操作集成 ID,必须已启用且关联故障所在协作空间。" + } + } + }, + "DoIncidentCustomActionResponse": { + "type": "object", + "description": "自定义操作的执行结果。", + "properties": { + "message": { + "type": "string", + "description": "HTTP 调用失败时的错误信息,成功时不返回。" + } + } + }, + "GetWarRoomDetailRequest": { + "type": "object", + "description": "获取战情室实时详情的参数。", + "required": [ + "integration_id", + "chat_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "托管该战情室的 IM 集成 ID。" + }, + "chat_id": { + "type": "string", + "description": "IM 侧的群/会话 ID。" + } + } + }, + "WarRoom": { + "type": "object", + "description": "从 IM 侧拉取的战情室实时详情。若群组已在 IM 侧被删除则返回空对象。", + "required": [ + "chat_id", + "chat_name", + "share_link" + ], + "properties": { + "chat_id": { + "type": "string", + "description": "IM 侧的群/会话 ID。" + }, + "chat_name": { + "type": "string", + "description": "群组显示名称。" + }, + "share_link": { + "type": "string", + "description": "加入链接,若 IM 提供。" + } + } + }, + "ListWarRoomsRequest": { + "type": "object", + "description": "查询故障战情室列表的参数。", + "required": [ + "incident_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "可选过滤:仅返回指定 IM 集成下的战情室。" + } + } + }, + "WarRoomItem": { + "type": "object", + "description": "战情室记录。", + "required": [ + "account_id", + "integration_id", + "created_by", + "chat_id", + "incident_id", + "status", + "created_at", + "plugin_type" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "账号 ID。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "IM 集成 ID。" + }, + "created_by": { + "type": "integer", + "format": "int64", + "description": "创建成员 ID。" + }, + "chat_id": { + "type": "string", + "description": "IM 侧的群/会话 ID。" + }, + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "关联的故障 ID(MongoDB ObjectID)。" + }, + "status": { + "type": "string", + "description": "战情室状态。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间戳(秒)。" + }, + "plugin_type": { + "type": "string", + "description": "IM 插件类型(如 `feishu`、`dingtalk`、`wecom`、`slack`)。" + } + } + }, + "ListWarRoomsResponse": { + "type": "object", + "description": "故障关联战情室列表。", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WarRoomItem" + }, + "description": "战情室记录列表。" + } + } + }, + "DeleteWarRoomRequest": { + "type": "object", + "description": "删除故障战情室的参数。", + "required": [ + "incident_id", + "integration_id" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID)。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "IM 集成 ID。" + } + } + }, + "ListPostMortemsRequest": { + "type": "object", + "description": "查询复盘报告列表的过滤条件。", + "properties": { + "status": { + "type": "string", + "enum": [ + "drafting", + "published" + ], + "description": "复盘状态,缺省时服务端默认按 `published` 过滤。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "限定查询的团队 ID。" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "限定查询的协作空间 ID。" + }, + "created_at_start_seconds": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "创建时间下界(秒)。" + }, + "created_at_end_seconds": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "创建时间上界(秒)。" + }, + "order_by": { + "type": "string", + "enum": [ + "created_at_seconds", + "updated_at_seconds" + ], + "description": "排序字段。" + }, + "asc": { + "type": "boolean", + "description": "true 为升序。" + }, + "p": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "页码,从 1 开始。" + }, + "limit": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 100, + "default": 20, + "description": "分页大小,最大 100。" + }, + "search_after_ctx": { + "type": "string", + "description": "上一次响应返回的翻页游标。" + } + } + }, + "PostMortemMeta": { + "type": "object", + "description": "复盘报告元信息(列表中使用的精简结构)。", + "required": [ + "account_id", + "title", + "status", + "post_mortem_id", + "template_id", + "incident_ids", + "media_count", + "author_ids", + "team_id", + "channel_id", + "is_private", + "channel_name", + "created_at_seconds", + "updated_at_seconds" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "账号 ID。" + }, + "title": { + "type": "string", + "description": "复盘标题。" + }, + "status": { + "type": "string", + "enum": [ + "drafting", + "published" + ], + "description": "复盘状态。" + }, + "post_mortem_id": { + "type": "string", + "description": "按账号和故障 ID 确定性派生的复盘报告 ID。" + }, + "template_id": { + "type": "string", + "description": "初始化时使用的模板 ID。" + }, + "incident_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "关联的故障 ID 列表。" + }, + "media_count": { + "type": "integer", + "description": "已上传的媒体文件数量。" + }, + "author_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "贡献过该复盘的成员 ID 列表。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID,为 0 表示无。" + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID,为 0 表示无。" + }, + "is_private": { + "type": "boolean", + "description": "为 true 时仅团队成员和管理员可查看。" + }, + "channel_name": { + "type": "string", + "description": "协作空间名称,由服务端填充。" + }, + "created_at_seconds": { + "type": "integer", + "format": "int64", + "description": "创建时间戳(秒)。" + }, + "updated_at_seconds": { + "type": "integer", + "format": "int64", + "description": "最后更新时间戳(秒)。" + } + } + }, + "ListPostMortemsResponse": { + "type": "object", + "description": "复盘报告分页列表。", + "required": [ + "items", + "total", + "has_next_page" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PostMortemMeta" + }, + "description": "当前页复盘元信息。" + }, + "total": { + "type": "integer", + "format": "int64", + "description": "命中总数。" + }, + "has_next_page": { + "type": "boolean", + "description": "是否还有更多页。" + }, + "search_after_ctx": { + "type": "string", + "description": "翻页游标。" + } + } + }, + "PostMortemItem": { + "type": "object", + "description": "完整复盘报告,包含基础信息、正文与跟进项。", + "required": [ + "meta", + "basics", + "content", + "follow_ups" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/PostMortemMeta" + }, + "basics": { + "type": "object", + "required": [ + "incidents_highest_severity", + "incidents_earliest_start_seconds", + "incidents_latest_close_seconds", + "incidents_total_duration_seconds", + "responders" + ], + "properties": { + "incidents_highest_severity": { + "type": "string", + "description": "关联故障的最高严重程度。" + }, + "incidents_earliest_start_seconds": { + "type": "integer", + "format": "int64", + "description": "关联故障中最早的开始时间(秒)。" + }, + "incidents_latest_close_seconds": { + "type": "integer", + "format": "int64", + "description": "关联故障中最晚的关闭时间(秒)。" + }, + "incidents_total_duration_seconds": { + "type": "integer", + "format": "int64", + "description": "累计持续时长(秒)。" + }, + "responders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Responder" + }, + "description": "参与处理的成员。" + } + } + }, + "content": { + "type": "object", + "required": [ + "content" + ], + "properties": { + "content": { + "type": "string", + "description": "正文内容(BlockNote JSON)。" + } + } + }, + "follow_ups": { + "type": "string", + "description": "跟进行动项,单字符串表示。" + } + } + }, + "DeletePostMortemRequest": { + "type": "object", + "description": "删除复盘报告的参数。", + "required": [ + "post_mortem_id" + ], + "properties": { + "post_mortem_id": { + "type": "string", + "description": "复盘报告 ID。" + } + } + }, + "CreateIncidentResponse": { + "type": "object", + "description": "手动创建故障的返回结果。", + "required": [ + "incident_id", + "title" + ], + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "新建故障的 ID(MongoDB ObjectID)。" + }, + "title": { + "type": "string", + "description": "回显请求中传入的故障标题。" + } + } + }, + "FilterCondition": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "过滤字段名。内置告警字段使用字段名(如 `alert_severity`、`alert_key`、`check`、`resource`、`service`、`cluster`),自定义标签使用 `labels.` 前缀(如 `labels.env`、`labels.region`)。" + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "过滤操作符。`IN`:值必须匹配 `vals` 中的某一项;`NOTIN`:值不能匹配 `vals` 中任何一项。支持 `/pattern/` 格式的正则表达式。" + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "匹配值列表。每一项为普通字符串或 `/regex/` 正则模式。" + } + } + }, + "OrFilterGroup": { + "type": "array", + "description": "OR-of-AND 过滤树。外层数组为 AND 组列表,任意一个 AND 组匹配即通过;AND 组内所有条件须同时满足。", + "items": { + "type": "array", + "description": "AND 组——组内所有条件须同时满足。", + "items": { + "$ref": "#/components/schemas/FilterCondition" + } + } + }, + "CreateChannelRequest": { + "type": "object", + "description": "创建协作空间所需的参数。", + "required": [ + "team_id", + "channel_name" + ], + "properties": { + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID。" + }, + "managing_team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "maxItems": 3, + "description": "可管理该协作空间的其他团队 ID,最多 3 个。" + }, + "channel_name": { + "type": "string", + "minLength": 1, + "maxLength": 59, + "description": "协作空间名称,1 到 59 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "描述信息,最多 500 个字符。" + }, + "escalate_rule": { + "type": "object", + "description": "协作空间的默认分派策略,不需要时可省略。", + "required": [ + "template_id", + "target" + ], + "properties": { + "aggr_window": { + "type": "integer", + "minimum": 0, + "maximum": 3600, + "description": "聚合窗口,单位秒,0 表示不聚合。" + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "通知模板 ID(MongoDB ObjectID)。" + }, + "target": { + "type": "object", + "description": "通知目标。`person_ids`、`team_ids`、`schedule_to_role_ids`、`emails` 至少设置一项,且 `by` 与 `webhooks` 至少设置一项。", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "直接通知的成员 ID 列表。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "通知的团队 ID 列表。" + }, + "schedule_to_role_ids": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "description": "值班表 ID 到角色 ID 列表的映射,用于按值班角色通知。" + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "description": "邮箱地址列表(推送场景)。" + }, + "by": { + "type": "object", + "description": "按告警等级配置的个人通知渠道。未提供 `webhooks` 时必填。", + "properties": { + "follow_preference": { + "type": "boolean", + "description": "为 true 时跟随处理人员的个人偏好,忽略下方列表。" + }, + "critical": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Critical 级别使用的通知渠道(如 `voice`、`sms`、`email`、`feishu`)。" + }, + "warning": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Warning 级别使用的通知渠道。" + }, + "info": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Info 级别使用的通知渠道。" + } + } + }, + "webhooks": { + "type": "array", + "description": "群聊/Webhook 通知目标。未提供 `by` 时必填。", + "items": { + "type": "object", + "required": [ + "type", + "settings" + ], + "properties": { + "type": { + "type": "string", + "description": "Webhook 类型(如 `feishu`、`dingtalk_app`、`wecom_app`、`slack`、`teams`、`custom`)。" + }, + "settings": { + "type": "object", + "additionalProperties": true, + "description": "类型相关的配置参数(群聊 ID、URL 等)。" + } + } + } + } + } + } + } + }, + "group": { + "type": "object", + "description": "告警聚合配置。", + "required": [ + "method" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "i", + "p", + "n" + ], + "description": "聚合方式:`i` 智能、`p` 规则、`n` 不聚合。" + }, + "equals": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "maxItems": 5, + "description": "用于聚合判定的 label 键分组。" + }, + "cases": { + "type": "array", + "maxItems": 100, + "description": "按过滤条件的聚合策略覆盖。", + "items": { + "type": "object" + } + }, + "all_equals_required": { + "type": "boolean", + "description": "为 true 时要求所有键同时存在才能参与聚合。" + }, + "time_window": { + "type": "integer", + "minimum": 0, + "description": "聚合时间窗口,单位秒。" + }, + "window_type": { + "type": "string", + "enum": [ + "tumbling", + "sliding" + ], + "description": "窗口类型,默认 `tumbling`。" + }, + "storm_threshold": { + "type": "integer", + "minimum": 0, + "maximum": 10000, + "description": "告警风暴阈值。" + }, + "storm_thresholds": { + "type": "array", + "items": { + "type": "integer" + }, + "maxItems": 5, + "description": "多级告警风暴阈值。" + }, + "i_keys": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 10, + "description": "用于智能聚合向量化的 label 键。" + }, + "i_score_threshold": { + "type": "number", + "format": "float", + "minimum": 0.5, + "maximum": 1, + "description": "智能聚合相似度阈值。" + } + } + }, + "flapping": { + "type": "object", + "description": "抖动检测配置。", + "properties": { + "is_disabled": { + "type": "boolean", + "description": "禁用抖动检测。" + }, + "max_changes": { + "type": "integer", + "minimum": 2, + "maximum": 100, + "description": "`in_mins` 内允许的最大状态变更次数。" + }, + "in_mins": { + "type": "integer", + "minimum": 1, + "maximum": 1440, + "description": "观察窗口,单位分钟。" + }, + "mute_mins": { + "type": "integer", + "minimum": 0, + "maximum": 1440, + "description": "检测到抖动后的静音时长,单位分钟。" + } + } + }, + "auto_resolve_timeout": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 2592000, + "description": "自动恢复超时,单位秒。0 表示不自动恢复,最长 30 天。" + }, + "auto_resolve_mode": { + "type": "string", + "enum": [ + "trigger", + "update" + ], + "description": "自动恢复计时重置方式。" + }, + "plugin_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "订阅该协作空间的集成 ID 列表。" + }, + "is_private": { + "type": "boolean", + "description": "为 true 时仅管理团队可见。" + }, + "disable_outlier_detection": { + "type": "boolean", + "description": "禁用新奇故障检测。" + }, + "disable_auto_close": { + "type": "boolean", + "description": "禁用故障自动关闭。" + }, + "is_external_report_enabled": { + "type": "boolean", + "description": "允许外部上报人向该协作空间上报故障。" + } + } + }, + "CreateEscalationRuleRequest": { + "type": "object", + "description": "创建分派策略所需的参数。", + "required": [ + "channel_id", + "template_id", + "rule_name", + "layers" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID。" + }, + "priority": { + "type": "integer", + "minimum": 0, + "maximum": 200, + "description": "匹配优先级,数值越小越优先。" + }, + "aggr_window": { + "type": "integer", + "minimum": 0, + "maximum": 3600, + "description": "聚合窗口,单位秒,0 表示不聚合。" + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "通知模板 ID(MongoDB ObjectID)。" + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "策略名称,1 到 39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "策略描述,最多 500 个字符。" + }, + "layers": { + "type": "array", + "description": "分派环节列表,至少包含一个环节。", + "items": { + "type": "object", + "required": [ + "target" + ], + "properties": { + "max_times": { + "type": "integer", + "minimum": 0, + "maximum": 6, + "description": "当前环节内的最大重复通知次数。" + }, + "notify_step": { + "type": "number", + "format": "float", + "minimum": 0.5, + "maximum": 120, + "description": "重复通知间隔,单位分钟。" + }, + "target": { + "type": "object", + "description": "通知目标。`person_ids`、`team_ids`、`schedule_to_role_ids`、`emails` 至少设置一项,且 `by` 与 `webhooks` 至少设置一项。", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "直接通知的成员 ID 列表。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "通知的团队 ID 列表。" + }, + "schedule_to_role_ids": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "description": "值班表 ID 到角色 ID 列表的映射,用于按值班角色通知。" + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "description": "邮箱地址列表(推送场景)。" + }, + "by": { + "type": "object", + "description": "按告警等级配置的个人通知渠道。未提供 `webhooks` 时必填。", + "properties": { + "follow_preference": { + "type": "boolean", + "description": "为 true 时跟随处理人员的个人偏好,忽略下方列表。" + }, + "critical": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Critical 级别使用的通知渠道(如 `voice`、`sms`、`email`、`feishu`)。" + }, + "warning": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Warning 级别使用的通知渠道。" + }, + "info": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Info 级别使用的通知渠道。" + } + } + }, + "webhooks": { + "type": "array", + "description": "群聊/Webhook 通知目标。未提供 `by` 时必填。", + "items": { + "type": "object", + "required": [ + "type", + "settings" + ], + "properties": { + "type": { + "type": "string", + "description": "Webhook 类型(如 `feishu`、`dingtalk_app`、`wecom_app`、`slack`、`teams`、`custom`)。" + }, + "settings": { + "type": "object", + "additionalProperties": true, + "description": "类型相关的配置参数(群聊 ID、URL 等)。" + } + } + } + } + } + }, + "escalate_window": { + "type": "integer", + "minimum": 0, + "maximum": 720, + "description": "升级到下一环节前的等待时长,单位分钟。" + }, + "force_escalate": { + "type": "boolean", + "description": "为 true 时,即便未认领也强制升级。" + } + } + } + }, + "time_filters": { + "type": "array", + "items": { + "type": "object", + "description": "周期性时间窗口。`start`/`end` 使用 24 小时制 `HH:MM` 格式;`repeat` 使用星期索引(0=周日 … 6=周六)。", + "properties": { + "start": { + "type": "string", + "description": "窗口起始时间,`HH:MM`。" + }, + "end": { + "type": "string", + "description": "窗口结束时间,`HH:MM`。" + }, + "repeat": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "生效的星期列表,留空表示每天。" + }, + "cal_id": { + "type": "string", + "description": "可选日历 ID,限制窗口仅在日历匹配的日期生效。" + }, + "is_off": { + "type": "boolean", + "description": "为 true 时匹配日历中的休息日。" + } + } + }, + "description": "可选的周期性生效时间窗口。" + }, + "filters": { + "type": "array", + "description": "或-与组合条件树。每个外层元素为一组 AND 条件,组内所有条件需同时满足。", + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "字段键(如 `alert_severity`、`labels.service`)。" + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "过滤运算符。" + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "匹配值列表。" + } + } + } + } + } + } + }, + "CreateInhibitRuleRequest": { + "type": "object", + "description": "创建抑制策略所需的参数。", + "required": [ + "channel_id", + "rule_name", + "equals" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID。" + }, + "priority": { + "type": "integer", + "description": "匹配优先级,数值越小越优先。" + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "策略名称,1 到 39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "策略描述,最多 500 个字符。" + }, + "equals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "用于匹配源告警与目标告警的 label 键列表。" + }, + "source_filters": { + "type": "array", + "description": "或-与组合条件树。每个外层元素为一组 AND 条件,组内所有条件需同时满足。", + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "字段键(如 `alert_severity`、`labels.service`)。" + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "过滤运算符。" + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "匹配值列表。" + } + } + } + } + }, + "target_filters": { + "type": "array", + "description": "或-与组合条件树。每个外层元素为一组 AND 条件,组内所有条件需同时满足。", + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "字段键(如 `alert_severity`、`labels.service`)。" + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "过滤运算符。" + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "匹配值列表。" + } + } + } + } + }, + "is_directly_discard": { + "type": "boolean", + "description": "为 true 时被抑制的目标告警将直接丢弃而非合并。" + } + } + }, + "CreateSilenceRuleRequest": { + "type": "object", + "description": "创建静默策略所需的参数。`time_filter` 与 `time_filters` 必须且只能设置其一,`filters` 不能为空。", + "required": [ + "channel_id", + "rule_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID。" + }, + "priority": { + "type": "integer", + "description": "匹配优先级,数值越小越优先。" + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "策略名称,1 到 39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "策略描述,最多 500 个字符。" + }, + "from_incident_id": { + "type": "string", + "description": "当静默策略从故障创建时对应的源故障 ID。" + }, + "time_filters": { + "type": "array", + "items": { + "type": "object", + "description": "周期性时间窗口。`start`/`end` 使用 24 小时制 `HH:MM` 格式;`repeat` 使用星期索引(0=周日 … 6=周六)。", + "properties": { + "start": { + "type": "string", + "description": "窗口起始时间,`HH:MM`。" + }, + "end": { + "type": "string", + "description": "窗口结束时间,`HH:MM`。" + }, + "repeat": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "生效的星期列表,留空表示每天。" + }, + "cal_id": { + "type": "string", + "description": "可选日历 ID,限制窗口仅在日历匹配的日期生效。" + }, + "is_off": { + "type": "boolean", + "description": "为 true 时匹配日历中的休息日。" + } + } + }, + "description": "生效的周期性时间窗口列表,与 `time_filter` 互斥。" + }, + "time_filter": { + "type": "object", + "description": "一次性时间窗口,使用 Unix 秒定义。", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "窗口起始时间戳(Unix 秒),需小于 `end_time`。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "窗口结束时间戳(Unix 秒)。" + } + } + }, + "filters": { + "type": "array", + "description": "或-与组合条件树。每个外层元素为一组 AND 条件,组内所有条件需同时满足。", + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "字段键(如 `alert_severity`、`labels.service`)。" + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "过滤运算符。" + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "匹配值列表。" + } + } + } + } + }, + "is_directly_discard": { + "type": "boolean", + "description": "为 true 时被静默的告警将直接丢弃而非并入故障。" + } + } + }, + "CreateDropRuleRequest": { + "type": "object", + "description": "创建排除规则所需的参数。", + "required": [ + "channel_id", + "rule_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID。" + }, + "priority": { + "type": "integer", + "description": "匹配优先级,数值越小越优先。" + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "规则名称,1 到 39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "规则描述,最多 500 个字符。" + }, + "filters": { + "type": "array", + "description": "或-与组合条件树。每个外层元素为一组 AND 条件,组内所有条件需同时满足。", + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "字段键(如 `alert_severity`、`labels.service`)。" + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "过滤运算符。" + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "匹配值列表。" + } + } + } + } + } + } + }, + "TimeFilter": { + "type": "object", + "description": "周期性时间窗口。`start`/`end` 采用 24 小时制 `HH:MM`;`repeat` 采用 ISO 风格的星期索引(0=周日 … 6=周六)。", + "properties": { + "start": { + "type": "string", + "description": "窗口开始时间(`HH:MM`)。" + }, + "end": { + "type": "string", + "description": "窗口结束时间(`HH:MM`)。" + }, + "repeat": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "窗口每周生效的日期,空表示每天。" + }, + "cal_id": { + "type": "string", + "description": "可选日历 ID,将窗口限制为日历中的匹配日期。" + }, + "is_off": { + "type": "boolean", + "description": "为 true 时匹配日历中标记为休息日的日期。" + } + } + }, + "OnceTimeFilter": { + "type": "object", + "description": "以 Unix 秒定义的一次性时间窗口。", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "窗口起始时间(Unix 秒),必须大于 0 且小于 `end_time`。", + "exclusiveMinimum": 0 + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "窗口结束时间(Unix 秒),必须大于 0。", + "exclusiveMinimum": 0 + } + } + }, + "FilterGroup": { + "$ref": "#/components/schemas/OrFilterGroup" + }, + "EscalateTarget": { + "type": "object", + "description": "通知目标。`person_ids`、`team_ids`、`schedule_to_role_ids`、`emails` 至少设置一项,且 `by` 与 `webhooks` 至少设置一项。", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "直接通知的成员 ID 列表。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "通知的团队 ID 列表。" + }, + "schedule_to_role_ids": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "description": "值班表 ID 到角色 ID 列表的映射,用于按值班角色通知。" + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "description": "邮箱地址列表(推送场景)。" + }, + "by": { + "type": "object", + "description": "按告警等级配置的个人通知渠道。未提供 `webhooks` 时必填。", + "properties": { + "follow_preference": { + "type": "boolean", + "description": "为 true 时跟随处理人员的个人偏好,忽略下方列表。" + }, + "critical": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Critical 级别使用的通知渠道(如 `voice`、`sms`、`email`、`feishu`)。" + }, + "warning": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Warning 级别使用的通知渠道。" + }, + "info": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Info 级别使用的通知渠道。" + } + } + }, + "webhooks": { + "type": "array", + "description": "群聊/Webhook 通知目标。未提供 `by` 时必填。", + "items": { + "type": "object", + "required": [ + "type", + "settings" + ], + "properties": { + "type": { + "type": "string", + "description": "Webhook 类型(如 `feishu`、`dingtalk_app`、`wecom_app`、`slack`、`teams`、`custom`)。" + }, + "settings": { + "type": "object", + "additionalProperties": true, + "description": "类型相关的配置参数(群聊 ID、URL 等)。" + } + } + } + } + } + }, + "EscalateLayer": { + "type": "object", + "required": [ + "target" + ], + "properties": { + "max_times": { + "type": "integer", + "minimum": 0, + "maximum": 6, + "description": "当前环节内的最大重复通知次数。" + }, + "notify_step": { + "type": "number", + "format": "float", + "minimum": 0.5, + "maximum": 120, + "description": "重复通知间隔,单位分钟。" + }, + "target": { + "$ref": "#/components/schemas/EscalateTarget" + }, + "escalate_window": { + "type": "integer", + "minimum": 0, + "maximum": 720, + "description": "进入下一环节前的等待时间,单位分钟。" + }, + "force_escalate": { + "type": "boolean", + "description": "为 true 时无论是否认领都强制升级。" + } + } + }, + "Group": { + "type": "object", + "description": "告警聚合配置。", + "required": [ + "method" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "i", + "p", + "n" + ], + "description": "聚合方式:`i` 智能、`p` 规则、`n` 不聚合。" + }, + "equals": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "maxItems": 5, + "description": "用于聚合判定的 label 键分组。" + }, + "cases": { + "type": "array", + "maxItems": 100, + "description": "按过滤条件的聚合策略覆盖。", + "items": { + "type": "object" + } + }, + "all_equals_required": { + "type": "boolean", + "description": "为 true 时要求所有键同时存在才能参与聚合。" + }, + "time_window": { + "type": "integer", + "minimum": 0, + "description": "聚合时间窗口,单位分钟。默认最大值为 1440 分钟(24 小时);开启扩展功能的账号最大可设置 43200 分钟(30 天)。" + }, + "window_type": { + "type": "string", + "enum": [ + "tumbling", + "sliding" + ], + "description": "窗口类型,默认 `tumbling`。" + }, + "storm_threshold": { + "type": "integer", + "minimum": 0, + "maximum": 10000, + "description": "告警风暴阈值。" + }, + "storm_thresholds": { + "type": "array", + "items": { + "type": "integer" + }, + "maxItems": 5, + "description": "多级告警风暴阈值。" + }, + "i_keys": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 10, + "description": "用于智能聚合向量化的 label 键。" + }, + "i_score_threshold": { + "type": "number", + "format": "float", + "minimum": 0.5, + "maximum": 1, + "description": "智能聚合相似度阈值。" + } + } + }, + "Flapping": { + "type": "object", + "description": "抖动检测配置。", + "properties": { + "is_disabled": { + "type": "boolean", + "description": "禁用抖动检测。" + }, + "max_changes": { + "type": "integer", + "minimum": 2, + "maximum": 100, + "description": "`in_mins` 内允许的最大状态变更次数。" + }, + "in_mins": { + "type": "integer", + "minimum": 1, + "maximum": 1440, + "description": "观察窗口,单位分钟。" + }, + "mute_mins": { + "type": "integer", + "minimum": 0, + "maximum": 1440, + "description": "检测到抖动后的静音时长,单位分钟。" + } + } + }, + "IncProgressCnts": { + "type": "object", + "required": [ + "Triggered", + "Processing" + ], + "properties": { + "Triggered": { + "type": "integer", + "format": "int64", + "description": "近 30 天触发中的故障数量。" + }, + "Processing": { + "type": "integer", + "format": "int64", + "description": "近 30 天处理中的故障数量。" + } + } + }, + "ChannelItem": { + "type": "object", + "description": "协作空间详情记录,所有字段可选,仅在有值时返回。", + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "协作空间 ID。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID。" + }, + "managing_team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "可管理该协作空间的其他团队 ID 列表。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "创建者成员 ID。" + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "所属账户 ID。" + }, + "channel_name": { + "type": "string", + "description": "协作空间名称。" + }, + "description": { + "type": "string", + "description": "描述信息。" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled", + "deleted" + ], + "description": "协作空间状态。" + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "删除时间(Unix 秒),仅软删除的协作空间非零。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间(Unix 秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最近更新时间(Unix 秒)。" + }, + "auto_resolve_timeout": { + "type": "integer", + "format": "int64", + "description": "自动恢复超时,单位秒。0 表示不自动恢复。" + }, + "auto_resolve_mode": { + "type": "string", + "enum": [ + "trigger", + "update" + ], + "description": "自动恢复计时重置方式。" + }, + "is_private": { + "type": "boolean", + "description": "为 true 时仅管理团队可见。" + }, + "disable_outlier_detection": { + "type": "boolean", + "description": "为 true 时禁用新奇故障检测。" + }, + "disable_auto_close": { + "type": "boolean", + "description": "为 true 时禁用故障自动关闭。" + }, + "group": { + "$ref": "#/components/schemas/Group" + }, + "flapping": { + "$ref": "#/components/schemas/Flapping" + }, + "progress_to_incident_cnts": { + "$ref": "#/components/schemas/IncProgressCnts" + }, + "is_starred": { + "type": "boolean", + "description": "当前用户是否已收藏该协作空间。" + }, + "active_incident_highest_severity": { + "type": "string", + "description": "协作空间内活跃故障的最高严重程度。" + }, + "last_incident_at": { + "type": "integer", + "format": "int64", + "description": "最近一次故障时间(Unix 秒)。" + }, + "is_external_report_enabled": { + "type": "boolean", + "description": "是否允许外部上报人向该协作空间上报故障。" + }, + "external_report_token": { + "type": "string", + "description": "启用外部上报时授予外部上报人的 token。" + } + } + }, + "ChannelShort": { + "type": "object", + "required": [ + "channel_id", + "channel_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "协作空间 ID。" + }, + "channel_name": { + "type": "string", + "description": "协作空间名称。" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "协作空间状态。" + } + } + }, + "EscalateRuleItem": { + "type": "object", + "required": [ + "account_id", + "channel_id", + "priority", + "aggr_window", + "rule_name", + "description", + "layers", + "time_filters", + "filters", + "status", + "template_id", + "rule_id", + "updated_by", + "created_at", + "updated_at" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "所属账户 ID。" + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID。" + }, + "priority": { + "type": "integer", + "description": "匹配优先级,数值越小越优先。" + }, + "aggr_window": { + "type": "integer", + "description": "聚合窗口,单位秒。" + }, + "rule_name": { + "type": "string", + "description": "策略名称。" + }, + "description": { + "type": "string", + "description": "策略描述。" + }, + "layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EscalateLayer" + }, + "description": "分派环节列表。" + }, + "time_filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimeFilter" + }, + "description": "策略生效的周期性时间窗口。" + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "策略状态。" + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "通知模板 ID(MongoDB ObjectID)。" + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "分派策略 ID(MongoDB ObjectID)。" + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "最近更新该策略的成员 ID。" + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "删除时间(Unix 秒),仅软删除时返回。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间(Unix 秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最近更新时间(Unix 秒)。" + }, + "channel_name": { + "type": "string", + "description": "协作空间名称,跨空间列表响应会填充该字段。" + } + } + }, + "SilenceRuleItem": { + "type": "object", + "required": [ + "account_id", + "channel_id", + "priority", + "rule_name", + "description", + "time_filters", + "time_filter", + "filters", + "is_directly_discard", + "status", + "rule_id", + "updated_by", + "created_at", + "updated_at", + "is_effective" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64" + }, + "channel_id": { + "type": "integer", + "format": "int64" + }, + "priority": { + "type": "integer", + "description": "匹配优先级,数值越小越优先。" + }, + "rule_name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "from_incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "从故障创建静默时的源故障 ID。" + }, + "time_filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimeFilter" + }, + "description": "周期性时间窗口。" + }, + "time_filter": { + "$ref": "#/components/schemas/OnceTimeFilter" + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "is_directly_discard": { + "type": "boolean", + "description": "为 true 时静默的告警直接丢弃,不会生成故障。" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ] + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "updated_by": { + "type": "integer", + "format": "int64" + }, + "deleted_at": { + "type": "integer", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "is_effective": { + "type": "boolean", + "description": "当前是否正在生效。" + } + } + }, + "InhibitRuleItem": { + "type": "object", + "required": [ + "account_id", + "channel_id", + "priority", + "rule_name", + "description", + "source_filters", + "target_filters", + "equals", + "is_directly_discard", + "status", + "rule_id", + "updated_by", + "created_at", + "updated_at" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64" + }, + "channel_id": { + "type": "integer", + "format": "int64" + }, + "priority": { + "type": "integer" + }, + "rule_name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "source_filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "target_filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "equals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "用于配对源告警与目标告警的 label 键列表。" + }, + "is_directly_discard": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ] + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "updated_by": { + "type": "integer", + "format": "int64" + }, + "deleted_at": { + "type": "integer", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + } + } + }, + "UnsubscribeRuleItem": { + "type": "object", + "description": "排除规则记录。", + "required": [ + "account_id", + "channel_id", + "priority", + "rule_name", + "description", + "filters", + "status", + "rule_id", + "updated_by", + "created_at", + "updated_at" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64" + }, + "channel_id": { + "type": "integer", + "format": "int64" + }, + "priority": { + "type": "integer" + }, + "rule_name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ] + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "updated_by": { + "type": "integer", + "format": "int64" + }, + "deleted_at": { + "type": "integer", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + } + } + }, + "ChannelInfoRequest": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "要查询的协作空间 ID。" + } + } + }, + "ListChannelsRequest": { + "type": "object", + "properties": { + "p": { + "type": "integer", + "minimum": 1, + "description": "页码,从 1 开始。" + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 100, + "description": "每页大小,未传时默认为 100。" + }, + "orderby": { + "type": "string", + "enum": [ + "ranking", + "created_at", + "updated_at", + "channel_name", + "last_incident_at" + ], + "description": "排序字段。" + }, + "asc": { + "type": "boolean", + "description": "为 true 时升序排序。" + }, + "is_my_managed": { + "type": "boolean", + "description": "为 true 时仅返回当前用户可管理的协作空间。" + }, + "is_my_starred": { + "type": "boolean", + "description": "为 true 时仅返回当前用户收藏的协作空间,与 `is_my_team` 互斥。" + }, + "is_brief": { + "type": "boolean", + "description": "为 true 时仅返回简要字段(`channel_id`、`channel_name`、`description`、`status`)。" + }, + "is_my_team": { + "type": "boolean", + "description": "为 true 时仅返回当前用户所在团队持有的协作空间,与 `is_my_starred` 互斥。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按团队 ID 过滤。" + }, + "query": { + "type": "string", + "description": "按名称/描述的全文查询串。" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按指定协作空间 ID 过滤。" + }, + "channel_name": { + "type": "string", + "description": "协作空间名称精确匹配,优先级高于 `query` 的名称过滤。" + } + } + }, + "ChannelInfosRequest": { + "type": "object", + "required": [ + "channel_ids" + ], + "properties": { + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "maxItems": 1000, + "description": "要查询的协作空间 ID 列表,最多 1000 个。" + } + } + }, + "UpdateChannelRequest": { + "type": "object", + "required": [ + "channel_id" + ], + "description": "更新协作空间所需参数,仅传入的字段会被更新。", + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "要更新的协作空间 ID。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "新的所属团队 ID。" + }, + "managing_team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "maxItems": 3, + "description": "可管理该协作空间的其他团队 ID,最多 3 个。" + }, + "channel_name": { + "type": "string", + "minLength": 1, + "maxLength": 59, + "description": "新的协作空间名称,1 到 59 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "新的描述信息,最多 500 个字符。" + }, + "auto_resolve_timeout": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 2592000, + "description": "自动恢复超时,单位秒。0 表示不自动恢复,最长 30 天。" + }, + "auto_resolve_mode": { + "type": "string", + "enum": [ + "trigger", + "update" + ], + "description": "自动恢复计时重置方式。" + }, + "is_private": { + "type": "boolean", + "description": "为 true 时仅管理团队可见。" + }, + "group": { + "$ref": "#/components/schemas/Group" + }, + "flapping": { + "$ref": "#/components/schemas/Flapping" + }, + "disable_outlier_detection": { + "type": "boolean", + "description": "禁用新奇故障检测。" + }, + "disable_auto_close": { + "type": "boolean", + "description": "禁用故障自动关闭。" + }, + "is_external_report_enabled": { + "type": "boolean", + "description": "允许外部上报人向该协作空间上报故障。" + } + } + }, + "UpdateChannelResponse": { + "type": "object", + "description": "更新协作空间的响应。仅在请求中将 `is_external_report_enabled` 设为 `true` 时返回有效字段,否则所有字段为空。", + "properties": { + "external_report_token": { + "type": "string", + "description": "新生成的外部上报令牌。仅在请求中将 `is_external_report_enabled` 设为 `true` 时返回。调用方应保存此值,之后无法再次获取。" + } + } + }, + "ChannelIDRequest": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "协作空间 ID。" + } + } + }, + "ChannelScopedListRequest": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "要列出规则的协作空间 ID。" + } + } + }, + "UpdateSilenceRuleRequest": { + "type": "object", + "description": "更新静默策略所需参数。`time_filter` 与 `time_filters` 必须且只能传一个,`filters` 不能为空。", + "required": [ + "channel_id", + "rule_id", + "rule_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID。" + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "静默策略 ID(MongoDB ObjectID)。" + }, + "priority": { + "type": "integer", + "description": "匹配优先级,数值越小越优先。" + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "策略名称,1 到 39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "策略描述,最多 500 个字符。" + }, + "time_filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimeFilter" + }, + "description": "周期性时间窗口,与 `time_filter` 互斥。" + }, + "time_filter": { + "$ref": "#/components/schemas/OnceTimeFilter" + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "is_directly_discard": { + "type": "boolean", + "description": "为 true 时静默的告警直接丢弃,而非抑制为故障。" + } + } + }, + "ChannelRuleIDRequest": { + "type": "object", + "required": [ + "channel_id", + "rule_id" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID。" + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "规则 ID(MongoDB ObjectID)。" + } + } + }, + "UpdateInhibitRuleRequest": { + "type": "object", + "description": "更新抑制策略所需参数。", + "required": [ + "channel_id", + "rule_id", + "rule_name", + "equals" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID。" + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "抑制策略 ID(MongoDB ObjectID)。" + }, + "priority": { + "type": "integer", + "description": "匹配优先级,数值越小越优先。" + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "策略名称,1 到 39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "策略描述,最多 500 个字符。" + }, + "equals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "用于配对源告警与目标告警的 label 键列表。" + }, + "source_filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "target_filters": { + "$ref": "#/components/schemas/FilterGroup" + }, + "is_directly_discard": { + "type": "boolean", + "description": "为 true 时被抑制的目标告警直接丢弃,而非合并。" + } + } + }, + "UpdateDropRuleRequest": { + "type": "object", + "description": "更新排除规则所需参数。", + "required": [ + "channel_id", + "rule_id", + "rule_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID。" + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "排除规则 ID(MongoDB ObjectID)。" + }, + "priority": { + "type": "integer", + "description": "匹配优先级,数值越小越优先。" + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "规则名称,1 到 39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "规则描述,最多 500 个字符。" + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + } + } + }, + "UpdateEscalationRuleRequest": { + "type": "object", + "description": "更新分派策略所需参数。", + "required": [ + "channel_id", + "rule_id", + "template_id", + "rule_name", + "layers" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "所属协作空间 ID。" + }, + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "分派策略 ID(MongoDB ObjectID)。" + }, + "priority": { + "type": "integer", + "description": "匹配优先级,数值越小越优先。" + }, + "aggr_window": { + "type": "integer", + "description": "聚合窗口,单位秒,0 表示不聚合。" + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "通知模板 ID(MongoDB ObjectID)。" + }, + "rule_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "策略名称,1 到 39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "策略描述,最多 500 个字符。" + }, + "layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EscalateLayer" + }, + "description": "分派环节列表,至少包含一个环节。" + }, + "time_filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimeFilter" + }, + "description": "可选的周期性生效时间窗口。" + }, + "filters": { + "$ref": "#/components/schemas/FilterGroup" + } + } + }, + "ListChannelsResponse": { + "type": "object", + "required": [ + "items", + "total", + "has_next_page" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelItem" + } + }, + "total": { + "type": "integer", + "format": "int64", + "description": "匹配到的协作空间总数。" + }, + "has_next_page": { + "type": "boolean", + "description": "是否还有下一页。" + } + } + }, + "ChannelInfosResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelShort" + } + } + } + }, + "ListSilenceRulesResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SilenceRuleItem" + } + } + } + }, + "ListInhibitRulesResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InhibitRuleItem" + } + } + } + }, + "ListDropRulesResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UnsubscribeRuleItem" + } + } + } + }, + "ListEscalationRulesResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EscalateRuleItem" + } + } + } + }, + "ChannelCreateResponse": { + "type": "object", + "required": [ + "channel_id", + "channel_name" + ], + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "description": "新建协作空间的 ID。" + }, + "channel_name": { + "type": "string", + "description": "请求中回显的协作空间名称。" + }, + "external_report_token": { + "type": "string", + "description": "外部上报 token,仅在启用外部上报时返回。" + } + } + }, + "RuleCreateResponse": { + "type": "object", + "required": [ + "rule_id", + "rule_name" + ], + "properties": { + "rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "新建规则的 ID(MongoDB ObjectID)。" + }, + "rule_name": { + "type": "string", + "description": "请求中回显的规则名称。" + } + } + }, + "RouteMatchCondition": { + "type": "object", + "description": "单个匹配条件。同一 case 内的所有条件之间为 AND 关系。", + "required": [ + "key", + "oper", + "vals" + ], + "properties": { + "key": { + "type": "string", + "description": "用于与告警事件比对的字段键(如 `alert_severity`、`labels.service`)。" + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "匹配运算符。`IN` 表示字段值命中 `vals` 中任一项;`NOTIN` 表示均不命中。" + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "用于比对的值列表。每项支持字面量、通配符(`*`、`?`)、以斜杠包裹的正则表达式(`/pattern/`)、CIDR(`cidr:10.0.0.0/8`)以及数值比较(`num:lt:100`)。" + } + } + }, + "RouteCase": { + "type": "object", + "description": "路由规则中的单个 case 分支。当其全部条件命中后,告警将分发到所配置的协作空间。", + "required": [ + "if", + "channel_ids", + "fallthrough" + ], + "properties": { + "if": { + "type": "array", + "description": "匹配条件列表,条件之间为 AND 关系。", + "items": { + "$ref": "#/components/schemas/RouteMatchCondition" + } + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "目标协作空间 ID。当 `routing_mode` 为 `standard`(或为空)时必填。" + }, + "fallthrough": { + "type": "boolean", + "description": "为 `true` 时,本 case 命中后继续向下匹配;为 `false` 则在首次命中后停止。" + }, + "routing_mode": { + "type": "string", + "enum": [ + "standard", + "name_mapping" + ], + "description": "路由模式。`standard`(默认,留空时亦按此处理)按固定的协作空间 ID 路由;`name_mapping` 通过读取告警事件中某个标签的值来动态匹配协作空间名称。" + }, + "name_mapping_label": { + "type": "string", + "description": "用作目标协作空间名的标签键。当 `routing_mode` 为 `name_mapping` 时必填。" + } + } + }, + "RouteSection": { + "type": "object", + "description": "用于将连续的多个 case 在视觉上分组的逻辑分区。", + "required": [ + "name", + "position" + ], + "properties": { + "name": { + "type": "string", + "description": "分区名称,在同一规则内必须唯一。" + }, + "position": { + "type": "integer", + "description": "分区在 `cases` 中的起始下标,取值范围为 0 到 `cases` 长度。" + } + } + }, + "RouteDefault": { + "type": "object", + "description": "默认分支。当所有 case 均未命中(或命中的 case 没有有效协作空间)时使用。", + "properties": { + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "兜底使用的协作空间 ID 列表。" + } + } + }, + "RouteItem": { + "type": "object", + "description": "集成的路由规则。告警按 `cases` 顺序依次匹配,未命中的将进入 `default` 分支。当集成未配置规则时返回 `null`。", + "required": [ + "version", + "updated_by", + "creator_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "所属集成 ID。" + }, + "cases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteCase" + }, + "description": "有序的 case 分支列表。" + }, + "sections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteSection" + }, + "description": "可选的分区,用于将多个 case 进行视觉分组。" + }, + "default": { + "$ref": "#/components/schemas/RouteDefault" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "deleted" + ], + "description": "规则状态。" + }, + "version": { + "type": "integer", + "format": "int64", + "description": "单调递增的版本号,每次更新加 1,可用于乐观并发控制。" + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "最后一次修改人员 ID。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "创建人员 ID。" + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "软删除时间戳(Unix 秒)。规则有效时不返回此字段。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 秒级时间戳。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 秒级时间戳。" + } + } + }, + "RouteInfoRequest": { + "type": "object", + "description": "查询单个集成路由规则所需的参数。", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "集成 ID,必须大于 0。" + } + } + }, + "ListRoutesRequest": { + "type": "object", + "description": "批量查询多个集成路由规则所需的参数。", + "required": [ + "integration_ids" + ], + "properties": { + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "需要查询路由规则的集成 ID 列表。" + } + } + }, + "ListRoutesResponse": { + "type": "object", + "description": "路由规则列表的响应包装。", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteItem" + }, + "description": "已请求集成的路由规则列表。未配置规则的集成不会出现在结果中。" + } + } + }, + "UpsertRouteRequest": { + "type": "object", + "description": "创建或更新集成路由规则的参数。当指定集成尚无规则时执行创建,否则覆盖原有规则。`cases` 与 `default` 至少需要提供其一。", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "所属集成 ID。" + }, + "cases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteCase" + }, + "description": "有序的 case 分支列表,自上而下依次匹配。" + }, + "sections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteSection" + }, + "description": "可选的分区,用于将连续的 case 进行视觉分组。" + }, + "default": { + "$ref": "#/components/schemas/RouteDefault" + }, + "version": { + "type": "integer", + "format": "int64", + "description": "用于乐观并发控制的当前版本号,传入最近一次读取时返回的值。" + } + } + }, + "AlertListRequest": { + "type": "object", + "description": "告警列表查询的过滤和分页条件,时间范围必填。", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "检索窗口开始时间,Unix 时间戳(秒)。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "检索窗口结束时间,Unix 时间戳(秒)。最大跨度 31 天。" + }, + "p": { + "type": "integer", + "format": "int64", + "description": "页码,从 1 开始。未提供 `search_after_ctx` 时使用。" + }, + "limit": { + "type": "integer", + "format": "int64", + "description": "每页条数,最大 100,默认 20。" + }, + "search_after_ctx": { + "type": "string", + "description": "上次响应返回的不透明游标,用于获取下一页。" + }, + "is_active": { + "type": "boolean", + "description": "过滤活跃(true)或已恢复(false)状态告警。" + }, + "ever_muted": { + "type": "boolean", + "description": "按告警是否曾被静默过滤。" + }, + "alert_severity": { + "type": "string", + "description": "逗号分隔的严重程度过滤,如 `Critical,Warning`。可选值:`Critical`、`Warning`、`Info`、`Ok`。" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按协作空间 ID 过滤。" + }, + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按集成 ID 过滤。" + }, + "alert_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按告警 ID(ObjectID 十六进制字符串)过滤。" + }, + "alert_keys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按告警去重键过滤。" + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "排序字段。" + }, + "asc": { + "type": "boolean", + "description": "为 true 时升序排序,默认降序。" + }, + "by_updated_at": { + "type": "boolean", + "description": "为 true 时,时间范围过滤作用于 `updated_at` 而非 `start_time`。" + } + } + }, + "AlertItem": { + "type": "object", + "description": "包含完整详情的单条告警。", + "properties": { + "alert_id": { + "type": "string", + "description": "告警唯一 ID(ObjectID 十六进制字符串)。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "产生该告警的集成 ID。" + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "已废弃,请使用 `integration_id`。 Deprecated: use `integration_id` instead.", + "deprecated": true + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "告警所属协作空间 ID。" + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "账户 ID。" + }, + "title": { + "type": "string", + "description": "告警标题。" + }, + "title_rule": { + "type": "string", + "description": "用于从事件标签派生 `title` 的标题模板(如 `$service::$cluster`)。" + }, + "description": { + "type": "string", + "description": "告警描述。" + }, + "alert_severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "当前严重程度。" + }, + "alert_status": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ], + "description": "当前状态。" + }, + "alert_key": { + "type": "string", + "description": "去重键。" + }, + "start_time": { + "type": "integer", + "format": "int64", + "description": "首次触发时间,Unix 时间戳(秒)。" + }, + "last_time": { + "type": "integer", + "format": "int64", + "description": "最后事件时间,Unix 时间戳(秒)。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "恢复时间,Unix 时间戳(秒)。活跃时为 0。" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "标签键值对。" + }, + "ever_muted": { + "type": "boolean", + "description": "是否曾被静默。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 时间戳(秒)。" + }, + "integration_name": { + "type": "string", + "description": "集成显示名称。" + }, + "integration_type": { + "type": "string", + "description": "集成类型/插件键。" + }, + "integration_ref_id": { + "type": "string", + "description": "集成外部参考 ID。" + }, + "channel_name": { + "type": "string", + "description": "协作空间显示名称。" + }, + "channel_status": { + "type": "string", + "description": "协作空间状态(如 `enabled`、`disabled`)。" + }, + "responder_name": { + "type": "string", + "description": "当前处理人姓名(来自关联故障)。" + }, + "responder_email": { + "type": "string", + "description": "当前处理人邮箱(来自关联故障)。" + }, + "event_cnt": { + "type": "integer", + "format": "int64", + "description": "该告警收到的原始事件总数。" + }, + "incident": { + "$ref": "#/components/schemas/IncidentShort", + "description": "关联故障(如有)。" + }, + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertEventItem" + }, + "description": "附加到该告警的最近原始事件,仅部分接口返回。" + }, + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertImage" + }, + "description": "告警附加的图片。" + }, + "data_source_name": { + "type": "string", + "description": "已废弃,请使用 `integration_name`。" + }, + "data_source_type": { + "type": "string", + "description": "已废弃,请使用 `integration_type`。" + }, + "data_source_ref_id": { + "type": "string", + "description": "已废弃,请使用 `integration_ref_id`。" + } + } + }, + "AlertImage": { + "type": "object", + "description": "告警或事件的图片附件。", + "required": [ + "src" + ], + "properties": { + "href": { + "type": "string", + "description": "点击图片时的跳转链接(可选)。" + }, + "src": { + "type": "string", + "description": "图片源地址或内部引用(以 `img_` 或 `http` 开头)。" + }, + "alt": { + "type": "string", + "description": "替代文本。" + } + } + }, + "AlertListResponse": { + "type": "object", + "description": "分页的告警列表。", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "符合条件的告警总数。" + }, + "has_next_page": { + "type": "boolean", + "description": "是否有更多页。" + }, + "search_after_ctx": { + "type": "string", + "description": "下一页的游标。" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertItem" + } + } + } + }, + "AlertInfoRequest": { + "type": "object", + "required": [ + "alert_id" + ], + "properties": { + "alert_id": { + "type": "string", + "description": "告警 ID(ObjectID 十六进制字符串)。" + } + } + }, + "AlertListByIDsRequest": { + "type": "object", + "required": [ + "alert_ids" + ], + "properties": { + "alert_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "告警 ID 列表(十六进制字符串)。" + } + } + }, + "AlertEventListRequest": { + "type": "object", + "required": [ + "alert_id" + ], + "properties": { + "alert_id": { + "type": "string", + "description": "告警 ID(ObjectID 十六进制字符串)。" + } + } + }, + "AlertEventListResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertEventItem" + } + } + } + }, + "AlertFeedRequest": { + "type": "object", + "required": [ + "alert_id" + ], + "properties": { + "alert_id": { + "type": "string", + "description": "告警 ID。" + }, + "p": { + "type": "integer", + "format": "int64", + "description": "页码,从 1 开始。", + "default": 1 + }, + "limit": { + "type": "integer", + "format": "int64", + "description": "每页条数,最大 100,默认 20。" + }, + "asc": { + "type": "boolean", + "description": "升序排序。" + }, + "types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按动态类型过滤。" + } + } + }, + "AlertFeedType": { + "type": "string", + "description": "告警动态记录类型。每个值标识一个告警生命周期事件;`detail` 的具体结构由该字段决定。\n\n| 类型 | 含义 |\n|---|---|\n| `a_new` | 告警触发。 |\n| `a_comm` | 在告警上添加了评论。 |\n| `a_close` | 告警关闭。 |", + "enum": [ + "a_new", + "a_comm", + "a_close" + ] + }, + "FeedDetailAlertTrigger": { + "type": "object", + "description": "`a_new` 的详情数据。", + "properties": { + "severity": { + "$ref": "#/components/schemas/FeedSeverity" + }, + "status": { + "$ref": "#/components/schemas/FeedSeverity" + } + }, + "title": "a_new" + }, + "FeedDetailAlertComment": { + "type": "object", + "description": "`a_comm` 的详情数据。", + "properties": { + "comment": { + "type": "string", + "description": "评论内容。" + } + }, + "title": "a_comm" + }, + "FeedDetailAlertClose": { + "type": "object", + "description": "`a_close` 的详情数据,无字段。", + "properties": {}, + "additionalProperties": false, + "title": "a_close" + }, + "FeedItem": { + "type": "object", + "description": "单条告警动态记录。`detail` 字段依 `type` 判别;具体结构参见各 `FeedDetailAlert*` schema。", + "required": [ + "ref_id", + "type", + "detail", + "account_id", + "creator_id", + "created_at", + "updated_at" + ], + "properties": { + "ref_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "本条记录引用的告警 ObjectID。" + }, + "type": { + "$ref": "#/components/schemas/AlertFeedType" + }, + "detail": { + "description": "类型特定的详情数据,结构依 `type` 而定。", + "oneOf": [ + { + "$ref": "#/components/schemas/FeedDetailAlertTrigger" + }, + { + "$ref": "#/components/schemas/FeedDetailAlertComment" + }, + { + "$ref": "#/components/schemas/FeedDetailAlertClose" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "a_new": "#/components/schemas/FeedDetailAlertTrigger", + "a_comm": "#/components/schemas/FeedDetailAlertComment", + "a_close": "#/components/schemas/FeedDetailAlertClose" + } + } + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "账户 ID。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "创建者成员 ID。系统生成的记录为 0。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 毫秒时间戳。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 毫秒时间戳。" + } + } + }, + "AlertFeedResponse": { + "type": "object", + "properties": { + "has_next_page": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeedItem" + } + } + } + }, + "AlertMergeRequest": { + "type": "object", + "required": [ + "alert_ids", + "incident_id" + ], + "properties": { + "alert_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "要合并的告警 ID 列表。" + }, + "incident_id": { + "type": "string", + "description": "目标故障 ID。" + }, + "comment": { + "type": "string", + "description": "合并操作的可选评论。" + }, + "title": { + "type": "string", + "description": "目标故障的可选新标题。" + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "目标故障的可选新负责人。" + } + } + }, + "AlertPipelineInfoRequest": { + "type": "object", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "集成 ID。" + } + } + }, + "AlertPipeline": { + "type": "object", + "description": "单条告警处理规则。", + "properties": { + "kind": { + "type": "string", + "enum": [ + "title_reset", + "description_reset", + "severity_reset", + "alert_drop", + "alert_inhibit" + ], + "description": "规则类型。" + }, + "if": { + "$ref": "#/components/schemas/OrFilterGroup", + "description": "可选的过滤条件,省略时对所有告警生效。" + }, + "settings": { + "type": "object", + "description": "与 `kind` 对应的配置。取值结构因 `kind` 而异:\n- `title_reset`:`{ \"title\": \"<模板字符串>\" }`\n- `description_reset`:`{ \"description\": \"<模板字符串>\" }`\n- `severity_reset`:`{ \"severity\": \"Critical\"|\"Warning\"|\"Info\" }`\n- `alert_drop`:`{}` (空对象)\n- `alert_inhibit`:`{ \"equals\": [\"<标签键>\", ...], \"source_filters\": }`", + "oneOf": [ + { + "$ref": "#/components/schemas/ApTitleReset" + }, + { + "$ref": "#/components/schemas/ApDescriptionReset" + }, + { + "$ref": "#/components/schemas/ApSeverityReset" + }, + { + "$ref": "#/components/schemas/ApAlertDrop" + }, + { + "$ref": "#/components/schemas/ApAlertInhibit" + } + ] + } + } + }, + "AlertPipelineItem": { + "type": "object", + "description": "集成的告警处理规则配置。", + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "该处理规则所属的集成 ID。" + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertPipeline" + }, + "description": "有序的处理规则列表。" + }, + "status": { + "type": "string", + "description": "规则状态(如 `active`)。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "创建规则的成员 ID。" + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "最后更新规则的成员 ID。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 时间戳(秒)。" + } + } + }, + "AlertPipelineListRequest": { + "type": "object", + "required": [ + "integration_ids" + ], + "properties": { + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "集成 ID 列表。" + } + } + }, + "AlertPipelineListResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertPipelineItem" + } + } + } + }, + "AlertPipelineUpsertRequest": { + "type": "object", + "required": [ + "integration_id", + "rules" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "要配置的集成 ID。" + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertPipeline" + }, + "description": "处理规则列表,最多 50 条。", + "maxItems": 50 + } + } + }, + "AlertEventGlobalListRequest": { + "type": "object", + "description": "全局原始事件列表的过滤和分页条件。", + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "检索窗口开始时间,Unix 时间戳(秒)。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "检索窗口结束时间,Unix 时间戳(秒)。" + }, + "p": { + "type": "integer", + "format": "int64", + "description": "页码,从 1 开始。未提供 `search_after_ctx` 时使用。" + }, + "limit": { + "type": "integer", + "format": "int64", + "description": "每页条数,最大 100,默认 20。" + }, + "search_after_ctx": { + "type": "string", + "description": "下一页的不透明游标。" + }, + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按集成 ID 过滤。" + }, + "integration_types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按集成类型(插件键)过滤。" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按协作空间 ID 过滤,最多 100 个。" + }, + "severities": { + "type": "string", + "description": "逗号分隔的严重程度过滤,如 `Critical,Warning`。" + }, + "orderby": { + "type": "string", + "description": "排序字段(ES 字段名)。", + "enum": [ + "event_time" + ] + }, + "asc": { + "type": "boolean", + "description": "为 true 时升序排序。" + } + } + }, + "AlertEventGlobalListResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64" + }, + "has_next_page": { + "type": "boolean" + }, + "search_after_ctx": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertEventItem" + } + } + } + }, + "ApTitleReset": { + "type": "object", + "description": "`title_reset` 规则的配置:使用模板字符串覆盖告警标题。", + "required": [ + "title" + ], + "properties": { + "title": { + "type": "string", + "description": "新标题模板,支持引用告警字段的 Golang 模板语法。" + } + } + }, + "ApDescriptionReset": { + "type": "object", + "description": "`description_reset` 规则的配置:使用模板字符串覆盖告警描述。", + "required": [ + "description" + ], + "properties": { + "description": { + "type": "string", + "description": "新描述模板。" + } + } + }, + "ApSeverityReset": { + "type": "object", + "description": "`severity_reset` 规则的配置:将告警严重程度强制设置为固定值。", + "required": [ + "severity" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info" + ], + "description": "目标严重程度级别。" + } + } + }, + "ApAlertDrop": { + "type": "object", + "description": "`alert_drop` 规则的配置:无需额外配置,匹配的告警将被静默丢弃。", + "properties": {} + }, + "ApAlertInhibit": { + "type": "object", + "description": "`alert_inhibit` 规则的配置:当来源告警与当前告警共享相同标签值时,抑制匹配过滤条件的来源告警。", + "required": [ + "equals", + "source_filters" + ], + "properties": { + "equals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "需要在来源告警与当前告警之间值相等的标签键列表。" + }, + "source_filters": { + "$ref": "#/components/schemas/OrFilterGroup", + "description": "用于匹配待抑制来源告警的过滤条件。" + } + } + }, + "ListWebhookHistoryRequest": { + "type": "object", + "description": "出站 Webhook 推送历史的筛选参数。查询必须指定毫秒级的时间窗口;使用 `search_after_ctx` 进行游标分页。", + "required": [ + "limit", + "start_time", + "end_time" + ], + "properties": { + "search_after_ctx": { + "type": "string", + "description": "上一次调用返回的不透明游标,用于获取下一页。" + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "description": "每页数量。" + }, + "asc": { + "type": "boolean", + "description": "为 true 时按 `event_time` 升序排序,否则降序。" + }, + "orderby": { + "type": "string", + "enum": [ + "event_time" + ], + "description": "排序字段,目前仅支持 `event_time`。" + }, + "ref_id": { + "type": "string", + "maxLength": 128, + "description": "按引用 ID 过滤(故障或告警 ID)。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "按集成 ID 过滤。" + }, + "event_types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按事件类型过滤。" + }, + "status": { + "type": "string", + "enum": [ + "success", + "failed" + ], + "description": "按投递状态过滤。" + }, + "start_time": { + "type": "integer", + "format": "int64", + "minimum": 1000000000000, + "maximum": 9999999999999, + "description": "时间窗口起始时间(Unix 毫秒)。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "minimum": 1000000000000, + "maximum": 9999999999999, + "description": "时间窗口结束时间(Unix 毫秒),必须大于 `start_time`。" + } + } + }, + "ListWebhookHistoryResponse": { + "type": "object", + "description": "分页的 Webhook 推送历史。", + "required": [ + "items", + "total", + "search_after_ctx" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookHistoryItem" + } + }, + "total": { + "type": "integer", + "description": "匹配记录总数。" + }, + "search_after_ctx": { + "type": "string", + "description": "下一页游标,传入下次请求的 `search_after_ctx`。无更多数据时为空。" + } + } + }, + "WebhookHistoryItem": { + "type": "object", + "description": "一次 Webhook 投递记录。带 `omitempty` 的字段在取零值时会被省略。", + "required": [ + "integration_id", + "event_id", + "webhook_type", + "event_type", + "endpoint", + "attempt", + "duration", + "status", + "status_code", + "event_time" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "触发 Webhook 的集成 ID。" + }, + "event_id": { + "type": "string", + "description": "本次投递的唯一事件 ID。" + }, + "webhook_type": { + "type": "string", + "description": "来源对象类型:`incident` 或 `alert`。" + }, + "event_type": { + "type": "string", + "description": "事件类型(如 `created`、`acknowledged`、`closed`)。" + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "事件所属协作空间 ID(若有)。" + }, + "ref_id": { + "type": "string", + "description": "来源对象 ID(故障或告警 ID)。" + }, + "request_headers": { + "type": "string", + "description": "序列化的出站请求头。" + }, + "request_body": { + "type": "string", + "description": "出站请求体。" + }, + "endpoint": { + "type": "string", + "description": "目标地址。" + }, + "attempt": { + "type": "integer", + "description": "尝试次数。" + }, + "duration": { + "type": "integer", + "description": "整次尝试耗时(毫秒)。" + }, + "status": { + "type": "string", + "enum": [ + "success", + "failed" + ], + "description": "投递结果。" + }, + "status_code": { + "type": "integer", + "description": "目标返回的 HTTP 状态码。" + }, + "error_message": { + "type": "string", + "description": "投递失败时的错误信息。" + }, + "response_headers": { + "type": "string", + "description": "序列化的响应头。" + }, + "response_body": { + "type": "string", + "description": "目标返回的响应体。" + }, + "event_time": { + "type": "string", + "description": "事件时间的格式化时间串。" + } + } + }, + "GetWebhookHistoryDetailRequest": { + "type": "object", + "description": "获取单条 Webhook 推送详情的参数。", + "required": [ + "event_id", + "integration_id" + ], + "properties": { + "event_id": { + "type": "string", + "description": "由 `ListWebhookHistory` 返回的事件 ID。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "事件所属的集成 ID。" + } + } + }, + "WebhookHistoryDetail": { + "type": "object", + "description": "Webhook 推送的完整详情。相较 `WebhookHistoryItem`,额外附带查询时解析出的引用元信息。", + "required": [ + "integration_id", + "event_id", + "webhook_type", + "event_type", + "endpoint", + "attempt", + "duration", + "status", + "status_code", + "event_time" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "集成 ID。" + }, + "event_id": { + "type": "string", + "description": "事件 ID。" + }, + "webhook_type": { + "type": "string", + "description": "来源对象类型:`incident` 或 `alert`。" + }, + "event_type": { + "type": "string", + "description": "事件类型。" + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "协作空间 ID(若有)。" + }, + "ref_id": { + "type": "string", + "description": "来源对象 ID。" + }, + "request_headers": { + "type": "string", + "description": "序列化的出站请求头。" + }, + "request_body": { + "type": "string", + "description": "出站请求体。" + }, + "endpoint": { + "type": "string", + "description": "目标地址。" + }, + "attempt": { + "type": "integer", + "description": "尝试次数。" + }, + "duration": { + "type": "integer", + "description": "整次尝试耗时(毫秒)。" + }, + "status": { + "type": "string", + "enum": [ + "success", + "failed" + ], + "description": "投递结果。" + }, + "status_code": { + "type": "integer", + "description": "HTTP 状态码。" + }, + "error_message": { + "type": "string", + "description": "投递失败时的错误信息。" + }, + "response_headers": { + "type": "string", + "description": "序列化的响应头。" + }, + "response_body": { + "type": "string", + "description": "响应体。" + }, + "event_time": { + "type": "string", + "description": "事件时间的格式化时间串。" + }, + "ref_title": { + "type": "string", + "description": "查询时解析出的来源故障或告警标题。" + }, + "channel_name": { + "type": "string", + "description": "查询时解析出的关联协作空间名称。" + } + } + }, + "ScheduleEmptyObject": { + "type": "object", + "description": "空响应。", + "properties": {} + }, + "ScheduleSelfRequest": { + "type": "object", + "description": "查询当前用户值班表的参数。start 和 end 为 Unix 时间戳(秒),缺省时默认为 0。时间窗口不得超过 30 天。", + "properties": { + "start": { + "type": "integer", + "format": "int64", + "description": "时间窗口开始时间(Unix 秒,10 位)。" + }, + "end": { + "type": "integer", + "format": "int64", + "description": "时间窗口结束时间(Unix 秒,10 位),与 start 的差值不得超过 30 天。" + } + } + }, + "ScheduleIDResponse": { + "type": "object", + "description": "创建值班表后返回的 ID 响应。", + "required": [ + "schedule_id" + ], + "properties": { + "schedule_id": { + "type": "integer", + "format": "int64", + "description": "新建值班表的 ID。" + } + } + }, + "ScheduleIDsBodyRequest": { + "type": "object", + "description": "携带值班表 ID 列表的请求体(删除/启用/禁用使用)。", + "required": [ + "schedule_ids" + ], + "properties": { + "schedule_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "要操作的值班表 ID 列表。" + } + } + }, + "ScheduleIDsRequest": { + "type": "object", + "description": "批量查询值班表使用的请求体。", + "required": [ + "schedule_ids" + ], + "properties": { + "schedule_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "值班表 ID 列表。" + } + } + }, + "ScheduleInfoRequest": { + "type": "object", + "description": "值班表详情请求。start/end 指定计算值班分层的时间窗口,跨度必须小于 45 天。", + "required": [ + "schedule_id", + "start", + "end" + ], + "properties": { + "schedule_id": { + "type": "integer", + "format": "int64", + "description": "值班表 ID。" + }, + "start": { + "type": "integer", + "format": "int64", + "description": "窗口开始时间(Unix 秒,10 位)。" + }, + "end": { + "type": "integer", + "format": "int64", + "description": "窗口结束时间(Unix 秒,10 位)。" + } + } + }, + "ScheduleMember": { + "type": "object", + "description": "值班组内成员条目。", + "required": [ + "role_id", + "person_ids" + ], + "properties": { + "role_id": { + "type": "integer", + "format": "int64", + "description": "值班角色 ID。" + }, + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "该角色下的用户 ID 列表。" + } + } + }, + "ScheduleGroup": { + "type": "object", + "description": "值班分层内的值班组。", + "required": [ + "group_name", + "name", + "members", + "start", + "end" + ], + "properties": { + "group_name": { + "type": "string", + "description": "值班组显示名称。" + }, + "name": { + "type": "string", + "description": "值班组内部名称。" + }, + "members": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleMember" + }, + "description": "值班组成员。" + }, + "start": { + "type": "integer", + "format": "int64", + "description": "值班组开始时间(Unix 秒)。" + }, + "end": { + "type": "integer", + "format": "int64", + "description": "值班组结束时间(Unix 秒)。" + } + } + }, + "ScheduleRestrictPeriod": { + "type": "object", + "description": "单个值班周期内的限制区间。", + "required": [ + "restrict_start", + "restrict_end" + ], + "properties": { + "restrict_start": { + "type": "integer", + "format": "int64", + "description": "限制区间开始偏移。" + }, + "restrict_end": { + "type": "integer", + "format": "int64", + "description": "限制区间结束偏移。" + } + } + }, + "ScheduleDayMask": { + "type": "object", + "description": "按星期几生效的掩码配置。", + "properties": { + "repeat": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "生效的星期几(0 = 周日)。" + } + } + }, + "ScheduleLayer": { + "type": "object", + "description": "值班表中的单个分层。", + "required": [ + "account_id", + "name", + "schedule_id", + "hidden", + "mode", + "weight", + "groups", + "rotation_duration", + "handoff_time", + "enable_time", + "expire_time", + "restrict_mode", + "restrict_start", + "restrict_end", + "restrict_periods", + "day_mask", + "create_at", + "create_by", + "update_at", + "update_by", + "fair_rotation", + "rotation_unit", + "rotation_value", + "mask_continuous_enabled" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "账户 ID。" + }, + "name": { + "type": "string", + "description": "分层内部名称。" + }, + "schedule_id": { + "type": "integer", + "format": "int64", + "description": "所属值班表 ID。" + }, + "hidden": { + "type": "integer", + "description": "是否在页面上隐藏(0 = 否,1 = 是)。" + }, + "mode": { + "type": "integer", + "description": "分层模式:0 = 普通轮转,1 = 覆盖。", + "enum": [ + 0, + 1 + ] + }, + "weight": { + "type": "integer", + "description": "分层权重,用于排序。" + }, + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleGroup" + }, + "description": "参与轮转的值班组。" + }, + "rotation_duration": { + "type": "integer", + "format": "int64", + "description": "轮转周期(秒)。" + }, + "handoff_time": { + "type": "integer", + "format": "int64", + "description": "值班交接时间(秒)。" + }, + "enable_time": { + "type": "integer", + "format": "int64", + "description": "分层生效时间(Unix 秒)。" + }, + "expire_time": { + "type": "integer", + "format": "int64", + "description": "分层失效时间(Unix 秒,0 表示永不过期)。" + }, + "restrict_mode": { + "type": "integer", + "description": "限制模式:0 = 不限制,1 = day,2 = week。", + "enum": [ + 0, + 1, + 2 + ] + }, + "restrict_start": { + "type": "integer", + "format": "int64", + "description": "旧版限制区间开始偏移(秒)。" + }, + "restrict_end": { + "type": "integer", + "format": "int64", + "description": "旧版限制区间结束偏移(秒)。" + }, + "restrict_periods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleRestrictPeriod" + }, + "description": "每个值班周期内的限制区间集合。" + }, + "day_mask": { + "$ref": "#/components/schemas/ScheduleDayMask", + "description": "星期掩码。" + }, + "create_at": { + "type": "integer", + "format": "int64", + "description": "创建时间(Unix 秒)。" + }, + "create_by": { + "type": "integer", + "format": "int64", + "description": "创建人 ID。" + }, + "update_at": { + "type": "integer", + "format": "int64", + "description": "更新时间(Unix 秒)。" + }, + "update_by": { + "type": "integer", + "format": "int64", + "description": "更新人 ID。" + }, + "layer_name": { + "type": "string", + "description": "分层显示名称。" + }, + "fair_rotation": { + "type": "boolean", + "description": "是否启用公平轮转。" + }, + "layer_start": { + "type": "integer", + "format": "int64", + "description": "分层开始时间(Unix 秒)。" + }, + "layer_end": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "description": "分层结束时间(Unix 秒)。null 表示无结束时间。" + }, + "rotation_unit": { + "type": "string", + "description": "轮转单位。", + "enum": [ + "hour", + "day", + "week", + "month" + ] + }, + "rotation_value": { + "type": "integer", + "format": "int64", + "description": "轮转数量(每周期的 rotation_unit 个数)。" + }, + "mask_continuous_enabled": { + "type": "boolean", + "description": "是否启用连续掩码。" + } + } + }, + "ScheduleImNotifySettings": { + "type": "object", + "description": "IM Webhook 通知通道配置。", + "required": [ + "token", + "alias", + "data_source_id", + "chat_ids", + "verify_token", + "sign_secret" + ], + "properties": { + "token": { + "type": "string", + "description": "Webhook token。" + }, + "alias": { + "type": "string", + "description": "通道别名。" + }, + "data_source_id": { + "type": "integer", + "format": "int64", + "description": "数据源 ID。" + }, + "chat_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "会话 ID 列表。" + }, + "verify_token": { + "type": "string", + "description": "验签 token。" + }, + "sign_secret": { + "type": "string", + "description": "签名密钥。" + } + } + }, + "ScheduleImNotify": { + "type": "object", + "description": "IM Webhook 通知条目。", + "required": [ + "type", + "settings" + ], + "properties": { + "type": { + "type": "string", + "description": "IM 提供方类型(如 feishu_app、dingtalk_app、wecom_app、teams_app、slack_app)。" + }, + "settings": { + "$ref": "#/components/schemas/ScheduleImNotifySettings" + } + } + }, + "ScheduleFixedTimeNotifyInfo": { + "type": "object", + "description": "固定时间通知配置。", + "required": [ + "cycle", + "start" + ], + "properties": { + "cycle": { + "type": "string", + "description": "通知周期。" + }, + "start": { + "type": "string", + "description": "周期内的通知开始时间。" + } + } + }, + "ScheduleNotifyBy": { + "type": "object", + "description": "接收人的通知偏好。", + "required": [ + "follow_preference", + "personal_channels" + ], + "properties": { + "follow_preference": { + "type": "boolean", + "description": "是否跟随个人通知偏好。" + }, + "personal_channels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "个人通知通道列表。" + } + } + }, + "ScheduleNotify": { + "type": "object", + "description": "值班表的通知配置。", + "required": [ + "fixed_time", + "by", + "webhooks" + ], + "properties": { + "advance_in_time": { + "type": "integer", + "format": "int64", + "description": "提前通知时间(秒)。" + }, + "fixed_time": { + "$ref": "#/components/schemas/ScheduleFixedTimeNotifyInfo" + }, + "by": { + "$ref": "#/components/schemas/ScheduleNotifyBy" + }, + "im": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "旧版 IM 类型到 token 的映射。" + }, + "webhooks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleImNotify" + }, + "description": "IM Webhook 通知通道。" + } + } + }, + "ScheduleCalculatedSchedule": { + "type": "object", + "description": "分层内计算出的值班时段。", + "required": [ + "start", + "end", + "group", + "index" + ], + "properties": { + "start": { + "type": "integer", + "format": "int64", + "description": "时段开始时间(Unix 秒)。" + }, + "end": { + "type": "integer", + "format": "int64", + "description": "时段结束时间(Unix 秒)。" + }, + "group": { + "$ref": "#/components/schemas/ScheduleGroup" + }, + "index": { + "type": "integer", + "description": "轮转内索引。" + } + } + }, + "ScheduleCalculatedLayer": { + "type": "object", + "description": "单个分层的计算结果。", + "required": [ + "layer_name", + "name", + "mode", + "schedules" + ], + "properties": { + "layer_name": { + "type": "string", + "description": "分层显示名称。" + }, + "name": { + "type": "string", + "description": "分层内部名称。" + }, + "mode": { + "type": "integer", + "description": "分层模式:0 = 普通轮转,1 = 覆盖。" + }, + "schedules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleCalculatedSchedule" + }, + "description": "计算出的值班时段。" + } + } + }, + "ScheduleOncallGroup": { + "type": "object", + "description": "当前或下一次值班组快照。", + "required": [ + "start", + "end", + "group", + "update_at", + "weight", + "index" + ], + "properties": { + "start": { + "type": "integer", + "format": "int64", + "description": "时段开始时间(Unix 秒)。" + }, + "end": { + "type": "integer", + "format": "int64", + "description": "时段结束时间(Unix 秒)。" + }, + "group": { + "$ref": "#/components/schemas/ScheduleGroup" + }, + "update_at": { + "type": "integer", + "format": "int64", + "description": "更新时间(Unix 秒)。" + }, + "weight": { + "type": "integer", + "description": "来源分层权重。" + }, + "index": { + "type": "integer", + "description": "轮转内索引。" + } + } + }, + "ScheduleItem": { + "type": "object", + "description": "/schedule/info、/schedule/preview、/schedule/list 返回的完整值班表详情。", + "required": [ + "id", + "name", + "account_id", + "group_id", + "disabled", + "create_at", + "create_by", + "update_at", + "update_by", + "layers", + "schedule_layers", + "final_schedule", + "notify", + "schedule_id", + "schedule_name", + "team_id", + "description", + "layer_schedules", + "status", + "cur_oncall", + "next_oncall" + ], + "properties": { + "id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "description": "值班表 ID。/schedule/preview 返回时为 null。" + }, + "name": { + "type": [ + "string", + "null" + ], + "description": "旧版值班表名称字段(与 schedule_name 同义)。/schedule/preview 返回时为 null。" + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "账户 ID。" + }, + "group_id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "description": "旧版团队/组 ID。/schedule/preview 返回时为 null。" + }, + "disabled": { + "type": [ + "integer", + "null" + ], + "description": "禁用标记(0 = 启用,1 = 禁用),已废弃。/schedule/preview 返回时为 null。" + }, + "create_at": { + "type": "integer", + "format": "int64", + "description": "创建时间(Unix 秒)。" + }, + "create_by": { + "type": "integer", + "format": "int64", + "description": "创建人 ID。" + }, + "update_at": { + "type": "integer", + "format": "int64", + "description": "更新时间(Unix 秒)。" + }, + "update_by": { + "type": "integer", + "format": "int64", + "description": "更新人 ID。" + }, + "layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleLayer" + }, + "description": "值班表的轮转分层。" + }, + "field": { + "type": "string", + "description": "旧版字段更新接口使用的字段名。" + }, + "schedule_layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleCalculatedLayer" + }, + "description": "按窗口计算出的分层值班结果。" + }, + "final_schedule": { + "$ref": "#/components/schemas/ScheduleCalculatedLayer", + "description": "所有分层合并后的最终值班结果。" + }, + "start": { + "type": "integer", + "format": "int64", + "description": "窗口开始时间(Unix 秒)。" + }, + "end": { + "type": "integer", + "format": "int64", + "description": "窗口结束时间(Unix 秒)。" + }, + "notify": { + "$ref": "#/components/schemas/ScheduleNotify" + }, + "schedule_id": { + "type": "integer", + "format": "int64", + "description": "值班表 ID。" + }, + "schedule_name": { + "type": [ + "string", + "null" + ], + "description": "值班表显示名称。/schedule/preview 返回时为 null。" + }, + "team_id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "description": "所属团队 ID。/schedule/preview 返回时为 null。" + }, + "description": { + "type": [ + "string", + "null" + ], + "description": "值班表描述。/schedule/preview 返回时为 null。" + }, + "layer_schedules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleCalculatedLayer" + }, + "description": "与 schedule_layers 等价,用于旧版兼容。" + }, + "status": { + "type": [ + "integer", + "null" + ], + "description": "旧版状态字段,已废弃。/schedule/preview 返回时为 null。" + }, + "cur_oncall": { + "$ref": "#/components/schemas/ScheduleOncallGroup", + "description": "当前正在值班的组,无人值班时为 null。" + }, + "next_oncall": { + "$ref": "#/components/schemas/ScheduleOncallGroup", + "description": "下一次值班的组,未知时为 null。" + } + } + }, + "ScheduleUpsertRequest": { + "type": "object", + "description": "值班表创建/更新/预览共用的请求体,结构与值班表详情一致,此处仅列出常用字段。更新时需要 schedule_id;预览时 start、end 必填。", + "properties": { + "schedule_id": { + "type": "integer", + "format": "int64", + "description": "值班表 ID,更新时必填。" + }, + "schedule_name": { + "type": "string", + "description": "值班表显示名称,最长 40 字符。", + "maxLength": 40 + }, + "name": { + "type": "string", + "description": "旧版名称字段,当 schedule_name 为空时使用。", + "maxLength": 40 + }, + "description": { + "type": "string", + "description": "值班表描述,最长 500 字符。", + "maxLength": 500 + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID。" + }, + "layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleLayer" + }, + "description": "轮转分层。" + }, + "notify": { + "$ref": "#/components/schemas/ScheduleNotify" + }, + "start": { + "type": "integer", + "format": "int64", + "description": "预览窗口开始时间(Unix 秒,10 位),/schedule/preview 必填。" + }, + "end": { + "type": "integer", + "format": "int64", + "description": "预览窗口结束时间(Unix 秒,10 位),/schedule/preview 必填,且距 start 不超过 45 天。" + } + } + }, + "ScheduleListRequest": { + "type": "object", + "description": "值班表列表请求。limit 默认 10、最大 100,p 默认 1。is_my_team 与 is_my_manage 不能同时为 true。", + "properties": { + "query": { + "type": "string", + "description": "搜索关键字,匹配值班表名称。" + }, + "p": { + "type": "integer", + "description": "页码(从 1 开始)。", + "default": 1 + }, + "limit": { + "type": "integer", + "description": "每页条数,默认 10、最大 100。", + "default": 10, + "maximum": 100 + }, + "is_my_team": { + "type": "boolean", + "description": "仅返回当前用户所在团队的值班表。" + }, + "is_my_manage": { + "type": "boolean", + "description": "仅返回当前用户在其团队内创建的值班表。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按团队 ID 过滤。" + }, + "start": { + "type": "integer", + "format": "int64", + "description": "与 end 同时传入时,响应会包含计算后的分层值班结果;跨度必须小于 45 天。" + }, + "end": { + "type": "integer", + "format": "int64", + "description": "窗口结束时间(Unix 秒)。" + } + } + }, + "ScheduleListResponse": { + "type": "object", + "description": "值班表列表响应。", + "required": [ + "items", + "total" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleItem" + }, + "description": "当前页的值班表列表。" + }, + "total": { + "type": "integer", + "format": "int64", + "description": "符合过滤条件的总条数。" + } + } + }, + "ScheduleSelfResponse": { + "type": "object", + "description": "/schedule/self 与 /schedule/infos 的响应,仅返回 items。", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleItem" + }, + "description": "当前用户被分配到的值班表(或请求指定的 ID 对应的值班表)。" + } + } + }, + "CalendarEmptyObject": { + "type": "object", + "description": "空响应体。", + "properties": {} + }, + "CalendarCreateRequest": { + "type": "object", + "description": "创建日历请求,cal_name 必填。", + "required": [ + "cal_name" + ], + "properties": { + "cal_name": { + "type": "string", + "description": "日历显示名称。", + "minLength": 1, + "maxLength": 39 + }, + "description": { + "type": "string", + "description": "日历描述。", + "maxLength": 499 + }, + "timezone": { + "type": "string", + "description": "IANA 时区,为空时默认 Asia/Shanghai。", + "default": "Asia/Shanghai" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID,0 表示不关联团队。" + }, + "workdays": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0, + "maximum": 6 + }, + "description": "工作日(0 = 周日,6 = 周六)。" + }, + "extra_cal_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "需要继承事件的公共节假日日历 ID 列表(例如 zh-cn.china.official)。" + } + } + }, + "CalendarCreateResponse": { + "type": "object", + "description": "创建日历响应。", + "required": [ + "cal_id", + "cal_name" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "新建日历的 ID(格式 cal.)。" + }, + "cal_name": { + "type": "string", + "description": "日历显示名称。" + } + } + }, + "CalendarUpdateRequest": { + "type": "object", + "description": "更新日历请求。cal_id 必填,其他字段均为可选,仅在传入时更新。", + "required": [ + "cal_id" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "日历 ID。" + }, + "cal_name": { + "type": "string", + "description": "新的日历名称。", + "minLength": 1, + "maxLength": 39 + }, + "description": { + "type": "string", + "description": "新的描述。", + "maxLength": 499 + }, + "timezone": { + "type": "string", + "description": "新的 IANA 时区。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "新的所属团队 ID。" + }, + "workdays": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0, + "maximum": 6 + }, + "description": "工作日(0 = 周日,6 = 周六)。" + }, + "extra_cal_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "需要继承事件的公共节假日日历 ID 列表。" + } + } + }, + "CalendarIDRequest": { + "type": "object", + "description": "携带日历 ID 的请求体。", + "required": [ + "cal_id" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "日历 ID。" + } + } + }, + "CalendarItem": { + "type": "object", + "description": "服务日历详情。", + "required": [ + "account_id", + "team_id", + "cal_id", + "cal_name", + "description", + "timezone", + "kind", + "created_at", + "updated_at", + "creator_id", + "updated_by", + "status" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "账户 ID。" + }, + "team_id": { + "type": "integer", + "format": "uint64", + "description": "所属团队 ID(0 表示未关联团队)。" + }, + "cal_id": { + "type": "string", + "description": "日历 ID。" + }, + "cal_name": { + "type": "string", + "description": "日历显示名称。" + }, + "description": { + "type": "string", + "description": "日历描述。" + }, + "timezone": { + "type": "string", + "description": "IANA 时区。" + }, + "kind": { + "type": "string", + "description": "日历类型。", + "enum": [ + "region.official.holiday", + "religion.holiday", + "personal" + ] + }, + "workdays": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0, + "maximum": 6 + }, + "description": "工作日(0 = 周日,6 = 周六)。" + }, + "extra_cal_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "继承的公共节假日日历 ID 列表。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间(Unix 秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "更新时间(Unix 秒)。" + }, + "creator_id": { + "type": "integer", + "format": "uint64", + "description": "创建人 ID。" + }, + "updated_by": { + "type": "integer", + "format": "uint64", + "description": "最后更新人 ID。" + }, + "status": { + "type": "string", + "description": "日历状态。", + "enum": [ + "enabled", + "deleted" + ] + } + } + }, + "CalendarListRequest": { + "type": "object", + "description": "日历列表请求。kind 用于按类型过滤;no_locale 在查询公共节假日日历时关闭 locale 过滤。", + "properties": { + "kind": { + "type": "string", + "description": "日历类型过滤条件,为空时默认 personal。", + "enum": [ + "region.official.holiday", + "personal" + ] + }, + "no_locale": { + "type": "boolean", + "description": "查询公共节假日日历时关闭 locale 过滤。" + } + } + }, + "CalendarListResponse": { + "type": "object", + "description": "日历列表响应。", + "required": [ + "items", + "total" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CalendarItem" + }, + "description": "日历列表。" + }, + "total": { + "type": "integer", + "description": "返回的日历总数。" + } + } + }, + "CalEventUpsertRequest": { + "type": "object", + "description": "日历事件创建/更新请求。传入 event_id 表示更新,留空表示创建。", + "required": [ + "cal_id", + "summary", + "start_at", + "end_at", + "is_off" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "日历 ID。" + }, + "event_id": { + "type": "string", + "description": "事件 ID,创建时留空。", + "maxLength": 63 + }, + "summary": { + "type": "string", + "description": "事件摘要。", + "minLength": 1, + "maxLength": 39 + }, + "description": { + "type": "string", + "description": "事件描述。", + "maxLength": 499 + }, + "start_at": { + "type": "string", + "description": "事件开始日期,格式 YYYY-MM-DD。" + }, + "end_at": { + "type": "string", + "description": "事件结束日期(不含),格式 YYYY-MM-DD。" + }, + "is_off": { + "type": "boolean", + "description": "是否为非工作日。true = 休息日,false = 工作日覆盖。" + } + } + }, + "CalEventUpsertResponse": { + "type": "object", + "description": "/calendar/event/upsert 的响应。", + "required": [ + "cal_id", + "event_id", + "summary" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "日历 ID。" + }, + "event_id": { + "type": "string", + "description": "事件 ID(已存在的或新生成的)。" + }, + "summary": { + "type": "string", + "description": "事件摘要。" + } + } + }, + "CalEventIDRequest": { + "type": "object", + "description": "日历事件删除请求。", + "required": [ + "cal_id", + "event_id" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "日历 ID。" + }, + "event_id": { + "type": "string", + "description": "事件 ID。" + } + } + }, + "CalEventListRequest": { + "type": "object", + "description": "日历事件列表请求。day > 0 时必须同时指定 month;month 与 day 为 0 表示不过滤。", + "required": [ + "cal_id" + ], + "properties": { + "cal_id": { + "type": "string", + "description": "日历 ID。" + }, + "year": { + "type": "integer", + "description": "年份,留空时默认当前年。", + "minimum": 2023 + }, + "month": { + "type": "integer", + "description": "月份(1-12),0 表示不按月过滤。", + "minimum": 0, + "maximum": 12 + }, + "day": { + "type": "integer", + "description": "日(1-31),0 表示不按日过滤。", + "minimum": 0, + "maximum": 31 + } + } + }, + "CalEventItem": { + "type": "object", + "description": "日历事件条目。", + "required": [ + "cal_id", + "event_id", + "summary", + "description", + "start_at", + "end_at", + "is_off", + "created_at", + "updated_at" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "账户 ID,仅私有事件返回。" + }, + "creator_id": { + "type": "integer", + "format": "uint64", + "description": "创建人 ID,仅私有事件返回。" + }, + "cal_id": { + "type": "string", + "description": "日历 ID,公共事件为 locale key(如 zh-cn.china.official)。" + }, + "event_id": { + "type": "string", + "description": "事件 ID。" + }, + "summary": { + "type": "string", + "description": "事件摘要。" + }, + "description": { + "type": "string", + "description": "事件描述。" + }, + "start_at": { + "type": "string", + "description": "事件开始日期(YYYY-MM-DD)。" + }, + "end_at": { + "type": "string", + "description": "事件结束日期(YYYY-MM-DD,不含)。" + }, + "is_off": { + "type": "boolean", + "description": "是否为非工作日。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间(Unix 秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "更新时间(Unix 秒)。" + } + } + }, + "CalEventListResponse": { + "type": "object", + "description": "日历事件列表响应。", + "required": [ + "items", + "total" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CalEventItem" + }, + "description": "按 start_at 排序的日历事件列表。" + }, + "total": { + "type": "integer", + "description": "返回的事件总数。" + } + } + }, + "TemplateItem": { + "type": "object", + "description": "一个通知模板。每个通道字段中存放该通道的模板源字符串;空字符串表示该通道没有自定义模板。", + "required": [ + "account_id", + "team_id", + "template_id", + "template_name", + "description", + "email", + "sms", + "voice", + "dingtalk", + "wecom", + "feishu", + "feishu_app", + "dingtalk_app", + "wecom_app", + "slack_app", + "teams_app", + "telegram", + "slack", + "zoom", + "status", + "creator_id", + "updated_by", + "created_at", + "updated_at" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "所属账户 ID。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID,0 表示账户全局共享。" + }, + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "模板 ID。", + "example": "6605a1b2c3d4e5f6a7b8c9d0" + }, + "template_name": { + "type": "string", + "description": "模板名称,同一账户内唯一。" + }, + "description": { + "type": "string", + "description": "自定义描述。" + }, + "email": { + "type": "string", + "description": "邮件正文模板源(Go `html/template` 语法)。" + }, + "sms": { + "type": "string", + "description": "短信模板源(Go `text/template` 语法)。" + }, + "voice": { + "type": "string", + "description": "语音呼叫脚本模板源。" + }, + "dingtalk": { + "type": "string", + "description": "钉钉群机器人消息模板源。" + }, + "wecom": { + "type": "string", + "description": "企业微信群机器人消息模板源。" + }, + "feishu": { + "type": "string", + "description": "飞书群机器人消息模板源。" + }, + "feishu_app": { + "type": "string", + "description": "飞书应用消息模板源。" + }, + "dingtalk_app": { + "type": "string", + "description": "钉钉应用消息模板源。" + }, + "wecom_app": { + "type": "string", + "description": "企业微信应用消息模板源。" + }, + "slack_app": { + "type": "string", + "description": "Slack 应用消息模板源。" + }, + "teams_app": { + "type": "string", + "description": "Microsoft Teams 应用消息模板源。" + }, + "telegram": { + "type": "string", + "description": "Telegram 机器人消息模板源。" + }, + "slack": { + "type": "string", + "description": "Slack 机器人消息模板源。" + }, + "zoom": { + "type": "string", + "description": "Zoom 机器人消息模板源。" + }, + "status": { + "type": "string", + "description": "模板生命周期状态。", + "enum": [ + "enabled", + "disabled", + "deleted" + ] + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "创建人成员 ID。" + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "最后修改人成员 ID。" + }, + "deleted_at": { + "type": "integer", + "format": "int64", + "description": "软删除时间(Unix 秒)。模板未删除时字段缺省(omitempty)。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间(Unix 秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最近更新时间(Unix 秒)。" + } + } + }, + "TemplateIDRequest": { + "type": "object", + "required": [ + "template_id" + ], + "properties": { + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "要操作的模板 ID。传入 `000000000000000000000001` 可访问系统预置模板。", + "example": "6605a1b2c3d4e5f6a7b8c9d0" + } + } + }, + "TemplateListRequest": { + "type": "object", + "description": "分页过滤条件。默认 p=1、limit=20,limit 上限为 100。", + "properties": { + "p": { + "type": "integer", + "description": "页码,从 1 开始。", + "minimum": 1, + "default": 1, + "example": 1 + }, + "limit": { + "type": "integer", + "description": "分页大小,最大 100。", + "minimum": 1, + "maximum": 100, + "default": 20, + "example": 20 + }, + "orderby": { + "type": "string", + "description": "排序字段。", + "enum": [ + "created_at", + "updated_at" + ] + }, + "asc": { + "type": "boolean", + "description": "升序排序。", + "default": false + }, + "is_my_team": { + "type": "boolean", + "description": "为 true 时只返回当前成员所属团队范围内的模板。", + "default": false + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按团队 ID 列表过滤。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "按创建人成员 ID 过滤。" + }, + "query": { + "type": "string", + "description": "按模板名称做正则或子串匹配。" + } + } + }, + "TemplateListResponse": { + "type": "object", + "description": "通知模板的分页列表。", + "required": [ + "total", + "has_next_page", + "items" + ], + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "符合过滤条件的模板总数。", + "example": 47 + }, + "has_next_page": { + "type": "boolean", + "description": "是否还有下一页。", + "example": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TemplateItem" + } + } + } + }, + "TemplateCreateRequest": { + "type": "object", + "description": "创建通知模板。", + "required": [ + "template_name" + ], + "properties": { + "team_id": { + "type": "integer", + "format": "int64", + "description": "团队归属。0 表示账户全局共享。", + "default": 0 + }, + "template_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "模板名称,同一账户内唯一,长度 1–39 个字符。", + "example": "生产环境默认模板" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "自定义描述。最多 500 字符。" + }, + "email": { + "type": "string", + "description": "邮件正文模板源(Go `html/template` 语法)。" + }, + "sms": { + "type": "string", + "description": "短信模板源(Go `text/template` 语法)。" + }, + "voice": { + "type": "string", + "description": "语音呼叫脚本模板源。" + }, + "dingtalk": { + "type": "string", + "description": "钉钉群机器人消息模板源。" + }, + "wecom": { + "type": "string", + "description": "企业微信群机器人消息模板源。" + }, + "feishu": { + "type": "string", + "description": "飞书群机器人消息模板源。" + }, + "feishu_app": { + "type": "string", + "description": "飞书应用消息模板源。" + }, + "dingtalk_app": { + "type": "string", + "description": "钉钉应用消息模板源。" + }, + "wecom_app": { + "type": "string", + "description": "企业微信应用消息模板源。" + }, + "slack_app": { + "type": "string", + "description": "Slack 应用消息模板源。" + }, + "teams_app": { + "type": "string", + "description": "Microsoft Teams 应用消息模板源。" + }, + "telegram": { + "type": "string", + "description": "Telegram 机器人消息模板源。" + }, + "slack": { + "type": "string", + "description": "Slack 机器人消息模板源。" + }, + "zoom": { + "type": "string", + "description": "Zoom 机器人消息模板源。" + } + } + }, + "TemplateCreateResponse": { + "type": "object", + "required": [ + "template_id", + "template_name" + ], + "properties": { + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "新创建的模板 ID。", + "example": "6605a1b2c3d4e5f6a7b8c9d0" + }, + "template_name": { + "type": "string", + "description": "从请求中回显的模板名称。", + "example": "生产环境默认模板" + } + } + }, + "TemplateUpdateRequest": { + "type": "object", + "description": "更新已存在的模板。", + "required": [ + "template_id", + "template_name" + ], + "properties": { + "template_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "目标模板 ID。", + "example": "6605a1b2c3d4e5f6a7b8c9d0" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "团队归属。0 表示账户全局共享。", + "default": 0 + }, + "template_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "模板名称,长度 1–39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "自定义描述。最多 500 字符。" + }, + "email": { + "type": "string", + "description": "邮件正文模板源(Go `html/template` 语法)。" + }, + "sms": { + "type": "string", + "description": "短信模板源(Go `text/template` 语法)。" + }, + "voice": { + "type": "string", + "description": "语音呼叫脚本模板源。" + }, + "dingtalk": { + "type": "string", + "description": "钉钉群机器人消息模板源。" + }, + "wecom": { + "type": "string", + "description": "企业微信群机器人消息模板源。" + }, + "feishu": { + "type": "string", + "description": "飞书群机器人消息模板源。" + }, + "feishu_app": { + "type": "string", + "description": "飞书应用消息模板源。" + }, + "dingtalk_app": { + "type": "string", + "description": "钉钉应用消息模板源。" + }, + "wecom_app": { + "type": "string", + "description": "企业微信应用消息模板源。" + }, + "slack_app": { + "type": "string", + "description": "Slack 应用消息模板源。" + }, + "teams_app": { + "type": "string", + "description": "Microsoft Teams 应用消息模板源。" + }, + "telegram": { + "type": "string", + "description": "Telegram 机器人消息模板源。" + }, + "slack": { + "type": "string", + "description": "Slack 机器人消息模板源。" + }, + "zoom": { + "type": "string", + "description": "Zoom 机器人消息模板源。" + } + } + }, + "CsvFileResponse": { + "type": "string", + "description": "以附件形式返回的 CSV 文件内容。" + }, + "EnrichmentInfoRequest": { + "type": "object", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "待查询富化规则的集成 ID,必须大于 0。" + } + } + }, + "EnrichmentListRequest": { + "type": "object", + "required": [ + "integration_ids" + ], + "properties": { + "integration_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "待查询的集成 ID 列表。" + } + } + }, + "EnrichmentUpsertRequest": { + "type": "object", + "required": [ + "integration_id", + "rules" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "待配置富化规则的集成 ID。" + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnrichRule" + }, + "description": "富化规则有序列表,将原子替换现有全部规则。" + } + } + }, + "EnrichRule": { + "type": "object", + "required": [ + "kind", + "settings" + ], + "description": "带可选条件的富化规则,包含特定类型配置。", + "properties": { + "kind": { + "type": "string", + "enum": [ + "extraction", + "composition", + "mapping", + "drop" + ], + "description": "规则类型。`extraction` 通过正则或 GJson 提取标签;`composition` 通过模板组合标签;`mapping` 通过映射规则或 API 查找填充标签;`drop` 删除标签。" + }, + "if": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnrichFilter" + }, + "description": "可选 AND 过滤条件列表,不匹配时跳过该规则。" + }, + "settings": { + "description": "与规则类型对应的配置,具体结构由 `kind` 字段决定。", + "discriminator": { + "propertyName": "kind", + "mapping": { + "extraction": "#/components/schemas/ErsExtraction", + "composition": "#/components/schemas/ErsComposition", + "mapping": "#/components/schemas/ErsMapping", + "drop": "#/components/schemas/ErsDrop" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/ErsExtraction" + }, + { + "$ref": "#/components/schemas/ErsComposition" + }, + { + "$ref": "#/components/schemas/ErsMapping" + }, + { + "$ref": "#/components/schemas/ErsDrop" + } + ] + } + } + }, + "ErsExtraction": { + "type": "object", + "title": "extraction", + "required": [ + "source_field", + "result_label" + ], + "properties": { + "source_field": { + "type": "string", + "description": "待提取的源字段。可为 `title`、`description` 或以 `labels.` 为前缀的标签键(如 `labels.env`)。" + }, + "result_label": { + "type": "string", + "description": "写入提取值的目标标签键,须符合 `^[a-z][a-z0-9_]{0,62}$`。" + }, + "pattern": { + "type": "string", + "description": "RE2 正则表达式。使用命名捕获组 `(?P...)` 提取子匹配;无命名组时取全匹配。与 `g_json` 互斥。" + }, + "g_json": { + "type": "string", + "description": "GJson 路径表达式,用于从 JSON 编码的字段中提取值。与 `pattern` 互斥。" + }, + "override": { + "type": "boolean", + "description": "为 `true` 时若标签已存在则覆盖,默认为 `false`。" + } + } + }, + "ErsComposition": { + "type": "object", + "title": "composition", + "required": [ + "result_label", + "template" + ], + "properties": { + "result_label": { + "type": "string", + "description": "写入组合值的目标标签键,须符合 `^[a-z][a-z0-9_]{0,62}$`。" + }, + "template": { + "type": "string", + "maxLength": 500, + "description": "Go `text/template` 字符串,可引用告警字段 `{{.title}}`、`{{.description}}`、`{{.labels.key}}`。示例:`{{.labels.region}}-{{.labels.env}}`。" + }, + "override": { + "type": "boolean", + "description": "为 `true` 时若标签已存在则覆盖,默认为 `false`。" + } + } + }, + "ErsMapping": { + "type": "object", + "title": "mapping", + "required": [ + "result_labels" + ], + "properties": { + "result_labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "从映射查找结果中填充的目标标签键列表。" + }, + "mapping_type": { + "type": "string", + "enum": [ + "schema", + "api" + ], + "default": "schema", + "description": "映射来源类型。`schema` 使用映射规则表;`api` 调用外部 HTTP API。" + }, + "schema_id": { + "type": "string", + "description": "映射规则 ID(MongoDB ObjectID 十六进制)。`mapping_type` 为 `schema` 时必填。" + }, + "api_id": { + "type": "string", + "description": "映射 API ID(MongoDB ObjectID 十六进制)。`mapping_type` 为 `api` 时必填。" + }, + "override": { + "type": "boolean", + "description": "为 `true` 时若标签已存在则覆盖,默认为 `false`。" + } + } + }, + "ErsDrop": { + "type": "object", + "title": "drop", + "required": [ + "drop_labels" + ], + "properties": { + "drop_labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "待从告警中删除的标签键列表。" + } + } + }, + "EnrichFilter": { + "type": "object", + "required": [ + "key", + "oper", + "vals" + ], + "description": "单个标签过滤条件。", + "properties": { + "key": { + "type": "string", + "description": "告警标签键。" + }, + "oper": { + "type": "string", + "enum": [ + "IN", + "NOTIN" + ], + "description": "匹配操作符。`IN` 表示任一值匹配即通过;`NOTIN` 表示所有值均不匹配时通过。" + }, + "vals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "待匹配的值列表。" + } + } + }, + "EnrichmentItem": { + "type": "object", + "description": "集成的富化规则集。", + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "集成 ID。" + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnrichRule" + }, + "description": "有序富化规则列表。" + }, + "status": { + "type": "string", + "description": "规则集状态。" + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "最后更新者成员 ID。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "创建者成员 ID。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 时间戳(秒)。" + } + }, + "required": [ + "integration_id", + "rules", + "status", + "updated_by", + "creator_id", + "created_at", + "updated_at" + ] + }, + "EnrichmentListResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnrichmentItem" + }, + "description": "富化规则集列表。" + } + }, + "required": [ + "items" + ] + }, + "MappingSchemaIDRequest": { + "type": "object", + "required": [ + "schema_id" + ], + "properties": { + "schema_id": { + "type": "string", + "description": "映射规则 ID(MongoDB ObjectID 十六进制)。" + } + } + }, + "MappingSchemaCreateRequest": { + "type": "object", + "required": [ + "schema_name", + "source_labels", + "result_labels" + ], + "properties": { + "schema_name": { + "type": "string", + "maxLength": 39, + "description": "唯一的映射规则名称(最多 39 个字符)。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "可选描述(最多 500 个字符)。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID,`0` 表示无团队。" + }, + "source_labels": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 3, + "description": "查找键标签名(1–3 个),不得与 `result_labels` 重叠。" + }, + "result_labels": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 10, + "description": "输出标签名(1–10 个),不得与 `source_labels` 重叠。" + } + } + }, + "MappingSchemaCreateResponse": { + "type": "object", + "properties": { + "schema_id": { + "type": "string", + "description": "创建的映射规则 ID(MongoDB ObjectID 十六进制)。" + }, + "schema_name": { + "type": "string", + "description": "映射规则名称。" + } + }, + "required": [ + "schema_id", + "schema_name" + ] + }, + "MappingSchemaUpdateRequest": { + "type": "object", + "required": [ + "schema_id" + ], + "properties": { + "schema_id": { + "type": "string", + "description": "映射规则 ID(MongoDB ObjectID 十六进制)。" + }, + "schema_name": { + "type": "string", + "maxLength": 39, + "description": "新的映射规则名称(最多 39 个字符)。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "新的描述(最多 500 个字符)。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "新的所属团队 ID,`0` 表示移除团队关联。" + } + } + }, + "MappingSchemaItem": { + "type": "object", + "description": "映射规则定义。", + "properties": { + "schema_id": { + "type": "string", + "description": "映射规则 ID(MongoDB ObjectID 十六进制)。" + }, + "schema_name": { + "type": "string", + "description": "映射规则名称。" + }, + "description": { + "type": "string", + "description": "描述。" + }, + "source_labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "查找键标签名。" + }, + "result_labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "输出标签名。" + }, + "status": { + "type": "string", + "description": "映射规则状态。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "创建者成员 ID。" + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "最后更新者成员 ID。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 时间戳(秒)。" + } + }, + "required": [ + "schema_id", + "schema_name", + "description", + "source_labels", + "result_labels", + "status", + "team_id", + "updated_by", + "creator_id" + ] + }, + "MappingSchemaListResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "映射规则总数。" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MappingSchemaItem" + }, + "description": "映射规则列表。" + } + }, + "required": [ + "total", + "items" + ] + }, + "MappingDataListRequest": { + "type": "object", + "required": [ + "schema_id" + ], + "properties": { + "schema_id": { + "type": "string", + "description": "映射规则 ID(MongoDB ObjectID 十六进制)。" + }, + "query": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "按来源标签值精确过滤。若指定 query,须包含全部来源标签。" + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "排序字段。" + }, + "asc": { + "type": "boolean", + "description": "为 `true` 时升序排列。" + }, + "p": { + "type": "integer", + "format": "int64", + "description": "页码(从 1 开始),用于页码分页。" + }, + "limit": { + "type": "integer", + "format": "int64", + "description": "每页数量(1–100,默认 20)。" + }, + "search_after_ctx": { + "type": "string", + "description": "用于游标分页的不透明游标令牌。" + } + } + }, + "MappingDataItem": { + "type": "object", + "description": "单条映射数据行。", + "properties": { + "key": { + "type": "string", + "description": "由来源标签值组合生成的唯一键。" + }, + "fields": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "该行所有标签的键值对。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 时间戳(秒)。" + } + } + }, + "MappingDataListResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MappingDataItem" + }, + "description": "数据行列表。" + }, + "total": { + "type": "integer", + "format": "int64", + "description": "匹配的总行数。" + }, + "has_next_page": { + "type": "boolean", + "description": "是否存在更多页。" + }, + "search_after_ctx": { + "type": "string", + "description": "用于获取下一页的游标令牌。" + } + }, + "required": [ + "items", + "total", + "has_next_page" + ] + }, + "MappingDataUpsertRequest": { + "type": "object", + "required": [ + "schema_id", + "docs" + ], + "properties": { + "schema_id": { + "type": "string", + "description": "映射规则 ID(MongoDB ObjectID 十六进制)。" + }, + "docs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxItems": 1000, + "description": "待插入或更新的数据行,每行须包含所有来源标签和结果标签的值。" + } + } + }, + "MappingDataUpsertResponse": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "已 Upsert 数据行的组合键列表。" + } + }, + "required": [ + "keys" + ] + }, + "MappingDataDeleteRequest": { + "type": "object", + "required": [ + "schema_id", + "keys" + ], + "properties": { + "schema_id": { + "type": "string", + "description": "映射规则 ID(MongoDB ObjectID 十六进制)。" + }, + "keys": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 100, + "description": "待删除的数据行键名列表。" + } + } + }, + "MappingDataUploadRequest": { + "type": "object", + "description": "Multipart form-data 上传请求。`schema_id` 通过查询参数传入,`file` 为 CSV 文件字段。", + "properties": { + "schema_id": { + "type": "string", + "description": "映射规则 ID(查询参数)。" + }, + "file": { + "type": "string", + "format": "binary", + "description": "待上传的 CSV 文件。" + } + } + }, + "MappingAPIIDRequest": { + "type": "object", + "required": [ + "api_id" + ], + "properties": { + "api_id": { + "type": "string", + "description": "映射 API ID(MongoDB ObjectID 十六进制)。" + } + } + }, + "MappingAPICreateRequest": { + "type": "object", + "required": [ + "api_name", + "url" + ], + "properties": { + "api_name": { + "type": "string", + "maxLength": 199, + "description": "唯一的 API 名称(最多 199 个字符)。" + }, + "description": { + "type": "string", + "description": "可选描述。" + }, + "url": { + "type": "string", + "format": "uri", + "maxLength": 500, + "description": "HTTP/HTTPS 端点 URL(最多 500 个字符)。" + }, + "insecure_skip_verify": { + "type": "boolean", + "description": "是否跳过 TLS 证书验证,默认 `false`。" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "自定义 HTTP 请求头。" + }, + "timeout": { + "type": "integer", + "description": "请求超时秒数(1–3),默认 2。" + }, + "retry_count": { + "type": "integer", + "description": "失败重试次数(0–1),默认 0。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID。" + } + } + }, + "MappingAPICreateResponse": { + "type": "object", + "properties": { + "api_id": { + "type": "string", + "description": "创建的映射 API ID(MongoDB ObjectID 十六进制)。" + }, + "api_name": { + "type": "string", + "description": "API 名称。" + } + }, + "required": [ + "api_id", + "api_name" + ] + }, + "MappingAPIUpdateRequest": { + "type": "object", + "required": [ + "api_id" + ], + "properties": { + "api_id": { + "type": "string", + "description": "映射 API ID(MongoDB ObjectID 十六进制)。" + }, + "api_name": { + "type": "string", + "maxLength": 199, + "description": "新 API 名称(最多 199 个字符)。" + }, + "description": { + "type": "string", + "description": "新描述。" + }, + "url": { + "type": "string", + "format": "uri", + "maxLength": 500, + "description": "新端点 URL(最多 500 个字符)。" + }, + "insecure_skip_verify": { + "type": "boolean", + "description": "新 TLS 跳过验证设置。" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "新请求头映射(覆盖原有值)。" + }, + "timeout": { + "type": "integer", + "description": "新超时秒数。" + }, + "retry_count": { + "type": "integer", + "description": "新重试次数。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "新所属团队 ID。" + } + } + }, + "MappingAPIItem": { + "type": "object", + "description": "映射 API 配置。", + "properties": { + "api_id": { + "type": "string", + "description": "API ID(MongoDB ObjectID 十六进制)。" + }, + "api_name": { + "type": "string", + "description": "API 名称。" + }, + "description": { + "type": "string", + "description": "描述。" + }, + "url": { + "type": "string", + "description": "端点 URL。" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "自定义请求头。" + }, + "timeout": { + "type": "integer", + "description": "请求超时秒数。" + }, + "retry_count": { + "type": "integer", + "description": "重试次数。" + }, + "insecure_skip_verify": { + "type": "boolean", + "description": "是否跳过 TLS 验证。" + }, + "status": { + "type": "string", + "description": "API 状态。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID。" + }, + "creator_id": { + "type": "integer", + "format": "int64", + "description": "创建者成员 ID。" + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "最后更新者成员 ID。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 时间戳(秒)。" + } + }, + "required": [ + "api_id", + "api_name", + "description", + "url", + "headers", + "timeout", + "retry_count", + "insecure_skip_verify", + "status", + "team_id", + "updated_by", + "creator_id" + ] + }, + "MappingAPIListResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "映射 API 总数。" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MappingAPIItem" + }, + "description": "映射 API 列表。" + } + }, + "required": [ + "total", + "items" + ] + }, + "InsightFilter": { + "type": "object", + "description": "洞察与导出接口共享的过滤参数。`severities` 至多 3 项,team/channel/responder/incident 过滤条件每项至多 100 条,时间范围不能超过一年。", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "起始时间,Unix 秒,必须大于 0。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "结束时间,Unix 秒,必须大于 `start_time`。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按团队 ID 过滤,至多 100 项。" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按协作空间 ID 过滤,至多 100 项。" + }, + "responder_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按处理人员 ID 过滤,至多 100 项。" + }, + "severities": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ] + }, + "description": "按严重程度过滤,至多 3 项。" + }, + "incident_ids": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "description": "按故障 ID(MongoDB ObjectID)过滤,至多 100 项。" + }, + "query": { + "type": "string", + "description": "作用于故障标题与描述的全文关键字。" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "标签过滤(精确匹配)。" + }, + "fields": { + "type": "object", + "additionalProperties": true, + "description": "自定义字段过滤(精确匹配)。" + }, + "orderby": { + "type": "string", + "enum": [ + "created_at" + ], + "description": "底层故障集合的排序字段。" + }, + "asc": { + "type": "boolean", + "description": "为 `true` 时升序,否则降序。" + }, + "is_my_team": { + "type": "boolean", + "description": "是否仅返回调用者所属团队的数据。若调用者无任何团队,返回空集合。" + }, + "time_zone": { + "type": "string", + "description": "IANA 时区名(如 `Asia/Shanghai`),用于解释时间范围。默认使用账户时区。" + }, + "seconds_to_close_from": { + "type": "integer", + "format": "int64", + "description": "解决时长下界(秒,包含)。" + }, + "seconds_to_close_to": { + "type": "integer", + "format": "int64", + "description": "解决时长上界(秒,不包含)。两端同时设置时,必须大于 `seconds_to_close_from`。" + }, + "seconds_to_ack_from": { + "type": "integer", + "format": "int64", + "description": "认领时长下界(秒,包含)。" + }, + "seconds_to_ack_to": { + "type": "integer", + "format": "int64", + "description": "认领时长上界(秒,不包含)。两端同时设置时,必须大于 `seconds_to_ack_from`。" + }, + "export_fields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "导出 CSV 时要包含的列键子集,至多 50 项。仅导出接口会读取。" + }, + "description_html_to_text": { + "type": "boolean", + "description": "导出时是否将描述列中的 HTML 标签转换为纯文本。" + } + } + }, + "InsightQueryRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightFilter" + }, + { + "type": "object", + "description": "洞察维度聚合请求。在 InsightFilter 基础上增加聚合控制字段。", + "properties": { + "split_hours": { + "type": "boolean", + "description": "为 `true` 时将指标拆分为 `work`/`sleep`/`off` 时段。" + }, + "aggregate_unit": { + "type": "string", + "enum": [ + "day", + "week", + "month" + ], + "description": "将指标按时间粒度聚合。设置后时间范围须不少于 24 小时;`day` 粒度时范围不得超过 31 天。" + } + } + } + ] + }, + "InsightIncidentListRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightFilter" + }, + { + "type": "object", + "description": "故障分页列表请求。在 InsightFilter 基础上增加分页字段。", + "properties": { + "p": { + "type": "integer", + "minimum": 1, + "default": 1, + "description": "页码,从 1 开始,默认 1。" + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 20, + "description": "每页条数,范围 1-100,默认 20。" + }, + "search_after_ctx": { + "type": "string", + "description": "上一页返回的游标 token,下一页请求时回传。" + } + } + } + ] + }, + "InsightIncidentExportRequest": { + "$ref": "#/components/schemas/InsightFilter" + }, + "InsightTopkAlertByLabelRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightQueryRequest" + }, + { + "type": "object", + "required": [ + "label" + ], + "properties": { + "label": { + "type": "string", + "enum": [ + "check", + "resource" + ], + "description": "聚合维度。" + }, + "k": { + "type": "integer", + "description": "返回前 K 条记录,取值范围 1-100。" + }, + "orderby": { + "type": "string", + "enum": [ + "total_alert_cnt", + "total_alert_event_cnt" + ], + "description": "排序字段。" + }, + "asc": { + "type": "boolean", + "description": "为 `true` 时升序,否则降序。" + } + } + } + ] + }, + "MetricsBase": { + "type": "object", + "description": "每条聚合洞察行都带有的共享维度字段。", + "properties": { + "hours": { + "type": "string", + "enum": [ + "work", + "sleep", + "off" + ], + "description": "启用 `split_hours` 时的时段桶。" + }, + "ts": { + "type": "integer", + "format": "int64", + "description": "聚合桶的起始时间(Unix 秒)。在使用 `aggregate_unit` 时返回。" + }, + "channel_id": { + "type": "integer", + "format": "int64" + }, + "team_id": { + "type": "integer", + "format": "int64" + }, + "responder_id": { + "type": "integer", + "format": "int64" + }, + "account_id": { + "type": "integer", + "format": "int64" + }, + "team_name": { + "type": "string" + }, + "channel_name": { + "type": "string" + }, + "responder_name": { + "type": "string" + } + } + }, + "DimensionInsightItem": { + "allOf": [ + { + "$ref": "#/components/schemas/MetricsBase" + }, + { + "type": "object", + "description": "按账户/团队/协作空间聚合的故障与告警指标。", + "properties": { + "total_incident_cnt": { + "type": "integer", + "format": "int64" + }, + "total_incidents_acknowledged": { + "type": "integer", + "format": "int64" + }, + "total_incidents_closed": { + "type": "integer", + "format": "int64" + }, + "total_incidents_auto_closed": { + "type": "integer", + "format": "int64" + }, + "total_incidents_manually_closed": { + "type": "integer", + "format": "int64" + }, + "total_incidents_timeout_closed": { + "type": "integer", + "format": "int64" + }, + "total_incidents_escalated": { + "type": "integer", + "format": "int64" + }, + "total_incidents_manually_escalated": { + "type": "integer", + "format": "int64" + }, + "total_incidents_timeout_escalated": { + "type": "integer", + "format": "int64" + }, + "total_incidents_reassigned": { + "type": "integer", + "format": "int64" + }, + "total_interruptions": { + "type": "integer", + "format": "int64" + }, + "total_notifications": { + "type": "integer", + "format": "int64" + }, + "total_engaged_seconds": { + "type": "integer", + "format": "int64" + }, + "total_seconds_to_ack": { + "type": "integer", + "format": "int64" + }, + "total_seconds_to_close": { + "type": "integer", + "format": "int64" + }, + "mean_seconds_to_ack": { + "type": "number", + "format": "double" + }, + "mean_seconds_to_close": { + "type": "number", + "format": "double" + }, + "noise_reduction_pct": { + "type": "number", + "format": "double" + }, + "acknowledgement_pct": { + "type": "number", + "format": "double" + }, + "total_alert_cnt": { + "type": "integer", + "format": "int64" + }, + "total_alert_event_cnt": { + "type": "integer", + "format": "int64" + } + } + } + ] + }, + "ResponderInsightItem": { + "allOf": [ + { + "$ref": "#/components/schemas/MetricsBase" + }, + { + "type": "object", + "description": "按单个处理人员聚合的故障指标。", + "properties": { + "total_incident_cnt": { + "type": "integer", + "format": "int64" + }, + "total_incidents_acknowledged": { + "type": "integer", + "format": "int64" + }, + "total_incidents_reassigned": { + "type": "integer", + "format": "int64" + }, + "total_incidents_escalated": { + "type": "integer", + "format": "int64" + }, + "total_incidents_timeout_escalated": { + "type": "integer", + "format": "int64" + }, + "total_incidents_manually_escalated": { + "type": "integer", + "format": "int64" + }, + "total_interruptions": { + "type": "integer", + "format": "int64" + }, + "total_notifications": { + "type": "integer", + "format": "int64" + }, + "total_engaged_seconds": { + "type": "integer", + "format": "int64" + }, + "total_seconds_to_ack": { + "type": "integer", + "format": "int64" + }, + "mean_seconds_to_ack": { + "type": "number", + "format": "double" + }, + "acknowledgement_pct": { + "type": "number", + "format": "double" + } + } + } + ] + }, + "DimensionInsightResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DimensionInsightItem" + } + } + } + }, + "ResponderInsightResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResponderInsightItem" + } + } + } + }, + "IncidentRawItem": { + "type": "object", + "description": "分析看板故障列表返回的原始故障记录,附带每条故障的处理效能指标。", + "properties": { + "incident_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "team_id": { + "type": "integer", + "format": "int64" + }, + "team_name": { + "type": "string" + }, + "channel_id": { + "type": "integer", + "format": "int64" + }, + "channel_name": { + "type": "string" + }, + "progress": { + "type": "string", + "description": "故障进度状态(如 `Triggered`、`Acknowledged`、`Closed`)。" + }, + "severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info", + "Ok" + ] + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "closed_by": { + "type": "string", + "enum": [ + "auto", + "timeout", + "manually" + ] + }, + "seconds_to_ack": { + "type": "integer", + "format": "int64" + }, + "seconds_to_close": { + "type": "integer", + "format": "int64" + }, + "engaged_seconds": { + "type": "integer", + "format": "int64" + }, + "hours": { + "type": "string" + }, + "responders": { + "type": "array", + "items": { + "type": "object", + "description": "处理人员条目(结构详见故障模块)。" + } + }, + "assigned_to": { + "type": "object", + "description": "故障的当前分派目标。", + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "直接分派给该故障的成员 ID 列表。" + }, + "escalate_rule_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "驱动分派的升级规则 ID(MongoDB ObjectID)。" + }, + "escalate_rule_name": { + "type": "string", + "description": "升级规则的显示名称。" + }, + "layer_idx": { + "type": "integer", + "description": "升级规则中的当前级别索引。" + }, + "type": { + "type": "string", + "enum": [ + "assign", + "reassign", + "escalate", + "reopen" + ], + "description": "分派类型。" + }, + "assigned_at": { + "type": "integer", + "format": "int64", + "description": "本次分派发生的时间戳(Unix 秒)。" + }, + "id": { + "type": "string", + "description": "内部分派记录 ID。" + } + } + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "fields": { + "type": "object", + "additionalProperties": true + }, + "notifications": { + "type": "integer", + "format": "int64" + }, + "interruptions": { + "type": "integer", + "format": "int64" + }, + "assignments": { + "type": "integer", + "format": "int64" + }, + "reassignments": { + "type": "integer", + "format": "int64" + }, + "acknowledgements": { + "type": "integer", + "format": "int64" + }, + "escalations": { + "type": "integer", + "format": "int64" + }, + "timeout_escalations": { + "type": "integer", + "format": "int64" + }, + "manual_escalations": { + "type": "integer", + "format": "int64" + }, + "creator_id": { + "type": "integer", + "format": "int64" + }, + "creator_name": { + "type": "string" + } + } + }, + "InsightIncidentListResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "匹配的故障总数。" + }, + "has_next_page": { + "type": "boolean" + }, + "search_after_ctx": { + "type": "string", + "description": "用于翻下一页的游标 token,下次请求时通过 `search_after_ctx` 回传。" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentRawItem" + } + } + } + }, + "InsightAlertByLabelItem": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "聚合键取值(check 名或 resource 标识)。" + }, + "hours": { + "type": "string", + "description": "启用 `split_hours` 时的时段桶。" + }, + "total_alert_cnt": { + "type": "integer", + "format": "int64" + }, + "total_alert_event_cnt": { + "type": "integer", + "format": "int64" + } + } + }, + "InsightAlertByLabelResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InsightAlertByLabelItem" + } + } + } + }, + "StatusPageChangeItem": { + "type": "object", + "description": "状态页事件(故障或维护)。", + "required": [ + "change_id", + "type", + "title" + ], + "properties": { + "change_id": { + "type": "integer", + "format": "int64", + "description": "事件 ID。" + }, + "page_id": { + "type": "integer", + "format": "int64", + "description": "所属状态页 ID。" + }, + "type": { + "type": "string", + "enum": [ + "incident", + "maintenance" + ], + "description": "事件类型。" + }, + "title": { + "type": "string", + "description": "事件标题。" + }, + "description": { + "type": "string", + "description": "事件描述(Markdown)。" + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "事件当前状态。故障事件支持 `investigating`/`identified`/`monitoring`/`resolved`;维护事件支持 `scheduled`/`ongoing`/`completed`。" + }, + "affected_components": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AffectedStatusPageComponentItem" + }, + "description": "当前受此事件影响的组件及其状态。" + }, + "responder_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "事件负责成员 ID 列表。" + }, + "linked_change_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "关联的事件 ID 列表(相关故障、发布等)。" + }, + "start_at_seconds": { + "type": "integer", + "format": "int64", + "description": "事件开始时间(Unix 秒)。" + }, + "close_at_seconds": { + "type": "integer", + "format": "int64", + "description": "计划结束时间(Unix 秒)。回溯事件和维护事件会设置此字段。" + }, + "is_retrospective": { + "type": "boolean", + "description": "是否为回溯(历史)事件。" + }, + "updates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusPageChangeUpdateItem" + }, + "description": "事件的时间线更新列表,按时间排序。" + }, + "notify_subscribers": { + "type": "boolean", + "description": "创建本事件时是否通知订阅者。" + }, + "auto_update_by_schedule": { + "type": "boolean", + "description": "仅维护事件:是否根据计划窗口自动推进状态。" + } + } + }, + "AffectedStatusPageComponentItem": { + "type": "object", + "description": "事件当前影响的状态页组件,包含组件元数据及其状态。", + "required": [ + "name", + "status" + ], + "properties": { + "component_id": { + "type": "string", + "description": "组件 ID。" + }, + "section_id": { + "type": "string", + "description": "所属区域 ID。" + }, + "name": { + "type": "string", + "description": "组件显示名称。" + }, + "description": { + "type": "string", + "description": "组件描述。" + }, + "available_since_seconds": { + "type": "integer", + "format": "int64", + "description": "组件首次可用时间(Unix 秒)。" + }, + "order_id": { + "type": "integer", + "format": "int64", + "description": "在所属区域内的显示顺序。" + }, + "hide_uptime": { + "type": "boolean", + "description": "为 true 时在摘要响应中隐藏可用率数据。" + }, + "hide_all": { + "type": "boolean", + "description": "为 true 时从摘要接口中完全隐藏该组件。" + }, + "status": { + "type": "string", + "enum": [ + "operational", + "degraded", + "partial_outage", + "full_outage", + "under_maintenance" + ], + "description": "事件导致的组件当前状态。" + } + } + }, + "StatusPageChangeUpdateItem": { + "type": "object", + "description": "状态页事件的单条时间线更新。", + "required": [ + "update_id", + "at_seconds" + ], + "properties": { + "update_id": { + "type": "string", + "description": "更新 ID。" + }, + "at_seconds": { + "type": "integer", + "format": "int64", + "description": "更新时间戳(Unix 秒)。" + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "本次更新后的事件状态。当更新不改变整体状态时省略。" + }, + "description": { + "type": "string", + "description": "更新说明(Markdown)。" + }, + "component_changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusPageComponentChangeItem" + }, + "description": "本次更新应用的组件状态变更。" + } + } + }, + "StatusPageComponentChangeItem": { + "type": "object", + "description": "时间线更新中的组件状态变更。", + "required": [ + "component_id", + "status" + ], + "properties": { + "component_id": { + "type": "string", + "description": "组件 ID。" + }, + "component_name": { + "type": "string", + "description": "组件显示名称。读取时由后端填充,写入时忽略。" + }, + "status": { + "type": "string", + "enum": [ + "operational", + "degraded", + "partial_outage", + "full_outage", + "under_maintenance" + ], + "description": "组件新状态。故障事件支持 `operational`/`degraded`/`partial_outage`/`full_outage`;维护事件支持 `operational`/`under_maintenance`。" + } + } + }, + "StatusPageChangeListResponse": { + "type": "object", + "description": "状态页事件列表。", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusPageChangeItem" + } + } + } + }, + "StatusPageChangeCreateResponse": { + "type": "object", + "description": "创建状态页事件的结果。", + "required": [ + "change_id", + "change_name" + ], + "properties": { + "change_id": { + "type": "integer", + "format": "int64", + "description": "新创建的事件 ID。" + }, + "change_name": { + "type": "string", + "description": "事件标题(来自请求)。" + } + } + }, + "UpdateStatusPageChangeRequest": { + "type": "object", + "description": "更新状态页事件可编辑字段所需的参数。", + "required": [ + "page_id", + "change_id" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "状态页 ID。" + }, + "change_id": { + "type": "integer", + "format": "int64", + "description": "目标事件 ID。" + }, + "title": { + "type": "string", + "maxLength": 255, + "description": "新的事件标题,最多 255 个字符。留空表示保持原值。" + }, + "responders": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "事件负责成员 ID 列表。传入完整替换列表。" + }, + "linked_changes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "关联的事件 ID 列表。传入完整替换列表。" + } + } + }, + "DeleteStatusPageChangeRequest": { + "type": "object", + "description": "删除状态页事件所需的参数。", + "required": [ + "page_id", + "change_id" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "状态页 ID。" + }, + "change_id": { + "type": "integer", + "format": "int64", + "description": "目标事件 ID。" + } + } + }, + "StatusPageChangeTimelineCreateResponse": { + "type": "object", + "description": "向状态页事件追加时间线更新的结果。", + "required": [ + "update_id" + ], + "properties": { + "update_id": { + "type": "string", + "description": "新创建的更新 ID。" + } + } + }, + "UpdateStatusPageChangeTimelineRequest": { + "type": "object", + "description": "更新状态页事件已有时间线条目所需的参数。", + "required": [ + "page_id", + "change_id", + "update_id" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "状态页 ID。" + }, + "change_id": { + "type": "integer", + "format": "int64", + "description": "所属事件 ID。" + }, + "update_id": { + "type": "string", + "description": "目标时间线更新 ID。" + }, + "at_seconds": { + "type": "integer", + "format": "int64", + "description": "新的更新时间戳(Unix 秒)。" + }, + "description": { + "type": "string", + "description": "新的更新说明(Markdown)。" + } + } + }, + "DeleteStatusPageChangeTimelineRequest": { + "type": "object", + "description": "删除状态页事件时间线条目所需的参数。", + "required": [ + "page_id", + "change_id", + "update_id" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "状态页 ID。" + }, + "change_id": { + "type": "integer", + "format": "int64", + "description": "所属事件 ID。" + }, + "update_id": { + "type": "string", + "description": "要删除的时间线更新 ID。" + } + } + }, + "StatusPageSubscriberListResponse": { + "type": "object", + "description": "状态页订阅者分页列表。", + "required": [ + "total", + "has_next_page", + "items" + ], + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "匹配的订阅者总数。" + }, + "has_next_page": { + "type": "boolean", + "description": "当前页之后是否还有下一页。" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportedStatusPageSubscriberItem" + } + } + } + }, + "ExportedStatusPageSubscriberItem": { + "type": "object", + "description": "状态页订阅者,供订阅者列表和导出接口返回。", + "required": [ + "recipient", + "method", + "components", + "all" + ], + "properties": { + "recipient": { + "type": "string", + "description": "订阅接收方:公开状态页为邮箱地址,内部状态页为用户 ID。" + }, + "method": { + "type": "string", + "enum": [ + "email", + "im" + ], + "description": "订阅通知方式。" + }, + "components": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusPageComponentItem" + }, + "description": "该订阅者订阅的组件列表。" + }, + "all": { + "type": "boolean", + "description": "是否订阅全部组件。" + }, + "locale": { + "type": "string", + "description": "通知的首选语言。" + } + } + }, + "StatusPageComponentItem": { + "type": "object", + "description": "状态页组件。", + "required": [ + "name" + ], + "properties": { + "component_id": { + "type": "string", + "description": "组件 ID。" + }, + "section_id": { + "type": "string", + "description": "所属区域 ID。" + }, + "name": { + "type": "string", + "description": "组件显示名称。" + }, + "description": { + "type": "string", + "description": "组件描述。" + }, + "available_since_seconds": { + "type": "integer", + "format": "int64", + "description": "组件首次可用时间(Unix 秒)。" + }, + "order_id": { + "type": "integer", + "format": "int64", + "description": "在所属区域内的显示顺序。" + }, + "hide_uptime": { + "type": "boolean", + "description": "为 true 时在摘要响应中隐藏可用率数据。" + }, + "hide_all": { + "type": "boolean", + "description": "为 true 时从摘要接口中完全隐藏该组件。" + } + } + }, + "ImportStatusPageSubscribersRequest": { + "type": "object", + "description": "批量导入订阅者所需的参数。每个订阅者的 `recipient` 非空且不超过 255 字符;并且至少订阅一个组件/事件,或将 `all` 置为 true。", + "required": [ + "page_id", + "method" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "目标状态页 ID。" + }, + "method": { + "type": "string", + "enum": [ + "email", + "im" + ], + "description": "订阅通知方式。`email` 仅适用于公开状态页,`im` 仅适用于内部状态页。" + }, + "subscribers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportStatusPageSubscriberItem" + }, + "description": "要导入的订阅者列表。" + } + } + }, + "ImportStatusPageSubscriberItem": { + "type": "object", + "description": "单个待导入的订阅者。", + "required": [ + "recipient" + ], + "properties": { + "recipient": { + "type": "string", + "maxLength": 255, + "description": "邮箱地址(公开状态页)或用户 ID(内部状态页)。" + }, + "component_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "订阅者需要接收通知的组件 ID 列表。" + }, + "change_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "订阅者需要接收通知的特定事件 ID 列表。" + }, + "all": { + "type": "boolean", + "description": "为 true 时订阅所有组件。当 `component_ids` 与 `change_ids` 均为空时必须为 true。" + }, + "locale": { + "type": "string", + "description": "通知的首选语言。留空时使用请求语言。" + } + } + }, + "ExportStatusPageSubscribersRequest": { + "type": "object", + "description": "导出状态页订阅者列表所需的参数。", + "required": [ + "page_id" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "状态页 ID。" + }, + "component_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "可选:按组件 ID 过滤订阅者。" + } + } + }, + "StatusPageSubscriberExportResponse": { + "type": "string", + "format": "binary", + "description": "CSV 文件(Content-Type: text/csv; charset=utf-8),包含列:Method、Recipient、Components、Subscribe All、Locale。" + }, + "MigrateStatusPageStructureRequest": { + "type": "object", + "description": "启动 Atlassian Statuspage 结构与历史迁移任务所需的参数。", + "required": [ + "api_key", + "source_page_id" + ], + "properties": { + "api_key": { + "type": "string", + "description": "可访问源状态页的 Atlassian Statuspage API Key。" + }, + "source_page_id": { + "type": "string", + "description": "Atlassian Statuspage 源状态页 ID。" + } + } + }, + "MigrateStatusPageEmailSubscribersRequest": { + "type": "object", + "description": "启动 Atlassian Statuspage 邮件订阅者迁移任务所需的参数。", + "required": [ + "api_key", + "source_page_id", + "target_page_id" + ], + "properties": { + "api_key": { + "type": "string", + "description": "可访问源状态页的 Atlassian Statuspage API Key。" + }, + "source_page_id": { + "type": "string", + "description": "Atlassian Statuspage 源状态页 ID。" + }, + "target_page_id": { + "type": "integer", + "format": "int64", + "description": "接收导入订阅者的 Flashduty 目标状态页 ID。" + } + } + }, + "StatusPageMigrationStartResponse": { + "type": "object", + "description": "启动迁移任务的结果。", + "required": [ + "job_id" + ], + "properties": { + "job_id": { + "type": "string", + "description": "迁移任务 ID。用于查询状态或请求取消。" + } + } + }, + "StatusPageMigrationJob": { + "type": "object", + "description": "迁移任务的当前状态及进度。", + "required": [ + "job_id", + "account_id", + "source_page_id", + "target_page_id", + "phase", + "status", + "progress", + "created_at", + "updated_at" + ], + "properties": { + "job_id": { + "type": "string", + "description": "迁移任务 ID。" + }, + "account_id": { + "type": "integer", + "format": "int64", + "description": "所属账户 ID。" + }, + "source_page_id": { + "type": "string", + "description": "Atlassian Statuspage 源状态页 ID。" + }, + "target_page_id": { + "type": "integer", + "format": "int64", + "description": "Flashduty 目标状态页 ID。任务产出后设置,或由订阅者迁移接口上游传入。" + }, + "phase": { + "type": "string", + "enum": [ + "structure", + "history", + "subscribers" + ], + "description": "当前迁移阶段。" + }, + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "completed", + "failed", + "cancelled" + ], + "description": "任务当前状态。" + }, + "progress": { + "$ref": "#/components/schemas/StatusPageMigrationProgress", + "description": "按实体类型的进度计数。" + }, + "error": { + "type": "string", + "description": "`status` 为 `failed` 时的终态错误信息。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "任务创建时间(Unix 秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "任务最近一次状态更新时间(Unix 秒)。" + } + } + }, + "StatusPageMigrationProgress": { + "type": "object", + "description": "迁移任务的进度计数。", + "required": [ + "total_steps", + "completed_steps", + "components_imported", + "sections_imported", + "incidents_imported", + "maintenances_imported", + "subscribers_imported", + "templates_imported", + "subscribers_skipped" + ], + "properties": { + "total_steps": { + "type": "integer", + "description": "任务包含的总步骤数。" + }, + "completed_steps": { + "type": "integer", + "description": "已完成的步骤数。" + }, + "components_imported": { + "type": "integer" + }, + "sections_imported": { + "type": "integer" + }, + "incidents_imported": { + "type": "integer" + }, + "maintenances_imported": { + "type": "integer" + }, + "subscribers_imported": { + "type": "integer" + }, + "templates_imported": { + "type": "integer" + }, + "subscribers_skipped": { + "type": "integer", + "description": "跳过的订阅者数量(例如重复)。" + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + }, + "description": "任务执行过程中记录的非致命警告。" + } + } + }, + "CancelStatusPageMigrationRequest": { + "type": "object", + "description": "取消进行中迁移任务所需的参数。", + "required": [ + "job_id" + ], + "properties": { + "job_id": { + "type": "string", + "description": "迁移任务 ID。" + } + } + }, + "CreateStatusPageChangeRequest": { + "type": "object", + "description": "创建状态页故障或维护事件所需的参数。首条更新必须包含 `component_changes` 以声明受影响组件;回溯事件至少需要 2 条更新。", + "required": [ + "page_id", + "type", + "title", + "status", + "updates" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "状态页 ID。" + }, + "type": { + "type": "string", + "enum": [ + "incident", + "maintenance" + ], + "description": "事件类型。" + }, + "title": { + "type": "string", + "maxLength": 255, + "description": "事件标题,最多 255 个字符。" + }, + "description": { + "type": "string", + "description": "事件描述(支持 Markdown),必填。" + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "事件初始状态。故障事件支持 `investigating`/`identified`/`monitoring`/`resolved`;维护事件支持 `scheduled`/`ongoing`/`completed`。" + }, + "start_at_seconds": { + "type": "integer", + "format": "int64", + "description": "事件开始时间(Unix 秒)。留空时默认为当前时间。" + }, + "responders": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "事件负责成员 ID 列表。" + }, + "linked_changes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "关联的事件 ID 列表(相关故障、发布等)。" + }, + "close_at_seconds": { + "type": "integer", + "format": "int64", + "description": "回溯事件的结束时间,需大于 `start_at_seconds`。" + }, + "updates": { + "type": "array", + "items": { + "type": "object", + "description": "时间线更新条目。", + "properties": { + "update_id": { + "type": "string", + "description": "更新 ID。创建时由服务端生成;回溯历史更新时可手动指定。" + }, + "at_seconds": { + "type": "integer", + "format": "int64", + "description": "更新时间戳(Unix 秒)。" + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "更新后的事件状态。若整体状态未变化可省略。" + }, + "description": { + "type": "string", + "description": "更新说明(支持 Markdown)。" + }, + "component_changes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "component_id", + "status" + ], + "properties": { + "component_id": { + "type": "string", + "description": "组件 ID。" + }, + "status": { + "type": "string", + "enum": [ + "operational", + "degraded", + "partial_outage", + "full_outage", + "under_maintenance" + ], + "description": "组件新状态。故障事件支持 `operational`/`degraded`/`partial_outage`/`full_outage`;维护事件支持 `operational`/`under_maintenance`。" + } + } + }, + "description": "本次更新应用的组件状态变更。" + } + } + }, + "description": "时间线更新列表。即时事件一般只传一条;回溯事件需传入全部历史更新。" + }, + "notify_subscribers": { + "type": "boolean", + "description": "是否通知订阅者本事件及其所有更新。" + }, + "auto_update_by_schedule": { + "type": "boolean", + "description": "仅维护事件:根据计划窗口自动推进状态。" + }, + "is_retrospective": { + "type": "boolean", + "description": "标记为回溯(历史)事件。" + } + } + }, + "CreateStatusPageChangeTimelineRequest": { + "type": "object", + "description": "向状态页事件时间线追加一条更新所需的参数。", + "required": [ + "page_id", + "change_id", + "status" + ], + "properties": { + "page_id": { + "type": "integer", + "format": "int64", + "description": "状态页 ID。" + }, + "change_id": { + "type": "integer", + "format": "int64", + "description": "目标事件 ID。" + }, + "at_seconds": { + "type": "integer", + "format": "int64", + "description": "更新时间戳(Unix 秒),留空时默认为当前时间。" + }, + "status": { + "type": "string", + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "更新后的事件状态,需与事件类型匹配。当状态切换为 `resolved` 或 `completed` 时,所有关联组件必须恢复为 `operational`。" + }, + "description": { + "type": "string", + "description": "更新说明(支持 Markdown),必填。" + }, + "component_changes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "component_id", + "status" + ], + "properties": { + "component_id": { + "type": "string", + "description": "组件 ID。" + }, + "status": { + "type": "string", + "enum": [ + "operational", + "degraded", + "partial_outage", + "full_outage", + "under_maintenance" + ], + "description": "组件新状态。故障事件支持 `operational`/`degraded`/`partial_outage`/`full_outage`;维护事件支持 `operational`/`under_maintenance`。" + } + } + }, + "description": "本次更新应用的组件状态变更。组件 ID 不能重复。" + } + } + }, + "RuleListRequest": { + "type": "object", + "description": "按文件夹查询规则的过滤参数。", + "properties": { + "folder_id": { + "type": "integer", + "format": "uint64", + "description": "文件夹 ID,设为 0 可列出所有可访问规则。" + } + } + }, + "AlertRuleBasic": { + "type": "object", + "description": "列表视图用的告警规则基础信息。", + "required": [ + "id", + "account_id", + "folder_id", + "name", + "ds_type", + "enabled", + "debug_log_enabled", + "cron_pattern", + "delay_seconds", + "creator_id", + "creator_name", + "updater_id", + "updater_name", + "created_at", + "updated_at", + "triggered" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "唯一规则 ID。" + }, + "account_id": { + "type": "integer", + "format": "uint64", + "description": "账户 ID。" + }, + "folder_id": { + "type": "integer", + "format": "uint64", + "description": "文件夹 ID。" + }, + "name": { + "type": "string", + "description": "规则名称。" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "自定义标签。" + }, + "ds_type": { + "type": "string", + "description": "数据源类型,如 `prometheus`。" + }, + "enabled": { + "type": "boolean", + "description": "规则是否启用。" + }, + "debug_log_enabled": { + "type": "boolean", + "description": "是否启用调试日志。" + }, + "cron_pattern": { + "type": "string", + "description": "5 字段 cron 调度,如 `* * * * *`。" + }, + "delay_seconds": { + "type": "integer", + "description": "评估延迟(秒)。" + }, + "creator_id": { + "type": "integer", + "format": "uint64" + }, + "creator_name": { + "type": "string" + }, + "updater_id": { + "type": "integer", + "format": "uint64" + }, + "updater_name": { + "type": "string" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "triggered": { + "type": "boolean", + "description": "是否有当前活跃告警。" + } + } + }, + "RuleBasicListResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertRuleBasic" + }, + "description": "告警规则基础信息列表。" + }, + "RuleConfigs": { + "type": "object", + "description": "规则评估配置。", + "properties": { + "queries": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "查询标识符(字母,如 `A`)。`R` 为保留名称,不可使用。" + }, + "expr": { + "type": "string", + "description": "查询表达式。" + }, + "label_fields": { + "type": "array", + "items": { + "type": "string" + } + }, + "value_fields": { + "type": "array", + "items": { + "type": "string" + } + }, + "args": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "relate_queries": { + "type": "array", + "description": "可选的辅助查询,其结果作为上下文附加到告警事件中。每项须有唯一的 `name`(不与任何 query 名称重复)且 `expr` 非空。", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "辅助查询标识符。" + }, + "expr": { + "type": "string", + "description": "查询表达式。" + }, + "args": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "check_threshold": { + "type": "object", + "description": "阈值检查配置。", + "properties": { + "enabled": { + "type": "boolean" + }, + "alerting_check_times": { + "type": "integer" + }, + "recovery_check_times": { + "type": "integer" + }, + "push_recovery_event": { + "type": "boolean" + }, + "critical": { + "type": "string" + }, + "warning": { + "type": "string" + }, + "info": { + "type": "string" + }, + "recovery": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "invert", + "threshold", + "ql" + ] + }, + "condition": { + "type": "string" + } + } + } + } + }, + "check_anydata": { + "type": "object", + "description": "有数据检查配置。查询返回任意数据行时触发告警。", + "properties": { + "enabled": { + "type": "boolean" + }, + "alerting_check_times": { + "type": "integer" + }, + "recovery_check_times": { + "type": "integer" + }, + "push_recovery_event": { + "type": "boolean" + }, + "severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info" + ] + }, + "recovery": { + "type": "object", + "description": "有数据检查的恢复条件。省略或 `mode` 为空时按 `nodata` 处理。", + "properties": { + "mode": { + "type": "string", + "enum": [ + "nodata", + "ql" + ], + "description": "`nodata` = 查询无数据时恢复;`ql` = `condition` 表达式为真时恢复。`mode` 为 `ql` 时,仅允许单个查询(`name=A`)。" + }, + "condition": { + "type": "string", + "description": "恢复表达式,`mode` 为 `ql` 时必填。" + }, + "args": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "check_nodata": { + "type": "object", + "description": "无数据检查配置。", + "properties": { + "enabled": { + "type": "boolean" + }, + "alerting_check_times": { + "type": "integer" + }, + "recovery_check_times": { + "type": "integer" + }, + "push_recovery_event": { + "type": "boolean" + }, + "severity": { + "type": "string", + "enum": [ + "Critical", + "Warning", + "Info" + ] + }, + "resolve_timeout": { + "type": "integer", + "description": "自动恢复等待时间(秒)。" + } + } + } + } + }, + "AlertRule": { + "type": "object", + "description": "完整的告警规则配置。", + "properties": { + "id": { + "type": "integer", + "format": "uint64" + }, + "account_id": { + "type": "integer", + "format": "uint64" + }, + "folder_id": { + "type": "integer", + "format": "uint64", + "description": "规则所属文件夹。" + }, + "name": { + "type": "string", + "description": "规则名称。" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "自定义标签。" + }, + "ds_type": { + "type": "string", + "description": "数据源类型。" + }, + "ds_list": { + "type": "array", + "items": { + "type": "string" + }, + "description": "数据源名称模式(支持通配符)。" + }, + "ds_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "具体数据源 ID 列表。" + }, + "enabled": { + "type": "boolean" + }, + "debug_log_enabled": { + "type": "boolean" + }, + "rule_configs": { + "$ref": "#/components/schemas/RuleConfigs" + }, + "cron_pattern": { + "type": "string", + "description": "5 字段 cron 调度。" + }, + "delay_seconds": { + "type": "integer" + }, + "enabled_times": { + "type": "array", + "description": "规则生效的时间窗口。", + "items": { + "type": "object", + "properties": { + "days": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "星期几(0=周日)。" + }, + "stime": { + "type": "string", + "description": "开始时间,如 `09:00`。" + }, + "etime": { + "type": "string", + "description": "结束时间,如 `18:00`。" + } + } + } + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description_type": { + "type": "string", + "enum": [ + "text", + "markdown" + ] + }, + "description": { + "type": "string" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "告警发送到的协作空间 ID 列表。" + }, + "repeat_interval": { + "type": "integer", + "format": "int64", + "description": "通知重复间隔(秒)。" + }, + "repeat_total": { + "type": "integer", + "format": "int64", + "description": "最大重复通知次数。" + }, + "creator_id": { + "type": "integer", + "format": "uint64" + }, + "creator_name": { + "type": "string" + }, + "updater_id": { + "type": "integer", + "format": "uint64" + }, + "updater_name": { + "type": "string" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + } + } + }, + "AlertRuleInfoResponse": { + "allOf": [ + { + "$ref": "#/components/schemas/AlertRule" + } + ], + "description": "info 接口返回的完整告警规则,服务端赋值字段均保证存在。", + "required": [ + "id", + "account_id", + "folder_id", + "name", + "ds_type", + "enabled", + "debug_log_enabled", + "cron_pattern", + "delay_seconds", + "creator_id", + "creator_name", + "updater_id", + "updater_name", + "created_at", + "updated_at" + ] + }, + "RuleIDRequest": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "规则 ID。" + } + } + }, + "RuleIDsRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "规则 ID 列表。" + } + } + }, + "RuleEmptyRequest": { + "type": "object", + "description": "不需要任何参数。", + "additionalProperties": false + }, + "RuleEmptyResponse": { + "type": "object", + "description": "成功时返回空对象。", + "additionalProperties": false + }, + "RuleFolderIDRequest": { + "type": "object", + "properties": { + "folder_id": { + "type": "integer", + "format": "uint64", + "description": "文件夹 ID,0 表示所有。" + } + } + }, + "RuleFieldsUpdateRequest": { + "type": "object", + "required": [ + "ids", + "fields" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "要更新的规则 ID 列表。" + }, + "fields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "要更新的字段名列表。" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "ds_type": { + "type": "string" + }, + "ds_list": { + "type": "array", + "items": { + "type": "string" + } + }, + "ds_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + } + }, + "enabled": { + "type": "boolean" + }, + "debug_log_enabled": { + "type": "boolean" + }, + "cron_pattern": { + "type": "string" + }, + "delay_seconds": { + "type": "integer" + }, + "enabled_times": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnabledTime" + } + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description": { + "type": "string" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + } + }, + "repeat_interval": { + "type": "integer", + "format": "int64" + }, + "repeat_total": { + "type": "integer", + "format": "int64" + } + } + }, + "RuleMoveRequest": { + "type": "object", + "required": [ + "ids", + "dest_folder_id" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "要移动的规则 ID 列表。" + }, + "dest_folder_id": { + "type": "integer", + "format": "uint64", + "description": "目标文件夹 ID。" + } + } + }, + "RuleImportRequest": { + "type": "array", + "description": "要导入的告警规则导出对象数组。", + "items": { + "$ref": "#/components/schemas/AlertRule" + } + }, + "RuleImportResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameMessage" + }, + "description": "每条规则的导入结果。" + }, + "AlertRuleStatus": { + "type": "object", + "description": "文件夹节点的规则触发状态。", + "required": [ + "folder_id", + "rule_total", + "triggered_rule_count" + ], + "properties": { + "folder_id": { + "type": "integer", + "format": "uint64" + }, + "folder_name": { + "type": "string" + }, + "rule_total": { + "type": "integer", + "format": "int64", + "description": "文件夹家族内规则总数。" + }, + "triggered_rule_count": { + "type": "integer", + "format": "int64", + "description": "有活跃告警的规则数量。" + } + } + }, + "RuleStatusResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertRuleStatus" + } + }, + "AlertRuleAudit": { + "type": "object", + "description": "审计记录,保存某一时刻的规则快照。", + "required": [ + "id", + "account_id", + "alert_rule_id", + "action", + "creator_id", + "creator_name", + "created_at" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "审计记录 ID。" + }, + "account_id": { + "type": "integer", + "format": "uint64" + }, + "alert_rule_id": { + "type": "integer", + "format": "uint64", + "description": "关联的告警规则 ID。" + }, + "action": { + "type": "string", + "description": "操作类型,如 `create`、`update`。" + }, + "content": { + "type": "string", + "description": "审计时刻规则完整配置的 JSON 字符串,仅在 `/monit/rule/audit/detail` 返回,列表接口中省略。" + }, + "creator_id": { + "type": "integer", + "format": "uint64" + }, + "creator_name": { + "type": "string" + }, + "created_at": { + "type": "integer", + "format": "int64" + } + } + }, + "RuleAuditListResponse": { + "type": "array", + "description": "按创建时间倒序排列的规则审计记录列表,不含 `content` 字段。", + "items": { + "$ref": "#/components/schemas/AlertRuleAudit" + } + }, + "DSType": { + "type": "object", + "description": "告警规则可使用的数据源类型定义。", + "required": [ + "id", + "name", + "ident", + "account_id", + "weight" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64" + }, + "name": { + "type": "string", + "description": "显示名称,如 `Prometheus`。" + }, + "ident": { + "type": "string", + "description": "作为规则 `ds_type` 的标识符,如 `prometheus`。" + }, + "account_id": { + "type": "integer", + "format": "uint64", + "description": "所属账户 ID;`0` 表示全局类型。" + }, + "weight": { + "type": "integer", + "description": "排序权重,值越大越靠前。" + } + } + }, + "RuleDsTypesResponse": { + "type": "array", + "description": "当前账户可使用的数据源类型列表,包括全局类型和账户自定义类型。", + "items": { + "$ref": "#/components/schemas/DSType" + } + }, + "AlertRuleCounter": { + "type": "object", + "description": "账户规则总数的一次历史快照。", + "required": [ + "id", + "account_id", + "num", + "clock" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64" + }, + "account_id": { + "type": "integer", + "format": "uint64" + }, + "num": { + "type": "integer", + "format": "int64", + "description": "该时间点的规则数量。" + }, + "clock": { + "type": "integer", + "format": "int64", + "description": "采样时间戳(Unix 秒)。" + } + } + }, + "RuleCounterTotalResponse": { + "type": "array", + "description": "按 `clock` 升序排列的规则数量历史采样。", + "items": { + "$ref": "#/components/schemas/AlertRuleCounter" + } + }, + "RuleCounterNodeResponse": { + "type": "object", + "description": "顶层文件夹名称到规则数量的映射。", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + }, + "RuleCounterChannelResponse": { + "type": "object", + "description": "协作空间名称到规则数量的映射,无法解析的协作空间以其 ID 的字符串形式作为 key。", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + }, + "NameMessage": { + "type": "object", + "description": "批量规则操作中,单条规则的处理结果。", + "required": [ + "name", + "message" + ], + "properties": { + "name": { + "type": "string", + "description": "规则名称。" + }, + "message": { + "type": "string", + "description": "成功时为空,失败时为错误信息。" + } + } + }, + "RuleNameMessageListResponse": { + "type": "array", + "description": "批量规则操作中每条规则的处理结果列表。", + "items": { + "$ref": "#/components/schemas/NameMessage" + } + }, + "AlertRuleExport": { + "type": "object", + "description": "用于导入/导出的便携告警规则表示,省略 `id`、`account_id` 等标识字段与审计元数据。", + "required": [ + "name", + "ds_type", + "enabled", + "debug_log_enabled", + "cron_pattern" + ], + "properties": { + "name": { + "type": "string" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "ds_type": { + "type": "string" + }, + "ds_list": { + "type": "array", + "items": { + "type": "string" + } + }, + "ds_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + } + }, + "enabled": { + "type": "boolean" + }, + "debug_log_enabled": { + "type": "boolean" + }, + "rule_configs": { + "$ref": "#/components/schemas/RuleConfigs" + }, + "cron_pattern": { + "type": "string" + }, + "delay_seconds": { + "type": "integer" + }, + "enabled_times": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnabledTime" + } + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description_type": { + "type": "string", + "enum": [ + "text", + "markdown" + ] + }, + "description": { + "type": "string" + }, + "repeat_interval": { + "type": "integer", + "format": "int64" + }, + "repeat_total": { + "type": "integer", + "format": "int64" + } + } + }, + "AlertRuleExportListResponse": { + "type": "array", + "description": "导出的规则配置列表,兼容 `POST /monit/rule/import`。", + "items": { + "$ref": "#/components/schemas/AlertRuleExport" + } + }, + "EnabledTime": { + "type": "object", + "description": "规则激活时间窗口。", + "properties": { + "days": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "星期几,0 = 周日。" + }, + "stime": { + "type": "string", + "description": "起始时间,如 `09:00`。" + }, + "etime": { + "type": "string", + "description": "结束时间,如 `18:00`。" + } + } + }, + "DataSourceListRequest": { + "type": "object", + "description": "查询数据源列表的过滤参数。", + "properties": { + "type": { + "type": "string", + "description": "按数据源类型过滤,省略则返回所有类型。可选值:`prometheus`、`loki`、`mysql`、`oracle`、`postgres`、`clickhouse`、`elasticsearch`、`sls`、`victorialogs`。" + } + } + }, + "DSPayload": { + "type": "object", + "description": "与类型相关的数据源配置,仅包含与 `type_ident` 匹配的配置块。", + "properties": { + "prometheus": { + "$ref": "#/components/schemas/DSPrometheusConfig" + }, + "loki": { + "$ref": "#/components/schemas/DSLokiConfig" + }, + "mysql": { + "$ref": "#/components/schemas/DSMySQLConfig" + }, + "oracle": { + "$ref": "#/components/schemas/DSOracleConfig" + }, + "postgres": { + "$ref": "#/components/schemas/DSPostgresConfig" + }, + "clickhouse": { + "$ref": "#/components/schemas/DSClickHouseConfig" + }, + "elasticsearch": { + "$ref": "#/components/schemas/DSElasticSearchConfig" + }, + "sls": { + "$ref": "#/components/schemas/DSSLSConfig" + }, + "victorialogs": { + "$ref": "#/components/schemas/DSVictoriaLogsConfig" + } + } + }, + "DSPrometheusConfig": { + "type": "object", + "description": "Prometheus 数据源配置,TLS 字段继承自 TLSClientConfig。", + "properties": { + "basic_auth_enabled": { + "type": "boolean", + "description": "启用 HTTP Basic 认证。" + }, + "basic_auth_username": { + "type": "string", + "description": "Basic 认证用户名。" + }, + "basic_auth_password": { + "type": "string", + "description": "Basic 认证密码。" + }, + "headers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "自定义 HTTP 请求头,格式为 `Key: Value`。" + }, + "params": { + "type": "array", + "items": { + "type": "string" + }, + "description": "自定义查询参数,格式为 `key=value`。" + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + }, + "tls_key_pwd": { + "type": "string" + }, + "tls_skip_verify": { + "type": "boolean" + }, + "tls_server_name": { + "type": "string" + }, + "tls_min_version": { + "type": "string" + }, + "tls_max_version": { + "type": "string" + } + } + }, + "DSLokiConfig": { + "type": "object", + "description": "Loki 数据源配置,TLS 字段继承自 TLSClientConfig。", + "properties": { + "basic_auth_enabled": { + "type": "boolean" + }, + "basic_auth_username": { + "type": "string" + }, + "basic_auth_password": { + "type": "string" + }, + "headers": { + "type": "array", + "items": { + "type": "string" + } + }, + "params": { + "type": "array", + "items": { + "type": "string" + } + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + }, + "tls_key_pwd": { + "type": "string" + }, + "tls_skip_verify": { + "type": "boolean" + }, + "tls_server_name": { + "type": "string" + }, + "tls_min_version": { + "type": "string" + }, + "tls_max_version": { + "type": "string" + } + } + }, + "DSMySQLConfig": { + "type": "object", + "description": "MySQL 数据源配置,TLS 字段继承自 TLSClientConfig。", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "open_conns": { + "type": "integer", + "description": "最大打开连接数。" + }, + "idle_conns": { + "type": "integer", + "description": "最大空闲连接数。" + }, + "lifetime_seconds": { + "type": "integer", + "format": "int64", + "description": "连接最大生命周期(秒)。" + }, + "timeout_mills": { + "type": "integer", + "format": "int64", + "description": "查询超时时间(毫秒)。" + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + }, + "tls_key_pwd": { + "type": "string" + }, + "tls_skip_verify": { + "type": "boolean" + }, + "tls_server_name": { + "type": "string" + }, + "tls_min_version": { + "type": "string" + }, + "tls_max_version": { + "type": "string" + } + } + }, + "DSOracleConfig": { + "type": "object", + "description": "Oracle 数据源配置。", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "options": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "额外连接参数(键值对)。" + }, + "open_conns": { + "type": "integer" + }, + "idle_conns": { + "type": "integer" + }, + "lifetime_seconds": { + "type": "integer", + "format": "int64" + }, + "timeout_mills": { + "type": "integer", + "format": "int64" + } + } + }, + "DSPostgresConfig": { + "type": "object", + "description": "PostgreSQL 数据源配置。", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "open_conns": { + "type": "integer" + }, + "idle_conns": { + "type": "integer" + }, + "lifetime_seconds": { + "type": "integer", + "format": "int64" + }, + "timeout_mills": { + "type": "integer", + "format": "int64" + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + } + } + }, + "DSClickHouseConfig": { + "type": "object", + "description": "ClickHouse 数据源配置,TLS 字段继承自 TLSClientConfig。", + "properties": { + "database": { + "type": "string", + "description": "认证用默认数据库。" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "open_conns": { + "type": "integer" + }, + "idle_conns": { + "type": "integer" + }, + "lifetime_seconds": { + "type": "integer", + "format": "int64" + }, + "timeout_mills": { + "type": "integer", + "format": "int64" + }, + "max_execution_seconds": { + "type": "integer", + "format": "int64", + "description": "最大查询执行时间(秒)。" + }, + "dial_timeout_mills": { + "type": "integer", + "format": "int64", + "description": "拨号超时(毫秒)。" + }, + "tls_enabled": { + "type": "boolean" + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + }, + "tls_key_pwd": { + "type": "string" + }, + "tls_skip_verify": { + "type": "boolean" + }, + "tls_server_name": { + "type": "string" + }, + "tls_min_version": { + "type": "string" + }, + "tls_max_version": { + "type": "string" + } + } + }, + "DSElasticSearchConfig": { + "type": "object", + "description": "Elasticsearch 数据源配置。", + "properties": { + "deployment": { + "type": "string", + "enum": [ + "cloud", + "self-managed" + ], + "description": "部署类型。`cloud` 使用 Elastic Cloud;`self-managed` 使用自托管集群。" + }, + "timeout_mills": { + "type": "integer", + "format": "int64" + }, + "cloud_id": { + "type": "string", + "description": "Elastic Cloud 部署 ID,仅用于 `cloud` 部署。" + }, + "api_key": { + "type": "string", + "description": "Elastic Cloud API 密钥,仅用于 `cloud` 部署。" + }, + "username": { + "type": "string", + "description": "`self-managed` 部署的用户名。" + }, + "password": { + "type": "string" + }, + "service_token": { + "type": "string", + "description": "服务令牌,若设置则覆盖用户名/密码认证。" + }, + "tls_ca": { + "type": "string" + }, + "certificate_fingerprint": { + "type": "string" + }, + "headers": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "DSSLSConfig": { + "type": "object", + "description": "阿里云日志服务(SLS)数据源配置。", + "properties": { + "access_key_id": { + "type": "string", + "description": "阿里云 Access Key ID。" + }, + "access_key_secret": { + "type": "string", + "description": "阿里云 Access Key Secret。" + }, + "headers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "自定义 HTTP 请求头。" + } + } + }, + "DSVictoriaLogsConfig": { + "type": "object", + "description": "VictoriaLogs 数据源配置,TLS 字段继承自 TLSClientConfig。", + "properties": { + "basic_auth_enabled": { + "type": "boolean" + }, + "basic_auth_username": { + "type": "string" + }, + "basic_auth_password": { + "type": "string" + }, + "headers": { + "type": "array", + "items": { + "type": "string" + } + }, + "params": { + "type": "array", + "items": { + "type": "string" + } + }, + "tls_ca": { + "type": "string" + }, + "tls_cert": { + "type": "string" + }, + "tls_key": { + "type": "string" + }, + "tls_key_pwd": { + "type": "string" + }, + "tls_skip_verify": { + "type": "boolean" + }, + "tls_server_name": { + "type": "string" + }, + "tls_min_version": { + "type": "string" + }, + "tls_max_version": { + "type": "string" + } + } + }, + "DataSourceItem": { + "type": "object", + "description": "单个监控数据源。", + "required": [ + "id", + "account_id", + "type_ident", + "name", + "enabled", + "note", + "address", + "edge_cluster_name", + "updated_at" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "唯一数据源 ID。" + }, + "account_id": { + "type": "integer", + "format": "uint64", + "description": "账户 ID。" + }, + "type_ident": { + "type": "string", + "description": "数据源类型标识,可选值:`prometheus`、`loki`、`mysql`、`oracle`、`postgres`、`clickhouse`、`elasticsearch`、`sls`、`victorialogs`。" + }, + "name": { + "type": "string", + "description": "数据源显示名称。" + }, + "enabled": { + "type": "boolean", + "description": "数据源是否启用。" + }, + "note": { + "type": "string", + "description": "可选描述。" + }, + "address": { + "type": "string", + "description": "连接地址。Prometheus/Loki/VictoriaLogs 为 HTTP URL;MySQL/Oracle/Postgres/ClickHouse 为 `host:port`;SLS 为不含 http/https 前缀的 endpoint。" + }, + "payload": { + "$ref": "#/components/schemas/DSPayload" + }, + "edge_cluster_name": { + "type": "string", + "description": "负责使用该数据源评估规则的 Monitors Edge 集群名称。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 时间戳(秒)。" + } + } + }, + "DataSourceUpsertRequest": { + "type": "object", + "description": "创建或更新数据源的请求体。`id` 仅在更新时必填。`address` 除 Elasticsearch `deployment=cloud` 外均为必填。", + "required": [ + "type_ident", + "name", + "edge_cluster_name", + "payload" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "数据源 ID。更新时必填,创建时省略。" + }, + "type_ident": { + "type": "string", + "description": "数据源类型标识,可选值:`prometheus`、`loki`、`mysql`、`oracle`、`postgres`、`clickhouse`、`elasticsearch`、`sls`、`victorialogs`。" + }, + "name": { + "type": "string", + "description": "数据源显示名称。" + }, + "note": { + "type": "string", + "description": "可选描述。" + }, + "address": { + "type": "string", + "description": "连接地址。Prometheus/Loki/VictoriaLogs 为 HTTP URL;MySQL/Oracle/Postgres/ClickHouse 为 `host:port`;SLS 为不含 http/https 前缀的 endpoint;Elasticsearch cloud 部署无需填写。" + }, + "payload": { + "$ref": "#/components/schemas/DSPayload", + "description": "类型相关配置块,必须包含与 `type_ident` 匹配的键。" + }, + "edge_cluster_name": { + "type": "string", + "description": "负责使用该数据源评估规则的 Monitors Edge 集群名称。" + } + } + }, + "DataSourceListResponse": { + "type": "array", + "description": "数据源列表,不含敏感凭证字段。", + "items": { + "$ref": "#/components/schemas/DataSourceItem" + } + }, + "IDRequest": { + "type": "object", + "required": [ + "id" + ], + "description": "包含单个数字 ID 的请求。", + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "资源 ID。" + } + } + }, + "SLSProjectsRequest": { + "type": "object", + "description": "查询 SLS 项目列表的参数。", + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "SLS 数据源 ID。" + }, + "query": { + "type": "string", + "description": "名称前缀过滤。" + }, + "offset": { + "type": "integer", + "description": "分页偏移量。" + }, + "size": { + "type": "integer", + "description": "每页大小。" + } + } + }, + "SLSProjectsResponse": { + "type": "array", + "description": "SLS 项目名称列表。", + "items": { + "type": "string" + } + }, + "SLSLogstoresRequest": { + "type": "object", + "description": "查询 SLS 日志库列表的参数。", + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "SLS 数据源 ID。" + }, + "project": { + "type": "string", + "description": "SLS 项目名称。" + }, + "offset": { + "type": "integer", + "description": "分页偏移量。" + }, + "size": { + "type": "integer", + "description": "每页大小。" + } + } + }, + "SLSLogstoresResponse": { + "type": "array", + "description": "SLS 日志库名称列表。", + "items": { + "type": "string" + } + }, + "StoreRulesetUpsertRequest": { + "type": "object", + "description": "创建规则集的请求体,所有字段均经服务端 `Validate()` 校验。", + "required": [ + "type_ident", + "note", + "payload" + ], + "properties": { + "type_ident": { + "type": "string", + "description": "该规则集适用的数据源类型标识符,如 `prometheus`。" + }, + "note": { + "type": "string", + "description": "规则集描述或标题。" + }, + "open_flag": { + "type": "integer", + "enum": [ + 0, + 1, + 2 + ], + "description": "共享范围:`0` 仅创建者可见,`1` 账户内共享,`2` 公开。省略时默认为 `0`。" + }, + "payload": { + "type": "string", + "description": "包含告警规则定义的 JSON 字符串。" + } + } + }, + "StoreRulesetItem": { + "type": "object", + "description": "单个规则仓库规则集。", + "required": [ + "id", + "type_ident", + "note", + "open_flag", + "creator_account_id", + "creator_id", + "creator_name", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "规则集 ID。" + }, + "type_ident": { + "type": "string", + "description": "该规则集适用的数据源类型标识符。" + }, + "note": { + "type": "string", + "description": "规则集描述或标题。" + }, + "open_flag": { + "type": "integer", + "enum": [ + 0, + 1, + 2 + ], + "description": "共享范围:`0` 仅创建者可见,`1` 账户内共享,`2` 公开。" + }, + "payload": { + "type": "string", + "description": "包含告警规则定义的 JSON 字符串,列表接口中省略。" + }, + "creator_account_id": { + "type": "integer", + "format": "uint64", + "description": "创建者的账户 ID。" + }, + "creator_id": { + "type": "integer", + "format": "uint64", + "description": "创建者的成员 ID。" + }, + "creator_name": { + "type": "string", + "description": "创建者显示名称。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 时间戳(秒)。" + } + } + }, + "StoreRulesetListRequest": { + "type": "object", + "required": [ + "type_ident" + ], + "description": "按数据源类型过滤规则集。", + "properties": { + "type_ident": { + "type": "string", + "description": "数据源类型标识符,如 `prometheus`。" + } + } + }, + "StoreRulesetListResponse": { + "type": "array", + "description": "当前用户有权访问的规则集列表,不含 `payload` 字段。", + "items": { + "$ref": "#/components/schemas/StoreRulesetItem" + } + }, + "StoreRulesetUpdateRequest": { + "type": "object", + "required": [ + "id", + "note", + "payload" + ], + "description": "更新规则集的参数。", + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "要更新的规则集 ID。" + }, + "note": { + "type": "string", + "description": "新的描述。" + }, + "open_flag": { + "type": "integer", + "enum": [ + 0, + 1, + 2 + ], + "description": "新的共享范围:`0` 仅创建者,`1` 账户共享,`2` 公开。" + }, + "payload": { + "type": "string", + "description": "新的告警规则定义 JSON 字符串。" + } + } + }, + "RumApplicationListRequest": { + "type": "object", + "description": "查询 RUM 应用列表的过滤参数。", + "properties": { + "p": { + "type": "integer", + "description": "页码(从 1 开始),默认 1。" + }, + "limit": { + "type": "integer", + "description": "每页条数,范围 1–100,默认 20。" + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "排序字段。" + }, + "asc": { + "type": "boolean", + "description": "为 `true` 时升序排列。" + }, + "query": { + "type": "string", + "description": "按应用名称搜索。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "按团队 ID 过滤。" + }, + "is_my_team": { + "type": "boolean", + "description": "为 `true` 时仅返回当前用户所在团队的应用。" + } + } + }, + "RumApplicationAlerting": { + "type": "object", + "description": "应用的告警配置。", + "properties": { + "enabled": { + "type": "boolean", + "description": "是否启用告警。" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "接收告警的协作空间 ID 列表。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "关联的 On-call 集成 ID(只读,自动分配)。" + } + } + }, + "RumApplicationTracing": { + "type": "object", + "description": "APM 链路追踪集成配置。", + "properties": { + "enabled": { + "type": "boolean", + "description": "是否启用链路追踪集成。" + }, + "open_type": { + "type": "string", + "enum": [ + "popup", + "tab" + ], + "description": "链路链接的打开方式。" + }, + "endpoint": { + "type": "string", + "description": "链路 Endpoint URL(http 或 https)。" + } + } + }, + "RumApplicationItem": { + "type": "object", + "description": "单个 RUM 应用。", + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "账户 ID。" + }, + "application_id": { + "type": "string", + "description": "唯一应用 ID。" + }, + "application_name": { + "type": "string", + "description": "应用显示名称。" + }, + "type": { + "type": "string", + "enum": [ + "browser", + "ios", + "android", + "react-native", + "flutter", + "kotlin-multiplatform", + "roku", + "unity" + ], + "description": "应用类型。" + }, + "client_token": { + "type": "string", + "description": "用于初始化 RUM SDK 的令牌。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID。" + }, + "is_private": { + "type": "boolean", + "description": "为 `true` 时仅团队成员可访问。" + }, + "no_ip": { + "type": "boolean", + "description": "为 `true` 时不采集 IP 地址。" + }, + "no_geo": { + "type": "boolean", + "description": "为 `true` 时不推断地理位置。" + }, + "alerting": { + "$ref": "#/components/schemas/RumApplicationAlerting" + }, + "tracing": { + "$ref": "#/components/schemas/RumApplicationTracing" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled", + "deleted" + ], + "description": "应用状态。" + }, + "created_by": { + "type": "integer", + "format": "int64", + "description": "创建者成员 ID。" + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "最后更新者成员 ID。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 时间戳(秒)。" + } + } + }, + "RumApplicationListResponse": { + "type": "object", + "description": "RUM 应用分页列表。", + "properties": { + "has_next_page": { + "type": "boolean" + }, + "total": { + "type": "integer" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumApplicationItem" + } + } + } + }, + "RumApplicationIDRequest": { + "type": "object", + "required": [ + "application_id" + ], + "description": "包含单个应用 ID 的请求。", + "properties": { + "application_id": { + "type": "string", + "description": "RUM 应用 ID。" + } + } + }, + "RumApplicationInfosRequest": { + "type": "object", + "required": [ + "application_ids" + ], + "description": "批量查询应用信息请求。", + "properties": { + "application_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "最多 200 个应用 ID。" + } + } + }, + "RumApplicationInfosResponse": { + "type": "object", + "description": "批量查询应用信息响应。", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumApplicationItem" + } + } + } + }, + "RumApplicationCreateRequest": { + "type": "object", + "required": [ + "application_name", + "type", + "team_id" + ], + "description": "创建 RUM 应用的参数。", + "properties": { + "application_name": { + "type": "string", + "description": "应用名称,1–40 个字符。" + }, + "type": { + "type": "string", + "enum": [ + "browser", + "ios", + "android", + "react-native", + "flutter", + "kotlin-multiplatform", + "roku", + "unity" + ], + "description": "应用类型。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID。" + }, + "is_private": { + "type": "boolean", + "description": "是否仅限团队成员访问。" + }, + "no_ip": { + "type": "boolean", + "description": "不采集 IP 地址。" + }, + "no_geo": { + "type": "boolean", + "description": "不推断地理位置。" + }, + "alerting": { + "$ref": "#/components/schemas/RumApplicationAlerting" + }, + "tracing": { + "$ref": "#/components/schemas/RumApplicationTracing" + } + } + }, + "RumApplicationCreateResponse": { + "type": "object", + "description": "创建 RUM 应用的结果。", + "properties": { + "application_id": { + "type": "string", + "description": "自动生成的唯一应用 ID。" + }, + "application_name": { + "type": "string", + "description": "应用显示名称。" + }, + "client_token": { + "type": "string", + "description": "用于 RUM SDK 初始化的令牌。" + } + } + }, + "RumApplicationUpdateRequest": { + "type": "object", + "required": [ + "application_id" + ], + "description": "更新 RUM 应用的参数,除 `application_id` 外均为可选。", + "properties": { + "application_id": { + "type": "string", + "description": "要更新的应用 ID。" + }, + "application_name": { + "type": "string", + "description": "新的应用名称。" + }, + "type": { + "type": "string", + "enum": [ + "browser", + "ios", + "android", + "react-native", + "flutter", + "kotlin-multiplatform", + "roku", + "unity" + ] + }, + "team_id": { + "type": "integer", + "format": "int64" + }, + "is_private": { + "type": "boolean" + }, + "no_ip": { + "type": "boolean" + }, + "no_geo": { + "type": "boolean" + }, + "alerting": { + "$ref": "#/components/schemas/RumApplicationAlerting" + }, + "tracing": { + "$ref": "#/components/schemas/RumApplicationTracing" + } + } + }, + "RumIssueItem": { + "type": "object", + "description": "单个 RUM 异常追踪 Issue。", + "properties": { + "team_id": { + "type": "integer", + "format": "int64" + }, + "issue_id": { + "type": "string", + "description": "唯一 Issue ID。" + }, + "application_id": { + "type": "string" + }, + "application_name": { + "type": "string" + }, + "service": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "for_review", + "reviewed", + "ignored", + "resolved" + ] + }, + "error_count": { + "type": "integer", + "format": "int64", + "description": "错误总发生次数。" + }, + "session_count": { + "type": "integer", + "format": "int64", + "description": "受影响的用户会话数。" + }, + "is_crash": { + "type": "boolean", + "description": "是否导致应用崩溃。" + }, + "age": { + "type": "integer", + "format": "int64" + }, + "resolved_at": { + "type": "integer", + "format": "int64" + }, + "resolved_by": { + "type": "integer", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "first_seen": { + "type": "object", + "properties": { + "timestamp": { + "type": "integer", + "format": "int64" + }, + "version": { + "type": "string" + } + } + }, + "last_seen": { + "type": "object", + "properties": { + "timestamp": { + "type": "integer", + "format": "int64" + }, + "version": { + "type": "string" + } + } + }, + "error": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "suspected_cause": { + "type": "object", + "properties": { + "source": { + "type": "string", + "enum": [ + "auto", + "user" + ] + }, + "value": { + "type": "string", + "enum": [ + "api.failed_request", + "network.error", + "code.exception", + "code.invalid_object_access", + "code.invalid_argument", + "unknown" + ] + }, + "reason": { + "type": "string" + }, + "person_id": { + "type": "integer", + "format": "int64" + } + } + }, + "regression": { + "type": "object", + "description": "回溯元数据,仅在已解决的 Issue 再次出现时存在。", + "properties": { + "regressed_at": { + "type": "integer", + "format": "int64", + "description": "检测到回溯的时间戳。" + }, + "regressed_at_version": { + "type": "string", + "description": "出现回溯的应用版本。" + }, + "resolved_at": { + "type": "integer", + "format": "int64", + "description": "回溯前的上次解决时间。" + } + } + }, + "versions": { + "type": "array", + "items": { + "type": "string" + } + }, + "severity": { + "type": "string", + "description": "Issue 严重性级别。" + } + } + }, + "RumIssueListRequest": { + "type": "object", + "required": [ + "start_time", + "end_time" + ], + "description": "查询 Issue 列表的过滤参数。", + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "时间范围起始,毫秒时间戳。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "时间范围结束,毫秒时间戳,最大范围 183 天。" + }, + "application_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按应用 ID 过滤。" + }, + "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" + }, + "description": "按疑似原因过滤。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按团队 ID 过滤。" + }, + "p": { + "type": "integer", + "description": "页码,默认 1。" + }, + "limit": { + "type": "integer", + "description": "每页条数,范围 1–100,默认 20。" + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at", + "session_count", + "error_count" + ] + }, + "asc": { + "type": "boolean" + }, + "error_required": { + "type": "boolean", + "description": "为 `true` 时仅返回有关联错误事件的 Issue。" + }, + "by_intersection": { + "type": "boolean" + } + } + }, + "RumIssueListResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumIssueItem" + } + }, + "has_next_page": { + "type": "boolean" + }, + "total": { + "type": "integer" + } + } + }, + "RumIssueIDRequest": { + "type": "object", + "required": [ + "issue_id" + ], + "properties": { + "issue_id": { + "type": "string", + "description": "Issue ID。" + } + } + }, + "RumIssueUpdateRequest": { + "type": "object", + "required": [ + "issue_id" + ], + "description": "更新 Issue 的参数。", + "properties": { + "issue_id": { + "type": "string", + "description": "要更新的 Issue ID。" + }, + "status": { + "type": "string", + "enum": [ + "for_review", + "reviewed", + "ignored", + "resolved" + ], + "description": "新状态。" + }, + "suspected_cause": { + "type": "string", + "enum": [ + "api.failed_request", + "network.error", + "code.exception", + "code.invalid_object_access", + "code.invalid_argument", + "unknown" + ], + "description": "疑似原因。" + } + } + }, + "SourcemapListRequest": { + "type": "object", + "description": "Sourcemap 列表的分页过滤条件。", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "上传时间范围起始,Unix 毫秒时间戳。需大于 0 且小于 `end_time`。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "上传时间范围结束,Unix 毫秒时间戳。最大时间跨度 365 天。" + }, + "type": { + "type": "string", + "description": "平台类型。省略时默认为 `browser`。", + "enum": [ + "browser", + "android", + "ios" + ] + }, + "services": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按服务名称过滤,最多 100 个值。" + }, + "versions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按版本字符串过滤,最多 100 个值。" + }, + "query": { + "type": "string", + "description": "对 minified URL(browser)或 build_id(android)做子串匹配。最多 200 个字符。" + }, + "build_id": { + "type": "string", + "description": "仅 Android。按 Gradle 插件构建标识过滤。最多 200 个字符。" + }, + "uuid": { + "type": "string", + "description": "仅 iOS。按 dSYM bundle UUID 过滤。最多 200 个字符。" + }, + "p": { + "type": "integer", + "description": "页码,从 1 开始。", + "minimum": 1, + "default": 1, + "example": 1 + }, + "limit": { + "type": "integer", + "description": "每页条数,最大 100,默认 20。", + "maximum": 100, + "default": 20, + "example": 20 + }, + "orderby": { + "type": "string", + "description": "排序字段。", + "enum": [ + "created_at", + "updated_at" + ] + }, + "asc": { + "type": "boolean", + "description": "升序排序。默认 false(降序)。", + "default": false + } + } + }, + "SourcemapItem": { + "type": "object", + "description": "单条已上传的 Sourcemap 记录。", + "properties": { + "key": { + "type": "string", + "description": "唯一标识该 Sourcemap 文件的存储键。" + }, + "type": { + "type": "string", + "description": "平台类型:`browser`、`android` 或 `ios`。", + "enum": [ + "browser", + "android", + "ios" + ] + }, + "service": { + "type": "string", + "description": "应用或服务名称。" + }, + "version": { + "type": "string", + "description": "应用版本字符串。" + }, + "size": { + "type": "integer", + "format": "int64", + "description": "文件大小(字节)。" + }, + "git_repository_url": { + "type": "string", + "description": "与此构建关联的 Git 仓库 URL。" + }, + "git_commit_sha": { + "type": "string", + "description": "此构建的 Git commit SHA。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "上传时间,Unix 秒时间戳。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 秒时间戳。" + }, + "metadata": { + "type": "object", + "description": "附加在 sourcemap 上的自由格式键值元数据。具体结构取决于上传客户端,常见键包括 `git_repository_url` 和 `git_commit_sha`(这两个字段同时也会提升为顶层字段)。", + "additionalProperties": true + } + } + }, + "SourcemapListResponse": { + "type": "object", + "description": "Sourcemap 记录的分页列表。", + "required": [ + "total", + "items" + ], + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "匹配记录总数。", + "example": 3 + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SourcemapItem" + } + } + } + }, + "MemberEmptyObject": { + "type": "object", + "description": "空响应", + "properties": {} + }, + "MemberInfoRequest": { + "type": "object", + "description": "获取成员信息请求", + "properties": {} + }, + "MemberInfoResponse": { + "type": "object", + "description": "当前成员资料", + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "账户 ID" + }, + "account_name": { + "type": "string", + "description": "账户名称" + }, + "account_avatar": { + "type": "string", + "description": "账户头像 URL" + }, + "account_email": { + "type": "string", + "description": "账户邮箱" + }, + "account_role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "授予的角色 ID 列表" + }, + "account_locale": { + "type": "string", + "description": "账户级语言偏好(如 zh-CN 或 en-US)" + }, + "account_time_zone": { + "type": "string", + "description": "账户级时区(如 Asia/Shanghai)" + }, + "domain": { + "type": "string", + "description": "账户域名" + }, + "member_id": { + "type": "integer", + "format": "uint64", + "description": "成员 ID" + }, + "member_name": { + "type": "string", + "description": "成员显示名称" + }, + "phone": { + "type": "string", + "description": "脱敏手机号" + }, + "phone_verified": { + "type": "boolean", + "description": "手机号是否已验证" + }, + "email": { + "type": "string", + "description": "邮箱地址" + }, + "email_verified": { + "type": "boolean", + "description": "邮箱是否已验证" + }, + "country_code": { + "type": "string", + "description": "手机国家区号" + }, + "avatar": { + "type": "string", + "description": "成员头像 URL" + }, + "locale": { + "type": "string", + "description": "语言偏好" + }, + "time_zone": { + "type": "string", + "description": "时区" + }, + "is_external": { + "type": "boolean", + "description": "是否通过 SSO 创建" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "pending", + "deleted" + ], + "description": "成员状态。`enabled` — 已激活成员;`pending` — 已邀请但尚未接受;`deleted` — 已从组织移除。" + } + } + }, + "MemberListRequest": { + "type": "object", + "description": "查询成员列表请求", + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "按角色 ID 过滤" + }, + "p": { + "type": "integer", + "minimum": 1, + "description": "页码" + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "description": "每页条数" + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "排序字段" + }, + "asc": { + "type": "boolean", + "description": "是否升序" + }, + "query": { + "type": "string", + "description": "搜索关键词" + } + } + }, + "MemberItem": { + "type": "object", + "description": "成员条目", + "required": [ + "account_id", + "member_id", + "member_name", + "country_code", + "phone", + "email", + "phone_verified", + "email_verified", + "avatar", + "status", + "account_role_ids", + "created_at", + "updated_at", + "ref_id", + "is_external" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "账户 ID" + }, + "member_id": { + "type": "integer", + "format": "uint64", + "description": "成员 ID" + }, + "member_name": { + "type": "string", + "description": "显示名称" + }, + "country_code": { + "type": "string", + "description": "手机国家区号" + }, + "phone": { + "type": "string", + "description": "脱敏手机号" + }, + "email": { + "type": "string", + "description": "邮箱地址" + }, + "locale": { + "type": "string", + "description": "语言" + }, + "time_zone": { + "type": "string", + "description": "时区" + }, + "phone_verified": { + "type": "boolean", + "description": "手机已验证" + }, + "email_verified": { + "type": "boolean", + "description": "邮箱已验证" + }, + "avatar": { + "type": "string", + "description": "头像 URL" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "pending", + "deleted" + ], + "description": "成员状态。`enabled` — 已激活成员;`pending` — 已邀请但尚未接受;`deleted` — 已从组织移除。" + }, + "account_role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "角色 ID 列表" + }, + "is_external": { + "type": "boolean", + "description": "是否通过 SSO 创建" + }, + "ref_id": { + "type": "string", + "description": "外部引用 ID" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间(Unix 秒)" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "更新时间(Unix 秒)" + } + } + }, + "MemberListResponse": { + "type": "object", + "description": "成员列表响应", + "properties": { + "p": { + "type": "integer", + "description": "当前页码" + }, + "limit": { + "type": "integer", + "description": "每页条数" + }, + "total": { + "type": "integer", + "description": "总数" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MemberItem" + }, + "description": "成员列表" + } + } + }, + "MemberDeleteRequest": { + "type": "object", + "description": "删除成员请求(提供其中一个查找字段)", + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "成员 ID" + }, + "member_name": { + "type": "string", + "description": "成员名称" + }, + "email": { + "type": "string", + "description": "邮箱地址" + }, + "phone": { + "type": "string", + "description": "手机号" + }, + "country_code": { + "type": "string", + "description": "国家区号" + }, + "ref_id": { + "type": "string", + "description": "外部引用 ID" + } + } + }, + "InviteMemberItem": { + "type": "object", + "description": "待邀请成员", + "properties": { + "member_name": { + "type": "string", + "minLength": 2, + "maxLength": 39, + "description": "显示名称" + }, + "email": { + "type": "string", + "description": "邮箱地址" + }, + "phone": { + "type": "string", + "description": "手机号" + }, + "country_code": { + "type": "string", + "description": "国家区号" + }, + "role_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "授予的角色 ID 列表" + }, + "locale": { + "type": "string", + "enum": [ + "zh-CN", + "en-US" + ], + "description": "语言" + }, + "time_zone": { + "type": "string", + "description": "时区" + }, + "ref_id": { + "type": "string", + "description": "外部引用 ID" + } + } + }, + "MemberInviteRequest": { + "type": "object", + "description": "邀请成员请求", + "required": [ + "members" + ], + "properties": { + "members": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InviteMemberItem" + }, + "description": "待邀请成员列表(最多 20 个)" + }, + "from": { + "type": "string", + "description": "邀请来源上下文" + } + } + }, + "NewMemberItem": { + "type": "object", + "description": "新建成员信息", + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "成员 ID" + }, + "member_name": { + "type": "string", + "description": "成员显示名称" + } + } + }, + "MemberInviteResponse": { + "type": "object", + "description": "邀请成员响应", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NewMemberItem" + }, + "description": "新建的成员列表" + } + } + }, + "MemberRoleGrantRequest": { + "type": "object", + "description": "授予成员角色请求", + "required": [ + "member_id", + "role_ids" + ], + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "成员 ID" + }, + "role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "要授予的角色 ID 列表,将追加到成员现有角色集合(自动去重)。" + } + } + }, + "MemberRoleRevokeRequest": { + "type": "object", + "description": "解除成员角色请求", + "required": [ + "member_id", + "role_ids" + ], + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "成员 ID" + }, + "role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "要从成员处撤销的角色 ID 列表。" + } + } + }, + "MemberRoleUpdateRequest": { + "type": "object", + "description": "更新成员角色请求", + "required": [ + "member_id", + "role_ids" + ], + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "成员 ID" + }, + "role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "新的角色 ID 集合" + } + } + }, + "MemberResetInfoRequest": { + "type": "object", + "description": "重置成员信息请求", + "required": [ + "member_id" + ], + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "要更新的成员 ID" + }, + "member_name": { + "type": "string", + "minLength": 2, + "maxLength": 39, + "description": "显示名称" + }, + "email": { + "type": "string", + "description": "邮箱地址" + }, + "phone": { + "type": "string", + "description": "手机号" + }, + "country_code": { + "type": "string", + "description": "国家区号" + }, + "avatar": { + "type": "string", + "description": "头像 URL" + }, + "locale": { + "type": "string", + "enum": [ + "zh-CN", + "en-US" + ], + "description": "语言" + }, + "time_zone": { + "type": "string", + "description": "时区" + } + } + }, + "PersonInfosRequest": { + "type": "object", + "description": "批量获取人员信息请求", + "required": [ + "person_ids" + ], + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "人员 ID 列表" + } + } + }, + "PersonItem": { + "type": "object", + "description": "人员资料", + "required": [ + "account_id", + "person_id", + "phone_verified", + "email_verified" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "账户 ID" + }, + "person_id": { + "type": "integer", + "format": "uint64", + "description": "人员 ID" + }, + "person_name": { + "type": "string", + "description": "显示名称" + }, + "avatar": { + "type": "string", + "description": "头像 URL" + }, + "locale": { + "type": "string", + "description": "语言" + }, + "time_zone": { + "type": "string", + "description": "时区" + }, + "email": { + "type": "string", + "description": "邮箱地址" + }, + "phone": { + "type": "string", + "description": "手机号" + }, + "phone_verified": { + "type": "boolean", + "description": "手机已验证" + }, + "email_verified": { + "type": "boolean", + "description": "邮箱已验证" + }, + "as": { + "type": "string", + "description": "登录角色(account/member)" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "pending", + "deleted" + ], + "description": "人员状态。`enabled` — 已激活;`pending` — 已邀请但尚未接受;`deleted` — 已移除。" + } + } + }, + "PersonInfosResponse": { + "type": "object", + "description": "批量人员信息响应", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PersonItem" + }, + "description": "人员资料列表" + } + } + }, + "TeamItem": { + "type": "object", + "description": "团队及其成员信息。", + "required": [ + "account_id", + "team_id", + "team_name", + "description", + "status", + "updated_by_name", + "updated_by", + "creator_id", + "creator_name", + "created_at", + "updated_at", + "person_ids", + "ref_id" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "所属账户 ID。" + }, + "team_id": { + "type": "integer", + "format": "uint64", + "description": "唯一团队 ID。" + }, + "team_name": { + "type": "string", + "description": "团队显示名称,1–39 个字符,账户内唯一。" + }, + "description": { + "type": "string", + "description": "自定义描述。" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "团队状态。" + }, + "updated_by_name": { + "type": "string", + "description": "最后修改人显示名称。" + }, + "updated_by": { + "type": "integer", + "format": "uint64", + "description": "最后修改人成员 ID。" + }, + "creator_id": { + "type": "integer", + "format": "uint64", + "description": "创建人成员 ID。" + }, + "creator_name": { + "type": "string", + "description": "创建人显示名称。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间(Unix 秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最近更新时间(Unix 秒)。" + }, + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "团队成员的成员 ID 列表。" + }, + "ref_id": { + "type": "string", + "description": "外部引用 ID,用于与第三方 HR 系统集成。" + } + } + }, + "TeamInfoRequest": { + "type": "object", + "description": "通过 ID、名称或外部引用标识团队的请求。", + "properties": { + "team_id": { + "type": "integer", + "format": "uint64", + "description": "团队 ID。" + }, + "team_name": { + "type": "string", + "description": "团队名称。" + }, + "ref_id": { + "type": "string", + "description": "外部引用 ID。" + } + } + }, + "TeamInfosRequest": { + "type": "object", + "required": [ + "team_ids" + ], + "description": "按 ID 列表批量查询团队的请求。", + "properties": { + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "要查询的团队 ID 列表,最多 100 个。" + } + } + }, + "TeamBriefItem": { + "type": "object", + "description": "批量响应中的团队简要信息。", + "properties": { + "team_id": { + "type": "integer", + "format": "uint64" + }, + "team_name": { + "type": "string" + }, + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + } + } + } + }, + "TeamInfosResponse": { + "type": "object", + "description": "批量团队查询结果。", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamBriefItem" + } + } + } + }, + "TeamListRequest": { + "type": "object", + "description": "查询团队列表的过滤参数。", + "properties": { + "p": { + "type": "integer", + "description": "页码,从 1 开始,默认 1。", + "minimum": 1, + "default": 1 + }, + "limit": { + "type": "integer", + "description": "分页大小,最大 100,默认 20。", + "minimum": 1, + "maximum": 100, + "default": 20 + }, + "orderby": { + "type": "string", + "description": "排序字段。", + "enum": [ + "created_at", + "updated_at", + "team_name" + ] + }, + "asc": { + "type": "boolean", + "description": "升序排序。" + }, + "person_id": { + "type": "integer", + "format": "uint64", + "description": "按成员 ID 过滤,只返回该成员所属的团队。" + }, + "query": { + "type": "string", + "description": "按团队名称做子串匹配。" + } + } + }, + "TeamListResponse": { + "type": "object", + "description": "分页团队列表。", + "required": [ + "p", + "limit", + "total", + "items" + ], + "properties": { + "p": { + "type": "integer", + "description": "当前页码。" + }, + "limit": { + "type": "integer", + "description": "本次使用的分页大小。" + }, + "total": { + "type": "integer", + "description": "符合过滤条件的团队总数。" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamItem" + } + } + } + }, + "TeamUpsertRequest": { + "type": "object", + "required": [ + "team_name" + ], + "description": "创建或更新团队的参数。", + "properties": { + "team_id": { + "type": "integer", + "format": "uint64", + "description": "团队 ID,省略或置为 0 表示创建新团队。" + }, + "team_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "团队显示名称,1–39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "自定义描述。" + }, + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "设置为团队成员的成员 ID 列表,会替换现有成员列表。" + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "description": "要邀请为成员的邮箱地址。" + }, + "phones": { + "type": "array", + "items": { + "type": "string" + }, + "description": "要邀请为成员的手机号码。" + }, + "countryCode": { + "type": "string", + "description": "默认国家区号,用于 `phones` 中未采用 E.164 格式的手机号。" + }, + "ref_id": { + "type": "string", + "description": "供 HR 系统集成使用的外部引用 ID。" + }, + "reset_if_name_exist": { + "type": "boolean", + "description": "若为 true,当同名团队已存在时重置其成员列表为传入的 person_ids。" + } + } + }, + "TeamUpsertResponse": { + "type": "object", + "description": "创建或更新团队的结果。", + "required": [ + "team_id", + "team_name" + ], + "properties": { + "team_id": { + "type": "integer", + "format": "uint64", + "description": "创建或更新的团队 ID。" + }, + "team_name": { + "type": "string", + "description": "从请求中回显的团队名称。" + } + } + }, + "TeamDeleteRequest": { + "type": "object", + "description": "标识要删除的团队的请求。", + "properties": { + "team_id": { + "type": "integer", + "format": "uint64", + "description": "团队 ID。" + }, + "team_name": { + "type": "string", + "description": "团队名称。" + }, + "ref_id": { + "type": "string", + "description": "外部引用 ID。" + } + } + }, + "PlatformEmptyObject": { + "type": "object", + "description": "成功时返回的空对象,适用于无实质 payload 的操作。", + "additionalProperties": false + }, + "RoleItem": { + "type": "object", + "description": "角色及其权限集合。", + "required": [ + "role_id", + "role_name", + "description", + "status", + "permission_ids", + "editable", + "created_at", + "updated_at" + ], + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "唯一角色 ID。" + }, + "role_name": { + "type": "string", + "description": "角色显示名称。" + }, + "description": { + "type": "string", + "description": "角色描述。" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "角色状态。" + }, + "permission_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "该角色授予的权限 ID 列表。" + }, + "editable": { + "type": "boolean", + "description": "内置角色为 false,不可修改。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间(Unix 秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最近更新时间(Unix 秒)。" + } + } + }, + "RoleInfoRequest": { + "type": "object", + "required": [ + "role_id" + ], + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "角色 ID。" + } + } + }, + "RoleIDRequest": { + "type": "object", + "required": [ + "role_id" + ], + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "角色 ID。" + } + } + }, + "RoleListRequest": { + "type": "object", + "description": "查询角色列表的过滤参数。", + "properties": { + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "排序字段。" + }, + "asc": { + "type": "boolean", + "description": "升序排序。" + } + } + }, + "RoleListResponse": { + "type": "object", + "description": "角色列表结果。", + "required": [ + "total", + "items" + ], + "properties": { + "total": { + "type": "integer", + "description": "角色总数。" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoleItem" + } + } + } + }, + "RoleUpsertRequest": { + "type": "object", + "required": [ + "role_name" + ], + "description": "创建或更新自定义角色的参数。", + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "角色 ID,省略或置为 0 表示创建。" + }, + "role_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "角色显示名称,1–39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 499, + "description": "角色描述。" + }, + "permission_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "要授予的权限 ID 列表,会替换现有权限集合。" + } + } + }, + "RoleUpsertResponse": { + "type": "object", + "description": "角色创建/更新结果。", + "required": [ + "role_id", + "role_name" + ], + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "创建或更新的角色 ID。" + }, + "role_name": { + "type": "string", + "description": "从请求中回显的角色名称。" + } + } + }, + "RolePermissionListRequest": { + "type": "object", + "description": "查询权限列表的过滤参数。", + "properties": { + "role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "按角色 ID 过滤,只返回这些角色已授予的权限。" + }, + "with_all": { + "type": "boolean", + "description": "若为 true,返回所有权限并用 is_granted 标记哪些已授予。" + } + } + }, + "PermissionItem": { + "type": "object", + "description": "一个权限条目。", + "required": [ + "id", + "permission_name", + "permission_type", + "description", + "class", + "scope", + "status" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "唯一权限 ID。" + }, + "permission_name": { + "type": "string", + "description": "权限显示名称。" + }, + "permission_type": { + "type": "string", + "enum": [ + "read", + "manage" + ], + "description": "查看权限或管理权限。" + }, + "description": { + "type": "string", + "description": "权限的用户可读描述。" + }, + "class": { + "type": "string", + "description": "权限分类(如 'On-call'、'Organization')。" + }, + "scope": { + "type": "string", + "description": "权限范围(如 'on-call'、'organization')。" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "权限状态。" + }, + "is_granted": { + "type": "boolean", + "description": "当 with_all 为 true 时存在,表示该权限是否已授予所请求的角色。" + } + } + }, + "RolePermissionListResponse": { + "type": "object", + "description": "权限列表结果。", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PermissionItem" + } + } + } + }, + "PermissionFactorListRequest": { + "type": "object", + "description": "查询权限因子列表的过滤参数。", + "properties": { + "factor_types": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "api", + "button", + "visit", + "menu", + "url" + ] + }, + "description": "按因子类型过滤。" + } + } + }, + "PermissionFactorItem": { + "type": "object", + "description": "一个权限因子。", + "required": [ + "factor_name", + "factor_type" + ], + "properties": { + "factor_name": { + "type": "string", + "description": "因子标识符(如 'template:read:info')。" + }, + "factor_type": { + "type": "string", + "enum": [ + "api", + "button", + "visit", + "menu", + "url" + ], + "description": "因子类型。" + } + } + }, + "PermissionFactorListResponse": { + "type": "array", + "description": "权限因子列表。", + "items": { + "$ref": "#/components/schemas/PermissionFactorItem" + } + }, + "RoleGrantRequest": { + "type": "object", + "required": [ + "member_ids", + "role_id" + ], + "description": "向成员授予或撤销角色的请求。", + "properties": { + "member_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "要授予/撤销角色的成员 ID 列表,最多 100 个。" + }, + "role_id": { + "type": "integer", + "format": "uint64", + "description": "要授予或撤销的角色 ID。" + } + } + }, + "AuditSearchRequest": { + "type": "object", + "description": "审计日志检索的过滤条件,时间范围必填。", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "检索窗口开始时间,Unix 时间戳(秒)。", + "example": 1712620800 + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "检索窗口结束时间,Unix 时间戳(秒)。必须晚于 `start_time`,最大跨度 90 天。", + "example": 1712707200 + }, + "limit": { + "type": "integer", + "description": "每页条数。最小 0,最大 99。", + "minimum": 0, + "maximum": 99, + "example": 20 + }, + "request_id": { + "type": "string", + "description": "按唯一请求 ID 过滤到单条记录。" + }, + "search_after_ctx": { + "type": "string", + "description": "上次响应返回的不透明分页游标。首页留空。" + }, + "operations": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按操作名称过滤。合法值可通过 `POST /audit/operation/list` 获取。" + }, + "person_id": { + "type": "integer", + "format": "uint64", + "description": "按操作人成员 ID 过滤。" + }, + "is_dangerous": { + "type": "boolean", + "description": "为 true 时只返回高危操作。" + }, + "is_write": { + "type": "boolean", + "description": "为 true 时只返回写操作;为 false 时只返回读操作。" + } + } + }, + "AuditLog": { + "type": "object", + "description": "单条审计日志。", + "required": [ + "created_at", + "account_id", + "member_id", + "member_name", + "request_id", + "ip", + "operation", + "operation_name", + "body", + "params", + "is_dangerous", + "is_write" + ], + "properties": { + "created_at": { + "type": "integer", + "format": "int64", + "description": "操作时间,Unix 毫秒时间戳。" + }, + "account_id": { + "type": "integer", + "format": "uint64", + "description": "账户 ID。" + }, + "member_id": { + "type": "integer", + "format": "uint64", + "description": "操作人的成员 ID。" + }, + "member_name": { + "type": "string", + "description": "操作人的显示名称。" + }, + "request_id": { + "type": "string", + "description": "用于关联的唯一请求 ID。" + }, + "ip": { + "type": "string", + "description": "调用者的客户端 IP 地址。" + }, + "operation": { + "type": "string", + "description": "稳定的机器可读操作名称,如 `template:write:create`。" + }, + "operation_name": { + "type": "string", + "description": "按账户语种显示的人类可读操作标签。" + }, + "body": { + "type": "string", + "description": "JSON 编码的请求体(可能截断至 10 KB)。" + }, + "params": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Key": { + "type": "string" + }, + "Value": { + "type": "string" + } + } + }, + "description": "URL 路径参数的键值对数组,无参数时为空数组。" + }, + "is_dangerous": { + "type": "boolean", + "description": "是否被标记为高危操作。" + }, + "is_write": { + "type": "boolean", + "description": "是否为写操作;false 表示只读操作。" + } + } + }, + "AuditSearchResponse": { + "type": "object", + "description": "游标分页的审计日志检索结果。", + "required": [ + "total", + "search_after_ctx" + ], + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "检索窗口内符合条件的总条数。", + "example": 2 + }, + "search_after_ctx": { + "type": "string", + "description": "用于获取下一页的不透明游标。没有更多结果时为空字符串。" + }, + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuditLog" + }, + "description": "当前页的审计日志条目。" + } + } + }, + "AuditOperationListRequest": { + "type": "object", + "description": "不需要任何参数。", + "additionalProperties": false + }, + "AuditOperationTypeItem": { + "type": "object", + "description": "一条可审计的操作类型。", + "required": [ + "name", + "name_cn" + ], + "properties": { + "name": { + "type": "string", + "description": "用于过滤的稳定机器可读操作名称。", + "example": "template:write:create" + }, + "name_cn": { + "type": "string", + "description": "控制台显示的中文标签。", + "example": "创建模板" + } + } + }, + "AuditOperationListResponse": { + "type": "object", + "description": "可审计操作类型列表。", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuditOperationTypeItem" + } + } + } + } + } + } +} diff --git a/api-reference/platform.openapi.en.json b/api-reference/platform.openapi.en.json new file mode 100644 index 0000000..c8b5a6d --- /dev/null +++ b/api-reference/platform.openapi.en.json @@ -0,0 +1,3933 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Flashduty Open API", + "description": "Public HTTP API for the Flashduty incident management platform — incidents, notification templates, channels, schedules, monitors, RUM, and platform administration. Every operation is authenticated with an `app_key` query parameter issued from the Flashduty console under Account → APP Keys. Responses follow a uniform envelope: `{ request_id, data }` on success, `{ request_id, error }` on failure.", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://api.flashcat.cloud", + "description": "Flashduty Open API" + } + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "tags": [ + { + "name": "Platform/Members", + "description": "" + }, + { + "name": "Platform/Teams", + "description": "" + }, + { + "name": "Platform/Roles & permissions", + "description": "" + }, + { + "name": "Platform/Audit logs", + "description": "Search and retrieve account operation audit logs." + } + ], + "paths": { + "/team/list": { + "post": { + "operationId": "team-read-list", + "summary": "List teams", + "description": "Return a paginated list of teams in the current account.", + "tags": [ + "Platform/Teams" + ], + "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- Filter by `person_id` to return teams that a specific person belongs to.\n- Defaults: p=1, limit=20.", + "href": "/en/api-reference/platform/teams/team-read-list", + "metadata": { + "sidebarTitle": "List teams" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TeamListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "p": 1, + "limit": 20, + "total": 5, + "items": [ + { + "account_id": 10023, + "team_id": 1001, + "team_name": "Backend SRE", + "status": "enabled", + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1712000000, + "person_ids": [ + 80011 + ], + "description": "", + "updated_by_name": "", + "updated_by": 0, + "creator_name": "alice", + "ref_id": "" + } + ] + } + } + } + } + }, + "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/TeamListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "orderby": "created_at", + "asc": false + } + } + } + } + } + }, + "/team/infos": { + "post": { + "operationId": "team-read-infos", + "summary": "Batch get teams", + "description": "Return basic info for multiple teams by their IDs in a single request.", + "tags": [ + "Platform/Teams" + ], + "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- Up to 100 team IDs per request.", + "href": "/en/api-reference/platform/teams/team-read-infos", + "metadata": { + "sidebarTitle": "Batch get teams" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TeamInfosResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "team_id": 1001, + "team_name": "Backend SRE", + "person_ids": [ + 80011, + 80012 + ] + }, + { + "team_id": 1002, + "team_name": "Frontend", + "person_ids": [ + 80013 + ] + } + ] + } + } + } + } + }, + "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/TeamInfosRequest" + }, + "example": { + "team_ids": [ + 1001, + 1002 + ] + } + } + } + } + } + }, + "/role/disable": { + "post": { + "operationId": "role-write-disable", + "summary": "Disable a role", + "description": "Disable a custom role to prevent it from granting permissions.", + "tags": [ + "Platform/Roles & permissions" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Members who held this role lose its permissions immediately.\n- Only custom roles can be disabled.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/roles-permissions/role-write-disable", + "metadata": { + "sidebarTitle": "Disable a role" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleIDRequest" + }, + "example": { + "role_id": 150 + } + } + } + } + } + }, + "/role/delete": { + "post": { + "operationId": "role-write-delete", + "summary": "Delete a role", + "description": "Permanently delete a custom role and revoke it from all members.", + "tags": [ + "Platform/Roles & permissions" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Built-in roles cannot be deleted.\n- All members who held this role lose its permissions immediately.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/roles-permissions/role-write-delete", + "metadata": { + "sidebarTitle": "Delete a role" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleIDRequest" + }, + "example": { + "role_id": 150 + } + } + } + } + } + }, + "/person/infos": { + "post": { + "operationId": "personInfos", + "summary": "Batch get persons", + "description": "Return profile information for a batch of person IDs (members or accounts).", + "tags": [ + "Platform/Members" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/members/person-infos", + "metadata": { + "sidebarTitle": "Batch get persons" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PersonInfosResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "person_id": 2476444212131, + "person_name": "Alice", + "avatar": "/image/avatar1.png", + "locale": "zh-CN", + "time_zone": "Asia/Shanghai", + "email": "alice@example.com", + "phone_verified": false, + "email_verified": true, + "as": "member", + "status": "enabled" + }, + { + "account_id": 2451002751131, + "person_id": 3790925372131, + "person_name": "Bob", + "email": "bob@example.com", + "phone_verified": false, + "email_verified": true, + "as": "member", + "status": "enabled" + } + ] + } + } + } + } + }, + "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/PersonInfosRequest" + }, + "example": { + "person_ids": [ + 2476444212131, + 3790925372131 + ] + } + } + } + } + } + }, + "/member/info": { + "post": { + "operationId": "memberInfo", + "summary": "Get current member info", + "description": "Return the current session member's full profile.", + "tags": [ + "Platform/Members" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/members/member-info", + "metadata": { + "sidebarTitle": "Get current member info" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberInfoResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_avatar": "", + "account_email": "alice@example.com", + "account_id": 2451002751131, + "account_locale": "en-US", + "account_name": "Acme Corp", + "account_role_ids": [ + 6 + ], + "account_time_zone": "Asia/Shanghai", + "avatar": "/image/avatar1.png", + "country_code": "CN", + "created_at": 1701399971, + "domain": "acme", + "email": "alice@example.com", + "email_verified": true, + "is_external": false, + "locale": "zh-CN", + "member_id": 2476444212131, + "member_name": "Alice", + "phone": "+86185****0300", + "phone_verified": true, + "time_zone": "Asia/Shanghai" + } + } + } + } + }, + "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/MemberInfoRequest" + }, + "example": {} + } + } + } + } + }, + "/role/permission/list": { + "post": { + "operationId": "role-read-list-permission", + "summary": "List permissions", + "description": "Return all available permissions, optionally filtered to those granted to specific roles.", + "tags": [ + "Platform/Roles & permissions" + ], + "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- Pass `role_ids` to filter permissions to those granted to those roles.\n- Pass `with_all: true` to include all permissions regardless of role filter, with `is_granted` set to indicate which are granted to the specified roles.", + "href": "/en/api-reference/platform/roles-permissions/role-read-list-permission", + "metadata": { + "sidebarTitle": "List permissions" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RolePermissionListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "id": 501, + "permission_name": "Templates Read", + "permission_type": "read", + "description": "View notification templates", + "class": "On-call", + "scope": "on-call", + "status": "enabled", + "is_granted": true + } + ] + } + } + } + } + }, + "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/RolePermissionListRequest" + }, + "example": { + "role_ids": [ + 150 + ], + "with_all": true + } + } + } + } + } + }, + "/team/info": { + "post": { + "operationId": "team-read-info", + "summary": "Get team detail", + "description": "Return a single team by ID, name, or external reference ID.", + "tags": [ + "Platform/Teams" + ], + "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- At least one of `team_id`, `team_name`, or `ref_id` must be provided.", + "href": "/en/api-reference/platform/teams/team-read-info", + "metadata": { + "sidebarTitle": "Get team detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TeamItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_id": 10023, + "team_id": 1001, + "team_name": "Backend SRE", + "description": "Backend reliability engineering team", + "status": "enabled", + "updated_by_name": "alice", + "updated_by": 80011, + "creator_id": 80011, + "creator_name": "alice", + "created_at": 1710000000, + "updated_at": 1712000000, + "person_ids": [ + 80011, + 80012 + ], + "ref_id": "" + } + } + } + } + }, + "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/TeamInfoRequest" + }, + "example": { + "team_id": 1001 + } + } + } + } + } + }, + "/team/delete": { + "post": { + "operationId": "team-write-delete", + "summary": "Delete a team", + "description": "Permanently delete a team by ID, name, or external reference ID.", + "tags": [ + "Platform/Teams" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Teams Manage** (`organization`) |\n\n## Usage\n\n- At least one of `team_id`, `team_name`, or `ref_id` must be provided.\n- Fails with `400 ReferenceExist` if the team is still referenced by schedules, escalation rules, or other resources.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/teams/team-write-delete", + "metadata": { + "sidebarTitle": "Delete a team" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamDeleteRequest" + }, + "example": { + "team_id": 1001 + } + } + } + } + } + }, + "/role/info": { + "post": { + "operationId": "role-read-info", + "summary": "Get role detail", + "description": "Return the detail of a single role by its ID.", + "tags": [ + "Platform/Roles & permissions" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/roles-permissions/role-read-info", + "metadata": { + "sidebarTitle": "Get role detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RoleItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "role_id": 2, + "role_name": "Account Admin", + "description": "Account admin with all permissions.", + "status": "enabled", + "permission_ids": [ + 101, + 102, + 201 + ], + "editable": false, + "created_at": 1700000000, + "updated_at": 1700000000 + } + } + } + } + }, + "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/RoleInfoRequest" + }, + "example": { + "role_id": 2 + } + } + } + } + } + }, + "/member/invite": { + "post": { + "operationId": "memberInvite", + "summary": "Invite members", + "description": "Batch invite new members to the organization by email or phone.", + "tags": [ + "Platform/Members" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/members/member-invite", + "metadata": { + "sidebarTitle": "Invite members" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberInviteResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "member_id": 5068740052131, + "member_name": "Charlie" + } + ] + } + } + } + } + }, + "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/MemberInviteRequest" + }, + "example": { + "members": [ + { + "member_name": "Charlie", + "email": "charlie@example.com", + "locale": "en-US", + "time_zone": "Asia/Shanghai", + "role_ids": [ + 6 + ] + } + ] + } + } + } + } + } + }, + "/role/enable": { + "post": { + "operationId": "role-write-enable", + "summary": "Enable a role", + "description": "Re-enable a previously disabled custom role.", + "tags": [ + "Platform/Roles & permissions" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Only custom roles can be enabled/disabled. Built-in roles always remain enabled.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/roles-permissions/role-write-enable", + "metadata": { + "sidebarTitle": "Enable a role" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleIDRequest" + }, + "example": { + "role_id": 150 + } + } + } + } + } + }, + "/role/list": { + "post": { + "operationId": "role-read-list", + "summary": "List roles", + "description": "Return all custom and built-in roles for the current account.", + "tags": [ + "Platform/Roles & permissions" + ], + "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- Built-in roles (`editable: false`) cannot be modified or deleted.", + "href": "/en/api-reference/platform/roles-permissions/role-read-list", + "metadata": { + "sidebarTitle": "List roles" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RoleListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 3, + "items": [ + { + "role_id": 2, + "role_name": "Account Admin", + "description": "", + "status": "enabled", + "permission_ids": [], + "editable": false, + "created_at": 1700000000, + "updated_at": 1700000000 + } + ] + } + } + } + } + }, + "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/RoleListRequest" + }, + "example": { + "orderby": "created_at", + "asc": false + } + } + } + } + } + }, + "/member/info/reset": { + "post": { + "operationId": "memberResetInfo", + "summary": "Reset member info", + "description": "Batch-update multiple profile fields of the current member.", + "tags": [ + "Platform/Members" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/members/member-reset-info", + "metadata": { + "sidebarTitle": "Reset member info" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberResetInfoRequest" + }, + "example": { + "member_id": 2476444212131, + "member_name": "Alice", + "locale": "zh-CN", + "time_zone": "Asia/Shanghai" + } + } + } + } + } + }, + "/audit/search": { + "post": { + "operationId": "audit-read-search", + "summary": "Search audit logs", + "description": "Return a cursor-paginated list of audit log entries within a time range.", + "tags": [ + "Platform/Audit logs" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Audit Read** (`organization`) |\n\n## Usage\n\n- Time range is required. Maximum span is 90 days. Both `start_time` and `end_time` are Unix epoch **seconds**.\n- Use `search_after_ctx` from the previous response to fetch the next page. The token is opaque — do not construct it manually.\n- The retention window depends on the account's license. Queries beyond the retention boundary silently return an empty result rather than an error.\n- Default page size is 20 rows; maximum is 99.", + "href": "/en/api-reference/platform/audit-logs/audit-read-search", + "metadata": { + "sidebarTitle": "Search audit logs" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AuditSearchResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 2, + "search_after_ctx": "", + "docs": [ + { + "created_at": 1712700123456, + "account_id": 10023, + "member_id": 80011, + "member_name": "Alice", + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "ip": "203.0.113.42", + "operation": "template:write:create", + "operation_name": "创建模板", + "body": "{\"template_name\":\"Prod default\"}", + "params": [], + "is_dangerous": false, + "is_write": true + } + ] + } + } + } + } + }, + "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/AuditSearchRequest" + }, + "example": { + "start_time": 1712620800, + "end_time": 1712707200, + "limit": 20, + "operations": [ + "template:write:create", + "template:write:delete" + ] + } + } + } + } + } + }, + "/role/member/grant": { + "post": { + "operationId": "role-write-grant-role", + "summary": "Grant role to members", + "description": "Assign a role to one or more members, giving them its permissions.", + "tags": [ + "Platform/Roles & permissions" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Up to 100 member IDs per request.\n- Members who already have the role are silently skipped.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/roles-permissions/role-write-grant-role", + "metadata": { + "sidebarTitle": "Grant role to members" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleGrantRequest" + }, + "example": { + "member_ids": [ + 80011, + 80012 + ], + "role_id": 150 + } + } + } + } + } + }, + "/member/role/update": { + "post": { + "operationId": "memberUpdateRole", + "summary": "Update member roles", + "description": "Replace all role assignments for a member at once.", + "tags": [ + "Platform/Members" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/members/member-update-role", + "metadata": { + "sidebarTitle": "Update member roles" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberRoleUpdateRequest" + }, + "example": { + "member_id": 5068740052131, + "role_ids": [ + 2, + 6 + ] + } + } + } + } + } + }, + "/role/upsert": { + "post": { + "operationId": "role-write-upsert", + "summary": "Create or update a role", + "description": "Create a new custom role or update an existing one. Pass `role_id` to update.", + "tags": [ + "Platform/Roles & permissions" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Omit `role_id` (or set to 0) to create; pass an existing ID to update.\n- `role_name` must be 1–39 characters and unique within the account.\n- `permission_ids` sets the full permission set for the role, replacing any previous assignment.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/roles-permissions/role-write-upsert", + "metadata": { + "sidebarTitle": "Create or update a role" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RoleUpsertResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "role_id": 150, + "role_name": "On-call Manager" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleUpsertRequest" + }, + "example": { + "role_name": "On-call Manager", + "description": "Manage on-call rotations and incidents.", + "permission_ids": [ + 501, + 502 + ] + } + } + } + } + } + }, + "/role/permission/factor/list": { + "post": { + "operationId": "role-read-list-permission-factor", + "summary": "List permission factors", + "description": "Return all permission factors (API, button, menu, URL, visit) optionally filtered by type.", + "tags": [ + "Platform/Roles & permissions" + ], + "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- Permission factors are the fine-grained controls that make up each permission.\n- `factor_types` accepts: `api`, `button`, `visit`, `menu`, `url`.", + "href": "/en/api-reference/platform/roles-permissions/role-read-list-permission-factor", + "metadata": { + "sidebarTitle": "List permission factors" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PermissionFactorListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "factor_name": "template:read:info", + "factor_type": "api" + } + ] + } + } + } + }, + "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/PermissionFactorListRequest" + }, + "example": { + "factor_types": [ + "api" + ] + } + } + } + } + } + }, + "/role/member/revoke": { + "post": { + "operationId": "role-write-revoke-role", + "summary": "Revoke role from members", + "description": "Remove a role from one or more members, revoking the permissions it granted.", + "tags": [ + "Platform/Roles & permissions" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Members who don't have the role are silently skipped.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/roles-permissions/role-write-revoke-role", + "metadata": { + "sidebarTitle": "Revoke role from members" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleGrantRequest" + }, + "example": { + "member_ids": [ + 80011 + ], + "role_id": 150 + } + } + } + } + } + }, + "/audit/operation/list": { + "post": { + "operationId": "audit-read-operation-list", + "summary": "List auditable operation types", + "description": "Return all operation names that are recorded in the audit log, for use as `operations` filter values.", + "tags": [ + "Platform/Audit logs" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Audit Read** (`organization`) |\n\n## Usage\n\n- Use the `name` values from this response as `operations` filter values in `POST /audit/search`.\n- `name_cn` is the human-readable Chinese label shown in the console; `name` is the stable wire value to filter on.", + "href": "/en/api-reference/platform/audit-logs/audit-read-operation-list", + "metadata": { + "sidebarTitle": "List auditable operation types" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AuditOperationListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "name": "template:write:create", + "name_cn": "创建模板" + }, + { + "name": "template:write:delete", + "name_cn": "删除模板" + }, + { + "name": "incident:write:acknowledge", + "name_cn": "认领故障" + } + ] + } + } + } + } + }, + "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/AuditOperationListRequest" + }, + "example": {} + } + } + } + } + }, + "/team/upsert": { + "post": { + "operationId": "team-write-upsert", + "summary": "Create or update a team", + "description": "Create a new team or update an existing one. Pass `team_id` to update.", + "tags": [ + "Platform/Teams" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Teams Manage** (`organization`) |\n\n## Usage\n\n- Omit `team_id` (or set to 0) to create a new team; pass an existing ID to update.\n- `team_name` must be 1–39 characters and unique within the account.\n- Pass `person_ids` to set team membership; this replaces the entire member list.\n- Pass `emails` or `phones` to invite members who don't yet have accounts.\n- `ref_id` is an external identifier for integration with third-party HR systems.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/teams/team-write-upsert", + "metadata": { + "sidebarTitle": "Create or update a team" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TeamUpsertResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "team_id": 1001, + "team_name": "Backend SRE" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamUpsertRequest" + }, + "example": { + "team_name": "Backend SRE", + "description": "Backend reliability engineering team", + "person_ids": [ + 80011, + 80012 + ] + } + } + } + } + } + }, + "/member/role/grant": { + "post": { + "operationId": "memberGrantRole", + "summary": "Grant role to member", + "description": "Add a role assignment to a member.", + "tags": [ + "Platform/Members" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/members/member-grant-role", + "metadata": { + "sidebarTitle": "Grant role to member" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberRoleGrantRequest" + }, + "example": { + "member_id": 5068740052131, + "role_ids": [ + 6 + ] + } + } + } + } + } + }, + "/member/role/revoke": { + "post": { + "operationId": "memberRevokeRole", + "summary": "Revoke role from member", + "description": "Remove a role assignment from a member.", + "tags": [ + "Platform/Members" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/members/member-revoke-role", + "metadata": { + "sidebarTitle": "Revoke role from member" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberRoleRevokeRequest" + }, + "example": { + "member_id": 5068740052131, + "role_ids": [ + 6 + ] + } + } + } + } + } + }, + "/member/delete": { + "post": { + "operationId": "memberDelete", + "summary": "Delete member", + "description": "Remove a member from the organization by ID, email, phone, or name.", + "tags": [ + "Platform/Members" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/members/member-delete", + "metadata": { + "sidebarTitle": "Delete member" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberDeleteRequest" + }, + "example": { + "member_id": 5068740052131 + } + } + } + } + } + }, + "/member/list": { + "post": { + "operationId": "memberList", + "summary": "List members", + "description": "Return a paginated list of organization members.", + "tags": [ + "Platform/Members" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/members/member-list", + "metadata": { + "sidebarTitle": "List members" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "p": 1, + "limit": 5, + "total": 148, + "items": [ + { + "account_id": 2451002751131, + "member_id": 5068740052131, + "member_name": "Bob", + "country_code": "", + "phone": "+86151****6519", + "email": "bob@example.com", + "phone_verified": true, + "email_verified": true, + "avatar": "", + "status": "enabled", + "account_role_ids": [ + 2, + 6 + ], + "created_at": 1752030749, + "updated_at": 1775962064, + "ref_id": "", + "is_external": false + }, + { + "account_id": 2451002751131, + "member_id": 2476444212131, + "member_name": "Alice", + "country_code": "CN", + "phone": "+86185****0300", + "email": "alice@example.com", + "phone_verified": true, + "email_verified": true, + "avatar": "/image/avatar1.png", + "status": "enabled", + "account_role_ids": [ + 6 + ], + "created_at": 1701399971, + "updated_at": 1775809507, + "ref_id": "", + "is_external": false + } + ] + } + } + } + } + }, + "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/MemberListRequest" + }, + "example": { + "p": 1, + "limit": 5 + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "AppKeyAuth": { + "type": "apiKey", + "in": "query", + "name": "app_key", + "description": "App key issued from the Flashduty console under Account → APP Keys. Required on every public API call. Keep it secret — it grants the same access as the owning account." + } + }, + "responses": { + "BadRequest": { + "description": "Invalid request — usually a missing or malformed parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "missingParameter": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "InvalidParameter", + "message": "The specified parameter is not valid." + } + } + } + } + } + } + }, + "Unauthorized": { + "description": "Missing or invalid app_key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "missingAppKey": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "Unauthorized", + "message": "You are unauthorized." + } + } + } + } + } + } + }, + "Forbidden": { + "description": "The app_key is valid but lacks permission for this operation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "noEditPermission": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "AccessDenied", + "message": "Access Denied." + } + } + } + } + } + } + }, + "NotFound": { + "description": "The referenced resource does not exist or has been deleted. Note: Flashduty historically returns HTTP 400 with code `ResourceNotFound` for missing domain entities; a true 404 is reserved for unknown routes.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "resourceMissing": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "ResourceNotFound", + "message": "The resource you request is not found" + } + } + } + } + } + } + }, + "TooManyRequests": { + "description": "Rate limit hit. Either the global API limit, a per-account limit, or a per-integration limit.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "rateLimited": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "RequestTooFrequently", + "message": "Request too frequently." + } + } + } + } + } + } + }, + "ServerError": { + "description": "Unexpected server-side error. Include the request_id when reporting.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "internal": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "InternalError", + "message": "We encountered an internal error, and it has been reported. Please try again later." + } + } + } + } + } + } + } + }, + "schemas": { + "AuditLog": { + "type": "object", + "description": "A single audit log entry.", + "required": [ + "created_at", + "account_id", + "member_id", + "member_name", + "request_id", + "ip", + "operation", + "operation_name", + "body", + "params", + "is_dangerous", + "is_write" + ], + "properties": { + "created_at": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the operation in Unix epoch milliseconds." + }, + "account_id": { + "type": "integer", + "format": "uint64", + "description": "ID of the account." + }, + "member_id": { + "type": "integer", + "format": "uint64", + "description": "ID of the member who performed the action." + }, + "member_name": { + "type": "string", + "description": "Display name of the member." + }, + "request_id": { + "type": "string", + "description": "Unique request ID for correlation." + }, + "ip": { + "type": "string", + "description": "Client IP address of the caller." + }, + "operation": { + "type": "string", + "description": "Stable machine-readable operation name, e.g. `template:write:create`." + }, + "operation_name": { + "type": "string", + "description": "Human-readable operation label in the account's locale." + }, + "body": { + "type": "string", + "description": "JSON-encoded request body (may be truncated at 10 KB)." + }, + "params": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Key": { + "type": "string" + }, + "Value": { + "type": "string" + } + } + }, + "description": "URL path parameters as an array of key-value pairs, or an empty array when none." + }, + "is_dangerous": { + "type": "boolean", + "description": "True if this is flagged as a high-risk operation." + }, + "is_write": { + "type": "boolean", + "description": "True for mutating operations; false for read-only ones." + } + } + }, + "AuditOperationListRequest": { + "type": "object", + "description": "No parameters required.", + "additionalProperties": false + }, + "AuditOperationListResponse": { + "type": "object", + "description": "List of auditable operation types.", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuditOperationTypeItem" + } + } + } + }, + "AuditOperationTypeItem": { + "type": "object", + "description": "An auditable operation type.", + "required": [ + "name", + "name_cn" + ], + "properties": { + "name": { + "type": "string", + "description": "Stable machine-readable operation name for use as a filter.", + "example": "template:write:create" + }, + "name_cn": { + "type": "string", + "description": "Human-readable Chinese label shown in the console.", + "example": "创建模板" + } + } + }, + "AuditSearchRequest": { + "type": "object", + "description": "Filter criteria for audit log search. Time range is required.", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "Start of the search window, Unix epoch seconds.", + "example": 1712620800 + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "End of the search window, Unix epoch seconds. Must be after `start_time`. Maximum span 90 days.", + "example": 1712707200 + }, + "limit": { + "type": "integer", + "description": "Page size. Minimum 0, maximum 99.", + "minimum": 0, + "maximum": 99, + "example": 20 + }, + "request_id": { + "type": "string", + "description": "Filter to a single request by its unique request ID." + }, + "search_after_ctx": { + "type": "string", + "description": "Opaque pagination cursor returned by the previous response. Leave empty for the first page." + }, + "operations": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter to specific operation names. Use `POST /audit/operation/list` to get the valid set." + }, + "person_id": { + "type": "integer", + "format": "uint64", + "description": "Filter by the member who performed the action." + }, + "is_dangerous": { + "type": "boolean", + "description": "When true, return only high-risk (dangerous) operations." + }, + "is_write": { + "type": "boolean", + "description": "When true, return only write operations; when false, return only read operations." + } + } + }, + "AuditSearchResponse": { + "type": "object", + "description": "Cursor-paginated audit log search result.", + "required": [ + "total", + "search_after_ctx" + ], + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total matching entries in the search window.", + "example": 2 + }, + "search_after_ctx": { + "type": "string", + "description": "Opaque cursor for the next page. Empty string when there are no more results." + }, + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuditLog" + }, + "description": "Audit log entries for this page." + } + } + }, + "DutyError": { + "type": "object", + "description": "Error payload inside the response envelope. Present only on non-2xx responses.", + "properties": { + "code": { + "$ref": "#/components/schemas/ErrorCode" + }, + "message": { + "type": "string", + "description": "Human-readable error message, localized by the caller's Accept-Language. May contain field names, IDs, or other context from the failing request.", + "example": "The specified parameter template_id is not valid." + } + }, + "required": [ + "code", + "message" + ] + }, + "EmptyObject": { + "type": "object", + "description": "An empty object. Returned as the `data` payload by operations whose success signal is simply the absence of an error.", + "additionalProperties": false + }, + "EmptyRequest": { + "type": "object", + "description": "No parameters required.", + "additionalProperties": false + }, + "EmptyResponse": { + "type": "object", + "description": "Empty response body. The server returns `data: null` on success.", + "properties": {} + }, + "ErrorCode": { + "type": "string", + "description": "Flashduty error code enum. Every failed API response sets `error.code` to one of these stable wire strings. HTTP status is informational — the authoritative signal is the enum value.\n\n| Code | HTTP | Meaning |\n|---|---|---|\n| `OK` | 200 | Reserved — not returned on real errors. |\n| `InvalidParameter` | 400 | A required parameter is missing or failed validation. |\n| `BadRequest` | 400 | Generic 400 used when no more specific code fits. |\n| `InvalidContentType` | 400 | The `Content-Type` header is not `application/json`. |\n| `ResourceNotFound` | 400 | The referenced resource does not exist. Note: returned as HTTP 400, not 404 (historical choice). |\n| `NoLicense` | 400 | The feature is license-gated and no active license was found. |\n| `ReferenceExist` | 400 | Deletion blocked — other entities still reference this resource. |\n| `Unauthorized` | 401 | `app_key` is missing, invalid, or expired. |\n| `BalanceNotEnough` | 402 | Billing-gated operation with insufficient account balance. |\n| `AccessDenied` | 403 | Authenticated but lacking the permission required for this operation. |\n| `RouteNotFound` | 404 | The request URL path is not a known route. |\n| `MethodNotAllowed` | 405 | The HTTP method is not allowed on this otherwise-known path. |\n| `UndonedOrderExist` | 409 | An outstanding billing order blocks this new one. Wait and retry. |\n| `RequestLocked` | 423 | Operation temporarily locked due to repeated failures. |\n| `EntityTooLarge` | 413 | Request body exceeds the configured max size. |\n| `RequestTooFrequently` | 429 | Rate limit hit — API-global, per-account, or per-integration. |\n| `RequestVerifyRequired` | 428 | Second-factor verification required but not supplied. |\n| `DangerousOperation` | 428 | High-risk operation requires MFA verification. |\n| `InternalError` | 500 | Unhandled server-side error. Include `request_id` in the bug report. |\n| `ServiceUnavailable` | 503 | A backend dependency is unavailable. Try again later. |", + "enum": [ + "OK", + "InvalidParameter", + "BadRequest", + "InvalidContentType", + "ResourceNotFound", + "NoLicense", + "ReferenceExist", + "Unauthorized", + "BalanceNotEnough", + "AccessDenied", + "RouteNotFound", + "MethodNotAllowed", + "UndonedOrderExist", + "RequestLocked", + "EntityTooLarge", + "RequestTooFrequently", + "RequestVerifyRequired", + "DangerousOperation", + "InternalError", + "ServiceUnavailable" + ], + "x-enumDescriptions": { + "OK": "Reserved — not returned on real errors.", + "InvalidParameter": "A required parameter is missing or failed validation.", + "BadRequest": "Generic 400 used when no more specific code fits.", + "InvalidContentType": "The `Content-Type` header is not `application/json`.", + "ResourceNotFound": "The referenced resource does not exist. Note: returned as HTTP 400, not 404 (historical choice).", + "NoLicense": "The feature is license-gated and no active license was found.", + "ReferenceExist": "Deletion blocked — other entities still reference this resource.", + "Unauthorized": "`app_key` is missing, invalid, or expired.", + "BalanceNotEnough": "Billing-gated operation with insufficient account balance.", + "AccessDenied": "Authenticated but lacking the permission required for this operation.", + "RouteNotFound": "The request URL path is not a known route.", + "MethodNotAllowed": "The HTTP method is not allowed on this otherwise-known path.", + "UndonedOrderExist": "An outstanding billing order blocks this new one. Wait and retry.", + "RequestLocked": "Operation temporarily locked due to repeated failures.", + "EntityTooLarge": "Request body exceeds the configured max size.", + "RequestTooFrequently": "Rate limit hit — API-global, per-account, or per-integration.", + "RequestVerifyRequired": "Second-factor verification required but not supplied.", + "DangerousOperation": "High-risk operation requires MFA verification.", + "InternalError": "Unhandled server-side error. Include `request_id` in the bug report.", + "ServiceUnavailable": "A backend dependency is unavailable. Try again later." + }, + "example": "InvalidParameter" + }, + "ErrorResponse": { + "type": "object", + "description": "Response envelope for errors. `error` is required; `data` is absent.", + "properties": { + "request_id": { + "type": "string", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "error": { + "$ref": "#/components/schemas/DutyError" + } + }, + "required": [ + "request_id", + "error" + ] + }, + "InviteMemberItem": { + "type": "object", + "description": "Member to invite", + "properties": { + "member_name": { + "type": "string", + "minLength": 2, + "maxLength": 39, + "description": "Display name" + }, + "email": { + "type": "string", + "description": "Email address" + }, + "phone": { + "type": "string", + "description": "Phone number" + }, + "country_code": { + "type": "string", + "description": "Country code" + }, + "role_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Role IDs to assign" + }, + "locale": { + "type": "string", + "enum": [ + "zh-CN", + "en-US" + ], + "description": "Locale" + }, + "time_zone": { + "type": "string", + "description": "Time zone" + }, + "ref_id": { + "type": "string", + "description": "External reference ID" + } + } + }, + "MemberDeleteRequest": { + "type": "object", + "description": "Delete member request (provide one of the lookup fields)", + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "Member ID" + }, + "member_name": { + "type": "string", + "description": "Member name" + }, + "email": { + "type": "string", + "description": "Email address" + }, + "phone": { + "type": "string", + "description": "Phone number" + }, + "country_code": { + "type": "string", + "description": "Phone country code" + }, + "ref_id": { + "type": "string", + "description": "External reference ID" + } + } + }, + "MemberEmptyObject": { + "type": "object", + "description": "Empty response", + "properties": {} + }, + "MemberInfoRequest": { + "type": "object", + "description": "Get member info request", + "properties": {} + }, + "MemberInfoResponse": { + "type": "object", + "description": "Current member profile", + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "Account ID" + }, + "account_name": { + "type": "string", + "description": "Account name" + }, + "account_avatar": { + "type": "string", + "description": "Account avatar URL" + }, + "account_email": { + "type": "string", + "description": "Account email" + }, + "account_role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Assigned role IDs" + }, + "account_locale": { + "type": "string", + "description": "Account-level locale preference (e.g. zh-CN or en-US)" + }, + "account_time_zone": { + "type": "string", + "description": "Account-level time zone (e.g. Asia/Shanghai)" + }, + "domain": { + "type": "string", + "description": "Account domain" + }, + "member_id": { + "type": "integer", + "format": "uint64", + "description": "Member ID" + }, + "member_name": { + "type": "string", + "description": "Member display name" + }, + "phone": { + "type": "string", + "description": "Masked phone number" + }, + "phone_verified": { + "type": "boolean", + "description": "Whether phone is verified" + }, + "email": { + "type": "string", + "description": "Email address" + }, + "email_verified": { + "type": "boolean", + "description": "Whether email is verified" + }, + "country_code": { + "type": "string", + "description": "Phone country code" + }, + "avatar": { + "type": "string", + "description": "Member avatar URL" + }, + "locale": { + "type": "string", + "description": "Locale preference" + }, + "time_zone": { + "type": "string", + "description": "Time zone" + }, + "is_external": { + "type": "boolean", + "description": "Whether provisioned via SSO" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "pending", + "deleted" + ], + "description": "Member status. `enabled` — active member; `pending` — invited but not yet accepted; `deleted` — removed from the organization." + } + } + }, + "MemberInviteRequest": { + "type": "object", + "description": "Invite members request", + "required": [ + "members" + ], + "properties": { + "members": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InviteMemberItem" + }, + "description": "Members to invite (max 20)" + }, + "from": { + "type": "string", + "description": "Invite source context" + } + } + }, + "MemberInviteResponse": { + "type": "object", + "description": "Invite members response", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NewMemberItem" + }, + "description": "Newly created members" + } + } + }, + "MemberItem": { + "type": "object", + "description": "Member item", + "required": [ + "account_id", + "member_id", + "member_name", + "country_code", + "phone", + "email", + "phone_verified", + "email_verified", + "avatar", + "status", + "account_role_ids", + "created_at", + "updated_at", + "ref_id", + "is_external" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "Account ID" + }, + "member_id": { + "type": "integer", + "format": "uint64", + "description": "Member ID" + }, + "member_name": { + "type": "string", + "description": "Display name" + }, + "country_code": { + "type": "string", + "description": "Phone country code" + }, + "phone": { + "type": "string", + "description": "Masked phone number" + }, + "email": { + "type": "string", + "description": "Email address" + }, + "locale": { + "type": "string", + "description": "Locale" + }, + "time_zone": { + "type": "string", + "description": "Time zone" + }, + "phone_verified": { + "type": "boolean", + "description": "Phone verified" + }, + "email_verified": { + "type": "boolean", + "description": "Email verified" + }, + "avatar": { + "type": "string", + "description": "Avatar URL" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "pending", + "deleted" + ], + "description": "Member status. `enabled` — active member; `pending` — invited but not yet accepted; `deleted` — removed from the organization." + }, + "account_role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Role IDs" + }, + "is_external": { + "type": "boolean", + "description": "Provisioned via SSO" + }, + "ref_id": { + "type": "string", + "description": "External reference ID" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp (Unix seconds)" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Update timestamp (Unix seconds)" + } + } + }, + "MemberListRequest": { + "type": "object", + "description": "List members request", + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "Filter by role ID" + }, + "p": { + "type": "integer", + "minimum": 1, + "description": "Page number" + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "description": "Page size" + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "Sort field" + }, + "asc": { + "type": "boolean", + "description": "Ascending order" + }, + "query": { + "type": "string", + "description": "Search keyword" + } + } + }, + "MemberListResponse": { + "type": "object", + "description": "Member list response", + "properties": { + "p": { + "type": "integer", + "description": "Current page" + }, + "limit": { + "type": "integer", + "description": "Page size" + }, + "total": { + "type": "integer", + "description": "Total count" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MemberItem" + }, + "description": "Member items" + } + } + }, + "MemberResetInfoRequest": { + "type": "object", + "description": "Reset member info request", + "required": [ + "member_id" + ], + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "Member ID of the member to update" + }, + "member_name": { + "type": "string", + "minLength": 2, + "maxLength": 39, + "description": "Display name" + }, + "email": { + "type": "string", + "description": "Email address" + }, + "phone": { + "type": "string", + "description": "Phone number" + }, + "country_code": { + "type": "string", + "description": "Country code" + }, + "avatar": { + "type": "string", + "description": "Avatar URL" + }, + "locale": { + "type": "string", + "enum": [ + "zh-CN", + "en-US" + ], + "description": "Locale" + }, + "time_zone": { + "type": "string", + "description": "Time zone" + } + } + }, + "MemberRoleGrantRequest": { + "type": "object", + "description": "Grant role to member request", + "required": [ + "member_id", + "role_ids" + ], + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "Member ID" + }, + "role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Role IDs to grant; appended to the member's current roles (duplicates are deduplicated)." + } + } + }, + "MemberRoleRevokeRequest": { + "type": "object", + "description": "Revoke role from member request", + "required": [ + "member_id", + "role_ids" + ], + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "Member ID" + }, + "role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Role IDs to remove from the member." + } + } + }, + "MemberRoleUpdateRequest": { + "type": "object", + "description": "Update member roles request", + "required": [ + "member_id", + "role_ids" + ], + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "Member ID" + }, + "role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "New set of role IDs" + } + } + }, + "NewMemberItem": { + "type": "object", + "description": "Newly created member", + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "Member ID" + }, + "member_name": { + "type": "string", + "description": "Member display name" + } + } + }, + "PermissionFactorItem": { + "type": "object", + "description": "A permission factor.", + "required": [ + "factor_name", + "factor_type" + ], + "properties": { + "factor_name": { + "type": "string", + "description": "Factor identifier (e.g., 'template:read:info')." + }, + "factor_type": { + "type": "string", + "enum": [ + "api", + "button", + "visit", + "menu", + "url" + ], + "description": "Factor type." + } + } + }, + "PermissionFactorListRequest": { + "type": "object", + "description": "Filters for listing permission factors.", + "properties": { + "factor_types": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "api", + "button", + "visit", + "menu", + "url" + ] + }, + "description": "Filter by factor type." + } + } + }, + "PermissionFactorListResponse": { + "type": "array", + "description": "List of permission factors.", + "items": { + "$ref": "#/components/schemas/PermissionFactorItem" + } + }, + "PermissionItem": { + "type": "object", + "description": "A permission entry.", + "required": [ + "id", + "permission_name", + "permission_type", + "description", + "class", + "scope", + "status" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "Unique permission ID." + }, + "permission_name": { + "type": "string", + "description": "Permission display name." + }, + "permission_type": { + "type": "string", + "enum": [ + "read", + "manage" + ], + "description": "Whether this is a read or manage permission." + }, + "description": { + "type": "string", + "description": "Human-readable permission description." + }, + "class": { + "type": "string", + "description": "Permission class (e.g., 'On-call', 'Organization')." + }, + "scope": { + "type": "string", + "description": "Permission scope (e.g., 'on-call', 'organization')." + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "Permission status." + }, + "is_granted": { + "type": "boolean", + "description": "Present when with_all is true. Indicates whether this permission is granted to the requested roles." + } + } + }, + "PersonInfosRequest": { + "type": "object", + "description": "Get person info by IDs request", + "required": [ + "person_ids" + ], + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "List of person IDs" + } + } + }, + "PersonInfosResponse": { + "type": "object", + "description": "Person info by IDs response", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PersonItem" + }, + "description": "Person profiles" + } + } + }, + "PersonItem": { + "type": "object", + "description": "Person profile", + "required": [ + "account_id", + "person_id", + "phone_verified", + "email_verified" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "Account ID" + }, + "person_id": { + "type": "integer", + "format": "uint64", + "description": "Person ID" + }, + "person_name": { + "type": "string", + "description": "Display name" + }, + "avatar": { + "type": "string", + "description": "Avatar URL" + }, + "locale": { + "type": "string", + "description": "Locale" + }, + "time_zone": { + "type": "string", + "description": "Time zone" + }, + "email": { + "type": "string", + "description": "Email address" + }, + "phone": { + "type": "string", + "description": "Phone number" + }, + "phone_verified": { + "type": "boolean", + "description": "Phone verified" + }, + "email_verified": { + "type": "boolean", + "description": "Email verified" + }, + "as": { + "type": "string", + "description": "Login role (account/member)" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "pending", + "deleted" + ], + "description": "Person status. `enabled` — active; `pending` — invited but not yet accepted; `deleted` — removed." + } + } + }, + "PlatformEmptyObject": { + "type": "object", + "description": "Empty object returned on success for operations with no meaningful payload.", + "additionalProperties": false + }, + "RoleGrantRequest": { + "type": "object", + "required": [ + "member_ids", + "role_id" + ], + "description": "Request to grant or revoke a role from members.", + "properties": { + "member_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Member IDs to grant/revoke the role. Max 100." + }, + "role_id": { + "type": "integer", + "format": "uint64", + "description": "Role ID to grant or revoke." + } + } + }, + "RoleIDRequest": { + "type": "object", + "required": [ + "role_id" + ], + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "Role ID." + } + } + }, + "RoleInfoRequest": { + "type": "object", + "required": [ + "role_id" + ], + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "Role ID." + } + } + }, + "RoleItem": { + "type": "object", + "description": "A role and its permission set.", + "required": [ + "role_id", + "role_name", + "description", + "status", + "permission_ids", + "editable", + "created_at", + "updated_at" + ], + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "Unique role ID." + }, + "role_name": { + "type": "string", + "description": "Role display name." + }, + "description": { + "type": "string", + "description": "Role description." + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "Role status." + }, + "permission_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "IDs of permissions granted by this role." + }, + "editable": { + "type": "boolean", + "description": "False for built-in roles which cannot be modified." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Unix epoch seconds the role was created." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Unix epoch seconds the role was last updated." + } + } + }, + "RoleListRequest": { + "type": "object", + "description": "Filters for listing roles.", + "properties": { + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "Sort field." + }, + "asc": { + "type": "boolean", + "description": "Ascending sort order." + } + } + }, + "RoleListResponse": { + "type": "object", + "description": "Role list result.", + "required": [ + "total", + "items" + ], + "properties": { + "total": { + "type": "integer", + "description": "Total role count." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoleItem" + } + } + } + }, + "RolePermissionListRequest": { + "type": "object", + "description": "Filters for listing permissions.", + "properties": { + "role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Filter to permissions granted to these roles." + }, + "with_all": { + "type": "boolean", + "description": "If true, return all permissions with is_granted set to indicate which are granted." + } + } + }, + "RolePermissionListResponse": { + "type": "object", + "description": "Permission list result.", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PermissionItem" + } + } + } + }, + "RoleUpsertRequest": { + "type": "object", + "required": [ + "role_name" + ], + "description": "Parameters for creating or updating a custom role.", + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "Role ID. Omit or set to 0 to create." + }, + "role_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Role display name. 1–39 characters." + }, + "description": { + "type": "string", + "maxLength": 499, + "description": "Role description." + }, + "permission_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Permission IDs to grant. Replaces the existing set." + } + } + }, + "RoleUpsertResponse": { + "type": "object", + "description": "Role create/update result.", + "required": [ + "role_id", + "role_name" + ], + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "Created or updated role ID." + }, + "role_name": { + "type": "string", + "description": "Role name echoed from the request." + } + } + }, + "SuccessEnvelope": { + "type": "object", + "description": "Success response envelope. On every 2xx response, `request_id` identifies the call (also mirrored in the `Flashcat-Request-Id` header) and `data` holds the endpoint-specific payload. Failure responses use a different shape — see `ErrorResponse`.", + "properties": { + "request_id": { + "type": "string", + "description": "Unique ID for this request. Mirrored in the Flashcat-Request-Id response header. Include it when reporting issues.", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "data": { + "description": "Endpoint-specific payload. See each operation's 200 response schema." + } + }, + "required": [ + "request_id", + "data" + ] + }, + "TeamBriefItem": { + "type": "object", + "description": "Brief team info for batch responses.", + "properties": { + "team_id": { + "type": "integer", + "format": "uint64" + }, + "team_name": { + "type": "string" + }, + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + } + } + } + }, + "TeamDeleteRequest": { + "type": "object", + "description": "Request identifying a team to delete.", + "properties": { + "team_id": { + "type": "integer", + "format": "uint64", + "description": "Team ID." + }, + "team_name": { + "type": "string", + "description": "Team name." + }, + "ref_id": { + "type": "string", + "description": "External reference ID." + } + } + }, + "TeamInfoRequest": { + "type": "object", + "description": "Request identifying a team by one of ID, name, or external ref.", + "properties": { + "team_id": { + "type": "integer", + "format": "uint64", + "description": "Team ID." + }, + "team_name": { + "type": "string", + "description": "Team name." + }, + "ref_id": { + "type": "string", + "description": "External reference ID." + } + } + }, + "TeamInfosRequest": { + "type": "object", + "required": [ + "team_ids" + ], + "description": "Request for batch team lookup by IDs.", + "properties": { + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "List of team IDs to look up. Max 100." + } + } + }, + "TeamInfosResponse": { + "type": "object", + "description": "Batch team info result.", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamBriefItem" + } + } + } + }, + "TeamItem": { + "type": "object", + "description": "A team and its membership.", + "required": [ + "account_id", + "team_id", + "team_name", + "description", + "status", + "updated_by_name", + "updated_by", + "creator_id", + "creator_name", + "created_at", + "updated_at", + "person_ids", + "ref_id" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "Owning account ID." + }, + "team_id": { + "type": "integer", + "format": "uint64", + "description": "Unique team ID." + }, + "team_name": { + "type": "string", + "description": "Team display name. 1–39 characters, unique per account." + }, + "description": { + "type": "string", + "description": "Free-form description." + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "Team status." + }, + "updated_by_name": { + "type": "string", + "description": "Display name of the last editor." + }, + "updated_by": { + "type": "integer", + "format": "uint64", + "description": "Member ID of the last editor." + }, + "creator_id": { + "type": "integer", + "format": "uint64", + "description": "Member ID of the creator." + }, + "creator_name": { + "type": "string", + "description": "Display name of the creator." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Unix epoch seconds the team was created." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Unix epoch seconds the team was last updated." + }, + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Member IDs of team members." + }, + "ref_id": { + "type": "string", + "description": "External reference ID for third-party HR system integration." + } + } + }, + "TeamListRequest": { + "type": "object", + "description": "Filters for listing teams.", + "properties": { + "p": { + "type": "integer", + "description": "Page number. Default: 1.", + "minimum": 1, + "default": 1 + }, + "limit": { + "type": "integer", + "description": "Page size. Max: 100. Default: 20.", + "minimum": 1, + "maximum": 100, + "default": 20 + }, + "orderby": { + "type": "string", + "description": "Sort field.", + "enum": [ + "created_at", + "updated_at", + "team_name" + ] + }, + "asc": { + "type": "boolean", + "description": "Ascending sort order." + }, + "person_id": { + "type": "integer", + "format": "uint64", + "description": "Filter by member ID — return only teams this person belongs to." + }, + "query": { + "type": "string", + "description": "Substring match on team name." + } + } + }, + "TeamListResponse": { + "type": "object", + "description": "Paginated team list.", + "required": [ + "p", + "limit", + "total", + "items" + ], + "properties": { + "p": { + "type": "integer", + "description": "Current page number." + }, + "limit": { + "type": "integer", + "description": "Page size used." + }, + "total": { + "type": "integer", + "description": "Total number of teams matching the filter." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamItem" + } + } + } + }, + "TeamUpsertRequest": { + "type": "object", + "required": [ + "team_name" + ], + "description": "Parameters for creating or updating a team.", + "properties": { + "team_id": { + "type": "integer", + "format": "uint64", + "description": "Team ID. Omit or set to 0 to create a new team." + }, + "team_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "Team display name. 1–39 characters." + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "Free-form description." + }, + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "Member IDs to set as team members. Replaces the existing member list." + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "description": "Email addresses to invite as members." + }, + "phones": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Phone numbers to invite as members." + }, + "countryCode": { + "type": "string", + "description": "Default country code applied to any `phones` entries that are not in E.164 format." + }, + "ref_id": { + "type": "string", + "description": "External reference ID for HR system integration." + }, + "reset_if_name_exist": { + "type": "boolean", + "description": "If true and a team with the same name already exists, reset its membership to the provided person_ids." + } + } + }, + "TeamUpsertResponse": { + "type": "object", + "description": "Team create/update result.", + "required": [ + "team_id", + "team_name" + ], + "properties": { + "team_id": { + "type": "integer", + "format": "uint64", + "description": "Created or updated team ID." + }, + "team_name": { + "type": "string", + "description": "Team name echoed from the request." + } + } + } + } + } +} diff --git a/api-reference/platform.openapi.zh.json b/api-reference/platform.openapi.zh.json new file mode 100644 index 0000000..5cbee30 --- /dev/null +++ b/api-reference/platform.openapi.zh.json @@ -0,0 +1,3933 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Flashduty 开放 API", + "description": "Flashduty 事件管理平台的公开 HTTP API —— 覆盖故障、通知模板、协作空间、值班排班、监控、RUM、以及平台管理。每次调用都需在 query 中携带 `app_key`,该 key 在 Flashduty 控制台 账户 → APP Key 中签发。所有响应使用统一结构:成功时为 `{ request_id, data }`,失败时为 `{ request_id, error }`。", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://api.flashcat.cloud", + "description": "Flashduty Open API" + } + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "tags": [ + { + "name": "平台/成员管理", + "description": "" + }, + { + "name": "平台/团队管理", + "description": "" + }, + { + "name": "平台/角色与权限", + "description": "" + }, + { + "name": "平台/审计日志", + "description": "检索和读取账户操作审计日志。" + } + ], + "paths": { + "/team/list": { + "post": { + "operationId": "team-read-list", + "summary": "查看团队列表", + "description": "分页返回当前账户下的团队列表。", + "tags": [ + "平台/团队管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 传入 `person_id` 可过滤返回指定人员所属的团队。\n- 默认 p=1、limit=20。", + "href": "/zh/api-reference/platform/teams/team-read-list", + "metadata": { + "sidebarTitle": "查看团队列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TeamListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "p": 1, + "limit": 20, + "total": 5, + "items": [ + { + "account_id": 10023, + "team_id": 1001, + "team_name": "后端 SRE", + "status": "enabled", + "creator_id": 80011, + "created_at": 1710000000, + "updated_at": 1712000000, + "person_ids": [ + 80011 + ], + "description": "", + "updated_by_name": "", + "updated_by": 0, + "creator_name": "alice", + "ref_id": "" + } + ] + } + } + } + } + }, + "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/TeamListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "orderby": "created_at", + "asc": false + } + } + } + } + } + }, + "/team/infos": { + "post": { + "operationId": "team-read-infos", + "summary": "批量查看团队信息", + "description": "一次请求按 ID 列表批量返回多个团队的基本信息。", + "tags": [ + "平台/团队管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 每次最多传入 100 个团队 ID。", + "href": "/zh/api-reference/platform/teams/team-read-infos", + "metadata": { + "sidebarTitle": "批量查看团队信息" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TeamInfosResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "team_id": 1001, + "team_name": "后端 SRE", + "person_ids": [ + 80011, + 80012 + ] + }, + { + "team_id": 1002, + "team_name": "前端", + "person_ids": [ + 80013 + ] + } + ] + } + } + } + } + }, + "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/TeamInfosRequest" + }, + "example": { + "team_ids": [ + 1001, + 1002 + ] + } + } + } + } + } + }, + "/role/disable": { + "post": { + "operationId": "role-write-disable", + "summary": "禁用角色", + "description": "禁用自定义角色,使其停止授予权限。", + "tags": [ + "平台/角色与权限" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **角色管理**(`organization`) |\n\n## 使用说明\n\n- 持有该角色的成员将立即失去其权限。\n- 只有自定义角色可被禁用。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/platform/roles-permissions/role-write-disable", + "metadata": { + "sidebarTitle": "禁用角色" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleIDRequest" + }, + "example": { + "role_id": 150 + } + } + } + } + } + }, + "/role/delete": { + "post": { + "operationId": "role-write-delete", + "summary": "删除角色", + "description": "永久删除自定义角色并从所有成员处撤销授权。", + "tags": [ + "平台/角色与权限" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **角色管理**(`organization`) |\n\n## 使用说明\n\n- 内置角色无法删除。\n- 持有该角色的所有成员将立即失去其权限。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/platform/roles-permissions/role-write-delete", + "metadata": { + "sidebarTitle": "删除角色" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleIDRequest" + }, + "example": { + "role_id": 150 + } + } + } + } + } + }, + "/person/infos": { + "post": { + "operationId": "personInfos", + "summary": "批量获取人员信息", + "description": "根据 ID 批量返回成员或账户的资料信息。", + "tags": [ + "平台/成员管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/platform/members/person-infos", + "metadata": { + "sidebarTitle": "批量获取人员信息" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PersonInfosResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "person_id": 2476444212131, + "person_name": "Alice", + "avatar": "/image/avatar1.png", + "locale": "zh-CN", + "time_zone": "Asia/Shanghai", + "email": "alice@example.com", + "phone_verified": false, + "email_verified": true, + "as": "member", + "status": "enabled" + }, + { + "account_id": 2451002751131, + "person_id": 3790925372131, + "person_name": "Bob", + "email": "bob@example.com", + "phone_verified": false, + "email_verified": true, + "as": "member", + "status": "enabled" + } + ] + } + } + } + } + }, + "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/PersonInfosRequest" + }, + "example": { + "person_ids": [ + 2476444212131, + 3790925372131 + ] + } + } + } + } + } + }, + "/member/info": { + "post": { + "operationId": "memberInfo", + "summary": "获取当前成员信息", + "description": "返回当前会话成员的完整资料。", + "tags": [ + "平台/成员管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/platform/members/member-info", + "metadata": { + "sidebarTitle": "获取当前成员信息" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberInfoResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_avatar": "", + "account_email": "alice@example.com", + "account_id": 2451002751131, + "account_locale": "en-US", + "account_name": "Acme Corp", + "account_role_ids": [ + 6 + ], + "account_time_zone": "Asia/Shanghai", + "avatar": "/image/avatar1.png", + "country_code": "CN", + "created_at": 1701399971, + "domain": "acme", + "email": "alice@example.com", + "email_verified": true, + "is_external": false, + "locale": "zh-CN", + "member_id": 2476444212131, + "member_name": "Alice", + "phone": "+86185****0300", + "phone_verified": true, + "time_zone": "Asia/Shanghai" + } + } + } + } + }, + "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/MemberInfoRequest" + }, + "example": {} + } + } + } + } + }, + "/role/permission/list": { + "post": { + "operationId": "role-read-list-permission", + "summary": "查看角色权限集合", + "description": "返回所有可用权限,可按角色 ID 过滤仅返回指定角色已授予的权限。", + "tags": [ + "平台/角色与权限" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 传入 `role_ids` 可过滤只返回指定角色已授予的权限。\n- 传入 `with_all: true` 可返回全部权限,并在每项中通过 `is_granted` 标记是否已授予。", + "href": "/zh/api-reference/platform/roles-permissions/role-read-list-permission", + "metadata": { + "sidebarTitle": "查看角色权限集合" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RolePermissionListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "id": 501, + "permission_name": "模板查看", + "permission_type": "read", + "description": "查看通知模板", + "class": "On-call", + "scope": "on-call", + "status": "enabled", + "is_granted": true + } + ] + } + } + } + } + }, + "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/RolePermissionListRequest" + }, + "example": { + "role_ids": [ + 150 + ], + "with_all": true + } + } + } + } + } + }, + "/team/info": { + "post": { + "operationId": "team-read-info", + "summary": "查看团队详情", + "description": "按 ID、名称或外部引用 ID 返回单个团队的详细信息。", + "tags": [ + "平台/团队管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- `team_id`、`team_name`、`ref_id` 三者至少提供一个。", + "href": "/zh/api-reference/platform/teams/team-read-info", + "metadata": { + "sidebarTitle": "查看团队详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TeamItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_id": 10023, + "team_id": 1001, + "team_name": "后端 SRE", + "description": "后端可靠性工程团队", + "status": "enabled", + "updated_by_name": "alice", + "updated_by": 80011, + "creator_id": 80011, + "creator_name": "alice", + "created_at": 1710000000, + "updated_at": 1712000000, + "person_ids": [ + 80011, + 80012 + ], + "ref_id": "" + } + } + } + } + }, + "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/TeamInfoRequest" + }, + "example": { + "team_id": 1001 + } + } + } + } + } + }, + "/team/delete": { + "post": { + "operationId": "team-write-delete", + "summary": "删除团队", + "description": "按 ID、名称或外部引用 ID 永久删除一个团队。", + "tags": [ + "平台/团队管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **团队管理**(`organization`) |\n\n## 使用说明\n\n- `team_id`、`team_name`、`ref_id` 三者至少提供一个。\n- 若团队仍被排班、分派策略等资源引用,会返回 `400 ReferenceExist`。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/platform/teams/team-write-delete", + "metadata": { + "sidebarTitle": "删除团队" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamDeleteRequest" + }, + "example": { + "team_id": 1001 + } + } + } + } + } + }, + "/role/info": { + "post": { + "operationId": "role-read-info", + "summary": "查看角色详情", + "description": "按角色 ID 返回单个角色的详细信息。", + "tags": [ + "平台/角色与权限" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/platform/roles-permissions/role-read-info", + "metadata": { + "sidebarTitle": "查看角色详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RoleItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "role_id": 2, + "role_name": "账户管理员", + "description": "拥有所有权限的账户管理员。", + "status": "enabled", + "permission_ids": [ + 101, + 102, + 201 + ], + "editable": false, + "created_at": 1700000000, + "updated_at": 1700000000 + } + } + } + } + }, + "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/RoleInfoRequest" + }, + "example": { + "role_id": 2 + } + } + } + } + } + }, + "/member/invite": { + "post": { + "operationId": "memberInvite", + "summary": "邀请成员", + "description": "通过邮箱或手机号批量邀请新成员加入组织。", + "tags": [ + "平台/成员管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/platform/members/member-invite", + "metadata": { + "sidebarTitle": "邀请成员" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberInviteResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "member_id": 5068740052131, + "member_name": "Charlie" + } + ] + } + } + } + } + }, + "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/MemberInviteRequest" + }, + "example": { + "members": [ + { + "member_name": "Charlie", + "email": "charlie@example.com", + "locale": "en-US", + "time_zone": "Asia/Shanghai", + "role_ids": [ + 6 + ] + } + ] + } + } + } + } + } + }, + "/role/enable": { + "post": { + "operationId": "role-write-enable", + "summary": "启用角色", + "description": "重新启用已被禁用的自定义角色。", + "tags": [ + "平台/角色与权限" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **角色管理**(`organization`) |\n\n## 使用说明\n\n- 只有自定义角色可以被启用/禁用,内置角色始终保持启用状态。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/platform/roles-permissions/role-write-enable", + "metadata": { + "sidebarTitle": "启用角色" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleIDRequest" + }, + "example": { + "role_id": 150 + } + } + } + } + } + }, + "/role/list": { + "post": { + "operationId": "role-read-list", + "summary": "查看角色列表", + "description": "返回当前账户下所有自定义及内置角色。", + "tags": [ + "平台/角色与权限" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 内置角色(`editable: false`)不可修改或删除。", + "href": "/zh/api-reference/platform/roles-permissions/role-read-list", + "metadata": { + "sidebarTitle": "查看角色列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RoleListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 3, + "items": [ + { + "role_id": 2, + "role_name": "账户管理员", + "description": "", + "status": "enabled", + "permission_ids": [], + "editable": false, + "created_at": 1700000000, + "updated_at": 1700000000 + } + ] + } + } + } + } + }, + "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/RoleListRequest" + }, + "example": { + "orderby": "created_at", + "asc": false + } + } + } + } + } + }, + "/member/info/reset": { + "post": { + "operationId": "memberResetInfo", + "summary": "重置成员信息", + "description": "批量更新当前成员的多个资料字段。", + "tags": [ + "平台/成员管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/platform/members/member-reset-info", + "metadata": { + "sidebarTitle": "重置成员信息" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberResetInfoRequest" + }, + "example": { + "member_id": 2476444212131, + "member_name": "Alice", + "locale": "zh-CN", + "time_zone": "Asia/Shanghai" + } + } + } + } + } + }, + "/audit/search": { + "post": { + "operationId": "audit-read-search", + "summary": "检索审计日志", + "description": "按时间范围返回游标分页的操作审计日志列表。", + "tags": [ + "平台/审计日志" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **审计查看**(`organization`) |\n\n## 使用说明\n\n- 时间范围必填。最大跨度 90 天,`start_time` 和 `end_time` 均为 Unix 时间戳(**秒**)。\n- 使用上次响应中的 `search_after_ctx` 获取下一页。该 token 是不透明的,请勿手动构造。\n- 可查询的时间窗口受账户许可证限制,超出保留期的查询会静默返回空结果,而不是报错。\n- 默认每页 20 条,最大 99 条。", + "href": "/zh/api-reference/platform/audit-logs/audit-read-search", + "metadata": { + "sidebarTitle": "检索审计日志" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AuditSearchResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 2, + "search_after_ctx": "", + "docs": [ + { + "created_at": 1712700123456, + "account_id": 10023, + "member_id": 80011, + "member_name": "Alice", + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "ip": "203.0.113.42", + "operation": "template:write:create", + "operation_name": "创建模板", + "body": "{\"template_name\":\"生产默认模板\"}", + "params": [], + "is_dangerous": false, + "is_write": true + } + ] + } + } + } + } + }, + "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/AuditSearchRequest" + }, + "example": { + "start_time": 1712620800, + "end_time": 1712707200, + "limit": 20, + "operations": [ + "template:write:create", + "template:write:delete" + ] + } + } + } + } + } + }, + "/role/member/grant": { + "post": { + "operationId": "role-write-grant-role", + "summary": "授予成员账户权限", + "description": "将角色授予一个或多个成员,赋予其该角色包含的权限。", + "tags": [ + "平台/角色与权限" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **角色管理**(`organization`) |\n\n## 使用说明\n\n- 每次最多传入 100 个成员 ID。\n- 已持有该角色的成员会被静默跳过。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/platform/roles-permissions/role-write-grant-role", + "metadata": { + "sidebarTitle": "授予成员账户权限" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleGrantRequest" + }, + "example": { + "member_ids": [ + 80011, + 80012 + ], + "role_id": 150 + } + } + } + } + } + }, + "/member/role/update": { + "post": { + "operationId": "memberUpdateRole", + "summary": "更新成员角色", + "description": "一次性替换成员的全部角色授权。", + "tags": [ + "平台/成员管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/platform/members/member-update-role", + "metadata": { + "sidebarTitle": "更新成员角色" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberRoleUpdateRequest" + }, + "example": { + "member_id": 5068740052131, + "role_ids": [ + 2, + 6 + ] + } + } + } + } + } + }, + "/role/upsert": { + "post": { + "operationId": "role-write-upsert", + "summary": "创建或更新角色", + "description": "创建新的自定义角色或更新已有角色,更新时传入 `role_id`。", + "tags": [ + "平台/角色与权限" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **角色管理**(`organization`) |\n\n## 使用说明\n\n- 省略 `role_id`(或置为 0)表示创建;传入已有 ID 表示更新。\n- `role_name` 须为 1–39 个字符且在账户内唯一。\n- `permission_ids` 会完整替换角色的权限集合。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/platform/roles-permissions/role-write-upsert", + "metadata": { + "sidebarTitle": "创建或更新角色" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RoleUpsertResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "role_id": 150, + "role_name": "值班管理员" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleUpsertRequest" + }, + "example": { + "role_name": "值班管理员", + "description": "管理值班排班和故障处理。", + "permission_ids": [ + 501, + 502 + ] + } + } + } + } + } + }, + "/role/permission/factor/list": { + "post": { + "operationId": "role-read-list-permission-factor", + "summary": "查看权限因子集合", + "description": "返回所有权限因子(API、按钮、菜单、URL、访问),可按类型过滤。", + "tags": [ + "平台/角色与权限" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 权限因子是每个权限的细粒度控制项。\n- `factor_types` 可选值:`api`、`button`、`visit`、`menu`、`url`。", + "href": "/zh/api-reference/platform/roles-permissions/role-read-list-permission-factor", + "metadata": { + "sidebarTitle": "查看权限因子集合" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PermissionFactorListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": [ + { + "factor_name": "template:read:info", + "factor_type": "api" + } + ] + } + } + } + }, + "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/PermissionFactorListRequest" + }, + "example": { + "factor_types": [ + "api" + ] + } + } + } + } + } + }, + "/role/member/revoke": { + "post": { + "operationId": "role-write-revoke-role", + "summary": "解除成员账户权限", + "description": "从一个或多个成员处撤销角色授权。", + "tags": [ + "平台/角色与权限" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **角色管理**(`organization`) |\n\n## 使用说明\n\n- 未持有该角色的成员会被静默跳过。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/platform/roles-permissions/role-write-revoke-role", + "metadata": { + "sidebarTitle": "解除成员账户权限" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PlatformEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleGrantRequest" + }, + "example": { + "member_ids": [ + 80011 + ], + "role_id": 150 + } + } + } + } + } + }, + "/audit/operation/list": { + "post": { + "operationId": "audit-read-operation-list", + "summary": "查看事件类型列表", + "description": "返回所有会记录到审计日志中的操作名称,可用于 `operations` 过滤参数。", + "tags": [ + "平台/审计日志" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **审计查看**(`organization`) |\n\n## 使用说明\n\n- 将本接口返回的 `name` 值作为 `POST /audit/search` 的 `operations` 过滤参数使用。\n- `name_cn` 是控制台展示的中文标签;`name` 是用于过滤的稳定字段值。", + "href": "/zh/api-reference/platform/audit-logs/audit-read-operation-list", + "metadata": { + "sidebarTitle": "查看事件类型列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/AuditOperationListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "name": "template:write:create", + "name_cn": "创建模板" + }, + { + "name": "template:write:delete", + "name_cn": "删除模板" + }, + { + "name": "incident:write:acknowledge", + "name_cn": "认领故障" + } + ] + } + } + } + } + }, + "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/AuditOperationListRequest" + }, + "example": {} + } + } + } + } + }, + "/team/upsert": { + "post": { + "operationId": "team-write-upsert", + "summary": "变更团队信息", + "description": "创建新团队或更新已有团队,更新时传入 `team_id`。", + "tags": [ + "平台/团队管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **团队管理**(`organization`) |\n\n## 使用说明\n\n- 省略 `team_id`(或置为 0)表示创建新团队;传入已有 ID 表示更新。\n- `team_name` 须为 1–39 个字符且在账户内唯一。\n- 传入 `person_ids` 可设置团队成员,会替换整个成员列表。\n- 传入 `emails` 或 `phones` 可邀请尚未注册的成员。\n- `ref_id` 是供第三方 HR 系统集成使用的外部标识。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/platform/teams/team-write-upsert", + "metadata": { + "sidebarTitle": "变更团队信息" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TeamUpsertResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "team_id": 1001, + "team_name": "后端 SRE" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamUpsertRequest" + }, + "example": { + "team_name": "后端 SRE", + "description": "后端可靠性工程团队", + "person_ids": [ + 80011, + 80012 + ] + } + } + } + } + } + }, + "/member/role/grant": { + "post": { + "operationId": "memberGrantRole", + "summary": "授予成员角色", + "description": "为成员添加角色授权。", + "tags": [ + "平台/成员管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/platform/members/member-grant-role", + "metadata": { + "sidebarTitle": "授予成员角色" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberRoleGrantRequest" + }, + "example": { + "member_id": 5068740052131, + "role_ids": [ + 6 + ] + } + } + } + } + } + }, + "/member/role/revoke": { + "post": { + "operationId": "memberRevokeRole", + "summary": "解除成员角色", + "description": "移除成员的角色授权。", + "tags": [ + "平台/成员管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/platform/members/member-revoke-role", + "metadata": { + "sidebarTitle": "解除成员角色" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberRoleRevokeRequest" + }, + "example": { + "member_id": 5068740052131, + "role_ids": [ + 6 + ] + } + } + } + } + } + }, + "/member/delete": { + "post": { + "operationId": "memberDelete", + "summary": "删除成员", + "description": "通过 ID、邮箱、手机号或名称从组织中移除成员。", + "tags": [ + "平台/成员管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/platform/members/member-delete", + "metadata": { + "sidebarTitle": "删除成员" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberEmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberDeleteRequest" + }, + "example": { + "member_id": 5068740052131 + } + } + } + } + } + }, + "/member/list": { + "post": { + "operationId": "memberList", + "summary": "查询成员列表", + "description": "返回组织成员的分页列表。", + "tags": [ + "平台/成员管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/platform/members/member-list", + "metadata": { + "sidebarTitle": "查询成员列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MemberListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "p": 1, + "limit": 5, + "total": 148, + "items": [ + { + "account_id": 2451002751131, + "member_id": 5068740052131, + "member_name": "Bob", + "country_code": "", + "phone": "+86151****6519", + "email": "bob@example.com", + "phone_verified": true, + "email_verified": true, + "avatar": "", + "status": "enabled", + "account_role_ids": [ + 2, + 6 + ], + "created_at": 1752030749, + "updated_at": 1775962064, + "ref_id": "", + "is_external": false + }, + { + "account_id": 2451002751131, + "member_id": 2476444212131, + "member_name": "Alice", + "country_code": "CN", + "phone": "+86185****0300", + "email": "alice@example.com", + "phone_verified": true, + "email_verified": true, + "avatar": "/image/avatar1.png", + "status": "enabled", + "account_role_ids": [ + 6 + ], + "created_at": 1701399971, + "updated_at": 1775809507, + "ref_id": "", + "is_external": false + } + ] + } + } + } + } + }, + "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/MemberListRequest" + }, + "example": { + "p": 1, + "limit": 5 + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "AppKeyAuth": { + "type": "apiKey", + "in": "query", + "name": "app_key", + "description": "在 Flashduty 控制台 账户 → APP Key 中签发的 app_key。调用任何公开 API 时都必须携带。它等同于所属账户的身份凭证,请妥善保管。" + } + }, + "responses": { + "BadRequest": { + "description": "请求非法 — 通常是参数缺失或格式不正确。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "missingParameter": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "InvalidParameter", + "message": "The specified parameter is not valid." + } + } + } + } + } + } + }, + "Unauthorized": { + "description": "app_key 缺失或无效。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "missingAppKey": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "Unauthorized", + "message": "You are unauthorized." + } + } + } + } + } + } + }, + "Forbidden": { + "description": "app_key 有效但没有执行该操作的权限。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "noEditPermission": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "AccessDenied", + "message": "Access Denied." + } + } + } + } + } + } + }, + "NotFound": { + "description": "目标资源不存在或已被删除。注意:Flashduty 对业务实体的缺失通常返回 HTTP 400 + code=`ResourceNotFound`,真正的 404 只用于未知路由。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "resourceMissing": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "ResourceNotFound", + "message": "The resource you request is not found" + } + } + } + } + } + } + }, + "TooManyRequests": { + "description": "命中限流。可能是全局 API 限流、账户级限流或集成级限流。限流按账户聚合。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "rateLimited": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "RequestTooFrequently", + "message": "Request too frequently." + } + } + } + } + } + } + }, + "ServerError": { + "description": "服务端未预期错误。反馈问题时请携带 request_id。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "internal": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "InternalError", + "message": "We encountered an internal error, and it has been reported. Please try again later." + } + } + } + } + } + } + } + }, + "schemas": { + "AuditLog": { + "type": "object", + "description": "单条审计日志。", + "required": [ + "created_at", + "account_id", + "member_id", + "member_name", + "request_id", + "ip", + "operation", + "operation_name", + "body", + "params", + "is_dangerous", + "is_write" + ], + "properties": { + "created_at": { + "type": "integer", + "format": "int64", + "description": "操作时间,Unix 毫秒时间戳。" + }, + "account_id": { + "type": "integer", + "format": "uint64", + "description": "账户 ID。" + }, + "member_id": { + "type": "integer", + "format": "uint64", + "description": "操作人的成员 ID。" + }, + "member_name": { + "type": "string", + "description": "操作人的显示名称。" + }, + "request_id": { + "type": "string", + "description": "用于关联的唯一请求 ID。" + }, + "ip": { + "type": "string", + "description": "调用者的客户端 IP 地址。" + }, + "operation": { + "type": "string", + "description": "稳定的机器可读操作名称,如 `template:write:create`。" + }, + "operation_name": { + "type": "string", + "description": "按账户语种显示的人类可读操作标签。" + }, + "body": { + "type": "string", + "description": "JSON 编码的请求体(可能截断至 10 KB)。" + }, + "params": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Key": { + "type": "string" + }, + "Value": { + "type": "string" + } + } + }, + "description": "URL 路径参数的键值对数组,无参数时为空数组。" + }, + "is_dangerous": { + "type": "boolean", + "description": "是否被标记为高危操作。" + }, + "is_write": { + "type": "boolean", + "description": "是否为写操作;false 表示只读操作。" + } + } + }, + "AuditOperationListRequest": { + "type": "object", + "description": "不需要任何参数。", + "additionalProperties": false + }, + "AuditOperationListResponse": { + "type": "object", + "description": "可审计操作类型列表。", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuditOperationTypeItem" + } + } + } + }, + "AuditOperationTypeItem": { + "type": "object", + "description": "一条可审计的操作类型。", + "required": [ + "name", + "name_cn" + ], + "properties": { + "name": { + "type": "string", + "description": "用于过滤的稳定机器可读操作名称。", + "example": "template:write:create" + }, + "name_cn": { + "type": "string", + "description": "控制台显示的中文标签。", + "example": "创建模板" + } + } + }, + "AuditSearchRequest": { + "type": "object", + "description": "审计日志检索的过滤条件,时间范围必填。", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "检索窗口开始时间,Unix 时间戳(秒)。", + "example": 1712620800 + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "检索窗口结束时间,Unix 时间戳(秒)。必须晚于 `start_time`,最大跨度 90 天。", + "example": 1712707200 + }, + "limit": { + "type": "integer", + "description": "每页条数。最小 0,最大 99。", + "minimum": 0, + "maximum": 99, + "example": 20 + }, + "request_id": { + "type": "string", + "description": "按唯一请求 ID 过滤到单条记录。" + }, + "search_after_ctx": { + "type": "string", + "description": "上次响应返回的不透明分页游标。首页留空。" + }, + "operations": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按操作名称过滤。合法值可通过 `POST /audit/operation/list` 获取。" + }, + "person_id": { + "type": "integer", + "format": "uint64", + "description": "按操作人成员 ID 过滤。" + }, + "is_dangerous": { + "type": "boolean", + "description": "为 true 时只返回高危操作。" + }, + "is_write": { + "type": "boolean", + "description": "为 true 时只返回写操作;为 false 时只返回读操作。" + } + } + }, + "AuditSearchResponse": { + "type": "object", + "description": "游标分页的审计日志检索结果。", + "required": [ + "total", + "search_after_ctx" + ], + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "检索窗口内符合条件的总条数。", + "example": 2 + }, + "search_after_ctx": { + "type": "string", + "description": "用于获取下一页的不透明游标。没有更多结果时为空字符串。" + }, + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuditLog" + }, + "description": "当前页的审计日志条目。" + } + } + }, + "DutyError": { + "type": "object", + "description": "响应结构中的错误 payload,仅在非 2xx 响应时出现。", + "properties": { + "code": { + "$ref": "#/components/schemas/ErrorCode" + }, + "message": { + "type": "string", + "description": "用户可读的错误描述,语言会跟随调用方的 Accept-Language。可能包含字段名、ID 等请求上下文。", + "example": "The specified parameter template_id is not valid." + } + }, + "required": [ + "code", + "message" + ] + }, + "EmptyObject": { + "type": "object", + "description": "空对象。当操作的成功信号就是不报错时,作为 `data` 返回。", + "additionalProperties": false + }, + "EmptyRequest": { + "type": "object", + "description": "无参数。", + "additionalProperties": false + }, + "EmptyResponse": { + "type": "object", + "description": "空响应体。成功时服务端返回 `data: null`。", + "properties": {} + }, + "ErrorCode": { + "type": "string", + "description": "Flashduty 错误码枚举。每个失败响应的 `error.code` 都是下列稳定值之一,HTTP 状态码仅作参考。\n\n| 错误码 | HTTP | 含义 |\n|---|---|---|\n| `OK` | 200 | 保留值,正常错误响应不会返回。 |\n| `InvalidParameter` | 400 | 必填参数缺失或未通过校验。 |\n| `BadRequest` | 400 | 通用的 400 错误,通常是请求本身不合法。 |\n| `InvalidContentType` | 400 | 请求头 `Content-Type` 不是 `application/json`。 |\n| `ResourceNotFound` | 400 | 目标资源不存在。注意 HTTP 状态码是 400 而非 404(历史设计)。 |\n| `NoLicense` | 400 | 功能需要有效授权,但未找到可用的 license。 |\n| `ReferenceExist` | 400 | 该资源仍被其他实体引用,无法删除。 |\n| `Unauthorized` | 401 | `app_key` 缺失、无效或已过期。 |\n| `BalanceNotEnough` | 402 | 账户余额不足,无法执行需要计费的操作。 |\n| `AccessDenied` | 403 | 身份认证通过,但 RBAC 权限不足以执行该操作。 |\n| `RouteNotFound` | 404 | 请求的 URL 路径不是已知路由。 |\n| `MethodNotAllowed` | 405 | 当前路径不接受所使用的 HTTP 方法。 |\n| `UndonedOrderExist` | 409 | 账户存在未完成的订单,请稍后重试。 |\n| `RequestLocked` | 423 | 因连续失败被临时锁定。 |\n| `EntityTooLarge` | 413 | 请求体超过允许的最大长度。 |\n| `RequestTooFrequently` | 429 | 命中限流(全局、账户级或集成级)。 |\n| `RequestVerifyRequired` | 428 | 操作需要二次验证码,但未提供。 |\n| `DangerousOperation` | 428 | 危险操作,需要进行 MFA 验证。 |\n| `InternalError` | 500 | 服务端未预期错误。反馈问题请附上 `request_id`。 |\n| `ServiceUnavailable` | 503 | 后端依赖不可用,请稍后重试。 |", + "enum": [ + "OK", + "InvalidParameter", + "BadRequest", + "InvalidContentType", + "ResourceNotFound", + "NoLicense", + "ReferenceExist", + "Unauthorized", + "BalanceNotEnough", + "AccessDenied", + "RouteNotFound", + "MethodNotAllowed", + "UndonedOrderExist", + "RequestLocked", + "EntityTooLarge", + "RequestTooFrequently", + "RequestVerifyRequired", + "DangerousOperation", + "InternalError", + "ServiceUnavailable" + ], + "x-enumDescriptions": { + "OK": "保留值,正常错误响应不会返回。", + "InvalidParameter": "必填参数缺失或未通过校验。", + "BadRequest": "通用的 400 错误,通常是请求本身不合法。", + "InvalidContentType": "请求头 `Content-Type` 不是 `application/json`。", + "ResourceNotFound": "目标资源不存在。注意 HTTP 状态码是 400 而非 404(历史设计)。", + "NoLicense": "功能需要有效授权,但未找到可用的 license。", + "ReferenceExist": "该资源仍被其他实体引用,无法删除。", + "Unauthorized": "`app_key` 缺失、无效或已过期。", + "BalanceNotEnough": "账户余额不足,无法执行需要计费的操作。", + "AccessDenied": "身份认证通过,但 RBAC 权限不足以执行该操作。", + "RouteNotFound": "请求的 URL 路径不是已知路由。", + "MethodNotAllowed": "当前路径不接受所使用的 HTTP 方法。", + "UndonedOrderExist": "账户存在未完成的订单,请稍后重试。", + "RequestLocked": "因连续失败被临时锁定。", + "EntityTooLarge": "请求体超过允许的最大长度。", + "RequestTooFrequently": "命中限流(全局、账户级或集成级)。", + "RequestVerifyRequired": "操作需要二次验证码,但未提供。", + "DangerousOperation": "危险操作,需要进行 MFA 验证。", + "InternalError": "服务端未预期错误。反馈问题请附上 `request_id`。", + "ServiceUnavailable": "后端依赖不可用,请稍后重试。" + }, + "example": "InvalidParameter" + }, + "ErrorResponse": { + "type": "object", + "description": "错误响应结构。`error` 必填,`data` 不存在。", + "properties": { + "request_id": { + "type": "string", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "error": { + "$ref": "#/components/schemas/DutyError" + } + }, + "required": [ + "request_id", + "error" + ] + }, + "InviteMemberItem": { + "type": "object", + "description": "待邀请成员", + "properties": { + "member_name": { + "type": "string", + "minLength": 2, + "maxLength": 39, + "description": "显示名称" + }, + "email": { + "type": "string", + "description": "邮箱地址" + }, + "phone": { + "type": "string", + "description": "手机号" + }, + "country_code": { + "type": "string", + "description": "国家区号" + }, + "role_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "授予的角色 ID 列表" + }, + "locale": { + "type": "string", + "enum": [ + "zh-CN", + "en-US" + ], + "description": "语言" + }, + "time_zone": { + "type": "string", + "description": "时区" + }, + "ref_id": { + "type": "string", + "description": "外部引用 ID" + } + } + }, + "MemberDeleteRequest": { + "type": "object", + "description": "删除成员请求(提供其中一个查找字段)", + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "成员 ID" + }, + "member_name": { + "type": "string", + "description": "成员名称" + }, + "email": { + "type": "string", + "description": "邮箱地址" + }, + "phone": { + "type": "string", + "description": "手机号" + }, + "country_code": { + "type": "string", + "description": "国家区号" + }, + "ref_id": { + "type": "string", + "description": "外部引用 ID" + } + } + }, + "MemberEmptyObject": { + "type": "object", + "description": "空响应", + "properties": {} + }, + "MemberInfoRequest": { + "type": "object", + "description": "获取成员信息请求", + "properties": {} + }, + "MemberInfoResponse": { + "type": "object", + "description": "当前成员资料", + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "账户 ID" + }, + "account_name": { + "type": "string", + "description": "账户名称" + }, + "account_avatar": { + "type": "string", + "description": "账户头像 URL" + }, + "account_email": { + "type": "string", + "description": "账户邮箱" + }, + "account_role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "授予的角色 ID 列表" + }, + "account_locale": { + "type": "string", + "description": "账户级语言偏好(如 zh-CN 或 en-US)" + }, + "account_time_zone": { + "type": "string", + "description": "账户级时区(如 Asia/Shanghai)" + }, + "domain": { + "type": "string", + "description": "账户域名" + }, + "member_id": { + "type": "integer", + "format": "uint64", + "description": "成员 ID" + }, + "member_name": { + "type": "string", + "description": "成员显示名称" + }, + "phone": { + "type": "string", + "description": "脱敏手机号" + }, + "phone_verified": { + "type": "boolean", + "description": "手机号是否已验证" + }, + "email": { + "type": "string", + "description": "邮箱地址" + }, + "email_verified": { + "type": "boolean", + "description": "邮箱是否已验证" + }, + "country_code": { + "type": "string", + "description": "手机国家区号" + }, + "avatar": { + "type": "string", + "description": "成员头像 URL" + }, + "locale": { + "type": "string", + "description": "语言偏好" + }, + "time_zone": { + "type": "string", + "description": "时区" + }, + "is_external": { + "type": "boolean", + "description": "是否通过 SSO 创建" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "pending", + "deleted" + ], + "description": "成员状态。`enabled` — 已激活成员;`pending` — 已邀请但尚未接受;`deleted` — 已从组织移除。" + } + } + }, + "MemberInviteRequest": { + "type": "object", + "description": "邀请成员请求", + "required": [ + "members" + ], + "properties": { + "members": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InviteMemberItem" + }, + "description": "待邀请成员列表(最多 20 个)" + }, + "from": { + "type": "string", + "description": "邀请来源上下文" + } + } + }, + "MemberInviteResponse": { + "type": "object", + "description": "邀请成员响应", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NewMemberItem" + }, + "description": "新建的成员列表" + } + } + }, + "MemberItem": { + "type": "object", + "description": "成员条目", + "required": [ + "account_id", + "member_id", + "member_name", + "country_code", + "phone", + "email", + "phone_verified", + "email_verified", + "avatar", + "status", + "account_role_ids", + "created_at", + "updated_at", + "ref_id", + "is_external" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "账户 ID" + }, + "member_id": { + "type": "integer", + "format": "uint64", + "description": "成员 ID" + }, + "member_name": { + "type": "string", + "description": "显示名称" + }, + "country_code": { + "type": "string", + "description": "手机国家区号" + }, + "phone": { + "type": "string", + "description": "脱敏手机号" + }, + "email": { + "type": "string", + "description": "邮箱地址" + }, + "locale": { + "type": "string", + "description": "语言" + }, + "time_zone": { + "type": "string", + "description": "时区" + }, + "phone_verified": { + "type": "boolean", + "description": "手机已验证" + }, + "email_verified": { + "type": "boolean", + "description": "邮箱已验证" + }, + "avatar": { + "type": "string", + "description": "头像 URL" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "pending", + "deleted" + ], + "description": "成员状态。`enabled` — 已激活成员;`pending` — 已邀请但尚未接受;`deleted` — 已从组织移除。" + }, + "account_role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "角色 ID 列表" + }, + "is_external": { + "type": "boolean", + "description": "是否通过 SSO 创建" + }, + "ref_id": { + "type": "string", + "description": "外部引用 ID" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间(Unix 秒)" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "更新时间(Unix 秒)" + } + } + }, + "MemberListRequest": { + "type": "object", + "description": "查询成员列表请求", + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "按角色 ID 过滤" + }, + "p": { + "type": "integer", + "minimum": 1, + "description": "页码" + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "description": "每页条数" + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "排序字段" + }, + "asc": { + "type": "boolean", + "description": "是否升序" + }, + "query": { + "type": "string", + "description": "搜索关键词" + } + } + }, + "MemberListResponse": { + "type": "object", + "description": "成员列表响应", + "properties": { + "p": { + "type": "integer", + "description": "当前页码" + }, + "limit": { + "type": "integer", + "description": "每页条数" + }, + "total": { + "type": "integer", + "description": "总数" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MemberItem" + }, + "description": "成员列表" + } + } + }, + "MemberResetInfoRequest": { + "type": "object", + "description": "重置成员信息请求", + "required": [ + "member_id" + ], + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "要更新的成员 ID" + }, + "member_name": { + "type": "string", + "minLength": 2, + "maxLength": 39, + "description": "显示名称" + }, + "email": { + "type": "string", + "description": "邮箱地址" + }, + "phone": { + "type": "string", + "description": "手机号" + }, + "country_code": { + "type": "string", + "description": "国家区号" + }, + "avatar": { + "type": "string", + "description": "头像 URL" + }, + "locale": { + "type": "string", + "enum": [ + "zh-CN", + "en-US" + ], + "description": "语言" + }, + "time_zone": { + "type": "string", + "description": "时区" + } + } + }, + "MemberRoleGrantRequest": { + "type": "object", + "description": "授予成员角色请求", + "required": [ + "member_id", + "role_ids" + ], + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "成员 ID" + }, + "role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "要授予的角色 ID 列表,将追加到成员现有角色集合(自动去重)。" + } + } + }, + "MemberRoleRevokeRequest": { + "type": "object", + "description": "解除成员角色请求", + "required": [ + "member_id", + "role_ids" + ], + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "成员 ID" + }, + "role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "要从成员处撤销的角色 ID 列表。" + } + } + }, + "MemberRoleUpdateRequest": { + "type": "object", + "description": "更新成员角色请求", + "required": [ + "member_id", + "role_ids" + ], + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "成员 ID" + }, + "role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "新的角色 ID 集合" + } + } + }, + "NewMemberItem": { + "type": "object", + "description": "新建成员信息", + "properties": { + "member_id": { + "type": "integer", + "format": "uint64", + "description": "成员 ID" + }, + "member_name": { + "type": "string", + "description": "成员显示名称" + } + } + }, + "PermissionFactorItem": { + "type": "object", + "description": "一个权限因子。", + "required": [ + "factor_name", + "factor_type" + ], + "properties": { + "factor_name": { + "type": "string", + "description": "因子标识符(如 'template:read:info')。" + }, + "factor_type": { + "type": "string", + "enum": [ + "api", + "button", + "visit", + "menu", + "url" + ], + "description": "因子类型。" + } + } + }, + "PermissionFactorListRequest": { + "type": "object", + "description": "查询权限因子列表的过滤参数。", + "properties": { + "factor_types": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "api", + "button", + "visit", + "menu", + "url" + ] + }, + "description": "按因子类型过滤。" + } + } + }, + "PermissionFactorListResponse": { + "type": "array", + "description": "权限因子列表。", + "items": { + "$ref": "#/components/schemas/PermissionFactorItem" + } + }, + "PermissionItem": { + "type": "object", + "description": "一个权限条目。", + "required": [ + "id", + "permission_name", + "permission_type", + "description", + "class", + "scope", + "status" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "description": "唯一权限 ID。" + }, + "permission_name": { + "type": "string", + "description": "权限显示名称。" + }, + "permission_type": { + "type": "string", + "enum": [ + "read", + "manage" + ], + "description": "查看权限或管理权限。" + }, + "description": { + "type": "string", + "description": "权限的用户可读描述。" + }, + "class": { + "type": "string", + "description": "权限分类(如 'On-call'、'Organization')。" + }, + "scope": { + "type": "string", + "description": "权限范围(如 'on-call'、'organization')。" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "权限状态。" + }, + "is_granted": { + "type": "boolean", + "description": "当 with_all 为 true 时存在,表示该权限是否已授予所请求的角色。" + } + } + }, + "PersonInfosRequest": { + "type": "object", + "description": "批量获取人员信息请求", + "required": [ + "person_ids" + ], + "properties": { + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "人员 ID 列表" + } + } + }, + "PersonInfosResponse": { + "type": "object", + "description": "批量人员信息响应", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PersonItem" + }, + "description": "人员资料列表" + } + } + }, + "PersonItem": { + "type": "object", + "description": "人员资料", + "required": [ + "account_id", + "person_id", + "phone_verified", + "email_verified" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "账户 ID" + }, + "person_id": { + "type": "integer", + "format": "uint64", + "description": "人员 ID" + }, + "person_name": { + "type": "string", + "description": "显示名称" + }, + "avatar": { + "type": "string", + "description": "头像 URL" + }, + "locale": { + "type": "string", + "description": "语言" + }, + "time_zone": { + "type": "string", + "description": "时区" + }, + "email": { + "type": "string", + "description": "邮箱地址" + }, + "phone": { + "type": "string", + "description": "手机号" + }, + "phone_verified": { + "type": "boolean", + "description": "手机已验证" + }, + "email_verified": { + "type": "boolean", + "description": "邮箱已验证" + }, + "as": { + "type": "string", + "description": "登录角色(account/member)" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "pending", + "deleted" + ], + "description": "人员状态。`enabled` — 已激活;`pending` — 已邀请但尚未接受;`deleted` — 已移除。" + } + } + }, + "PlatformEmptyObject": { + "type": "object", + "description": "成功时返回的空对象,适用于无实质 payload 的操作。", + "additionalProperties": false + }, + "RoleGrantRequest": { + "type": "object", + "required": [ + "member_ids", + "role_id" + ], + "description": "向成员授予或撤销角色的请求。", + "properties": { + "member_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "要授予/撤销角色的成员 ID 列表,最多 100 个。" + }, + "role_id": { + "type": "integer", + "format": "uint64", + "description": "要授予或撤销的角色 ID。" + } + } + }, + "RoleIDRequest": { + "type": "object", + "required": [ + "role_id" + ], + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "角色 ID。" + } + } + }, + "RoleInfoRequest": { + "type": "object", + "required": [ + "role_id" + ], + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "角色 ID。" + } + } + }, + "RoleItem": { + "type": "object", + "description": "角色及其权限集合。", + "required": [ + "role_id", + "role_name", + "description", + "status", + "permission_ids", + "editable", + "created_at", + "updated_at" + ], + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "唯一角色 ID。" + }, + "role_name": { + "type": "string", + "description": "角色显示名称。" + }, + "description": { + "type": "string", + "description": "角色描述。" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "角色状态。" + }, + "permission_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "该角色授予的权限 ID 列表。" + }, + "editable": { + "type": "boolean", + "description": "内置角色为 false,不可修改。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间(Unix 秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最近更新时间(Unix 秒)。" + } + } + }, + "RoleListRequest": { + "type": "object", + "description": "查询角色列表的过滤参数。", + "properties": { + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "排序字段。" + }, + "asc": { + "type": "boolean", + "description": "升序排序。" + } + } + }, + "RoleListResponse": { + "type": "object", + "description": "角色列表结果。", + "required": [ + "total", + "items" + ], + "properties": { + "total": { + "type": "integer", + "description": "角色总数。" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoleItem" + } + } + } + }, + "RolePermissionListRequest": { + "type": "object", + "description": "查询权限列表的过滤参数。", + "properties": { + "role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "按角色 ID 过滤,只返回这些角色已授予的权限。" + }, + "with_all": { + "type": "boolean", + "description": "若为 true,返回所有权限并用 is_granted 标记哪些已授予。" + } + } + }, + "RolePermissionListResponse": { + "type": "object", + "description": "权限列表结果。", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PermissionItem" + } + } + } + }, + "RoleUpsertRequest": { + "type": "object", + "required": [ + "role_name" + ], + "description": "创建或更新自定义角色的参数。", + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "角色 ID,省略或置为 0 表示创建。" + }, + "role_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "角色显示名称,1–39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 499, + "description": "角色描述。" + }, + "permission_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "要授予的权限 ID 列表,会替换现有权限集合。" + } + } + }, + "RoleUpsertResponse": { + "type": "object", + "description": "角色创建/更新结果。", + "required": [ + "role_id", + "role_name" + ], + "properties": { + "role_id": { + "type": "integer", + "format": "uint64", + "description": "创建或更新的角色 ID。" + }, + "role_name": { + "type": "string", + "description": "从请求中回显的角色名称。" + } + } + }, + "SuccessEnvelope": { + "type": "object", + "description": "成功响应结构。2xx 响应中 `request_id` 标识本次调用(同时出现在 `Flashcat-Request-Id` 响应头中),`data` 为接口业务 payload。失败响应使用不同结构,参见 `ErrorResponse`。", + "properties": { + "request_id": { + "type": "string", + "description": "本次请求的唯一 ID,也会在 Flashcat-Request-Id 响应头中返回。反馈问题时请一并附上。", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "data": { + "description": "每个接口自己的业务 payload,详见各接口的 200 响应 schema。" + } + }, + "required": [ + "request_id", + "data" + ] + }, + "TeamBriefItem": { + "type": "object", + "description": "批量响应中的团队简要信息。", + "properties": { + "team_id": { + "type": "integer", + "format": "uint64" + }, + "team_name": { + "type": "string" + }, + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + } + } + } + }, + "TeamDeleteRequest": { + "type": "object", + "description": "标识要删除的团队的请求。", + "properties": { + "team_id": { + "type": "integer", + "format": "uint64", + "description": "团队 ID。" + }, + "team_name": { + "type": "string", + "description": "团队名称。" + }, + "ref_id": { + "type": "string", + "description": "外部引用 ID。" + } + } + }, + "TeamInfoRequest": { + "type": "object", + "description": "通过 ID、名称或外部引用标识团队的请求。", + "properties": { + "team_id": { + "type": "integer", + "format": "uint64", + "description": "团队 ID。" + }, + "team_name": { + "type": "string", + "description": "团队名称。" + }, + "ref_id": { + "type": "string", + "description": "外部引用 ID。" + } + } + }, + "TeamInfosRequest": { + "type": "object", + "required": [ + "team_ids" + ], + "description": "按 ID 列表批量查询团队的请求。", + "properties": { + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "要查询的团队 ID 列表,最多 100 个。" + } + } + }, + "TeamInfosResponse": { + "type": "object", + "description": "批量团队查询结果。", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamBriefItem" + } + } + } + }, + "TeamItem": { + "type": "object", + "description": "团队及其成员信息。", + "required": [ + "account_id", + "team_id", + "team_name", + "description", + "status", + "updated_by_name", + "updated_by", + "creator_id", + "creator_name", + "created_at", + "updated_at", + "person_ids", + "ref_id" + ], + "properties": { + "account_id": { + "type": "integer", + "format": "uint64", + "description": "所属账户 ID。" + }, + "team_id": { + "type": "integer", + "format": "uint64", + "description": "唯一团队 ID。" + }, + "team_name": { + "type": "string", + "description": "团队显示名称,1–39 个字符,账户内唯一。" + }, + "description": { + "type": "string", + "description": "自定义描述。" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "团队状态。" + }, + "updated_by_name": { + "type": "string", + "description": "最后修改人显示名称。" + }, + "updated_by": { + "type": "integer", + "format": "uint64", + "description": "最后修改人成员 ID。" + }, + "creator_id": { + "type": "integer", + "format": "uint64", + "description": "创建人成员 ID。" + }, + "creator_name": { + "type": "string", + "description": "创建人显示名称。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间(Unix 秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最近更新时间(Unix 秒)。" + }, + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "团队成员的成员 ID 列表。" + }, + "ref_id": { + "type": "string", + "description": "外部引用 ID,用于与第三方 HR 系统集成。" + } + } + }, + "TeamListRequest": { + "type": "object", + "description": "查询团队列表的过滤参数。", + "properties": { + "p": { + "type": "integer", + "description": "页码,从 1 开始,默认 1。", + "minimum": 1, + "default": 1 + }, + "limit": { + "type": "integer", + "description": "分页大小,最大 100,默认 20。", + "minimum": 1, + "maximum": 100, + "default": 20 + }, + "orderby": { + "type": "string", + "description": "排序字段。", + "enum": [ + "created_at", + "updated_at", + "team_name" + ] + }, + "asc": { + "type": "boolean", + "description": "升序排序。" + }, + "person_id": { + "type": "integer", + "format": "uint64", + "description": "按成员 ID 过滤,只返回该成员所属的团队。" + }, + "query": { + "type": "string", + "description": "按团队名称做子串匹配。" + } + } + }, + "TeamListResponse": { + "type": "object", + "description": "分页团队列表。", + "required": [ + "p", + "limit", + "total", + "items" + ], + "properties": { + "p": { + "type": "integer", + "description": "当前页码。" + }, + "limit": { + "type": "integer", + "description": "本次使用的分页大小。" + }, + "total": { + "type": "integer", + "description": "符合过滤条件的团队总数。" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamItem" + } + } + } + }, + "TeamUpsertRequest": { + "type": "object", + "required": [ + "team_name" + ], + "description": "创建或更新团队的参数。", + "properties": { + "team_id": { + "type": "integer", + "format": "uint64", + "description": "团队 ID,省略或置为 0 表示创建新团队。" + }, + "team_name": { + "type": "string", + "minLength": 1, + "maxLength": 39, + "description": "团队显示名称,1–39 个字符。" + }, + "description": { + "type": "string", + "maxLength": 500, + "description": "自定义描述。" + }, + "person_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64" + }, + "description": "设置为团队成员的成员 ID 列表,会替换现有成员列表。" + }, + "emails": { + "type": "array", + "items": { + "type": "string", + "format": "email" + }, + "description": "要邀请为成员的邮箱地址。" + }, + "phones": { + "type": "array", + "items": { + "type": "string" + }, + "description": "要邀请为成员的手机号码。" + }, + "countryCode": { + "type": "string", + "description": "默认国家区号,用于 `phones` 中未采用 E.164 格式的手机号。" + }, + "ref_id": { + "type": "string", + "description": "供 HR 系统集成使用的外部引用 ID。" + }, + "reset_if_name_exist": { + "type": "boolean", + "description": "若为 true,当同名团队已存在时重置其成员列表为传入的 person_ids。" + } + } + }, + "TeamUpsertResponse": { + "type": "object", + "description": "创建或更新团队的结果。", + "required": [ + "team_id", + "team_name" + ], + "properties": { + "team_id": { + "type": "integer", + "format": "uint64", + "description": "创建或更新的团队 ID。" + }, + "team_name": { + "type": "string", + "description": "从请求中回显的团队名称。" + } + } + } + } + } +} diff --git a/api-reference/rum.openapi.en.json b/api-reference/rum.openapi.en.json new file mode 100644 index 0000000..99b6e8b --- /dev/null +++ b/api-reference/rum.openapi.en.json @@ -0,0 +1,2138 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Flashduty Open API", + "description": "Public HTTP API for the Flashduty incident management platform — incidents, notification templates, channels, schedules, monitors, RUM, and platform administration. Every operation is authenticated with an `app_key` query parameter issued from the Flashduty console under Account → APP Keys. Responses follow a uniform envelope: `{ request_id, data }` on success, `{ request_id, error }` on failure.", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://api.flashcat.cloud", + "description": "Flashduty Open API" + } + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "tags": [ + { + "name": "RUM/Applications", + "description": "Manage Real User Monitoring (RUM) applications." + }, + { + "name": "RUM/Issues", + "description": "Query and manage RUM error tracking issues and preset severity rules." + }, + { + "name": "RUM/Sourcemaps", + "description": "Manage and query RUM sourcemap files for browser, Android, and iOS error symbolication." + } + ], + "paths": { + "/sourcemap/list": { + "post": { + "operationId": "sourcemap-read-list", + "summary": "List sourcemaps", + "description": "Return a paginated list of uploaded sourcemap files filtered by platform type, service, and version.", + "tags": [ + "RUM/Sourcemaps" + ], + "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 required — both use Unix epoch **milliseconds**. Maximum window is 365 days.\n- The `type` field selects the platform: `browser` (JavaScript), `android`, or `ios`. Defaults to `browser` when omitted.\n- Default page size is 20; maximum is 100. Default sort is `created_at` descending.\n- For Android, `build_id` matches the Gradle plugin build identifier. For iOS, `uuid` matches the dSYM bundle UUID.", + "href": "/en/api-reference/rum/sourcemaps/sourcemap-read-list", + "metadata": { + "sidebarTitle": "List sourcemaps" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/SourcemapListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 3, + "items": [ + { + "key": "browser/my-web-app/1.0.0/main.js.map", + "type": "browser", + "service": "my-web-app", + "version": "1.0.0", + "size": 204800, + "git_repository_url": "https://github.com/example/my-web-app", + "git_commit_sha": "abc1234def5678", + "created_at": 1712700000, + "updated_at": 1712700000, + "metadata": {} + } + ] + } + } + } + } + }, + "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/SourcemapListRequest" + }, + "example": { + "start_time": 1712000000000, + "end_time": 1712700000000, + "type": "browser", + "services": [ + "my-web-app" + ], + "p": 1, + "limit": 20 + } + } + } + } + } + }, + "/rum/application/list": { + "post": { + "operationId": "rum-application-read-list", + "summary": "List applications", + "description": "Return a paginated list of RUM applications accessible to the current user.", + "tags": [ + "RUM/Applications" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Use `is_my_team` to filter applications belonging to the current user's teams.\n- Default page size is 20, maximum is 100.\n- `orderby` accepts `created_at` or `updated_at`.", + "href": "/en/api-reference/rum/applications/rum-application-read-list", + "metadata": { + "sidebarTitle": "List applications" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumApplicationListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "has_next_page": true, + "total": 7, + "items": [ + { + "account_id": 2451002751131, + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "application_name": "flashcat-rum", + "type": "browser", + "client_token": "a3cea433a8685a398cdfd68f54a45e06131", + "team_id": 2477033058131, + "is_private": true, + "no_ip": true, + "no_geo": false, + "alerting": { + "enabled": true, + "channel_ids": [ + 2490121812131 + ], + "integration_id": 4759595678131 + }, + "tracing": { + "enabled": false, + "open_type": "", + "endpoint": "" + }, + "status": "enabled", + "created_by": 4441703362131, + "updated_by": 3790925372131, + "created_at": 1746673831462, + "updated_at": 1773398630657 + }, + { + "account_id": 2451002751131, + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "type": "browser", + "client_token": "ce8d1be90fc6534f89ce36ebf526765e131", + "team_id": 2477033058131, + "is_private": false, + "no_ip": false, + "no_geo": false, + "alerting": { + "enabled": true, + "channel_ids": [ + 5962711836131, + 5967875767131 + ], + "integration_id": 4759595678131 + }, + "tracing": { + "enabled": true, + "open_type": "popup", + "endpoint": "https://www.tracing.com/${trace_id}" + }, + "status": "enabled", + "created_by": 2476444212131, + "updated_by": 3122470302131, + "created_at": 1742958482000, + "updated_at": 1772096392711 + } + ] + } + } + } + } + }, + "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/RumApplicationListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "query": "", + "is_my_team": false + } + } + } + } + } + }, + "/rum/application/update": { + "post": { + "operationId": "rum-application-write-update", + "summary": "Update application", + "description": "Update an existing RUM application. All fields except `application_id` are optional — only provided fields are updated.", + "tags": [ + "RUM/Applications" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/applications/rum-application-write-update", + "metadata": { + "sidebarTitle": "Update application" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RumApplicationUpdateRequest" + }, + "example": { + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "application_name": "My Web App v2", + "alerting": { + "enabled": true, + "channel_ids": [ + 2490121812131 + ] + } + } + } + } + } + } + }, + "/rum/application/delete": { + "post": { + "operationId": "rum-application-write-delete", + "summary": "Delete application", + "description": "Delete a RUM application by `application_id`.", + "tags": [ + "RUM/Applications" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/applications/rum-application-write-delete", + "metadata": { + "sidebarTitle": "Delete application" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RumApplicationIDRequest" + }, + "example": { + "application_id": "qLpu24Dz4CAzWsESPbJYWA" + } + } + } + } + } + }, + "/rum/issue/update": { + "post": { + "operationId": "rum-issue-write-update", + "summary": "Update issue", + "description": "Update the status or suspected cause of an issue.", + "tags": [ + "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- `status` valid values: `for_review`, `reviewed`, `ignored`, `resolved`.\n- `suspected_cause` valid values: `api.failed_request`, `network.error`, `code.exception`, `code.invalid_object_access`, `code.invalid_argument`, `unknown`.\n- Setting `status` to `resolved` also stamps `resolved_at` and `resolved_by` on the issue; moving a resolved issue back to another status clears them.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/issues/rum-issue-write-update", + "metadata": { + "sidebarTitle": "Update issue" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RumIssueUpdateRequest" + }, + "example": { + "issue_id": "NHEacQHi2DhXqobr9qPQz9", + "status": "resolved" + } + } + } + } + } + }, + "/rum/application/create": { + "post": { + "operationId": "rum-application-write-create", + "summary": "Create application", + "description": "Create a new RUM application. Returns the generated `application_id` and `client_token`.", + "tags": [ + "RUM/Applications" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- `type` must be one of: `browser`, `ios`, `android`, `react-native`, `flutter`, `kotlin-multiplatform`, `roku`, `unity`.\n- `client_token` is auto-generated and used to initialize the RUM SDK.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/applications/rum-application-write-create", + "metadata": { + "sidebarTitle": "Create application" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumApplicationCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "application_id": "qLpu24Dz4CAzWsESPbJYWA", + "application_name": "My Web App", + "client_token": "e090078724855a4ca168c3884880dfbc131" + } + } + } + } + }, + "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/RumApplicationCreateRequest" + }, + "example": { + "application_name": "My Web App", + "type": "browser", + "team_id": 2477033058131, + "is_private": false + } + } + } + } + } + }, + "/rum/issue/list": { + "post": { + "operationId": "rum-issue-read-list", + "summary": "List issues", + "description": "Return a paginated list of RUM error tracking issues matching the given filters.", + "tags": [ + "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.", + "href": "/en/api-reference/rum/issues/rum-issue-read-list", + "metadata": { + "sidebarTitle": "List issues" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumIssueListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "team_id": 2477033058131, + "issue_id": "NHEacQHi2DhXqobr9qPQz9", + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "service": "fd-console", + "status": "for_review", + "error_count": 752, + "session_count": 381, + "is_crash": false, + "age": 5078684, + "resolved_at": 0, + "resolved_by": 0, + "created_at": 1770883154944, + "updated_at": 1775961914595, + "first_seen": { + "timestamp": 1770883154944, + "version": "1.0.0" + }, + "last_seen": { + "timestamp": 1775961839090, + "version": "1.0.0" + }, + "error": { + "message": "Script error.", + "type": "Error" + }, + "suspected_cause": { + "source": "auto", + "value": "code.exception", + "reason": "The error message 'Script error.' typically indicates an unhandled exception in JavaScript.", + "person_id": 0 + }, + "versions": [ + "1.0.0" + ], + "severity": "Info" + }, + { + "team_id": 2477033058131, + "issue_id": "H8kZSmxiE7EgdyD4fCyyNa", + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "service": "fd-console", + "status": "for_review", + "error_count": 3, + "session_count": 1, + "is_crash": false, + "age": 48, + "resolved_at": 0, + "resolved_by": 0, + "created_at": 1775189479566, + "updated_at": 1775191284163, + "first_seen": { + "timestamp": 1775189479566, + "version": "1.0.0" + }, + "last_seen": { + "timestamp": 1775189527762, + "version": "1.0.0" + }, + "error": { + "message": "API ERROR: We encountered an internal error | POST /api/access/logout", + "type": "Error" + }, + "suspected_cause": { + "source": "auto", + "value": "api.failed_request", + "reason": "The error indicates an internal server error during a POST request to /api/access/logout.", + "person_id": 0 + }, + "versions": [ + "1.0.0" + ], + "severity": "Info" + } + ], + "has_next_page": true, + "total": 111 + } + } + } + } + }, + "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/RumIssueListRequest" + }, + "example": { + "start_time": 1772611200000, + "end_time": 1775961914595, + "application_ids": [ + "eWbr4xk3ZRnLabRa6unqwD" + ], + "statuses": [ + "for_review" + ], + "p": 1, + "limit": 20, + "orderby": "updated_at" + } + } + } + } + } + }, + "/rum/issue/info": { + "post": { + "operationId": "rum-issue-read-info", + "summary": "Get issue detail", + "description": "Retrieve full details of a single issue by `issue_id`.", + "tags": [ + "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 |", + "href": "/en/api-reference/rum/issues/rum-issue-read-info", + "metadata": { + "sidebarTitle": "Get issue detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumIssueItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "team_id": 2477033058131, + "issue_id": "NHEacQHi2DhXqobr9qPQz9", + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "service": "fd-console", + "status": "for_review", + "error_count": 752, + "session_count": 381, + "is_crash": false, + "age": 5078684, + "resolved_at": 0, + "resolved_by": 0, + "created_at": 1770883154944, + "updated_at": 1775961914595, + "first_seen": { + "timestamp": 1770883154944, + "version": "1.0.0" + }, + "last_seen": { + "timestamp": 1775961839090, + "version": "1.0.0" + }, + "error": { + "message": "Script error.", + "type": "Error" + }, + "suspected_cause": { + "source": "auto", + "value": "code.exception", + "reason": "The error message 'Script error.' typically indicates an unhandled exception in JavaScript.", + "person_id": 0 + }, + "versions": [ + "1.0.0" + ], + "severity": "Info" + } + } + } + } + }, + "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/RumIssueIDRequest" + }, + "example": { + "issue_id": "NHEacQHi2DhXqobr9qPQz9" + } + } + } + } + } + }, + "/rum/application/info": { + "post": { + "operationId": "rum-application-read-info", + "summary": "Get application detail", + "description": "Retrieve full details of a single RUM application by `application_id`.", + "tags": [ + "RUM/Applications" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/rum/applications/rum-application-read-info", + "metadata": { + "sidebarTitle": "Get application detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumApplicationItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_id": 2451002751131, + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "application_name": "flashcat-rum", + "type": "browser", + "client_token": "a3cea433a8685a398cdfd68f54a45e06131", + "team_id": 2477033058131, + "is_private": true, + "no_ip": true, + "no_geo": false, + "alerting": { + "enabled": true, + "channel_ids": [ + 2490121812131 + ], + "integration_id": 4759595678131 + }, + "tracing": { + "enabled": false, + "open_type": "", + "endpoint": "" + }, + "status": "enabled", + "created_by": 4441703362131, + "updated_by": 3790925372131, + "created_at": 1746673831462, + "updated_at": 1773398630657 + } + } + } + } + }, + "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/RumApplicationIDRequest" + }, + "example": { + "application_id": "WoyQQ3BohkdtPivubEvE8o" + } + } + } + } + } + }, + "/rum/application/infos": { + "post": { + "operationId": "rum-application-read-infos", + "summary": "Batch get applications", + "description": "Retrieve details for multiple RUM applications by their IDs in one request.", + "tags": [ + "RUM/Applications" + ], + "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- Maximum 200 IDs per request.", + "href": "/en/api-reference/rum/applications/rum-application-read-infos", + "metadata": { + "sidebarTitle": "Batch get applications" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumApplicationInfosResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "type": "browser", + "client_token": "ce8d1be90fc6534f89ce36ebf526765e131", + "team_id": 2477033058131, + "is_private": false, + "no_ip": false, + "no_geo": false, + "alerting": { + "enabled": true, + "channel_ids": [ + 5962711836131, + 5967875767131 + ], + "integration_id": 4759595678131 + }, + "tracing": { + "enabled": true, + "open_type": "popup", + "endpoint": "https://www.tracing.com/${trace_id}" + }, + "status": "enabled", + "created_by": 2476444212131, + "updated_by": 3122470302131, + "created_at": 1742958482000, + "updated_at": 1772096392711 + }, + { + "account_id": 2451002751131, + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "application_name": "flashcat-rum", + "type": "browser", + "client_token": "a3cea433a8685a398cdfd68f54a45e06131", + "team_id": 2477033058131, + "is_private": true, + "no_ip": true, + "no_geo": false, + "alerting": { + "enabled": true, + "channel_ids": [ + 2490121812131 + ], + "integration_id": 4759595678131 + }, + "tracing": { + "enabled": false, + "open_type": "", + "endpoint": "" + }, + "status": "enabled", + "created_by": 4441703362131, + "updated_by": 3790925372131, + "created_at": 1746673831462, + "updated_at": 1773398630657 + } + ] + } + } + } + } + }, + "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/RumApplicationInfosRequest" + }, + "example": { + "application_ids": [ + "eWbr4xk3ZRnLabRa6unqwD", + "WoyQQ3BohkdtPivubEvE8o" + ] + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "AppKeyAuth": { + "type": "apiKey", + "in": "query", + "name": "app_key", + "description": "App key issued from the Flashduty console under Account → APP Keys. Required on every public API call. Keep it secret — it grants the same access as the owning account." + } + }, + "responses": { + "BadRequest": { + "description": "Invalid request — usually a missing or malformed parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "missingParameter": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "InvalidParameter", + "message": "The specified parameter is not valid." + } + } + } + } + } + } + }, + "Unauthorized": { + "description": "Missing or invalid app_key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "missingAppKey": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "Unauthorized", + "message": "You are unauthorized." + } + } + } + } + } + } + }, + "Forbidden": { + "description": "The app_key is valid but lacks permission for this operation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "noEditPermission": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "AccessDenied", + "message": "Access Denied." + } + } + } + } + } + } + }, + "NotFound": { + "description": "The referenced resource does not exist or has been deleted. Note: Flashduty historically returns HTTP 400 with code `ResourceNotFound` for missing domain entities; a true 404 is reserved for unknown routes.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "resourceMissing": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "ResourceNotFound", + "message": "The resource you request is not found" + } + } + } + } + } + } + }, + "TooManyRequests": { + "description": "Rate limit hit. Either the global API limit, a per-account limit, or a per-integration limit.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "rateLimited": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "RequestTooFrequently", + "message": "Request too frequently." + } + } + } + } + } + } + }, + "ServerError": { + "description": "Unexpected server-side error. Include the request_id when reporting.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "internal": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "InternalError", + "message": "We encountered an internal error, and it has been reported. Please try again later." + } + } + } + } + } + } + } + }, + "schemas": { + "DutyError": { + "type": "object", + "description": "Error payload inside the response envelope. Present only on non-2xx responses.", + "properties": { + "code": { + "$ref": "#/components/schemas/ErrorCode" + }, + "message": { + "type": "string", + "description": "Human-readable error message, localized by the caller's Accept-Language. May contain field names, IDs, or other context from the failing request.", + "example": "The specified parameter template_id is not valid." + } + }, + "required": [ + "code", + "message" + ] + }, + "EmptyObject": { + "type": "object", + "description": "An empty object. Returned as the `data` payload by operations whose success signal is simply the absence of an error.", + "additionalProperties": false + }, + "EmptyRequest": { + "type": "object", + "description": "No parameters required.", + "additionalProperties": false + }, + "EmptyResponse": { + "type": "object", + "description": "Empty response body. The server returns `data: null` on success.", + "properties": {} + }, + "ErrorCode": { + "type": "string", + "description": "Flashduty error code enum. Every failed API response sets `error.code` to one of these stable wire strings. HTTP status is informational — the authoritative signal is the enum value.\n\n| Code | HTTP | Meaning |\n|---|---|---|\n| `OK` | 200 | Reserved — not returned on real errors. |\n| `InvalidParameter` | 400 | A required parameter is missing or failed validation. |\n| `BadRequest` | 400 | Generic 400 used when no more specific code fits. |\n| `InvalidContentType` | 400 | The `Content-Type` header is not `application/json`. |\n| `ResourceNotFound` | 400 | The referenced resource does not exist. Note: returned as HTTP 400, not 404 (historical choice). |\n| `NoLicense` | 400 | The feature is license-gated and no active license was found. |\n| `ReferenceExist` | 400 | Deletion blocked — other entities still reference this resource. |\n| `Unauthorized` | 401 | `app_key` is missing, invalid, or expired. |\n| `BalanceNotEnough` | 402 | Billing-gated operation with insufficient account balance. |\n| `AccessDenied` | 403 | Authenticated but lacking the permission required for this operation. |\n| `RouteNotFound` | 404 | The request URL path is not a known route. |\n| `MethodNotAllowed` | 405 | The HTTP method is not allowed on this otherwise-known path. |\n| `UndonedOrderExist` | 409 | An outstanding billing order blocks this new one. Wait and retry. |\n| `RequestLocked` | 423 | Operation temporarily locked due to repeated failures. |\n| `EntityTooLarge` | 413 | Request body exceeds the configured max size. |\n| `RequestTooFrequently` | 429 | Rate limit hit — API-global, per-account, or per-integration. |\n| `RequestVerifyRequired` | 428 | Second-factor verification required but not supplied. |\n| `DangerousOperation` | 428 | High-risk operation requires MFA verification. |\n| `InternalError` | 500 | Unhandled server-side error. Include `request_id` in the bug report. |\n| `ServiceUnavailable` | 503 | A backend dependency is unavailable. Try again later. |", + "enum": [ + "OK", + "InvalidParameter", + "BadRequest", + "InvalidContentType", + "ResourceNotFound", + "NoLicense", + "ReferenceExist", + "Unauthorized", + "BalanceNotEnough", + "AccessDenied", + "RouteNotFound", + "MethodNotAllowed", + "UndonedOrderExist", + "RequestLocked", + "EntityTooLarge", + "RequestTooFrequently", + "RequestVerifyRequired", + "DangerousOperation", + "InternalError", + "ServiceUnavailable" + ], + "x-enumDescriptions": { + "OK": "Reserved — not returned on real errors.", + "InvalidParameter": "A required parameter is missing or failed validation.", + "BadRequest": "Generic 400 used when no more specific code fits.", + "InvalidContentType": "The `Content-Type` header is not `application/json`.", + "ResourceNotFound": "The referenced resource does not exist. Note: returned as HTTP 400, not 404 (historical choice).", + "NoLicense": "The feature is license-gated and no active license was found.", + "ReferenceExist": "Deletion blocked — other entities still reference this resource.", + "Unauthorized": "`app_key` is missing, invalid, or expired.", + "BalanceNotEnough": "Billing-gated operation with insufficient account balance.", + "AccessDenied": "Authenticated but lacking the permission required for this operation.", + "RouteNotFound": "The request URL path is not a known route.", + "MethodNotAllowed": "The HTTP method is not allowed on this otherwise-known path.", + "UndonedOrderExist": "An outstanding billing order blocks this new one. Wait and retry.", + "RequestLocked": "Operation temporarily locked due to repeated failures.", + "EntityTooLarge": "Request body exceeds the configured max size.", + "RequestTooFrequently": "Rate limit hit — API-global, per-account, or per-integration.", + "RequestVerifyRequired": "Second-factor verification required but not supplied.", + "DangerousOperation": "High-risk operation requires MFA verification.", + "InternalError": "Unhandled server-side error. Include `request_id` in the bug report.", + "ServiceUnavailable": "A backend dependency is unavailable. Try again later." + }, + "example": "InvalidParameter" + }, + "ErrorResponse": { + "type": "object", + "description": "Response envelope for errors. `error` is required; `data` is absent.", + "properties": { + "request_id": { + "type": "string", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "error": { + "$ref": "#/components/schemas/DutyError" + } + }, + "required": [ + "request_id", + "error" + ] + }, + "RumApplicationAlerting": { + "type": "object", + "description": "Alert settings for the application.", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether alerting is enabled." + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Channel IDs to send alerts to." + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Associated on-call integration ID (read-only, auto-assigned)." + } + } + }, + "RumApplicationCreateRequest": { + "type": "object", + "required": [ + "application_name", + "type", + "team_id" + ], + "description": "Parameters for creating a RUM application.", + "properties": { + "application_name": { + "type": "string", + "description": "Application name. 1–40 characters." + }, + "type": { + "type": "string", + "enum": [ + "browser", + "ios", + "android", + "react-native", + "flutter", + "kotlin-multiplatform", + "roku", + "unity" + ], + "description": "Application type." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID." + }, + "is_private": { + "type": "boolean", + "description": "Restrict access to team members only." + }, + "no_ip": { + "type": "boolean", + "description": "Do not collect IP addresses." + }, + "no_geo": { + "type": "boolean", + "description": "Do not infer geographic location." + }, + "alerting": { + "$ref": "#/components/schemas/RumApplicationAlerting" + }, + "tracing": { + "$ref": "#/components/schemas/RumApplicationTracing" + } + } + }, + "RumApplicationCreateResponse": { + "type": "object", + "description": "Result of creating a RUM application.", + "properties": { + "application_id": { + "type": "string", + "description": "Auto-generated unique application ID." + }, + "application_name": { + "type": "string", + "description": "Application display name." + }, + "client_token": { + "type": "string", + "description": "Token for RUM SDK initialization." + } + } + }, + "RumApplicationIDRequest": { + "type": "object", + "required": [ + "application_id" + ], + "description": "Request with a single application ID.", + "properties": { + "application_id": { + "type": "string", + "description": "RUM application ID." + } + } + }, + "RumApplicationInfosRequest": { + "type": "object", + "required": [ + "application_ids" + ], + "description": "Batch application info request.", + "properties": { + "application_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Up to 200 application IDs." + } + } + }, + "RumApplicationInfosResponse": { + "type": "object", + "description": "Batch application info response.", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumApplicationItem" + } + } + } + }, + "RumApplicationItem": { + "type": "object", + "description": "A RUM application.", + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "Account ID." + }, + "application_id": { + "type": "string", + "description": "Unique application ID." + }, + "application_name": { + "type": "string", + "description": "Application display name." + }, + "type": { + "type": "string", + "enum": [ + "browser", + "ios", + "android", + "react-native", + "flutter", + "kotlin-multiplatform", + "roku", + "unity" + ], + "description": "Application type." + }, + "client_token": { + "type": "string", + "description": "Token used to initialize the RUM SDK." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID." + }, + "is_private": { + "type": "boolean", + "description": "If `true`, the application is only accessible to team members." + }, + "no_ip": { + "type": "boolean", + "description": "If `true`, IP addresses are not collected." + }, + "no_geo": { + "type": "boolean", + "description": "If `true`, geographic location is not inferred from IP." + }, + "alerting": { + "$ref": "#/components/schemas/RumApplicationAlerting" + }, + "tracing": { + "$ref": "#/components/schemas/RumApplicationTracing" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled", + "deleted" + ], + "description": "Application status." + }, + "created_by": { + "type": "integer", + "format": "int64", + "description": "Creator member ID." + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "Last updater member ID." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation timestamp, Unix epoch seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp, Unix epoch seconds." + } + } + }, + "RumApplicationListRequest": { + "type": "object", + "description": "Filters for listing RUM applications.", + "properties": { + "p": { + "type": "integer", + "description": "Page number (1-based). Default: 1." + }, + "limit": { + "type": "integer", + "description": "Page size. Range: 1–100. Default: 20." + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "Sort field." + }, + "asc": { + "type": "boolean", + "description": "Sort ascending if `true`." + }, + "query": { + "type": "string", + "description": "Search query to filter by application name." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "Filter by team ID." + }, + "is_my_team": { + "type": "boolean", + "description": "If `true`, return only applications belonging to the current user's teams." + } + } + }, + "RumApplicationListResponse": { + "type": "object", + "description": "Paginated list of RUM applications.", + "properties": { + "has_next_page": { + "type": "boolean" + }, + "total": { + "type": "integer" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumApplicationItem" + } + } + } + }, + "RumApplicationTracing": { + "type": "object", + "description": "APM tracing integration settings.", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether tracing integration is enabled." + }, + "open_type": { + "type": "string", + "enum": [ + "popup", + "tab" + ], + "description": "How to open the trace link." + }, + "endpoint": { + "type": "string", + "description": "Trace endpoint URL (http or https)." + } + } + }, + "RumApplicationUpdateRequest": { + "type": "object", + "required": [ + "application_id" + ], + "description": "Parameters for updating a RUM application. All fields except `application_id` are optional.", + "properties": { + "application_id": { + "type": "string", + "description": "Application ID to update." + }, + "application_name": { + "type": "string", + "description": "New application name." + }, + "type": { + "type": "string", + "enum": [ + "browser", + "ios", + "android", + "react-native", + "flutter", + "kotlin-multiplatform", + "roku", + "unity" + ] + }, + "team_id": { + "type": "integer", + "format": "int64" + }, + "is_private": { + "type": "boolean" + }, + "no_ip": { + "type": "boolean" + }, + "no_geo": { + "type": "boolean" + }, + "alerting": { + "$ref": "#/components/schemas/RumApplicationAlerting" + }, + "tracing": { + "$ref": "#/components/schemas/RumApplicationTracing" + } + } + }, + "RumIssueIDRequest": { + "type": "object", + "required": [ + "issue_id" + ], + "properties": { + "issue_id": { + "type": "string", + "description": "Issue ID." + } + } + }, + "RumIssueItem": { + "type": "object", + "description": "A RUM error tracking issue.", + "properties": { + "team_id": { + "type": "integer", + "format": "int64" + }, + "issue_id": { + "type": "string", + "description": "Unique issue ID." + }, + "application_id": { + "type": "string" + }, + "application_name": { + "type": "string" + }, + "service": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "for_review", + "reviewed", + "ignored", + "resolved" + ] + }, + "error_count": { + "type": "integer", + "format": "int64", + "description": "Total error occurrences." + }, + "session_count": { + "type": "integer", + "format": "int64", + "description": "Affected user sessions." + }, + "is_crash": { + "type": "boolean", + "description": "Whether the error caused an app crash." + }, + "age": { + "type": "integer", + "format": "int64" + }, + "resolved_at": { + "type": "integer", + "format": "int64" + }, + "resolved_by": { + "type": "integer", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "first_seen": { + "type": "object", + "properties": { + "timestamp": { + "type": "integer", + "format": "int64" + }, + "version": { + "type": "string" + } + } + }, + "last_seen": { + "type": "object", + "properties": { + "timestamp": { + "type": "integer", + "format": "int64" + }, + "version": { + "type": "string" + } + } + }, + "error": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "suspected_cause": { + "type": "object", + "properties": { + "source": { + "type": "string", + "enum": [ + "auto", + "user" + ] + }, + "value": { + "type": "string", + "enum": [ + "api.failed_request", + "network.error", + "code.exception", + "code.invalid_object_access", + "code.invalid_argument", + "unknown" + ] + }, + "reason": { + "type": "string" + }, + "person_id": { + "type": "integer", + "format": "int64" + } + } + }, + "regression": { + "type": "object", + "description": "Regression metadata. Present only when a previously resolved issue re-occurred.", + "properties": { + "regressed_at": { + "type": "integer", + "format": "int64", + "description": "Timestamp when the regression was detected." + }, + "regressed_at_version": { + "type": "string", + "description": "Application version in which the regression was observed." + }, + "resolved_at": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the previous resolution before the regression." + } + } + }, + "versions": { + "type": "array", + "items": { + "type": "string" + } + }, + "severity": { + "type": "string", + "description": "Issue severity level." + } + } + }, + "RumIssueListRequest": { + "type": "object", + "required": [ + "start_time", + "end_time" + ], + "description": "Filters for listing issues.", + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "Start of time range, millisecond timestamp." + }, + "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." + }, + "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 statuses." + }, + "suspected_causes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by suspected causes." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Filter by team IDs." + }, + "p": { + "type": "integer", + "description": "Page number. Default: 1." + }, + "limit": { + "type": "integer", + "description": "Page size. Range: 1–100. Default: 20." + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at", + "session_count", + "error_count" + ] + }, + "asc": { + "type": "boolean" + }, + "error_required": { + "type": "boolean", + "description": "If `true`, only return issues with at least one associated error event." + }, + "by_intersection": { + "type": "boolean" + } + } + }, + "RumIssueListResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumIssueItem" + } + }, + "has_next_page": { + "type": "boolean" + }, + "total": { + "type": "integer" + } + } + }, + "RumIssueUpdateRequest": { + "type": "object", + "required": [ + "issue_id" + ], + "description": "Parameters for updating an issue.", + "properties": { + "issue_id": { + "type": "string", + "description": "Issue ID to update." + }, + "status": { + "type": "string", + "enum": [ + "for_review", + "reviewed", + "ignored", + "resolved" + ], + "description": "New status." + }, + "suspected_cause": { + "type": "string", + "enum": [ + "api.failed_request", + "network.error", + "code.exception", + "code.invalid_object_access", + "code.invalid_argument", + "unknown" + ], + "description": "Suspected cause." + } + } + }, + "SourcemapItem": { + "type": "object", + "description": "A single uploaded sourcemap record.", + "properties": { + "key": { + "type": "string", + "description": "Storage key uniquely identifying this sourcemap file." + }, + "type": { + "type": "string", + "description": "Platform type: `browser`, `android`, or `ios`.", + "enum": [ + "browser", + "android", + "ios" + ] + }, + "service": { + "type": "string", + "description": "Application or service name." + }, + "version": { + "type": "string", + "description": "Application version string." + }, + "size": { + "type": "integer", + "format": "int64", + "description": "File size in bytes." + }, + "git_repository_url": { + "type": "string", + "description": "Git repository URL associated with this build." + }, + "git_commit_sha": { + "type": "string", + "description": "Git commit SHA for this build." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Upload timestamp, Unix epoch seconds." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update timestamp, Unix epoch seconds." + }, + "metadata": { + "type": "object", + "description": "Free-form key-value metadata attached to the sourcemap. Shape depends on the upload client; common keys include `git_repository_url` and `git_commit_sha` (though those are also promoted to top-level fields).", + "additionalProperties": true + } + } + }, + "SourcemapListRequest": { + "type": "object", + "description": "Paginated filter for sourcemap listings.", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "Start of upload time range, Unix epoch milliseconds. Must be > 0 and before `end_time`." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "End of upload time range, Unix epoch milliseconds. Maximum window: 365 days." + }, + "type": { + "type": "string", + "description": "Platform type. Defaults to `browser` when omitted.", + "enum": [ + "browser", + "android", + "ios" + ] + }, + "services": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by service names. Up to 100 values." + }, + "versions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by version strings. Up to 100 values." + }, + "query": { + "type": "string", + "description": "Substring match on the minified URL (browser) or build ID (android). Max 200 characters." + }, + "build_id": { + "type": "string", + "description": "Android only. Filter by Gradle plugin build identifier. Max 200 characters." + }, + "uuid": { + "type": "string", + "description": "iOS only. Filter by dSYM bundle UUID. Max 200 characters." + }, + "p": { + "type": "integer", + "description": "Page number, starting at 1.", + "minimum": 1, + "default": 1, + "example": 1 + }, + "limit": { + "type": "integer", + "description": "Page size. Maximum 100. Default 20.", + "maximum": 100, + "default": 20, + "example": 20 + }, + "orderby": { + "type": "string", + "description": "Sort field.", + "enum": [ + "created_at", + "updated_at" + ] + }, + "asc": { + "type": "boolean", + "description": "Sort ascending. Default false (descending).", + "default": false + } + } + }, + "SourcemapListResponse": { + "type": "object", + "description": "Paginated list of sourcemap records.", + "required": [ + "total", + "items" + ], + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total number of matching records.", + "example": 3 + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SourcemapItem" + } + } + } + }, + "SuccessEnvelope": { + "type": "object", + "description": "Success response envelope. On every 2xx response, `request_id` identifies the call (also mirrored in the `Flashcat-Request-Id` header) and `data` holds the endpoint-specific payload. Failure responses use a different shape — see `ErrorResponse`.", + "properties": { + "request_id": { + "type": "string", + "description": "Unique ID for this request. Mirrored in the Flashcat-Request-Id response header. Include it when reporting issues.", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "data": { + "description": "Endpoint-specific payload. See each operation's 200 response schema." + } + }, + "required": [ + "request_id", + "data" + ] + } + } + } +} diff --git a/api-reference/rum.openapi.zh.json b/api-reference/rum.openapi.zh.json new file mode 100644 index 0000000..09839b4 --- /dev/null +++ b/api-reference/rum.openapi.zh.json @@ -0,0 +1,2138 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Flashduty 开放 API", + "description": "Flashduty 事件管理平台的公开 HTTP API —— 覆盖故障、通知模板、协作空间、值班排班、监控、RUM、以及平台管理。每次调用都需在 query 中携带 `app_key`,该 key 在 Flashduty 控制台 账户 → APP Key 中签发。所有响应使用统一结构:成功时为 `{ request_id, data }`,失败时为 `{ request_id, error }`。", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://api.flashcat.cloud", + "description": "Flashduty Open API" + } + ], + "security": [ + { + "AppKeyAuth": [] + } + ], + "tags": [ + { + "name": "RUM/应用管理", + "description": "管理前端性能监控(RUM)应用。" + }, + { + "name": "RUM/RUM 问题跟踪", + "description": "查询和管理 RUM 异常追踪 Issue 及预设严重性规则。" + }, + { + "name": "RUM/RUM Sourcemap", + "description": "管理和查询用于 Browser、Android、iOS 错误符号化的 RUM Sourcemap 文件。" + } + ], + "paths": { + "/sourcemap/list": { + "post": { + "operationId": "sourcemap-read-list", + "summary": "查询 Sourcemap 列表", + "description": "分页返回已上传的 Sourcemap 文件列表,可按平台类型、服务和版本过滤。", + "tags": [ + "RUM/RUM Sourcemap" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- `start_time` 和 `end_time` 为必填字段,均使用 Unix 时间戳(**毫秒**),最大时间跨度 365 天。\n- `type` 字段用于选择平台:`browser`(JavaScript)、`android` 或 `ios`。省略时默认为 `browser`。\n- 默认每页 20 条,最大 100 条,默认按 `created_at` 倒序排列。\n- Android 平台可用 `build_id` 匹配 Gradle 插件的构建标识;iOS 平台可用 `uuid` 匹配 dSYM bundle UUID。", + "href": "/zh/api-reference/rum/sourcemaps/sourcemap-read-list", + "metadata": { + "sidebarTitle": "查询 Sourcemap 列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/SourcemapListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "total": 3, + "items": [ + { + "key": "browser/my-web-app/1.0.0/main.js.map", + "type": "browser", + "service": "my-web-app", + "version": "1.0.0", + "size": 204800, + "git_repository_url": "https://github.com/example/my-web-app", + "git_commit_sha": "abc1234def5678", + "created_at": 1712700000, + "updated_at": 1712700000, + "metadata": {} + } + ] + } + } + } + } + }, + "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/SourcemapListRequest" + }, + "example": { + "start_time": 1712000000000, + "end_time": 1712700000000, + "type": "browser", + "services": [ + "my-web-app" + ], + "p": 1, + "limit": 20 + } + } + } + } + } + }, + "/rum/application/list": { + "post": { + "operationId": "rum-application-read-list", + "summary": "查询应用列表", + "description": "返回当前用户可访问的 RUM 应用分页列表。", + "tags": [ + "RUM/应用管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 使用 `is_my_team` 可过滤当前用户所在团队的应用。\n- 默认每页 20 条,最大 100 条。\n- `orderby` 支持 `created_at` 或 `updated_at`。", + "href": "/zh/api-reference/rum/applications/rum-application-read-list", + "metadata": { + "sidebarTitle": "查询应用列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumApplicationListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "has_next_page": true, + "total": 7, + "items": [ + { + "account_id": 2451002751131, + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "application_name": "flashcat-rum", + "type": "browser", + "client_token": "a3cea433a8685a398cdfd68f54a45e06131", + "team_id": 2477033058131, + "is_private": true, + "no_ip": true, + "no_geo": false, + "alerting": { + "enabled": true, + "channel_ids": [ + 2490121812131 + ], + "integration_id": 4759595678131 + }, + "tracing": { + "enabled": false, + "open_type": "", + "endpoint": "" + }, + "status": "enabled", + "created_by": 4441703362131, + "updated_by": 3790925372131, + "created_at": 1746673831462, + "updated_at": 1773398630657 + }, + { + "account_id": 2451002751131, + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "type": "browser", + "client_token": "ce8d1be90fc6534f89ce36ebf526765e131", + "team_id": 2477033058131, + "is_private": false, + "no_ip": false, + "no_geo": false, + "alerting": { + "enabled": true, + "channel_ids": [ + 5962711836131, + 5967875767131 + ], + "integration_id": 4759595678131 + }, + "tracing": { + "enabled": true, + "open_type": "popup", + "endpoint": "https://www.tracing.com/${trace_id}" + }, + "status": "enabled", + "created_by": 2476444212131, + "updated_by": 3122470302131, + "created_at": 1742958482000, + "updated_at": 1772096392711 + } + ] + } + } + } + } + }, + "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/RumApplicationListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "query": "", + "is_my_team": false + } + } + } + } + } + }, + "/rum/application/update": { + "post": { + "operationId": "rum-application-write-update", + "summary": "更新应用", + "description": "更新已有 RUM 应用,除 `application_id` 外均为可选,仅更新提供的字段。", + "tags": [ + "RUM/应用管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **应用管理**(`rum`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/rum/applications/rum-application-write-update", + "metadata": { + "sidebarTitle": "更新应用" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RumApplicationUpdateRequest" + }, + "example": { + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "application_name": "我的 Web 应用 v2", + "alerting": { + "enabled": true, + "channel_ids": [ + 2490121812131 + ] + } + } + } + } + } + } + }, + "/rum/application/delete": { + "post": { + "operationId": "rum-application-write-delete", + "summary": "删除应用", + "description": "通过 `application_id` 删除 RUM 应用。", + "tags": [ + "RUM/应用管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **应用管理**(`rum`) |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/rum/applications/rum-application-write-delete", + "metadata": { + "sidebarTitle": "删除应用" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RumApplicationIDRequest" + }, + "example": { + "application_id": "qLpu24Dz4CAzWsESPbJYWA" + } + } + } + } + } + }, + "/rum/issue/update": { + "post": { + "operationId": "rum-issue-write-update", + "summary": "更新 Issue", + "description": "更新 Issue 的状态或疑似原因。", + "tags": [ + "RUM/RUM 问题跟踪" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- `status` 可选值:`for_review`、`reviewed`、`ignored`、`resolved`。\n- `suspected_cause` 可选值:`api.failed_request`、`network.error`、`code.exception`、`code.invalid_object_access`、`code.invalid_argument`、`unknown`。\n- 将 `status` 设为 `resolved` 会同时记录 `resolved_at` 和 `resolved_by`;从 resolved 切回其他状态则会清空这两个字段。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/rum/issues/rum-issue-write-update", + "metadata": { + "sidebarTitle": "更新 Issue" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RumIssueUpdateRequest" + }, + "example": { + "issue_id": "NHEacQHi2DhXqobr9qPQz9", + "status": "resolved" + } + } + } + } + } + }, + "/rum/application/create": { + "post": { + "operationId": "rum-application-write-create", + "summary": "创建应用", + "description": "创建新的 RUM 应用,返回生成的 `application_id` 和 `client_token`。", + "tags": [ + "RUM/应用管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **应用管理**(`rum`) |\n\n## 使用说明\n\n- `type` 须为以下之一:`browser`、`ios`、`android`、`react-native`、`flutter`、`kotlin-multiplatform`、`roku`、`unity`。\n- `client_token` 自动生成,用于初始化 RUM SDK。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/rum/applications/rum-application-write-create", + "metadata": { + "sidebarTitle": "创建应用" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumApplicationCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "application_id": "qLpu24Dz4CAzWsESPbJYWA", + "application_name": "我的 Web 应用", + "client_token": "e090078724855a4ca168c3884880dfbc131" + } + } + } + } + }, + "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/RumApplicationCreateRequest" + }, + "example": { + "application_name": "我的 Web 应用", + "type": "browser", + "team_id": 2477033058131, + "is_private": false + } + } + } + } + } + }, + "/rum/issue/list": { + "post": { + "operationId": "rum-issue-read-list", + "summary": "查询 Issue 列表", + "description": "返回符合过滤条件的 RUM 异常追踪 Issue 分页列表。", + "tags": [ + "RUM/RUM 问题跟踪" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- `start_time` 和 `end_time` 为毫秒时间戳,最大范围 183 天。\n- `statuses` 按状态过滤,可选值:`for_review`、`reviewed`、`ignored`、`resolved`。\n- `orderby` 支持:`created_at`、`updated_at`、`session_count`、`error_count`。\n- 使用 `dql` 或 `sql` 进行高级过滤,两者不可同时使用。", + "href": "/zh/api-reference/rum/issues/rum-issue-read-list", + "metadata": { + "sidebarTitle": "查询 Issue 列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumIssueListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "team_id": 2477033058131, + "issue_id": "NHEacQHi2DhXqobr9qPQz9", + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "service": "fd-console", + "status": "for_review", + "error_count": 752, + "session_count": 381, + "is_crash": false, + "age": 5078684, + "resolved_at": 0, + "resolved_by": 0, + "created_at": 1770883154944, + "updated_at": 1775961914595, + "first_seen": { + "timestamp": 1770883154944, + "version": "1.0.0" + }, + "last_seen": { + "timestamp": 1775961839090, + "version": "1.0.0" + }, + "error": { + "message": "Script error.", + "type": "Error" + }, + "suspected_cause": { + "source": "auto", + "value": "code.exception", + "reason": "错误信息 'Script error.' 通常表示 JavaScript 中的未处理异常。", + "person_id": 0 + }, + "versions": [ + "1.0.0" + ], + "severity": "Info" + }, + { + "team_id": 2477033058131, + "issue_id": "H8kZSmxiE7EgdyD4fCyyNa", + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "service": "fd-console", + "status": "for_review", + "error_count": 3, + "session_count": 1, + "is_crash": false, + "age": 48, + "resolved_at": 0, + "resolved_by": 0, + "created_at": 1775189479566, + "updated_at": 1775191284163, + "first_seen": { + "timestamp": 1775189479566, + "version": "1.0.0" + }, + "last_seen": { + "timestamp": 1775189527762, + "version": "1.0.0" + }, + "error": { + "message": "API ERROR: We encountered an internal error | POST /api/access/logout", + "type": "Error" + }, + "suspected_cause": { + "source": "auto", + "value": "api.failed_request", + "reason": "错误信息表明 POST /api/access/logout 请求时服务端发生内部错误。", + "person_id": 0 + }, + "versions": [ + "1.0.0" + ], + "severity": "Info" + } + ], + "has_next_page": true, + "total": 111 + } + } + } + } + }, + "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/RumIssueListRequest" + }, + "example": { + "start_time": 1772611200000, + "end_time": 1775961914595, + "application_ids": [ + "eWbr4xk3ZRnLabRa6unqwD" + ], + "statuses": [ + "for_review" + ], + "p": 1, + "limit": 20, + "orderby": "updated_at" + } + } + } + } + } + }, + "/rum/issue/info": { + "post": { + "operationId": "rum-issue-read-info", + "summary": "查看 Issue 详情", + "description": "通过 `issue_id` 获取单个 Issue 的完整信息。", + "tags": [ + "RUM/RUM 问题跟踪" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/rum/issues/rum-issue-read-info", + "metadata": { + "sidebarTitle": "查看 Issue 详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumIssueItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "team_id": 2477033058131, + "issue_id": "NHEacQHi2DhXqobr9qPQz9", + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "service": "fd-console", + "status": "for_review", + "error_count": 752, + "session_count": 381, + "is_crash": false, + "age": 5078684, + "resolved_at": 0, + "resolved_by": 0, + "created_at": 1770883154944, + "updated_at": 1775961914595, + "first_seen": { + "timestamp": 1770883154944, + "version": "1.0.0" + }, + "last_seen": { + "timestamp": 1775961839090, + "version": "1.0.0" + }, + "error": { + "message": "Script error.", + "type": "Error" + }, + "suspected_cause": { + "source": "auto", + "value": "code.exception", + "reason": "错误信息 'Script error.' 通常表示 JavaScript 中的未处理异常。", + "person_id": 0 + }, + "versions": [ + "1.0.0" + ], + "severity": "Info" + } + } + } + } + }, + "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/RumIssueIDRequest" + }, + "example": { + "issue_id": "NHEacQHi2DhXqobr9qPQz9" + } + } + } + } + } + }, + "/rum/application/info": { + "post": { + "operationId": "rum-application-read-info", + "summary": "查看应用详情", + "description": "通过 `application_id` 获取单个 RUM 应用的完整信息。", + "tags": [ + "RUM/应用管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |", + "href": "/zh/api-reference/rum/applications/rum-application-read-info", + "metadata": { + "sidebarTitle": "查看应用详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumApplicationItem" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "account_id": 2451002751131, + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "application_name": "flashcat-rum", + "type": "browser", + "client_token": "a3cea433a8685a398cdfd68f54a45e06131", + "team_id": 2477033058131, + "is_private": true, + "no_ip": true, + "no_geo": false, + "alerting": { + "enabled": true, + "channel_ids": [ + 2490121812131 + ], + "integration_id": 4759595678131 + }, + "tracing": { + "enabled": false, + "open_type": "", + "endpoint": "" + }, + "status": "enabled", + "created_by": 4441703362131, + "updated_by": 3790925372131, + "created_at": 1746673831462, + "updated_at": 1773398630657 + } + } + } + } + }, + "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/RumApplicationIDRequest" + }, + "example": { + "application_id": "WoyQQ3BohkdtPivubEvE8o" + } + } + } + } + } + }, + "/rum/application/infos": { + "post": { + "operationId": "rum-application-read-infos", + "summary": "批量查询应用详情", + "description": "通过 ID 列表批量获取多个 RUM 应用的详情。", + "tags": [ + "RUM/应用管理" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 每次请求最多传入 200 个 ID。", + "href": "/zh/api-reference/rum/applications/rum-application-read-infos", + "metadata": { + "sidebarTitle": "批量查询应用详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RumApplicationInfosResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "items": [ + { + "account_id": 2451002751131, + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "type": "browser", + "client_token": "ce8d1be90fc6534f89ce36ebf526765e131", + "team_id": 2477033058131, + "is_private": false, + "no_ip": false, + "no_geo": false, + "alerting": { + "enabled": true, + "channel_ids": [ + 5962711836131, + 5967875767131 + ], + "integration_id": 4759595678131 + }, + "tracing": { + "enabled": true, + "open_type": "popup", + "endpoint": "https://www.tracing.com/${trace_id}" + }, + "status": "enabled", + "created_by": 2476444212131, + "updated_by": 3122470302131, + "created_at": 1742958482000, + "updated_at": 1772096392711 + }, + { + "account_id": 2451002751131, + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "application_name": "flashcat-rum", + "type": "browser", + "client_token": "a3cea433a8685a398cdfd68f54a45e06131", + "team_id": 2477033058131, + "is_private": true, + "no_ip": true, + "no_geo": false, + "alerting": { + "enabled": true, + "channel_ids": [ + 2490121812131 + ], + "integration_id": 4759595678131 + }, + "tracing": { + "enabled": false, + "open_type": "", + "endpoint": "" + }, + "status": "enabled", + "created_by": 4441703362131, + "updated_by": 3790925372131, + "created_at": 1746673831462, + "updated_at": 1773398630657 + } + ] + } + } + } + } + }, + "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/RumApplicationInfosRequest" + }, + "example": { + "application_ids": [ + "eWbr4xk3ZRnLabRa6unqwD", + "WoyQQ3BohkdtPivubEvE8o" + ] + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "AppKeyAuth": { + "type": "apiKey", + "in": "query", + "name": "app_key", + "description": "在 Flashduty 控制台 账户 → APP Key 中签发的 app_key。调用任何公开 API 时都必须携带。它等同于所属账户的身份凭证,请妥善保管。" + } + }, + "responses": { + "BadRequest": { + "description": "请求非法 — 通常是参数缺失或格式不正确。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "missingParameter": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "InvalidParameter", + "message": "The specified parameter is not valid." + } + } + } + } + } + } + }, + "Unauthorized": { + "description": "app_key 缺失或无效。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "missingAppKey": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "Unauthorized", + "message": "You are unauthorized." + } + } + } + } + } + } + }, + "Forbidden": { + "description": "app_key 有效但没有执行该操作的权限。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "noEditPermission": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "AccessDenied", + "message": "Access Denied." + } + } + } + } + } + } + }, + "NotFound": { + "description": "目标资源不存在或已被删除。注意:Flashduty 对业务实体的缺失通常返回 HTTP 400 + code=`ResourceNotFound`,真正的 404 只用于未知路由。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "resourceMissing": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "ResourceNotFound", + "message": "The resource you request is not found" + } + } + } + } + } + } + }, + "TooManyRequests": { + "description": "命中限流。可能是全局 API 限流、账户级限流或集成级限流。限流按账户聚合。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "rateLimited": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "RequestTooFrequently", + "message": "Request too frequently." + } + } + } + } + } + } + }, + "ServerError": { + "description": "服务端未预期错误。反馈问题时请携带 request_id。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "internal": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "InternalError", + "message": "We encountered an internal error, and it has been reported. Please try again later." + } + } + } + } + } + } + } + }, + "schemas": { + "DutyError": { + "type": "object", + "description": "响应结构中的错误 payload,仅在非 2xx 响应时出现。", + "properties": { + "code": { + "$ref": "#/components/schemas/ErrorCode" + }, + "message": { + "type": "string", + "description": "用户可读的错误描述,语言会跟随调用方的 Accept-Language。可能包含字段名、ID 等请求上下文。", + "example": "The specified parameter template_id is not valid." + } + }, + "required": [ + "code", + "message" + ] + }, + "EmptyObject": { + "type": "object", + "description": "空对象。当操作的成功信号就是不报错时,作为 `data` 返回。", + "additionalProperties": false + }, + "EmptyRequest": { + "type": "object", + "description": "无参数。", + "additionalProperties": false + }, + "EmptyResponse": { + "type": "object", + "description": "空响应体。成功时服务端返回 `data: null`。", + "properties": {} + }, + "ErrorCode": { + "type": "string", + "description": "Flashduty 错误码枚举。每个失败响应的 `error.code` 都是下列稳定值之一,HTTP 状态码仅作参考。\n\n| 错误码 | HTTP | 含义 |\n|---|---|---|\n| `OK` | 200 | 保留值,正常错误响应不会返回。 |\n| `InvalidParameter` | 400 | 必填参数缺失或未通过校验。 |\n| `BadRequest` | 400 | 通用的 400 错误,通常是请求本身不合法。 |\n| `InvalidContentType` | 400 | 请求头 `Content-Type` 不是 `application/json`。 |\n| `ResourceNotFound` | 400 | 目标资源不存在。注意 HTTP 状态码是 400 而非 404(历史设计)。 |\n| `NoLicense` | 400 | 功能需要有效授权,但未找到可用的 license。 |\n| `ReferenceExist` | 400 | 该资源仍被其他实体引用,无法删除。 |\n| `Unauthorized` | 401 | `app_key` 缺失、无效或已过期。 |\n| `BalanceNotEnough` | 402 | 账户余额不足,无法执行需要计费的操作。 |\n| `AccessDenied` | 403 | 身份认证通过,但 RBAC 权限不足以执行该操作。 |\n| `RouteNotFound` | 404 | 请求的 URL 路径不是已知路由。 |\n| `MethodNotAllowed` | 405 | 当前路径不接受所使用的 HTTP 方法。 |\n| `UndonedOrderExist` | 409 | 账户存在未完成的订单,请稍后重试。 |\n| `RequestLocked` | 423 | 因连续失败被临时锁定。 |\n| `EntityTooLarge` | 413 | 请求体超过允许的最大长度。 |\n| `RequestTooFrequently` | 429 | 命中限流(全局、账户级或集成级)。 |\n| `RequestVerifyRequired` | 428 | 操作需要二次验证码,但未提供。 |\n| `DangerousOperation` | 428 | 危险操作,需要进行 MFA 验证。 |\n| `InternalError` | 500 | 服务端未预期错误。反馈问题请附上 `request_id`。 |\n| `ServiceUnavailable` | 503 | 后端依赖不可用,请稍后重试。 |", + "enum": [ + "OK", + "InvalidParameter", + "BadRequest", + "InvalidContentType", + "ResourceNotFound", + "NoLicense", + "ReferenceExist", + "Unauthorized", + "BalanceNotEnough", + "AccessDenied", + "RouteNotFound", + "MethodNotAllowed", + "UndonedOrderExist", + "RequestLocked", + "EntityTooLarge", + "RequestTooFrequently", + "RequestVerifyRequired", + "DangerousOperation", + "InternalError", + "ServiceUnavailable" + ], + "x-enumDescriptions": { + "OK": "保留值,正常错误响应不会返回。", + "InvalidParameter": "必填参数缺失或未通过校验。", + "BadRequest": "通用的 400 错误,通常是请求本身不合法。", + "InvalidContentType": "请求头 `Content-Type` 不是 `application/json`。", + "ResourceNotFound": "目标资源不存在。注意 HTTP 状态码是 400 而非 404(历史设计)。", + "NoLicense": "功能需要有效授权,但未找到可用的 license。", + "ReferenceExist": "该资源仍被其他实体引用,无法删除。", + "Unauthorized": "`app_key` 缺失、无效或已过期。", + "BalanceNotEnough": "账户余额不足,无法执行需要计费的操作。", + "AccessDenied": "身份认证通过,但 RBAC 权限不足以执行该操作。", + "RouteNotFound": "请求的 URL 路径不是已知路由。", + "MethodNotAllowed": "当前路径不接受所使用的 HTTP 方法。", + "UndonedOrderExist": "账户存在未完成的订单,请稍后重试。", + "RequestLocked": "因连续失败被临时锁定。", + "EntityTooLarge": "请求体超过允许的最大长度。", + "RequestTooFrequently": "命中限流(全局、账户级或集成级)。", + "RequestVerifyRequired": "操作需要二次验证码,但未提供。", + "DangerousOperation": "危险操作,需要进行 MFA 验证。", + "InternalError": "服务端未预期错误。反馈问题请附上 `request_id`。", + "ServiceUnavailable": "后端依赖不可用,请稍后重试。" + }, + "example": "InvalidParameter" + }, + "ErrorResponse": { + "type": "object", + "description": "错误响应结构。`error` 必填,`data` 不存在。", + "properties": { + "request_id": { + "type": "string", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "error": { + "$ref": "#/components/schemas/DutyError" + } + }, + "required": [ + "request_id", + "error" + ] + }, + "RumApplicationAlerting": { + "type": "object", + "description": "应用的告警配置。", + "properties": { + "enabled": { + "type": "boolean", + "description": "是否启用告警。" + }, + "channel_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "接收告警的协作空间 ID 列表。" + }, + "integration_id": { + "type": "integer", + "format": "int64", + "description": "关联的 On-call 集成 ID(只读,自动分配)。" + } + } + }, + "RumApplicationCreateRequest": { + "type": "object", + "required": [ + "application_name", + "type", + "team_id" + ], + "description": "创建 RUM 应用的参数。", + "properties": { + "application_name": { + "type": "string", + "description": "应用名称,1–40 个字符。" + }, + "type": { + "type": "string", + "enum": [ + "browser", + "ios", + "android", + "react-native", + "flutter", + "kotlin-multiplatform", + "roku", + "unity" + ], + "description": "应用类型。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID。" + }, + "is_private": { + "type": "boolean", + "description": "是否仅限团队成员访问。" + }, + "no_ip": { + "type": "boolean", + "description": "不采集 IP 地址。" + }, + "no_geo": { + "type": "boolean", + "description": "不推断地理位置。" + }, + "alerting": { + "$ref": "#/components/schemas/RumApplicationAlerting" + }, + "tracing": { + "$ref": "#/components/schemas/RumApplicationTracing" + } + } + }, + "RumApplicationCreateResponse": { + "type": "object", + "description": "创建 RUM 应用的结果。", + "properties": { + "application_id": { + "type": "string", + "description": "自动生成的唯一应用 ID。" + }, + "application_name": { + "type": "string", + "description": "应用显示名称。" + }, + "client_token": { + "type": "string", + "description": "用于 RUM SDK 初始化的令牌。" + } + } + }, + "RumApplicationIDRequest": { + "type": "object", + "required": [ + "application_id" + ], + "description": "包含单个应用 ID 的请求。", + "properties": { + "application_id": { + "type": "string", + "description": "RUM 应用 ID。" + } + } + }, + "RumApplicationInfosRequest": { + "type": "object", + "required": [ + "application_ids" + ], + "description": "批量查询应用信息请求。", + "properties": { + "application_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "最多 200 个应用 ID。" + } + } + }, + "RumApplicationInfosResponse": { + "type": "object", + "description": "批量查询应用信息响应。", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumApplicationItem" + } + } + } + }, + "RumApplicationItem": { + "type": "object", + "description": "单个 RUM 应用。", + "properties": { + "account_id": { + "type": "integer", + "format": "int64", + "description": "账户 ID。" + }, + "application_id": { + "type": "string", + "description": "唯一应用 ID。" + }, + "application_name": { + "type": "string", + "description": "应用显示名称。" + }, + "type": { + "type": "string", + "enum": [ + "browser", + "ios", + "android", + "react-native", + "flutter", + "kotlin-multiplatform", + "roku", + "unity" + ], + "description": "应用类型。" + }, + "client_token": { + "type": "string", + "description": "用于初始化 RUM SDK 的令牌。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID。" + }, + "is_private": { + "type": "boolean", + "description": "为 `true` 时仅团队成员可访问。" + }, + "no_ip": { + "type": "boolean", + "description": "为 `true` 时不采集 IP 地址。" + }, + "no_geo": { + "type": "boolean", + "description": "为 `true` 时不推断地理位置。" + }, + "alerting": { + "$ref": "#/components/schemas/RumApplicationAlerting" + }, + "tracing": { + "$ref": "#/components/schemas/RumApplicationTracing" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled", + "deleted" + ], + "description": "应用状态。" + }, + "created_by": { + "type": "integer", + "format": "int64", + "description": "创建者成员 ID。" + }, + "updated_by": { + "type": "integer", + "format": "int64", + "description": "最后更新者成员 ID。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 时间戳(秒)。" + } + } + }, + "RumApplicationListRequest": { + "type": "object", + "description": "查询 RUM 应用列表的过滤参数。", + "properties": { + "p": { + "type": "integer", + "description": "页码(从 1 开始),默认 1。" + }, + "limit": { + "type": "integer", + "description": "每页条数,范围 1–100,默认 20。" + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "description": "排序字段。" + }, + "asc": { + "type": "boolean", + "description": "为 `true` 时升序排列。" + }, + "query": { + "type": "string", + "description": "按应用名称搜索。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "按团队 ID 过滤。" + }, + "is_my_team": { + "type": "boolean", + "description": "为 `true` 时仅返回当前用户所在团队的应用。" + } + } + }, + "RumApplicationListResponse": { + "type": "object", + "description": "RUM 应用分页列表。", + "properties": { + "has_next_page": { + "type": "boolean" + }, + "total": { + "type": "integer" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumApplicationItem" + } + } + } + }, + "RumApplicationTracing": { + "type": "object", + "description": "APM 链路追踪集成配置。", + "properties": { + "enabled": { + "type": "boolean", + "description": "是否启用链路追踪集成。" + }, + "open_type": { + "type": "string", + "enum": [ + "popup", + "tab" + ], + "description": "链路链接的打开方式。" + }, + "endpoint": { + "type": "string", + "description": "链路 Endpoint URL(http 或 https)。" + } + } + }, + "RumApplicationUpdateRequest": { + "type": "object", + "required": [ + "application_id" + ], + "description": "更新 RUM 应用的参数,除 `application_id` 外均为可选。", + "properties": { + "application_id": { + "type": "string", + "description": "要更新的应用 ID。" + }, + "application_name": { + "type": "string", + "description": "新的应用名称。" + }, + "type": { + "type": "string", + "enum": [ + "browser", + "ios", + "android", + "react-native", + "flutter", + "kotlin-multiplatform", + "roku", + "unity" + ] + }, + "team_id": { + "type": "integer", + "format": "int64" + }, + "is_private": { + "type": "boolean" + }, + "no_ip": { + "type": "boolean" + }, + "no_geo": { + "type": "boolean" + }, + "alerting": { + "$ref": "#/components/schemas/RumApplicationAlerting" + }, + "tracing": { + "$ref": "#/components/schemas/RumApplicationTracing" + } + } + }, + "RumIssueIDRequest": { + "type": "object", + "required": [ + "issue_id" + ], + "properties": { + "issue_id": { + "type": "string", + "description": "Issue ID。" + } + } + }, + "RumIssueItem": { + "type": "object", + "description": "单个 RUM 异常追踪 Issue。", + "properties": { + "team_id": { + "type": "integer", + "format": "int64" + }, + "issue_id": { + "type": "string", + "description": "唯一 Issue ID。" + }, + "application_id": { + "type": "string" + }, + "application_name": { + "type": "string" + }, + "service": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "for_review", + "reviewed", + "ignored", + "resolved" + ] + }, + "error_count": { + "type": "integer", + "format": "int64", + "description": "错误总发生次数。" + }, + "session_count": { + "type": "integer", + "format": "int64", + "description": "受影响的用户会话数。" + }, + "is_crash": { + "type": "boolean", + "description": "是否导致应用崩溃。" + }, + "age": { + "type": "integer", + "format": "int64" + }, + "resolved_at": { + "type": "integer", + "format": "int64" + }, + "resolved_by": { + "type": "integer", + "format": "int64" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "first_seen": { + "type": "object", + "properties": { + "timestamp": { + "type": "integer", + "format": "int64" + }, + "version": { + "type": "string" + } + } + }, + "last_seen": { + "type": "object", + "properties": { + "timestamp": { + "type": "integer", + "format": "int64" + }, + "version": { + "type": "string" + } + } + }, + "error": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "suspected_cause": { + "type": "object", + "properties": { + "source": { + "type": "string", + "enum": [ + "auto", + "user" + ] + }, + "value": { + "type": "string", + "enum": [ + "api.failed_request", + "network.error", + "code.exception", + "code.invalid_object_access", + "code.invalid_argument", + "unknown" + ] + }, + "reason": { + "type": "string" + }, + "person_id": { + "type": "integer", + "format": "int64" + } + } + }, + "regression": { + "type": "object", + "description": "回溯元数据,仅在已解决的 Issue 再次出现时存在。", + "properties": { + "regressed_at": { + "type": "integer", + "format": "int64", + "description": "检测到回溯的时间戳。" + }, + "regressed_at_version": { + "type": "string", + "description": "出现回溯的应用版本。" + }, + "resolved_at": { + "type": "integer", + "format": "int64", + "description": "回溯前的上次解决时间。" + } + } + }, + "versions": { + "type": "array", + "items": { + "type": "string" + } + }, + "severity": { + "type": "string", + "description": "Issue 严重性级别。" + } + } + }, + "RumIssueListRequest": { + "type": "object", + "required": [ + "start_time", + "end_time" + ], + "description": "查询 Issue 列表的过滤参数。", + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "时间范围起始,毫秒时间戳。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "时间范围结束,毫秒时间戳,最大范围 183 天。" + }, + "application_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按应用 ID 过滤。" + }, + "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" + }, + "description": "按疑似原因过滤。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "按团队 ID 过滤。" + }, + "p": { + "type": "integer", + "description": "页码,默认 1。" + }, + "limit": { + "type": "integer", + "description": "每页条数,范围 1–100,默认 20。" + }, + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at", + "session_count", + "error_count" + ] + }, + "asc": { + "type": "boolean" + }, + "error_required": { + "type": "boolean", + "description": "为 `true` 时仅返回有关联错误事件的 Issue。" + }, + "by_intersection": { + "type": "boolean" + } + } + }, + "RumIssueListResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RumIssueItem" + } + }, + "has_next_page": { + "type": "boolean" + }, + "total": { + "type": "integer" + } + } + }, + "RumIssueUpdateRequest": { + "type": "object", + "required": [ + "issue_id" + ], + "description": "更新 Issue 的参数。", + "properties": { + "issue_id": { + "type": "string", + "description": "要更新的 Issue ID。" + }, + "status": { + "type": "string", + "enum": [ + "for_review", + "reviewed", + "ignored", + "resolved" + ], + "description": "新状态。" + }, + "suspected_cause": { + "type": "string", + "enum": [ + "api.failed_request", + "network.error", + "code.exception", + "code.invalid_object_access", + "code.invalid_argument", + "unknown" + ], + "description": "疑似原因。" + } + } + }, + "SourcemapItem": { + "type": "object", + "description": "单条已上传的 Sourcemap 记录。", + "properties": { + "key": { + "type": "string", + "description": "唯一标识该 Sourcemap 文件的存储键。" + }, + "type": { + "type": "string", + "description": "平台类型:`browser`、`android` 或 `ios`。", + "enum": [ + "browser", + "android", + "ios" + ] + }, + "service": { + "type": "string", + "description": "应用或服务名称。" + }, + "version": { + "type": "string", + "description": "应用版本字符串。" + }, + "size": { + "type": "integer", + "format": "int64", + "description": "文件大小(字节)。" + }, + "git_repository_url": { + "type": "string", + "description": "与此构建关联的 Git 仓库 URL。" + }, + "git_commit_sha": { + "type": "string", + "description": "此构建的 Git commit SHA。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "上传时间,Unix 秒时间戳。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 秒时间戳。" + }, + "metadata": { + "type": "object", + "description": "附加在 sourcemap 上的自由格式键值元数据。具体结构取决于上传客户端,常见键包括 `git_repository_url` 和 `git_commit_sha`(这两个字段同时也会提升为顶层字段)。", + "additionalProperties": true + } + } + }, + "SourcemapListRequest": { + "type": "object", + "description": "Sourcemap 列表的分页过滤条件。", + "required": [ + "start_time", + "end_time" + ], + "properties": { + "start_time": { + "type": "integer", + "format": "int64", + "description": "上传时间范围起始,Unix 毫秒时间戳。需大于 0 且小于 `end_time`。" + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "上传时间范围结束,Unix 毫秒时间戳。最大时间跨度 365 天。" + }, + "type": { + "type": "string", + "description": "平台类型。省略时默认为 `browser`。", + "enum": [ + "browser", + "android", + "ios" + ] + }, + "services": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按服务名称过滤,最多 100 个值。" + }, + "versions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "按版本字符串过滤,最多 100 个值。" + }, + "query": { + "type": "string", + "description": "对 minified URL(browser)或 build_id(android)做子串匹配。最多 200 个字符。" + }, + "build_id": { + "type": "string", + "description": "仅 Android。按 Gradle 插件构建标识过滤。最多 200 个字符。" + }, + "uuid": { + "type": "string", + "description": "仅 iOS。按 dSYM bundle UUID 过滤。最多 200 个字符。" + }, + "p": { + "type": "integer", + "description": "页码,从 1 开始。", + "minimum": 1, + "default": 1, + "example": 1 + }, + "limit": { + "type": "integer", + "description": "每页条数,最大 100,默认 20。", + "maximum": 100, + "default": 20, + "example": 20 + }, + "orderby": { + "type": "string", + "description": "排序字段。", + "enum": [ + "created_at", + "updated_at" + ] + }, + "asc": { + "type": "boolean", + "description": "升序排序。默认 false(降序)。", + "default": false + } + } + }, + "SourcemapListResponse": { + "type": "object", + "description": "Sourcemap 记录的分页列表。", + "required": [ + "total", + "items" + ], + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "匹配记录总数。", + "example": 3 + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SourcemapItem" + } + } + } + }, + "SuccessEnvelope": { + "type": "object", + "description": "成功响应结构。2xx 响应中 `request_id` 标识本次调用(同时出现在 `Flashcat-Request-Id` 响应头中),`data` 为接口业务 payload。失败响应使用不同结构,参见 `ErrorResponse`。", + "properties": { + "request_id": { + "type": "string", + "description": "本次请求的唯一 ID,也会在 Flashcat-Request-Id 响应头中返回。反馈问题时请一并附上。", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "data": { + "description": "每个接口自己的业务 payload,详见各接口的 200 响应 schema。" + } + }, + "required": [ + "request_id", + "data" + ] + } + } + } +} diff --git a/docs.json b/docs.json index fe4a8fb..2af9d0d 100644 --- a/docs.json +++ b/docs.json @@ -2,7 +2,7 @@ "$schema": "https://mintlify.com/docs.json", "theme": "mint", "name": "Flashduty Docs", - "favicon": "https://flashduty-docs.oss-cn-beijing.aliyuncs.com/images/saas-favicon.png", + "favicon": "/logo/saas-favicon.png", "colors": { "primary": "#8B5CF6", "light": "#8B5CF6", @@ -15,7 +15,7 @@ }, "seo": { "metatags": { - "canonical": "https://docs.flashcat.cloud" + "canonical": "https://docs.flashcat.cloud" } }, "navigation": { @@ -29,6 +29,7 @@ "groups": [ { "group": "首页", + "icon": "house", "pages": [ "zh/home", "zh/stsatuspage" @@ -36,6 +37,7 @@ }, { "group": "产品简介", + "icon": "cubes", "pages": [ "zh/on-call", "zh/rum", @@ -44,6 +46,7 @@ }, { "group": "通用配置", + "icon": "sliders", "pages": [ "zh/platform/pricing", "zh/platform/team-members", @@ -54,6 +57,7 @@ }, { "group": "开发者", + "icon": "code", "pages": [ "zh/developer/overview", "zh/openapi", @@ -63,6 +67,7 @@ }, { "group": "安全合规", + "icon": "scale-balanced", "pages": [ "zh/compliance/terms-of-service", "zh/compliance/user-agreement", @@ -72,6 +77,7 @@ }, { "group": "更新日志", + "icon": "clock-rotate-left", "pages": [ "zh/changelog/changelog" ] @@ -84,6 +90,7 @@ "groups": [ { "group": "快速开始", + "icon": "rocket", "pages": [ "zh/on-call/quickstart/quickstart", "zh/on-call/quickstart/faq", @@ -92,6 +99,7 @@ }, { "group": "协作空间", + "icon": "comments", "pages": [ "zh/on-call/channel/create-edit", "zh/on-call/channel/integrate-data", @@ -101,6 +109,7 @@ }, { "group": "故障管理", + "icon": "triangle-exclamation", "pages": [ "zh/on-call/incident/what-is-incident", "zh/on-call/incident/search-view-incident", @@ -114,6 +123,7 @@ }, { "group": "故障复盘", + "icon": "clipboard-check", "pages": [ "zh/on-call/post-mortem/what-is-post-mortem", "zh/on-call/post-mortem/create-edit-post-mortem", @@ -123,6 +133,7 @@ }, { "group": "状态页", + "icon": "signal", "pages": [ "zh/on-call/statuspage/statuspage", "zh/on-call/statuspage/create-manage-page", @@ -134,12 +145,14 @@ }, { "group": "分析看板", + "icon": "chart-pie", "pages": [ "zh/on-call/analytics/insights" ] }, { "group": "集成配置", + "icon": "sliders", "pages": [ "zh/on-call/integration/alert-integration/label-enhancement", "zh/on-call/integration/alert-integration/alert-pipelines", @@ -148,6 +161,7 @@ }, { "group": "配置中心", + "icon": "gear", "pages": [ "zh/on-call/configuration/schedule", "zh/on-call/configuration/service-calendar", @@ -160,6 +174,7 @@ }, { "group": "高级功能", + "icon": "wand-magic-sparkles", "pages": [ "zh/on-call/advanced/reference-variables", "zh/on-call/advanced/dynamic-notifications", @@ -168,61 +183,62 @@ }, { "group": "集成中心", + "icon": "puzzle-piece", "pages": [ { "group": "告警集成", "expanded": false, "pages": [ - "zh/on-call/integration/alert-integration/alert-sources/standard alert", - "zh/on-call/integration/alert-integration/alert-sources/prometheus", - "zh/on-call/integration/alert-integration/alert-sources/grafana", - "zh/on-call/integration/alert-integration/alert-sources/zabbix", - "zh/on-call/integration/alert-integration/alert-sources/flashcat", - "zh/on-call/integration/alert-integration/alert-sources/open-falcon", - "zh/on-call/integration/alert-integration/alert-sources/uptime-kuma", - "zh/on-call/integration/alert-integration/alert-sources/influxdata", - "zh/on-call/integration/alert-integration/alert-sources/graylog", - "zh/on-call/integration/alert-integration/alert-sources/skywalking", - "zh/on-call/integration/alert-integration/alert-sources/elastalert2", - "zh/on-call/integration/alert-integration/alert-sources/keep", - "zh/on-call/integration/alert-integration/alert-sources/aliyun-arms", - "zh/on-call/integration/alert-integration/alert-sources/aliyun-cm-event", - "zh/on-call/integration/alert-integration/alert-sources/aliyun-cm-metrics", - "zh/on-call/integration/alert-integration/alert-sources/aliyun-sls", - "zh/on-call/integration/alert-integration/alert-sources/aliyun-prometheus", - "zh/on-call/integration/alert-integration/alert-sources/aws-cloudwatch", - "zh/on-call/integration/alert-integration/alert-sources/aws-eventbridge", - "zh/on-call/integration/alert-integration/alert-sources/tencent-cls", - "zh/on-call/integration/alert-integration/alert-sources/tencent-cm", - "zh/on-call/integration/alert-integration/alert-sources/tencent-eventbridge", - "zh/on-call/integration/alert-integration/alert-sources/huawei-ces", - "zh/on-call/integration/alert-integration/alert-sources/huawei-lts", - "zh/on-call/integration/alert-integration/alert-sources/huawei-apm", - "zh/on-call/integration/alert-integration/alert-sources/volcengine-cm-metrics", - "zh/on-call/integration/alert-integration/alert-sources/volcengine-cm-event", - "zh/on-call/integration/alert-integration/alert-sources/volcengine-tls", - "zh/on-call/integration/alert-integration/alert-sources/pagerduty", - "zh/on-call/integration/alert-integration/alert-sources/dynatrace", - "zh/on-call/integration/alert-integration/alert-sources/appdynamics", - "zh/on-call/integration/alert-integration/alert-sources/solarwinds", - "zh/on-call/integration/alert-integration/alert-sources/splunk", - "zh/on-call/integration/alert-integration/alert-sources/sentry", - "zh/on-call/integration/alert-integration/alert-sources/opmanager", - "zh/on-call/integration/alert-integration/alert-sources/blueking", - "zh/on-call/integration/alert-integration/alert-sources/guance", - "zh/on-call/integration/alert-integration/alert-sources/jiankongbao", - "zh/on-call/integration/alert-integration/alert-sources/oceanbase", - "zh/on-call/integration/alert-integration/alert-sources/zilliz", - "zh/on-call/integration/alert-integration/alert-sources/zstack", - "zh/on-call/integration/alert-integration/alert-sources/cloudflare", - "zh/on-call/integration/alert-integration/alert-sources/meraki", - "zh/on-call/integration/alert-integration/alert-sources/monit", - "zh/on-call/integration/alert-integration/alert-sources/harbor", - "zh/on-call/integration/alert-integration/alert-sources/ucloud-cloudwatch", - "zh/on-call/integration/alert-integration/alert-sources/jdcloud", - "zh/on-call/integration/alert-integration/alert-sources/volcengine-rtc", - "zh/on-call/integration/alert-integration/alert-sources/nagios", - "zh/on-call/integration/alert-integration/alert-sources/label-mapping-api" + "zh/on-call/integration/alert-integration/alert-sources/standard alert", + "zh/on-call/integration/alert-integration/alert-sources/prometheus", + "zh/on-call/integration/alert-integration/alert-sources/grafana", + "zh/on-call/integration/alert-integration/alert-sources/zabbix", + "zh/on-call/integration/alert-integration/alert-sources/flashcat", + "zh/on-call/integration/alert-integration/alert-sources/open-falcon", + "zh/on-call/integration/alert-integration/alert-sources/uptime-kuma", + "zh/on-call/integration/alert-integration/alert-sources/influxdata", + "zh/on-call/integration/alert-integration/alert-sources/graylog", + "zh/on-call/integration/alert-integration/alert-sources/skywalking", + "zh/on-call/integration/alert-integration/alert-sources/elastalert2", + "zh/on-call/integration/alert-integration/alert-sources/keep", + "zh/on-call/integration/alert-integration/alert-sources/aliyun-arms", + "zh/on-call/integration/alert-integration/alert-sources/aliyun-cm-event", + "zh/on-call/integration/alert-integration/alert-sources/aliyun-cm-metrics", + "zh/on-call/integration/alert-integration/alert-sources/aliyun-sls", + "zh/on-call/integration/alert-integration/alert-sources/aliyun-prometheus", + "zh/on-call/integration/alert-integration/alert-sources/aws-cloudwatch", + "zh/on-call/integration/alert-integration/alert-sources/aws-eventbridge", + "zh/on-call/integration/alert-integration/alert-sources/tencent-cls", + "zh/on-call/integration/alert-integration/alert-sources/tencent-cm", + "zh/on-call/integration/alert-integration/alert-sources/tencent-eventbridge", + "zh/on-call/integration/alert-integration/alert-sources/huawei-ces", + "zh/on-call/integration/alert-integration/alert-sources/huawei-lts", + "zh/on-call/integration/alert-integration/alert-sources/huawei-apm", + "zh/on-call/integration/alert-integration/alert-sources/volcengine-cm-metrics", + "zh/on-call/integration/alert-integration/alert-sources/volcengine-cm-event", + "zh/on-call/integration/alert-integration/alert-sources/volcengine-tls", + "zh/on-call/integration/alert-integration/alert-sources/pagerduty", + "zh/on-call/integration/alert-integration/alert-sources/dynatrace", + "zh/on-call/integration/alert-integration/alert-sources/appdynamics", + "zh/on-call/integration/alert-integration/alert-sources/solarwinds", + "zh/on-call/integration/alert-integration/alert-sources/splunk", + "zh/on-call/integration/alert-integration/alert-sources/sentry", + "zh/on-call/integration/alert-integration/alert-sources/opmanager", + "zh/on-call/integration/alert-integration/alert-sources/blueking", + "zh/on-call/integration/alert-integration/alert-sources/guance", + "zh/on-call/integration/alert-integration/alert-sources/jiankongbao", + "zh/on-call/integration/alert-integration/alert-sources/oceanbase", + "zh/on-call/integration/alert-integration/alert-sources/zilliz", + "zh/on-call/integration/alert-integration/alert-sources/zstack", + "zh/on-call/integration/alert-integration/alert-sources/cloudflare", + "zh/on-call/integration/alert-integration/alert-sources/meraki", + "zh/on-call/integration/alert-integration/alert-sources/monit", + "zh/on-call/integration/alert-integration/alert-sources/harbor", + "zh/on-call/integration/alert-integration/alert-sources/ucloud-cloudwatch", + "zh/on-call/integration/alert-integration/alert-sources/jdcloud", + "zh/on-call/integration/alert-integration/alert-sources/volcengine-rtc", + "zh/on-call/integration/alert-integration/alert-sources/nagios", + "zh/on-call/integration/alert-integration/alert-sources/label-mapping-api" ] }, { @@ -276,6 +292,7 @@ "groups": [ { "group": "快速开始", + "icon": "rocket", "pages": [ "zh/rum/quickstart/quickstart", "zh/rum/quickstart/app-management" @@ -283,6 +300,7 @@ }, { "group": "分析看板", + "icon": "chart-pie", "pages": [ "zh/rum/analytics/web", "zh/rum/analytics/native" @@ -290,6 +308,7 @@ }, { "group": "SDK 接入", + "icon": "code", "pages": [ { "group": "Web", @@ -325,6 +344,7 @@ }, { "group": "性能监控", + "icon": "gauge-high", "pages": [ "zh/rum/performance/overview", "zh/rum/performance/metrics-reporting", @@ -334,6 +354,7 @@ }, { "group": "异常追踪", + "icon": "bug", "pages": [ "zh/rum/error-tracking/overview", { @@ -353,6 +374,7 @@ }, { "group": "查看器", + "icon": "magnifying-glass", "pages": [ "zh/rum/explorer/overview", "zh/rum/explorer/data-query" @@ -360,6 +382,7 @@ }, { "group": "会话重放", + "icon": "circle-play", "pages": [ "zh/rum/session-replay/overview", "zh/rum/session-replay/sdk-config", @@ -369,6 +392,7 @@ }, { "group": "最佳实践", + "icon": "lightbulb", "pages": [ "zh/rum/best-practices/distributed-tracing", "zh/rum/best-practices/alert-noise-reduction" @@ -376,6 +400,7 @@ }, { "group": "其他", + "icon": "ellipsis", "pages": [ "zh/rum/others/glossary", "zh/rum/others/data-collection", @@ -390,18 +415,21 @@ "groups": [ { "group": "快速开始", + "icon": "rocket", "pages": [ "zh/monitors/quickstart/quickstart" ] }, { "group": "数据源", + "icon": "database", "pages": [ "zh/monitors/data-sources/data-sources" ] }, { "group": "告警引擎", + "icon": "gears", "pages": [ "zh/monitors/engine/engine", "zh/monitors/engine/engine-lost-alert" @@ -409,6 +437,7 @@ }, { "group": "告警规则", + "icon": "list-check", "pages": [ "zh/monitors/alert-rules/prometheus", "zh/monitors/alert-rules/elasticsearch", @@ -423,29 +452,513 @@ }, { "group": "活跃告警", + "icon": "bell", "pages": [ "zh/monitors/alert-rules/active-alerts" ] }, { "group": "规则仓库", + "icon": "box-archive", "pages": [ "zh/monitors/rule-repository/rule-repository" ] }, { "group": "文件夹管理", + "icon": "folder-open", "pages": [ "zh/monitors/folders/folders" ] }, { "group": "常见问题", + "icon": "circle-question", "pages": [ "zh/monitors/faq/faq" ] } ] + }, + { + "tab": "API 参考", + "icon": "terminal", + "hidden": true, + "groups": [ + { + "group": "开发指南", + "icon": "book-open", + "pages": [ + "zh/openapi/introduction", + "zh/openapi/api-catalog", + "zh/openapi/pagination" + ] + }, + { + "group": "On-call", + "icon": "light-emergency-on", + "openapi": "api-reference/on-call.openapi.zh.json", + "pages": [ + { + "group": "故障管理", + "icon": "siren-on", + "pages": [ + { + "group": "故障信息", + "icon": "circle-info", + "pages": [ + "POST /incident/list", + "POST /incident/info", + "POST /incident/list-by-ids", + "POST /incident/alert/list", + "POST /incident/feed", + "POST /incident/past/list", + "POST /incident/reset", + "POST /incident/comment", + "POST /incident/field/reset", + "POST /incident/custom-action/do" + ] + }, + { + "group": "状态流转", + "icon": "timeline", + "pages": [ + "POST /incident/create", + "POST /incident/ack", + "POST /incident/unack", + "POST /incident/resolve", + "POST /incident/reopen", + "POST /incident/snooze", + "POST /incident/wake", + "POST /incident/merge", + "POST /incident/disable-merge", + "POST /incident/remove", + "POST /incident/assign", + "POST /incident/responder/add" + ] + }, + { + "group": "作战室", + "icon": "shield-halved", + "pages": [ + "POST /incident/war-room/detail", + "POST /incident/war-room/list", + "POST /incident/war-room/create", + "POST /incident/war-room/delete" + ] + }, + { + "group": "故障复盘", + "icon": "file-lines", + "pages": [ + "GET /incident/post-mortem/info", + "POST /incident/post-mortem/list", + "POST /incident/post-mortem/delete" + ] + } + ] + }, + { + "group": "协作空间", + "icon": "comments", + "pages": [ + "POST /channel/info", + "POST /channel/list", + "POST /channel/infos", + "POST /channel/create", + "POST /channel/update", + "POST /channel/delete", + "POST /channel/enable", + "POST /channel/disable", + { + "group": "分派策略", + "icon": "arrow-up-right-dots", + "pages": [ + "POST /channel/escalate/rule/info", + "POST /channel/escalate/rule/list", + "POST /channel/escalate/rule/create", + "POST /channel/escalate/rule/update", + "POST /channel/escalate/rule/delete", + "POST /channel/escalate/rule/enable", + "POST /channel/escalate/rule/disable" + ] + }, + { + "group": "静默策略", + "icon": "bell-slash", + "pages": [ + "POST /channel/silence/rule/list", + "POST /channel/silence/rule/create", + "POST /channel/silence/rule/update", + "POST /channel/silence/rule/delete", + "POST /channel/silence/rule/enable", + "POST /channel/silence/rule/disable" + ] + }, + { + "group": "抑制策略", + "icon": "volume-xmark", + "pages": [ + "POST /channel/inhibit/rule/list", + "POST /channel/inhibit/rule/create", + "POST /channel/inhibit/rule/update", + "POST /channel/inhibit/rule/delete", + "POST /channel/inhibit/rule/enable", + "POST /channel/inhibit/rule/disable" + ] + }, + { + "group": "通知策略", + "icon": "bell", + "pages": [ + "POST /channel/notify/rule/list", + "POST /channel/notify/rule/create", + "POST /channel/notify/rule/update", + "POST /channel/notify/rule/delete", + "POST /channel/notify/rule/enable", + "POST /channel/notify/rule/disable" + ] + }, + { + "group": "排除规则", + "icon": "filter-circle-xmark", + "pages": [ + "POST /channel/unsubscribe/rule/list", + "POST /channel/unsubscribe/rule/create", + "POST /channel/unsubscribe/rule/update", + "POST /channel/unsubscribe/rule/delete", + "POST /channel/unsubscribe/rule/enable", + "POST /channel/unsubscribe/rule/disable" + ] + } + ] + }, + { + "group": "告警管理", + "icon": "bell", + "pages": [ + "POST /alert/list", + "POST /alert/info", + "POST /alert/list-by-ids", + "POST /alert/event/list", + "POST /alert/feed", + "POST /alert/merge", + "POST /alert/pipeline/info", + "POST /alert/pipeline/list", + "POST /alert/pipeline/upsert", + "POST /alert-event/list" + ] + }, + { + "group": "集成中心", + "icon": "plug", + "pages": [ + "POST /webhook/history/list", + "POST /webhook/history/detail" + ] + }, + { + "group": "路由规则", + "icon": "shuffle", + "pages": [ + "POST /route/info", + "POST /route/list", + "POST /route/upsert" + ] + }, + { + "group": "值班排班", + "icon": "calendar-days", + "pages": [ + "POST /schedule/create", + "POST /schedule/update", + "POST /schedule/preview", + "POST /schedule/delete", + "POST /schedule/info", + "POST /schedule/list", + "POST /schedule/self", + "POST /schedule/infos" + ] + }, + { + "group": "日历管理", + "icon": "calendar", + "pages": [ + "POST /calendar/create", + "POST /calendar/update", + "POST /calendar/delete", + "POST /calendar/info", + "POST /calendar/list", + { + "group": "日历事件", + "icon": "calendar-plus", + "pages": [ + "POST /calendar/event/upsert", + "POST /calendar/event/delete", + "POST /calendar/event/list" + ] + } + ] + }, + { + "group": "通知模板", + "icon": "envelope-open-text", + "pages": [ + "POST /template/info", + "POST /template/list", + "POST /template/create", + "POST /template/update", + "POST /template/delete" + ] + }, + { + "group": "标签增强", + "icon": "tags", + "pages": [ + "POST /enrichment/info", + "POST /enrichment/list", + "POST /enrichment/upsert", + { + "group": "映射 Schema", + "icon": "table-columns", + "pages": [ + "POST /enrichment/mapping/schema/list", + "POST /enrichment/mapping/schema/info", + "POST /enrichment/mapping/schema/create", + "POST /enrichment/mapping/schema/update", + "POST /enrichment/mapping/schema/delete" + ] + }, + { + "group": "映射数据", + "icon": "table", + "pages": [ + "POST /enrichment/mapping/data/list", + "POST /enrichment/mapping/data/upsert", + "POST /enrichment/mapping/data/delete", + "POST /enrichment/mapping/data/truncate", + "POST /enrichment/mapping/data/upload", + "POST /enrichment/mapping/data/download" + ] + }, + { + "group": "API 数据源", + "icon": "cloud-arrow-down", + "pages": [ + "POST /enrichment/mapping/api/list", + "POST /enrichment/mapping/api/info", + "POST /enrichment/mapping/api/create", + "POST /enrichment/mapping/api/update", + "POST /enrichment/mapping/api/delete" + ] + } + ] + }, + { + "group": "分析看板", + "icon": "chart-line", + "pages": [ + "POST /insight/alert/topk-by-label", + "POST /insight/account", + "POST /insight/incident/list", + "POST /insight/incident/export", + "POST /insight/channel", + "POST /insight/channel/export", + "POST /insight/team", + "POST /insight/team/export", + "POST /insight/responder", + "POST /insight/responder/export" + ] + }, + { + "group": "状态页", + "icon": "signal-stream", + "pages": [ + { + "group": "变更公告", + "icon": "newspaper", + "pages": [ + "GET /status-page/change/info", + "GET /status-page/change/list", + "POST /status-page/change/create", + "POST /status-page/change/update", + "POST /status-page/change/delete", + "POST /status-page/change/timeline/create", + "POST /status-page/change/timeline/update", + "POST /status-page/change/timeline/delete" + ] + }, + { + "group": "订阅者", + "icon": "envelope", + "pages": [ + "GET /status-page/subscriber/list", + "POST /status-page/subscriber/import", + "POST /status-page/subscriber/export" + ] + }, + { + "group": "迁移", + "icon": "truck-moving", + "pages": [ + "POST /status-page/migrate-structure", + "POST /status-page/migrate-email-subscribers", + "GET /status-page/migration/status", + "POST /status-page/migration/cancel" + ] + } + ] + } + ] + }, + { + "group": "Monitors", + "icon": "chart-area", + "openapi": "api-reference/monitors.openapi.zh.json", + "pages": [ + { + "group": "告警规则", + "icon": "diamond-exclamation", + "pages": [ + "POST /monit/rule/list/basic", + "POST /monit/rule/info", + "POST /monit/rule/create", + "POST /monit/rule/update", + "POST /monit/rule/delete", + "POST /monit/rule/delete/batch", + "POST /monit/rule/update/fields", + "POST /monit/rule/import", + "POST /monit/rule/export", + "POST /monit/rule/move", + "POST /monit/rule/status", + "POST /monit/rule/audits", + "POST /monit/rule/audit/detail", + "POST /monit/rule/dstypes", + "POST /monit/rule/counter/total", + "POST /monit/rule/counter/node", + "POST /monit/rule/counter/channel", + "POST /monit/rule/counter/status" + ] + }, + { + "group": "告警数据源", + "icon": "database", + "pages": [ + "POST /monit/datasource/list", + "POST /monit/datasource/info", + "POST /monit/datasource/create", + "POST /monit/datasource/update", + "POST /monit/datasource/delete", + "POST /monit/datasource/sls/projects", + "POST /monit/datasource/sls/logstores" + ] + }, + { + "group": "规则集", + "icon": "books", + "pages": [ + "POST /monit/store/ruleset/list", + "POST /monit/store/ruleset/info", + "POST /monit/store/ruleset/create", + "POST /monit/store/ruleset/update", + "POST /monit/store/ruleset/delete" + ] + } + ] + }, + { + "group": "RUM", + "icon": "monitor-waveform", + "openapi": "api-reference/rum.openapi.zh.json", + "pages": [ + { + "group": "应用管理", + "icon": "mobile-screen-button", + "pages": [ + "POST /rum/application/list", + "POST /rum/application/info", + "POST /rum/application/infos", + "POST /rum/application/create", + "POST /rum/application/update", + "POST /rum/application/delete" + ] + }, + { + "group": "RUM 问题跟踪", + "icon": "bug", + "pages": [ + "POST /rum/issue/list", + "POST /rum/issue/info", + "POST /rum/issue/update" + ] + }, + { + "group": "RUM Sourcemap", + "icon": "map", + "pages": [ + "POST /sourcemap/list" + ] + } + ] + }, + { + "group": "平台", + "icon": "gear", + "openapi": "api-reference/platform.openapi.zh.json", + "pages": [ + { + "group": "成员管理", + "icon": "users", + "pages": [ + "POST /member/info", + "POST /member/list", + "POST /member/delete", + "POST /member/invite", + "POST /member/role/grant", + "POST /member/role/revoke", + "POST /member/role/update", + "POST /member/info/reset", + "POST /person/infos" + ] + }, + { + "group": "团队管理", + "icon": "users-line", + "pages": [ + "POST /team/info", + "POST /team/infos", + "POST /team/list", + "POST /team/upsert", + "POST /team/delete" + ] + }, + { + "group": "角色与权限", + "icon": "user-shield", + "pages": [ + "POST /role/info", + "POST /role/list", + "POST /role/upsert", + "POST /role/enable", + "POST /role/disable", + "POST /role/delete", + "POST /role/permission/list", + "POST /role/permission/factor/list", + "POST /role/member/grant", + "POST /role/member/revoke" + ] + }, + { + "group": "审计日志", + "icon": "scroll", + "pages": [ + "POST /audit/search", + "POST /audit/operation/list" + ] + } + ] + } + ] } ] }, @@ -458,6 +971,7 @@ "groups": [ { "group": "Home", + "icon": "house", "pages": [ "en/home", "en/statuspage" @@ -465,6 +979,7 @@ }, { "group": "Products", + "icon": "cubes", "pages": [ "en/on-call", "en/rum", @@ -473,6 +988,7 @@ }, { "group": "Platform", + "icon": "sliders", "pages": [ "en/platform/pricing", "en/platform/team-members", @@ -483,6 +999,7 @@ }, { "group": "Developer", + "icon": "code", "pages": [ "en/developer/overview", "en/openapi", @@ -492,6 +1009,7 @@ }, { "group": "Compliance", + "icon": "scale-balanced", "pages": [ "en/compliance/terms-of-service", "en/compliance/user-agreement", @@ -501,6 +1019,7 @@ }, { "group": "Changelog", + "icon": "clock-rotate-left", "pages": [ "en/changelog/changelog" ] @@ -513,6 +1032,7 @@ "groups": [ { "group": "Quick Start", + "icon": "rocket", "pages": [ "en/on-call/quickstart/quickstart", "en/on-call/quickstart/faq", @@ -521,6 +1041,7 @@ }, { "group": "Channels", + "icon": "comments", "pages": [ "en/on-call/channel/create-edit", "en/on-call/channel/integrate-data", @@ -530,6 +1051,7 @@ }, { "group": "Incident Management", + "icon": "triangle-exclamation", "pages": [ "en/on-call/incident/what-is-incident", "en/on-call/incident/search-view-incident", @@ -543,6 +1065,7 @@ }, { "group": "Post-Mortem", + "icon": "clipboard-check", "pages": [ "en/on-call/post-mortem/what-is-post-mortem", "en/on-call/post-mortem/create-edit-post-mortem", @@ -552,6 +1075,7 @@ }, { "group": "Status Page", + "icon": "signal", "pages": [ "en/on-call/statuspage/statuspage", "en/on-call/statuspage/create-manage-page", @@ -563,12 +1087,14 @@ }, { "group": "Analytics", + "icon": "chart-pie", "pages": [ "en/on-call/analytics/insights" ] }, { "group": "Integration Settings", + "icon": "sliders", "pages": [ "en/on-call/integration/alert-integration/label-enhancement", "en/on-call/integration/alert-integration/alert-pipelines", @@ -577,6 +1103,7 @@ }, { "group": "Configuration", + "icon": "gear", "pages": [ "en/on-call/configuration/schedule", "en/on-call/configuration/service-calendar", @@ -589,6 +1116,7 @@ }, { "group": "Advanced", + "icon": "wand-magic-sparkles", "pages": [ "en/on-call/advanced/reference-variables", "en/on-call/advanced/dynamic-notifications", @@ -597,62 +1125,62 @@ }, { "group": "Integrations", + "icon": "puzzle-piece", "pages": [ { "group": "Alert Integration", "expanded": false, "pages": [ - "en/on-call/integration/alert-integration/alert-sources/standard alert", - "en/on-call/integration/alert-integration/alert-sources/prometheus", - "en/on-call/integration/alert-integration/alert-sources/grafana", - "en/on-call/integration/alert-integration/alert-sources/zabbix", - "en/on-call/integration/alert-integration/alert-sources/flashcat", - "en/on-call/integration/alert-integration/alert-sources/open-falcon", - "en/on-call/integration/alert-integration/alert-sources/uptime-kuma", - "en/on-call/integration/alert-integration/alert-sources/influxdata", - "en/on-call/integration/alert-integration/alert-sources/graylog", - "en/on-call/integration/alert-integration/alert-sources/skywalking", - "en/on-call/integration/alert-integration/alert-sources/elastalert2", - "en/on-call/integration/alert-integration/alert-sources/keep", - "en/on-call/integration/alert-integration/alert-sources/aliyun-arms", - "en/on-call/integration/alert-integration/alert-sources/aliyun-cm-event", - "en/on-call/integration/alert-integration/alert-sources/aliyun-cm-metrics", - "en/on-call/integration/alert-integration/alert-sources/aliyun-sls", - "en/on-call/integration/alert-integration/alert-sources/aliyun-prometheus", - "en/on-call/integration/alert-integration/alert-sources/aws-cloudwatch", - "en/on-call/integration/alert-integration/alert-sources/aws-eventbridge", - "en/on-call/integration/alert-integration/alert-sources/tencent-cls", - "en/on-call/integration/alert-integration/alert-sources/tencent-cm", - "en/on-call/integration/alert-integration/alert-sources/tencent-eventbridge", - "en/on-call/integration/alert-integration/alert-sources/huawei-ces", - "en/on-call/integration/alert-integration/alert-sources/huawei-lts", - "en/on-call/integration/alert-integration/alert-sources/huawei-apm", - "en/on-call/integration/alert-integration/alert-sources/volcengine-cm-metrics", - "en/on-call/integration/alert-integration/alert-sources/volcengine-cm-event", - "en/on-call/integration/alert-integration/alert-sources/volcengine-tls", - "en/on-call/integration/alert-integration/alert-sources/pagerduty", - "en/on-call/integration/alert-integration/alert-sources/dynatrace", - "en/on-call/integration/alert-integration/alert-sources/appdynamics", - "en/on-call/integration/alert-integration/alert-sources/solarwinds", - "en/on-call/integration/alert-integration/alert-sources/splunk", - "en/on-call/integration/alert-integration/alert-sources/sentry", - "en/on-call/integration/alert-integration/alert-sources/opmanager", - "en/on-call/integration/alert-integration/alert-sources/blueking", - "en/on-call/integration/alert-integration/alert-sources/guance", - "en/on-call/integration/alert-integration/alert-sources/jiankongbao", - "en/on-call/integration/alert-integration/alert-sources/oceanbase", - "en/on-call/integration/alert-integration/alert-sources/zilliz", - "en/on-call/integration/alert-integration/alert-sources/zstack", - "en/on-call/integration/alert-integration/alert-sources/cloudflare", - "en/on-call/integration/alert-integration/alert-sources/meraki", - "en/on-call/integration/alert-integration/alert-sources/monit", - "en/on-call/integration/alert-integration/alert-sources/harbor", - "en/on-call/integration/alert-integration/alert-sources/ucloud-cloudwatch", - "en/on-call/integration/alert-integration/alert-sources/jdcloud", - "en/on-call/integration/alert-integration/alert-sources/volcengine-rtc", - "en/on-call/integration/alert-integration/alert-sources/nagios", - "en/on-call/integration/alert-integration/alert-sources/label-mapping-api" - + "en/on-call/integration/alert-integration/alert-sources/standard alert", + "en/on-call/integration/alert-integration/alert-sources/prometheus", + "en/on-call/integration/alert-integration/alert-sources/grafana", + "en/on-call/integration/alert-integration/alert-sources/zabbix", + "en/on-call/integration/alert-integration/alert-sources/flashcat", + "en/on-call/integration/alert-integration/alert-sources/open-falcon", + "en/on-call/integration/alert-integration/alert-sources/uptime-kuma", + "en/on-call/integration/alert-integration/alert-sources/influxdata", + "en/on-call/integration/alert-integration/alert-sources/graylog", + "en/on-call/integration/alert-integration/alert-sources/skywalking", + "en/on-call/integration/alert-integration/alert-sources/elastalert2", + "en/on-call/integration/alert-integration/alert-sources/keep", + "en/on-call/integration/alert-integration/alert-sources/aliyun-arms", + "en/on-call/integration/alert-integration/alert-sources/aliyun-cm-event", + "en/on-call/integration/alert-integration/alert-sources/aliyun-cm-metrics", + "en/on-call/integration/alert-integration/alert-sources/aliyun-sls", + "en/on-call/integration/alert-integration/alert-sources/aliyun-prometheus", + "en/on-call/integration/alert-integration/alert-sources/aws-cloudwatch", + "en/on-call/integration/alert-integration/alert-sources/aws-eventbridge", + "en/on-call/integration/alert-integration/alert-sources/tencent-cls", + "en/on-call/integration/alert-integration/alert-sources/tencent-cm", + "en/on-call/integration/alert-integration/alert-sources/tencent-eventbridge", + "en/on-call/integration/alert-integration/alert-sources/huawei-ces", + "en/on-call/integration/alert-integration/alert-sources/huawei-lts", + "en/on-call/integration/alert-integration/alert-sources/huawei-apm", + "en/on-call/integration/alert-integration/alert-sources/volcengine-cm-metrics", + "en/on-call/integration/alert-integration/alert-sources/volcengine-cm-event", + "en/on-call/integration/alert-integration/alert-sources/volcengine-tls", + "en/on-call/integration/alert-integration/alert-sources/pagerduty", + "en/on-call/integration/alert-integration/alert-sources/dynatrace", + "en/on-call/integration/alert-integration/alert-sources/appdynamics", + "en/on-call/integration/alert-integration/alert-sources/solarwinds", + "en/on-call/integration/alert-integration/alert-sources/splunk", + "en/on-call/integration/alert-integration/alert-sources/sentry", + "en/on-call/integration/alert-integration/alert-sources/opmanager", + "en/on-call/integration/alert-integration/alert-sources/blueking", + "en/on-call/integration/alert-integration/alert-sources/guance", + "en/on-call/integration/alert-integration/alert-sources/jiankongbao", + "en/on-call/integration/alert-integration/alert-sources/oceanbase", + "en/on-call/integration/alert-integration/alert-sources/zilliz", + "en/on-call/integration/alert-integration/alert-sources/zstack", + "en/on-call/integration/alert-integration/alert-sources/cloudflare", + "en/on-call/integration/alert-integration/alert-sources/meraki", + "en/on-call/integration/alert-integration/alert-sources/monit", + "en/on-call/integration/alert-integration/alert-sources/harbor", + "en/on-call/integration/alert-integration/alert-sources/ucloud-cloudwatch", + "en/on-call/integration/alert-integration/alert-sources/jdcloud", + "en/on-call/integration/alert-integration/alert-sources/volcengine-rtc", + "en/on-call/integration/alert-integration/alert-sources/nagios", + "en/on-call/integration/alert-integration/alert-sources/label-mapping-api" ] }, { @@ -706,6 +1234,7 @@ "groups": [ { "group": "Quick Start", + "icon": "rocket", "pages": [ "en/rum/quickstart/quickstart", "en/rum/quickstart/app-management" @@ -713,6 +1242,7 @@ }, { "group": "Analytics", + "icon": "chart-pie", "pages": [ "en/rum/analytics/web", "en/rum/analytics/native" @@ -720,6 +1250,7 @@ }, { "group": "SDK Integration", + "icon": "code", "pages": [ { "group": "Web", @@ -755,6 +1286,7 @@ }, { "group": "Performance", + "icon": "gauge-high", "pages": [ "en/rum/performance/overview", "en/rum/performance/metrics-reporting", @@ -764,6 +1296,7 @@ }, { "group": "Error Tracking", + "icon": "bug", "pages": [ "en/rum/error-tracking/overview", { @@ -783,6 +1316,7 @@ }, { "group": "Explorer", + "icon": "magnifying-glass", "pages": [ "en/rum/explorer/overview", "en/rum/explorer/data-query" @@ -790,6 +1324,7 @@ }, { "group": "Session Replay", + "icon": "circle-play", "pages": [ "en/rum/session-replay/overview", "en/rum/session-replay/sdk-config", @@ -799,6 +1334,7 @@ }, { "group": "Best Practices", + "icon": "lightbulb", "pages": [ "en/rum/best-practices/distributed-tracing", "en/rum/best-practices/alert-noise-reduction" @@ -806,6 +1342,7 @@ }, { "group": "Others", + "icon": "ellipsis", "pages": [ "en/rum/others/glossary", "en/rum/others/data-collection", @@ -820,18 +1357,21 @@ "groups": [ { "group": "Quick Start", + "icon": "rocket", "pages": [ "en/monitors/quickstart/quickstart" ] }, { "group": "Data Sources", + "icon": "database", "pages": [ "en/monitors/data-sources/data-sources" ] }, { "group": "Alert Engine", + "icon": "gears", "pages": [ "en/monitors/engine/engine", "en/monitors/engine/engine-lost-alert" @@ -839,6 +1379,7 @@ }, { "group": "Alert Rules", + "icon": "list-check", "pages": [ "en/monitors/alert-rules/prometheus", "en/monitors/alert-rules/elasticsearch", @@ -853,29 +1394,513 @@ }, { "group": "Active Alerts", + "icon": "bell", "pages": [ "en/monitors/alert-rules/active-alerts" ] }, { "group": "Rule Repository", + "icon": "box-archive", "pages": [ "en/monitors/rule-repository/rule-repository" ] }, { "group": "Folder Management", + "icon": "folder-open", "pages": [ "en/monitors/folders/folders" ] }, { "group": "FAQ", + "icon": "circle-question", "pages": [ "en/monitors/faq/faq" ] } ] + }, + { + "tab": "API Reference", + "icon": "terminal", + "hidden": true, + "groups": [ + { + "group": "Developer Guide", + "icon": "book-open", + "pages": [ + "en/openapi/introduction", + "en/openapi/api-catalog", + "en/openapi/pagination" + ] + }, + { + "group": "On-call", + "icon": "light-emergency-on", + "openapi": "api-reference/on-call.openapi.en.json", + "pages": [ + { + "group": "Incidents", + "icon": "siren-on", + "pages": [ + { + "group": "Incident info", + "icon": "circle-info", + "pages": [ + "POST /incident/list", + "POST /incident/info", + "POST /incident/list-by-ids", + "POST /incident/alert/list", + "POST /incident/feed", + "POST /incident/past/list", + "POST /incident/reset", + "POST /incident/comment", + "POST /incident/field/reset", + "POST /incident/custom-action/do" + ] + }, + { + "group": "Status lifecycle", + "icon": "timeline", + "pages": [ + "POST /incident/create", + "POST /incident/ack", + "POST /incident/unack", + "POST /incident/resolve", + "POST /incident/reopen", + "POST /incident/snooze", + "POST /incident/wake", + "POST /incident/merge", + "POST /incident/disable-merge", + "POST /incident/remove", + "POST /incident/assign", + "POST /incident/responder/add" + ] + }, + { + "group": "War room", + "icon": "shield-halved", + "pages": [ + "POST /incident/war-room/detail", + "POST /incident/war-room/list", + "POST /incident/war-room/create", + "POST /incident/war-room/delete" + ] + }, + { + "group": "Post-mortem", + "icon": "file-lines", + "pages": [ + "GET /incident/post-mortem/info", + "POST /incident/post-mortem/list", + "POST /incident/post-mortem/delete" + ] + } + ] + }, + { + "group": "Channels", + "icon": "comments", + "pages": [ + "POST /channel/info", + "POST /channel/list", + "POST /channel/infos", + "POST /channel/create", + "POST /channel/update", + "POST /channel/delete", + "POST /channel/enable", + "POST /channel/disable", + { + "group": "Escalation rules", + "icon": "arrow-up-right-dots", + "pages": [ + "POST /channel/escalate/rule/info", + "POST /channel/escalate/rule/list", + "POST /channel/escalate/rule/create", + "POST /channel/escalate/rule/update", + "POST /channel/escalate/rule/delete", + "POST /channel/escalate/rule/enable", + "POST /channel/escalate/rule/disable" + ] + }, + { + "group": "Silence rules", + "icon": "bell-slash", + "pages": [ + "POST /channel/silence/rule/list", + "POST /channel/silence/rule/create", + "POST /channel/silence/rule/update", + "POST /channel/silence/rule/delete", + "POST /channel/silence/rule/enable", + "POST /channel/silence/rule/disable" + ] + }, + { + "group": "Inhibit rules", + "icon": "volume-xmark", + "pages": [ + "POST /channel/inhibit/rule/list", + "POST /channel/inhibit/rule/create", + "POST /channel/inhibit/rule/update", + "POST /channel/inhibit/rule/delete", + "POST /channel/inhibit/rule/enable", + "POST /channel/inhibit/rule/disable" + ] + }, + { + "group": "Notify rules", + "icon": "bell", + "pages": [ + "POST /channel/notify/rule/list", + "POST /channel/notify/rule/create", + "POST /channel/notify/rule/update", + "POST /channel/notify/rule/delete", + "POST /channel/notify/rule/enable", + "POST /channel/notify/rule/disable" + ] + }, + { + "group": "Drop rules", + "icon": "filter-circle-xmark", + "pages": [ + "POST /channel/unsubscribe/rule/list", + "POST /channel/unsubscribe/rule/create", + "POST /channel/unsubscribe/rule/update", + "POST /channel/unsubscribe/rule/delete", + "POST /channel/unsubscribe/rule/enable", + "POST /channel/unsubscribe/rule/disable" + ] + } + ] + }, + { + "group": "Alerts", + "icon": "bell", + "pages": [ + "POST /alert/list", + "POST /alert/info", + "POST /alert/list-by-ids", + "POST /alert/event/list", + "POST /alert/feed", + "POST /alert/merge", + "POST /alert/pipeline/info", + "POST /alert/pipeline/list", + "POST /alert/pipeline/upsert", + "POST /alert-event/list" + ] + }, + { + "group": "Integrations", + "icon": "plug", + "pages": [ + "POST /webhook/history/list", + "POST /webhook/history/detail" + ] + }, + { + "group": "Routing rules", + "icon": "shuffle", + "pages": [ + "POST /route/info", + "POST /route/list", + "POST /route/upsert" + ] + }, + { + "group": "Schedules", + "icon": "calendar-days", + "pages": [ + "POST /schedule/create", + "POST /schedule/update", + "POST /schedule/preview", + "POST /schedule/delete", + "POST /schedule/info", + "POST /schedule/list", + "POST /schedule/self", + "POST /schedule/infos" + ] + }, + { + "group": "Calendars", + "icon": "calendar", + "pages": [ + "POST /calendar/create", + "POST /calendar/update", + "POST /calendar/delete", + "POST /calendar/info", + "POST /calendar/list", + { + "group": "Calendar events", + "icon": "calendar-plus", + "pages": [ + "POST /calendar/event/upsert", + "POST /calendar/event/delete", + "POST /calendar/event/list" + ] + } + ] + }, + { + "group": "Notification templates", + "icon": "envelope-open-text", + "pages": [ + "POST /template/info", + "POST /template/list", + "POST /template/create", + "POST /template/update", + "POST /template/delete" + ] + }, + { + "group": "Alert enrichment", + "icon": "tags", + "pages": [ + "POST /enrichment/info", + "POST /enrichment/list", + "POST /enrichment/upsert", + { + "group": "Mapping schemas", + "icon": "table-columns", + "pages": [ + "POST /enrichment/mapping/schema/list", + "POST /enrichment/mapping/schema/info", + "POST /enrichment/mapping/schema/create", + "POST /enrichment/mapping/schema/update", + "POST /enrichment/mapping/schema/delete" + ] + }, + { + "group": "Mapping data", + "icon": "table", + "pages": [ + "POST /enrichment/mapping/data/list", + "POST /enrichment/mapping/data/upsert", + "POST /enrichment/mapping/data/delete", + "POST /enrichment/mapping/data/truncate", + "POST /enrichment/mapping/data/upload", + "POST /enrichment/mapping/data/download" + ] + }, + { + "group": "Mapping API sources", + "icon": "cloud-arrow-down", + "pages": [ + "POST /enrichment/mapping/api/list", + "POST /enrichment/mapping/api/info", + "POST /enrichment/mapping/api/create", + "POST /enrichment/mapping/api/update", + "POST /enrichment/mapping/api/delete" + ] + } + ] + }, + { + "group": "Analytics", + "icon": "chart-line", + "pages": [ + "POST /insight/alert/topk-by-label", + "POST /insight/account", + "POST /insight/incident/list", + "POST /insight/incident/export", + "POST /insight/channel", + "POST /insight/channel/export", + "POST /insight/team", + "POST /insight/team/export", + "POST /insight/responder", + "POST /insight/responder/export" + ] + }, + { + "group": "Status pages", + "icon": "signal-stream", + "pages": [ + { + "group": "Changes", + "icon": "newspaper", + "pages": [ + "GET /status-page/change/info", + "GET /status-page/change/list", + "POST /status-page/change/create", + "POST /status-page/change/update", + "POST /status-page/change/delete", + "POST /status-page/change/timeline/create", + "POST /status-page/change/timeline/update", + "POST /status-page/change/timeline/delete" + ] + }, + { + "group": "Subscribers", + "icon": "envelope", + "pages": [ + "GET /status-page/subscriber/list", + "POST /status-page/subscriber/import", + "POST /status-page/subscriber/export" + ] + }, + { + "group": "Migration", + "icon": "truck-moving", + "pages": [ + "POST /status-page/migrate-structure", + "POST /status-page/migrate-email-subscribers", + "GET /status-page/migration/status", + "POST /status-page/migration/cancel" + ] + } + ] + } + ] + }, + { + "group": "Monitors", + "icon": "chart-area", + "openapi": "api-reference/monitors.openapi.en.json", + "pages": [ + { + "group": "Alert rules", + "icon": "diamond-exclamation", + "pages": [ + "POST /monit/rule/list/basic", + "POST /monit/rule/info", + "POST /monit/rule/create", + "POST /monit/rule/update", + "POST /monit/rule/delete", + "POST /monit/rule/delete/batch", + "POST /monit/rule/update/fields", + "POST /monit/rule/import", + "POST /monit/rule/export", + "POST /monit/rule/move", + "POST /monit/rule/status", + "POST /monit/rule/audits", + "POST /monit/rule/audit/detail", + "POST /monit/rule/dstypes", + "POST /monit/rule/counter/total", + "POST /monit/rule/counter/node", + "POST /monit/rule/counter/channel", + "POST /monit/rule/counter/status" + ] + }, + { + "group": "Data sources", + "icon": "database", + "pages": [ + "POST /monit/datasource/list", + "POST /monit/datasource/info", + "POST /monit/datasource/create", + "POST /monit/datasource/update", + "POST /monit/datasource/delete", + "POST /monit/datasource/sls/projects", + "POST /monit/datasource/sls/logstores" + ] + }, + { + "group": "Rule sets", + "icon": "books", + "pages": [ + "POST /monit/store/ruleset/list", + "POST /monit/store/ruleset/info", + "POST /monit/store/ruleset/create", + "POST /monit/store/ruleset/update", + "POST /monit/store/ruleset/delete" + ] + } + ] + }, + { + "group": "RUM", + "icon": "monitor-waveform", + "openapi": "api-reference/rum.openapi.en.json", + "pages": [ + { + "group": "Applications", + "icon": "mobile-screen-button", + "pages": [ + "POST /rum/application/list", + "POST /rum/application/info", + "POST /rum/application/infos", + "POST /rum/application/create", + "POST /rum/application/update", + "POST /rum/application/delete" + ] + }, + { + "group": "Issues", + "icon": "bug", + "pages": [ + "POST /rum/issue/list", + "POST /rum/issue/info", + "POST /rum/issue/update" + ] + }, + { + "group": "Sourcemaps", + "icon": "map", + "pages": [ + "POST /sourcemap/list" + ] + } + ] + }, + { + "group": "Platform", + "icon": "gear", + "openapi": "api-reference/platform.openapi.en.json", + "pages": [ + { + "group": "Members", + "icon": "users", + "pages": [ + "POST /member/info", + "POST /member/list", + "POST /member/delete", + "POST /member/invite", + "POST /member/role/grant", + "POST /member/role/revoke", + "POST /member/role/update", + "POST /member/info/reset", + "POST /person/infos" + ] + }, + { + "group": "Teams", + "icon": "users-line", + "pages": [ + "POST /team/info", + "POST /team/infos", + "POST /team/list", + "POST /team/upsert", + "POST /team/delete" + ] + }, + { + "group": "Roles & permissions", + "icon": "user-shield", + "pages": [ + "POST /role/info", + "POST /role/list", + "POST /role/upsert", + "POST /role/enable", + "POST /role/disable", + "POST /role/delete", + "POST /role/permission/list", + "POST /role/permission/factor/list", + "POST /role/member/grant", + "POST /role/member/revoke" + ] + }, + { + "group": "Audit logs", + "icon": "scroll", + "pages": [ + "POST /audit/search", + "POST /audit/operation/list" + ] + } + ] + } + ] } ] } @@ -887,6 +1912,12 @@ } }, "navbar": { + "links": [ + { + "label": "API Reference", + "href": "/zh/openapi/introduction" + } + ], "primary": { "type": "button", "label": "Console", diff --git a/en/home.mdx b/en/home.mdx index 01d280c..85a093d 100644 --- a/en/home.mdx +++ b/en/home.mdx @@ -115,6 +115,24 @@ A unified monitoring management platform that aggregates data from multiple sour --- +## Developers + +Integrate Flashduty through Open API and Webhooks for automation and custom development. + + + + Authentication, request specs, error handling + + + All 214 endpoints organized by module + + + Traditional and cursor pagination + + + +--- + ## Contact Us diff --git a/en/openapi/api-catalog.mdx b/en/openapi/api-catalog.mdx new file mode 100644 index 0000000..2560756 --- /dev/null +++ b/en/openapi/api-catalog.mdx @@ -0,0 +1,345 @@ +--- +title: "API Catalog" +description: "Complete list of Flashduty Open API endpoints, organized by product module with links to detailed documentation" +--- + +Flashduty Open API provides **214** endpoints covering four major modules: On-call, Monitors, RUM, 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 + +| Method | Endpoint | Description | +| :--- | :--- | :--- | +| POST | [`/incident/list`](/en/api-reference/on-call/incidents/incident-list) | Query incident list | +| POST | [`/incident/info`](/en/api-reference/on-call/incidents/incident-info) | Get incident details | +| POST | [`/incident/list-by-ids`](/en/api-reference/on-call/incidents/incident-list-by-ids) | Batch query incidents | +| POST | [`/incident/create`](/en/api-reference/on-call/incidents/incident-create) | Create an incident | +| POST | [`/incident/ack`](/en/api-reference/on-call/incidents/incident-ack) | Acknowledge an incident | +| POST | [`/incident/unack`](/en/api-reference/on-call/incidents/incident-unack) | Unacknowledge an incident | +| POST | [`/incident/resolve`](/en/api-reference/on-call/incidents/incident-resolve) | Resolve an incident | +| POST | [`/incident/reopen`](/en/api-reference/on-call/incidents/incident-reopen) | Reopen an incident | +| POST | [`/incident/snooze`](/en/api-reference/on-call/incidents/incident-snooze) | Snooze incident notifications | +| POST | [`/incident/wake`](/en/api-reference/on-call/incidents/incident-wake) | Resume incident notifications | +| POST | [`/incident/merge`](/en/api-reference/on-call/incidents/incident-merge) | Merge incidents | +| POST | [`/incident/disable-merge`](/en/api-reference/on-call/incidents/incident-disable-merge) | Disable incident merging | +| POST | [`/incident/remove`](/en/api-reference/on-call/incidents/incident-remove) | Delete an incident | +| POST | [`/incident/assign`](/en/api-reference/on-call/incidents/incident-assign) | Assign an incident | +| POST | [`/incident/responder/add`](/en/api-reference/on-call/incidents/incident-responder-add) | Add incident responders | +| POST | [`/incident/reset`](/en/api-reference/on-call/incidents/incident-reset) | Update incident information | +| POST | [`/incident/comment`](/en/api-reference/on-call/incidents/incident-comment) | Comment on an incident | +| POST | [`/incident/field/reset`](/en/api-reference/on-call/incidents/incident-field-reset) | Update incident custom fields | +| POST | [`/incident/custom-action/do`](/en/api-reference/on-call/incidents/incident-custom-action-do) | Execute a custom action | +| POST | [`/incident/alert/list`](/en/api-reference/on-call/incidents/incident-alert-list) | Query alerts associated with an incident | +| POST | [`/incident/feed`](/en/api-reference/on-call/incidents/incident-feed) | Get incident timeline | +| POST | [`/incident/past/list`](/en/api-reference/on-call/incidents/incident-past-list) | Query historically similar incidents | +| POST | [`/incident/war-room/detail`](/en/api-reference/on-call/incidents/incident-war-room-detail) | Get war room details | +| POST | [`/incident/war-room/list`](/en/api-reference/on-call/incidents/incident-war-room-list) | Query war room list | +| POST | [`/incident/war-room/create`](/en/api-reference/on-call/incidents/incident-war-room-create) | Create a war room | +| POST | [`/incident/war-room/delete`](/en/api-reference/on-call/incidents/incident-war-room-delete) | Delete a war room | +| GET | [`/incident/post-mortem/info`](/en/api-reference/on-call/incidents/incident-post-mortem-info) | Get post-mortem report | +| POST | [`/incident/post-mortem/list`](/en/api-reference/on-call/incidents/incident-post-mortem-list) | Query post-mortem report list | +| POST | [`/incident/post-mortem/delete`](/en/api-reference/on-call/incidents/incident-post-mortem-delete) | Delete a post-mortem report | + +### Channels + +| Method | Endpoint | Description | +| :--- | :--- | :--- | +| POST | [`/channel/info`](/en/api-reference/on-call/channels/channel-info) | Get channel details | +| POST | [`/channel/list`](/en/api-reference/on-call/channels/channel-list) | Query channel list | +| POST | [`/channel/infos`](/en/api-reference/on-call/channels/channel-infos) | Batch get channels | +| POST | [`/channel/create`](/en/api-reference/on-call/channels/channel-create) | Create a channel | +| POST | [`/channel/update`](/en/api-reference/on-call/channels/channel-update) | Update a channel | +| POST | [`/channel/delete`](/en/api-reference/on-call/channels/channel-delete) | Delete a channel | +| POST | [`/channel/enable`](/en/api-reference/on-call/channels/channel-enable) | Enable a channel | +| POST | [`/channel/disable`](/en/api-reference/on-call/channels/channel-disable) | Disable a channel | +| POST | [`/channel/escalate/rule/info`](/en/api-reference/on-call/channels/channel-escalate-rule-info) | Get escalation rule details | +| POST | [`/channel/escalate/rule/list`](/en/api-reference/on-call/channels/channel-escalate-rule-list) | Query escalation rule list | +| POST | [`/channel/escalate/rule/create`](/en/api-reference/on-call/channels/channel-escalate-rule-create) | Create an escalation rule | +| POST | [`/channel/escalate/rule/update`](/en/api-reference/on-call/channels/channel-escalate-rule-update) | Update an escalation rule | +| POST | [`/channel/escalate/rule/delete`](/en/api-reference/on-call/channels/channel-escalate-rule-delete) | Delete an escalation rule | +| POST | [`/channel/escalate/rule/enable`](/en/api-reference/on-call/channels/channel-escalate-rule-enable) | Enable an escalation rule | +| POST | [`/channel/escalate/rule/disable`](/en/api-reference/on-call/channels/channel-escalate-rule-disable) | Disable an escalation rule | +| POST | [`/channel/silence/rule/list`](/en/api-reference/on-call/channels/channel-silence-rule-list) | Query silence rule list | +| POST | [`/channel/silence/rule/create`](/en/api-reference/on-call/channels/channel-silence-rule-create) | Create a silence rule | +| POST | [`/channel/silence/rule/update`](/en/api-reference/on-call/channels/channel-silence-rule-update) | Update a silence rule | +| POST | [`/channel/silence/rule/delete`](/en/api-reference/on-call/channels/channel-silence-rule-delete) | Delete a silence rule | +| POST | [`/channel/silence/rule/enable`](/en/api-reference/on-call/channels/channel-silence-rule-enable) | Enable a silence rule | +| POST | [`/channel/silence/rule/disable`](/en/api-reference/on-call/channels/channel-silence-rule-disable) | Disable a silence rule | +| POST | [`/channel/inhibit/rule/list`](/en/api-reference/on-call/channels/channel-inhibit-rule-list) | Query inhibit rule list | +| POST | [`/channel/inhibit/rule/create`](/en/api-reference/on-call/channels/channel-inhibit-rule-create) | Create an inhibit rule | +| POST | [`/channel/inhibit/rule/update`](/en/api-reference/on-call/channels/channel-inhibit-rule-update) | Update an inhibit rule | +| POST | [`/channel/inhibit/rule/delete`](/en/api-reference/on-call/channels/channel-inhibit-rule-delete) | Delete an inhibit rule | +| POST | [`/channel/inhibit/rule/enable`](/en/api-reference/on-call/channels/channel-inhibit-rule-enable) | Enable an inhibit rule | +| POST | [`/channel/inhibit/rule/disable`](/en/api-reference/on-call/channels/channel-inhibit-rule-disable) | Disable an inhibit rule | +| POST | [`/channel/unsubscribe/rule/list`](/en/api-reference/on-call/channels/channel-unsubscribe-rule-list) | Query drop rule list | +| POST | [`/channel/unsubscribe/rule/create`](/en/api-reference/on-call/channels/channel-unsubscribe-rule-create) | Create a drop rule | +| POST | [`/channel/unsubscribe/rule/update`](/en/api-reference/on-call/channels/channel-unsubscribe-rule-update) | Update a drop rule | +| POST | [`/channel/unsubscribe/rule/delete`](/en/api-reference/on-call/channels/channel-unsubscribe-rule-delete) | Delete a drop rule | +| POST | [`/channel/unsubscribe/rule/enable`](/en/api-reference/on-call/channels/channel-unsubscribe-rule-enable) | Enable a drop rule | +| POST | [`/channel/unsubscribe/rule/disable`](/en/api-reference/on-call/channels/channel-unsubscribe-rule-disable) | Disable a drop rule | +| POST | [`/channel/notify/rule/list`](/en/api-reference/on-call/channels/channel-notify-rule-list) | Query notification rule list | +| POST | [`/channel/notify/rule/create`](/en/api-reference/on-call/channels/channel-notify-rule-create) | Create a notification rule | +| POST | [`/channel/notify/rule/update`](/en/api-reference/on-call/channels/channel-notify-rule-update) | Update a notification rule | +| POST | [`/channel/notify/rule/delete`](/en/api-reference/on-call/channels/channel-notify-rule-delete) | Delete a notification rule | +| POST | [`/channel/notify/rule/enable`](/en/api-reference/on-call/channels/channel-notify-rule-enable) | Enable a notification rule | +| POST | [`/channel/notify/rule/disable`](/en/api-reference/on-call/channels/channel-notify-rule-disable) | Disable a notification rule | + +### Alerts + +| Method | Endpoint | Description | +| :--- | :--- | :--- | +| POST | [`/alert/list`](/en/api-reference/on-call/alerts/alert-read-list) | Query alert list | +| POST | [`/alert/info`](/en/api-reference/on-call/alerts/alert-read-info) | Get alert details | +| POST | [`/alert/list-by-ids`](/en/api-reference/on-call/alerts/alert-read-list-by-ids) | Batch query alerts | +| POST | [`/alert/event/list`](/en/api-reference/on-call/alerts/alert-read-event-list) | Query alert event list | +| POST | [`/alert/feed`](/en/api-reference/on-call/alerts/alert-read-feed) | Query alert activity | +| POST | [`/alert-event/list`](/en/api-reference/on-call/alerts/alert-event-read-list) | Query raw alert event list | +| POST | [`/alert/merge`](/en/api-reference/on-call/alerts/alert-write-merge) | Merge an alert into an incident | +| POST | [`/alert/pipeline/info`](/en/api-reference/on-call/alerts/alert-read-pipeline-info) | Get alert processing rule | +| POST | [`/alert/pipeline/list`](/en/api-reference/on-call/alerts/alert-read-pipeline-list) | Batch query alert processing rules | +| POST | [`/alert/pipeline/upsert`](/en/api-reference/on-call/alerts/alert-write-pipeline-upsert) | Create or update an alert processing rule | + +### Integrations + +| Method | Endpoint | Description | +| :--- | :--- | :--- | +| POST | [`/webhook/history/list`](/en/api-reference/on-call/integrations/webhook-history-list) | Query webhook delivery history | +| POST | [`/webhook/history/detail`](/en/api-reference/on-call/integrations/webhook-history-detail) | Get webhook delivery details | + +### Routing Rules + +| Method | Endpoint | Description | +| :--- | :--- | :--- | +| POST | [`/route/info`](/en/api-reference/on-call/channels/route-info) | Get routing rule details | +| POST | [`/route/list`](/en/api-reference/on-call/channels/route-list) | Query routing rule list | +| POST | [`/route/upsert`](/en/api-reference/on-call/channels/route-upsert) | Create or update a routing rule | + +### Schedules + +| Method | Endpoint | Description | +| :--- | :--- | :--- | +| POST | [`/schedule/list`](/en/api-reference/on-call/schedules/schedule-list) | Query schedule list | +| POST | [`/schedule/info`](/en/api-reference/on-call/schedules/schedule-info) | Get schedule details | +| POST | [`/schedule/infos`](/en/api-reference/on-call/schedules/schedule-infos) | Batch get schedules | +| POST | [`/schedule/create`](/en/api-reference/on-call/schedules/schedule-create) | Create a schedule | +| POST | [`/schedule/update`](/en/api-reference/on-call/schedules/schedule-update) | Update a schedule | +| POST | [`/schedule/delete`](/en/api-reference/on-call/schedules/schedule-delete) | Delete a schedule | +| POST | [`/schedule/preview`](/en/api-reference/on-call/schedules/schedule-preview) | Preview a schedule | +| POST | [`/schedule/self`](/en/api-reference/on-call/schedules/schedule-self) | Query my schedules | + +### Calendars + +| Method | Endpoint | Description | +| :--- | :--- | :--- | +| POST | [`/calendar/list`](/en/api-reference/on-call/calendars/calendar-list) | Query service calendar list | +| POST | [`/calendar/info`](/en/api-reference/on-call/calendars/calendar-info) | Get service calendar details | +| POST | [`/calendar/create`](/en/api-reference/on-call/calendars/calendar-create) | Create a service calendar | +| POST | [`/calendar/update`](/en/api-reference/on-call/calendars/calendar-update) | Update a service calendar | +| POST | [`/calendar/delete`](/en/api-reference/on-call/calendars/calendar-delete) | Delete a service calendar | +| POST | [`/calendar/event/list`](/en/api-reference/on-call/calendars/cal-event-list) | Query calendar event list | +| POST | [`/calendar/event/upsert`](/en/api-reference/on-call/calendars/cal-event-upsert) | Create or update a calendar event | +| POST | [`/calendar/event/delete`](/en/api-reference/on-call/calendars/cal-event-delete) | Delete a calendar event | + +### Notification Templates + +| Method | Endpoint | Description | +| :--- | :--- | :--- | +| POST | [`/template/list`](/en/api-reference/on-call/notification-templates/template-read-list) | Query template list | +| POST | [`/template/info`](/en/api-reference/on-call/notification-templates/template-read-info) | Get template details | +| POST | [`/template/create`](/en/api-reference/on-call/notification-templates/template-write-create) | Create a template | +| POST | [`/template/update`](/en/api-reference/on-call/notification-templates/template-write-update) | Update a template | +| POST | [`/template/delete`](/en/api-reference/on-call/notification-templates/template-write-delete) | Delete a template | + +### Alert Enrichment + +| Method | Endpoint | Description | +| :--- | :--- | :--- | +| POST | [`/enrichment/list`](/en/api-reference/on-call/alert-enrichment/enrichment-read-list) | Batch query enrichment rules | +| POST | [`/enrichment/info`](/en/api-reference/on-call/alert-enrichment/enrichment-read-info) | Get enrichment rule details | +| POST | [`/enrichment/upsert`](/en/api-reference/on-call/alert-enrichment/enrichment-write-upsert) | Create or replace an enrichment rule | +| POST | [`/enrichment/mapping/schema/list`](/en/api-reference/on-call/alert-enrichment/mapping-schema-read-list) | Query mapping rule list | +| POST | [`/enrichment/mapping/schema/info`](/en/api-reference/on-call/alert-enrichment/mapping-schema-read-info) | Get mapping rule details | +| POST | [`/enrichment/mapping/schema/create`](/en/api-reference/on-call/alert-enrichment/mapping-schema-write-create) | Create a mapping rule | +| POST | [`/enrichment/mapping/schema/update`](/en/api-reference/on-call/alert-enrichment/mapping-schema-write-update) | Update a mapping rule | +| POST | [`/enrichment/mapping/schema/delete`](/en/api-reference/on-call/alert-enrichment/mapping-schema-write-delete) | Delete a mapping rule | +| POST | [`/enrichment/mapping/data/list`](/en/api-reference/on-call/alert-enrichment/mapping-data-read-list) | Query mapping data list | +| POST | [`/enrichment/mapping/data/upsert`](/en/api-reference/on-call/alert-enrichment/mapping-data-write-upsert) | Write mapping data | +| POST | [`/enrichment/mapping/data/delete`](/en/api-reference/on-call/alert-enrichment/mapping-data-write-delete) | Delete mapping data | +| POST | [`/enrichment/mapping/data/truncate`](/en/api-reference/on-call/alert-enrichment/mapping-data-write-truncate) | Truncate mapping data | +| POST | [`/enrichment/mapping/data/upload`](/en/api-reference/on-call/alert-enrichment/mapping-data-write-upload) | Upload mapping data via CSV | +| POST | [`/enrichment/mapping/data/download`](/en/api-reference/on-call/alert-enrichment/mapping-data-read-download) | Download mapping data CSV | +| POST | [`/enrichment/mapping/api/list`](/en/api-reference/on-call/alert-enrichment/mapping-api-read-list) | Query mapping API list | +| POST | [`/enrichment/mapping/api/info`](/en/api-reference/on-call/alert-enrichment/mapping-api-read-info) | Get mapping API details | +| POST | [`/enrichment/mapping/api/create`](/en/api-reference/on-call/alert-enrichment/mapping-api-write-create) | Create a mapping API | +| POST | [`/enrichment/mapping/api/update`](/en/api-reference/on-call/alert-enrichment/mapping-api-write-update) | Update a mapping API | +| POST | [`/enrichment/mapping/api/delete`](/en/api-reference/on-call/alert-enrichment/mapping-api-write-delete) | Delete a mapping API | + +### Analytics + +| Method | Endpoint | Description | +| :--- | :--- | :--- | +| POST | [`/insight/account`](/en/api-reference/on-call/analytics/insight-by-account) | View account-level insights | +| POST | [`/insight/team`](/en/api-reference/on-call/analytics/insight-by-team) | View team insights | +| POST | [`/insight/channel`](/en/api-reference/on-call/analytics/insight-by-channel) | View channel insights | +| POST | [`/insight/responder`](/en/api-reference/on-call/analytics/insight-by-responder) | View responder insights | +| POST | [`/insight/incident/list`](/en/api-reference/on-call/analytics/insight-incident-list) | Query insight incident list | +| POST | [`/insight/alert/topk-by-label`](/en/api-reference/on-call/analytics/insight-topk-alerts-by-label) | View Top-K alerts by check/resource | +| POST | [`/insight/incident/export`](/en/api-reference/on-call/analytics/insight-incident-export) | Export insight incidents | +| POST | [`/insight/team/export`](/en/api-reference/on-call/analytics/insight-team-export) | Export team insights | +| POST | [`/insight/channel/export`](/en/api-reference/on-call/analytics/insight-channel-export) | Export channel insights | +| POST | [`/insight/responder/export`](/en/api-reference/on-call/analytics/insight-responder-export) | Export responder insights | + +### Status Pages + +| Method | Endpoint | Description | +| :--- | :--- | :--- | +| GET | [`/status-page/change/list`](/en/api-reference/on-call/status-pages/status-page-change-list) | Query status page event list | +| GET | [`/status-page/change/info`](/en/api-reference/on-call/status-pages/status-page-change-info) | Get status page event details | +| POST | [`/status-page/change/create`](/en/api-reference/on-call/status-pages/status-page-change-create) | Create a status page event | +| POST | [`/status-page/change/update`](/en/api-reference/on-call/status-pages/status-page-change-update) | Update a status page event | +| POST | [`/status-page/change/delete`](/en/api-reference/on-call/status-pages/status-page-change-delete) | Delete a status page event | +| POST | [`/status-page/change/timeline/create`](/en/api-reference/on-call/status-pages/status-page-change-timeline-create) | Create an event timeline | +| POST | [`/status-page/change/timeline/update`](/en/api-reference/on-call/status-pages/status-page-change-timeline-update) | Update an event timeline | +| POST | [`/status-page/change/timeline/delete`](/en/api-reference/on-call/status-pages/status-page-change-timeline-delete) | Delete an event timeline | +| GET | [`/status-page/subscriber/list`](/en/api-reference/on-call/status-pages/status-page-subscriber-list) | Query status page subscriber list | +| POST | [`/status-page/subscriber/import`](/en/api-reference/on-call/status-pages/status-page-subscriber-import) | Batch import subscribers | +| POST | [`/status-page/subscriber/export`](/en/api-reference/on-call/status-pages/status-page-subscriber-export) | Export subscribers | +| POST | [`/status-page/migrate-structure`](/en/api-reference/on-call/status-pages/status-page-migrate-structure) | Migrate status page structure | +| 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 | + + + + + +### Alert Rules + +| Method | Endpoint | Description | +| :--- | :--- | :--- | +| POST | [`/monit/rule/list/basic`](/en/api-reference/monitors/alert-rules/monit-rule-read-list) | Query alert rule list | +| POST | [`/monit/rule/info`](/en/api-reference/monitors/alert-rules/monit-rule-read-info) | Get alert rule details | +| POST | [`/monit/rule/create`](/en/api-reference/monitors/alert-rules/monit-rule-write-create) | Create an alert rule | +| POST | [`/monit/rule/update`](/en/api-reference/monitors/alert-rules/monit-rule-write-update) | Update an alert rule | +| POST | [`/monit/rule/delete`](/en/api-reference/monitors/alert-rules/monit-rule-write-delete) | Delete an alert rule | +| POST | [`/monit/rule/delete/batch`](/en/api-reference/monitors/alert-rules/monit-rule-write-delete-batch) | Batch delete alert rules | +| POST | [`/monit/rule/import`](/en/api-reference/monitors/alert-rules/monit-rule-write-import) | Import alert rules | +| POST | [`/monit/rule/export`](/en/api-reference/monitors/alert-rules/monit-rule-read-export) | Export alert rules | +| POST | [`/monit/rule/move`](/en/api-reference/monitors/alert-rules/monit-rule-write-move) | Move alert rules to a folder | +| POST | [`/monit/rule/update/fields`](/en/api-reference/monitors/alert-rules/monit-rule-write-fields-update) | Batch update rule fields | +| POST | [`/monit/rule/audits`](/en/api-reference/monitors/alert-rules/monit-rule-read-audits) | Query rule change history | +| POST | [`/monit/rule/audit/detail`](/en/api-reference/monitors/alert-rules/monit-rule-read-audit-detail) | View rule audit snapshot | +| POST | [`/monit/rule/counter/total`](/en/api-reference/monitors/alert-rules/monit-rule-read-counter-total) | View rule count time series | +| POST | [`/monit/rule/counter/node`](/en/api-reference/monitors/alert-rules/monit-rule-read-counter-node) | Query rule statistics by folder node | +| POST | [`/monit/rule/counter/status`](/en/api-reference/monitors/alert-rules/monit-rule-read-counter-status) | View top-level folder rule status statistics | +| POST | [`/monit/rule/counter/channel`](/en/api-reference/monitors/alert-rules/monit-rule-read-counter-channel) | Query rule statistics by channel | +| POST | [`/monit/rule/status`](/en/api-reference/monitors/alert-rules/monit-rule-write-status) | View rule trigger status under a folder | +| POST | [`/monit/rule/dstypes`](/en/api-reference/monitors/alert-rules/monit-rule-read-dstypes) | Query available data source types | + +### Data Sources + +| Method | Endpoint | Description | +| :--- | :--- | :--- | +| POST | [`/monit/datasource/list`](/en/api-reference/monitors/data-sources/monit-datasource-read-list) | Query data source list | +| POST | [`/monit/datasource/info`](/en/api-reference/monitors/data-sources/monit-datasource-read-info) | Get data source details | +| POST | [`/monit/datasource/create`](/en/api-reference/monitors/data-sources/monit-datasource-write-create) | Create a data source | +| POST | [`/monit/datasource/update`](/en/api-reference/monitors/data-sources/monit-datasource-write-update) | Update a data source | +| POST | [`/monit/datasource/delete`](/en/api-reference/monitors/data-sources/monit-datasource-write-delete) | Delete a data source | +| POST | [`/monit/datasource/sls/projects`](/en/api-reference/monitors/data-sources/monit-datasource-read-sls-projects) | Query SLS project list | +| POST | [`/monit/datasource/sls/logstores`](/en/api-reference/monitors/data-sources/monit-datasource-read-sls-logstores) | Query SLS logstore list | + +### Rule Sets + +| Method | Endpoint | Description | +| :--- | :--- | :--- | +| POST | [`/monit/store/ruleset/list`](/en/api-reference/monitors/rule-sets/monit-store-ruleset-list) | Query rule set list | +| POST | [`/monit/store/ruleset/info`](/en/api-reference/monitors/rule-sets/monit-store-ruleset-info) | Get rule set details | +| POST | [`/monit/store/ruleset/create`](/en/api-reference/monitors/rule-sets/monit-store-ruleset-create) | Create a rule set | +| POST | [`/monit/store/ruleset/update`](/en/api-reference/monitors/rule-sets/monit-store-ruleset-update) | Update a rule set | +| POST | [`/monit/store/ruleset/delete`](/en/api-reference/monitors/rule-sets/monit-store-ruleset-delete) | Delete a rule set | + + + + + +### Applications + +| Method | Endpoint | Description | +| :--- | :--- | :--- | +| POST | [`/rum/application/list`](/en/api-reference/rum/applications/rum-application-read-list) | Query application list | +| POST | [`/rum/application/info`](/en/api-reference/rum/applications/rum-application-read-info) | Get application details | +| POST | [`/rum/application/infos`](/en/api-reference/rum/applications/rum-application-read-infos) | Batch query application details | +| POST | [`/rum/application/create`](/en/api-reference/rum/applications/rum-application-write-create) | Create an application | +| POST | [`/rum/application/update`](/en/api-reference/rum/applications/rum-application-write-update) | Update an application | +| POST | [`/rum/application/delete`](/en/api-reference/rum/applications/rum-application-write-delete) | Delete an application | + +### Issues + +| Method | Endpoint | Description | +| :--- | :--- | :--- | +| POST | [`/rum/issue/list`](/en/api-reference/rum/issues/rum-issue-read-list) | Query issue list | +| POST | [`/rum/issue/info`](/en/api-reference/rum/issues/rum-issue-read-info) | Get issue details | +| POST | [`/rum/issue/update`](/en/api-reference/rum/issues/rum-issue-write-update) | Update an issue | + +### Sourcemap + +| Method | Endpoint | Description | +| :--- | :--- | :--- | +| POST | [`/sourcemap/list`](/en/api-reference/rum/sourcemaps/sourcemap-read-list) | Query sourcemap list | + + + + + +### Members + +| Method | Endpoint | Description | +| :--- | :--- | :--- | +| POST | [`/member/list`](/en/api-reference/platform/members/member-list) | Query member list | +| POST | [`/member/info`](/en/api-reference/platform/members/member-info) | Get current member info | +| POST | [`/member/invite`](/en/api-reference/platform/members/member-invite) | Invite a member | +| POST | [`/member/delete`](/en/api-reference/platform/members/member-delete) | Delete a member | +| POST | [`/member/info/reset`](/en/api-reference/platform/members/member-reset-info) | Reset member info | +| POST | [`/member/role/update`](/en/api-reference/platform/members/member-update-role) | Update member role | +| POST | [`/member/role/grant`](/en/api-reference/platform/members/member-grant-role) | Grant a role to a member | +| POST | [`/member/role/revoke`](/en/api-reference/platform/members/member-revoke-role) | Revoke a role from a member | +| POST | [`/person/infos`](/en/api-reference/platform/members/person-infos) | Batch get person info | + +### Teams + +| Method | Endpoint | Description | +| :--- | :--- | :--- | +| POST | [`/team/list`](/en/api-reference/platform/teams/team-read-list) | Query team list | +| POST | [`/team/info`](/en/api-reference/platform/teams/team-read-info) | Get team details | +| POST | [`/team/infos`](/en/api-reference/platform/teams/team-read-infos) | Batch get team info | +| POST | [`/team/upsert`](/en/api-reference/platform/teams/team-write-upsert) | Create or update a team | +| POST | [`/team/delete`](/en/api-reference/platform/teams/team-write-delete) | Delete a team | + +### Roles & Permissions + +| Method | Endpoint | Description | +| :--- | :--- | :--- | +| POST | [`/role/list`](/en/api-reference/platform/roles-permissions/role-read-list) | Query role list | +| POST | [`/role/info`](/en/api-reference/platform/roles-permissions/role-read-info) | Get role details | +| POST | [`/role/upsert`](/en/api-reference/platform/roles-permissions/role-write-upsert) | Create or update a role | +| POST | [`/role/delete`](/en/api-reference/platform/roles-permissions/role-write-delete) | Delete a role | +| POST | [`/role/enable`](/en/api-reference/platform/roles-permissions/role-write-enable) | Enable a role | +| POST | [`/role/disable`](/en/api-reference/platform/roles-permissions/role-write-disable) | Disable a role | +| POST | [`/role/permission/list`](/en/api-reference/platform/roles-permissions/role-read-list-permission) | View role permission set | +| POST | [`/role/permission/factor/list`](/en/api-reference/platform/roles-permissions/role-read-list-permission-factor) | View permission factor set | +| POST | [`/role/member/grant`](/en/api-reference/platform/roles-permissions/role-write-grant-role) | Grant account permissions to a member | +| POST | [`/role/member/revoke`](/en/api-reference/platform/roles-permissions/role-write-revoke-role) | Revoke account permissions from a member | + +### Audit Logs + +| Method | Endpoint | Description | +| :--- | :--- | :--- | +| POST | [`/audit/search`](/en/api-reference/platform/audit-logs/audit-read-search) | Search audit logs | +| POST | [`/audit/operation/list`](/en/api-reference/platform/audit-logs/audit-read-operation-list) | View event type list | + + diff --git a/en/openapi/introduction.mdx b/en/openapi/introduction.mdx index 4e6edc5..3b0efdf 100644 --- a/en/openapi/introduction.mdx +++ b/en/openapi/introduction.mdx @@ -3,16 +3,22 @@ title: "Quick Start" description: "Flashduty Open API quick start guide" --- -Open API is used to access and operate Flashduty entity data, such as viewing and managing configurations. Using the API is essentially the same as logging into the [Flashduty Console](https://console.flashcat.cloud) and performing operations through the UI. +Open API lets you call Flashduty via HTTP endpoints to query and manage entity data such as incidents, channels, and schedules. Using the API is essentially the same as logging into the [Flashduty Console](https://console.flashcat.cloud) and performing operations through the UI. -If you want to push alerts from your custom monitoring system to Flashduty, please refer to [Custom Alert Events](/en/on-call/integration/alert-integration/alert-sources/flashcat). - +**Not sure if you need Open API?** Flashduty offers multiple data interaction methods: -## Request Specifications +- **Open API** (this guide) — You actively call Flashduty to query or operate on data. See the [API Catalog](/en/openapi/api-catalog) for all available endpoints. +- **Standard Alert Events** — Push alerts from your custom monitoring system to Flashduty to trigger incident handling. See [Custom Alert Events](/en/on-call/integration/alert-integration/alert-sources/standard alert). +- **Custom Change Events** — Push change events to correlate with incidents for root cause analysis. See [Custom Change Events](/en/on-call/integration/change-integration/custom-event). +- **Webhook Push** — Flashduty proactively pushes incident/alert event notifications to your system. See [Incident Webhook](/en/on-call/integration/webhooks/incident-webhook) and [Alert Webhook](/en/on-call/integration/webhooks/alert-webhook). +- **Custom Actions** — Trigger external operations from the incident detail page. See [Custom Actions](/en/on-call/integration/webhooks/custom-actions). + --- +## Request Specifications + ### Request URL All APIs only accept access via **HTTPS** protocol and have a single Endpoint: @@ -37,8 +43,6 @@ All APIs use **UTF-8** encoding. ## Authentication ---- - All Open APIs use **APP Key** for authentication. ### Obtaining an APP Key @@ -61,23 +65,15 @@ Each APP Key represents an independent user and has all the operational permissi Pass the APP Key as a query string parameter: ```bash -https://api.flashcat.cloud/path?app_key=YOUR_APP_KEY -``` - - -```bash cURL curl -X POST 'https://api.flashcat.cloud/your/api/path?app_key=YOUR_APP_KEY' \ -H 'Content-Type: application/json' \ -d '{"param": "value"}' ``` - --- ## Response Structure ---- - All request responses are in JSON format and follow a unified structure: | Field | Type | Required | Description | @@ -117,5 +113,111 @@ All request responses are in JSON format and follow a unified structure: | Field | Type | Required | Description | | --- | --- | :---: | --- | -| `code` | string | ✅ | Error code, see [Rate Limits](/en/openapi/rate-limits) for details | +| `code` | string | ✅ | Error code, see [Error Code List](#error-code-list) below | | `message` | string | | Error description | + +--- + +## Rate Limits + +### Rate Limits + +To ensure service stability, APIs have rate limits on request frequency. When requests are too frequent, a `429` status code with `RequestTooFrequently` error will be returned. + + +Please control your request frequency reasonably and avoid sending a large number of requests in a short period. It is recommended to implement a retry mechanism with exponential backoff when receiving a 429 error. + + +### Permission Limits + +- Each APP Key inherits all permissions from its creator +- When an operation exceeds permission scope, a `403` status code with `AccessDenied` error will be returned +- It is recommended to create separate APP Keys for different purposes, following the principle of least privilege + +### Error Code List + +| Error Code | HTTP Status | Description | +| --- | :---: | --- | +| `InvalidParameter` | 400 | Parameter error, please check if request parameters are correct | +| `InvalidContentType` | 400 | Content-Type not supported, please use `application/json` | +| `MethodNotAllowed` | 400 | HTTP Method not supported | +| `Unauthorized` | 401 | Authentication failed, please check if the APP Key is correct | +| `AccessDenied` | 403 | Permission denied, current user does not have permission for this operation | +| `RouteNotFound` | 404 | Request Method + Path not matched, please check the API address | +| `RequestTooFrequently` | 429 | Request too frequent, please try again later | +| `ResourceNotFound` | 400 | Account has not purchased resources, please go to the billing center to place an order | +| `NoLicense` | 400 | Account does not have sufficient subscription License, please go to the billing center to upgrade or purchase a subscription | +| `InternalError` | 500 | Internal or unknown error, please contact technical support | + +--- + +## Error Handling Recommendations + + + + **Possible causes**: + - Missing required parameters + - Incorrect parameter format + - Content-Type not set to `application/json` + + **Solution**: + Check request parameters and Headers settings, refer to API documentation for parameter requirements. + + + + **Possible causes**: + - APP Key not provided + - APP Key is incorrect or has expired + + **Solution**: + 1. Confirm that the request URL contains the `app_key` parameter + 2. Go to the console to check if the APP Key is valid + + + + **Possible causes**: + - Current user does not have permission to perform this operation + - The user corresponding to the APP Key has insufficient permissions + + **Solution**: + Contact the account administrator to elevate permissions, or use an APP Key with the appropriate permissions. + + + + **Possible causes**: + - Too many requests sent in a short period + + **Solution**: + 1. Reduce request frequency + 2. Implement exponential backoff retry mechanism + 3. Combine multiple requests (e.g., use batch APIs) + + + + **Possible causes**: + - Server-side internal exception + + **Solution**: + 1. Retry later + 2. If the issue persists, contact technical support and provide the `request_id` + + + +--- + +## Best Practices + + + + For network errors and 5xx errors, it is recommended to implement exponential backoff retry with an initial interval of 1 second and a maximum of 3 retries. + + + Save the `request_id` returned from each request to facilitate troubleshooting and technical support. + + + Do not hardcode APP Key in client code. It is recommended to manage it through environment variables or configuration centers. + + + Regularly replace APP Keys and promptly delete keys that are no longer in use to reduce the risk of leakage. + + diff --git a/en/openapi/pagination.mdx b/en/openapi/pagination.mdx index 597f7ee..e37b3ac 100644 --- a/en/openapi/pagination.mdx +++ b/en/openapi/pagination.mdx @@ -79,8 +79,8 @@ We define pagination technology based on SEARCH_AFTER_CTX as cursor pagination. We provide cursor pagination support in the following APIs: -- [Incident List](https://developer.flashcat.cloud/api-110655782) -- [Alert List](https://developer.flashcat.cloud/api-110655791) +- [Incident List](/en/api-reference/on-call/incidents/incident-list) +- [Alert List](/en/api-reference/on-call/alerts/alert-read-list) ### Request Parameters diff --git a/glossary.md b/glossary.md new file mode 100644 index 0000000..db8cc42 --- /dev/null +++ b/glossary.md @@ -0,0 +1,259 @@ +# Flashduty Terminology Glossary + +Chinese-English terminology mapping. Maintain consistency during translation. + +## Core Concepts + +| Chinese | English | Notes | +|---------|---------|-------| +| 协作空间 | channel | Team workspace | +| 故障 | incident | Event requiring response | +| 告警 / 报警 | alert | Monitoring system notification | +| 集成来源 / 数据源 | integration | Alert data source | + +## Incident Management + +| Chinese | English | +|---------|---------| +| 分派 | assign | +| 分派策略 | escalation rule | +| 故障升级 | escalation | +| 认领 | acknowledge | +| 解决故障 | resolve the incident | +| 关闭故障 | close the incident | +| 新奇故障 | outlier incident | + +## Alert Processing + +| Chinese | English | +|---------|---------| +| 告警风暴 | alert storm | +| 告警聚合 | alert grouping | +| 规则告警聚合 | pattern alert grouping | +| 智能告警聚合 | intelligent alert grouping | +| 静默策略 | silence rule | +| 抑制策略 | inhibit rule | +| 排除规则 | drop rule | +| 快速静默 | quick silence | +| 降噪 | reduce noise | +| 抖动 | flapping | +| 错误聚合 | error grouping | +| 指纹 | fingerprint | + +## Schedule & On-call + +| Chinese | English | +|---------|---------| +| 值班表 | schedule | +| 值班 | schedule | +| 值班轮换 | On-call rotation / On-call shift | +| 处理人员 / 响应人员 / 分派人员 / 值班人员 | responders | + +## Severity Levels + +| Chinese | English | +|---------|---------| +| 严重程度 / 等级 | severity | +| 严重 | critical | +| 一般 | warning | +| 轻微 | info | + +## Incident Status + +| Chinese | English | +|---------|---------| +| 待处理 | triggered | +| 处理中 | processing | +| 未关闭 | open | +| 已关闭 | closed | + +## Time & Notifications + +| Chinese | English | +|---------|---------| +| 暂缓 | snooze | +| 取消暂缓 | unsnooze | +| 触发 / 发生 | trigger | +| 发生时间 / 触发时间 | triggered at | +| 结束时间 | ended at | +| 循环通知 | loop notification | +| 中断次数 | interruption | +| 通知次数 | notifications | +| 时间段 | hours | +| 工作时间 | work | +| 睡眠时间 | sleep | +| 休息时间 | rest | +| 响应投入 | response effort | + +## Subscription & Plans + +| Chinese | English | +|---------|---------| +| 订阅 | plan | +| 专业版 | Pro | +| 标准版 | Standard | +| 免费版 | Free | +| 订阅升级 | plan upgrade | +| 赠送金 | bonus | + +## Account & Team + +| Chinese | English | +|---------|---------| +| 主体 / 主体账号 | owner | +| 成员 / 成员账号 | member | +| 管理团队 | Team | +| 登录 | sign in | +| 登出 | sign out | +| 注册 | sign up | + +## UI & Labels + +| Chinese | English | +|---------|---------| +| 属性 | attribute | +| 标签 | label | +| 详情 | details | +| 告警列表 | Alerts | +| 告警标题 | Title | +| 分析看板 | insights | +| 故障数量 | incidents | +| 常见问题 | FAQ | +| 视频教学 | watch videos | +| 解决办法 | resolution | +| 推送地址 | push URL | +| 跳转链接 | jump link | + +## Actions + +| Chinese | English | +|---------|---------| +| 启用 / 开启 | Enable | +| 禁用 | Disable | +| 删除 | Delete | +| 修改 | change | +| 回复 | reply | +| 聚合 | group | +| 关联 | associated | + +## Third-party Integrations + +| Chinese | English | +|---------|---------| +| 企业微信 / 微信 | WeCom | +| 飞书 | Feishu/Lark | +| 钉钉 | Dingtalk | + +## Technical Terms + +| Chinese | English | +|---------|---------| +| IP段匹配 | CIDR matching | +| 相同项 | equal item | +| 组合规则 | composition rule | +| 中文对照 | alias | +| 环节 | level | +| 输入不能为空 | the field is required | +| 用户未关联 | user not linked | +| 应用未关联 | app not linked | + +## Regional + +| Chinese | English | +|---------|---------| +| 国内 | mainland China | +| 手机号 | phone | +| 邮箱 | email | +| 北京快猫星云科技有限公司 | Beijing Flashcat Cloud Technology Co.,Ltd. | + +## API documentation + +Used by the `api-review` skill when generating `api-reference/openapi.{en,zh}.json`. Stay consistent with these terms across operation summaries, descriptions, and field labels so the reference reads uniformly. + +### Operation verbs (summary prefix) + +| Chinese | English (openapi summary) | Notes | +|---------|----------|-------| +| 查看 xxx 详情 | Get xxx detail | Single-item fetch by ID | +| 查看 xxx 列表 / 获取 xxx 列表 | List xxx | Paginated list | +| 查询 xxx | Query xxx | Filter-based list | +| 创建 xxx | Create an xxx | | +| 新建 xxx | Create an xxx | Same as above — keep English uniform | +| 变更 xxx 信息 / 修改 xxx / 更新 xxx | Update an xxx | | +| 删除 xxx | Delete an xxx | Soft-delete unless noted | +| 启用 xxx | Enable an xxx | | +| 禁用 xxx | Disable an xxx | | +| 预览 xxx | Preview an xxx | | +| 导出 xxx | Export xxx | | +| 导入 xxx | Import xxx | | +| 批量 yyy | Bulk yyy / Batch yyy | Use "bulk" for user-facing, "batch" for technical | +| xxx 操作记录 / 审计记录 | xxx audit log | | + +### Reference / structural terms + +| Chinese | English | +|---------|---------| +| 速率限制 | rate limits | +| 限流 | rate limiting | +| 超过限制 | exceed the limit | +| 账户维度 | account-scoped | +| 账户下 | under the same account | +| 全局限流 | global rate limit | +| 权限要求 | permissions | +| 权限点 | permission | +| 数据权限 | data permission | +| 接口鉴权 | API authentication | +| 需要鉴权 | requires authentication | +| 鉴权失败 | authentication failed | +| 请求头 | request header | +| 查询参数 | query parameter | +| 请求体 / 请求参数 | request body | +| 响应体 / 响应参数 | response body | +| 响应结构 / 响应格式 | response envelope | +| 错误码 | error code | +| 请求 ID | request ID | +| 返回值 | return value | +| 分页 | pagination | +| 分页大小 | page size | +| 排序字段 | sort field | +| 升序 / 降序 | ascending / descending | +| 必填 | required | +| 选填 / 可选 | optional | +| 默认值 | default value | +| 枚举值 | enum values | +| 取值范围 | value range | +| 示例 | example | +| 示例代码 | code sample | +| 软删除 | soft delete | +| 幂等 | idempotent | +| 向后兼容 | backward compatible | +| 废弃 / 已废弃 | deprecated | +| 审计日志 | audit log | +| 高危操作 | high-risk operation | +| 二次验证 | second-factor verification | + +### Permission class names + +Permission classes come from `fc-pgy/logic/permission/permission_test.go` — use the `classEn` field there as the authoritative English label. Common ones: + +| Chinese (`class`) | English (`classEn`) | +|---------|---------| +| 组织管理 | Organization | +| 配置中心 | Configuration | +| 协作空间 | Channel | +| 故障管理 | Incident | +| 告警管理 | Alert | +| 集成中心 | Integration | +| 分析看板 | Insight | +| 状态页 | Status Page | +| RUM | RUM | +| Monitors | Monitors | + +When a permission's `classEn` is set in `permission_test.go`, trust it over any guess. The Flashduty product team manages those labels and keeps them consistent with the console UI. + +### Notes for the generator + +- **Prefer frontend labels over translation.** If the frontend console uses a specific English label for a concept (e.g., "Notification template" vs "Message template"), use the frontend label. Check `fc-foundation-app/src/Packages/saas/pages/...` i18n files as the source of truth for user-facing labels. +- **Don't translate product names.** "On-call", "RUM", "Monitors", "Flashduty" stay English in both languages. +- **Don't translate wire values.** Enum values like `"enabled"`, `"InvalidParameter"`, `"updated_at"` are wire-format identifiers and must appear identically in both EN and ZH specs. Only their descriptions get localized. +- **Verb tense** — English uses imperative ("Create a template", "Delete an incident"), Chinese uses short noun phrases ("创建模板", "删除故障"). Don't prefix Chinese summaries with verbs like "创建一个" when "创建" alone reads naturally. diff --git a/zh/home.mdx b/zh/home.mdx index d1fef35..c6528d1 100644 --- a/zh/home.mdx +++ b/zh/home.mdx @@ -116,6 +116,24 @@ Real User Monitoring(真实用户监控)帮助您了解真实用户如何体 --- +## 开发者 + +通过 Open API 和 Webhook 集成 Flashduty,实现自动化运维和二次开发。 + + + + 认证方式、请求规范、错误处理 + + + 全部 214 个接口,按模块分类 + + + 传统分页与游标分页机制 + + + +--- + ## 联系我们 diff --git a/zh/openapi/api-catalog.mdx b/zh/openapi/api-catalog.mdx new file mode 100644 index 0000000..132c87d --- /dev/null +++ b/zh/openapi/api-catalog.mdx @@ -0,0 +1,345 @@ +--- +title: "API 总览" +description: "Flashduty Open API 全量接口列表,按产品模块分类,点击可跳转到接口详情" +--- + +Flashduty Open API 共提供 **214** 个接口,覆盖 On-call、Monitors、RUM 和平台四大模块。所有接口使用统一的认证方式和请求规范,详见[快速入门](/zh/openapi/introduction)。 + + +所有接口 Endpoint 均为 `https://api.flashcat.cloud`,使用 APP Key 通过 query string 认证。 + + + + +### 故障管理 + +| 方法 | 接口 | 描述 | +| :--- | :--- | :--- | +| POST | [`/incident/list`](/zh/api-reference/on-call/incidents/incident-list) | 查询故障列表 | +| POST | [`/incident/info`](/zh/api-reference/on-call/incidents/incident-info) | 获取故障详情 | +| POST | [`/incident/list-by-ids`](/zh/api-reference/on-call/incidents/incident-list-by-ids) | 批量查询故障 | +| POST | [`/incident/create`](/zh/api-reference/on-call/incidents/incident-create) | 创建故障 | +| POST | [`/incident/ack`](/zh/api-reference/on-call/incidents/incident-ack) | 认领故障 | +| POST | [`/incident/unack`](/zh/api-reference/on-call/incidents/incident-unack) | 取消认领故障 | +| POST | [`/incident/resolve`](/zh/api-reference/on-call/incidents/incident-resolve) | 恢复故障 | +| POST | [`/incident/reopen`](/zh/api-reference/on-call/incidents/incident-reopen) | 重开故障 | +| POST | [`/incident/snooze`](/zh/api-reference/on-call/incidents/incident-snooze) | 暂停故障通知 | +| POST | [`/incident/wake`](/zh/api-reference/on-call/incidents/incident-wake) | 恢复故障通知 | +| POST | [`/incident/merge`](/zh/api-reference/on-call/incidents/incident-merge) | 合并故障 | +| POST | [`/incident/disable-merge`](/zh/api-reference/on-call/incidents/incident-disable-merge) | 禁止故障合并 | +| POST | [`/incident/remove`](/zh/api-reference/on-call/incidents/incident-remove) | 删除故障 | +| POST | [`/incident/assign`](/zh/api-reference/on-call/incidents/incident-assign) | 分派故障 | +| POST | [`/incident/responder/add`](/zh/api-reference/on-call/incidents/incident-responder-add) | 添加故障处理人员 | +| POST | [`/incident/reset`](/zh/api-reference/on-call/incidents/incident-reset) | 更新故障信息 | +| POST | [`/incident/comment`](/zh/api-reference/on-call/incidents/incident-comment) | 评论故障 | +| POST | [`/incident/field/reset`](/zh/api-reference/on-call/incidents/incident-field-reset) | 更新故障自定义字段 | +| POST | [`/incident/custom-action/do`](/zh/api-reference/on-call/incidents/incident-custom-action-do) | 执行自定义操作 | +| POST | [`/incident/alert/list`](/zh/api-reference/on-call/incidents/incident-alert-list) | 查询故障关联告警 | +| POST | [`/incident/feed`](/zh/api-reference/on-call/incidents/incident-feed) | 获取故障时间线 | +| POST | [`/incident/past/list`](/zh/api-reference/on-call/incidents/incident-past-list) | 查询历史相似故障 | +| POST | [`/incident/war-room/detail`](/zh/api-reference/on-call/incidents/incident-war-room-detail) | 获取战情室详情 | +| POST | [`/incident/war-room/list`](/zh/api-reference/on-call/incidents/incident-war-room-list) | 查询战情室列表 | +| POST | [`/incident/war-room/create`](/zh/api-reference/on-call/incidents/incident-war-room-create) | 创建战情室 | +| POST | [`/incident/war-room/delete`](/zh/api-reference/on-call/incidents/incident-war-room-delete) | 删除战情室 | +| GET | [`/incident/post-mortem/info`](/zh/api-reference/on-call/incidents/incident-post-mortem-info) | 获取复盘报告 | +| POST | [`/incident/post-mortem/list`](/zh/api-reference/on-call/incidents/incident-post-mortem-list) | 查询复盘报告列表 | +| POST | [`/incident/post-mortem/delete`](/zh/api-reference/on-call/incidents/incident-post-mortem-delete) | 删除复盘报告 | + +### 协作空间 + +| 方法 | 接口 | 描述 | +| :--- | :--- | :--- | +| POST | [`/channel/info`](/zh/api-reference/on-call/channels/channel-info) | 获取协作空间详情 | +| POST | [`/channel/list`](/zh/api-reference/on-call/channels/channel-list) | 查询协作空间列表 | +| POST | [`/channel/infos`](/zh/api-reference/on-call/channels/channel-infos) | 批量获取协作空间 | +| POST | [`/channel/create`](/zh/api-reference/on-call/channels/channel-create) | 创建协作空间 | +| POST | [`/channel/update`](/zh/api-reference/on-call/channels/channel-update) | 更新协作空间 | +| POST | [`/channel/delete`](/zh/api-reference/on-call/channels/channel-delete) | 删除协作空间 | +| POST | [`/channel/enable`](/zh/api-reference/on-call/channels/channel-enable) | 启用协作空间 | +| POST | [`/channel/disable`](/zh/api-reference/on-call/channels/channel-disable) | 禁用协作空间 | +| POST | [`/channel/escalate/rule/info`](/zh/api-reference/on-call/channels/channel-escalate-rule-info) | 获取分派策略详情 | +| POST | [`/channel/escalate/rule/list`](/zh/api-reference/on-call/channels/channel-escalate-rule-list) | 查询分派策略列表 | +| POST | [`/channel/escalate/rule/create`](/zh/api-reference/on-call/channels/channel-escalate-rule-create) | 创建分派策略 | +| POST | [`/channel/escalate/rule/update`](/zh/api-reference/on-call/channels/channel-escalate-rule-update) | 更新分派策略 | +| POST | [`/channel/escalate/rule/delete`](/zh/api-reference/on-call/channels/channel-escalate-rule-delete) | 删除分派策略 | +| POST | [`/channel/escalate/rule/enable`](/zh/api-reference/on-call/channels/channel-escalate-rule-enable) | 启用分派策略 | +| POST | [`/channel/escalate/rule/disable`](/zh/api-reference/on-call/channels/channel-escalate-rule-disable) | 禁用分派策略 | +| POST | [`/channel/silence/rule/list`](/zh/api-reference/on-call/channels/channel-silence-rule-list) | 查询静默策略列表 | +| POST | [`/channel/silence/rule/create`](/zh/api-reference/on-call/channels/channel-silence-rule-create) | 创建静默策略 | +| POST | [`/channel/silence/rule/update`](/zh/api-reference/on-call/channels/channel-silence-rule-update) | 更新静默策略 | +| POST | [`/channel/silence/rule/delete`](/zh/api-reference/on-call/channels/channel-silence-rule-delete) | 删除静默策略 | +| POST | [`/channel/silence/rule/enable`](/zh/api-reference/on-call/channels/channel-silence-rule-enable) | 启用静默策略 | +| POST | [`/channel/silence/rule/disable`](/zh/api-reference/on-call/channels/channel-silence-rule-disable) | 禁用静默策略 | +| POST | [`/channel/inhibit/rule/list`](/zh/api-reference/on-call/channels/channel-inhibit-rule-list) | 查询抑制策略列表 | +| POST | [`/channel/inhibit/rule/create`](/zh/api-reference/on-call/channels/channel-inhibit-rule-create) | 创建抑制策略 | +| POST | [`/channel/inhibit/rule/update`](/zh/api-reference/on-call/channels/channel-inhibit-rule-update) | 更新抑制策略 | +| POST | [`/channel/inhibit/rule/delete`](/zh/api-reference/on-call/channels/channel-inhibit-rule-delete) | 删除抑制策略 | +| POST | [`/channel/inhibit/rule/enable`](/zh/api-reference/on-call/channels/channel-inhibit-rule-enable) | 启用抑制策略 | +| POST | [`/channel/inhibit/rule/disable`](/zh/api-reference/on-call/channels/channel-inhibit-rule-disable) | 禁用抑制策略 | +| POST | [`/channel/unsubscribe/rule/list`](/zh/api-reference/on-call/channels/channel-unsubscribe-rule-list) | 查询排除规则列表 | +| POST | [`/channel/unsubscribe/rule/create`](/zh/api-reference/on-call/channels/channel-unsubscribe-rule-create) | 创建排除规则 | +| POST | [`/channel/unsubscribe/rule/update`](/zh/api-reference/on-call/channels/channel-unsubscribe-rule-update) | 更新排除规则 | +| POST | [`/channel/unsubscribe/rule/delete`](/zh/api-reference/on-call/channels/channel-unsubscribe-rule-delete) | 删除排除规则 | +| POST | [`/channel/unsubscribe/rule/enable`](/zh/api-reference/on-call/channels/channel-unsubscribe-rule-enable) | 启用排除规则 | +| POST | [`/channel/unsubscribe/rule/disable`](/zh/api-reference/on-call/channels/channel-unsubscribe-rule-disable) | 禁用排除规则 | +| POST | [`/channel/notify/rule/list`](/zh/api-reference/on-call/channels/channel-notify-rule-list) | 查询通知规则列表 | +| POST | [`/channel/notify/rule/create`](/zh/api-reference/on-call/channels/channel-notify-rule-create) | 创建通知规则 | +| POST | [`/channel/notify/rule/update`](/zh/api-reference/on-call/channels/channel-notify-rule-update) | 更新通知规则 | +| POST | [`/channel/notify/rule/delete`](/zh/api-reference/on-call/channels/channel-notify-rule-delete) | 删除通知规则 | +| POST | [`/channel/notify/rule/enable`](/zh/api-reference/on-call/channels/channel-notify-rule-enable) | 启用通知规则 | +| POST | [`/channel/notify/rule/disable`](/zh/api-reference/on-call/channels/channel-notify-rule-disable) | 禁用通知规则 | + +### 告警管理 + +| 方法 | 接口 | 描述 | +| :--- | :--- | :--- | +| POST | [`/alert/list`](/zh/api-reference/on-call/alerts/alert-read-list) | 查询告警列表 | +| POST | [`/alert/info`](/zh/api-reference/on-call/alerts/alert-read-info) | 查看告警详情 | +| POST | [`/alert/list-by-ids`](/zh/api-reference/on-call/alerts/alert-read-list-by-ids) | 批量查询告警 | +| POST | [`/alert/event/list`](/zh/api-reference/on-call/alerts/alert-read-event-list) | 查询告警事件列表 | +| POST | [`/alert/feed`](/zh/api-reference/on-call/alerts/alert-read-feed) | 查询告警动态 | +| POST | [`/alert-event/list`](/zh/api-reference/on-call/alerts/alert-event-read-list) | 查询原始告警事件列表 | +| POST | [`/alert/merge`](/zh/api-reference/on-call/alerts/alert-write-merge) | 将告警合并到故障 | +| POST | [`/alert/pipeline/info`](/zh/api-reference/on-call/alerts/alert-read-pipeline-info) | 查看告警处理规则 | +| POST | [`/alert/pipeline/list`](/zh/api-reference/on-call/alerts/alert-read-pipeline-list) | 批量查询告警处理规则 | +| POST | [`/alert/pipeline/upsert`](/zh/api-reference/on-call/alerts/alert-write-pipeline-upsert) | 创建或更新告警处理规则 | + +### 集成中心 + +| 方法 | 接口 | 描述 | +| :--- | :--- | :--- | +| POST | [`/webhook/history/list`](/zh/api-reference/on-call/integrations/webhook-history-list) | 查询 Webhook 推送历史 | +| POST | [`/webhook/history/detail`](/zh/api-reference/on-call/integrations/webhook-history-detail) | 获取 Webhook 推送详情 | + +### 路由规则 + +| 方法 | 接口 | 描述 | +| :--- | :--- | :--- | +| POST | [`/route/info`](/zh/api-reference/on-call/channels/route-info) | 获取路由规则详情 | +| POST | [`/route/list`](/zh/api-reference/on-call/channels/route-list) | 查询路由规则列表 | +| POST | [`/route/upsert`](/zh/api-reference/on-call/channels/route-upsert) | 创建或更新路由规则 | + +### 值班排班 + +| 方法 | 接口 | 描述 | +| :--- | :--- | :--- | +| POST | [`/schedule/list`](/zh/api-reference/on-call/schedules/schedule-list) | 查询值班表列表 | +| POST | [`/schedule/info`](/zh/api-reference/on-call/schedules/schedule-info) | 获取值班表详情 | +| POST | [`/schedule/infos`](/zh/api-reference/on-call/schedules/schedule-infos) | 批量获取值班表 | +| POST | [`/schedule/create`](/zh/api-reference/on-call/schedules/schedule-create) | 创建值班表 | +| POST | [`/schedule/update`](/zh/api-reference/on-call/schedules/schedule-update) | 更新值班表 | +| POST | [`/schedule/delete`](/zh/api-reference/on-call/schedules/schedule-delete) | 删除值班表 | +| POST | [`/schedule/preview`](/zh/api-reference/on-call/schedules/schedule-preview) | 预览值班表 | +| POST | [`/schedule/self`](/zh/api-reference/on-call/schedules/schedule-self) | 查询我的值班表 | + +### 日历管理 + +| 方法 | 接口 | 描述 | +| :--- | :--- | :--- | +| POST | [`/calendar/list`](/zh/api-reference/on-call/calendars/calendar-list) | 查询服务日历列表 | +| POST | [`/calendar/info`](/zh/api-reference/on-call/calendars/calendar-info) | 获取服务日历详情 | +| POST | [`/calendar/create`](/zh/api-reference/on-call/calendars/calendar-create) | 创建服务日历 | +| POST | [`/calendar/update`](/zh/api-reference/on-call/calendars/calendar-update) | 更新服务日历 | +| POST | [`/calendar/delete`](/zh/api-reference/on-call/calendars/calendar-delete) | 删除服务日历 | +| POST | [`/calendar/event/list`](/zh/api-reference/on-call/calendars/cal-event-list) | 查询日历事件列表 | +| POST | [`/calendar/event/upsert`](/zh/api-reference/on-call/calendars/cal-event-upsert) | 创建或更新日历事件 | +| POST | [`/calendar/event/delete`](/zh/api-reference/on-call/calendars/cal-event-delete) | 删除日历事件 | + +### 通知模板 + +| 方法 | 接口 | 描述 | +| :--- | :--- | :--- | +| POST | [`/template/list`](/zh/api-reference/on-call/notification-templates/template-read-list) | 查询模板列表 | +| POST | [`/template/info`](/zh/api-reference/on-call/notification-templates/template-read-info) | 查看模板详情 | +| POST | [`/template/create`](/zh/api-reference/on-call/notification-templates/template-write-create) | 创建模板 | +| POST | [`/template/update`](/zh/api-reference/on-call/notification-templates/template-write-update) | 更新模板 | +| POST | [`/template/delete`](/zh/api-reference/on-call/notification-templates/template-write-delete) | 删除模板 | + +### 标签增强 + +| 方法 | 接口 | 描述 | +| :--- | :--- | :--- | +| POST | [`/enrichment/list`](/zh/api-reference/on-call/alert-enrichment/enrichment-read-list) | 批量查询富化规则 | +| POST | [`/enrichment/info`](/zh/api-reference/on-call/alert-enrichment/enrichment-read-info) | 查看富化规则 | +| POST | [`/enrichment/upsert`](/zh/api-reference/on-call/alert-enrichment/enrichment-write-upsert) | 创建或替换富化规则 | +| POST | [`/enrichment/mapping/schema/list`](/zh/api-reference/on-call/alert-enrichment/mapping-schema-read-list) | 查询映射规则列表 | +| POST | [`/enrichment/mapping/schema/info`](/zh/api-reference/on-call/alert-enrichment/mapping-schema-read-info) | 查看映射规则详情 | +| POST | [`/enrichment/mapping/schema/create`](/zh/api-reference/on-call/alert-enrichment/mapping-schema-write-create) | 创建映射规则 | +| POST | [`/enrichment/mapping/schema/update`](/zh/api-reference/on-call/alert-enrichment/mapping-schema-write-update) | 更新映射规则 | +| POST | [`/enrichment/mapping/schema/delete`](/zh/api-reference/on-call/alert-enrichment/mapping-schema-write-delete) | 删除映射规则 | +| POST | [`/enrichment/mapping/data/list`](/zh/api-reference/on-call/alert-enrichment/mapping-data-read-list) | 查询映射数据列表 | +| POST | [`/enrichment/mapping/data/upsert`](/zh/api-reference/on-call/alert-enrichment/mapping-data-write-upsert) | 写入映射数据 | +| POST | [`/enrichment/mapping/data/delete`](/zh/api-reference/on-call/alert-enrichment/mapping-data-write-delete) | 删除映射数据 | +| POST | [`/enrichment/mapping/data/truncate`](/zh/api-reference/on-call/alert-enrichment/mapping-data-write-truncate) | 清空映射数据 | +| POST | [`/enrichment/mapping/data/upload`](/zh/api-reference/on-call/alert-enrichment/mapping-data-write-upload) | 通过 CSV 上传映射数据 | +| POST | [`/enrichment/mapping/data/download`](/zh/api-reference/on-call/alert-enrichment/mapping-data-read-download) | 下载映射数据 CSV | +| POST | [`/enrichment/mapping/api/list`](/zh/api-reference/on-call/alert-enrichment/mapping-api-read-list) | 查询映射 API 列表 | +| POST | [`/enrichment/mapping/api/info`](/zh/api-reference/on-call/alert-enrichment/mapping-api-read-info) | 查看映射 API 详情 | +| POST | [`/enrichment/mapping/api/create`](/zh/api-reference/on-call/alert-enrichment/mapping-api-write-create) | 创建映射 API | +| POST | [`/enrichment/mapping/api/update`](/zh/api-reference/on-call/alert-enrichment/mapping-api-write-update) | 更新映射 API | +| POST | [`/enrichment/mapping/api/delete`](/zh/api-reference/on-call/alert-enrichment/mapping-api-write-delete) | 删除映射 API | + +### 分析看板 + +| 方法 | 接口 | 描述 | +| :--- | :--- | :--- | +| POST | [`/insight/account`](/zh/api-reference/on-call/analytics/insight-by-account) | 查看账户级别洞察 | +| POST | [`/insight/team`](/zh/api-reference/on-call/analytics/insight-by-team) | 查看团队洞察 | +| POST | [`/insight/channel`](/zh/api-reference/on-call/analytics/insight-by-channel) | 查看协作空间洞察 | +| POST | [`/insight/responder`](/zh/api-reference/on-call/analytics/insight-by-responder) | 查看处理人员洞察 | +| POST | [`/insight/incident/list`](/zh/api-reference/on-call/analytics/insight-incident-list) | 查询洞察故障列表 | +| POST | [`/insight/alert/topk-by-label`](/zh/api-reference/on-call/analytics/insight-topk-alerts-by-label) | 查看按 check/resource 聚合的 Top-K 告警 | +| POST | [`/insight/incident/export`](/zh/api-reference/on-call/analytics/insight-incident-export) | 导出洞察故障 | +| POST | [`/insight/team/export`](/zh/api-reference/on-call/analytics/insight-team-export) | 导出团队洞察 | +| POST | [`/insight/channel/export`](/zh/api-reference/on-call/analytics/insight-channel-export) | 导出协作空间洞察 | +| POST | [`/insight/responder/export`](/zh/api-reference/on-call/analytics/insight-responder-export) | 导出处理人员洞察 | + +### 状态页 + +| 方法 | 接口 | 描述 | +| :--- | :--- | :--- | +| GET | [`/status-page/change/list`](/zh/api-reference/on-call/status-pages/status-page-change-list) | 查询状态页事件列表 | +| GET | [`/status-page/change/info`](/zh/api-reference/on-call/status-pages/status-page-change-info) | 获取状态页事件详情 | +| POST | [`/status-page/change/create`](/zh/api-reference/on-call/status-pages/status-page-change-create) | 创建状态页事件 | +| POST | [`/status-page/change/update`](/zh/api-reference/on-call/status-pages/status-page-change-update) | 更新状态页事件 | +| POST | [`/status-page/change/delete`](/zh/api-reference/on-call/status-pages/status-page-change-delete) | 删除状态页事件 | +| POST | [`/status-page/change/timeline/create`](/zh/api-reference/on-call/status-pages/status-page-change-timeline-create) | 创建事件时间线 | +| POST | [`/status-page/change/timeline/update`](/zh/api-reference/on-call/status-pages/status-page-change-timeline-update) | 更新事件时间线 | +| POST | [`/status-page/change/timeline/delete`](/zh/api-reference/on-call/status-pages/status-page-change-timeline-delete) | 删除事件时间线 | +| GET | [`/status-page/subscriber/list`](/zh/api-reference/on-call/status-pages/status-page-subscriber-list) | 查询状态页订阅者列表 | +| POST | [`/status-page/subscriber/import`](/zh/api-reference/on-call/status-pages/status-page-subscriber-import) | 批量导入订阅者 | +| POST | [`/status-page/subscriber/export`](/zh/api-reference/on-call/status-pages/status-page-subscriber-export) | 导出订阅者 | +| POST | [`/status-page/migrate-structure`](/zh/api-reference/on-call/status-pages/status-page-migrate-structure) | 迁移状态页结构 | +| 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 | [`/monit/rule/list/basic`](/zh/api-reference/monitors/alert-rules/monit-rule-read-list) | 查询告警规则列表 | +| POST | [`/monit/rule/info`](/zh/api-reference/monitors/alert-rules/monit-rule-read-info) | 查看告警规则详情 | +| POST | [`/monit/rule/create`](/zh/api-reference/monitors/alert-rules/monit-rule-write-create) | 创建告警规则 | +| POST | [`/monit/rule/update`](/zh/api-reference/monitors/alert-rules/monit-rule-write-update) | 更新告警规则 | +| POST | [`/monit/rule/delete`](/zh/api-reference/monitors/alert-rules/monit-rule-write-delete) | 删除告警规则 | +| POST | [`/monit/rule/delete/batch`](/zh/api-reference/monitors/alert-rules/monit-rule-write-delete-batch) | 批量删除告警规则 | +| POST | [`/monit/rule/import`](/zh/api-reference/monitors/alert-rules/monit-rule-write-import) | 导入告警规则 | +| POST | [`/monit/rule/export`](/zh/api-reference/monitors/alert-rules/monit-rule-read-export) | 导出告警规则 | +| POST | [`/monit/rule/move`](/zh/api-reference/monitors/alert-rules/monit-rule-write-move) | 移动告警规则到文件夹 | +| POST | [`/monit/rule/update/fields`](/zh/api-reference/monitors/alert-rules/monit-rule-write-fields-update) | 批量更新规则字段 | +| POST | [`/monit/rule/audits`](/zh/api-reference/monitors/alert-rules/monit-rule-read-audits) | 查询规则变更历史 | +| POST | [`/monit/rule/audit/detail`](/zh/api-reference/monitors/alert-rules/monit-rule-read-audit-detail) | 查看规则审计快照 | +| POST | [`/monit/rule/counter/total`](/zh/api-reference/monitors/alert-rules/monit-rule-read-counter-total) | 查看规则数量时序 | +| POST | [`/monit/rule/counter/node`](/zh/api-reference/monitors/alert-rules/monit-rule-read-counter-node) | 按文件夹节点查询规则统计 | +| POST | [`/monit/rule/counter/status`](/zh/api-reference/monitors/alert-rules/monit-rule-read-counter-status) | 查看顶层文件夹规则状态统计 | +| POST | [`/monit/rule/counter/channel`](/zh/api-reference/monitors/alert-rules/monit-rule-read-counter-channel) | 按协作空间查询规则统计 | +| POST | [`/monit/rule/status`](/zh/api-reference/monitors/alert-rules/monit-rule-write-status) | 查看文件夹下规则触发状态 | +| POST | [`/monit/rule/dstypes`](/zh/api-reference/monitors/alert-rules/monit-rule-read-dstypes) | 查询可用的数据源类型 | + +### 告警数据源 + +| 方法 | 接口 | 描述 | +| :--- | :--- | :--- | +| POST | [`/monit/datasource/list`](/zh/api-reference/monitors/data-sources/monit-datasource-read-list) | 查询数据源列表 | +| POST | [`/monit/datasource/info`](/zh/api-reference/monitors/data-sources/monit-datasource-read-info) | 查看数据源详情 | +| POST | [`/monit/datasource/create`](/zh/api-reference/monitors/data-sources/monit-datasource-write-create) | 创建数据源 | +| POST | [`/monit/datasource/update`](/zh/api-reference/monitors/data-sources/monit-datasource-write-update) | 更新数据源 | +| POST | [`/monit/datasource/delete`](/zh/api-reference/monitors/data-sources/monit-datasource-write-delete) | 删除数据源 | +| POST | [`/monit/datasource/sls/projects`](/zh/api-reference/monitors/data-sources/monit-datasource-read-sls-projects) | 查询 SLS 项目列表 | +| POST | [`/monit/datasource/sls/logstores`](/zh/api-reference/monitors/data-sources/monit-datasource-read-sls-logstores) | 查询 SLS 日志库列表 | + +### 规则集 + +| 方法 | 接口 | 描述 | +| :--- | :--- | :--- | +| POST | [`/monit/store/ruleset/list`](/zh/api-reference/monitors/rule-sets/monit-store-ruleset-list) | 查询规则集列表 | +| POST | [`/monit/store/ruleset/info`](/zh/api-reference/monitors/rule-sets/monit-store-ruleset-info) | 查看规则集详情 | +| POST | [`/monit/store/ruleset/create`](/zh/api-reference/monitors/rule-sets/monit-store-ruleset-create) | 创建规则集 | +| POST | [`/monit/store/ruleset/update`](/zh/api-reference/monitors/rule-sets/monit-store-ruleset-update) | 更新规则集 | +| POST | [`/monit/store/ruleset/delete`](/zh/api-reference/monitors/rule-sets/monit-store-ruleset-delete) | 删除规则集 | + + + + + +### 应用管理 + +| 方法 | 接口 | 描述 | +| :--- | :--- | :--- | +| POST | [`/rum/application/list`](/zh/api-reference/rum/applications/rum-application-read-list) | 查询应用列表 | +| POST | [`/rum/application/info`](/zh/api-reference/rum/applications/rum-application-read-info) | 查看应用详情 | +| POST | [`/rum/application/infos`](/zh/api-reference/rum/applications/rum-application-read-infos) | 批量查询应用详情 | +| POST | [`/rum/application/create`](/zh/api-reference/rum/applications/rum-application-write-create) | 创建应用 | +| POST | [`/rum/application/update`](/zh/api-reference/rum/applications/rum-application-write-update) | 更新应用 | +| POST | [`/rum/application/delete`](/zh/api-reference/rum/applications/rum-application-write-delete) | 删除应用 | + +### 问题跟踪 + +| 方法 | 接口 | 描述 | +| :--- | :--- | :--- | +| POST | [`/rum/issue/list`](/zh/api-reference/rum/issues/rum-issue-read-list) | 查询 Issue 列表 | +| POST | [`/rum/issue/info`](/zh/api-reference/rum/issues/rum-issue-read-info) | 查看 Issue 详情 | +| POST | [`/rum/issue/update`](/zh/api-reference/rum/issues/rum-issue-write-update) | 更新 Issue | + +### Sourcemap + +| 方法 | 接口 | 描述 | +| :--- | :--- | :--- | +| POST | [`/sourcemap/list`](/zh/api-reference/rum/sourcemaps/sourcemap-read-list) | 查询 Sourcemap 列表 | + + + + + +### 成员管理 + +| 方法 | 接口 | 描述 | +| :--- | :--- | :--- | +| POST | [`/member/list`](/zh/api-reference/platform/members/member-list) | 查询成员列表 | +| POST | [`/member/info`](/zh/api-reference/platform/members/member-info) | 获取当前成员信息 | +| POST | [`/member/invite`](/zh/api-reference/platform/members/member-invite) | 邀请成员 | +| POST | [`/member/delete`](/zh/api-reference/platform/members/member-delete) | 删除成员 | +| POST | [`/member/info/reset`](/zh/api-reference/platform/members/member-reset-info) | 重置成员信息 | +| POST | [`/member/role/update`](/zh/api-reference/platform/members/member-update-role) | 更新成员角色 | +| POST | [`/member/role/grant`](/zh/api-reference/platform/members/member-grant-role) | 授予成员角色 | +| POST | [`/member/role/revoke`](/zh/api-reference/platform/members/member-revoke-role) | 解除成员角色 | +| POST | [`/person/infos`](/zh/api-reference/platform/members/person-infos) | 批量获取人员信息 | + +### 团队管理 + +| 方法 | 接口 | 描述 | +| :--- | :--- | :--- | +| POST | [`/team/list`](/zh/api-reference/platform/teams/team-read-list) | 查看团队列表 | +| POST | [`/team/info`](/zh/api-reference/platform/teams/team-read-info) | 查看团队详情 | +| POST | [`/team/infos`](/zh/api-reference/platform/teams/team-read-infos) | 批量查看团队信息 | +| POST | [`/team/upsert`](/zh/api-reference/platform/teams/team-write-upsert) | 变更团队信息 | +| POST | [`/team/delete`](/zh/api-reference/platform/teams/team-write-delete) | 删除团队 | + +### 角色与权限 + +| 方法 | 接口 | 描述 | +| :--- | :--- | :--- | +| POST | [`/role/list`](/zh/api-reference/platform/roles-permissions/role-read-list) | 查看角色列表 | +| POST | [`/role/info`](/zh/api-reference/platform/roles-permissions/role-read-info) | 查看角色详情 | +| POST | [`/role/upsert`](/zh/api-reference/platform/roles-permissions/role-write-upsert) | 创建或更新角色 | +| POST | [`/role/delete`](/zh/api-reference/platform/roles-permissions/role-write-delete) | 删除角色 | +| POST | [`/role/enable`](/zh/api-reference/platform/roles-permissions/role-write-enable) | 启用角色 | +| POST | [`/role/disable`](/zh/api-reference/platform/roles-permissions/role-write-disable) | 禁用角色 | +| POST | [`/role/permission/list`](/zh/api-reference/platform/roles-permissions/role-read-list-permission) | 查看角色权限集合 | +| POST | [`/role/permission/factor/list`](/zh/api-reference/platform/roles-permissions/role-read-list-permission-factor) | 查看权限因子集合 | +| POST | [`/role/member/grant`](/zh/api-reference/platform/roles-permissions/role-write-grant-role) | 授予成员账户权限 | +| POST | [`/role/member/revoke`](/zh/api-reference/platform/roles-permissions/role-write-revoke-role) | 解除成员账户权限 | + +### 审计日志 + +| 方法 | 接口 | 描述 | +| :--- | :--- | :--- | +| POST | [`/audit/search`](/zh/api-reference/platform/audit-logs/audit-read-search) | 检索审计日志 | +| POST | [`/audit/operation/list`](/zh/api-reference/platform/audit-logs/audit-read-operation-list) | 查看事件类型列表 | + + diff --git a/zh/openapi/introduction.mdx b/zh/openapi/introduction.mdx index aaea2e6..0feab4f 100644 --- a/zh/openapi/introduction.mdx +++ b/zh/openapi/introduction.mdx @@ -1,19 +1,25 @@ --- title: "快速入门" description: "Flashduty Open API 快速入门指南" -keywords: ["Open API", "API认证", "APP Key", "接口调用", "开发者文档"] +keywords: ["Open API", "API认证", "APP Key", "接口调用", "开发者文档", "API限流", "错误码"] --- -Open API 用于访问和操作 Flashduty 的实体数据,比如查看和管理配置等。使用 API 与您登录 [Flashduty 控制台](https://console.flashcat.cloud) 后进行页面操作本质上是相同的。 +Open API 用于通过 HTTP 接口主动调用 Flashduty,查询和管理故障、协作空间、值班表等实体数据。使用 API 与您登录 [Flashduty 控制台](https://console.flashcat.cloud) 后进行页面操作本质上是相同的。 -如果您想把自研监控系统的告警推送到 Flashduty,请参考 [自定义告警事件](/zh/on-call/integration/alert-integration/alert-sources/flashcat)。 - +**不确定是否需要 Open API?** Flashduty 提供多种数据交互方式: -## 请求规范 +- **Open API**(本文档)— 您主动调用 Flashduty,查询或操作数据。查看 [API 总览](/zh/openapi/api-catalog) 了解全部接口。 +- **标准告警事件** — 将自研监控系统的告警推送到 Flashduty,触发故障处理流程。详见[自定义告警事件](/zh/on-call/integration/alert-integration/alert-sources/standard alert)。 +- **自定义变更事件** — 推送变更事件关联故障,辅助根因分析。详见[自定义变更事件](/zh/on-call/integration/change-integration/custom-event)。 +- **Webhook 推送** — Flashduty 主动向您的系统推送故障/告警事件通知。详见[故障 Webhook](/zh/on-call/integration/webhooks/incident-webhook) 和[告警 Webhook](/zh/on-call/integration/webhooks/alert-webhook)。 +- **自定义操作** — 在故障详情页触发外部操作。详见[自定义操作](/zh/on-call/integration/webhooks/custom-actions)。 + --- +## 请求规范 + ### 请求地址 所有 API 只接受 **HTTPS** 协议进行访问,且只有一个 Endpoint: @@ -38,8 +44,6 @@ Content-Type: application/json ## 认证方式 ---- - 所有 Open API 使用 **APP Key** 进行鉴权。 ### 获取 APP Key @@ -62,23 +66,15 @@ Content-Type: application/json 将 APP Key 作为 query string 参数传入: ```bash -https://api.flashcat.cloud/path?app_key=YOUR_APP_KEY -``` - - -```bash cURL curl -X POST 'https://api.flashcat.cloud/your/api/path?app_key=YOUR_APP_KEY' \ -H 'Content-Type: application/json' \ -d '{"param": "value"}' ``` - --- ## 响应结构 ---- - 所有请求响应均为 JSON 格式,遵循统一结构: | 字段 | 类型 | 必选 | 描述 | @@ -118,5 +114,111 @@ curl -X POST 'https://api.flashcat.cloud/your/api/path?app_key=YOUR_APP_KEY' \ | 字段 | 类型 | 必选 | 描述 | | --- | --- | :---: | --- | -| `code` | string | ✅ | 错误码,详见[使用限制](/zh/openapi/rate-limits) | +| `code` | string | ✅ | 错误码,详见下方[错误码列表](#错误码列表) | | `message` | string | | 错误描述 | + +--- + +## 使用限制 + +### 频率限制 + +为保证服务稳定性,API 对请求频率有一定限制。当请求过于频繁时,将返回 `429` 状态码和 `RequestTooFrequently` 错误。 + + +请合理控制请求频率,避免在短时间内发送大量请求。建议实现重试机制,在收到 429 错误时进行指数退避重试。 + + +### 权限限制 + +- 每个 APP Key 继承其创建者的全部权限 +- 操作超出权限范围时,将返回 `403` 状态码和 `AccessDenied` 错误 +- 建议为不同用途创建独立的 APP Key,遵循最小权限原则 + +### 错误码列表 + +| 错误码 | HTTP Status | 描述 | +| --- | :---: | --- | +| `InvalidParameter` | 400 | 参数错误,请检查请求参数是否正确 | +| `InvalidContentType` | 400 | Content-Type 不支持,请使用 `application/json` | +| `MethodNotAllowed` | 400 | HTTP Method 不支持 | +| `Unauthorized` | 401 | 登录认证未通过,请检查 APP Key 是否正确 | +| `AccessDenied` | 403 | 权限认证未通过,当前用户无此操作权限 | +| `RouteNotFound` | 404 | 请求 Method + Path 未匹配,请检查 API 地址 | +| `RequestTooFrequently` | 429 | 请求过于频繁,请稍后重试 | +| `ResourceNotFound` | 400 | 账户未购买资源,请前往费用中心下单 | +| `NoLicense` | 400 | 账户无充足订阅 License,请前往费用中心升级或购买订阅 | +| `InternalError` | 500 | 内部或未知错误,请联系技术支持 | + +--- + +## 错误处理建议 + + + + **可能原因**: + - 缺少必填参数 + - 参数格式不正确 + - Content-Type 未设置为 `application/json` + + **解决方案**: + 检查请求参数和 Headers 设置,参考 API 文档确认参数要求。 + + + + **可能原因**: + - APP Key 未提供 + - APP Key 不正确或已失效 + + **解决方案**: + 1. 确认请求 URL 中包含 `app_key` 参数 + 2. 前往控制台检查 APP Key 是否有效 + + + + **可能原因**: + - 当前用户无权执行此操作 + - APP Key 对应用户权限不足 + + **解决方案**: + 联系账户管理员提升权限,或使用具有相应权限的 APP Key。 + + + + **可能原因**: + - 短时间内发送了过多请求 + + **解决方案**: + 1. 降低请求频率 + 2. 实现指数退避重试机制 + 3. 合并多个请求(如使用批量接口) + + + + **可能原因**: + - 服务端内部异常 + + **解决方案**: + 1. 稍后重试 + 2. 如持续出现,请联系技术支持并提供 `request_id` + + + +--- + +## 最佳实践 + + + + 对于网络错误和 5xx 错误,建议实现指数退避重试,初始间隔 1 秒,最大重试 3 次。 + + + 保存每次请求返回的 `request_id`,便于问题排查和技术支持。 + + + 不要在客户端代码中硬编码 APP Key,建议通过环境变量或配置中心管理。 + + + 定期更换 APP Key,及时删除不再使用的密钥,降低泄露风险。 + + diff --git a/zh/openapi/pagination.mdx b/zh/openapi/pagination.mdx index c6df5f4..7365879 100644 --- a/zh/openapi/pagination.mdx +++ b/zh/openapi/pagination.mdx @@ -80,8 +80,8 @@ keywords: ["API分页", "游标分页", "传统分页", "OFFSET", "LIMIT", "SEAR 我们在以下 API 中提供了游标分页支持: -- [故障列表](https://developer.flashcat.cloud/api-110655782) -- [告警列表](https://developer.flashcat.cloud/api-110655791) +- [故障列表](/zh/api-reference/on-call/incidents/incident-list) +- [告警列表](/zh/api-reference/on-call/alerts/alert-read-list) ### 请求参数