diff --git a/api-reference/on-call.openapi.en.json b/api-reference/on-call.openapi.en.json index a76fc6d4..69af7bf7 100644 --- a/api-reference/on-call.openapi.en.json +++ b/api-reference/on-call.openapi.en.json @@ -17411,6 +17411,745 @@ } } } + }, + "/integration/type/list": { + "post": { + "operationId": "integration-api-read-type-list", + "summary": "List integration types", + "description": "List the integration types the account can configure.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |\n\n## Usage\n\n- When `orderby` is omitted, types come back in console ranking order and `p`/`limit` still apply.\n- `supports_api_create` tells you which types `POST /integration/create` accepts.", + "href": "/en/api-reference/on-call/integrations/integration-api-read-type-list", + "metadata": { + "sidebarTitle": "List integration types" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListIntegrationTypesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "p": 1, + "limit": 20, + "total": 2, + "items": [ + { + "plugin_type": "standard.alert", + "plugin_type_name": "Standard Alert", + "plugin_type_logo_url": "https://cdn.flashcat.cloud/plugin/standard-alert.svg", + "category": "event.alert", + "status": "enabled", + "supports_api_create": true + }, + { + "plugin_type": "jira.change", + "plugin_type_name": "Jira", + "plugin_type_logo_url": "https://cdn.flashcat.cloud/plugin/jira.svg", + "category": "event.change", + "status": "enabled", + "supports_api_create": 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/IntegrationTypeListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "category": "event.alert" + } + } + } + } + } + }, + "/integration/list": { + "post": { + "operationId": "integration-api-read-list", + "summary": "List integrations", + "description": "List the account's alert-source and change-source integrations.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |\n\n## Usage\n\n- `orderby` defaults to `created_at`; `plugin_type` is sorted by the underlying plugin.\n- `plugin_type`, `status` and `category` accept comma-separated values; `ref_ids` values must start with `c_`, `a_` or `w_`.\n- With `is_my_team` set, results are limited to your teams and `team_ids` narrows that set further.", + "href": "/en/api-reference/on-call/integrations/integration-api-read-list", + "metadata": { + "sidebarTitle": "List integrations" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListIntegrationsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "p": 1, + "limit": 20, + "total": 1, + "items": [ + { + "integration_id": 6113996590131, + "team_id": 1467226103121, + "plugin_type": "standard.alert", + "plugin_type_name": "Standard Alert", + "category": "event.alert", + "name": "Prod metrics alerts", + "description": "Alerts pushed by the production Prometheus stack", + "status": "enabled", + "ref_id": "a_6612f0c9e1b7a4d3508f2c6b", + "created_at": 1775116800, + "updated_at": 1775203200, + "last_time": 1775298600 + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListIntegrationsRequest" + }, + "example": { + "p": 1, + "limit": 20, + "status": "enabled" + } + } + } + } + } + }, + "/integration/info": { + "post": { + "operationId": "integration-api-read-info", + "summary": "Get integration detail", + "description": "Return one integration, including its settings with sensitive values masked.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |\n\n## Usage\n\n- Sensitive settings (endpoint, headers, secrets, passwords) come back masked as `******`.", + "href": "/en/api-reference/on-call/integrations/integration-api-read-info", + "metadata": { + "sidebarTitle": "Get integration detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/IntegrationDetail" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "team_id": 1467226103121, + "plugin_type": "standard.alert", + "plugin_type_name": "Standard Alert", + "category": "event.alert", + "name": "Prod metrics alerts", + "description": "Alerts pushed by the production Prometheus stack", + "status": "enabled", + "ref_id": "a_6612f0c9e1b7a4d3508f2c6b", + "created_at": 1775116800, + "updated_at": 1775203200, + "last_time": 1775298600, + "settings": { + "severity_mapping": [ + { + "P1": "Critical" + } + ], + "labels": { + "source": "prometheus" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetIntegrationRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/integration/create": { + "post": { + "operationId": "integration-api-write-create", + "summary": "Create integration", + "description": "Create an integration for an alert source or change source.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- `plugin_type` must be one of the types listed by `POST /integration/type/list` with `supports_api_create: true`; anything else returns `InvalidParameter`.\n- `integration_key` is returned once. Store it at creation time — it is not part of `POST /integration/info`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/integrations/integration-api-write-create", + "metadata": { + "sidebarTitle": "Create integration" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CreateIntegrationResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "integration_key": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateIntegrationRequest" + }, + "example": { + "plugin_type": "standard.alert", + "name": "Prod metrics alerts", + "description": "Alerts pushed by the production Prometheus stack", + "team_id": 1467226103121, + "settings": { + "severity_mapping": [ + { + "P1": "Critical" + } + ] + } + } + } + } + } + } + }, + "/integration/update": { + "post": { + "operationId": "integration-api-write-update", + "summary": "Update integration", + "description": "Update an integration's name, description, team, or settings.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Only the fields you send are changed; omitted fields keep their current value.\n- `settings` replaces the stored configuration. Sensitive entries left out, or sent back as the masked `******`, keep their stored value.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/integrations/integration-api-write-update", + "metadata": { + "sidebarTitle": "Update integration" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/IntegrationDetail" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "team_id": 1467226103121, + "plugin_type": "standard.alert", + "plugin_type_name": "Standard Alert", + "category": "event.alert", + "name": "Prod metrics alerts (primary)", + "description": "Alerts pushed by the production Prometheus stack", + "status": "enabled", + "ref_id": "a_6612f0c9e1b7a4d3508f2c6b", + "created_at": 1775116800, + "updated_at": 1775298600, + "last_time": 1775298600, + "settings": { + "severity_mapping": [ + { + "P1": "Critical" + } + ], + "labels": { + "source": "prometheus" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateIntegrationRequest" + }, + "example": { + "integration_id": 6113996590131, + "name": "Prod metrics alerts (primary)", + "team_id": 1467226103121 + } + } + } + } + } + }, + "/integration/delete": { + "post": { + "operationId": "integration-api-write-delete", + "summary": "Delete integration", + "description": "Delete an integration that nothing else references.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Deleting an integration that other objects still reference returns HTTP 400 with `error.code` = `ReferenceExist` and `data.refs` listing them.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/integrations/integration-api-write-delete", + "metadata": { + "sidebarTitle": "Delete integration" + } + }, + "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" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationLifecycleRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/integration/enable": { + "post": { + "operationId": "integration-api-write-enable", + "summary": "Enable integration", + "description": "Re-enable a disabled integration so it accepts events again.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Enabling an integration resumes its scheduled pull task and heartbeat, and requires the integration type to be available on the current plan.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/integrations/integration-api-write-enable", + "metadata": { + "sidebarTitle": "Enable integration" + } + }, + "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" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationLifecycleRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/integration/disable": { + "post": { + "operationId": "integration-api-write-disable", + "summary": "Disable integration", + "description": "Disable an integration without deleting its configuration.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Disabling stops event ingestion and pauses the scheduled pull task; settings are kept so the integration can be enabled again.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/integrations/integration-api-write-disable", + "metadata": { + "sidebarTitle": "Disable integration" + } + }, + "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" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationLifecycleRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/integration/key/rotate": { + "post": { + "operationId": "integration-api-write-rotate-key", + "summary": "Rotate integration key", + "description": "Issue a new integration key and invalidate the previous one.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- The previous key stops working immediately, so update the pushing side before rotating.\n- The new key is returned once and cannot be read again later.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/integrations/integration-api-write-rotate-key", + "metadata": { + "sidebarTitle": "Rotate integration key" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RotateIntegrationKeyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_key": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationLifecycleRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } } }, "components": { @@ -28532,6 +29271,14 @@ "type": "boolean", "description": "Show the Create War Room button on Feishu app cards." }, + "dingtalk_app_war_room_enabled": { + "type": "boolean", + "description": "Show the Create War Room button on DingTalk app cards." + }, + "slack_app_war_room_enabled": { + "type": "boolean", + "description": "Show the Create War Room button on Slack app cards." + }, "dingtalk_app": { "type": "string", "description": "DingTalk app message template source." @@ -28636,6 +29383,8 @@ "wecom_markdown_v2_enabled", "feishu_app_card_v2_preserve_blank_lines", "feishu_app_war_room_enabled", + "dingtalk_app_war_room_enabled", + "slack_app_war_room_enabled", "dingtalk_app", "wecom_app", "slack_app", @@ -28720,6 +29469,14 @@ "type": "boolean", "description": "Whether Feishu app cards show the Create War Room button. Hidden when the incident has no responders." }, + "dingtalk_app_war_room_enabled": { + "type": "boolean", + "description": "Whether DingTalk app cards show the Create War Room button. Hidden for closed incidents and when the incident has no responders." + }, + "slack_app_war_room_enabled": { + "type": "boolean", + "description": "Whether Slack app cards show the Create War Room button. Hidden for closed incidents and when the incident has no responders." + }, "dingtalk_app": { "type": "string", "description": "DingTalk app message template source." @@ -29003,6 +29760,20 @@ ], "description": "When set, show or hide the Create War Room button on Feishu app cards. Omit to keep the existing setting." }, + "dingtalk_app_war_room_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "When set, show or hide the Create War Room button on DingTalk app cards. Omit to keep the existing setting." + }, + "slack_app_war_room_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "When set, show or hide the Create War Room button on Slack app cards. Omit to keep the existing setting." + }, "dingtalk_app": { "type": [ "string", @@ -32992,46 +33763,257 @@ }, "incident_id": { "type": "string", - "pattern": "^[0-9a-fA-F]{24}$", - "description": "Incident ID (MongoDB ObjectID) whose converted-but-unbound follow-ups are bound." + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Incident ID (MongoDB ObjectID) whose converted-but-unbound follow-ups are bound." + }, + "idempotency_key": { + "type": "string", + "maxLength": 128, + "pattern": "^[A-Za-z0-9_\\-.:]+$", + "description": "Client-generated idempotency key (max 128 characters; letters, digits, `_`, `-`, `.`, `:` only)." + } + } + }, + "IncidentCommentTypeDisplay": { + "type": "object", + "description": "Resolved display of an account-level comment type, populated at read time from the current type definition.", + "required": [ + "id", + "name", + "color" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Comment type ID (MongoDB ObjectID)." + }, + "name": { + "type": "string", + "maxLength": 40, + "description": "Display name of the comment type." + }, + "color": { + "type": "string", + "pattern": "^#[0-9A-Fa-f]{6}$", + "description": "Badge color in #RRGGBB format." + } + } + }, + "FeedDetailWorkItemCreated": { + "type": "object", + "description": "Detail payload for `i_wi_created`.", + "properties": { + "work_item_id": { + "type": "string", + "description": "Work item ID." + }, + "item_type": { + "type": "string", + "enum": [ + "action", + "follow_up" + ], + "description": "Work item type. `action`: an action item anchored to the incident itself, convertible to `follow_up` later; `follow_up`: an improvement item anchored to a post-mortem, requiring the incident to be linked to that post-mortem at creation." + }, + "title": { + "type": "string", + "description": "Work item title." + }, + "status": { + "type": "string", + "description": "Work item status label (e.g. `open`, `done`)." + }, + "assignee_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Assignee member IDs." + }, + "post_mortem_id": { + "type": "string", + "description": "ID of the post-mortem the work item is bound to." + } + }, + "title": "i_wi_created" + }, + "FeedDetailWorkItemUpdated": { + "type": "object", + "description": "Detail payload for `i_wi_updated`. Only the fields that changed carry `from_*`/`to_*` values.", + "properties": { + "work_item_id": { + "type": "string", + "description": "Work item ID." + }, + "item_type": { + "type": "string", + "enum": [ + "action", + "follow_up" + ], + "description": "Work item type. `action`: an action item anchored to the incident itself; `follow_up`: an improvement item anchored to a post-mortem." + }, + "title": { + "type": "string", + "description": "Work item title." + }, + "from_title": { + "type": "string", + "description": "Title before the update." + }, + "from_status": { + "type": "string", + "description": "Status label before the update." + }, + "to_status": { + "type": "string", + "description": "Status label after the update." + }, + "from_priority": { + "type": "string", + "description": "Priority label before the update." + }, + "to_priority": { + "type": "string", + "description": "Priority label after the update." + }, + "from_description": { + "type": "string", + "description": "Description before the update." + }, + "to_description": { + "type": "string", + "description": "Description after the update." + } + }, + "title": "i_wi_updated" + }, + "FeedDetailWorkItemAssigneesChanged": { + "type": "object", + "description": "Detail payload for `i_wi_assignees`.", + "properties": { + "work_item_id": { + "type": "string", + "description": "Work item ID." + }, + "item_type": { + "type": "string", + "enum": [ + "action", + "follow_up" + ], + "description": "Work item type. `action`: an action item anchored to the incident itself; `follow_up`: an improvement item anchored to a post-mortem." + }, + "title": { + "type": "string", + "description": "Work item title." + }, + "assignee_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Assignee member IDs after the change." + }, + "added_assignee_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs added as assignees." + }, + "removed_assignee_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Member IDs removed from assignees." + } + }, + "title": "i_wi_assignees" + }, + "FeedDetailWorkItemCompleted": { + "type": "object", + "description": "Detail payload for `i_wi_completed`.", + "properties": { + "work_item_id": { + "type": "string", + "description": "Work item ID." + }, + "item_type": { + "type": "string", + "enum": [ + "action", + "follow_up" + ], + "description": "Work item type. `action`: an action item anchored to the incident itself; `follow_up`: an improvement item anchored to a post-mortem." + }, + "title": { + "type": "string", + "description": "Work item title." + }, + "from_status": { + "type": "string", + "description": "Status label before completion." + }, + "to_status": { + "type": "string", + "description": "Status label after completion." }, - "idempotency_key": { + "post_mortem_id": { "type": "string", - "maxLength": 128, - "pattern": "^[A-Za-z0-9_\\-.:]+$", - "description": "Client-generated idempotency key (max 128 characters; letters, digits, `_`, `-`, `.`, `:` only)." + "description": "ID of the post-mortem the work item is bound to." } - } + }, + "title": "i_wi_completed" }, - "IncidentCommentTypeDisplay": { + "FeedDetailWorkItemConverted": { "type": "object", - "description": "Resolved display of an account-level comment type, populated at read time from the current type definition.", - "required": [ - "id", - "name", - "color" - ], + "description": "Detail payload for `i_wi_converted`.", "properties": { - "id": { + "work_item_id": { "type": "string", - "pattern": "^[0-9a-fA-F]{24}$", - "description": "Comment type ID (MongoDB ObjectID)." + "description": "Work item ID." }, - "name": { + "title": { "type": "string", - "maxLength": 40, - "description": "Display name of the comment type." + "description": "Work item title." }, - "color": { + "from_type": { "type": "string", - "pattern": "^#[0-9A-Fa-f]{6}$", - "description": "Badge color in #RRGGBB format." + "enum": [ + "action", + "follow_up" + ], + "description": "Work item type before the conversion. `action`: an action item anchored to the incident itself; `follow_up`: an improvement item anchored to a post-mortem. Conversion currently only supports `action` → `follow_up`, so `from_type` is always `action` in this event." + }, + "to_type": { + "type": "string", + "enum": [ + "action", + "follow_up" + ], + "description": "Work item type after the conversion. `action`: an action item anchored to the incident itself; `follow_up`: an improvement item anchored to a post-mortem. Conversion currently only supports `action` → `follow_up`, so `to_type` is always `follow_up` in this event, and a successful conversion immediately tries to bind the incident's post-mortem." + }, + "post_mortem_id": { + "type": "string", + "description": "ID of the post-mortem the work item is bound to." + }, + "status": { + "type": "string", + "description": "Work item status label after the conversion." } - } + }, + "title": "i_wi_converted" }, - "FeedDetailWorkItemCreated": { + "FeedDetailWorkItemBound": { "type": "object", - "description": "Detail payload for `i_wi_created`.", + "description": "Detail payload for `i_wi_bound`.", "properties": { "work_item_id": { "type": "string", @@ -33043,34 +34025,22 @@ "action", "follow_up" ], - "description": "Work item type. `action`: an action item anchored to the incident itself, convertible to `follow_up` later; `follow_up`: an improvement item anchored to a post-mortem, requiring the incident to be linked to that post-mortem at creation." + "description": "Work item type. `action`: an action item anchored to the incident itself; `follow_up`: an improvement item anchored to a post-mortem." }, "title": { "type": "string", "description": "Work item title." }, - "status": { - "type": "string", - "description": "Work item status label (e.g. `open`, `done`)." - }, - "assignee_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "Assignee member IDs." - }, "post_mortem_id": { "type": "string", "description": "ID of the post-mortem the work item is bound to." } }, - "title": "i_wi_created" + "title": "i_wi_bound" }, - "FeedDetailWorkItemUpdated": { + "FeedDetailWorkItemDeleted": { "type": "object", - "description": "Detail payload for `i_wi_updated`. Only the fields that changed carry `from_*`/`to_*` values.", + "description": "Detail payload for `i_wi_deleted`.", "properties": { "work_item_id": { "type": "string", @@ -33088,543 +34058,932 @@ "type": "string", "description": "Work item title." }, - "from_title": { + "post_mortem_id": { "type": "string", - "description": "Title before the update." + "description": "ID of the post-mortem the work item is bound to." + } + }, + "title": "i_wi_deleted" + }, + "FeedDetailAlertMerge": { + "type": "object", + "title": "a_merge", + "description": "Detail payload for `a_merge`: an alert merged into an incident.", + "properties": { + "comment": { + "type": "string", + "description": "Comment recorded with the merge. Omitted when empty." }, - "from_status": { + "target_incident": { + "$ref": "#/components/schemas/IncidentShort", + "description": "Incident the alerts were merged into. Omitted when not recorded." + }, + "source_alerts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertShort" + }, + "description": "Source alerts merged into the target incident. Omitted when empty." + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "New owner member ID set on the target incident. Omitted when unchanged." + }, + "title": { "type": "string", - "description": "Status label before the update." + "description": "New title set on the target incident. Omitted when unchanged." + } + } + }, + "AlertShort": { + "type": "object", + "description": "Brief alert reference.", + "properties": { + "alert_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Alert ID (ObjectID hex string)." }, - "to_status": { + "title": { "type": "string", - "description": "Status label after the update." + "description": "Alert title, resolved at read time. Omitted when empty." + } + } + }, + "EventGroup": { + "type": "object", + "description": "Alert event merge configuration. When enabled, repeated incoming events of the same alert are merged into the existing alert within the time window instead of creating new alerts.", + "properties": { + "is_enabled": { + "type": "boolean", + "description": "When true, repeated events merge into the existing alert; when false, every event creates a separate alert. Defaults to true." }, - "from_priority": { + "time_window": { + "type": "integer", + "minimum": 1, + "description": "Merge window in minutes, 1-1440 (24 h); accounts with the extended limit may use up to 10080 (7 days). Defaults to 1440." + } + } + }, + "StatusPageInfoResponse": { + "type": "object", + "description": "Status page detail returned by `GET /status-page/info`: the full page configuration plus feature flags.", + "allOf": [ + { + "$ref": "#/components/schemas/StatusPageItem" + }, + { + "type": "object", + "properties": { + "managed_domain_feature_enabled": { + "type": "boolean", + "description": "Whether the managed custom-domain feature is enabled for this page. `true` for public pages, always `false` for internal pages." + } + }, + "required": [ + "managed_domain_feature_enabled" + ] + } + ] + }, + "StatusPagePreDefinedTemplate": { + "type": "object", + "description": "A predefined event template: a reusable draft of an event's title, type, status, and description. In `POST /status-page/template/upsert`, omit `template_id` to create and supply it to update; on update only non-empty fields are applied.", + "properties": { + "template_id": { "type": "string", - "description": "Priority label before the update." + "description": "Template ID. Omit to create a new template; supply to update an existing one." }, - "to_priority": { + "title": { "type": "string", - "description": "Priority label after the update." + "description": "Template title." }, - "from_description": { + "type": { "type": "string", - "description": "Description before the update." + "enum": [ + "incident", + "maintenance" + ], + "description": "Change type the template applies to: `incident` unplanned incident, `maintenance` planned maintenance." }, - "to_description": { + "status": { "type": "string", - "description": "Description after the update." + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "Change status the template maps to. Incidents use `investigating`/`identified`/`monitoring`/`resolved`; maintenances use `scheduled`/`ongoing`/`completed`." + }, + "description": { + "type": "string", + "description": "Template body text (Markdown)." + } + } + }, + "StatusPageMessageTemplate": { + "type": "object", + "description": "A message template: per-status notification texts for one change type. In `POST /status-page/template/upsert`, omit `template_id` to create and supply it to update; on update only non-empty fields are applied.", + "properties": { + "template_id": { + "type": "string", + "description": "Template ID. Omit to create a new template; supply to update an existing one." + }, + "title": { + "type": "string", + "description": "Template title." + }, + "type": { + "type": "string", + "enum": [ + "incident", + "maintenance" + ], + "description": "Change type the template applies to: `incident` unplanned incident, `maintenance` planned maintenance." + }, + "messages": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Notification text (Markdown) per event status. Keys are change statuses valid for the template's `type` (for example `investigating` or `resolved` for incidents); the value is the text used when the event reaches that status." + } + } + }, + "ListStatusPageTemplatesResponse": { + "type": "object", + "description": "Event template list. Item shape depends on the requested `type`: predefined event templates for `pre_defined`, message templates for `message`.", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/StatusPagePreDefinedTemplate" + }, + { + "$ref": "#/components/schemas/StatusPageMessageTemplate" + } + ] + }, + "description": "Templates of the requested category." } - }, - "title": "i_wi_updated" + } }, - "FeedDetailWorkItemAssigneesChanged": { + "FeedDetailAlertUpdate": { "type": "object", - "description": "Detail payload for `i_wi_assignees`.", + "title": "a_update", + "description": "Detail payload for `a_update`: severity/status after the update.", "properties": { - "work_item_id": { - "type": "string", - "description": "Work item ID." + "severity": { + "$ref": "#/components/schemas/FeedSeverity" }, - "item_type": { + "status": { + "$ref": "#/components/schemas/FeedSeverity" + } + } + }, + "FeedDetailAlertMuteBySilence": { + "type": "object", + "title": "a_m_silence", + "description": "Detail payload for `a_m_silence`: the alert was muted by a silence rule.", + "properties": { + "rule_id": { "type": "string", - "enum": [ - "action", - "follow_up" - ], - "description": "Work item type. `action`: an action item anchored to the incident itself; `follow_up`: an improvement item anchored to a post-mortem." + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Silence rule ID that muted the alert. Omitted when empty." }, - "title": { + "rule_name": { "type": "string", - "description": "Work item title." - }, - "assignee_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "Assignee member IDs after the change." - }, - "added_assignee_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "Member IDs added as assignees." - }, - "removed_assignee_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "Member IDs removed from assignees." + "description": "Silence rule name, resolved at read time. Omitted when empty." } - }, - "title": "i_wi_assignees" + } }, - "FeedDetailWorkItemCompleted": { + "FeedDetailAlertMuteByInhibit": { "type": "object", - "description": "Detail payload for `i_wi_completed`.", + "title": "a_m_inhibit", + "description": "Detail payload for `a_m_inhibit`: the alert was inhibited by an inhibit rule because of a source alert.", "properties": { - "work_item_id": { + "rule_id": { "type": "string", - "description": "Work item ID." + "pattern": "^[0-9a-fA-F]{24}$", + "description": "Inhibit rule ID that muted the alert. Omitted when empty." }, - "item_type": { + "rule_name": { "type": "string", - "enum": [ - "action", - "follow_up" - ], - "description": "Work item type. `action`: an action item anchored to the incident itself; `follow_up`: an improvement item anchored to a post-mortem." + "description": "Inhibit rule name, resolved at read time. Omitted when empty." }, - "title": { + "source_alert_id": { "type": "string", - "description": "Work item title." + "pattern": "^[0-9a-fA-F]{24}$", + "description": "ID of the source alert that triggered the inhibition. Omitted when empty." }, - "from_status": { + "source_alert_title": { "type": "string", - "description": "Status label before completion." + "description": "Title of the source alert, resolved at read time. Omitted when empty." + } + } + }, + "FeedDetailAlertMuteByFlapping": { + "type": "object", + "title": "a_m_flapping", + "description": "Detail payload for `a_m_flapping` (historical): the alert was muted by flapping detection.", + "properties": { + "max_changes": { + "type": "integer", + "description": "State-change count threshold that triggered flapping detection. Omitted when zero." }, - "to_status": { - "type": "string", - "description": "Status label after completion." + "in_secs": { + "type": "integer", + "description": "Window in seconds over which the state changes were counted. Omitted when zero." }, - "post_mortem_id": { - "type": "string", - "description": "ID of the post-mortem the work item is bound to." + "mute_secs": { + "type": "integer", + "description": "Mute duration in seconds. Omitted when zero." + } + } + }, + "FeedDetailAlertAck": { + "type": "object", + "title": "a_ack", + "description": "Detail payload for `a_ack` (historical). No fields.", + "properties": {} + }, + "FeedDetailAlertUnack": { + "type": "object", + "title": "a_unack", + "description": "Detail payload for `a_unack` (historical). No fields.", + "properties": {} + }, + "ScheduleByPersonRequest": { + "type": "object", + "description": "Member on-call status request", + "properties": { + "person_id": { + "type": "integer", + "description": "Member ID whose on-call status is returned.", + "format": "int64" } }, - "title": "i_wi_completed" + "required": [ + "person_id" + ] }, - "FeedDetailWorkItemConverted": { + "ScheduleByPersonResponse": { "type": "object", - "description": "Detail payload for `i_wi_converted`.", + "description": "The member's on-call status: the shift in progress, the next one, and every enabled schedule they participate in.", "properties": { - "work_item_id": { - "type": "string", - "description": "Work item ID." - }, - "title": { - "type": "string", - "description": "Work item title." - }, - "from_type": { - "type": "string", - "enum": [ - "action", - "follow_up" - ], - "description": "Work item type before the conversion. `action`: an action item anchored to the incident itself; `follow_up`: an improvement item anchored to a post-mortem. Conversion currently only supports `action` → `follow_up`, so `from_type` is always `action` in this event." - }, - "to_type": { - "type": "string", - "enum": [ - "action", - "follow_up" - ], - "description": "Work item type after the conversion. `action`: an action item anchored to the incident itself; `follow_up`: an improvement item anchored to a post-mortem. Conversion currently only supports `action` → `follow_up`, so `to_type` is always `follow_up` in this event, and a successful conversion immediately tries to bind the incident's post-mortem." + "current": { + "$ref": "#/components/schemas/MemberOncallInterval" }, - "post_mortem_id": { - "type": "string", - "description": "ID of the post-mortem the work item is bound to." + "next": { + "$ref": "#/components/schemas/MemberOncallInterval" }, - "status": { - "type": "string", - "description": "Work item status label after the conversion." + "schedules": { + "type": "array", + "description": "All enabled schedules the member participates in.", + "items": { + "$ref": "#/components/schemas/MemberScheduleItem" + } } }, - "title": "i_wi_converted" + "required": [ + "schedules" + ] }, - "FeedDetailWorkItemBound": { + "MemberScheduleItem": { "type": "object", - "description": "Detail payload for `i_wi_bound`.", + "description": "An enabled schedule the member participates in.", "properties": { - "work_item_id": { - "type": "string", - "description": "Work item ID." + "schedule_id": { + "type": "integer", + "description": "Schedule ID.", + "format": "int64" }, - "item_type": { + "schedule_name": { "type": "string", - "enum": [ - "action", - "follow_up" - ], - "description": "Work item type. `action`: an action item anchored to the incident itself; `follow_up`: an improvement item anchored to a post-mortem." + "description": "Schedule name." + } + } + }, + "MemberOncallInterval": { + "type": "object", + "description": "One on-call shift interval of a member.", + "properties": { + "schedule_id": { + "type": "integer", + "description": "Owning schedule ID.", + "format": "int64" }, - "title": { + "schedule_name": { "type": "string", - "description": "Work item title." + "description": "Owning schedule name." }, - "post_mortem_id": { - "type": "string", - "description": "ID of the post-mortem the work item is bound to." + "start_at": { + "type": "integer", + "description": "Unix timestamp in seconds - when the shift starts.", + "format": "int64" + }, + "end_at": { + "type": "integer", + "description": "Unix timestamp in seconds - when the shift ends. Absent while the shift is ongoing.", + "format": "int64" } - }, - "title": "i_wi_bound" + } }, - "FeedDetailWorkItemDeleted": { + "IntegrationTypeListRequest": { "type": "object", - "description": "Detail payload for `i_wi_deleted`.", + "description": "Filter parameters for listing integration types.", "properties": { - "work_item_id": { - "type": "string", - "description": "Work item ID." + "p": { + "type": "integer", + "minimum": 1, + "default": 1, + "description": "Page number, 1-based." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 20, + "description": "Page size. Defaults to 20, maximum 100." }, - "item_type": { + "orderby": { "type": "string", + "description": "Sort field. When omitted, types are returned in console ranking order.", "enum": [ - "action", - "follow_up" - ], - "description": "Work item type. `action`: an action item anchored to the incident itself; `follow_up`: an improvement item anchored to a post-mortem." + "id", + "created_at", + "updated_at", + "name", + "type" + ] }, - "title": { + "category": { "type": "string", - "description": "Work item title." + "description": "Filter by category. Accepts a comma-separated list, for example `event.alert,event.change`." }, - "post_mortem_id": { - "type": "string", - "description": "ID of the post-mortem the work item is bound to." + "asc": { + "type": [ + "boolean", + "null" + ], + "default": true, + "description": "Sort ascending when `true` (the default); descending when `false`." } - }, - "title": "i_wi_deleted" + } }, - "FeedDetailAlertMerge": { + "IntegrationTypeItem": { "type": "object", - "title": "a_merge", - "description": "Detail payload for `a_merge`: an alert merged into an incident.", + "description": "An integration type the account can configure.", + "required": [ + "plugin_type", + "plugin_type_name", + "plugin_type_logo_url", + "category", + "status", + "supports_api_create" + ], "properties": { - "comment": { + "plugin_type": { "type": "string", - "description": "Comment recorded with the merge. Omitted when empty." + "description": "Type identifier to pass as `plugin_type` when creating an integration.", + "example": "standard.alert" }, - "target_incident": { - "$ref": "#/components/schemas/IncidentShort", - "description": "Incident the alerts were merged into. Omitted when not recorded." + "plugin_type_name": { + "type": "string", + "description": "Display name of the type.", + "example": "Standard Alert" }, - "source_alerts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AlertShort" - }, - "description": "Source alerts merged into the target incident. Omitted when empty." + "plugin_type_logo_url": { + "type": "string", + "description": "Logo URL of the type." }, - "owner_id": { - "type": "integer", - "format": "int64", - "description": "New owner member ID set on the target incident. Omitted when unchanged." + "category": { + "type": "string", + "description": "Category the type belongs to.", + "enum": [ + "event.alert", + "event.change", + "im", + "webhook" + ] }, - "title": { + "status": { "type": "string", - "description": "New title set on the target incident. Omitted when unchanged." + "description": "Platform status of the type." + }, + "supports_api_create": { + "type": "boolean", + "description": "Whether `POST /integration/create` accepts this type." } } }, - "AlertShort": { + "ListIntegrationTypesResponse": { "type": "object", - "description": "Brief alert reference.", + "description": "A page of integration types.", + "required": [ + "p", + "limit", + "total", + "items" + ], "properties": { - "alert_id": { - "type": "string", - "pattern": "^[0-9a-fA-F]{24}$", - "description": "Alert ID (ObjectID hex string)." + "p": { + "type": "integer", + "description": "Page number echoed back." }, - "title": { - "type": "string", - "description": "Alert title, resolved at read time. Omitted when empty." + "limit": { + "type": "integer", + "description": "Page size echoed back." + }, + "total": { + "type": "integer", + "format": "int64", + "description": "Total number of matching types." + }, + "items": { + "type": "array", + "description": "Integration types on the current page.", + "items": { + "$ref": "#/components/schemas/IntegrationTypeItem" + } } } }, - "EventGroup": { + "ListIntegrationsRequest": { "type": "object", - "description": "Alert event merge configuration. When enabled, repeated incoming events of the same alert are merged into the existing alert within the time window instead of creating new alerts.", + "description": "Filter parameters for listing integrations.", "properties": { - "is_enabled": { - "type": "boolean", - "description": "When true, repeated events merge into the existing alert; when false, every event creates a separate alert. Defaults to true." + "p": { + "type": "integer", + "minimum": 1, + "default": 1, + "description": "Page number, 1-based." }, - "time_window": { + "limit": { "type": "integer", "minimum": 1, - "description": "Merge window in minutes, 1-1440 (24 h); accounts with the extended limit may use up to 10080 (7 days). Defaults to 1440." - } - } - }, - "StatusPageInfoResponse": { - "type": "object", - "description": "Status page detail returned by `GET /status-page/info`: the full page configuration plus feature flags.", - "allOf": [ - { - "$ref": "#/components/schemas/StatusPageItem" + "maximum": 100, + "default": 20, + "description": "Page size. Defaults to 20, maximum 100." }, - { - "type": "object", - "properties": { - "managed_domain_feature_enabled": { - "type": "boolean", - "description": "Whether the managed custom-domain feature is enabled for this page. `true` for public pages, always `false` for internal pages." - } - }, - "required": [ - "managed_domain_feature_enabled" - ] - } - ] - }, - "StatusPagePreDefinedTemplate": { - "type": "object", - "description": "A predefined event template: a reusable draft of an event's title, type, status, and description. In `POST /status-page/template/upsert`, omit `template_id` to create and supply it to update; on update only non-empty fields are applied.", - "properties": { - "template_id": { + "orderby": { "type": "string", - "description": "Template ID. Omit to create a new template; supply to update an existing one." + "description": "Sort field. Defaults to `created_at`; `plugin_type` is sorted by the underlying plugin.", + "enum": [ + "created_at", + "updated_at", + "name", + "plugin_type", + "status" + ] }, - "title": { + "category": { "type": "string", - "description": "Template title." + "description": "Filter by category. Accepts a comma-separated list." }, "type": { "type": "string", - "enum": [ - "incident", - "maintenance" - ], - "description": "Change type the template applies to: `incident` unplanned incident, `maintenance` planned maintenance." + "description": "Deprecated. Merged into `plugin_type` when both are set." + }, + "plugin_type": { + "type": "string", + "description": "Filter by integration type. Accepts a comma-separated list." }, "status": { "type": "string", - "enum": [ - "investigating", - "identified", - "monitoring", - "resolved", - "scheduled", - "ongoing", - "completed" - ], - "description": "Change status the template maps to. Incidents use `investigating`/`identified`/`monitoring`/`resolved`; maintenances use `scheduled`/`ongoing`/`completed`." + "description": "Filter by status. Accepts a comma-separated list." }, - "description": { + "name": { "type": "string", - "description": "Template body text (Markdown)." + "description": "Filter by integration name." + }, + "ref_ids": { + "type": "array", + "description": "Filter by source reference IDs. Each value must start with `c_` (channel), `a_` (account) or `w_`.", + "items": { + "type": "string" + } + }, + "asc": { + "type": "boolean", + "description": "Sort ascending when true, descending when false." + }, + "is_my_team": { + "type": "boolean", + "description": "Limit the result to integrations owned by your teams." + }, + "team_ids": { + "type": "array", + "description": "Filter by team IDs. With `is_my_team`, the values narrow that set further.", + "items": { + "type": "integer", + "format": "int64" + } } } }, - "StatusPageMessageTemplate": { + "IntegrationItem": { "type": "object", - "description": "A message template: per-status notification texts for one change type. In `POST /status-page/template/upsert`, omit `template_id` to create and supply it to update; on update only non-empty fields are applied.", + "description": "A configured integration. Timestamps are Unix epoch seconds.", + "required": [ + "integration_id", + "team_id", + "plugin_type", + "plugin_type_name", + "category", + "name", + "description", + "status", + "ref_id", + "created_at", + "updated_at", + "last_time" + ], "properties": { - "template_id": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "ID of the team that owns the integration. `0` when it is not assigned to a team." + }, + "plugin_type": { "type": "string", - "description": "Template ID. Omit to create a new template; supply to update an existing one." + "description": "Integration type, for example `standard.alert` or `zabbix.alert`." }, - "title": { + "plugin_type_name": { "type": "string", - "description": "Template title." + "description": "Display name of the integration type, in the language of the request." }, - "type": { + "category": { "type": "string", "enum": [ - "incident", - "maintenance" + "event.alert", + "event.change", + "im", + "webhook" ], - "description": "Change type the template applies to: `incident` unplanned incident, `maintenance` planned maintenance." + "description": "Category the integration belongs to." }, - "messages": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Notification text (Markdown) per event status. Keys are change statuses valid for the template's `type` (for example `investigating` or `resolved` for incidents); the value is the text used when the event reaches that status." + "name": { + "type": "string", + "description": "Integration name." + }, + "description": { + "type": "string", + "description": "Free-form description." + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "Lifecycle status: `enabled` while the integration accepts events, `disabled` when it is paused." + }, + "ref_id": { + "type": "string", + "description": "Source reference ID: `a_`-prefixed for an account-scoped integration, `c_`-prefixed when it is shared into a channel." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds when the integration was created." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds when the integration was last updated." + }, + "last_time": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds of the most recent event received. `0` when no event has arrived yet." } } }, - "ListStatusPageTemplatesResponse": { + "ListIntegrationsResponse": { "type": "object", - "description": "Event template list. Item shape depends on the requested `type`: predefined event templates for `pre_defined`, message templates for `message`.", + "description": "A page of integrations.", "required": [ + "p", + "limit", + "total", "items" ], "properties": { + "p": { + "type": "integer", + "description": "Page number echoed back." + }, + "limit": { + "type": "integer", + "description": "Page size echoed back." + }, + "total": { + "type": "integer", + "format": "int64", + "description": "Total number of matching integrations." + }, "items": { "type": "array", + "description": "Integrations on the current page.", "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/StatusPagePreDefinedTemplate" - }, - { - "$ref": "#/components/schemas/StatusPageMessageTemplate" - } - ] - }, - "description": "Templates of the requested category." + "$ref": "#/components/schemas/IntegrationItem" + } } } }, - "FeedDetailAlertUpdate": { + "GetIntegrationRequest": { "type": "object", - "title": "a_update", - "description": "Detail payload for `a_update`: severity/status after the update.", + "description": "Identifies one integration.", + "required": [ + "integration_id" + ], "properties": { - "severity": { - "$ref": "#/components/schemas/FeedSeverity" - }, - "status": { - "$ref": "#/components/schemas/FeedSeverity" + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "Integration ID.", + "example": 6113996590131 } } }, - "FeedDetailAlertMuteBySilence": { + "IntegrationDetail": { "type": "object", - "title": "a_m_silence", - "description": "Detail payload for `a_m_silence`: the alert was muted by a silence rule.", + "description": "A single integration with its full settings. Timestamps are Unix epoch seconds.", + "required": [ + "integration_id", + "team_id", + "plugin_type", + "plugin_type_name", + "category", + "name", + "description", + "status", + "ref_id", + "created_at", + "updated_at", + "last_time", + "settings" + ], "properties": { - "rule_id": { - "type": "string", - "pattern": "^[0-9a-fA-F]{24}$", - "description": "Silence rule ID that muted the alert. Omitted when empty." - }, - "rule_name": { - "type": "string", - "description": "Silence rule name, resolved at read time. Omitted when empty." + "integration_id": [ + { + "type": "integer", + "format": "int64", + "description": "Integration ID." + }, + true + ], + "team_id": [ + { + "type": "integer", + "format": "int64", + "description": "ID of the team that owns the integration. `0` when it is not assigned to a team." + }, + true + ], + "plugin_type": [ + { + "type": "string", + "description": "Integration type, for example `standard.alert` or `zabbix.alert`." + }, + true + ], + "plugin_type_name": [ + { + "type": "string", + "description": "Display name of the integration type, in the language of the request." + }, + true + ], + "category": [ + { + "type": "string", + "enum": [ + "event.alert", + "event.change", + "im", + "webhook" + ], + "description": "Category the integration belongs to." + }, + true + ], + "name": [ + { + "type": "string", + "description": "Integration name." + }, + true + ], + "description": [ + { + "type": "string", + "description": "Free-form description." + }, + true + ], + "status": [ + { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "Lifecycle status: `enabled` while the integration accepts events, `disabled` when it is paused." + }, + true + ], + "ref_id": [ + { + "type": "string", + "description": "Source reference ID: `a_`-prefixed for an account-scoped integration, `c_`-prefixed when it is shared into a channel." + }, + true + ], + "created_at": [ + { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds when the integration was created." + }, + true + ], + "updated_at": [ + { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds when the integration was last updated." + }, + true + ], + "last_time": [ + { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds of the most recent event received. `0` when no event has arrived yet." + }, + true + ], + "settings": { + "type": "object", + "additionalProperties": true, + "description": "Type-specific configuration. Sensitive values (endpoint, headers, secrets, passwords) are returned masked as `******`." } } }, - "FeedDetailAlertMuteByInhibit": { + "CreateIntegrationRequest": { "type": "object", - "title": "a_m_inhibit", - "description": "Detail payload for `a_m_inhibit`: the alert was inhibited by an inhibit rule because of a source alert.", + "description": "Payload for creating an integration.", + "required": [ + "plugin_type" + ], "properties": { - "rule_id": { + "plugin_type": { "type": "string", - "pattern": "^[0-9a-fA-F]{24}$", - "description": "Inhibit rule ID that muted the alert. Omitted when empty." + "description": "Integration type. Must be one listed by `POST /integration/type/list` with `supports_api_create: true`.", + "example": "standard.alert" }, - "rule_name": { + "name": { "type": "string", - "description": "Inhibit rule name, resolved at read time. Omitted when empty." + "minLength": 2, + "maxLength": 49, + "description": "Integration name. 2–49 characters.", + "example": "Prod metrics alerts" }, - "source_alert_id": { + "description": { "type": "string", - "pattern": "^[0-9a-fA-F]{24}$", - "description": "ID of the source alert that triggered the inhibition. Omitted when empty." + "maxLength": 499, + "description": "Free-form description, at most 499 characters." }, - "source_alert_title": { - "type": "string", - "description": "Title of the source alert, resolved at read time. Omitted when empty." + "team_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "Owning team ID.", + "example": 1467226103121 + }, + "settings": { + "type": "object", + "description": "Type-specific configuration; the accepted keys depend on `plugin_type`.", + "additionalProperties": true } } }, - "FeedDetailAlertMuteByFlapping": { + "CreateIntegrationResponse": { "type": "object", - "title": "a_m_flapping", - "description": "Detail payload for `a_m_flapping` (historical): the alert was muted by flapping detection.", + "description": "The created integration and its key.", + "required": [ + "integration_id", + "integration_key" + ], "properties": { - "max_changes": { - "type": "integer", - "description": "State-change count threshold that triggered flapping detection. Omitted when zero." - }, - "in_secs": { + "integration_id": { "type": "integer", - "description": "Window in seconds over which the state changes were counted. Omitted when zero." + "format": "int64", + "description": "ID of the new integration.", + "example": 6113996590131 }, - "mute_secs": { - "type": "integer", - "description": "Mute duration in seconds. Omitted when zero." + "integration_key": { + "type": "string", + "description": "Key used to authenticate inbound pushes to this integration. Returned here only; fetch a new one with `POST /integration/key/rotate`.", + "example": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" } } }, - "FeedDetailAlertAck": { - "type": "object", - "title": "a_ack", - "description": "Detail payload for `a_ack` (historical). No fields.", - "properties": {} - }, - "FeedDetailAlertUnack": { - "type": "object", - "title": "a_unack", - "description": "Detail payload for `a_unack` (historical). No fields.", - "properties": {} - }, - "ScheduleByPersonRequest": { + "UpdateIntegrationRequest": { "type": "object", - "description": "Member on-call status request", - "properties": { - "person_id": { - "type": "integer", - "description": "Member ID whose on-call status is returned.", - "format": "int64" - } - }, + "description": "Payload for updating an integration. Only the fields you send are changed.", "required": [ - "person_id" - ] - }, - "ScheduleByPersonResponse": { - "type": "object", - "description": "The member's on-call status: the shift in progress, the next one, and every enabled schedule they participate in.", + "integration_id" + ], "properties": { - "current": { - "$ref": "#/components/schemas/MemberOncallInterval" + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "Integration ID.", + "example": 6113996590131 }, - "next": { - "$ref": "#/components/schemas/MemberOncallInterval" + "name": { + "type": [ + "string", + "null" + ], + "minLength": 2, + "maxLength": 49, + "description": "New name, 2–49 characters." }, - "schedules": { - "type": "array", - "description": "All enabled schedules the member participates in.", - "items": { - "$ref": "#/components/schemas/MemberScheduleItem" - } + "description": { + "type": [ + "string", + "null" + ], + "maxLength": 499, + "description": "New description, at most 499 characters." + }, + "team_id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "minimum": 0, + "description": "New owning team ID; `0` clears the team assignment." + }, + "settings": { + "type": [ + "object", + "null" + ], + "description": "Replacement configuration for the integration type. Sensitive entries left out, or sent back as the masked `******`, keep their stored value.", + "additionalProperties": true } - }, - "required": [ - "schedules" - ] + } }, - "MemberScheduleItem": { + "IntegrationLifecycleRequest": { "type": "object", - "description": "An enabled schedule the member participates in.", + "description": "Identifies the integration to act on.", + "required": [ + "integration_id" + ], "properties": { - "schedule_id": { + "integration_id": { "type": "integer", - "description": "Schedule ID.", - "format": "int64" - }, - "schedule_name": { - "type": "string", - "description": "Schedule name." + "format": "int64", + "minimum": 1, + "description": "Integration ID.", + "example": 6113996590131 } } }, - "MemberOncallInterval": { + "RotateIntegrationKeyResponse": { "type": "object", - "description": "One on-call shift interval of a member.", + "description": "The newly issued integration key.", + "required": [ + "integration_key" + ], "properties": { - "schedule_id": { - "type": "integer", - "description": "Owning schedule ID.", - "format": "int64" - }, - "schedule_name": { + "integration_key": { "type": "string", - "description": "Owning schedule name." - }, - "start_at": { - "type": "integer", - "description": "Unix timestamp in seconds - when the shift starts.", - "format": "int64" - }, - "end_at": { - "type": "integer", - "description": "Unix timestamp in seconds - when the shift ends. Absent while the shift is ongoing.", - "format": "int64" + "description": "The new key. The previous key stops working immediately; this value cannot be read again later.", + "example": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" } } } diff --git a/api-reference/on-call.openapi.zh.json b/api-reference/on-call.openapi.zh.json index 3d49ef29..5cc26c1f 100644 --- a/api-reference/on-call.openapi.zh.json +++ b/api-reference/on-call.openapi.zh.json @@ -17411,6 +17411,745 @@ } } } + }, + "/integration/type/list": { + "post": { + "operationId": "integration-api-read-type-list", + "summary": "查询集成类型列表", + "description": "查询当前账户可配置的集成类型列表。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心查看**(`on-call`) |\n\n## 使用说明\n\n- 不传 `orderby` 时按控制台排序返回,此时 `p`/`limit` 依然生效。\n- `supports_api_create` 表示该类型能否通过 `POST /integration/create` 创建。", + "href": "/zh/api-reference/on-call/integrations/integration-api-read-type-list", + "metadata": { + "sidebarTitle": "查询集成类型列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListIntegrationTypesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "p": 1, + "limit": 20, + "total": 2, + "items": [ + { + "plugin_type": "standard.alert", + "plugin_type_name": "Standard Alert", + "plugin_type_logo_url": "https://cdn.flashcat.cloud/plugin/standard-alert.svg", + "category": "event.alert", + "status": "enabled", + "supports_api_create": true + }, + { + "plugin_type": "jira.change", + "plugin_type_name": "Jira", + "plugin_type_logo_url": "https://cdn.flashcat.cloud/plugin/jira.svg", + "category": "event.change", + "status": "enabled", + "supports_api_create": 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/IntegrationTypeListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "category": "event.alert" + } + } + } + } + } + }, + "/integration/list": { + "post": { + "operationId": "integration-api-read-list", + "summary": "查询集成列表", + "description": "查询当前账户的告警源与变更源集成列表。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心查看**(`on-call`) |\n\n## 使用说明\n\n- `orderby` 默认 `created_at`;`plugin_type` 按底层插件排序。\n- `plugin_type`、`status`、`category` 支持逗号分隔多值;`ref_ids` 每个值必须以 `c_`、`a_` 或 `w_` 开头。\n- 传入 `is_my_team` 时仅返回你所在团队的集成,`team_ids` 会在该范围内进一步收窄。", + "href": "/zh/api-reference/on-call/integrations/integration-api-read-list", + "metadata": { + "sidebarTitle": "查询集成列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListIntegrationsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "p": 1, + "limit": 20, + "total": 1, + "items": [ + { + "integration_id": 6113996590131, + "team_id": 1467226103121, + "plugin_type": "standard.alert", + "plugin_type_name": "Standard Alert", + "category": "event.alert", + "name": "Prod metrics alerts", + "description": "Alerts pushed by the production Prometheus stack", + "status": "enabled", + "ref_id": "a_6612f0c9e1b7a4d3508f2c6b", + "created_at": 1775116800, + "updated_at": 1775203200, + "last_time": 1775298600 + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListIntegrationsRequest" + }, + "example": { + "p": 1, + "limit": 20, + "status": "enabled" + } + } + } + } + } + }, + "/integration/info": { + "post": { + "operationId": "integration-api-read-info", + "summary": "查询集成详情", + "description": "查询单个集成详情,敏感配置以打码形式返回。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心查看**(`on-call`) |\n\n## 使用说明\n\n- 敏感配置(endpoint、headers、密钥、密码)均以 `******` 打码返回。", + "href": "/zh/api-reference/on-call/integrations/integration-api-read-info", + "metadata": { + "sidebarTitle": "查询集成详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/IntegrationDetail" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "team_id": 1467226103121, + "plugin_type": "standard.alert", + "plugin_type_name": "Standard Alert", + "category": "event.alert", + "name": "Prod metrics alerts", + "description": "Alerts pushed by the production Prometheus stack", + "status": "enabled", + "ref_id": "a_6612f0c9e1b7a4d3508f2c6b", + "created_at": 1775116800, + "updated_at": 1775203200, + "last_time": 1775298600, + "settings": { + "severity_mapping": [ + { + "P1": "Critical" + } + ], + "labels": { + "source": "prometheus" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetIntegrationRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/integration/create": { + "post": { + "operationId": "integration-api-write-create", + "summary": "创建集成", + "description": "为某个告警源或变更源创建集成。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- `plugin_type` 必须是 `POST /integration/type/list` 中 `supports_api_create: true` 的类型,否则返回 `InvalidParameter`。\n- `integration_key` 仅在创建时返回一次,请及时保存;`POST /integration/info` 不会返回该字段。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/integrations/integration-api-write-create", + "metadata": { + "sidebarTitle": "创建集成" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CreateIntegrationResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "integration_key": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateIntegrationRequest" + }, + "example": { + "plugin_type": "standard.alert", + "name": "Prod metrics alerts", + "description": "Alerts pushed by the production Prometheus stack", + "team_id": 1467226103121, + "settings": { + "severity_mapping": [ + { + "P1": "Critical" + } + ] + } + } + } + } + } + } + }, + "/integration/update": { + "post": { + "operationId": "integration-api-write-update", + "summary": "更新集成", + "description": "更新集成的名称、描述、所属团队或配置。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 仅发送的字段会被修改,未发送的字段保持原值。\n- `settings` 会整体替换已存储的配置;敏感字段不传、或原样回传打码值 `******`,都会保留已存储的值。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/integrations/integration-api-write-update", + "metadata": { + "sidebarTitle": "更新集成" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/IntegrationDetail" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "team_id": 1467226103121, + "plugin_type": "standard.alert", + "plugin_type_name": "Standard Alert", + "category": "event.alert", + "name": "Prod metrics alerts (primary)", + "description": "Alerts pushed by the production Prometheus stack", + "status": "enabled", + "ref_id": "a_6612f0c9e1b7a4d3508f2c6b", + "created_at": 1775116800, + "updated_at": 1775298600, + "last_time": 1775298600, + "settings": { + "severity_mapping": [ + { + "P1": "Critical" + } + ], + "labels": { + "source": "prometheus" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateIntegrationRequest" + }, + "example": { + "integration_id": 6113996590131, + "name": "Prod metrics alerts (primary)", + "team_id": 1467226103121 + } + } + } + } + } + }, + "/integration/delete": { + "post": { + "operationId": "integration-api-write-delete", + "summary": "删除集成", + "description": "删除指定的集成。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 若该集成仍被其他对象引用,删除会返回 HTTP 400,`error.code` 为 `ReferenceExist`,`data.refs` 列出引用方。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/integrations/integration-api-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" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationLifecycleRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/integration/enable": { + "post": { + "operationId": "integration-api-write-enable", + "summary": "启用集成", + "description": "重新启用已禁用的集成,恢复接收事件。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 启用会恢复该集成的拉取任务与心跳,并要求当前套餐包含该集成类型。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/integrations/integration-api-write-enable", + "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" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationLifecycleRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/integration/disable": { + "post": { + "operationId": "integration-api-write-disable", + "summary": "禁用集成", + "description": "禁用集成,但保留其配置。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 禁用后停止接收事件并暂停定时拉取任务,配置保留,可再次启用。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/integrations/integration-api-write-disable", + "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" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationLifecycleRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/integration/key/rotate": { + "post": { + "operationId": "integration-api-write-rotate-key", + "summary": "轮换集成 Key", + "description": "生成新的集成 Key,并使旧 Key 立即失效。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 旧 Key 会立即失效,请先更新推送侧再轮换。\n- 新 Key 只返回一次,之后无法再次读取。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/integrations/integration-api-write-rotate-key", + "metadata": { + "sidebarTitle": "轮换集成 Key" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RotateIntegrationKeyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_key": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationLifecycleRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } } }, "components": { @@ -28532,6 +29271,14 @@ "type": "boolean", "description": "飞书应用卡片展示「创建作战室」按钮。" }, + "dingtalk_app_war_room_enabled": { + "type": "boolean", + "description": "钉钉应用卡片展示「创建作战室」按钮。" + }, + "slack_app_war_room_enabled": { + "type": "boolean", + "description": "Slack 应用卡片展示「创建作战室」按钮。" + }, "dingtalk_app": { "type": "string", "description": "钉钉应用消息模板源。" @@ -28636,6 +29383,8 @@ "wecom_markdown_v2_enabled", "feishu_app_card_v2_preserve_blank_lines", "feishu_app_war_room_enabled", + "dingtalk_app_war_room_enabled", + "slack_app_war_room_enabled", "dingtalk_app", "wecom_app", "slack_app", @@ -28720,6 +29469,14 @@ "type": "boolean", "description": "飞书应用卡片是否展示「创建作战室」按钮;故障无响应人时不展示。" }, + "dingtalk_app_war_room_enabled": { + "type": "boolean", + "description": "钉钉应用卡片是否展示「创建作战室」按钮;故障已关闭或无响应人时不展示。" + }, + "slack_app_war_room_enabled": { + "type": "boolean", + "description": "Slack 应用卡片是否展示「创建作战室」按钮;故障已关闭或无响应人时不展示。" + }, "dingtalk_app": { "type": "string", "description": "钉钉应用消息模板源。" @@ -29003,6 +29760,20 @@ ], "description": "设置后决定飞书应用卡片是否展示「创建作战室」按钮;省略时保持当前设置。" }, + "dingtalk_app_war_room_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "设置后决定钉钉应用卡片是否展示「创建作战室」按钮;省略时保持当前设置。" + }, + "slack_app_war_room_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "设置后决定 Slack 应用卡片是否展示「创建作战室」按钮;省略时保持当前设置。" + }, "dingtalk_app": { "type": [ "string", @@ -32992,46 +33763,257 @@ }, "incident_id": { "type": "string", - "pattern": "^[0-9a-fA-F]{24}$", - "description": "故障 ID(MongoDB ObjectID),其已转化但未绑定的后续行动将被绑定。" + "pattern": "^[0-9a-fA-F]{24}$", + "description": "故障 ID(MongoDB ObjectID),其已转化但未绑定的后续行动将被绑定。" + }, + "idempotency_key": { + "type": "string", + "maxLength": 128, + "pattern": "^[A-Za-z0-9_\\-.:]+$", + "description": "客户端生成的幂等键(最长 128 字符;仅限字母、数字、`_`、`-`、`.`、`:`)。" + } + } + }, + "IncidentCommentTypeDisplay": { + "type": "object", + "description": "账户级评论类型的解析后展示信息,读取时根据当前类型定义填充。", + "required": [ + "id", + "name", + "color" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "评论类型 ID(MongoDB ObjectID)。" + }, + "name": { + "type": "string", + "maxLength": 40, + "description": "评论类型展示名称。" + }, + "color": { + "type": "string", + "pattern": "^#[0-9A-Fa-f]{6}$", + "description": "徽标颜色,#RRGGBB 格式。" + } + } + }, + "FeedDetailWorkItemCreated": { + "type": "object", + "description": "`i_wi_created` 的 detail 载荷。", + "properties": { + "work_item_id": { + "type": "string", + "description": "跟进事项 ID。" + }, + "item_type": { + "type": "string", + "enum": [ + "action", + "follow_up" + ], + "description": "跟进事项类型。`action`:挂在故障上的处置行动事项,可直接转换为 `follow_up`;`follow_up`:挂在故障复盘(Post-mortem)上的改进事项,创建时要求故障已关联到该复盘。" + }, + "title": { + "type": "string", + "description": "跟进事项标题。" + }, + "status": { + "type": "string", + "description": "跟进事项状态标签(如 `open`、`done`)。" + }, + "assignee_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "负责人成员 ID 列表。" + }, + "post_mortem_id": { + "type": "string", + "description": "跟进事项绑定的故障复盘 ID。" + } + }, + "title": "i_wi_created" + }, + "FeedDetailWorkItemUpdated": { + "type": "object", + "description": "`i_wi_updated` 的 detail 载荷。仅发生变化的字段携带 `from_*`/`to_*` 值。", + "properties": { + "work_item_id": { + "type": "string", + "description": "跟进事项 ID。" + }, + "item_type": { + "type": "string", + "enum": [ + "action", + "follow_up" + ], + "description": "跟进事项类型。`action`:挂在故障上的处置行动事项;`follow_up`:挂在故障复盘(Post-mortem)上的改进事项。" + }, + "title": { + "type": "string", + "description": "跟进事项标题。" + }, + "from_title": { + "type": "string", + "description": "更新前的标题。" + }, + "from_status": { + "type": "string", + "description": "更新前的状态标签。" + }, + "to_status": { + "type": "string", + "description": "更新后的状态标签。" + }, + "from_priority": { + "type": "string", + "description": "更新前的优先级标签。" + }, + "to_priority": { + "type": "string", + "description": "更新后的优先级标签。" + }, + "from_description": { + "type": "string", + "description": "更新前的描述。" + }, + "to_description": { + "type": "string", + "description": "更新后的描述。" + } + }, + "title": "i_wi_updated" + }, + "FeedDetailWorkItemAssigneesChanged": { + "type": "object", + "description": "`i_wi_assignees` 的 detail 载荷。", + "properties": { + "work_item_id": { + "type": "string", + "description": "跟进事项 ID。" + }, + "item_type": { + "type": "string", + "enum": [ + "action", + "follow_up" + ], + "description": "跟进事项类型。`action`:挂在故障上的处置行动事项;`follow_up`:挂在故障复盘(Post-mortem)上的改进事项。" + }, + "title": { + "type": "string", + "description": "跟进事项标题。" + }, + "assignee_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "变更后的负责人成员 ID 列表。" + }, + "added_assignee_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "新增为负责人的成员 ID。" + }, + "removed_assignee_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "从负责人中移除的成员 ID。" + } + }, + "title": "i_wi_assignees" + }, + "FeedDetailWorkItemCompleted": { + "type": "object", + "description": "`i_wi_completed` 的 detail 载荷。", + "properties": { + "work_item_id": { + "type": "string", + "description": "跟进事项 ID。" + }, + "item_type": { + "type": "string", + "enum": [ + "action", + "follow_up" + ], + "description": "跟进事项类型。`action`:挂在故障上的处置行动事项;`follow_up`:挂在故障复盘(Post-mortem)上的改进事项。" + }, + "title": { + "type": "string", + "description": "跟进事项标题。" + }, + "from_status": { + "type": "string", + "description": "完成前的状态标签。" + }, + "to_status": { + "type": "string", + "description": "完成后的状态标签。" }, - "idempotency_key": { + "post_mortem_id": { "type": "string", - "maxLength": 128, - "pattern": "^[A-Za-z0-9_\\-.:]+$", - "description": "客户端生成的幂等键(最长 128 字符;仅限字母、数字、`_`、`-`、`.`、`:`)。" + "description": "跟进事项绑定的故障复盘 ID。" } - } + }, + "title": "i_wi_completed" }, - "IncidentCommentTypeDisplay": { + "FeedDetailWorkItemConverted": { "type": "object", - "description": "账户级评论类型的解析后展示信息,读取时根据当前类型定义填充。", - "required": [ - "id", - "name", - "color" - ], + "description": "`i_wi_converted` 的 detail 载荷。", "properties": { - "id": { + "work_item_id": { "type": "string", - "pattern": "^[0-9a-fA-F]{24}$", - "description": "评论类型 ID(MongoDB ObjectID)。" + "description": "跟进事项 ID。" }, - "name": { + "title": { "type": "string", - "maxLength": 40, - "description": "评论类型展示名称。" + "description": "跟进事项标题。" }, - "color": { + "from_type": { "type": "string", - "pattern": "^#[0-9A-Fa-f]{6}$", - "description": "徽标颜色,#RRGGBB 格式。" + "enum": [ + "action", + "follow_up" + ], + "description": "转化前的事项类型。`action`:挂在故障上的处置行动事项;`follow_up`:挂在故障复盘(Post-mortem)上的改进事项。当前转换方向仅支持 `action` → `follow_up`,因此该事件中 `from_type` 恒为 `action`。" + }, + "to_type": { + "type": "string", + "enum": [ + "action", + "follow_up" + ], + "description": "转化后的事项类型。`action`:挂在故障上的处置行动事项;`follow_up`:挂在故障复盘(Post-mortem)上的改进事项。当前转换方向仅支持 `action` → `follow_up`,因此该事件中 `to_type` 恒为 `follow_up`,且转换成功后会立即尝试绑定故障对应的复盘。" + }, + "post_mortem_id": { + "type": "string", + "description": "跟进事项绑定的故障复盘 ID。" + }, + "status": { + "type": "string", + "description": "转化后的事项状态标签。" } - } + }, + "title": "i_wi_converted" }, - "FeedDetailWorkItemCreated": { + "FeedDetailWorkItemBound": { "type": "object", - "description": "`i_wi_created` 的 detail 载荷。", + "description": "`i_wi_bound` 的 detail 载荷。", "properties": { "work_item_id": { "type": "string", @@ -33043,34 +34025,22 @@ "action", "follow_up" ], - "description": "跟进事项类型。`action`:挂在故障上的处置行动事项,可直接转换为 `follow_up`;`follow_up`:挂在故障复盘(Post-mortem)上的改进事项,创建时要求故障已关联到该复盘。" + "description": "跟进事项类型。`action`:挂在故障上的处置行动事项;`follow_up`:挂在故障复盘(Post-mortem)上的改进事项。" }, "title": { "type": "string", "description": "跟进事项标题。" }, - "status": { - "type": "string", - "description": "跟进事项状态标签(如 `open`、`done`)。" - }, - "assignee_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "负责人成员 ID 列表。" - }, "post_mortem_id": { "type": "string", "description": "跟进事项绑定的故障复盘 ID。" } }, - "title": "i_wi_created" + "title": "i_wi_bound" }, - "FeedDetailWorkItemUpdated": { + "FeedDetailWorkItemDeleted": { "type": "object", - "description": "`i_wi_updated` 的 detail 载荷。仅发生变化的字段携带 `from_*`/`to_*` 值。", + "description": "`i_wi_deleted` 的 detail 载荷。", "properties": { "work_item_id": { "type": "string", @@ -33088,543 +34058,932 @@ "type": "string", "description": "跟进事项标题。" }, - "from_title": { + "post_mortem_id": { "type": "string", - "description": "更新前的标题。" + "description": "跟进事项绑定的故障复盘 ID。" + } + }, + "title": "i_wi_deleted" + }, + "FeedDetailAlertMerge": { + "type": "object", + "title": "a_merge", + "description": "`a_merge` 的详情数据:告警被合并到故障。", + "properties": { + "comment": { + "type": "string", + "description": "合并时记录的评论。为空时不返回。" }, - "from_status": { + "target_incident": { + "$ref": "#/components/schemas/IncidentShort", + "description": "告警合并到的目标故障。未记录时不返回。" + }, + "source_alerts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertShort" + }, + "description": "被合并进目标故障的源告警。为空时不返回。" + }, + "owner_id": { + "type": "integer", + "format": "int64", + "description": "目标故障被设置的新负责人成员 ID。未变更时不返回。" + }, + "title": { "type": "string", - "description": "更新前的状态标签。" + "description": "目标故障被设置的新标题。未变更时不返回。" + } + } + }, + "AlertShort": { + "type": "object", + "description": "告警简要引用。", + "properties": { + "alert_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "告警 ID(ObjectID 十六进制字符串)。" }, - "to_status": { + "title": { "type": "string", - "description": "更新后的状态标签。" + "description": "告警标题,读取时解析填充。为空时不返回。" + } + } + }, + "EventGroup": { + "type": "object", + "description": "告警事件合并配置。启用后,同一告警的重复事件会在时间窗口内并入已有告警,而不是新建告警。", + "properties": { + "is_enabled": { + "type": "boolean", + "description": "为 true 时,重复事件并入已有告警;为 false 时,每个事件都单独生成告警。默认为 true。" }, - "from_priority": { + "time_window": { + "type": "integer", + "minimum": 1, + "description": "合并窗口,单位分钟,范围 1-1440(24 小时);开通扩展额度的账号最大可设 10080(7 天)。默认 1440。" + } + } + }, + "StatusPageInfoResponse": { + "type": "object", + "description": "`GET /status-page/info` 返回的状态页详情:完整页面配置及特性开关。", + "allOf": [ + { + "$ref": "#/components/schemas/StatusPageItem" + }, + { + "type": "object", + "properties": { + "managed_domain_feature_enabled": { + "type": "boolean", + "description": "该页面是否启用托管自定义域名特性。公开页面为 `true`,内部页面恒为 `false`。" + } + }, + "required": [ + "managed_domain_feature_enabled" + ] + } + ] + }, + "StatusPagePreDefinedTemplate": { + "type": "object", + "description": "预定义事件模板:可复用的事件草稿(标题、类型、状态、描述)。在 `POST /status-page/template/upsert` 中,省略 `template_id` 表示创建,提供则表示更新;更新时仅应用非空字段。", + "properties": { + "template_id": { "type": "string", - "description": "更新前的优先级标签。" + "description": "模板 ID。省略表示创建新模板;提供表示更新已有模板。" }, - "to_priority": { + "title": { "type": "string", - "description": "更新后的优先级标签。" + "description": "模板标题。" }, - "from_description": { + "type": { "type": "string", - "description": "更新前的描述。" + "enum": [ + "incident", + "maintenance" + ], + "description": "模板适用的事件类型:`incident` 故障,`maintenance` 计划维护。" }, - "to_description": { + "status": { "type": "string", - "description": "更新后的描述。" + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "description": "模板对应的事件状态。故障事件支持 `investigating`/`identified`/`monitoring`/`resolved`;维护事件支持 `scheduled`/`ongoing`/`completed`。" + }, + "description": { + "type": "string", + "description": "模板正文(Markdown)。" + } + } + }, + "StatusPageMessageTemplate": { + "type": "object", + "description": "消息模板:某一事件类型下、按状态划分的通知文案。在 `POST /status-page/template/upsert` 中,省略 `template_id` 表示创建,提供则表示更新;更新时仅应用非空字段。", + "properties": { + "template_id": { + "type": "string", + "description": "模板 ID。省略表示创建新模板;提供表示更新已有模板。" + }, + "title": { + "type": "string", + "description": "模板标题。" + }, + "type": { + "type": "string", + "enum": [ + "incident", + "maintenance" + ], + "description": "模板适用的事件类型:`incident` 故障,`maintenance` 计划维护。" + }, + "messages": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "按事件状态划分的通知文案(Markdown)。键为与模板 `type` 匹配的事件状态(如故障事件的 `investigating`、`resolved`),值为事件进入该状态时使用的文本。" + } + } + }, + "ListStatusPageTemplatesResponse": { + "type": "object", + "description": "事件模板列表。条目结构取决于请求的 `type`:`pre_defined` 为预定义事件模板,`message` 为消息模板。", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/StatusPagePreDefinedTemplate" + }, + { + "$ref": "#/components/schemas/StatusPageMessageTemplate" + } + ] + }, + "description": "所请求类别的模板列表。" } - }, - "title": "i_wi_updated" + } }, - "FeedDetailWorkItemAssigneesChanged": { + "FeedDetailAlertUpdate": { "type": "object", - "description": "`i_wi_assignees` 的 detail 载荷。", + "title": "a_update", + "description": "`a_update` 的详情数据:更新后的严重程度/状态。", "properties": { - "work_item_id": { - "type": "string", - "description": "跟进事项 ID。" + "severity": { + "$ref": "#/components/schemas/FeedSeverity" }, - "item_type": { + "status": { + "$ref": "#/components/schemas/FeedSeverity" + } + } + }, + "FeedDetailAlertMuteBySilence": { + "type": "object", + "title": "a_m_silence", + "description": "`a_m_silence` 的详情数据:告警被静默规则收敛。", + "properties": { + "rule_id": { "type": "string", - "enum": [ - "action", - "follow_up" - ], - "description": "跟进事项类型。`action`:挂在故障上的处置行动事项;`follow_up`:挂在故障复盘(Post-mortem)上的改进事项。" + "pattern": "^[0-9a-fA-F]{24}$", + "description": "收敛该告警的静默规则 ID。为空时不返回。" }, - "title": { + "rule_name": { "type": "string", - "description": "跟进事项标题。" - }, - "assignee_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "变更后的负责人成员 ID 列表。" - }, - "added_assignee_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "新增为负责人的成员 ID。" - }, - "removed_assignee_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "从负责人中移除的成员 ID。" + "description": "静默规则名称,读取时解析填充。为空时不返回。" } - }, - "title": "i_wi_assignees" + } }, - "FeedDetailWorkItemCompleted": { + "FeedDetailAlertMuteByInhibit": { "type": "object", - "description": "`i_wi_completed` 的 detail 载荷。", + "title": "a_m_inhibit", + "description": "`a_m_inhibit` 的详情数据:告警因源告警被抑制规则收敛。", "properties": { - "work_item_id": { + "rule_id": { "type": "string", - "description": "跟进事项 ID。" + "pattern": "^[0-9a-fA-F]{24}$", + "description": "收敛该告警的抑制规则 ID。为空时不返回。" }, - "item_type": { + "rule_name": { "type": "string", - "enum": [ - "action", - "follow_up" - ], - "description": "跟进事项类型。`action`:挂在故障上的处置行动事项;`follow_up`:挂在故障复盘(Post-mortem)上的改进事项。" + "description": "抑制规则名称,读取时解析填充。为空时不返回。" }, - "title": { + "source_alert_id": { "type": "string", - "description": "跟进事项标题。" + "pattern": "^[0-9a-fA-F]{24}$", + "description": "触发抑制的源告警 ID。为空时不返回。" }, - "from_status": { + "source_alert_title": { "type": "string", - "description": "完成前的状态标签。" + "description": "源告警标题,读取时解析填充。为空时不返回。" + } + } + }, + "FeedDetailAlertMuteByFlapping": { + "type": "object", + "title": "a_m_flapping", + "description": "`a_m_flapping` 的详情数据(历史):告警被抖动检测收敛。", + "properties": { + "max_changes": { + "type": "integer", + "description": "触发抖动检测的状态变化次数阈值。为 0 时不返回。" }, - "to_status": { - "type": "string", - "description": "完成后的状态标签。" + "in_secs": { + "type": "integer", + "description": "统计状态变化的时间窗口(秒)。为 0 时不返回。" }, - "post_mortem_id": { - "type": "string", - "description": "跟进事项绑定的故障复盘 ID。" + "mute_secs": { + "type": "integer", + "description": "静默时长(秒)。为 0 时不返回。" + } + } + }, + "FeedDetailAlertAck": { + "type": "object", + "title": "a_ack", + "description": "`a_ack` 的详情数据(历史),无字段。", + "properties": {} + }, + "FeedDetailAlertUnack": { + "type": "object", + "title": "a_unack", + "description": "`a_unack` 的详情数据(历史),无字段。", + "properties": {} + }, + "ScheduleByPersonRequest": { + "type": "object", + "description": "成员值班状态查询请求", + "properties": { + "person_id": { + "type": "integer", + "description": "要查询值班状态的成员 ID。", + "format": "int64" } }, - "title": "i_wi_completed" + "required": [ + "person_id" + ] }, - "FeedDetailWorkItemConverted": { + "ScheduleByPersonResponse": { "type": "object", - "description": "`i_wi_converted` 的 detail 载荷。", + "description": "成员的值班状态:正在值班的班次、下一次值班,以及其参与的全部启用排班。", "properties": { - "work_item_id": { - "type": "string", - "description": "跟进事项 ID。" - }, - "title": { - "type": "string", - "description": "跟进事项标题。" - }, - "from_type": { - "type": "string", - "enum": [ - "action", - "follow_up" - ], - "description": "转化前的事项类型。`action`:挂在故障上的处置行动事项;`follow_up`:挂在故障复盘(Post-mortem)上的改进事项。当前转换方向仅支持 `action` → `follow_up`,因此该事件中 `from_type` 恒为 `action`。" - }, - "to_type": { - "type": "string", - "enum": [ - "action", - "follow_up" - ], - "description": "转化后的事项类型。`action`:挂在故障上的处置行动事项;`follow_up`:挂在故障复盘(Post-mortem)上的改进事项。当前转换方向仅支持 `action` → `follow_up`,因此该事件中 `to_type` 恒为 `follow_up`,且转换成功后会立即尝试绑定故障对应的复盘。" + "current": { + "$ref": "#/components/schemas/MemberOncallInterval" }, - "post_mortem_id": { - "type": "string", - "description": "跟进事项绑定的故障复盘 ID。" + "next": { + "$ref": "#/components/schemas/MemberOncallInterval" }, - "status": { - "type": "string", - "description": "转化后的事项状态标签。" + "schedules": { + "type": "array", + "description": "该成员参与的全部启用排班。", + "items": { + "$ref": "#/components/schemas/MemberScheduleItem" + } } }, - "title": "i_wi_converted" + "required": [ + "schedules" + ] }, - "FeedDetailWorkItemBound": { + "MemberScheduleItem": { "type": "object", - "description": "`i_wi_bound` 的 detail 载荷。", + "description": "该成员参与的一个启用中的排班。", "properties": { - "work_item_id": { - "type": "string", - "description": "跟进事项 ID。" + "schedule_id": { + "type": "integer", + "description": "排班 ID。", + "format": "int64" }, - "item_type": { + "schedule_name": { "type": "string", - "enum": [ - "action", - "follow_up" - ], - "description": "跟进事项类型。`action`:挂在故障上的处置行动事项;`follow_up`:挂在故障复盘(Post-mortem)上的改进事项。" + "description": "排班名称。" + } + } + }, + "MemberOncallInterval": { + "type": "object", + "description": "成员的一个值班班次区间。", + "properties": { + "schedule_id": { + "type": "integer", + "description": "所属排班 ID。", + "format": "int64" }, - "title": { + "schedule_name": { "type": "string", - "description": "跟进事项标题。" + "description": "所属排班名称。" }, - "post_mortem_id": { - "type": "string", - "description": "跟进事项绑定的故障复盘 ID。" + "start_at": { + "type": "integer", + "description": "Unix 时间戳(秒)—— 班次开始时间。", + "format": "int64" + }, + "end_at": { + "type": "integer", + "description": "Unix 时间戳(秒)—— 班次结束时间。值班进行中时缺省。", + "format": "int64" } - }, - "title": "i_wi_bound" + } }, - "FeedDetailWorkItemDeleted": { + "IntegrationTypeListRequest": { "type": "object", - "description": "`i_wi_deleted` 的 detail 载荷。", + "description": "查询集成类型列表的过滤参数。", "properties": { - "work_item_id": { - "type": "string", - "description": "跟进事项 ID。" + "p": { + "type": "integer", + "minimum": 1, + "default": 1, + "description": "页码,从 1 开始。" + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 20, + "description": "每页条数,默认 20,最大 100。" }, - "item_type": { + "orderby": { "type": "string", + "description": "排序字段;不传时按控制台排序返回。", "enum": [ - "action", - "follow_up" - ], - "description": "跟进事项类型。`action`:挂在故障上的处置行动事项;`follow_up`:挂在故障复盘(Post-mortem)上的改进事项。" + "id", + "created_at", + "updated_at", + "name", + "type" + ] }, - "title": { + "category": { "type": "string", - "description": "跟进事项标题。" + "description": "按分类过滤,支持逗号分隔多个值,例如 `event.alert,event.change`。" }, - "post_mortem_id": { - "type": "string", - "description": "跟进事项绑定的故障复盘 ID。" + "asc": { + "type": [ + "boolean", + "null" + ], + "default": true, + "description": "`true`(默认)升序,`false` 降序。" } - }, - "title": "i_wi_deleted" + } }, - "FeedDetailAlertMerge": { + "IntegrationTypeItem": { "type": "object", - "title": "a_merge", - "description": "`a_merge` 的详情数据:告警被合并到故障。", + "description": "账户可配置的一种集成类型。", + "required": [ + "plugin_type", + "plugin_type_name", + "plugin_type_logo_url", + "category", + "status", + "supports_api_create" + ], "properties": { - "comment": { + "plugin_type": { "type": "string", - "description": "合并时记录的评论。为空时不返回。" + "description": "创建集成时作为 `plugin_type` 传入的类型标识。", + "example": "standard.alert" }, - "target_incident": { - "$ref": "#/components/schemas/IncidentShort", - "description": "告警合并到的目标故障。未记录时不返回。" + "plugin_type_name": { + "type": "string", + "description": "类型显示名。", + "example": "Standard Alert" }, - "source_alerts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AlertShort" - }, - "description": "被合并进目标故障的源告警。为空时不返回。" + "plugin_type_logo_url": { + "type": "string", + "description": "类型 Logo 地址。" }, - "owner_id": { - "type": "integer", - "format": "int64", - "description": "目标故障被设置的新负责人成员 ID。未变更时不返回。" + "category": { + "type": "string", + "description": "类型所属分类。", + "enum": [ + "event.alert", + "event.change", + "im", + "webhook" + ] }, - "title": { + "status": { "type": "string", - "description": "目标故障被设置的新标题。未变更时不返回。" + "description": "该类型在平台侧的状态。" + }, + "supports_api_create": { + "type": "boolean", + "description": "该类型能否通过 `POST /integration/create` 创建。" } } }, - "AlertShort": { + "ListIntegrationTypesResponse": { "type": "object", - "description": "告警简要引用。", + "description": "集成类型列表的一页。", + "required": [ + "p", + "limit", + "total", + "items" + ], "properties": { - "alert_id": { - "type": "string", - "pattern": "^[0-9a-fA-F]{24}$", - "description": "告警 ID(ObjectID 十六进制字符串)。" + "p": { + "type": "integer", + "description": "当前页码。" }, - "title": { - "type": "string", - "description": "告警标题,读取时解析填充。为空时不返回。" + "limit": { + "type": "integer", + "description": "当前每页条数。" + }, + "total": { + "type": "integer", + "format": "int64", + "description": "匹配的类型总数。" + }, + "items": { + "type": "array", + "description": "当前页的集成类型。", + "items": { + "$ref": "#/components/schemas/IntegrationTypeItem" + } } } }, - "EventGroup": { + "ListIntegrationsRequest": { "type": "object", - "description": "告警事件合并配置。启用后,同一告警的重复事件会在时间窗口内并入已有告警,而不是新建告警。", + "description": "查询集成列表的过滤参数。", "properties": { - "is_enabled": { - "type": "boolean", - "description": "为 true 时,重复事件并入已有告警;为 false 时,每个事件都单独生成告警。默认为 true。" + "p": { + "type": "integer", + "minimum": 1, + "default": 1, + "description": "页码,从 1 开始。" }, - "time_window": { + "limit": { "type": "integer", "minimum": 1, - "description": "合并窗口,单位分钟,范围 1-1440(24 小时);开通扩展额度的账号最大可设 10080(7 天)。默认 1440。" - } - } - }, - "StatusPageInfoResponse": { - "type": "object", - "description": "`GET /status-page/info` 返回的状态页详情:完整页面配置及特性开关。", - "allOf": [ - { - "$ref": "#/components/schemas/StatusPageItem" + "maximum": 100, + "default": 20, + "description": "每页条数,默认 20,最大 100。" }, - { - "type": "object", - "properties": { - "managed_domain_feature_enabled": { - "type": "boolean", - "description": "该页面是否启用托管自定义域名特性。公开页面为 `true`,内部页面恒为 `false`。" - } - }, - "required": [ - "managed_domain_feature_enabled" - ] - } - ] - }, - "StatusPagePreDefinedTemplate": { - "type": "object", - "description": "预定义事件模板:可复用的事件草稿(标题、类型、状态、描述)。在 `POST /status-page/template/upsert` 中,省略 `template_id` 表示创建,提供则表示更新;更新时仅应用非空字段。", - "properties": { - "template_id": { + "orderby": { "type": "string", - "description": "模板 ID。省略表示创建新模板;提供表示更新已有模板。" + "description": "排序字段,默认 `created_at`;`plugin_type` 按底层插件排序。", + "enum": [ + "created_at", + "updated_at", + "name", + "plugin_type", + "status" + ] }, - "title": { + "category": { "type": "string", - "description": "模板标题。" + "description": "按分类过滤,支持逗号分隔多个值。" }, "type": { "type": "string", - "enum": [ - "incident", - "maintenance" - ], - "description": "模板适用的事件类型:`incident` 故障,`maintenance` 计划维护。" + "description": "已废弃;与 `plugin_type` 同时传入时会合并生效。" + }, + "plugin_type": { + "type": "string", + "description": "按集成类型过滤,支持逗号分隔多个值。" }, "status": { "type": "string", - "enum": [ - "investigating", - "identified", - "monitoring", - "resolved", - "scheduled", - "ongoing", - "completed" - ], - "description": "模板对应的事件状态。故障事件支持 `investigating`/`identified`/`monitoring`/`resolved`;维护事件支持 `scheduled`/`ongoing`/`completed`。" + "description": "按状态过滤,支持逗号分隔多个值。" }, - "description": { + "name": { "type": "string", - "description": "模板正文(Markdown)。" + "description": "按集成名称过滤。" + }, + "ref_ids": { + "type": "array", + "description": "按来源引用 ID 过滤;每个值必须以 `c_`(协作空间)、`a_`(账户)或 `w_` 开头。", + "items": { + "type": "string" + } + }, + "asc": { + "type": "boolean", + "description": "`true` 升序,`false` 降序。" + }, + "is_my_team": { + "type": "boolean", + "description": "仅返回你所在团队拥有的集成。" + }, + "team_ids": { + "type": "array", + "description": "按团队 ID 过滤;与 `is_my_team` 同时使用时在其结果内进一步收窄。", + "items": { + "type": "integer", + "format": "int64" + } } } }, - "StatusPageMessageTemplate": { + "IntegrationItem": { "type": "object", - "description": "消息模板:某一事件类型下、按状态划分的通知文案。在 `POST /status-page/template/upsert` 中,省略 `template_id` 表示创建,提供则表示更新;更新时仅应用非空字段。", + "description": "已配置的集成;时间字段为 Unix 时间戳(秒)。", + "required": [ + "integration_id", + "team_id", + "plugin_type", + "plugin_type_name", + "category", + "name", + "description", + "status", + "ref_id", + "created_at", + "updated_at", + "last_time" + ], "properties": { - "template_id": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "集成 ID。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID;未归属团队时为 `0`。" + }, + "plugin_type": { "type": "string", - "description": "模板 ID。省略表示创建新模板;提供表示更新已有模板。" + "description": "集成类型,例如 `standard.alert`、`zabbix.alert`。" }, - "title": { + "plugin_type_name": { "type": "string", - "description": "模板标题。" + "description": "集成类型显示名,随请求语言变化。" }, - "type": { + "category": { "type": "string", "enum": [ - "incident", - "maintenance" + "event.alert", + "event.change", + "im", + "webhook" ], - "description": "模板适用的事件类型:`incident` 故障,`maintenance` 计划维护。" + "description": "集成所属分类。" }, - "messages": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "按事件状态划分的通知文案(Markdown)。键为与模板 `type` 匹配的事件状态(如故障事件的 `investigating`、`resolved`),值为事件进入该状态时使用的文本。" + "name": { + "type": "string", + "description": "集成名称。" + }, + "description": { + "type": "string", + "description": "集成描述。" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "状态:`enabled` 正常接收事件,`disabled` 已暂停。" + }, + "ref_id": { + "type": "string", + "description": "来源引用 ID:`a_` 开头表示账户级集成,集成被共享到协作空间时为 `c_` 开头。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间的 Unix 时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最近更新时间的 Unix 时间戳(秒)。" + }, + "last_time": { + "type": "integer", + "format": "int64", + "description": "最近收到事件时间的 Unix 时间戳(秒),尚未收到事件时为 `0`。" } } }, - "ListStatusPageTemplatesResponse": { + "ListIntegrationsResponse": { "type": "object", - "description": "事件模板列表。条目结构取决于请求的 `type`:`pre_defined` 为预定义事件模板,`message` 为消息模板。", + "description": "集成列表的一页。", "required": [ + "p", + "limit", + "total", "items" ], "properties": { + "p": { + "type": "integer", + "description": "当前页码。" + }, + "limit": { + "type": "integer", + "description": "当前每页条数。" + }, + "total": { + "type": "integer", + "format": "int64", + "description": "匹配的集成总数。" + }, "items": { "type": "array", + "description": "当前页的集成。", "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/StatusPagePreDefinedTemplate" - }, - { - "$ref": "#/components/schemas/StatusPageMessageTemplate" - } - ] - }, - "description": "所请求类别的模板列表。" + "$ref": "#/components/schemas/IntegrationItem" + } } } }, - "FeedDetailAlertUpdate": { + "GetIntegrationRequest": { "type": "object", - "title": "a_update", - "description": "`a_update` 的详情数据:更新后的严重程度/状态。", + "description": "指定一个集成。", + "required": [ + "integration_id" + ], "properties": { - "severity": { - "$ref": "#/components/schemas/FeedSeverity" - }, - "status": { - "$ref": "#/components/schemas/FeedSeverity" + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "集成 ID。", + "example": 6113996590131 } } }, - "FeedDetailAlertMuteBySilence": { + "IntegrationDetail": { "type": "object", - "title": "a_m_silence", - "description": "`a_m_silence` 的详情数据:告警被静默规则收敛。", + "description": "单个集成详情,含完整配置;时间字段为 Unix 时间戳(秒)。", + "required": [ + "integration_id", + "team_id", + "plugin_type", + "plugin_type_name", + "category", + "name", + "description", + "status", + "ref_id", + "created_at", + "updated_at", + "last_time", + "settings" + ], "properties": { - "rule_id": { - "type": "string", - "pattern": "^[0-9a-fA-F]{24}$", - "description": "收敛该告警的静默规则 ID。为空时不返回。" - }, - "rule_name": { - "type": "string", - "description": "静默规则名称,读取时解析填充。为空时不返回。" + "integration_id": [ + { + "type": "integer", + "format": "int64", + "description": "集成 ID。" + }, + true + ], + "team_id": [ + { + "type": "integer", + "format": "int64", + "description": "所属团队 ID;未归属团队时为 `0`。" + }, + true + ], + "plugin_type": [ + { + "type": "string", + "description": "集成类型,例如 `standard.alert`、`zabbix.alert`。" + }, + true + ], + "plugin_type_name": [ + { + "type": "string", + "description": "集成类型显示名,随请求语言变化。" + }, + true + ], + "category": [ + { + "type": "string", + "enum": [ + "event.alert", + "event.change", + "im", + "webhook" + ], + "description": "集成所属分类。" + }, + true + ], + "name": [ + { + "type": "string", + "description": "集成名称。" + }, + true + ], + "description": [ + { + "type": "string", + "description": "集成描述。" + }, + true + ], + "status": [ + { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "状态:`enabled` 正常接收事件,`disabled` 已暂停。" + }, + true + ], + "ref_id": [ + { + "type": "string", + "description": "来源引用 ID:`a_` 开头表示账户级集成,集成被共享到协作空间时为 `c_` 开头。" + }, + true + ], + "created_at": [ + { + "type": "integer", + "format": "int64", + "description": "创建时间的 Unix 时间戳(秒)。" + }, + true + ], + "updated_at": [ + { + "type": "integer", + "format": "int64", + "description": "最近更新时间的 Unix 时间戳(秒)。" + }, + true + ], + "last_time": [ + { + "type": "integer", + "format": "int64", + "description": "最近收到事件时间的 Unix 时间戳(秒),尚未收到事件时为 `0`。" + }, + true + ], + "settings": { + "type": "object", + "additionalProperties": true, + "description": "集成类型专属配置;敏感字段(endpoint、headers、密钥、密码)以 `******` 打码返回。" } } }, - "FeedDetailAlertMuteByInhibit": { + "CreateIntegrationRequest": { "type": "object", - "title": "a_m_inhibit", - "description": "`a_m_inhibit` 的详情数据:告警因源告警被抑制规则收敛。", + "description": "创建集成的请求体。", + "required": [ + "plugin_type" + ], "properties": { - "rule_id": { + "plugin_type": { "type": "string", - "pattern": "^[0-9a-fA-F]{24}$", - "description": "收敛该告警的抑制规则 ID。为空时不返回。" + "description": "集成类型,必须是 `POST /integration/type/list` 中 `supports_api_create: true` 的类型。", + "example": "standard.alert" }, - "rule_name": { + "name": { "type": "string", - "description": "抑制规则名称,读取时解析填充。为空时不返回。" + "minLength": 2, + "maxLength": 49, + "description": "集成名称,2–49 个字符。", + "example": "Prod metrics alerts" }, - "source_alert_id": { + "description": { "type": "string", - "pattern": "^[0-9a-fA-F]{24}$", - "description": "触发抑制的源告警 ID。为空时不返回。" + "maxLength": 499, + "description": "集成描述,最长 499 个字符。" }, - "source_alert_title": { - "type": "string", - "description": "源告警标题,读取时解析填充。为空时不返回。" + "team_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "所属团队 ID。", + "example": 1467226103121 + }, + "settings": { + "type": "object", + "description": "集成类型专属配置,可传字段取决于 `plugin_type`。", + "additionalProperties": true } } }, - "FeedDetailAlertMuteByFlapping": { + "CreateIntegrationResponse": { "type": "object", - "title": "a_m_flapping", - "description": "`a_m_flapping` 的详情数据(历史):告警被抖动检测收敛。", + "description": "创建结果与集成 Key。", + "required": [ + "integration_id", + "integration_key" + ], "properties": { - "max_changes": { - "type": "integer", - "description": "触发抖动检测的状态变化次数阈值。为 0 时不返回。" - }, - "in_secs": { + "integration_id": { "type": "integer", - "description": "统计状态变化的时间窗口(秒)。为 0 时不返回。" + "format": "int64", + "description": "新建集成的 ID。", + "example": 6113996590131 }, - "mute_secs": { - "type": "integer", - "description": "静默时长(秒)。为 0 时不返回。" + "integration_key": { + "type": "string", + "description": "该集成的推送鉴权 Key,仅在此处返回;需要新 Key 请调用 `POST /integration/key/rotate`。", + "example": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" } } }, - "FeedDetailAlertAck": { - "type": "object", - "title": "a_ack", - "description": "`a_ack` 的详情数据(历史),无字段。", - "properties": {} - }, - "FeedDetailAlertUnack": { - "type": "object", - "title": "a_unack", - "description": "`a_unack` 的详情数据(历史),无字段。", - "properties": {} - }, - "ScheduleByPersonRequest": { + "UpdateIntegrationRequest": { "type": "object", - "description": "成员值班状态查询请求", - "properties": { - "person_id": { - "type": "integer", - "description": "要查询值班状态的成员 ID。", - "format": "int64" - } - }, + "description": "更新集成的请求体;仅发送的字段会被修改。", "required": [ - "person_id" - ] - }, - "ScheduleByPersonResponse": { - "type": "object", - "description": "成员的值班状态:正在值班的班次、下一次值班,以及其参与的全部启用排班。", + "integration_id" + ], "properties": { - "current": { - "$ref": "#/components/schemas/MemberOncallInterval" + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "集成 ID。", + "example": 6113996590131 }, - "next": { - "$ref": "#/components/schemas/MemberOncallInterval" + "name": { + "type": [ + "string", + "null" + ], + "minLength": 2, + "maxLength": 49, + "description": "新的集成名称,2–49 个字符。" }, - "schedules": { - "type": "array", - "description": "该成员参与的全部启用排班。", - "items": { - "$ref": "#/components/schemas/MemberScheduleItem" - } + "description": { + "type": [ + "string", + "null" + ], + "maxLength": 499, + "description": "新的集成描述,最长 499 个字符。" + }, + "team_id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "minimum": 0, + "description": "新的所属团队 ID;传 `0` 表示清除团队归属。" + }, + "settings": { + "type": [ + "object", + "null" + ], + "description": "替换该集成类型的配置;敏感字段不传、或原样回传 `******`,都会保留已存储的值。", + "additionalProperties": true } - }, - "required": [ - "schedules" - ] + } }, - "MemberScheduleItem": { + "IntegrationLifecycleRequest": { "type": "object", - "description": "该成员参与的一个启用中的排班。", + "description": "指定要操作的集成。", + "required": [ + "integration_id" + ], "properties": { - "schedule_id": { + "integration_id": { "type": "integer", - "description": "排班 ID。", - "format": "int64" - }, - "schedule_name": { - "type": "string", - "description": "排班名称。" + "format": "int64", + "minimum": 1, + "description": "集成 ID。", + "example": 6113996590131 } } }, - "MemberOncallInterval": { + "RotateIntegrationKeyResponse": { "type": "object", - "description": "成员的一个值班班次区间。", + "description": "新生成的集成 Key。", + "required": [ + "integration_key" + ], "properties": { - "schedule_id": { - "type": "integer", - "description": "所属排班 ID。", - "format": "int64" - }, - "schedule_name": { + "integration_key": { "type": "string", - "description": "所属排班名称。" - }, - "start_at": { - "type": "integer", - "description": "Unix 时间戳(秒)—— 班次开始时间。", - "format": "int64" - }, - "end_at": { - "type": "integer", - "description": "Unix 时间戳(秒)—— 班次结束时间。值班进行中时缺省。", - "format": "int64" + "description": "新的集成 Key。旧 Key 立即失效,且该值之后无法再次读取。", + "example": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" } } } diff --git a/api-reference/openapi.en.json b/api-reference/openapi.en.json index 36e2edaf..f0894659 100644 --- a/api-reference/openapi.en.json +++ b/api-reference/openapi.en.json @@ -26197,6 +26197,10 @@ "description": "DingTalk app message template source.", "type": "string" }, + "dingtalk_app_war_room_enabled": { + "type": "boolean", + "description": "Show the Create War Room button on DingTalk app cards." + }, "email": { "description": "Email body template source (Go `html/template` syntax).", "type": "string" @@ -26248,6 +26252,10 @@ "description": "Slack app message template source.", "type": "string" }, + "slack_app_war_room_enabled": { + "type": "boolean", + "description": "Show the Create War Room button on Slack app cards." + }, "sms": { "description": "SMS template source (Go `text/template` syntax).", "type": "string" @@ -26370,6 +26378,10 @@ "description": "DingTalk app message template source.", "type": "string" }, + "dingtalk_app_war_room_enabled": { + "type": "boolean", + "description": "Whether DingTalk app cards show the Create War Room button. Hidden for closed incidents and when the incident has no responders." + }, "email": { "description": "Email body template source (Go `html/template` syntax).", "type": "string" @@ -26420,6 +26432,10 @@ "description": "Slack app message template source.", "type": "string" }, + "slack_app_war_room_enabled": { + "type": "boolean", + "description": "Whether Slack app cards show the Create War Room button. Hidden for closed incidents and when the incident has no responders." + }, "sms": { "description": "SMS template source (Go `text/template` syntax).", "type": "string" @@ -26504,6 +26520,8 @@ "wecom_markdown_v2_enabled", "feishu_app_card_v2_preserve_blank_lines", "feishu_app_war_room_enabled", + "dingtalk_app_war_room_enabled", + "slack_app_war_room_enabled", "dingtalk_app", "wecom_app", "slack_app", @@ -26634,6 +26652,13 @@ "null" ] }, + "dingtalk_app_war_room_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "When set, show or hide the Create War Room button on DingTalk app cards. Omit to keep the existing setting." + }, "email": { "description": "Email body template source (Go `html/template` syntax). Omit to keep the current content; send an empty string to clear it.", "type": [ @@ -26708,6 +26733,13 @@ "null" ] }, + "slack_app_war_room_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "When set, show or hide the Create War Room button on Slack app cards. Omit to keep the existing setting." + }, "sms": { "description": "SMS template source (Go `text/template` syntax). Omit to keep the current content; send an empty string to clear it.", "type": [ @@ -29395,6 +29427,594 @@ ] } } + }, + "IntegrationTypeListRequest": { + "type": "object", + "description": "Filter parameters for listing integration types.", + "properties": { + "p": { + "type": "integer", + "minimum": 1, + "default": 1, + "description": "Page number, 1-based." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 20, + "description": "Page size. Defaults to 20, maximum 100." + }, + "orderby": { + "type": "string", + "description": "Sort field. When omitted, types are returned in console ranking order.", + "enum": [ + "id", + "created_at", + "updated_at", + "name", + "type" + ] + }, + "category": { + "type": "string", + "description": "Filter by category. Accepts a comma-separated list, for example `event.alert,event.change`." + }, + "asc": { + "type": [ + "boolean", + "null" + ], + "default": true, + "description": "Sort ascending when `true` (the default); descending when `false`." + } + } + }, + "IntegrationTypeItem": { + "type": "object", + "description": "An integration type the account can configure.", + "required": [ + "plugin_type", + "plugin_type_name", + "plugin_type_logo_url", + "category", + "status", + "supports_api_create" + ], + "properties": { + "plugin_type": { + "type": "string", + "description": "Type identifier to pass as `plugin_type` when creating an integration.", + "example": "standard.alert" + }, + "plugin_type_name": { + "type": "string", + "description": "Display name of the type.", + "example": "Standard Alert" + }, + "plugin_type_logo_url": { + "type": "string", + "description": "Logo URL of the type." + }, + "category": { + "type": "string", + "description": "Category the type belongs to.", + "enum": [ + "event.alert", + "event.change", + "im", + "webhook" + ] + }, + "status": { + "type": "string", + "description": "Platform status of the type." + }, + "supports_api_create": { + "type": "boolean", + "description": "Whether `POST /integration/create` accepts this type." + } + } + }, + "ListIntegrationTypesResponse": { + "type": "object", + "description": "A page of integration types.", + "required": [ + "p", + "limit", + "total", + "items" + ], + "properties": { + "p": { + "type": "integer", + "description": "Page number echoed back." + }, + "limit": { + "type": "integer", + "description": "Page size echoed back." + }, + "total": { + "type": "integer", + "format": "int64", + "description": "Total number of matching types." + }, + "items": { + "type": "array", + "description": "Integration types on the current page.", + "items": { + "$ref": "#/components/schemas/IntegrationTypeItem" + } + } + } + }, + "ListIntegrationsRequest": { + "type": "object", + "description": "Filter parameters for listing integrations.", + "properties": { + "p": { + "type": "integer", + "minimum": 1, + "default": 1, + "description": "Page number, 1-based." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 20, + "description": "Page size. Defaults to 20, maximum 100." + }, + "orderby": { + "type": "string", + "description": "Sort field. Defaults to `created_at`; `plugin_type` is sorted by the underlying plugin.", + "enum": [ + "created_at", + "updated_at", + "name", + "plugin_type", + "status" + ] + }, + "category": { + "type": "string", + "description": "Filter by category. Accepts a comma-separated list." + }, + "type": { + "type": "string", + "description": "Deprecated. Merged into `plugin_type` when both are set." + }, + "plugin_type": { + "type": "string", + "description": "Filter by integration type. Accepts a comma-separated list." + }, + "status": { + "type": "string", + "description": "Filter by status. Accepts a comma-separated list." + }, + "name": { + "type": "string", + "description": "Filter by integration name." + }, + "ref_ids": { + "type": "array", + "description": "Filter by source reference IDs. Each value must start with `c_` (channel), `a_` (account) or `w_`.", + "items": { + "type": "string" + } + }, + "asc": { + "type": "boolean", + "description": "Sort ascending when true, descending when false." + }, + "is_my_team": { + "type": "boolean", + "description": "Limit the result to integrations owned by your teams." + }, + "team_ids": { + "type": "array", + "description": "Filter by team IDs. With `is_my_team`, the values narrow that set further.", + "items": { + "type": "integer", + "format": "int64" + } + } + } + }, + "IntegrationItem": { + "type": "object", + "description": "A configured integration. Timestamps are Unix epoch seconds.", + "required": [ + "integration_id", + "team_id", + "plugin_type", + "plugin_type_name", + "category", + "name", + "description", + "status", + "ref_id", + "created_at", + "updated_at", + "last_time" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "Integration ID." + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "ID of the team that owns the integration. `0` when it is not assigned to a team." + }, + "plugin_type": { + "type": "string", + "description": "Integration type, for example `standard.alert` or `zabbix.alert`." + }, + "plugin_type_name": { + "type": "string", + "description": "Display name of the integration type, in the language of the request." + }, + "category": { + "type": "string", + "enum": [ + "event.alert", + "event.change", + "im", + "webhook" + ], + "description": "Category the integration belongs to." + }, + "name": { + "type": "string", + "description": "Integration name." + }, + "description": { + "type": "string", + "description": "Free-form description." + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "Lifecycle status: `enabled` while the integration accepts events, `disabled` when it is paused." + }, + "ref_id": { + "type": "string", + "description": "Source reference ID: `a_`-prefixed for an account-scoped integration, `c_`-prefixed when it is shared into a channel." + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds when the integration was created." + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds when the integration was last updated." + }, + "last_time": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds of the most recent event received. `0` when no event has arrived yet." + } + } + }, + "ListIntegrationsResponse": { + "type": "object", + "description": "A page of integrations.", + "required": [ + "p", + "limit", + "total", + "items" + ], + "properties": { + "p": { + "type": "integer", + "description": "Page number echoed back." + }, + "limit": { + "type": "integer", + "description": "Page size echoed back." + }, + "total": { + "type": "integer", + "format": "int64", + "description": "Total number of matching integrations." + }, + "items": { + "type": "array", + "description": "Integrations on the current page.", + "items": { + "$ref": "#/components/schemas/IntegrationItem" + } + } + } + }, + "GetIntegrationRequest": { + "type": "object", + "description": "Identifies one integration.", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "Integration ID.", + "example": 6113996590131 + } + } + }, + "IntegrationDetail": { + "type": "object", + "description": "A single integration with its full settings. Timestamps are Unix epoch seconds.", + "required": [ + "integration_id", + "team_id", + "plugin_type", + "plugin_type_name", + "category", + "name", + "description", + "status", + "ref_id", + "created_at", + "updated_at", + "last_time", + "settings" + ], + "properties": { + "integration_id": [ + { + "type": "integer", + "format": "int64", + "description": "Integration ID." + }, + true + ], + "team_id": [ + { + "type": "integer", + "format": "int64", + "description": "ID of the team that owns the integration. `0` when it is not assigned to a team." + }, + true + ], + "plugin_type": [ + { + "type": "string", + "description": "Integration type, for example `standard.alert` or `zabbix.alert`." + }, + true + ], + "plugin_type_name": [ + { + "type": "string", + "description": "Display name of the integration type, in the language of the request." + }, + true + ], + "category": [ + { + "type": "string", + "enum": [ + "event.alert", + "event.change", + "im", + "webhook" + ], + "description": "Category the integration belongs to." + }, + true + ], + "name": [ + { + "type": "string", + "description": "Integration name." + }, + true + ], + "description": [ + { + "type": "string", + "description": "Free-form description." + }, + true + ], + "status": [ + { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "Lifecycle status: `enabled` while the integration accepts events, `disabled` when it is paused." + }, + true + ], + "ref_id": [ + { + "type": "string", + "description": "Source reference ID: `a_`-prefixed for an account-scoped integration, `c_`-prefixed when it is shared into a channel." + }, + true + ], + "created_at": [ + { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds when the integration was created." + }, + true + ], + "updated_at": [ + { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds when the integration was last updated." + }, + true + ], + "last_time": [ + { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in seconds of the most recent event received. `0` when no event has arrived yet." + }, + true + ], + "settings": { + "type": "object", + "additionalProperties": true, + "description": "Type-specific configuration. Sensitive values (endpoint, headers, secrets, passwords) are returned masked as `******`." + } + } + }, + "CreateIntegrationRequest": { + "type": "object", + "description": "Payload for creating an integration.", + "required": [ + "plugin_type" + ], + "properties": { + "plugin_type": { + "type": "string", + "description": "Integration type. Must be one listed by `POST /integration/type/list` with `supports_api_create: true`.", + "example": "standard.alert" + }, + "name": { + "type": "string", + "minLength": 2, + "maxLength": 49, + "description": "Integration name. 2–49 characters.", + "example": "Prod metrics alerts" + }, + "description": { + "type": "string", + "maxLength": 499, + "description": "Free-form description, at most 499 characters." + }, + "team_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "Owning team ID.", + "example": 1467226103121 + }, + "settings": { + "type": "object", + "description": "Type-specific configuration; the accepted keys depend on `plugin_type`.", + "additionalProperties": true + } + } + }, + "CreateIntegrationResponse": { + "type": "object", + "description": "The created integration and its key.", + "required": [ + "integration_id", + "integration_key" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "ID of the new integration.", + "example": 6113996590131 + }, + "integration_key": { + "type": "string", + "description": "Key used to authenticate inbound pushes to this integration. Returned here only; fetch a new one with `POST /integration/key/rotate`.", + "example": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" + } + } + }, + "UpdateIntegrationRequest": { + "type": "object", + "description": "Payload for updating an integration. Only the fields you send are changed.", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "Integration ID.", + "example": 6113996590131 + }, + "name": { + "type": [ + "string", + "null" + ], + "minLength": 2, + "maxLength": 49, + "description": "New name, 2–49 characters." + }, + "description": { + "type": [ + "string", + "null" + ], + "maxLength": 499, + "description": "New description, at most 499 characters." + }, + "team_id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "minimum": 0, + "description": "New owning team ID; `0` clears the team assignment." + }, + "settings": { + "type": [ + "object", + "null" + ], + "description": "Replacement configuration for the integration type. Sensitive entries left out, or sent back as the masked `******`, keep their stored value.", + "additionalProperties": true + } + } + }, + "IntegrationLifecycleRequest": { + "type": "object", + "description": "Identifies the integration to act on.", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "Integration ID.", + "example": 6113996590131 + } + } + }, + "RotateIntegrationKeyResponse": { + "type": "object", + "description": "The newly issued integration key.", + "required": [ + "integration_key" + ], + "properties": { + "integration_key": { + "type": "string", + "description": "The new key. The previous key stops working immediately; this value cannot be read again later.", + "example": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" + } + } } }, "securitySchemes": { @@ -60527,6 +61147,745 @@ } } } + }, + "/integration/type/list": { + "post": { + "operationId": "integration-api-read-type-list", + "summary": "List integration types", + "description": "List the integration types the account can configure.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |\n\n## Usage\n\n- When `orderby` is omitted, types come back in console ranking order and `p`/`limit` still apply.\n- `supports_api_create` tells you which types `POST /integration/create` accepts.", + "href": "/en/api-reference/on-call/integrations/integration-api-read-type-list", + "metadata": { + "sidebarTitle": "List integration types" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListIntegrationTypesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "p": 1, + "limit": 20, + "total": 2, + "items": [ + { + "plugin_type": "standard.alert", + "plugin_type_name": "Standard Alert", + "plugin_type_logo_url": "https://cdn.flashcat.cloud/plugin/standard-alert.svg", + "category": "event.alert", + "status": "enabled", + "supports_api_create": true + }, + { + "plugin_type": "jira.change", + "plugin_type_name": "Jira", + "plugin_type_logo_url": "https://cdn.flashcat.cloud/plugin/jira.svg", + "category": "event.change", + "status": "enabled", + "supports_api_create": 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/IntegrationTypeListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "category": "event.alert" + } + } + } + } + } + }, + "/integration/list": { + "post": { + "operationId": "integration-api-read-list", + "summary": "List integrations", + "description": "List the account's alert-source and change-source integrations.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |\n\n## Usage\n\n- `orderby` defaults to `created_at`; `plugin_type` is sorted by the underlying plugin.\n- `plugin_type`, `status` and `category` accept comma-separated values; `ref_ids` values must start with `c_`, `a_` or `w_`.\n- With `is_my_team` set, results are limited to your teams and `team_ids` narrows that set further.", + "href": "/en/api-reference/on-call/integrations/integration-api-read-list", + "metadata": { + "sidebarTitle": "List integrations" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListIntegrationsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "p": 1, + "limit": 20, + "total": 1, + "items": [ + { + "integration_id": 6113996590131, + "team_id": 1467226103121, + "plugin_type": "standard.alert", + "plugin_type_name": "Standard Alert", + "category": "event.alert", + "name": "Prod metrics alerts", + "description": "Alerts pushed by the production Prometheus stack", + "status": "enabled", + "ref_id": "a_6612f0c9e1b7a4d3508f2c6b", + "created_at": 1775116800, + "updated_at": 1775203200, + "last_time": 1775298600 + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListIntegrationsRequest" + }, + "example": { + "p": 1, + "limit": 20, + "status": "enabled" + } + } + } + } + } + }, + "/integration/info": { + "post": { + "operationId": "integration-api-read-info", + "summary": "Get integration detail", + "description": "Return one integration, including its settings with sensitive values masked.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |\n\n## Usage\n\n- Sensitive settings (endpoint, headers, secrets, passwords) come back masked as `******`.", + "href": "/en/api-reference/on-call/integrations/integration-api-read-info", + "metadata": { + "sidebarTitle": "Get integration detail" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/IntegrationDetail" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "team_id": 1467226103121, + "plugin_type": "standard.alert", + "plugin_type_name": "Standard Alert", + "category": "event.alert", + "name": "Prod metrics alerts", + "description": "Alerts pushed by the production Prometheus stack", + "status": "enabled", + "ref_id": "a_6612f0c9e1b7a4d3508f2c6b", + "created_at": 1775116800, + "updated_at": 1775203200, + "last_time": 1775298600, + "settings": { + "severity_mapping": [ + { + "P1": "Critical" + } + ], + "labels": { + "source": "prometheus" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetIntegrationRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/integration/create": { + "post": { + "operationId": "integration-api-write-create", + "summary": "Create integration", + "description": "Create an integration for an alert source or change source.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- `plugin_type` must be one of the types listed by `POST /integration/type/list` with `supports_api_create: true`; anything else returns `InvalidParameter`.\n- `integration_key` is returned once. Store it at creation time — it is not part of `POST /integration/info`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/integrations/integration-api-write-create", + "metadata": { + "sidebarTitle": "Create integration" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CreateIntegrationResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "integration_key": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateIntegrationRequest" + }, + "example": { + "plugin_type": "standard.alert", + "name": "Prod metrics alerts", + "description": "Alerts pushed by the production Prometheus stack", + "team_id": 1467226103121, + "settings": { + "severity_mapping": [ + { + "P1": "Critical" + } + ] + } + } + } + } + } + } + }, + "/integration/update": { + "post": { + "operationId": "integration-api-write-update", + "summary": "Update integration", + "description": "Update an integration's name, description, team, or settings.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Only the fields you send are changed; omitted fields keep their current value.\n- `settings` replaces the stored configuration. Sensitive entries left out, or sent back as the masked `******`, keep their stored value.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/integrations/integration-api-write-update", + "metadata": { + "sidebarTitle": "Update integration" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/IntegrationDetail" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "team_id": 1467226103121, + "plugin_type": "standard.alert", + "plugin_type_name": "Standard Alert", + "category": "event.alert", + "name": "Prod metrics alerts (primary)", + "description": "Alerts pushed by the production Prometheus stack", + "status": "enabled", + "ref_id": "a_6612f0c9e1b7a4d3508f2c6b", + "created_at": 1775116800, + "updated_at": 1775298600, + "last_time": 1775298600, + "settings": { + "severity_mapping": [ + { + "P1": "Critical" + } + ], + "labels": { + "source": "prometheus" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateIntegrationRequest" + }, + "example": { + "integration_id": 6113996590131, + "name": "Prod metrics alerts (primary)", + "team_id": 1467226103121 + } + } + } + } + } + }, + "/integration/delete": { + "post": { + "operationId": "integration-api-write-delete", + "summary": "Delete integration", + "description": "Delete an integration that nothing else references.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Deleting an integration that other objects still reference returns HTTP 400 with `error.code` = `ReferenceExist` and `data.refs` listing them.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/integrations/integration-api-write-delete", + "metadata": { + "sidebarTitle": "Delete integration" + } + }, + "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" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationLifecycleRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/integration/enable": { + "post": { + "operationId": "integration-api-write-enable", + "summary": "Enable integration", + "description": "Re-enable a disabled integration so it accepts events again.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Enabling an integration resumes its scheduled pull task and heartbeat, and requires the integration type to be available on the current plan.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/integrations/integration-api-write-enable", + "metadata": { + "sidebarTitle": "Enable integration" + } + }, + "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" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationLifecycleRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/integration/disable": { + "post": { + "operationId": "integration-api-write-disable", + "summary": "Disable integration", + "description": "Disable an integration without deleting its configuration.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Disabling stops event ingestion and pauses the scheduled pull task; settings are kept so the integration can be enabled again.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/integrations/integration-api-write-disable", + "metadata": { + "sidebarTitle": "Disable integration" + } + }, + "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" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationLifecycleRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/integration/key/rotate": { + "post": { + "operationId": "integration-api-write-rotate-key", + "summary": "Rotate integration key", + "description": "Issue a new integration key and invalidate the previous one.", + "tags": [ + "On-call/Integrations" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- The previous key stops working immediately, so update the pushing side before rotating.\n- The new key is returned once and cannot be read again later.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/integrations/integration-api-write-rotate-key", + "metadata": { + "sidebarTitle": "Rotate integration key" + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RotateIntegrationKeyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_key": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationLifecycleRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } } }, "security": [ diff --git a/api-reference/openapi.zh.json b/api-reference/openapi.zh.json index 25cbdfae..2695fcbd 100644 --- a/api-reference/openapi.zh.json +++ b/api-reference/openapi.zh.json @@ -26197,6 +26197,10 @@ "description": "钉钉应用消息模板源。", "type": "string" }, + "dingtalk_app_war_room_enabled": { + "type": "boolean", + "description": "钉钉应用卡片展示「创建作战室」按钮。" + }, "email": { "description": "邮件正文模板源(Go `html/template` 语法)。", "type": "string" @@ -26248,6 +26252,10 @@ "description": "Slack 应用消息模板源。", "type": "string" }, + "slack_app_war_room_enabled": { + "type": "boolean", + "description": "Slack 应用卡片展示「创建作战室」按钮。" + }, "sms": { "description": "短信模板源(Go `text/template` 语法)。", "type": "string" @@ -26370,6 +26378,10 @@ "description": "钉钉应用消息模板源。", "type": "string" }, + "dingtalk_app_war_room_enabled": { + "type": "boolean", + "description": "钉钉应用卡片是否展示「创建作战室」按钮;故障已关闭或无响应人时不展示。" + }, "email": { "description": "邮件正文模板源(Go `html/template` 语法)。", "type": "string" @@ -26420,6 +26432,10 @@ "description": "Slack 应用消息模板源。", "type": "string" }, + "slack_app_war_room_enabled": { + "type": "boolean", + "description": "Slack 应用卡片是否展示「创建作战室」按钮;故障已关闭或无响应人时不展示。" + }, "sms": { "description": "短信模板源(Go `text/template` 语法)。", "type": "string" @@ -26504,6 +26520,8 @@ "wecom_markdown_v2_enabled", "feishu_app_card_v2_preserve_blank_lines", "feishu_app_war_room_enabled", + "dingtalk_app_war_room_enabled", + "slack_app_war_room_enabled", "dingtalk_app", "wecom_app", "slack_app", @@ -26634,6 +26652,13 @@ "null" ] }, + "dingtalk_app_war_room_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "设置后决定钉钉应用卡片是否展示「创建作战室」按钮;省略时保持当前设置。" + }, "email": { "description": "邮件正文模板源(Go `html/template` 语法)。省略时保持当前内容;传空字符串表示清空。", "type": [ @@ -26708,6 +26733,13 @@ "null" ] }, + "slack_app_war_room_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "设置后决定 Slack 应用卡片是否展示「创建作战室」按钮;省略时保持当前设置。" + }, "sms": { "description": "短信模板源(Go `text/template` 语法)。省略时保持当前内容;传空字符串表示清空。", "type": [ @@ -29395,6 +29427,594 @@ ] } } + }, + "IntegrationTypeListRequest": { + "type": "object", + "description": "查询集成类型列表的过滤参数。", + "properties": { + "p": { + "type": "integer", + "minimum": 1, + "default": 1, + "description": "页码,从 1 开始。" + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 20, + "description": "每页条数,默认 20,最大 100。" + }, + "orderby": { + "type": "string", + "description": "排序字段;不传时按控制台排序返回。", + "enum": [ + "id", + "created_at", + "updated_at", + "name", + "type" + ] + }, + "category": { + "type": "string", + "description": "按分类过滤,支持逗号分隔多个值,例如 `event.alert,event.change`。" + }, + "asc": { + "type": [ + "boolean", + "null" + ], + "default": true, + "description": "`true`(默认)升序,`false` 降序。" + } + } + }, + "IntegrationTypeItem": { + "type": "object", + "description": "账户可配置的一种集成类型。", + "required": [ + "plugin_type", + "plugin_type_name", + "plugin_type_logo_url", + "category", + "status", + "supports_api_create" + ], + "properties": { + "plugin_type": { + "type": "string", + "description": "创建集成时作为 `plugin_type` 传入的类型标识。", + "example": "standard.alert" + }, + "plugin_type_name": { + "type": "string", + "description": "类型显示名。", + "example": "Standard Alert" + }, + "plugin_type_logo_url": { + "type": "string", + "description": "类型 Logo 地址。" + }, + "category": { + "type": "string", + "description": "类型所属分类。", + "enum": [ + "event.alert", + "event.change", + "im", + "webhook" + ] + }, + "status": { + "type": "string", + "description": "该类型在平台侧的状态。" + }, + "supports_api_create": { + "type": "boolean", + "description": "该类型能否通过 `POST /integration/create` 创建。" + } + } + }, + "ListIntegrationTypesResponse": { + "type": "object", + "description": "集成类型列表的一页。", + "required": [ + "p", + "limit", + "total", + "items" + ], + "properties": { + "p": { + "type": "integer", + "description": "当前页码。" + }, + "limit": { + "type": "integer", + "description": "当前每页条数。" + }, + "total": { + "type": "integer", + "format": "int64", + "description": "匹配的类型总数。" + }, + "items": { + "type": "array", + "description": "当前页的集成类型。", + "items": { + "$ref": "#/components/schemas/IntegrationTypeItem" + } + } + } + }, + "ListIntegrationsRequest": { + "type": "object", + "description": "查询集成列表的过滤参数。", + "properties": { + "p": { + "type": "integer", + "minimum": 1, + "default": 1, + "description": "页码,从 1 开始。" + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 20, + "description": "每页条数,默认 20,最大 100。" + }, + "orderby": { + "type": "string", + "description": "排序字段,默认 `created_at`;`plugin_type` 按底层插件排序。", + "enum": [ + "created_at", + "updated_at", + "name", + "plugin_type", + "status" + ] + }, + "category": { + "type": "string", + "description": "按分类过滤,支持逗号分隔多个值。" + }, + "type": { + "type": "string", + "description": "已废弃;与 `plugin_type` 同时传入时会合并生效。" + }, + "plugin_type": { + "type": "string", + "description": "按集成类型过滤,支持逗号分隔多个值。" + }, + "status": { + "type": "string", + "description": "按状态过滤,支持逗号分隔多个值。" + }, + "name": { + "type": "string", + "description": "按集成名称过滤。" + }, + "ref_ids": { + "type": "array", + "description": "按来源引用 ID 过滤;每个值必须以 `c_`(协作空间)、`a_`(账户)或 `w_` 开头。", + "items": { + "type": "string" + } + }, + "asc": { + "type": "boolean", + "description": "`true` 升序,`false` 降序。" + }, + "is_my_team": { + "type": "boolean", + "description": "仅返回你所在团队拥有的集成。" + }, + "team_ids": { + "type": "array", + "description": "按团队 ID 过滤;与 `is_my_team` 同时使用时在其结果内进一步收窄。", + "items": { + "type": "integer", + "format": "int64" + } + } + } + }, + "IntegrationItem": { + "type": "object", + "description": "已配置的集成;时间字段为 Unix 时间戳(秒)。", + "required": [ + "integration_id", + "team_id", + "plugin_type", + "plugin_type_name", + "category", + "name", + "description", + "status", + "ref_id", + "created_at", + "updated_at", + "last_time" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "集成 ID。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID;未归属团队时为 `0`。" + }, + "plugin_type": { + "type": "string", + "description": "集成类型,例如 `standard.alert`、`zabbix.alert`。" + }, + "plugin_type_name": { + "type": "string", + "description": "集成类型显示名,随请求语言变化。" + }, + "category": { + "type": "string", + "enum": [ + "event.alert", + "event.change", + "im", + "webhook" + ], + "description": "集成所属分类。" + }, + "name": { + "type": "string", + "description": "集成名称。" + }, + "description": { + "type": "string", + "description": "集成描述。" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "状态:`enabled` 正常接收事件,`disabled` 已暂停。" + }, + "ref_id": { + "type": "string", + "description": "来源引用 ID:`a_` 开头表示账户级集成,集成被共享到协作空间时为 `c_` 开头。" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间的 Unix 时间戳(秒)。" + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最近更新时间的 Unix 时间戳(秒)。" + }, + "last_time": { + "type": "integer", + "format": "int64", + "description": "最近收到事件时间的 Unix 时间戳(秒),尚未收到事件时为 `0`。" + } + } + }, + "ListIntegrationsResponse": { + "type": "object", + "description": "集成列表的一页。", + "required": [ + "p", + "limit", + "total", + "items" + ], + "properties": { + "p": { + "type": "integer", + "description": "当前页码。" + }, + "limit": { + "type": "integer", + "description": "当前每页条数。" + }, + "total": { + "type": "integer", + "format": "int64", + "description": "匹配的集成总数。" + }, + "items": { + "type": "array", + "description": "当前页的集成。", + "items": { + "$ref": "#/components/schemas/IntegrationItem" + } + } + } + }, + "GetIntegrationRequest": { + "type": "object", + "description": "指定一个集成。", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "集成 ID。", + "example": 6113996590131 + } + } + }, + "IntegrationDetail": { + "type": "object", + "description": "单个集成详情,含完整配置;时间字段为 Unix 时间戳(秒)。", + "required": [ + "integration_id", + "team_id", + "plugin_type", + "plugin_type_name", + "category", + "name", + "description", + "status", + "ref_id", + "created_at", + "updated_at", + "last_time", + "settings" + ], + "properties": { + "integration_id": [ + { + "type": "integer", + "format": "int64", + "description": "集成 ID。" + }, + true + ], + "team_id": [ + { + "type": "integer", + "format": "int64", + "description": "所属团队 ID;未归属团队时为 `0`。" + }, + true + ], + "plugin_type": [ + { + "type": "string", + "description": "集成类型,例如 `standard.alert`、`zabbix.alert`。" + }, + true + ], + "plugin_type_name": [ + { + "type": "string", + "description": "集成类型显示名,随请求语言变化。" + }, + true + ], + "category": [ + { + "type": "string", + "enum": [ + "event.alert", + "event.change", + "im", + "webhook" + ], + "description": "集成所属分类。" + }, + true + ], + "name": [ + { + "type": "string", + "description": "集成名称。" + }, + true + ], + "description": [ + { + "type": "string", + "description": "集成描述。" + }, + true + ], + "status": [ + { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "状态:`enabled` 正常接收事件,`disabled` 已暂停。" + }, + true + ], + "ref_id": [ + { + "type": "string", + "description": "来源引用 ID:`a_` 开头表示账户级集成,集成被共享到协作空间时为 `c_` 开头。" + }, + true + ], + "created_at": [ + { + "type": "integer", + "format": "int64", + "description": "创建时间的 Unix 时间戳(秒)。" + }, + true + ], + "updated_at": [ + { + "type": "integer", + "format": "int64", + "description": "最近更新时间的 Unix 时间戳(秒)。" + }, + true + ], + "last_time": [ + { + "type": "integer", + "format": "int64", + "description": "最近收到事件时间的 Unix 时间戳(秒),尚未收到事件时为 `0`。" + }, + true + ], + "settings": { + "type": "object", + "additionalProperties": true, + "description": "集成类型专属配置;敏感字段(endpoint、headers、密钥、密码)以 `******` 打码返回。" + } + } + }, + "CreateIntegrationRequest": { + "type": "object", + "description": "创建集成的请求体。", + "required": [ + "plugin_type" + ], + "properties": { + "plugin_type": { + "type": "string", + "description": "集成类型,必须是 `POST /integration/type/list` 中 `supports_api_create: true` 的类型。", + "example": "standard.alert" + }, + "name": { + "type": "string", + "minLength": 2, + "maxLength": 49, + "description": "集成名称,2–49 个字符。", + "example": "Prod metrics alerts" + }, + "description": { + "type": "string", + "maxLength": 499, + "description": "集成描述,最长 499 个字符。" + }, + "team_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "所属团队 ID。", + "example": 1467226103121 + }, + "settings": { + "type": "object", + "description": "集成类型专属配置,可传字段取决于 `plugin_type`。", + "additionalProperties": true + } + } + }, + "CreateIntegrationResponse": { + "type": "object", + "description": "创建结果与集成 Key。", + "required": [ + "integration_id", + "integration_key" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "description": "新建集成的 ID。", + "example": 6113996590131 + }, + "integration_key": { + "type": "string", + "description": "该集成的推送鉴权 Key,仅在此处返回;需要新 Key 请调用 `POST /integration/key/rotate`。", + "example": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" + } + } + }, + "UpdateIntegrationRequest": { + "type": "object", + "description": "更新集成的请求体;仅发送的字段会被修改。", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "集成 ID。", + "example": 6113996590131 + }, + "name": { + "type": [ + "string", + "null" + ], + "minLength": 2, + "maxLength": 49, + "description": "新的集成名称,2–49 个字符。" + }, + "description": { + "type": [ + "string", + "null" + ], + "maxLength": 499, + "description": "新的集成描述,最长 499 个字符。" + }, + "team_id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "minimum": 0, + "description": "新的所属团队 ID;传 `0` 表示清除团队归属。" + }, + "settings": { + "type": [ + "object", + "null" + ], + "description": "替换该集成类型的配置;敏感字段不传、或原样回传 `******`,都会保留已存储的值。", + "additionalProperties": true + } + } + }, + "IntegrationLifecycleRequest": { + "type": "object", + "description": "指定要操作的集成。", + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "minimum": 1, + "description": "集成 ID。", + "example": 6113996590131 + } + } + }, + "RotateIntegrationKeyResponse": { + "type": "object", + "description": "新生成的集成 Key。", + "required": [ + "integration_key" + ], + "properties": { + "integration_key": { + "type": "string", + "description": "新的集成 Key。旧 Key 立即失效,且该值之后无法再次读取。", + "example": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" + } + } } }, "securitySchemes": { @@ -60527,6 +61147,745 @@ } } } + }, + "/integration/type/list": { + "post": { + "operationId": "integration-api-read-type-list", + "summary": "查询集成类型列表", + "description": "查询当前账户可配置的集成类型列表。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心查看**(`on-call`) |\n\n## 使用说明\n\n- 不传 `orderby` 时按控制台排序返回,此时 `p`/`limit` 依然生效。\n- `supports_api_create` 表示该类型能否通过 `POST /integration/create` 创建。", + "href": "/zh/api-reference/on-call/integrations/integration-api-read-type-list", + "metadata": { + "sidebarTitle": "查询集成类型列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListIntegrationTypesResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "p": 1, + "limit": 20, + "total": 2, + "items": [ + { + "plugin_type": "standard.alert", + "plugin_type_name": "Standard Alert", + "plugin_type_logo_url": "https://cdn.flashcat.cloud/plugin/standard-alert.svg", + "category": "event.alert", + "status": "enabled", + "supports_api_create": true + }, + { + "plugin_type": "jira.change", + "plugin_type_name": "Jira", + "plugin_type_logo_url": "https://cdn.flashcat.cloud/plugin/jira.svg", + "category": "event.change", + "status": "enabled", + "supports_api_create": 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/IntegrationTypeListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "category": "event.alert" + } + } + } + } + } + }, + "/integration/list": { + "post": { + "operationId": "integration-api-read-list", + "summary": "查询集成列表", + "description": "查询当前账户的告警源与变更源集成列表。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心查看**(`on-call`) |\n\n## 使用说明\n\n- `orderby` 默认 `created_at`;`plugin_type` 按底层插件排序。\n- `plugin_type`、`status`、`category` 支持逗号分隔多值;`ref_ids` 每个值必须以 `c_`、`a_` 或 `w_` 开头。\n- 传入 `is_my_team` 时仅返回你所在团队的集成,`team_ids` 会在该范围内进一步收窄。", + "href": "/zh/api-reference/on-call/integrations/integration-api-read-list", + "metadata": { + "sidebarTitle": "查询集成列表" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ListIntegrationsResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "p": 1, + "limit": 20, + "total": 1, + "items": [ + { + "integration_id": 6113996590131, + "team_id": 1467226103121, + "plugin_type": "standard.alert", + "plugin_type_name": "Standard Alert", + "category": "event.alert", + "name": "Prod metrics alerts", + "description": "Alerts pushed by the production Prometheus stack", + "status": "enabled", + "ref_id": "a_6612f0c9e1b7a4d3508f2c6b", + "created_at": 1775116800, + "updated_at": 1775203200, + "last_time": 1775298600 + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListIntegrationsRequest" + }, + "example": { + "p": 1, + "limit": 20, + "status": "enabled" + } + } + } + } + } + }, + "/integration/info": { + "post": { + "operationId": "integration-api-read-info", + "summary": "查询集成详情", + "description": "查询单个集成详情,敏感配置以打码形式返回。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **集成中心查看**(`on-call`) |\n\n## 使用说明\n\n- 敏感配置(endpoint、headers、密钥、密码)均以 `******` 打码返回。", + "href": "/zh/api-reference/on-call/integrations/integration-api-read-info", + "metadata": { + "sidebarTitle": "查询集成详情" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/IntegrationDetail" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "team_id": 1467226103121, + "plugin_type": "standard.alert", + "plugin_type_name": "Standard Alert", + "category": "event.alert", + "name": "Prod metrics alerts", + "description": "Alerts pushed by the production Prometheus stack", + "status": "enabled", + "ref_id": "a_6612f0c9e1b7a4d3508f2c6b", + "created_at": 1775116800, + "updated_at": 1775203200, + "last_time": 1775298600, + "settings": { + "severity_mapping": [ + { + "P1": "Critical" + } + ], + "labels": { + "source": "prometheus" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetIntegrationRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/integration/create": { + "post": { + "operationId": "integration-api-write-create", + "summary": "创建集成", + "description": "为某个告警源或变更源创建集成。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- `plugin_type` 必须是 `POST /integration/type/list` 中 `supports_api_create: true` 的类型,否则返回 `InvalidParameter`。\n- `integration_key` 仅在创建时返回一次,请及时保存;`POST /integration/info` 不会返回该字段。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/integrations/integration-api-write-create", + "metadata": { + "sidebarTitle": "创建集成" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CreateIntegrationResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "integration_key": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateIntegrationRequest" + }, + "example": { + "plugin_type": "standard.alert", + "name": "Prod metrics alerts", + "description": "Alerts pushed by the production Prometheus stack", + "team_id": 1467226103121, + "settings": { + "severity_mapping": [ + { + "P1": "Critical" + } + ] + } + } + } + } + } + } + }, + "/integration/update": { + "post": { + "operationId": "integration-api-write-update", + "summary": "更新集成", + "description": "更新集成的名称、描述、所属团队或配置。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 仅发送的字段会被修改,未发送的字段保持原值。\n- `settings` 会整体替换已存储的配置;敏感字段不传、或原样回传打码值 `******`,都会保留已存储的值。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/integrations/integration-api-write-update", + "metadata": { + "sidebarTitle": "更新集成" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/IntegrationDetail" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "team_id": 1467226103121, + "plugin_type": "standard.alert", + "plugin_type_name": "Standard Alert", + "category": "event.alert", + "name": "Prod metrics alerts (primary)", + "description": "Alerts pushed by the production Prometheus stack", + "status": "enabled", + "ref_id": "a_6612f0c9e1b7a4d3508f2c6b", + "created_at": 1775116800, + "updated_at": 1775298600, + "last_time": 1775298600, + "settings": { + "severity_mapping": [ + { + "P1": "Critical" + } + ], + "labels": { + "source": "prometheus" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateIntegrationRequest" + }, + "example": { + "integration_id": 6113996590131, + "name": "Prod metrics alerts (primary)", + "team_id": 1467226103121 + } + } + } + } + } + }, + "/integration/delete": { + "post": { + "operationId": "integration-api-write-delete", + "summary": "删除集成", + "description": "删除指定的集成。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 若该集成仍被其他对象引用,删除会返回 HTTP 400,`error.code` 为 `ReferenceExist`,`data.refs` 列出引用方。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/integrations/integration-api-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" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationLifecycleRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/integration/enable": { + "post": { + "operationId": "integration-api-write-enable", + "summary": "启用集成", + "description": "重新启用已禁用的集成,恢复接收事件。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 启用会恢复该集成的拉取任务与心跳,并要求当前套餐包含该集成类型。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/integrations/integration-api-write-enable", + "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" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationLifecycleRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/integration/disable": { + "post": { + "operationId": "integration-api-write-disable", + "summary": "禁用集成", + "description": "禁用集成,但保留其配置。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 禁用后停止接收事件并暂停定时拉取任务,配置保留,可再次启用。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/integrations/integration-api-write-disable", + "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" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationLifecycleRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } + }, + "/integration/key/rotate": { + "post": { + "operationId": "integration-api-write-rotate-key", + "summary": "轮换集成 Key", + "description": "生成新的集成 Key,并使旧 Key 立即失效。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **集成中心管理**(`on-call`) |\n\n## 使用说明\n\n- 旧 Key 会立即失效,请先更新推送侧再轮换。\n- 新 Key 只返回一次,之后无法再次读取。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", + "href": "/zh/api-reference/on-call/integrations/integration-api-write-rotate-key", + "metadata": { + "sidebarTitle": "轮换集成 Key" + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RotateIntegrationKeyResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_key": "9f2c7d1b45a86e30f7b1c9d4a2e65738123" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationLifecycleRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + } + } } }, "security": [ diff --git a/docs.json b/docs.json index f1aaa570..02c39983 100644 --- a/docs.json +++ b/docs.json @@ -2281,7 +2281,16 @@ "pages": [ "POST /webhook/history/list", "POST /webhook/history/detail", - "POST /datasource/im/person/try-link" + "POST /datasource/im/person/try-link", + "POST /integration/type/list", + "POST /integration/list", + "POST /integration/info", + "POST /integration/create", + "POST /integration/update", + "POST /integration/delete", + "POST /integration/enable", + "POST /integration/disable", + "POST /integration/key/rotate" ] }, { @@ -3668,7 +3677,16 @@ "pages": [ "POST /webhook/history/list", "POST /webhook/history/detail", - "POST /datasource/im/person/try-link" + "POST /datasource/im/person/try-link", + "POST /integration/type/list", + "POST /integration/list", + "POST /integration/info", + "POST /integration/create", + "POST /integration/update", + "POST /integration/delete", + "POST /integration/enable", + "POST /integration/disable", + "POST /integration/key/rotate" ] }, { diff --git a/en/openapi/api-catalog.mdx b/en/openapi/api-catalog.mdx index 54265f2f..f09a701f 100644 --- a/en/openapi/api-catalog.mdx +++ b/en/openapi/api-catalog.mdx @@ -3,13 +3,13 @@ title: "API Catalog" description: "Complete list of Flashduty Open API endpoints, organized by product module with links to detailed documentation" --- -Flashduty Open API provides **338** endpoints covering five major modules: On-call, Monitors, RUM, AI SRE, and Platform. All endpoints use unified authentication and request specifications. See [Quick Start](/en/openapi/introduction) for details. +Flashduty Open API provides **347** endpoints covering five major modules: On-call, Monitors, RUM, AI SRE, and Platform. All endpoints use unified authentication and request specifications. See [Quick Start](/en/openapi/introduction) for details. All endpoint URLs use `https://api.flashcat.cloud` as the base, authenticated via APP Key through query string. - + ### Incidents @@ -134,6 +134,15 @@ All endpoint URLs use `https://api.flashcat.cloud` as the base, authenticated vi | POST | [`/webhook/history/list`](/en/api-reference/on-call/integrations/webhook-history-list) | List webhook delivery history | | POST | [`/webhook/history/detail`](/en/api-reference/on-call/integrations/webhook-history-detail) | Get webhook delivery detail | | POST | [`/datasource/im/person/try-link`](/en/api-reference/on-call/integrations/datasource-im-person-try-link) | Attempt IM person linking | +| POST | [`/integration/type/list`](/en/api-reference/on-call/integrations/integration-api-read-type-list) | List integration types | +| POST | [`/integration/list`](/en/api-reference/on-call/integrations/integration-api-read-list) | List integrations | +| POST | [`/integration/info`](/en/api-reference/on-call/integrations/integration-api-read-info) | Get integration detail | +| POST | [`/integration/create`](/en/api-reference/on-call/integrations/integration-api-write-create) | Create integration | +| POST | [`/integration/update`](/en/api-reference/on-call/integrations/integration-api-write-update) | Update integration | +| POST | [`/integration/delete`](/en/api-reference/on-call/integrations/integration-api-write-delete) | Delete integration | +| POST | [`/integration/enable`](/en/api-reference/on-call/integrations/integration-api-write-enable) | Enable integration | +| POST | [`/integration/disable`](/en/api-reference/on-call/integrations/integration-api-write-disable) | Disable integration | +| POST | [`/integration/key/rotate`](/en/api-reference/on-call/integrations/integration-api-write-rotate-key) | Rotate integration key | ### Schedules diff --git a/zh/openapi/api-catalog.mdx b/zh/openapi/api-catalog.mdx index 2b8550a7..a0e82872 100644 --- a/zh/openapi/api-catalog.mdx +++ b/zh/openapi/api-catalog.mdx @@ -3,13 +3,13 @@ title: "API 目录" description: "Flashduty Open API 接口完整列表,按产品模块组织并链接到详细文档" --- -Flashduty Open API 提供 **338** 个接口,覆盖 On-call、Monitors、RUM、AI SRE 和平台五个主要模块。所有接口使用统一认证方式和请求规范。详情参见[快速开始](/zh/openapi/introduction)。 +Flashduty Open API 提供 **347** 个接口,覆盖 On-call、Monitors、RUM、AI SRE 和平台五个主要模块。所有接口使用统一认证方式和请求规范。详情参见[快速开始](/zh/openapi/introduction)。 所有接口 URL 均以 `https://api.flashcat.cloud` 为 base,通过 query string 中的 APP Key 认证。 - + ### 故障管理 @@ -134,6 +134,15 @@ Flashduty Open API 提供 **338** 个接口,覆盖 On-call、Monitors、RUM、 | 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 | [`/datasource/im/person/try-link`](/zh/api-reference/on-call/integrations/datasource-im-person-try-link) | 尝试关联 IM 人员 | +| POST | [`/integration/type/list`](/zh/api-reference/on-call/integrations/integration-api-read-type-list) | 查询集成类型列表 | +| POST | [`/integration/list`](/zh/api-reference/on-call/integrations/integration-api-read-list) | 查询集成列表 | +| POST | [`/integration/info`](/zh/api-reference/on-call/integrations/integration-api-read-info) | 查询集成详情 | +| POST | [`/integration/create`](/zh/api-reference/on-call/integrations/integration-api-write-create) | 创建集成 | +| POST | [`/integration/update`](/zh/api-reference/on-call/integrations/integration-api-write-update) | 更新集成 | +| POST | [`/integration/delete`](/zh/api-reference/on-call/integrations/integration-api-write-delete) | 删除集成 | +| POST | [`/integration/enable`](/zh/api-reference/on-call/integrations/integration-api-write-enable) | 启用集成 | +| POST | [`/integration/disable`](/zh/api-reference/on-call/integrations/integration-api-write-disable) | 禁用集成 | +| POST | [`/integration/key/rotate`](/zh/api-reference/on-call/integrations/integration-api-write-rotate-key) | 轮换集成 Key | ### 值班排班