From 0409f4ce01cddf531fe346c0c74cf37503df308a Mon Sep 17 00:00:00 2001 From: alick-liming Date: Tue, 22 Sep 2026 16:44:14 +0800 Subject: [PATCH] docs(api): document integration management endpoints --- api-reference/on-call.openapi.en.json | 2159 +- api-reference/on-call.openapi.zh.json | 1875 +- api-reference/openapi.en.json | 25831 +++++++++++++----------- api-reference/openapi.zh.json | 25831 +++++++++++++----------- docs.json | 18 + en/openapi/api-catalog.mdx | 13 +- zh/openapi/api-catalog.mdx | 13 +- 7 files changed, 30598 insertions(+), 25142 deletions(-) diff --git a/api-reference/on-call.openapi.en.json b/api-reference/on-call.openapi.en.json index a76fc6d4..33e714f8 100644 --- a/api-reference/on-call.openapi.en.json +++ b/api-reference/on-call.openapi.en.json @@ -17411,6 +17411,789 @@ } } } + }, + "/integration/type/list": { + "post": { + "operationId": "integration-api-read-type-list", + "summary": "List integration types", + "description": "List available integration types and whether each type supports creation through the public API.", + "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| Authentication | APP Key supported |\n\n## Usage\n\n- Use only a type whose `supports_api_create` value is `true` when calling `/integration/create`.\n- `plugin_type_name` follows the request locale.", + "href": "/en/api-reference/on-call/integrations/integration-api-read-type-list", + "metadata": { + "sidebarTitle": "List integration types" + } + }, + "requestBody": { + "required": true, + "description": "Request parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIntegrationTypeListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "category": "event.alert" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PublicIntegrationTypeListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "p": 1, + "limit": 20, + "total": 1, + "items": [ + { + "plugin_type": "prometheus.alert", + "plugin_type_name": "Prometheus", + "plugin_type_logo_url": "https://cdn.flashcat.cloud/integrations/prometheus.svg", + "category": "event.alert", + "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" + } + } + } + }, + "/integration/list": { + "post": { + "operationId": "integration-api-read-list", + "summary": "List integrations", + "description": "List account-level integrations with filters and pagination.", + "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| Authentication | APP Key supported |\n\n## Usage\n\n- This endpoint returns integration summaries and does not include `settings`; use `/integration/info` for configuration details.\n- Channel-specific integrations are excluded.\n- Set `is_my_team=true` to restrict results to teams the caller belongs to.", + "href": "/en/api-reference/on-call/integrations/integration-api-read-list", + "metadata": { + "sidebarTitle": "List integrations" + } + }, + "requestBody": { + "required": true, + "description": "Request parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIntegrationListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "status": "enabled", + "team_ids": [ + 2477033058131 + ] + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PublicIntegrationListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "p": 1, + "limit": 20, + "total": 1, + "items": [ + { + "integration_id": 6113996590131, + "team_id": 2477033058131, + "plugin_type": "prometheus.alert", + "plugin_type_name": "Prometheus", + "category": "event.alert", + "name": "Production Prometheus", + "description": "Receives production alerts", + "status": "enabled", + "ref_id": "a_2451002751131", + "created_at": 1787371200, + "updated_at": 1787374800, + "last_time": 1787378400 + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/integration/info": { + "post": { + "operationId": "integration-api-read-info", + "summary": "Get integration detail", + "description": "Get one account-level integration, including plugin-specific 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| Authentication | APP Key supported |\n\n## Usage\n\n- Sensitive setting values are returned as `******`.\n- Channel-specific integrations are returned as `ResourceNotFound`.", + "href": "/en/api-reference/on-call/integrations/integration-api-read-info", + "metadata": { + "sidebarTitle": "Get integration detail" + } + }, + "requestBody": { + "required": true, + "description": "Request parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIntegrationIDRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PublicIntegrationDetail" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "team_id": 2477033058131, + "plugin_type": "alert.webhook", + "plugin_type_name": "Alert webhook", + "category": "webhook", + "name": "Production alert webhook", + "description": "Sends production alerts to a downstream system", + "status": "enabled", + "ref_id": "a_2451002751131", + "created_at": 1787371200, + "updated_at": 1787374800, + "last_time": 1787378400, + "settings": { + "endpoint": "******", + "headers": { + "Authorization": "******" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/integration/create": { + "post": { + "operationId": "integration-api-write-create", + "summary": "Create an integration", + "description": "Create an account-level integration for a public-API-supported type.", + "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| Authentication | APP Key supported |\n| Audit | Every call is recorded in the account audit log |\n\n## Usage\n\n- Get supported types from `/integration/type/list`; the selected type must be enabled and have `supports_api_create=true`.\n- The caller must have access to a nonzero `team_id`. Omit `team_id` to create an account-wide integration.\n- The ingestion key is returned only in this response; store it securely.", + "href": "/en/api-reference/on-call/integrations/integration-api-write-create", + "metadata": { + "sidebarTitle": "Create an integration" + } + }, + "requestBody": { + "required": true, + "description": "Request parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIntegrationCreateRequest" + }, + "example": { + "plugin_type": "prometheus.alert", + "name": "Production Prometheus", + "description": "Receives production alerts", + "team_id": 2477033058131, + "settings": {} + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PublicIntegrationCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "integration_key": "ik_live_8f31c1a29c7b4d14" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/integration/update": { + "post": { + "operationId": "integration-api-write-update", + "summary": "Update an integration", + "description": "Update mutable fields of an account-level integration.", + "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| Authentication | APP Key supported |\n| Audit | Every call is recorded in the account audit log |\n\n## Usage\n\n- The caller must have edit access to the integration.\n- When `settings` is present, it replaces the complete plugin settings object. Existing secret fields are preserved when omitted or submitted as `******`.\n- Omit a top-level mutable field, or set it to `null`, to leave it unchanged.", + "href": "/en/api-reference/on-call/integrations/integration-api-write-update", + "metadata": { + "sidebarTitle": "Update an integration" + } + }, + "requestBody": { + "required": true, + "description": "Request parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIntegrationUpdateRequest" + }, + "example": { + "integration_id": 6113996590131, + "name": "Production alert webhook", + "team_id": 2477033058131, + "settings": { + "endpoint": "******", + "headers": { + "Authorization": "******" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PublicIntegrationDetail" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "team_id": 2477033058131, + "plugin_type": "alert.webhook", + "plugin_type_name": "Alert webhook", + "category": "webhook", + "name": "Production alert webhook", + "description": "Sends production alerts to a downstream system", + "status": "enabled", + "ref_id": "a_2451002751131", + "created_at": 1787371200, + "updated_at": 1787374800, + "last_time": 1787378400, + "settings": { + "endpoint": "******", + "headers": { + "Authorization": "******" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/integration/enable": { + "post": { + "operationId": "integration-api-write-enable", + "summary": "Enable an integration", + "description": "Enable an account-level integration.", + "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| Authentication | APP Key supported |\n| Audit | Every call is recorded in the account audit log |\n\n## Usage\n\n- The caller must have edit access to the integration.\n- Enabling an already enabled integration succeeds without another state change.\n- The account must have a valid license for the integration type.", + "href": "/en/api-reference/on-call/integrations/integration-api-write-enable", + "metadata": { + "sidebarTitle": "Enable an integration" + } + }, + "requestBody": { + "required": true, + "description": "Request parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIntegrationIDRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/integration/disable": { + "post": { + "operationId": "integration-api-write-disable", + "summary": "Disable an integration", + "description": "Disable an account-level integration.", + "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| Authentication | APP Key supported |\n| Audit | Every call is recorded in the account audit log |\n\n## Usage\n\n- The caller must have edit access to the integration.\n- Disabling an already disabled integration succeeds without another state change.", + "href": "/en/api-reference/on-call/integrations/integration-api-write-disable", + "metadata": { + "sidebarTitle": "Disable an integration" + } + }, + "requestBody": { + "required": true, + "description": "Request parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIntegrationIDRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/integration/key/rotate": { + "post": { + "operationId": "integration-api-write-rotate-key", + "summary": "Rotate an integration key", + "description": "Replace the ingestion key of an account-level integration.", + "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| Authentication | APP Key supported |\n| Audit | Every call is recorded in the account audit log |\n\n## Usage\n\n- The caller must have edit access to the integration.\n- The previous key stops working after rotation. Store the new key securely.", + "href": "/en/api-reference/on-call/integrations/integration-api-write-rotate-key", + "metadata": { + "sidebarTitle": "Rotate an integration key" + } + }, + "requestBody": { + "required": true, + "description": "Request parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIntegrationIDRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PublicIntegrationKeyRotateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_key": "ik_live_c6b09391632c438e" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/integration/delete": { + "post": { + "operationId": "integration-api-write-delete", + "summary": "Delete an integration", + "description": "Delete an account-level integration that is not referenced by another resource.", + "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| Authentication | APP Key supported |\n| Audit | Every call is recorded in the account audit log |\n\n## Usage\n\n- The caller must have edit access to the integration.\n- If another resource still references the integration, the server returns `400` with code `ReferenceExist` and lists the references in `data.refs`.", + "href": "/en/api-reference/on-call/integrations/integration-api-write-delete", + "metadata": { + "sidebarTitle": "Delete an integration" + } + }, + "requestBody": { + "required": true, + "description": "Request parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIntegrationIDRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + }, + "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": { + "description": "Invalid request, missing resource, or deletion blocked by existing references.", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorResponse" + }, + { + "$ref": "#/components/schemas/PublicIntegrationDeleteBlockedError" + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "ReferenceExist", + "message": "The resource is still referenced" + }, + "data": { + "refs": [ + { + "kind": "team", + "name": "Platform Team", + "href": "/on-call/team/2477033058131" + } + ] + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } } }, "components": { @@ -33003,35 +33786,246 @@ } } }, - "IncidentCommentTypeDisplay": { + "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." + }, + "post_mortem_id": { + "type": "string", + "description": "ID of the post-mortem the work item is bound to." + } + }, + "title": "i_wi_completed" + }, + "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 +34037,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 +34070,916 @@ "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." + }, + "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": { + "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." + } + } + }, + "FeedDetailAlertUpdate": { + "type": "object", + "title": "a_update", + "description": "Detail payload for `a_update`: severity/status after the update.", + "properties": { + "severity": { + "$ref": "#/components/schemas/FeedSeverity" }, - "to_description": { - "type": "string", - "description": "Description after the update." + "status": { + "$ref": "#/components/schemas/FeedSeverity" } - }, - "title": "i_wi_updated" + } }, - "FeedDetailWorkItemAssigneesChanged": { + "FeedDetailAlertMuteBySilence": { "type": "object", - "description": "Detail payload for `i_wi_assignees`.", + "title": "a_m_silence", + "description": "Detail payload for `a_m_silence`: the alert was muted by a silence rule.", "properties": { - "work_item_id": { - "type": "string", - "description": "Work item ID." - }, - "item_type": { + "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": { + "PublicIntegrationTypeListRequest": { "type": "object", - "description": "Detail payload for `i_wi_deleted`.", + "additionalProperties": false, "properties": { - "work_item_id": { - "type": "string", - "description": "Work item ID." + "p": { + "type": "integer", + "minimum": 1, + "default": 1, + "description": "Page number." }, - "item_type": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 20, + "description": "Items per page." + }, + "orderby": { "type": "string", "enum": [ - "action", - "follow_up" + "id", + "created_at", + "updated_at", + "name", + "type" ], - "description": "Work item type. `action`: an action item anchored to the incident itself; `follow_up`: an improvement item anchored to a post-mortem." + "description": "Sort field. When omitted, ranked types come first, followed by `plugin_type`." }, - "title": { + "category": { "type": "string", - "description": "Work item title." + "description": "Comma-separated categories.", + "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", + "default": true, + "description": "Sort in ascending order." } - }, - "title": "i_wi_deleted" + } }, - "FeedDetailAlertMerge": { + "PublicIntegrationPluginTypeItem": { "type": "object", - "title": "a_merge", - "description": "Detail payload for `a_merge`: an alert merged into an incident.", + "additionalProperties": false, + "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." - }, - "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." + "description": "Type identifier used by the create API.", + "example": "prometheus.alert" }, - "owner_id": { - "type": "integer", - "format": "int64", - "description": "New owner member ID set on the target incident. Omitted when unchanged." + "plugin_type_name": { + "type": "string", + "description": "Localized type name.", + "example": "Prometheus" }, - "title": { + "plugin_type_logo_url": { "type": "string", - "description": "New title set on the target incident. Omitted when unchanged." - } - } - }, - "AlertShort": { - "type": "object", - "description": "Brief alert reference.", - "properties": { - "alert_id": { + "description": "Logo URL. May be empty.", + "example": "https://cdn.flashcat.cloud/integrations/prometheus.svg" + }, + "category": { "type": "string", - "pattern": "^[0-9a-fA-F]{24}$", - "description": "Alert ID (ObjectID hex string)." + "description": "Integration category.", + "example": "event.alert" }, - "title": { + "status": { "type": "string", - "description": "Alert title, resolved at read time. Omitted when empty." + "enum": [ + "enabled", + "disabled" + ], + "description": "Whether this type is currently available.", + "example": "enabled" + }, + "supports_api_create": { + "type": "boolean", + "description": "Whether `/integration/create` accepts this type.", + "example": true } } }, - "EventGroup": { + "PublicIntegrationTypeListResponse": { "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.", + "additionalProperties": false, + "required": [ + "p", + "limit", + "total", + "items" + ], "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, + "description": "Page number." }, - "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, + "description": "Items per page." }, - { - "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." - } + "total": { + "type": "integer", + "minimum": 0, + "description": "Total matching items." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PublicIntegrationPluginTypeItem" }, - "required": [ - "managed_domain_feature_enabled" - ] + "description": "Integration types on the current page." } - ] + } }, - "StatusPagePreDefinedTemplate": { + "PublicIntegrationListRequest": { "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.", + "additionalProperties": false, "properties": { - "template_id": { - "type": "string", - "description": "Template ID. Omit to create a new template; supply to update an existing one." + "p": { + "type": "integer", + "minimum": 1, + "default": 1, + "description": "Page number." }, - "title": { - "type": "string", - "description": "Template title." + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 100, + "description": "Items per page." }, - "type": { + "orderby": { "type": "string", "enum": [ - "incident", - "maintenance" + "created_at", + "updated_at", + "name", + "plugin_type", + "status" ], - "description": "Change type the template applies to: `incident` unplanned incident, `maintenance` planned maintenance." + "default": "created_at", + "description": "Sort field." + }, + "category": { + "type": "string", + "description": "Comma-separated categories.", + "example": "event.alert" + }, + "plugin_type": { + "type": "string", + "description": "Comma-separated integration type identifiers.", + "example": "prometheus.alert,grafana.alert" }, "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": "Comma-separated statuses: `enabled` or `disabled`.", + "example": "enabled" }, - "description": { + "name": { "type": "string", - "description": "Template body text (Markdown)." + "description": "Name search text." + }, + "ref_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Resource scope IDs to match. Public results are account-scoped.", + "example": [ + "a_2451002751131" + ] + }, + "asc": { + "type": "boolean", + "default": false, + "description": "Sort in ascending order." + }, + "is_my_team": { + "type": "boolean", + "default": false, + "description": "When true, include only integrations owned by one of the caller's teams." + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64", + "minimum": 1 + }, + "description": "Team IDs to match. With `is_my_team=true`, this list is intersected with the caller's teams.", + "example": [ + 2477033058131 + ] } } }, - "StatusPageMessageTemplate": { + "PublicIntegrationItem": { "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.", + "additionalProperties": false, + "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.", + "example": 6113996590131 + }, + "team_id": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "Owning team ID. `0` means account-wide.", + "example": 2477033058131 + }, + "plugin_type": { "type": "string", - "description": "Template ID. Omit to create a new template; supply to update an existing one." + "description": "Stable integration type identifier.", + "example": "prometheus.alert" }, - "title": { + "plugin_type_name": { "type": "string", - "description": "Template title." + "description": "Localized integration type name.", + "example": "Prometheus" }, - "type": { + "category": { + "type": "string", + "description": "Integration category.", + "example": "event.alert" + }, + "name": { + "type": "string", + "description": "Integration name.", + "example": "Production Prometheus" + }, + "description": { + "type": "string", + "description": "Integration description.", + "example": "Receives production alerts" + }, + "status": { "type": "string", "enum": [ - "incident", - "maintenance" + "enabled", + "disabled" ], - "description": "Change type the template applies to: `incident` unplanned incident, `maintenance` planned maintenance." + "description": "Current integration status.", + "example": "enabled" }, - "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." + "ref_id": { + "type": "string", + "description": "Resource scope identifier. Public integrations are account-scoped and use the `a_` prefix.", + "example": "a_2451002751131" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation time as a Unix timestamp in seconds.", + "example": 1787371200 + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update time as a Unix timestamp in seconds.", + "example": 1787374800 + }, + "last_time": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "Last received event time as a Unix timestamp in seconds. `0` means no event has been received.", + "example": 1787378400 } } }, - "ListStatusPageTemplatesResponse": { + "PublicIntegrationListResponse": { "type": "object", - "description": "Event template list. Item shape depends on the requested `type`: predefined event templates for `pre_defined`, message templates for `message`.", + "additionalProperties": false, "required": [ + "p", + "limit", + "total", "items" ], "properties": { + "p": { + "type": "integer", + "minimum": 1, + "description": "Page number." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "description": "Items per page." + }, + "total": { + "type": "integer", + "minimum": 0, + "description": "Total matching items." + }, "items": { "type": "array", "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/StatusPagePreDefinedTemplate" - }, - { - "$ref": "#/components/schemas/StatusPageMessageTemplate" - } - ] + "$ref": "#/components/schemas/PublicIntegrationItem" }, - "description": "Templates of the requested category." + "description": "Integration summaries. `settings` is intentionally not included; call `/integration/info` for configuration." } } }, - "FeedDetailAlertUpdate": { + "PublicIntegrationIDRequest": { "type": "object", - "title": "a_update", - "description": "Detail payload for `a_update`: severity/status after the update.", + "additionalProperties": false, + "required": [ + "integration_id" + ], "properties": { - "severity": { - "$ref": "#/components/schemas/FeedSeverity" - }, - "status": { - "$ref": "#/components/schemas/FeedSeverity" + "integration_id": { + "type": "integer", + "format": "int64", + "exclusiveMinimum": 0, + "description": "Integration ID.", + "example": 6113996590131 } } }, - "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", - "pattern": "^[0-9a-fA-F]{24}$", - "description": "Silence rule ID that muted the alert. Omitted when empty." + "PublicIntegrationDetail": { + "allOf": [ + { + "$ref": "#/components/schemas/PublicIntegrationItem" }, - "rule_name": { - "type": "string", - "description": "Silence rule name, resolved at read time. Omitted when empty." + { + "type": "object", + "additionalProperties": false, + "required": [ + "settings" + ], + "properties": { + "settings": { + "type": "object", + "description": "Plugin-specific settings. The available fields depend on `plugin_type`. In detail and update responses, configured secrets are replaced with `******`. When updating, submit `******` or omit an existing secret field to retain its stored value; any other supplied value replaces it.", + "additionalProperties": true, + "example": { + "endpoint": "******", + "headers": { + "Authorization": "******" + } + } + } + } } - } + ] }, - "FeedDetailAlertMuteByInhibit": { + "PublicIntegrationCreateRequest": { "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.", + "additionalProperties": false, + "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." + "minLength": 1, + "description": "A type with `supports_api_create=true` from `/integration/type/list`.", + "example": "prometheus.alert" }, - "rule_name": { + "name": { "type": "string", - "description": "Inhibit rule name, resolved at read time. Omitted when empty." + "minLength": 2, + "maxLength": 49, + "description": "Integration name. Defaults to the localized type name when omitted.", + "example": "Production Prometheus" }, - "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": "Integration description." }, - "source_alert_title": { - "type": "string", - "description": "Title of the source alert, resolved at read time. Omitted when empty." + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID. Use `0` or omit the field for an account-wide integration.", + "example": 2477033058131, + "minimum": 0 + }, + "settings": { + "type": "object", + "description": "Plugin-specific settings. The available fields depend on `plugin_type`. In detail and update responses, configured secrets are replaced with `******`. When updating, submit `******` or omit an existing secret field to retain its stored value; any other supplied value replaces it.", + "additionalProperties": true, + "example": { + "endpoint": "******", + "headers": { + "Authorization": "******" + } + } } } }, - "FeedDetailAlertMuteByFlapping": { + "PublicIntegrationCreateResponse": { "type": "object", - "title": "a_m_flapping", - "description": "Detail payload for `a_m_flapping` (historical): the alert was muted by flapping detection.", + "additionalProperties": false, + "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", + "example": 6113996590131, + "description": "Integration ID." }, - "mute_secs": { - "type": "integer", - "description": "Mute duration in seconds. Omitted when zero." + "integration_key": { + "type": "string", + "description": "Secret ingestion key. Store it securely; creation returns it only in this response.", + "example": "ik_live_8f31c1a29c7b4d14" } } }, - "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": { + "PublicIntegrationUpdateRequest": { "type": "object", - "description": "Member on-call status request", + "additionalProperties": false, + "required": [ + "integration_id" + ], "properties": { - "person_id": { + "integration_id": { "type": "integer", - "description": "Member ID whose on-call status is returned.", - "format": "int64" + "format": "int64", + "exclusiveMinimum": 0, + "example": 6113996590131, + "description": "Integration ID." + }, + "name": { + "type": [ + "string", + "null" + ], + "minLength": 2, + "maxLength": 49, + "description": "New integration name. Omit or use null to leave unchanged." + }, + "description": { + "type": [ + "string", + "null" + ], + "maxLength": 499, + "description": "New description. Omit or use null to leave unchanged." + }, + "team_id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "minimum": 0, + "description": "New owning team. `0` makes the integration account-wide; omit or use null to leave unchanged." + }, + "settings": { + "anyOf": [ + { + "type": "object", + "description": "Plugin-specific settings. The available fields depend on `plugin_type`. In detail and update responses, configured secrets are replaced with `******`. When updating, submit `******` or omit an existing secret field to retain its stored value; any other supplied value replaces it.", + "additionalProperties": true, + "example": { + "endpoint": "******", + "headers": { + "Authorization": "******" + } + } + }, + { + "type": "null" + } + ], + "description": "Complete plugin settings replacement. Omit or use null to leave settings unchanged. Existing secret values survive when their fields are omitted or set to `******`." } - }, - "required": [ - "person_id" - ] + } }, - "ScheduleByPersonResponse": { + "PublicIntegrationKeyRotateResponse": { "type": "object", - "description": "The member's on-call status: the shift in progress, the next one, and every enabled schedule they participate in.", + "additionalProperties": false, + "required": [ + "integration_key" + ], "properties": { - "current": { - "$ref": "#/components/schemas/MemberOncallInterval" - }, - "next": { - "$ref": "#/components/schemas/MemberOncallInterval" - }, - "schedules": { - "type": "array", - "description": "All enabled schedules the member participates in.", - "items": { - "$ref": "#/components/schemas/MemberScheduleItem" - } + "integration_key": { + "type": "string", + "description": "New ingestion key. The previous key stops working after rotation.", + "example": "ik_live_c6b09391632c438e" } - }, - "required": [ - "schedules" - ] + } }, - "MemberScheduleItem": { + "PublicIntegrationReference": { "type": "object", - "description": "An enabled schedule the member participates in.", + "additionalProperties": false, "properties": { - "schedule_id": { - "type": "integer", - "description": "Schedule ID.", - "format": "int64" + "kind": { + "type": "string", + "description": "Referencing resource type.", + "example": "team" }, - "schedule_name": { + "name": { "type": "string", - "description": "Schedule name." + "description": "Referencing resource name.", + "example": "Platform Team" + }, + "href": { + "type": "string", + "description": "Console link for the referencing resource. May be empty.", + "example": "/on-call/team/2477033058131" } } }, - "MemberOncallInterval": { + "PublicIntegrationDeleteBlockedError": { "type": "object", - "description": "One on-call shift interval of a member.", + "additionalProperties": false, + "required": [ + "request_id", + "error", + "data" + ], "properties": { - "schedule_id": { - "type": "integer", - "description": "Owning schedule ID.", - "format": "int64" - }, - "schedule_name": { + "request_id": { "type": "string", - "description": "Owning schedule name." + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "description": "Unique trace ID for this request." }, - "start_at": { - "type": "integer", - "description": "Unix timestamp in seconds - when the shift starts.", - "format": "int64" + "error": { + "$ref": "#/components/schemas/DutyError" }, - "end_at": { - "type": "integer", - "description": "Unix timestamp in seconds - when the shift ends. Absent while the shift is ongoing.", - "format": "int64" + "data": { + "type": "object", + "additionalProperties": false, + "required": [ + "refs" + ], + "properties": { + "refs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PublicIntegrationReference" + }, + "description": "References that must be removed before deletion." + } + }, + "description": "Resources that currently reference the integration." } } } diff --git a/api-reference/on-call.openapi.zh.json b/api-reference/on-call.openapi.zh.json index 3d49ef29..850fc9e9 100644 --- a/api-reference/on-call.openapi.zh.json +++ b/api-reference/on-call.openapi.zh.json @@ -17411,6 +17411,789 @@ } } } + }, + "/integration/type/list": { + "post": { + "operationId": "integration-api-read-type-list", + "summary": "查询集成类型列表", + "description": "查询可用的集成类型,以及各类型是否支持通过公开 API 创建。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 限流 | 每个账户 **1,000 次/分钟**、**50 次/秒** |\n| 权限 | **集成中心查看**(`on-call`) |\n| 认证 | 支持 APP Key |\n\n## 使用说明\n\n- 调用 `/integration/create` 时,只能使用 `supports_api_create=true` 的类型。\n- `plugin_type_name` 会按请求语言返回。", + "href": "/zh/api-reference/on-call/integrations/integration-api-read-type-list", + "metadata": { + "sidebarTitle": "查询集成类型列表" + } + }, + "requestBody": { + "required": true, + "description": "请求参数。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIntegrationTypeListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "category": "event.alert" + } + } + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PublicIntegrationTypeListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "p": 1, + "limit": 20, + "total": 1, + "items": [ + { + "plugin_type": "prometheus.alert", + "plugin_type_name": "Prometheus", + "plugin_type_logo_url": "https://cdn.flashcat.cloud/integrations/prometheus.svg", + "category": "event.alert", + "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" + } + } + } + }, + "/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| 认证 | 支持 APP Key |\n\n## 使用说明\n\n- 本接口返回集成摘要,不包含 `settings`;配置详情请调用 `/integration/info`。\n- 不返回专属渠道集成。\n- 设置 `is_my_team=true` 可仅返回调用者所在团队的集成。", + "href": "/zh/api-reference/on-call/integrations/integration-api-read-list", + "metadata": { + "sidebarTitle": "查询集成列表" + } + }, + "requestBody": { + "required": true, + "description": "请求参数。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIntegrationListRequest" + }, + "example": { + "p": 1, + "limit": 20, + "status": "enabled", + "team_ids": [ + 2477033058131 + ] + } + } + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PublicIntegrationListResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "p": 1, + "limit": 20, + "total": 1, + "items": [ + { + "integration_id": 6113996590131, + "team_id": 2477033058131, + "plugin_type": "prometheus.alert", + "plugin_type_name": "Prometheus", + "category": "event.alert", + "name": "生产 Prometheus", + "description": "接收生产环境告警", + "status": "enabled", + "ref_id": "a_2451002751131", + "created_at": 1787371200, + "updated_at": 1787374800, + "last_time": 1787378400 + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/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| 认证 | 支持 APP Key |\n\n## 使用说明\n\n- 敏感配置值会返回为 `******`。\n- 查询专属渠道集成时返回 `ResourceNotFound`。", + "href": "/zh/api-reference/on-call/integrations/integration-api-read-info", + "metadata": { + "sidebarTitle": "查看集成详情" + } + }, + "requestBody": { + "required": true, + "description": "请求参数。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIntegrationIDRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PublicIntegrationDetail" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "team_id": 2477033058131, + "plugin_type": "alert.webhook", + "plugin_type_name": "告警 Webhook", + "category": "webhook", + "name": "生产告警 Webhook", + "description": "向下游系统推送生产告警", + "status": "enabled", + "ref_id": "a_2451002751131", + "created_at": 1787371200, + "updated_at": 1787374800, + "last_time": 1787378400, + "settings": { + "endpoint": "******", + "headers": { + "Authorization": "******" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/integration/create": { + "post": { + "operationId": "integration-api-write-create", + "summary": "创建集成", + "description": "创建一个公开 API 支持的账户级集成。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 限流 | 每个账户 **300 次/分钟**、**20 次/秒** |\n| 权限 | **集成中心管理**(`on-call`) |\n| 认证 | 支持 APP Key |\n| 审计 | 每次调用都会写入账户审计日志 |\n\n## 使用说明\n\n- 请先通过 `/integration/type/list` 获取支持的类型;所选类型必须启用且 `supports_api_create=true`。\n- `team_id` 非零时,调用者必须有权访问该团队;省略 `team_id` 会创建账户级集成。\n- 接入密钥只在本次响应中返回,请安全保存。", + "href": "/zh/api-reference/on-call/integrations/integration-api-write-create", + "metadata": { + "sidebarTitle": "创建集成" + } + }, + "requestBody": { + "required": true, + "description": "请求参数。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIntegrationCreateRequest" + }, + "example": { + "plugin_type": "prometheus.alert", + "name": "生产 Prometheus", + "description": "接收生产环境告警", + "team_id": 2477033058131, + "settings": {} + } + } + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PublicIntegrationCreateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "integration_key": "ik_live_8f31c1a29c7b4d14" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/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| 认证 | 支持 APP Key |\n| 审计 | 每次调用都会写入账户审计日志 |\n\n## 使用说明\n\n- 调用者必须拥有该集成的编辑权限。\n- 提交 `settings` 时,会完整替换插件配置;已有敏感字段省略或提交为 `******` 时保留原值。\n- 顶层可修改字段省略或传 `null` 时保持不变。", + "href": "/zh/api-reference/on-call/integrations/integration-api-write-update", + "metadata": { + "sidebarTitle": "更新集成" + } + }, + "requestBody": { + "required": true, + "description": "请求参数。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIntegrationUpdateRequest" + }, + "example": { + "integration_id": 6113996590131, + "name": "生产告警 Webhook", + "team_id": 2477033058131, + "settings": { + "endpoint": "******", + "headers": { + "Authorization": "******" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PublicIntegrationDetail" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_id": 6113996590131, + "team_id": 2477033058131, + "plugin_type": "alert.webhook", + "plugin_type_name": "告警 Webhook", + "category": "webhook", + "name": "生产告警 Webhook", + "description": "向下游系统推送生产告警", + "status": "enabled", + "ref_id": "a_2451002751131", + "created_at": 1787371200, + "updated_at": 1787374800, + "last_time": 1787378400, + "settings": { + "endpoint": "******", + "headers": { + "Authorization": "******" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/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| 认证 | 支持 APP Key |\n| 审计 | 每次调用都会写入账户审计日志 |\n\n## 使用说明\n\n- 调用者必须拥有该集成的编辑权限。\n- 对已启用的集成重复调用会成功返回,不会再次变更状态。\n- 当前账户必须拥有该集成类型所需的有效许可。", + "href": "/zh/api-reference/on-call/integrations/integration-api-write-enable", + "metadata": { + "sidebarTitle": "启用集成" + } + }, + "requestBody": { + "required": true, + "description": "请求参数。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIntegrationIDRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/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| 认证 | 支持 APP Key |\n| 审计 | 每次调用都会写入账户审计日志 |\n\n## 使用说明\n\n- 调用者必须拥有该集成的编辑权限。\n- 对已禁用的集成重复调用会成功返回,不会再次变更状态。", + "href": "/zh/api-reference/on-call/integrations/integration-api-write-disable", + "metadata": { + "sidebarTitle": "禁用集成" + } + }, + "requestBody": { + "required": true, + "description": "请求参数。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIntegrationIDRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyObject" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/integration/key/rotate": { + "post": { + "operationId": "integration-api-write-rotate-key", + "summary": "轮换集成 Key", + "description": "轮换账户级集成的接入密钥。", + "tags": [ + "On-call/集成中心" + ], + "x-mint": { + "content": "## 限制\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 限流 | 每个账户 **300 次/分钟**、**20 次/秒** |\n| 权限 | **集成中心管理**(`on-call`) |\n| 认证 | 支持 APP Key |\n| 审计 | 每次调用都会写入账户审计日志 |\n\n## 使用说明\n\n- 调用者必须拥有该集成的编辑权限。\n- 轮换后旧密钥立即失效,请安全保存新密钥。", + "href": "/zh/api-reference/on-call/integrations/integration-api-write-rotate-key", + "metadata": { + "sidebarTitle": "轮换集成 Key" + } + }, + "requestBody": { + "required": true, + "description": "请求参数。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIntegrationIDRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PublicIntegrationKeyRotateResponse" + } + } + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "integration_key": "ik_live_c6b09391632c438e" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } + }, + "/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| 认证 | 支持 APP Key |\n| 审计 | 每次调用都会写入账户审计日志 |\n\n## 使用说明\n\n- 调用者必须拥有该集成的编辑权限。\n- 如果仍有其他资源引用该集成,服务端返回 `400` 和错误码 `ReferenceExist`,并在 `data.refs` 中列出引用关系。", + "href": "/zh/api-reference/on-call/integrations/integration-api-write-delete", + "metadata": { + "sidebarTitle": "删除集成" + } + }, + "requestBody": { + "required": true, + "description": "请求参数。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIntegrationIDRequest" + }, + "example": { + "integration_id": 6113996590131 + } + } + } + }, + "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": { + "description": "请求参数无效、资源不存在,或因仍被引用而无法删除。", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorResponse" + }, + { + "$ref": "#/components/schemas/PublicIntegrationDeleteBlockedError" + } + ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "error": { + "code": "ReferenceExist", + "message": "The resource is still referenced" + }, + "data": { + "refs": [ + { + "kind": "team", + "name": "平台团队", + "href": "/on-call/team/2477033058131" + } + ] + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + } + } } }, "components": { @@ -33211,420 +33994,992 @@ }, "title": { "type": "string", - "description": "跟进事项标题。" + "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`,且转换成功后会立即尝试绑定故障对应的复盘。" + }, + "post_mortem_id": { + "type": "string", + "description": "跟进事项绑定的故障复盘 ID。" + }, + "status": { + "type": "string", + "description": "转化后的事项状态标签。" + } + }, + "title": "i_wi_converted" + }, + "FeedDetailWorkItemBound": { + "type": "object", + "description": "`i_wi_bound` 的 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": "跟进事项标题。" + }, + "post_mortem_id": { + "type": "string", + "description": "跟进事项绑定的故障复盘 ID。" + } + }, + "title": "i_wi_bound" + }, + "FeedDetailWorkItemDeleted": { + "type": "object", + "description": "`i_wi_deleted` 的 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": "跟进事项标题。" + }, + "post_mortem_id": { + "type": "string", + "description": "跟进事项绑定的故障复盘 ID。" + } + }, + "title": "i_wi_deleted" + }, + "FeedDetailAlertMerge": { + "type": "object", + "title": "a_merge", + "description": "`a_merge` 的详情数据:告警被合并到故障。", + "properties": { + "comment": { + "type": "string", + "description": "合并时记录的评论。为空时不返回。" + }, + "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": "目标故障被设置的新标题。未变更时不返回。" + } + } + }, + "AlertShort": { + "type": "object", + "description": "告警简要引用。", + "properties": { + "alert_id": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$", + "description": "告警 ID(ObjectID 十六进制字符串)。" + }, + "title": { + "type": "string", + "description": "告警标题,读取时解析填充。为空时不返回。" + } + } + }, + "EventGroup": { + "type": "object", + "description": "告警事件合并配置。启用后,同一告警的重复事件会在时间窗口内并入已有告警,而不是新建告警。", + "properties": { + "is_enabled": { + "type": "boolean", + "description": "为 true 时,重复事件并入已有告警;为 false 时,每个事件都单独生成告警。默认为 true。" + }, + "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": "模板 ID。省略表示创建新模板;提供表示更新已有模板。" + }, + "title": { + "type": "string", + "description": "模板标题。" }, - "from_type": { + "type": { "type": "string", "enum": [ - "action", - "follow_up" + "incident", + "maintenance" ], - "description": "转化前的事项类型。`action`:挂在故障上的处置行动事项;`follow_up`:挂在故障复盘(Post-mortem)上的改进事项。当前转换方向仅支持 `action` → `follow_up`,因此该事件中 `from_type` 恒为 `action`。" + "description": "模板适用的事件类型:`incident` 故障,`maintenance` 计划维护。" }, - "to_type": { + "status": { "type": "string", "enum": [ - "action", - "follow_up" + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" ], - "description": "转化后的事项类型。`action`:挂在故障上的处置行动事项;`follow_up`:挂在故障复盘(Post-mortem)上的改进事项。当前转换方向仅支持 `action` → `follow_up`,因此该事件中 `to_type` 恒为 `follow_up`,且转换成功后会立即尝试绑定故障对应的复盘。" - }, - "post_mortem_id": { - "type": "string", - "description": "跟进事项绑定的故障复盘 ID。" + "description": "模板对应的事件状态。故障事件支持 `investigating`/`identified`/`monitoring`/`resolved`;维护事件支持 `scheduled`/`ongoing`/`completed`。" }, - "status": { + "description": { "type": "string", - "description": "转化后的事项状态标签。" + "description": "模板正文(Markdown)。" } - }, - "title": "i_wi_converted" + } }, - "FeedDetailWorkItemBound": { + "StatusPageMessageTemplate": { "type": "object", - "description": "`i_wi_bound` 的 detail 载荷。", + "description": "消息模板:某一事件类型下、按状态划分的通知文案。在 `POST /status-page/template/upsert` 中,省略 `template_id` 表示创建,提供则表示更新;更新时仅应用非空字段。", "properties": { - "work_item_id": { + "template_id": { "type": "string", - "description": "跟进事项 ID。" + "description": "模板 ID。省略表示创建新模板;提供表示更新已有模板。" }, - "item_type": { + "title": { + "type": "string", + "description": "模板标题。" + }, + "type": { "type": "string", "enum": [ - "action", - "follow_up" + "incident", + "maintenance" ], - "description": "跟进事项类型。`action`:挂在故障上的处置行动事项;`follow_up`:挂在故障复盘(Post-mortem)上的改进事项。" + "description": "模板适用的事件类型:`incident` 故障,`maintenance` 计划维护。" }, - "title": { + "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": "所请求类别的模板列表。" + } + } + }, + "FeedDetailAlertUpdate": { + "type": "object", + "title": "a_update", + "description": "`a_update` 的详情数据:更新后的严重程度/状态。", + "properties": { + "severity": { + "$ref": "#/components/schemas/FeedSeverity" + }, + "status": { + "$ref": "#/components/schemas/FeedSeverity" + } + } + }, + "FeedDetailAlertMuteBySilence": { + "type": "object", + "title": "a_m_silence", + "description": "`a_m_silence` 的详情数据:告警被静默规则收敛。", + "properties": { + "rule_id": { "type": "string", - "description": "跟进事项标题。" + "pattern": "^[0-9a-fA-F]{24}$", + "description": "收敛该告警的静默规则 ID。为空时不返回。" }, - "post_mortem_id": { + "rule_name": { "type": "string", - "description": "跟进事项绑定的故障复盘 ID。" + "description": "静默规则名称,读取时解析填充。为空时不返回。" } - }, - "title": "i_wi_bound" + } }, - "FeedDetailWorkItemDeleted": { + "FeedDetailAlertMuteByInhibit": { "type": "object", - "description": "`i_wi_deleted` 的 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。为空时不返回。" }, - "post_mortem_id": { + "source_alert_title": { "type": "string", - "description": "跟进事项绑定的故障复盘 ID。" + "description": "源告警标题,读取时解析填充。为空时不返回。" + } + } + }, + "FeedDetailAlertMuteByFlapping": { + "type": "object", + "title": "a_m_flapping", + "description": "`a_m_flapping` 的详情数据(历史):告警被抖动检测收敛。", + "properties": { + "max_changes": { + "type": "integer", + "description": "触发抖动检测的状态变化次数阈值。为 0 时不返回。" + }, + "in_secs": { + "type": "integer", + "description": "统计状态变化的时间窗口(秒)。为 0 时不返回。" + }, + "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_deleted" + "required": [ + "person_id" + ] }, - "FeedDetailAlertMerge": { + "ScheduleByPersonResponse": { "type": "object", - "title": "a_merge", - "description": "`a_merge` 的详情数据:告警被合并到故障。", + "description": "成员的值班状态:正在值班的班次、下一次值班,以及其参与的全部启用排班。", "properties": { - "comment": { - "type": "string", - "description": "合并时记录的评论。为空时不返回。" + "current": { + "$ref": "#/components/schemas/MemberOncallInterval" }, - "target_incident": { - "$ref": "#/components/schemas/IncidentShort", - "description": "告警合并到的目标故障。未记录时不返回。" + "next": { + "$ref": "#/components/schemas/MemberOncallInterval" }, - "source_alerts": { + "schedules": { "type": "array", + "description": "该成员参与的全部启用排班。", "items": { - "$ref": "#/components/schemas/AlertShort" - }, - "description": "被合并进目标故障的源告警。为空时不返回。" + "$ref": "#/components/schemas/MemberScheduleItem" + } + } + }, + "required": [ + "schedules" + ] + }, + "MemberScheduleItem": { + "type": "object", + "description": "该成员参与的一个启用中的排班。", + "properties": { + "schedule_id": { + "type": "integer", + "description": "排班 ID。", + "format": "int64" + }, + "schedule_name": { + "type": "string", + "description": "排班名称。" + } + } + }, + "MemberOncallInterval": { + "type": "object", + "description": "成员的一个值班班次区间。", + "properties": { + "schedule_id": { + "type": "integer", + "description": "所属排班 ID。", + "format": "int64" + }, + "schedule_name": { + "type": "string", + "description": "所属排班名称。" + }, + "start_at": { + "type": "integer", + "description": "Unix 时间戳(秒)—— 班次开始时间。", + "format": "int64" + }, + "end_at": { + "type": "integer", + "description": "Unix 时间戳(秒)—— 班次结束时间。值班进行中时缺省。", + "format": "int64" + } + } + }, + "PublicIntegrationTypeListRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "p": { + "type": "integer", + "minimum": 1, + "default": 1, + "description": "页码。" }, - "owner_id": { + "limit": { "type": "integer", - "format": "int64", - "description": "目标故障被设置的新负责人成员 ID。未变更时不返回。" + "minimum": 1, + "maximum": 100, + "default": 20, + "description": "每页数量。" }, - "title": { + "orderby": { "type": "string", - "description": "目标故障被设置的新标题。未变更时不返回。" + "enum": [ + "id", + "created_at", + "updated_at", + "name", + "type" + ], + "description": "排序字段。省略时优先返回已排序类型,其余按 `plugin_type` 排序。" + }, + "category": { + "type": "string", + "description": "以英文逗号分隔的分类。", + "example": "event.alert,event.change" + }, + "asc": { + "type": "boolean", + "default": true, + "description": "是否升序排列。" } } }, - "AlertShort": { + "PublicIntegrationPluginTypeItem": { "type": "object", - "description": "告警简要引用。", + "additionalProperties": false, + "required": [ + "plugin_type", + "plugin_type_name", + "plugin_type_logo_url", + "category", + "status", + "supports_api_create" + ], "properties": { - "alert_id": { + "plugin_type": { "type": "string", - "pattern": "^[0-9a-fA-F]{24}$", - "description": "告警 ID(ObjectID 十六进制字符串)。" + "description": "创建接口使用的类型标识。", + "example": "prometheus.alert" }, - "title": { + "plugin_type_name": { "type": "string", - "description": "告警标题,读取时解析填充。为空时不返回。" + "description": "按请求语言返回的类型名称。", + "example": "Prometheus" + }, + "plugin_type_logo_url": { + "type": "string", + "description": "图标 URL,可能为空。", + "example": "https://cdn.flashcat.cloud/integrations/prometheus.svg" + }, + "category": { + "type": "string", + "description": "集成分类。", + "example": "event.alert" + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "该类型当前是否可用。", + "example": "enabled" + }, + "supports_api_create": { + "type": "boolean", + "description": "`/integration/create` 是否支持该类型。", + "example": true } } }, - "EventGroup": { + "PublicIntegrationTypeListResponse": { "type": "object", - "description": "告警事件合并配置。启用后,同一告警的重复事件会在时间窗口内并入已有告警,而不是新建告警。", + "additionalProperties": false, + "required": [ + "p", + "limit", + "total", + "items" + ], "properties": { - "is_enabled": { - "type": "boolean", - "description": "为 true 时,重复事件并入已有告警;为 false 时,每个事件都单独生成告警。默认为 true。" + "p": { + "type": "integer", + "minimum": 1, + "description": "页码。" }, - "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, + "description": "每页数量。" }, - { - "type": "object", - "properties": { - "managed_domain_feature_enabled": { - "type": "boolean", - "description": "该页面是否启用托管自定义域名特性。公开页面为 `true`,内部页面恒为 `false`。" - } + "total": { + "type": "integer", + "minimum": 0, + "description": "符合条件的总数。" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PublicIntegrationPluginTypeItem" }, - "required": [ - "managed_domain_feature_enabled" - ] + "description": "当前页的集成类型。" } - ] + } }, - "StatusPagePreDefinedTemplate": { + "PublicIntegrationListRequest": { "type": "object", - "description": "预定义事件模板:可复用的事件草稿(标题、类型、状态、描述)。在 `POST /status-page/template/upsert` 中,省略 `template_id` 表示创建,提供则表示更新;更新时仅应用非空字段。", + "additionalProperties": false, "properties": { - "template_id": { - "type": "string", - "description": "模板 ID。省略表示创建新模板;提供表示更新已有模板。" + "p": { + "type": "integer", + "minimum": 1, + "default": 1, + "description": "页码。" }, - "title": { - "type": "string", - "description": "模板标题。" + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 100, + "description": "每页数量。" }, - "type": { + "orderby": { "type": "string", "enum": [ - "incident", - "maintenance" + "created_at", + "updated_at", + "name", + "plugin_type", + "status" ], - "description": "模板适用的事件类型:`incident` 故障,`maintenance` 计划维护。" + "default": "created_at", + "description": "排序字段。" + }, + "category": { + "type": "string", + "description": "以英文逗号分隔的分类。", + "example": "event.alert" + }, + "plugin_type": { + "type": "string", + "description": "以英文逗号分隔的集成类型标识。", + "example": "prometheus.alert,grafana.alert" }, "status": { "type": "string", - "enum": [ - "investigating", - "identified", - "monitoring", - "resolved", - "scheduled", - "ongoing", - "completed" - ], - "description": "模板对应的事件状态。故障事件支持 `investigating`/`identified`/`monitoring`/`resolved`;维护事件支持 `scheduled`/`ongoing`/`completed`。" + "description": "以英文逗号分隔的状态:`enabled` 或 `disabled`。", + "example": "enabled" }, - "description": { + "name": { "type": "string", - "description": "模板正文(Markdown)。" + "description": "名称搜索文本。" + }, + "ref_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "需要匹配的资源范围 ID。公共接口仅返回账户级集成。", + "example": [ + "a_2451002751131" + ] + }, + "asc": { + "type": "boolean", + "default": false, + "description": "是否升序排列。" + }, + "is_my_team": { + "type": "boolean", + "default": false, + "description": "为 true 时,仅返回调用者所在团队拥有的集成。" + }, + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64", + "minimum": 1 + }, + "description": "需要匹配的团队 ID。与 `is_my_team=true` 同时使用时,会与调用者所在团队取交集。", + "example": [ + 2477033058131 + ] } } }, - "StatusPageMessageTemplate": { + "PublicIntegrationItem": { "type": "object", - "description": "消息模板:某一事件类型下、按状态划分的通知文案。在 `POST /status-page/template/upsert` 中,省略 `template_id` 表示创建,提供则表示更新;更新时仅应用非空字段。", + "additionalProperties": false, + "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。", + "example": 6113996590131 + }, + "team_id": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "所属团队 ID,`0` 表示账户级。", + "example": 2477033058131 + }, + "plugin_type": { "type": "string", - "description": "模板 ID。省略表示创建新模板;提供表示更新已有模板。" + "description": "稳定的集成类型标识。", + "example": "prometheus.alert" }, - "title": { + "plugin_type_name": { "type": "string", - "description": "模板标题。" + "description": "按请求语言返回的集成类型名称。", + "example": "Prometheus" }, - "type": { + "category": { + "type": "string", + "description": "集成分类。", + "example": "event.alert" + }, + "name": { + "type": "string", + "description": "集成名称。", + "example": "生产 Prometheus" + }, + "description": { + "type": "string", + "description": "集成描述。", + "example": "接收生产环境告警" + }, + "status": { "type": "string", "enum": [ - "incident", - "maintenance" + "enabled", + "disabled" ], - "description": "模板适用的事件类型:`incident` 故障,`maintenance` 计划维护。" + "description": "当前集成状态。", + "example": "enabled" }, - "messages": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "按事件状态划分的通知文案(Markdown)。键为与模板 `type` 匹配的事件状态(如故障事件的 `investigating`、`resolved`),值为事件进入该状态时使用的文本。" + "ref_id": { + "type": "string", + "description": "资源范围标识。公共集成为账户级,使用 `a_` 前缀。", + "example": "a_2451002751131" + }, + "created_at": { + "type": "integer", + "format": "int64", + "description": "创建时间,Unix 秒级时间戳。", + "example": 1787371200 + }, + "updated_at": { + "type": "integer", + "format": "int64", + "description": "最后更新时间,Unix 秒级时间戳。", + "example": 1787374800 + }, + "last_time": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "最近收到事件的时间,Unix 秒级时间戳;`0` 表示尚未收到事件。", + "example": 1787378400 } } }, - "ListStatusPageTemplatesResponse": { + "PublicIntegrationListResponse": { "type": "object", - "description": "事件模板列表。条目结构取决于请求的 `type`:`pre_defined` 为预定义事件模板,`message` 为消息模板。", + "additionalProperties": false, "required": [ + "p", + "limit", + "total", "items" ], "properties": { + "p": { + "type": "integer", + "minimum": 1, + "description": "页码。" + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "description": "每页数量。" + }, + "total": { + "type": "integer", + "minimum": 0, + "description": "符合条件的总数。" + }, "items": { "type": "array", "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/StatusPagePreDefinedTemplate" - }, - { - "$ref": "#/components/schemas/StatusPageMessageTemplate" - } - ] + "$ref": "#/components/schemas/PublicIntegrationItem" }, - "description": "所请求类别的模板列表。" + "description": "集成摘要列表,不包含 `settings`;如需配置详情,请调用 `/integration/info`。" } } }, - "FeedDetailAlertUpdate": { + "PublicIntegrationIDRequest": { "type": "object", - "title": "a_update", - "description": "`a_update` 的详情数据:更新后的严重程度/状态。", + "additionalProperties": false, + "required": [ + "integration_id" + ], "properties": { - "severity": { - "$ref": "#/components/schemas/FeedSeverity" - }, - "status": { - "$ref": "#/components/schemas/FeedSeverity" + "integration_id": { + "type": "integer", + "format": "int64", + "exclusiveMinimum": 0, + "description": "集成 ID。", + "example": 6113996590131 } } }, - "FeedDetailAlertMuteBySilence": { - "type": "object", - "title": "a_m_silence", - "description": "`a_m_silence` 的详情数据:告警被静默规则收敛。", - "properties": { - "rule_id": { - "type": "string", - "pattern": "^[0-9a-fA-F]{24}$", - "description": "收敛该告警的静默规则 ID。为空时不返回。" + "PublicIntegrationDetail": { + "allOf": [ + { + "$ref": "#/components/schemas/PublicIntegrationItem" }, - "rule_name": { - "type": "string", - "description": "静默规则名称,读取时解析填充。为空时不返回。" + { + "type": "object", + "additionalProperties": false, + "required": [ + "settings" + ], + "properties": { + "settings": { + "type": "object", + "description": "插件配置,具体字段取决于 `plugin_type`。详情和更新响应会将已配置的敏感值替换为 `******`。更新时,对已有敏感字段提交 `******` 或省略该字段会保留原值;提交其他值则会覆盖原值。", + "additionalProperties": true, + "example": { + "endpoint": "******", + "headers": { + "Authorization": "******" + } + } + } + } } - } + ] }, - "FeedDetailAlertMuteByInhibit": { + "PublicIntegrationCreateRequest": { "type": "object", - "title": "a_m_inhibit", - "description": "`a_m_inhibit` 的详情数据:告警因源告警被抑制规则收敛。", + "additionalProperties": false, + "required": [ + "plugin_type" + ], "properties": { - "rule_id": { + "plugin_type": { "type": "string", - "pattern": "^[0-9a-fA-F]{24}$", - "description": "收敛该告警的抑制规则 ID。为空时不返回。" + "minLength": 1, + "description": "`/integration/type/list` 返回且 `supports_api_create=true` 的类型。", + "example": "prometheus.alert" }, - "rule_name": { + "name": { "type": "string", - "description": "抑制规则名称,读取时解析填充。为空时不返回。" + "minLength": 2, + "maxLength": 49, + "description": "集成名称;省略时使用当前语言下的类型名称。", + "example": "生产 Prometheus" }, - "source_alert_id": { + "description": { "type": "string", - "pattern": "^[0-9a-fA-F]{24}$", - "description": "触发抑制的源告警 ID。为空时不返回。" + "maxLength": 499, + "description": "集成描述。" }, - "source_alert_title": { - "type": "string", - "description": "源告警标题,读取时解析填充。为空时不返回。" + "team_id": { + "type": "integer", + "format": "int64", + "description": "所属团队 ID;传 `0` 或省略该字段时创建账户级集成。", + "example": 2477033058131, + "minimum": 0 + }, + "settings": { + "type": "object", + "description": "插件配置,具体字段取决于 `plugin_type`。详情和更新响应会将已配置的敏感值替换为 `******`。更新时,对已有敏感字段提交 `******` 或省略该字段会保留原值;提交其他值则会覆盖原值。", + "additionalProperties": true, + "example": { + "endpoint": "******", + "headers": { + "Authorization": "******" + } + } } } }, - "FeedDetailAlertMuteByFlapping": { + "PublicIntegrationCreateResponse": { "type": "object", - "title": "a_m_flapping", - "description": "`a_m_flapping` 的详情数据(历史):告警被抖动检测收敛。", + "additionalProperties": false, + "required": [ + "integration_id", + "integration_key" + ], "properties": { - "max_changes": { - "type": "integer", - "description": "触发抖动检测的状态变化次数阈值。为 0 时不返回。" - }, - "in_secs": { + "integration_id": { "type": "integer", - "description": "统计状态变化的时间窗口(秒)。为 0 时不返回。" + "format": "int64", + "example": 6113996590131, + "description": "集成 ID。" }, - "mute_secs": { - "type": "integer", - "description": "静默时长(秒)。为 0 时不返回。" + "integration_key": { + "type": "string", + "description": "用于接收事件的密钥。请安全保存;创建接口只在本次响应中返回。", + "example": "ik_live_8f31c1a29c7b4d14" } } }, - "FeedDetailAlertAck": { - "type": "object", - "title": "a_ack", - "description": "`a_ack` 的详情数据(历史),无字段。", - "properties": {} - }, - "FeedDetailAlertUnack": { - "type": "object", - "title": "a_unack", - "description": "`a_unack` 的详情数据(历史),无字段。", - "properties": {} - }, - "ScheduleByPersonRequest": { + "PublicIntegrationUpdateRequest": { "type": "object", - "description": "成员值班状态查询请求", + "additionalProperties": false, + "required": [ + "integration_id" + ], "properties": { - "person_id": { + "integration_id": { "type": "integer", - "description": "要查询值班状态的成员 ID。", - "format": "int64" + "format": "int64", + "exclusiveMinimum": 0, + "example": 6113996590131, + "description": "集成 ID。" + }, + "name": { + "type": [ + "string", + "null" + ], + "minLength": 2, + "maxLength": 49, + "description": "新的集成名称;省略或传 null 表示不修改。" + }, + "description": { + "type": [ + "string", + "null" + ], + "maxLength": 499, + "description": "新的描述;省略或传 null 表示不修改。" + }, + "team_id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "minimum": 0, + "description": "新的所属团队;`0` 表示改为账户级,省略或传 null 表示不修改。" + }, + "settings": { + "anyOf": [ + { + "type": "object", + "description": "插件配置,具体字段取决于 `plugin_type`。详情和更新响应会将已配置的敏感值替换为 `******`。更新时,对已有敏感字段提交 `******` 或省略该字段会保留原值;提交其他值则会覆盖原值。", + "additionalProperties": true, + "example": { + "endpoint": "******", + "headers": { + "Authorization": "******" + } + } + }, + { + "type": "null" + } + ], + "description": "插件配置的完整替换。省略或传 null 表示不修改;已有敏感字段省略或传 `******` 时会保留原值。" } - }, - "required": [ - "person_id" - ] + } }, - "ScheduleByPersonResponse": { + "PublicIntegrationKeyRotateResponse": { "type": "object", - "description": "成员的值班状态:正在值班的班次、下一次值班,以及其参与的全部启用排班。", + "additionalProperties": false, + "required": [ + "integration_key" + ], "properties": { - "current": { - "$ref": "#/components/schemas/MemberOncallInterval" - }, - "next": { - "$ref": "#/components/schemas/MemberOncallInterval" - }, - "schedules": { - "type": "array", - "description": "该成员参与的全部启用排班。", - "items": { - "$ref": "#/components/schemas/MemberScheduleItem" - } + "integration_key": { + "type": "string", + "description": "新的接入密钥;轮换后旧密钥立即失效。", + "example": "ik_live_c6b09391632c438e" } - }, - "required": [ - "schedules" - ] + } }, - "MemberScheduleItem": { + "PublicIntegrationReference": { "type": "object", - "description": "该成员参与的一个启用中的排班。", + "additionalProperties": false, "properties": { - "schedule_id": { - "type": "integer", - "description": "排班 ID。", - "format": "int64" + "kind": { + "type": "string", + "description": "引用该集成的资源类型。", + "example": "team" }, - "schedule_name": { + "name": { "type": "string", - "description": "排班名称。" + "description": "引用资源名称。", + "example": "平台团队" + }, + "href": { + "type": "string", + "description": "引用资源的控制台链接,可能为空。", + "example": "/on-call/team/2477033058131" } } }, - "MemberOncallInterval": { + "PublicIntegrationDeleteBlockedError": { "type": "object", - "description": "成员的一个值班班次区间。", + "additionalProperties": false, + "required": [ + "request_id", + "error", + "data" + ], "properties": { - "schedule_id": { - "type": "integer", - "description": "所属排班 ID。", - "format": "int64" - }, - "schedule_name": { + "request_id": { "type": "string", - "description": "所属排班名称。" + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "description": "本次请求的唯一追踪 ID。" }, - "start_at": { - "type": "integer", - "description": "Unix 时间戳(秒)—— 班次开始时间。", - "format": "int64" + "error": { + "$ref": "#/components/schemas/DutyError" }, - "end_at": { - "type": "integer", - "description": "Unix 时间戳(秒)—— 班次结束时间。值班进行中时缺省。", - "format": "int64" + "data": { + "type": "object", + "additionalProperties": false, + "required": [ + "refs" + ], + "properties": { + "refs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PublicIntegrationReference" + }, + "description": "删除集成前必须解除的引用关系。" + } + }, + "description": "当前仍引用该集成的资源。" } } } diff --git a/api-reference/openapi.en.json b/api-reference/openapi.en.json index 9ea6dd53..90157538 100644 --- a/api-reference/openapi.en.json +++ b/api-reference/openapi.en.json @@ -29329,878 +29329,643 @@ ] } } - } - }, - "securitySchemes": { - "AppKeyAuth": { - "description": "App key issued from the Flashduty console under Account → APP Keys. Required on every public API call. Keep it secret — it grants the same access as the owning account.", - "in": "query", - "name": "app_key", - "type": "apiKey" }, - "AutomationTriggerBearerAuth": { - "description": "Bearer token generated for one Automation HTTP POST trigger. This is not an app_key.", - "scheme": "bearer", - "type": "http" - } - } - }, - "info": { - "description": "Public HTTP API for the Flashduty incident management platform — incidents, notification templates, channels, schedules, monitors, RUM, and platform administration. Every operation is authenticated with an `app_key` query parameter issued from the Flashduty console under Account → APP Keys. Responses follow a uniform envelope: `{ request_id, data }` on success, `{ request_id, error }` on failure.", - "title": "Flashduty Open API", - "version": "1.0.0" - }, - "openapi": "3.1.0", - "paths": { - "/account/info": { - "post": { - "description": "Return the current account's profile and settings.", - "operationId": "account-read-info", - "requestBody": { - "content": { - "application/json": { - "example": {}, - "schema": { - "type": "object" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "data": { - "account_id": 1001, - "account_name": "acme", - "avatar": "https://cdn.flashcat.cloud/avatar/acme.png", - "country_code": "CN", - "created_at": 1716960000, - "domain": "acme", - "email": "ops@acme.example", - "extra_domains": [ - "acme-corp" - ], - "locale": "zh-CN", - "phone": "138****8000", - "restrictions": { - "allow_subdomain": true, - "email_domains": [ - "acme.example" - ], - "ips": [ - "203.0.113.0/24" - ] - }, - "time_zone": "Asia/Shanghai" - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/AccountInfo" - } - }, - "type": "object" - } - ] - } - } - }, - "description": "Success" + "PublicIntegrationTypeListRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "p": { + "type": "integer", + "minimum": 1, + "default": 1, + "description": "Page number." }, - "400": { - "$ref": "#/components/responses/BadRequest" + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 20, + "description": "Items per page." }, - "401": { - "$ref": "#/components/responses/Unauthorized" + "orderby": { + "type": "string", + "enum": [ + "id", + "created_at", + "updated_at", + "name", + "type" + ], + "description": "Sort field. When omitted, ranked types come first, followed by `plugin_type`." }, - "429": { - "$ref": "#/components/responses/TooManyRequests" + "category": { + "type": "string", + "description": "Comma-separated categories.", + "example": "event.alert,event.change" }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "security": [ - { - "AppKeyAuth": [] - } - ], - "summary": "Get account detail", - "tags": [ - "Platform/Account" - ], - "x-mint": { - "content": "| Permission | Description |\n| --- | --- |\n| None | None — any valid app_key can call this operation. |\n\nFind this operation in the [Platform API reference](/en/api-reference/platform/account/account-read-info).", - "href": "/en/api-reference/platform/account/account-read-info", - "metadata": { - "sidebarTitle": "Get account detail" + "asc": { + "type": "boolean", + "default": true, + "description": "Sort in ascending order." } } - } - }, - "/alert-event/list": { - "post": { - "description": "Return a cursor-paginated list of raw alert events across all alerts, with filtering by integration, channel, time range, and severity.", - "operationId": "alert-event-read-list", - "requestBody": { - "content": { - "application/json": { - "example": { - "end_time": 1712707200, - "limit": 20, - "severities": "Critical", - "start_time": 1712620800 - }, - "schema": { - "$ref": "#/components/schemas/AlertEventGlobalListRequest" - } - } + }, + "PublicIntegrationPluginTypeItem": { + "type": "object", + "additionalProperties": false, + "required": [ + "plugin_type", + "plugin_type_name", + "plugin_type_logo_url", + "category", + "status", + "supports_api_create" + ], + "properties": { + "plugin_type": { + "type": "string", + "description": "Type identifier used by the create API.", + "example": "prometheus.alert" }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "data": { - "has_next_page": false, - "items": [ - { - "alert_id": "663a1b2c3d4e5f6789abcdef", - "event_id": "663a1b2c3d4e5f6789abc001", - "event_severity": "Critical", - "event_time": 1712650000, - "title": "CPU usage > 90%" - } - ], - "total": 1 - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/AlertEventGlobalListResponse" - } - }, - "type": "object" - } - ] - } - } - }, - "description": "Success" + "plugin_type_name": { + "type": "string", + "description": "Localized type name.", + "example": "Prometheus" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "plugin_type_logo_url": { + "type": "string", + "description": "Logo URL. May be empty.", + "example": "https://cdn.flashcat.cloud/integrations/prometheus.svg" }, - "401": { - "$ref": "#/components/responses/Unauthorized" + "category": { + "type": "string", + "description": "Integration category.", + "example": "event.alert" }, - "429": { - "$ref": "#/components/responses/TooManyRequests" + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "Whether this type is currently available.", + "example": "enabled" }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "summary": "List raw alert events", - "tags": [ - "On-call/Alerts" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Results are filtered by the caller's channel data-access permissions.\n- `severities` is a comma-separated string, e.g. `\"Critical,Warning\"`.", - "href": "/en/api-reference/on-call/alerts/alert-event-read-list", - "metadata": { - "sidebarTitle": "List raw alert events" + "supports_api_create": { + "type": "boolean", + "description": "Whether `/integration/create` accepts this type.", + "example": true } } - } - }, - "/alert/event/list": { - "post": { - "description": "Return raw events for an alert with cursor or page-number pagination.", - "operationId": "alert-read-event-list", - "requestBody": { - "content": { - "application/json": { - "example": { - "alert_id": "663a1b2c3d4e5f6789abcdef", - "limit": 20 - }, - "schema": { - "$ref": "#/components/schemas/AlertEventListRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "data": { - "has_next_page": true, - "items": [ - { - "alert_id": "663a1b2c3d4e5f6789abcdef", - "event_id": "663a1b2c3d4e5f6789abc001", - "event_severity": "Critical", - "event_status": "Critical", - "event_time": 1712650000, - "labels": { - "host": "web-01" - }, - "title": "CPU usage > 90%" - } - ], - "search_after_ctx": "663a1b2c3d4e5f6789abc001", - "total": 57 - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/AlertEventListResponse" - } - }, - "type": "object" - } - ] - } - } - }, - "description": "Success" - }, - "400": { - "$ref": "#/components/responses/BadRequest" + }, + "PublicIntegrationTypeListResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "p", + "limit", + "total", + "items" + ], + "properties": { + "p": { + "type": "integer", + "minimum": 1, + "description": "Page number." }, - "401": { - "$ref": "#/components/responses/Unauthorized" + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "description": "Items per page." }, - "429": { - "$ref": "#/components/responses/TooManyRequests" + "total": { + "type": "integer", + "minimum": 0, + "description": "Total matching items." }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "summary": "List events for an alert", - "tags": [ - "On-call/Alerts" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Results are newest-first by default. Set `asc=true` to read events oldest-first.\n- Use `limit` with `search_after_ctx` from the previous response to fetch the next page.\n- Classic page-number pagination is also supported with `p`, but `p * limit` must stay within 10,000 records.\n- Each alert can accumulate a large raw event history; prefer cursor pagination for hot alerts.", - "href": "/en/api-reference/on-call/alerts/alert-read-event-list", - "metadata": { - "sidebarTitle": "List events for an alert" + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PublicIntegrationPluginTypeItem" + }, + "description": "Integration types on the current page." } } - } - }, - "/alert/feed": { - "post": { - "description": "Return the activity feed (comments, state changes, merges, silence events) for a single alert, with page-based pagination.", - "operationId": "alert-read-feed", - "requestBody": { - "content": { - "application/json": { - "example": { - "alert_id": "663a1b2c3d4e5f6789abcdef", - "asc": false, - "limit": 20 - }, - "schema": { - "$ref": "#/components/schemas/AlertFeedRequest" - } - } + }, + "PublicIntegrationListRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "p": { + "type": "integer", + "minimum": 1, + "default": 1, + "description": "Page number." }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "data": { - "has_next_page": false, - "items": [ - { - "created_at": 1712651000, - "creator_id": 80011, - "detail": { - "comment": "Investigating now." - }, - "ref_id": "663a1b2c3d4e5f6789abcdef", - "type": "a_comm" - } - ] - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/AlertFeedResponse" - } - }, - "type": "object" - } - ] - } - } - }, - "description": "Success" + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 100, + "description": "Items per page." }, - "400": { - "$ref": "#/components/responses/BadRequest" + "orderby": { + "type": "string", + "enum": [ + "created_at", + "updated_at", + "name", + "plugin_type", + "status" + ], + "default": "created_at", + "description": "Sort field." }, - "401": { - "$ref": "#/components/responses/Unauthorized" + "category": { + "type": "string", + "description": "Comma-separated categories.", + "example": "event.alert" }, - "429": { - "$ref": "#/components/responses/TooManyRequests" + "plugin_type": { + "type": "string", + "description": "Comma-separated integration type identifiers.", + "example": "prometheus.alert,grafana.alert" }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "summary": "List alert activity feed", - "tags": [ - "On-call/Alerts" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Use `p` (page number, starting at 1) and `limit` (max 100, default 20) for pagination.\n- Set `asc` to `true` for chronological order.\n- Use `types` to filter by specific feed types (e.g. `a_comm`, `a_merge`).", - "href": "/en/api-reference/on-call/alerts/alert-read-feed", - "metadata": { - "sidebarTitle": "List alert activity feed" - } - } - } - }, - "/alert/info": { - "post": { - "description": "Return the full details of a single alert by its ID, including its associated incident and event count.", - "operationId": "alert-read-info", - "requestBody": { - "content": { - "application/json": { - "example": { - "alert_id": "663a1b2c3d4e5f6789abcdef" - }, - "schema": { - "$ref": "#/components/schemas/AlertInfoRequest" - } - } + "status": { + "type": "string", + "description": "Comma-separated statuses: `enabled` or `disabled`.", + "example": "enabled" }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "data": { - "alert_id": "663a1b2c3d4e5f6789abcdef", - "alert_severity": "Critical", - "alert_status": "Critical", - "event_cnt": 3, - "start_time": 1712650000, - "title": "CPU usage > 90%" - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/AlertItem" - } - }, - "type": "object" - } - ] - } - } + "name": { + "type": "string", + "description": "Name search text." + }, + "ref_ids": { + "type": "array", + "items": { + "type": "string" }, - "description": "Success" + "description": "Resource scope IDs to match. Public results are account-scoped.", + "example": [ + "a_2451002751131" + ] }, - "400": { - "$ref": "#/components/responses/BadRequest" + "asc": { + "type": "boolean", + "default": false, + "description": "Sort in ascending order." }, - "401": { - "$ref": "#/components/responses/Unauthorized" + "is_my_team": { + "type": "boolean", + "default": false, + "description": "When true, include only integrations owned by one of the caller's teams." }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "summary": "Get alert detail", - "tags": [ - "On-call/Alerts" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- `alert_id` is an ObjectID hex string returned by `POST /alert/list` or `POST /alert-event/list`.", - "href": "/en/api-reference/on-call/alerts/alert-read-info", - "metadata": { - "sidebarTitle": "Get alert detail" + "team_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64", + "minimum": 1 + }, + "description": "Team IDs to match. With `is_my_team=true`, this list is intersected with the caller's teams.", + "example": [ + 2477033058131 + ] } } - } - }, - "/alert/list": { - "post": { - "description": "Return a cursor-paginated list of alerts matching the given filters.", - "operationId": "alert-read-list", - "requestBody": { - "content": { - "application/json": { - "example": { - "end_time": 1712707200, - "is_active": true, - "limit": 20, - "start_time": 1712620800 - }, - "schema": { - "$ref": "#/components/schemas/AlertListRequest" - } - } + }, + "PublicIntegrationItem": { + "type": "object", + "additionalProperties": false, + "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.", + "example": 6113996590131 }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "data": { - "has_next_page": false, - "items": [ - { - "account_id": 10023, - "alert_id": "663a1b2c3d4e5f6789abcdef", - "alert_severity": "Critical", - "alert_status": "Critical", - "channel_id": 20001, - "channel_name": "Production", - "created_at": 1712650000, - "end_time": 0, - "event_cnt": 3, - "ever_muted": false, - "integration_id": 10001, - "integration_name": "Prometheus", - "integration_type": "prometheus", - "labels": { - "host": "web-01" - }, - "last_time": 1712655000, - "start_time": 1712650000, - "title": "CPU usage > 90%", - "updated_at": 1712655000 - } - ], - "total": 1 - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/AlertListResponse" - } - }, - "type": "object" - } - ] - } - } - }, - "description": "Success" + "team_id": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "Owning team ID. `0` means account-wide.", + "example": 2477033058131 }, - "400": { - "$ref": "#/components/responses/BadRequest" + "plugin_type": { + "type": "string", + "description": "Stable integration type identifier.", + "example": "prometheus.alert" }, - "401": { - "$ref": "#/components/responses/Unauthorized" + "plugin_type_name": { + "type": "string", + "description": "Localized integration type name.", + "example": "Prometheus" }, - "429": { - "$ref": "#/components/responses/TooManyRequests" + "category": { + "type": "string", + "description": "Integration category.", + "example": "event.alert" }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "summary": "List alerts", - "tags": [ - "On-call/Alerts" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Both `start_time` and `end_time` are required Unix epoch seconds. Maximum span is 31 days.\n- Use `search_after_ctx` from the previous response to fetch the next page.\n- Results are filtered by the caller's channel data-access permissions.\n- Set `is_active` to `true` to retrieve only active (firing) alerts; `false` to retrieve resolved alerts.", - "href": "/en/api-reference/on-call/alerts/alert-read-list", - "metadata": { - "sidebarTitle": "List alerts" - } - } - } - }, - "/alert/list-by-ids": { - "post": { - "description": "Return the details of multiple alerts by their IDs in a single request. Note: this endpoint does not paginate — `total` and `has_next_page` are always `0`/`false` and `search_after_ctx` is never set.", - "operationId": "alert-read-list-by-ids", - "requestBody": { - "content": { - "application/json": { - "example": { - "alert_ids": [ - "663a1b2c3d4e5f6789abcdef" - ] - }, - "schema": { - "$ref": "#/components/schemas/AlertListByIDsRequest" - } - } + "name": { + "type": "string", + "description": "Integration name.", + "example": "Production Prometheus" }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "data": { - "has_next_page": false, - "items": [ - { - "alert_id": "663a1b2c3d4e5f6789abcdef", - "title": "CPU usage > 90%" - } - ], - "total": 0 - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/AlertListResponse" - } - }, - "type": "object" - } - ] - } - } - }, - "description": "Success" + "description": { + "type": "string", + "description": "Integration description.", + "example": "Receives production alerts" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "status": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "description": "Current integration status.", + "example": "enabled" }, - "401": { - "$ref": "#/components/responses/Unauthorized" + "ref_id": { + "type": "string", + "description": "Resource scope identifier. Public integrations are account-scoped and use the `a_` prefix.", + "example": "a_2451002751131" }, - "429": { - "$ref": "#/components/responses/TooManyRequests" + "created_at": { + "type": "integer", + "format": "int64", + "description": "Creation time as a Unix timestamp in seconds.", + "example": 1787371200 }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "summary": "List alerts by IDs", - "tags": [ - "On-call/Alerts" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- All provided `alert_ids` must belong to the caller's account; any invalid ID causes the entire request to fail.", - "href": "/en/api-reference/on-call/alerts/alert-read-list-by-ids", - "metadata": { - "sidebarTitle": "List alerts by IDs" + "updated_at": { + "type": "integer", + "format": "int64", + "description": "Last update time as a Unix timestamp in seconds.", + "example": 1787374800 + }, + "last_time": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "Last received event time as a Unix timestamp in seconds. `0` means no event has been received.", + "example": 1787378400 } } - } - }, - "/alert/merge": { - "post": { - "description": "Associate one or more alerts with an existing incident. If a source alert previously belonged to a different incident and that incident becomes empty after the merge, it will be automatically closed.", - "operationId": "alert-write-merge", - "requestBody": { - "content": { - "application/json": { - "example": { - "alert_ids": [ - "663a1b2c3d4e5f6789abcdef" - ], - "incident_id": "663a000000000000deadbeef" - }, - "schema": { - "$ref": "#/components/schemas/AlertMergeRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "data": {}, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/EmptyResponse" - } - }, - "type": "object" - } - ] - } - } - }, - "description": "Success" - }, - "400": { - "$ref": "#/components/responses/BadRequest" + }, + "PublicIntegrationListResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "p", + "limit", + "total", + "items" + ], + "properties": { + "p": { + "type": "integer", + "minimum": 1, + "description": "Page number." }, - "401": { - "$ref": "#/components/responses/Unauthorized" + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "description": "Items per page." }, - "429": { - "$ref": "#/components/responses/TooManyRequests" + "total": { + "type": "integer", + "minimum": 0, + "description": "Total matching items." }, - "500": { - "$ref": "#/components/responses/ServerError" + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PublicIntegrationItem" + }, + "description": "Integration summaries. `settings` is intentionally not included; call `/integration/info` for configuration." } - }, - "summary": "Merge alerts into an incident", - "tags": [ - "On-call/Alerts" + } + }, + "PublicIntegrationIDRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "integration_id" ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- All `alert_ids` and the `incident_id` must belong to the caller's account.\n- Optionally set `title` and `owner_id` to update the target incident at the same time.", - "href": "/en/api-reference/on-call/alerts/alert-write-merge", - "metadata": { - "sidebarTitle": "Merge alerts into an incident" + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "exclusiveMinimum": 0, + "description": "Integration ID.", + "example": 6113996590131 } } - } - }, - "/alert/pipeline/info": { - "post": { - "description": "Return the alert processing pipeline configured for a specific integration.", - "operationId": "alert-read-pipeline-info", - "requestBody": { - "content": { - "application/json": { - "example": { - "integration_id": 10001 - }, - "schema": { - "$ref": "#/components/schemas/AlertPipelineInfoRequest" - } - } + }, + "PublicIntegrationDetail": { + "allOf": [ + { + "$ref": "#/components/schemas/PublicIntegrationItem" }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "data": { - "created_at": 1710000000, - "creator_id": 80011, - "integration_id": 10001, - "rules": [ - { - "if": [ - { - "key": "labels.env", - "oper": "IN", - "vals": [ - "prod" - ] - } - ], - "kind": "title_reset", - "settings": { - "title": "[TPL]{{.Labels.service}} / {{.Labels.check}}" - } - }, - { - "if": null, - "kind": "severity_reset", - "settings": { - "severity": "Warning" - } - } - ], - "status": "enabled", - "updated_at": 1712000000, - "updated_by": 80011 - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/AlertPipelineItem" - } - }, - "type": "object" - } - ] + { + "type": "object", + "additionalProperties": false, + "required": [ + "settings" + ], + "properties": { + "settings": { + "type": "object", + "description": "Plugin-specific settings. The available fields depend on `plugin_type`. In detail and update responses, configured secrets are replaced with `******`. When updating, submit `******` or omit an existing secret field to retain its stored value; any other supplied value replaces it.", + "additionalProperties": true, + "example": { + "endpoint": "******", + "headers": { + "Authorization": "******" + } } } - }, - "description": "Success" + } + } + ] + }, + "PublicIntegrationCreateRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "plugin_type" + ], + "properties": { + "plugin_type": { + "type": "string", + "minLength": 1, + "description": "A type with `supports_api_create=true` from `/integration/type/list`.", + "example": "prometheus.alert" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "name": { + "type": "string", + "minLength": 2, + "maxLength": 49, + "description": "Integration name. Defaults to the localized type name when omitted.", + "example": "Production Prometheus" }, - "401": { - "$ref": "#/components/responses/Unauthorized" + "description": { + "type": "string", + "maxLength": 499, + "description": "Integration description." }, - "429": { - "$ref": "#/components/responses/TooManyRequests" + "team_id": { + "type": "integer", + "format": "int64", + "description": "Owning team ID. Use `0` or omit the field for an account-wide integration.", + "example": 2477033058131, + "minimum": 0 }, - "500": { - "$ref": "#/components/responses/ServerError" + "settings": { + "type": "object", + "description": "Plugin-specific settings. The available fields depend on `plugin_type`. In detail and update responses, configured secrets are replaced with `******`. When updating, submit `******` or omit an existing secret field to retain its stored value; any other supplied value replaces it.", + "additionalProperties": true, + "example": { + "endpoint": "******", + "headers": { + "Authorization": "******" + } + } } - }, - "summary": "Get alert pipeline", - "tags": [ - "On-call/Alerts" + } + }, + "PublicIntegrationCreateResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "integration_id", + "integration_key" ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |\n\n## Usage\n\n- Returns `null` data if no pipeline has been configured for the given integration.\n- Requires the caller to have access to the integration.", - "href": "/en/api-reference/on-call/alerts/alert-read-pipeline-info", - "metadata": { - "sidebarTitle": "Get alert pipeline" + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "example": 6113996590131, + "description": "Integration ID." + }, + "integration_key": { + "type": "string", + "description": "Secret ingestion key. Store it securely; creation returns it only in this response.", + "example": "ik_live_8f31c1a29c7b4d14" } } - } - }, - "/alert/pipeline/list": { - "post": { - "description": "Return the alert processing pipelines configured for multiple integrations.", - "operationId": "alert-read-pipeline-list", - "requestBody": { - "content": { - "application/json": { - "example": { - "integration_ids": [ - 10001, - 10002 - ] - }, - "schema": { - "$ref": "#/components/schemas/AlertPipelineListRequest" - } - } - }, - "required": true - }, + }, + "PublicIntegrationUpdateRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "integration_id" + ], + "properties": { + "integration_id": { + "type": "integer", + "format": "int64", + "exclusiveMinimum": 0, + "example": 6113996590131, + "description": "Integration ID." + }, + "name": { + "type": [ + "string", + "null" + ], + "minLength": 2, + "maxLength": 49, + "description": "New integration name. Omit or use null to leave unchanged." + }, + "description": { + "type": [ + "string", + "null" + ], + "maxLength": 499, + "description": "New description. Omit or use null to leave unchanged." + }, + "team_id": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "minimum": 0, + "description": "New owning team. `0` makes the integration account-wide; omit or use null to leave unchanged." + }, + "settings": { + "anyOf": [ + { + "type": "object", + "description": "Plugin-specific settings. The available fields depend on `plugin_type`. In detail and update responses, configured secrets are replaced with `******`. When updating, submit `******` or omit an existing secret field to retain its stored value; any other supplied value replaces it.", + "additionalProperties": true, + "example": { + "endpoint": "******", + "headers": { + "Authorization": "******" + } + } + }, + { + "type": "null" + } + ], + "description": "Complete plugin settings replacement. Omit or use null to leave settings unchanged. Existing secret values survive when their fields are omitted or set to `******`." + } + } + }, + "PublicIntegrationKeyRotateResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "integration_key" + ], + "properties": { + "integration_key": { + "type": "string", + "description": "New ingestion key. The previous key stops working after rotation.", + "example": "ik_live_c6b09391632c438e" + } + } + }, + "PublicIntegrationReference": { + "type": "object", + "additionalProperties": false, + "properties": { + "kind": { + "type": "string", + "description": "Referencing resource type.", + "example": "team" + }, + "name": { + "type": "string", + "description": "Referencing resource name.", + "example": "Platform Team" + }, + "href": { + "type": "string", + "description": "Console link for the referencing resource. May be empty.", + "example": "/on-call/team/2477033058131" + } + } + }, + "PublicIntegrationDeleteBlockedError": { + "type": "object", + "additionalProperties": false, + "required": [ + "request_id", + "error", + "data" + ], + "properties": { + "request_id": { + "type": "string", + "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "description": "Unique trace ID for this request." + }, + "error": { + "$ref": "#/components/schemas/DutyError" + }, + "data": { + "type": "object", + "additionalProperties": false, + "required": [ + "refs" + ], + "properties": { + "refs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PublicIntegrationReference" + }, + "description": "References that must be removed before deletion." + } + }, + "description": "Resources that currently reference the integration." + } + } + } + }, + "securitySchemes": { + "AppKeyAuth": { + "description": "App key issued from the Flashduty console under Account → APP Keys. Required on every public API call. Keep it secret — it grants the same access as the owning account.", + "in": "query", + "name": "app_key", + "type": "apiKey" + }, + "AutomationTriggerBearerAuth": { + "description": "Bearer token generated for one Automation HTTP POST trigger. This is not an app_key.", + "scheme": "bearer", + "type": "http" + } + } + }, + "info": { + "description": "Public HTTP API for the Flashduty incident management platform — incidents, notification templates, channels, schedules, monitors, RUM, and platform administration. Every operation is authenticated with an `app_key` query parameter issued from the Flashduty console under Account → APP Keys. Responses follow a uniform envelope: `{ request_id, data }` on success, `{ request_id, error }` on failure.", + "title": "Flashduty Open API", + "version": "1.0.0" + }, + "openapi": "3.1.0", + "paths": { + "/account/info": { + "post": { + "description": "Return the current account's profile and settings.", + "operationId": "account-read-info", + "requestBody": { + "content": { + "application/json": { + "example": {}, + "schema": { + "type": "object" + } + } + } + }, "responses": { "200": { "content": { "application/json": { "example": { "data": { - "items": [ - { - "created_at": 1710000000, - "creator_id": 80011, - "integration_id": 10001, - "rules": [ - { - "if": [ - { - "key": "labels.cluster", - "oper": "IN", - "vals": [ - "prod-cn" - ] - } - ], - "kind": "alert_inhibit", - "settings": { - "equals": [ - "service" - ], - "source_filters": [ - { - "key": "alert_severity", - "oper": "IN", - "vals": [ - "Critical" - ] - } - ] - } - } - ], - "status": "enabled", - "updated_at": 1712000000, - "updated_by": 80011 - } - ] + "account_id": 1001, + "account_name": "acme", + "avatar": "https://cdn.flashcat.cloud/avatar/acme.png", + "country_code": "CN", + "created_at": 1716960000, + "domain": "acme", + "email": "ops@acme.example", + "extra_domains": [ + "acme-corp" + ], + "locale": "zh-CN", + "phone": "138****8000", + "restrictions": { + "allow_subdomain": true, + "email_domains": [ + "acme.example" + ], + "ips": [ + "203.0.113.0/24" + ] + }, + "time_zone": "Asia/Shanghai" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -30212,7 +29977,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/AlertPipelineListResponse" + "$ref": "#/components/schemas/AccountInfo" } }, "type": "object" @@ -30236,55 +30001,39 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List alert pipelines", + "security": [ + { + "AppKeyAuth": [] + } + ], + "summary": "Get account detail", "tags": [ - "On-call/Alerts" + "Platform/Account" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |\n\n## Usage\n\n- All `integration_ids` must be accessible to the caller.", - "href": "/en/api-reference/on-call/alerts/alert-read-pipeline-list", + "content": "| Permission | Description |\n| --- | --- |\n| None | None — any valid app_key can call this operation. |\n\nFind this operation in the [Platform API reference](/en/api-reference/platform/account/account-read-info).", + "href": "/en/api-reference/platform/account/account-read-info", "metadata": { - "sidebarTitle": "List alert pipelines" + "sidebarTitle": "Get account detail" } } } }, - "/alert/pipeline/upsert": { + "/alert-event/list": { "post": { - "description": "Set the alert processing pipeline for an integration. Replaces the existing configuration entirely.", - "operationId": "alert-write-pipeline-upsert", + "description": "Return a cursor-paginated list of raw alert events across all alerts, with filtering by integration, channel, time range, and severity.", + "operationId": "alert-event-read-list", "requestBody": { "content": { "application/json": { "example": { - "integration_id": 10001, - "rules": [ - { - "if": [ - { - "key": "labels.env", - "oper": "IN", - "vals": [ - "prod" - ] - } - ], - "kind": "title_reset", - "settings": { - "title": "[TPL]{{.Labels.service}} / {{.Labels.check}}" - } - }, - { - "if": null, - "kind": "severity_reset", - "settings": { - "severity": "Warning" - } - } - ] + "end_time": 1712707200, + "limit": 20, + "severities": "Critical", + "start_time": 1712620800 }, "schema": { - "$ref": "#/components/schemas/AlertPipelineUpsertRequest" + "$ref": "#/components/schemas/AlertEventGlobalListRequest" } } }, @@ -30295,18 +30044,30 @@ "content": { "application/json": { "example": { - "data": null, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ + "data": { + "has_next_page": false, + "items": [ + { + "alert_id": "663a1b2c3d4e5f6789abcdef", + "event_id": "663a1b2c3d4e5f6789abc001", + "event_severity": "Critical", + "event_time": 1712650000, + "title": "CPU usage > 90%" + } + ], + "total": 1 + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/AlertEventGlobalListResponse" } }, "type": "object" @@ -30330,29 +30091,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create or update alert pipeline", + "summary": "List raw alert events", "tags": [ "On-call/Alerts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Maximum 50 rules per pipeline.\n- Each rule has a `kind` (one of `title_reset`, `description_reset`, `severity_reset`, `alert_drop`, `alert_inhibit`), an optional `if` filter, and `settings` specific to the kind.\n- The `alert_inhibit` kind requires the Standard license or higher.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/alerts/alert-write-pipeline-upsert", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Results are filtered by the caller's channel data-access permissions.\n- `severities` is a comma-separated string, e.g. `\"Critical,Warning\"`.", + "href": "/en/api-reference/on-call/alerts/alert-event-read-list", "metadata": { - "sidebarTitle": "Create or update alert pipeline" + "sidebarTitle": "List raw alert events" } } } }, - "/audit/operation/list": { + "/alert/event/list": { "post": { - "description": "Return all operation names that are recorded in the audit log, for use as `operations` filter values.", - "operationId": "audit-read-operation-list", + "description": "Return raw events for an alert with cursor or page-number pagination.", + "operationId": "alert-read-event-list", "requestBody": { "content": { "application/json": { - "example": {}, + "example": { + "alert_id": "663a1b2c3d4e5f6789abcdef", + "limit": 20 + }, "schema": { - "$ref": "#/components/schemas/AuditOperationListRequest" + "$ref": "#/components/schemas/AlertEventListRequest" } } }, @@ -30364,20 +30128,22 @@ "application/json": { "example": { "data": { + "has_next_page": true, "items": [ { - "name": "template:write:create", - "name_cn": "创建模板" - }, - { - "name": "template:write:delete", - "name_cn": "删除模板" - }, - { - "name": "incident:write:acknowledge", - "name_cn": "认领故障" + "alert_id": "663a1b2c3d4e5f6789abcdef", + "event_id": "663a1b2c3d4e5f6789abc001", + "event_severity": "Critical", + "event_status": "Critical", + "event_time": 1712650000, + "labels": { + "host": "web-01" + }, + "title": "CPU usage > 90%" } - ] + ], + "search_after_ctx": "663a1b2c3d4e5f6789abc001", + "total": 57 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -30389,7 +30155,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/AuditOperationListResponse" + "$ref": "#/components/schemas/AlertEventListResponse" } }, "type": "object" @@ -30413,37 +30179,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List auditable operation types", + "summary": "List events for an alert", "tags": [ - "Platform/Audit logs" + "On-call/Alerts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Audit Read** (`organization`) |\n\n## Usage\n\n- Use the `name` values from this response as `operations` filter values in `POST /audit/search`.\n- `name_cn` is the human-readable Chinese label shown in the console; `name` is the stable wire value to filter on.", - "href": "/en/api-reference/platform/audit-logs/audit-read-operation-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Results are newest-first by default. Set `asc=true` to read events oldest-first.\n- Use `limit` with `search_after_ctx` from the previous response to fetch the next page.\n- Classic page-number pagination is also supported with `p`, but `p * limit` must stay within 10,000 records.\n- Each alert can accumulate a large raw event history; prefer cursor pagination for hot alerts.", + "href": "/en/api-reference/on-call/alerts/alert-read-event-list", "metadata": { - "sidebarTitle": "List auditable operation types" + "sidebarTitle": "List events for an alert" } } } }, - "/audit/search": { + "/alert/feed": { "post": { - "description": "Return a cursor-paginated list of audit log entries within a time range.", - "operationId": "audit-read-search", + "description": "Return the activity feed (comments, state changes, merges, silence events) for a single alert, with page-based pagination.", + "operationId": "alert-read-feed", "requestBody": { "content": { "application/json": { "example": { - "end_time": 1712707200, - "limit": 20, - "operations": [ - "template:write:create", - "template:write:delete" - ], - "start_time": 1712620800 + "alert_id": "663a1b2c3d4e5f6789abcdef", + "asc": false, + "limit": 20 }, "schema": { - "$ref": "#/components/schemas/AuditSearchRequest" + "$ref": "#/components/schemas/AlertFeedRequest" } } }, @@ -30455,27 +30217,18 @@ "application/json": { "example": { "data": { - "docs": [ + "has_next_page": false, + "items": [ { - "account_id": 10023, - "body": "{\"template_name\":\"Prod default\"}", - "created_at": 1712700123456, - "credential_id": 0, - "credential_type": "", - "ip": "203.0.113.42", - "is_dangerous": false, - "is_write": true, - "member_id": 80011, - "member_name": "Alice", - "operation": "template:write:create", - "operation_name": "创建模板", - "params": [], - "principal_kind": "member", - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + "created_at": 1712651000, + "creator_id": 80011, + "detail": { + "comment": "Investigating now." + }, + "ref_id": "663a1b2c3d4e5f6789abcdef", + "type": "a_comm" } - ], - "search_after_ctx": "", - "total": 2 + ] }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -30487,7 +30240,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/AuditSearchResponse" + "$ref": "#/components/schemas/AlertFeedResponse" } }, "type": "object" @@ -30511,40 +30264,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Search audit logs", + "summary": "List alert activity feed", "tags": [ - "Platform/Audit logs" + "On-call/Alerts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Audit Read** (`organization`) |\n\n## Usage\n\n- Time range is required. Maximum span is 90 days. Both `start_time` and `end_time` are Unix epoch **seconds**.\n- Use `search_after_ctx` from the previous response to fetch the next page. The token is opaque — do not construct it manually.\n- The retention window depends on the account's license. Queries beyond the retention boundary silently return an empty result rather than an error.\n- `limit` accepts 0–99; omitting it (or 0) returns all matching rows in the window with no page-size cap. Rows are returned newest first.", - "href": "/en/api-reference/platform/audit-logs/audit-read-search", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Use `p` (page number, starting at 1) and `limit` (max 100, default 20) for pagination.\n- Set `asc` to `true` for chronological order.\n- Use `types` to filter by specific feed types (e.g. `a_comm`, `a_merge`).", + "href": "/en/api-reference/on-call/alerts/alert-read-feed", "metadata": { - "sidebarTitle": "Search audit logs" + "sidebarTitle": "List alert activity feed" } } } }, - "/calendar/create": { + "/alert/info": { "post": { - "description": "Create a personal service calendar. Each account is limited to 5 calendars unless the Flashcat-Break-Cal-Limit header is set.", - "operationId": "calendarCreate", + "description": "Return the full details of a single alert by its ID, including its associated incident and event count.", + "operationId": "alert-read-info", "requestBody": { "content": { "application/json": { "example": { - "cal_name": "Production On-Call Calendar", - "description": "Calendar for production on-call team", - "timezone": "Asia/Shanghai", - "workdays": [ - 1, - 2, - 3, - 4, - 5 - ] + "alert_id": "663a1b2c3d4e5f6789abcdef" }, "schema": { - "$ref": "#/components/schemas/CalendarCreateRequest" + "$ref": "#/components/schemas/AlertInfoRequest" } } }, @@ -30556,8 +30300,12 @@ "application/json": { "example": { "data": { - "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", - "cal_name": "API Test Calendar" + "alert_id": "663a1b2c3d4e5f6789abcdef", + "alert_severity": "Critical", + "alert_status": "Critical", + "event_cnt": 3, + "start_time": 1712650000, + "title": "CPU usage > 90%" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -30569,7 +30317,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/CalendarCreateResponse" + "$ref": "#/components/schemas/AlertItem" } }, "type": "object" @@ -30593,31 +30341,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create calendar", + "summary": "Get alert detail", "tags": [ - "On-call/Calendars" + "On-call/Alerts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Calendars Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/calendars/calendar-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- `alert_id` is an ObjectID hex string returned by `POST /alert/list` or `POST /alert-event/list`.", + "href": "/en/api-reference/on-call/alerts/alert-read-info", "metadata": { - "sidebarTitle": "Create calendar" + "sidebarTitle": "Get alert detail" } } } }, - "/calendar/delete": { + "/alert/list": { "post": { - "description": "Delete a personal service calendar. The call fails when referenced by escalation or silence rules.", - "operationId": "calendarDelete", + "description": "Return a cursor-paginated list of alerts matching the given filters.", + "operationId": "alert-read-list", "requestBody": { "content": { "application/json": { "example": { - "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM" + "end_time": 1712707200, + "is_active": true, + "limit": 20, + "start_time": 1712620800 }, "schema": { - "$ref": "#/components/schemas/CalendarIDRequest" + "$ref": "#/components/schemas/AlertListRequest" } } }, @@ -30628,7 +30379,34 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "has_next_page": false, + "items": [ + { + "account_id": 10023, + "alert_id": "663a1b2c3d4e5f6789abcdef", + "alert_severity": "Critical", + "alert_status": "Critical", + "channel_id": 20001, + "channel_name": "Production", + "created_at": 1712650000, + "end_time": 0, + "event_cnt": 3, + "ever_muted": false, + "integration_id": 10001, + "integration_name": "Prometheus", + "integration_type": "prometheus", + "labels": { + "host": "web-01" + }, + "last_time": 1712655000, + "start_time": 1712650000, + "title": "CPU usage > 90%", + "updated_at": 1712655000 + } + ], + "total": 1 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -30639,7 +30417,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/CalendarEmptyObject" + "$ref": "#/components/schemas/AlertListResponse" } }, "type": "object" @@ -30663,32 +30441,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete calendar", + "summary": "List alerts", "tags": [ - "On-call/Calendars" + "On-call/Alerts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Calendars Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/calendars/calendar-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Both `start_time` and `end_time` are required Unix epoch seconds. Maximum span is 31 days.\n- Use `search_after_ctx` from the previous response to fetch the next page.\n- Results are filtered by the caller's channel data-access permissions.\n- Set `is_active` to `true` to retrieve only active (firing) alerts; `false` to retrieve resolved alerts.", + "href": "/en/api-reference/on-call/alerts/alert-read-list", "metadata": { - "sidebarTitle": "Delete calendar" + "sidebarTitle": "List alerts" } } } }, - "/calendar/event/delete": { + "/alert/list-by-ids": { "post": { - "description": "Delete a calendar event by calendar ID and event ID.", - "operationId": "calEventDelete", + "description": "Return the details of multiple alerts by their IDs in a single request. Note: this endpoint does not paginate — `total` and `has_next_page` are always `0`/`false` and `search_after_ctx` is never set.", + "operationId": "alert-read-list-by-ids", "requestBody": { "content": { "application/json": { "example": { - "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", - "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4" + "alert_ids": [ + "663a1b2c3d4e5f6789abcdef" + ] }, "schema": { - "$ref": "#/components/schemas/CalEventIDRequest" + "$ref": "#/components/schemas/AlertListByIDsRequest" } } }, @@ -30699,7 +30478,16 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "has_next_page": false, + "items": [ + { + "alert_id": "663a1b2c3d4e5f6789abcdef", + "title": "CPU usage > 90%" + } + ], + "total": 0 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -30710,7 +30498,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/CalendarEmptyObject" + "$ref": "#/components/schemas/AlertListResponse" } }, "type": "object" @@ -30734,33 +30522,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete calendar event", + "summary": "List alerts by IDs", "tags": [ - "On-call/Calendars" + "On-call/Alerts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Calendars Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/calendars/cal-event-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- All provided `alert_ids` must belong to the caller's account; any invalid ID causes the entire request to fail.", + "href": "/en/api-reference/on-call/alerts/alert-read-list-by-ids", "metadata": { - "sidebarTitle": "Delete calendar event" + "sidebarTitle": "List alerts by IDs" } } } }, - "/calendar/event/list": { + "/alert/merge": { "post": { - "description": "Return events for a personal calendar within a year/month/day scope. When month and day are both omitted the whole year is returned.", - "operationId": "calEventList", + "description": "Associate one or more alerts with an existing incident. If a source alert previously belonged to a different incident and that incident becomes empty after the merge, it will be automatically closed.", + "operationId": "alert-write-merge", "requestBody": { "content": { "application/json": { "example": { - "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", - "month": 5, - "year": 2024 + "alert_ids": [ + "663a1b2c3d4e5f6789abcdef" + ], + "incident_id": "663a000000000000deadbeef" }, "schema": { - "$ref": "#/components/schemas/CalEventListRequest" + "$ref": "#/components/schemas/AlertMergeRequest" } } }, @@ -30771,37 +30560,7 @@ "content": { "application/json": { "example": { - "data": { - "items": [ - { - "account_id": 2451002751131, - "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", - "created_at": 1775972034, - "creator_id": 2476444212131, - "description": "A test holiday event", - "end_at": "2026-05-02", - "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4", - "is_off": true, - "start_at": "2026-05-01", - "summary": "Test Holiday", - "updated_at": 1775972034 - }, - { - "account_id": 2451002751131, - "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", - "created_at": 0, - "creator_id": 2451002751131, - "description": "", - "end_at": "2026-05-03", - "event_id": "non_work.20260502", - "is_off": true, - "start_at": "2026-05-02", - "summary": "non-working day (Saturday)", - "updated_at": 0 - } - ], - "total": 11 - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -30812,7 +30571,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/CalEventListResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -30836,36 +30595,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List calendar events", + "summary": "Merge alerts into an incident", "tags": [ - "On-call/Calendars" + "On-call/Alerts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/calendars/cal-event-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- All `alert_ids` and the `incident_id` must belong to the caller's account.\n- Optionally set `title` and `owner_id` to update the target incident at the same time.", + "href": "/en/api-reference/on-call/alerts/alert-write-merge", "metadata": { - "sidebarTitle": "List calendar events" + "sidebarTitle": "Merge alerts into an incident" } } } }, - "/calendar/event/upsert": { + "/alert/pipeline/info": { "post": { - "description": "Create or update a calendar event (holiday or workday override). Omit event_id to create a new event.", - "operationId": "calEventUpsert", + "description": "Return the alert processing pipeline configured for a specific integration.", + "operationId": "alert-read-pipeline-info", "requestBody": { "content": { "application/json": { "example": { - "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", - "description": "International Workers Day holiday", - "end_at": "2024-05-06", - "is_off": true, - "start_at": "2024-05-01", - "summary": "Labour Day" + "integration_id": 10001 }, "schema": { - "$ref": "#/components/schemas/CalEventUpsertRequest" + "$ref": "#/components/schemas/AlertPipelineInfoRequest" } } }, @@ -30877,9 +30631,36 @@ "application/json": { "example": { "data": { - "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", - "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4", - "summary": "Test Holiday" + "created_at": 1710000000, + "creator_id": 80011, + "integration_id": 10001, + "rules": [ + { + "if": [ + { + "key": "labels.env", + "oper": "IN", + "vals": [ + "prod" + ] + } + ], + "kind": "title_reset", + "settings": { + "title": "[TPL]{{.Labels.service}} / {{.Labels.check}}" + } + }, + { + "if": null, + "kind": "severity_reset", + "settings": { + "severity": "Warning" + } + } + ], + "status": "enabled", + "updated_at": 1712000000, + "updated_by": 80011 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -30891,7 +30672,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/CalEventUpsertResponse" + "$ref": "#/components/schemas/AlertPipelineItem" } }, "type": "object" @@ -30915,31 +30696,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Upsert calendar event", + "summary": "Get alert pipeline", "tags": [ - "On-call/Calendars" + "On-call/Alerts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Calendars Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/calendars/cal-event-upsert", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |\n\n## Usage\n\n- Returns `null` data if no pipeline has been configured for the given integration.\n- Requires the caller to have access to the integration.", + "href": "/en/api-reference/on-call/alerts/alert-read-pipeline-info", "metadata": { - "sidebarTitle": "Upsert calendar event" + "sidebarTitle": "Get alert pipeline" } } } }, - "/calendar/info": { + "/alert/pipeline/list": { "post": { - "description": "Return details of a service calendar.", - "operationId": "calendarInfo", + "description": "Return the alert processing pipelines configured for multiple integrations.", + "operationId": "alert-read-pipeline-list", "requestBody": { "content": { "application/json": { "example": { - "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg" + "integration_ids": [ + 10001, + 10002 + ] }, "schema": { - "$ref": "#/components/schemas/CalendarIDRequest" + "$ref": "#/components/schemas/AlertPipelineListRequest" } } }, @@ -30951,26 +30735,43 @@ "application/json": { "example": { "data": { - "account_id": 2451002751131, - "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg", - "cal_name": "Stock Exchange Calendar", - "created_at": 1702455630, - "creator_id": 2476444212131, - "description": "A stock market trading calendar example", - "kind": "personal", - "status": "enabled", - "team_id": 2477033058131, - "timezone": "Asia/Shanghai", - "updated_at": 1775529526, - "updated_by": 3790925372131, - "workdays": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 + "items": [ + { + "created_at": 1710000000, + "creator_id": 80011, + "integration_id": 10001, + "rules": [ + { + "if": [ + { + "key": "labels.cluster", + "oper": "IN", + "vals": [ + "prod-cn" + ] + } + ], + "kind": "alert_inhibit", + "settings": { + "equals": [ + "service" + ], + "source_filters": [ + { + "key": "alert_severity", + "oper": "IN", + "vals": [ + "Critical" + ] + } + ] + } + } + ], + "status": "enabled", + "updated_at": 1712000000, + "updated_by": 80011 + } ] }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" @@ -30983,7 +30784,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/CalendarItem" + "$ref": "#/components/schemas/AlertPipelineListResponse" } }, "type": "object" @@ -31007,31 +30808,55 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get calendar info", + "summary": "List alert pipelines", "tags": [ - "On-call/Calendars" + "On-call/Alerts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/calendars/calendar-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |\n\n## Usage\n\n- All `integration_ids` must be accessible to the caller.", + "href": "/en/api-reference/on-call/alerts/alert-read-pipeline-list", "metadata": { - "sidebarTitle": "Get calendar info" + "sidebarTitle": "List alert pipelines" } } } }, - "/calendar/list": { + "/alert/pipeline/upsert": { "post": { - "description": "Return the list of service calendars visible to the current account.", - "operationId": "calendarList", + "description": "Set the alert processing pipeline for an integration. Replaces the existing configuration entirely.", + "operationId": "alert-write-pipeline-upsert", "requestBody": { "content": { "application/json": { "example": { - "kind": "personal" + "integration_id": 10001, + "rules": [ + { + "if": [ + { + "key": "labels.env", + "oper": "IN", + "vals": [ + "prod" + ] + } + ], + "kind": "title_reset", + "settings": { + "title": "[TPL]{{.Labels.service}} / {{.Labels.check}}" + } + }, + { + "if": null, + "kind": "severity_reset", + "settings": { + "severity": "Warning" + } + } + ] }, "schema": { - "$ref": "#/components/schemas/CalendarListRequest" + "$ref": "#/components/schemas/AlertPipelineUpsertRequest" } } }, @@ -31042,51 +30867,7 @@ "content": { "application/json": { "example": { - "data": { - "items": [ - { - "account_id": 2451002751131, - "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg", - "cal_name": "Stock Exchange Calendar", - "created_at": 1702455630, - "creator_id": 2476444212131, - "description": "A stock market trading calendar example", - "kind": "personal", - "status": "enabled", - "team_id": 2477033058131, - "timezone": "Asia/Shanghai", - "updated_at": 1775529526, - "updated_by": 3790925372131, - "workdays": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ] - }, - { - "account_id": 2451002751131, - "cal_id": "cal.VZYkchxJhGELSF4jzkUAud", - "cal_name": "HK Stock Exchange Calendar", - "created_at": 1702968470, - "creator_id": 2451002751131, - "description": "Hong Kong Stock Exchange trading days calendar", - "extra_cal_ids": [ - "zh-cn.china.official" - ], - "kind": "personal", - "status": "enabled", - "team_id": 0, - "timezone": "Asia/Shanghai", - "updated_at": 1775188967, - "updated_by": 3790925372131 - } - ], - "total": 8 - }, + "data": null, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -31097,7 +30878,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/CalendarListResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -31121,40 +30902,29 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List calendars", + "summary": "Create or update alert pipeline", "tags": [ - "On-call/Calendars" + "On-call/Alerts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/calendars/calendar-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Maximum 50 rules per pipeline.\n- Each rule has a `kind` (one of `title_reset`, `description_reset`, `severity_reset`, `alert_drop`, `alert_inhibit`), an optional `if` filter, and `settings` specific to the kind.\n- The `alert_inhibit` kind requires the Standard license or higher.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/alerts/alert-write-pipeline-upsert", "metadata": { - "sidebarTitle": "List calendars" + "sidebarTitle": "Create or update alert pipeline" } } } }, - "/calendar/update": { + "/audit/operation/list": { "post": { - "description": "Update a personal service calendar. Only non-null fields are updated.", - "operationId": "calendarUpdate", + "description": "Return all operation names that are recorded in the audit log, for use as `operations` filter values.", + "operationId": "audit-read-operation-list", "requestBody": { "content": { "application/json": { - "example": { - "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", - "cal_name": "Production On-Call Calendar (Updated)", - "timezone": "America/New_York", - "workdays": [ - 1, - 2, - 3, - 4, - 5 - ] - }, + "example": {}, "schema": { - "$ref": "#/components/schemas/CalendarUpdateRequest" + "$ref": "#/components/schemas/AuditOperationListRequest" } } }, @@ -31165,7 +30935,22 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "items": [ + { + "name": "template:write:create", + "name_cn": "创建模板" + }, + { + "name": "template:write:delete", + "name_cn": "删除模板" + }, + { + "name": "incident:write:acknowledge", + "name_cn": "认领故障" + } + ] + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -31176,7 +30961,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/CalendarEmptyObject" + "$ref": "#/components/schemas/AuditOperationListResponse" } }, "type": "object" @@ -31200,40 +30985,37 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update calendar", + "summary": "List auditable operation types", "tags": [ - "On-call/Calendars" + "Platform/Audit logs" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Calendars Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/calendars/calendar-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Audit Read** (`organization`) |\n\n## Usage\n\n- Use the `name` values from this response as `operations` filter values in `POST /audit/search`.\n- `name_cn` is the human-readable Chinese label shown in the console; `name` is the stable wire value to filter on.", + "href": "/en/api-reference/platform/audit-logs/audit-read-operation-list", "metadata": { - "sidebarTitle": "Update calendar" + "sidebarTitle": "List auditable operation types" } } } }, - "/change/list": { + "/audit/search": { "post": { - "description": "Query change records within a time window, with filtering, search, and pagination.", - "operationId": "change-read-list", + "description": "Return a cursor-paginated list of audit log entries within a time range.", + "operationId": "audit-read-search", "requestBody": { "content": { "application/json": { "example": { - "asc": false, - "end_time": 1717046400, - "include_events": false, - "integration_ids": [ - 362 + "end_time": 1712707200, + "limit": 20, + "operations": [ + "template:write:create", + "template:write:delete" ], - "limit": 10, - "orderby": "start_time", - "p": 1, - "start_time": 1716960000 + "start_time": 1712620800 }, "schema": { - "$ref": "#/components/schemas/ListChangeRequest" + "$ref": "#/components/schemas/AuditSearchRequest" } } }, @@ -31245,31 +31027,27 @@ "application/json": { "example": { "data": { - "has_next_page": false, - "items": [ + "docs": [ { - "account_id": 10001, - "change_id": "664a1b2c3d4e5f6a7b8c9d0e", - "change_key": "deploy-api-server-2311", - "change_status": "Done", - "channel_id": 5001, - "channel_name": "Production", - "channel_status": "enabled", - "description": "Rolling deploy to production cluster", - "end_time": 1716963000, - "integration_id": 362, - "integration_name": "GitHub Deploy", - "labels": { - "env": "prod", - "service": "api-server" - }, - "last_time": 1716962700, - "link": "https://github.com/acme/api-server/actions/runs/123", - "start_time": 1716962400, - "title": "Deploy api-server v2.3.1" + "account_id": 10023, + "body": "{\"template_name\":\"Prod default\"}", + "created_at": 1712700123456, + "credential_id": 0, + "credential_type": "", + "ip": "203.0.113.42", + "is_dangerous": false, + "is_write": true, + "member_id": 80011, + "member_name": "Alice", + "operation": "template:write:create", + "operation_name": "创建模板", + "params": [], + "principal_kind": "member", + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" } ], - "total": 1 + "search_after_ctx": "", + "total": 2 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -31281,7 +31059,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ListChangeResponse" + "$ref": "#/components/schemas/AuditSearchResponse" } }, "type": "object" @@ -31305,40 +31083,40 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List changes", + "summary": "Search audit logs", "tags": [ - "On-call/Changes" + "Platform/Audit logs" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n", - "href": "/en/api-reference/on-call/changes/change-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Audit Read** (`organization`) |\n\n## Usage\n\n- Time range is required. Maximum span is 90 days. Both `start_time` and `end_time` are Unix epoch **seconds**.\n- Use `search_after_ctx` from the previous response to fetch the next page. The token is opaque — do not construct it manually.\n- The retention window depends on the account's license. Queries beyond the retention boundary silently return an empty result rather than an error.\n- `limit` accepts 0–99; omitting it (or 0) returns all matching rows in the window with no page-size cap. Rows are returned newest first.", + "href": "/en/api-reference/platform/audit-logs/audit-read-search", "metadata": { - "sidebarTitle": "List changes" + "sidebarTitle": "Search audit logs" } } } }, - "/channel/create": { + "/calendar/create": { "post": { - "description": "Create a new channel for incident management.", - "operationId": "channelCreate", + "description": "Create a personal service calendar. Each account is limited to 5 calendars unless the Flashcat-Break-Cal-Limit header is set.", + "operationId": "calendarCreate", "requestBody": { "content": { "application/json": { "example": { - "auto_resolve_mode": "trigger", - "auto_resolve_timeout": 86400, - "channel_name": "Production Alerts", - "description": "Handles all production environment alerts", - "group": { - "method": "p", - "time_window": 10, - "window_type": "tumbling" - }, - "team_id": 3521074710131 + "cal_name": "Production On-Call Calendar", + "description": "Calendar for production on-call team", + "timezone": "Asia/Shanghai", + "workdays": [ + 1, + 2, + 3, + 4, + 5 + ] }, "schema": { - "$ref": "#/components/schemas/CreateChannelRequest" + "$ref": "#/components/schemas/CalendarCreateRequest" } } }, @@ -31350,8 +31128,8 @@ "application/json": { "example": { "data": { - "channel_id": 6294542005131, - "channel_name": "API Test Channel" + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "cal_name": "API Test Calendar" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -31363,7 +31141,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ChannelCreateResponse" + "$ref": "#/components/schemas/CalendarCreateResponse" } }, "type": "object" @@ -31387,31 +31165,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create channel", + "summary": "Create calendar", "tags": [ - "On-call/Channels" + "On-call/Calendars" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Calendars Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/calendars/calendar-create", "metadata": { - "sidebarTitle": "Create channel" + "sidebarTitle": "Create calendar" } } } }, - "/channel/delete": { + "/calendar/delete": { "post": { - "description": "Delete a channel. Only a `disabled` channel can be deleted; all of its escalation, silence, drop and inhibit rules are deleted with it. The call fails when an integration route still references the channel.", - "operationId": "channelDelete", + "description": "Delete a personal service calendar. The call fails when referenced by escalation or silence rules.", + "operationId": "calendarDelete", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 3521074710131 + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM" }, "schema": { - "$ref": "#/components/schemas/ChannelIDRequest" + "$ref": "#/components/schemas/CalendarIDRequest" } } }, @@ -31433,7 +31211,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/CalendarEmptyObject" } }, "type": "object" @@ -31457,31 +31235,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete channel", + "summary": "Delete calendar", "tags": [ - "On-call/Channels" + "On-call/Calendars" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Calendars Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/calendars/calendar-delete", "metadata": { - "sidebarTitle": "Delete channel" + "sidebarTitle": "Delete calendar" } } } }, - "/channel/disable": { + "/calendar/event/delete": { "post": { - "description": "Disable a channel to stop incident routing without deleting it; a disabled channel discards incoming events. Only an `enabled` channel can be disabled.", - "operationId": "channelDisable", + "description": "Delete a calendar event by calendar ID and event ID.", + "operationId": "calEventDelete", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 3521074710131 + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4" }, "schema": { - "$ref": "#/components/schemas/ChannelIDRequest" + "$ref": "#/components/schemas/CalEventIDRequest" } } }, @@ -31503,7 +31282,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/CalendarEmptyObject" } }, "type": "object" @@ -31527,31 +31306,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Disable channel", + "summary": "Delete calendar event", "tags": [ - "On-call/Channels" + "On-call/Calendars" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-disable", - "metadata": { - "sidebarTitle": "Disable channel" + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Calendars Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/calendars/cal-event-delete", + "metadata": { + "sidebarTitle": "Delete calendar event" } } } }, - "/channel/enable": { + "/calendar/event/list": { "post": { - "description": "Enable a channel to resume incident routing. Only a `disabled` channel can be enabled.", - "operationId": "channelEnable", + "description": "Return events for a personal calendar within a year/month/day scope. When month and day are both omitted the whole year is returned.", + "operationId": "calEventList", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 3521074710131 + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "month": 5, + "year": 2024 }, "schema": { - "$ref": "#/components/schemas/ChannelIDRequest" + "$ref": "#/components/schemas/CalEventListRequest" } } }, @@ -31562,7 +31343,37 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "items": [ + { + "account_id": 2451002751131, + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "created_at": 1775972034, + "creator_id": 2476444212131, + "description": "A test holiday event", + "end_at": "2026-05-02", + "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4", + "is_off": true, + "start_at": "2026-05-01", + "summary": "Test Holiday", + "updated_at": 1775972034 + }, + { + "account_id": 2451002751131, + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "created_at": 0, + "creator_id": 2451002751131, + "description": "", + "end_at": "2026-05-03", + "event_id": "non_work.20260502", + "is_off": true, + "start_at": "2026-05-02", + "summary": "non-working day (Saturday)", + "updated_at": 0 + } + ], + "total": 11 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -31573,7 +31384,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/CalEventListResponse" } }, "type": "object" @@ -31597,50 +31408,36 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Enable channel", + "summary": "List calendar events", "tags": [ - "On-call/Channels" + "On-call/Calendars" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-enable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/calendars/cal-event-list", "metadata": { - "sidebarTitle": "Enable channel" + "sidebarTitle": "List calendar events" } } } }, - "/channel/escalate/rule/create": { + "/calendar/event/upsert": { "post": { - "description": "Create an escalation rule defining who gets notified and when during an incident.", - "operationId": "channelEscalateRuleCreate", + "description": "Create or update a calendar event (holiday or workday override). Omit event_id to create a new event.", + "operationId": "calEventUpsert", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 3521074710131, - "description": "Notify primary on-call, then escalate to secondary after 30 minutes", - "layers": [ - { - "escalate_window": 30, - "force_escalate": false, - "max_times": 3, - "notify_step": 10, - "target": { - "by": { - "follow_preference": true - }, - "person_ids": [ - 3790925372131 - ] - } - } - ], - "rule_name": "On-call escalation", - "template_id": "6321aad26c12104586a88916" + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "description": "International Workers Day holiday", + "end_at": "2024-05-06", + "is_off": true, + "start_at": "2024-05-01", + "summary": "Labour Day" }, "schema": { - "$ref": "#/components/schemas/CreateEscalationRuleRequest" + "$ref": "#/components/schemas/CalEventUpsertRequest" } } }, @@ -31652,8 +31449,9 @@ "application/json": { "example": { "data": { - "rule_id": "69db2f72a0fe7db6448b1506", - "rule_name": "Test escalation rule" + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4", + "summary": "Test Holiday" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -31665,7 +31463,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RuleCreateResponse" + "$ref": "#/components/schemas/CalEventUpsertResponse" } }, "type": "object" @@ -31689,32 +31487,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create escalation rule", + "summary": "Upsert calendar event", "tags": [ - "On-call/Channels" + "On-call/Calendars" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-escalate-rule-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Calendars Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/calendars/cal-event-upsert", "metadata": { - "sidebarTitle": "Create escalation rule" + "sidebarTitle": "Upsert calendar event" } } } }, - "/channel/escalate/rule/delete": { + "/calendar/info": { "post": { - "description": "Delete an escalation rule. Only a `disabled` rule can be deleted.", - "operationId": "channelEscalateRuleDelete", + "description": "Return details of a service calendar.", + "operationId": "calendarInfo", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 3521074710131, - "rule_id": "6621b23f4a2c5e0012ab34cd" + "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg" }, "schema": { - "$ref": "#/components/schemas/ChannelRuleIDRequest" + "$ref": "#/components/schemas/CalendarIDRequest" } } }, @@ -31725,7 +31522,29 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "account_id": 2451002751131, + "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg", + "cal_name": "Stock Exchange Calendar", + "created_at": 1702455630, + "creator_id": 2476444212131, + "description": "A stock market trading calendar example", + "kind": "personal", + "status": "enabled", + "team_id": 2477033058131, + "timezone": "Asia/Shanghai", + "updated_at": 1775529526, + "updated_by": 3790925372131, + "workdays": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ] + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -31736,7 +31555,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/CalendarItem" } }, "type": "object" @@ -31760,32 +31579,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete escalation rule", + "summary": "Get calendar info", "tags": [ - "On-call/Channels" + "On-call/Calendars" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-escalate-rule-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/calendars/calendar-info", "metadata": { - "sidebarTitle": "Delete escalation rule" + "sidebarTitle": "Get calendar info" } } } }, - "/channel/escalate/rule/disable": { + "/calendar/list": { "post": { - "description": "Disable an escalation rule without deleting it. Only an `enabled` rule can be disabled.", - "operationId": "channelEscalateRuleDisable", + "description": "Return the list of service calendars visible to the current account.", + "operationId": "calendarList", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 3521074710131, - "rule_id": "6621b23f4a2c5e0012ab34cd" + "kind": "personal" }, "schema": { - "$ref": "#/components/schemas/ChannelRuleIDRequest" + "$ref": "#/components/schemas/CalendarListRequest" } } }, @@ -31796,7 +31614,51 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "items": [ + { + "account_id": 2451002751131, + "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg", + "cal_name": "Stock Exchange Calendar", + "created_at": 1702455630, + "creator_id": 2476444212131, + "description": "A stock market trading calendar example", + "kind": "personal", + "status": "enabled", + "team_id": 2477033058131, + "timezone": "Asia/Shanghai", + "updated_at": 1775529526, + "updated_by": 3790925372131, + "workdays": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ] + }, + { + "account_id": 2451002751131, + "cal_id": "cal.VZYkchxJhGELSF4jzkUAud", + "cal_name": "HK Stock Exchange Calendar", + "created_at": 1702968470, + "creator_id": 2451002751131, + "description": "Hong Kong Stock Exchange trading days calendar", + "extra_cal_ids": [ + "zh-cn.china.official" + ], + "kind": "personal", + "status": "enabled", + "team_id": 0, + "timezone": "Asia/Shanghai", + "updated_at": 1775188967, + "updated_by": 3790925372131 + } + ], + "total": 8 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -31807,7 +31669,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/CalendarListResponse" } }, "type": "object" @@ -31831,32 +31693,40 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Disable escalation rule", + "summary": "List calendars", "tags": [ - "On-call/Channels" + "On-call/Calendars" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-escalate-rule-disable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/calendars/calendar-list", "metadata": { - "sidebarTitle": "Disable escalation rule" + "sidebarTitle": "List calendars" } } } }, - "/channel/escalate/rule/enable": { + "/calendar/update": { "post": { - "description": "Enable a disabled escalation rule. Only a `disabled` rule can be enabled.", - "operationId": "channelEscalateRuleEnable", + "description": "Update a personal service calendar. Only non-null fields are updated.", + "operationId": "calendarUpdate", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 3521074710131, - "rule_id": "6621b23f4a2c5e0012ab34cd" + "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM", + "cal_name": "Production On-Call Calendar (Updated)", + "timezone": "America/New_York", + "workdays": [ + 1, + 2, + 3, + 4, + 5 + ] }, "schema": { - "$ref": "#/components/schemas/ChannelRuleIDRequest" + "$ref": "#/components/schemas/CalendarUpdateRequest" } } }, @@ -31878,7 +31748,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/CalendarEmptyObject" } }, "type": "object" @@ -31902,32 +31772,40 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Enable escalation rule", + "summary": "Update calendar", "tags": [ - "On-call/Channels" + "On-call/Calendars" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-escalate-rule-enable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Calendars Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/calendars/calendar-update", "metadata": { - "sidebarTitle": "Enable escalation rule" + "sidebarTitle": "Update calendar" } } } }, - "/channel/escalate/rule/info": { + "/change/list": { "post": { - "description": "Retrieve detailed information for a specific escalation rule.", - "operationId": "channelEscalateRuleInfo", + "description": "Query change records within a time window, with filtering, search, and pagination.", + "operationId": "change-read-list", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 1001, - "rule_id": "6621b23f4a2c5e0012ab34d0" + "asc": false, + "end_time": 1717046400, + "include_events": false, + "integration_ids": [ + 362 + ], + "limit": 10, + "orderby": "start_time", + "p": 1, + "start_time": 1716960000 }, "schema": { - "$ref": "#/components/schemas/ChannelRuleIDRequest" + "$ref": "#/components/schemas/ListChangeRequest" } } }, @@ -31939,37 +31817,31 @@ "application/json": { "example": { "data": { - "account_id": 2451002751131, - "aggr_window": 0, - "channel_id": 6193426913131, - "created_at": 1773997289, - "description": "", - "filters": [], - "layers": [ + "has_next_page": false, + "items": [ { - "escalate_window": 30, - "force_escalate": false, - "max_times": 1, - "notify_step": 10, - "target": { - "by": { - "follow_preference": true - }, - "person_ids": [ - 3790925372131 - ], - "webhooks": null - } + "account_id": 10001, + "change_id": "664a1b2c3d4e5f6a7b8c9d0e", + "change_key": "deploy-api-server-2311", + "change_status": "Done", + "channel_id": 5001, + "channel_name": "Production", + "channel_status": "enabled", + "description": "Rolling deploy to production cluster", + "end_time": 1716963000, + "integration_id": 362, + "integration_name": "GitHub Deploy", + "labels": { + "env": "prod", + "service": "api-server" + }, + "last_time": 1716962700, + "link": "https://github.com/acme/api-server/actions/runs/123", + "start_time": 1716962400, + "title": "Deploy api-server v2.3.1" } ], - "priority": 0, - "rule_id": "69bd0ce95a238693176c1d66", - "rule_name": "Default", - "status": "enabled", - "template_id": "6321aad26c12104586a88916", - "time_filters": [], - "updated_at": 1773997289, - "updated_by": 3790925372131 + "total": 1 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -31981,7 +31853,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EscalateRuleItem" + "$ref": "#/components/schemas/ListChangeResponse" } }, "type": "object" @@ -32005,31 +31877,40 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get escalation rule detail", + "summary": "List changes", "tags": [ - "On-call/Channels" + "On-call/Changes" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-escalate-rule-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n", + "href": "/en/api-reference/on-call/changes/change-read-list", "metadata": { - "sidebarTitle": "Get escalation rule detail" + "sidebarTitle": "List changes" } } } }, - "/channel/escalate/rule/list": { + "/channel/create": { "post": { - "description": "List all escalation rules for a channel.", - "operationId": "channelEscalateRuleList", + "description": "Create a new channel for incident management.", + "operationId": "channelCreate", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 1001 + "auto_resolve_mode": "trigger", + "auto_resolve_timeout": 86400, + "channel_name": "Production Alerts", + "description": "Handles all production environment alerts", + "group": { + "method": "p", + "time_window": 10, + "window_type": "tumbling" + }, + "team_id": 3521074710131 }, "schema": { - "$ref": "#/components/schemas/ChannelScopedListRequest" + "$ref": "#/components/schemas/CreateChannelRequest" } } }, @@ -32041,41 +31922,8 @@ "application/json": { "example": { "data": { - "items": [ - { - "account_id": 2451002751131, - "aggr_window": 0, - "channel_id": 6193426913131, - "created_at": 1773997289, - "description": "", - "filters": [], - "layers": [ - { - "escalate_window": 30, - "force_escalate": false, - "max_times": 1, - "notify_step": 10, - "target": { - "by": { - "follow_preference": true - }, - "person_ids": [ - 3790925372131 - ], - "webhooks": null - } - } - ], - "priority": 0, - "rule_id": "69bd0ce95a238693176c1d66", - "rule_name": "Default", - "status": "enabled", - "template_id": "6321aad26c12104586a88916", - "time_filters": [], - "updated_at": 1773997289, - "updated_by": 3790925372131 - } - ] + "channel_id": 6294542005131, + "channel_name": "API Test Channel" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -32087,7 +31935,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ListEscalationRulesResponse" + "$ref": "#/components/schemas/ChannelCreateResponse" } }, "type": "object" @@ -32111,51 +31959,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List escalation rules", + "summary": "Create channel", "tags": [ "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-escalate-rule-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-create", "metadata": { - "sidebarTitle": "List escalation rules" + "sidebarTitle": "Create channel" } } } }, - "/channel/escalate/rule/update": { + "/channel/delete": { "post": { - "description": "Update an existing escalation rule configuration.", - "operationId": "channelEscalateRuleUpdate", + "description": "Delete a channel. Only a `disabled` channel can be deleted; all of its escalation, silence, drop and inhibit rules are deleted with it. The call fails when an integration route still references the channel.", + "operationId": "channelDelete", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 1001, - "layers": [ - { - "target": { - "by": { - "critical": [ - "voice" - ], - "warning": [ - "sms" - ] - }, - "person_ids": [ - 42 - ] - } - } - ], - "rule_id": "6621b23f4a2c5e0012ab34d0", - "rule_name": "Default escalation", - "template_id": "6621b23f4a2c5e0012ab34d1" + "channel_id": 3521074710131 }, "schema": { - "$ref": "#/components/schemas/UpdateEscalationRuleRequest" + "$ref": "#/components/schemas/ChannelIDRequest" } } }, @@ -32201,31 +32029,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update escalation rule", + "summary": "Delete channel", "tags": [ "On-call/Channels" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-escalate-rule-update", + "href": "/en/api-reference/on-call/channels/channel-delete", "metadata": { - "sidebarTitle": "Update escalation rule" + "sidebarTitle": "Delete channel" } } } }, - "/channel/info": { + "/channel/disable": { "post": { - "description": "Retrieve detailed information for a specific channel.", - "operationId": "channelInfo", + "description": "Disable a channel to stop incident routing without deleting it; a disabled channel discards incoming events. Only an `enabled` channel can be disabled.", + "operationId": "channelDisable", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 1001 + "channel_id": 3521074710131 }, "schema": { - "$ref": "#/components/schemas/ChannelInfoRequest" + "$ref": "#/components/schemas/ChannelIDRequest" } } }, @@ -32236,12 +32064,7 @@ "content": { "application/json": { "example": { - "data": { - "channel_id": 1001, - "channel_name": "Production Alerts", - "status": "enabled", - "team_id": 10 - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -32252,7 +32075,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ChannelItem" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -32276,34 +32099,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get channel detail", + "summary": "Disable channel", "tags": [ "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/channels/channel-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-disable", "metadata": { - "sidebarTitle": "Get channel detail" + "sidebarTitle": "Disable channel" } } } }, - "/channel/infos": { + "/channel/enable": { "post": { - "description": "Retrieve multiple channels by their IDs.", - "operationId": "channelInfos", + "description": "Enable a channel to resume incident routing. Only a `disabled` channel can be enabled.", + "operationId": "channelEnable", "requestBody": { "content": { "application/json": { "example": { - "channel_ids": [ - 1001, - 1002 - ] + "channel_id": 3521074710131 }, "schema": { - "$ref": "#/components/schemas/ChannelInfosRequest" + "$ref": "#/components/schemas/ChannelIDRequest" } } }, @@ -32314,15 +32134,7 @@ "content": { "application/json": { "example": { - "data": { - "items": [ - { - "channel_id": 1001, - "channel_name": "Production Alerts", - "status": "enabled" - } - ] - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -32333,7 +32145,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ChannelInfosResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -32357,60 +32169,50 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Batch get channels", + "summary": "Enable channel", "tags": [ "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/channels/channel-infos", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-enable", "metadata": { - "sidebarTitle": "Batch get channels" + "sidebarTitle": "Enable channel" } } } }, - "/channel/inhibit/rule/create": { + "/channel/escalate/rule/create": { "post": { - "description": "Create an inhibit rule to suppress lower-priority alerts when higher-priority ones are firing.", - "operationId": "channelInhibitRuleCreate", + "description": "Create an escalation rule defining who gets notified and when during an incident.", + "operationId": "channelEscalateRuleCreate", "requestBody": { "content": { "application/json": { "example": { "channel_id": 3521074710131, - "description": "When a Critical alert fires, suppress matching Info alerts", - "equals": [ - "labels.cluster", - "labels.service" - ], - "is_directly_discard": false, - "rule_name": "Suppress Info when Critical fires", - "source_filters": [ - [ - { - "key": "severity", - "oper": "IN", - "vals": [ - "Critical" + "description": "Notify primary on-call, then escalate to secondary after 30 minutes", + "layers": [ + { + "escalate_window": 30, + "force_escalate": false, + "max_times": 3, + "notify_step": 10, + "target": { + "by": { + "follow_preference": true + }, + "person_ids": [ + 3790925372131 ] } - ] + } ], - "target_filters": [ - [ - { - "key": "severity", - "oper": "IN", - "vals": [ - "Info" - ] - } - ] - ] + "rule_name": "On-call escalation", + "template_id": "6321aad26c12104586a88916" }, "schema": { - "$ref": "#/components/schemas/CreateInhibitRuleRequest" + "$ref": "#/components/schemas/CreateEscalationRuleRequest" } } }, @@ -32422,8 +32224,8 @@ "application/json": { "example": { "data": { - "rule_id": "69db2f69a0fe7db6448b1504", - "rule_name": "Test inhibit rule" + "rule_id": "69db2f72a0fe7db6448b1506", + "rule_name": "Test escalation rule" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -32459,23 +32261,23 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create inhibit rule", + "summary": "Create escalation rule", "tags": [ "On-call/Channels" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-create", + "href": "/en/api-reference/on-call/channels/channel-escalate-rule-create", "metadata": { - "sidebarTitle": "Create inhibit rule" + "sidebarTitle": "Create escalation rule" } } } }, - "/channel/inhibit/rule/delete": { + "/channel/escalate/rule/delete": { "post": { - "description": "Delete an inhibit rule. Only a `disabled` rule can be deleted.", - "operationId": "channelInhibitRuleDelete", + "description": "Delete an escalation rule. Only a `disabled` rule can be deleted.", + "operationId": "channelEscalateRuleDelete", "requestBody": { "content": { "application/json": { @@ -32530,23 +32332,23 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete inhibit rule", + "summary": "Delete escalation rule", "tags": [ "On-call/Channels" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-delete", + "href": "/en/api-reference/on-call/channels/channel-escalate-rule-delete", "metadata": { - "sidebarTitle": "Delete inhibit rule" + "sidebarTitle": "Delete escalation rule" } } } }, - "/channel/inhibit/rule/disable": { + "/channel/escalate/rule/disable": { "post": { - "description": "Disable an inhibit rule without deleting it. Only an `enabled` rule can be disabled.", - "operationId": "channelInhibitRuleDisable", + "description": "Disable an escalation rule without deleting it. Only an `enabled` rule can be disabled.", + "operationId": "channelEscalateRuleDisable", "requestBody": { "content": { "application/json": { @@ -32601,23 +32403,23 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Disable inhibit rule", + "summary": "Disable escalation rule", "tags": [ "On-call/Channels" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-disable", + "href": "/en/api-reference/on-call/channels/channel-escalate-rule-disable", "metadata": { - "sidebarTitle": "Disable inhibit rule" + "sidebarTitle": "Disable escalation rule" } } } }, - "/channel/inhibit/rule/enable": { + "/channel/escalate/rule/enable": { "post": { - "description": "Enable a disabled inhibit rule. Only a `disabled` rule can be enabled.", - "operationId": "channelInhibitRuleEnable", + "description": "Enable a disabled escalation rule. Only a `disabled` rule can be enabled.", + "operationId": "channelEscalateRuleEnable", "requestBody": { "content": { "application/json": { @@ -32672,31 +32474,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Enable inhibit rule", + "summary": "Enable escalation rule", "tags": [ "On-call/Channels" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-enable", + "href": "/en/api-reference/on-call/channels/channel-escalate-rule-enable", "metadata": { - "sidebarTitle": "Enable inhibit rule" + "sidebarTitle": "Enable escalation rule" } } } }, - "/channel/inhibit/rule/list": { + "/channel/escalate/rule/info": { "post": { - "description": "List all inhibit rules configured for a channel.", - "operationId": "channelInhibitRuleList", + "description": "Retrieve detailed information for a specific escalation rule.", + "operationId": "channelEscalateRuleInfo", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 1001 + "channel_id": 1001, + "rule_id": "6621b23f4a2c5e0012ab34d0" }, "schema": { - "$ref": "#/components/schemas/ChannelScopedListRequest" + "$ref": "#/components/schemas/ChannelRuleIDRequest" } } }, @@ -32708,46 +32511,37 @@ "application/json": { "example": { "data": { - "items": [ + "account_id": 2451002751131, + "aggr_window": 0, + "channel_id": 6193426913131, + "created_at": 1773997289, + "description": "", + "filters": [], + "layers": [ { - "account_id": 2451002751131, - "channel_id": 5967964835131, - "created_at": 1773979184, - "description": "", - "equals": [ - "data_source_id", - "labels._account_id" - ], - "is_directly_discard": false, - "rule_id": "69bcc630b9e63df36603e425", - "rule_name": "Suppress downstream alerts", - "source_filters": [ - [ - { - "key": "severity", - "oper": "IN", - "vals": [ - "Info" - ] - } - ] - ], - "status": "enabled", - "target_filters": [ - [ - { - "key": "severity", - "oper": "IN", - "vals": [ - "Info" - ] - } - ] - ], - "updated_at": 1773979184, - "updated_by": 3790925372131 + "escalate_window": 30, + "force_escalate": false, + "max_times": 1, + "notify_step": 10, + "target": { + "by": { + "follow_preference": true + }, + "person_ids": [ + 3790925372131 + ], + "webhooks": null + } } - ] + ], + "priority": 0, + "rule_id": "69bd0ce95a238693176c1d66", + "rule_name": "Default", + "status": "enabled", + "template_id": "6321aad26c12104586a88916", + "time_filters": [], + "updated_at": 1773997289, + "updated_by": 3790925372131 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -32759,7 +32553,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ListInhibitRulesResponse" + "$ref": "#/components/schemas/EscalateRuleItem" } }, "type": "object" @@ -32783,36 +32577,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List inhibit rules", + "summary": "Get escalation rule detail", "tags": [ "On-call/Channels" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-list", + "href": "/en/api-reference/on-call/channels/channel-escalate-rule-info", "metadata": { - "sidebarTitle": "List inhibit rules" + "sidebarTitle": "Get escalation rule detail" } } } }, - "/channel/inhibit/rule/update": { + "/channel/escalate/rule/list": { "post": { - "description": "Update an existing inhibit rule configuration.", - "operationId": "channelInhibitRuleUpdate", + "description": "List all escalation rules for a channel.", + "operationId": "channelEscalateRuleList", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 1001, - "equals": [ - "labels.cluster" - ], - "rule_id": "6621b23f4a2c5e0012ab34ce", - "rule_name": "Suppress downstream" + "channel_id": 1001 }, "schema": { - "$ref": "#/components/schemas/UpdateInhibitRuleRequest" + "$ref": "#/components/schemas/ChannelScopedListRequest" } } }, @@ -32823,7 +32612,43 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "items": [ + { + "account_id": 2451002751131, + "aggr_window": 0, + "channel_id": 6193426913131, + "created_at": 1773997289, + "description": "", + "filters": [], + "layers": [ + { + "escalate_window": 30, + "force_escalate": false, + "max_times": 1, + "notify_step": 10, + "target": { + "by": { + "follow_preference": true + }, + "person_ids": [ + 3790925372131 + ], + "webhooks": null + } + } + ], + "priority": 0, + "rule_id": "69bd0ce95a238693176c1d66", + "rule_name": "Default", + "status": "enabled", + "template_id": "6321aad26c12104586a88916", + "time_filters": [], + "updated_at": 1773997289, + "updated_by": 3790925372131 + } + ] + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -32834,7 +32659,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/ListEscalationRulesResponse" } }, "type": "object" @@ -32858,55 +32683,62 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update inhibit rule", + "summary": "List escalation rules", "tags": [ "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-escalate-rule-list", "metadata": { - "sidebarTitle": "Update inhibit rule" + "sidebarTitle": "List escalation rules" } } } }, - "/channel/list": { + "/channel/escalate/rule/update": { "post": { - "description": "List channels accessible to the current user with optional filters.", - "operationId": "channelList", + "description": "Update an existing escalation rule configuration.", + "operationId": "channelEscalateRuleUpdate", "requestBody": { "content": { "application/json": { "example": { - "asc": false, - "limit": 20, - "orderby": "created_at", - "p": 1 - }, - "schema": { - "$ref": "#/components/schemas/ListChannelsRequest" - } - } - }, - "required": true - }, - "responses": { + "channel_id": 1001, + "layers": [ + { + "target": { + "by": { + "critical": [ + "voice" + ], + "warning": [ + "sms" + ] + }, + "person_ids": [ + 42 + ] + } + } + ], + "rule_id": "6621b23f4a2c5e0012ab34d0", + "rule_name": "Default escalation", + "template_id": "6621b23f4a2c5e0012ab34d1" + }, + "schema": { + "$ref": "#/components/schemas/UpdateEscalationRuleRequest" + } + } + }, + "required": true + }, + "responses": { "200": { "content": { "application/json": { "example": { - "data": { - "has_next_page": true, - "items": [ - { - "channel_id": 1001, - "channel_name": "Production Alerts", - "status": "enabled" - } - ], - "total": 42 - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -32917,7 +32749,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ListChannelsResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -32941,49 +32773,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List channels", + "summary": "Update escalation rule", "tags": [ "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/channels/channel-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-escalate-rule-update", "metadata": { - "sidebarTitle": "List channels" + "sidebarTitle": "Update escalation rule" } } } }, - "/channel/silence/rule/create": { + "/channel/info": { "post": { - "description": "Create a silence rule to suppress notifications matching specified conditions.", - "operationId": "channelSilenceRuleCreate", + "description": "Retrieve detailed information for a specific channel.", + "operationId": "channelInfo", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 3521074710131, - "description": "Silence all Info alerts during planned maintenance", - "filters": [ - [ - { - "key": "severity", - "oper": "IN", - "vals": [ - "Info" - ] - } - ] - ], - "is_directly_discard": false, - "rule_name": "Maintenance window silence", - "time_filter": { - "end_time": 1773414000, - "start_time": 1773388800 - } + "channel_id": 1001 }, "schema": { - "$ref": "#/components/schemas/CreateSilenceRuleRequest" + "$ref": "#/components/schemas/ChannelInfoRequest" } } }, @@ -32995,8 +32809,10 @@ "application/json": { "example": { "data": { - "rule_id": "69db2f66a0fe7db6448b1503", - "rule_name": "Test silence rule" + "channel_id": 1001, + "channel_name": "Production Alerts", + "status": "enabled", + "team_id": 10 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -33008,7 +32824,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RuleCreateResponse" + "$ref": "#/components/schemas/ChannelItem" } }, "type": "object" @@ -33032,32 +32848,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create silence rule", + "summary": "Get channel detail", "tags": [ "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-silence-rule-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-info", "metadata": { - "sidebarTitle": "Create silence rule" + "sidebarTitle": "Get channel detail" } } } }, - "/channel/silence/rule/delete": { + "/channel/infos": { "post": { - "description": "Delete a silence rule. Only a `disabled` rule can be deleted.", - "operationId": "channelSilenceRuleDelete", + "description": "Retrieve multiple channels by their IDs.", + "operationId": "channelInfos", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 3521074710131, - "rule_id": "6621b23f4a2c5e0012ab34cd" + "channel_ids": [ + 1001, + 1002 + ] }, "schema": { - "$ref": "#/components/schemas/ChannelRuleIDRequest" + "$ref": "#/components/schemas/ChannelInfosRequest" } } }, @@ -33068,7 +32886,15 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "items": [ + { + "channel_id": 1001, + "channel_name": "Production Alerts", + "status": "enabled" + } + ] + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -33079,7 +32905,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/ChannelInfosResponse" } }, "type": "object" @@ -33103,32 +32929,60 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete silence rule", + "summary": "Batch get channels", "tags": [ "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-silence-rule-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-infos", "metadata": { - "sidebarTitle": "Delete silence rule" + "sidebarTitle": "Batch get channels" } } } }, - "/channel/silence/rule/disable": { + "/channel/inhibit/rule/create": { "post": { - "description": "Disable a silence rule without deleting it. Only an `enabled` rule can be disabled.", - "operationId": "channelSilenceRuleDisable", + "description": "Create an inhibit rule to suppress lower-priority alerts when higher-priority ones are firing.", + "operationId": "channelInhibitRuleCreate", "requestBody": { "content": { "application/json": { "example": { "channel_id": 3521074710131, - "rule_id": "6621b23f4a2c5e0012ab34cd" + "description": "When a Critical alert fires, suppress matching Info alerts", + "equals": [ + "labels.cluster", + "labels.service" + ], + "is_directly_discard": false, + "rule_name": "Suppress Info when Critical fires", + "source_filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Critical" + ] + } + ] + ], + "target_filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ] }, "schema": { - "$ref": "#/components/schemas/ChannelRuleIDRequest" + "$ref": "#/components/schemas/CreateInhibitRuleRequest" } } }, @@ -33139,7 +32993,10 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "rule_id": "69db2f69a0fe7db6448b1504", + "rule_name": "Test inhibit rule" + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -33150,7 +33007,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/RuleCreateResponse" } }, "type": "object" @@ -33174,23 +33031,23 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Disable silence rule", + "summary": "Create inhibit rule", "tags": [ "On-call/Channels" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-silence-rule-disable", + "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-create", "metadata": { - "sidebarTitle": "Disable silence rule" + "sidebarTitle": "Create inhibit rule" } } } }, - "/channel/silence/rule/enable": { + "/channel/inhibit/rule/delete": { "post": { - "description": "Enable a disabled silence rule. Only a `disabled` rule can be enabled.", - "operationId": "channelSilenceRuleEnable", + "description": "Delete an inhibit rule. Only a `disabled` rule can be deleted.", + "operationId": "channelInhibitRuleDelete", "requestBody": { "content": { "application/json": { @@ -33245,31 +33102,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Enable silence rule", + "summary": "Delete inhibit rule", "tags": [ "On-call/Channels" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-silence-rule-enable", + "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-delete", "metadata": { - "sidebarTitle": "Enable silence rule" + "sidebarTitle": "Delete inhibit rule" } } } }, - "/channel/silence/rule/list": { + "/channel/inhibit/rule/disable": { "post": { - "description": "List all silence rules configured for a channel.", - "operationId": "channelSilenceRuleList", + "description": "Disable an inhibit rule without deleting it. Only an `enabled` rule can be disabled.", + "operationId": "channelInhibitRuleDisable", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 1001 + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" }, "schema": { - "$ref": "#/components/schemas/ChannelScopedListRequest" + "$ref": "#/components/schemas/ChannelRuleIDRequest" } } }, @@ -33280,40 +33138,7 @@ "content": { "application/json": { "example": { - "data": { - "items": [ - { - "account_id": 2451002751131, - "channel_id": 5967964835131, - "created_at": 1773388838, - "description": "", - "filters": [ - [ - { - "key": "severity", - "oper": "IN", - "vals": [ - "Info" - ] - } - ] - ], - "from_incident_id": "000000000000000000000000", - "is_directly_discard": true, - "is_effective": false, - "rule_id": "69b3c426b4a6f5abf1f54873", - "rule_name": "Silence Info alerts", - "status": "enabled", - "time_filter": { - "end_time": 1773414000, - "start_time": 1773388800 - }, - "time_filters": [], - "updated_at": 1773388838, - "updated_by": 3790925372131 - } - ] - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -33324,7 +33149,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ListSilenceRulesResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -33348,48 +33173,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List silence rules", + "summary": "Disable inhibit rule", "tags": [ "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-silence-rule-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-disable", "metadata": { - "sidebarTitle": "List silence rules" + "sidebarTitle": "Disable inhibit rule" } } } }, - "/channel/silence/rule/update": { + "/channel/inhibit/rule/enable": { "post": { - "description": "Update an existing silence rule configuration.", - "operationId": "channelSilenceRuleUpdate", + "description": "Enable a disabled inhibit rule. Only a `disabled` rule can be enabled.", + "operationId": "channelInhibitRuleEnable", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 1001, - "filters": [ - [ - { - "key": "labels.service", - "oper": "IN", - "vals": [ - "billing" - ] - } - ] - ], - "rule_id": "6621b23f4a2c5e0012ab34cd", - "rule_name": "Mute during maintenance", - "time_filter": { - "end_time": 1710086400, - "start_time": 1710000000 - } + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" }, "schema": { - "$ref": "#/components/schemas/UpdateSilenceRuleRequest" + "$ref": "#/components/schemas/ChannelRuleIDRequest" } } }, @@ -33435,45 +33244,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update silence rule", + "summary": "Enable inhibit rule", "tags": [ "On-call/Channels" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-silence-rule-update", + "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-enable", "metadata": { - "sidebarTitle": "Update silence rule" + "sidebarTitle": "Enable inhibit rule" } } } }, - "/channel/unsubscribe/rule/create": { + "/channel/inhibit/rule/list": { "post": { - "description": "Create a drop rule to filter out unwanted alerts before they become incidents.", - "operationId": "channelUnsubscribeRuleCreate", + "description": "List all inhibit rules configured for a channel.", + "operationId": "channelInhibitRuleList", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 3521074710131, - "description": "Discard all alerts from the test environment before they create incidents", - "filters": [ - [ - { - "key": "labels.env", - "oper": "IN", - "vals": [ - "test", - "dev" - ] - } - ] - ], - "rule_name": "Drop test environment alerts" + "channel_id": 1001 }, "schema": { - "$ref": "#/components/schemas/CreateDropRuleRequest" + "$ref": "#/components/schemas/ChannelScopedListRequest" } } }, @@ -33485,8 +33280,46 @@ "application/json": { "example": { "data": { - "rule_id": "69db2f6ba0fe7db6448b1505", - "rule_name": "Test drop rule" + "items": [ + { + "account_id": 2451002751131, + "channel_id": 5967964835131, + "created_at": 1773979184, + "description": "", + "equals": [ + "data_source_id", + "labels._account_id" + ], + "is_directly_discard": false, + "rule_id": "69bcc630b9e63df36603e425", + "rule_name": "Suppress downstream alerts", + "source_filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "status": "enabled", + "target_filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "updated_at": 1773979184, + "updated_by": 3790925372131 + } + ] }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -33498,7 +33331,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RuleCreateResponse" + "$ref": "#/components/schemas/ListInhibitRulesResponse" } }, "type": "object" @@ -33522,32 +33355,36 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create drop rule", + "summary": "List inhibit rules", "tags": [ "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-list", "metadata": { - "sidebarTitle": "Create drop rule" + "sidebarTitle": "List inhibit rules" } } } }, - "/channel/unsubscribe/rule/delete": { + "/channel/inhibit/rule/update": { "post": { - "description": "Delete a drop rule. Only a `disabled` rule can be deleted.", - "operationId": "channelUnsubscribeRuleDelete", + "description": "Update an existing inhibit rule configuration.", + "operationId": "channelInhibitRuleUpdate", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 3521074710131, - "rule_id": "6621b23f4a2c5e0012ab34cd" + "channel_id": 1001, + "equals": [ + "labels.cluster" + ], + "rule_id": "6621b23f4a2c5e0012ab34ce", + "rule_name": "Suppress downstream" }, "schema": { - "$ref": "#/components/schemas/ChannelRuleIDRequest" + "$ref": "#/components/schemas/UpdateInhibitRuleRequest" } } }, @@ -33593,32 +33430,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete drop rule", + "summary": "Update inhibit rule", "tags": [ "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-update", "metadata": { - "sidebarTitle": "Delete drop rule" + "sidebarTitle": "Update inhibit rule" } } } }, - "/channel/unsubscribe/rule/disable": { + "/channel/list": { "post": { - "description": "Disable a drop rule without deleting it. Only an `enabled` rule can be disabled.", - "operationId": "channelUnsubscribeRuleDisable", + "description": "List channels accessible to the current user with optional filters.", + "operationId": "channelList", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 3521074710131, - "rule_id": "6621b23f4a2c5e0012ab34cd" + "asc": false, + "limit": 20, + "orderby": "created_at", + "p": 1 }, "schema": { - "$ref": "#/components/schemas/ChannelRuleIDRequest" + "$ref": "#/components/schemas/ListChannelsRequest" } } }, @@ -33629,7 +33468,17 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "has_next_page": true, + "items": [ + { + "channel_id": 1001, + "channel_name": "Production Alerts", + "status": "enabled" + } + ], + "total": 42 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -33640,7 +33489,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/ListChannelsResponse" } }, "type": "object" @@ -33664,32 +33513,49 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Disable drop rule", + "summary": "List channels", "tags": [ "On-call/Channels" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-disable", + "href": "/en/api-reference/on-call/channels/channel-list", "metadata": { - "sidebarTitle": "Disable drop rule" + "sidebarTitle": "List channels" } } } }, - "/channel/unsubscribe/rule/enable": { + "/channel/silence/rule/create": { "post": { - "description": "Enable a disabled drop rule. Only a `disabled` rule can be enabled.", - "operationId": "channelUnsubscribeRuleEnable", + "description": "Create a silence rule to suppress notifications matching specified conditions.", + "operationId": "channelSilenceRuleCreate", "requestBody": { "content": { "application/json": { "example": { "channel_id": 3521074710131, - "rule_id": "6621b23f4a2c5e0012ab34cd" + "description": "Silence all Info alerts during planned maintenance", + "filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "is_directly_discard": false, + "rule_name": "Maintenance window silence", + "time_filter": { + "end_time": 1773414000, + "start_time": 1773388800 + } }, "schema": { - "$ref": "#/components/schemas/ChannelRuleIDRequest" + "$ref": "#/components/schemas/CreateSilenceRuleRequest" } } }, @@ -33700,7 +33566,10 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "rule_id": "69db2f66a0fe7db6448b1503", + "rule_name": "Test silence rule" + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -33711,7 +33580,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/RuleCreateResponse" } }, "type": "object" @@ -33735,31 +33604,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Enable drop rule", + "summary": "Create silence rule", "tags": [ "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-enable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-silence-rule-create", "metadata": { - "sidebarTitle": "Enable drop rule" + "sidebarTitle": "Create silence rule" } } } }, - "/channel/unsubscribe/rule/list": { + "/channel/silence/rule/delete": { "post": { - "description": "List drop rules for a channel.", - "operationId": "channelUnsubscribeRuleList", + "description": "Delete a silence rule. Only a `disabled` rule can be deleted.", + "operationId": "channelSilenceRuleDelete", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 1001 + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" }, "schema": { - "$ref": "#/components/schemas/ChannelScopedListRequest" + "$ref": "#/components/schemas/ChannelRuleIDRequest" } } }, @@ -33770,32 +33640,7 @@ "content": { "application/json": { "example": { - "data": { - "items": [ - { - "account_id": 2451002751131, - "channel_id": 5967964835131, - "created_at": 1773978928, - "description": "", - "filters": [ - [ - { - "key": "data_source_id", - "oper": "IN", - "vals": [ - "6113996590131" - ] - } - ] - ], - "rule_id": "69bcc530b9e63df36603e421", - "rule_name": "Drop test alerts", - "status": "enabled", - "updated_at": 1773978928, - "updated_by": 3790925372131 - } - ] - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -33806,7 +33651,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ListDropRulesResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -33830,44 +33675,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List drop rules", + "summary": "Delete silence rule", "tags": [ "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-silence-rule-delete", "metadata": { - "sidebarTitle": "List drop rules" + "sidebarTitle": "Delete silence rule" } } } }, - "/channel/unsubscribe/rule/update": { + "/channel/silence/rule/disable": { "post": { - "description": "Update an existing drop rule configuration.", - "operationId": "channelUnsubscribeRuleUpdate", - "requestBody": { + "description": "Disable a silence rule without deleting it. Only an `enabled` rule can be disabled.", + "operationId": "channelSilenceRuleDisable", + "requestBody": { "content": { "application/json": { "example": { - "channel_id": 1001, - "filters": [ - [ - { - "key": "labels.env", - "oper": "IN", - "vals": [ - "test" - ] - } - ] - ], - "rule_id": "6621b23f4a2c5e0012ab34cf", - "rule_name": "Drop test alerts" + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" }, "schema": { - "$ref": "#/components/schemas/UpdateDropRuleRequest" + "$ref": "#/components/schemas/ChannelRuleIDRequest" } } }, @@ -33913,33 +33746,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update drop rule", + "summary": "Disable silence rule", "tags": [ "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-silence-rule-disable", "metadata": { - "sidebarTitle": "Update drop rule" + "sidebarTitle": "Disable silence rule" } } } }, - "/channel/update": { + "/channel/silence/rule/enable": { "post": { - "description": "Update an existing channel's configuration and settings.", - "operationId": "channelUpdate", + "description": "Enable a disabled silence rule. Only a `disabled` rule can be enabled.", + "operationId": "channelSilenceRuleEnable", "requestBody": { "content": { "application/json": { "example": { - "channel_id": 1001, - "channel_name": "Production Alerts (v2)", - "description": "Updated description" + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" }, "schema": { - "$ref": "#/components/schemas/UpdateChannelRequest" + "$ref": "#/components/schemas/ChannelRuleIDRequest" } } }, @@ -33950,9 +33782,7 @@ "content": { "application/json": { "example": { - "data": { - "external_report_token": "" - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -33963,7 +33793,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UpdateChannelResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -33987,31 +33817,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update channel", + "summary": "Enable silence rule", "tags": [ "On-call/Channels" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/channel-update", + "href": "/en/api-reference/on-call/channels/channel-silence-rule-enable", "metadata": { - "sidebarTitle": "Update channel" + "sidebarTitle": "Enable silence rule" } } } }, - "/datasource/im/person/try-link": { + "/channel/silence/rule/list": { "post": { - "description": "Try to automatically link unbound members to their IM accounts for one integration.", - "operationId": "datasourceImPersonTryLink", + "description": "List all silence rules configured for a channel.", + "operationId": "channelSilenceRuleList", "requestBody": { "content": { "application/json": { "example": { - "integration_id": 6113996590131 + "channel_id": 1001 }, "schema": { - "$ref": "#/components/schemas/TryLinkPersonRequest" + "$ref": "#/components/schemas/ChannelScopedListRequest" } } }, @@ -34023,8 +33853,37 @@ "application/json": { "example": { "data": { - "new_linked_person_ids": [ - 5348648172131 + "items": [ + { + "account_id": 2451002751131, + "channel_id": 5967964835131, + "created_at": 1773388838, + "description": "", + "filters": [ + [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Info" + ] + } + ] + ], + "from_incident_id": "000000000000000000000000", + "is_directly_discard": true, + "is_effective": false, + "rule_id": "69b3c426b4a6f5abf1f54873", + "rule_name": "Silence Info alerts", + "status": "enabled", + "time_filter": { + "end_time": 1773414000, + "start_time": 1773388800 + }, + "time_filters": [], + "updated_at": 1773388838, + "updated_by": 3790925372131 + } ] }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" @@ -34037,7 +33896,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/TryLinkPersonResponse" + "$ref": "#/components/schemas/ListSilenceRulesResponse" } }, "type": "object" @@ -34061,29 +33920,48 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Attempt IM person linking", + "summary": "List silence rules", "tags": [ - "On-call/Integrations" + "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- The server uses member email and phone values to find matching users in DingTalk, Feishu, or WeCom.\n- When no member can be linked, the response either carries an empty `new_linked_person_ids` array or omits the `data` field entirely.", - "href": "/en/api-reference/on-call/integrations/datasource-im-person-try-link", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-silence-rule-list", "metadata": { - "sidebarTitle": "Attempt IM person linking" + "sidebarTitle": "List silence rules" } } } }, - "/datasource/im/war-room-enabled/list": { + "/channel/silence/rule/update": { "post": { - "description": "List IM integrations that have the war-room feature enabled for the account.", - "operationId": "im-war-room-enabled-list", + "description": "Update an existing silence rule configuration.", + "operationId": "channelSilenceRuleUpdate", "requestBody": { "content": { "application/json": { - "example": {}, + "example": { + "channel_id": 1001, + "filters": [ + [ + { + "key": "labels.service", + "oper": "IN", + "vals": [ + "billing" + ] + } + ] + ], + "rule_id": "6621b23f4a2c5e0012ab34cd", + "rule_name": "Mute during maintenance", + "time_filter": { + "end_time": 1710086400, + "start_time": 1710000000 + } + }, "schema": { - "type": "object" + "$ref": "#/components/schemas/UpdateSilenceRuleRequest" } } }, @@ -34094,35 +33972,7 @@ "content": { "application/json": { "example": { - "data": { - "items": [ - { - "account_id": 10001, - "category": "im", - "created_at": 1716962400, - "creator_id": 20001, - "data_source_id": 362, - "description": "Feishu war-room integration", - "exclusive_data_source_id": 0, - "integration_id": 362, - "integration_key": "ik_8f3a2b1c9d0e", - "last_time": 0, - "name": "Feishu Ops", - "no_editable": false, - "plugin_id": 101, - "plugin_type": "feishu", - "plugin_type_name": "Feishu", - "ref_id": "", - "settings": { - "war_room_enabled": true - }, - "status": "enabled", - "team_id": 0, - "updated_at": 1716962700, - "updated_by": 20001 - } - ] - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -34133,7 +33983,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ListWarRoomEnabledResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -34157,31 +34007,45 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List war-room-enabled IM integrations", + "summary": "Update silence rule", "tags": [ - "On-call/IM integrations" + "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n", - "href": "/en/api-reference/on-call/integrations/im-war-room-enabled-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-silence-rule-update", "metadata": { - "sidebarTitle": "List war-room-enabled IM integrations" + "sidebarTitle": "Update silence rule" } } } }, - "/enrichment/info": { + "/channel/unsubscribe/rule/create": { "post": { - "description": "Return the enrichment rule set configured for a specific integration.", - "operationId": "enrichment-read-info", + "description": "Create a drop rule to filter out unwanted alerts before they become incidents.", + "operationId": "channelUnsubscribeRuleCreate", "requestBody": { "content": { "application/json": { "example": { - "integration_id": 5001 + "channel_id": 3521074710131, + "description": "Discard all alerts from the test environment before they create incidents", + "filters": [ + [ + { + "key": "labels.env", + "oper": "IN", + "vals": [ + "test", + "dev" + ] + } + ] + ], + "rule_name": "Drop test environment alerts" }, "schema": { - "$ref": "#/components/schemas/EnrichmentInfoRequest" + "$ref": "#/components/schemas/CreateDropRuleRequest" } } }, @@ -34193,23 +34057,8 @@ "application/json": { "example": { "data": { - "created_at": 1710000000, - "creator_id": 80011, - "integration_id": 5001, - "rules": [ - { - "kind": "extraction", - "settings": { - "override": true, - "pattern": "^(prod|staging|dev).*$", - "result_label": "environment", - "source_field": "labels.env" - } - } - ], - "status": "enabled", - "updated_at": 1710000000, - "updated_by": 80011 + "rule_id": "69db2f6ba0fe7db6448b1505", + "rule_name": "Test drop rule" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -34221,7 +34070,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EnrichmentItem" + "$ref": "#/components/schemas/RuleCreateResponse" } }, "type": "object" @@ -34245,34 +34094,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get enrichment rules", + "summary": "Create drop rule", "tags": [ - "On-call/Alert enrichment" + "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) or **Channels Manage** (`on-call`) or **Integrations Read** (`on-call`) or **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Returns `null` if no enrichment rules have been configured for the integration.", - "href": "/en/api-reference/on-call/alert-enrichment/enrichment-read-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-create", "metadata": { - "sidebarTitle": "Get enrichment rules" + "sidebarTitle": "Create drop rule" } } } }, - "/enrichment/list": { + "/channel/unsubscribe/rule/delete": { "post": { - "description": "Return the enrichment rule sets for a list of integration IDs.", - "operationId": "enrichment-read-list", + "description": "Delete a drop rule. Only a `disabled` rule can be deleted.", + "operationId": "channelUnsubscribeRuleDelete", "requestBody": { "content": { "application/json": { "example": { - "integration_ids": [ - 5001, - 5002 - ] + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" }, "schema": { - "$ref": "#/components/schemas/EnrichmentListRequest" + "$ref": "#/components/schemas/ChannelRuleIDRequest" } } }, @@ -34283,19 +34130,7 @@ "content": { "application/json": { "example": { - "data": { - "items": [ - { - "created_at": 1710000000, - "creator_id": 80011, - "integration_id": 5001, - "rules": [], - "status": "enabled", - "updated_at": 1710000000, - "updated_by": 80011 - } - ] - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -34306,7 +34141,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EnrichmentListResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -34330,39 +34165,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List enrichment rules", + "summary": "Delete drop rule", "tags": [ - "On-call/Alert enrichment" + "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) or **Integrations Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/alert-enrichment/enrichment-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-delete", "metadata": { - "sidebarTitle": "List enrichment rules" + "sidebarTitle": "Delete drop rule" } } } }, - "/enrichment/mapping/api/create": { + "/channel/unsubscribe/rule/disable": { "post": { - "description": "Create a new external HTTP API endpoint used to enrich alerts via HTTP lookup.", - "operationId": "mapping-api-write-create", + "description": "Disable a drop rule without deleting it. Only an `enabled` rule can be disabled.", + "operationId": "channelUnsubscribeRuleDisable", "requestBody": { "content": { "application/json": { "example": { - "api_name": "CMDB API", - "description": "Query CMDB for host metadata", - "headers": { - "X-Token": "mytoken" - }, - "insecure_skip_verify": false, - "retry_count": 1, - "timeout": 2, - "url": "https://cmdb.example.com/api/lookup" + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" }, "schema": { - "$ref": "#/components/schemas/MappingAPICreateRequest" + "$ref": "#/components/schemas/ChannelRuleIDRequest" } } }, @@ -34373,10 +34201,7 @@ "content": { "application/json": { "example": { - "data": { - "api_id": "665f1a2b3c4d5e6f7a8b9c02", - "api_name": "CMDB API" - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -34387,7 +34212,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/MappingAPICreateResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -34411,31 +34236,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create mapping API", + "summary": "Disable drop rule", "tags": [ - "On-call/Alert enrichment" + "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- `url` must start with `http://` or `https://` and cannot resolve to an internal IP (in SaaS mode).\n- `timeout` is the HTTP read timeout in seconds (1–3, default 2).\n- `retry_count` is the number of retries on failure (0–1, default 0).\n- Headers with security-sensitive names (e.g. `authorization`, `cookie`) are rejected in SaaS mode.\n- An account can have at most 50 mapping APIs.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-write-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-disable", "metadata": { - "sidebarTitle": "Create mapping API" + "sidebarTitle": "Disable drop rule" } } } }, - "/enrichment/mapping/api/delete": { + "/channel/unsubscribe/rule/enable": { "post": { - "description": "Delete a mapping API. Deletion is blocked if the API is referenced by any enrichment rule.", - "operationId": "mapping-api-write-delete", + "description": "Enable a disabled drop rule. Only a `disabled` rule can be enabled.", + "operationId": "channelUnsubscribeRuleEnable", "requestBody": { "content": { "application/json": { "example": { - "api_id": "665f1a2b3c4d5e6f7a8b9c02" + "channel_id": 3521074710131, + "rule_id": "6621b23f4a2c5e0012ab34cd" }, "schema": { - "$ref": "#/components/schemas/MappingAPIIDRequest" + "$ref": "#/components/schemas/ChannelRuleIDRequest" } } }, @@ -34481,31 +34307,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete mapping API", + "summary": "Enable drop rule", "tags": [ - "On-call/Alert enrichment" + "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- If the API is still referenced, the response returns HTTP 400 with a `refs` list.\n- Only the API creator, account admin, or team member can delete the API.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-write-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-enable", "metadata": { - "sidebarTitle": "Delete mapping API" + "sidebarTitle": "Enable drop rule" } } } }, - "/enrichment/mapping/api/info": { + "/channel/unsubscribe/rule/list": { "post": { - "description": "Return detail of a single mapping API by its ID.", - "operationId": "mapping-api-read-info", + "description": "List drop rules for a channel.", + "operationId": "channelUnsubscribeRuleList", "requestBody": { "content": { "application/json": { "example": { - "api_id": "665f1a2b3c4d5e6f7a8b9c02" + "channel_id": 1001 }, "schema": { - "$ref": "#/components/schemas/MappingAPIIDRequest" + "$ref": "#/components/schemas/ChannelScopedListRequest" } } }, @@ -34517,16 +34343,30 @@ "application/json": { "example": { "data": { - "api_id": "665f1a2b3c4d5e6f7a8b9c02", - "api_name": "CMDB API", - "created_at": 1710000000, - "creator_id": 80011, - "insecure_skip_verify": false, - "retry_count": 1, - "status": "enabled", - "timeout": 2, - "updated_at": 1710000000, - "url": "https://cmdb.example.com/api/lookup" + "items": [ + { + "account_id": 2451002751131, + "channel_id": 5967964835131, + "created_at": 1773978928, + "description": "", + "filters": [ + [ + { + "key": "data_source_id", + "oper": "IN", + "vals": [ + "6113996590131" + ] + } + ] + ], + "rule_id": "69bcc530b9e63df36603e421", + "rule_name": "Drop test alerts", + "status": "enabled", + "updated_at": 1773978928, + "updated_by": 3790925372131 + } + ] }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -34538,7 +34378,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/MappingAPIItem" + "$ref": "#/components/schemas/ListDropRulesResponse" } }, "type": "object" @@ -34562,29 +34402,44 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get mapping API detail", + "summary": "List drop rules", "tags": [ - "On-call/Alert enrichment" + "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `null` if the API does not exist.", - "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-read-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-list", "metadata": { - "sidebarTitle": "Get mapping API detail" + "sidebarTitle": "List drop rules" } } } }, - "/enrichment/mapping/api/list": { + "/channel/unsubscribe/rule/update": { "post": { - "description": "Return all mapping APIs configured for the account.", - "operationId": "mapping-api-read-list", + "description": "Update an existing drop rule configuration.", + "operationId": "channelUnsubscribeRuleUpdate", "requestBody": { "content": { "application/json": { - "example": {}, + "example": { + "channel_id": 1001, + "filters": [ + [ + { + "key": "labels.env", + "oper": "IN", + "vals": [ + "test" + ] + } + ] + ], + "rule_id": "6621b23f4a2c5e0012ab34cf", + "rule_name": "Drop test alerts" + }, "schema": { - "$ref": "#/components/schemas/EmptyRequest" + "$ref": "#/components/schemas/UpdateDropRuleRequest" } } }, @@ -34595,28 +34450,7 @@ "content": { "application/json": { "example": { - "data": { - "items": [ - { - "api_id": "665f1a2b3c4d5e6f7a8b9c02", - "api_name": "CMDB API", - "created_at": 1710000000, - "creator_id": 80011, - "description": "Query CMDB for host metadata", - "headers": { - "Authorization": "Bearer eyJhbGciOiJIUzI1NiJ9.example-token" - }, - "insecure_skip_verify": false, - "retry_count": 1, - "status": "enabled", - "team_id": 0, - "timeout": 2, - "updated_at": 1710000000, - "url": "https://cmdb.example.com/api/lookup" - } - ], - "total": 1 - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -34627,7 +34461,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/MappingAPIListResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -34651,33 +34485,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List mapping APIs", + "summary": "Update drop rule", "tags": [ - "On-call/Alert enrichment" + "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Read** (`on-call`) or **Mappings Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-update", "metadata": { - "sidebarTitle": "List mapping APIs" + "sidebarTitle": "Update drop rule" } } } }, - "/enrichment/mapping/api/update": { + "/channel/update": { "post": { - "description": "Update configuration of an existing mapping API.", - "operationId": "mapping-api-write-update", + "description": "Update an existing channel's configuration and settings.", + "operationId": "channelUpdate", "requestBody": { "content": { "application/json": { "example": { - "api_id": "665f1a2b3c4d5e6f7a8b9c02", - "retry_count": 1, - "timeout": 3 + "channel_id": 1001, + "channel_name": "Production Alerts (v2)", + "description": "Updated description" }, "schema": { - "$ref": "#/components/schemas/MappingAPIUpdateRequest" + "$ref": "#/components/schemas/UpdateChannelRequest" } } }, @@ -34688,7 +34522,9 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "external_report_token": "" + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -34699,7 +34535,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/UpdateChannelResponse" } }, "type": "object" @@ -34723,35 +34559,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update mapping API", + "summary": "Update channel", "tags": [ - "On-call/Alert enrichment" + "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- Only the API creator, account admin, or team member can update the API.\n- All updatable fields are optional — only provided fields are changed.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-write-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/channel-update", "metadata": { - "sidebarTitle": "Update mapping API" + "sidebarTitle": "Update channel" } } } }, - "/enrichment/mapping/data/delete": { + "/datasource/im/person/try-link": { "post": { - "description": "Delete up to 100 mapping data rows by their keys.", - "operationId": "mapping-data-write-delete", + "description": "Try to automatically link unbound members to their IM accounts for one integration.", + "operationId": "datasourceImPersonTryLink", "requestBody": { "content": { "application/json": { "example": { - "keys": [ - "server01", - "server02" - ], - "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + "integration_id": 6113996590131 }, "schema": { - "$ref": "#/components/schemas/MappingDataDeleteRequest" + "$ref": "#/components/schemas/TryLinkPersonRequest" } } }, @@ -34762,7 +34594,11 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "new_linked_person_ids": [ + 5348648172131 + ] + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -34773,7 +34609,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/TryLinkPersonResponse" } }, "type": "object" @@ -34797,31 +34633,29 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete mapping data rows", + "summary": "Attempt IM person linking", "tags": [ - "On-call/Alert enrichment" + "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 | **Mappings Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-write-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- The server uses member email and phone values to find matching users in DingTalk, Feishu, or WeCom.\n- When no member can be linked, the response either carries an empty `new_linked_person_ids` array or omits the `data` field entirely.", + "href": "/en/api-reference/on-call/integrations/datasource-im-person-try-link", "metadata": { - "sidebarTitle": "Delete mapping data rows" + "sidebarTitle": "Attempt IM person linking" } } } }, - "/enrichment/mapping/data/download": { + "/datasource/im/war-room-enabled/list": { "post": { - "description": "Export all data rows of a mapping schema as a CSV file download.", - "operationId": "mapping-data-read-download", + "description": "List IM integrations that have the war-room feature enabled for the account.", + "operationId": "im-war-room-enabled-list", "requestBody": { "content": { "application/json": { - "example": { - "schema_id": "665f1a2b3c4d5e6f7a8b9c01" - }, + "example": {}, "schema": { - "$ref": "#/components/schemas/MappingSchemaIDRequest" + "type": "object" } } }, @@ -34830,16 +34664,57 @@ "responses": { "200": { "content": { - "application/octet-stream": { - "example": "host,owner,team\nserver01,alice,sre\nserver02,bob,backend\n", + "application/json": { + "example": { + "data": { + "items": [ + { + "account_id": 10001, + "category": "im", + "created_at": 1716962400, + "creator_id": 20001, + "data_source_id": 362, + "description": "Feishu war-room integration", + "exclusive_data_source_id": 0, + "integration_id": 362, + "integration_key": "ik_8f3a2b1c9d0e", + "last_time": 0, + "name": "Feishu Ops", + "no_editable": false, + "plugin_id": 101, + "plugin_type": "feishu", + "plugin_type_name": "Feishu", + "ref_id": "", + "settings": { + "war_room_enabled": true + }, + "status": "enabled", + "team_id": 0, + "updated_at": 1716962700, + "updated_by": 20001 + } + ] + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, "schema": { - "description": "CSV file stream (`Content-Type: application/octet-stream`, `Content-Disposition: attachment; filename=.csv`). The header row lists the schema's source_labels followed by result_labels in order; each subsequent row is one mapping document.", - "format": "binary", - "type": "string" + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/ListWarRoomEnabledResponse" + } + }, + "type": "object" + } + ] } } }, - "description": "Success. CSV attachment stream, not a JSON envelope." + "description": "Success" }, "400": { "$ref": "#/components/responses/BadRequest" @@ -34854,35 +34729,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Download mapping data as CSV", + "summary": "List war-room-enabled IM integrations", "tags": [ - "On-call/Alert enrichment" + "On-call/IM 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`) or **Integrations Manage** (`on-call`) or **Mappings Read** (`on-call`) or **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- The response is a CSV file with `Content-Disposition: attachment` header.\n- The CSV header row matches the schema's source and result labels in order.", - "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-read-download", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n", + "href": "/en/api-reference/on-call/integrations/im-war-room-enabled-list", "metadata": { - "sidebarTitle": "Download mapping data as CSV" + "sidebarTitle": "List war-room-enabled IM integrations" } } } }, - "/enrichment/mapping/data/list": { + "/enrichment/info": { "post": { - "description": "Return paginated mapping data rows for a schema, with optional exact-match filtering on source label values.", - "operationId": "mapping-data-read-list", + "description": "Return the enrichment rule set configured for a specific integration.", + "operationId": "enrichment-read-info", "requestBody": { "content": { "application/json": { "example": { - "asc": false, - "limit": 20, - "orderby": "updated_at", - "p": 1, - "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + "integration_id": 5001 }, "schema": { - "$ref": "#/components/schemas/MappingDataListRequest" + "$ref": "#/components/schemas/EnrichmentInfoRequest" } } }, @@ -34894,21 +34765,23 @@ "application/json": { "example": { "data": { - "has_next_page": false, - "items": [ + "created_at": 1710000000, + "creator_id": 80011, + "integration_id": 5001, + "rules": [ { - "created_at": 1710000000, - "fields": { - "host": "server01", - "owner": "alice", - "service": "api", - "team": "sre" - }, - "key": "server01", - "updated_at": 1710000000 + "kind": "extraction", + "settings": { + "override": true, + "pattern": "^(prod|staging|dev).*$", + "result_label": "environment", + "source_field": "labels.env" + } } ], - "total": 1 + "status": "enabled", + "updated_at": 1710000000, + "updated_by": 80011 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -34920,7 +34793,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/MappingDataListResponse" + "$ref": "#/components/schemas/EnrichmentItem" } }, "type": "object" @@ -34944,31 +34817,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List mapping data", + "summary": "Get enrichment rules", "tags": [ "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) or **Integrations Manage** (`on-call`) or **Mappings Read** (`on-call`) or **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- If `query` is provided, all source labels must be specified — partial source label queries are rejected.\n- Pagination uses cursor-based (`search_after_ctx`) or page-based (`p`, `limit`) navigation. `limit` defaults to 20, max 100.\n- The `search_after_ctx` token from a response can be passed back to retrieve the next page.", - "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) or **Channels Manage** (`on-call`) or **Integrations Read** (`on-call`) or **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Returns `null` if no enrichment rules have been configured for the integration.", + "href": "/en/api-reference/on-call/alert-enrichment/enrichment-read-info", "metadata": { - "sidebarTitle": "List mapping data" + "sidebarTitle": "Get enrichment rules" } } } }, - "/enrichment/mapping/data/truncate": { + "/enrichment/list": { "post": { - "description": "Delete all data rows in a mapping schema.", - "operationId": "mapping-data-write-truncate", + "description": "Return the enrichment rule sets for a list of integration IDs.", + "operationId": "enrichment-read-list", "requestBody": { "content": { "application/json": { "example": { - "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + "integration_ids": [ + 5001, + 5002 + ] }, "schema": { - "$ref": "#/components/schemas/MappingSchemaIDRequest" + "$ref": "#/components/schemas/EnrichmentListRequest" } } }, @@ -34979,7 +34855,19 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "items": [ + { + "created_at": 1710000000, + "creator_id": 80011, + "integration_id": 5001, + "rules": [], + "status": "enabled", + "updated_at": 1710000000, + "updated_by": 80011 + } + ] + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -34990,7 +34878,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/EnrichmentListResponse" } }, "type": "object" @@ -35014,63 +34902,39 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Truncate mapping data", + "summary": "List enrichment rules", "tags": [ "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- This is an irreversible bulk-delete operation.\n- High-risk operation. Console JWT callers must pass a second-factor code; `app_key` callers bypass the MFA prompt but remain audited — treat the key as a secret.", - "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-write-truncate", + "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`) or **Integrations Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/alert-enrichment/enrichment-read-list", "metadata": { - "sidebarTitle": "Truncate mapping data" + "sidebarTitle": "List enrichment rules" } } } }, - "/enrichment/mapping/data/upload": { + "/enrichment/mapping/api/create": { "post": { - "description": "Upload a CSV file to bulk-load mapping data. By default the existing data is truncated before loading the new rows.", - "operationId": "mapping-data-write-upload", - "parameters": [ - { - "description": "ID of the target mapping schema (ObjectID hex).", - "example": "665f1a2b3c4d5e6f7a8b9c01", - "in": "query", - "name": "schema_id", - "required": true, - "schema": { - "pattern": "^[0-9a-fA-F]{24}$", - "type": "string" - } - }, - { - "description": "Pass `TRUE` (case-insensitive) to append instead of replacing. When omitted and the schema already has data, the server truncates existing rows before importing.", - "in": "query", - "name": "do_not_truncate_first", - "required": false, - "schema": { - "enum": [ - "TRUE" - ], - "type": "string" - } - } - ], + "description": "Create a new external HTTP API endpoint used to enrich alerts via HTTP lookup.", + "operationId": "mapping-api-write-create", "requestBody": { "content": { - "multipart/form-data": { - "schema": { - "properties": { - "file": { - "description": "CSV file, max 100 MB. The header row must include all of the schema's source/result label names.", - "format": "binary", - "type": "string" - } + "application/json": { + "example": { + "api_name": "CMDB API", + "description": "Query CMDB for host metadata", + "headers": { + "X-Token": "mytoken" }, - "required": [ - "file" - ], - "type": "object" + "insecure_skip_verify": false, + "retry_count": 1, + "timeout": 2, + "url": "https://cmdb.example.com/api/lookup" + }, + "schema": { + "$ref": "#/components/schemas/MappingAPICreateRequest" } } }, @@ -35081,7 +34945,10 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "api_id": "665f1a2b3c4d5e6f7a8b9c02", + "api_name": "CMDB API" + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -35092,7 +34959,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/MappingAPICreateResponse" } }, "type": "object" @@ -35116,45 +34983,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Upload mapping data via CSV", + "summary": "Create mapping API", "tags": [ "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **20 requests/minute**; **2 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- The request must use `Content-Type: multipart/form-data`. The file field name is `file` and `schema_id` is a query parameter.\n- CSV header row must include all source and result label names.\n- Maximum file size: 100 MB.\n- By default the schema's existing data is truncated before import. Pass query param `do_not_truncate_first=TRUE` to append instead.\n- Duplicate source label value combinations in the CSV cause a 400 error.", - "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-write-upload", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- `url` must start with `http://` or `https://` and cannot resolve to an internal IP (in SaaS mode).\n- `timeout` is the HTTP read timeout in seconds (1–3, default 2).\n- `retry_count` is the number of retries on failure (0–1, default 0).\n- Headers with security-sensitive names (e.g. `authorization`, `cookie`) are rejected in SaaS mode.\n- An account can have at most 50 mapping APIs.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-write-create", "metadata": { - "sidebarTitle": "Upload mapping data via CSV" + "sidebarTitle": "Create mapping API" } } } }, - "/enrichment/mapping/data/upsert": { + "/enrichment/mapping/api/delete": { "post": { - "description": "Insert or update up to 1000 data rows in a mapping schema. Each row must contain all source and result labels.", - "operationId": "mapping-data-write-upsert", + "description": "Delete a mapping API. Deletion is blocked if the API is referenced by any enrichment rule.", + "operationId": "mapping-api-write-delete", "requestBody": { "content": { "application/json": { "example": { - "docs": [ - { - "host": "server01", - "owner": "alice", - "service": "api", - "team": "sre" - }, - { - "host": "server02", - "owner": "bob", - "service": "gateway", - "team": "platform" - } - ], - "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + "api_id": "665f1a2b3c4d5e6f7a8b9c02" }, "schema": { - "$ref": "#/components/schemas/MappingDataUpsertRequest" + "$ref": "#/components/schemas/MappingAPIIDRequest" } } }, @@ -35165,12 +35018,7 @@ "content": { "application/json": { "example": { - "data": { - "keys": [ - "server01", - "server02" - ] - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -35181,7 +35029,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/MappingDataUpsertResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -35205,40 +35053,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Upsert mapping data rows", + "summary": "Delete mapping API", "tags": [ "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- Each doc must contain values for all labels defined in `source_labels` and `result_labels`.\n- Values for unknown labels are silently dropped.\n- Each value must be at most 2048 characters.\n- Upsert is keyed on the combination of source label values — existing rows with the same source key are updated.\n- A schema can hold at most 10,000 rows by default.\n- The operation is locked per schema; concurrent upserts to the same schema may fail with `ErrRequestTooFrequently`.", - "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-write-upsert", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- If the API is still referenced, the response returns HTTP 400 with a `refs` list.\n- Only the API creator, account admin, or team member can delete the API.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-write-delete", "metadata": { - "sidebarTitle": "Upsert mapping data rows" + "sidebarTitle": "Delete mapping API" } } } }, - "/enrichment/mapping/schema/create": { + "/enrichment/mapping/api/info": { "post": { - "description": "Create a new mapping schema defining source lookup labels and the result labels to populate. Requires a Pro plan.", - "operationId": "mapping-schema-write-create", + "description": "Return detail of a single mapping API by its ID.", + "operationId": "mapping-api-read-info", "requestBody": { "content": { "application/json": { "example": { - "description": "Enrich alerts with CMDB data", - "result_labels": [ - "owner", - "team", - "service" - ], - "schema_name": "CMDB Lookup", - "source_labels": [ - "host" - ] + "api_id": "665f1a2b3c4d5e6f7a8b9c02" }, "schema": { - "$ref": "#/components/schemas/MappingSchemaCreateRequest" + "$ref": "#/components/schemas/MappingAPIIDRequest" } } }, @@ -35250,8 +35089,16 @@ "application/json": { "example": { "data": { - "schema_id": "665f1a2b3c4d5e6f7a8b9c01", - "schema_name": "CMDB Lookup" + "api_id": "665f1a2b3c4d5e6f7a8b9c02", + "api_name": "CMDB API", + "created_at": 1710000000, + "creator_id": 80011, + "insecure_skip_verify": false, + "retry_count": 1, + "status": "enabled", + "timeout": 2, + "updated_at": 1710000000, + "url": "https://cmdb.example.com/api/lookup" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -35263,7 +35110,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/MappingSchemaCreateResponse" + "$ref": "#/components/schemas/MappingAPIItem" } }, "type": "object" @@ -35287,31 +35134,29 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create mapping schema", + "summary": "Get mapping API detail", "tags": [ "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- Schema names must be unique within an account.\n- `source_labels` (1–3 labels) are used as lookup keys; `result_labels` (1–10 labels) are the labels written on match.\n- Label names must match `^[a-zA-Z_][a-zA-Z0-9_]*$` and be unique within each list.\n- `source_labels` and `result_labels` must not overlap.\n- An account can have at most 20 mapping schemas.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-write-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `null` if the API does not exist.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-read-info", "metadata": { - "sidebarTitle": "Create mapping schema" + "sidebarTitle": "Get mapping API detail" } } } }, - "/enrichment/mapping/schema/delete": { + "/enrichment/mapping/api/list": { "post": { - "description": "Delete a mapping schema and all its associated data. Deletion is blocked if the schema is referenced by any enrichment rule or webhook.", - "operationId": "mapping-schema-write-delete", + "description": "Return all mapping APIs configured for the account.", + "operationId": "mapping-api-read-list", "requestBody": { "content": { "application/json": { - "example": { - "schema_id": "665f1a2b3c4d5e6f7a8b9c01" - }, + "example": {}, "schema": { - "$ref": "#/components/schemas/MappingSchemaIDRequest" + "$ref": "#/components/schemas/EmptyRequest" } } }, @@ -35322,7 +35167,28 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "items": [ + { + "api_id": "665f1a2b3c4d5e6f7a8b9c02", + "api_name": "CMDB API", + "created_at": 1710000000, + "creator_id": 80011, + "description": "Query CMDB for host metadata", + "headers": { + "Authorization": "Bearer eyJhbGciOiJIUzI1NiJ9.example-token" + }, + "insecure_skip_verify": false, + "retry_count": 1, + "status": "enabled", + "team_id": 0, + "timeout": 2, + "updated_at": 1710000000, + "url": "https://cmdb.example.com/api/lookup" + } + ], + "total": 1 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -35333,7 +35199,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/MappingAPIListResponse" } }, "type": "object" @@ -35357,31 +35223,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete mapping schema", + "summary": "List mapping APIs", "tags": [ "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- If the schema is still referenced, the response returns HTTP 400 with a `refs` list of blocking references.\n- Only the schema creator, account admin, or team member can delete the schema.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.\n- High-risk operation. Console JWT callers must pass a second-factor code; `app_key` callers bypass the MFA prompt but remain audited — treat the key as a secret.", - "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-write-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Read** (`on-call`) or **Mappings Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-read-list", "metadata": { - "sidebarTitle": "Delete mapping schema" + "sidebarTitle": "List mapping APIs" } } } }, - "/enrichment/mapping/schema/info": { + "/enrichment/mapping/api/update": { "post": { - "description": "Return detail of a single mapping schema by its ID.", - "operationId": "mapping-schema-read-info", + "description": "Update configuration of an existing mapping API.", + "operationId": "mapping-api-write-update", "requestBody": { "content": { "application/json": { "example": { - "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + "api_id": "665f1a2b3c4d5e6f7a8b9c02", + "retry_count": 1, + "timeout": 3 }, "schema": { - "$ref": "#/components/schemas/MappingSchemaIDRequest" + "$ref": "#/components/schemas/MappingAPIUpdateRequest" } } }, @@ -35392,24 +35260,7 @@ "content": { "application/json": { "example": { - "data": { - "created_at": 1710000000, - "creator_id": 80011, - "description": "Enrich alerts with CMDB data", - "result_labels": [ - "owner", - "team", - "service" - ], - "schema_id": "665f1a2b3c4d5e6f7a8b9c01", - "schema_name": "CMDB Lookup", - "source_labels": [ - "host" - ], - "status": "enabled", - "team_id": 0, - "updated_at": 1710000000 - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -35420,7 +35271,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/MappingSchemaItem" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -35444,29 +35295,35 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get mapping schema detail", + "summary": "Update mapping API", "tags": [ "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) or **Integrations Manage** (`on-call`) or **Mappings Read** (`on-call`) or **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- Returns `null` if the schema does not exist.", - "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-read-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- Only the API creator, account admin, or team member can update the API.\n- All updatable fields are optional — only provided fields are changed.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-write-update", "metadata": { - "sidebarTitle": "Get mapping schema detail" + "sidebarTitle": "Update mapping API" } } } }, - "/enrichment/mapping/schema/list": { + "/enrichment/mapping/data/delete": { "post": { - "description": "Return all mapping schemas for the account, sorted by creation time ascending.", - "operationId": "mapping-schema-read-list", + "description": "Delete up to 100 mapping data rows by their keys.", + "operationId": "mapping-data-write-delete", "requestBody": { "content": { "application/json": { - "example": {}, + "example": { + "keys": [ + "server01", + "server02" + ], + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" + }, "schema": { - "$ref": "#/components/schemas/EmptyRequest" + "$ref": "#/components/schemas/MappingDataDeleteRequest" } } }, @@ -35477,29 +35334,7 @@ "content": { "application/json": { "example": { - "data": { - "items": [ - { - "created_at": 1710000000, - "creator_id": 80011, - "description": "Enrich alerts with CMDB data", - "result_labels": [ - "owner", - "team", - "service" - ], - "schema_id": "665f1a2b3c4d5e6f7a8b9c01", - "schema_name": "CMDB Lookup", - "source_labels": [ - "host" - ], - "status": "enabled", - "team_id": 0, - "updated_at": 1710000000 - } - ], - "total": 1 - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -35510,7 +35345,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/MappingSchemaListResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -35534,33 +35369,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List mapping schemas", + "summary": "Delete mapping data rows", "tags": [ "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) or **Channels Manage** (`on-call`) or **Integrations Read** (`on-call`) or **Integrations Manage** (`on-call`) or **Mappings Read** (`on-call`) or **Mappings Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-write-delete", "metadata": { - "sidebarTitle": "List mapping schemas" + "sidebarTitle": "Delete mapping data rows" } } } }, - "/enrichment/mapping/schema/update": { + "/enrichment/mapping/data/download": { "post": { - "description": "Update the name, description, or owning team of a mapping schema. Source and result labels cannot be changed after creation.", - "operationId": "mapping-schema-write-update", + "description": "Export all data rows of a mapping schema as a CSV file download.", + "operationId": "mapping-data-read-download", "requestBody": { "content": { "application/json": { "example": { - "description": "Updated description", - "schema_id": "665f1a2b3c4d5e6f7a8b9c01", - "schema_name": "CMDB Lookup v2" + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" }, "schema": { - "$ref": "#/components/schemas/MappingSchemaUpdateRequest" + "$ref": "#/components/schemas/MappingSchemaIDRequest" } } }, @@ -35569,29 +35402,16 @@ "responses": { "200": { "content": { - "application/json": { - "example": { - "data": {}, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, + "application/octet-stream": { + "example": "host,owner,team\nserver01,alice,sre\nserver02,bob,backend\n", "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/EmptyResponse" - } - }, - "type": "object" - } - ] + "description": "CSV file stream (`Content-Type: application/octet-stream`, `Content-Disposition: attachment; filename=.csv`). The header row lists the schema's source_labels followed by result_labels in order; each subsequent row is one mapping document.", + "format": "binary", + "type": "string" } } }, - "description": "Success" + "description": "Success. CSV attachment stream, not a JSON envelope." }, "400": { "$ref": "#/components/responses/BadRequest" @@ -35606,50 +35426,35 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update mapping schema", + "summary": "Download mapping data as CSV", "tags": [ "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- Only the schema creator, account admin, or team member can update the schema.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-write-update", + "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`) or **Integrations Manage** (`on-call`) or **Mappings Read** (`on-call`) or **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- The response is a CSV file with `Content-Disposition: attachment` header.\n- The CSV header row matches the schema's source and result labels in order.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-read-download", "metadata": { - "sidebarTitle": "Update mapping schema" + "sidebarTitle": "Download mapping data as CSV" } } } }, - "/enrichment/upsert": { + "/enrichment/mapping/data/list": { "post": { - "description": "Create or fully replace the enrichment rule set for an integration. The entire `rules` array is replaced atomically.", - "operationId": "enrichment-write-upsert", + "description": "Return paginated mapping data rows for a schema, with optional exact-match filtering on source label values.", + "operationId": "mapping-data-read-list", "requestBody": { "content": { "application/json": { "example": { - "integration_id": 5001, - "rules": [ - { - "kind": "extraction", - "settings": { - "override": true, - "pattern": "(?Pprod|staging|dev)", - "result_label": "environment", - "source_field": "labels.env" - } - }, - { - "kind": "composition", - "settings": { - "override": false, - "result_label": "full_env", - "template": "{{.Labels.region}}-{{.Labels.environment}}" - } - } - ] + "asc": false, + "limit": 20, + "orderby": "updated_at", + "p": 1, + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" }, "schema": { - "$ref": "#/components/schemas/EnrichmentUpsertRequest" + "$ref": "#/components/schemas/MappingDataListRequest" } } }, @@ -35660,7 +35465,23 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "has_next_page": false, + "items": [ + { + "created_at": 1710000000, + "fields": { + "host": "server01", + "owner": "alice", + "service": "api", + "team": "sre" + }, + "key": "server01", + "updated_at": 1710000000 + } + ], + "total": 1 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -35671,7 +35492,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/MappingDataListResponse" } }, "type": "object" @@ -35695,42 +35516,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Upsert enrichment rules", + "summary": "List mapping data", "tags": [ "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) or **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Enrichment rules are evaluated in order.\n- Each rule has a `kind`: `extraction` (regex/gjson extraction), `composition` (template-based label composition), `mapping` (lookup via mapping schema or API), or `drop` (remove labels).\n- The optional `if` field is an `AndFilters` condition: if it does not match, the rule is skipped.\n- For `kind: extraction`: `source_field` must be `title`, `description`, or a `labels.*` key; specify exactly one of `pattern` (RE2 regex — its capture groups are joined with a space and written to `result_label`) or `g_json` (GJson path).\n- For `kind: composition`: `template` is a Go text/template rendered against the event struct, e.g. `{{.Title}}`, `{{.Description}}`, `{{.Labels.key}}`.\n- For `kind: mapping`: `mapping_type` is `schema` (default) or `api`; provide `schema_id` or `api_id` accordingly.\n- For `kind: drop`: `drop_labels` lists the label keys to remove.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/alert-enrichment/enrichment-write-upsert", + "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`) or **Integrations Manage** (`on-call`) or **Mappings Read** (`on-call`) or **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- If `query` is provided, all source labels must be specified — partial source label queries are rejected.\n- Pagination uses cursor-based (`search_after_ctx`) or page-based (`p`, `limit`) navigation. `limit` defaults to 20, max 100.\n- The `search_after_ctx` token from a response can be passed back to retrieve the next page.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-read-list", "metadata": { - "sidebarTitle": "Upsert enrichment rules" + "sidebarTitle": "List mapping data" } } } }, - "/field/create": { + "/enrichment/mapping/data/truncate": { "post": { - "description": "Create a new incident custom field on the account.", - "operationId": "field-write-create", + "description": "Delete all data rows in a mapping schema.", + "operationId": "mapping-data-write-truncate", "requestBody": { "content": { "application/json": { "example": { - "default_value": "Medium", - "description": "Business severity tier.", - "display_name": "Severity Class", - "field_name": "severity_class", - "field_type": "single_select", - "options": [ - "Critical", - "High", - "Medium", - "Low" - ], - "value_type": "string" + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" }, "schema": { - "$ref": "#/components/schemas/CreateFieldRequest" + "$ref": "#/components/schemas/MappingSchemaIDRequest" } } }, @@ -35741,10 +35551,7 @@ "content": { "application/json": { "example": { - "data": { - "field_id": "66e9d3a4f7c2b04a1c8a91b3", - "field_name": "severity_class" - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -35755,7 +35562,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/CreateFieldResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -35779,31 +35586,63 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create field", + "summary": "Truncate mapping data", "tags": [ "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Maximum **15** custom fields per account.\n- `field_name` must match `^[a-zA-Z_][a-zA-Z0-9_]{0,39}$` and is immutable after creation; `display_name` must also be unique within the account.\n- Type-specific rules: `checkbox` requires `value_type=bool` and no `options`; `single_select`/`multi_select` require `value_type=string` and a non-empty unique `options` list; `text` requires `value_type=string` and no `options`.\n- Response contains only `field_id` and `field_name`; use `/field/info` to fetch the full object.\n- Audited — changes are recorded in the audit log.", - "href": "/en/api-reference/on-call/alert-enrichment/field-write-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- This is an irreversible bulk-delete operation.\n- High-risk operation. Console JWT callers must pass a second-factor code; `app_key` callers bypass the MFA prompt but remain audited — treat the key as a secret.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-write-truncate", "metadata": { - "sidebarTitle": "Create field" + "sidebarTitle": "Truncate mapping data" } } } }, - "/field/delete": { + "/enrichment/mapping/data/upload": { "post": { - "description": "Delete an incident custom field and asynchronously strip it from existing incidents.", - "operationId": "field-write-delete", + "description": "Upload a CSV file to bulk-load mapping data. By default the existing data is truncated before loading the new rows.", + "operationId": "mapping-data-write-upload", + "parameters": [ + { + "description": "ID of the target mapping schema (ObjectID hex).", + "example": "665f1a2b3c4d5e6f7a8b9c01", + "in": "query", + "name": "schema_id", + "required": true, + "schema": { + "pattern": "^[0-9a-fA-F]{24}$", + "type": "string" + } + }, + { + "description": "Pass `TRUE` (case-insensitive) to append instead of replacing. When omitted and the schema already has data, the server truncates existing rows before importing.", + "in": "query", + "name": "do_not_truncate_first", + "required": false, + "schema": { + "enum": [ + "TRUE" + ], + "type": "string" + } + } + ], "requestBody": { "content": { - "application/json": { - "example": { - "field_id": "66e9d3a4f7c2b04a1c8a91b3" - }, + "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/DeleteFieldRequest" + "properties": { + "file": { + "description": "CSV file, max 100 MB. The header row must include all of the schema's source/result label names.", + "format": "binary", + "type": "string" + } + }, + "required": [ + "file" + ], + "type": "object" } } }, @@ -35825,7 +35664,7 @@ { "properties": { "data": { - "type": "object" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -35837,41 +35676,7 @@ "description": "Success" }, "400": { - "content": { - "application/json": { - "examples": { - "fieldStillReferenced": { - "value": { - "data": { - "refs": [ - { - "href": "https://console.flashcat.cloud/forms/resolve", - "kind": "custom_form", - "name": "Resolve incident" - } - ] - }, - "error": { - "code": "ReferenceExist", - "message": "There still are associated resources, deletion is blocked." - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - } - } - }, - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/ErrorResponse" - }, - { - "$ref": "#/components/schemas/FieldDeleteReferenceError" - } - ] - } - } - }, - "description": "Invalid request or the field is still referenced by a custom form." + "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" @@ -35883,31 +35688,45 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete field", + "summary": "Upload mapping data via CSV", "tags": [ "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- The field is marked deleted synchronously; clearing its values from historical incidents runs in the background and may take time on large datasets.\n- Re-creating a field with the same `field_name` is only allowed if `field_type` and `value_type` match the deleted entry.\n- Deletion is rejected with `ReferenceExist` and the referencing custom forms in `data.refs` until no form uses the field.\n- Audited — changes are recorded in the audit log.", - "href": "/en/api-reference/on-call/alert-enrichment/field-write-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **20 requests/minute**; **2 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- The request must use `Content-Type: multipart/form-data`. The file field name is `file` and `schema_id` is a query parameter.\n- CSV header row must include all source and result label names.\n- Maximum file size: 100 MB.\n- By default the schema's existing data is truncated before import. Pass query param `do_not_truncate_first=TRUE` to append instead.\n- Duplicate source label value combinations in the CSV cause a 400 error.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-write-upload", "metadata": { - "sidebarTitle": "Delete field" + "sidebarTitle": "Upload mapping data via CSV" } } } }, - "/field/info": { + "/enrichment/mapping/data/upsert": { "post": { - "description": "Return the configuration of a single incident custom field by ID.", - "operationId": "field-read-info", + "description": "Insert or update up to 1000 data rows in a mapping schema. Each row must contain all source and result labels.", + "operationId": "mapping-data-write-upsert", "requestBody": { "content": { "application/json": { "example": { - "field_id": "66e9d3a4f7c2b04a1c8a91b3" + "docs": [ + { + "host": "server01", + "owner": "alice", + "service": "api", + "team": "sre" + }, + { + "host": "server02", + "owner": "bob", + "service": "gateway", + "team": "platform" + } + ], + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" }, "schema": { - "$ref": "#/components/schemas/FieldInfoRequest" + "$ref": "#/components/schemas/MappingDataUpsertRequest" } } }, @@ -35919,25 +35738,10 @@ "application/json": { "example": { "data": { - "account_id": 80001, - "created_at": 1710000000, - "creator_id": 80011, - "default_value": "Medium", - "description": "Business severity tier.", - "display_name": "Severity Class", - "field_id": "66e9d3a4f7c2b04a1c8a91b3", - "field_name": "severity_class", - "field_type": "single_select", - "options": [ - "Critical", - "High", - "Medium", - "Low" - ], - "status": "enabled", - "updated_at": 1710000000, - "updated_by": 80011, - "value_type": "string" + "keys": [ + "server01", + "server02" + ] }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -35949,7 +35753,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/FieldItem" + "$ref": "#/components/schemas/MappingDataUpsertResponse" } }, "type": "object" @@ -35973,33 +35777,40 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get field detail", + "summary": "Upsert mapping data rows", "tags": [ "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) or **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- An unknown `field_id` yields a 400 error. A soft-deleted field is still returned, with `status` = `deleted` and `deleted_at` set.\n- The shape of `options` and `default_value` varies by `field_type` — see the `FieldItem` schema.", - "href": "/en/api-reference/on-call/alert-enrichment/field-read-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- Each doc must contain values for all labels defined in `source_labels` and `result_labels`.\n- Values for unknown labels are silently dropped.\n- Each value must be at most 2048 characters.\n- Upsert is keyed on the combination of source label values — existing rows with the same source key are updated.\n- A schema can hold at most 10,000 rows by default.\n- The operation is locked per schema; concurrent upserts to the same schema may fail with `ErrRequestTooFrequently`.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-write-upsert", "metadata": { - "sidebarTitle": "Get field detail" + "sidebarTitle": "Upsert mapping data rows" } } } }, - "/field/list": { + "/enrichment/mapping/schema/create": { "post": { - "description": "Return all incident custom fields configured for the account.", - "operationId": "field-read-list", + "description": "Create a new mapping schema defining source lookup labels and the result labels to populate. Requires a Pro plan.", + "operationId": "mapping-schema-write-create", "requestBody": { "content": { "application/json": { "example": { - "asc": false, - "orderby": "updated_at", - "query": "severity" + "description": "Enrich alerts with CMDB data", + "result_labels": [ + "owner", + "team", + "service" + ], + "schema_name": "CMDB Lookup", + "source_labels": [ + "host" + ] }, "schema": { - "$ref": "#/components/schemas/FieldListRequest" + "$ref": "#/components/schemas/MappingSchemaCreateRequest" } } }, @@ -36011,29 +35822,8 @@ "application/json": { "example": { "data": { - "items": [ - { - "account_id": 80001, - "created_at": 1710000000, - "creator_id": 80011, - "default_value": "Medium", - "description": "Business severity tier.", - "display_name": "Severity Class", - "field_id": "66e9d3a4f7c2b04a1c8a91b3", - "field_name": "severity_class", - "field_type": "single_select", - "options": [ - "Critical", - "High", - "Medium", - "Low" - ], - "status": "enabled", - "updated_at": 1710000000, - "updated_by": 80011, - "value_type": "string" - } - ] + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "schema_name": "CMDB Lookup" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -36045,7 +35835,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/FieldListResponse" + "$ref": "#/components/schemas/MappingSchemaCreateResponse" } }, "type": "object" @@ -36069,40 +35859,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List fields", + "summary": "Create mapping schema", "tags": [ "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) or **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- All non-deleted fields are returned in a single response — there is no pagination and no `total` counter.\n- `query` matches against `field_name` only; invalid regular expressions are auto-escaped to a literal substring match.", - "href": "/en/api-reference/on-call/alert-enrichment/field-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- Schema names must be unique within an account.\n- `source_labels` (1–3 labels) are used as lookup keys; `result_labels` (1–10 labels) are the labels written on match.\n- Label names must match `^[a-zA-Z_][a-zA-Z0-9_]*$` and be unique within each list.\n- `source_labels` and `result_labels` must not overlap.\n- An account can have at most 20 mapping schemas.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-write-create", "metadata": { - "sidebarTitle": "List fields" + "sidebarTitle": "Create mapping schema" } } } }, - "/field/update": { + "/enrichment/mapping/schema/delete": { "post": { - "description": "Update mutable attributes of an existing incident custom field.", - "operationId": "field-write-update", + "description": "Delete a mapping schema and all its associated data. Deletion is blocked if the schema is referenced by any enrichment rule or webhook.", + "operationId": "mapping-schema-write-delete", "requestBody": { "content": { "application/json": { "example": { - "default_value": "Medium", - "description": "Business severity tier.", - "display_name": "Severity Class", - "field_id": "66e9d3a4f7c2b04a1c8a91b3", - "options": [ - "Critical", - "High", - "Medium", - "Low" - ] + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" }, "schema": { - "$ref": "#/components/schemas/UpdateFieldRequest" + "$ref": "#/components/schemas/MappingSchemaIDRequest" } } }, @@ -36124,7 +35905,7 @@ { "properties": { "data": { - "type": "object" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -36148,33 +35929,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update field", + "summary": "Delete mapping schema", "tags": [ "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Only `display_name`, `description`, `options`, and `default_value` can be changed; `field_name`, `field_type`, and `value_type` are immutable.\n- `options` and `default_value` must remain consistent with the field's existing type — same rules as create.\n- Audited — changes are recorded in the audit log.", - "href": "/en/api-reference/on-call/alert-enrichment/field-write-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- If the schema is still referenced, the response returns HTTP 400 with a `refs` list of blocking references.\n- Only the schema creator, account admin, or team member can delete the schema.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.\n- High-risk operation. Console JWT callers must pass a second-factor code; `app_key` callers bypass the MFA prompt but remain audited — treat the key as a secret.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-write-delete", "metadata": { - "sidebarTitle": "Update field" + "sidebarTitle": "Delete mapping schema" } } } }, - "/incident/ack": { + "/enrichment/mapping/schema/info": { "post": { - "description": "Acknowledge an incident to indicate you are actively working on it.", - "operationId": "incidentAck", + "description": "Return detail of a single mapping schema by its ID.", + "operationId": "mapping-schema-read-info", "requestBody": { "content": { "application/json": { "example": { - "incident_ids": [ - "69da451ef77b1b51f40e83ee" - ] + "schema_id": "665f1a2b3c4d5e6f7a8b9c01" }, "schema": { - "$ref": "#/components/schemas/AckIncidentRequest" + "$ref": "#/components/schemas/MappingSchemaIDRequest" } } }, @@ -36185,7 +35964,24 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "created_at": 1710000000, + "creator_id": 80011, + "description": "Enrich alerts with CMDB data", + "result_labels": [ + "owner", + "team", + "service" + ], + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "schema_name": "CMDB Lookup", + "source_labels": [ + "host" + ], + "status": "enabled", + "team_id": 0, + "updated_at": 1710000000 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -36196,7 +35992,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/MappingSchemaItem" } }, "type": "object" @@ -36220,35 +36016,29 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Acknowledge incident", + "summary": "Get mapping schema detail", "tags": [ - "On-call/Incidents" + "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- When an acknowledgement form applies, `custom_fields`, `summary`, and `images` must match its visible elements and required rules.\n- For a batch, form values are accepted only when every selected incident resolves to the same form; otherwise acknowledge incidents individually.\n- The legacy `values` and `custom_values` properties are rejected; use `custom_fields`.\n- Audited — changes are recorded in the audit log.", - "href": "/en/api-reference/on-call/incidents/incident-ack", + "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`) or **Integrations Manage** (`on-call`) or **Mappings Read** (`on-call`) or **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- Returns `null` if the schema does not exist.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-read-info", "metadata": { - "sidebarTitle": "Acknowledge incident" + "sidebarTitle": "Get mapping schema detail" } } } }, - "/incident/alert/list": { + "/enrichment/mapping/schema/list": { "post": { - "description": "List all alerts merged into a specific incident.", - "operationId": "incidentAlertList", + "description": "Return all mapping schemas for the account, sorted by creation time ascending.", + "operationId": "mapping-schema-read-list", "requestBody": { "content": { "application/json": { - "example": { - "incident_id": "69da451ef77b1b51f40e83ee", - "include_events": true, - "is_active": true, - "limit": 100, - "p": 1 - }, + "example": {}, "schema": { - "$ref": "#/components/schemas/ListIncidentAlertsRequest" + "$ref": "#/components/schemas/EmptyRequest" } } }, @@ -36262,57 +36052,22 @@ "data": { "items": [ { - "account_id": 2451002751131, - "alert_id": "69da451df77b1b51f40e83de", - "alert_key": "100128:prom-203.0.113.107:A:1579244238440766834:anydata", - "alert_severity": "Critical", - "alert_status": "Critical", - "channel_id": 2551105804131, - "channel_name": "Ops Channel", - "channel_status": "enabled", - "created_at": 1775912221, - "data_source_id": 2490562293131, - "data_source_name": "FlashMonit", - "data_source_ref_id": "a_2451002751131", - "data_source_type": "monit.alert", - "description": "", - "end_time": 0, - "event_cnt": 17, - "events": [ - { - "alert_id": "69da451df77b1b51f40e83de", - "event_id": "69da451df77b1b51f40e83df", - "event_severity": "Critical", - "event_status": "Critical", - "event_time": 1712650000, - "labels": { - "host": "web-01" - }, - "title": "CPU usage > 90%" - } + "created_at": 1710000000, + "creator_id": 80011, + "description": "Enrich alerts with CMDB data", + "result_labels": [ + "owner", + "team", + "service" ], - "ever_muted": false, - "images": null, - "incident": { - "incident_id": "69da451ef77b1b51f40e83ee", - "progress": "Triggered", - "title": "CPU usage high - web-server-01" - }, - "integration_id": 2490562293131, - "integration_name": "FlashMonit", - "integration_ref_id": "a_2451002751131", - "integration_type": "monit.alert", - "labels": { - "check": "cpu_usage_high", - "resource": "web-server-01" - }, - "last_time": 1775969819, - "responder_email": "", - "responder_name": "", - "start_time": 1775912219, - "title": "CPU usage high - web-server-01", - "title_rule": "", - "updated_at": 1775969821 + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "schema_name": "CMDB Lookup", + "source_labels": [ + "host" + ], + "status": "enabled", + "team_id": 0, + "updated_at": 1710000000 } ], "total": 1 @@ -36327,7 +36082,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ListIncidentAlertsResponse" + "$ref": "#/components/schemas/MappingSchemaListResponse" } }, "type": "object" @@ -36351,37 +36106,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List alerts of incident", + "summary": "List mapping schemas", "tags": [ - "On-call/Incidents" + "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |\n\n## Usage\n\n- Set `include_events=true` only when you need a preview of each alert's raw events.\n- Event previews are capped at the 20 newest events per alert. Use `POST /alert/event/list` for a full paginated event history.\n- `event_cnt` still reports the total number of raw events merged into each alert.", - "href": "/en/api-reference/on-call/incidents/incident-alert-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) or **Channels Manage** (`on-call`) or **Integrations Read** (`on-call`) or **Integrations Manage** (`on-call`) or **Mappings Read** (`on-call`) or **Mappings Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-read-list", "metadata": { - "sidebarTitle": "List alerts of incident" + "sidebarTitle": "List mapping schemas" } } } }, - "/incident/assign": { + "/enrichment/mapping/schema/update": { "post": { - "description": "Dispatch an incident to a specific escalation level or responder.", - "operationId": "incidentAssign", + "description": "Update the name, description, or owning team of a mapping schema. Source and result labels cannot be changed after creation.", + "operationId": "mapping-schema-write-update", "requestBody": { "content": { "application/json": { "example": { - "assigned_to": { - "person_ids": [ - 2476444212131 - ], - "type": "assign" - }, - "incident_id": "69da451ef77b1b51f40e83ee" + "description": "Updated description", + "schema_id": "665f1a2b3c4d5e6f7a8b9c01", + "schema_name": "CMDB Lookup v2" }, "schema": { - "$ref": "#/components/schemas/AssignIncidentRequest" + "$ref": "#/components/schemas/MappingSchemaUpdateRequest" } } }, @@ -36427,35 +36178,50 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Assign incident", + "summary": "Update mapping schema", "tags": [ - "On-call/Incidents" + "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-assign", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- Only the schema creator, account admin, or team member can update the schema.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-write-update", "metadata": { - "sidebarTitle": "Assign incident" + "sidebarTitle": "Update mapping schema" } } } }, - "/incident/comment": { + "/enrichment/upsert": { "post": { - "description": "Add a text comment to the incident timeline.", - "operationId": "incidentComment", + "description": "Create or fully replace the enrichment rule set for an integration. The entire `rules` array is replaced atomically.", + "operationId": "enrichment-write-upsert", "requestBody": { "content": { "application/json": { "example": { - "comment": "Root cause identified. [@Jane Doe](flashduty://ref/member/2476444212131) please verify the fix.", - "comment_type_id": "6a5895d672a064bc2d3ddfc2", - "incident_ids": [ - "69da451ef77b1b51f40e83ee" + "integration_id": 5001, + "rules": [ + { + "kind": "extraction", + "settings": { + "override": true, + "pattern": "(?Pprod|staging|dev)", + "result_label": "environment", + "source_field": "labels.env" + } + }, + { + "kind": "composition", + "settings": { + "override": false, + "result_label": "full_env", + "template": "{{.Labels.region}}-{{.Labels.environment}}" + } + } ] }, "schema": { - "$ref": "#/components/schemas/CommentIncidentRequest" + "$ref": "#/components/schemas/EnrichmentUpsertRequest" } } }, @@ -36501,32 +36267,42 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Add comment to incident", + "summary": "Upsert enrichment rules", "tags": [ - "On-call/Incidents" + "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- To mention a member, embed a markdown link in `comment` in the form `[@Display Name](flashduty://ref/member/)`. Mentioned members receive a dedicated personal notification, which is not affected by `mute_reply`.\n- Plain `@name` text without the link syntax does not create a mention.\n- The server rewrites each mention's display label to the member's canonical name.", - "href": "/en/api-reference/on-call/incidents/incident-comment", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) or **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Enrichment rules are evaluated in order.\n- Each rule has a `kind`: `extraction` (regex/gjson extraction), `composition` (template-based label composition), `mapping` (lookup via mapping schema or API), or `drop` (remove labels).\n- The optional `if` field is an `AndFilters` condition: if it does not match, the rule is skipped.\n- For `kind: extraction`: `source_field` must be `title`, `description`, or a `labels.*` key; specify exactly one of `pattern` (RE2 regex — its capture groups are joined with a space and written to `result_label`) or `g_json` (GJson path).\n- For `kind: composition`: `template` is a Go text/template rendered against the event struct, e.g. `{{.Title}}`, `{{.Description}}`, `{{.Labels.key}}`.\n- For `kind: mapping`: `mapping_type` is `schema` (default) or `api`; provide `schema_id` or `api_id` accordingly.\n- For `kind: drop`: `drop_labels` lists the label keys to remove.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/alert-enrichment/enrichment-write-upsert", "metadata": { - "sidebarTitle": "Add comment to incident" + "sidebarTitle": "Upsert enrichment rules" } } } }, - "/incident/comment-type/create": { + "/field/create": { "post": { - "description": "Create a comment type that can be attached to incident comments.", - "operationId": "incidentCommentTypeCreate", + "description": "Create a new incident custom field on the account.", + "operationId": "field-write-create", "requestBody": { "content": { "application/json": { "example": { - "color": "#30A46C", - "name": "Key finding" + "default_value": "Medium", + "description": "Business severity tier.", + "display_name": "Severity Class", + "field_name": "severity_class", + "field_type": "single_select", + "options": [ + "Critical", + "High", + "Medium", + "Low" + ], + "value_type": "string" }, "schema": { - "$ref": "#/components/schemas/CreateIncidentCommentTypeRequest" + "$ref": "#/components/schemas/CreateFieldRequest" } } }, @@ -36538,18 +36314,8 @@ "application/json": { "example": { "data": { - "comment_type_id": "6a5895d672a064bc2d3ddfc2", - "item": { - "account_id": 2451002751131, - "color": "#30A46C", - "comment_type_id": "6a5895d672a064bc2d3ddfc2", - "created_at": 1784190422, - "creator_id": 5068740052131, - "name": "Key finding", - "position": 1, - "updated_at": 1784207748, - "updated_by": 5068740052131 - } + "field_id": "66e9d3a4f7c2b04a1c8a91b3", + "field_name": "severity_class" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -36561,7 +36327,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/CreateIncidentCommentTypeResponse" + "$ref": "#/components/schemas/CreateFieldResponse" } }, "type": "object" @@ -36585,31 +36351,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create a comment type", + "summary": "Create field", "tags": [ - "On-call/Incidents" + "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Comment Types Manage** (`on-call`) |\n\n## Usage\n\n- The new type is appended to the end of the display ordering.\n- The name must be unique within the account (case-insensitive, after trimming whitespace).\n- An account can have at most 10 comment types.\n- This permission is admin-only by default; custom roles must be granted it explicitly.", - "href": "/en/api-reference/on-call/incidents/incident-comment-type-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Maximum **15** custom fields per account.\n- `field_name` must match `^[a-zA-Z_][a-zA-Z0-9_]{0,39}$` and is immutable after creation; `display_name` must also be unique within the account.\n- Type-specific rules: `checkbox` requires `value_type=bool` and no `options`; `single_select`/`multi_select` require `value_type=string` and a non-empty unique `options` list; `text` requires `value_type=string` and no `options`.\n- Response contains only `field_id` and `field_name`; use `/field/info` to fetch the full object.\n- Audited — changes are recorded in the audit log.", + "href": "/en/api-reference/on-call/alert-enrichment/field-write-create", "metadata": { - "sidebarTitle": "Create a comment type" + "sidebarTitle": "Create field" } } } }, - "/incident/comment-type/delete": { + "/field/delete": { "post": { - "description": "Delete a comment type. Comments that used it keep their text but lose the type label.", - "operationId": "incidentCommentTypeDelete", + "description": "Delete an incident custom field and asynchronously strip it from existing incidents.", + "operationId": "field-write-delete", "requestBody": { "content": { "application/json": { "example": { - "comment_type_id": "6a5895b572a064bc2d3ddfc0" + "field_id": "66e9d3a4f7c2b04a1c8a91b3" }, "schema": { - "$ref": "#/components/schemas/DeleteIncidentCommentTypeRequest" + "$ref": "#/components/schemas/DeleteFieldRequest" } } }, @@ -36631,7 +36397,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "type": "object" } }, "type": "object" @@ -36643,7 +36409,41 @@ "description": "Success" }, "400": { - "$ref": "#/components/responses/BadRequest" + "content": { + "application/json": { + "examples": { + "fieldStillReferenced": { + "value": { + "data": { + "refs": [ + { + "href": "https://console.flashcat.cloud/forms/resolve", + "kind": "custom_form", + "name": "Resolve incident" + } + ] + }, + "error": { + "code": "ReferenceExist", + "message": "There still are associated resources, deletion is blocked." + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + } + } + }, + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorResponse" + }, + { + "$ref": "#/components/schemas/FieldDeleteReferenceError" + } + ] + } + } + }, + "description": "Invalid request or the field is still referenced by a custom form." }, "401": { "$ref": "#/components/responses/Unauthorized" @@ -36655,29 +36455,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete a comment type", + "summary": "Delete field", "tags": [ - "On-call/Incidents" + "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Comment Types Manage** (`on-call`) |\n\n## Usage\n\n- Hard delete — the comment type is removed permanently and cannot be restored.\n- Existing comments that referenced the type lose the type label but are not otherwise affected.\n- This permission is admin-only by default; custom roles must be granted it explicitly.", - "href": "/en/api-reference/on-call/incidents/incident-comment-type-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- The field is marked deleted synchronously; clearing its values from historical incidents runs in the background and may take time on large datasets.\n- Re-creating a field with the same `field_name` is only allowed if `field_type` and `value_type` match the deleted entry.\n- Deletion is rejected with `ReferenceExist` and the referencing custom forms in `data.refs` until no form uses the field.\n- Audited — changes are recorded in the audit log.", + "href": "/en/api-reference/on-call/alert-enrichment/field-write-delete", "metadata": { - "sidebarTitle": "Delete a comment type" + "sidebarTitle": "Delete field" } } } }, - "/incident/comment-type/list": { + "/field/info": { "post": { - "description": "Retrieve all comment types of the account, ordered by their display position.", - "operationId": "incidentCommentTypeList", + "description": "Return the configuration of a single incident custom field by ID.", + "operationId": "field-read-info", "requestBody": { "content": { "application/json": { - "example": {}, + "example": { + "field_id": "66e9d3a4f7c2b04a1c8a91b3" + }, "schema": { - "$ref": "#/components/schemas/ListIncidentCommentTypesRequest" + "$ref": "#/components/schemas/FieldInfoRequest" } } }, @@ -36689,30 +36491,25 @@ "application/json": { "example": { "data": { - "items": [ - { - "account_id": 2451002751131, - "color": "#30A46C", - "comment_type_id": "6a5895d672a064bc2d3ddfc2", - "created_at": 1784190422, - "creator_id": 5068740052131, - "name": "Key finding", - "position": 1, - "updated_at": 1784207748, - "updated_by": 5068740052131 - }, - { - "account_id": 2451002751131, - "color": "#998000", - "comment_type_id": "6a5895b572a064bc2d3ddfc0", - "created_at": 1784190389, - "creator_id": 5068740052131, - "name": "Hypothesis", - "position": 2, - "updated_at": 1785141535, - "updated_by": 3790925372131 - } - ] + "account_id": 80001, + "created_at": 1710000000, + "creator_id": 80011, + "default_value": "Medium", + "description": "Business severity tier.", + "display_name": "Severity Class", + "field_id": "66e9d3a4f7c2b04a1c8a91b3", + "field_name": "severity_class", + "field_type": "single_select", + "options": [ + "Critical", + "High", + "Medium", + "Low" + ], + "status": "enabled", + "updated_at": 1710000000, + "updated_by": 80011, + "value_type": "string" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -36724,7 +36521,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ListIncidentCommentTypesResponse" + "$ref": "#/components/schemas/FieldItem" } }, "type": "object" @@ -36748,34 +36545,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List comment types", + "summary": "Get field detail", "tags": [ - "On-call/Incidents" + "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |\n\n## Usage\n\n- Returns the full list in one call — there is no pagination.\n- An account can have at most 10 comment types.", - "href": "/en/api-reference/on-call/incidents/incident-comment-type-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) or **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- An unknown `field_id` yields a 400 error. A soft-deleted field is still returned, with `status` = `deleted` and `deleted_at` set.\n- The shape of `options` and `default_value` varies by `field_type` — see the `FieldItem` schema.", + "href": "/en/api-reference/on-call/alert-enrichment/field-read-info", "metadata": { - "sidebarTitle": "List comment types" + "sidebarTitle": "Get field detail" } } } }, - "/incident/comment-type/reorder": { + "/field/list": { "post": { - "description": "Set the display order of all comment types by passing every type ID in the desired order.", - "operationId": "incidentCommentTypeReorder", + "description": "Return all incident custom fields configured for the account.", + "operationId": "field-read-list", "requestBody": { "content": { "application/json": { "example": { - "comment_type_ids": [ - "6a5895b572a064bc2d3ddfc0", - "6a5895d672a064bc2d3ddfc2" - ] + "asc": false, + "orderby": "updated_at", + "query": "severity" }, "schema": { - "$ref": "#/components/schemas/ReorderIncidentCommentTypesRequest" + "$ref": "#/components/schemas/FieldListRequest" } } }, @@ -36786,7 +36582,31 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "items": [ + { + "account_id": 80001, + "created_at": 1710000000, + "creator_id": 80011, + "default_value": "Medium", + "description": "Business severity tier.", + "display_name": "Severity Class", + "field_id": "66e9d3a4f7c2b04a1c8a91b3", + "field_name": "severity_class", + "field_type": "single_select", + "options": [ + "Critical", + "High", + "Medium", + "Low" + ], + "status": "enabled", + "updated_at": 1710000000, + "updated_by": 80011, + "value_type": "string" + } + ] + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -36797,7 +36617,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/FieldListResponse" } }, "type": "object" @@ -36821,32 +36641,40 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Reorder comment types", + "summary": "List fields", "tags": [ - "On-call/Incidents" + "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Comment Types Manage** (`on-call`) |\n\n## Usage\n\n- Full-set reorder — `comment_type_ids` must contain every comment type of the account, each exactly once, in the desired order.\n- Positions are reassigned starting from 1: the first ID in the array becomes position 1.\n- This permission is admin-only by default; custom roles must be granted it explicitly.", - "href": "/en/api-reference/on-call/incidents/incident-comment-type-reorder", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) or **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- All non-deleted fields are returned in a single response — there is no pagination and no `total` counter.\n- `query` matches against `field_name` only; invalid regular expressions are auto-escaped to a literal substring match.", + "href": "/en/api-reference/on-call/alert-enrichment/field-read-list", "metadata": { - "sidebarTitle": "Reorder comment types" + "sidebarTitle": "List fields" } } } }, - "/incident/comment-type/update": { + "/field/update": { "post": { - "description": "Update the name and/or color of an existing account comment type.", - "operationId": "incidentCommentTypeUpdate", + "description": "Update mutable attributes of an existing incident custom field.", + "operationId": "field-write-update", "requestBody": { "content": { "application/json": { "example": { - "color": "#B7791F", - "comment_type_id": "6a5895b572a064bc2d3ddfc0" + "default_value": "Medium", + "description": "Business severity tier.", + "display_name": "Severity Class", + "field_id": "66e9d3a4f7c2b04a1c8a91b3", + "options": [ + "Critical", + "High", + "Medium", + "Low" + ] }, "schema": { - "$ref": "#/components/schemas/UpdateIncidentCommentTypeRequest" + "$ref": "#/components/schemas/UpdateFieldRequest" } } }, @@ -36868,7 +36696,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "type": "object" } }, "type": "object" @@ -36892,65 +36720,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update a comment type", + "summary": "Update field", "tags": [ - "On-call/Incidents" + "On-call/Alert enrichment" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Comment Types Manage** (`on-call`) |\n\n## Usage\n\n- Partial update — only the provided fields are changed, but at least one of `name` or `color` must be provided.\n- The name must remain unique within the account (case-insensitive, after trimming whitespace).\n- This permission is admin-only by default; custom roles must be granted it explicitly.", - "href": "/en/api-reference/on-call/incidents/incident-comment-type-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Only `display_name`, `description`, `options`, and `default_value` can be changed; `field_name`, `field_type`, and `value_type` are immutable.\n- `options` and `default_value` must remain consistent with the field's existing type — same rules as create.\n- Audited — changes are recorded in the audit log.", + "href": "/en/api-reference/on-call/alert-enrichment/field-write-update", "metadata": { - "sidebarTitle": "Update a comment type" + "sidebarTitle": "Update field" } } } }, - "/incident/create": { + "/incident/ack": { "post": { - "description": "Manually create a new incident and assign responders.", - "operationId": "incidentCreate", + "description": "Acknowledge an incident to indicate you are actively working on it.", + "operationId": "incidentAck", "requestBody": { "content": { "application/json": { "example": { - "assigned_to": { - "person_ids": [ - 2476444212131 - ] - }, - "channel_id": 2551105804131, - "incident_severity": "Critical", - "title": "Database connection timeout on prod-db-01" - }, - "schema": { - "$ref": "#/components/schemas/CreateIncidentRequest" - } - }, - "multipart/form-data": { - "encoding": { - "data": { - "contentType": "application/json" - } + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] }, "schema": { - "properties": { - "data": { - "description": "JSON-encoded CreateIncidentRequest payload.", - "type": "string" - }, - "images": { - "description": "Image files attached to the new incident.", - "items": { - "format": "binary", - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "data" - ], - "type": "object" + "$ref": "#/components/schemas/AckIncidentRequest" } } }, @@ -36961,10 +36757,7 @@ "content": { "application/json": { "example": { - "data": { - "incident_id": "69db2ef1a0fe7db6448b14f1", - "title": "API test incident for docs" - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -36975,7 +36768,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/CreateIncidentResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -36999,32 +36792,35 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create incident", + "summary": "Acknowledge incident", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- When an account create form applies, its visible custom fields and required system values must be supplied.\n- To attach images, send `multipart/form-data` with the JSON request in `data` and files in `images`; the complete request must not exceed 50 MiB.\n- Audited — changes are recorded in the audit log.", - "href": "/en/api-reference/on-call/incidents/incident-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- When an acknowledgement form applies, `custom_fields`, `summary`, and `images` must match its visible elements and required rules.\n- For a batch, form values are accepted only when every selected incident resolves to the same form; otherwise acknowledge incidents individually.\n- The legacy `values` and `custom_values` properties are rejected; use `custom_fields`.\n- Audited — changes are recorded in the audit log.", + "href": "/en/api-reference/on-call/incidents/incident-ack", "metadata": { - "sidebarTitle": "Create incident" + "sidebarTitle": "Acknowledge incident" } } } }, - "/incident/custom-action/do": { + "/incident/alert/list": { "post": { - "description": "Execute a custom action configured for an incident.", - "operationId": "incidentCustomActionDo", + "description": "List all alerts merged into a specific incident.", + "operationId": "incidentAlertList", "requestBody": { "content": { "application/json": { "example": { "incident_id": "69da451ef77b1b51f40e83ee", - "integration_id": 2490562293131 + "include_events": true, + "is_active": true, + "limit": 100, + "p": 1 }, "schema": { - "$ref": "#/components/schemas/DoIncidentCustomActionRequest" + "$ref": "#/components/schemas/ListIncidentAlertsRequest" } } }, @@ -37036,7 +36832,62 @@ "application/json": { "example": { "data": { - "message": "" + "items": [ + { + "account_id": 2451002751131, + "alert_id": "69da451df77b1b51f40e83de", + "alert_key": "100128:prom-203.0.113.107:A:1579244238440766834:anydata", + "alert_severity": "Critical", + "alert_status": "Critical", + "channel_id": 2551105804131, + "channel_name": "Ops Channel", + "channel_status": "enabled", + "created_at": 1775912221, + "data_source_id": 2490562293131, + "data_source_name": "FlashMonit", + "data_source_ref_id": "a_2451002751131", + "data_source_type": "monit.alert", + "description": "", + "end_time": 0, + "event_cnt": 17, + "events": [ + { + "alert_id": "69da451df77b1b51f40e83de", + "event_id": "69da451df77b1b51f40e83df", + "event_severity": "Critical", + "event_status": "Critical", + "event_time": 1712650000, + "labels": { + "host": "web-01" + }, + "title": "CPU usage > 90%" + } + ], + "ever_muted": false, + "images": null, + "incident": { + "incident_id": "69da451ef77b1b51f40e83ee", + "progress": "Triggered", + "title": "CPU usage high - web-server-01" + }, + "integration_id": 2490562293131, + "integration_name": "FlashMonit", + "integration_ref_id": "a_2451002751131", + "integration_type": "monit.alert", + "labels": { + "check": "cpu_usage_high", + "resource": "web-server-01" + }, + "last_time": 1775969819, + "responder_email": "", + "responder_name": "", + "start_time": 1775912219, + "title": "CPU usage high - web-server-01", + "title_rule": "", + "updated_at": 1775969821 + } + ], + "total": 1 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -37048,7 +36899,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/DoIncidentCustomActionResponse" + "$ref": "#/components/schemas/ListIncidentAlertsResponse" } }, "type": "object" @@ -37072,33 +36923,37 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Execute custom action", + "summary": "List alerts of incident", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-custom-action-do", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |\n\n## Usage\n\n- Set `include_events=true` only when you need a preview of each alert's raw events.\n- Event previews are capped at the 20 newest events per alert. Use `POST /alert/event/list` for a full paginated event history.\n- `event_cnt` still reports the total number of raw events merged into each alert.", + "href": "/en/api-reference/on-call/incidents/incident-alert-list", "metadata": { - "sidebarTitle": "Execute custom action" + "sidebarTitle": "List alerts of incident" } } } }, - "/incident/disable-merge": { + "/incident/assign": { "post": { - "description": "Disable automatic merging for a specific incident.", - "operationId": "incidentDisableMerge", + "description": "Dispatch an incident to a specific escalation level or responder.", + "operationId": "incidentAssign", "requestBody": { "content": { "application/json": { "example": { - "incident_ids": [ - "69da451ef77b1b51f40e83ee" - ] + "assigned_to": { + "person_ids": [ + 2476444212131 + ], + "type": "assign" + }, + "incident_id": "69da451ef77b1b51f40e83ee" }, "schema": { - "$ref": "#/components/schemas/DisableIncidentMergeRequest" + "$ref": "#/components/schemas/AssignIncidentRequest" } } }, @@ -37144,33 +36999,35 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Disable incident merge", + "summary": "Assign incident", "tags": [ "On-call/Incidents" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-disable-merge", + "href": "/en/api-reference/on-call/incidents/incident-assign", "metadata": { - "sidebarTitle": "Disable incident merge" + "sidebarTitle": "Assign incident" } } } }, - "/incident/feed": { + "/incident/comment": { "post": { - "description": "Retrieve the timeline feed for a specific incident, including state changes, comments and system events.", - "operationId": "incidentFeed", + "description": "Add a text comment to the incident timeline.", + "operationId": "incidentComment", "requestBody": { "content": { "application/json": { "example": { - "incident_id": "69da451ef77b1b51f40e83ee", - "limit": 20, - "p": 1 + "comment": "Root cause identified. [@Jane Doe](flashduty://ref/member/2476444212131) please verify the fix.", + "comment_type_id": "6a5895d672a064bc2d3ddfc2", + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] }, "schema": { - "$ref": "#/components/schemas/ListIncidentFeedRequest" + "$ref": "#/components/schemas/CommentIncidentRequest" } } }, @@ -37181,63 +37038,7 @@ "content": { "application/json": { "example": { - "data": { - "has_next_page": true, - "items": [ - { - "account_id": 2451002751131, - "created_at": 1785495329402, - "creator_id": 5329873302131, - "detail": { - "assignee_ids": [ - 3790925372131, - 4756301322131 - ], - "item_type": "follow_up", - "post_mortem_id": "51d65cd9525c369379ba471b5512df63", - "status": "open", - "title": "Follow-up: schedule database failover drill", - "work_item_id": "wi_68MHnkWBiyjrh6uhkxUyiZ" - }, - "ref_id": "6a5f1e28807515413b384bce", - "type": "i_wi_created", - "updated_at": 1785495329402 - }, - { - "account_id": 2451002751131, - "created_at": 1785496333926, - "creator_id": 3790925372131, - "detail": { - "comment": "Root cause identified: connection pool exhaustion on the primary database.", - "comment_type": { - "color": "#30A46C", - "id": "6a5895d672a064bc2d3ddfc2", - "name": "Key finding" - }, - "comment_type_id": "6a5895d672a064bc2d3ddfc2" - }, - "ref_id": "6a5f1e28807515413b384bce", - "type": "i_comm", - "updated_at": 1785496333926 - }, - { - "account_id": 2451002751131, - "created_at": 1785496384806, - "creator_id": 3790925372131, - "detail": { - "from_status": "open", - "item_type": "follow_up", - "post_mortem_id": "51d65cd9525c369379ba471b5512df63", - "title": "Follow-up: schedule database failover drill", - "to_status": "done", - "work_item_id": "wi_68MHnkWBiyjrh6uhkxUyiZ" - }, - "ref_id": "6a5f1e28807515413b384bce", - "type": "i_wi_completed", - "updated_at": 1785496384806 - } - ] - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -37248,7 +37049,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ListIncidentFeedResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -37272,33 +37073,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get incident timeline", + "summary": "Add comment to incident", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |\n\n## Usage\n\n- For `i_comm` entries, `detail.comment_type` is resolved from the current account-level comment type definition at read time, so it reflects the type's latest name and color.", - "href": "/en/api-reference/on-call/incidents/incident-feed", - "metadata": { - "sidebarTitle": "Get incident timeline" + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- To mention a member, embed a markdown link in `comment` in the form `[@Display Name](flashduty://ref/member/)`. Mentioned members receive a dedicated personal notification, which is not affected by `mute_reply`.\n- Plain `@name` text without the link syntax does not create a mention.\n- The server rewrites each mention's display label to the member's canonical name.", + "href": "/en/api-reference/on-call/incidents/incident-comment", + "metadata": { + "sidebarTitle": "Add comment to incident" } } } }, - "/incident/field/reset": { + "/incident/comment-type/create": { "post": { - "description": "Update a custom field value on an incident.", - "operationId": "incidentFieldReset", + "description": "Create a comment type that can be attached to incident comments.", + "operationId": "incidentCommentTypeCreate", "requestBody": { "content": { "application/json": { "example": { - "field_name": "affected_service", - "field_value": "payment-service", - "incident_id": "69da451ef77b1b51f40e83ee" + "color": "#30A46C", + "name": "Key finding" }, "schema": { - "$ref": "#/components/schemas/ResetIncidentFieldRequest" + "$ref": "#/components/schemas/CreateIncidentCommentTypeRequest" } } }, @@ -37309,7 +37109,20 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "comment_type_id": "6a5895d672a064bc2d3ddfc2", + "item": { + "account_id": 2451002751131, + "color": "#30A46C", + "comment_type_id": "6a5895d672a064bc2d3ddfc2", + "created_at": 1784190422, + "creator_id": 5068740052131, + "name": "Key finding", + "position": 1, + "updated_at": 1784207748, + "updated_by": 5068740052131 + } + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -37320,7 +37133,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/CreateIncidentCommentTypeResponse" } }, "type": "object" @@ -37344,31 +37157,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update incident custom field", + "summary": "Create a comment type", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-field-reset", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Comment Types Manage** (`on-call`) |\n\n## Usage\n\n- The new type is appended to the end of the display ordering.\n- The name must be unique within the account (case-insensitive, after trimming whitespace).\n- An account can have at most 10 comment types.\n- This permission is admin-only by default; custom roles must be granted it explicitly.", + "href": "/en/api-reference/on-call/incidents/incident-comment-type-create", "metadata": { - "sidebarTitle": "Update incident custom field" + "sidebarTitle": "Create a comment type" } } } }, - "/incident/info": { + "/incident/comment-type/delete": { "post": { - "description": "Retrieve detailed information for a single incident including timeline, alerts, responders and custom fields.", - "operationId": "incidentInfo", + "description": "Delete a comment type. Comments that used it keep their text but lose the type label.", + "operationId": "incidentCommentTypeDelete", "requestBody": { "content": { "application/json": { "example": { - "incident_id": "69da451ef77b1b51f40e83ee" + "comment_type_id": "6a5895b572a064bc2d3ddfc0" }, "schema": { - "$ref": "#/components/schemas/IncidentInfoRequest" + "$ref": "#/components/schemas/DeleteIncidentCommentTypeRequest" } } }, @@ -37379,84 +37192,99 @@ "content": { "application/json": { "example": { - "data": { - "account_id": 2451002751131, - "account_locale": "", - "account_name": "", - "account_time_zone": "", - "ack_time": 0, - "active_alert_cnt": 1, - "ai_summary": "", - "alert_cnt": 1, - "alert_event_cnt": 17, - "assigned_to": { - "assigned_at": 1775972128, - "escalate_rule_id": "000000000000000000000000", - "escalate_rule_name": "", - "id": "MvQfH9Dc8eNS8k79jmrWn6", - "layer_idx": 0, - "person_ids": [ - 2476444212131 - ], - "type": "assign" - }, - "channel_id": 2551105804131, - "channel_name": "Ops Channel", - "channel_status": "enabled", - "close_time": 0, - "closer_id": 0, - "created_at": 1775912222, - "creator_id": 0, - "dedup_key": "100128:prom-203.0.113.107:A:1579244238440766834:anydata", - "description": "", - "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee", - "end_time": 0, - "equals_md5": "", - "ever_muted": false, - "fields": {}, - "frequency": "frequent", - "group_method": "n", - "images": null, - "impact": "", - "incident_id": "69da451ef77b1b51f40e83ee", - "incident_severity": "Critical", - "incident_status": "Critical", - "integration_id": 2490562293131, - "integration_ids": [ - 2490562293131 - ], - "integration_type": "monit.alert", - "integration_types": [ - "monit.alert" - ], - "labels": { - "check": "cpu_usage_high", - "env": "production", - "resource": "web-server-01" + "data": {}, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" }, - "last_time": 1775969819, - "manual_overrides": [ - "title" - ], - "num": "0E83EE", - "owner_id": 0, - "post_mortem_id": "", - "progress": "Triggered", - "resolution": "", - "responders": [ + { + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "summary": "Delete a comment type", + "tags": [ + "On-call/Incidents" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Comment Types Manage** (`on-call`) |\n\n## Usage\n\n- Hard delete — the comment type is removed permanently and cannot be restored.\n- Existing comments that referenced the type lose the type label but are not otherwise affected.\n- This permission is admin-only by default; custom roles must be granted it explicitly.", + "href": "/en/api-reference/on-call/incidents/incident-comment-type-delete", + "metadata": { + "sidebarTitle": "Delete a comment type" + } + } + } + }, + "/incident/comment-type/list": { + "post": { + "description": "Retrieve all comment types of the account, ordered by their display position.", + "operationId": "incidentCommentTypeList", + "requestBody": { + "content": { + "application/json": { + "example": {}, + "schema": { + "$ref": "#/components/schemas/ListIncidentCommentTypesRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": { + "items": [ { - "acknowledged_at": 0, - "assigned_at": 1775972128, - "person_id": 2476444212131 + "account_id": 2451002751131, + "color": "#30A46C", + "comment_type_id": "6a5895d672a064bc2d3ddfc2", + "created_at": 1784190422, + "creator_id": 5068740052131, + "name": "Key finding", + "position": 1, + "updated_at": 1784207748, + "updated_by": 5068740052131 + }, + { + "account_id": 2451002751131, + "color": "#998000", + "comment_type_id": "6a5895b572a064bc2d3ddfc0", + "created_at": 1784190389, + "creator_id": 5068740052131, + "name": "Hypothesis", + "position": 2, + "updated_at": 1785141535, + "updated_by": 3790925372131 } - ], - "root_cause": "", - "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee", - "snoozed_before": 0, - "start_time": 1775912219, - "team_id": 2477033058131, - "title": "CPU usage high - web-server-01", - "updated_at": 1775972145 + ] }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -37468,7 +37296,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/IncidentInfo" + "$ref": "#/components/schemas/ListIncidentCommentTypesResponse" } }, "type": "object" @@ -37492,39 +37320,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get incident detail", + "summary": "List comment types", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |\n\n## Usage\n\n- Returns the full list in one call — there is no pagination.\n- An account can have at most 10 comment types.", + "href": "/en/api-reference/on-call/incidents/incident-comment-type-list", "metadata": { - "sidebarTitle": "Get incident detail" + "sidebarTitle": "List comment types" } } } }, - "/incident/list": { + "/incident/comment-type/reorder": { "post": { - "description": "Query a paginated list of incidents with filters by channel, severity, status, responder, and time range.", - "operationId": "incidentList", + "description": "Set the display order of all comment types by passing every type ID in the desired order.", + "operationId": "incidentCommentTypeReorder", "requestBody": { "content": { "application/json": { "example": { - "channel_ids": [ - 2551105804131 - ], - "end_time": 1712000000, - "incident_severity": "Critical,Warning", - "limit": 20, - "p": 1, - "progress": "Triggered,Processing", - "start_time": 1711900800 + "comment_type_ids": [ + "6a5895b572a064bc2d3ddfc0", + "6a5895d672a064bc2d3ddfc2" + ] }, "schema": { - "$ref": "#/components/schemas/ListIncidentsRequest" + "$ref": "#/components/schemas/ReorderIncidentCommentTypesRequest" } } }, @@ -37535,92 +37358,7 @@ "content": { "application/json": { "example": { - "data": { - "has_next_page": true, - "items": [ - { - "account_id": 2451002751131, - "account_locale": "", - "account_name": "", - "account_time_zone": "", - "ack_time": 0, - "active_alert_cnt": 1, - "ai_summary": "", - "alert_cnt": 1, - "alert_event_cnt": 17, - "assigned_to": { - "assigned_at": 1775972128, - "escalate_rule_id": "000000000000000000000000", - "escalate_rule_name": "", - "id": "MvQfH9Dc8eNS8k79jmrWn6", - "layer_idx": 0, - "person_ids": [ - 2476444212131 - ], - "type": "assign" - }, - "channel_id": 2551105804131, - "channel_name": "Ops Channel", - "channel_status": "enabled", - "close_time": 0, - "closer_id": 0, - "created_at": 1775912222, - "creator_id": 0, - "dedup_key": "100128:prom-203.0.113.107:A:1579244238440766834:anydata", - "description": "", - "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee", - "end_time": 0, - "equals_md5": "", - "ever_muted": false, - "fields": {}, - "frequency": "frequent", - "group_method": "n", - "images": null, - "impact": "", - "incident_id": "69da451ef77b1b51f40e83ee", - "incident_severity": "Critical", - "incident_status": "Critical", - "integration_id": 2490562293131, - "integration_ids": [ - 2490562293131 - ], - "integration_type": "monit.alert", - "integration_types": [ - "monit.alert" - ], - "labels": { - "check": "cpu_usage_high", - "env": "production", - "resource": "web-server-01" - }, - "last_time": 1775969819, - "manual_overrides": [ - "title" - ], - "num": "0E83EE", - "owner_id": 0, - "post_mortem_id": "", - "progress": "Triggered", - "resolution": "", - "responders": [ - { - "acknowledged_at": 0, - "assigned_at": 1775972128, - "person_id": 2476444212131 - } - ], - "root_cause": "", - "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee", - "snoozed_before": 0, - "start_time": 1775912219, - "team_id": 2477033058131, - "title": "CPU usage high - web-server-01", - "updated_at": 1775972145 - } - ], - "search_after_ctx": "69da451ef77b1b51f40e83eb", - "total": 88 - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -37631,7 +37369,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/IncidentListResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -37655,34 +37393,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List incidents", + "summary": "Reorder comment types", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Comment Types Manage** (`on-call`) |\n\n## Usage\n\n- Full-set reorder — `comment_type_ids` must contain every comment type of the account, each exactly once, in the desired order.\n- Positions are reassigned starting from 1: the first ID in the array becomes position 1.\n- This permission is admin-only by default; custom roles must be granted it explicitly.", + "href": "/en/api-reference/on-call/incidents/incident-comment-type-reorder", "metadata": { - "sidebarTitle": "List incidents" + "sidebarTitle": "Reorder comment types" } } } }, - "/incident/list-by-ids": { + "/incident/comment-type/update": { "post": { - "description": "Retrieve multiple incidents by their IDs in a single request.", - "operationId": "incidentListByIds", + "description": "Update the name and/or color of an existing account comment type.", + "operationId": "incidentCommentTypeUpdate", "requestBody": { "content": { "application/json": { "example": { - "incident_ids": [ - "69da451ef77b1b51f40e83ee", - "69da451ef77b1b51f40e83ef" - ] + "color": "#B7791F", + "comment_type_id": "6a5895b572a064bc2d3ddfc0" }, "schema": { - "$ref": "#/components/schemas/ListIncidentsByIdsRequest" + "$ref": "#/components/schemas/UpdateIncidentCommentTypeRequest" } } }, @@ -37693,76 +37429,7 @@ "content": { "application/json": { "example": { - "data": { - "has_next_page": false, - "items": [ - { - "account_id": 2451002751131, - "account_locale": "", - "account_name": "", - "account_time_zone": "", - "ack_time": 0, - "active_alert_cnt": 1, - "ai_summary": "", - "alert_cnt": 1, - "alert_event_cnt": 17, - "assigned_to": { - "assigned_at": 0, - "escalate_rule_id": "000000000000000000000000", - "escalate_rule_name": "", - "id": "", - "layer_idx": 0, - "type": "" - }, - "channel_id": 2551105804131, - "channel_name": "Ops Channel", - "channel_status": "enabled", - "close_time": 0, - "closer_id": 0, - "created_at": 1775912222, - "creator_id": 0, - "dedup_key": "100128:prom-203.0.113.107:A:1579244238440766834:anydata", - "description": "", - "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee", - "end_time": 0, - "equals_md5": "", - "ever_muted": false, - "fields": {}, - "frequency": "frequent", - "group_method": "n", - "images": null, - "impact": "", - "incident_id": "69da451ef77b1b51f40e83ee", - "incident_severity": "Critical", - "incident_status": "Critical", - "integration_id": 2490562293131, - "integration_ids": [ - 2490562293131 - ], - "integration_type": "monit.alert", - "integration_types": [ - "monit.alert" - ], - "labels": {}, - "last_time": 1775969819, - "manual_overrides": null, - "num": "0E83EE", - "owner_id": 0, - "post_mortem_id": "", - "progress": "Triggered", - "resolution": "", - "responders": [], - "root_cause": "", - "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee", - "snoozed_before": 0, - "start_time": 1775912219, - "team_id": 2477033058131, - "title": "CPU usage high - web-server-01", - "updated_at": 1775972145 - } - ], - "total": 2 - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -37773,7 +37440,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/IncidentListResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -37797,36 +37464,65 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List incidents by IDs", + "summary": "Update a comment type", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-list-by-ids", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Comment Types Manage** (`on-call`) |\n\n## Usage\n\n- Partial update — only the provided fields are changed, but at least one of `name` or `color` must be provided.\n- The name must remain unique within the account (case-insensitive, after trimming whitespace).\n- This permission is admin-only by default; custom roles must be granted it explicitly.", + "href": "/en/api-reference/on-call/incidents/incident-comment-type-update", "metadata": { - "sidebarTitle": "List incidents by IDs" + "sidebarTitle": "Update a comment type" } } } }, - "/incident/merge": { + "/incident/create": { "post": { - "description": "Merge one or more incidents into a target incident.", - "operationId": "incidentMerge", + "description": "Manually create a new incident and assign responders.", + "operationId": "incidentCreate", "requestBody": { "content": { "application/json": { "example": { - "comment": "Merging related database connectivity incidents into one.", - "source_incident_ids": [ - "69da451ef77b1b51f40e83ef", - "69da451ef77b1b51f40e83f0" - ], - "target_incident_id": "69da451ef77b1b51f40e83ee" + "assigned_to": { + "person_ids": [ + 2476444212131 + ] + }, + "channel_id": 2551105804131, + "incident_severity": "Critical", + "title": "Database connection timeout on prod-db-01" }, "schema": { - "$ref": "#/components/schemas/MergeIncidentsRequest" + "$ref": "#/components/schemas/CreateIncidentRequest" + } + }, + "multipart/form-data": { + "encoding": { + "data": { + "contentType": "application/json" + } + }, + "schema": { + "properties": { + "data": { + "description": "JSON-encoded CreateIncidentRequest payload.", + "type": "string" + }, + "images": { + "description": "Image files attached to the new incident.", + "items": { + "format": "binary", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "data" + ], + "type": "object" } } }, @@ -37837,7 +37533,10 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "incident_id": "69db2ef1a0fe7db6448b14f1", + "title": "API test incident for docs" + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -37848,7 +37547,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/CreateIncidentResponse" } }, "type": "object" @@ -37872,32 +37571,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Merge incidents", + "summary": "Create incident", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-merge", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- When an account create form applies, its visible custom fields and required system values must be supplied.\n- To attach images, send `multipart/form-data` with the JSON request in `data` and files in `images`; the complete request must not exceed 50 MiB.\n- Audited — changes are recorded in the audit log.", + "href": "/en/api-reference/on-call/incidents/incident-create", "metadata": { - "sidebarTitle": "Merge incidents" + "sidebarTitle": "Create incident" } } } }, - "/incident/past/list": { + "/incident/custom-action/do": { "post": { - "description": "List historical incidents related to the current incident for reference during triage.", - "operationId": "incidentPastList", + "description": "Execute a custom action configured for an incident.", + "operationId": "incidentCustomActionDo", "requestBody": { "content": { "application/json": { "example": { "incident_id": "69da451ef77b1b51f40e83ee", - "limit": 5 + "integration_id": 2490562293131 }, "schema": { - "$ref": "#/components/schemas/ListPastIncidentsRequest" + "$ref": "#/components/schemas/DoIncidentCustomActionRequest" } } }, @@ -37909,7 +37608,7 @@ "application/json": { "example": { "data": { - "items": [] + "message": "" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -37921,7 +37620,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ListPastIncidentsResponse" + "$ref": "#/components/schemas/DoIncidentCustomActionResponse" } }, "type": "object" @@ -37945,38 +37644,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List past incidents", + "summary": "Execute custom action", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/minute**; **20 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-past-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-custom-action-do", "metadata": { - "sidebarTitle": "List past incidents" + "sidebarTitle": "Execute custom action" } } } }, - "/incident/post-mortem/basics/reset": { + "/incident/disable-merge": { "post": { - "description": "Replace the incident facts stored in a post-mortem report.", - "operationId": "postmortem-write-reset-basics", + "description": "Disable automatic merging for a specific incident.", + "operationId": "incidentDisableMerge", "requestBody": { "content": { "application/json": { "example": { - "incidents_earliest_start_seconds": 1761133512, - "incidents_highest_severity": "Warning", - "incidents_latest_close_seconds": 1761133632, - "incidents_total_duration_seconds": 120, - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", - "responder_ids": [ - 3790925372131 + "incident_ids": [ + "69da451ef77b1b51f40e83ee" ] }, "schema": { - "$ref": "#/components/schemas/ResetPostMortemBasicsRequest" + "$ref": "#/components/schemas/DisableIncidentMergeRequest" } } }, @@ -38022,34 +37716,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update post-mortem basics", + "summary": "Disable incident merge", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/incidents/postmortem-write-reset-basics", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-disable-merge", "metadata": { - "sidebarTitle": "Update post-mortem basics" + "sidebarTitle": "Disable incident merge" } } } }, - "/incident/post-mortem/content/reset": { + "/incident/feed": { "post": { - "description": "Replace the body of a drafting post-mortem report with Markdown.", - "operationId": "incident-post-mortem-write-reset-content", + "description": "Retrieve the timeline feed for a specific incident, including state changes, comments and system events.", + "operationId": "incidentFeed", "requestBody": { "content": { "application/json": { "example": { - "expected_revision": 11, - "idempotency_key": "postmortem-reset-8104935102-11", - "markdown": "# Database saturation incident\n\nThe database pool was exhausted; added saturation alert.", - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e" + "incident_id": "69da451ef77b1b51f40e83ee", + "limit": 20, + "p": 1 }, "schema": { - "$ref": "#/components/schemas/ResetPostMortemContentRequest" + "$ref": "#/components/schemas/ListIncidentFeedRequest" } } }, @@ -38061,13 +37754,61 @@ "application/json": { "example": { "data": { - "generation": 2, - "markdown_bytes": 88, - "markdown_sha256": "70d764e77e68f8fbfa14d72a235ac07b0110768b8380c8e3436459ebaf02a7c0", - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", - "previous_generation": 1, - "previous_revision": 11, - "revision": 12 + "has_next_page": true, + "items": [ + { + "account_id": 2451002751131, + "created_at": 1785495329402, + "creator_id": 5329873302131, + "detail": { + "assignee_ids": [ + 3790925372131, + 4756301322131 + ], + "item_type": "follow_up", + "post_mortem_id": "51d65cd9525c369379ba471b5512df63", + "status": "open", + "title": "Follow-up: schedule database failover drill", + "work_item_id": "wi_68MHnkWBiyjrh6uhkxUyiZ" + }, + "ref_id": "6a5f1e28807515413b384bce", + "type": "i_wi_created", + "updated_at": 1785495329402 + }, + { + "account_id": 2451002751131, + "created_at": 1785496333926, + "creator_id": 3790925372131, + "detail": { + "comment": "Root cause identified: connection pool exhaustion on the primary database.", + "comment_type": { + "color": "#30A46C", + "id": "6a5895d672a064bc2d3ddfc2", + "name": "Key finding" + }, + "comment_type_id": "6a5895d672a064bc2d3ddfc2" + }, + "ref_id": "6a5f1e28807515413b384bce", + "type": "i_comm", + "updated_at": 1785496333926 + }, + { + "account_id": 2451002751131, + "created_at": 1785496384806, + "creator_id": 3790925372131, + "detail": { + "from_status": "open", + "item_type": "follow_up", + "post_mortem_id": "51d65cd9525c369379ba471b5512df63", + "title": "Follow-up: schedule database failover drill", + "to_status": "done", + "work_item_id": "wi_68MHnkWBiyjrh6uhkxUyiZ" + }, + "ref_id": "6a5f1e28807515413b384bce", + "type": "i_wi_completed", + "updated_at": 1785496384806 + } + ] }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -38079,7 +37820,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/PostMortemContentResetResponse" + "$ref": "#/components/schemas/ListIncidentFeedResponse" } }, "type": "object" @@ -38096,70 +37837,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "409": { - "content": { - "application/json": { - "example": { - "error": { - "code": "Conflict", - "message": "expected_revision conflict: request has 11 but current revision is 12" - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "properties": { - "error": { - "properties": { - "code": { - "enum": [ - "Conflict" - ], - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": [ - "code", - "message" - ], - "type": "object" - }, - "request_id": { - "type": "string" - } - }, - "required": [ - "request_id", - "error" - ], - "type": "object" - } - } - }, - "description": "The report is not drafting, the revision is stale, or the idempotency key was reused for a different request." - }, - "413": { - "content": { - "application/json": { - "example": { - "error": { - "code": "EntityTooLarge", - "message": "markdown exceeds maximum size" - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Markdown content exceeds the 4 MiB limit." - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -38167,31 +37844,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Reset post-mortem content", + "summary": "Get incident timeline", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | Edit access to the target report is required. |\n\n## Usage\n\n- The report must be drafting and its current revision must equal `expected_revision`; otherwise the API returns `409 Conflict`.\n- Reuse an `idempotency_key` only for the same report, revision, and Markdown content; different reuse returns `409 Conflict`.\n- A successful reset disconnects the previous collaboration (Yjs) room. Reconnect to the new generation room `post-mortem-{accountId}-{postMortemId}-g{N}` (generation 0 has no `-g` suffix). The reset cannot be rolled back.\n- Markdown content is limited to 4 MiB.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/incidents/incident-post-mortem-write-reset-content", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |\n\n## Usage\n\n- For `i_comm` entries, `detail.comment_type` is resolved from the current account-level comment type definition at read time, so it reflects the type's latest name and color.", + "href": "/en/api-reference/on-call/incidents/incident-feed", "metadata": { - "sidebarTitle": "Reset post-mortem content" + "sidebarTitle": "Get incident timeline" } } } }, - "/incident/post-mortem/delete": { + "/incident/field/reset": { "post": { - "description": "Delete a post-mortem report.", - "operationId": "incidentPostMortemDelete", + "description": "Update a custom field value on an incident.", + "operationId": "incidentFieldReset", "requestBody": { "content": { "application/json": { "example": { - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e" + "field_name": "affected_service", + "field_value": "payment-service", + "incident_id": "69da451ef77b1b51f40e83ee" }, "schema": { - "$ref": "#/components/schemas/DeletePostMortemRequest" + "$ref": "#/components/schemas/ResetIncidentFieldRequest" } } }, @@ -38237,32 +37916,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete post-mortem", + "summary": "Update incident custom field", "tags": [ "On-call/Incidents" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-post-mortem-delete", + "href": "/en/api-reference/on-call/incidents/incident-field-reset", "metadata": { - "sidebarTitle": "Delete post-mortem" + "sidebarTitle": "Update incident custom field" } } } }, - "/incident/post-mortem/follow-ups/reset": { + "/incident/info": { "post": { - "description": "Replace the follow-up action items on a post-mortem report.", - "operationId": "postmortem-write-reset-follow-ups", + "description": "Retrieve detailed information for a single incident including timeline, alerts, responders and custom fields.", + "operationId": "incidentInfo", "requestBody": { "content": { "application/json": { "example": { - "follow_ups": "- Add database saturation alert\n- Review cache TTL rollout", - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e" + "incident_id": "69da451ef77b1b51f40e83ee" }, "schema": { - "$ref": "#/components/schemas/ResetPostMortemFollowUpsRequest" + "$ref": "#/components/schemas/IncidentInfoRequest" } } }, @@ -38273,23 +37951,101 @@ "content": { "application/json": { "example": { - "data": {}, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" + "data": { + "account_id": 2451002751131, + "account_locale": "", + "account_name": "", + "account_time_zone": "", + "ack_time": 0, + "active_alert_cnt": 1, + "ai_summary": "", + "alert_cnt": 1, + "alert_event_cnt": 17, + "assigned_to": { + "assigned_at": 1775972128, + "escalate_rule_id": "000000000000000000000000", + "escalate_rule_name": "", + "id": "MvQfH9Dc8eNS8k79jmrWn6", + "layer_idx": 0, + "person_ids": [ + 2476444212131 + ], + "type": "assign" }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/EmptyResponse" - } - }, - "type": "object" - } - ] + "channel_id": 2551105804131, + "channel_name": "Ops Channel", + "channel_status": "enabled", + "close_time": 0, + "closer_id": 0, + "created_at": 1775912222, + "creator_id": 0, + "dedup_key": "100128:prom-203.0.113.107:A:1579244238440766834:anydata", + "description": "", + "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee", + "end_time": 0, + "equals_md5": "", + "ever_muted": false, + "fields": {}, + "frequency": "frequent", + "group_method": "n", + "images": null, + "impact": "", + "incident_id": "69da451ef77b1b51f40e83ee", + "incident_severity": "Critical", + "incident_status": "Critical", + "integration_id": 2490562293131, + "integration_ids": [ + 2490562293131 + ], + "integration_type": "monit.alert", + "integration_types": [ + "monit.alert" + ], + "labels": { + "check": "cpu_usage_high", + "env": "production", + "resource": "web-server-01" + }, + "last_time": 1775969819, + "manual_overrides": [ + "title" + ], + "num": "0E83EE", + "owner_id": 0, + "post_mortem_id": "", + "progress": "Triggered", + "resolution": "", + "responders": [ + { + "acknowledged_at": 0, + "assigned_at": 1775972128, + "person_id": 2476444212131 + } + ], + "root_cause": "", + "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee", + "snoozed_before": 0, + "start_time": 1775912219, + "team_id": 2477033058131, + "title": "CPU usage high - web-server-01", + "updated_at": 1775972145 + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/IncidentInfo" + } + }, + "type": "object" + } + ] } } }, @@ -38308,77 +38064,134 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update post-mortem follow-ups", + "summary": "Get incident detail", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/incidents/postmortem-write-reset-follow-ups", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-info", "metadata": { - "sidebarTitle": "Update post-mortem follow-ups" + "sidebarTitle": "Get incident detail" } } } }, - "/incident/post-mortem/info": { - "get": { - "description": "Retrieve a post-mortem report by its `post_mortem_id`. List reports via `/incident/post-mortem/list` first — each row carries the incident it covers — then fetch the full report here by that id.", - "operationId": "incidentPostMortemInfo", - "parameters": [ - { - "description": "Post-mortem ID. Deterministic hash derived from account ID and the set of linked incident IDs.", - "in": "query", - "name": "post_mortem_id", - "required": true, - "schema": { - "type": "string" + "/incident/list": { + "post": { + "description": "Query a paginated list of incidents with filters by channel, severity, status, responder, and time range.", + "operationId": "incidentList", + "requestBody": { + "content": { + "application/json": { + "example": { + "channel_ids": [ + 2551105804131 + ], + "end_time": 1712000000, + "incident_severity": "Critical,Warning", + "limit": 20, + "p": 1, + "progress": "Triggered,Processing", + "start_time": 1711900800 + }, + "schema": { + "$ref": "#/components/schemas/ListIncidentsRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "example": { "data": { - "basics": { - "incidents_earliest_start_seconds": 1761133512, - "incidents_highest_severity": "Warning", - "incidents_latest_close_seconds": 1761133632, - "incidents_total_duration_seconds": 120, - "responders": [ - { - "acknowledged_at": 0, - "assigned_at": 1761133515, - "person_id": 3790925372131 - } - ] - }, - "content": { - "content": "{\"type\":\"doc\",\"content\":[]}" - }, - "follow_ups": "", - "meta": { - "account_id": 2451002751131, - "author_ids": [ - 2477273692131 - ], - "channel_id": 3047621227131, - "channel_name": "Ops Channel", - "created_at_seconds": 1773900354, - "incident_ids": [ - "69bb9233331067560c718ecd" - ], - "is_private": false, - "media_count": 0, - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", - "status": "published", - "team_id": 2477033058131, - "template_id": "post_mortem_default_tmpl_en-us", - "title": "Postmortem1", - "updated_at_seconds": 1773909012 - } + "has_next_page": true, + "items": [ + { + "account_id": 2451002751131, + "account_locale": "", + "account_name": "", + "account_time_zone": "", + "ack_time": 0, + "active_alert_cnt": 1, + "ai_summary": "", + "alert_cnt": 1, + "alert_event_cnt": 17, + "assigned_to": { + "assigned_at": 1775972128, + "escalate_rule_id": "000000000000000000000000", + "escalate_rule_name": "", + "id": "MvQfH9Dc8eNS8k79jmrWn6", + "layer_idx": 0, + "person_ids": [ + 2476444212131 + ], + "type": "assign" + }, + "channel_id": 2551105804131, + "channel_name": "Ops Channel", + "channel_status": "enabled", + "close_time": 0, + "closer_id": 0, + "created_at": 1775912222, + "creator_id": 0, + "dedup_key": "100128:prom-203.0.113.107:A:1579244238440766834:anydata", + "description": "", + "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee", + "end_time": 0, + "equals_md5": "", + "ever_muted": false, + "fields": {}, + "frequency": "frequent", + "group_method": "n", + "images": null, + "impact": "", + "incident_id": "69da451ef77b1b51f40e83ee", + "incident_severity": "Critical", + "incident_status": "Critical", + "integration_id": 2490562293131, + "integration_ids": [ + 2490562293131 + ], + "integration_type": "monit.alert", + "integration_types": [ + "monit.alert" + ], + "labels": { + "check": "cpu_usage_high", + "env": "production", + "resource": "web-server-01" + }, + "last_time": 1775969819, + "manual_overrides": [ + "title" + ], + "num": "0E83EE", + "owner_id": 0, + "post_mortem_id": "", + "progress": "Triggered", + "resolution": "", + "responders": [ + { + "acknowledged_at": 0, + "assigned_at": 1775972128, + "person_id": 2476444212131 + } + ], + "root_cause": "", + "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee", + "snoozed_before": 0, + "start_time": 1775912219, + "team_id": 2477033058131, + "title": "CPU usage high - web-server-01", + "updated_at": 1775972145 + } + ], + "search_after_ctx": "69da451ef77b1b51f40e83eb", + "total": 88 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -38390,7 +38203,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/PostMortemItem" + "$ref": "#/components/schemas/IncidentListResponse" } }, "type": "object" @@ -38414,34 +38227,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get post-mortem", + "summary": "List incidents", "tags": [ "On-call/Incidents" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-post-mortem-info", + "href": "/en/api-reference/on-call/incidents/incident-list", "metadata": { - "sidebarTitle": "Get post-mortem" + "sidebarTitle": "List incidents" } } } }, - "/incident/post-mortem/init": { + "/incident/list-by-ids": { "post": { - "description": "Create a post-mortem draft from one or more incidents and a template.", - "operationId": "postmortem-write-init", + "description": "Retrieve multiple incidents by their IDs in a single request.", + "operationId": "incidentListByIds", "requestBody": { "content": { "application/json": { "example": { "incident_ids": [ - "69bb9233331067560c718ecd" - ], - "template_id": "post_mortem_default_tmpl_en-us" + "69da451ef77b1b51f40e83ee", + "69da451ef77b1b51f40e83ef" + ] }, "schema": { - "$ref": "#/components/schemas/InitPostMortemRequest" + "$ref": "#/components/schemas/ListIncidentsByIdsRequest" } } }, @@ -38453,43 +38266,74 @@ "application/json": { "example": { "data": { - "basics": { - "incidents_earliest_start_seconds": 1761133512, - "incidents_highest_severity": "Warning", - "incidents_latest_close_seconds": 1761133632, - "incidents_total_duration_seconds": 120, - "responders": [ - { - "acknowledged_at": 0, - "assigned_at": 1761133515, - "person_id": 3790925372131 - } - ] - }, - "content": { - "content": "{\"type\":\"doc\",\"content\":[]}" - }, - "follow_ups": "", - "meta": { - "account_id": 2451002751131, - "author_ids": [ - 2477273692131 - ], - "channel_id": 3047621227131, - "channel_name": "Ops Channel", - "created_at_seconds": 1773900354, - "incident_ids": [ - "69bb9233331067560c718ecd" - ], - "is_private": false, - "media_count": 0, - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", - "status": "published", - "team_id": 2477033058131, - "template_id": "post_mortem_default_tmpl_en-us", - "title": "Postmortem1", - "updated_at_seconds": 1773909012 - } + "has_next_page": false, + "items": [ + { + "account_id": 2451002751131, + "account_locale": "", + "account_name": "", + "account_time_zone": "", + "ack_time": 0, + "active_alert_cnt": 1, + "ai_summary": "", + "alert_cnt": 1, + "alert_event_cnt": 17, + "assigned_to": { + "assigned_at": 0, + "escalate_rule_id": "000000000000000000000000", + "escalate_rule_name": "", + "id": "", + "layer_idx": 0, + "type": "" + }, + "channel_id": 2551105804131, + "channel_name": "Ops Channel", + "channel_status": "enabled", + "close_time": 0, + "closer_id": 0, + "created_at": 1775912222, + "creator_id": 0, + "dedup_key": "100128:prom-203.0.113.107:A:1579244238440766834:anydata", + "description": "", + "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee", + "end_time": 0, + "equals_md5": "", + "ever_muted": false, + "fields": {}, + "frequency": "frequent", + "group_method": "n", + "images": null, + "impact": "", + "incident_id": "69da451ef77b1b51f40e83ee", + "incident_severity": "Critical", + "incident_status": "Critical", + "integration_id": 2490562293131, + "integration_ids": [ + 2490562293131 + ], + "integration_type": "monit.alert", + "integration_types": [ + "monit.alert" + ], + "labels": {}, + "last_time": 1775969819, + "manual_overrides": null, + "num": "0E83EE", + "owner_id": 0, + "post_mortem_id": "", + "progress": "Triggered", + "resolution": "", + "responders": [], + "root_cause": "", + "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee", + "snoozed_before": 0, + "start_time": 1775912219, + "team_id": 2477033058131, + "title": "CPU usage high - web-server-01", + "updated_at": 1775972145 + } + ], + "total": 2 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -38501,7 +38345,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/PostMortemItem" + "$ref": "#/components/schemas/IncidentListResponse" } }, "type": "object" @@ -38525,33 +38369,36 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Initialize post-mortem", + "summary": "List incidents by IDs", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Links at most 10 incidents to one post-mortem report.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/incidents/postmortem-write-init", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-list-by-ids", "metadata": { - "sidebarTitle": "Initialize post-mortem" + "sidebarTitle": "List incidents by IDs" } } } }, - "/incident/post-mortem/list": { + "/incident/merge": { "post": { - "description": "List post-mortem reports with optional filters.", - "operationId": "incidentPostMortemList", + "description": "Merge one or more incidents into a target incident.", + "operationId": "incidentMerge", "requestBody": { "content": { "application/json": { "example": { - "limit": 20, - "p": 1, - "status": "published" + "comment": "Merging related database connectivity incidents into one.", + "source_incident_ids": [ + "69da451ef77b1b51f40e83ef", + "69da451ef77b1b51f40e83f0" + ], + "target_incident_id": "69da451ef77b1b51f40e83ee" }, "schema": { - "$ref": "#/components/schemas/ListPostMortemsRequest" + "$ref": "#/components/schemas/MergeIncidentsRequest" } } }, @@ -38562,32 +38409,7 @@ "content": { "application/json": { "example": { - "data": { - "has_next_page": false, - "items": [ - { - "account_id": 2451002751131, - "author_ids": [ - 2477273692131 - ], - "channel_id": 3047621227131, - "channel_name": "Ops Channel", - "created_at_seconds": 1773900354, - "incident_ids": [ - "69bb9233331067560c718ecd" - ], - "is_private": false, - "media_count": 0, - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", - "status": "published", - "team_id": 2477033058131, - "template_id": "post_mortem_default_tmpl_en-us", - "title": "Postmortem1", - "updated_at_seconds": 1773909012 - } - ], - "total": 3 - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -38598,7 +38420,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ListPostMortemsResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -38622,32 +38444,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List post-mortems", + "summary": "Merge incidents", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-post-mortem-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-merge", "metadata": { - "sidebarTitle": "List post-mortems" + "sidebarTitle": "Merge incidents" } } } }, - "/incident/post-mortem/status/reset": { + "/incident/past/list": { "post": { - "description": "Set a post-mortem report to drafting or published.", - "operationId": "postmortem-write-reset-status", + "description": "List historical incidents related to the current incident for reference during triage.", + "operationId": "incidentPastList", "requestBody": { "content": { "application/json": { "example": { - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", - "status": "published" + "incident_id": "69da451ef77b1b51f40e83ee", + "limit": 5 }, "schema": { - "$ref": "#/components/schemas/ResetPostMortemStatusRequest" + "$ref": "#/components/schemas/ListPastIncidentsRequest" } } }, @@ -38658,7 +38480,9 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "items": [] + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -38669,7 +38493,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/ListPastIncidentsResponse" } }, "type": "object" @@ -38693,31 +38517,38 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update post-mortem status", + "summary": "List past incidents", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/incidents/postmortem-write-reset-status", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/minute**; **20 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-past-list", "metadata": { - "sidebarTitle": "Update post-mortem status" + "sidebarTitle": "List past incidents" } } } }, - "/incident/post-mortem/template/delete": { + "/incident/post-mortem/basics/reset": { "post": { - "description": "Delete a custom post-mortem template.", - "operationId": "postmortem-write-delete-template", + "description": "Replace the incident facts stored in a post-mortem report.", + "operationId": "postmortem-write-reset-basics", "requestBody": { "content": { "application/json": { "example": { - "template_id": "post_mortem_custom_tmpl_01" + "incidents_earliest_start_seconds": 1761133512, + "incidents_highest_severity": "Warning", + "incidents_latest_close_seconds": 1761133632, + "incidents_total_duration_seconds": 120, + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "responder_ids": [ + 3790925372131 + ] }, "schema": { - "$ref": "#/components/schemas/DeletePostMortemTemplateRequest" + "$ref": "#/components/schemas/ResetPostMortemBasicsRequest" } } }, @@ -38763,49 +38594,52 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete post-mortem template", + "summary": "Update post-mortem basics", "tags": [ "On-call/Incidents" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/incidents/postmortem-write-delete-template", + "href": "/en/api-reference/on-call/incidents/postmortem-write-reset-basics", "metadata": { - "sidebarTitle": "Delete post-mortem template" + "sidebarTitle": "Update post-mortem basics" } } } }, - "/incident/post-mortem/template/info": { - "get": { - "description": "Return one post-mortem template by ID.", - "operationId": "postmortem-read-template-info", - "parameters": [ - { - "description": "Template ID.", - "in": "query", - "name": "template_id", - "required": true, - "schema": { - "type": "string" + "/incident/post-mortem/content/reset": { + "post": { + "description": "Replace the body of a drafting post-mortem report with Markdown.", + "operationId": "incident-post-mortem-write-reset-content", + "requestBody": { + "content": { + "application/json": { + "example": { + "expected_revision": 11, + "idempotency_key": "postmortem-reset-8104935102-11", + "markdown": "# Database saturation incident\n\nThe database pool was exhausted; added saturation alert.", + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e" + }, + "schema": { + "$ref": "#/components/schemas/ResetPostMortemContentRequest" + } } - } - ], - "responses": { + }, + "required": true + }, + "responses": { "200": { "content": { "application/json": { "example": { "data": { - "account_id": 2451002751131, - "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", - "content_markdown": "## Summary\nDescribe what happened.", - "created_at_seconds": 1773900000, - "description": "Default sections for post-mortem reports.", - "name": "Default post-mortem report", - "team_id": 2477033058131, - "template_id": "post_mortem_default_tmpl_en-us", - "updated_at_seconds": 1773903600 + "generation": 2, + "markdown_bytes": 88, + "markdown_sha256": "70d764e77e68f8fbfa14d72a235ac07b0110768b8380c8e3436459ebaf02a7c0", + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "previous_generation": 1, + "previous_revision": 11, + "revision": 12 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -38817,7 +38651,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/PostMortemTemplate" + "$ref": "#/components/schemas/PostMortemContentResetResponse" } }, "type": "object" @@ -38834,6 +38668,70 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "409": { + "content": { + "application/json": { + "example": { + "error": { + "code": "Conflict", + "message": "expected_revision conflict: request has 11 but current revision is 12" + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "properties": { + "error": { + "properties": { + "code": { + "enum": [ + "Conflict" + ], + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + }, + "request_id": { + "type": "string" + } + }, + "required": [ + "request_id", + "error" + ], + "type": "object" + } + } + }, + "description": "The report is not drafting, the revision is stale, or the idempotency key was reused for a different request." + }, + "413": { + "content": { + "application/json": { + "example": { + "error": { + "code": "EntityTooLarge", + "message": "markdown exceeds maximum size" + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Markdown content exceeds the 4 MiB limit." + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -38841,34 +38739,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get post-mortem template detail", + "summary": "Reset post-mortem content", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/postmortem-read-template-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | Edit access to the target report is required. |\n\n## Usage\n\n- The report must be drafting and its current revision must equal `expected_revision`; otherwise the API returns `409 Conflict`.\n- Reuse an `idempotency_key` only for the same report, revision, and Markdown content; different reuse returns `409 Conflict`.\n- A successful reset disconnects the previous collaboration (Yjs) room. Reconnect to the new generation room `post-mortem-{accountId}-{postMortemId}-g{N}` (generation 0 has no `-g` suffix). The reset cannot be rolled back.\n- Markdown content is limited to 4 MiB.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/incidents/incident-post-mortem-write-reset-content", "metadata": { - "sidebarTitle": "Get post-mortem template detail" + "sidebarTitle": "Reset post-mortem content" } } } }, - "/incident/post-mortem/template/list": { + "/incident/post-mortem/delete": { "post": { - "description": "Return built-in and custom post-mortem templates for the account.", - "operationId": "postmortem-read-list-templates", + "description": "Delete a post-mortem report.", + "operationId": "incidentPostMortemDelete", "requestBody": { "content": { "application/json": { "example": { - "asc": false, - "limit": 20, - "order_by": "created_at_seconds", - "p": 1 + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e" }, "schema": { - "$ref": "#/components/schemas/ListPostMortemTemplatesRequest" + "$ref": "#/components/schemas/DeletePostMortemRequest" } } }, @@ -38879,23 +38774,7 @@ "content": { "application/json": { "example": { - "data": { - "has_next_page": false, - "items": [ - { - "account_id": 2451002751131, - "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", - "content_markdown": "## Summary\nDescribe what happened.", - "created_at_seconds": 1773900000, - "description": "Default sections for post-mortem reports.", - "name": "Default post-mortem report", - "team_id": 2477033058131, - "template_id": "post_mortem_default_tmpl_en-us", - "updated_at_seconds": 1773903600 - } - ], - "total": 2 - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -38906,7 +38785,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ListPostMortemTemplatesResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -38930,35 +38809,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List post-mortem templates", + "summary": "Delete post-mortem", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/postmortem-read-list-templates", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-post-mortem-delete", "metadata": { - "sidebarTitle": "List post-mortem templates" + "sidebarTitle": "Delete post-mortem" } } } }, - "/incident/post-mortem/template/upsert": { + "/incident/post-mortem/follow-ups/reset": { "post": { - "description": "Create a custom post-mortem template or update an existing one.", - "operationId": "postmortem-write-upsert-template", + "description": "Replace the follow-up action items on a post-mortem report.", + "operationId": "postmortem-write-reset-follow-ups", "requestBody": { "content": { "application/json": { "example": { - "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", - "content_markdown": "## Summary\nDescribe what happened.", - "description": "Template for production incident reviews.", - "name": "Production incident template", - "team_id": 2477033058131 + "follow_ups": "- Add database saturation alert\n- Review cache TTL rollout", + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e" }, "schema": { - "$ref": "#/components/schemas/UpsertPostMortemTemplateRequest" + "$ref": "#/components/schemas/ResetPostMortemFollowUpsRequest" } } }, @@ -38969,17 +38845,7 @@ "content": { "application/json": { "example": { - "data": { - "account_id": 2451002751131, - "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", - "content_markdown": "## Summary\nDescribe what happened.", - "created_at_seconds": 1773900000, - "description": "Default sections for post-mortem reports.", - "name": "Default post-mortem report", - "team_id": 2477033058131, - "template_id": "post_mortem_default_tmpl_en-us", - "updated_at_seconds": 1773903600 - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -38990,7 +38856,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/PostMortemTemplate" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -39014,43 +38880,78 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create or update post-mortem template", + "summary": "Update post-mortem follow-ups", "tags": [ "On-call/Incidents" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/incidents/postmortem-write-upsert-template", + "href": "/en/api-reference/on-call/incidents/postmortem-write-reset-follow-ups", "metadata": { - "sidebarTitle": "Create or update post-mortem template" + "sidebarTitle": "Update post-mortem follow-ups" } } } }, - "/incident/post-mortem/title/reset": { - "post": { - "description": "Replace the title of a post-mortem report.", - "operationId": "postmortem-write-reset-title", - "requestBody": { - "content": { - "application/json": { - "example": { - "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", - "title": "Production API latency incident" - }, - "schema": { - "$ref": "#/components/schemas/ResetPostMortemTitleRequest" - } + "/incident/post-mortem/info": { + "get": { + "description": "Retrieve a post-mortem report by its `post_mortem_id`. List reports via `/incident/post-mortem/list` first — each row carries the incident it covers — then fetch the full report here by that id.", + "operationId": "incidentPostMortemInfo", + "parameters": [ + { + "description": "Post-mortem ID. Deterministic hash derived from account ID and the set of linked incident IDs.", + "in": "query", + "name": "post_mortem_id", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "content": { "application/json": { "example": { - "data": {}, + "data": { + "basics": { + "incidents_earliest_start_seconds": 1761133512, + "incidents_highest_severity": "Warning", + "incidents_latest_close_seconds": 1761133632, + "incidents_total_duration_seconds": 120, + "responders": [ + { + "acknowledged_at": 0, + "assigned_at": 1761133515, + "person_id": 3790925372131 + } + ] + }, + "content": { + "content": "{\"type\":\"doc\",\"content\":[]}" + }, + "follow_ups": "", + "meta": { + "account_id": 2451002751131, + "author_ids": [ + 2477273692131 + ], + "channel_id": 3047621227131, + "channel_name": "Ops Channel", + "created_at_seconds": 1773900354, + "incident_ids": [ + "69bb9233331067560c718ecd" + ], + "is_private": false, + "media_count": 0, + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "status": "published", + "team_id": 2477033058131, + "template_id": "post_mortem_default_tmpl_en-us", + "title": "Postmortem1", + "updated_at_seconds": 1773909012 + } + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -39061,7 +38962,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/PostMortemItem" } }, "type": "object" @@ -39085,33 +38986,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update post-mortem title", + "summary": "Get post-mortem", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/incidents/postmortem-write-reset-title", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-post-mortem-info", "metadata": { - "sidebarTitle": "Update post-mortem title" + "sidebarTitle": "Get post-mortem" } } } }, - "/incident/remove": { + "/incident/post-mortem/init": { "post": { - "description": "Permanently delete an incident and all associated data.", - "operationId": "incidentRemove", - "requestBody": { + "description": "Create a post-mortem draft from one or more incidents and a template.", + "operationId": "postmortem-write-init", + "requestBody": { "content": { "application/json": { "example": { "incident_ids": [ - "69da451ef77b1b51f40e83ee" - ] + "69bb9233331067560c718ecd" + ], + "template_id": "post_mortem_default_tmpl_en-us" }, "schema": { - "$ref": "#/components/schemas/RemoveIncidentRequest" + "$ref": "#/components/schemas/InitPostMortemRequest" } } }, @@ -39122,7 +39024,45 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "basics": { + "incidents_earliest_start_seconds": 1761133512, + "incidents_highest_severity": "Warning", + "incidents_latest_close_seconds": 1761133632, + "incidents_total_duration_seconds": 120, + "responders": [ + { + "acknowledged_at": 0, + "assigned_at": 1761133515, + "person_id": 3790925372131 + } + ] + }, + "content": { + "content": "{\"type\":\"doc\",\"content\":[]}" + }, + "follow_ups": "", + "meta": { + "account_id": 2451002751131, + "author_ids": [ + 2477273692131 + ], + "channel_id": 3047621227131, + "channel_name": "Ops Channel", + "created_at_seconds": 1773900354, + "incident_ids": [ + "69bb9233331067560c718ecd" + ], + "is_private": false, + "media_count": 0, + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "status": "published", + "team_id": 2477033058131, + "template_id": "post_mortem_default_tmpl_en-us", + "title": "Postmortem1", + "updated_at_seconds": 1773909012 + } + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -39133,7 +39073,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/PostMortemItem" } }, "type": "object" @@ -39157,34 +39097,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete an incident", + "summary": "Initialize post-mortem", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-remove", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Links at most 10 incidents to one post-mortem report.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/incidents/postmortem-write-init", "metadata": { - "sidebarTitle": "Delete an incident" + "sidebarTitle": "Initialize post-mortem" } } } }, - "/incident/reopen": { + "/incident/post-mortem/list": { "post": { - "description": "Reopen a previously resolved incident.", - "operationId": "incidentReopen", + "description": "List post-mortem reports with optional filters.", + "operationId": "incidentPostMortemList", "requestBody": { "content": { "application/json": { "example": { - "incident_ids": [ - "69da451ef77b1b51f40e83ee" - ], - "reason": "Monitoring detected the issue recurred after the initial fix." + "limit": 20, + "p": 1, + "status": "published" }, "schema": { - "$ref": "#/components/schemas/ReopenIncidentRequest" + "$ref": "#/components/schemas/ListPostMortemsRequest" } } }, @@ -39195,7 +39134,32 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "has_next_page": false, + "items": [ + { + "account_id": 2451002751131, + "author_ids": [ + 2477273692131 + ], + "channel_id": 3047621227131, + "channel_name": "Ops Channel", + "created_at_seconds": 1773900354, + "incident_ids": [ + "69bb9233331067560c718ecd" + ], + "is_private": false, + "media_count": 0, + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "status": "published", + "team_id": 2477033058131, + "template_id": "post_mortem_default_tmpl_en-us", + "title": "Postmortem1", + "updated_at_seconds": 1773909012 + } + ], + "total": 3 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -39206,7 +39170,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/ListPostMortemsResponse" } }, "type": "object" @@ -39230,33 +39194,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Reopen incident", + "summary": "List post-mortems", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-reopen", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-post-mortem-list", "metadata": { - "sidebarTitle": "Reopen incident" + "sidebarTitle": "List post-mortems" } } } }, - "/incident/reset": { + "/incident/post-mortem/status/reset": { "post": { - "description": "Update one or more editable fields of an incident in a single call, including title, description, impact, root cause, resolution, and severity. At least one field must be provided.", - "operationId": "incidentReset", + "description": "Set a post-mortem report to drafting or published.", + "operationId": "postmortem-write-reset-status", "requestBody": { "content": { "application/json": { "example": { - "incident_id": "69da451ef77b1b51f40e83ee", - "incident_severity": "Critical", - "title": "Database connection timeout - prod-db-01 primary" + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "status": "published" }, "schema": { - "$ref": "#/components/schemas/UpdateIncidentFieldsRequest" + "$ref": "#/components/schemas/ResetPostMortemStatusRequest" } } }, @@ -39302,35 +39265,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update incident fields", + "summary": "Update post-mortem status", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-reset", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/incidents/postmortem-write-reset-status", "metadata": { - "sidebarTitle": "Update incident fields" + "sidebarTitle": "Update post-mortem status" } } } }, - "/incident/resolve": { + "/incident/post-mortem/template/delete": { "post": { - "description": "Mark an incident as resolved.", - "operationId": "incidentResolve", + "description": "Delete a custom post-mortem template.", + "operationId": "postmortem-write-delete-template", "requestBody": { "content": { "application/json": { "example": { - "incident_ids": [ - "69da451ef77b1b51f40e83ee" - ], - "resolution": "Deployed hotfix v2.3.1 and restarted the affected service.", - "root_cause": "Memory leak in the connection pool caused by a missing cleanup call." + "template_id": "post_mortem_custom_tmpl_01" }, "schema": { - "$ref": "#/components/schemas/ResolveIncidentRequest" + "$ref": "#/components/schemas/DeletePostMortemTemplateRequest" } } }, @@ -39376,46 +39335,50 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Resolve incident", + "summary": "Delete post-mortem template", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- When a resolution form applies, `custom_fields`, `summary`, and `images` must match its visible elements and required rules.\n- For a batch, form values are accepted only when every selected incident resolves to the same form; otherwise resolve incidents individually.\n- The legacy `values` and `custom_values` properties are rejected; use `custom_fields`.\n- Audited — changes are recorded in the audit log.", - "href": "/en/api-reference/on-call/incidents/incident-resolve", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/incidents/postmortem-write-delete-template", "metadata": { - "sidebarTitle": "Resolve incident" + "sidebarTitle": "Delete post-mortem template" } } } }, - "/incident/responder/add": { - "post": { - "description": "Add a responder to an existing incident.", - "operationId": "incidentResponderAdd", - "requestBody": { - "content": { - "application/json": { - "example": { - "incident_id": "69da451ef77b1b51f40e83ee", - "person_ids": [ - 2476444212131, - 2476444212132 - ] - }, - "schema": { - "$ref": "#/components/schemas/AddIncidentResponderRequest" - } + "/incident/post-mortem/template/info": { + "get": { + "description": "Return one post-mortem template by ID.", + "operationId": "postmortem-read-template-info", + "parameters": [ + { + "description": "Template ID.", + "in": "query", + "name": "template_id", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "content": { "application/json": { "example": { - "data": {}, + "data": { + "account_id": 2451002751131, + "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", + "content_markdown": "## Summary\nDescribe what happened.", + "created_at_seconds": 1773900000, + "description": "Default sections for post-mortem reports.", + "name": "Default post-mortem report", + "team_id": 2477033058131, + "template_id": "post_mortem_default_tmpl_en-us", + "updated_at_seconds": 1773903600 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -39426,7 +39389,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/PostMortemTemplate" } }, "type": "object" @@ -39450,37 +39413,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Add incident responder", + "summary": "Get post-mortem template detail", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-responder-add", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/postmortem-read-template-info", "metadata": { - "sidebarTitle": "Add incident responder" + "sidebarTitle": "Get post-mortem template detail" } } } }, - "/incident/sdp/request/list": { + "/incident/post-mortem/template/list": { "post": { - "description": "List synchronization mappings between ServiceDeskPlus requests and Flashduty incidents.", - "operationId": "incident-service-desk-plus-request-read-list", + "description": "Return built-in and custom post-mortem templates for the account.", + "operationId": "postmortem-read-list-templates", "requestBody": { "content": { "application/json": { "example": { - "channel_ids": [ - 12345 - ], - "end_time": 1779600000, + "asc": false, "limit": 20, - "start_time": 1779513600, - "status": "success" + "order_by": "created_at_seconds", + "p": 1 }, "schema": { - "$ref": "#/components/schemas/ServiceDeskPlusRequestListRequest" + "$ref": "#/components/schemas/ListPostMortemTemplatesRequest" } } }, @@ -39495,19 +39455,18 @@ "has_next_page": false, "items": [ { - "channel_id": 12345, - "channel_name": "Payments", - "created_at": 1779514631, - "incident_id": "685d7f4e51b9a9a6d4d0c123", - "incident_title": "Checkout API 5xx rate increased", - "integration_id": 98765, - "request_id": "100000000001", - "request_link": "https://servicedesk.example.com/app/itdesk/ui/requests/100000000001/details", - "status": "success" + "account_id": 2451002751131, + "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", + "content_markdown": "## Summary\nDescribe what happened.", + "created_at_seconds": 1773900000, + "description": "Default sections for post-mortem reports.", + "name": "Default post-mortem report", + "team_id": 2477033058131, + "template_id": "post_mortem_default_tmpl_en-us", + "updated_at_seconds": 1773903600 } ], - "search_after_ctx": "", - "total": 1 + "total": 2 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -39519,7 +39478,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ServiceDeskPlusRequestListResponse" + "$ref": "#/components/schemas/ListPostMortemTemplatesResponse" } }, "type": "object" @@ -39543,34 +39502,35 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get ServiceDeskPlus linked incidents", + "summary": "List post-mortem templates", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |\n\n## Usage\n\n- Use this endpoint to inspect synchronization mappings between ServiceDeskPlus requests and Flashduty incidents, including the external request link and sync status.\n- When `incident_id` is not provided, `start_time` and `end_time` are required Unix-second timestamps; the time window cannot exceed 30 days.\n- `status` accepts only `success` and `failed`, representing successful and failed synchronization records.\n- Results are sorted by the internal record ID. Set `asc` to `true` for ascending order; otherwise records are returned descending. Pass the returned `search_after_ctx` to continue pagination.", - "href": "/en/api-reference/on-call/incidents/incident-service-desk-plus-request-read-list", - "metadata": { - "sidebarTitle": "Get ServiceDeskPlus linked incidents" + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/postmortem-read-list-templates", + "metadata": { + "sidebarTitle": "List post-mortem templates" } } } }, - "/incident/snooze": { + "/incident/post-mortem/template/upsert": { "post": { - "description": "Temporarily snooze notifications for an incident until a specified time.", - "operationId": "incidentSnooze", + "description": "Create a custom post-mortem template or update an existing one.", + "operationId": "postmortem-write-upsert-template", "requestBody": { "content": { "application/json": { "example": { - "incident_ids": [ - "69da451ef77b1b51f40e83ee" - ], - "minutes": 60 + "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", + "content_markdown": "## Summary\nDescribe what happened.", + "description": "Template for production incident reviews.", + "name": "Production incident template", + "team_id": 2477033058131 }, "schema": { - "$ref": "#/components/schemas/SnoozeIncidentRequest" + "$ref": "#/components/schemas/UpsertPostMortemTemplateRequest" } } }, @@ -39581,7 +39541,17 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "account_id": 2451002751131, + "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]", + "content_markdown": "## Summary\nDescribe what happened.", + "created_at_seconds": 1773900000, + "description": "Default sections for post-mortem reports.", + "name": "Default post-mortem report", + "team_id": 2477033058131, + "template_id": "post_mortem_default_tmpl_en-us", + "updated_at_seconds": 1773903600 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -39592,7 +39562,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/PostMortemTemplate" } }, "type": "object" @@ -39616,33 +39586,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Snooze incident", + "summary": "Create or update post-mortem template", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-snooze", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/incidents/postmortem-write-upsert-template", "metadata": { - "sidebarTitle": "Snooze incident" + "sidebarTitle": "Create or update post-mortem template" } } } }, - "/incident/unack": { + "/incident/post-mortem/title/reset": { "post": { - "description": "Remove the acknowledge status from an incident.", - "operationId": "incidentUnack", + "description": "Replace the title of a post-mortem report.", + "operationId": "postmortem-write-reset-title", "requestBody": { "content": { "application/json": { "example": { - "incident_ids": [ - "69da451ef77b1b51f40e83ee" - ] + "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e", + "title": "Production API latency incident" }, "schema": { - "$ref": "#/components/schemas/UnackIncidentRequest" + "$ref": "#/components/schemas/ResetPostMortemTitleRequest" } } }, @@ -39688,23 +39657,23 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Unacknowledge incident", + "summary": "Update post-mortem title", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-unack", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/incidents/postmortem-write-reset-title", "metadata": { - "sidebarTitle": "Unacknowledge incident" + "sidebarTitle": "Update post-mortem title" } } } }, - "/incident/wake": { + "/incident/remove": { "post": { - "description": "Cancel the snooze on an incident and resume notifications.", - "operationId": "incidentWake", + "description": "Permanently delete an incident and all associated data.", + "operationId": "incidentRemove", "requestBody": { "content": { "application/json": { @@ -39714,7 +39683,7 @@ ] }, "schema": { - "$ref": "#/components/schemas/WakeIncidentRequest" + "$ref": "#/components/schemas/RemoveIncidentRequest" } } }, @@ -39760,36 +39729,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Wake incident", + "summary": "Delete an incident", "tags": [ "On-call/Incidents" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-wake", + "href": "/en/api-reference/on-call/incidents/incident-remove", "metadata": { - "sidebarTitle": "Wake incident" + "sidebarTitle": "Delete an incident" } } } }, - "/incident/war-room/add-member": { + "/incident/reopen": { "post": { - "description": "Add one or more members to the IM war room bound to an incident integration.", - "operationId": "incident-write-add-war-room-member", + "description": "Reopen a previously resolved incident.", + "operationId": "incidentReopen", "requestBody": { "content": { "application/json": { "example": { - "chat_id": "oc_5ce6d572455d361153b7cb51da133945", - "integration_id": 362, - "member_ids": [ - 20001, - 20002 - ] + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ], + "reason": "Monitoring detected the issue recurred after the initial fix." }, "schema": { - "$ref": "#/components/schemas/AddWarRoomMemberRequest" + "$ref": "#/components/schemas/ReopenIncidentRequest" } } }, @@ -39800,7 +39767,7 @@ "content": { "application/json": { "example": { - "data": "ok", + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -39811,8 +39778,7 @@ { "properties": { "data": { - "description": "Returns the literal \"ok\" on success.", - "type": "string" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -39836,33 +39802,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Add war-room member", + "summary": "Reopen incident", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n", - "href": "/en/api-reference/on-call/incidents/incident-write-add-war-room-member", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-reopen", "metadata": { - "sidebarTitle": "Add war-room member" + "sidebarTitle": "Reopen incident" } } } }, - "/incident/war-room/create": { + "/incident/reset": { "post": { - "description": "Create a war room channel for collaborative incident response.", - "operationId": "incidentWarRoomCreate", + "description": "Update one or more editable fields of an incident in a single call, including title, description, impact, root cause, resolution, and severity. At least one field must be provided.", + "operationId": "incidentReset", "requestBody": { "content": { "application/json": { "example": { - "add_observers": true, "incident_id": "69da451ef77b1b51f40e83ee", - "integration_id": 2490562293131 + "incident_severity": "Critical", + "title": "Database connection timeout - prod-db-01 primary" }, "schema": { - "$ref": "#/components/schemas/CreateWarRoomRequest" + "$ref": "#/components/schemas/UpdateIncidentFieldsRequest" } } }, @@ -39873,11 +39839,7 @@ "content": { "application/json": { "example": { - "data": { - "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000", - "chat_name": "Incident #0E83EE war room", - "share_link": "" - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -39888,7 +39850,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/WarRoom" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -39912,31 +39874,35 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create war room", + "summary": "Update incident fields", "tags": [ "On-call/Incidents" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-war-room-create", + "href": "/en/api-reference/on-call/incidents/incident-reset", "metadata": { - "sidebarTitle": "Create war room" + "sidebarTitle": "Update incident fields" } } } }, - "/incident/war-room/default-observers": { + "/incident/resolve": { "post": { - "description": "Return historical responders suggested as default observers when opening a war room.", - "operationId": "incident-read-get-war-room-default-observers", + "description": "Mark an incident as resolved.", + "operationId": "incidentResolve", "requestBody": { "content": { "application/json": { "example": { - "incident_id": "664a1b2c3d4e5f6a7b8c9d0e" + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ], + "resolution": "Deployed hotfix v2.3.1 and restarted the affected service.", + "root_cause": "Memory leak in the connection pool caused by a missing cleanup call." }, "schema": { - "$ref": "#/components/schemas/GetWarRoomDefaultObserversRequest" + "$ref": "#/components/schemas/ResolveIncidentRequest" } } }, @@ -39947,22 +39913,7 @@ "content": { "application/json": { "example": { - "data": { - "observers": [ - { - "account_id": 10001, - "as": "responder", - "avatar": "https://cdn.flashcat.cloud/avatar/20001.png", - "email": "alice@acme.com", - "locale": "zh-CN", - "person_id": 20001, - "person_name": "Alice Chen", - "phone": "+8613800000000", - "status": "active", - "time_zone": "Asia/Shanghai" - } - ] - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -39973,7 +39924,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/GetWarRoomDefaultObserversResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -39997,32 +39948,35 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get war-room default observers", + "summary": "Resolve incident", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n", - "href": "/en/api-reference/on-call/incidents/incident-read-get-war-room-default-observers", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- When a resolution form applies, `custom_fields`, `summary`, and `images` must match its visible elements and required rules.\n- For a batch, form values are accepted only when every selected incident resolves to the same form; otherwise resolve incidents individually.\n- The legacy `values` and `custom_values` properties are rejected; use `custom_fields`.\n- Audited — changes are recorded in the audit log.", + "href": "/en/api-reference/on-call/incidents/incident-resolve", "metadata": { - "sidebarTitle": "Get war-room default observers" + "sidebarTitle": "Resolve incident" } } } }, - "/incident/war-room/delete": { + "/incident/responder/add": { "post": { - "description": "Delete an incident war room.", - "operationId": "incidentWarRoomDelete", + "description": "Add a responder to an existing incident.", + "operationId": "incidentResponderAdd", "requestBody": { "content": { "application/json": { "example": { "incident_id": "69da451ef77b1b51f40e83ee", - "integration_id": 2490562293131 + "person_ids": [ + 2476444212131, + 2476444212132 + ] }, "schema": { - "$ref": "#/components/schemas/DeleteWarRoomRequest" + "$ref": "#/components/schemas/AddIncidentResponderRequest" } } }, @@ -40068,32 +40022,37 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete war room", + "summary": "Add incident responder", "tags": [ "On-call/Incidents" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-war-room-delete", + "href": "/en/api-reference/on-call/incidents/incident-responder-add", "metadata": { - "sidebarTitle": "Delete war room" + "sidebarTitle": "Add incident responder" } } } }, - "/incident/war-room/detail": { + "/incident/sdp/request/list": { "post": { - "description": "Retrieve the war room configuration and members for an incident.", - "operationId": "incidentWarRoomDetail", + "description": "List synchronization mappings between ServiceDeskPlus requests and Flashduty incidents.", + "operationId": "incident-service-desk-plus-request-read-list", "requestBody": { "content": { "application/json": { "example": { - "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000", - "integration_id": 2490562293131 + "channel_ids": [ + 12345 + ], + "end_time": 1779600000, + "limit": 20, + "start_time": 1779513600, + "status": "success" }, "schema": { - "$ref": "#/components/schemas/GetWarRoomDetailRequest" + "$ref": "#/components/schemas/ServiceDeskPlusRequestListRequest" } } }, @@ -40105,9 +40064,22 @@ "application/json": { "example": { "data": { - "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000", - "chat_name": "Incident #0E83EE war room", - "share_link": "" + "has_next_page": false, + "items": [ + { + "channel_id": 12345, + "channel_name": "Payments", + "created_at": 1779514631, + "incident_id": "685d7f4e51b9a9a6d4d0c123", + "incident_title": "Checkout API 5xx rate increased", + "integration_id": 98765, + "request_id": "100000000001", + "request_link": "https://servicedesk.example.com/app/itdesk/ui/requests/100000000001/details", + "status": "success" + } + ], + "search_after_ctx": "", + "total": 1 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -40119,7 +40091,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/WarRoom" + "$ref": "#/components/schemas/ServiceDeskPlusRequestListResponse" } }, "type": "object" @@ -40143,31 +40115,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get war room detail", + "summary": "Get ServiceDeskPlus linked incidents", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-war-room-detail", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |\n\n## Usage\n\n- Use this endpoint to inspect synchronization mappings between ServiceDeskPlus requests and Flashduty incidents, including the external request link and sync status.\n- When `incident_id` is not provided, `start_time` and `end_time` are required Unix-second timestamps; the time window cannot exceed 30 days.\n- `status` accepts only `success` and `failed`, representing successful and failed synchronization records.\n- Results are sorted by the internal record ID. Set `asc` to `true` for ascending order; otherwise records are returned descending. Pass the returned `search_after_ctx` to continue pagination.", + "href": "/en/api-reference/on-call/incidents/incident-service-desk-plus-request-read-list", "metadata": { - "sidebarTitle": "Get war room detail" + "sidebarTitle": "Get ServiceDeskPlus linked incidents" } } } }, - "/incident/war-room/list": { + "/incident/snooze": { "post": { - "description": "List all war rooms associated with an incident.", - "operationId": "incidentWarRoomList", + "description": "Temporarily snooze notifications for an incident until a specified time.", + "operationId": "incidentSnooze", "requestBody": { "content": { "application/json": { "example": { - "incident_id": "69da451ef77b1b51f40e83ee" + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ], + "minutes": 60 }, "schema": { - "$ref": "#/components/schemas/ListWarRoomsRequest" + "$ref": "#/components/schemas/SnoozeIncidentRequest" } } }, @@ -40178,9 +40153,7 @@ "content": { "application/json": { "example": { - "data": { - "items": [] - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -40191,7 +40164,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ListWarRoomsResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -40215,36 +40188,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List war rooms", + "summary": "Snooze incident", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", - "href": "/en/api-reference/on-call/incidents/incident-war-room-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-snooze", "metadata": { - "sidebarTitle": "List war rooms" + "sidebarTitle": "Snooze incident" } } } }, - "/incident/work-item/assignees/reset": { + "/incident/unack": { "post": { - "description": "Replace a work item's entire assignee set.", - "operationId": "incidentWorkItemResetAssignees", + "description": "Remove the acknowledge status from an incident.", + "operationId": "incidentUnack", "requestBody": { "content": { "application/json": { "example": { - "assignee_ids": [ - 3790925372131, - 5068740052131 - ], - "version": 2, - "work_item_id": "wi_9fK2mNqRtVwXyZaBcDeFgH" + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] }, "schema": { - "$ref": "#/components/schemas/ResetWorkItemAssigneesRequest" + "$ref": "#/components/schemas/UnackIncidentRequest" } } }, @@ -40255,34 +40225,8 @@ "content": { "application/json": { "example": { - "data": { - "added_assignee_ids": [ - 5068740052131 - ], - "item": { - "assignee_ids": [ - 3790925372131, - 4756301322131, - 5068740052131 - ], - "created_at_seconds": 1785495329, - "created_by": 5329873302131, - "incident_id": "6a5f1e28807515413b384bce", - "item_type": "follow_up", - "post_mortem_id": "51d65cd9525c369379ba471b5512df63", - "source_kind": "native", - "status": "done", - "title": "Follow-ups assigned to Bowen and Weili", - "updated_at_seconds": 1785496384, - "updated_by": 3790925372131, - "version": 2, - "work_item_id": "wi_68MHnkWBiyjrh6uhkxUyiZ" - }, - "removed_assignee_ids": [ - 4756301322131 - ] - }, - "request_id": "01J8XQ3E5Z7JM2NTFQ5YJ8P9R4" + "data": {}, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ @@ -40292,7 +40236,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/WorkItemMutationResult" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -40316,34 +40260,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Reset work item assignees", + "summary": "Unacknowledge incident", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- Full replacement of the assignee set — an empty array clears all assignees.\n- Only newly added assignees are notified; removals never notify.\n- Audited — changes are recorded in the audit log.", - "href": "/en/api-reference/on-call/incidents/incident-work-item-reset-assignees", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-unack", "metadata": { - "sidebarTitle": "Reset work item assignees" + "sidebarTitle": "Unacknowledge incident" } } } }, - "/incident/work-item/complete": { + "/incident/wake": { "post": { - "description": "Mark a work item as completed by setting a client-defined target status.", - "operationId": "incidentWorkItemComplete", + "description": "Cancel the snooze on an incident and resume notifications.", + "operationId": "incidentWake", "requestBody": { "content": { "application/json": { "example": { - "idempotency_key": "complete-wi-20260731-0001", - "target_status": "done", - "version": 2, - "work_item_id": "wi_9fK2mNqRtVwXyZaBcDeFgH" + "incident_ids": [ + "69da451ef77b1b51f40e83ee" + ] }, "schema": { - "$ref": "#/components/schemas/CompleteWorkItemRequest" + "$ref": "#/components/schemas/WakeIncidentRequest" } } }, @@ -40354,28 +40297,8 @@ "content": { "application/json": { "example": { - "data": { - "item": { - "assignee_ids": [ - 3790925372131, - 4756301322131, - 5068740052131 - ], - "created_at_seconds": 1785495329, - "created_by": 5329873302131, - "incident_id": "6a5f1e28807515413b384bce", - "item_type": "follow_up", - "post_mortem_id": "51d65cd9525c369379ba471b5512df63", - "source_kind": "native", - "status": "done", - "title": "Follow-ups assigned to Bowen and Weili", - "updated_at_seconds": 1785496384, - "updated_by": 3790925372131, - "version": 2, - "work_item_id": "wi_68MHnkWBiyjrh6uhkxUyiZ" - } - }, - "request_id": "01J8XQ3E5Z7JM2NTFQ5YJ8P9R4" + "data": {}, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ @@ -40385,7 +40308,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/WorkItemMutationResult" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -40409,34 +40332,36 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Complete a work item", + "summary": "Wake incident", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- Only current assignees can complete a work item.\n- `target_status` is a client-defined string — there is no fixed state machine.\n- The same `idempotency_key` with the same `target_status` replays idempotently; the same key with a different `target_status` returns an error.\n- Audited — changes are recorded in the audit log.", - "href": "/en/api-reference/on-call/incidents/incident-work-item-complete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-wake", "metadata": { - "sidebarTitle": "Complete a work item" + "sidebarTitle": "Wake incident" } } } }, - "/incident/work-item/convert": { + "/incident/war-room/add-member": { "post": { - "description": "Convert an incident action item into a post-mortem follow-up in place.", - "operationId": "incidentWorkItemConvert", + "description": "Add one or more members to the IM war room bound to an incident integration.", + "operationId": "incident-write-add-war-room-member", "requestBody": { "content": { "application/json": { "example": { - "idempotency_key": "convert-wi-20260731-0001", - "target_status": "open", - "version": 2, - "work_item_id": "wi_9fK2mNqRtVwXyZaBcDeFgH" + "chat_id": "oc_5ce6d572455d361153b7cb51da133945", + "integration_id": 362, + "member_ids": [ + 20001, + 20002 + ] }, "schema": { - "$ref": "#/components/schemas/ConvertWorkItemRequest" + "$ref": "#/components/schemas/AddWarRoomMemberRequest" } } }, @@ -40447,28 +40372,8 @@ "content": { "application/json": { "example": { - "data": { - "item": { - "assignee_ids": [ - 3790925372131, - 4756301322131, - 5068740052131 - ], - "created_at_seconds": 1785495329, - "created_by": 5329873302131, - "incident_id": "6a5f1e28807515413b384bce", - "item_type": "follow_up", - "post_mortem_id": "51d65cd9525c369379ba471b5512df63", - "source_kind": "native", - "status": "done", - "title": "Follow-ups assigned to Bowen and Weili", - "updated_at_seconds": 1785496384, - "updated_by": 3790925372131, - "version": 2, - "work_item_id": "wi_68MHnkWBiyjrh6uhkxUyiZ" - } - }, - "request_id": "01J8XQ3E5Z7JM2NTFQ5YJ8P9R4" + "data": "ok", + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ @@ -40478,7 +40383,8 @@ { "properties": { "data": { - "$ref": "#/components/schemas/WorkItemMutationResult" + "description": "Returns the literal \"ok\" on success.", + "type": "string" } }, "type": "object" @@ -40502,40 +40408,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Convert a work item to a follow-up", + "summary": "Add war-room member", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- Converts an `action` item into a post-mortem `follow_up` in place — the `work_item_id` does not change.\n- Converting an item that is already a `follow_up` returns `idempotent_replay: true`.\n- If a post-mortem already exists for the incident, the converted item auto-binds to it.\n- Audited — changes are recorded in the audit log.", - "href": "/en/api-reference/on-call/incidents/incident-work-item-convert", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n", + "href": "/en/api-reference/on-call/incidents/incident-write-add-war-room-member", "metadata": { - "sidebarTitle": "Convert a work item to a follow-up" + "sidebarTitle": "Add war-room member" } } } }, - "/incident/work-item/create": { + "/incident/war-room/create": { "post": { - "description": "Create an action on an active incident or a follow-up on one of its post-mortems.", - "operationId": "incidentWorkItemCreate", + "description": "Create a war room channel for collaborative incident response.", + "operationId": "incidentWarRoomCreate", "requestBody": { "content": { "application/json": { "example": { - "assignee_ids": [ - 3790925372131 - ], - "description": "CPU saturation started right after the v2.14 rollout; roll back and watch the error rate.", - "idempotency_key": "create-wi-20260731-0001", - "incident_id": "6a5f1e28807515413b384bce", - "item_type": "action", - "priority": "high", - "status": "open", - "title": "Roll back the v2.14 deployment on web-server-01" + "add_observers": true, + "incident_id": "69da451ef77b1b51f40e83ee", + "integration_id": 2490562293131 }, "schema": { - "$ref": "#/components/schemas/CreateWorkItemRequest" + "$ref": "#/components/schemas/CreateWarRoomRequest" } } }, @@ -40547,27 +40446,11 @@ "application/json": { "example": { "data": { - "added_assignee_ids": [ - 3790925372131 - ], - "item": { - "assignee_ids": [ - 3790925372131 - ], - "created_at_seconds": 1785496400, - "created_by": 3790925372131, - "incident_id": "6a5f1e28807515413b384bce", - "item_type": "action", - "source_kind": "native", - "status": "open", - "title": "Roll back the v2.14 deployment on web-server-01", - "updated_at_seconds": 1785496400, - "updated_by": 3790925372131, - "version": 1, - "work_item_id": "wi_9fK2mNqRtVwXyZaBcDeFgH" - } + "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000", + "chat_name": "Incident #0E83EE war room", + "share_link": "" }, - "request_id": "01J8XQ3E5Z7JM2NTFQ5YJ8P9R4" + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ @@ -40577,7 +40460,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/WorkItemCreateResult" + "$ref": "#/components/schemas/WarRoom" } }, "type": "object" @@ -40601,32 +40484,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create a work item", + "summary": "Create war room", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- An `action` anchors to an active incident and must NOT set `post_mortem_id`; a `follow_up` REQUIRES the `post_mortem_id` of a post-mortem linked to `incident_id`.\n- Assignees must be active members who can already read the anchor incident or post-mortem — assignment never grants access.\n- Newly added assignees are notified.\n- Retrying with the same (`creator`, `idempotency_key`) replays the original item with `idempotent_replay: true` instead of creating a duplicate.\n- Audited — changes are recorded in the audit log.", - "href": "/en/api-reference/on-call/incidents/incident-work-item-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-war-room-create", "metadata": { - "sidebarTitle": "Create a work item" + "sidebarTitle": "Create war room" } } } }, - "/incident/work-item/delete": { + "/incident/war-room/default-observers": { "post": { - "description": "Soft-delete a work item.", - "operationId": "incidentWorkItemDelete", + "description": "Return historical responders suggested as default observers when opening a war room.", + "operationId": "incident-read-get-war-room-default-observers", "requestBody": { "content": { "application/json": { "example": { - "version": 2, - "work_item_id": "wi_9fK2mNqRtVwXyZaBcDeFgH" + "incident_id": "664a1b2c3d4e5f6a7b8c9d0e" }, "schema": { - "$ref": "#/components/schemas/DeleteWorkItemRequest" + "$ref": "#/components/schemas/GetWarRoomDefaultObserversRequest" } } }, @@ -40637,24 +40519,39 @@ "content": { "application/json": { "example": { - "data": {}, - "request_id": "01J8XQ3E5Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/WorkItemMutationResult" - } - }, - "type": "object" - } - ] - } + "data": { + "observers": [ + { + "account_id": 10001, + "as": "responder", + "avatar": "https://cdn.flashcat.cloud/avatar/20001.png", + "email": "alice@acme.com", + "locale": "zh-CN", + "person_id": 20001, + "person_name": "Alice Chen", + "phone": "+8613800000000", + "status": "active", + "time_zone": "Asia/Shanghai" + } + ] + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/GetWarRoomDefaultObserversResponse" + } + }, + "type": "object" + } + ] + } } }, "description": "Success" @@ -40672,32 +40569,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete a work item", + "summary": "Get war-room default observers", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- Soft delete — the item no longer appears in listings but is retained.\n- Optimistic locking — `version` must match the item's current version; a mismatch returns a conflict error.\n- Audited — changes are recorded in the audit log.", - "href": "/en/api-reference/on-call/incidents/incident-work-item-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n", + "href": "/en/api-reference/on-call/incidents/incident-read-get-war-room-default-observers", "metadata": { - "sidebarTitle": "Delete a work item" + "sidebarTitle": "Get war-room default observers" } } } }, - "/incident/work-item/list": { + "/incident/war-room/delete": { "post": { - "description": "List incident work items (actions and post-mortem follow-ups) with cursor pagination.", - "operationId": "incidentWorkItemList", + "description": "Delete an incident war room.", + "operationId": "incidentWarRoomDelete", "requestBody": { "content": { "application/json": { "example": { - "incident_id": "6a5f1e28807515413b384bce", - "limit": 50 + "incident_id": "69da451ef77b1b51f40e83ee", + "integration_id": 2490562293131 }, "schema": { - "$ref": "#/components/schemas/ListWorkItemRequest" + "$ref": "#/components/schemas/DeleteWarRoomRequest" } } }, @@ -40708,49 +40605,8 @@ "content": { "application/json": { "example": { - "data": { - "has_more": true, - "items": [ - { - "assignee_ids": [ - 3790925372131, - 4756301322131, - 5068740052131 - ], - "created_at_seconds": 1785495329, - "created_by": 5329873302131, - "incident_id": "6a5f1e28807515413b384bce", - "item_type": "follow_up", - "post_mortem_id": "51d65cd9525c369379ba471b5512df63", - "source_kind": "native", - "status": "done", - "title": "Follow-ups assigned to Bowen and Weili", - "updated_at_seconds": 1785496384, - "updated_by": 3790925372131, - "version": 2, - "work_item_id": "wi_68MHnkWBiyjrh6uhkxUyiZ" - }, - { - "assignee_ids": [ - 5068740052131 - ], - "created_at_seconds": 1785495164, - "created_by": 3790925372131, - "incident_id": "6a5f1e28807515413b384bce", - "item_type": "follow_up", - "post_mortem_id": "51d65cd9525c369379ba471b5512df63", - "source_kind": "native", - "status": "open", - "title": "Check whether this to-do notifies Bowen", - "updated_at_seconds": 1785495164, - "updated_by": 3790925372131, - "version": 1, - "work_item_id": "wi_dMRYTeZHivE5vf87PQEeFX" - } - ], - "next_cursor": "MTc4NTQ5NTE2NHx3aV9kTVJZVGVaSGl2RTV2Zjg3UFFFZUZY" - }, - "request_id": "01J8XQ3E5Z7JM2NTFQ5YJ8P9R4" + "data": {}, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ @@ -40760,7 +40616,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/WorkItemListResult" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -40784,33 +40640,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List work items", + "summary": "Delete war room", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |\n\n## Usage\n\n- At least one of `incident_id`, `post_mortem_id`, or `assignee_id` is required.\n- Cursor pagination sorted by `updated_at_seconds` descending — pass the previous response's `next_cursor` as `cursor` until `has_more` is false.\n- Listing by `incident_id` also includes follow-ups anchored on the incident's post-mortem.\n- Listing by `assignee_id` alone requires being that assignee or an account admin.", - "href": "/en/api-reference/on-call/incidents/incident-work-item-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-war-room-delete", "metadata": { - "sidebarTitle": "List work items" + "sidebarTitle": "Delete war room" } } } }, - "/incident/work-item/post-mortem/bind": { + "/incident/war-room/detail": { "post": { - "description": "Bulk-bind an incident's converted-but-unbound follow-ups to a post-mortem.", - "operationId": "incidentWorkItemBindPostMortem", + "description": "Retrieve the war room configuration and members for an incident.", + "operationId": "incidentWarRoomDetail", "requestBody": { "content": { "application/json": { "example": { - "idempotency_key": "bind-wi-20260731-0001", - "incident_id": "6a5f1e28807515413b384bce", - "post_mortem_id": "51d65cd9525c369379ba471b5512df63" + "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000", + "integration_id": 2490562293131 }, "schema": { - "$ref": "#/components/schemas/BindWorkItemPostMortemRequest" + "$ref": "#/components/schemas/GetWarRoomDetailRequest" } } }, @@ -40822,47 +40677,11 @@ "application/json": { "example": { "data": { - "has_more": false, - "items": [ - { - "assignee_ids": [ - 3790925372131, - 4756301322131, - 5068740052131 - ], - "created_at_seconds": 1785495329, - "created_by": 5329873302131, - "incident_id": "6a5f1e28807515413b384bce", - "item_type": "follow_up", - "post_mortem_id": "51d65cd9525c369379ba471b5512df63", - "source_kind": "native", - "status": "done", - "title": "Follow-ups assigned to Bowen and Weili", - "updated_at_seconds": 1785496384, - "updated_by": 3790925372131, - "version": 2, - "work_item_id": "wi_68MHnkWBiyjrh6uhkxUyiZ" - }, - { - "assignee_ids": [ - 5068740052131 - ], - "created_at_seconds": 1785495164, - "created_by": 3790925372131, - "incident_id": "6a5f1e28807515413b384bce", - "item_type": "follow_up", - "post_mortem_id": "51d65cd9525c369379ba471b5512df63", - "source_kind": "native", - "status": "open", - "title": "Check whether this to-do notifies Bowen", - "updated_at_seconds": 1785495164, - "updated_by": 3790925372131, - "version": 1, - "work_item_id": "wi_dMRYTeZHivE5vf87PQEeFX" - } - ] + "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000", + "chat_name": "Incident #0E83EE war room", + "share_link": "" }, - "request_id": "01J8XQ3E5Z7JM2NTFQ5YJ8P9R4" + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ @@ -40872,7 +40691,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/WorkItemListResult" + "$ref": "#/components/schemas/WarRoom" } }, "type": "object" @@ -40896,34 +40715,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Bind work items to a post-mortem", + "summary": "Get war room detail", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- Binds ALL of the incident's converted-but-unbound follow-ups to the given post-mortem in one call.\n- `items` holds the newly bound batch; `next_cursor` and `has_more` are not set.\n- Idempotent by `idempotency_key` — retrying with the same key replays the original result.\n- Audited — changes are recorded in the audit log.", - "href": "/en/api-reference/on-call/incidents/incident-work-item-bind-post-mortem", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-war-room-detail", "metadata": { - "sidebarTitle": "Bind work items to a post-mortem" + "sidebarTitle": "Get war room detail" } } } }, - "/incident/work-item/update": { + "/incident/war-room/list": { "post": { - "description": "Partially update a work item's title, description, status, or priority.", - "operationId": "incidentWorkItemUpdate", + "description": "List all war rooms associated with an incident.", + "operationId": "incidentWarRoomList", "requestBody": { "content": { "application/json": { "example": { - "status": "in_progress", - "title": "Roll back the v2.14 deployment on web-server-01 and web-server-02", - "version": 1, - "work_item_id": "wi_9fK2mNqRtVwXyZaBcDeFgH" + "incident_id": "69da451ef77b1b51f40e83ee" }, "schema": { - "$ref": "#/components/schemas/UpdateWorkItemRequest" + "$ref": "#/components/schemas/ListWarRoomsRequest" } } }, @@ -40935,27 +40751,9 @@ "application/json": { "example": { "data": { - "item": { - "assignee_ids": [ - 3790925372131, - 4756301322131, - 5068740052131 - ], - "created_at_seconds": 1785495329, - "created_by": 5329873302131, - "incident_id": "6a5f1e28807515413b384bce", - "item_type": "follow_up", - "post_mortem_id": "51d65cd9525c369379ba471b5512df63", - "source_kind": "native", - "status": "done", - "title": "Follow-ups assigned to Bowen and Weili", - "updated_at_seconds": 1785496384, - "updated_by": 3790925372131, - "version": 2, - "work_item_id": "wi_68MHnkWBiyjrh6uhkxUyiZ" - } + "items": [] }, - "request_id": "01J8XQ3E5Z7JM2NTFQ5YJ8P9R4" + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ @@ -40965,7 +40763,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/WorkItemMutationResult" + "$ref": "#/components/schemas/ListWarRoomsResponse" } }, "type": "object" @@ -40989,37 +40787,36 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update a work item", + "summary": "List war rooms", "tags": [ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- Partial patch: omitted fields stay unchanged; an explicit `null` clears the field.\n- Optimistic locking — `version` must match the item's current version; a mismatch returns a conflict error.\n- Assignees, `item_type`, and the incident/post-mortem anchors cannot be changed here — use the dedicated endpoints.\n- Audited — changes are recorded in the audit log.", - "href": "/en/api-reference/on-call/incidents/incident-work-item-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |", + "href": "/en/api-reference/on-call/incidents/incident-war-room-list", "metadata": { - "sidebarTitle": "Update a work item" + "sidebarTitle": "List war rooms" } } } }, - "/insight/account": { + "/incident/work-item/assignees/reset": { "post": { - "description": "Return aggregated incident insight metrics for the entire account.", - "operationId": "insightByAccount", + "description": "Replace a work item's entire assignee set.", + "operationId": "incidentWorkItemResetAssignees", "requestBody": { "content": { "application/json": { "example": { - "aggregate_unit": "day", - "end_time": 1712604800, - "severities": [ - "Critical", - "Warning" + "assignee_ids": [ + 3790925372131, + 5068740052131 ], - "start_time": 1712000000 + "version": 2, + "work_item_id": "wi_9fK2mNqRtVwXyZaBcDeFgH" }, "schema": { - "$ref": "#/components/schemas/InsightQueryRequest" + "$ref": "#/components/schemas/ResetWorkItemAssigneesRequest" } } }, @@ -41031,34 +40828,33 @@ "application/json": { "example": { "data": { - "items": [ - { - "acknowledgement_pct": 100, - "mean_seconds_to_ack": 1658854.5, - "mean_seconds_to_close": 1874757, - "noise_reduction_pct": 0, - "total_alert_cnt": 0, - "total_alert_event_cnt": 0, - "total_engaged_seconds": 3317709, - "total_incident_cnt": 2, - "total_incidents_acknowledged": 2, - "total_incidents_auto_closed": 0, - "total_incidents_closed": 2, - "total_incidents_escalated": 0, - "total_incidents_manually_closed": 2, - "total_incidents_manually_escalated": 0, - "total_incidents_reassigned": 2, - "total_incidents_timeout_closed": 0, - "total_incidents_timeout_escalated": 0, - "total_interruptions": 3, - "total_notifications": 6, - "total_seconds_to_ack": 3317709, - "total_seconds_to_close": 3749514, - "ts": 1740844800 - } + "added_assignee_ids": [ + 5068740052131 + ], + "item": { + "assignee_ids": [ + 3790925372131, + 4756301322131, + 5068740052131 + ], + "created_at_seconds": 1785495329, + "created_by": 5329873302131, + "incident_id": "6a5f1e28807515413b384bce", + "item_type": "follow_up", + "post_mortem_id": "51d65cd9525c369379ba471b5512df63", + "source_kind": "native", + "status": "done", + "title": "Follow-ups assigned to Bowen and Weili", + "updated_at_seconds": 1785496384, + "updated_by": 3790925372131, + "version": 2, + "work_item_id": "wi_68MHnkWBiyjrh6uhkxUyiZ" + }, + "removed_assignee_ids": [ + 4756301322131 ] }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + "request_id": "01J8XQ3E5Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ @@ -41068,7 +40864,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/DimensionInsightResponse" + "$ref": "#/components/schemas/WorkItemMutationResult" } }, "type": "object" @@ -41092,35 +40888,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get account-level insight", + "summary": "Reset work item assignees", "tags": [ - "On-call/Analytics" + "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", - "href": "/en/api-reference/on-call/analytics/insight-by-account", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- Full replacement of the assignee set — an empty array clears all assignees.\n- Only newly added assignees are notified; removals never notify.\n- Audited — changes are recorded in the audit log.", + "href": "/en/api-reference/on-call/incidents/incident-work-item-reset-assignees", "metadata": { - "sidebarTitle": "Get account-level insight" + "sidebarTitle": "Reset work item assignees" } } } }, - "/insight/alert/topk-by-label": { + "/incident/work-item/complete": { "post": { - "description": "Return the top-K alert groups aggregated either by `check` or by `resource` label over the specified time range.", - "operationId": "insightTopkAlertsByLabel", + "description": "Mark a work item as completed by setting a client-defined target status.", + "operationId": "incidentWorkItemComplete", "requestBody": { "content": { "application/json": { "example": { - "end_time": 1712604800, - "k": 10, - "label": "check", - "orderby": "total_alert_cnt", - "start_time": 1712000000 + "idempotency_key": "complete-wi-20260731-0001", + "target_status": "done", + "version": 2, + "work_item_id": "wi_9fK2mNqRtVwXyZaBcDeFgH" }, "schema": { - "$ref": "#/components/schemas/InsightTopkAlertByLabelRequest" + "$ref": "#/components/schemas/CompleteWorkItemRequest" } } }, @@ -41132,25 +40927,27 @@ "application/json": { "example": { "data": { - "items": [ - { - "label": "cpu-high", - "total_alert_cnt": 312, - "total_alert_event_cnt": 987 - }, - { - "label": "disk-full", - "total_alert_cnt": 178, - "total_alert_event_cnt": 452 - }, - { - "label": "memory-oom", - "total_alert_cnt": 94, - "total_alert_event_cnt": 231 - } - ] + "item": { + "assignee_ids": [ + 3790925372131, + 4756301322131, + 5068740052131 + ], + "created_at_seconds": 1785495329, + "created_by": 5329873302131, + "incident_id": "6a5f1e28807515413b384bce", + "item_type": "follow_up", + "post_mortem_id": "51d65cd9525c369379ba471b5512df63", + "source_kind": "native", + "status": "done", + "title": "Follow-ups assigned to Bowen and Weili", + "updated_at_seconds": 1785496384, + "updated_by": 3790925372131, + "version": 2, + "work_item_id": "wi_68MHnkWBiyjrh6uhkxUyiZ" + } }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + "request_id": "01J8XQ3E5Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ @@ -41160,7 +40957,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/InsightAlertByLabelResponse" + "$ref": "#/components/schemas/WorkItemMutationResult" } }, "type": "object" @@ -41184,36 +40981,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get top-K alerts grouped by check or resource", + "summary": "Complete a work item", "tags": [ - "On-call/Analytics" + "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", - "href": "/en/api-reference/on-call/analytics/insight-topk-alerts-by-label", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- Only current assignees can complete a work item.\n- `target_status` is a client-defined string — there is no fixed state machine.\n- The same `idempotency_key` with the same `target_status` replays idempotently; the same key with a different `target_status` returns an error.\n- Audited — changes are recorded in the audit log.", + "href": "/en/api-reference/on-call/incidents/incident-work-item-complete", "metadata": { - "sidebarTitle": "Get top-K alerts grouped by check or resource" + "sidebarTitle": "Complete a work item" } } } }, - "/insight/channel": { + "/incident/work-item/convert": { "post": { - "description": "Return insight metrics aggregated by channel.", - "operationId": "insightByChannel", + "description": "Convert an incident action item into a post-mortem follow-up in place.", + "operationId": "incidentWorkItemConvert", "requestBody": { "content": { "application/json": { "example": { - "aggregate_unit": "day", - "channel_ids": [ - 4321322010131 - ], - "end_time": 1712604800, - "start_time": 1712000000 + "idempotency_key": "convert-wi-20260731-0001", + "target_status": "open", + "version": 2, + "work_item_id": "wi_9fK2mNqRtVwXyZaBcDeFgH" }, "schema": { - "$ref": "#/components/schemas/InsightQueryRequest" + "$ref": "#/components/schemas/ConvertWorkItemRequest" } } }, @@ -41225,36 +41020,27 @@ "application/json": { "example": { "data": { - "items": [ - { - "acknowledgement_pct": 100, - "channel_id": 4321322010131, - "channel_name": "Production Alerts", - "mean_seconds_to_ack": 1658854.5, - "mean_seconds_to_close": 1874757, - "noise_reduction_pct": 0, - "total_alert_cnt": 0, - "total_alert_event_cnt": 0, - "total_engaged_seconds": 3317709, - "total_incident_cnt": 2, - "total_incidents_acknowledged": 2, - "total_incidents_auto_closed": 0, - "total_incidents_closed": 2, - "total_incidents_escalated": 0, - "total_incidents_manually_closed": 2, - "total_incidents_manually_escalated": 0, - "total_incidents_reassigned": 2, - "total_incidents_timeout_closed": 0, - "total_incidents_timeout_escalated": 0, - "total_interruptions": 3, - "total_notifications": 6, - "total_seconds_to_ack": 3317709, - "total_seconds_to_close": 3749514, - "ts": 1740844800 - } - ] + "item": { + "assignee_ids": [ + 3790925372131, + 4756301322131, + 5068740052131 + ], + "created_at_seconds": 1785495329, + "created_by": 5329873302131, + "incident_id": "6a5f1e28807515413b384bce", + "item_type": "follow_up", + "post_mortem_id": "51d65cd9525c369379ba471b5512df63", + "source_kind": "native", + "status": "done", + "title": "Follow-ups assigned to Bowen and Weili", + "updated_at_seconds": 1785496384, + "updated_by": 3790925372131, + "version": 2, + "work_item_id": "wi_68MHnkWBiyjrh6uhkxUyiZ" + } }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + "request_id": "01J8XQ3E5Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ @@ -41264,7 +41050,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/DimensionInsightResponse" + "$ref": "#/components/schemas/WorkItemMutationResult" } }, "type": "object" @@ -41288,39 +41074,40 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get channel insight", + "summary": "Convert a work item to a follow-up", "tags": [ - "On-call/Analytics" + "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", - "href": "/en/api-reference/on-call/analytics/insight-by-channel", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- Converts an `action` item into a post-mortem `follow_up` in place — the `work_item_id` does not change.\n- Converting an item that is already a `follow_up` returns `idempotent_replay: true`.\n- If a post-mortem already exists for the incident, the converted item auto-binds to it.\n- Audited — changes are recorded in the audit log.", + "href": "/en/api-reference/on-call/incidents/incident-work-item-convert", "metadata": { - "sidebarTitle": "Get channel insight" + "sidebarTitle": "Convert a work item to a follow-up" } } } }, - "/insight/channel/export": { + "/incident/work-item/create": { "post": { - "description": "Export channel insight metrics as a CSV file — one row per channel (and per time/hour bucket when `aggregate_unit`/`split_hours` is used). The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope. `time_zone` defaults to UTC. Rows without a valid channel ID are skipped. Valid `export_fields` keys: channel_id, channel_name, total_incident_cnt, total_incidents_acknowledged, total_incidents_closed, total_incidents_auto_closed, total_incidents_manually_closed, total_incidents_timeout_closed, total_incidents_escalated, total_incidents_manually_escalated, total_incidents_timeout_escalated, total_incidents_reassigned, total_interruptions, total_notifications, total_engaged_seconds, mean_seconds_to_ack, mean_seconds_to_close, noise_reduction_pct, acknowledgement_pct, total_alert_cnt, total_alert_event_cnt, hours. The `hours` column is included by default only when `split_hours` is true. For compatibility, incident-export column keys are also accepted but produce empty columns.", - "operationId": "insightChannelExport", + "description": "Create an action on an active incident or a follow-up on one of its post-mortems.", + "operationId": "incidentWorkItemCreate", "requestBody": { "content": { "application/json": { "example": { - "channel_ids": [ - 4321322010131 - ], - "end_time": 1712604800, - "severities": [ - "Critical", - "Warning" + "assignee_ids": [ + 3790925372131 ], - "start_time": 1712000000 + "description": "CPU saturation started right after the v2.14 rollout; roll back and watch the error rate.", + "idempotency_key": "create-wi-20260731-0001", + "incident_id": "6a5f1e28807515413b384bce", + "item_type": "action", + "priority": "high", + "status": "open", + "title": "Roll back the v2.14 deployment on web-server-01" }, "schema": { - "$ref": "#/components/schemas/InsightQueryRequest" + "$ref": "#/components/schemas/CreateWorkItemRequest" } } }, @@ -41329,82 +41116,45 @@ "responses": { "200": { "content": { - "application/octet-stream": { - "example": "channel_id,channel_name,total_incident_cnt,total_incidents_closed\n4321322010131,Production Alerts,12,10\n", + "application/json": { + "example": { + "data": { + "added_assignee_ids": [ + 3790925372131 + ], + "item": { + "assignee_ids": [ + 3790925372131 + ], + "created_at_seconds": 1785496400, + "created_by": 3790925372131, + "incident_id": "6a5f1e28807515413b384bce", + "item_type": "action", + "source_kind": "native", + "status": "open", + "title": "Roll back the v2.14 deployment on web-server-01", + "updated_at_seconds": 1785496400, + "updated_by": 3790925372131, + "version": 1, + "work_item_id": "wi_9fK2mNqRtVwXyZaBcDeFgH" + } + }, + "request_id": "01J8XQ3E5Z7JM2NTFQ5YJ8P9R4" + }, "schema": { - "description": "CSV file stream (`Content-Type: application/octet-stream`, `Content-Disposition: attachment; filename=channel_export_yyyyMMdd_HHmmss.csv`). The first row holds localized column headers. Columns default to the full field set, or the keys given in `export_fields`.", - "format": "binary", - "type": "string" - } - } - }, - "description": "Success" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "summary": "Export channel insight", - "tags": [ - "On-call/Analytics" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/day**; **20 requests/minute**; **10 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", - "href": "/en/api-reference/on-call/analytics/insight-channel-export", - "metadata": { - "sidebarTitle": "Export channel insight" - } - } - } - }, - "/insight/incident/export": { - "post": { - "description": "Export the filtered incident analytics list as a CSV file. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope. CSV headers and formatted values use the request locale, falling back to the member locale and then the account locale. `time_zone` defaults to the account time zone, then `Asia/Shanghai`. Export stops after at most 100,000 rows. Valid `export_fields` keys: incident_id, title, severity, progress, channel_id, channel_name, team_id, team_name, created_at, alert_cnt, active_alert_cnt, alert_event_cnt, seconds_to_ack, seconds_to_close, closed_by, owner_id, owner_name, creator_id, creator_name, closer_id, closer_name, engaged_seconds, hours, notifications, interruptions, acknowledgements, ackers, assignments, reassignments, escalations, manual_escalations, timeout_escalations, assigned_to, raw_assigned_to, escalate_rule_name, responders, raw_responders, snooze_status, snoozed_before, ever_muted, frequency, is_rare, description, labels, fields. When `export_fields` is omitted, all columns are exported.", - "operationId": "insightIncidentExport", - "requestBody": { - "content": { - "application/json": { - "example": { - "description_html_to_text": true, - "end_time": 1712604800, - "export_fields": [ - "incident_id", - "title", - "severity", - "created_at", - "seconds_to_close" - ], - "severities": [ - "Critical", - "Warning" - ], - "start_time": 1712000000 - }, - "schema": { - "$ref": "#/components/schemas/InsightIncidentExportRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/octet-stream": { - "example": "incident_id,title,severity,created_at\n6a86b5d6f72de50ae1ce2ffb,CPU usage above 90%,Critical,2026-01-01 10:00:00 +0800 CST\n", - "schema": { - "description": "CSV file stream (`Content-Type: application/octet-stream`, `Content-Disposition: attachment; filename=incident_export_yyyyMMdd_HHmmss.csv`). The first row holds localized column headers. Columns default to the full incident field set, or the keys given in `export_fields`.", - "format": "binary", - "type": "string" + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/WorkItemCreateResult" + } + }, + "type": "object" + } + ] } } }, @@ -41423,37 +41173,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Export insight incidents", + "summary": "Create a work item", "tags": [ - "On-call/Analytics" + "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/day**; **20 requests/minute**; **10 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", - "href": "/en/api-reference/on-call/analytics/insight-incident-export", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- An `action` anchors to an active incident and must NOT set `post_mortem_id`; a `follow_up` REQUIRES the `post_mortem_id` of a post-mortem linked to `incident_id`.\n- Assignees must be active members who can already read the anchor incident or post-mortem — assignment never grants access.\n- Newly added assignees are notified.\n- Retrying with the same (`creator`, `idempotency_key`) replays the original item with `idempotent_replay: true` instead of creating a duplicate.\n- Audited — changes are recorded in the audit log.", + "href": "/en/api-reference/on-call/incidents/incident-work-item-create", "metadata": { - "sidebarTitle": "Export insight incidents" + "sidebarTitle": "Create a work item" } } } }, - "/insight/incident/list": { + "/incident/work-item/delete": { "post": { - "description": "Return a paged list of incidents with per-incident handling metrics used by the analytics dashboard.", - "operationId": "insightIncidentList", + "description": "Soft-delete a work item.", + "operationId": "incidentWorkItemDelete", "requestBody": { "content": { "application/json": { "example": { - "end_time": 1712604800, - "limit": 20, - "p": 1, - "severities": [ - "Critical" - ], - "start_time": 1712000000 + "version": 2, + "work_item_id": "wi_9fK2mNqRtVwXyZaBcDeFgH" }, "schema": { - "$ref": "#/components/schemas/InsightIncidentListRequest" + "$ref": "#/components/schemas/DeleteWorkItemRequest" } } }, @@ -41464,63 +41209,8 @@ "content": { "application/json": { "example": { - "data": { - "has_next_page": true, - "items": [ - { - "acknowledgements": 1, - "active_alert_cnt": 0, - "alert_cnt": 3, - "alert_event_cnt": 5, - "assigned_to": { - "assigned_at": 1787213270, - "escalate_rule_id": "66138789904a9027583dbc4e", - "escalate_rule_name": "On-call Policy", - "id": "b8tyUoRvCv4wsPndFRpmNL", - "layer_idx": 0, - "type": "assign" - }, - "assignments": 1, - "channel_id": 3047621227131, - "channel_name": "Production Alerts", - "closed_by": "manually", - "closer_id": 2477273692131, - "closer_name": "alice", - "created_at": 1787213270, - "creator_id": 2477273692131, - "creator_name": "alice", - "description": "CPU usage stayed above the threshold for 5 minutes", - "engaged_seconds": 1816, - "escalations": 0, - "hours": "work", - "incident_id": "6a86b5d6f72de50ae1ce2ffb", - "interruptions": 1, - "manual_escalations": 0, - "notifications": 2, - "progress": "Closed", - "reassignments": 0, - "responders": [ - { - "acknowledged_at": 1787213284, - "assigned_at": 1787213270, - "email": "alice@example.com", - "person_id": 2477273692131, - "person_name": "alice" - } - ], - "seconds_to_ack": 14, - "seconds_to_close": 1830, - "severity": "Critical", - "team_id": 2477033058131, - "team_name": "SRE Team", - "timeout_escalations": 0, - "title": "CPU usage above 90% on prod-web-01" - } - ], - "search_after_ctx": "6a86b5d6f72de50ae1ce2ffb", - "total": 2363 - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + "data": {}, + "request_id": "01J8XQ3E5Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ @@ -41530,7 +41220,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/InsightIncidentListResponse" + "$ref": "#/components/schemas/WorkItemMutationResult" } }, "type": "object" @@ -41554,36 +41244,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List insight incidents", + "summary": "Delete a work item", "tags": [ - "On-call/Analytics" + "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", - "href": "/en/api-reference/on-call/analytics/insight-incident-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- Soft delete — the item no longer appears in listings but is retained.\n- Optimistic locking — `version` must match the item's current version; a mismatch returns a conflict error.\n- Audited — changes are recorded in the audit log.", + "href": "/en/api-reference/on-call/incidents/incident-work-item-delete", "metadata": { - "sidebarTitle": "List insight incidents" + "sidebarTitle": "Delete a work item" } } } }, - "/insight/responder": { + "/incident/work-item/list": { "post": { - "description": "Return insight metrics aggregated by responder.", - "operationId": "insightByResponder", + "description": "List incident work items (actions and post-mortem follow-ups) with cursor pagination.", + "operationId": "incidentWorkItemList", "requestBody": { "content": { "application/json": { "example": { - "aggregate_unit": "day", - "end_time": 1712604800, - "responder_ids": [ - 3790925372131 - ], - "start_time": 1712000000 + "incident_id": "6a5f1e28807515413b384bce", + "limit": 50 }, "schema": { - "$ref": "#/components/schemas/InsightQueryRequest" + "$ref": "#/components/schemas/ListWorkItemRequest" } } }, @@ -41595,27 +41281,48 @@ "application/json": { "example": { "data": { + "has_more": true, "items": [ { - "acknowledgement_pct": 100, - "mean_seconds_to_ack": 2265624, - "responder_id": 3790925372131, - "responder_name": "alice", - "total_engaged_seconds": 10, - "total_incident_cnt": 1, - "total_incidents_acknowledged": 1, - "total_incidents_escalated": 0, - "total_incidents_manually_escalated": 0, - "total_incidents_reassigned": 0, - "total_incidents_timeout_escalated": 0, - "total_interruptions": 1, - "total_notifications": 2, - "total_seconds_to_ack": 2265624, - "ts": 1740844800 + "assignee_ids": [ + 3790925372131, + 4756301322131, + 5068740052131 + ], + "created_at_seconds": 1785495329, + "created_by": 5329873302131, + "incident_id": "6a5f1e28807515413b384bce", + "item_type": "follow_up", + "post_mortem_id": "51d65cd9525c369379ba471b5512df63", + "source_kind": "native", + "status": "done", + "title": "Follow-ups assigned to Bowen and Weili", + "updated_at_seconds": 1785496384, + "updated_by": 3790925372131, + "version": 2, + "work_item_id": "wi_68MHnkWBiyjrh6uhkxUyiZ" + }, + { + "assignee_ids": [ + 5068740052131 + ], + "created_at_seconds": 1785495164, + "created_by": 3790925372131, + "incident_id": "6a5f1e28807515413b384bce", + "item_type": "follow_up", + "post_mortem_id": "51d65cd9525c369379ba471b5512df63", + "source_kind": "native", + "status": "open", + "title": "Check whether this to-do notifies Bowen", + "updated_at_seconds": 1785495164, + "updated_by": 3790925372131, + "version": 1, + "work_item_id": "wi_dMRYTeZHivE5vf87PQEeFX" } - ] + ], + "next_cursor": "MTc4NTQ5NTE2NHx3aV9kTVJZVGVaSGl2RTV2Zjg3UFFFZUZY" }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + "request_id": "01J8XQ3E5Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ @@ -41625,7 +41332,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ResponderInsightResponse" + "$ref": "#/components/schemas/WorkItemListResult" } }, "type": "object" @@ -41649,39 +41356,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get responder insight", + "summary": "List work items", "tags": [ - "On-call/Analytics" + "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", - "href": "/en/api-reference/on-call/analytics/insight-by-responder", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |\n\n## Usage\n\n- At least one of `incident_id`, `post_mortem_id`, or `assignee_id` is required.\n- Cursor pagination sorted by `updated_at_seconds` descending — pass the previous response's `next_cursor` as `cursor` until `has_more` is false.\n- Listing by `incident_id` also includes follow-ups anchored on the incident's post-mortem.\n- Listing by `assignee_id` alone requires being that assignee or an account admin.", + "href": "/en/api-reference/on-call/incidents/incident-work-item-list", "metadata": { - "sidebarTitle": "Get responder insight" + "sidebarTitle": "List work items" } } } }, - "/insight/responder/export": { + "/incident/work-item/post-mortem/bind": { "post": { - "description": "Export responder insight metrics as a CSV file — one row per responder (and per time/hour bucket when `aggregate_unit`/`split_hours` is used). The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope. `time_zone` defaults to UTC. Rows without a valid responder ID are skipped. Valid `export_fields` keys: responder_id, responder_name, total_incident_cnt, total_incidents_acknowledged, total_incidents_reassigned, total_incidents_escalated, total_incidents_manually_escalated, total_incidents_timeout_escalated, total_interruptions, total_notifications, total_engaged_seconds, mean_seconds_to_ack, acknowledgement_pct, hours. The `hours` column is included by default only when `split_hours` is true. For compatibility, incident-export column keys are also accepted but produce empty columns.", - "operationId": "insightResponderExport", + "description": "Bulk-bind an incident's converted-but-unbound follow-ups to a post-mortem.", + "operationId": "incidentWorkItemBindPostMortem", "requestBody": { "content": { "application/json": { "example": { - "end_time": 1712604800, - "responder_ids": [ - 3790925372131 - ], - "severities": [ - "Critical", - "Warning" - ], - "start_time": 1712000000 + "idempotency_key": "bind-wi-20260731-0001", + "incident_id": "6a5f1e28807515413b384bce", + "post_mortem_id": "51d65cd9525c369379ba471b5512df63" }, "schema": { - "$ref": "#/components/schemas/InsightQueryRequest" + "$ref": "#/components/schemas/BindWorkItemPostMortemRequest" } } }, @@ -41690,12 +41391,65 @@ "responses": { "200": { "content": { - "application/octet-stream": { - "example": "responder_id,responder_name,total_incident_cnt,total_incidents_acknowledged\n3790925372131,alice,5,4\n", + "application/json": { + "example": { + "data": { + "has_more": false, + "items": [ + { + "assignee_ids": [ + 3790925372131, + 4756301322131, + 5068740052131 + ], + "created_at_seconds": 1785495329, + "created_by": 5329873302131, + "incident_id": "6a5f1e28807515413b384bce", + "item_type": "follow_up", + "post_mortem_id": "51d65cd9525c369379ba471b5512df63", + "source_kind": "native", + "status": "done", + "title": "Follow-ups assigned to Bowen and Weili", + "updated_at_seconds": 1785496384, + "updated_by": 3790925372131, + "version": 2, + "work_item_id": "wi_68MHnkWBiyjrh6uhkxUyiZ" + }, + { + "assignee_ids": [ + 5068740052131 + ], + "created_at_seconds": 1785495164, + "created_by": 3790925372131, + "incident_id": "6a5f1e28807515413b384bce", + "item_type": "follow_up", + "post_mortem_id": "51d65cd9525c369379ba471b5512df63", + "source_kind": "native", + "status": "open", + "title": "Check whether this to-do notifies Bowen", + "updated_at_seconds": 1785495164, + "updated_by": 3790925372131, + "version": 1, + "work_item_id": "wi_dMRYTeZHivE5vf87PQEeFX" + } + ] + }, + "request_id": "01J8XQ3E5Z7JM2NTFQ5YJ8P9R4" + }, "schema": { - "description": "CSV file stream (`Content-Type: application/octet-stream`, `Content-Disposition: attachment; filename=responder_export_yyyyMMdd_HHmmss.csv`). The first row holds localized column headers. Columns default to the full field set, or the keys given in `export_fields`.", - "format": "binary", - "type": "string" + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/WorkItemListResult" + } + }, + "type": "object" + } + ] } } }, @@ -41714,36 +41468,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Export responder insight", + "summary": "Bind work items to a post-mortem", "tags": [ - "On-call/Analytics" + "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/day**; **20 requests/minute**; **10 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", - "href": "/en/api-reference/on-call/analytics/insight-responder-export", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- Binds ALL of the incident's converted-but-unbound follow-ups to the given post-mortem in one call.\n- `items` holds the newly bound batch; `next_cursor` and `has_more` are not set.\n- Idempotent by `idempotency_key` — retrying with the same key replays the original result.\n- Audited — changes are recorded in the audit log.", + "href": "/en/api-reference/on-call/incidents/incident-work-item-bind-post-mortem", "metadata": { - "sidebarTitle": "Export responder insight" + "sidebarTitle": "Bind work items to a post-mortem" } } } }, - "/insight/team": { + "/incident/work-item/update": { "post": { - "description": "Return insight metrics aggregated by team.", - "operationId": "insightByTeam", + "description": "Partially update a work item's title, description, status, or priority.", + "operationId": "incidentWorkItemUpdate", "requestBody": { "content": { "application/json": { "example": { - "aggregate_unit": "day", - "end_time": 1712604800, - "start_time": 1712000000, - "team_ids": [ - 4295771902131 - ] + "status": "in_progress", + "title": "Roll back the v2.14 deployment on web-server-01 and web-server-02", + "version": 1, + "work_item_id": "wi_9fK2mNqRtVwXyZaBcDeFgH" }, "schema": { - "$ref": "#/components/schemas/InsightQueryRequest" + "$ref": "#/components/schemas/UpdateWorkItemRequest" } } }, @@ -41755,36 +41507,27 @@ "application/json": { "example": { "data": { - "items": [ - { - "acknowledgement_pct": 100, - "mean_seconds_to_ack": 1658854.5, - "mean_seconds_to_close": 1874757, - "noise_reduction_pct": 0, - "team_id": 4295771902131, - "team_name": "SRE Team", - "total_alert_cnt": 0, - "total_alert_event_cnt": 0, - "total_engaged_seconds": 3317709, - "total_incident_cnt": 2, - "total_incidents_acknowledged": 2, - "total_incidents_auto_closed": 0, - "total_incidents_closed": 2, - "total_incidents_escalated": 0, - "total_incidents_manually_closed": 2, - "total_incidents_manually_escalated": 0, - "total_incidents_reassigned": 2, - "total_incidents_timeout_closed": 0, - "total_incidents_timeout_escalated": 0, - "total_interruptions": 3, - "total_notifications": 6, - "total_seconds_to_ack": 3317709, - "total_seconds_to_close": 3749514, - "ts": 1740844800 - } - ] + "item": { + "assignee_ids": [ + 3790925372131, + 4756301322131, + 5068740052131 + ], + "created_at_seconds": 1785495329, + "created_by": 5329873302131, + "incident_id": "6a5f1e28807515413b384bce", + "item_type": "follow_up", + "post_mortem_id": "51d65cd9525c369379ba471b5512df63", + "source_kind": "native", + "status": "done", + "title": "Follow-ups assigned to Bowen and Weili", + "updated_at_seconds": 1785496384, + "updated_by": 3790925372131, + "version": 2, + "work_item_id": "wi_68MHnkWBiyjrh6uhkxUyiZ" + } }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + "request_id": "01J8XQ3E5Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ @@ -41794,7 +41537,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/DimensionInsightResponse" + "$ref": "#/components/schemas/WorkItemMutationResult" } }, "type": "object" @@ -41818,36 +41561,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get team insight", + "summary": "Update a work item", "tags": [ - "On-call/Analytics" + "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", - "href": "/en/api-reference/on-call/analytics/insight-by-team", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- Partial patch: omitted fields stay unchanged; an explicit `null` clears the field.\n- Optimistic locking — `version` must match the item's current version; a mismatch returns a conflict error.\n- Assignees, `item_type`, and the incident/post-mortem anchors cannot be changed here — use the dedicated endpoints.\n- Audited — changes are recorded in the audit log.", + "href": "/en/api-reference/on-call/incidents/incident-work-item-update", "metadata": { - "sidebarTitle": "Get team insight" + "sidebarTitle": "Update a work item" } } } }, - "/insight/team/export": { + "/insight/account": { "post": { - "description": "Export team insight metrics as a CSV file — one row per team (and per time/hour bucket when `aggregate_unit`/`split_hours` is used). The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope. `time_zone` defaults to UTC. Rows without a valid team ID are skipped. Valid `export_fields` keys: team_id, team_name, total_incident_cnt, total_incidents_acknowledged, total_incidents_closed, total_incidents_auto_closed, total_incidents_manually_closed, total_incidents_timeout_closed, total_incidents_escalated, total_incidents_manually_escalated, total_incidents_timeout_escalated, total_incidents_reassigned, total_interruptions, total_notifications, total_engaged_seconds, mean_seconds_to_ack, mean_seconds_to_close, noise_reduction_pct, acknowledgement_pct, total_alert_cnt, total_alert_event_cnt, hours. The `hours` column is included by default only when `split_hours` is true. For compatibility, incident-export column keys are also accepted but produce empty columns.", - "operationId": "insightTeamExport", + "description": "Return aggregated incident insight metrics for the entire account.", + "operationId": "insightByAccount", "requestBody": { "content": { "application/json": { "example": { + "aggregate_unit": "day", "end_time": 1712604800, "severities": [ "Critical", "Warning" ], - "start_time": 1712000000, - "team_ids": [ - 4295771902131 - ] + "start_time": 1712000000 }, "schema": { "$ref": "#/components/schemas/InsightQueryRequest" @@ -41859,12 +41600,52 @@ "responses": { "200": { "content": { - "application/octet-stream": { - "example": "team_id,team_name,total_incident_cnt,total_incidents_closed\n4295771902131,SRE Team,12,10\n", + "application/json": { + "example": { + "data": { + "items": [ + { + "acknowledgement_pct": 100, + "mean_seconds_to_ack": 1658854.5, + "mean_seconds_to_close": 1874757, + "noise_reduction_pct": 0, + "total_alert_cnt": 0, + "total_alert_event_cnt": 0, + "total_engaged_seconds": 3317709, + "total_incident_cnt": 2, + "total_incidents_acknowledged": 2, + "total_incidents_auto_closed": 0, + "total_incidents_closed": 2, + "total_incidents_escalated": 0, + "total_incidents_manually_closed": 2, + "total_incidents_manually_escalated": 0, + "total_incidents_reassigned": 2, + "total_incidents_timeout_closed": 0, + "total_incidents_timeout_escalated": 0, + "total_interruptions": 3, + "total_notifications": 6, + "total_seconds_to_ack": 3317709, + "total_seconds_to_close": 3749514, + "ts": 1740844800 + } + ] + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, "schema": { - "description": "CSV file stream (`Content-Type: application/octet-stream`, `Content-Disposition: attachment; filename=team_export_yyyyMMdd_HHmmss.csv`). The first row holds localized column headers. Columns default to the full field set, or the keys given in `export_fields`.", - "format": "binary", - "type": "string" + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/DimensionInsightResponse" + } + }, + "type": "object" + } + ] } } }, @@ -41883,31 +41664,35 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Export team insight", + "summary": "Get account-level insight", "tags": [ "On-call/Analytics" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/day**; **20 requests/minute**; **10 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", - "href": "/en/api-reference/on-call/analytics/insight-team-export", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", + "href": "/en/api-reference/on-call/analytics/insight-by-account", "metadata": { - "sidebarTitle": "Export team insight" + "sidebarTitle": "Get account-level insight" } } } }, - "/member/delete": { + "/insight/alert/topk-by-label": { "post": { - "description": "Remove a member from the organization by ID, email, phone, or name.", - "operationId": "memberDelete", + "description": "Return the top-K alert groups aggregated either by `check` or by `resource` label over the specified time range.", + "operationId": "insightTopkAlertsByLabel", "requestBody": { "content": { "application/json": { "example": { - "member_id": 5068740052131 + "end_time": 1712604800, + "k": 10, + "label": "check", + "orderby": "total_alert_cnt", + "start_time": 1712000000 }, "schema": { - "$ref": "#/components/schemas/MemberDeleteRequest" + "$ref": "#/components/schemas/InsightTopkAlertByLabelRequest" } } }, @@ -41918,7 +41703,25 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "items": [ + { + "label": "cpu-high", + "total_alert_cnt": 312, + "total_alert_event_cnt": 987 + }, + { + "label": "disk-full", + "total_alert_cnt": 178, + "total_alert_event_cnt": 452 + }, + { + "label": "memory-oom", + "total_alert_cnt": 94, + "total_alert_event_cnt": 231 + } + ] + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -41929,7 +41732,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/MemberEmptyObject" + "$ref": "#/components/schemas/InsightAlertByLabelResponse" } }, "type": "object" @@ -41953,29 +41756,36 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete member", + "summary": "Get top-K alerts grouped by check or resource", "tags": [ - "Platform/Members" + "On-call/Analytics" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Members Manage** (`organization`) |\n\n## Usage\n\n- By default (`is_force=false`), the system checks whether the member is referenced by other resources (e.g., escalation rules, schedules). If references exist, the API returns error code `ReferenceExist` with the reference list in `data.refs`. Set `is_force=true` to skip the reference check and force delete.\n- Members provisioned via SSO with `sso_user_non_editable=true` cannot be deleted through this API. Disable that SSO restriction first.\n- This operation is recorded in the audit log.", - "href": "/en/api-reference/platform/members/member-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", + "href": "/en/api-reference/on-call/analytics/insight-topk-alerts-by-label", "metadata": { - "sidebarTitle": "Delete member" + "sidebarTitle": "Get top-K alerts grouped by check or resource" } } } }, - "/member/info": { + "/insight/channel": { "post": { - "description": "Return the profile of the member the credential belongs to. Requires a member-scoped credential — calls authenticated as the account principal (e.g. an account-level app key) are rejected with a 400.", - "operationId": "memberInfo", + "description": "Return insight metrics aggregated by channel.", + "operationId": "insightByChannel", "requestBody": { "content": { "application/json": { - "example": {}, + "example": { + "aggregate_unit": "day", + "channel_ids": [ + 4321322010131 + ], + "end_time": 1712604800, + "start_time": 1712000000 + }, "schema": { - "$ref": "#/components/schemas/MemberInfoRequest" + "$ref": "#/components/schemas/InsightQueryRequest" } } }, @@ -41987,28 +41797,34 @@ "application/json": { "example": { "data": { - "account_avatar": "", - "account_email": "alice@example.com", - "account_id": 2451002751131, - "account_locale": "en-US", - "account_name": "Acme Corp", - "account_role_ids": [ - 6 - ], - "account_time_zone": "Asia/Shanghai", - "avatar": "/image/avatar1.png", - "country_code": "CN", - "created_at": 1701399971, - "domain": "acme", - "email": "alice@example.com", - "email_verified": true, - "is_external": false, - "locale": "zh-CN", - "member_id": 2476444212131, - "member_name": "Alice", - "phone": "+86185****0300", - "phone_verified": true, - "time_zone": "Asia/Shanghai" + "items": [ + { + "acknowledgement_pct": 100, + "channel_id": 4321322010131, + "channel_name": "Production Alerts", + "mean_seconds_to_ack": 1658854.5, + "mean_seconds_to_close": 1874757, + "noise_reduction_pct": 0, + "total_alert_cnt": 0, + "total_alert_event_cnt": 0, + "total_engaged_seconds": 3317709, + "total_incident_cnt": 2, + "total_incidents_acknowledged": 2, + "total_incidents_auto_closed": 0, + "total_incidents_closed": 2, + "total_incidents_escalated": 0, + "total_incidents_manually_closed": 2, + "total_incidents_manually_escalated": 0, + "total_incidents_reassigned": 2, + "total_incidents_timeout_closed": 0, + "total_incidents_timeout_escalated": 0, + "total_interruptions": 3, + "total_notifications": 6, + "total_seconds_to_ack": 3317709, + "total_seconds_to_close": 3749514, + "ts": 1740844800 + } + ] }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -42020,7 +41836,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/MemberInfoResponse" + "$ref": "#/components/schemas/DimensionInsightResponse" } }, "type": "object" @@ -42044,36 +41860,39 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get current member info", + "summary": "Get channel insight", "tags": [ - "Platform/Members" + "On-call/Analytics" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — but the credential must belong to a member; account-principal credentials (e.g. an account-level app key) are rejected with a 400 |", - "href": "/en/api-reference/platform/members/member-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", + "href": "/en/api-reference/on-call/analytics/insight-by-channel", "metadata": { - "sidebarTitle": "Get current member info" + "sidebarTitle": "Get channel insight" } } } }, - "/member/info/reset": { + "/insight/channel/export": { "post": { - "description": "Identify a member and reset the specified profile fields.", - "operationId": "memberResetInfo", + "description": "Export channel insight metrics as a CSV file — one row per channel (and per time/hour bucket when `aggregate_unit`/`split_hours` is used). The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope. `time_zone` defaults to UTC. Rows without a valid channel ID are skipped. Valid `export_fields` keys: channel_id, channel_name, total_incident_cnt, total_incidents_acknowledged, total_incidents_closed, total_incidents_auto_closed, total_incidents_manually_closed, total_incidents_timeout_closed, total_incidents_escalated, total_incidents_manually_escalated, total_incidents_timeout_escalated, total_incidents_reassigned, total_interruptions, total_notifications, total_engaged_seconds, mean_seconds_to_ack, mean_seconds_to_close, noise_reduction_pct, acknowledgement_pct, total_alert_cnt, total_alert_event_cnt, hours. The `hours` column is included by default only when `split_hours` is true. For compatibility, incident-export column keys are also accepted but produce empty columns.", + "operationId": "insightChannelExport", "requestBody": { "content": { "application/json": { "example": { - "member_id": 2476444212131, - "updates": { - "locale": "zh-CN", - "member_name": "Alice Chen", - "time_zone": "Asia/Shanghai" - } + "channel_ids": [ + 4321322010131 + ], + "end_time": 1712604800, + "severities": [ + "Critical", + "Warning" + ], + "start_time": 1712000000 }, "schema": { - "$ref": "#/components/schemas/MemberResetInfoRequest" + "$ref": "#/components/schemas/InsightQueryRequest" } } }, @@ -42082,25 +41901,12 @@ "responses": { "200": { "content": { - "application/json": { - "example": { - "data": {}, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, + "application/octet-stream": { + "example": "channel_id,channel_name,total_incident_cnt,total_incidents_closed\n4321322010131,Production Alerts,12,10\n", "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/MemberEmptyObject" - } - }, - "type": "object" - } - ] + "description": "CSV file stream (`Content-Type: application/octet-stream`, `Content-Disposition: attachment; filename=channel_export_yyyyMMdd_HHmmss.csv`). The first row holds localized column headers. Columns default to the full field set, or the keys given in `export_fields`.", + "format": "binary", + "type": "string" } } }, @@ -42119,48 +41925,44 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Reset member info", + "summary": "Export channel insight", "tags": [ - "Platform/Members" + "On-call/Analytics" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Identify the member with one of `member_id`, `member_name`, `email`, `phone`, or `ref_id`. If multiple identifiers are present, the server checks them in that order.\n- `updates.country_code` is an ISO 3166-1 alpha-2 region code (e.g. \"CN\", \"US\"). It is an independently updatable field: `updates.phone` is not required, and the new region is stored even when the phone is unchanged. An explicit empty string is rejected with a 400.\n- When `updates.phone` has no \"+\" prefix, it is parsed with `updates.country_code` as the region hint, falling back to the member's stored region and then to \"CN\". Legacy digit calling codes such as \"86\" remain accepted only as parsing hints — stored values are always ISO region codes.\n- The top-level `country_code` is only a parsing hint for the identifying `phone`; it is never stored.\n- Put the profile fields to write under `updates`: `member_name`, `password`, `phone`, `country_code`, `email`, `avatar`, `locale`, `time_zone`, or `ref_id`.\n- Members provisioned by SSO cannot be changed when SSO marks them as externally managed.\n- `updates` must carry at least one field; an object with every field omitted is rejected.", - "href": "/en/api-reference/platform/members/member-reset-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/day**; **20 requests/minute**; **10 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", + "href": "/en/api-reference/on-call/analytics/insight-channel-export", "metadata": { - "sidebarTitle": "Reset member info" + "sidebarTitle": "Export channel insight" } } } }, - "/member/invite": { + "/insight/incident/export": { "post": { - "description": "Batch invite new members to the organization by email or phone.", - "operationId": "memberInvite", + "description": "Export the filtered incident analytics list as a CSV file. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope. CSV headers and formatted values use the request locale, falling back to the member locale and then the account locale. `time_zone` defaults to the account time zone, then `Asia/Shanghai`. Export stops after at most 100,000 rows. Valid `export_fields` keys: incident_id, title, severity, progress, channel_id, channel_name, team_id, team_name, created_at, alert_cnt, active_alert_cnt, alert_event_cnt, seconds_to_ack, seconds_to_close, closed_by, owner_id, owner_name, creator_id, creator_name, closer_id, closer_name, engaged_seconds, hours, notifications, interruptions, acknowledgements, ackers, assignments, reassignments, escalations, manual_escalations, timeout_escalations, assigned_to, raw_assigned_to, escalate_rule_name, responders, raw_responders, snooze_status, snoozed_before, ever_muted, frequency, is_rare, description, labels, fields. When `export_fields` is omitted, all columns are exported.", + "operationId": "insightIncidentExport", "requestBody": { "content": { "application/json": { "example": { - "members": [ - { - "email": "charlie@example.com", - "locale": "en-US", - "member_name": "Charlie", - "role_ids": [ - 6 - ], - "time_zone": "Asia/Shanghai" - }, - { - "country_code": "CN", - "locale": "zh-CN", - "member_name": "Dave", - "phone": "13800138000", - "time_zone": "Asia/Shanghai" - } - ] + "description_html_to_text": true, + "end_time": 1712604800, + "export_fields": [ + "incident_id", + "title", + "severity", + "created_at", + "seconds_to_close" + ], + "severities": [ + "Critical", + "Warning" + ], + "start_time": 1712000000 }, "schema": { - "$ref": "#/components/schemas/MemberInviteRequest" + "$ref": "#/components/schemas/InsightIncidentExportRequest" } } }, @@ -42169,36 +41971,12 @@ "responses": { "200": { "content": { - "application/json": { - "example": { - "data": { - "items": [ - { - "member_id": 5068740052131, - "member_name": "Charlie" - }, - { - "member_id": 5068740052132, - "member_name": "Dave" - } - ] - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, + "application/octet-stream": { + "example": "incident_id,title,severity,created_at\n6a86b5d6f72de50ae1ce2ffb,CPU usage above 90%,Critical,2026-01-01 10:00:00 +0800 CST\n", "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/MemberInviteResponse" - } - }, - "type": "object" - } - ] + "description": "CSV file stream (`Content-Type: application/octet-stream`, `Content-Disposition: attachment; filename=incident_export_yyyyMMdd_HHmmss.csv`). The first row holds localized column headers. Columns default to the full incident field set, or the keys given in `export_fields`.", + "format": "binary", + "type": "string" } } }, @@ -42217,32 +41995,37 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Invite members", + "summary": "Export insight incidents", "tags": [ - "Platform/Members" + "On-call/Analytics" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Members Manage** (`organization`) |\n\n## Usage\n\n- `country_code` must be an ISO 3166-1 alpha-2 region code (e.g. \"CN\"). It is validated and normalized to upper case before storage; invalid values are rejected with a 400.\n- When a member's `phone` has no \"+\" prefix, it is parsed with that member's `country_code` as the region hint (defaults to \"CN\" when omitted).", - "href": "/en/api-reference/platform/members/member-invite", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/day**; **20 requests/minute**; **10 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", + "href": "/en/api-reference/on-call/analytics/insight-incident-export", "metadata": { - "sidebarTitle": "Invite members" + "sidebarTitle": "Export insight incidents" } } } }, - "/member/list": { + "/insight/incident/list": { "post": { - "description": "Return a paginated list of organization members.", - "operationId": "memberList", + "description": "Return a paged list of incidents with per-incident handling metrics used by the analytics dashboard.", + "operationId": "insightIncidentList", "requestBody": { "content": { "application/json": { "example": { - "limit": 5, - "p": 1 + "end_time": 1712604800, + "limit": 20, + "p": 1, + "severities": [ + "Critical" + ], + "start_time": 1712000000 }, "schema": { - "$ref": "#/components/schemas/MemberListRequest" + "$ref": "#/components/schemas/InsightIncidentListRequest" } } }, @@ -42254,50 +42037,60 @@ "application/json": { "example": { "data": { + "has_next_page": true, "items": [ { - "account_id": 2451002751131, - "account_role_ids": [ - 2, - 6 - ], - "avatar": "", - "country_code": "", - "created_at": 1752030749, - "email": "bob@example.com", - "email_verified": true, - "is_external": false, - "member_id": 5068740052131, - "member_name": "Bob", - "phone": "+86151****6519", - "phone_verified": true, - "ref_id": "", - "status": "enabled", - "updated_at": 1775962064 - }, - { - "account_id": 2451002751131, - "account_role_ids": [ - 6 + "acknowledgements": 1, + "active_alert_cnt": 0, + "alert_cnt": 3, + "alert_event_cnt": 5, + "assigned_to": { + "assigned_at": 1787213270, + "escalate_rule_id": "66138789904a9027583dbc4e", + "escalate_rule_name": "On-call Policy", + "id": "b8tyUoRvCv4wsPndFRpmNL", + "layer_idx": 0, + "type": "assign" + }, + "assignments": 1, + "channel_id": 3047621227131, + "channel_name": "Production Alerts", + "closed_by": "manually", + "closer_id": 2477273692131, + "closer_name": "alice", + "created_at": 1787213270, + "creator_id": 2477273692131, + "creator_name": "alice", + "description": "CPU usage stayed above the threshold for 5 minutes", + "engaged_seconds": 1816, + "escalations": 0, + "hours": "work", + "incident_id": "6a86b5d6f72de50ae1ce2ffb", + "interruptions": 1, + "manual_escalations": 0, + "notifications": 2, + "progress": "Closed", + "reassignments": 0, + "responders": [ + { + "acknowledged_at": 1787213284, + "assigned_at": 1787213270, + "email": "alice@example.com", + "person_id": 2477273692131, + "person_name": "alice" + } ], - "avatar": "/image/avatar1.png", - "country_code": "CN", - "created_at": 1701399971, - "email": "alice@example.com", - "email_verified": true, - "is_external": false, - "member_id": 2476444212131, - "member_name": "Alice", - "phone": "+86185****0300", - "phone_verified": true, - "ref_id": "", - "status": "enabled", - "updated_at": 1775809507 + "seconds_to_ack": 14, + "seconds_to_close": 1830, + "severity": "Critical", + "team_id": 2477033058131, + "team_name": "SRE Team", + "timeout_escalations": 0, + "title": "CPU usage above 90% on prod-web-01" } ], - "limit": 5, - "p": 1, - "total": 148 + "search_after_ctx": "6a86b5d6f72de50ae1ce2ffb", + "total": 2363 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -42309,7 +42102,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/MemberListResponse" + "$ref": "#/components/schemas/InsightIncidentListResponse" } }, "type": "object" @@ -42333,34 +42126,36 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List members", + "summary": "List insight incidents", "tags": [ - "Platform/Members" + "On-call/Analytics" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/platform/members/member-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", + "href": "/en/api-reference/on-call/analytics/insight-incident-list", "metadata": { - "sidebarTitle": "List members" + "sidebarTitle": "List insight incidents" } } } }, - "/member/role/grant": { + "/insight/responder": { "post": { - "description": "Add role assignments to a member. Role IDs that do not exist are silently ignored; if none resolve, the call is a no-op success.", - "operationId": "memberGrantRole", + "description": "Return insight metrics aggregated by responder.", + "operationId": "insightByResponder", "requestBody": { "content": { "application/json": { "example": { - "member_id": 5068740052131, - "role_ids": [ - 6 - ] + "aggregate_unit": "day", + "end_time": 1712604800, + "responder_ids": [ + 3790925372131 + ], + "start_time": 1712000000 }, "schema": { - "$ref": "#/components/schemas/MemberRoleGrantRequest" + "$ref": "#/components/schemas/InsightQueryRequest" } } }, @@ -42371,7 +42166,27 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "items": [ + { + "acknowledgement_pct": 100, + "mean_seconds_to_ack": 2265624, + "responder_id": 3790925372131, + "responder_name": "alice", + "total_engaged_seconds": 10, + "total_incident_cnt": 1, + "total_incidents_acknowledged": 1, + "total_incidents_escalated": 0, + "total_incidents_manually_escalated": 0, + "total_incidents_reassigned": 0, + "total_incidents_timeout_escalated": 0, + "total_interruptions": 1, + "total_notifications": 2, + "total_seconds_to_ack": 2265624, + "ts": 1740844800 + } + ] + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -42382,7 +42197,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/MemberEmptyObject" + "$ref": "#/components/schemas/ResponderInsightResponse" } }, "type": "object" @@ -42406,34 +42221,39 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Grant role to member", + "summary": "Get responder insight", "tags": [ - "Platform/Members" + "On-call/Analytics" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Members Manage** (`organization`) |", - "href": "/en/api-reference/platform/members/member-grant-role", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", + "href": "/en/api-reference/on-call/analytics/insight-by-responder", "metadata": { - "sidebarTitle": "Grant role to member" + "sidebarTitle": "Get responder insight" } } } }, - "/member/role/revoke": { + "/insight/responder/export": { "post": { - "description": "Remove role assignments from a member. Role IDs that do not exist are silently ignored; if none resolve, the call is a no-op success.", - "operationId": "memberRevokeRole", + "description": "Export responder insight metrics as a CSV file — one row per responder (and per time/hour bucket when `aggregate_unit`/`split_hours` is used). The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope. `time_zone` defaults to UTC. Rows without a valid responder ID are skipped. Valid `export_fields` keys: responder_id, responder_name, total_incident_cnt, total_incidents_acknowledged, total_incidents_reassigned, total_incidents_escalated, total_incidents_manually_escalated, total_incidents_timeout_escalated, total_interruptions, total_notifications, total_engaged_seconds, mean_seconds_to_ack, acknowledgement_pct, hours. The `hours` column is included by default only when `split_hours` is true. For compatibility, incident-export column keys are also accepted but produce empty columns.", + "operationId": "insightResponderExport", "requestBody": { "content": { "application/json": { "example": { - "member_id": 5068740052131, - "role_ids": [ - 6 - ] + "end_time": 1712604800, + "responder_ids": [ + 3790925372131 + ], + "severities": [ + "Critical", + "Warning" + ], + "start_time": 1712000000 }, "schema": { - "$ref": "#/components/schemas/MemberRoleRevokeRequest" + "$ref": "#/components/schemas/InsightQueryRequest" } } }, @@ -42442,25 +42262,12 @@ "responses": { "200": { "content": { - "application/json": { - "example": { - "data": {}, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, + "application/octet-stream": { + "example": "responder_id,responder_name,total_incident_cnt,total_incidents_acknowledged\n3790925372131,alice,5,4\n", "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/MemberEmptyObject" - } - }, - "type": "object" - } - ] + "description": "CSV file stream (`Content-Type: application/octet-stream`, `Content-Disposition: attachment; filename=responder_export_yyyyMMdd_HHmmss.csv`). The first row holds localized column headers. Columns default to the full field set, or the keys given in `export_fields`.", + "format": "binary", + "type": "string" } } }, @@ -42479,35 +42286,36 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Revoke role from member", + "summary": "Export responder insight", "tags": [ - "Platform/Members" + "On-call/Analytics" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Members Manage** (`organization`) |", - "href": "/en/api-reference/platform/members/member-revoke-role", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/day**; **20 requests/minute**; **10 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", + "href": "/en/api-reference/on-call/analytics/insight-responder-export", "metadata": { - "sidebarTitle": "Revoke role from member" + "sidebarTitle": "Export responder insight" } } } }, - "/member/role/update": { + "/insight/team": { "post": { - "description": "Replace all role assignments for a member at once. Role IDs that do not exist are silently dropped; an empty `role_ids` resets the member to the built-in Viewer role (ID 8).", - "operationId": "memberUpdateRole", + "description": "Return insight metrics aggregated by team.", + "operationId": "insightByTeam", "requestBody": { "content": { "application/json": { "example": { - "member_id": 5068740052131, - "role_ids": [ - 2, - 6 + "aggregate_unit": "day", + "end_time": 1712604800, + "start_time": 1712000000, + "team_ids": [ + 4295771902131 ] }, "schema": { - "$ref": "#/components/schemas/MemberRoleUpdateRequest" + "$ref": "#/components/schemas/InsightQueryRequest" } } }, @@ -42518,28 +42326,57 @@ "content": { "application/json": { "example": { - "data": {}, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/MemberEmptyObject" - } - }, - "type": "object" - } - ] - } - } - }, - "description": "Success" - }, + "data": { + "items": [ + { + "acknowledgement_pct": 100, + "mean_seconds_to_ack": 1658854.5, + "mean_seconds_to_close": 1874757, + "noise_reduction_pct": 0, + "team_id": 4295771902131, + "team_name": "SRE Team", + "total_alert_cnt": 0, + "total_alert_event_cnt": 0, + "total_engaged_seconds": 3317709, + "total_incident_cnt": 2, + "total_incidents_acknowledged": 2, + "total_incidents_auto_closed": 0, + "total_incidents_closed": 2, + "total_incidents_escalated": 0, + "total_incidents_manually_closed": 2, + "total_incidents_manually_escalated": 0, + "total_incidents_reassigned": 2, + "total_incidents_timeout_closed": 0, + "total_incidents_timeout_escalated": 0, + "total_interruptions": 3, + "total_notifications": 6, + "total_seconds_to_ack": 3317709, + "total_seconds_to_close": 3749514, + "ts": 1740844800 + } + ] + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/DimensionInsightResponse" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, "400": { "$ref": "#/components/responses/BadRequest" }, @@ -42553,40 +42390,39 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update member roles", + "summary": "Get team insight", "tags": [ - "Platform/Members" + "On-call/Analytics" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Members Manage** (`organization`) |", - "href": "/en/api-reference/platform/members/member-update-role", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", + "href": "/en/api-reference/on-call/analytics/insight-by-team", "metadata": { - "sidebarTitle": "Update member roles" + "sidebarTitle": "Get team insight" } } } }, - "/monit/datasource/create": { + "/insight/team/export": { "post": { - "description": "Create a new monitoring data source. The `payload` must include the type-specific configuration block. Supports diagnostic types redis_node, redis_sentinel, mongodb_mongod, mongodb_mongos and kafka; enabled and alerting_enabled are independent.", - "operationId": "monit-datasource-write-create", + "description": "Export team insight metrics as a CSV file — one row per team (and per time/hour bucket when `aggregate_unit`/`split_hours` is used). The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope. `time_zone` defaults to UTC. Rows without a valid team ID are skipped. Valid `export_fields` keys: team_id, team_name, total_incident_cnt, total_incidents_acknowledged, total_incidents_closed, total_incidents_auto_closed, total_incidents_manually_closed, total_incidents_timeout_closed, total_incidents_escalated, total_incidents_manually_escalated, total_incidents_timeout_escalated, total_incidents_reassigned, total_interruptions, total_notifications, total_engaged_seconds, mean_seconds_to_ack, mean_seconds_to_close, noise_reduction_pct, acknowledgement_pct, total_alert_cnt, total_alert_event_cnt, hours. The `hours` column is included by default only when `split_hours` is true. For compatibility, incident-export column keys are also accepted but produce empty columns.", + "operationId": "insightTeamExport", "requestBody": { "content": { "application/json": { "example": { - "address": "http://prometheus.example.com:9090", - "edge_cluster_name": "default", - "name": "Prometheus Prod", - "note": "Production Prometheus", - "payload": { - "prometheus": { - "basic_auth_enabled": false - } - }, - "type_ident": "prometheus" + "end_time": 1712604800, + "severities": [ + "Critical", + "Warning" + ], + "start_time": 1712000000, + "team_ids": [ + 4295771902131 + ] }, "schema": { - "$ref": "#/components/schemas/DataSourceUpsertRequest" + "$ref": "#/components/schemas/InsightQueryRequest" } } }, @@ -42595,33 +42431,12 @@ "responses": { "200": { "content": { - "application/json": { - "example": { - "data": { - "alerting_enabled": true, - "edge_cluster_name": "default", - "enabled": true, - "id": 10, - "name": "Prometheus Prod", - "type_ident": "prometheus", - "updated_at": 1712000000 - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, + "application/octet-stream": { + "example": "team_id,team_name,total_incident_cnt,total_incidents_closed\n4295771902131,SRE Team,12,10\n", "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/DataSourceItem" - } - }, - "type": "object" - } - ] + "description": "CSV file stream (`Content-Type: application/octet-stream`, `Content-Disposition: attachment; filename=team_export_yyyyMMdd_HHmmss.csv`). The first row holds localized column headers. Columns default to the full field set, or the keys given in `export_fields`.", + "format": "binary", + "type": "string" } } }, @@ -42640,31 +42455,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create datasource", + "summary": "Export team insight", "tags": [ - "Monitors/Data sources" + "On-call/Analytics" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Manage** (`monit`) |\n\n## Usage\n\n- `type_ident` must be one of: `prometheus`, `loki`, `mysql`, `oracle`, `postgres`, `clickhouse`, `elasticsearch`, `sls`, `tencent_cls`, `victorialogs`, `redis_node`, `redis_sentinel`, `mongodb_mongod`, `mongodb_mongos`, `kafka`.\n- `edge_cluster_name` specifies which Monitors edge cluster evaluates rules using this datasource.\n- For `elasticsearch`, set `payload.elasticsearch.deployment` to `cloud` or `self-managed`.\n- Every call is recorded in the account audit log. Use credential fields only for connection credentials.\n\nSee the request/response schemas for all supported types and credential handling. Diagnostic-only types cannot enable alerting. On create omitted enabled defaults to true; on update omission preserves the current value. Explicit null for enabled or alerting_enabled is invalid. Diagnostic passwords and Kafka private keys are omitted from responses unless they are environment references; omit these secrets on update to preserve them, or send an empty string to clear. Other datasource credentials may be returned and must be handled as sensitive.", - "href": "/en/api-reference/monitors/data-sources/monit-datasource-write-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/day**; **20 requests/minute**; **10 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |", + "href": "/en/api-reference/on-call/analytics/insight-team-export", "metadata": { - "sidebarTitle": "Create datasource" + "sidebarTitle": "Export team insight" } } } }, - "/monit/datasource/delete": { + "/member/delete": { "post": { - "description": "Delete a data source by ID. Alert rules referencing this datasource are not blocked: the datasource is removed from their monitoring scope and their open alerts on it are closed automatically.", - "operationId": "monit-datasource-write-delete", + "description": "Remove a member from the organization by ID, email, phone, or name.", + "operationId": "memberDelete", "requestBody": { "content": { "application/json": { "example": { - "id": 10 + "member_id": 5068740052131 }, "schema": { - "$ref": "#/components/schemas/IDRequest" + "$ref": "#/components/schemas/MemberDeleteRequest" } } }, @@ -42686,7 +42501,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/MemberEmptyObject" } }, "type": "object" @@ -42710,31 +42525,29 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete datasource", + "summary": "Delete member", "tags": [ - "Monitors/Data sources" + "Platform/Members" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/monitors/data-sources/monit-datasource-write-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Members Manage** (`organization`) |\n\n## Usage\n\n- By default (`is_force=false`), the system checks whether the member is referenced by other resources (e.g., escalation rules, schedules). If references exist, the API returns error code `ReferenceExist` with the reference list in `data.refs`. Set `is_force=true` to skip the reference check and force delete.\n- Members provisioned via SSO with `sso_user_non_editable=true` cannot be deleted through this API. Disable that SSO restriction first.\n- This operation is recorded in the audit log.", + "href": "/en/api-reference/platform/members/member-delete", "metadata": { - "sidebarTitle": "Delete datasource" + "sidebarTitle": "Delete member" } } } }, - "/monit/datasource/info": { + "/member/info": { "post": { - "description": "Retrieve full details of a single data source by its ID, including the `payload` configuration with its configured connection and authentication settings; treat the response as sensitive and avoid logging or forwarding it. Supports diagnostic types redis_node, redis_sentinel, mongodb_mongod, mongodb_mongos and kafka; enabled and alerting_enabled are independent.", - "operationId": "monit-datasource-read-info", + "description": "Return the profile of the member the credential belongs to. Requires a member-scoped credential — calls authenticated as the account principal (e.g. an account-level app key) are rejected with a 400.", + "operationId": "memberInfo", "requestBody": { "content": { "application/json": { - "example": { - "id": 10 - }, + "example": {}, "schema": { - "$ref": "#/components/schemas/IDRequest" + "$ref": "#/components/schemas/MemberInfoRequest" } } }, @@ -42746,24 +42559,28 @@ "application/json": { "example": { "data": { - "account_id": 10023, - "address": "http://prometheus.example.com:9090", - "alerting_enabled": true, - "edge_cluster_name": "default", - "enabled": true, - "id": 10, - "name": "Prometheus Prod", - "note": "Production Prometheus", - "payload": { - "prometheus": { - "basic_auth_enabled": false, - "basic_auth_password": "", - "basic_auth_username": "", - "tls_skip_verify": false - } - }, - "type_ident": "prometheus", - "updated_at": 1712000000 + "account_avatar": "", + "account_email": "alice@example.com", + "account_id": 2451002751131, + "account_locale": "en-US", + "account_name": "Acme Corp", + "account_role_ids": [ + 6 + ], + "account_time_zone": "Asia/Shanghai", + "avatar": "/image/avatar1.png", + "country_code": "CN", + "created_at": 1701399971, + "domain": "acme", + "email": "alice@example.com", + "email_verified": true, + "is_external": false, + "locale": "zh-CN", + "member_id": 2476444212131, + "member_name": "Alice", + "phone": "+86185****0300", + "phone_verified": true, + "time_zone": "Asia/Shanghai" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -42775,7 +42592,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/DataSourceItem" + "$ref": "#/components/schemas/MemberInfoResponse" } }, "type": "object" @@ -42799,31 +42616,36 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get datasource detail", + "summary": "Get current member info", "tags": [ - "Monitors/Data sources" + "Platform/Members" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Read** (`monit`) |\n\nSee the request/response schemas for all supported types and credential handling. Diagnostic-only types cannot enable alerting. On create omitted enabled defaults to true; on update omission preserves the current value. Explicit null for enabled or alerting_enabled is invalid. Diagnostic passwords and Kafka private keys are omitted from responses unless they are environment references; omit these secrets on update to preserve them, or send an empty string to clear. Other datasource credentials may be returned and must be handled as sensitive.", - "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — but the credential must belong to a member; account-principal credentials (e.g. an account-level app key) are rejected with a 400 |", + "href": "/en/api-reference/platform/members/member-info", "metadata": { - "sidebarTitle": "Get datasource detail" + "sidebarTitle": "Get current member info" } } } }, - "/monit/datasource/list": { + "/member/info/reset": { "post": { - "description": "Return all data sources for the current account. Optionally filter by `type_ident`. Supports diagnostic types redis_node, redis_sentinel, mongodb_mongod, mongodb_mongos and kafka; enabled and alerting_enabled are independent.", - "operationId": "monit-datasource-read-list", + "description": "Identify a member and reset the specified profile fields.", + "operationId": "memberResetInfo", "requestBody": { "content": { "application/json": { "example": { - "type": "prometheus" + "member_id": 2476444212131, + "updates": { + "locale": "zh-CN", + "member_name": "Alice Chen", + "time_zone": "Asia/Shanghai" + } }, "schema": { - "$ref": "#/components/schemas/DataSourceListRequest" + "$ref": "#/components/schemas/MemberResetInfoRequest" } } }, @@ -42834,21 +42656,7 @@ "content": { "application/json": { "example": { - "data": [ - { - "account_id": 10023, - "address": "http://prometheus.example.com:9090", - "alerting_enabled": true, - "edge_cluster_name": "default", - "enabled": true, - "id": 10, - "name": "Prometheus Prod", - "note": "Production Prometheus", - "payload": null, - "type_ident": "prometheus", - "updated_at": 1712000000 - } - ], + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -42859,7 +42667,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/DataSourceListResponse" + "$ref": "#/components/schemas/MemberEmptyObject" } }, "type": "object" @@ -42883,34 +42691,48 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List datasources", + "summary": "Reset member info", "tags": [ - "Monitors/Data sources" + "Platform/Members" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Read** (`monit`) |\n\n## Usage\n\n- Omit `type_ident` to return all types.\n- Sensitive credential fields (passwords, keys) are not returned in the list response.\n\nSee the request/response schemas for all supported types and credential handling. Diagnostic-only types cannot enable alerting. On create omitted enabled defaults to true; on update omission preserves the current value. Explicit null for enabled or alerting_enabled is invalid. Diagnostic passwords and Kafka private keys are omitted from responses unless they are environment references; omit these secrets on update to preserve them, or send an empty string to clear. Other datasource credentials may be returned and must be handled as sensitive.", - "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Identify the member with one of `member_id`, `member_name`, `email`, `phone`, or `ref_id`. If multiple identifiers are present, the server checks them in that order.\n- `updates.country_code` is an ISO 3166-1 alpha-2 region code (e.g. \"CN\", \"US\"). It is an independently updatable field: `updates.phone` is not required, and the new region is stored even when the phone is unchanged. An explicit empty string is rejected with a 400.\n- When `updates.phone` has no \"+\" prefix, it is parsed with `updates.country_code` as the region hint, falling back to the member's stored region and then to \"CN\". Legacy digit calling codes such as \"86\" remain accepted only as parsing hints — stored values are always ISO region codes.\n- The top-level `country_code` is only a parsing hint for the identifying `phone`; it is never stored.\n- Put the profile fields to write under `updates`: `member_name`, `password`, `phone`, `country_code`, `email`, `avatar`, `locale`, `time_zone`, or `ref_id`.\n- Members provisioned by SSO cannot be changed when SSO marks them as externally managed.\n- `updates` must carry at least one field; an object with every field omitted is rejected.", + "href": "/en/api-reference/platform/members/member-reset-info", "metadata": { - "sidebarTitle": "List datasources" + "sidebarTitle": "Reset member info" } } } }, - "/monit/datasource/sls/logstores": { + "/member/invite": { "post": { - "description": "List logstores within an SLS project for the specified SLS datasource.", - "operationId": "monit-datasource-read-sls-logstores", + "description": "Batch invite new members to the organization by email or phone.", + "operationId": "memberInvite", "requestBody": { "content": { "application/json": { "example": { - "id": 10, - "offset": 0, - "project": "project-a", - "size": 50 + "members": [ + { + "email": "charlie@example.com", + "locale": "en-US", + "member_name": "Charlie", + "role_ids": [ + 6 + ], + "time_zone": "Asia/Shanghai" + }, + { + "country_code": "CN", + "locale": "zh-CN", + "member_name": "Dave", + "phone": "13800138000", + "time_zone": "Asia/Shanghai" + } + ] }, "schema": { - "$ref": "#/components/schemas/SLSLogstoresRequest" + "$ref": "#/components/schemas/MemberInviteRequest" } } }, @@ -42921,10 +42743,18 @@ "content": { "application/json": { "example": { - "data": [ - "logstore-1", - "logstore-2" - ], + "data": { + "items": [ + { + "member_id": 5068740052131, + "member_name": "Charlie" + }, + { + "member_id": 5068740052132, + "member_name": "Dave" + } + ] + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -42935,7 +42765,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/SLSLogstoresResponse" + "$ref": "#/components/schemas/MemberInviteResponse" } }, "type": "object" @@ -42959,34 +42789,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List SLS logstores", + "summary": "Invite members", "tags": [ - "Monitors/Data sources" + "Platform/Members" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Read** (`monit`) |\n\n## Usage\n\n- The datasource identified by `id` must be of type `sls`.\n- Supply `project` to select the SLS project whose logstores to list.", - "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-sls-logstores", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Members Manage** (`organization`) |\n\n## Usage\n\n- `country_code` must be an ISO 3166-1 alpha-2 region code (e.g. \"CN\"). It is validated and normalized to upper case before storage; invalid values are rejected with a 400.\n- When a member's `phone` has no \"+\" prefix, it is parsed with that member's `country_code` as the region hint (defaults to \"CN\" when omitted).", + "href": "/en/api-reference/platform/members/member-invite", "metadata": { - "sidebarTitle": "List SLS logstores" + "sidebarTitle": "Invite members" } } } }, - "/monit/datasource/sls/projects": { + "/member/list": { "post": { - "description": "List Alibaba Cloud SLS (Simple Log Service) projects available in the specified SLS datasource.", - "operationId": "monit-datasource-read-sls-projects", + "description": "Return a paginated list of organization members.", + "operationId": "memberList", "requestBody": { "content": { "application/json": { "example": { - "id": 10, - "offset": 0, - "query": "", - "size": 50 + "limit": 5, + "p": 1 }, "schema": { - "$ref": "#/components/schemas/SLSProjectsRequest" + "$ref": "#/components/schemas/MemberListRequest" } } }, @@ -42998,28 +42826,50 @@ "application/json": { "example": { "data": { - "count": 2, - "projects": [ + "items": [ { - "createTime": "1710000000", - "description": "Production logs", - "lastModifyTime": "1712000000", - "owner": "", - "projectName": "project-a", - "region": "cn-shanghai", - "status": "Normal" + "account_id": 2451002751131, + "account_role_ids": [ + 2, + 6 + ], + "avatar": "", + "country_code": "", + "created_at": 1752030749, + "email": "bob@example.com", + "email_verified": true, + "is_external": false, + "member_id": 5068740052131, + "member_name": "Bob", + "phone": "+86151****6519", + "phone_verified": true, + "ref_id": "", + "status": "enabled", + "updated_at": 1775962064 }, { - "createTime": "1710000000", - "description": "Staging logs", - "lastModifyTime": "1712000000", - "owner": "", - "projectName": "project-b", - "region": "cn-shanghai", - "status": "Normal" + "account_id": 2451002751131, + "account_role_ids": [ + 6 + ], + "avatar": "/image/avatar1.png", + "country_code": "CN", + "created_at": 1701399971, + "email": "alice@example.com", + "email_verified": true, + "is_external": false, + "member_id": 2476444212131, + "member_name": "Alice", + "phone": "+86185****0300", + "phone_verified": true, + "ref_id": "", + "status": "enabled", + "updated_at": 1775809507 } ], - "total": 2 + "limit": 5, + "p": 1, + "total": 148 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -43031,7 +42881,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/SLSProjectsResponse" + "$ref": "#/components/schemas/MemberListResponse" } }, "type": "object" @@ -43055,50 +42905,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List SLS projects", + "summary": "List members", "tags": [ - "Monitors/Data sources" + "Platform/Members" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Read** (`monit`) |\n\n## Usage\n\n- The datasource identified by `id` must be of type `sls`.\n- Use `query` to filter projects by name prefix. Use `offset` and `size` for pagination.", - "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-sls-projects", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/members/member-list", "metadata": { - "sidebarTitle": "List SLS projects" + "sidebarTitle": "List members" } } } }, - "/monit/datasource/tools/invoke": { + "/member/role/grant": { "post": { - "description": "Execute one deterministic diagnostic or query tool against a configured datasource.", - "operationId": "monit-datasource-tools-invoke", + "description": "Add role assignments to a member. Role IDs that do not exist are silently ignored; if none resolve, the call is a no-op success.", + "operationId": "memberGrantRole", "requestBody": { "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/DatasourceToolInvokeRequest" + "example": { + "member_id": 5068740052131, + "role_ids": [ + 6 + ] }, - "examples": { - "diagnostic": { - "value": { - "datasource_id": 10, - "params": {}, - "tool": "mysql.overview" - } - }, - "query": { - "value": { - "datasource_id": 24000, - "tool": "prometheus.query", - "params": { - "expr": "sum(rate(http_requests_total[5m]))", - "execution": { - "kind": "instant", - "to_ms": 1789000000000 - } - } - } - } + "schema": { + "$ref": "#/components/schemas/MemberRoleGrantRequest" } } }, @@ -43108,6 +42942,10 @@ "200": { "content": { "application/json": { + "example": { + "data": {}, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, "schema": { "allOf": [ { @@ -43116,195 +42954,58 @@ { "properties": { "data": { - "$ref": "#/components/schemas/DatasourceToolResult" + "$ref": "#/components/schemas/MemberEmptyObject" } }, "type": "object" } ] - }, - "examples": { - "diagnostic": { - "value": { - "data": { - "data": { - "version": "8.0.36" - }, - "datasource_id": 10, - "summary": "MySQL overview", - "tool": "mysql.overview" - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - } - }, - "query": { - "value": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "datasource_id": 24000, - "tool": "prometheus.query", - "data": { - "format": "explore_result.v1", - "result": { - "kind": "samples", - "samples": [ - { - "labels": { - "__name__": "up", - "instance": "10.101.214.50:7070" - }, - "value": 1 - } - ] - } - } - } - } - } } } }, "description": "Success" }, "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Standard HTTP error; error.reason: invalid_request, tool_not_supported, datasource_error." + "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Standard HTTP error; error.reason: access_denied." - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Standard HTTP error; error.reason: datasource_not_found." - }, - "409": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Standard HTTP error; error.reason: datasource_disabled, datasource_in_use." - }, - "413": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Standard HTTP error; error.reason: source_too_large, result_too_large." - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Standard HTTP error; error.reason: overloaded." - }, - "499": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Standard HTTP error; error.reason: canceled." + "429": { + "$ref": "#/components/responses/TooManyRequests" }, "500": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Standard HTTP error; error.reason: internal." - }, - "503": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Standard HTTP error; error.reason: no_active_edge, edge_upgrade_required, mixed_edge_versions." - }, - "504": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Standard HTTP error; error.reason: timeout." + "$ref": "#/components/responses/ServerError" } }, - "summary": "Invoke datasource tool", + "summary": "Grant role to member", "tags": [ - "Monitors/Data sources" + "Platform/Members" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **2,000 requests/minute**; **32 requests/second** per account |\n| Permissions | **Datasources Read** (`monit`) |\n\nUse datasource IDs from `/monit/datasource/list`. Disabled datasources return `datasource_disabled`; `alerting_enabled=false` does not block tools. Errors use non-2xx HTTP status and `error.code`, `error.message`, `error.reason`. `tool_not_supported` indicates the selected executor does not provide this tool; it is not a vendor permission error. Never retry through another Edge or the legacy diagnose endpoint automatically.\n\n## Usage\n\n- Two tool families share this entry: diagnostic tools defined by the executing Edge (e.g. `mysql.overview`, `prometheus.metric_trends`) and query tools named `.query`. The tool prefix must match the datasource type.\n- Query tools require the Edge cluster to support Explore queries (protocol milestone v0.68.0); diagnostic tools require the v0.71.0 base invoke protocol. Unsupported clusters fail with `edge_upgrade_required`, `mixed_edge_versions`, or `edge_version_unknown`; never fall back to `/monit/query/data` or another endpoint automatically.\n- For query tools, `params` follows the per-datasource schema named in the `tool` field description. `expr` and `execution` are always required. `limit`/`direction` only bound raw-log retrieval, never SQL rows or scanned data. Unknown extension fields are tolerated but never executed or forwarded.\n- Query `data` is the complete Explore result: `format` is `explore_result.v1` and `result.kind` is `samples`, `frames`, or `logs`; log results keep `applied_limit` and `has_more`. Query results never synthesize `summary` or `truncated`.\n- Request body limit 128 KiB; complete success response limit 10 MiB for both families; diagnostic tool timeout at most 25 seconds.", - "href": "/en/api-reference/monitors/data-sources/monit-datasource-tools-invoke", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Members Manage** (`organization`) |", + "href": "/en/api-reference/platform/members/member-grant-role", "metadata": { - "sidebarTitle": "Invoke datasource tool" + "sidebarTitle": "Grant role to member" } } } }, - "/monit/datasource/update": { + "/member/role/revoke": { "post": { - "description": "Update an existing data source. Supply `id` plus the fields to change. Supports diagnostic types redis_node, redis_sentinel, mongodb_mongod, mongodb_mongos and kafka; enabled and alerting_enabled are independent.", - "operationId": "monit-datasource-write-update", + "description": "Remove role assignments from a member. Role IDs that do not exist are silently ignored; if none resolve, the call is a no-op success.", + "operationId": "memberRevokeRole", "requestBody": { "content": { "application/json": { "example": { - "address": "http://prometheus-v2.example.com:9090", - "edge_cluster_name": "default", - "id": 10, - "name": "Prometheus Prod v2", - "note": "Updated", - "payload": { - "prometheus": { - "basic_auth_enabled": false - } - }, - "type_ident": "prometheus" + "member_id": 5068740052131, + "role_ids": [ + 6 + ] }, "schema": { - "$ref": "#/components/schemas/DataSourceUpsertRequest" + "$ref": "#/components/schemas/MemberRoleRevokeRequest" } } }, @@ -43315,15 +43016,7 @@ "content": { "application/json": { "example": { - "data": { - "alerting_enabled": true, - "edge_cluster_name": "default", - "enabled": true, - "id": 10, - "name": "Prometheus Prod v2", - "type_ident": "prometheus", - "updated_at": 1712100000 - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -43334,7 +43027,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/DataSourceItem" + "$ref": "#/components/schemas/MemberEmptyObject" } }, "type": "object" @@ -43358,130 +43051,114 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update datasource", + "summary": "Revoke role from member", "tags": [ - "Monitors/Data sources" + "Platform/Members" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Use credential fields only for connection credentials.\n\nSee the request/response schemas for all supported types and credential handling. Diagnostic-only types cannot enable alerting. On create omitted enabled defaults to true; on update omission preserves the current value. Explicit null for enabled or alerting_enabled is invalid. Diagnostic passwords and Kafka private keys are omitted from responses unless they are environment references; omit these secrets on update to preserve them, or send an empty string to clear. Other datasource credentials may be returned and must be handled as sensitive.", - "href": "/en/api-reference/monitors/data-sources/monit-datasource-write-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Members Manage** (`organization`) |", + "href": "/en/api-reference/platform/members/member-revoke-role", "metadata": { - "sidebarTitle": "Update datasource" + "sidebarTitle": "Revoke role from member" } } } }, - "/monit/prometheus/api/v1/label/{label_name}/values": { - "get": { - "description": "Read label values from a Prometheus-compatible data source through the Monitors proxy.", - "operationId": "monit-prometheus-read-label-values", - "parameters": [ - { - "description": "Label name to enumerate values for, for example `job`.", - "in": "path", - "name": "label_name", - "required": true, - "schema": { - "type": "string" + "/member/role/update": { + "post": { + "description": "Replace all role assignments for a member at once. Role IDs that do not exist are silently dropped; an empty `role_ids` resets the member to the built-in Viewer role (ID 8).", + "operationId": "memberUpdateRole", + "requestBody": { + "content": { + "application/json": { + "example": { + "member_id": 5068740052131, + "role_ids": [ + 2, + 6 + ] + }, + "schema": { + "$ref": "#/components/schemas/MemberRoleUpdateRequest" + } } }, - { - "description": "Data source ID to query. Must reference a Prometheus-compatible data source owned by the authenticated account.", - "in": "header", - "name": "X-DSID", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "content": { "application/json": { "example": { - "data": [ - "api", - "db", - "worker" - ], - "status": "success" + "data": {}, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { - "$ref": "#/components/schemas/PrometheusLabelValuesResponse" + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/MemberEmptyObject" + } + }, + "type": "object" + } + ] } } }, - "description": "Native Prometheus label-values response returned by the data source." + "description": "Success" }, "400": { - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - }, - "description": "The `X-DSID` header is missing or invalid, the data source does not exist, or it is not a Prometheus data source. Returned as `text/plain`." + "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, - "500": { - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - }, - "description": "The data source lookup or the proxied request failed. Returned as `text/plain`." + "429": { + "$ref": "#/components/responses/TooManyRequests" }, - "503": { - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - }, - "description": "No monit-edge in the data source's cluster supports the data source resource proxy. Returned as `text/plain`; upgrade monit-edge." + "500": { + "$ref": "#/components/responses/ServerError" } }, - "summary": "List Prometheus label values", + "summary": "Update member roles", "tags": [ - "Monitors/Data sources" + "Platform/Members" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Any valid `app_key` (read-only; not gated by a specific permission class) |\n| Edge requirement | Supported deployments require **monit-edge v0.35.0 or later** |\n\n## Usage\n\n- Pass the target data source in the `X-DSID` header. It must be a Prometheus-compatible data source owned by the authenticated account; use `/monit/datasource/list` to obtain its ID.\n- The 200 body is the data source's native Prometheus HTTP API payload, **not** the standard `{ request_id, data }` envelope. Failures raised before the data source is reached are returned as `text/plain` with the matching 4xx or 5xx status.\n- When `X-DSID` is omitted, the request falls back to the platform's own Prometheus proxy. Send the header to query a specific data source.", - "href": "/en/api-reference/monitors/data-sources/monit-prometheus-read-label-values", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Members Manage** (`organization`) |", + "href": "/en/api-reference/platform/members/member-update-role", "metadata": { - "sidebarTitle": "List Prometheus label values" + "sidebarTitle": "Update member roles" } } } }, - "/monit/query/explore": { + "/monit/datasource/create": { "post": { - "description": "Run an Explore query against a configured data source and return frames, samples, or logs.", - "operationId": "monit-read-query-explore", + "description": "Create a new monitoring data source. The `payload` must include the type-specific configuration block. Supports diagnostic types redis_node, redis_sentinel, mongodb_mongod, mongodb_mongos and kafka; enabled and alerting_enabled are independent.", + "operationId": "monit-datasource-write-create", "requestBody": { "content": { "application/json": { "example": { - "args": {}, - "datasource_id": 101, - "execution": { - "from_ms": 1787187600000, - "kind": "range", - "max_data_points": 1200, - "min_step_seconds": 15, - "to_ms": 1787191200000 + "address": "http://prometheus.example.com:9090", + "edge_cluster_name": "default", + "name": "Prometheus Prod", + "note": "Production Prometheus", + "payload": { + "prometheus": { + "basic_auth_enabled": false + } }, - "expr": "rate(http_requests_total[5m])" + "type_ident": "prometheus" }, "schema": { - "$ref": "#/components/schemas/QueryExploreRequest" + "$ref": "#/components/schemas/DataSourceUpsertRequest" } } }, @@ -43493,40 +43170,13 @@ "application/json": { "example": { "data": { - "execution": { - "effective_step_seconds": 60, - "kind": "range" - }, - "format": "explore_result.v1", - "result": { - "frames": [ - { - "fields": [ - { - "name": "time", - "type": "time", - "values": [ - "2026-08-20T10:00:00Z", - "2026-08-20T10:01:00Z" - ] - }, - { - "labels": { - "job": "api" - }, - "name": "value", - "type": "float", - "values": [ - 1.25, - null - ] - } - ], - "kind": "time_series" - } - ], - "kind": "frames" - } + "alerting_enabled": true, + "edge_cluster_name": "default", + "enabled": true, + "id": 10, + "name": "Prometheus Prod", + "type_ident": "prometheus", + "updated_at": 1712000000 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -43538,7 +43188,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ExploreData" + "$ref": "#/components/schemas/DataSourceItem" } }, "type": "object" @@ -43550,128 +43200,43 @@ "description": "Success" }, "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Standard HTTP error; error.reason: invalid_request." + "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Standard HTTP error; error.reason: access_denied." - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Standard HTTP error; error.reason: datasource_not_found." - }, - "413": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Standard HTTP error; error.reason: source_too_large, result_too_large." - }, "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Standard HTTP error; error.reason: overloaded." - }, - "499": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Standard HTTP error; error.reason: canceled." + "$ref": "#/components/responses/TooManyRequests" }, "500": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Standard HTTP error; error.reason: internal." - }, - "503": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Standard HTTP error; error.reason: no_active_edge, edge_upgrade_required, mixed_edge_versions, edge_unavailable." - }, - "504": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Standard HTTP error; error.reason: timeout." + "$ref": "#/components/responses/ServerError" } }, - "summary": "Run Explore query", + "summary": "Create datasource", "tags": [ - "Monitors/Diagnostics" + "Monitors/Data sources" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/minute**; **16 requests/second** per account |\n| Permissions | **Datasources Read** (`monit`) |\n| Edge requirement | Supported deployments require **monit-edge v0.68.0 or later** |\n\n## Usage\n\n- Use this endpoint when you need the data source's native result shape; `/monit/query/data` returns the stable `query_result.v1` contract instead. Dispatch on `data.result.kind` (`frames`, `samples`, or `logs`) here.\n- `execution.kind` decides which companion fields are accepted: `instant` needs only `to_ms`, `range` requires `from_ms`, `to_ms`, and `max_data_points`, and `window` takes `from_ms` and `to_ms`. `step_seconds` is not accepted; the step is derived from `max_data_points` and `min_step_seconds`.\n- `args` carries macro substitutions such as Grafana-style variables; every value is a string.\n- A `logs` result is capped at 1,000 entries and reports `applied_limit` plus `has_more`. Time-series and sample results are capped at 1,000 items each and the whole success response at 8 MiB.\n- Query execution may take up to 35 seconds across WebAPI forwarding and Edge execution. Configure client timeouts to at least 40 seconds.", - "href": "/en/api-reference/monitors/diagnostics/monit-read-query-explore", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Manage** (`monit`) |\n\n## Usage\n\n- `type_ident` must be one of: `prometheus`, `loki`, `mysql`, `oracle`, `postgres`, `clickhouse`, `elasticsearch`, `sls`, `tencent_cls`, `victorialogs`, `redis_node`, `redis_sentinel`, `mongodb_mongod`, `mongodb_mongos`, `kafka`.\n- `edge_cluster_name` specifies which Monitors edge cluster evaluates rules using this datasource.\n- For `elasticsearch`, set `payload.elasticsearch.deployment` to `cloud` or `self-managed`.\n- Every call is recorded in the account audit log. Use credential fields only for connection credentials.\n\nSee the request/response schemas for all supported types and credential handling. Diagnostic-only types cannot enable alerting. On create omitted enabled defaults to true; on update omission preserves the current value. Explicit null for enabled or alerting_enabled is invalid. Diagnostic passwords and Kafka private keys are omitted from responses unless they are environment references; omit these secrets on update to preserve them, or send an empty string to clear. Other datasource credentials may be returned and must be handled as sensitive.", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-write-create", "metadata": { - "sidebarTitle": "Run Explore query" + "sidebarTitle": "Create datasource" } } } }, - "/monit/query/data": { + "/monit/datasource/delete": { "post": { - "description": "Run a synchronous ad-hoc query against a configured data source and return a stable `query_result.v1` result whose natural shape is frames, records, or samples. This public API requires monit-edge v0.65.0 or later.", - "operationId": "monit-read-query-data", + "description": "Delete a data source by ID. Alert rules referencing this datasource are not blocked: the datasource is removed from their monitoring scope and their open alerts on it are closed automatically.", + "operationId": "monit-datasource-write-delete", "requestBody": { "content": { "application/json": { "example": { - "args": {}, - "delay_seconds": 0, - "ds_name": "prod-prom", - "ds_type": "prometheus", - "expr": "sum by (job) (rate(http_requests_total[5m]))" + "id": 10 }, "schema": { - "$ref": "#/components/schemas/QueryDataRequest" + "$ref": "#/components/schemas/IDRequest" } } }, @@ -43682,20 +43247,7 @@ "content": { "application/json": { "example": { - "data": { - "format": "query_result.v1", - "result": { - "kind": "samples", - "samples": [ - { - "labels": { - "job": "api" - }, - "value": 1.25 - } - ] - } - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -43706,7 +43258,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/QueryDataResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -43723,74 +43275,38 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "413": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The request or final response exceeds its size limit." - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, - "499": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The client canceled the query." - }, "500": { "$ref": "#/components/responses/ServerError" - }, - "503": { - "$ref": "#/components/responses/ServiceUnavailable" - }, - "504": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The query timed out." } }, - "summary": "Query structured data", + "summary": "Delete datasource", "tags": [ - "Monitors/Diagnostics" + "Monitors/Data sources" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/minute**; **5 requests/second** per account |\n| Permissions | Any valid `app_key` (read-only; not gated by a specific permission class) |\n| Edge requirement | Supported deployments require **monit-edge v0.65.0 or later** |\n\n## Usage\n\n- Treat **monit-edge v0.65.0** as the minimum supported Edge version for this public API. WebAPI retains migration adapters for older Edge versions: query.v2 results may still preserve frames, records, or samples, while legacy rows can expose only the information they retained. These adapters do not change the support floor; older protocols lack query.v3 cancellation and error-lifecycle semantics, and data already lost by legacy rows cannot be recovered.\n- The public response format is always `query_result.v1` and is independent of the internal Edge query protocol. Dispatch on `result.kind` (`frames`, `records`, or `samples`); do not infer the result shape from `ds_type` or the Edge version.\n- A `frames` result may contain multiple table or time-series frames. Field values are columnar and all fields in one frame have the same length.\n- A `records` result may contain nested JSON and null records. Integer literals outside JavaScript's safe integer range are returned as decimal strings.\n- A `samples` result contains label sets and instant values. A value may be a number or one of the strings `NaN`, `+Inf`, and `-Inf`.\n- The final success response is limited to 8 MiB and query results are limited to 1,000 rows. Narrow the time range, reduce fields, or aggregate at the source when a request exceeds a limit.\n- Query failures use non-2xx HTTP status codes and the standard error envelope. Do not transparently fall back to the deprecated `/monit/query/rows` endpoint.\n- Query execution may take up to 35 seconds across WebAPI forwarding and Edge execution. Configure client timeouts to at least 40 seconds and propagate cancellation when the caller abandons a query.", - "href": "/en/api-reference/monitors/diagnostics/monit-read-query-data", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-write-delete", "metadata": { - "sidebarTitle": "Query structured data" + "sidebarTitle": "Delete datasource" } } } }, - "/monit/rule/audit/detail": { + "/monit/datasource/info": { "post": { - "description": "Return the audit record (including the `content` field, a JSON string of the rule snapshot at that point in time).", - "operationId": "monit-rule-read-audit-detail", + "description": "Retrieve full details of a single data source by its ID, including the `payload` configuration with its configured connection and authentication settings; treat the response as sensitive and avoid logging or forwarding it. Supports diagnostic types redis_node, redis_sentinel, mongodb_mongod, mongodb_mongos and kafka; enabled and alerting_enabled are independent.", + "operationId": "monit-datasource-read-info", "requestBody": { "content": { "application/json": { "example": { - "id": 9001 + "id": 10 }, "schema": { - "$ref": "#/components/schemas/AuditRecordIDRequest" + "$ref": "#/components/schemas/IDRequest" } } }, @@ -43803,13 +43319,23 @@ "example": { "data": { "account_id": 10023, - "action": "update", - "alert_rule_id": 50001, - "content": "{\"id\":50001,\"name\":\"CPU High\"}", - "created_at": 1712000000, - "creator_id": 80011, - "creator_name": "Alice", - "id": 9001 + "address": "http://prometheus.example.com:9090", + "alerting_enabled": true, + "edge_cluster_name": "default", + "enabled": true, + "id": 10, + "name": "Prometheus Prod", + "note": "Production Prometheus", + "payload": { + "prometheus": { + "basic_auth_enabled": false, + "basic_auth_password": "", + "basic_auth_username": "", + "tls_skip_verify": false + } + }, + "type_ident": "prometheus", + "updated_at": 1712000000 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -43821,7 +43347,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/AlertRuleAudit" + "$ref": "#/components/schemas/DataSourceItem" } }, "type": "object" @@ -43845,31 +43371,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get rule audit snapshot", + "summary": "Get datasource detail", "tags": [ - "Monitors/Alert rules" + "Monitors/Data sources" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |\n\n## Usage\n\n- Pass the audit record `id` (not the rule `id`) from `POST /monit/rule/audits`.\n- `content` is a JSON string — parse it to get the full rule snapshot.", - "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-audit-detail", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Read** (`monit`) |\n\nSee the request/response schemas for all supported types and credential handling. Diagnostic-only types cannot enable alerting. On create omitted enabled defaults to true; on update omission preserves the current value. Explicit null for enabled or alerting_enabled is invalid. Diagnostic passwords and Kafka private keys are omitted from responses unless they are environment references; omit these secrets on update to preserve them, or send an empty string to clear. Other datasource credentials may be returned and must be handled as sensitive.", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-info", "metadata": { - "sidebarTitle": "Get rule audit snapshot" + "sidebarTitle": "Get datasource detail" } } } }, - "/monit/rule/audits": { + "/monit/datasource/list": { "post": { - "description": "Return the change history (audit records) for an alert rule.", - "operationId": "monit-rule-read-audits", + "description": "Return all data sources for the current account. Optionally filter by `type_ident`. Supports diagnostic types redis_node, redis_sentinel, mongodb_mongod, mongodb_mongos and kafka; enabled and alerting_enabled are independent.", + "operationId": "monit-datasource-read-list", "requestBody": { "content": { "application/json": { "example": { - "id": 50001 + "type": "prometheus" }, "schema": { - "$ref": "#/components/schemas/RuleIDRequest" + "$ref": "#/components/schemas/DataSourceListRequest" } } }, @@ -43883,12 +43409,16 @@ "data": [ { "account_id": 10023, - "action": "update", - "alert_rule_id": 50001, - "created_at": 1712000000, - "creator_id": 80011, - "creator_name": "Alice", - "id": 9001 + "address": "http://prometheus.example.com:9090", + "alerting_enabled": true, + "edge_cluster_name": "default", + "enabled": true, + "id": 10, + "name": "Prometheus Prod", + "note": "Production Prometheus", + "payload": null, + "type_ident": "prometheus", + "updated_at": 1712000000 } ], "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" @@ -43901,7 +43431,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RuleAuditListResponse" + "$ref": "#/components/schemas/DataSourceListResponse" } }, "type": "object" @@ -43925,29 +43455,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List rule change history", + "summary": "List datasources", "tags": [ - "Monitors/Alert rules" + "Monitors/Data sources" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", - "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-audits", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Read** (`monit`) |\n\n## Usage\n\n- Omit `type_ident` to return all types.\n- Sensitive credential fields (passwords, keys) are not returned in the list response.\n\nSee the request/response schemas for all supported types and credential handling. Diagnostic-only types cannot enable alerting. On create omitted enabled defaults to true; on update omission preserves the current value. Explicit null for enabled or alerting_enabled is invalid. Diagnostic passwords and Kafka private keys are omitted from responses unless they are environment references; omit these secrets on update to preserve them, or send an empty string to clear. Other datasource credentials may be returned and must be handled as sensitive.", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-list", "metadata": { - "sidebarTitle": "List rule change history" + "sidebarTitle": "List datasources" } } } }, - "/monit/rule/counter/channel": { + "/monit/datasource/sls/logstores": { "post": { - "description": "Return an object mapping channel name to the number of rules routing alerts to that channel. If a channel name cannot be resolved, the channel ID (as a string) is used as the key.", - "operationId": "monit-rule-read-counter-channel", + "description": "List logstores within an SLS project for the specified SLS datasource.", + "operationId": "monit-datasource-read-sls-logstores", "requestBody": { "content": { "application/json": { - "example": {}, + "example": { + "id": 10, + "offset": 0, + "project": "project-a", + "size": 50 + }, "schema": { - "$ref": "#/components/schemas/RuleEmptyRequest" + "$ref": "#/components/schemas/SLSLogstoresRequest" } } }, @@ -43958,9 +43493,10 @@ "content": { "application/json": { "example": { - "data": { - "Production": 8 - }, + "data": [ + "logstore-1", + "logstore-2" + ], "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -43971,7 +43507,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RuleCounterChannelResponse" + "$ref": "#/components/schemas/SLSLogstoresResponse" } }, "type": "object" @@ -43995,29 +43531,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get rule counts by channel", + "summary": "List SLS logstores", "tags": [ - "Monitors/Alert rules" + "Monitors/Data sources" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", - "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-counter-channel", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Read** (`monit`) |\n\n## Usage\n\n- The datasource identified by `id` must be of type `sls`.\n- Supply `project` to select the SLS project whose logstores to list.", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-sls-logstores", "metadata": { - "sidebarTitle": "Get rule counts by channel" + "sidebarTitle": "List SLS logstores" } } } }, - "/monit/rule/counter/total": { + "/monit/datasource/sls/projects": { "post": { - "description": "Return the stored time series of the total rule count across the account — one sample per `clock` timestamp.", - "operationId": "monit-rule-read-counter-total", + "description": "List Alibaba Cloud SLS (Simple Log Service) projects available in the specified SLS datasource.", + "operationId": "monit-datasource-read-sls-projects", "requestBody": { "content": { "application/json": { - "example": {}, + "example": { + "id": 10, + "offset": 0, + "query": "", + "size": 50 + }, "schema": { - "$ref": "#/components/schemas/RuleEmptyRequest" + "$ref": "#/components/schemas/SLSProjectsRequest" } } }, @@ -44028,14 +43569,30 @@ "content": { "application/json": { "example": { - "data": [ - { - "account_id": 10023, - "clock": 1712000000, - "id": 1, - "num": 50 - } - ], + "data": { + "count": 2, + "projects": [ + { + "createTime": "1710000000", + "description": "Production logs", + "lastModifyTime": "1712000000", + "owner": "", + "projectName": "project-a", + "region": "cn-shanghai", + "status": "Normal" + }, + { + "createTime": "1710000000", + "description": "Staging logs", + "lastModifyTime": "1712000000", + "owner": "", + "projectName": "project-b", + "region": "cn-shanghai", + "status": "Normal" + } + ], + "total": 2 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -44046,7 +43603,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RuleCounterTotalResponse" + "$ref": "#/components/schemas/SLSProjectsResponse" } }, "type": "object" @@ -44070,31 +43627,50 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get rule counter time series", + "summary": "List SLS projects", "tags": [ - "Monitors/Alert rules" + "Monitors/Data sources" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |\n\n## Usage\n\n- Each item is a historical snapshot: `num` is the total rule count at the given `clock` (Unix epoch seconds).", - "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-counter-total", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Read** (`monit`) |\n\n## Usage\n\n- The datasource identified by `id` must be of type `sls`.\n- Use `query` to filter projects by name prefix. Use `offset` and `size` for pagination.", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-sls-projects", "metadata": { - "sidebarTitle": "Get rule counter time series" + "sidebarTitle": "List SLS projects" } } } }, - "/monit/rule/delete": { + "/monit/datasource/tools/invoke": { "post": { - "description": "Delete a single alert rule by its ID.", - "operationId": "monit-rule-write-delete", + "description": "Execute one deterministic diagnostic or query tool against a configured datasource.", + "operationId": "monit-datasource-tools-invoke", "requestBody": { "content": { "application/json": { - "example": { - "id": 50001 - }, "schema": { - "$ref": "#/components/schemas/RuleIDRequest" + "$ref": "#/components/schemas/DatasourceToolInvokeRequest" + }, + "examples": { + "diagnostic": { + "value": { + "datasource_id": 10, + "params": {}, + "tool": "mysql.overview" + } + }, + "query": { + "value": { + "datasource_id": 24000, + "tool": "prometheus.query", + "params": { + "expr": "sum(rate(http_requests_total[5m]))", + "execution": { + "kind": "instant", + "to_ms": 1789000000000 + } + } + } + } } } }, @@ -44104,10 +43680,6 @@ "200": { "content": { "application/json": { - "example": { - "data": {}, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, "schema": { "allOf": [ { @@ -44116,128 +43688,195 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RuleEmptyResponse" + "$ref": "#/components/schemas/DatasourceToolResult" } }, "type": "object" } ] + }, + "examples": { + "diagnostic": { + "value": { + "data": { + "data": { + "version": "8.0.36" + }, + "datasource_id": 10, + "summary": "MySQL overview", + "tool": "mysql.overview" + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + } + }, + "query": { + "value": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "datasource_id": 24000, + "tool": "prometheus.query", + "data": { + "format": "explore_result.v1", + "result": { + "kind": "samples", + "samples": [ + { + "labels": { + "__name__": "up", + "instance": "10.101.214.50:7070" + }, + "value": 1 + } + ] + } + } + } + } + } } } }, "description": "Success" }, "400": { - "$ref": "#/components/responses/BadRequest" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Standard HTTP error; error.reason: invalid_request, tool_not_supported, datasource_error." }, "401": { "$ref": "#/components/responses/Unauthorized" }, - "429": { - "$ref": "#/components/responses/TooManyRequests" + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Standard HTTP error; error.reason: access_denied." }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "summary": "Delete alert rule", - "tags": [ - "Monitors/Alert rules" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-delete", - "metadata": { - "sidebarTitle": "Delete alert rule" - } - } - } - }, - "/monit/rule/delete/batch": { - "post": { - "description": "Delete multiple alert rules in a single request.", - "operationId": "monit-rule-write-delete-batch", - "requestBody": { - "content": { - "application/json": { - "example": { - "ids": [ - 50001, - 50002 - ] - }, - "schema": { - "$ref": "#/components/schemas/RuleIDsRequest" + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } } - } + }, + "description": "Standard HTTP error; error.reason: datasource_not_found." }, - "required": true - }, - "responses": { - "200": { + "409": { "content": { "application/json": { - "example": { - "data": {}, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/RuleEmptyResponse" - } - }, - "type": "object" - } - ] + "$ref": "#/components/schemas/ErrorResponse" } } }, - "description": "Success" - }, - "400": { - "$ref": "#/components/responses/BadRequest" + "description": "Standard HTTP error; error.reason: datasource_disabled, datasource_in_use." }, - "401": { - "$ref": "#/components/responses/Unauthorized" + "413": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Standard HTTP error; error.reason: source_too_large, result_too_large." }, "429": { - "$ref": "#/components/responses/TooManyRequests" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Standard HTTP error; error.reason: overloaded." + }, + "499": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Standard HTTP error; error.reason: canceled." }, "500": { - "$ref": "#/components/responses/ServerError" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Standard HTTP error; error.reason: internal." + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Standard HTTP error; error.reason: no_active_edge, edge_upgrade_required, mixed_edge_versions." + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Standard HTTP error; error.reason: timeout." } }, - "summary": "Batch delete alert rules", + "summary": "Invoke datasource tool", "tags": [ - "Monitors/Alert rules" + "Monitors/Data sources" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **30 requests/minute**; **5 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-delete-batch", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **2,000 requests/minute**; **32 requests/second** per account |\n| Permissions | **Datasources Read** (`monit`) |\n\nUse datasource IDs from `/monit/datasource/list`. Disabled datasources return `datasource_disabled`; `alerting_enabled=false` does not block tools. Errors use non-2xx HTTP status and `error.code`, `error.message`, `error.reason`. `tool_not_supported` indicates the selected executor does not provide this tool; it is not a vendor permission error. Never retry through another Edge or the legacy diagnose endpoint automatically.\n\n## Usage\n\n- Two tool families share this entry: diagnostic tools defined by the executing Edge (e.g. `mysql.overview`, `prometheus.metric_trends`) and query tools named `.query`. The tool prefix must match the datasource type.\n- Query tools require the Edge cluster to support Explore queries (protocol milestone v0.68.0); diagnostic tools require the v0.71.0 base invoke protocol. Unsupported clusters fail with `edge_upgrade_required`, `mixed_edge_versions`, or `edge_version_unknown`; never fall back to `/monit/query/data` or another endpoint automatically.\n- For query tools, `params` follows the per-datasource schema named in the `tool` field description. `expr` and `execution` are always required. `limit`/`direction` only bound raw-log retrieval, never SQL rows or scanned data. Unknown extension fields are tolerated but never executed or forwarded.\n- Query `data` is the complete Explore result: `format` is `explore_result.v1` and `result.kind` is `samples`, `frames`, or `logs`; log results keep `applied_limit` and `has_more`. Query results never synthesize `summary` or `truncated`.\n- Request body limit 128 KiB; complete success response limit 10 MiB for both families; diagnostic tool timeout at most 25 seconds.", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-tools-invoke", "metadata": { - "sidebarTitle": "Batch delete alert rules" + "sidebarTitle": "Invoke datasource tool" } } } }, - "/monit/rule/list/basic": { + "/monit/datasource/update": { "post": { - "description": "Return the basic information of all alert rules in a folder. For full rule details, call `POST /monit/rule/v2/info`.", - "operationId": "monit-rule-read-list", + "description": "Update an existing data source. Supply `id` plus the fields to change. Supports diagnostic types redis_node, redis_sentinel, mongodb_mongod, mongodb_mongos and kafka; enabled and alerting_enabled are independent.", + "operationId": "monit-datasource-write-update", "requestBody": { "content": { "application/json": { "example": { - "folder_id": 100 + "address": "http://prometheus-v2.example.com:9090", + "edge_cluster_name": "default", + "id": 10, + "name": "Prometheus Prod v2", + "note": "Updated", + "payload": { + "prometheus": { + "basic_auth_enabled": false + } + }, + "type_ident": "prometheus" }, "schema": { - "$ref": "#/components/schemas/RuleListRequest" + "$ref": "#/components/schemas/DataSourceUpsertRequest" } } }, @@ -44248,19 +43887,15 @@ "content": { "application/json": { "example": { - "data": [ - { - "active_alert_count": 2, - "created_at": 1710000000, - "ds_type": "prometheus", - "enabled": true, - "folder_id": 100, - "id": 50001, - "name": "CPU High", - "runtime_state": "normal", - "triggered": true - } - ], + "data": { + "alerting_enabled": true, + "edge_cluster_name": "default", + "enabled": true, + "id": 10, + "name": "Prometheus Prod v2", + "type_ident": "prometheus", + "updated_at": 1712100000 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -44271,7 +43906,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RuleBasicListResponse" + "$ref": "#/components/schemas/DataSourceItem" } }, "type": "object" @@ -44295,117 +43930,130 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List alert rules", + "summary": "Update datasource", "tags": [ - "Monitors/Alert rules" + "Monitors/Data sources" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |\n\n## Usage\n\n- Set `folder_id` to `0` to list all rules across all folders visible to the current user.\n- The `triggered` field indicates whether the rule has any currently active alerts.", - "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Use credential fields only for connection credentials.\n\nSee the request/response schemas for all supported types and credential handling. Diagnostic-only types cannot enable alerting. On create omitted enabled defaults to true; on update omission preserves the current value. Explicit null for enabled or alerting_enabled is invalid. Diagnostic passwords and Kafka private keys are omitted from responses unless they are environment references; omit these secrets on update to preserve them, or send an empty string to clear. Other datasource credentials may be returned and must be handled as sensitive.", + "href": "/en/api-reference/monitors/data-sources/monit-datasource-write-update", "metadata": { - "sidebarTitle": "List alert rules" + "sidebarTitle": "Update datasource" } } } }, - "/monit/rule/move": { - "post": { - "description": "Move one or more alert rules to a different folder.", - "operationId": "monit-rule-write-move", - "requestBody": { - "content": { - "application/json": { - "example": { - "dest_folder_id": 200, - "ids": [ - 50001, - 50002 - ] - }, - "schema": { - "$ref": "#/components/schemas/RuleMoveRequest" - } + "/monit/prometheus/api/v1/label/{label_name}/values": { + "get": { + "description": "Read label values from a Prometheus-compatible data source through the Monitors proxy.", + "operationId": "monit-prometheus-read-label-values", + "parameters": [ + { + "description": "Label name to enumerate values for, for example `job`.", + "in": "path", + "name": "label_name", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "description": "Data source ID to query. Must reference a Prometheus-compatible data source owned by the authenticated account.", + "in": "header", + "name": "X-DSID", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ - { - "message": "", - "name": "CPU High" - } + "api", + "db", + "worker" ], - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + "status": "success" }, "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/RuleNameMessageListResponse" - } - }, - "type": "object" - } - ] + "$ref": "#/components/schemas/PrometheusLabelValuesResponse" } } }, - "description": "Success" + "description": "Native Prometheus label-values response returned by the data source." }, "400": { - "$ref": "#/components/responses/BadRequest" + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "The `X-DSID` header is missing or invalid, the data source does not exist, or it is not a Prometheus data source. Returned as `text/plain`." }, "401": { "$ref": "#/components/responses/Unauthorized" }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "summary": "Move alert rules to folder", - "tags": [ - "Monitors/Alert rules" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Rules whose names already exist in the destination folder are skipped. Inspect each result's `message` to identify conflicts.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-move", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "The data source lookup or the proxied request failed. Returned as `text/plain`." + }, + "503": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "No monit-edge in the data source's cluster supports the data source resource proxy. Returned as `text/plain`; upgrade monit-edge." + } + }, + "summary": "List Prometheus label values", + "tags": [ + "Monitors/Data sources" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Any valid `app_key` (read-only; not gated by a specific permission class) |\n| Edge requirement | Supported deployments require **monit-edge v0.35.0 or later** |\n\n## Usage\n\n- Pass the target data source in the `X-DSID` header. It must be a Prometheus-compatible data source owned by the authenticated account; use `/monit/datasource/list` to obtain its ID.\n- The 200 body is the data source's native Prometheus HTTP API payload, **not** the standard `{ request_id, data }` envelope. Failures raised before the data source is reached are returned as `text/plain` with the matching 4xx or 5xx status.\n- When `X-DSID` is omitted, the request falls back to the platform's own Prometheus proxy. Send the header to query a specific data source.", + "href": "/en/api-reference/monitors/data-sources/monit-prometheus-read-label-values", "metadata": { - "sidebarTitle": "Move alert rules to folder" + "sidebarTitle": "List Prometheus label values" } } } }, - "/monit/rule/update/fields": { + "/monit/query/explore": { "post": { - "description": "Update specific fields across multiple alert rules at once. Only the fields listed in `fields` are applied.", - "operationId": "monit-rule-write-fields-update", + "description": "Run an Explore query against a configured data source and return frames, samples, or logs.", + "operationId": "monit-read-query-explore", "requestBody": { "content": { "application/json": { "example": { - "enabled": false, - "fields": [ - "enabled" - ], - "ids": [ - 50001, - 50002 - ] + "args": {}, + "datasource_id": 101, + "execution": { + "from_ms": 1787187600000, + "kind": "range", + "max_data_points": 1200, + "min_step_seconds": 15, + "to_ms": 1787191200000 + }, + "expr": "rate(http_requests_total[5m])" }, "schema": { - "$ref": "#/components/schemas/RuleFieldsUpdateRequest" + "$ref": "#/components/schemas/QueryExploreRequest" } } }, @@ -44416,16 +44064,42 @@ "content": { "application/json": { "example": { - "data": [ - { - "message": "", - "name": "CPU High" + "data": { + "execution": { + "effective_step_seconds": 60, + "kind": "range" }, - { - "message": "", - "name": "Disk High" + "format": "explore_result.v1", + "result": { + "frames": [ + { + "fields": [ + { + "name": "time", + "type": "time", + "values": [ + "2026-08-20T10:00:00Z", + "2026-08-20T10:01:00Z" + ] + }, + { + "labels": { + "job": "api" + }, + "name": "value", + "type": "float", + "values": [ + 1.25, + null + ] + } + ], + "kind": "time_series" + } + ], + "kind": "frames" } - ], + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -44436,7 +44110,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RuleNameMessageListResponse" + "$ref": "#/components/schemas/ExploreData" } }, "type": "object" @@ -44448,135 +44122,172 @@ "description": "Success" }, "400": { - "$ref": "#/components/responses/BadRequest" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Standard HTTP error; error.reason: invalid_request." }, "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Standard HTTP error; error.reason: access_denied." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Standard HTTP error; error.reason: datasource_not_found." + }, + "413": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Standard HTTP error; error.reason: source_too_large, result_too_large." + }, "429": { - "$ref": "#/components/responses/TooManyRequests" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Standard HTTP error; error.reason: overloaded." + }, + "499": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Standard HTTP error; error.reason: canceled." }, "500": { - "$ref": "#/components/responses/ServerError" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Standard HTTP error; error.reason: internal." + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Standard HTTP error; error.reason: no_active_edge, edge_upgrade_required, mixed_edge_versions, edge_unavailable." + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Standard HTTP error; error.reason: timeout." } }, - "summary": "Batch update rule fields", + "summary": "Run Explore query", "tags": [ - "Monitors/Alert rules" + "Monitors/Diagnostics" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Include the field names you want to update in the `fields` array, e.g. `[\"enabled\", \"channel_ids\"]`.\n- Only the specified fields are updated; others are left unchanged.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-fields-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/minute**; **16 requests/second** per account |\n| Permissions | **Datasources Read** (`monit`) |\n| Edge requirement | Supported deployments require **monit-edge v0.68.0 or later** |\n\n## Usage\n\n- Use this endpoint when you need the data source's native result shape; `/monit/query/data` returns the stable `query_result.v1` contract instead. Dispatch on `data.result.kind` (`frames`, `samples`, or `logs`) here.\n- `execution.kind` decides which companion fields are accepted: `instant` needs only `to_ms`, `range` requires `from_ms`, `to_ms`, and `max_data_points`, and `window` takes `from_ms` and `to_ms`. `step_seconds` is not accepted; the step is derived from `max_data_points` and `min_step_seconds`.\n- `args` carries macro substitutions such as Grafana-style variables; every value is a string.\n- A `logs` result is capped at 1,000 entries and reports `applied_limit` plus `has_more`. Time-series and sample results are capped at 1,000 items each and the whole success response at 8 MiB.\n- Query execution may take up to 35 seconds across WebAPI forwarding and Edge execution. Configure client timeouts to at least 40 seconds.", + "href": "/en/api-reference/monitors/diagnostics/monit-read-query-explore", "metadata": { - "sidebarTitle": "Batch update rule fields" + "sidebarTitle": "Run Explore query" } } } }, - "/monit/rule/v2/info": { + "/monit/query/data": { "post": { - "operationId": "monit-rule-read-info-v2", - "summary": "Get alert rule detail (V2)", - "description": "Return the full V2 configuration of an alert rule by ID, including lifecycle v2 recovery and ending modes.", - "tags": [ - "Monitors/Alert rules" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |\n\n## Usage\n\n- `id` is required and must not be `0`; otherwise the call returns `InvalidParameter`.\n- A missing rule returns `InvalidParameter` (`alert rule not found`).", - "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-info-v2", - "metadata": { - "sidebarTitle": "Get alert rule detail (V2)" - } + "description": "Run a synchronous ad-hoc query against a configured data source and return a stable `query_result.v1` result whose natural shape is frames, records, or samples. This public API requires monit-edge v0.65.0 or later.", + "operationId": "monit-read-query-data", + "requestBody": { + "content": { + "application/json": { + "example": { + "args": {}, + "delay_seconds": 0, + "ds_name": "prod-prom", + "ds_type": "prometheus", + "expr": "sum by (job) (rate(http_requests_total[5m]))" + }, + "schema": { + "$ref": "#/components/schemas/QueryDataRequest" + } + } + }, + "required": true }, "responses": { "200": { - "description": "Success", "content": { "application/json": { + "example": { + "data": { + "format": "query_result.v1", + "result": { + "kind": "samples", + "samples": [ + { + "labels": { + "job": "api" + }, + "value": 1.25 + } + ] + } + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { - "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AlertRuleV2" + "$ref": "#/components/schemas/QueryDataResponse" } - } + }, + "type": "object" } ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "id": 50001, - "account_id": 888, - "folder_id": 100, - "name": "CPU High", - "labels": {}, - "ds_type": "prometheus", - "ds_list": [ - "prometheus*" - ], - "ds_ids": [], - "enabled": true, - "debug_log_enabled": false, - "rule_configs": { - "queries": [ - { - "name": "A", - "expr": "100 - avg(cpu_usage_idle)" - } - ], - "check_threshold": { - "enabled": true, - "alerting_check_times": 3, - "alerting_window_size": 5, - "recovery_check_times": 2, - "critical": "$A > 90", - "warning": "$A > 80", - "recovery_mode": "condition_clear" - } - }, - "cron_pattern": "0 * * * * *", - "timezone": "Asia/Shanghai", - "delay_seconds": 0, - "enabled_times": [ - { - "days": [ - 1, - 2, - 3, - 4, - 5, - 6, - 0 - ], - "stime": "00:00", - "etime": "23:59" - } - ], - "annotations": {}, - "description_type": "text", - "description": "", - "channel_ids": [ - 20001 - ], - "repeat_interval": 3600, - "repeat_total": 3, - "investigation_targets": [], - "creator_id": 66, - "creator_name": "zhangsan", - "updater_id": 66, - "updater_name": "zhangsan", - "created_at": 1712000000, - "updated_at": 1712000000 - } } } - } + }, + "description": "Success" }, "400": { "$ref": "#/components/responses/BadRequest" @@ -44584,132 +44295,114 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "413": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "The request or final response exceeds its size limit." + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, + "499": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "The client canceled the query." + }, "500": { "$ref": "#/components/responses/ServerError" + }, + "503": { + "$ref": "#/components/responses/ServiceUnavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "The query timed out." } }, + "summary": "Query structured data", + "tags": [ + "Monitors/Diagnostics" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/minute**; **5 requests/second** per account |\n| Permissions | Any valid `app_key` (read-only; not gated by a specific permission class) |\n| Edge requirement | Supported deployments require **monit-edge v0.65.0 or later** |\n\n## Usage\n\n- Treat **monit-edge v0.65.0** as the minimum supported Edge version for this public API. WebAPI retains migration adapters for older Edge versions: query.v2 results may still preserve frames, records, or samples, while legacy rows can expose only the information they retained. These adapters do not change the support floor; older protocols lack query.v3 cancellation and error-lifecycle semantics, and data already lost by legacy rows cannot be recovered.\n- The public response format is always `query_result.v1` and is independent of the internal Edge query protocol. Dispatch on `result.kind` (`frames`, `records`, or `samples`); do not infer the result shape from `ds_type` or the Edge version.\n- A `frames` result may contain multiple table or time-series frames. Field values are columnar and all fields in one frame have the same length.\n- A `records` result may contain nested JSON and null records. Integer literals outside JavaScript's safe integer range are returned as decimal strings.\n- A `samples` result contains label sets and instant values. A value may be a number or one of the strings `NaN`, `+Inf`, and `-Inf`.\n- The final success response is limited to 8 MiB and query results are limited to 1,000 rows. Narrow the time range, reduce fields, or aggregate at the source when a request exceeds a limit.\n- Query failures use non-2xx HTTP status codes and the standard error envelope. Do not transparently fall back to the deprecated `/monit/query/rows` endpoint.\n- Query execution may take up to 35 seconds across WebAPI forwarding and Edge execution. Configure client timeouts to at least 40 seconds and propagate cancellation when the caller abandons a query.", + "href": "/en/api-reference/monitors/diagnostics/monit-read-query-data", + "metadata": { + "sidebarTitle": "Query structured data" + } + } + } + }, + "/monit/rule/audit/detail": { + "post": { + "description": "Return the audit record (including the `content` field, a JSON string of the rule snapshot at that point in time).", + "operationId": "monit-rule-read-audit-detail", "requestBody": { - "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleIDRequest" - }, "example": { - "id": 50001 + "id": 9001 + }, + "schema": { + "$ref": "#/components/schemas/AuditRecordIDRequest" } } - } - } - } - }, - "/monit/rule/v2/create": { - "post": { - "operationId": "monit-rule-write-create-v2", - "summary": "Create alert rule (V2)", - "description": "Create a new V2 alert rule. Returns the created rule with its assigned ID.", - "tags": [ - "Monitors/Alert rules" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- `name`, `ds_type`, `enabled`, `cron_pattern`, and `rule_configs.queries` are required; either `ds_list` (supports wildcards) or `ds_ids` must be non-empty.\n- `enabled` must be passed explicitly (including `false`); omitting it returns `InvalidParameter`.\n- `id`, `account_id`, `creator_*`, `updater_*`, `created_at`, and `updated_at` are assigned by the server; client-supplied values are ignored.\n- `name` must be unique within `folder_id`; a duplicate returns `InvalidParameter`.\n- `channel_ids` can be empty; alerts will then route through the global integration.\n- The request body tolerates additional unknown fields (forward compatibility); they are ignored.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-create-v2", - "metadata": { - "sidebarTitle": "Create alert rule (V2)" - } + }, + "required": true }, "responses": { "200": { - "description": "Success", "content": { "application/json": { + "example": { + "data": { + "account_id": 10023, + "action": "update", + "alert_rule_id": 50001, + "content": "{\"id\":50001,\"name\":\"CPU High\"}", + "created_at": 1712000000, + "creator_id": 80011, + "creator_name": "Alice", + "id": 9001 + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { - "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AlertRuleV2" + "$ref": "#/components/schemas/AlertRuleAudit" } - } + }, + "type": "object" } ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "id": 50001, - "account_id": 888, - "folder_id": 100, - "name": "CPU High", - "labels": {}, - "ds_type": "prometheus", - "ds_list": [ - "prometheus*" - ], - "ds_ids": [], - "enabled": true, - "debug_log_enabled": false, - "rule_configs": { - "queries": [ - { - "name": "A", - "expr": "100 - avg(cpu_usage_idle)" - } - ], - "check_threshold": { - "enabled": true, - "alerting_check_times": 3, - "alerting_window_size": 5, - "recovery_check_times": 2, - "critical": "$A > 90", - "warning": "$A > 80", - "recovery_mode": "condition_clear" - } - }, - "cron_pattern": "0 * * * * *", - "timezone": "Asia/Shanghai", - "delay_seconds": 0, - "enabled_times": [ - { - "days": [ - 1, - 2, - 3, - 4, - 5, - 6, - 0 - ], - "stime": "00:00", - "etime": "23:59" - } - ], - "annotations": {}, - "description_type": "text", - "description": "", - "channel_ids": [ - 20001 - ], - "repeat_interval": 3600, - "repeat_total": 3, - "investigation_targets": [], - "creator_id": 66, - "creator_name": "zhangsan", - "updater_id": 66, - "updater_name": "zhangsan", - "created_at": 1712000000, - "updated_at": 1712000000 - } } } - } + }, + "description": "Success" }, "400": { "$ref": "#/components/responses/BadRequest" @@ -44724,152 +44417,72 @@ "$ref": "#/components/responses/ServerError" } }, + "summary": "Get rule audit snapshot", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |\n\n## Usage\n\n- Pass the audit record `id` (not the rule `id`) from `POST /monit/rule/audits`.\n- `content` is a JSON string — parse it to get the full rule snapshot.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-audit-detail", + "metadata": { + "sidebarTitle": "Get rule audit snapshot" + } + } + } + }, + "/monit/rule/audits": { + "post": { + "description": "Return the change history (audit records) for an alert rule.", + "operationId": "monit-rule-read-audits", "requestBody": { - "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/AlertRuleV2" - }, "example": { - "folder_id": 100, - "name": "CPU High", - "ds_type": "prometheus", - "ds_list": [ - "prometheus*" - ], - "enabled": true, - "cron_pattern": "0 * * * * *", - "channel_ids": [ - 20001 - ], - "rule_configs": { - "queries": [ - { - "name": "A", - "expr": "100 - avg(cpu_usage_idle)" - } - ], - "check_threshold": { - "enabled": true, - "alerting_check_times": 3, - "alerting_window_size": 5, - "recovery_check_times": 2, - "critical": "$A > 90", - "warning": "$A > 80", - "recovery_mode": "condition_clear" - } - } + "id": 50001 + }, + "schema": { + "$ref": "#/components/schemas/RuleIDRequest" } } - } - } - } - }, - "/monit/rule/v2/update": { - "post": { - "operationId": "monit-rule-write-update-v2", - "summary": "Update alert rule (V2)", - "description": "Replace an alert rule's V2 configuration in full by ID. Returns the updated rule.", - "tags": [ - "Monitors/Alert rules" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- `id` is required and the rule must already exist; otherwise the call returns `InvalidParameter`.\n- This is a full-field replacement: except for the cases below, fields you omit are stored as zero values. Fetch the full configuration via `/monit/rule/v2/info` before modifying it.\n- `enabled` must be passed explicitly (including `false`); omitting it returns `InvalidParameter`. Setting it to `false` clears the rule's active alerts.\n- `investigation_targets` is the exception: omit it to keep the current value, pass `[]` to clear, or pass a value to replace it entirely.\n- `folder_id` cannot be changed through this operation; use `/monit/rule/move` to move the rule to another folder.\n- `account_id`, `creator_*`, `updater_*`, `created_at`, and `updated_at` are maintained by the server; client-supplied values are ignored.\n- `name` must be unique within `folder_id`; a duplicate returns `InvalidParameter`.\n- The request body tolerates additional unknown fields (forward compatibility); they are ignored.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-update-v2", - "metadata": { - "sidebarTitle": "Update alert rule (V2)" - } + }, + "required": true }, "responses": { "200": { - "description": "Success", "content": { "application/json": { + "example": { + "data": [ + { + "account_id": 10023, + "action": "update", + "alert_rule_id": 50001, + "created_at": 1712000000, + "creator_id": 80011, + "creator_name": "Alice", + "id": 9001 + } + ], + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { - "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/AlertRuleV2" + "$ref": "#/components/schemas/RuleAuditListResponse" } - } + }, + "type": "object" } ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": { - "id": 50001, - "account_id": 888, - "folder_id": 100, - "name": "CPU High", - "labels": {}, - "ds_type": "prometheus", - "ds_list": [ - "prometheus*" - ], - "ds_ids": [], - "enabled": true, - "debug_log_enabled": false, - "rule_configs": { - "queries": [ - { - "name": "A", - "expr": "100 - avg(cpu_usage_idle)" - } - ], - "check_threshold": { - "enabled": true, - "alerting_check_times": 3, - "alerting_window_size": 5, - "recovery_check_times": 2, - "critical": "$A > 95", - "warning": "$A > 80", - "recovery_mode": "condition_clear" - } - }, - "cron_pattern": "0 * * * * *", - "timezone": "Asia/Shanghai", - "delay_seconds": 0, - "enabled_times": [ - { - "days": [ - 1, - 2, - 3, - 4, - 5, - 6, - 0 - ], - "stime": "00:00", - "etime": "23:59" - } - ], - "annotations": {}, - "description_type": "text", - "description": "", - "channel_ids": [ - 20001 - ], - "repeat_interval": 3600, - "repeat_total": 3, - "investigation_targets": [], - "creator_id": 66, - "creator_name": "zhangsan", - "updater_id": 66, - "updater_name": "zhangsan", - "created_at": 1712000000, - "updated_at": 1712003600 - } } } - } + }, + "description": "Success" }, "400": { "$ref": "#/components/responses/BadRequest" @@ -44884,59 +44497,29 @@ "$ref": "#/components/responses/ServerError" } }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlertRuleV2" - }, - "example": { - "folder_id": 100, - "name": "CPU High", - "ds_type": "prometheus", - "ds_list": [ - "prometheus*" - ], - "enabled": true, - "cron_pattern": "0 * * * * *", - "channel_ids": [ - 20001 - ], - "rule_configs": { - "queries": [ - { - "name": "A", - "expr": "100 - avg(cpu_usage_idle)" - } - ], - "check_threshold": { - "enabled": true, - "alerting_check_times": 3, - "alerting_window_size": 5, - "recovery_check_times": 2, - "critical": "$A > 95", - "warning": "$A > 80", - "recovery_mode": "condition_clear" - } - }, - "id": 50001 - } - } + "summary": "List rule change history", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-audits", + "metadata": { + "sidebarTitle": "List rule change history" } } } }, - "/oncall/license/list": { + "/monit/rule/counter/channel": { "post": { - "description": "List people with active fixed or temporary On-call licenses in the current account.", - "operationId": "oncall-license-read-license-list", + "description": "Return an object mapping channel name to the number of rules routing alerts to that channel. If a channel name cannot be resolved, the channel ID (as a string) is used as the key.", + "operationId": "monit-rule-read-counter-channel", "requestBody": { "content": { "application/json": { "example": {}, "schema": { - "$ref": "#/components/schemas/EmptyRequest" + "$ref": "#/components/schemas/RuleEmptyRequest" } } }, @@ -44948,27 +44531,9 @@ "application/json": { "example": { "data": { - "items": [ - { - "created_at": 1719792000, - "person_id": 80011, - "person_name": "Yuki Zhang", - "type": "fixed", - "updated_at": 1719878400, - "updated_by": 80001 - }, - { - "created_at": 0, - "person_id": 80012, - "person_name": "Alex Chen", - "type": "temporary", - "updated_at": 0, - "updated_by": 0 - } - ], - "total": 2 + "Production": 8 }, - "request_id": "01J0D5Y31GY2TWAHRP3Q8K4M6N" + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ @@ -44978,7 +44543,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/LicenseListResponse" + "$ref": "#/components/schemas/RuleCounterChannelResponse" } }, "type": "object" @@ -45002,34 +44567,29 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List On-call licenses", + "summary": "Get rule counts by channel", "tags": [ - "On-call/Licenses" + "Monitors/Alert rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `items` contains only people with an active fixed or temporary On-call license.\n- For temporary licenses, `updated_by`, `created_at`, and `updated_at` are `0`.", - "href": "/en/api-reference/on-call/licenses/oncall-license-read-license-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-counter-channel", "metadata": { - "sidebarTitle": "List On-call licenses" + "sidebarTitle": "Get rule counts by channel" } } } }, - "/person/infos": { + "/monit/rule/counter/total": { "post": { - "description": "Return profile information for a batch of person IDs (members or accounts).", - "operationId": "personInfos", + "description": "Return the stored time series of the total rule count across the account — one sample per `clock` timestamp.", + "operationId": "monit-rule-read-counter-total", "requestBody": { "content": { "application/json": { - "example": { - "person_ids": [ - 2476444212131, - 3790925372131 - ] - }, + "example": {}, "schema": { - "$ref": "#/components/schemas/PersonInfosRequest" + "$ref": "#/components/schemas/RuleEmptyRequest" } } }, @@ -45040,33 +44600,14 @@ "content": { "application/json": { "example": { - "data": { - "items": [ - { - "account_id": 2451002751131, - "as": "member", - "avatar": "/image/avatar1.png", - "email": "alice@example.com", - "email_verified": true, - "locale": "zh-CN", - "person_id": 2476444212131, - "person_name": "Alice", - "phone_verified": false, - "status": "enabled", - "time_zone": "Asia/Shanghai" - }, - { - "account_id": 2451002751131, - "as": "member", - "email": "bob@example.com", - "email_verified": true, - "person_id": 3790925372131, - "person_name": "Bob", - "phone_verified": false, - "status": "enabled" - } - ] - }, + "data": [ + { + "account_id": 10023, + "clock": 1712000000, + "id": 1, + "num": 50 + } + ], "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -45077,7 +44618,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/PersonInfosResponse" + "$ref": "#/components/schemas/RuleCounterTotalResponse" } }, "type": "object" @@ -45101,31 +44642,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Batch get persons", + "summary": "Get rule counter time series", "tags": [ - "Platform/Members" + "Monitors/Alert rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/platform/members/person-infos", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |\n\n## Usage\n\n- Each item is a historical snapshot: `num` is the total rule count at the given `clock` (Unix epoch seconds).", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-counter-total", "metadata": { - "sidebarTitle": "Batch get persons" + "sidebarTitle": "Get rule counter time series" } } } }, - "/role/delete": { + "/monit/rule/delete": { "post": { - "description": "Delete a custom role. While members still hold the role, the call fails with `ReferenceExist` unless `is_force` is true.", - "operationId": "role-write-delete", + "description": "Delete a single alert rule by its ID.", + "operationId": "monit-rule-write-delete", "requestBody": { "content": { "application/json": { "example": { - "role_id": 150 + "id": 50001 }, "schema": { - "$ref": "#/components/schemas/RoleDeleteRequest" + "$ref": "#/components/schemas/RuleIDRequest" } } }, @@ -45147,7 +44688,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/PlatformEmptyObject" + "$ref": "#/components/schemas/RuleEmptyResponse" } }, "type": "object" @@ -45164,9 +44705,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -45174,31 +44712,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete a role", + "summary": "Delete alert rule", "tags": [ - "Platform/Roles & permissions" + "Monitors/Alert rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Built-in roles are synthetic and are never deleted; the call is a no-op for them.\n- While any member still holds the role, the default (`is_force=false`) call fails with error code `ReferenceExist` and the holders listed in `data.refs`. Set `is_force=true` to revoke the role from all holders and delete it in one call.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/platform/roles-permissions/role-write-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-delete", "metadata": { - "sidebarTitle": "Delete a role" + "sidebarTitle": "Delete alert rule" } } } }, - "/role/disable": { + "/monit/rule/delete/batch": { "post": { - "description": "Disable a custom role to prevent it from granting permissions.", - "operationId": "role-write-disable", + "description": "Delete multiple alert rules in a single request.", + "operationId": "monit-rule-write-delete-batch", "requestBody": { "content": { "application/json": { "example": { - "role_id": 150 + "ids": [ + 50001, + 50002 + ] }, "schema": { - "$ref": "#/components/schemas/RoleIDRequest" + "$ref": "#/components/schemas/RuleIDsRequest" } } }, @@ -45220,7 +44761,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/PlatformEmptyObject" + "$ref": "#/components/schemas/RuleEmptyResponse" } }, "type": "object" @@ -45237,9 +44778,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -45247,31 +44785,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Disable a role", + "summary": "Batch delete alert rules", "tags": [ - "Platform/Roles & permissions" + "Monitors/Alert rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Members who held this role lose its permissions immediately.\n- Built-in roles always remain enabled; enabling or disabling them is a silent no-op.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/platform/roles-permissions/role-write-disable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **30 requests/minute**; **5 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-delete-batch", "metadata": { - "sidebarTitle": "Disable a role" + "sidebarTitle": "Batch delete alert rules" } } } }, - "/role/enable": { + "/monit/rule/list/basic": { "post": { - "description": "Re-enable a previously disabled custom role.", - "operationId": "role-write-enable", + "description": "Return the basic information of all alert rules in a folder. For full rule details, call `POST /monit/rule/v2/info`.", + "operationId": "monit-rule-read-list", "requestBody": { "content": { "application/json": { "example": { - "role_id": 150 + "folder_id": 100 }, "schema": { - "$ref": "#/components/schemas/RoleIDRequest" + "$ref": "#/components/schemas/RuleListRequest" } } }, @@ -45282,7 +44820,19 @@ "content": { "application/json": { "example": { - "data": {}, + "data": [ + { + "active_alert_count": 2, + "created_at": 1710000000, + "ds_type": "prometheus", + "enabled": true, + "folder_id": 100, + "id": 50001, + "name": "CPU High", + "runtime_state": "normal", + "triggered": true + } + ], "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -45293,7 +44843,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/PlatformEmptyObject" + "$ref": "#/components/schemas/RuleBasicListResponse" } }, "type": "object" @@ -45310,9 +44860,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -45320,31 +44867,35 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Enable a role", + "summary": "List alert rules", "tags": [ - "Platform/Roles & permissions" + "Monitors/Alert rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Built-in roles always remain enabled; enabling or disabling them is a silent no-op.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/platform/roles-permissions/role-write-enable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |\n\n## Usage\n\n- Set `folder_id` to `0` to list all rules across all folders visible to the current user.\n- The `triggered` field indicates whether the rule has any currently active alerts.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-list", "metadata": { - "sidebarTitle": "Enable a role" + "sidebarTitle": "List alert rules" } } } }, - "/role/info": { + "/monit/rule/move": { "post": { - "description": "Return the detail of a single role by its ID.", - "operationId": "role-read-info", + "description": "Move one or more alert rules to a different folder.", + "operationId": "monit-rule-write-move", "requestBody": { "content": { "application/json": { "example": { - "role_id": 2 + "dest_folder_id": 200, + "ids": [ + 50001, + 50002 + ] }, "schema": { - "$ref": "#/components/schemas/RoleInfoRequest" + "$ref": "#/components/schemas/RuleMoveRequest" } } }, @@ -45355,20 +44906,12 @@ "content": { "application/json": { "example": { - "data": { - "created_at": 1700000000, - "description": "Account admin with all permissions.", - "editable": false, - "permission_ids": [ - 101, - 102, - 201 - ], - "role_id": 2, - "role_name": "Account Admin", - "status": "enabled", - "updated_at": 1700000000 - }, + "data": [ + { + "message": "", + "name": "CPU High" + } + ], "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -45379,7 +44922,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RoleItem" + "$ref": "#/components/schemas/RuleNameMessageListResponse" } }, "type": "object" @@ -45403,32 +44946,38 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get role detail", + "summary": "Move alert rules to folder", "tags": [ - "Platform/Roles & permissions" + "Monitors/Alert rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/platform/roles-permissions/role-read-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Rules whose names already exist in the destination folder are skipped. Inspect each result's `message` to identify conflicts.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-move", "metadata": { - "sidebarTitle": "Get role detail" + "sidebarTitle": "Move alert rules to folder" } } } }, - "/role/list": { + "/monit/rule/update/fields": { "post": { - "description": "Return all custom and built-in roles for the current account.", - "operationId": "role-read-list", + "description": "Update specific fields across multiple alert rules at once. Only the fields listed in `fields` are applied.", + "operationId": "monit-rule-write-fields-update", "requestBody": { "content": { "application/json": { "example": { - "asc": false, - "orderby": "created_at" + "enabled": false, + "fields": [ + "enabled" + ], + "ids": [ + 50001, + 50002 + ] }, "schema": { - "$ref": "#/components/schemas/RoleListRequest" + "$ref": "#/components/schemas/RuleFieldsUpdateRequest" } } }, @@ -45439,21 +44988,16 @@ "content": { "application/json": { "example": { - "data": { - "items": [ - { - "created_at": 1700000000, - "description": "", - "editable": false, - "permission_ids": [], - "role_id": 2, - "role_name": "Account Admin", - "status": "enabled", - "updated_at": 1700000000 - } - ], - "total": 3 - }, + "data": [ + { + "message": "", + "name": "CPU High" + }, + { + "message": "", + "name": "Disk High" + } + ], "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -45464,7 +45008,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RoleListResponse" + "$ref": "#/components/schemas/RuleNameMessageListResponse" } }, "type": "object" @@ -45488,66 +45032,123 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List roles", + "summary": "Batch update rule fields", "tags": [ - "Platform/Roles & permissions" + "Monitors/Alert rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Built-in roles (`editable: false`) cannot be modified or deleted.", - "href": "/en/api-reference/platform/roles-permissions/role-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Include the field names you want to update in the `fields` array, e.g. `[\"enabled\", \"channel_ids\"]`.\n- Only the specified fields are updated; others are left unchanged.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-fields-update", "metadata": { - "sidebarTitle": "List roles" + "sidebarTitle": "Batch update rule fields" } } } }, - "/role/member/grant": { + "/monit/rule/v2/info": { "post": { - "description": "Assign a role to one or more members, giving them its permissions.", - "operationId": "role-write-grant-role", - "requestBody": { - "content": { - "application/json": { - "example": { - "member_ids": [ - 80011, - 80012 - ], - "role_id": 150 - }, - "schema": { - "$ref": "#/components/schemas/RoleGrantRequest" - } - } - }, - "required": true + "operationId": "monit-rule-read-info-v2", + "summary": "Get alert rule detail (V2)", + "description": "Return the full V2 configuration of an alert rule by ID, including lifecycle v2 recovery and ending modes.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |\n\n## Usage\n\n- `id` is required and must not be `0`; otherwise the call returns `InvalidParameter`.\n- A missing rule returns `InvalidParameter` (`alert rule not found`).", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-info-v2", + "metadata": { + "sidebarTitle": "Get alert rule detail (V2)" + } }, "responses": { "200": { + "description": "Success", "content": { "application/json": { - "example": { - "data": {}, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { + "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/PlatformEmptyObject" + "$ref": "#/components/schemas/AlertRuleV2" } - }, - "type": "object" + } } ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 50001, + "account_id": 888, + "folder_id": 100, + "name": "CPU High", + "labels": {}, + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "ds_ids": [], + "enabled": true, + "debug_log_enabled": false, + "rule_configs": { + "queries": [ + { + "name": "A", + "expr": "100 - avg(cpu_usage_idle)" + } + ], + "check_threshold": { + "enabled": true, + "alerting_check_times": 3, + "alerting_window_size": 5, + "recovery_check_times": 2, + "critical": "$A > 90", + "warning": "$A > 80", + "recovery_mode": "condition_clear" + } + }, + "cron_pattern": "0 * * * * *", + "timezone": "Asia/Shanghai", + "delay_seconds": 0, + "enabled_times": [ + { + "days": [ + 1, + 2, + 3, + 4, + 5, + 6, + 0 + ], + "stime": "00:00", + "etime": "23:59" + } + ], + "annotations": {}, + "description_type": "text", + "description": "", + "channel_ids": [ + 20001 + ], + "repeat_interval": 3600, + "repeat_total": 3, + "investigation_targets": [], + "creator_id": 66, + "creator_name": "zhangsan", + "updater_id": 66, + "updater_name": "zhangsan", + "created_at": 1712000000, + "updated_at": 1712000000 + } } } - }, - "description": "Success" + } }, "400": { "$ref": "#/components/responses/BadRequest" @@ -45555,9 +45156,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -45565,65 +45163,125 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Grant role to members", - "tags": [ - "Platform/Roles & permissions" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Members who already have the role are silently skipped.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/platform/roles-permissions/role-write-grant-role", - "metadata": { - "sidebarTitle": "Grant role to members" - } - } - } - }, - "/role/member/revoke": { - "post": { - "description": "Remove a role from one or more members, revoking the permissions it granted.", - "operationId": "role-write-revoke-role", "requestBody": { + "required": true, "content": { "application/json": { - "example": { - "member_ids": [ - 80011 - ], - "role_id": 150 - }, "schema": { - "$ref": "#/components/schemas/RoleGrantRequest" + "$ref": "#/components/schemas/RuleIDRequest" + }, + "example": { + "id": 50001 } } - }, - "required": true + } + } + } + }, + "/monit/rule/v2/create": { + "post": { + "operationId": "monit-rule-write-create-v2", + "summary": "Create alert rule (V2)", + "description": "Create a new V2 alert rule. Returns the created rule with its assigned ID.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- `name`, `ds_type`, `enabled`, `cron_pattern`, and `rule_configs.queries` are required; either `ds_list` (supports wildcards) or `ds_ids` must be non-empty.\n- `enabled` must be passed explicitly (including `false`); omitting it returns `InvalidParameter`.\n- `id`, `account_id`, `creator_*`, `updater_*`, `created_at`, and `updated_at` are assigned by the server; client-supplied values are ignored.\n- `name` must be unique within `folder_id`; a duplicate returns `InvalidParameter`.\n- `channel_ids` can be empty; alerts will then route through the global integration.\n- The request body tolerates additional unknown fields (forward compatibility); they are ignored.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-create-v2", + "metadata": { + "sidebarTitle": "Create alert rule (V2)" + } }, "responses": { "200": { + "description": "Success", "content": { "application/json": { - "example": { - "data": {}, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { + "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/PlatformEmptyObject" + "$ref": "#/components/schemas/AlertRuleV2" } - }, - "type": "object" + } } ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 50001, + "account_id": 888, + "folder_id": 100, + "name": "CPU High", + "labels": {}, + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "ds_ids": [], + "enabled": true, + "debug_log_enabled": false, + "rule_configs": { + "queries": [ + { + "name": "A", + "expr": "100 - avg(cpu_usage_idle)" + } + ], + "check_threshold": { + "enabled": true, + "alerting_check_times": 3, + "alerting_window_size": 5, + "recovery_check_times": 2, + "critical": "$A > 90", + "warning": "$A > 80", + "recovery_mode": "condition_clear" + } + }, + "cron_pattern": "0 * * * * *", + "timezone": "Asia/Shanghai", + "delay_seconds": 0, + "enabled_times": [ + { + "days": [ + 1, + 2, + 3, + 4, + 5, + 6, + 0 + ], + "stime": "00:00", + "etime": "23:59" + } + ], + "annotations": {}, + "description_type": "text", + "description": "", + "channel_ids": [ + 20001 + ], + "repeat_interval": 3600, + "repeat_total": 3, + "investigation_targets": [], + "creator_id": 66, + "creator_name": "zhangsan", + "updater_id": 66, + "updater_name": "zhangsan", + "created_at": 1712000000, + "updated_at": 1712000000 + } } } - }, - "description": "Success" + } }, "400": { "$ref": "#/components/responses/BadRequest" @@ -45631,9 +45289,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -45641,70 +45296,152 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Revoke role from members", - "tags": [ - "Platform/Roles & permissions" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Members who don't have the role are silently skipped.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/platform/roles-permissions/role-write-revoke-role", - "metadata": { - "sidebarTitle": "Revoke role from members" - } - } - } - }, - "/role/permission/factor/list": { - "post": { - "description": "Return all permission factors (API, button, menu, URL, visit) granted to the calling member, optionally filtered by type. Requires a member-scoped credential — calls authenticated as the account principal (e.g. an account-level app key) are rejected with a 400, because the account principal implicitly holds every permission.", - "operationId": "role-read-list-permission-factor", "requestBody": { + "required": true, "content": { "application/json": { - "example": { - "factor_types": [ - "api" - ] - }, "schema": { - "$ref": "#/components/schemas/PermissionFactorListRequest" - } - } - }, - "required": true + "$ref": "#/components/schemas/AlertRuleV2" + }, + "example": { + "folder_id": 100, + "name": "CPU High", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "0 * * * * *", + "channel_ids": [ + 20001 + ], + "rule_configs": { + "queries": [ + { + "name": "A", + "expr": "100 - avg(cpu_usage_idle)" + } + ], + "check_threshold": { + "enabled": true, + "alerting_check_times": 3, + "alerting_window_size": 5, + "recovery_check_times": 2, + "critical": "$A > 90", + "warning": "$A > 80", + "recovery_mode": "condition_clear" + } + } + } + } + } + } + } + }, + "/monit/rule/v2/update": { + "post": { + "operationId": "monit-rule-write-update-v2", + "summary": "Update alert rule (V2)", + "description": "Replace an alert rule's V2 configuration in full by ID. Returns the updated rule.", + "tags": [ + "Monitors/Alert rules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- `id` is required and the rule must already exist; otherwise the call returns `InvalidParameter`.\n- This is a full-field replacement: except for the cases below, fields you omit are stored as zero values. Fetch the full configuration via `/monit/rule/v2/info` before modifying it.\n- `enabled` must be passed explicitly (including `false`); omitting it returns `InvalidParameter`. Setting it to `false` clears the rule's active alerts.\n- `investigation_targets` is the exception: omit it to keep the current value, pass `[]` to clear, or pass a value to replace it entirely.\n- `folder_id` cannot be changed through this operation; use `/monit/rule/move` to move the rule to another folder.\n- `account_id`, `creator_*`, `updater_*`, `created_at`, and `updated_at` are maintained by the server; client-supplied values are ignored.\n- `name` must be unique within `folder_id`; a duplicate returns `InvalidParameter`.\n- The request body tolerates additional unknown fields (forward compatibility); they are ignored.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-update-v2", + "metadata": { + "sidebarTitle": "Update alert rule (V2)" + } }, "responses": { "200": { + "description": "Success", "content": { "application/json": { - "example": { - "data": [ - { - "factor_name": "template:read:info", - "factor_type": "api", - "source": "system" - } - ], - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { + "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/PermissionFactorListResponse" + "$ref": "#/components/schemas/AlertRuleV2" } - }, - "type": "object" + } } ] + }, + "example": { + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", + "data": { + "id": 50001, + "account_id": 888, + "folder_id": 100, + "name": "CPU High", + "labels": {}, + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "ds_ids": [], + "enabled": true, + "debug_log_enabled": false, + "rule_configs": { + "queries": [ + { + "name": "A", + "expr": "100 - avg(cpu_usage_idle)" + } + ], + "check_threshold": { + "enabled": true, + "alerting_check_times": 3, + "alerting_window_size": 5, + "recovery_check_times": 2, + "critical": "$A > 95", + "warning": "$A > 80", + "recovery_mode": "condition_clear" + } + }, + "cron_pattern": "0 * * * * *", + "timezone": "Asia/Shanghai", + "delay_seconds": 0, + "enabled_times": [ + { + "days": [ + 1, + 2, + 3, + 4, + 5, + 6, + 0 + ], + "stime": "00:00", + "etime": "23:59" + } + ], + "annotations": {}, + "description_type": "text", + "description": "", + "channel_ids": [ + 20001 + ], + "repeat_interval": 3600, + "repeat_total": 3, + "investigation_targets": [], + "creator_id": 66, + "creator_name": "zhangsan", + "updater_id": 66, + "updater_name": "zhangsan", + "created_at": 1712000000, + "updated_at": 1712003600 + } } } - }, - "description": "Success" + } }, "400": { "$ref": "#/components/responses/BadRequest" @@ -45719,34 +45456,59 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List permission factors", - "tags": [ - "Platform/Roles & permissions" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — but the credential must belong to a member; account-principal credentials (e.g. an account-level app key) are rejected with a 400 |\n\n## Usage\n\n- Permission factors are the fine-grained controls that make up each permission.\n- `factor_types` accepts: `api`, `button`, `visit`, `menu`, `url`.", - "href": "/en/api-reference/platform/roles-permissions/role-read-list-permission-factor", - "metadata": { - "sidebarTitle": "List permission factors" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlertRuleV2" + }, + "example": { + "folder_id": 100, + "name": "CPU High", + "ds_type": "prometheus", + "ds_list": [ + "prometheus*" + ], + "enabled": true, + "cron_pattern": "0 * * * * *", + "channel_ids": [ + 20001 + ], + "rule_configs": { + "queries": [ + { + "name": "A", + "expr": "100 - avg(cpu_usage_idle)" + } + ], + "check_threshold": { + "enabled": true, + "alerting_check_times": 3, + "alerting_window_size": 5, + "recovery_check_times": 2, + "critical": "$A > 95", + "warning": "$A > 80", + "recovery_mode": "condition_clear" + } + }, + "id": 50001 + } + } } } } }, - "/role/permission/list": { + "/oncall/license/list": { "post": { - "description": "Return all available permissions, optionally filtered to those granted to specific roles.", - "operationId": "role-read-list-permission", + "description": "List people with active fixed or temporary On-call licenses in the current account.", + "operationId": "oncall-license-read-license-list", "requestBody": { "content": { "application/json": { - "example": { - "role_ids": [ - 150 - ], - "with_all": true - }, + "example": {}, "schema": { - "$ref": "#/components/schemas/RolePermissionListRequest" + "$ref": "#/components/schemas/EmptyRequest" } } }, @@ -45760,19 +45522,25 @@ "data": { "items": [ { - "class": "On-call", - "description": "View notification templates", - "id": 501, - "is_granted": true, - "permission_name": "Templates Read", - "permission_type": "read", - "scope": "on-call", - "source": "system", - "status": "enabled" + "created_at": 1719792000, + "person_id": 80011, + "person_name": "Yuki Zhang", + "type": "fixed", + "updated_at": 1719878400, + "updated_by": 80001 + }, + { + "created_at": 0, + "person_id": 80012, + "person_name": "Alex Chen", + "type": "temporary", + "updated_at": 0, + "updated_by": 0 } - ] + ], + "total": 2 }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + "request_id": "01J0D5Y31GY2TWAHRP3Q8K4M6N" }, "schema": { "allOf": [ @@ -45782,7 +45550,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RolePermissionListResponse" + "$ref": "#/components/schemas/LicenseListResponse" } }, "type": "object" @@ -45806,36 +45574,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List permissions", + "summary": "List On-call licenses", "tags": [ - "Platform/Roles & permissions" + "On-call/Licenses" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Pass `role_ids` to filter permissions to those granted to those roles.\n- Pass `with_all: true` to include all permissions regardless of role filter, with `is_granted` set to indicate which are granted to the specified roles.", - "href": "/en/api-reference/platform/roles-permissions/role-read-list-permission", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `items` contains only people with an active fixed or temporary On-call license.\n- For temporary licenses, `updated_by`, `created_at`, and `updated_at` are `0`.", + "href": "/en/api-reference/on-call/licenses/oncall-license-read-license-list", "metadata": { - "sidebarTitle": "List permissions" + "sidebarTitle": "List On-call licenses" } } } }, - "/role/upsert": { + "/person/infos": { "post": { - "description": "Create a new custom role or update an existing one. Pass `role_id` to update.", - "operationId": "role-write-upsert", + "description": "Return profile information for a batch of person IDs (members or accounts).", + "operationId": "personInfos", "requestBody": { "content": { "application/json": { "example": { - "description": "Manage on-call rotations and incidents.", - "permission_ids": [ - 501, - 502 - ], - "role_name": "On-call Manager" - }, - "schema": { - "$ref": "#/components/schemas/RoleUpsertRequest" + "person_ids": [ + 2476444212131, + 3790925372131 + ] + }, + "schema": { + "$ref": "#/components/schemas/PersonInfosRequest" } } }, @@ -45847,8 +45613,31 @@ "application/json": { "example": { "data": { - "role_id": 150, - "role_name": "On-call Manager" + "items": [ + { + "account_id": 2451002751131, + "as": "member", + "avatar": "/image/avatar1.png", + "email": "alice@example.com", + "email_verified": true, + "locale": "zh-CN", + "person_id": 2476444212131, + "person_name": "Alice", + "phone_verified": false, + "status": "enabled", + "time_zone": "Asia/Shanghai" + }, + { + "account_id": 2451002751131, + "as": "member", + "email": "bob@example.com", + "email_verified": true, + "person_id": 3790925372131, + "person_name": "Bob", + "phone_verified": false, + "status": "enabled" + } + ] }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -45860,7 +45649,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RoleUpsertResponse" + "$ref": "#/components/schemas/PersonInfosResponse" } }, "type": "object" @@ -45877,9 +45666,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -45887,31 +45673,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create or update a role", + "summary": "Batch get persons", "tags": [ - "Platform/Roles & permissions" + "Platform/Members" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Omit `role_id` (or set to 0) to create; pass an existing ID to update.\n- `role_name` must be 1–39 characters and unique within the account.\n- `permission_ids` sets the full permission set for the role, replacing any previous assignment.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/platform/roles-permissions/role-write-upsert", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/members/person-infos", "metadata": { - "sidebarTitle": "Create or update a role" + "sidebarTitle": "Batch get persons" } } } }, - "/route/info": { + "/role/delete": { "post": { - "description": "Retrieve the routing rule configuration for a specific integration. Returns null when the integration has no routing rule configured.", - "operationId": "routeInfo", + "description": "Delete a custom role. While members still hold the role, the call fails with `ReferenceExist` unless `is_force` is true.", + "operationId": "role-write-delete", "requestBody": { "content": { "application/json": { "example": { - "integration_id": 6113996590131 + "role_id": 150 }, "schema": { - "$ref": "#/components/schemas/RouteInfoRequest" + "$ref": "#/components/schemas/RoleDeleteRequest" } } }, @@ -45922,53 +45708,7 @@ "content": { "application/json": { "example": { - "data": { - "cases": [ - { - "channel_ids": [ - 2533748993131 - ], - "fallthrough": false, - "if": [ - { - "key": "labels.check", - "oper": "IN", - "vals": [ - "cpu.idle<20%" - ] - } - ], - "routing_mode": "standard" - }, - { - "channel_ids": null, - "fallthrough": false, - "if": [ - { - "key": "severity", - "oper": "IN", - "vals": [ - "Warning" - ] - } - ], - "name_mapping_label": "labels.service", - "routing_mode": "name_mapping" - } - ], - "created_at": 1774606136, - "creator_id": 3790925372131, - "default": { - "channel_ids": [ - 3521074710131 - ] - }, - "integration_id": 6113996590131, - "status": "enabled", - "updated_at": 1774606136, - "updated_by": 3790925372131, - "version": 6 - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -45979,7 +45719,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RouteItem" + "$ref": "#/components/schemas/PlatformEmptyObject" } }, "type": "object" @@ -45996,6 +45736,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -46003,34 +45746,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get routing rule detail", + "summary": "Delete a role", "tags": [ - "On-call/Channels" + "Platform/Roles & permissions" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) or **Integrations Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/route-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Built-in roles are synthetic and are never deleted; the call is a no-op for them.\n- While any member still holds the role, the default (`is_force=false`) call fails with error code `ReferenceExist` and the holders listed in `data.refs`. Set `is_force=true` to revoke the role from all holders and delete it in one call.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/roles-permissions/role-write-delete", "metadata": { - "sidebarTitle": "Get routing rule detail" + "sidebarTitle": "Delete a role" } } } }, - "/route/list": { + "/role/disable": { "post": { - "description": "Return routing rules for the specified integrations. Integrations without a configured rule are omitted from the response.", - "operationId": "routeList", + "description": "Disable a custom role to prevent it from granting permissions.", + "operationId": "role-write-disable", "requestBody": { "content": { "application/json": { "example": { - "integration_ids": [ - 6113996590131, - 6113996590132 - ] + "role_id": 150 }, "schema": { - "$ref": "#/components/schemas/ListRoutesRequest" + "$ref": "#/components/schemas/RoleIDRequest" } } }, @@ -46041,42 +45781,7 @@ "content": { "application/json": { "example": { - "data": { - "items": [ - { - "cases": [ - { - "channel_ids": [ - 2533748993131 - ], - "fallthrough": false, - "if": [ - { - "key": "labels.check", - "oper": "IN", - "vals": [ - "cpu.idle<20%" - ] - } - ], - "routing_mode": "standard" - } - ], - "created_at": 1774606136, - "creator_id": 3790925372131, - "default": { - "channel_ids": [ - 3521074710131 - ] - }, - "integration_id": 6113996590131, - "status": "enabled", - "updated_at": 1774606136, - "updated_by": 3790925372131, - "version": 6 - } - ] - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -46087,7 +45792,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ListRoutesResponse" + "$ref": "#/components/schemas/PlatformEmptyObject" } }, "type": "object" @@ -46104,6 +45809,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -46111,54 +45819,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List routing rules", + "summary": "Disable a role", "tags": [ - "On-call/Channels" + "Platform/Roles & permissions" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) or **Integrations Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/route-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Members who held this role lose its permissions immediately.\n- Built-in roles always remain enabled; enabling or disabling them is a silent no-op.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/roles-permissions/role-write-disable", "metadata": { - "sidebarTitle": "List routing rules" + "sidebarTitle": "Disable a role" } } } }, - "/route/upsert": { + "/role/enable": { "post": { - "description": "Create or update routing rules for an integration to direct alerts to specific channels. At least one of `cases` or `default` must be provided.", - "operationId": "routeUpsert", + "description": "Re-enable a previously disabled custom role.", + "operationId": "role-write-enable", "requestBody": { "content": { "application/json": { "example": { - "cases": [ - { - "channel_ids": [ - 3521074710131 - ], - "fallthrough": false, - "if": [ - { - "key": "severity", - "oper": "IN", - "vals": [ - "Critical" - ] - } - ], - "routing_mode": "standard" - } - ], - "default": { - "channel_ids": [ - 3521074710131 - ] - }, - "integration_id": 6113996590131 + "role_id": 150 }, "schema": { - "$ref": "#/components/schemas/UpsertRouteRequest" + "$ref": "#/components/schemas/RoleIDRequest" } } }, @@ -46180,7 +45865,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/PlatformEmptyObject" } }, "type": "object" @@ -46197,6 +45882,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -46204,51 +45892,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Upsert routing rule", + "summary": "Enable a role", "tags": [ - "On-call/Channels" + "Platform/Roles & permissions" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/channels/route-upsert", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Built-in roles always remain enabled; enabling or disabling them is a silent no-op.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/roles-permissions/role-write-enable", "metadata": { - "sidebarTitle": "Upsert routing rule" + "sidebarTitle": "Enable a role" } } } }, - "/rum/application/create": { + "/role/info": { "post": { - "description": "Create a new RUM application. Returns the generated `application_id` and `client_token`.", - "operationId": "rum-application-write-create", + "description": "Return the detail of a single role by its ID.", + "operationId": "role-read-info", "requestBody": { "content": { "application/json": { "example": { - "application_name": "My Web App", - "is_private": false, - "links": { - "enabled": true, - "systems": [ - { - "enabled": true, - "event_types": [ - "crash", - "error" - ], - "icon_color": "#0F766E", - "icon_text": "S3", - "id": "s3-crash-logs", - "name": "S3 Crash Logs", - "url": "https://s3.example.com/logs?app=${application_id}&trace=${trace_id}" - } - ] - }, - "team_id": 2477033058131, - "type": "browser" + "role_id": 2 }, "schema": { - "$ref": "#/components/schemas/RumApplicationCreateRequest" + "$ref": "#/components/schemas/RoleInfoRequest" } } }, @@ -46260,9 +45928,18 @@ "application/json": { "example": { "data": { - "application_id": "qLpu24Dz4CAzWsESPbJYWA", - "application_name": "My Web App", - "client_token": "e090078724855a4ca168c3884880dfbc131" + "created_at": 1700000000, + "description": "Account admin with all permissions.", + "editable": false, + "permission_ids": [ + 101, + 102, + 201 + ], + "role_id": 2, + "role_name": "Account Admin", + "status": "enabled", + "updated_at": 1700000000 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -46274,7 +45951,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RumApplicationCreateResponse" + "$ref": "#/components/schemas/RoleItem" } }, "type": "object" @@ -46298,31 +45975,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create application", + "summary": "Get role detail", "tags": [ - "RUM/Applications" + "Platform/Roles & permissions" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- `type` must be one of: `browser`, `ios`, `android`, `react-native`, `flutter`, `kotlin-multiplatform`, `roku`, `unity`, `miniprogram`, `harmony`, `electron`.\n- `links.systems[].url` must start with `http` or `https`; `${var}` tokens are resolved from RUM event context.\n- `links.systems[].event_types` accepts: `crash`, `error`, `view`, `action`, `resource`, `session`, `all`.\n- `client_token` is auto-generated and used to initialize the RUM SDK.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/applications/rum-application-write-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/platform/roles-permissions/role-read-info", "metadata": { - "sidebarTitle": "Create application" + "sidebarTitle": "Get role detail" } } } }, - "/rum/application/delete": { + "/role/list": { "post": { - "description": "Delete a RUM application by `application_id`.", - "operationId": "rum-application-write-delete", + "description": "Return all custom and built-in roles for the current account.", + "operationId": "role-read-list", "requestBody": { "content": { "application/json": { "example": { - "application_id": "qLpu24Dz4CAzWsESPbJYWA" + "asc": false, + "orderby": "created_at" }, "schema": { - "$ref": "#/components/schemas/RumApplicationIDRequest" + "$ref": "#/components/schemas/RoleListRequest" } } }, @@ -46333,7 +46011,21 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "items": [ + { + "created_at": 1700000000, + "description": "", + "editable": false, + "permission_ids": [], + "role_id": 2, + "role_name": "Account Admin", + "status": "enabled", + "updated_at": 1700000000 + } + ], + "total": 3 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -46344,7 +46036,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/RoleListResponse" } }, "type": "object" @@ -46368,31 +46060,35 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete application", + "summary": "List roles", "tags": [ - "RUM/Applications" + "Platform/Roles & permissions" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/applications/rum-application-write-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Built-in roles (`editable: false`) cannot be modified or deleted.", + "href": "/en/api-reference/platform/roles-permissions/role-read-list", "metadata": { - "sidebarTitle": "Delete application" + "sidebarTitle": "List roles" } } } }, - "/rum/application/info": { + "/role/member/grant": { "post": { - "description": "Retrieve full details of a single RUM application by `application_id`.", - "operationId": "rum-application-read-info", + "description": "Assign a role to one or more members, giving them its permissions.", + "operationId": "role-write-grant-role", "requestBody": { "content": { "application/json": { "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o" + "member_ids": [ + 80011, + 80012 + ], + "role_id": 150 }, "schema": { - "$ref": "#/components/schemas/RumApplicationIDRequest" + "$ref": "#/components/schemas/RoleGrantRequest" } } }, @@ -46403,51 +46099,7 @@ "content": { "application/json": { "example": { - "data": { - "account_id": 2451002751131, - "alerting": { - "channel_ids": [ - 2490121812131 - ], - "enabled": true, - "integration_id": 4759595678131 - }, - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "application_name": "flashcat-rum", - "client_token": "a3cea433a8685a398cdfd68f54a45e06131", - "created_at": 1746673831462, - "created_by": 4441703362131, - "is_private": true, - "links": { - "enabled": true, - "systems": [ - { - "enabled": true, - "event_types": [ - "crash", - "error" - ], - "icon_color": "#0F766E", - "icon_text": "S3", - "id": "s3-crash-logs", - "name": "S3 Crash Logs", - "url": "https://s3.example.com/logs?app=${application_id}&trace=${trace_id}" - } - ] - }, - "no_geo": false, - "no_ip": true, - "status": "enabled", - "team_id": 2477033058131, - "tracing": { - "enabled": false, - "endpoint": "", - "open_type": "" - }, - "type": "browser", - "updated_at": 1773398630657, - "updated_by": 3790925372131 - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -46458,7 +46110,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RumApplicationItem" + "$ref": "#/components/schemas/PlatformEmptyObject" } }, "type": "object" @@ -46475,6 +46127,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -46482,34 +46137,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get application detail", + "summary": "Grant role to members", "tags": [ - "RUM/Applications" + "Platform/Roles & permissions" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/rum/applications/rum-application-read-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Members who already have the role are silently skipped.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/roles-permissions/role-write-grant-role", "metadata": { - "sidebarTitle": "Get application detail" + "sidebarTitle": "Grant role to members" } } } }, - "/rum/application/infos": { + "/role/member/revoke": { "post": { - "description": "Retrieve details for multiple RUM applications by their IDs in one request.", - "operationId": "rum-application-read-infos", + "description": "Remove a role from one or more members, revoking the permissions it granted.", + "operationId": "role-write-revoke-role", "requestBody": { "content": { "application/json": { "example": { - "application_ids": [ - "eWbr4xk3ZRnLabRa6unqwD", - "WoyQQ3BohkdtPivubEvE8o" - ] + "member_ids": [ + 80011 + ], + "role_id": 150 }, "schema": { - "$ref": "#/components/schemas/RumApplicationInfosRequest" + "$ref": "#/components/schemas/RoleGrantRequest" } } }, @@ -46520,88 +46175,7 @@ "content": { "application/json": { "example": { - "data": { - "items": [ - { - "account_id": 2451002751131, - "alerting": { - "channel_ids": [ - 5962711836131, - 5967875767131 - ], - "enabled": true, - "integration_id": 4759595678131 - }, - "application_id": "eWbr4xk3ZRnLabRa6unqwD", - "application_name": "Flashduty DEV", - "client_token": "ce8d1be90fc6534f89ce36ebf526765e131", - "created_at": 1742958482000, - "created_by": 2476444212131, - "is_private": false, - "links": { - "enabled": false, - "systems": [] - }, - "no_geo": false, - "no_ip": false, - "status": "enabled", - "team_id": 2477033058131, - "tracing": { - "enabled": true, - "endpoint": "https://www.tracing.com/${trace_id}", - "open_type": "popup" - }, - "type": "browser", - "updated_at": 1772096392711, - "updated_by": 3122470302131 - }, - { - "account_id": 2451002751131, - "alerting": { - "channel_ids": [ - 2490121812131 - ], - "enabled": true, - "integration_id": 4759595678131 - }, - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "application_name": "flashcat-rum", - "client_token": "a3cea433a8685a398cdfd68f54a45e06131", - "created_at": 1746673831462, - "created_by": 4441703362131, - "is_private": true, - "links": { - "enabled": true, - "systems": [ - { - "enabled": true, - "event_types": [ - "crash", - "error" - ], - "icon_color": "#0F766E", - "icon_text": "S3", - "id": "s3-crash-logs", - "name": "S3 Crash Logs", - "url": "https://s3.example.com/logs?app=${application_id}&trace=${trace_id}" - } - ] - }, - "no_geo": false, - "no_ip": true, - "status": "enabled", - "team_id": 2477033058131, - "tracing": { - "enabled": false, - "endpoint": "", - "open_type": "" - }, - "type": "browser", - "updated_at": 1773398630657, - "updated_by": 3790925372131 - } - ] - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -46612,7 +46186,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RumApplicationInfosResponse" + "$ref": "#/components/schemas/PlatformEmptyObject" } }, "type": "object" @@ -46629,6 +46203,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -46636,34 +46213,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Batch get applications", + "summary": "Revoke role from members", "tags": [ - "RUM/Applications" + "Platform/Roles & permissions" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Maximum 200 IDs per request.", - "href": "/en/api-reference/rum/applications/rum-application-read-infos", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Members who don't have the role are silently skipped.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/roles-permissions/role-write-revoke-role", "metadata": { - "sidebarTitle": "Batch get applications" + "sidebarTitle": "Revoke role from members" } } } }, - "/rum/application/list": { + "/role/permission/factor/list": { "post": { - "description": "Return a paginated list of RUM applications accessible to the current user.", - "operationId": "rum-application-read-list", + "description": "Return all permission factors (API, button, menu, URL, visit) granted to the calling member, optionally filtered by type. Requires a member-scoped credential — calls authenticated as the account principal (e.g. an account-level app key) are rejected with a 400, because the account principal implicitly holds every permission.", + "operationId": "role-read-list-permission-factor", "requestBody": { "content": { "application/json": { "example": { - "is_my_team": false, - "limit": 20, - "p": 1, - "query": "" + "factor_types": [ + "api" + ] }, "schema": { - "$ref": "#/components/schemas/RumApplicationListRequest" + "$ref": "#/components/schemas/PermissionFactorListRequest" } } }, @@ -46674,90 +46250,13 @@ "content": { "application/json": { "example": { - "data": { - "has_next_page": true, - "items": [ - { - "account_id": 2451002751131, - "alerting": { - "channel_ids": [ - 2490121812131 - ], - "enabled": true, - "integration_id": 4759595678131 - }, - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "application_name": "flashcat-rum", - "client_token": "a3cea433a8685a398cdfd68f54a45e06131", - "created_at": 1746673831462, - "created_by": 4441703362131, - "is_private": true, - "links": { - "enabled": true, - "systems": [ - { - "enabled": true, - "event_types": [ - "crash", - "error" - ], - "icon_color": "#0F766E", - "icon_text": "S3", - "id": "s3-crash-logs", - "name": "S3 Crash Logs", - "url": "https://s3.example.com/logs?app=${application_id}&trace=${trace_id}" - } - ] - }, - "no_geo": false, - "no_ip": true, - "status": "enabled", - "team_id": 2477033058131, - "tracing": { - "enabled": false, - "endpoint": "", - "open_type": "" - }, - "type": "browser", - "updated_at": 1773398630657, - "updated_by": 3790925372131 - }, - { - "account_id": 2451002751131, - "alerting": { - "channel_ids": [ - 5962711836131, - 5967875767131 - ], - "enabled": true, - "integration_id": 4759595678131 - }, - "application_id": "eWbr4xk3ZRnLabRa6unqwD", - "application_name": "Flashduty DEV", - "client_token": "ce8d1be90fc6534f89ce36ebf526765e131", - "created_at": 1742958482000, - "created_by": 2476444212131, - "is_private": false, - "links": { - "enabled": false, - "systems": [] - }, - "no_geo": false, - "no_ip": false, - "status": "enabled", - "team_id": 2477033058131, - "tracing": { - "enabled": true, - "endpoint": "https://www.tracing.com/${trace_id}", - "open_type": "popup" - }, - "type": "browser", - "updated_at": 1772096392711, - "updated_by": 3122470302131 - } - ], - "total": 7 - }, + "data": [ + { + "factor_name": "template:read:info", + "factor_type": "api", + "source": "system" + } + ], "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -46768,7 +46267,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RumApplicationListResponse" + "$ref": "#/components/schemas/PermissionFactorListResponse" } }, "type": "object" @@ -46792,31 +46291,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List applications", + "summary": "List permission factors", "tags": [ - "RUM/Applications" + "Platform/Roles & permissions" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Use `is_my_team` to filter applications belonging to the current user's teams.\n- Default page size is 20, maximum is 100.\n- `orderby` accepts `created_at` or `updated_at`.", - "href": "/en/api-reference/rum/applications/rum-application-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — but the credential must belong to a member; account-principal credentials (e.g. an account-level app key) are rejected with a 400 |\n\n## Usage\n\n- Permission factors are the fine-grained controls that make up each permission.\n- `factor_types` accepts: `api`, `button`, `visit`, `menu`, `url`.", + "href": "/en/api-reference/platform/roles-permissions/role-read-list-permission-factor", "metadata": { - "sidebarTitle": "List applications" + "sidebarTitle": "List permission factors" } } } }, - "/rum/application/remote-config/get": { + "/role/permission/list": { "post": { - "description": "Retrieve the live remote configuration of a RUM application and the version it is stored under.", - "operationId": "rum-application-remote-config-read-get", + "description": "Return all available permissions, optionally filtered to those granted to specific roles.", + "operationId": "role-read-list-permission", "requestBody": { "content": { "application/json": { "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o" + "role_ids": [ + 150 + ], + "with_all": true }, "schema": { - "$ref": "#/components/schemas/GetRemoteConfigRequest" + "$ref": "#/components/schemas/RolePermissionListRequest" } } }, @@ -46828,36 +46330,19 @@ "application/json": { "example": { "data": { - "config": { - "activation": "next_session", - "custom": { - "feature_flags": { - "checkout_v2": true - } - }, - "default": { - "defaultPrivacyLevel": "mask-user-input", - "sessionReplaySampleRate": 20, - "sessionSampleRate": 100, - "traceSampleRate": 100 - }, - "enabled": true, - "refresh_on_foreground": false, - "rules": [ - { - "match": { - "env": "production" - }, - "set": { - "defaultPrivacyLevel": "mask", - "sessionReplaySampleRate": 0, - "sessionSampleRate": 5 - } - } - ] - }, - "updated_at": 1773398630657, - "version": 7 + "items": [ + { + "class": "On-call", + "description": "View notification templates", + "id": 501, + "is_granted": true, + "permission_name": "Templates Read", + "permission_type": "read", + "scope": "on-call", + "source": "system", + "status": "enabled" + } + ] }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -46869,7 +46354,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/GetRemoteConfigResponse" + "$ref": "#/components/schemas/RolePermissionListResponse" } }, "type": "object" @@ -46893,35 +46378,36 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get remote config detail", + "summary": "List permissions", "tags": [ - "RUM/Applications" + "Platform/Roles & permissions" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Version `0` means the application has never been configured; SDKs then run entirely on their init values.\n- A change reaches a client when its next session starts unless activation is set to `immediate`.", - "href": "/en/api-reference/rum/applications/rum-application-remote-config-read-get", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Pass `role_ids` to filter permissions to those granted to those roles.\n- Pass `with_all: true` to include all permissions regardless of role filter, with `is_granted` set to indicate which are granted to the specified roles.", + "href": "/en/api-reference/platform/roles-permissions/role-read-list-permission", "metadata": { - "sidebarTitle": "Get remote config detail" + "sidebarTitle": "List permissions" } } } }, - "/rum/application/remote-config/history/list": { + "/role/upsert": { "post": { - "description": "List published remote configuration versions of a RUM application.", - "operationId": "rum-application-remote-config-read-history-list", + "description": "Create a new custom role or update an existing one. Pass `role_id` to update.", + "operationId": "role-write-upsert", "requestBody": { "content": { "application/json": { "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "asc": false, - "limit": 20, - "orderby": "updated_at", - "p": 0 + "description": "Manage on-call rotations and incidents.", + "permission_ids": [ + 501, + 502 + ], + "role_name": "On-call Manager" }, "schema": { - "$ref": "#/components/schemas/ListRemoteConfigHistoryRequest" + "$ref": "#/components/schemas/RoleUpsertRequest" } } }, @@ -46933,82 +46419,8 @@ "application/json": { "example": { "data": { - "has_next_page": false, - "items": [ - { - "config": { - "activation": "next_session", - "custom": { - "feature_flags": { - "checkout_v2": true - } - }, - "default": { - "defaultPrivacyLevel": "mask-user-input", - "sessionReplaySampleRate": 20, - "sessionSampleRate": 100, - "traceSampleRate": 100 - }, - "enabled": true, - "refresh_on_foreground": false, - "rules": [ - { - "match": { - "env": "production" - }, - "set": { - "defaultPrivacyLevel": "mask", - "sessionReplaySampleRate": 0, - "sessionSampleRate": 5 - } - } - ] - }, - "content_hash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - "reason": "Tighten replay sampling for the Q4 launch", - "updated_at": 1773398630657, - "updated_by": 4441703362131, - "updated_by_name": "Alice Zhang", - "version": 8 - }, - { - "config": { - "activation": "next_session", - "custom": { - "feature_flags": { - "checkout_v2": true - } - }, - "default": { - "defaultPrivacyLevel": "mask-user-input", - "sessionReplaySampleRate": 20, - "sessionSampleRate": 100, - "traceSampleRate": 100 - }, - "enabled": true, - "refresh_on_foreground": false, - "rules": [ - { - "match": { - "env": "production" - }, - "set": { - "defaultPrivacyLevel": "mask", - "sessionReplaySampleRate": 0, - "sessionSampleRate": 5 - } - } - ] - }, - "content_hash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - "reason": "", - "updated_at": 1772398630657, - "updated_by": 4441703362131, - "updated_by_name": "Alice Zhang", - "version": 7 - } - ], - "total": 3 + "role_id": 150, + "role_name": "On-call Manager" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -47020,7 +46432,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ListRemoteConfigHistoryResponse" + "$ref": "#/components/schemas/RoleUpsertResponse" } }, "type": "object" @@ -47037,6 +46449,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -47044,33 +46459,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List remote config history", + "summary": "Create or update a role", "tags": [ - "RUM/Applications" + "Platform/Roles & permissions" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Newest first by default (`orderby=updated_at`, `asc=false`).\n- `content_hash` and `equivalent_to` identify versions whose content is identical, so the console can say \"this is an earlier version's content\" instead of showing a false difference.", - "href": "/en/api-reference/rum/applications/rum-application-remote-config-read-history-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Omit `role_id` (or set to 0) to create; pass an existing ID to update.\n- `role_name` must be 1–39 characters and unique within the account.\n- `permission_ids` sets the full permission set for the role, replacing any previous assignment.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/roles-permissions/role-write-upsert", "metadata": { - "sidebarTitle": "List remote config history" + "sidebarTitle": "Create or update a role" } } } }, - "/rum/application/remote-config/history/revert": { + "/route/info": { "post": { - "description": "Republish an earlier remote configuration version's content as a new version.", - "operationId": "rum-application-remote-config-write-history-revert", + "description": "Retrieve the routing rule configuration for a specific integration. Returns null when the integration has no routing rule configured.", + "operationId": "routeInfo", "requestBody": { "content": { "application/json": { "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "reason": "Rolled back after the Q4 launch incident", - "version": 7 + "integration_id": 6113996590131 }, "schema": { - "$ref": "#/components/schemas/RevertRemoteConfigRequest" + "$ref": "#/components/schemas/RouteInfoRequest" } } }, @@ -47082,7 +46495,51 @@ "application/json": { "example": { "data": { - "version": 9 + "cases": [ + { + "channel_ids": [ + 2533748993131 + ], + "fallthrough": false, + "if": [ + { + "key": "labels.check", + "oper": "IN", + "vals": [ + "cpu.idle<20%" + ] + } + ], + "routing_mode": "standard" + }, + { + "channel_ids": null, + "fallthrough": false, + "if": [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Warning" + ] + } + ], + "name_mapping_label": "labels.service", + "routing_mode": "name_mapping" + } + ], + "created_at": 1774606136, + "creator_id": 3790925372131, + "default": { + "channel_ids": [ + 3521074710131 + ] + }, + "integration_id": 6113996590131, + "status": "enabled", + "updated_at": 1774606136, + "updated_by": 3790925372131, + "version": 6 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -47094,7 +46551,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RevertRemoteConfigResponse" + "$ref": "#/components/schemas/RouteItem" } }, "type": "object" @@ -47118,34 +46575,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Revert remote config", + "summary": "Get routing rule detail", "tags": [ - "RUM/Applications" + "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- History is never rewritten: the revert publishes the earlier version's content under a NEW version number.\n- An empty `reason` is filled in by the console as `rolled back to vN`.", - "href": "/en/api-reference/rum/applications/rum-application-remote-config-write-history-revert", + "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`) or **Integrations Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/route-info", "metadata": { - "sidebarTitle": "Revert remote config" + "sidebarTitle": "Get routing rule detail" } } } }, - "/rum/application/remote-config/preview": { + "/route/list": { "post": { - "description": "Evaluate a draft remote configuration against a client context without publishing it.", - "operationId": "rum-application-remote-config-read-preview", + "description": "Return routing rules for the specified integrations. Integrations without a configured rule are omitted from the response.", + "operationId": "routeList", "requestBody": { "content": { "application/json": { "example": { - "app_version": "2.14.3", - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "env": "production", - "sdk": "web@2.4.1" + "integration_ids": [ + 6113996590131, + 6113996590132 + ] }, "schema": { - "$ref": "#/components/schemas/PreviewRemoteConfigRequest" + "$ref": "#/components/schemas/ListRoutesRequest" } } }, @@ -47157,12 +46614,40 @@ "application/json": { "example": { "data": { - "hit_rule_index": 0, - "values": { - "defaultPrivacyLevel": "mask", - "sessionReplaySampleRate": 0, - "sessionSampleRate": 5 - } + "items": [ + { + "cases": [ + { + "channel_ids": [ + 2533748993131 + ], + "fallthrough": false, + "if": [ + { + "key": "labels.check", + "oper": "IN", + "vals": [ + "cpu.idle<20%" + ] + } + ], + "routing_mode": "standard" + } + ], + "created_at": 1774606136, + "creator_id": 3790925372131, + "default": { + "channel_ids": [ + 3521074710131 + ] + }, + "integration_id": 6113996590131, + "status": "enabled", + "updated_at": 1774606136, + "updated_by": 3790925372131, + "version": 6 + } + ] }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -47174,7 +46659,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/PreviewRemoteConfigResponse" + "$ref": "#/components/schemas/ListRoutesResponse" } }, "type": "object" @@ -47198,60 +46683,54 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Preview remote config", + "summary": "List routing rules", "tags": [ - "RUM/Applications" + "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Runs the same matcher as the engine, so the result matches what production clients receive.\n- Omit `config` to preview the currently live configuration.", - "href": "/en/api-reference/rum/applications/rum-application-remote-config-read-preview", + "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`) or **Integrations Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/route-list", "metadata": { - "sidebarTitle": "Preview remote config" + "sidebarTitle": "List routing rules" } } } }, - "/rum/application/remote-config/update": { + "/route/upsert": { "post": { - "description": "Publish a complete new remote configuration version for a RUM application.", - "operationId": "rum-application-remote-config-write-update", + "description": "Create or update routing rules for an integration to direct alerts to specific channels. At least one of `cases` or `default` must be provided.", + "operationId": "routeUpsert", "requestBody": { "content": { "application/json": { "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "config": { - "activation": "next_session", - "custom": { - "feature_flags": { - "checkout_v2": true - } - }, - "default": { - "defaultPrivacyLevel": "mask-user-input", - "sessionReplaySampleRate": 20, - "sessionSampleRate": 100, - "traceSampleRate": 100 - }, - "enabled": true, - "refresh_on_foreground": false, - "rules": [ - { - "match": { - "env": "production" - }, - "set": { - "defaultPrivacyLevel": "mask", - "sessionReplaySampleRate": 0, - "sessionSampleRate": 5 + "cases": [ + { + "channel_ids": [ + 3521074710131 + ], + "fallthrough": false, + "if": [ + { + "key": "severity", + "oper": "IN", + "vals": [ + "Critical" + ] } - } + ], + "routing_mode": "standard" + } + ], + "default": { + "channel_ids": [ + 3521074710131 ] }, - "reason": "Tighten replay sampling for the Q4 launch" + "integration_id": 6113996590131 }, "schema": { - "$ref": "#/components/schemas/UpdateRemoteConfigRequest" + "$ref": "#/components/schemas/UpsertRouteRequest" } } }, @@ -47262,9 +46741,7 @@ "content": { "application/json": { "example": { - "data": { - "version": 8 - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -47275,7 +46752,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UpdateRemoteConfigResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -47299,35 +46776,29 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update remote config", + "summary": "Upsert routing rule", "tags": [ - "RUM/Applications" + "On-call/Channels" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- The client sends the complete object, not a patch: rule order is the priority, so a partial update has no unambiguous interpretation.\n- Each call allocates a new version and records a history row in the same transaction as the write.\n- Call `POST /rum/application/remote-config/preview` first to check what clients would receive.", - "href": "/en/api-reference/rum/applications/rum-application-remote-config-write-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/channels/route-upsert", "metadata": { - "sidebarTitle": "Update remote config" + "sidebarTitle": "Upsert routing rule" } } } }, - "/rum/application/update": { + "/rum/application/create": { "post": { - "description": "Update an existing RUM application. All fields except `application_id` are optional — only provided fields are updated.", - "operationId": "rum-application-write-update", + "description": "Create a new RUM application. Returns the generated `application_id` and `client_token`.", + "operationId": "rum-application-write-create", "requestBody": { "content": { "application/json": { "example": { - "alerting": { - "channel_ids": [ - 2490121812131 - ], - "enabled": true - }, - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "application_name": "My Web App v2", + "application_name": "My Web App", + "is_private": false, "links": { "enabled": true, "systems": [ @@ -47344,10 +46815,12 @@ "url": "https://s3.example.com/logs?app=${application_id}&trace=${trace_id}" } ] - } + }, + "team_id": 2477033058131, + "type": "browser" }, "schema": { - "$ref": "#/components/schemas/RumApplicationUpdateRequest" + "$ref": "#/components/schemas/RumApplicationCreateRequest" } } }, @@ -47358,7 +46831,11 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "application_id": "qLpu24Dz4CAzWsESPbJYWA", + "application_name": "My Web App", + "client_token": "e090078724855a4ca168c3884880dfbc131" + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -47369,7 +46846,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/RumApplicationCreateResponse" } }, "type": "object" @@ -47393,32 +46870,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update application", + "summary": "Create application", "tags": [ "RUM/Applications" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- `links.systems[].url` must start with `http` or `https`; `${var}` tokens are resolved from RUM event context.\n- `links.systems[].event_types` accepts: `crash`, `error`, `view`, `action`, `resource`, `session`, `all`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/applications/rum-application-write-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- `type` must be one of: `browser`, `ios`, `android`, `react-native`, `flutter`, `kotlin-multiplatform`, `roku`, `unity`, `miniprogram`, `harmony`, `electron`.\n- `links.systems[].url` must start with `http` or `https`; `${var}` tokens are resolved from RUM event context.\n- `links.systems[].event_types` accepts: `crash`, `error`, `view`, `action`, `resource`, `session`, `all`.\n- `client_token` is auto-generated and used to initialize the RUM SDK.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/applications/rum-application-write-create", "metadata": { - "sidebarTitle": "Update application" + "sidebarTitle": "Create application" } } } }, - "/rum/application/webhook/test": { + "/rum/application/delete": { "post": { - "description": "Send a sample RUM alert event to verify an application's webhook URL.", - "operationId": "rum-application-webhook-test", + "description": "Delete a RUM application by `application_id`.", + "operationId": "rum-application-write-delete", "requestBody": { "content": { "application/json": { "example": { - "application_id": "rum-app-prod", - "webhook_url": "https://hooks.example.com/rum-alerts" + "application_id": "qLpu24Dz4CAzWsESPbJYWA" }, "schema": { - "$ref": "#/components/schemas/RumWebhookTestRequest" + "$ref": "#/components/schemas/RumApplicationIDRequest" } } }, @@ -47429,11 +46905,7 @@ "content": { "application/json": { "example": { - "data": { - "message": "ok", - "ok": true, - "status_code": 200 - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -47444,7 +46916,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RumWebhookTestResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -47461,9 +46933,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -47471,40 +46940,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Test application webhook", + "summary": "Delete application", "tags": [ "RUM/Applications" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- The endpoint validates the URL before sending the sample event.\n- A failed delivery still returns HTTP 200 with `ok=false` and the delivery error in `message`.", - "href": "/en/api-reference/rum/applications/rum-application-webhook-test", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/applications/rum-application-write-delete", "metadata": { - "sidebarTitle": "Test application webhook" + "sidebarTitle": "Delete application" } } } }, - "/rum/data/query": { + "/rum/application/info": { "post": { - "description": "Run one or more SQL-style RUM data queries over a bounded time range.", - "operationId": "rum-read-data-query", + "description": "Retrieve full details of a single RUM application by `application_id`.", + "operationId": "rum-application-read-info", "requestBody": { "content": { "application/json": { "example": { - "end_time": 1712707200000, - "queries": [ - { - "format": "table", - "id": "errors_by_type", - "sql": "SELECT error.type, count(*) AS errors FROM error GROUP BY error.type ORDER BY errors DESC LIMIT 10", - "time_zone": "Asia/Shanghai" - } - ], - "start_time": 1712620800000 + "application_id": "WoyQQ3BohkdtPivubEvE8o" }, "schema": { - "$ref": "#/components/schemas/RumDataQueryRequest" + "$ref": "#/components/schemas/RumApplicationIDRequest" } } }, @@ -47516,32 +46976,49 @@ "application/json": { "example": { "data": { - "errors_by_type": { - "data": { - "fields": [ - { - "name": "error.type", - "nullable": false, - "type": "String" - }, - { - "name": "errors", - "nullable": false, - "type": "UInt64" - } - ], - "values": [ - [ - "TypeError", - 1523 + "account_id": 2451002751131, + "alerting": { + "channel_ids": [ + 2490121812131 + ], + "enabled": true, + "integration_id": 4759595678131 + }, + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "application_name": "flashcat-rum", + "client_token": "a3cea433a8685a398cdfd68f54a45e06131", + "created_at": 1746673831462, + "created_by": 4441703362131, + "is_private": true, + "links": { + "enabled": true, + "systems": [ + { + "enabled": true, + "event_types": [ + "crash", + "error" ], - [ - "ReferenceError", - 342 - ] - ] - } - } + "icon_color": "#0F766E", + "icon_text": "S3", + "id": "s3-crash-logs", + "name": "S3 Crash Logs", + "url": "https://s3.example.com/logs?app=${application_id}&trace=${trace_id}" + } + ] + }, + "no_geo": false, + "no_ip": true, + "status": "enabled", + "team_id": 2477033058131, + "tracing": { + "enabled": false, + "endpoint": "", + "open_type": "" + }, + "type": "browser", + "updated_at": 1773398630657, + "updated_by": 3790925372131 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -47553,7 +47030,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RumDataQueryResponse" + "$ref": "#/components/schemas/RumApplicationItem" } }, "type": "object" @@ -47577,61 +47054,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Query RUM data", + "summary": "Get application detail", "tags": [ - "RUM/Data query" + "RUM/Applications" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Send 1 to 10 queries in one request; each query `id` becomes a key in the response object.\n- `start_time` and `end_time` are required Unix epoch milliseconds. The maximum time range is 31 days.\n- Use `format: table` for tabular results, or `format: time_series` for bucketed time-series results.\n- For `time_series`, `interval` defaults to 3600 seconds and `max_points` defaults to 1226 when omitted.\n- `search_after_ctx` is returned by paginated table queries and can be sent back to continue scanning.", - "href": "/en/api-reference/rum/data-query/rum-read-data-query", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/rum/applications/rum-application-read-info", "metadata": { - "sidebarTitle": "Query RUM data" + "sidebarTitle": "Get application detail" } } } }, - "/rum/error-ingestion/rules/create": { + "/rum/application/infos": { "post": { - "description": "Create a new error ingestion rule that filters which errors are stored.", - "operationId": "rum-error-ingestion-rules-create", + "description": "Retrieve details for multiple RUM applications by their IDs in one request.", + "operationId": "rum-application-read-infos", "requestBody": { "content": { "application/json": { "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "description": "Only ingest TypeError/ReferenceError from production, excluding Safari.", - "filters": [ - [ - { - "key": "error.env", - "oper": "IN", - "vals": [ - "production" - ] - }, - { - "key": "error.error_type", - "oper": "IN", - "vals": [ - "TypeError", - "ReferenceError" - ] - } - ], - [ - { - "key": "error.browser_name", - "oper": "NOTIN", - "vals": [ - "Safari" - ] - } - ] - ], - "rule_name": "Production console errors" + "application_ids": [ + "eWbr4xk3ZRnLabRa6unqwD", + "WoyQQ3BohkdtPivubEvE8o" + ] }, "schema": { - "$ref": "#/components/schemas/RumErrorIngestionCreateRequest" + "$ref": "#/components/schemas/RumApplicationInfosRequest" } } }, @@ -47643,80 +47093,87 @@ "application/json": { "example": { "data": { - "rule_id": "9spXEVoMeZWujjz25yrgTe", - "rule_name": "Production console errors" - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/RumErrorIngestionCreateResponse" - } - }, - "type": "object" - } - ] - } - } - }, - "description": "Success" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "summary": "Create an error ingestion rule", - "tags": [ - "RUM/Error ingestion rules" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Create, update, enable, disable, and delete all snapshot the application's full current rule set into history first, so `history/list` reflects every mutation.\n- Every condition key in `filters` must be one of the supported `error.*` fields or a `context.*` path; unsupported keys are rejected with `InvalidParameter`.\n- New rules are created with status `enabled`; call `disable` afterward if the rule should start inactive.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-create", - "metadata": { - "sidebarTitle": "Create an error ingestion rule" - } - } - } - }, - "/rum/error-ingestion/rules/delete": { - "post": { - "description": "Delete an error ingestion rule from a RUM application.", - "operationId": "rum-error-ingestion-rules-delete", - "requestBody": { - "content": { - "application/json": { - "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "rule_id": "9spXEVoMeZWujjz25yrgTe" - }, - "schema": { - "$ref": "#/components/schemas/RumErrorIngestionRuleIDRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "data": {}, + "items": [ + { + "account_id": 2451002751131, + "alerting": { + "channel_ids": [ + 5962711836131, + 5967875767131 + ], + "enabled": true, + "integration_id": 4759595678131 + }, + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "client_token": "ce8d1be90fc6534f89ce36ebf526765e131", + "created_at": 1742958482000, + "created_by": 2476444212131, + "is_private": false, + "links": { + "enabled": false, + "systems": [] + }, + "no_geo": false, + "no_ip": false, + "status": "enabled", + "team_id": 2477033058131, + "tracing": { + "enabled": true, + "endpoint": "https://www.tracing.com/${trace_id}", + "open_type": "popup" + }, + "type": "browser", + "updated_at": 1772096392711, + "updated_by": 3122470302131 + }, + { + "account_id": 2451002751131, + "alerting": { + "channel_ids": [ + 2490121812131 + ], + "enabled": true, + "integration_id": 4759595678131 + }, + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "application_name": "flashcat-rum", + "client_token": "a3cea433a8685a398cdfd68f54a45e06131", + "created_at": 1746673831462, + "created_by": 4441703362131, + "is_private": true, + "links": { + "enabled": true, + "systems": [ + { + "enabled": true, + "event_types": [ + "crash", + "error" + ], + "icon_color": "#0F766E", + "icon_text": "S3", + "id": "s3-crash-logs", + "name": "S3 Crash Logs", + "url": "https://s3.example.com/logs?app=${application_id}&trace=${trace_id}" + } + ] + }, + "no_geo": false, + "no_ip": true, + "status": "enabled", + "team_id": 2477033058131, + "tracing": { + "enabled": false, + "endpoint": "", + "open_type": "" + }, + "type": "browser", + "updated_at": 1773398630657, + "updated_by": 3790925372131 + } + ] + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -47727,7 +47184,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" + "$ref": "#/components/schemas/RumApplicationInfosResponse" } }, "type": "object" @@ -47751,32 +47208,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete an error ingestion rule", + "summary": "Batch get applications", "tags": [ - "RUM/Error ingestion rules" + "RUM/Applications" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The rule disappears from `list` immediately, but the enabled-rule set used for filtering is cached for up to 5 seconds, so errors ingested shortly after deletion can still be matched against it.\n- Returns `ResourceNotFound` if `rule_id` doesn't exist under `application_id`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Maximum 200 IDs per request.", + "href": "/en/api-reference/rum/applications/rum-application-read-infos", "metadata": { - "sidebarTitle": "Delete an error ingestion rule" + "sidebarTitle": "Batch get applications" } } } }, - "/rum/error-ingestion/rules/disable": { + "/rum/application/list": { "post": { - "description": "Disable an error ingestion rule without deleting it.", - "operationId": "rum-error-ingestion-rules-disable", + "description": "Return a paginated list of RUM applications accessible to the current user.", + "operationId": "rum-application-read-list", "requestBody": { "content": { "application/json": { "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "rule_id": "9spXEVoMeZWujjz25yrgTe" + "is_my_team": false, + "limit": 20, + "p": 1, + "query": "" }, "schema": { - "$ref": "#/components/schemas/RumErrorIngestionRuleIDRequest" + "$ref": "#/components/schemas/RumApplicationListRequest" } } }, @@ -47787,7 +47246,90 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "has_next_page": true, + "items": [ + { + "account_id": 2451002751131, + "alerting": { + "channel_ids": [ + 2490121812131 + ], + "enabled": true, + "integration_id": 4759595678131 + }, + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "application_name": "flashcat-rum", + "client_token": "a3cea433a8685a398cdfd68f54a45e06131", + "created_at": 1746673831462, + "created_by": 4441703362131, + "is_private": true, + "links": { + "enabled": true, + "systems": [ + { + "enabled": true, + "event_types": [ + "crash", + "error" + ], + "icon_color": "#0F766E", + "icon_text": "S3", + "id": "s3-crash-logs", + "name": "S3 Crash Logs", + "url": "https://s3.example.com/logs?app=${application_id}&trace=${trace_id}" + } + ] + }, + "no_geo": false, + "no_ip": true, + "status": "enabled", + "team_id": 2477033058131, + "tracing": { + "enabled": false, + "endpoint": "", + "open_type": "" + }, + "type": "browser", + "updated_at": 1773398630657, + "updated_by": 3790925372131 + }, + { + "account_id": 2451002751131, + "alerting": { + "channel_ids": [ + 5962711836131, + 5967875767131 + ], + "enabled": true, + "integration_id": 4759595678131 + }, + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "client_token": "ce8d1be90fc6534f89ce36ebf526765e131", + "created_at": 1742958482000, + "created_by": 2476444212131, + "is_private": false, + "links": { + "enabled": false, + "systems": [] + }, + "no_geo": false, + "no_ip": false, + "status": "enabled", + "team_id": 2477033058131, + "tracing": { + "enabled": true, + "endpoint": "https://www.tracing.com/${trace_id}", + "open_type": "popup" + }, + "type": "browser", + "updated_at": 1772096392711, + "updated_by": 3122470302131 + } + ], + "total": 7 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -47798,7 +47340,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" + "$ref": "#/components/schemas/RumApplicationListResponse" } }, "type": "object" @@ -47822,32 +47364,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Disable an error ingestion rule", + "summary": "List applications", "tags": [ - "RUM/Error ingestion rules" + "RUM/Applications" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- A disabled rule is kept and still returned by `list`, but is skipped when matching incoming errors.\n- Returns `ResourceNotFound` if `rule_id` doesn't exist under `application_id`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-disable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Use `is_my_team` to filter applications belonging to the current user's teams.\n- Default page size is 20, maximum is 100.\n- `orderby` accepts `created_at` or `updated_at`.", + "href": "/en/api-reference/rum/applications/rum-application-read-list", "metadata": { - "sidebarTitle": "Disable an error ingestion rule" + "sidebarTitle": "List applications" } } } }, - "/rum/error-ingestion/rules/enable": { + "/rum/application/remote-config/get": { "post": { - "description": "Re-enable a previously disabled error ingestion rule.", - "operationId": "rum-error-ingestion-rules-enable", + "description": "Retrieve the live remote configuration of a RUM application and the version it is stored under.", + "operationId": "rum-application-remote-config-read-get", "requestBody": { "content": { "application/json": { "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "rule_id": "9spXEVoMeZWujjz25yrgTe" + "application_id": "WoyQQ3BohkdtPivubEvE8o" }, "schema": { - "$ref": "#/components/schemas/RumErrorIngestionRuleIDRequest" + "$ref": "#/components/schemas/GetRemoteConfigRequest" } } }, @@ -47858,18 +47399,49 @@ "content": { "application/json": { "example": { - "data": {}, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { + "data": { + "config": { + "activation": "next_session", + "custom": { + "feature_flags": { + "checkout_v2": true + } + }, + "default": { + "defaultPrivacyLevel": "mask-user-input", + "sessionReplaySampleRate": 20, + "sessionSampleRate": 100, + "traceSampleRate": 100 + }, + "enabled": true, + "refresh_on_foreground": false, + "rules": [ + { + "match": { + "env": "production" + }, + "set": { + "defaultPrivacyLevel": "mask", + "sessionReplaySampleRate": 0, + "sessionSampleRate": 5 + } + } + ] + }, + "updated_at": 1773398630657, + "version": 7 + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { "properties": { "data": { - "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" + "$ref": "#/components/schemas/GetRemoteConfigResponse" } }, "type": "object" @@ -47893,23 +47465,23 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Enable an error ingestion rule", + "summary": "Get remote config detail", "tags": [ - "RUM/Error ingestion rules" + "RUM/Applications" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `ResourceNotFound` if `rule_id` doesn't exist under `application_id`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-enable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Version `0` means the application has never been configured; SDKs then run entirely on their init values.\n- A change reaches a client when its next session starts unless activation is set to `immediate`.", + "href": "/en/api-reference/rum/applications/rum-application-remote-config-read-get", "metadata": { - "sidebarTitle": "Enable an error ingestion rule" + "sidebarTitle": "Get remote config detail" } } } }, - "/rum/error-ingestion/rules/history/list": { + "/rum/application/remote-config/history/list": { "post": { - "description": "Return paginated snapshots of an application's error ingestion rule history.", - "operationId": "rum-error-ingestion-rules-history-list", + "description": "List published remote configuration versions of a RUM application.", + "operationId": "rum-application-remote-config-read-history-list", "requestBody": { "content": { "application/json": { @@ -47921,7 +47493,7 @@ "p": 0 }, "schema": { - "$ref": "#/components/schemas/RumErrorIngestionHistoryListRequest" + "$ref": "#/components/schemas/ListRemoteConfigHistoryRequest" } } }, @@ -47936,64 +47508,79 @@ "has_next_page": false, "items": [ { - "rules": [ - { - "account_id": 20001, - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "created_at": 1786000000000, - "created_by": 1001, - "deleted_at": 0, - "description": "Only ingest TypeError/ReferenceError from production, excluding Safari.", - "filters": [ - [ - { - "key": "error.env", - "oper": "IN", - "vals": [ - "production" - ] - }, - { - "key": "error.error_type", - "oper": "IN", - "vals": [ - "TypeError", - "ReferenceError" - ] - } - ], - [ - { - "key": "error.browser_name", - "oper": "NOTIN", - "vals": [ - "Safari" - ] - } - ] - ], - "id": 1044, - "rule_id": "9spXEVoMeZWujjz25yrgTe", - "rule_name": "Production console errors", - "status": "enabled", - "updated_at": 1786000000000, - "updated_by": 1001 - } - ], - "updated_at": 1786003600000, - "updated_by": 1001, - "updated_by_name": "Alice Chen", - "version": 2 + "config": { + "activation": "next_session", + "custom": { + "feature_flags": { + "checkout_v2": true + } + }, + "default": { + "defaultPrivacyLevel": "mask-user-input", + "sessionReplaySampleRate": 20, + "sessionSampleRate": 100, + "traceSampleRate": 100 + }, + "enabled": true, + "refresh_on_foreground": false, + "rules": [ + { + "match": { + "env": "production" + }, + "set": { + "defaultPrivacyLevel": "mask", + "sessionReplaySampleRate": 0, + "sessionSampleRate": 5 + } + } + ] + }, + "content_hash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", + "reason": "Tighten replay sampling for the Q4 launch", + "updated_at": 1773398630657, + "updated_by": 4441703362131, + "updated_by_name": "Alice Zhang", + "version": 8 }, { - "rules": [], - "updated_at": 1786000000000, - "updated_by": 1001, - "updated_by_name": "Alice Chen", - "version": 1 + "config": { + "activation": "next_session", + "custom": { + "feature_flags": { + "checkout_v2": true + } + }, + "default": { + "defaultPrivacyLevel": "mask-user-input", + "sessionReplaySampleRate": 20, + "sessionSampleRate": 100, + "traceSampleRate": 100 + }, + "enabled": true, + "refresh_on_foreground": false, + "rules": [ + { + "match": { + "env": "production" + }, + "set": { + "defaultPrivacyLevel": "mask", + "sessionReplaySampleRate": 0, + "sessionSampleRate": 5 + } + } + ] + }, + "content_hash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", + "reason": "", + "updated_at": 1772398630657, + "updated_by": 4441703362131, + "updated_by_name": "Alice Zhang", + "version": 7 } ], - "total": 2 + "total": 3 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -48005,7 +47592,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RumErrorIngestionHistoryListResponse" + "$ref": "#/components/schemas/ListRemoteConfigHistoryResponse" } }, "type": "object" @@ -48029,32 +47616,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List error ingestion rule history", + "summary": "List remote config history", "tags": [ - "RUM/Error ingestion rules" + "RUM/Applications" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- One history item is a full snapshot of every rule for the application at that point in time, not a diff of a single rule.\n- `p` is a zero-based page number, not a byte offset — the server computes `offset = p * limit` internally.\n- `orderby` accepts `updated_at` or `version`; any other value silently falls back to `updated_at`.\n- `limit` defaults to 20 and is capped at 100 server-side; values above 100 are silently clamped, values of 0 or below fall back to the default.", - "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-history-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Newest first by default (`orderby=updated_at`, `asc=false`).\n- `content_hash` and `equivalent_to` identify versions whose content is identical, so the console can say \"this is an earlier version's content\" instead of showing a false difference.", + "href": "/en/api-reference/rum/applications/rum-application-remote-config-read-history-list", "metadata": { - "sidebarTitle": "List error ingestion rule history" + "sidebarTitle": "List remote config history" } } } }, - "/rum/error-ingestion/rules/history/revert": { + "/rum/application/remote-config/history/revert": { "post": { - "description": "Restore an application's entire rule set to a prior history version.", - "operationId": "rum-error-ingestion-rules-history-revert", + "description": "Republish an earlier remote configuration version's content as a new version.", + "operationId": "rum-application-remote-config-write-history-revert", "requestBody": { "content": { "application/json": { "example": { "application_id": "WoyQQ3BohkdtPivubEvE8o", - "version": 2 + "reason": "Rolled back after the Q4 launch incident", + "version": 7 }, "schema": { - "$ref": "#/components/schemas/RumErrorIngestionRevertRequest" + "$ref": "#/components/schemas/RevertRemoteConfigRequest" } } }, @@ -48065,7 +47653,9 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "version": 9 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -48076,7 +47666,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" + "$ref": "#/components/schemas/RevertRemoteConfigResponse" } }, "type": "object" @@ -48100,31 +47690,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Revert error ingestion rules to a history version", + "summary": "Revert remote config", "tags": [ - "RUM/Error ingestion rules" + "RUM/Applications" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Revert replaces the entire rule set for the application — rules created after the target version are removed, not merged.\n- The current state is snapshotted into history before the revert runs, so a revert can itself be undone by reverting again.\n- Returns `InvalidParameter` (not `ResourceNotFound`) when `version` doesn't exist for the application.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-history-revert", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- History is never rewritten: the revert publishes the earlier version's content under a NEW version number.\n- An empty `reason` is filled in by the console as `rolled back to vN`.", + "href": "/en/api-reference/rum/applications/rum-application-remote-config-write-history-revert", "metadata": { - "sidebarTitle": "Revert error ingestion rules to a history version" + "sidebarTitle": "Revert remote config" } } } }, - "/rum/error-ingestion/rules/list": { + "/rum/application/remote-config/preview": { "post": { - "description": "Return every error ingestion rule configured for a RUM application.", - "operationId": "rum-error-ingestion-rules-list", + "description": "Evaluate a draft remote configuration against a client context without publishing it.", + "operationId": "rum-application-remote-config-read-preview", "requestBody": { "content": { "application/json": { "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o" + "app_version": "2.14.3", + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "env": "production", + "sdk": "web@2.4.1" }, "schema": { - "$ref": "#/components/schemas/RumErrorIngestionListRequest" + "$ref": "#/components/schemas/PreviewRemoteConfigRequest" } } }, @@ -48136,44 +47729,12 @@ "application/json": { "example": { "data": { - "items": [ - { - "created_at": 1786000000000, - "description": "Only ingest TypeError/ReferenceError from production, excluding Safari.", - "filters": [ - [ - { - "key": "error.env", - "oper": "IN", - "vals": [ - "production" - ] - }, - { - "key": "error.error_type", - "oper": "IN", - "vals": [ - "TypeError", - "ReferenceError" - ] - } - ], - [ - { - "key": "error.browser_name", - "oper": "NOTIN", - "vals": [ - "Safari" - ] - } - ] - ], - "rule_id": "9spXEVoMeZWujjz25yrgTe", - "rule_name": "Production console errors", - "status": "enabled", - "updated_at": 1786003600000 - } - ] + "hit_rule_index": 0, + "values": { + "defaultPrivacyLevel": "mask", + "sessionReplaySampleRate": 0, + "sessionSampleRate": 5 + } }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -48185,7 +47746,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RumErrorIngestionListResponse" + "$ref": "#/components/schemas/PreviewRemoteConfigResponse" } }, "type": "object" @@ -48209,33 +47770,60 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List error ingestion rules", + "summary": "Preview remote config", "tags": [ - "RUM/Error ingestion rules" + "RUM/Applications" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Deleted rules are excluded; only rules with status `enabled` or `disabled` are returned.\n- Rules are ordered newest-created first.", - "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Runs the same matcher as the engine, so the result matches what production clients receive.\n- Omit `config` to preview the currently live configuration.", + "href": "/en/api-reference/rum/applications/rum-application-remote-config-read-preview", "metadata": { - "sidebarTitle": "List error ingestion rules" + "sidebarTitle": "Preview remote config" } } } }, - "/rum/error-ingestion/rules/update": { + "/rum/application/remote-config/update": { "post": { - "description": "Update the name, description, or filters of an error ingestion rule.", - "operationId": "rum-error-ingestion-rules-update", + "description": "Publish a complete new remote configuration version for a RUM application.", + "operationId": "rum-application-remote-config-write-update", "requestBody": { "content": { "application/json": { "example": { "application_id": "WoyQQ3BohkdtPivubEvE8o", - "description": "Now also excludes staging traffic.", - "rule_id": "9spXEVoMeZWujjz25yrgTe" + "config": { + "activation": "next_session", + "custom": { + "feature_flags": { + "checkout_v2": true + } + }, + "default": { + "defaultPrivacyLevel": "mask-user-input", + "sessionReplaySampleRate": 20, + "sessionSampleRate": 100, + "traceSampleRate": 100 + }, + "enabled": true, + "refresh_on_foreground": false, + "rules": [ + { + "match": { + "env": "production" + }, + "set": { + "defaultPrivacyLevel": "mask", + "sessionReplaySampleRate": 0, + "sessionSampleRate": 5 + } + } + ] + }, + "reason": "Tighten replay sampling for the Q4 launch" }, "schema": { - "$ref": "#/components/schemas/RumErrorIngestionUpdateRequest" + "$ref": "#/components/schemas/UpdateRemoteConfigRequest" } } }, @@ -48246,7 +47834,9 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "version": 8 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -48257,7 +47847,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" + "$ref": "#/components/schemas/UpdateRemoteConfigResponse" } }, "type": "object" @@ -48281,35 +47871,55 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update an error ingestion rule", + "summary": "Update remote config", "tags": [ - "RUM/Error ingestion rules" + "RUM/Applications" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Only fields present in the request are changed; omitted fields keep their current value.\n- Calling update with no fields set is a no-op that still returns success.\n- Returns `ResourceNotFound` if `rule_id` doesn't exist under `application_id`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- The client sends the complete object, not a patch: rule order is the priority, so a partial update has no unambiguous interpretation.\n- Each call allocates a new version and records a history row in the same transaction as the write.\n- Call `POST /rum/application/remote-config/preview` first to check what clients would receive.", + "href": "/en/api-reference/rum/applications/rum-application-remote-config-write-update", "metadata": { - "sidebarTitle": "Update an error ingestion rule" + "sidebarTitle": "Update remote config" } } } }, - "/rum/facet/count": { + "/rum/application/update": { "post": { - "description": "Return the top N values for a facet field within a time range, sorted by occurrence count descending.", - "operationId": "rum-read-facet-count", + "description": "Update an existing RUM application. All fields except `application_id` are optional — only provided fields are updated.", + "operationId": "rum-application-write-update", "requestBody": { "content": { "application/json": { "example": { - "end_time": 1712707200000, - "facet_key": "error.type", - "limit": 10, - "scope": "error", - "start_time": 1712620800000 + "alerting": { + "channel_ids": [ + 2490121812131 + ], + "enabled": true + }, + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "application_name": "My Web App v2", + "links": { + "enabled": true, + "systems": [ + { + "enabled": true, + "event_types": [ + "crash", + "error" + ], + "icon_color": "#0F766E", + "icon_text": "S3", + "id": "s3-crash-logs", + "name": "S3 Crash Logs", + "url": "https://s3.example.com/logs?app=${application_id}&trace=${trace_id}" + } + ] + } }, "schema": { - "$ref": "#/components/schemas/RumFacetCountRequest" + "$ref": "#/components/schemas/RumApplicationUpdateRequest" } } }, @@ -48320,22 +47930,7 @@ "content": { "application/json": { "example": { - "data": { - "items": [ - { - "count": 1523, - "facet_value": "TypeError" - }, - { - "count": 342, - "facet_value": "ReferenceError" - }, - { - "count": 89, - "facet_value": "SyntaxError" - } - ] - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -48346,7 +47941,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RumFacetCountResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -48370,34 +47965,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Count facet value distribution", + "summary": "Update application", "tags": [ - "RUM/Facets" + "RUM/Applications" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **100 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Use `POST /rum/field/list` with `is_facet: true` to discover available `facet_key` values for each scope.\n- The `scope` must be one of: `session`, `view`, `action`, `error`, `resource`, `long_task`, `vital`, `issue`, `sourcemap`.\n- Pass `dql` to further filter events before counting. DQL syntax follows the RUM query language.\n- Pass `sql` with a WHERE-clause only (no SELECT) for SQL-style filtering.\n- Default limit is 100; maximum is 100.\n- Time range is required (`start_time` / `end_time` in Unix epoch **milliseconds**). Maximum span is 31 days.", - "href": "/en/api-reference/rum/facets/rum-read-facet-count", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- `links.systems[].url` must start with `http` or `https`; `${var}` tokens are resolved from RUM event context.\n- `links.systems[].event_types` accepts: `crash`, `error`, `view`, `action`, `resource`, `session`, `all`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/applications/rum-application-write-update", "metadata": { - "sidebarTitle": "Count facet value distribution" + "sidebarTitle": "Update application" } } } }, - "/rum/field/list": { + "/rum/application/webhook/test": { "post": { - "description": "Return RUM field definitions, optionally filtered by scope and facet status.", - "operationId": "rum-read-field-list", + "description": "Send a sample RUM alert event to verify an application's webhook URL.", + "operationId": "rum-application-webhook-test", "requestBody": { "content": { "application/json": { "example": { - "is_facet": false, - "scopes": [ - "error" - ] + "application_id": "rum-app-prod", + "webhook_url": "https://hooks.example.com/rum-alerts" }, "schema": { - "$ref": "#/components/schemas/RumFieldListRequest" + "$ref": "#/components/schemas/RumWebhookTestRequest" } } }, @@ -48409,27 +48002,9 @@ "application/json": { "example": { "data": { - "items": [ - { - "account_id": 0, - "description": "The type of the error.", - "edit_able": false, - "enum_values": [], - "field_key": "error.type", - "field_name": "Error type", - "group": "Error", - "is_facet": true, - "queryable": true, - "scopes": [ - "error" - ], - "show_type": "list", - "status": "active", - "unit_family": "", - "unit_name": "", - "value_type": "string" - } - ] + "message": "ok", + "ok": true, + "status_code": 200 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -48441,7 +48016,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RumFieldListResponse" + "$ref": "#/components/schemas/RumWebhookTestResponse" } }, "type": "object" @@ -48458,6 +48033,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -48465,50 +48043,40 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List RUM fields", + "summary": "Test application webhook", "tags": [ - "RUM/Facets" + "RUM/Applications" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- This is the current field-model route for discovering RUM fields.\n- Use returned `field_key` values in RUM data queries and facet-count requests.\n- Set `is_facet: true` to return only fields that support value distribution queries.", - "href": "/en/api-reference/rum/facets/rum-read-field-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- The endpoint validates the URL before sending the sample event.\n- A failed delivery still returns HTTP 200 with `ok=false` and the delivery error in `message`.", + "href": "/en/api-reference/rum/applications/rum-application-webhook-test", "metadata": { - "sidebarTitle": "List RUM fields" + "sidebarTitle": "Test application webhook" } } } }, - "/rum/issue/export": { + "/rum/data/query": { "post": { - "description": "Export the filtered RUM error tracking issues as a CSV file. The response is a `text/csv` stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope; non-console callers can read the `X-Export-Total` and `X-Export-Truncated` response headers.", - "operationId": "rum-issue-read-export", + "description": "Run one or more SQL-style RUM data queries over a bounded time range.", + "operationId": "rum-read-data-query", "requestBody": { "content": { "application/json": { "example": { - "application_ids": [ - "eWbr4xk3ZRnLabRa6unqwD" - ], - "console_origin": "https://console.flashcat.cloud", - "end_time": 1775961914595, - "export_fields": [ - "issue_id", - "error_type", - "error_message", - "status", - "error_count", - "session_count", - "last_seen_at" - ], - "orderby": "updated_at", - "start_time": 1772611200000, - "statuses": [ - "for_review" + "end_time": 1712707200000, + "queries": [ + { + "format": "table", + "id": "errors_by_type", + "sql": "SELECT error.type, count(*) AS errors FROM error GROUP BY error.type ORDER BY errors DESC LIMIT 10", + "time_zone": "Asia/Shanghai" + } ], - "time_zone": "Asia/Shanghai" + "start_time": 1712620800000 }, "schema": { - "$ref": "#/components/schemas/RumIssueExportRequest" + "$ref": "#/components/schemas/RumDataQueryRequest" } } }, @@ -48517,30 +48085,56 @@ "responses": { "200": { "content": { - "text/csv": { - "example": "Issue ID,Error type,Error message,Status,Error count,Affected sessions,Last seen (Asia/Shanghai)\nNHEacQHi2DhXqobr9qPQz9,Error,Script error.,for_review,752,381,2026-04-12 10:43:59\nH8kZSmxiE7EgdyD4fCyyNa,Error,\"API ERROR: We encountered an internal error | POST /api/access/logout\",for_review,3,1,2026-04-03 12:41:24", - "schema": { - "description": "CSV file content. The header row matches the exported columns in order; values are sanitized against spreadsheet formula injection.", - "type": "string" - } - } - }, - "description": "Success. CSV attachment, not a JSON envelope.", - "headers": { - "X-Export-Total": { - "description": "Total number of issues matching the filters, before the row cap.", - "schema": { - "format": "int64", - "type": "integer" - } - }, - "X-Export-Truncated": { - "description": "`true` when more issues matched than the 100-row cap and the file was truncated.", + "application/json": { + "example": { + "data": { + "errors_by_type": { + "data": { + "fields": [ + { + "name": "error.type", + "nullable": false, + "type": "String" + }, + { + "name": "errors", + "nullable": false, + "type": "UInt64" + } + ], + "values": [ + [ + "TypeError", + 1523 + ], + [ + "ReferenceError", + 342 + ] + ] + } + } + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, "schema": { - "type": "boolean" + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/RumDataQueryResponse" + } + }, + "type": "object" + } + ] } } - } + }, + "description": "Success" }, "400": { "$ref": "#/components/responses/BadRequest" @@ -48555,31 +48149,61 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Export issues as CSV", + "summary": "Query RUM data", "tags": [ - "RUM/Issues" + "RUM/Data query" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **200 requests/day**; **100 requests/minute**; **10 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The response is a `text/csv` stream delivered with `Content-Disposition: attachment` — it is not wrapped in the standard envelope. The filename is `rum-issues-.csv`, stamped in the requested `time_zone`. Read `X-Export-Total` and `X-Export-Truncated` response headers instead of a body field.\n- The export reads the first 100 matching rows (`ExportMaxRows`); `X-Export-Truncated` is `true` when more issues match. `p` and `limit` are ignored.\n- The request filters are exactly those of `POST /rum/issue/list` — an export is \"what I am looking at, as a file\".\n- `export_fields` names the CSV columns in the order they appear. Unknown keys are rejected with a parameter error; an empty array uses the default column set.\n- `time_zone` must be a valid IANA zone name (e.g. `Asia/Shanghai`, `UTC`); timestamps are rendered in that zone and time columns carry the zone in their header. Invalid names are rejected.\n- `console_origin` is used to build the `issue_url` column; the service cannot infer it (SaaS, on-premises and dev releases answer on different origins).\n- Every call is recorded in the account's audit log with the caller's member ID, request payload, and resulting error (if any). Do not put secrets in request fields.", - "href": "/en/api-reference/rum/issues/rum-issue-read-export", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Send 1 to 10 queries in one request; each query `id` becomes a key in the response object.\n- `start_time` and `end_time` are required Unix epoch milliseconds. The maximum time range is 31 days.\n- Use `format: table` for tabular results, or `format: time_series` for bucketed time-series results.\n- For `time_series`, `interval` defaults to 3600 seconds and `max_points` defaults to 1226 when omitted.\n- `search_after_ctx` is returned by paginated table queries and can be sent back to continue scanning.", + "href": "/en/api-reference/rum/data-query/rum-read-data-query", "metadata": { - "sidebarTitle": "Export issues as CSV" + "sidebarTitle": "Query RUM data" } } } }, - "/rum/issue/info": { + "/rum/error-ingestion/rules/create": { "post": { - "description": "Retrieve full details of a single issue by `issue_id`.", - "operationId": "rum-issue-read-info", + "description": "Create a new error ingestion rule that filters which errors are stored.", + "operationId": "rum-error-ingestion-rules-create", "requestBody": { "content": { "application/json": { "example": { - "issue_id": "NHEacQHi2DhXqobr9qPQz9" + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "description": "Only ingest TypeError/ReferenceError from production, excluding Safari.", + "filters": [ + [ + { + "key": "error.env", + "oper": "IN", + "vals": [ + "production" + ] + }, + { + "key": "error.error_type", + "oper": "IN", + "vals": [ + "TypeError", + "ReferenceError" + ] + } + ], + [ + { + "key": "error.browser_name", + "oper": "NOTIN", + "vals": [ + "Safari" + ] + } + ] + ], + "rule_name": "Production console errors" }, "schema": { - "$ref": "#/components/schemas/RumIssueIDRequest" + "$ref": "#/components/schemas/RumErrorIngestionCreateRequest" } } }, @@ -48591,42 +48215,8 @@ "application/json": { "example": { "data": { - "age": 5078684, - "application_id": "eWbr4xk3ZRnLabRa6unqwD", - "application_name": "Flashduty DEV", - "created_at": 1770883154944, - "error": { - "message": "Script error.", - "type": "Error" - }, - "error_count": 752, - "first_seen": { - "timestamp": 1770883154944, - "version": "1.0.0" - }, - "is_crash": false, - "issue_id": "NHEacQHi2DhXqobr9qPQz9", - "last_seen": { - "timestamp": 1775961839090, - "version": "1.0.0" - }, - "resolved_at": 0, - "resolved_by": 0, - "service": "fd-console", - "session_count": 381, - "severity": "Info", - "status": "for_review", - "suspected_cause": { - "person_id": 0, - "reason": "The error message 'Script error.' typically indicates an unhandled exception in JavaScript.", - "source": "auto", - "value": "code.exception" - }, - "team_id": 2477033058131, - "updated_at": 1775961914595, - "versions": [ - "1.0.0" - ] + "rule_id": "9spXEVoMeZWujjz25yrgTe", + "rule_name": "Production console errors" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -48638,7 +48228,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RumIssueItem" + "$ref": "#/components/schemas/RumErrorIngestionCreateResponse" } }, "type": "object" @@ -48662,41 +48252,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get issue detail", + "summary": "Create an error ingestion rule", "tags": [ - "RUM/Issues" + "RUM/Error ingestion rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/rum/issues/rum-issue-read-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Create, update, enable, disable, and delete all snapshot the application's full current rule set into history first, so `history/list` reflects every mutation.\n- Every condition key in `filters` must be one of the supported `error.*` fields or a `context.*` path; unsupported keys are rejected with `InvalidParameter`.\n- New rules are created with status `enabled`; call `disable` afterward if the rule should start inactive.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-create", "metadata": { - "sidebarTitle": "Get issue detail" + "sidebarTitle": "Create an error ingestion rule" } } } }, - "/rum/issue/list": { + "/rum/error-ingestion/rules/delete": { "post": { - "description": "Return a paginated list of RUM error tracking issues matching the given filters.", - "operationId": "rum-issue-read-list", + "description": "Delete an error ingestion rule from a RUM application.", + "operationId": "rum-error-ingestion-rules-delete", "requestBody": { "content": { "application/json": { "example": { - "application_ids": [ - "eWbr4xk3ZRnLabRa6unqwD" - ], - "end_time": 1775961914595, - "limit": 20, - "orderby": "updated_at", - "p": 1, - "start_time": 1772611200000, - "statuses": [ - "for_review" - ] + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "rule_id": "9spXEVoMeZWujjz25yrgTe" }, "schema": { - "$ref": "#/components/schemas/RumIssueListRequest" + "$ref": "#/components/schemas/RumErrorIngestionRuleIDRequest" } } }, @@ -48707,100 +48288,19 @@ "content": { "application/json": { "example": { - "data": { - "has_next_page": true, - "items": [ - { - "age": 5078684, - "application_id": "eWbr4xk3ZRnLabRa6unqwD", - "application_name": "Flashduty DEV", - "created_at": 1770883154944, - "error": { - "message": "Script error.", - "type": "Error" - }, - "error_count": 752, - "first_seen": { - "timestamp": 1770883154944, - "version": "1.0.0" - }, - "is_crash": false, - "issue_id": "NHEacQHi2DhXqobr9qPQz9", - "last_seen": { - "timestamp": 1775961839090, - "version": "1.0.0" - }, - "resolved_at": 0, - "resolved_by": 0, - "service": "fd-console", - "session_count": 381, - "severity": "Info", - "status": "for_review", - "suspected_cause": { - "person_id": 0, - "reason": "The error message 'Script error.' typically indicates an unhandled exception in JavaScript.", - "source": "auto", - "value": "code.exception" - }, - "team_id": 2477033058131, - "updated_at": 1775961914595, - "versions": [ - "1.0.0" - ] - }, - { - "age": 48, - "application_id": "eWbr4xk3ZRnLabRa6unqwD", - "application_name": "Flashduty DEV", - "created_at": 1775189479566, - "error": { - "message": "API ERROR: We encountered an internal error | POST /api/access/logout", - "type": "Error" - }, - "error_count": 3, - "first_seen": { - "timestamp": 1775189479566, - "version": "1.0.0" - }, - "is_crash": false, - "issue_id": "H8kZSmxiE7EgdyD4fCyyNa", - "last_seen": { - "timestamp": 1775189527762, - "version": "1.0.0" - }, - "resolved_at": 0, - "resolved_by": 0, - "service": "fd-console", - "session_count": 1, - "severity": "Info", - "status": "for_review", - "suspected_cause": { - "person_id": 0, - "reason": "The error indicates an internal server error during a POST request to /api/access/logout.", - "source": "auto", - "value": "api.failed_request" - }, - "team_id": 2477033058131, - "updated_at": 1775191284163, - "versions": [ - "1.0.0" - ] - } - ], - "total": 111 - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/RumIssueListResponse" - } + "data": {}, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" + } }, "type": "object" } @@ -48823,52 +48323,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List issues", + "summary": "Delete an error ingestion rule", "tags": [ - "RUM/Issues" + "RUM/Error ingestion rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `start_time` and `end_time` are millisecond timestamps. Maximum range: 183 days.\n- `statuses` filters by issue status. Valid values: `for_review`, `reviewed`, `ignored`, `resolved`.\n- `orderby` accepts: `created_at`, `updated_at`, `session_count`, `error_count`, `severity`.\n- Use `dql` or `sql` for advanced filtering. Cannot provide both.", - "href": "/en/api-reference/rum/issues/rum-issue-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The rule disappears from `list` immediately, but the enabled-rule set used for filtering is cached for up to 5 seconds, so errors ingested shortly after deletion can still be matched against it.\n- Returns `ResourceNotFound` if `rule_id` doesn't exist under `application_id`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-delete", "metadata": { - "sidebarTitle": "List issues" + "sidebarTitle": "Delete an error ingestion rule" } } } }, - "/rum/issue/preset-severity/rules/create": { + "/rum/error-ingestion/rules/disable": { "post": { - "description": "Create a new preset severity rule for a RUM application.", - "operationId": "rum-issue-preset-severity-rules-create", + "description": "Disable an error ingestion rule without deleting it.", + "operationId": "rum-error-ingestion-rules-disable", "requestBody": { "content": { "application/json": { "example": { "application_id": "WoyQQ3BohkdtPivubEvE8o", - "description": "Escalate production crashes to Critical severity", - "filters": [ - [ - { - "key": "error.env", - "oper": "IN", - "vals": [ - "production" - ] - }, - { - "key": "error.is_crash", - "oper": "IN", - "vals": [ - "true" - ] - } - ] - ], - "rule_name": "Critical crash spikes", - "severity": "Critical" + "rule_id": "9spXEVoMeZWujjz25yrgTe" }, "schema": { - "$ref": "#/components/schemas/RumPresetSeverityRuleCreateRequest" + "$ref": "#/components/schemas/RumErrorIngestionRuleIDRequest" } } }, @@ -48879,11 +48359,7 @@ "content": { "application/json": { "example": { - "data": { - "priority": 2, - "rule_id": "TAHUYnQmXKzgMS4TFVUKvz", - "rule_name": "Critical crash spikes" - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -48894,7 +48370,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RumPresetSeverityRuleCreateResponse" + "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" } }, "type": "object" @@ -48918,32 +48394,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create preset severity rule", + "summary": "Disable an error ingestion rule", "tags": [ - "RUM/Issue preset severity rules" + "RUM/Error ingestion rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `filters.*.key` accepts only a fixed set of Error-level attributes; any other key returns `InvalidParameter`.\n- Pass at least one condition group: an empty `filters` array is accepted but produces a rule that can never match.\n- The new rule is created enabled and appended with the lowest evaluation precedence (`priority` = current max + 1); use the `reorder` operation to move it earlier.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/issue-preset-severity-rules/rum-issue-preset-severity-rules-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- A disabled rule is kept and still returned by `list`, but is skipped when matching incoming errors.\n- Returns `ResourceNotFound` if `rule_id` doesn't exist under `application_id`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-disable", "metadata": { - "sidebarTitle": "Create preset severity rule" + "sidebarTitle": "Disable an error ingestion rule" } } } }, - "/rum/issue/preset-severity/rules/delete": { + "/rum/error-ingestion/rules/enable": { "post": { - "description": "Delete a preset severity rule.", - "operationId": "rum-issue-preset-severity-rules-delete", + "description": "Re-enable a previously disabled error ingestion rule.", + "operationId": "rum-error-ingestion-rules-enable", "requestBody": { "content": { "application/json": { "example": { "application_id": "WoyQQ3BohkdtPivubEvE8o", - "rule_id": "n8mZQ2VbXk4wPRs6DfC9Ay" + "rule_id": "9spXEVoMeZWujjz25yrgTe" }, "schema": { - "$ref": "#/components/schemas/RumPresetSeverityRuleIDRequest" + "$ref": "#/components/schemas/RumErrorIngestionRuleIDRequest" } } }, @@ -48965,7 +48441,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" } }, "type": "object" @@ -48989,32 +48465,35 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete preset severity rule", + "summary": "Enable an error ingestion rule", "tags": [ - "RUM/Issue preset severity rules" + "RUM/Error ingestion rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `ResourceNotFound` if `rule_id` does not exist in the application.\n- Deletion is a soft delete: the rule stops being listed immediately, but enabled rules are cached for up to 5 seconds, so it can still be evaluated against errors ingested shortly afterwards. Its pre-delete state remains visible via the history endpoints.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/issue-preset-severity-rules/rum-issue-preset-severity-rules-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `ResourceNotFound` if `rule_id` doesn't exist under `application_id`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-enable", "metadata": { - "sidebarTitle": "Delete preset severity rule" + "sidebarTitle": "Enable an error ingestion rule" } } } }, - "/rum/issue/preset-severity/rules/disable": { + "/rum/error-ingestion/rules/history/list": { "post": { - "description": "Disable a preset severity rule.", - "operationId": "rum-issue-preset-severity-rules-disable", + "description": "Return paginated snapshots of an application's error ingestion rule history.", + "operationId": "rum-error-ingestion-rules-history-list", "requestBody": { "content": { "application/json": { "example": { "application_id": "WoyQQ3BohkdtPivubEvE8o", - "rule_id": "TAHUYnQmXKzgMS4TFVUKvz" + "asc": false, + "limit": 20, + "orderby": "updated_at", + "p": 0 }, "schema": { - "$ref": "#/components/schemas/RumPresetSeverityRuleIDRequest" + "$ref": "#/components/schemas/RumErrorIngestionHistoryListRequest" } } }, @@ -49025,7 +48504,69 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "has_next_page": false, + "items": [ + { + "rules": [ + { + "account_id": 20001, + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "created_at": 1786000000000, + "created_by": 1001, + "deleted_at": 0, + "description": "Only ingest TypeError/ReferenceError from production, excluding Safari.", + "filters": [ + [ + { + "key": "error.env", + "oper": "IN", + "vals": [ + "production" + ] + }, + { + "key": "error.error_type", + "oper": "IN", + "vals": [ + "TypeError", + "ReferenceError" + ] + } + ], + [ + { + "key": "error.browser_name", + "oper": "NOTIN", + "vals": [ + "Safari" + ] + } + ] + ], + "id": 1044, + "rule_id": "9spXEVoMeZWujjz25yrgTe", + "rule_name": "Production console errors", + "status": "enabled", + "updated_at": 1786000000000, + "updated_by": 1001 + } + ], + "updated_at": 1786003600000, + "updated_by": 1001, + "updated_by_name": "Alice Chen", + "version": 2 + }, + { + "rules": [], + "updated_at": 1786000000000, + "updated_by": 1001, + "updated_by_name": "Alice Chen", + "version": 1 + } + ], + "total": 2 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -49036,7 +48577,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/RumErrorIngestionHistoryListResponse" } }, "type": "object" @@ -49060,32 +48601,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Disable preset severity rule", + "summary": "List error ingestion rule history", "tags": [ - "RUM/Issue preset severity rules" + "RUM/Error ingestion rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `ResourceNotFound` if `rule_id` does not exist in the application.\n- A disabled rule is skipped during evaluation but keeps its `priority` slot; the cache can take up to 5 seconds to reflect the change.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/issue-preset-severity-rules/rum-issue-preset-severity-rules-disable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- One history item is a full snapshot of every rule for the application at that point in time, not a diff of a single rule.\n- `p` is a zero-based page number, not a byte offset — the server computes `offset = p * limit` internally.\n- `orderby` accepts `updated_at` or `version`; any other value silently falls back to `updated_at`.\n- `limit` defaults to 20 and is capped at 100 server-side; values above 100 are silently clamped, values of 0 or below fall back to the default.", + "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-history-list", "metadata": { - "sidebarTitle": "Disable preset severity rule" + "sidebarTitle": "List error ingestion rule history" } } } }, - "/rum/issue/preset-severity/rules/enable": { + "/rum/error-ingestion/rules/history/revert": { "post": { - "description": "Enable a preset severity rule.", - "operationId": "rum-issue-preset-severity-rules-enable", + "description": "Restore an application's entire rule set to a prior history version.", + "operationId": "rum-error-ingestion-rules-history-revert", "requestBody": { "content": { "application/json": { "example": { "application_id": "WoyQQ3BohkdtPivubEvE8o", - "rule_id": "TAHUYnQmXKzgMS4TFVUKvz" + "version": 2 }, "schema": { - "$ref": "#/components/schemas/RumPresetSeverityRuleIDRequest" + "$ref": "#/components/schemas/RumErrorIngestionRevertRequest" } } }, @@ -49107,7 +48648,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" } }, "type": "object" @@ -49131,33 +48672,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Enable preset severity rule", + "summary": "Revert error ingestion rules to a history version", "tags": [ - "RUM/Issue preset severity rules" + "RUM/Error ingestion rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `ResourceNotFound` if `rule_id` does not exist in the application.\n- Enabled rules are cached for up to 5 seconds, so the effect on newly ingested errors can lag by a few seconds.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/issue-preset-severity-rules/rum-issue-preset-severity-rules-enable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Revert replaces the entire rule set for the application — rules created after the target version are removed, not merged.\n- The current state is snapshotted into history before the revert runs, so a revert can itself be undone by reverting again.\n- Returns `InvalidParameter` (not `ResourceNotFound`) when `version` doesn't exist for the application.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-history-revert", "metadata": { - "sidebarTitle": "Enable preset severity rule" + "sidebarTitle": "Revert error ingestion rules to a history version" } } } }, - "/rum/issue/preset-severity/rules/history/list": { + "/rum/error-ingestion/rules/list": { "post": { - "description": "Return the change history of preset severity rules for a RUM application.", - "operationId": "rum-issue-preset-severity-rules-history-list", + "description": "Return every error ingestion rule configured for a RUM application.", + "operationId": "rum-error-ingestion-rules-list", "requestBody": { "content": { "application/json": { "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "limit": 20, - "p": 0 + "application_id": "WoyQQ3BohkdtPivubEvE8o" }, "schema": { - "$ref": "#/components/schemas/RumPresetSeverityRuleHistoryListRequest" + "$ref": "#/components/schemas/RumErrorIngestionListRequest" } } }, @@ -49169,121 +48708,44 @@ "application/json": { "example": { "data": { - "has_next_page": false, "items": [ { - "rules": [ - { - "account_id": 3790925372131, - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "created_at": 1785744052160, - "created_by": 3790925372131, - "deleted_at": 0, - "description": "Downgrade known extension errors to Info", - "filters": [ - [ - { - "key": "error.error_message", - "oper": "IN", - "vals": [ - "/^ResizeObserver loop.*|.*chrome-extension:\\/\\/.*/" - ] - } - ] - ], - "id": 4820, - "priority": 1, - "rule_id": "n8mZQ2VbXk4wPRs6DfC9Ay", - "rule_name": "Known noisy browser extension errors", - "severity": "Info", - "status": "enabled", - "updated_at": 1785744052160, - "updated_by": 3790925372131 - }, - { - "account_id": 3790925372131, - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "created_at": 1785830452160, - "created_by": 3790925372131, - "deleted_at": 0, - "description": "Escalate production crashes to Critical severity", - "filters": [ - [ - { - "key": "error.env", - "oper": "IN", - "vals": [ - "production" - ] - }, - { - "key": "error.is_crash", - "oper": "IN", - "vals": [ - "true" - ] - } + "created_at": 1786000000000, + "description": "Only ingest TypeError/ReferenceError from production, excluding Safari.", + "filters": [ + [ + { + "key": "error.env", + "oper": "IN", + "vals": [ + "production" ] - ], - "id": 4821, - "priority": 2, - "rule_id": "TAHUYnQmXKzgMS4TFVUKvz", - "rule_name": "Critical crash spikes", - "severity": "Critical", - "status": "enabled", - "updated_at": 1785830452160, - "updated_by": 3790925372131 - } - ], - "updated_at": 1785916852160, - "updated_by": 2476444212131, - "updated_by_name": "Alice Chen", - "version": 3 - }, - { - "rules": [ - { - "account_id": 3790925372131, - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "created_at": 1785744052160, - "created_by": 3790925372131, - "deleted_at": 0, - "description": "Downgrade known extension errors to Info", - "filters": [ - [ - { - "key": "error.error_message", - "oper": "IN", - "vals": [ - "/^ResizeObserver loop.*|.*chrome-extension:\\/\\/.*/" - ] - } + }, + { + "key": "error.error_type", + "oper": "IN", + "vals": [ + "TypeError", + "ReferenceError" ] - ], - "id": 4820, - "priority": 1, - "rule_id": "n8mZQ2VbXk4wPRs6DfC9Ay", - "rule_name": "Known noisy browser extension errors", - "severity": "Info", - "status": "enabled", - "updated_at": 1785744052160, - "updated_by": 3790925372131 - } + } + ], + [ + { + "key": "error.browser_name", + "oper": "NOTIN", + "vals": [ + "Safari" + ] + } + ] ], - "updated_at": 1785830452160, - "updated_by": 3790925372131, - "updated_by_name": "Bob Zhang", - "version": 2 - }, - { - "rules": [], - "updated_at": 1785744052160, - "updated_by": 3790925372131, - "updated_by_name": "Bob Zhang", - "version": 1 + "rule_id": "9spXEVoMeZWujjz25yrgTe", + "rule_name": "Production console errors", + "status": "enabled", + "updated_at": 1786003600000 } - ], - "total": 3 + ] }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -49295,7 +48757,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RumPresetSeverityRuleHistoryListResponse" + "$ref": "#/components/schemas/RumErrorIngestionListResponse" } }, "type": "object" @@ -49319,32 +48781,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List preset severity rule history", + "summary": "List error ingestion rules", "tags": [ - "RUM/Issue preset severity rules" + "RUM/Error ingestion rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Each entry is an application-level snapshot of every rule as it existed immediately *before* the mutation that produced it — not a diff. A fresh snapshot is written before every create/update/enable/disable/delete/reorder/revert call that actually changes something — an `update` carrying none of the mutable fields returns success without writing one — so `version=1` is typically an empty rule set captured just before the first rule was ever created.\n- `rules` items carry the full internal row (including `account_id`, `created_by`, `id`, `deleted_at`), which is a wider shape than the one returned by `rules/list`.\n- `limit` defaults to 20 and is silently capped at 100 rather than rejected.\n- `orderby` accepts only `updated_at` or `version`; any other value (including omitted) falls back to `updated_at` rather than erroring.\n- Results sort descending by default; pass `asc=true` for ascending order.", - "href": "/en/api-reference/rum/issue-preset-severity-rules/rum-issue-preset-severity-rules-history-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Deleted rules are excluded; only rules with status `enabled` or `disabled` are returned.\n- Rules are ordered newest-created first.", + "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-list", "metadata": { - "sidebarTitle": "List preset severity rule history" + "sidebarTitle": "List error ingestion rules" } } } }, - "/rum/issue/preset-severity/rules/history/revert": { + "/rum/error-ingestion/rules/update": { "post": { - "description": "Roll back preset severity rules to the state captured in a specific history snapshot.", - "operationId": "rum-issue-preset-severity-rules-history-revert", + "description": "Update the name, description, or filters of an error ingestion rule.", + "operationId": "rum-error-ingestion-rules-update", "requestBody": { "content": { "application/json": { "example": { "application_id": "WoyQQ3BohkdtPivubEvE8o", - "version": 2 + "description": "Now also excludes staging traffic.", + "rule_id": "9spXEVoMeZWujjz25yrgTe" }, "schema": { - "$ref": "#/components/schemas/RumPresetSeverityRuleHistoryRevertRequest" + "$ref": "#/components/schemas/RumErrorIngestionUpdateRequest" } } }, @@ -49366,7 +48829,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/RumErrorIngestionEmptyResponse" } }, "type": "object" @@ -49390,31 +48853,35 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Revert preset severity rules to a history snapshot", + "summary": "Update an error ingestion rule", "tags": [ - "RUM/Issue preset severity rules" + "RUM/Error ingestion rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Replaces the entire current rule set with the snapshot's rows: `rule_id`, `priority`, `filters`, `severity`, `status`, and `created_by` are preserved from the snapshot, but `created_at`/`updated_at` are reset to the revert time and `updated_by` is set to the reverting user.\n- Returns `InvalidParameter` (not `ResourceNotFound`) when `version` does not correspond to an existing history snapshot for the application.\n- The revert itself is captured as a new history snapshot before it is applied, so a revert can itself be reverted.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/issue-preset-severity-rules/rum-issue-preset-severity-rules-history-revert", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Only fields present in the request are changed; omitted fields keep their current value.\n- Calling update with no fields set is a no-op that still returns success.\n- Returns `ResourceNotFound` if `rule_id` doesn't exist under `application_id`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/error-ingestion-rules/rum-error-ingestion-rules-update", "metadata": { - "sidebarTitle": "Revert preset severity rules to a history snapshot" + "sidebarTitle": "Update an error ingestion rule" } } } }, - "/rum/issue/preset-severity/rules/list": { + "/rum/facet/count": { "post": { - "description": "Return all preset severity rules configured for a RUM application.", - "operationId": "rum-issue-preset-severity-rules-list", + "description": "Return the top N values for a facet field within a time range, sorted by occurrence count descending.", + "operationId": "rum-read-facet-count", "requestBody": { "content": { "application/json": { "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o" + "end_time": 1712707200000, + "facet_key": "error.type", + "limit": 10, + "scope": "error", + "start_time": 1712620800000 }, "schema": { - "$ref": "#/components/schemas/RumPresetSeverityRuleListRequest" + "$ref": "#/components/schemas/RumFacetCountRequest" } } }, @@ -49428,53 +48895,16 @@ "data": { "items": [ { - "created_at": 1785744052160, - "description": "Downgrade known extension errors to Info", - "filters": [ - [ - { - "key": "error.error_message", - "oper": "IN", - "vals": [ - "/^ResizeObserver loop.*|.*chrome-extension:\\/\\/.*/" - ] - } - ] - ], - "priority": 1, - "rule_id": "n8mZQ2VbXk4wPRs6DfC9Ay", - "rule_name": "Known noisy browser extension errors", - "severity": "Info", - "status": "disabled", - "updated_at": 1785916852160 + "count": 1523, + "facet_value": "TypeError" }, { - "created_at": 1785830452160, - "description": "Escalate production crashes to Critical severity", - "filters": [ - [ - { - "key": "error.env", - "oper": "IN", - "vals": [ - "production" - ] - }, - { - "key": "error.is_crash", - "oper": "IN", - "vals": [ - "true" - ] - } - ] - ], - "priority": 2, - "rule_id": "TAHUYnQmXKzgMS4TFVUKvz", - "rule_name": "Critical crash spikes", - "severity": "Critical", - "status": "enabled", - "updated_at": 1785830452160 + "count": 342, + "facet_value": "ReferenceError" + }, + { + "count": 89, + "facet_value": "SyntaxError" } ] }, @@ -49488,7 +48918,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RumPresetSeverityRuleListResponse" + "$ref": "#/components/schemas/RumFacetCountResponse" } }, "type": "object" @@ -49512,33 +48942,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List preset severity rules", + "summary": "Count facet value distribution", "tags": [ - "RUM/Issue preset severity rules" + "RUM/Facets" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Rules are returned ordered by `priority` ascending, then `created_at` ascending — the same order they are evaluated in.\n- Only enabled rules are evaluated against incoming errors; the first enabled rule (in priority order) whose filters match an error wins and assigns its `severity`. Errors matching no enabled rule keep their default severity.", - "href": "/en/api-reference/rum/issue-preset-severity-rules/rum-issue-preset-severity-rules-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **100 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Use `POST /rum/field/list` with `is_facet: true` to discover available `facet_key` values for each scope.\n- The `scope` must be one of: `session`, `view`, `action`, `error`, `resource`, `long_task`, `vital`, `issue`, `sourcemap`.\n- Pass `dql` to further filter events before counting. DQL syntax follows the RUM query language.\n- Pass `sql` with a WHERE-clause only (no SELECT) for SQL-style filtering.\n- Default limit is 100; maximum is 100.\n- Time range is required (`start_time` / `end_time` in Unix epoch **milliseconds**). Maximum span is 31 days.", + "href": "/en/api-reference/rum/facets/rum-read-facet-count", "metadata": { - "sidebarTitle": "List preset severity rules" + "sidebarTitle": "Count facet value distribution" } } } }, - "/rum/issue/preset-severity/rules/reorder": { + "/rum/field/list": { "post": { - "description": "Move one preset severity rule to another rule's position in evaluation order.", - "operationId": "rum-issue-preset-severity-rules-reorder", + "description": "Return RUM field definitions, optionally filtered by scope and facet status.", + "operationId": "rum-read-field-list", "requestBody": { "content": { "application/json": { "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "drag_rule_id": "n8mZQ2VbXk4wPRs6DfC9Ay", - "target_rule_id": "TAHUYnQmXKzgMS4TFVUKvz" + "is_facet": false, + "scopes": [ + "error" + ] }, "schema": { - "$ref": "#/components/schemas/RumPresetSeverityRuleReorderRequest" + "$ref": "#/components/schemas/RumFieldListRequest" } } }, @@ -49549,18 +48980,40 @@ "content": { "application/json": { "example": { - "data": {}, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { + "data": { + "items": [ + { + "account_id": 0, + "description": "The type of the error.", + "edit_able": false, + "enum_values": [], + "field_key": "error.type", + "field_name": "Error type", + "group": "Error", + "is_facet": true, + "queryable": true, + "scopes": [ + "error" + ], + "show_type": "list", + "status": "active", + "unit_family": "", + "unit_name": "", + "value_type": "string" + } + ] + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/RumFieldListResponse" } }, "type": "object" @@ -49584,34 +49037,50 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Reorder preset severity rule", + "summary": "List RUM fields", "tags": [ - "RUM/Issue preset severity rules" + "RUM/Facets" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- This moves exactly one rule, not a full reordering: `drag_rule_id`'s `priority` is set to `target_rule_id`'s current `priority`, and every rule between the two original positions — the target rule itself included — shifts by one to close the gap.\n- Lower `priority` numbers are evaluated first; moving toward a lower-numbered target moves the rule earlier in evaluation order, and toward a higher-numbered target moves it later.\n- Returns `ResourceNotFound` if either `drag_rule_id` or `target_rule_id` does not exist in the application.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/issue-preset-severity-rules/rum-issue-preset-severity-rules-reorder", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- This is the current field-model route for discovering RUM fields.\n- Use returned `field_key` values in RUM data queries and facet-count requests.\n- Set `is_facet: true` to return only fields that support value distribution queries.", + "href": "/en/api-reference/rum/facets/rum-read-field-list", "metadata": { - "sidebarTitle": "Reorder preset severity rule" + "sidebarTitle": "List RUM fields" } } } }, - "/rum/issue/preset-severity/rules/update": { + "/rum/issue/export": { "post": { - "description": "Update the name, description, filters, or severity of a preset severity rule.", - "operationId": "rum-issue-preset-severity-rules-update", + "description": "Export the filtered RUM error tracking issues as a CSV file. The response is a `text/csv` stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope; non-console callers can read the `X-Export-Total` and `X-Export-Truncated` response headers.", + "operationId": "rum-issue-read-export", "requestBody": { "content": { "application/json": { "example": { - "application_id": "WoyQQ3BohkdtPivubEvE8o", - "rule_id": "TAHUYnQmXKzgMS4TFVUKvz", - "rule_name": "Critical crash spikes (updated)", - "severity": "Critical" + "application_ids": [ + "eWbr4xk3ZRnLabRa6unqwD" + ], + "console_origin": "https://console.flashcat.cloud", + "end_time": 1775961914595, + "export_fields": [ + "issue_id", + "error_type", + "error_message", + "status", + "error_count", + "session_count", + "last_seen_at" + ], + "orderby": "updated_at", + "start_time": 1772611200000, + "statuses": [ + "for_review" + ], + "time_zone": "Asia/Shanghai" }, "schema": { - "$ref": "#/components/schemas/RumPresetSeverityRuleUpdateRequest" + "$ref": "#/components/schemas/RumIssueExportRequest" } } }, @@ -49620,29 +49089,30 @@ "responses": { "200": { "content": { - "application/json": { - "example": { - "data": {}, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, + "text/csv": { + "example": "Issue ID,Error type,Error message,Status,Error count,Affected sessions,Last seen (Asia/Shanghai)\nNHEacQHi2DhXqobr9qPQz9,Error,Script error.,for_review,752,381,2026-04-12 10:43:59\nH8kZSmxiE7EgdyD4fCyyNa,Error,\"API ERROR: We encountered an internal error | POST /api/access/logout\",for_review,3,1,2026-04-03 12:41:24", "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/EmptyResponse" - } - }, - "type": "object" - } - ] + "description": "CSV file content. The header row matches the exported columns in order; values are sanitized against spreadsheet formula injection.", + "type": "string" } } }, - "description": "Success" + "description": "Success. CSV attachment, not a JSON envelope.", + "headers": { + "X-Export-Total": { + "description": "Total number of issues matching the filters, before the row cap.", + "schema": { + "format": "int64", + "type": "integer" + } + }, + "X-Export-Truncated": { + "description": "`true` when more issues matched than the 100-row cap and the file was truncated.", + "schema": { + "type": "boolean" + } + } + } }, "400": { "$ref": "#/components/responses/BadRequest" @@ -49657,32 +49127,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update preset severity rule", + "summary": "Export issues as CSV", "tags": [ - "RUM/Issue preset severity rules" + "RUM/Issues" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Only fields present in the request are changed; omitted fields keep their current value.\n- Returns `ResourceNotFound` if `rule_id` does not exist in the application.\n- If `filters` is provided it replaces the entire filter structure and is revalidated against the same allowed key set as `create`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/issue-preset-severity-rules/rum-issue-preset-severity-rules-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **200 requests/day**; **100 requests/minute**; **10 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The response is a `text/csv` stream delivered with `Content-Disposition: attachment` — it is not wrapped in the standard envelope. The filename is `rum-issues-.csv`, stamped in the requested `time_zone`. Read `X-Export-Total` and `X-Export-Truncated` response headers instead of a body field.\n- The export reads the first 100 matching rows (`ExportMaxRows`); `X-Export-Truncated` is `true` when more issues match. `p` and `limit` are ignored.\n- The request filters are exactly those of `POST /rum/issue/list` — an export is \"what I am looking at, as a file\".\n- `export_fields` names the CSV columns in the order they appear. Unknown keys are rejected with a parameter error; an empty array uses the default column set.\n- `time_zone` must be a valid IANA zone name (e.g. `Asia/Shanghai`, `UTC`); timestamps are rendered in that zone and time columns carry the zone in their header. Invalid names are rejected.\n- `console_origin` is used to build the `issue_url` column; the service cannot infer it (SaaS, on-premises and dev releases answer on different origins).\n- Every call is recorded in the account's audit log with the caller's member ID, request payload, and resulting error (if any). Do not put secrets in request fields.", + "href": "/en/api-reference/rum/issues/rum-issue-read-export", "metadata": { - "sidebarTitle": "Update preset severity rule" + "sidebarTitle": "Export issues as CSV" } } } }, - "/rum/issue/update": { + "/rum/issue/info": { "post": { - "description": "Update the status or suspected cause of an issue.", - "operationId": "rum-issue-write-update", + "description": "Retrieve full details of a single issue by `issue_id`.", + "operationId": "rum-issue-read-info", "requestBody": { "content": { "application/json": { "example": { - "issue_id": "NHEacQHi2DhXqobr9qPQz9", - "status": "resolved" + "issue_id": "NHEacQHi2DhXqobr9qPQz9" }, "schema": { - "$ref": "#/components/schemas/RumIssueUpdateRequest" + "$ref": "#/components/schemas/RumIssueIDRequest" } } }, @@ -49693,7 +49162,44 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "age": 5078684, + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "created_at": 1770883154944, + "error": { + "message": "Script error.", + "type": "Error" + }, + "error_count": 752, + "first_seen": { + "timestamp": 1770883154944, + "version": "1.0.0" + }, + "is_crash": false, + "issue_id": "NHEacQHi2DhXqobr9qPQz9", + "last_seen": { + "timestamp": 1775961839090, + "version": "1.0.0" + }, + "resolved_at": 0, + "resolved_by": 0, + "service": "fd-console", + "session_count": 381, + "severity": "Info", + "status": "for_review", + "suspected_cause": { + "person_id": 0, + "reason": "The error message 'Script error.' typically indicates an unhandled exception in JavaScript.", + "source": "auto", + "value": "code.exception" + }, + "team_id": 2477033058131, + "updated_at": 1775961914595, + "versions": [ + "1.0.0" + ] + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -49704,7 +49210,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/RumIssueItem" } }, "type": "object" @@ -49728,31 +49234,41 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update issue", + "summary": "Get issue detail", "tags": [ "RUM/Issues" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `status` valid values: `for_review`, `reviewed`, `ignored`, `resolved`.\n- `suspected_cause` valid values: `api.failed_request`, `network.error`, `code.exception`, `code.invalid_object_access`, `code.invalid_argument`, `unknown`.\n- Setting `status` to `resolved` also stamps `resolved_at` and `resolved_by` on the issue; moving a resolved issue back to another status clears them.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/rum/issues/rum-issue-write-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/rum/issues/rum-issue-read-info", "metadata": { - "sidebarTitle": "Update issue" + "sidebarTitle": "Get issue detail" } } } }, - "/rum/resource/info": { + "/rum/issue/list": { "post": { - "description": "Return the account's RUM resource record and its current session usage.", - "operationId": "rum-resource-read-info", + "description": "Return a paginated list of RUM error tracking issues matching the given filters.", + "operationId": "rum-issue-read-list", "requestBody": { "content": { "application/json": { "example": { - "no_cache": false + "application_ids": [ + "eWbr4xk3ZRnLabRa6unqwD" + ], + "end_time": 1775961914595, + "limit": 20, + "orderby": "updated_at", + "p": 1, + "start_time": 1772611200000, + "statuses": [ + "for_review" + ] }, "schema": { - "$ref": "#/components/schemas/RumResourceInfoRequest" + "$ref": "#/components/schemas/RumIssueListRequest" } } }, @@ -49764,58 +49280,113 @@ "application/json": { "example": { "data": { - "account_id": 2451002751131, - "action.days": 30, - "created_at": 1750000000, - "error.days": 30, - "long_task.days": 15, - "offering_id": 11, - "order_id": "fd_order_20250615_8f3a1c2b", - "product": "rum", - "resource.days": 15, - "resource_id": "rum_2451002751131", - "resource_name": "rum_2451002751131", - "session.days": 30, - "session_investigate.free_cnt": 0, - "session_investigate.used_cnt": 5230, - "session_limit_reached": false, - "session_measure.free_cnt": 0, - "session_measure.used_cnt": 128400, - "session_replay.free_cnt": 0, - "session_replay.used_cnt": 812, - "status": "enabled", - "updated_at": 1752000000, - "version": "professional", - "view.days": 30, - "window_end_time": 1752592000, - "window_start_time": 1750000000 - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/RumResourceItem" - } - }, - "type": "object" - } - ] - } - } - }, - "description": "Success" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" + "has_next_page": true, + "items": [ + { + "age": 5078684, + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "created_at": 1770883154944, + "error": { + "message": "Script error.", + "type": "Error" + }, + "error_count": 752, + "first_seen": { + "timestamp": 1770883154944, + "version": "1.0.0" + }, + "is_crash": false, + "issue_id": "NHEacQHi2DhXqobr9qPQz9", + "last_seen": { + "timestamp": 1775961839090, + "version": "1.0.0" + }, + "resolved_at": 0, + "resolved_by": 0, + "service": "fd-console", + "session_count": 381, + "severity": "Info", + "status": "for_review", + "suspected_cause": { + "person_id": 0, + "reason": "The error message 'Script error.' typically indicates an unhandled exception in JavaScript.", + "source": "auto", + "value": "code.exception" + }, + "team_id": 2477033058131, + "updated_at": 1775961914595, + "versions": [ + "1.0.0" + ] + }, + { + "age": 48, + "application_id": "eWbr4xk3ZRnLabRa6unqwD", + "application_name": "Flashduty DEV", + "created_at": 1775189479566, + "error": { + "message": "API ERROR: We encountered an internal error | POST /api/access/logout", + "type": "Error" + }, + "error_count": 3, + "first_seen": { + "timestamp": 1775189479566, + "version": "1.0.0" + }, + "is_crash": false, + "issue_id": "H8kZSmxiE7EgdyD4fCyyNa", + "last_seen": { + "timestamp": 1775189527762, + "version": "1.0.0" + }, + "resolved_at": 0, + "resolved_by": 0, + "service": "fd-console", + "session_count": 1, + "severity": "Info", + "status": "for_review", + "suspected_cause": { + "person_id": 0, + "reason": "The error indicates an internal server error during a POST request to /api/access/logout.", + "source": "auto", + "value": "api.failed_request" + }, + "team_id": 2477033058131, + "updated_at": 1775191284163, + "versions": [ + "1.0.0" + ] + } + ], + "total": 111 + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/RumIssueListResponse" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" }, "429": { "$ref": "#/components/responses/TooManyRequests" @@ -49824,31 +49395,52 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get RUM resource info", + "summary": "List issues", "tags": [ - "RUM/Resources" + "RUM/Issues" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `ResourceNotFound` when the account has no RUM resource provisioned yet, or when the resource's status is `deleted`/`destroyed`.\n- `no_cache=true` bypasses the short-lived cache of the resource record itself (plan version, quotas, status). The `used_cnt` figures come from a separate hourly cache that this flag does not affect, so they can lag behind live usage either way.\n- The used-count fields reflect the current 30-day billing window (`window_start_time` to `window_end_time`), not lifetime totals.\n- `expired_at` is only populated on on-premises deployments, from the license expiry date; it is omitted entirely for SaaS accounts.\n- For `version=free` accounts, `session_limit_reached` is `true` once usage exceeds the combined free quota across all applications (per-app free quota × application count); it stays `false` while the account has no applications yet.", - "href": "/en/api-reference/rum/resources/rum-resource-read-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `start_time` and `end_time` are millisecond timestamps. Maximum range: 183 days.\n- `statuses` filters by issue status. Valid values: `for_review`, `reviewed`, `ignored`, `resolved`.\n- `orderby` accepts: `created_at`, `updated_at`, `session_count`, `error_count`, `severity`.\n- Use `dql` or `sql` for advanced filtering. Cannot provide both.", + "href": "/en/api-reference/rum/issues/rum-issue-read-list", "metadata": { - "sidebarTitle": "Get RUM resource info" + "sidebarTitle": "List issues" } } } }, - "/rum/session-replay/metadata": { + "/rum/issue/preset-severity/rules/create": { "post": { - "description": "Return the application, device, session bounds, and views recorded for a replayable session.", - "operationId": "rum-session-replay-read-metadata", + "description": "Create a new preset severity rule for a RUM application.", + "operationId": "rum-issue-preset-severity-rules-create", "requestBody": { "content": { "application/json": { "example": { - "session_id": "0a4a2e64-8a4f-4b9a-9c1e-3a2f9e6d7c81" + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "description": "Escalate production crashes to Critical severity", + "filters": [ + [ + { + "key": "error.env", + "oper": "IN", + "vals": [ + "production" + ] + }, + { + "key": "error.is_crash", + "oper": "IN", + "vals": [ + "true" + ] + } + ] + ], + "rule_name": "Critical crash spikes", + "severity": "Critical" }, "schema": { - "$ref": "#/components/schemas/RumSessionReplayMetaRequest" + "$ref": "#/components/schemas/RumPresetSeverityRuleCreateRequest" } } }, @@ -49860,35 +49452,9 @@ "application/json": { "example": { "data": { - "application": { - "id": "WoyQQ3BohkdtPivubEvE8o" - }, - "device": { - "type": "desktop" - }, - "foreground_periods": [], - "session": { - "end": 1752480600000, - "is_active": false, - "server_time_delta": 0, - "source": "browser", - "start": 1752480000000 - }, - "views": [ - { - "container_source": "", - "container_view_id": "", - "end": 1752480600000, - "is_active": false, - "loading_type": "initial_load", - "name": "/dashboard", - "server_time_delta": 0, - "source": "browser", - "start": 1752480000000, - "url": "https://app.example.com/dashboard", - "view_id": "6f2b6b1a-8f7e-4e3a-9c2b-1a2b3c4d5e6f" - } - ] + "priority": 2, + "rule_id": "TAHUYnQmXKzgMS4TFVUKvz", + "rule_name": "Critical crash spikes" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -49900,7 +49466,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RumSessionReplayMetaItem" + "$ref": "#/components/schemas/RumPresetSeverityRuleCreateResponse" } }, "type": "object" @@ -49924,33 +49490,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get session replay metadata", + "summary": "Create preset severity rule", "tags": [ - "RUM/Session replay" + "RUM/Issue preset severity rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `InvalidParameter` if the session does not exist, or if it has no replay data recorded (`session_has_replay` is false).\n- Returns `InvalidParameter` if no views are found within the session's time window.\n- Pass `ts` to disambiguate when a `session_id` has been reused across different time windows.", - "href": "/en/api-reference/rum/session-replay/rum-session-replay-read-metadata", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `filters.*.key` accepts only a fixed set of Error-level attributes; any other key returns `InvalidParameter`.\n- Pass at least one condition group: an empty `filters` array is accepted but produces a rule that can never match.\n- The new rule is created enabled and appended with the lowest evaluation precedence (`priority` = current max + 1); use the `reorder` operation to move it earlier.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/issue-preset-severity-rules/rum-issue-preset-severity-rules-create", "metadata": { - "sidebarTitle": "Get session replay metadata" + "sidebarTitle": "Create preset severity rule" } } } }, - "/rum/session-replay/segments": { + "/rum/issue/preset-severity/rules/delete": { "post": { - "description": "Page through the recorded replay segments of a session, as presigned URLs or a raw stream.", - "operationId": "rum-session-replay-read-segments", + "description": "Delete a preset severity rule.", + "operationId": "rum-issue-preset-severity-rules-delete", "requestBody": { "content": { "application/json": { "example": { - "limit": 20, - "session_id": "0a4a2e64-8a4f-4b9a-9c1e-3a2f9e6d7c81", - "url_mode": true + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "rule_id": "n8mZQ2VbXk4wPRs6DfC9Ay" }, "schema": { - "$ref": "#/components/schemas/RumSessionReplaySegmentsRequest" + "$ref": "#/components/schemas/RumPresetSeverityRuleIDRequest" } } }, @@ -49961,14 +49526,8 @@ "content": { "application/json": { "example": { - "data": { - "items": [ - "https://rum-replay.flashcat.cloud/short-term/2451002751131/0a4a2e64-8a4f-4b9a-9c1e-3a2f9e6d7c81/segments/1752480001234?X-Amz-Signature=example", - "https://rum-replay.flashcat.cloud/short-term/2451002751131/0a4a2e64-8a4f-4b9a-9c1e-3a2f9e6d7c81/segments/1752480032456?X-Amz-Signature=example" - ], - "search_after_ctx": "c2hvcnQtdGVybS8yNDUxMDAyNzUxMTMxLzBhNGEyZTY0LThhNGYtNGI5YS05YzFlLTNhMmY5ZTZkN2M4MS9zZWdtZW50cy8xNzUyNDgwMDMyNDU2" - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R5" + "data": {}, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ @@ -49978,30 +49537,16 @@ { "properties": { "data": { - "$ref": "#/components/schemas/RumSessionReplaySegmentsResult" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" } ] } - }, - "application/x-ndjson": { - "schema": { - "description": "Newline-delimited JSON (NDJSON). Each line is one decompressed replay segment record (rrweb-format events), streamed directly and not wrapped in the standard envelope.", - "type": "string" - } } }, - "description": "Success. Shape depends on `url_mode` — see Usage.", - "headers": { - "X-Search-After-Ctx": { - "description": "Base64-encoded pagination cursor for the next call. Only set in streaming mode (`url_mode: false`).", - "schema": { - "type": "string" - } - } - } + "description": "Success" }, "400": { "$ref": "#/components/responses/BadRequest" @@ -50016,39 +49561,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List session replay segments", + "summary": "Delete preset severity rule", "tags": [ - "RUM/Session replay" + "RUM/Issue preset severity rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- When `url_mode` is `false` (default), the response streams `application/x-ndjson` — one decompressed replay segment JSON object per line — and is **not** wrapped in the standard envelope. The pagination cursor for the next call is returned in the `X-Search-After-Ctx` response header instead of a body field.\n- When `url_mode` is `true`, the response is a normal JSON envelope containing presigned download URLs (valid 1 hour) instead of the raw segment bytes.\n- Pass `ts` to seek to the most recent full-snapshot segment at or before that time, instead of paging from the start of the session.\n- `limit` accepts 1-99; values of 100 or more are rejected.", - "href": "/en/api-reference/rum/session-replay/rum-session-replay-read-segments", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `ResourceNotFound` if `rule_id` does not exist in the application.\n- Deletion is a soft delete: the rule stops being listed immediately, but enabled rules are cached for up to 5 seconds, so it can still be evaluated against errors ingested shortly afterwards. Its pre-delete state remains visible via the history endpoints.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/issue-preset-severity-rules/rum-issue-preset-severity-rules-delete", "metadata": { - "sidebarTitle": "List session replay segments" + "sidebarTitle": "Delete preset severity rule" } } } }, - "/safari/a2a-agent/create": { + "/rum/issue/preset-severity/rules/disable": { "post": { - "description": "Register a new A2A remote agent from its agent-card URL.", - "operationId": "remote-agent-write-create", + "description": "Disable a preset severity rule.", + "operationId": "rum-issue-preset-severity-rules-disable", "requestBody": { "content": { "application/json": { "example": { - "agent_name": "deploy-bot", - "auth_type": "bearer", - "card_url": "https://agents.example.com/deploy-bot/card", - "environments": [ - "env_8s7Hn2kLpQ3xYbVc4Wd2m" - ], - "instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.", - "streaming": true, - "team_id": 0 + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "rule_id": "TAHUYnQmXKzgMS4TFVUKvz" }, "schema": { - "$ref": "#/components/schemas/A2AAgentCreateRequest" + "$ref": "#/components/schemas/RumPresetSeverityRuleIDRequest" } } }, @@ -50059,20 +49597,18 @@ "content": { "application/json": { "example": { - "data": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "properties": { "data": { - "$ref": "#/components/schemas/A2AAgentCreateResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -50089,9 +49625,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -50099,36 +49632,32 @@ "$ref": "#/components/responses/ServerError" } }, - "security": [ - { - "AppKeyAuth": [] - } - ], - "summary": "Create A2A agent", + "summary": "Disable preset severity rule", "tags": [ - "AI SRE/A2A agents" + "RUM/Issue preset severity rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- `instructions` is required; a deprecated `description` field is still accepted for legacy clients and, if both are sent, must exactly match `instructions`.\n- `card_url` must be an absolute `http`/`https` URL with a non-empty host (reachability is enforced by the execution environment, not here); `auth_type` accepts only `none`, `api_key`, or `bearer`.\n- `environments` restricts where the agent can run: a list of `cloud` and/or BYOC runner environment IDs; omitted or empty means all environments, and each runner must be visible to the caller.\n- Creating into a team (`team_id > 0`) requires the caller to actually belong to that team; only the account owner/admin may create at account scope (`team_id=0`).\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `ResourceNotFound` if `rule_id` does not exist in the application.\n- A disabled rule is skipped during evaluation but keeps its `priority` slot; the cache can take up to 5 seconds to reflect the change.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/issue-preset-severity-rules/rum-issue-preset-severity-rules-disable", "metadata": { - "sidebarTitle": "Create A2A agent" + "sidebarTitle": "Disable preset severity rule" } } } }, - "/safari/a2a-agent/delete": { + "/rum/issue/preset-severity/rules/enable": { "post": { - "description": "Soft-delete an A2A agent by ID.", - "operationId": "remote-agent-write-delete", + "description": "Enable a preset severity rule.", + "operationId": "rum-issue-preset-severity-rules-enable", "requestBody": { "content": { "application/json": { "example": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "rule_id": "TAHUYnQmXKzgMS4TFVUKvz" }, "schema": { - "$ref": "#/components/schemas/A2AAgentIDRequest" + "$ref": "#/components/schemas/RumPresetSeverityRuleIDRequest" } } }, @@ -50139,19 +49668,18 @@ "content": { "application/json": { "example": { - "data": null, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "properties": { "data": { - "description": "Always null on success.", - "type": "null" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -50168,9 +49696,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -50178,36 +49703,33 @@ "$ref": "#/components/responses/ServerError" } }, - "security": [ - { - "AppKeyAuth": [] - } - ], - "summary": "Delete A2A agent", + "summary": "Enable preset severity rule", "tags": [ - "AI SRE/A2A agents" + "RUM/Issue preset severity rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- Delete is a soft delete; the agent stops appearing in list/get and can no longer be dispatched once removed.\n- Requires edit permission (`access.CanEdit`) on the agent's team.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `ResourceNotFound` if `rule_id` does not exist in the application.\n- Enabled rules are cached for up to 5 seconds, so the effect on newly ingested errors can lag by a few seconds.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/issue-preset-severity-rules/rum-issue-preset-severity-rules-enable", "metadata": { - "sidebarTitle": "Delete A2A agent" + "sidebarTitle": "Enable preset severity rule" } } } }, - "/safari/a2a-agent/disable": { + "/rum/issue/preset-severity/rules/history/list": { "post": { - "description": "Disable an enabled A2A agent.", - "operationId": "remote-agent-write-disable", + "description": "Return the change history of preset severity rules for a RUM application.", + "operationId": "rum-issue-preset-severity-rules-history-list", "requestBody": { "content": { "application/json": { "example": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "limit": 20, + "p": 0 }, "schema": { - "$ref": "#/components/schemas/A2AAgentIDRequest" + "$ref": "#/components/schemas/RumPresetSeverityRuleHistoryListRequest" } } }, @@ -50218,19 +49740,134 @@ "content": { "application/json": { "example": { - "data": null, + "data": { + "has_next_page": false, + "items": [ + { + "rules": [ + { + "account_id": 3790925372131, + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "created_at": 1785744052160, + "created_by": 3790925372131, + "deleted_at": 0, + "description": "Downgrade known extension errors to Info", + "filters": [ + [ + { + "key": "error.error_message", + "oper": "IN", + "vals": [ + "/^ResizeObserver loop.*|.*chrome-extension:\\/\\/.*/" + ] + } + ] + ], + "id": 4820, + "priority": 1, + "rule_id": "n8mZQ2VbXk4wPRs6DfC9Ay", + "rule_name": "Known noisy browser extension errors", + "severity": "Info", + "status": "enabled", + "updated_at": 1785744052160, + "updated_by": 3790925372131 + }, + { + "account_id": 3790925372131, + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "created_at": 1785830452160, + "created_by": 3790925372131, + "deleted_at": 0, + "description": "Escalate production crashes to Critical severity", + "filters": [ + [ + { + "key": "error.env", + "oper": "IN", + "vals": [ + "production" + ] + }, + { + "key": "error.is_crash", + "oper": "IN", + "vals": [ + "true" + ] + } + ] + ], + "id": 4821, + "priority": 2, + "rule_id": "TAHUYnQmXKzgMS4TFVUKvz", + "rule_name": "Critical crash spikes", + "severity": "Critical", + "status": "enabled", + "updated_at": 1785830452160, + "updated_by": 3790925372131 + } + ], + "updated_at": 1785916852160, + "updated_by": 2476444212131, + "updated_by_name": "Alice Chen", + "version": 3 + }, + { + "rules": [ + { + "account_id": 3790925372131, + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "created_at": 1785744052160, + "created_by": 3790925372131, + "deleted_at": 0, + "description": "Downgrade known extension errors to Info", + "filters": [ + [ + { + "key": "error.error_message", + "oper": "IN", + "vals": [ + "/^ResizeObserver loop.*|.*chrome-extension:\\/\\/.*/" + ] + } + ] + ], + "id": 4820, + "priority": 1, + "rule_id": "n8mZQ2VbXk4wPRs6DfC9Ay", + "rule_name": "Known noisy browser extension errors", + "severity": "Info", + "status": "enabled", + "updated_at": 1785744052160, + "updated_by": 3790925372131 + } + ], + "updated_at": 1785830452160, + "updated_by": 3790925372131, + "updated_by_name": "Bob Zhang", + "version": 2 + }, + { + "rules": [], + "updated_at": 1785744052160, + "updated_by": 3790925372131, + "updated_by_name": "Bob Zhang", + "version": 1 + } + ], + "total": 3 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "properties": { "data": { - "description": "Always null on success.", - "type": "null" + "$ref": "#/components/schemas/RumPresetSeverityRuleHistoryListResponse" } }, "type": "object" @@ -50247,9 +49884,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -50257,36 +49891,32 @@ "$ref": "#/components/responses/ServerError" } }, - "security": [ - { - "AppKeyAuth": [] - } - ], - "summary": "Disable A2A agent", + "summary": "List preset severity rule history", "tags": [ - "AI SRE/A2A agents" + "RUM/Issue preset severity rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- Requires edit permission (`access.CanEdit`) on the agent's team.\n- Returns `InvalidParameter` if the agent is already disabled.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-disable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Each entry is an application-level snapshot of every rule as it existed immediately *before* the mutation that produced it — not a diff. A fresh snapshot is written before every create/update/enable/disable/delete/reorder/revert call that actually changes something — an `update` carrying none of the mutable fields returns success without writing one — so `version=1` is typically an empty rule set captured just before the first rule was ever created.\n- `rules` items carry the full internal row (including `account_id`, `created_by`, `id`, `deleted_at`), which is a wider shape than the one returned by `rules/list`.\n- `limit` defaults to 20 and is silently capped at 100 rather than rejected.\n- `orderby` accepts only `updated_at` or `version`; any other value (including omitted) falls back to `updated_at` rather than erroring.\n- Results sort descending by default; pass `asc=true` for ascending order.", + "href": "/en/api-reference/rum/issue-preset-severity-rules/rum-issue-preset-severity-rules-history-list", "metadata": { - "sidebarTitle": "Disable A2A agent" + "sidebarTitle": "List preset severity rule history" } } } }, - "/safari/a2a-agent/enable": { + "/rum/issue/preset-severity/rules/history/revert": { "post": { - "description": "Enable a disabled A2A agent.", - "operationId": "remote-agent-write-enable", + "description": "Roll back preset severity rules to the state captured in a specific history snapshot.", + "operationId": "rum-issue-preset-severity-rules-history-revert", "requestBody": { "content": { "application/json": { "example": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "version": 2 }, "schema": { - "$ref": "#/components/schemas/A2AAgentIDRequest" + "$ref": "#/components/schemas/RumPresetSeverityRuleHistoryRevertRequest" } } }, @@ -50297,19 +49927,18 @@ "content": { "application/json": { "example": { - "data": null, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "properties": { "data": { - "description": "Always null on success.", - "type": "null" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -50326,9 +49955,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -50336,36 +49962,31 @@ "$ref": "#/components/responses/ServerError" } }, - "security": [ - { - "AppKeyAuth": [] - } - ], - "summary": "Enable A2A agent", + "summary": "Revert preset severity rules to a history snapshot", "tags": [ - "AI SRE/A2A agents" + "RUM/Issue preset severity rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- Requires edit permission (`access.CanEdit`) on the agent's team, not just visibility into it.\n- Returns `InvalidParameter` if the agent is already enabled.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-enable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Replaces the entire current rule set with the snapshot's rows: `rule_id`, `priority`, `filters`, `severity`, `status`, and `created_by` are preserved from the snapshot, but `created_at`/`updated_at` are reset to the revert time and `updated_by` is set to the reverting user.\n- Returns `InvalidParameter` (not `ResourceNotFound`) when `version` does not correspond to an existing history snapshot for the application.\n- The revert itself is captured as a new history snapshot before it is applied, so a revert can itself be reverted.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/issue-preset-severity-rules/rum-issue-preset-severity-rules-history-revert", "metadata": { - "sidebarTitle": "Enable A2A agent" + "sidebarTitle": "Revert preset severity rules to a history snapshot" } } } }, - "/safari/a2a-agent/get": { + "/rum/issue/preset-severity/rules/list": { "post": { - "description": "Get one A2A agent by ID.", - "operationId": "remote-agent-read-get", + "description": "Return all preset severity rules configured for a RUM application.", + "operationId": "rum-issue-preset-severity-rules-list", "requestBody": { "content": { "application/json": { "example": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" + "application_id": "WoyQQ3BohkdtPivubEvE8o" }, "schema": { - "$ref": "#/components/schemas/A2AAgentIDRequest" + "$ref": "#/components/schemas/RumPresetSeverityRuleListRequest" } } }, @@ -50377,42 +49998,69 @@ "application/json": { "example": { "data": { - "account_id": 10023, - "agent_card_name": "Deploy Bot", - "agent_card_skills": [ - "rollback", - "diff" - ], - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", - "agent_name": "deploy-bot", - "auth_mode": "shared", - "auth_type": "bearer", - "can_edit": true, - "card_resolve_timeout": 0, - "card_url": "https://agents.example.com/deploy-bot/card", - "created_at": 1716960000000, - "created_by": 80011, - "environments": [ - "env_8s7Hn2kLpQ3xYbVc4Wd2m" - ], - "instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.", - "status": "enabled", - "streaming": true, - "task_timeout": 0, - "team_id": 0, - "updated_at": 1717046400000 + "items": [ + { + "created_at": 1785744052160, + "description": "Downgrade known extension errors to Info", + "filters": [ + [ + { + "key": "error.error_message", + "oper": "IN", + "vals": [ + "/^ResizeObserver loop.*|.*chrome-extension:\\/\\/.*/" + ] + } + ] + ], + "priority": 1, + "rule_id": "n8mZQ2VbXk4wPRs6DfC9Ay", + "rule_name": "Known noisy browser extension errors", + "severity": "Info", + "status": "disabled", + "updated_at": 1785916852160 + }, + { + "created_at": 1785830452160, + "description": "Escalate production crashes to Critical severity", + "filters": [ + [ + { + "key": "error.env", + "oper": "IN", + "vals": [ + "production" + ] + }, + { + "key": "error.is_crash", + "oper": "IN", + "vals": [ + "true" + ] + } + ] + ], + "priority": 2, + "rule_id": "TAHUYnQmXKzgMS4TFVUKvz", + "rule_name": "Critical crash spikes", + "severity": "Critical", + "status": "enabled", + "updated_at": 1785830452160 + } + ] }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "properties": { "data": { - "$ref": "#/components/schemas/A2AAgentItem" + "$ref": "#/components/schemas/RumPresetSeverityRuleListResponse" } }, "type": "object" @@ -50436,38 +50084,33 @@ "$ref": "#/components/responses/ServerError" } }, - "security": [ - { - "AppKeyAuth": [] - } - ], - "summary": "Get A2A agent detail", + "summary": "List preset severity rules", "tags": [ - "AI SRE/A2A agents" + "RUM/Issue preset severity rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `card_resolve_timeout` and `task_timeout` are always `0` today — the API does not yet expose a way to set them.\n", - "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-read-get", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Rules are returned ordered by `priority` ascending, then `created_at` ascending — the same order they are evaluated in.\n- Only enabled rules are evaluated against incoming errors; the first enabled rule (in priority order) whose filters match an error wins and assigns its `severity`. Errors matching no enabled rule keep their default severity.", + "href": "/en/api-reference/rum/issue-preset-severity-rules/rum-issue-preset-severity-rules-list", "metadata": { - "sidebarTitle": "Get A2A agent detail" + "sidebarTitle": "List preset severity rules" } } } }, - "/safari/a2a-agent/list": { + "/rum/issue/preset-severity/rules/reorder": { "post": { - "description": "List A2A agents visible to the caller across account and team scopes, with pagination.", - "operationId": "remote-agent-read-list", + "description": "Move one preset severity rule to another rule's position in evaluation order.", + "operationId": "rum-issue-preset-severity-rules-reorder", "requestBody": { "content": { "application/json": { "example": { - "include_account": true, - "limit": 20, - "offset": 0 + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "drag_rule_id": "n8mZQ2VbXk4wPRs6DfC9Ay", + "target_rule_id": "TAHUYnQmXKzgMS4TFVUKvz" }, "schema": { - "$ref": "#/components/schemas/A2AAgentListRequest" + "$ref": "#/components/schemas/RumPresetSeverityRuleReorderRequest" } } }, @@ -50478,48 +50121,18 @@ "content": { "application/json": { "example": { - "data": { - "items": [ - { - "account_id": 10023, - "agent_card_name": "Deploy Bot", - "agent_card_skills": [ - "rollback", - "diff" - ], - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", - "agent_name": "deploy-bot", - "auth_mode": "shared", - "auth_type": "bearer", - "can_edit": true, - "card_resolve_timeout": 0, - "card_url": "https://agents.example.com/deploy-bot/card", - "created_at": 1716960000000, - "created_by": 80011, - "environments": [ - "env_8s7Hn2kLpQ3xYbVc4Wd2m" - ], - "instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.", - "status": "enabled", - "streaming": true, - "task_timeout": 0, - "team_id": 0, - "updated_at": 1717046400000 - } - ], - "total": 1 - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "properties": { "data": { - "$ref": "#/components/schemas/A2AAgentListResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -50543,37 +50156,34 @@ "$ref": "#/components/responses/ServerError" } }, - "security": [ - { - "AppKeyAuth": [] - } - ], - "summary": "List A2A agents", + "summary": "Reorder preset severity rule", "tags": [ - "AI SRE/A2A agents" + "RUM/Issue preset severity rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Pagination uses `offset`/`limit` (not `p`/`limit`).\n- `scope=account` restricts to account-scoped agents; `scope=team` restricts to the caller's visible teams; the default `all` combines both, subject to `include_account`.\n- `query` performs a case-insensitive substring search across agent name, instructions, card URL, agent ID, and the resolved card name.\n- `card_resolve_timeout` and `task_timeout` are always `0` today — the API does not yet expose a way to set them.\n", - "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- This moves exactly one rule, not a full reordering: `drag_rule_id`'s `priority` is set to `target_rule_id`'s current `priority`, and every rule between the two original positions — the target rule itself included — shifts by one to close the gap.\n- Lower `priority` numbers are evaluated first; moving toward a lower-numbered target moves the rule earlier in evaluation order, and toward a higher-numbered target moves it later.\n- Returns `ResourceNotFound` if either `drag_rule_id` or `target_rule_id` does not exist in the application.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/issue-preset-severity-rules/rum-issue-preset-severity-rules-reorder", "metadata": { - "sidebarTitle": "List A2A agents" + "sidebarTitle": "Reorder preset severity rule" } } } }, - "/safari/a2a-agent/update": { + "/rum/issue/preset-severity/rules/update": { "post": { - "description": "Apply a partial update to an A2A agent. Omit a field to leave it unchanged.", - "operationId": "remote-agent-write-update", + "description": "Update the name, description, filters, or severity of a preset severity rule.", + "operationId": "rum-issue-preset-severity-rules-update", "requestBody": { "content": { "application/json": { "example": { - "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", - "instructions": "Inspect deployment pipelines and propose rollbacks." + "application_id": "WoyQQ3BohkdtPivubEvE8o", + "rule_id": "TAHUYnQmXKzgMS4TFVUKvz", + "rule_name": "Critical crash spikes (updated)", + "severity": "Critical" }, "schema": { - "$ref": "#/components/schemas/A2AAgentUpdateRequest" + "$ref": "#/components/schemas/RumPresetSeverityRuleUpdateRequest" } } }, @@ -50584,19 +50194,18 @@ "content": { "application/json": { "example": { - "data": null, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "properties": { "data": { - "description": "Always null on success.", - "type": "null" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -50613,9 +50222,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -50623,36 +50229,32 @@ "$ref": "#/components/responses/ServerError" } }, - "security": [ - { - "AppKeyAuth": [] - } - ], - "summary": "Update A2A agent", + "summary": "Update preset severity rule", "tags": [ - "AI SRE/A2A agents" + "RUM/Issue preset severity rules" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- Requires edit permission (`access.CanEdit`) on the agent's *current* team before any field may change.\n- Reassigning `team_id` requires rights on the destination team; if the team changes without also sending a new environment binding, the existing runner binding must remain selectable by the caller or the update is rejected.\n- Changing `auth_mode` always rewrites `secret_schema` together with it; omitting `oauth_metadata` alongside a new `auth_mode` clears it to empty.\n- Sending back a masked or empty value for a sensitive `auth_config` key (`api_key`, `token`, `client_secret`) keeps the stored secret instead of overwriting it.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Only fields present in the request are changed; omitted fields keep their current value.\n- Returns `ResourceNotFound` if `rule_id` does not exist in the application.\n- If `filters` is provided it replaces the entire filter structure and is revalidated against the same allowed key set as `create`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/issue-preset-severity-rules/rum-issue-preset-severity-rules-update", "metadata": { - "sidebarTitle": "Update A2A agent" + "sidebarTitle": "Update preset severity rule" } } } }, - "/safari/artifact/gallery/delete": { + "/rum/issue/update": { "post": { - "description": "Detach an artifact from the gallery; the source file stays with its session.", - "operationId": "artifact-write-delete", + "description": "Update the status or suspected cause of an issue.", + "operationId": "rum-issue-write-update", "requestBody": { "content": { "application/json": { "example": { - "artifact_id": "art_CWQzDU2PXSRJvKDhQbuMKu" + "issue_id": "NHEacQHi2DhXqobr9qPQz9", + "status": "resolved" }, "schema": { - "$ref": "#/components/schemas/ArtifactIdRequest" + "$ref": "#/components/schemas/RumIssueUpdateRequest" } } }, @@ -50663,19 +50265,18 @@ "content": { "application/json": { "example": { - "data": null, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "properties": { "data": { - "description": "Always null on success.", - "type": "null" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -50699,39 +50300,31 @@ "$ref": "#/components/responses/ServerError" } }, - "security": [ - { - "AppKeyAuth": [] - } - ], - "summary": "Remove artifact from gallery", + "summary": "Update issue", "tags": [ - "AI SRE/Artifacts" + "RUM/Issues" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- This is a detach, not a byte delete: the underlying presented file stays with the source session and can be published again.\n- If public sharing was enabled, the public objects are destroyed in the same operation and the link stops resolving.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/artifacts/artifact-write-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `status` valid values: `for_review`, `reviewed`, `ignored`, `resolved`.\n- `suspected_cause` valid values: `api.failed_request`, `network.error`, `code.exception`, `code.invalid_object_access`, `code.invalid_argument`, `unknown`.\n- Setting `status` to `resolved` also stamps `resolved_at` and `resolved_by` on the issue; moving a resolved issue back to another status clears them.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/rum/issues/rum-issue-write-update", "metadata": { - "sidebarTitle": "Remove artifact from gallery" + "sidebarTitle": "Update issue" } } } }, - "/safari/artifact/gallery/file-state": { + "/rum/resource/info": { "post": { - "description": "Check which presented files already have a live published artifact.", - "operationId": "artifact-read-get-file-state", + "description": "Return the account's RUM resource record and its current session usage.", + "operationId": "rum-resource-read-info", "requestBody": { "content": { "application/json": { "example": { - "file_ids": [ - "pf_SdhEA5fbZJGnHzwrNJMMSB", - "pf_9kLm2nQpRsTuVwXyZaBcDe" - ] + "no_cache": false }, "schema": { - "$ref": "#/components/schemas/ArtifactFileStateRequest" + "$ref": "#/components/schemas/RumResourceInfoRequest" } } }, @@ -50743,26 +50336,43 @@ "application/json": { "example": { "data": { - "items": [ - { - "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", - "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", - "gallery_path": "/ai-sre/artifacts/art_VnfrWic8UbB9q3EfYR4Gmg", - "title": "SK 海力士 2026 Q2 财报深度分析" - } - ] + "account_id": 2451002751131, + "action.days": 30, + "created_at": 1750000000, + "error.days": 30, + "long_task.days": 15, + "offering_id": 11, + "order_id": "fd_order_20250615_8f3a1c2b", + "product": "rum", + "resource.days": 15, + "resource_id": "rum_2451002751131", + "resource_name": "rum_2451002751131", + "session.days": 30, + "session_investigate.free_cnt": 0, + "session_investigate.used_cnt": 5230, + "session_limit_reached": false, + "session_measure.free_cnt": 0, + "session_measure.used_cnt": 128400, + "session_replay.free_cnt": 0, + "session_replay.used_cnt": 812, + "status": "enabled", + "updated_at": 1752000000, + "version": "professional", + "view.days": 30, + "window_end_time": 1752592000, + "window_start_time": 1750000000 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "properties": { "data": { - "$ref": "#/components/schemas/ArtifactFileStateResponse" + "$ref": "#/components/schemas/RumResourceItem" } }, "type": "object" @@ -50786,36 +50396,31 @@ "$ref": "#/components/responses/ServerError" } }, - "security": [ - { - "AppKeyAuth": [] - } - ], - "summary": "Get file publish state", + "summary": "Get RUM resource info", "tags": [ - "AI SRE/Artifacts" + "RUM/Resources" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- At most 50 `file_ids` per call; duplicates and empty strings are ignored.\n- Files with no live published artifact are simply absent from `items` — match results by the echoed `file_id`.\n", - "href": "/en/api-reference/ai-sre/artifacts/artifact-read-get-file-state", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `ResourceNotFound` when the account has no RUM resource provisioned yet, or when the resource's status is `deleted`/`destroyed`.\n- `no_cache=true` bypasses the short-lived cache of the resource record itself (plan version, quotas, status). The `used_cnt` figures come from a separate hourly cache that this flag does not affect, so they can lag behind live usage either way.\n- The used-count fields reflect the current 30-day billing window (`window_start_time` to `window_end_time`), not lifetime totals.\n- `expired_at` is only populated on on-premises deployments, from the license expiry date; it is omitted entirely for SaaS accounts.\n- For `version=free` accounts, `session_limit_reached` is `true` once usage exceeds the combined free quota across all applications (per-app free quota × application count); it stays `false` while the account has no applications yet.", + "href": "/en/api-reference/rum/resources/rum-resource-read-info", "metadata": { - "sidebarTitle": "Get file publish state" + "sidebarTitle": "Get RUM resource info" } } } }, - "/safari/artifact/gallery/get": { + "/rum/session-replay/metadata": { "post": { - "description": "Get a single published artifact by ID.", - "operationId": "artifact-read-get", + "description": "Return the application, device, session bounds, and views recorded for a replayable session.", + "operationId": "rum-session-replay-read-metadata", "requestBody": { "content": { "application/json": { "example": { - "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg" + "session_id": "0a4a2e64-8a4f-4b9a-9c1e-3a2f9e6d7c81" }, "schema": { - "$ref": "#/components/schemas/ArtifactIdRequest" + "$ref": "#/components/schemas/RumSessionReplayMetaRequest" } } }, @@ -50827,39 +50432,47 @@ "application/json": { "example": { "data": { - "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", - "can_edit": true, - "content_type": "text/html", - "created_at": 1785293373899, - "creator_name": "yushuangyu", - "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", - "is_mine": true, - "name": "sk-hynix-q2-2026-report.html", - "person_id": 2476444212131, - "public_url": "https://console.flashcat.cloud/share/artifact/art_VnfrWic8UbB9q3EfYR4Gmg", - "session_id": "sess_VCbVPZrq9YoyBu8sNCmqUy", - "session_title": "分析海力士财报并发布报告", - "share_enabled": true, - "share_file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", - "shared_at": 1785747928665, - "shared_by": 3790925372131, - "size": 18996, - "team_id": 2477033058131, - "team_name": "研发团队", - "title": "SK 海力士 2026 Q2 财报深度分析", - "updated_at": 1785747910219 + "application": { + "id": "WoyQQ3BohkdtPivubEvE8o" + }, + "device": { + "type": "desktop" + }, + "foreground_periods": [], + "session": { + "end": 1752480600000, + "is_active": false, + "server_time_delta": 0, + "source": "browser", + "start": 1752480000000 + }, + "views": [ + { + "container_source": "", + "container_view_id": "", + "end": 1752480600000, + "is_active": false, + "loading_type": "initial_load", + "name": "/dashboard", + "server_time_delta": 0, + "source": "browser", + "start": 1752480000000, + "url": "https://app.example.com/dashboard", + "view_id": "6f2b6b1a-8f7e-4e3a-9c2b-1a2b3c4d5e6f" + } + ] }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "properties": { "data": { - "$ref": "#/components/schemas/PublishedArtifactItem" + "$ref": "#/components/schemas/RumSessionReplayMetaItem" } }, "type": "object" @@ -50883,38 +50496,33 @@ "$ref": "#/components/responses/ServerError" } }, - "security": [ - { - "AppKeyAuth": [] - } - ], - "summary": "Get artifact detail", + "summary": "Get session replay metadata", "tags": [ - "AI SRE/Artifacts" + "RUM/Session replay" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Visibility is account-wide: any valid `app_key` can read any artifact in the account. `is_mine` and `can_edit` are computed relative to the key owner.\n- When `share_enabled` is true and `file_id` differs from `share_file_id`, the public snapshot is stale — refresh it with `/safari/artifact/gallery/share/sync`.\n", - "href": "/en/api-reference/ai-sre/artifacts/artifact-read-get", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `InvalidParameter` if the session does not exist, or if it has no replay data recorded (`session_has_replay` is false).\n- Returns `InvalidParameter` if no views are found within the session's time window.\n- Pass `ts` to disambiguate when a `session_id` has been reused across different time windows.", + "href": "/en/api-reference/rum/session-replay/rum-session-replay-read-metadata", "metadata": { - "sidebarTitle": "Get artifact detail" + "sidebarTitle": "Get session replay metadata" } } } }, - "/safari/artifact/gallery/list": { + "/rum/session-replay/segments": { "post": { - "description": "List published artifacts visible to the caller, with pagination and title search.", - "operationId": "artifact-read-list", + "description": "Page through the recorded replay segments of a session, as presigned URLs or a raw stream.", + "operationId": "rum-session-replay-read-segments", "requestBody": { "content": { "application/json": { "example": { "limit": 20, - "page": 1, - "scope": "all" + "session_id": "0a4a2e64-8a4f-4b9a-9c1e-3a2f9e6d7c81", + "url_mode": true }, "schema": { - "$ref": "#/components/schemas/ArtifactListRequest" + "$ref": "#/components/schemas/RumSessionReplaySegmentsRequest" } } }, @@ -50927,70 +50535,45 @@ "example": { "data": { "items": [ - { - "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", - "can_edit": true, - "content_type": "text/html", - "created_at": 1785293373899, - "creator_name": "yushuangyu", - "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", - "is_mine": true, - "name": "sk-hynix-q2-2026-report.html", - "person_id": 2476444212131, - "public_url": "https://console.flashcat.cloud/share/artifact/art_VnfrWic8UbB9q3EfYR4Gmg", - "session_id": "sess_VCbVPZrq9YoyBu8sNCmqUy", - "session_title": "分析海力士财报并发布报告", - "share_enabled": true, - "share_file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", - "shared_at": 1785747928665, - "shared_by": 3790925372131, - "size": 18996, - "team_id": 2477033058131, - "team_name": "研发团队", - "title": "SK 海力士 2026 Q2 财报深度分析", - "updated_at": 1785747910219 - }, - { - "artifact_id": "art_CWQzDU2PXSRJvKDhQbuMKu", - "can_edit": true, - "content_type": "application/pdf", - "created_at": 1785229432881, - "creator_name": "牛伟利", - "file_id": "pf_Jnc4E5YBcWLGzunB4ntP9s", - "is_mine": false, - "name": "rum_recommendation.pdf", - "person_id": 3790925372131, - "session_id": "sess_QXUC9C2PYWP5EE7vETR3UD", - "session_title": "生成 RUM 文档多格式", - "size": 137107, - "team_id": 2477033058131, - "team_name": "研发团队", - "title": "rum_recommendation", - "updated_at": 1785741344822 - } + "https://rum-replay.flashcat.cloud/short-term/2451002751131/0a4a2e64-8a4f-4b9a-9c1e-3a2f9e6d7c81/segments/1752480001234?X-Amz-Signature=example", + "https://rum-replay.flashcat.cloud/short-term/2451002751131/0a4a2e64-8a4f-4b9a-9c1e-3a2f9e6d7c81/segments/1752480032456?X-Amz-Signature=example" ], - "total": 17 + "search_after_ctx": "c2hvcnQtdGVybS8yNDUxMDAyNzUxMTMxLzBhNGEyZTY0LThhNGYtNGI5YS05YzFlLTNhMmY5ZTZkN2M4MS9zZWdtZW50cy8xNzUyNDgwMDMyNDU2" }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R5" }, "schema": { "allOf": [ { - "$ref": "#/components/schemas/ResponseEnvelope" + "$ref": "#/components/schemas/SuccessEnvelope" }, { "properties": { "data": { - "$ref": "#/components/schemas/ArtifactListResponse" + "$ref": "#/components/schemas/RumSessionReplaySegmentsResult" } }, "type": "object" } ] } + }, + "application/x-ndjson": { + "schema": { + "description": "Newline-delimited JSON (NDJSON). Each line is one decompressed replay segment record (rrweb-format events), streamed directly and not wrapped in the standard envelope.", + "type": "string" + } } }, - "description": "Success" + "description": "Success. Shape depends on `url_mode` — see Usage.", + "headers": { + "X-Search-After-Ctx": { + "description": "Base64-encoded pagination cursor for the next call. Only set in streaming mode (`url_mode: false`).", + "schema": { + "type": "string" + } + } + } }, "400": { "$ref": "#/components/responses/BadRequest" @@ -51005,37 +50588,39 @@ "$ref": "#/components/responses/ServerError" } }, - "security": [ - { - "AppKeyAuth": [] - } - ], - "summary": "List artifacts", + "summary": "List session replay segments", "tags": [ - "AI SRE/Artifacts" + "RUM/Session replay" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `scope` selects `all` (default — the caller's own personal artifacts plus every team the caller belongs to), `personal` (only the caller's own), or `team` (only team-owned artifacts of the caller's teams).\n- `team_ids` narrows further to specific teams, intersected with the caller's visibility — teams the caller does not belong to return nothing.\n- Default sort is `updated_at` descending; set `orderby` to `created_at` to change the field and `asc: true` to flip direction.\n- For an `app_key` call, visibility is evaluated against the key owner's identity — the list shows that member's personal artifacts and their teams' artifacts.\n", - "href": "/en/api-reference/ai-sre/artifacts/artifact-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- When `url_mode` is `false` (default), the response streams `application/x-ndjson` — one decompressed replay segment JSON object per line — and is **not** wrapped in the standard envelope. The pagination cursor for the next call is returned in the `X-Search-After-Ctx` response header instead of a body field.\n- When `url_mode` is `true`, the response is a normal JSON envelope containing presigned download URLs (valid 1 hour) instead of the raw segment bytes.\n- Pass `ts` to seek to the most recent full-snapshot segment at or before that time, instead of paging from the start of the session.\n- `limit` accepts 1-99; values of 100 or more are rejected.", + "href": "/en/api-reference/rum/session-replay/rum-session-replay-read-segments", "metadata": { - "sidebarTitle": "List artifacts" + "sidebarTitle": "List session replay segments" } } } }, - "/safari/artifact/gallery/publish-from-file": { + "/safari/a2a-agent/create": { "post": { - "description": "Publish a session-produced file to the artifact gallery.", - "operationId": "artifact-write-publish", + "description": "Register a new A2A remote agent from its agent-card URL.", + "operationId": "remote-agent-write-create", "requestBody": { "content": { "application/json": { "example": { - "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", - "title": "SK 海力士 2026 Q2 财报深度分析" + "agent_name": "deploy-bot", + "auth_type": "bearer", + "card_url": "https://agents.example.com/deploy-bot/card", + "environments": [ + "env_8s7Hn2kLpQ3xYbVc4Wd2m" + ], + "instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.", + "streaming": true, + "team_id": 0 }, "schema": { - "$ref": "#/components/schemas/ArtifactPublishFromFileRequest" + "$ref": "#/components/schemas/A2AAgentCreateRequest" } } }, @@ -51047,9 +50632,7 @@ "application/json": { "example": { "data": { - "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", - "gallery_path": "/ai-sre/artifacts/art_VnfrWic8UbB9q3EfYR4Gmg", - "title": "SK 海力士 2026 Q2 财报深度分析" + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -51061,7 +50644,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ArtifactPublishResponse" + "$ref": "#/components/schemas/A2AAgentCreateResponse" } }, "type": "object" @@ -51078,6 +50661,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -51090,31 +50676,31 @@ "AppKeyAuth": [] } ], - "summary": "Publish file as artifact", + "summary": "Create A2A agent", "tags": [ - "AI SRE/Artifacts" + "AI SRE/A2A agents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Allowed file types: HTML/Markdown, images, PDF, text/data/code files, and zip/tar archives, matched by extension. Files over 16 MiB are rejected.\n- Publishing is an upsert keyed by the source session and workspace path — republishing the same file replaces the artifact's bytes under a fresh `file_id`, which makes an existing public snapshot stale until synced.\n- The artifact inherits personal/team scope from the source session; move it afterwards with `/safari/artifact/gallery/update` if needed.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/artifacts/artifact-write-publish", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- `instructions` is required; a deprecated `description` field is still accepted for legacy clients and, if both are sent, must exactly match `instructions`.\n- `card_url` must be an absolute `http`/`https` URL with a non-empty host (reachability is enforced by the execution environment, not here); `auth_type` accepts only `none`, `api_key`, or `bearer`.\n- `environments` restricts where the agent can run: a list of `cloud` and/or BYOC runner environment IDs; omitted or empty means all environments, and each runner must be visible to the caller.\n- Creating into a team (`team_id > 0`) requires the caller to actually belong to that team; only the account owner/admin may create at account scope (`team_id=0`).\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-create", "metadata": { - "sidebarTitle": "Publish file as artifact" + "sidebarTitle": "Create A2A agent" } } } }, - "/safari/artifact/gallery/share/enable": { + "/safari/a2a-agent/delete": { "post": { - "description": "Turn on anonymous public sharing for an artifact and return its public link.", - "operationId": "artifact-write-share-enable", + "description": "Soft-delete an A2A agent by ID.", + "operationId": "remote-agent-write-delete", "requestBody": { "content": { "application/json": { "example": { - "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg" + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" }, "schema": { - "$ref": "#/components/schemas/ArtifactIdRequest" + "$ref": "#/components/schemas/A2AAgentIDRequest" } } }, @@ -51125,13 +50711,7 @@ "content": { "application/json": { "example": { - "data": { - "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", - "public_url": "https://console.flashcat.cloud/share/artifact/art_VnfrWic8UbB9q3EfYR4Gmg", - "share_enabled": true, - "shared_at": 1785747928665, - "shared_by": 2476444212131 - }, + "data": null, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -51142,7 +50722,8 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ArtifactShareState" + "description": "Always null on success.", + "type": "null" } }, "type": "object" @@ -51159,6 +50740,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -51171,31 +50755,31 @@ "AppKeyAuth": [] } ], - "summary": "Enable public sharing", + "summary": "Delete A2A agent", "tags": [ - "AI SRE/Artifacts" + "AI SRE/A2A agents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The public link is anonymous — anyone with it can view the content, and the link may be forwarded. Content is copied to public CDN objects; the gallery API is not involved when the link is viewed.\n- Idempotent: enabling an already-shared artifact returns the existing link unchanged, and re-enabling after a revoke brings the same link back — the link is keyed by artifact ID.\n- Artifacts over 16 MiB cannot be shared; the call fails with `InvalidParameter`.\n- Sharing is a snapshot: later republishes do not update the public content until you call `/safari/artifact/gallery/share/sync`.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/artifacts/artifact-write-share-enable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- Delete is a soft delete; the agent stops appearing in list/get and can no longer be dispatched once removed.\n- Requires edit permission (`access.CanEdit`) on the agent's team.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-delete", "metadata": { - "sidebarTitle": "Enable public sharing" + "sidebarTitle": "Delete A2A agent" } } } }, - "/safari/artifact/gallery/share/revoke": { + "/safari/a2a-agent/disable": { "post": { - "description": "Turn off public sharing; the link stops resolving immediately.", - "operationId": "artifact-write-share-revoke", + "description": "Disable an enabled A2A agent.", + "operationId": "remote-agent-write-disable", "requestBody": { "content": { "application/json": { "example": { - "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg" + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" }, "schema": { - "$ref": "#/components/schemas/ArtifactIdRequest" + "$ref": "#/components/schemas/A2AAgentIDRequest" } } }, @@ -51235,6 +50819,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -51247,31 +50834,31 @@ "AppKeyAuth": [] } ], - "summary": "Revoke public sharing", + "summary": "Disable A2A agent", "tags": [ - "AI SRE/Artifacts" + "AI SRE/A2A agents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The public CDN objects are deleted, so the link stops resolving; this is a no-op when the artifact is not shared.\n- Re-enabling later returns the same `public_url` — the link is keyed by artifact ID, so revoke is not a way to rotate the link.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/artifacts/artifact-write-share-revoke", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- Requires edit permission (`access.CanEdit`) on the agent's team.\n- Returns `InvalidParameter` if the agent is already disabled.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-disable", "metadata": { - "sidebarTitle": "Revoke public sharing" + "sidebarTitle": "Disable A2A agent" } } } }, - "/safari/artifact/gallery/share/sync": { + "/safari/a2a-agent/enable": { "post": { - "description": "Refresh the public snapshot of a shared artifact with its latest content.", - "operationId": "artifact-write-share-sync", + "description": "Enable a disabled A2A agent.", + "operationId": "remote-agent-write-enable", "requestBody": { "content": { "application/json": { "example": { - "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg" + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" }, "schema": { - "$ref": "#/components/schemas/ArtifactIdRequest" + "$ref": "#/components/schemas/A2AAgentIDRequest" } } }, @@ -51282,13 +50869,7 @@ "content": { "application/json": { "example": { - "data": { - "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", - "public_url": "https://console.flashcat.cloud/share/artifact/art_VnfrWic8UbB9q3EfYR4Gmg", - "share_enabled": true, - "shared_at": 1785829900000, - "shared_by": 2476444212131 - }, + "data": null, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -51299,7 +50880,8 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ArtifactShareState" + "description": "Always null on success.", + "type": "null" } }, "type": "object" @@ -51316,6 +50898,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -51328,32 +50913,31 @@ "AppKeyAuth": [] } ], - "summary": "Update shared snapshot", + "summary": "Enable A2A agent", "tags": [ - "AI SRE/Artifacts" + "AI SRE/A2A agents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Fails with `InvalidParameter` when sharing is not enabled — enable it first.\n- The link never changes; only the snapshot bytes and `shared_at` are refreshed.\n- Use `share_file_id != file_id` on the artifact detail to detect a stale snapshot before syncing.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/artifacts/artifact-write-share-sync", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- Requires edit permission (`access.CanEdit`) on the agent's team, not just visibility into it.\n- Returns `InvalidParameter` if the agent is already enabled.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-enable", "metadata": { - "sidebarTitle": "Update shared snapshot" + "sidebarTitle": "Enable A2A agent" } } } }, - "/safari/artifact/gallery/update": { + "/safari/a2a-agent/get": { "post": { - "description": "Rename an artifact or transfer it between personal and team scope.", - "operationId": "artifact-write-update", + "description": "Get one A2A agent by ID.", + "operationId": "remote-agent-read-get", "requestBody": { "content": { "application/json": { "example": { - "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", - "title": "SK 海力士 2026 Q2 财报深度分析(终稿)" + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D" }, "schema": { - "$ref": "#/components/schemas/ArtifactUpdateRequest" + "$ref": "#/components/schemas/A2AAgentIDRequest" } } }, @@ -51365,27 +50949,30 @@ "application/json": { "example": { "data": { - "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "account_id": 10023, + "agent_card_name": "Deploy Bot", + "agent_card_skills": [ + "rollback", + "diff" + ], + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", + "agent_name": "deploy-bot", + "auth_mode": "shared", + "auth_type": "bearer", "can_edit": true, - "content_type": "text/html", - "created_at": 1785293373899, - "creator_name": "yushuangyu", - "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", - "is_mine": true, - "name": "sk-hynix-q2-2026-report.html", - "person_id": 2476444212131, - "public_url": "https://console.flashcat.cloud/share/artifact/art_VnfrWic8UbB9q3EfYR4Gmg", - "session_id": "sess_VCbVPZrq9YoyBu8sNCmqUy", - "session_title": "分析海力士财报并发布报告", - "share_enabled": true, - "share_file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", - "shared_at": 1785747928665, - "shared_by": 3790925372131, - "size": 18996, - "team_id": 2477033058131, - "team_name": "研发团队", - "title": "SK 海力士 2026 Q2 财报深度分析(终稿)", - "updated_at": 1785829000000 + "card_resolve_timeout": 0, + "card_url": "https://agents.example.com/deploy-bot/card", + "created_at": 1716960000000, + "created_by": 80011, + "environments": [ + "env_8s7Hn2kLpQ3xYbVc4Wd2m" + ], + "instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.", + "status": "enabled", + "streaming": true, + "task_timeout": 0, + "team_id": 0, + "updated_at": 1717046400000 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -51397,7 +50984,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/PublishedArtifactItem" + "$ref": "#/components/schemas/A2AAgentItem" } }, "type": "object" @@ -51426,31 +51013,33 @@ "AppKeyAuth": [] } ], - "summary": "Update artifact", + "summary": "Get A2A agent detail", "tags": [ - "AI SRE/Artifacts" + "AI SRE/A2A agents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Only the provided fields change — omit `title` or `team_id` to leave them unchanged.\n- `team_id: 0` moves the artifact to personal scope (only the creator can manage it); a positive `team_id` requires the caller (for `app_key` calls, the key owner) to be a member of that team.\n- Returns the full artifact after the update.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/artifacts/artifact-write-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `card_resolve_timeout` and `task_timeout` are always `0` today — the API does not yet expose a way to set them.\n", + "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-read-get", "metadata": { - "sidebarTitle": "Update artifact" + "sidebarTitle": "Get A2A agent detail" } } } }, - "/safari/artifact/sign": { + "/safari/a2a-agent/list": { "post": { - "description": "Create short-lived signed URLs to download or preview a presented file.", - "operationId": "artifact-read-sign", + "description": "List A2A agents visible to the caller across account and team scopes, with pagination.", + "operationId": "remote-agent-read-list", "requestBody": { "content": { "application/json": { "example": { - "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB" + "include_account": true, + "limit": 20, + "offset": 0 }, "schema": { - "$ref": "#/components/schemas/ArtifactSignRequest" + "$ref": "#/components/schemas/A2AAgentListRequest" } } }, @@ -51462,12 +51051,35 @@ "application/json": { "example": { "data": { - "content_type": "text/html", - "download_url": "/safari/artifact/stream?mode=download&t=cGZfU2RoRUE1ZmJaSkduSHp3ck5KTU1TQnxzZXNzX1ZDYlZQWnJxOVlveUJ1OHNOQ21xVXl8MjQ1MTAwMjc1MTEzMXwyNDc2NDQ0MjEyMTMxfDB8MHwxNzg4NTI5NjI2NTU0.hPQHab0MBNbnrHYwc6VwDJbGonIamfWUr0yeSmLHYAs", - "expires_in": 300, - "name": "sk-hynix-q2-2026-report.html", - "preview_url": "/safari/artifact/stream?mode=preview&t=cGZfU2RoRUE1ZmJaSkduSHp3ck5KTU1TQnxzZXNzX1ZDYlZQWnJxOVlveUJ1OHNOQ21xVXl8MjQ1MTAwMjc1MTEzMXwyNDc2NDQ0MjEyMTMxfDB8MHwxNzg4NTI5NjI2NTU0.hPQHab0MBNbnrHYwc6VwDJbGonIamfWUr0yeSmLHYAs", - "size": 18996 + "items": [ + { + "account_id": 10023, + "agent_card_name": "Deploy Bot", + "agent_card_skills": [ + "rollback", + "diff" + ], + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", + "agent_name": "deploy-bot", + "auth_mode": "shared", + "auth_type": "bearer", + "can_edit": true, + "card_resolve_timeout": 0, + "card_url": "https://agents.example.com/deploy-bot/card", + "created_at": 1716960000000, + "created_by": 80011, + "environments": [ + "env_8s7Hn2kLpQ3xYbVc4Wd2m" + ], + "instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.", + "status": "enabled", + "streaming": true, + "task_timeout": 0, + "team_id": 0, + "updated_at": 1717046400000 + } + ], + "total": 1 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -51479,7 +51091,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/SignedURLs" + "$ref": "#/components/schemas/A2AAgentListResponse" } }, "type": "object" @@ -51508,62 +51120,64 @@ "AppKeyAuth": [] } ], - "summary": "Create signed file URLs", + "summary": "List A2A agents", "tags": [ - "AI SRE/Artifacts" + "AI SRE/A2A agents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Both URLs expire after `expires_in` seconds (300). Sign again to get fresh URLs.\n- Returned URLs are relative — prepend `https://api.flashcat.cloud` before use, then follow them with `GET /safari/artifact/stream`.\n- The signed token is bound to the calling account and the app_key owner's identity, so a leaked URL does not work for another account or member.\n", - "href": "/en/api-reference/ai-sre/artifacts/artifact-read-sign", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Pagination uses `offset`/`limit` (not `p`/`limit`).\n- `scope=account` restricts to account-scoped agents; `scope=team` restricts to the caller's visible teams; the default `all` combines both, subject to `include_account`.\n- `query` performs a case-insensitive substring search across agent name, instructions, card URL, agent ID, and the resolved card name.\n- `card_resolve_timeout` and `task_timeout` are always `0` today — the API does not yet expose a way to set them.\n", + "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-read-list", "metadata": { - "sidebarTitle": "Create signed file URLs" + "sidebarTitle": "List A2A agents" } } } }, - "/safari/artifact/stream": { - "get": { - "description": "Download or preview a file's bytes using a signed token.", - "operationId": "artifact-read-stream", - "parameters": [ - { - "description": "Signed token issued by `POST /safari/artifact/sign`. Bound to the calling account and person; valid for 5 minutes.", - "in": "query", - "name": "t", - "required": true, - "schema": { - "type": "string" + "/safari/a2a-agent/update": { + "post": { + "description": "Apply a partial update to an A2A agent. Omit a field to leave it unchanged.", + "operationId": "remote-agent-write-update", + "requestBody": { + "content": { + "application/json": { + "example": { + "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", + "instructions": "Inspect deployment pipelines and propose rollbacks." + }, + "schema": { + "$ref": "#/components/schemas/A2AAgentUpdateRequest" + } } }, - { - "description": "`download` (default) serves the file as an attachment; `preview` serves it inline for browser display. Any other value falls back to `download`.", - "in": "query", - "name": "mode", - "required": false, - "schema": { - "default": "download", - "enum": [ - "download", - "preview" - ], - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "content": { - "application/octet-stream": { + "application/json": { + "example": { + "data": null, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, "schema": { - "format": "binary", - "type": "string" + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "properties": { + "data": { + "description": "Always null on success.", + "type": "null" + } + }, + "type": "object" + } + ] } } }, - "description": "File bytes, proxied, when the file is hosted on a self-hosted runner. Content-Disposition follows `mode`." - }, - "302": { - "description": "Redirect to a short-lived presigned object-storage URL when the file lives in S3-compatible storage. Follow the `Location` header; no body." + "description": "Success" }, "400": { "$ref": "#/components/responses/BadRequest" @@ -51571,6 +51185,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -51583,46 +51200,31 @@ "AppKeyAuth": [] } ], - "summary": "Download or preview a file", + "summary": "Update A2A agent", "tags": [ - "AI SRE/Artifacts" + "AI SRE/A2A agents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/minute**; **10 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Success has two forms: a `302` redirect to a short-lived presigned object-storage URL (files stored in S3-compatible storage), or a `200` binary stream (files hosted on a self-hosted runner). Follow redirects.\n- Responses carry `Cache-Control: private, no-store` — they are never cached by the gateway.\n", - "href": "/en/api-reference/ai-sre/artifacts/artifact-read-stream", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- Requires edit permission (`access.CanEdit`) on the agent's *current* team before any field may change.\n- Reassigning `team_id` requires rights on the destination team; if the team changes without also sending a new environment binding, the existing runner binding must remain selectable by the caller or the update is rejected.\n- Changing `auth_mode` always rewrites `secret_schema` together with it; omitting `oauth_metadata` alongside a new `auth_mode` clears it to empty.\n- Sending back a masked or empty value for a sensitive `auth_config` key (`api_key`, `token`, `client_secret`) keeps the stored secret instead of overwriting it.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-update", "metadata": { - "sidebarTitle": "Download or preview a file" + "sidebarTitle": "Update A2A agent" } } } }, - "/safari/automation/rule/create": { + "/safari/artifact/gallery/delete": { "post": { - "description": "Create an Automation rule with schedule, HTTP POST, and On-call incident triggers.", - "operationId": "automation-rule-write-create", + "description": "Detach an artifact from the gallery; the source file stays with its session.", + "operationId": "artifact-write-delete", "requestBody": { "content": { "application/json": { "example": { - "cron_expr": "0 9 * * 1", - "enabled": true, - "http_post_trigger_enabled": true, - "name": "Weekly on-call review", - "oncall_incident_channel_ids": [ - 456 - ], - "oncall_incident_severities": [ - "Critical", - "Warning" - ], - "oncall_incident_trigger_enabled": true, - "prompt": "Summarize last week's alert noise and escalation load.", - "schedule_trigger_enabled": true, - "team_id": 123, - "timezone": "Asia/Shanghai" + "artifact_id": "art_CWQzDU2PXSRJvKDhQbuMKu" }, "schema": { - "$ref": "#/components/schemas/AutomationRuleCreateRequest" + "$ref": "#/components/schemas/ArtifactIdRequest" } } }, @@ -51633,39 +51235,7 @@ "content": { "application/json": { "example": { - "data": { - "account_id": 10023, - "can_edit": true, - "created_at": 1780367971228, - "cron_expr": "0 9 * * 1", - "enabled": true, - "environment_id": "", - "environment_kind": "", - "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U", - "http_post_trigger_enabled": true, - "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y", - "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire", - "name": "Weekly on-call review", - "oncall_incident_channel_ids": [ - 456 - ], - "oncall_incident_severities": [ - "Critical", - "Warning" - ], - "oncall_incident_trigger_enabled": true, - "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p", - "owner_id": 80011, - "prompt": "Summarize last week's alert noise and escalation load.", - "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", - "run_scope": "team", - "schedule_next_fire_at_ms": 1780630800000, - "schedule_trigger_enabled": true, - "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z", - "team_id": 123, - "timezone": "Asia/Shanghai", - "updated_at": 1780367971228 - }, + "data": null, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -51676,7 +51246,8 @@ { "properties": { "data": { - "$ref": "#/components/schemas/AutomationRuleItem" + "description": "Always null on success.", + "type": "null" } }, "type": "object" @@ -51693,9 +51264,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -51708,31 +51276,34 @@ "AppKeyAuth": [] } ], - "summary": "Create Automation rule", + "summary": "Remove artifact from gallery", "tags": [ - "AI SRE/Automations" + "AI SRE/Artifacts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | Valid `app_key`; management operations require the caller to manage the target rule |\n\n## Usage\n\n- A caller may create personal rules and rules for any team in the current account; `team_id` can be reassigned later via update (converting a team rule to personal is owner-only; moving into a team requires the caller to belong to it).\n- `cron_expr` is evaluated in `timezone` if provided, else the caller's member timezone, else the account timezone, else the server default (Asia/Shanghai).\n- `http_post_trigger_enabled=true` creates and enables an HTTP POST trigger; the response's `http_post_token` is a one-time value returned only on creation — save it immediately.\n- `oncall_incident_trigger_enabled=true` requires at least one `oncall_incident_channel_ids` entry and one `oncall_incident_severities` value; matching incidents run with `trigger_kind=oncall_incident`.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/automations/automation-rule-write-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- This is a detach, not a byte delete: the underlying presented file stays with the source session and can be published again.\n- If public sharing was enabled, the public objects are destroyed in the same operation and the link stops resolving.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-write-delete", "metadata": { - "sidebarTitle": "Create Automation rule" + "sidebarTitle": "Remove artifact from gallery" } } } }, - "/safari/automation/rule/delete": { + "/safari/artifact/gallery/file-state": { "post": { - "description": "Delete an Automation rule.", - "operationId": "automation-rule-write-delete", + "description": "Check which presented files already have a live published artifact.", + "operationId": "artifact-read-get-file-state", "requestBody": { "content": { "application/json": { "example": { - "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b" + "file_ids": [ + "pf_SdhEA5fbZJGnHzwrNJMMSB", + "pf_9kLm2nQpRsTuVwXyZaBcDe" + ] }, "schema": { - "$ref": "#/components/schemas/AutomationRuleIDRequest" + "$ref": "#/components/schemas/ArtifactFileStateRequest" } } }, @@ -51743,7 +51314,16 @@ "content": { "application/json": { "example": { - "data": null, + "data": { + "items": [ + { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", + "gallery_path": "/ai-sre/artifacts/art_VnfrWic8UbB9q3EfYR4Gmg", + "title": "SK 海力士 2026 Q2 财报深度分析" + } + ] + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -51754,8 +51334,7 @@ { "properties": { "data": { - "description": "Always null on success.", - "type": "null" + "$ref": "#/components/schemas/ArtifactFileStateResponse" } }, "type": "object" @@ -51772,9 +51351,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -51787,31 +51363,31 @@ "AppKeyAuth": [] } ], - "summary": "Delete Automation rule", + "summary": "Get file publish state", "tags": [ - "AI SRE/Automations" + "AI SRE/Artifacts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | Valid `app_key`; management operations require the caller to manage the target rule |\n\n## Usage\n\n- Deleting a rule also removes its schedule, HTTP POST, and On-call incident triggers; a deleted HTTP POST trigger's token stops working immediately.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/automations/automation-rule-write-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- At most 50 `file_ids` per call; duplicates and empty strings are ignored.\n- Files with no live published artifact are simply absent from `items` — match results by the echoed `file_id`.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-read-get-file-state", "metadata": { - "sidebarTitle": "Delete Automation rule" + "sidebarTitle": "Get file publish state" } } } }, - "/safari/automation/rule/get": { + "/safari/artifact/gallery/get": { "post": { - "description": "Get one Automation rule by ID.", - "operationId": "automation-rule-read-get", + "description": "Get a single published artifact by ID.", + "operationId": "artifact-read-get", "requestBody": { "content": { "application/json": { "example": { - "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b" + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg" }, "schema": { - "$ref": "#/components/schemas/AutomationRuleIDRequest" + "$ref": "#/components/schemas/ArtifactIdRequest" } } }, @@ -51823,36 +51399,27 @@ "application/json": { "example": { "data": { - "account_id": 10023, + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", "can_edit": true, - "created_at": 1780367971228, - "cron_expr": "0 9 * * 1", - "enabled": true, - "environment_id": "", - "environment_kind": "", - "http_post_trigger_enabled": true, - "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y", - "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire", - "name": "Weekly on-call review", - "oncall_incident_channel_ids": [ - 456 - ], - "oncall_incident_severities": [ - "Critical", - "Warning" - ], - "oncall_incident_trigger_enabled": true, - "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p", - "owner_id": 80011, - "prompt": "Summarize last week's alert noise and escalation load.", - "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", - "run_scope": "team", - "schedule_next_fire_at_ms": 1780630800000, - "schedule_trigger_enabled": true, - "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z", - "team_id": 123, - "timezone": "Asia/Shanghai", - "updated_at": 1780367971228 + "content_type": "text/html", + "created_at": 1785293373899, + "creator_name": "yushuangyu", + "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", + "is_mine": true, + "name": "sk-hynix-q2-2026-report.html", + "person_id": 2476444212131, + "public_url": "https://console.flashcat.cloud/share/artifact/art_VnfrWic8UbB9q3EfYR4Gmg", + "session_id": "sess_VCbVPZrq9YoyBu8sNCmqUy", + "session_title": "分析海力士财报并发布报告", + "share_enabled": true, + "share_file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", + "shared_at": 1785747928665, + "shared_by": 3790925372131, + "size": 18996, + "team_id": 2477033058131, + "team_name": "研发团队", + "title": "SK 海力士 2026 Q2 财报深度分析", + "updated_at": 1785747910219 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -51864,7 +51431,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/AutomationRuleItem" + "$ref": "#/components/schemas/PublishedArtifactItem" } }, "type": "object" @@ -51881,9 +51448,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -51896,32 +51460,33 @@ "AppKeyAuth": [] } ], - "summary": "Get Automation rule", + "summary": "Get artifact detail", "tags": [ - "AI SRE/Automations" + "AI SRE/Artifacts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; caller must manage the target rule |\n\n## Usage\n\n- Manage rights mean the personal rule owner; for team rules, an account admin or a member of the rule's team.\n", - "href": "/en/api-reference/ai-sre/automations/automation-rule-read-get", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Visibility is account-wide: any valid `app_key` can read any artifact in the account. `is_mine` and `can_edit` are computed relative to the key owner.\n- When `share_enabled` is true and `file_id` differs from `share_file_id`, the public snapshot is stale — refresh it with `/safari/artifact/gallery/share/sync`.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-read-get", "metadata": { - "sidebarTitle": "Get Automation rule" + "sidebarTitle": "Get artifact detail" } } } }, - "/safari/automation/rule/list": { + "/safari/artifact/gallery/list": { "post": { - "description": "List Automation rules visible to the caller.", - "operationId": "automation-rule-read-list", + "description": "List published artifacts visible to the caller, with pagination and title search.", + "operationId": "artifact-read-list", "requestBody": { "content": { "application/json": { "example": { "limit": 20, + "page": 1, "scope": "all" }, "schema": { - "$ref": "#/components/schemas/AutomationRuleListRequest" + "$ref": "#/components/schemas/ArtifactListRequest" } } }, @@ -51933,41 +51498,50 @@ "application/json": { "example": { "data": { - "rules": [ + "items": [ { - "account_id": 10023, + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", "can_edit": true, - "created_at": 1780367971228, - "cron_expr": "0 9 * * 1", - "enabled": true, - "environment_id": "", - "environment_kind": "", - "http_post_trigger_enabled": true, - "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y", - "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire", - "name": "Weekly on-call review", - "oncall_incident_channel_ids": [ - 456 - ], - "oncall_incident_severities": [ - "Critical", - "Warning" - ], - "oncall_incident_trigger_enabled": true, - "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p", - "owner_id": 80011, - "prompt": "Summarize last week's alert noise and escalation load.", - "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", - "run_scope": "team", - "schedule_next_fire_at_ms": 1780630800000, - "schedule_trigger_enabled": true, - "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z", - "team_id": 123, - "timezone": "Asia/Shanghai", - "updated_at": 1780367971228 + "content_type": "text/html", + "created_at": 1785293373899, + "creator_name": "yushuangyu", + "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", + "is_mine": true, + "name": "sk-hynix-q2-2026-report.html", + "person_id": 2476444212131, + "public_url": "https://console.flashcat.cloud/share/artifact/art_VnfrWic8UbB9q3EfYR4Gmg", + "session_id": "sess_VCbVPZrq9YoyBu8sNCmqUy", + "session_title": "分析海力士财报并发布报告", + "share_enabled": true, + "share_file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", + "shared_at": 1785747928665, + "shared_by": 3790925372131, + "size": 18996, + "team_id": 2477033058131, + "team_name": "研发团队", + "title": "SK 海力士 2026 Q2 财报深度分析", + "updated_at": 1785747910219 + }, + { + "artifact_id": "art_CWQzDU2PXSRJvKDhQbuMKu", + "can_edit": true, + "content_type": "application/pdf", + "created_at": 1785229432881, + "creator_name": "牛伟利", + "file_id": "pf_Jnc4E5YBcWLGzunB4ntP9s", + "is_mine": false, + "name": "rum_recommendation.pdf", + "person_id": 3790925372131, + "session_id": "sess_QXUC9C2PYWP5EE7vETR3UD", + "session_title": "生成 RUM 文档多格式", + "size": 137107, + "team_id": 2477033058131, + "team_name": "研发团队", + "title": "rum_recommendation", + "updated_at": 1785741344822 } ], - "total": 1 + "total": 17 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -51979,7 +51553,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/AutomationRuleListResponse" + "$ref": "#/components/schemas/ArtifactListResponse" } }, "type": "object" @@ -51996,9 +51570,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -52011,31 +51582,32 @@ "AppKeyAuth": [] } ], - "summary": "List Automation rules", + "summary": "List artifacts", "tags": [ - "AI SRE/Automations" + "AI SRE/Artifacts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; results are filtered to the caller's visible scope |\n\n## Usage\n\n- `all` returns your personal rules plus team rules you can access.\n- Account admins see all team rules in list results, but not other users' personal rules.\n- `team_ids` narrows the visible set and never expands access.\n", - "href": "/en/api-reference/ai-sre/automations/automation-rule-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `scope` selects `all` (default — the caller's own personal artifacts plus every team the caller belongs to), `personal` (only the caller's own), or `team` (only team-owned artifacts of the caller's teams).\n- `team_ids` narrows further to specific teams, intersected with the caller's visibility — teams the caller does not belong to return nothing.\n- Default sort is `updated_at` descending; set `orderby` to `created_at` to change the field and `asc: true` to flip direction.\n- For an `app_key` call, visibility is evaluated against the key owner's identity — the list shows that member's personal artifacts and their teams' artifacts.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-read-list", "metadata": { - "sidebarTitle": "List Automation rules" + "sidebarTitle": "List artifacts" } } } }, - "/safari/automation/rule/run": { + "/safari/artifact/gallery/publish-from-file": { "post": { - "description": "Manually run an Automation rule immediately, outside its schedule.", - "operationId": "automation-rule-write-run", + "description": "Publish a session-produced file to the artifact gallery.", + "operationId": "artifact-write-publish", "requestBody": { "content": { "application/json": { "example": { - "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b" + "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", + "title": "SK 海力士 2026 Q2 财报深度分析" }, "schema": { - "$ref": "#/components/schemas/AutomationRuleIDRequest" + "$ref": "#/components/schemas/ArtifactPublishFromFileRequest" } } }, @@ -52047,26 +51619,9 @@ "application/json": { "example": { "data": { - "preflight": { - "app_name": "ai-sre", - "checks": [ - "rule_loaded", - "actor_authorized", - "app_allowed", - "runtime_scope_resolved", - "rule_config_valid" - ], - "ok": true, - "owner_id": 80011, - "scope": "team", - "team_id": 123 - }, - "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", - "run": { - "run_id": "trun_5oDvqiG64uur6sBNsTc4u", - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" - }, - "trigger_kind": "manual" + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "gallery_path": "/ai-sre/artifacts/art_VnfrWic8UbB9q3EfYR4Gmg", + "title": "SK 海力士 2026 Q2 财报深度分析" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -52078,7 +51633,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ManualRunRuleResult" + "$ref": "#/components/schemas/ArtifactPublishResponse" } }, "type": "object" @@ -52095,9 +51650,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -52110,42 +51662,31 @@ "AppKeyAuth": [] } ], - "summary": "Run Automation rule", + "summary": "Publish file as artifact", "tags": [ - "AI SRE/Automations" + "AI SRE/Artifacts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/minute**; **5 requests/second** per account |\n| Permissions | Valid `app_key`; caller must manage the target rule |\n\n## Usage\n\n- Rate-limited to at most once per minute per rule; a second call within that window returns `429` with `code: \"RequestTooFrequently\"`.\n- Only enabled rules can run manually; a disabled or misconfigured rule fails preflight with a `400` error before any run is created.\n- The call returns once the underlying agent session starts, not once the run finishes; the run continues asynchronously — use List Automation runs to check completion status.\n- `trigger_kind` is always `manual` for runs started this way, distinguishing them from `schedule`, `http_post`, and `oncall_incident` runs in run history.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/automations/automation-rule-write-run", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Allowed file types: HTML/Markdown, images, PDF, text/data/code files, and zip/tar archives, matched by extension. Files over 16 MiB are rejected.\n- Publishing is an upsert keyed by the source session and workspace path — republishing the same file replaces the artifact's bytes under a fresh `file_id`, which makes an existing public snapshot stale until synced.\n- The artifact inherits personal/team scope from the source session; move it afterwards with `/safari/artifact/gallery/update` if needed.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-write-publish", "metadata": { - "sidebarTitle": "Run Automation rule" + "sidebarTitle": "Publish file as artifact" } } } }, - "/safari/automation/rule/update": { + "/safari/artifact/gallery/share/enable": { "post": { - "description": "Update mutable Automation rule fields, including HTTP POST and On-call incident trigger settings.", - "operationId": "automation-rule-write-update", + "description": "Turn on anonymous public sharing for an artifact and return its public link.", + "operationId": "artifact-write-share-enable", "requestBody": { "content": { "application/json": { "example": { - "cron_expr": "15 9 * * 1", - "enabled": true, - "oncall_incident_channel_ids": [ - 456 - ], - "oncall_incident_severities": [ - "Critical", - "Warning" - ], - "oncall_incident_trigger_enabled": true, - "rotate_http_post_trigger_token": true, - "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b" + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg" }, "schema": { - "$ref": "#/components/schemas/AutomationRuleUpdateRequest" + "$ref": "#/components/schemas/ArtifactIdRequest" } } }, @@ -52157,37 +51698,11 @@ "application/json": { "example": { "data": { - "account_id": 10023, - "can_edit": true, - "created_at": 1780367971228, - "cron_expr": "0 9 * * 1", - "enabled": true, - "environment_id": "", - "environment_kind": "", - "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U", - "http_post_trigger_enabled": true, - "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y", - "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire", - "name": "Weekly on-call review", - "oncall_incident_channel_ids": [ - 456 - ], - "oncall_incident_severities": [ - "Critical", - "Warning" - ], - "oncall_incident_trigger_enabled": true, - "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p", - "owner_id": 80011, - "prompt": "Summarize last week's alert noise and escalation load.", - "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", - "run_scope": "team", - "schedule_next_fire_at_ms": 1780630800000, - "schedule_trigger_enabled": true, - "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z", - "team_id": 123, - "timezone": "Asia/Shanghai", - "updated_at": 1780367971228 + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "public_url": "https://console.flashcat.cloud/share/artifact/art_VnfrWic8UbB9q3EfYR4Gmg", + "share_enabled": true, + "shared_at": 1785747928665, + "shared_by": 2476444212131 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -52199,7 +51714,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/AutomationRuleItem" + "$ref": "#/components/schemas/ArtifactShareState" } }, "type": "object" @@ -52216,9 +51731,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -52231,33 +51743,31 @@ "AppKeyAuth": [] } ], - "summary": "Update Automation rule", + "summary": "Enable public sharing", "tags": [ - "AI SRE/Automations" + "AI SRE/Artifacts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | Valid `app_key`; management operations require the caller to manage the target rule |\n\n## Usage\n\n- Omitted or `null` fields are left unchanged. `team_id` reassigns the rule's scope: `0` converts a team rule to personal (owner-only), `>0` moves it into a team the caller belongs to.\n- `cron_expr` and `timezone` can be updated independently — sending only one keeps the other at its current stored value.\n- `rotate_http_post_trigger_token=true` issues a fresh webhook token, returned only in this response.\n- To trigger from On-call incidents, send `oncall_incident_trigger_enabled`, `oncall_incident_channel_ids`, and `oncall_incident_severities`; matching events run with `trigger_kind=oncall_incident`.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/automations/automation-rule-write-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The public link is anonymous — anyone with it can view the content, and the link may be forwarded. Content is copied to public CDN objects; the gallery API is not involved when the link is viewed.\n- Idempotent: enabling an already-shared artifact returns the existing link unchanged, and re-enabling after a revoke brings the same link back — the link is keyed by artifact ID.\n- Artifacts over 16 MiB cannot be shared; the call fails with `InvalidParameter`.\n- Sharing is a snapshot: later republishes do not update the public content until you call `/safari/artifact/gallery/share/sync`.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-write-share-enable", "metadata": { - "sidebarTitle": "Update Automation rule" + "sidebarTitle": "Enable public sharing" } } } }, - "/safari/automation/run/list": { + "/safari/artifact/gallery/share/revoke": { "post": { - "description": "List run history for a rule the caller can manage.", - "operationId": "automation-run-read-list", + "description": "Turn off public sharing; the link stops resolving immediately.", + "operationId": "artifact-write-share-revoke", "requestBody": { "content": { "application/json": { "example": { - "limit": 20, - "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", - "trigger_kind": "schedule" + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg" }, "schema": { - "$ref": "#/components/schemas/AutomationRunListRequest" + "$ref": "#/components/schemas/ArtifactIdRequest" } } }, @@ -52268,34 +51778,7 @@ "content": { "application/json": { "example": { - "data": { - "runs": [ - { - "account_id": 10023, - "attempts": 1, - "completed_at": 1780630923456, - "created_at": 1780630800000, - "duration_ms": 123456, - "error_code": "", - "error_message": "", - "kind": "automation_rule", - "occurrence_key": "atrig_6aKp3wT9mQ2xVc8bR1nY7z:1780630800000", - "result_json": { - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" - }, - "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", - "run_id": "trun_5oDvqiG64uur6sBNsTc4u", - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", - "session_name": "Weekly on-call review", - "started_at": 1780630800000, - "stats_json": {}, - "status": "succeeded", - "trigger_kind": "schedule", - "updated_at": 1780630923456 - } - ], - "total": 1 - }, + "data": null, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -52306,7 +51789,8 @@ { "properties": { "data": { - "$ref": "#/components/schemas/AutomationRunListResponse" + "description": "Always null on success.", + "type": "null" } }, "type": "object" @@ -52323,9 +51807,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -52338,31 +51819,31 @@ "AppKeyAuth": [] } ], - "summary": "List Automation runs", + "summary": "Revoke public sharing", "tags": [ - "AI SRE/Automations" + "AI SRE/Artifacts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; caller must manage the target rule |\n\n## Usage\n\n- Run history is visible only when the caller can manage the rule: the personal rule owner; for team rules, an account admin or a member of the rule's team.\n", - "href": "/en/api-reference/ai-sre/automations/automation-run-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The public CDN objects are deleted, so the link stops resolving; this is a no-op when the artifact is not shared.\n- Re-enabling later returns the same `public_url` — the link is keyed by artifact ID, so revoke is not a way to rotate the link.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-write-share-revoke", "metadata": { - "sidebarTitle": "List Automation runs" + "sidebarTitle": "Revoke public sharing" } } } }, - "/safari/automation/template/list": { + "/safari/artifact/gallery/share/sync": { "post": { - "description": "List preset Automation templates for the requested locale.", - "operationId": "automation-template-read-list", + "description": "Refresh the public snapshot of a shared artifact with its latest content.", + "operationId": "artifact-write-share-sync", "requestBody": { "content": { "application/json": { "example": { - "locale": "en-US" + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg" }, "schema": { - "$ref": "#/components/schemas/AutomationTemplateListRequest" + "$ref": "#/components/schemas/ArtifactIdRequest" } } }, @@ -52374,15 +51855,11 @@ "application/json": { "example": { "data": { - "templates": [ - { - "description": "Analyze incidents, alerts, response activity, notification load, and related changes from the past week.", - "enabled": false, - "icon": "chart-no-axes-combined", - "name": "Weekly Insights", - "prompt": "Generate a weekly insights report. Analyze incidents, alerts, response activity, notification load, and related changes from the past week. Focus on what happened this week, which signals deserve attention, and which improvement actions are most valuable. Do not modify any Flashduty business state.\n" - } - ] + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "public_url": "https://console.flashcat.cloud/share/artifact/art_VnfrWic8UbB9q3EfYR4Gmg", + "share_enabled": true, + "shared_at": 1785829900000, + "shared_by": 2476444212131 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -52394,7 +51871,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/AutomationTemplateListResponse" + "$ref": "#/components/schemas/ArtifactShareState" } }, "type": "object" @@ -52411,9 +51888,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -52426,31 +51900,32 @@ "AppKeyAuth": [] } ], - "summary": "List Automation templates", + "summary": "Update shared snapshot", "tags": [ - "AI SRE/Automations" + "AI SRE/Artifacts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; results are filtered to the caller's visible scope |\n", - "href": "/en/api-reference/ai-sre/automations/automation-template-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Fails with `InvalidParameter` when sharing is not enabled — enable it first.\n- The link never changes; only the snapshot bytes and `shared_at` are refreshed.\n- Use `share_file_id != file_id` on the artifact detail to detect a stale snapshot before syncing.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-write-share-sync", "metadata": { - "sidebarTitle": "List Automation templates" + "sidebarTitle": "Update shared snapshot" } } } }, - "/safari/knowledge/file/delete": { + "/safari/artifact/gallery/update": { "post": { - "description": "Delete a file from a knowledge pack by its relative path.", - "operationId": "knowledge-file-write-delete", + "description": "Rename an artifact or transfer it between personal and team scope.", + "operationId": "artifact-write-update", "requestBody": { "content": { "application/json": { "example": { - "rel_path": "tmp/openapi-delete-example.md" + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "title": "SK 海力士 2026 Q2 财报深度分析(终稿)" }, "schema": { - "$ref": "#/components/schemas/KnowledgeFileDeleteRequest" + "$ref": "#/components/schemas/ArtifactUpdateRequest" } } }, @@ -52461,7 +51936,29 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "artifact_id": "art_VnfrWic8UbB9q3EfYR4Gmg", + "can_edit": true, + "content_type": "text/html", + "created_at": 1785293373899, + "creator_name": "yushuangyu", + "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", + "is_mine": true, + "name": "sk-hynix-q2-2026-report.html", + "person_id": 2476444212131, + "public_url": "https://console.flashcat.cloud/share/artifact/art_VnfrWic8UbB9q3EfYR4Gmg", + "session_id": "sess_VCbVPZrq9YoyBu8sNCmqUy", + "session_title": "分析海力士财报并发布报告", + "share_enabled": true, + "share_file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB", + "shared_at": 1785747928665, + "shared_by": 3790925372131, + "size": 18996, + "team_id": 2477033058131, + "team_name": "研发团队", + "title": "SK 海力士 2026 Q2 财报深度分析(终稿)", + "updated_at": 1785829000000 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -52472,7 +51969,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/KnowledgeFileDeleteResponse" + "$ref": "#/components/schemas/PublishedArtifactItem" } }, "type": "object" @@ -52489,9 +51986,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -52504,31 +51998,31 @@ "AppKeyAuth": [] } ], - "summary": "Delete knowledge file", + "summary": "Update artifact", "tags": [ - "AI SRE/Knowledge" + "AI SRE/Artifacts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Knowledge Manage** (`ai-sre`) |\n\n## Usage\n\n- Deleting is idempotent — removing a file that does not exist succeeds.\n- When other pack files still reference the target, the delete fails with `ReferenceExist` listing the referrers; set `force` to proceed (the referrers are returned as warnings).\n- Omitting `pack_id` targets the account-scope pack; editing the account pack requires account owner/admin, editing a team pack requires team membership.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/knowledge/knowledge-file-write-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Only the provided fields change — omit `title` or `team_id` to leave them unchanged.\n- `team_id: 0` moves the artifact to personal scope (only the creator can manage it); a positive `team_id` requires the caller (for `app_key` calls, the key owner) to be a member of that team.\n- Returns the full artifact after the update.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-write-update", "metadata": { - "sidebarTitle": "Delete knowledge file" + "sidebarTitle": "Update artifact" } } } }, - "/safari/knowledge/file/get": { + "/safari/artifact/sign": { "post": { - "description": "Return a knowledge file's metadata and its base64-encoded content.", - "operationId": "knowledge-file-read-get", + "description": "Create short-lived signed URLs to download or preview a presented file.", + "operationId": "artifact-read-sign", "requestBody": { "content": { "application/json": { "example": { - "rel_path": "tmp/openapi-example.md" + "file_id": "pf_SdhEA5fbZJGnHzwrNJMMSB" }, "schema": { - "$ref": "#/components/schemas/KnowledgeFileGetRequest" + "$ref": "#/components/schemas/ArtifactSignRequest" } } }, @@ -52540,17 +52034,12 @@ "application/json": { "example": { "data": { - "content_b64": "IyBPcGVuQVBJIGV4YW1wbGUKVGVtcCBmaWxlIGZvciBBUEkgZG9jcyBleGFtcGxlLgo=", - "file": { - "checksum": "a0775f9b3f392cd0560b21ad2f579ae4a5d6b1282b9eb145688ba2de717a816d", - "content_type": "text/markdown", - "file_id": "kfl_gctXKRG45aFQGgxSFr59WY", - "pack_id": "kpk_kE49k3FhecfJBwutbshEEc", - "rel_path": "tmp/openapi-example.md", - "size_bytes": 50, - "updated_at_ms": 1786458764961, - "updated_by": 2476444212131 - } + "content_type": "text/html", + "download_url": "/safari/artifact/stream?mode=download&t=cGZfU2RoRUE1ZmJaSkduSHp3ck5KTU1TQnxzZXNzX1ZDYlZQWnJxOVlveUJ1OHNOQ21xVXl8MjQ1MTAwMjc1MTEzMXwyNDc2NDQ0MjEyMTMxfDB8MHwxNzg4NTI5NjI2NTU0.hPQHab0MBNbnrHYwc6VwDJbGonIamfWUr0yeSmLHYAs", + "expires_in": 300, + "name": "sk-hynix-q2-2026-report.html", + "preview_url": "/safari/artifact/stream?mode=preview&t=cGZfU2RoRUE1ZmJaSkduSHp3ck5KTU1TQnxzZXNzX1ZDYlZQWnJxOVlveUJ1OHNOQ21xVXl8MjQ1MTAwMjc1MTEzMXwyNDc2NDQ0MjEyMTMxfDB8MHwxNzg4NTI5NjI2NTU0.hPQHab0MBNbnrHYwc6VwDJbGonIamfWUr0yeSmLHYAs", + "size": 18996 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -52562,7 +52051,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/KnowledgeFileGetResponse" + "$ref": "#/components/schemas/SignedURLs" } }, "type": "object" @@ -52591,86 +52080,62 @@ "AppKeyAuth": [] } ], - "summary": "Get knowledge file", + "summary": "Create signed file URLs", "tags": [ - "AI SRE/Knowledge" + "AI SRE/Artifacts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Content is returned in `content_b64` (base64); pack files are guaranteed UTF-8 text.\n- Omitting `pack_id` targets the account-scope pack; reading a team-scope pack requires team membership.\n- A missing file returns `ResourceNotFound` (HTTP 400).\n", - "href": "/en/api-reference/ai-sre/knowledge/knowledge-file-read-get", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Both URLs expire after `expires_in` seconds (300). Sign again to get fresh URLs.\n- Returned URLs are relative — prepend `https://api.flashcat.cloud` before use, then follow them with `GET /safari/artifact/stream`.\n- The signed token is bound to the calling account and the app_key owner's identity, so a leaked URL does not work for another account or member.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-read-sign", "metadata": { - "sidebarTitle": "Get knowledge file" + "sidebarTitle": "Create signed file URLs" } } } }, - "/safari/knowledge/file/list": { - "post": { - "description": "List the files in a knowledge pack with metadata such as size and checksum.", - "operationId": "knowledge-file-read-list", - "requestBody": { - "content": { - "application/json": { - "example": { - "pack_id": "kpk_kE49k3FhecfJBwutbshEEc" - }, - "schema": { - "$ref": "#/components/schemas/KnowledgeFileListRequest" - } + "/safari/artifact/stream": { + "get": { + "description": "Download or preview a file's bytes using a signed token.", + "operationId": "artifact-read-stream", + "parameters": [ + { + "description": "Signed token issued by `POST /safari/artifact/sign`. Bound to the calling account and person; valid for 5 minutes.", + "in": "query", + "name": "t", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "description": "`download` (default) serves the file as an attachment; `preview` serves it inline for browser display. Any other value falls back to `download`.", + "in": "query", + "name": "mode", + "required": false, + "schema": { + "default": "download", + "enum": [ + "download", + "preview" + ], + "type": "string" + } + } + ], "responses": { "200": { "content": { - "application/json": { - "example": { - "data": { - "files": [ - { - "checksum": "fccc276c0d7fbae2e9508285cdde0f8475169634e89e466dac2e59f176c9be2f", - "content_type": "text/markdown", - "file_id": "kfl_QvT4g3c8zAHxTthuT6hGne", - "pack_id": "kpk_kE49k3FhecfJBwutbshEEc", - "rel_path": "aliyun.md", - "size_bytes": 1436, - "updated_at_ms": 1783311304757, - "updated_by": 3790925372131 - }, - { - "checksum": "450eabf178b41e46ea2f43d395a80bf8b956ddb9c9cea34f44ffc69a53e7a36b", - "content_type": "text/markdown", - "file_id": "kfl_BMsQZCZSqhW4TFskYNb4H5", - "pack_id": "kpk_kE49k3FhecfJBwutbshEEc", - "rel_path": "DUTY.md", - "size_bytes": 1301, - "updated_at_ms": 1784800003394, - "updated_by": 2476444212131 - } - ], - "total": 17 - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, + "application/octet-stream": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/ResponseEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/KnowledgeFileListResponse" - } - }, - "type": "object" - } - ] + "format": "binary", + "type": "string" } } }, - "description": "Success" + "description": "File bytes, proxied, when the file is hosted on a self-hosted runner. Content-Disposition follows `mode`." + }, + "302": { + "description": "Redirect to a short-lived presigned object-storage URL when the file lives in S3-compatible storage. Follow the `Location` header; no body." }, "400": { "$ref": "#/components/responses/BadRequest" @@ -52690,33 +52155,46 @@ "AppKeyAuth": [] } ], - "summary": "List knowledge files", + "summary": "Download or preview a file", "tags": [ - "AI SRE/Knowledge" + "AI SRE/Artifacts" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Omitting `pack_id` targets the caller's account-scope pack (created lazily if absent).\n- Reading a team-scope pack requires membership of that team.\n- `p`/`limit` are accepted but the current implementation always returns the full file list.\n", - "href": "/en/api-reference/ai-sre/knowledge/knowledge-file-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/minute**; **10 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Success has two forms: a `302` redirect to a short-lived presigned object-storage URL (files stored in S3-compatible storage), or a `200` binary stream (files hosted on a self-hosted runner). Follow redirects.\n- Responses carry `Cache-Control: private, no-store` — they are never cached by the gateway.\n", + "href": "/en/api-reference/ai-sre/artifacts/artifact-read-stream", "metadata": { - "sidebarTitle": "List knowledge files" + "sidebarTitle": "Download or preview a file" } } } }, - "/safari/knowledge/file/put": { + "/safari/automation/rule/create": { "post": { - "description": "Create or overwrite a file in a knowledge pack with base64-encoded content.", - "operationId": "knowledge-file-write-put", + "description": "Create an Automation rule with schedule, HTTP POST, and On-call incident triggers.", + "operationId": "automation-rule-write-create", "requestBody": { "content": { "application/json": { "example": { - "content_b64": "IyBPcGVuQVBJIGV4YW1wbGUKVGVtcCBmaWxlIGZvciBBUEkgZG9jcyBleGFtcGxlLgo=", - "content_type": "text/markdown", - "rel_path": "tmp/openapi-example.md" + "cron_expr": "0 9 * * 1", + "enabled": true, + "http_post_trigger_enabled": true, + "name": "Weekly on-call review", + "oncall_incident_channel_ids": [ + 456 + ], + "oncall_incident_severities": [ + "Critical", + "Warning" + ], + "oncall_incident_trigger_enabled": true, + "prompt": "Summarize last week's alert noise and escalation load.", + "schedule_trigger_enabled": true, + "team_id": 123, + "timezone": "Asia/Shanghai" }, "schema": { - "$ref": "#/components/schemas/KnowledgeFilePutRequest" + "$ref": "#/components/schemas/AutomationRuleCreateRequest" } } }, @@ -52728,16 +52206,37 @@ "application/json": { "example": { "data": { - "file": { - "checksum": "a0775f9b3f392cd0560b21ad2f579ae4a5d6b1282b9eb145688ba2de717a816d", - "content_type": "text/markdown", - "file_id": "kfl_gctXKRG45aFQGgxSFr59WY", - "pack_id": "kpk_kE49k3FhecfJBwutbshEEc", - "rel_path": "tmp/openapi-example.md", - "size_bytes": 50, - "updated_at_ms": 1786458764961, - "updated_by": 2476444212131 - } + "account_id": 10023, + "can_edit": true, + "created_at": 1780367971228, + "cron_expr": "0 9 * * 1", + "enabled": true, + "environment_id": "", + "environment_kind": "", + "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U", + "http_post_trigger_enabled": true, + "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y", + "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire", + "name": "Weekly on-call review", + "oncall_incident_channel_ids": [ + 456 + ], + "oncall_incident_severities": [ + "Critical", + "Warning" + ], + "oncall_incident_trigger_enabled": true, + "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p", + "owner_id": 80011, + "prompt": "Summarize last week's alert noise and escalation load.", + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "run_scope": "team", + "schedule_next_fire_at_ms": 1780630800000, + "schedule_trigger_enabled": true, + "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z", + "team_id": 123, + "timezone": "Asia/Shanghai", + "updated_at": 1780367971228 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -52749,7 +52248,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/KnowledgeFilePutResponse" + "$ref": "#/components/schemas/AutomationRuleItem" } }, "type": "object" @@ -52781,29 +52280,31 @@ "AppKeyAuth": [] } ], - "summary": "Upload knowledge file", + "summary": "Create Automation rule", "tags": [ - "AI SRE/Knowledge" + "AI SRE/Automations" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Knowledge Manage** (`ai-sre`) |\n\n## Usage\n\n- The file body is sent as base64 text in the JSON field `content_b64` — this is not a multipart upload.\n- Writing an existing `rel_path` overwrites it; `content_type` is inferred from the extension when omitted (`.md` → `text/markdown`).\n- Content must decode to valid UTF-8 text; binary payloads are rejected with `InvalidParameter`.\n- Editing the account-scope pack requires account owner/admin; editing a team pack requires team membership.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/knowledge/knowledge-file-write-put", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | Valid `app_key`; management operations require the caller to manage the target rule |\n\n## Usage\n\n- A caller may create personal rules and rules for any team in the current account; `team_id` can be reassigned later via update (converting a team rule to personal is owner-only; moving into a team requires the caller to belong to it).\n- `cron_expr` is evaluated in `timezone` if provided, else the caller's member timezone, else the account timezone, else the server default (Asia/Shanghai).\n- `http_post_trigger_enabled=true` creates and enables an HTTP POST trigger; the response's `http_post_token` is a one-time value returned only on creation — save it immediately.\n- `oncall_incident_trigger_enabled=true` requires at least one `oncall_incident_channel_ids` entry and one `oncall_incident_severities` value; matching incidents run with `trigger_kind=oncall_incident`.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/automations/automation-rule-write-create", "metadata": { - "sidebarTitle": "Upload knowledge file" + "sidebarTitle": "Create Automation rule" } } } }, - "/safari/knowledge/get": { + "/safari/automation/rule/delete": { "post": { - "description": "Return the account-scope knowledge pack metadata and its file list.", - "operationId": "knowledge-pack-read-get", + "description": "Delete an Automation rule.", + "operationId": "automation-rule-write-delete", "requestBody": { "content": { "application/json": { - "example": {}, + "example": { + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b" + }, "schema": { - "$ref": "#/components/schemas/KnowledgeGetRequest" + "$ref": "#/components/schemas/AutomationRuleIDRequest" } } }, @@ -52814,44 +52315,7 @@ "content": { "application/json": { "example": { - "data": { - "files": [ - { - "checksum": "fccc276c0d7fbae2e9508285cdde0f8475169634e89e466dac2e59f176c9be2f", - "content_type": "text/markdown", - "file_id": "kfl_QvT4g3c8zAHxTthuT6hGne", - "pack_id": "kpk_kE49k3FhecfJBwutbshEEc", - "rel_path": "aliyun.md", - "size_bytes": 1436, - "updated_at_ms": 1783311304757, - "updated_by": 3790925372131 - }, - { - "checksum": "450eabf178b41e46ea2f43d395a80bf8b956ddb9c9cea34f44ffc69a53e7a36b", - "content_type": "text/markdown", - "file_id": "kfl_BMsQZCZSqhW4TFskYNb4H5", - "pack_id": "kpk_kE49k3FhecfJBwutbshEEc", - "rel_path": "DUTY.md", - "size_bytes": 1301, - "updated_at_ms": 1784800003394, - "updated_by": 2476444212131 - } - ], - "pack": { - "account_id": 2451002751131, - "can_edit": true, - "created_at_ms": 1778768680053, - "created_by": 2476444212131, - "duty_version": 130, - "file_count": 17, - "pack_id": "kpk_kE49k3FhecfJBwutbshEEc", - "scope": "account", - "scope_id": 2451002751131, - "total_bytes": 41010, - "updated_at_ms": 1786456567177, - "version": 134 - } - }, + "data": null, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -52862,7 +52326,8 @@ { "properties": { "data": { - "$ref": "#/components/schemas/KnowledgeGetResponse" + "description": "Always null on success.", + "type": "null" } }, "type": "object" @@ -52879,6 +52344,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -52891,31 +52359,31 @@ "AppKeyAuth": [] } ], - "summary": "Get account knowledge pack", + "summary": "Delete Automation rule", "tags": [ - "AI SRE/Knowledge" + "AI SRE/Automations" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Always targets the caller's account-scope pack — there is no `pack_id` parameter; use `POST /safari/knowledge/pack/list` to discover team packs.\n- The account pack is created lazily on first access, so a valid account never gets not-found here.\n", - "href": "/en/api-reference/ai-sre/knowledge/knowledge-pack-read-get", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | Valid `app_key`; management operations require the caller to manage the target rule |\n\n## Usage\n\n- Deleting a rule also removes its schedule, HTTP POST, and On-call incident triggers; a deleted HTTP POST trigger's token stops working immediately.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/automations/automation-rule-write-delete", "metadata": { - "sidebarTitle": "Get account knowledge pack" + "sidebarTitle": "Delete Automation rule" } } } }, - "/safari/knowledge/pack/delete": { + "/safari/automation/rule/get": { "post": { - "description": "Delete a knowledge pack and all of its files.", - "operationId": "knowledge-pack-write-delete", + "description": "Get one Automation rule by ID.", + "operationId": "automation-rule-read-get", "requestBody": { "content": { "application/json": { "example": { - "pack_id": "kpk_YqHXPTEUHQFGepUfRS7vsh" + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b" }, "schema": { - "$ref": "#/components/schemas/KnowledgePackDeleteRequest" + "$ref": "#/components/schemas/AutomationRuleIDRequest" } } }, @@ -52927,7 +52395,36 @@ "application/json": { "example": { "data": { - "ok": true + "account_id": 10023, + "can_edit": true, + "created_at": 1780367971228, + "cron_expr": "0 9 * * 1", + "enabled": true, + "environment_id": "", + "environment_kind": "", + "http_post_trigger_enabled": true, + "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y", + "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire", + "name": "Weekly on-call review", + "oncall_incident_channel_ids": [ + 456 + ], + "oncall_incident_severities": [ + "Critical", + "Warning" + ], + "oncall_incident_trigger_enabled": true, + "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p", + "owner_id": 80011, + "prompt": "Summarize last week's alert noise and escalation load.", + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "run_scope": "team", + "schedule_next_fire_at_ms": 1780630800000, + "schedule_trigger_enabled": true, + "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z", + "team_id": 123, + "timezone": "Asia/Shanghai", + "updated_at": 1780367971228 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -52939,7 +52436,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/KnowledgePackDeleteResponse" + "$ref": "#/components/schemas/AutomationRuleItem" } }, "type": "object" @@ -52971,32 +52468,32 @@ "AppKeyAuth": [] } ], - "summary": "Delete knowledge pack", + "summary": "Get Automation rule", "tags": [ - "AI SRE/Knowledge" + "AI SRE/Automations" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Knowledge Manage** (`ai-sre`) |\n\n## Usage\n\n- Deleting a pack removes every file it contains; the operation cannot be undone.\n- Deleting the account-scope pack is allowed; it is re-created empty on next access.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/knowledge/knowledge-pack-write-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; caller must manage the target rule |\n\n## Usage\n\n- Manage rights mean the personal rule owner; for team rules, an account admin or a member of the rule's team.\n", + "href": "/en/api-reference/ai-sre/automations/automation-rule-read-get", "metadata": { - "sidebarTitle": "Delete knowledge pack" + "sidebarTitle": "Get Automation rule" } } } }, - "/safari/knowledge/pack/ensure": { + "/safari/automation/rule/list": { "post": { - "description": "Idempotently create the knowledge pack at the given scope, or return the existing one.", - "operationId": "knowledge-pack-write-ensure", + "description": "List Automation rules visible to the caller.", + "operationId": "automation-rule-read-list", "requestBody": { "content": { "application/json": { "example": { - "scope": "team", - "scope_id": 2477033058131 + "limit": 20, + "scope": "all" }, "schema": { - "$ref": "#/components/schemas/KnowledgePackEnsureRequest" + "$ref": "#/components/schemas/AutomationRuleListRequest" } } }, @@ -53008,18 +52505,41 @@ "application/json": { "example": { "data": { - "account_id": 2451002751131, - "can_edit": true, - "created_at_ms": 1778768680053, - "created_by": 2476444212131, - "duty_version": 130, - "file_count": 17, - "pack_id": "kpk_kE49k3FhecfJBwutbshEEc", - "scope": "account", - "scope_id": 2451002751131, - "total_bytes": 41010, - "updated_at_ms": 1786458765182, - "version": 138 + "rules": [ + { + "account_id": 10023, + "can_edit": true, + "created_at": 1780367971228, + "cron_expr": "0 9 * * 1", + "enabled": true, + "environment_id": "", + "environment_kind": "", + "http_post_trigger_enabled": true, + "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y", + "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire", + "name": "Weekly on-call review", + "oncall_incident_channel_ids": [ + 456 + ], + "oncall_incident_severities": [ + "Critical", + "Warning" + ], + "oncall_incident_trigger_enabled": true, + "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p", + "owner_id": 80011, + "prompt": "Summarize last week's alert noise and escalation load.", + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "run_scope": "team", + "schedule_next_fire_at_ms": 1780630800000, + "schedule_trigger_enabled": true, + "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z", + "team_id": 123, + "timezone": "Asia/Shanghai", + "updated_at": 1780367971228 + } + ], + "total": 1 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -53031,7 +52551,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/KnowledgePackItem" + "$ref": "#/components/schemas/AutomationRuleListResponse" } }, "type": "object" @@ -53063,34 +52583,31 @@ "AppKeyAuth": [] } ], - "summary": "Ensure knowledge pack", + "summary": "List Automation rules", "tags": [ - "AI SRE/Knowledge" + "AI SRE/Automations" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Knowledge Manage** (`ai-sre`) |\n\n## Usage\n\n- Idempotent: if a pack already exists at (`scope`, `scope_id`), it is returned unchanged.\n- For `account` scope, `scope_id` is ignored (the account ID is used) and a default `DUTY.md` is seeded on first creation.\n- Creating the account-scope pack requires account owner/admin; creating into a team requires membership of that team.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/knowledge/knowledge-pack-write-ensure", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; results are filtered to the caller's visible scope |\n\n## Usage\n\n- `all` returns your personal rules plus team rules you can access.\n- Account admins see all team rules in list results, but not other users' personal rules.\n- `team_ids` narrows the visible set and never expands access.\n", + "href": "/en/api-reference/ai-sre/automations/automation-rule-read-list", "metadata": { - "sidebarTitle": "Ensure knowledge pack" + "sidebarTitle": "List Automation rules" } } } }, - "/safari/knowledge/pack/list": { + "/safari/automation/rule/run": { "post": { - "description": "List knowledge packs visible to the caller across account and team scopes.", - "operationId": "knowledge-pack-read-list", + "description": "Manually run an Automation rule immediately, outside its schedule.", + "operationId": "automation-rule-write-run", "requestBody": { "content": { "application/json": { "example": { - "include_account": true, - "limit": 20, - "p": 1, - "scope": "all" + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b" }, "schema": { - "$ref": "#/components/schemas/KnowledgePackListRequest" + "$ref": "#/components/schemas/AutomationRuleIDRequest" } } }, @@ -53102,38 +52619,26 @@ "application/json": { "example": { "data": { - "packs": [ - { - "account_id": 2451002751131, - "can_edit": true, - "created_at_ms": 1778768680053, - "created_by": 2476444212131, - "duty_version": 130, - "file_count": 17, - "pack_id": "kpk_kE49k3FhecfJBwutbshEEc", - "scope": "account", - "scope_id": 2451002751131, - "total_bytes": 41010, - "updated_at_ms": 1786456567177, - "version": 134 - }, - { - "account_id": 2451002751131, - "can_edit": true, - "created_at_ms": 1782201586089, - "created_by": 2476444212131, - "duty_version": 15, - "file_count": 4, - "pack_id": "kpk_5qRL34nKtoWM4nQVT2kHzy", - "scope": "team", - "scope_id": 2477033058131, - "team_name": "研发团队", - "total_bytes": 11159, - "updated_at_ms": 1785462092702, - "version": 15 - } - ], - "total": 3 + "preflight": { + "app_name": "ai-sre", + "checks": [ + "rule_loaded", + "actor_authorized", + "app_allowed", + "runtime_scope_resolved", + "rule_config_valid" + ], + "ok": true, + "owner_id": 80011, + "scope": "team", + "team_id": 123 + }, + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "run": { + "run_id": "trun_5oDvqiG64uur6sBNsTc4u", + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" + }, + "trigger_kind": "manual" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -53145,7 +52650,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/KnowledgePackListResponse" + "$ref": "#/components/schemas/ManualRunRuleResult" } }, "type": "object" @@ -53162,6 +52667,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -53174,33 +52682,42 @@ "AppKeyAuth": [] } ], - "summary": "List knowledge packs", + "summary": "Run Automation rule", "tags": [ - "AI SRE/Knowledge" + "AI SRE/Automations" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Visibility matches the console: admins see the account pack plus every team pack; non-admins see the account pack plus their own teams, and requested `team_ids` are silently intersected with their teams.\n- `scope` selects `all` (default), `account`-only, or `team`-only, overriding `include_account`.\n- `query` applies a case-insensitive substring filter over pack ID, scope, and team name; `p`/`limit` paginate the filtered result.\n", - "href": "/en/api-reference/ai-sre/knowledge/knowledge-pack-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/minute**; **5 requests/second** per account |\n| Permissions | Valid `app_key`; caller must manage the target rule |\n\n## Usage\n\n- Rate-limited to at most once per minute per rule; a second call within that window returns `429` with `code: \"RequestTooFrequently\"`.\n- Only enabled rules can run manually; a disabled or misconfigured rule fails preflight with a `400` error before any run is created.\n- The call returns once the underlying agent session starts, not once the run finishes; the run continues asynchronously — use List Automation runs to check completion status.\n- `trigger_kind` is always `manual` for runs started this way, distinguishing them from `schedule`, `http_post`, and `oncall_incident` runs in run history.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/automations/automation-rule-write-run", "metadata": { - "sidebarTitle": "List knowledge packs" + "sidebarTitle": "Run Automation rule" } } } }, - "/safari/knowledge/pack/update": { + "/safari/automation/rule/update": { "post": { - "description": "Move a knowledge pack to a different account or team scope.", - "operationId": "knowledge-pack-write-update", + "description": "Update mutable Automation rule fields, including HTTP POST and On-call incident trigger settings.", + "operationId": "automation-rule-write-update", "requestBody": { "content": { "application/json": { "example": { - "pack_id": "kpk_5qRL34nKtoWM4nQVT2kHzy", - "scope": "team", - "scope_id": 2477033058131 + "cron_expr": "15 9 * * 1", + "enabled": true, + "oncall_incident_channel_ids": [ + 456 + ], + "oncall_incident_severities": [ + "Critical", + "Warning" + ], + "oncall_incident_trigger_enabled": true, + "rotate_http_post_trigger_token": true, + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b" }, "schema": { - "$ref": "#/components/schemas/KnowledgePackUpdateRequest" + "$ref": "#/components/schemas/AutomationRuleUpdateRequest" } } }, @@ -53212,19 +52729,37 @@ "application/json": { "example": { "data": { - "account_id": 2451002751131, + "account_id": 10023, "can_edit": true, - "created_at_ms": 1782201586089, - "created_by": 2476444212131, - "duty_version": 15, - "file_count": 4, - "pack_id": "kpk_5qRL34nKtoWM4nQVT2kHzy", - "scope": "team", - "scope_id": 2477033058131, - "team_name": "研发团队", - "total_bytes": 11159, - "updated_at_ms": 1785462092702, - "version": 15 + "created_at": 1780367971228, + "cron_expr": "0 9 * * 1", + "enabled": true, + "environment_id": "", + "environment_kind": "", + "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U", + "http_post_trigger_enabled": true, + "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y", + "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire", + "name": "Weekly on-call review", + "oncall_incident_channel_ids": [ + 456 + ], + "oncall_incident_severities": [ + "Critical", + "Warning" + ], + "oncall_incident_trigger_enabled": true, + "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p", + "owner_id": 80011, + "prompt": "Summarize last week's alert noise and escalation load.", + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "run_scope": "team", + "schedule_next_fire_at_ms": 1780630800000, + "schedule_trigger_enabled": true, + "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z", + "team_id": 123, + "timezone": "Asia/Shanghai", + "updated_at": 1780367971228 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -53236,7 +52771,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/KnowledgePackItem" + "$ref": "#/components/schemas/AutomationRuleItem" } }, "type": "object" @@ -53268,35 +52803,33 @@ "AppKeyAuth": [] } ], - "summary": "Update knowledge pack", + "summary": "Update Automation rule", "tags": [ - "AI SRE/Knowledge" + "AI SRE/Automations" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Knowledge Manage** (`ai-sre`) |\n\n## Usage\n\n- `scope` is the only mutable field; omitting it is a no-op that returns the current pack.\n- For `team` scope, `scope_id` is required; for `account` scope it is set to the account ID automatically.\n- The move fails with `ReferenceExist` when the destination scope already has a pack — packs are never merged.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/knowledge/knowledge-pack-write-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | Valid `app_key`; management operations require the caller to manage the target rule |\n\n## Usage\n\n- Omitted or `null` fields are left unchanged. `team_id` reassigns the rule's scope: `0` converts a team rule to personal (owner-only), `>0` moves it into a team the caller belongs to.\n- `cron_expr` and `timezone` can be updated independently — sending only one keeps the other at its current stored value.\n- `rotate_http_post_trigger_token=true` issues a fresh webhook token, returned only in this response.\n- To trigger from On-call incidents, send `oncall_incident_trigger_enabled`, `oncall_incident_channel_ids`, and `oncall_incident_severities`; matching events run with `trigger_kind=oncall_incident`.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/automations/automation-rule-write-update", "metadata": { - "sidebarTitle": "Update knowledge pack" + "sidebarTitle": "Update Automation rule" } } } }, - "/safari/mcp/server/create": { + "/safari/automation/run/list": { "post": { - "description": "Register a new MCP server (connector) on the account.", - "operationId": "mcp-write-server-create", + "description": "List run history for a rule the caller can manage.", + "operationId": "automation-run-read-list", "requestBody": { "content": { "application/json": { "example": { - "description": "Query Prometheus metrics and alerts.", - "server_name": "prometheus", - "status": "enabled", - "transport": "streamable-http", - "url": "https://mcp.example.com/prometheus" + "limit": 20, + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "trigger_kind": "schedule" }, "schema": { - "$ref": "#/components/schemas/MCPServerCreateRequest" + "$ref": "#/components/schemas/AutomationRunListRequest" } } }, @@ -53308,22 +52841,32 @@ "application/json": { "example": { "data": { - "account_id": 10023, - "auth_mode": "shared", - "call_timeout": 60, - "can_edit": true, - "connect_timeout": 10, - "created_at": 1716960000000, - "created_by": 80011, - "description": "Query Prometheus metrics and alerts.", - "environments": [], - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", - "server_name": "prometheus", - "status": "enabled", - "team_id": 0, - "transport": "streamable-http", - "updated_at": 1717046400000, - "url": "https://mcp.example.com/prometheus" + "runs": [ + { + "account_id": 10023, + "attempts": 1, + "completed_at": 1780630923456, + "created_at": 1780630800000, + "duration_ms": 123456, + "error_code": "", + "error_message": "", + "kind": "automation_rule", + "occurrence_key": "atrig_6aKp3wT9mQ2xVc8bR1nY7z:1780630800000", + "result_json": { + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" + }, + "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b", + "run_id": "trun_5oDvqiG64uur6sBNsTc4u", + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "session_name": "Weekly on-call review", + "started_at": 1780630800000, + "stats_json": {}, + "status": "succeeded", + "trigger_kind": "schedule", + "updated_at": 1780630923456 + } + ], + "total": 1 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -53335,7 +52878,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/MCPServerItem" + "$ref": "#/components/schemas/AutomationRunListResponse" } }, "type": "object" @@ -53367,31 +52910,31 @@ "AppKeyAuth": [] } ], - "summary": "Create MCP server", + "summary": "List Automation runs", "tags": [ - "AI SRE/MCP servers" + "AI SRE/Automations" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- `command`/`args`/`env` apply to `stdio`; `url`/`headers` apply to `sse`/`streamable-http`.\n- Server name must start with a letter and contain only letters, digits, `-`, or `_`, and is unique within its scope (account-wide or one team), case-insensitive; violations return InvalidParameter.\n- `environments` restricts where the server can run: a list of `cloud` and/or BYOC runner environment IDs; omitted or empty means all environments.\n- `per_user_secret` auth mode requires `secret_schema` to be valid JSON with a non-empty `header_name`.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; caller must manage the target rule |\n\n## Usage\n\n- Run history is visible only when the caller can manage the rule: the personal rule owner; for team rules, an account admin or a member of the rule's team.\n", + "href": "/en/api-reference/ai-sre/automations/automation-run-read-list", "metadata": { - "sidebarTitle": "Create MCP server" + "sidebarTitle": "List Automation runs" } } } }, - "/safari/mcp/server/delete": { + "/safari/automation/template/list": { "post": { - "description": "Delete an MCP server by ID.", - "operationId": "mcp-write-server-delete", + "description": "List preset Automation templates for the requested locale.", + "operationId": "automation-template-read-list", "requestBody": { "content": { "application/json": { "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" + "locale": "en-US" }, "schema": { - "$ref": "#/components/schemas/MCPServerDeleteRequest" + "$ref": "#/components/schemas/AutomationTemplateListRequest" } } }, @@ -53402,7 +52945,17 @@ "content": { "application/json": { "example": { - "data": null, + "data": { + "templates": [ + { + "description": "Analyze incidents, alerts, response activity, notification load, and related changes from the past week.", + "enabled": false, + "icon": "chart-no-axes-combined", + "name": "Weekly Insights", + "prompt": "Generate a weekly insights report. Analyze incidents, alerts, response activity, notification load, and related changes from the past week. Focus on what happened this week, which signals deserve attention, and which improvement actions are most valuable. Do not modify any Flashduty business state.\n" + } + ] + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -53413,8 +52966,7 @@ { "properties": { "data": { - "description": "Always null on success.", - "type": "null" + "$ref": "#/components/schemas/AutomationTemplateListResponse" } }, "type": "object" @@ -53446,31 +52998,31 @@ "AppKeyAuth": [] } ], - "summary": "Delete MCP server", + "summary": "List Automation templates", "tags": [ - "AI SRE/MCP servers" + "AI SRE/Automations" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; results are filtered to the caller's visible scope |\n", + "href": "/en/api-reference/ai-sre/automations/automation-template-read-list", "metadata": { - "sidebarTitle": "Delete MCP server" + "sidebarTitle": "List Automation templates" } } } }, - "/safari/mcp/server/disable": { + "/safari/knowledge/file/delete": { "post": { - "description": "Disable an enabled MCP server.", - "operationId": "mcp-write-server-disable", + "description": "Delete a file from a knowledge pack by its relative path.", + "operationId": "knowledge-file-write-delete", "requestBody": { "content": { "application/json": { "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" + "rel_path": "tmp/openapi-delete-example.md" }, "schema": { - "$ref": "#/components/schemas/MCPServerStatusRequest" + "$ref": "#/components/schemas/KnowledgeFileDeleteRequest" } } }, @@ -53481,7 +53033,7 @@ "content": { "application/json": { "example": { - "data": null, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -53492,8 +53044,7 @@ { "properties": { "data": { - "description": "Always null on success.", - "type": "null" + "$ref": "#/components/schemas/KnowledgeFileDeleteResponse" } }, "type": "object" @@ -53525,31 +53076,31 @@ "AppKeyAuth": [] } ], - "summary": "Disable MCP server", + "summary": "Delete knowledge file", "tags": [ - "AI SRE/MCP servers" + "AI SRE/Knowledge" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- Disabling an already-disabled server returns InvalidParameter instead of a silent no-op.\n- Requires edit permission on the server's current team: account-scope servers are owner/admin only; team-scope servers require the caller to belong to that team (or be owner/admin).\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-disable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Knowledge Manage** (`ai-sre`) |\n\n## Usage\n\n- Deleting is idempotent — removing a file that does not exist succeeds.\n- When other pack files still reference the target, the delete fails with `ReferenceExist` listing the referrers; set `force` to proceed (the referrers are returned as warnings).\n- Omitting `pack_id` targets the account-scope pack; editing the account pack requires account owner/admin, editing a team pack requires team membership.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/knowledge/knowledge-file-write-delete", "metadata": { - "sidebarTitle": "Disable MCP server" + "sidebarTitle": "Delete knowledge file" } } } }, - "/safari/mcp/server/enable": { + "/safari/knowledge/file/get": { "post": { - "description": "Enable a disabled MCP server.", - "operationId": "mcp-write-server-enable", + "description": "Return a knowledge file's metadata and its base64-encoded content.", + "operationId": "knowledge-file-read-get", "requestBody": { "content": { "application/json": { "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" + "rel_path": "tmp/openapi-example.md" }, "schema": { - "$ref": "#/components/schemas/MCPServerStatusRequest" + "$ref": "#/components/schemas/KnowledgeFileGetRequest" } } }, @@ -53560,7 +53111,19 @@ "content": { "application/json": { "example": { - "data": null, + "data": { + "content_b64": "IyBPcGVuQVBJIGV4YW1wbGUKVGVtcCBmaWxlIGZvciBBUEkgZG9jcyBleGFtcGxlLgo=", + "file": { + "checksum": "a0775f9b3f392cd0560b21ad2f579ae4a5d6b1282b9eb145688ba2de717a816d", + "content_type": "text/markdown", + "file_id": "kfl_gctXKRG45aFQGgxSFr59WY", + "pack_id": "kpk_kE49k3FhecfJBwutbshEEc", + "rel_path": "tmp/openapi-example.md", + "size_bytes": 50, + "updated_at_ms": 1786458764961, + "updated_by": 2476444212131 + } + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -53571,8 +53134,7 @@ { "properties": { "data": { - "description": "Always null on success.", - "type": "null" + "$ref": "#/components/schemas/KnowledgeFileGetResponse" } }, "type": "object" @@ -53589,9 +53151,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -53604,31 +53163,31 @@ "AppKeyAuth": [] } ], - "summary": "Enable MCP server", + "summary": "Get knowledge file", "tags": [ - "AI SRE/MCP servers" + "AI SRE/Knowledge" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- Enabling an already-enabled server returns InvalidParameter instead of a silent no-op.\n- Requires edit permission on the server's current team: account-scope servers are owner/admin only; team-scope servers require the caller to belong to that team (or be owner/admin).\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-enable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Content is returned in `content_b64` (base64); pack files are guaranteed UTF-8 text.\n- Omitting `pack_id` targets the account-scope pack; reading a team-scope pack requires team membership.\n- A missing file returns `ResourceNotFound` (HTTP 400).\n", + "href": "/en/api-reference/ai-sre/knowledge/knowledge-file-read-get", "metadata": { - "sidebarTitle": "Enable MCP server" + "sidebarTitle": "Get knowledge file" } } } }, - "/safari/mcp/server/get": { + "/safari/knowledge/file/list": { "post": { - "description": "Get one MCP server as a pure database read — no live probe is performed.", - "operationId": "mcp-read-server-get", + "description": "List the files in a knowledge pack with metadata such as size and checksum.", + "operationId": "knowledge-file-read-list", "requestBody": { "content": { "application/json": { "example": { - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" + "pack_id": "kpk_kE49k3FhecfJBwutbshEEc" }, "schema": { - "$ref": "#/components/schemas/MCPServerGetRequest" + "$ref": "#/components/schemas/KnowledgeFileListRequest" } } }, @@ -53640,22 +53199,29 @@ "application/json": { "example": { "data": { - "account_id": 10023, - "auth_mode": "shared", - "call_timeout": 60, - "can_edit": true, - "connect_timeout": 10, - "created_at": 1716960000000, - "created_by": 80011, - "description": "Query Prometheus metrics and alerts.", - "environments": [], - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", - "server_name": "prometheus", - "status": "enabled", - "team_id": 0, - "transport": "streamable-http", - "updated_at": 1717046400000, - "url": "https://mcp.example.com/prometheus" + "files": [ + { + "checksum": "fccc276c0d7fbae2e9508285cdde0f8475169634e89e466dac2e59f176c9be2f", + "content_type": "text/markdown", + "file_id": "kfl_QvT4g3c8zAHxTthuT6hGne", + "pack_id": "kpk_kE49k3FhecfJBwutbshEEc", + "rel_path": "aliyun.md", + "size_bytes": 1436, + "updated_at_ms": 1783311304757, + "updated_by": 3790925372131 + }, + { + "checksum": "450eabf178b41e46ea2f43d395a80bf8b956ddb9c9cea34f44ffc69a53e7a36b", + "content_type": "text/markdown", + "file_id": "kfl_BMsQZCZSqhW4TFskYNb4H5", + "pack_id": "kpk_kE49k3FhecfJBwutbshEEc", + "rel_path": "DUTY.md", + "size_bytes": 1301, + "updated_at_ms": 1784800003394, + "updated_by": 2476444212131 + } + ], + "total": 17 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -53667,7 +53233,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/MCPServerItem" + "$ref": "#/components/schemas/KnowledgeFileListResponse" } }, "type": "object" @@ -53696,33 +53262,33 @@ "AppKeyAuth": [] } ], - "summary": "Get MCP server detail", + "summary": "List knowledge files", "tags": [ - "AI SRE/MCP servers" + "AI SRE/Knowledge" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- A pure database read — it never probes the live server; the stored configuration (with secrets masked) and the cached `ai_description` are returned as-is.\n", - "href": "/en/api-reference/ai-sre/mcp-servers/mcp-read-server-get", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Omitting `pack_id` targets the caller's account-scope pack (created lazily if absent).\n- Reading a team-scope pack requires membership of that team.\n- `p`/`limit` are accepted but the current implementation always returns the full file list.\n", + "href": "/en/api-reference/ai-sre/knowledge/knowledge-file-read-list", "metadata": { - "sidebarTitle": "Get MCP server detail" + "sidebarTitle": "List knowledge files" } } } }, - "/safari/mcp/server/list": { + "/safari/knowledge/file/put": { "post": { - "description": "List MCP servers visible to the caller across account and team scopes, with pagination.", - "operationId": "mcp-read-server-list", + "description": "Create or overwrite a file in a knowledge pack with base64-encoded content.", + "operationId": "knowledge-file-write-put", "requestBody": { "content": { "application/json": { "example": { - "include_account": true, - "limit": 20, - "p": 1 + "content_b64": "IyBPcGVuQVBJIGV4YW1wbGUKVGVtcCBmaWxlIGZvciBBUEkgZG9jcyBleGFtcGxlLgo=", + "content_type": "text/markdown", + "rel_path": "tmp/openapi-example.md" }, "schema": { - "$ref": "#/components/schemas/MCPServerListRequest" + "$ref": "#/components/schemas/KnowledgeFilePutRequest" } } }, @@ -53734,27 +53300,16 @@ "application/json": { "example": { "data": { - "servers": [ - { - "account_id": 10023, - "auth_mode": "shared", - "call_timeout": 60, - "can_edit": true, - "connect_timeout": 10, - "created_at": 1716960000000, - "created_by": 80011, - "description": "Query Prometheus metrics and alerts.", - "environments": [], - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", - "server_name": "prometheus", - "status": "enabled", - "team_id": 0, - "transport": "streamable-http", - "updated_at": 1717046400000, - "url": "https://mcp.example.com/prometheus" - } - ], - "total": 1 + "file": { + "checksum": "a0775f9b3f392cd0560b21ad2f579ae4a5d6b1282b9eb145688ba2de717a816d", + "content_type": "text/markdown", + "file_id": "kfl_gctXKRG45aFQGgxSFr59WY", + "pack_id": "kpk_kE49k3FhecfJBwutbshEEc", + "rel_path": "tmp/openapi-example.md", + "size_bytes": 50, + "updated_at_ms": 1786458764961, + "updated_by": 2476444212131 + } }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -53766,7 +53321,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/MCPServerListResponse" + "$ref": "#/components/schemas/KnowledgeFilePutResponse" } }, "type": "object" @@ -53783,6 +53338,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -53795,32 +53353,29 @@ "AppKeyAuth": [] } ], - "summary": "List MCP servers", + "summary": "Upload knowledge file", "tags": [ - "AI SRE/MCP servers" + "AI SRE/Knowledge" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The response never includes a live tool list; tools are probed asynchronously on create/update and cached for runtime use.\n- `query` performs a case-insensitive substring search across name, description, AI-generated description, server ID, transport, URL, command, and source template name.\n", - "href": "/en/api-reference/ai-sre/mcp-servers/mcp-read-server-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Knowledge Manage** (`ai-sre`) |\n\n## Usage\n\n- The file body is sent as base64 text in the JSON field `content_b64` — this is not a multipart upload.\n- Writing an existing `rel_path` overwrites it; `content_type` is inferred from the extension when omitted (`.md` → `text/markdown`).\n- Content must decode to valid UTF-8 text; binary payloads are rejected with `InvalidParameter`.\n- Editing the account-scope pack requires account owner/admin; editing a team pack requires team membership.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/knowledge/knowledge-file-write-put", "metadata": { - "sidebarTitle": "List MCP servers" + "sidebarTitle": "Upload knowledge file" } } } }, - "/safari/mcp/server/update": { + "/safari/knowledge/get": { "post": { - "description": "Update an MCP server's configuration. Omit a field to leave it unchanged.", - "operationId": "mcp-write-server-update", + "description": "Return the account-scope knowledge pack metadata and its file list.", + "operationId": "knowledge-pack-read-get", "requestBody": { "content": { "application/json": { - "example": { - "description": "Query Prometheus metrics, alerts, and rules.", - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" - }, + "example": {}, "schema": { - "$ref": "#/components/schemas/MCPServerUpdateRequest" + "$ref": "#/components/schemas/KnowledgeGetRequest" } } }, @@ -53832,22 +53387,42 @@ "application/json": { "example": { "data": { - "account_id": 10023, - "auth_mode": "shared", - "call_timeout": 60, - "can_edit": true, - "connect_timeout": 10, - "created_at": 1716960000000, - "created_by": 80011, - "description": "Query Prometheus metrics, alerts, and rules.", - "environments": [], - "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", - "server_name": "prometheus", - "status": "enabled", - "team_id": 0, - "transport": "streamable-http", - "updated_at": 1717046400000, - "url": "https://mcp.example.com/prometheus" + "files": [ + { + "checksum": "fccc276c0d7fbae2e9508285cdde0f8475169634e89e466dac2e59f176c9be2f", + "content_type": "text/markdown", + "file_id": "kfl_QvT4g3c8zAHxTthuT6hGne", + "pack_id": "kpk_kE49k3FhecfJBwutbshEEc", + "rel_path": "aliyun.md", + "size_bytes": 1436, + "updated_at_ms": 1783311304757, + "updated_by": 3790925372131 + }, + { + "checksum": "450eabf178b41e46ea2f43d395a80bf8b956ddb9c9cea34f44ffc69a53e7a36b", + "content_type": "text/markdown", + "file_id": "kfl_BMsQZCZSqhW4TFskYNb4H5", + "pack_id": "kpk_kE49k3FhecfJBwutbshEEc", + "rel_path": "DUTY.md", + "size_bytes": 1301, + "updated_at_ms": 1784800003394, + "updated_by": 2476444212131 + } + ], + "pack": { + "account_id": 2451002751131, + "can_edit": true, + "created_at_ms": 1778768680053, + "created_by": 2476444212131, + "duty_version": 130, + "file_count": 17, + "pack_id": "kpk_kE49k3FhecfJBwutbshEEc", + "scope": "account", + "scope_id": 2451002751131, + "total_bytes": 41010, + "updated_at_ms": 1786456567177, + "version": 134 + } }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -53859,7 +53434,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/MCPServerItem" + "$ref": "#/components/schemas/KnowledgeGetResponse" } }, "type": "object" @@ -53876,9 +53451,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -53891,31 +53463,31 @@ "AppKeyAuth": [] } ], - "summary": "Update MCP server", + "summary": "Get account knowledge pack", "tags": [ - "AI SRE/MCP servers" + "AI SRE/Knowledge" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- Masked secret values in `env`/`headers` are preserved — sending the masked value back does not overwrite the stored secret.\n- `environments` is a tri-state partial-update field: omit (null) to leave it unchanged; send a list to set it — an empty list clears the restriction back to all environments.\n- Changing `team_id` requires reassignment permission on the destination team; if `environments` is left unchanged, the current environments must still be selectable by the caller under the new team or the update is rejected.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Always targets the caller's account-scope pack — there is no `pack_id` parameter; use `POST /safari/knowledge/pack/list` to discover team packs.\n- The account pack is created lazily on first access, so a valid account never gets not-found here.\n", + "href": "/en/api-reference/ai-sre/knowledge/knowledge-pack-read-get", "metadata": { - "sidebarTitle": "Update MCP server" + "sidebarTitle": "Get account knowledge pack" } } } }, - "/safari/session/delete": { + "/safari/knowledge/pack/delete": { "post": { - "description": "Delete a session by ID.", - "operationId": "session-write-delete", + "description": "Delete a knowledge pack and all of its files.", + "operationId": "knowledge-pack-write-delete", "requestBody": { "content": { "application/json": { "example": { - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" + "pack_id": "kpk_YqHXPTEUHQFGepUfRS7vsh" }, "schema": { - "$ref": "#/components/schemas/SessionDeleteRequest" + "$ref": "#/components/schemas/KnowledgePackDeleteRequest" } } }, @@ -53926,7 +53498,9 @@ "content": { "application/json": { "example": { - "data": null, + "data": { + "ok": true + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -53937,8 +53511,7 @@ { "properties": { "data": { - "description": "Always null on success.", - "type": "null" + "$ref": "#/components/schemas/KnowledgePackDeleteResponse" } }, "type": "object" @@ -53970,32 +53543,32 @@ "AppKeyAuth": [] } ], - "summary": "Delete session", + "summary": "Delete knowledge pack", "tags": [ - "AI SRE/Sessions" + "AI SRE/Knowledge" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Personal sessions can be deleted only by their creator; team sessions can be deleted by the creator, an account admin, or a member of the owning team.\n- This is a soft delete: it also cascades to delete child subagent sessions and any presented files; the underlying S3/MinIO blobs are removed best-effort after the transaction commits, so an orphaned blob is possible on partial failure.\n", - "href": "/en/api-reference/ai-sre/sessions/session-write-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Knowledge Manage** (`ai-sre`) |\n\n## Usage\n\n- Deleting a pack removes every file it contains; the operation cannot be undone.\n- Deleting the account-scope pack is allowed; it is re-created empty on next access.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/knowledge/knowledge-pack-write-delete", "metadata": { - "sidebarTitle": "Delete session" + "sidebarTitle": "Delete knowledge pack" } } } }, - "/safari/session/export": { + "/safari/knowledge/pack/ensure": { "post": { - "description": "Stream a session's full event transcript as newline-delimited JSON.", - "operationId": "session-read-export", + "description": "Idempotently create the knowledge pack at the given scope, or return the existing one.", + "operationId": "knowledge-pack-write-ensure", "requestBody": { "content": { "application/json": { "example": { - "include_subagents": false, - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" + "scope": "team", + "scope_id": 2477033058131 }, "schema": { - "$ref": "#/components/schemas/SessionExportRequest" + "$ref": "#/components/schemas/KnowledgePackEnsureRequest" } } }, @@ -54004,14 +53577,42 @@ "responses": { "200": { "content": { - "application/x-ndjson": { + "application/json": { + "example": { + "data": { + "account_id": 2451002751131, + "can_edit": true, + "created_at_ms": 1778768680053, + "created_by": 2476444212131, + "duty_version": 130, + "file_count": 17, + "pack_id": "kpk_kE49k3FhecfJBwutbshEEc", + "scope": "account", + "scope_id": 2451002751131, + "total_bytes": 41010, + "updated_at_ms": 1786458765182, + "version": 138 + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, "schema": { - "description": "Newline-delimited JSON stream. Parse line-by-line; do not buffer the whole body.", - "type": "string" + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/KnowledgePackItem" + } + }, + "type": "object" + } + ] } } }, - "description": "Streaming NDJSON (application/x-ndjson). One JSON object per line, terminated by a newline. The first line is always a `session_meta` envelope; subsequent lines are session events." + "description": "Success" }, "400": { "$ref": "#/components/responses/BadRequest" @@ -54034,32 +53635,34 @@ "AppKeyAuth": [] } ], - "summary": "Export session transcript", + "summary": "Ensure knowledge pack", "tags": [ - "AI SRE/Sessions" + "AI SRE/Knowledge" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/day**; **200 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Personal sessions are exportable only by their creator; team sessions can be exported by same-account callers with the `session_id`.\n- The response is `application/x-ndjson` — parse line-by-line and write to a file; do not buffer the whole body in memory.\n- The first line is always a `session_meta` envelope; `include_subagents=true` inlines each child session's stream after its dispatch line.\n- Requests are capped at a 60-second execution timeout; very large sessions may not finish exporting within that window.\n- If the stream fails partway through, the response ends with a JSON error line instead of a proper error envelope (headers are already sent) — check for this trailing line to detect truncation.\n", - "href": "/en/api-reference/ai-sre/sessions/session-read-export", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Knowledge Manage** (`ai-sre`) |\n\n## Usage\n\n- Idempotent: if a pack already exists at (`scope`, `scope_id`), it is returned unchanged.\n- For `account` scope, `scope_id` is ignored (the account ID is used) and a default `DUTY.md` is seeded on first creation.\n- Creating the account-scope pack requires account owner/admin; creating into a team requires membership of that team.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/knowledge/knowledge-pack-write-ensure", "metadata": { - "sidebarTitle": "Export session transcript" + "sidebarTitle": "Ensure knowledge pack" } } } }, - "/safari/session/get": { + "/safari/knowledge/pack/list": { "post": { - "description": "Fetch one session plus a backward-paged window of its most recent events.", - "operationId": "session-read-info", + "description": "List knowledge packs visible to the caller across account and team scopes.", + "operationId": "knowledge-pack-read-list", "requestBody": { "content": { "application/json": { "example": { - "num_recent_events": 50, - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" + "include_account": true, + "limit": 20, + "p": 1, + "scope": "all" }, "schema": { - "$ref": "#/components/schemas/SessionGetRequest" + "$ref": "#/components/schemas/KnowledgePackListRequest" } } }, @@ -54071,75 +53674,38 @@ "application/json": { "example": { "data": { - "events": [ + "packs": [ { - "author": "user", - "created_at": 1780367971241, - "event_id": "evt_3aZQ9p", - "partial": false, - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", - "status": "normal", - "turn_complete": false + "account_id": 2451002751131, + "can_edit": true, + "created_at_ms": 1778768680053, + "created_by": 2476444212131, + "duty_version": 130, + "file_count": 17, + "pack_id": "kpk_kE49k3FhecfJBwutbshEEc", + "scope": "account", + "scope_id": 2451002751131, + "total_bytes": 41010, + "updated_at_ms": 1786456567177, + "version": 134 }, { - "author": "ai-sre", - "content": { - "parts": [ - { - "text": "..." - } - ], - "role": "model" - }, - "created_at": 1780367992649, - "event_id": "evt_7bWk2r", - "partial": false, - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", - "status": "normal", - "turn_complete": true + "account_id": 2451002751131, + "can_edit": true, + "created_at_ms": 1782201586089, + "created_by": 2476444212131, + "duty_version": 15, + "file_count": 4, + "pack_id": "kpk_5qRL34nKtoWM4nQVT2kHzy", + "scope": "team", + "scope_id": 2477033058131, + "team_name": "研发团队", + "total_bytes": 11159, + "updated_at_ms": 1785462092702, + "version": 15 } ], - "has_more_older": false, - "session": { - "access_source": "manager", - "app_name": "ai-sre", - "archived_at": 0, - "can_continue": true, - "can_fork": true, - "can_manage": true, - "can_view": true, - "context_window": 0, - "created_at": 1780367971228, - "current_context_tokens": 14948, - "current_turn_active_ms": 0, - "current_turn_started_at": 0, - "current_turn_tokens": 0, - "current_turn_wait_ms": 0, - "entry_kind": "web", - "has_unread": true, - "incognito": false, - "is_mine": false, - "is_running": false, - "last_event_at": 1780367992649, - "person_id": "3790925372131", - "pinned_at": 0, - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", - "session_name": "Investigate cloud-assistant first heartbeat", - "share_enabled": true, - "share_version": 3, - "shared_at": 1780367971000, - "shared_by": 3790925372131, - "status": "enabled", - "team_id": 0, - "token_usage": { - "cached_tokens": 11520, - "input_tokens": 14948, - "output_tokens": 888, - "reasoning_tokens": 351 - }, - "updated_at": 1780367993457 - }, - "suggest_init": false + "total": 3 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -54151,7 +53717,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/SessionGetResponse" + "$ref": "#/components/schemas/KnowledgePackListResponse" } }, "type": "object" @@ -54168,9 +53734,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -54183,34 +53746,33 @@ "AppKeyAuth": [] } ], - "summary": "Get session detail", + "summary": "List knowledge packs", "tags": [ - "AI SRE/Sessions" + "AI SRE/Knowledge" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Personal sessions are readable only by their creator; team sessions can be read by same-account callers with the `session_id`.\n- Page older history with `search_after_ctx` from the previous response.\n- `limit` (or legacy `num_recent_events`) caps the event page; default 100, max 1000.\n- A malformed `search_after_ctx` returns 400 immediately, before any DB work.\n- `current_turn_*` fields are populated only while the session `is_running`; `suggest_init` is the same account-wide onboarding flag as `session/list`.\n", - "href": "/en/api-reference/ai-sre/sessions/session-read-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Visibility matches the console: admins see the account pack plus every team pack; non-admins see the account pack plus their own teams, and requested `team_ids` are silently intersected with their teams.\n- `scope` selects `all` (default), `account`-only, or `team`-only, overriding `include_account`.\n- `query` applies a case-insensitive substring filter over pack ID, scope, and team name; `p`/`limit` paginate the filtered result.\n", + "href": "/en/api-reference/ai-sre/knowledge/knowledge-pack-read-list", "metadata": { - "sidebarTitle": "Get session detail" + "sidebarTitle": "List knowledge packs" } } } }, - "/safari/session/list": { + "/safari/knowledge/pack/update": { "post": { - "description": "List agent sessions visible to the caller, filtered by app, surface, archive status, and team.", - "operationId": "session-read-list", + "description": "Move a knowledge pack to a different account or team scope.", + "operationId": "knowledge-pack-write-update", "requestBody": { "content": { "application/json": { "example": { - "app_name": "ai-sre", - "limit": 2, - "orderby": "updated_at", - "scope": "all" + "pack_id": "kpk_5qRL34nKtoWM4nQVT2kHzy", + "scope": "team", + "scope_id": 2477033058131 }, "schema": { - "$ref": "#/components/schemas/SessionListRequest" + "$ref": "#/components/schemas/KnowledgePackUpdateRequest" } } }, @@ -54222,49 +53784,19 @@ "application/json": { "example": { "data": { - "sessions": [ - { - "access_source": "manager", - "app_name": "ai-sre", - "archived_at": 0, - "can_continue": true, - "can_fork": true, - "can_manage": true, - "can_view": true, - "context_window": 0, - "created_at": 1780367971228, - "current_context_tokens": 14948, - "current_turn_active_ms": 0, - "current_turn_started_at": 0, - "current_turn_tokens": 0, - "current_turn_wait_ms": 0, - "entry_kind": "web", - "has_unread": true, - "incognito": false, - "is_mine": false, - "is_running": false, - "last_event_at": 1780367992649, - "person_id": "3790925372131", - "pinned_at": 0, - "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", - "session_name": "Investigate cloud-assistant first heartbeat", - "share_enabled": true, - "share_version": 3, - "shared_at": 1780367971000, - "shared_by": 3790925372131, - "status": "enabled", - "team_id": 0, - "token_usage": { - "cached_tokens": 11520, - "input_tokens": 14948, - "output_tokens": 888, - "reasoning_tokens": 351 - }, - "updated_at": 1780367993457 - } - ], - "suggest_init": false, - "total": 988 + "account_id": 2451002751131, + "can_edit": true, + "created_at_ms": 1782201586089, + "created_by": 2476444212131, + "duty_version": 15, + "file_count": 4, + "pack_id": "kpk_5qRL34nKtoWM4nQVT2kHzy", + "scope": "team", + "scope_id": 2477033058131, + "team_name": "研发团队", + "total_bytes": 11159, + "updated_at_ms": 1785462092702, + "version": 15 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -54276,7 +53808,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/SessionListResponse" + "$ref": "#/components/schemas/KnowledgePackItem" } }, "type": "object" @@ -54308,31 +53840,35 @@ "AppKeyAuth": [] } ], - "summary": "List sessions", + "summary": "Update knowledge pack", "tags": [ - "AI SRE/Sessions" + "AI SRE/Knowledge" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Pagination uses `p`/`limit` (max 100); `scope` defaults to `all`.\n- `all` returns your personal sessions plus team sessions you can access; account admins see all team sessions, but not other users' personal sessions.\n- `team_ids` narrows the visible set and never expands access.\n- `is_running` reflects the live run-set; `has_unread` is computed per calling user; the `current_turn_*` fields are always zero here — only `session/get` computes them while a session is running.\n- `suggest_init` is an account-wide onboarding flag (true only when the account has zero knowledge packs anywhere) — it doesn't depend on the list filters.\n", - "href": "/en/api-reference/ai-sre/sessions/session-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Knowledge Manage** (`ai-sre`) |\n\n## Usage\n\n- `scope` is the only mutable field; omitting it is a no-op that returns the current pack.\n- For `team` scope, `scope_id` is required; for `account` scope it is set to the account ID automatically.\n- The move fails with `ReferenceExist` when the destination scope already has a pack — packs are never merged.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/knowledge/knowledge-pack-write-update", "metadata": { - "sidebarTitle": "List sessions" + "sidebarTitle": "Update knowledge pack" } } } }, - "/safari/skill/delete": { + "/safari/mcp/server/create": { "post": { - "description": "Delete a skill by ID.", - "operationId": "skill-write-delete", + "description": "Register a new MCP server (connector) on the account.", + "operationId": "mcp-write-server-create", "requestBody": { "content": { "application/json": { "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + "description": "Query Prometheus metrics and alerts.", + "server_name": "prometheus", + "status": "enabled", + "transport": "streamable-http", + "url": "https://mcp.example.com/prometheus" }, "schema": { - "$ref": "#/components/schemas/SkillDeleteRequest" + "$ref": "#/components/schemas/MCPServerCreateRequest" } } }, @@ -54343,7 +53879,24 @@ "content": { "application/json": { "example": { - "data": null, + "data": { + "account_id": 10023, + "auth_mode": "shared", + "call_timeout": 60, + "can_edit": true, + "connect_timeout": 10, + "created_at": 1716960000000, + "created_by": 80011, + "description": "Query Prometheus metrics and alerts.", + "environments": [], + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", + "server_name": "prometheus", + "status": "enabled", + "team_id": 0, + "transport": "streamable-http", + "updated_at": 1717046400000, + "url": "https://mcp.example.com/prometheus" + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -54354,8 +53907,7 @@ { "properties": { "data": { - "description": "Always null on success.", - "type": "null" + "$ref": "#/components/schemas/MCPServerItem" } }, "type": "object" @@ -54387,31 +53939,31 @@ "AppKeyAuth": [] } ], - "summary": "Delete skill", + "summary": "Create MCP server", "tags": [ - "AI SRE/Skills" + "AI SRE/MCP servers" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Soft delete only: sets `status` to `deleted` and renames the row to free its name for reuse; the skill's zip archive is not removed from object storage.\n- Deleting an already-deleted or nonexistent `skill_id` returns `ResourceNotFound`, since the lookup excludes deleted rows before the delete itself runs.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/skills/skill-write-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- `command`/`args`/`env` apply to `stdio`; `url`/`headers` apply to `sse`/`streamable-http`.\n- Server name must start with a letter and contain only letters, digits, `-`, or `_`, and is unique within its scope (account-wide or one team), case-insensitive; violations return InvalidParameter.\n- `environments` restricts where the server can run: a list of `cloud` and/or BYOC runner environment IDs; omitted or empty means all environments.\n- `per_user_secret` auth mode requires `secret_schema` to be valid JSON with a non-empty `header_name`.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-create", "metadata": { - "sidebarTitle": "Delete skill" + "sidebarTitle": "Create MCP server" } } } }, - "/safari/skill/disable": { + "/safari/mcp/server/delete": { "post": { - "description": "Disable an enabled skill so the agent stops loading it.", - "operationId": "skill-write-disable", + "description": "Delete an MCP server by ID.", + "operationId": "mcp-write-server-delete", "requestBody": { "content": { "application/json": { "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" }, "schema": { - "$ref": "#/components/schemas/SkillStatusRequest" + "$ref": "#/components/schemas/MCPServerDeleteRequest" } } }, @@ -54466,31 +54018,31 @@ "AppKeyAuth": [] } ], - "summary": "Disable skill", + "summary": "Delete MCP server", "tags": [ - "AI SRE/Skills" + "AI SRE/MCP servers" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Only an `enabled` skill can be disabled; an already-disabled skill returns `InvalidParameter`.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/skills/skill-write-disable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-delete", "metadata": { - "sidebarTitle": "Disable skill" + "sidebarTitle": "Delete MCP server" } } } }, - "/safari/skill/enable": { + "/safari/mcp/server/disable": { "post": { - "description": "Enable a disabled skill so the agent can load it.", - "operationId": "skill-read-enable", + "description": "Disable an enabled MCP server.", + "operationId": "mcp-write-server-disable", "requestBody": { "content": { "application/json": { "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" }, "schema": { - "$ref": "#/components/schemas/SkillStatusRequest" + "$ref": "#/components/schemas/MCPServerStatusRequest" } } }, @@ -54545,31 +54097,31 @@ "AppKeyAuth": [] } ], - "summary": "Enable skill", + "summary": "Disable MCP server", "tags": [ - "AI SRE/Skills" + "AI SRE/MCP servers" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Only a `disabled` skill can be enabled; an already-enabled skill returns `InvalidParameter`.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/skills/skill-read-enable", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- Disabling an already-disabled server returns InvalidParameter instead of a silent no-op.\n- Requires edit permission on the server's current team: account-scope servers are owner/admin only; team-scope servers require the caller to belong to that team (or be owner/admin).\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-disable", "metadata": { - "sidebarTitle": "Enable skill" + "sidebarTitle": "Disable MCP server" } } } }, - "/safari/skill/get": { + "/safari/mcp/server/enable": { "post": { - "description": "Get one skill including its full SKILL.md content.", - "operationId": "skill-read-get", + "description": "Enable a disabled MCP server.", + "operationId": "mcp-write-server-enable", "requestBody": { "content": { "application/json": { "example": { - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" }, "schema": { - "$ref": "#/components/schemas/SkillGetRequest" + "$ref": "#/components/schemas/MCPServerStatusRequest" } } }, @@ -54580,32 +54132,7 @@ "content": { "application/json": { "example": { - "data": { - "account_id": 10023, - "author": "sre-team", - "can_edit": true, - "content": "---\nname: k8s-triage\ndescription: ...\n---\n# Triage steps", - "created_at": 1716960000000, - "created_by": 80011, - "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", - "description_en": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", - "is_modified": false, - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", - "skill_name": "k8s-triage", - "status": "enabled", - "tags": [ - "kubernetes", - "triage" - ], - "team_id": 0, - "tools": [ - "bash", - "mcp:prometheus/query" - ], - "update_available": false, - "updated_at": 1717046400000, - "version": "1.2.0" - }, + "data": null, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -54616,7 +54143,8 @@ { "properties": { "data": { - "$ref": "#/components/schemas/SkillItem" + "description": "Always null on success.", + "type": "null" } }, "type": "object" @@ -54633,6 +54161,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -54645,33 +54176,31 @@ "AppKeyAuth": [] } ], - "summary": "Get skill detail", + "summary": "Enable MCP server", "tags": [ - "AI SRE/Skills" + "AI SRE/MCP servers" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `ResourceNotFound` if the skill does not exist or has already been deleted.\n- `can_edit` reflects team membership, but read access itself is open to any caller regardless of team.\n", - "href": "/en/api-reference/ai-sre/skills/skill-read-get", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- Enabling an already-enabled server returns InvalidParameter instead of a silent no-op.\n- Requires edit permission on the server's current team: account-scope servers are owner/admin only; team-scope servers require the caller to belong to that team (or be owner/admin).\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-enable", "metadata": { - "sidebarTitle": "Get skill detail" + "sidebarTitle": "Enable MCP server" } } } }, - "/safari/skill/list": { + "/safari/mcp/server/get": { "post": { - "description": "List AI SRE skills visible to the caller across account and team scopes, with pagination.", - "operationId": "skill-read-list", + "description": "Get one MCP server as a pure database read — no live probe is performed.", + "operationId": "mcp-read-server-get", "requestBody": { "content": { "application/json": { "example": { - "include_account": true, - "limit": 20, - "p": 1 + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" }, "schema": { - "$ref": "#/components/schemas/SkillListRequest" + "$ref": "#/components/schemas/MCPServerGetRequest" } } }, @@ -54683,33 +54212,22 @@ "application/json": { "example": { "data": { - "skills": [ - { - "account_id": 10023, - "author": "sre-team", - "can_edit": true, - "created_at": 1716960000000, - "created_by": 80011, - "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", - "is_modified": false, - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", - "skill_name": "k8s-triage", - "status": "enabled", - "tags": [ - "kubernetes", - "triage" - ], - "team_id": 0, - "tools": [ - "bash", - "mcp:prometheus/query" - ], - "update_available": false, - "updated_at": 1717046400000, - "version": "1.2.0" - } - ], - "total": 1 + "account_id": 10023, + "auth_mode": "shared", + "call_timeout": 60, + "can_edit": true, + "connect_timeout": 10, + "created_at": 1716960000000, + "created_by": 80011, + "description": "Query Prometheus metrics and alerts.", + "environments": [], + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", + "server_name": "prometheus", + "status": "enabled", + "team_id": 0, + "transport": "streamable-http", + "updated_at": 1717046400000, + "url": "https://mcp.example.com/prometheus" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -54721,7 +54239,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/SkillListResponse" + "$ref": "#/components/schemas/MCPServerItem" } }, "type": "object" @@ -54750,32 +54268,33 @@ "AppKeyAuth": [] } ], - "summary": "List skills", + "summary": "Get MCP server detail", "tags": [ - "AI SRE/Skills" + "AI SRE/MCP servers" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The `content` field is omitted in list rows; fetch a single skill to read its body.\n- `scope` selects `all` (default), `account`-only, or `team`-only, overriding `include_account`; non-admins requesting specific `team_ids` are silently filtered down to the teams they belong to.\n- `update_available` compares against the marketplace catalog once per call; if the catalog fails to load, the badge is simply suppressed rather than the request failing.\n", - "href": "/en/api-reference/ai-sre/skills/skill-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- A pure database read — it never probes the live server; the stored configuration (with secrets masked) and the cached `ai_description` are returned as-is.\n", + "href": "/en/api-reference/ai-sre/mcp-servers/mcp-read-server-get", "metadata": { - "sidebarTitle": "List skills" + "sidebarTitle": "Get MCP server detail" } } } }, - "/safari/skill/update": { + "/safari/mcp/server/list": { "post": { - "description": "Update a skill's descriptions or reassign its team scope.", - "operationId": "skill-write-update", + "description": "List MCP servers visible to the caller across account and team scopes, with pagination.", + "operationId": "mcp-read-server-list", "requestBody": { "content": { "application/json": { "example": { - "description": "Updated triage runbook.", - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + "include_account": true, + "limit": 20, + "p": 1 }, "schema": { - "$ref": "#/components/schemas/SkillUpdateRequest" + "$ref": "#/components/schemas/MCPServerListRequest" } } }, @@ -54787,28 +54306,27 @@ "application/json": { "example": { "data": { - "account_id": 10023, - "author": "sre-team", - "can_edit": true, - "created_at": 1716960000000, - "created_by": 80011, - "description": "Updated triage runbook.", - "is_modified": false, - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", - "skill_name": "k8s-triage", - "status": "enabled", - "tags": [ - "kubernetes", - "triage" - ], - "team_id": 0, - "tools": [ - "bash", - "mcp:prometheus/query" + "servers": [ + { + "account_id": 10023, + "auth_mode": "shared", + "call_timeout": 60, + "can_edit": true, + "connect_timeout": 10, + "created_at": 1716960000000, + "created_by": 80011, + "description": "Query Prometheus metrics and alerts.", + "environments": [], + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", + "server_name": "prometheus", + "status": "enabled", + "team_id": 0, + "transport": "streamable-http", + "updated_at": 1717046400000, + "url": "https://mcp.example.com/prometheus" + } ], - "update_available": false, - "updated_at": 1717046400000, - "version": "1.2.0" + "total": 1 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -54820,7 +54338,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/SkillItem" + "$ref": "#/components/schemas/MCPServerListResponse" } }, "type": "object" @@ -54837,9 +54355,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -54852,32 +54367,32 @@ "AppKeyAuth": [] } ], - "summary": "Update skill", + "summary": "List MCP servers", "tags": [ - "AI SRE/Skills" + "AI SRE/MCP servers" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Only `description`, `description_en`, and `team_id` are editable; the skill body is changed by re-uploading.\n- `description` only updates when non-empty — there is no way to clear it via this field; `description_en` is nilable, so send an empty string to explicitly clear it.\n- Reassigning `team_id` to a different team runs a second authorization check beyond edit access, verifying the caller may target the destination team.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/skills/skill-write-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The response never includes a live tool list; tools are probed asynchronously on create/update and cached for runtime use.\n- `query` performs a case-insensitive substring search across name, description, AI-generated description, server ID, transport, URL, command, and source template name.\n", + "href": "/en/api-reference/ai-sre/mcp-servers/mcp-read-server-list", "metadata": { - "sidebarTitle": "Update skill" + "sidebarTitle": "List MCP servers" } } } }, - "/safari/skill/upload": { + "/safari/mcp/server/update": { "post": { - "description": "Upload a skill archive (.skill/.zip/.tar.gz/.tgz) to create or replace a skill.", - "operationId": "skill-write-upload", + "description": "Update an MCP server's configuration. Omit a field to leave it unchanged.", + "operationId": "mcp-write-server-update", "requestBody": { "content": { - "multipart/form-data": { + "application/json": { "example": { - "replace": false, - "team_id": 0 + "description": "Query Prometheus metrics, alerts, and rules.", + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1" }, "schema": { - "$ref": "#/components/schemas/SkillUploadRequest" + "$ref": "#/components/schemas/MCPServerUpdateRequest" } } }, @@ -54890,27 +54405,21 @@ "example": { "data": { "account_id": 10023, - "author": "sre-team", + "auth_mode": "shared", + "call_timeout": 60, "can_edit": true, + "connect_timeout": 10, "created_at": 1716960000000, "created_by": 80011, - "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", - "is_modified": false, - "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", - "skill_name": "k8s-triage", + "description": "Query Prometheus metrics, alerts, and rules.", + "environments": [], + "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1", + "server_name": "prometheus", "status": "enabled", - "tags": [ - "kubernetes", - "triage" - ], "team_id": 0, - "tools": [ - "bash", - "mcp:prometheus/query" - ], - "update_available": false, + "transport": "streamable-http", "updated_at": 1717046400000, - "version": "1.2.0" + "url": "https://mcp.example.com/prometheus" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -54922,7 +54431,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/SkillItem" + "$ref": "#/components/schemas/MCPServerItem" } }, "type": "object" @@ -54954,31 +54463,31 @@ "AppKeyAuth": [] } ], - "summary": "Upload skill", + "summary": "Update MCP server", "tags": [ - "AI SRE/Skills" + "AI SRE/MCP servers" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **30 requests/minute**; **3 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Send as `multipart/form-data` with a `file` part; accepted archive types are `.skill`, `.zip`, `.tar.gz`, `.tgz`, capped at 100MB (oversized files are rejected before the body is read).\n- `skill_id` + `replace=true` targets and overwrites that specific skill, skipping the team-authorship check since the caller already owns the row.\n- `replace=true` without `skill_id` upserts by matching skill name; omitting `replace` always creates a new skill — both paths require the caller to be allowed to author into the target `team_id`.\n- The response always stamps `can_edit: true`.\n- Every call is recorded in the account audit log.\n", - "href": "/en/api-reference/ai-sre/skills/skill-write-upload", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- Masked secret values in `env`/`headers` are preserved — sending the masked value back does not overwrite the stored secret.\n- `environments` is a tri-state partial-update field: omit (null) to leave it unchanged; send a list to set it — an empty list clears the restriction back to all environments.\n- Changing `team_id` requires reassignment permission on the destination team; if `environments` is left unchanged, the current environments must still be selectable by the caller under the new team or the update is rejected.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-update", "metadata": { - "sidebarTitle": "Upload skill" + "sidebarTitle": "Update MCP server" } } } }, - "/schedule/by-person": { + "/safari/session/delete": { "post": { - "description": "Get a member's current and next on-call shifts and every enabled schedule they participate in.", - "operationId": "scheduleByPerson", + "description": "Delete a session by ID.", + "operationId": "session-write-delete", "requestBody": { "content": { "application/json": { "example": { - "person_id": 2476444212131 + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" }, "schema": { - "$ref": "#/components/schemas/ScheduleByPersonRequest" + "$ref": "#/components/schemas/SessionDeleteRequest" } } }, @@ -54989,37 +54498,19 @@ "content": { "application/json": { "example": { - "data": { - "current": { - "end_at": 1773532799, - "schedule_id": 2539108069860, - "schedule_name": "Open Source Q&A", - "start_at": 1773446400 - }, - "next": { - "end_at": 1773619199, - "schedule_id": 2539108069860, - "schedule_name": "Open Source Q&A", - "start_at": 1773532800 - }, - "schedules": [ - { - "schedule_id": 2539108069860, - "schedule_name": "Open Source Q&A" - } - ] - }, + "data": null, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "properties": { "data": { - "$ref": "#/components/schemas/ScheduleByPersonResponse" + "description": "Always null on success.", + "type": "null" } }, "type": "object" @@ -55036,6 +54527,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -55043,102 +54537,37 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get member on-call status", + "security": [ + { + "AppKeyAuth": [] + } + ], + "summary": "Delete session", "tags": [ - "On-call/Schedules" + "AI SRE/Sessions" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Schedules Read** (`on-call`) or **Schedules Manage** (`on-call`) |\n\n## Usage\n\n- `current` carries the shift in progress with its true start time; `next` is the upcoming shift, absent when nothing is scheduled within the lookup window.\n- Disabled schedules are not listed.", - "href": "/en/api-reference/on-call/schedules/schedule-by-person", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Personal sessions can be deleted only by their creator; team sessions can be deleted by the creator, an account admin, or a member of the owning team.\n- This is a soft delete: it also cascades to delete child subagent sessions and any presented files; the underlying S3/MinIO blobs are removed best-effort after the transaction commits, so an orphaned blob is possible on partial failure.\n", + "href": "/en/api-reference/ai-sre/sessions/session-write-delete", "metadata": { - "sidebarTitle": "Get member on-call status" + "sidebarTitle": "Delete session" } } } }, - "/schedule/create": { + "/safari/session/export": { "post": { - "description": "Create a new on-call schedule (escalation rule schedule).", - "operationId": "scheduleCreate", + "description": "Stream a session's full event transcript as newline-delimited JSON.", + "operationId": "session-read-export", "requestBody": { "content": { "application/json": { "example": { - "description": "Primary on-call rotation for the production team", - "layers": [ - { - "day_mask": { - "repeat": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - "enable_time": 1712000000, - "expire_time": 0, - "fair_rotation": false, - "groups": [ - { - "end": 0, - "group_name": "A", - "members": [ - { - "person_ids": [ - 2451002751131 - ], - "role_id": 0 - } - ], - "name": "A", - "start": 0 - }, - { - "end": 0, - "group_name": "B", - "members": [ - { - "person_ids": [ - 2476123212131 - ], - "role_id": 0 - } - ], - "name": "B", - "start": 0 - } - ], - "handoff_time": 0, - "hidden": 0, - "layer_name": "Layer 1", - "mask_continuous_enabled": false, - "mode": 0, - "name": "Layer 1", - "restrict_end": 0, - "restrict_mode": 0, - "restrict_periods": [], - "restrict_start": 0, - "rotation_duration": 86400, - "rotation_unit": "day", - "rotation_value": 1, - "weight": 0 - } - ], - "notify": { - "advance_in_time": 300, - "by": { - "follow_preference": true, - "personal_channels": null - }, - "fixed_time": null, - "webhooks": null - }, - "schedule_name": "Production On-Call", - "team_id": 4291079133131 + "include_subagents": false, + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" }, "schema": { - "$ref": "#/components/schemas/ScheduleUpsertRequest" + "$ref": "#/components/schemas/SessionExportRequest" } } }, @@ -55147,31 +54576,14 @@ "responses": { "200": { "content": { - "application/json": { - "example": { - "data": { - "schedule_id": 6294534917601 - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, + "application/x-ndjson": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/ScheduleIDResponse" - } - }, - "type": "object" - } - ] + "description": "Newline-delimited JSON stream. Parse line-by-line; do not buffer the whole body.", + "type": "string" } } }, - "description": "Success" + "description": "Streaming NDJSON (application/x-ndjson). One JSON object per line, terminated by a newline. The first line is always a `session_meta` envelope; subsequent lines are session events." }, "400": { "$ref": "#/components/responses/BadRequest" @@ -55179,6 +54591,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -55186,33 +54601,37 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create schedule", + "security": [ + { + "AppKeyAuth": [] + } + ], + "summary": "Export session transcript", "tags": [ - "On-call/Schedules" + "AI SRE/Sessions" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Schedules Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/schedules/schedule-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/day**; **200 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Personal sessions are exportable only by their creator; team sessions can be exported by same-account callers with the `session_id`.\n- The response is `application/x-ndjson` — parse line-by-line and write to a file; do not buffer the whole body in memory.\n- The first line is always a `session_meta` envelope; `include_subagents=true` inlines each child session's stream after its dispatch line.\n- Requests are capped at a 60-second execution timeout; very large sessions may not finish exporting within that window.\n- If the stream fails partway through, the response ends with a JSON error line instead of a proper error envelope (headers are already sent) — check for this trailing line to detect truncation.\n", + "href": "/en/api-reference/ai-sre/sessions/session-read-export", "metadata": { - "sidebarTitle": "Create schedule" + "sidebarTitle": "Export session transcript" } } } }, - "/schedule/delete": { + "/safari/session/get": { "post": { - "description": "Delete one or more on-call schedules by ID.", - "operationId": "scheduleDelete", + "description": "Fetch one session plus a backward-paged window of its most recent events.", + "operationId": "session-read-info", "requestBody": { "content": { "application/json": { "example": { - "schedule_ids": [ - 2001 - ] + "num_recent_events": 50, + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u" }, "schema": { - "$ref": "#/components/schemas/ScheduleIDsBodyRequest" + "$ref": "#/components/schemas/SessionGetRequest" } } }, @@ -55223,18 +54642,88 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "events": [ + { + "author": "user", + "created_at": 1780367971241, + "event_id": "evt_3aZQ9p", + "partial": false, + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "status": "normal", + "turn_complete": false + }, + { + "author": "ai-sre", + "content": { + "parts": [ + { + "text": "..." + } + ], + "role": "model" + }, + "created_at": 1780367992649, + "event_id": "evt_7bWk2r", + "partial": false, + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "status": "normal", + "turn_complete": true + } + ], + "has_more_older": false, + "session": { + "access_source": "manager", + "app_name": "ai-sre", + "archived_at": 0, + "can_continue": true, + "can_fork": true, + "can_manage": true, + "can_view": true, + "context_window": 0, + "created_at": 1780367971228, + "current_context_tokens": 14948, + "current_turn_active_ms": 0, + "current_turn_started_at": 0, + "current_turn_tokens": 0, + "current_turn_wait_ms": 0, + "entry_kind": "web", + "has_unread": true, + "incognito": false, + "is_mine": false, + "is_running": false, + "last_event_at": 1780367992649, + "person_id": "3790925372131", + "pinned_at": 0, + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "session_name": "Investigate cloud-assistant first heartbeat", + "share_enabled": true, + "share_version": 3, + "shared_at": 1780367971000, + "shared_by": 3790925372131, + "status": "enabled", + "team_id": 0, + "token_usage": { + "cached_tokens": 11520, + "input_tokens": 14948, + "output_tokens": 888, + "reasoning_tokens": 351 + }, + "updated_at": 1780367993457 + }, + "suggest_init": false + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { "allOf": [ { - "$ref": "#/components/schemas/SuccessEnvelope" + "$ref": "#/components/schemas/ResponseEnvelope" }, { "properties": { "data": { - "$ref": "#/components/schemas/ScheduleEmptyObject" + "$ref": "#/components/schemas/SessionGetResponse" } }, "type": "object" @@ -55251,6 +54740,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -55258,33 +54750,39 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete schedules", + "security": [ + { + "AppKeyAuth": [] + } + ], + "summary": "Get session detail", "tags": [ - "On-call/Schedules" + "AI SRE/Sessions" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Schedules Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/schedules/schedule-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Personal sessions are readable only by their creator; team sessions can be read by same-account callers with the `session_id`.\n- Page older history with `search_after_ctx` from the previous response.\n- `limit` (or legacy `num_recent_events`) caps the event page; default 100, max 1000.\n- A malformed `search_after_ctx` returns 400 immediately, before any DB work.\n- `current_turn_*` fields are populated only while the session `is_running`; `suggest_init` is the same account-wide onboarding flag as `session/list`.\n", + "href": "/en/api-reference/ai-sre/sessions/session-read-info", "metadata": { - "sidebarTitle": "Delete schedules" + "sidebarTitle": "Get session detail" } } } }, - "/schedule/info": { + "/safari/session/list": { "post": { - "description": "Return details of an on-call schedule including the computed schedule layers for the requested time window (max 45 days).", - "operationId": "scheduleInfo", + "description": "List agent sessions visible to the caller, filtered by app, surface, archive status, and team.", + "operationId": "session-read-list", "requestBody": { "content": { "application/json": { "example": { - "end": 1712086400, - "schedule_id": 2001, - "start": 1712000000 + "app_name": "ai-sre", + "limit": 2, + "orderby": "updated_at", + "scope": "all" }, "schema": { - "$ref": "#/components/schemas/ScheduleInfoRequest" + "$ref": "#/components/schemas/SessionListRequest" } } }, @@ -55296,60 +54794,1134 @@ "application/json": { "example": { "data": { - "account_id": 2451002751131, - "create_at": 1766110836, - "create_by": 2476123212131, - "cur_oncall": { - "end": 1776009600, - "group": { - "end": 1776009600, - "group_name": "A", - "members": [ - { - "person_ids": [ - 2451002751131 - ], - "role_id": 0 - } - ], - "name": "A", - "start": 1775972040 - }, - "index": 0, - "start": 1775972040, - "update_at": 0, - "weight": 0 + "sessions": [ + { + "access_source": "manager", + "app_name": "ai-sre", + "archived_at": 0, + "can_continue": true, + "can_fork": true, + "can_manage": true, + "can_view": true, + "context_window": 0, + "created_at": 1780367971228, + "current_context_tokens": 14948, + "current_turn_active_ms": 0, + "current_turn_started_at": 0, + "current_turn_tokens": 0, + "current_turn_wait_ms": 0, + "entry_kind": "web", + "has_unread": true, + "incognito": false, + "is_mine": false, + "is_running": false, + "last_event_at": 1780367992649, + "person_id": "3790925372131", + "pinned_at": 0, + "session_id": "sess_f8oDvqiG64uur6sBNsTc4u", + "session_name": "Investigate cloud-assistant first heartbeat", + "share_enabled": true, + "share_version": 3, + "shared_at": 1780367971000, + "shared_by": 3790925372131, + "status": "enabled", + "team_id": 0, + "token_usage": { + "cached_tokens": 11520, + "input_tokens": 14948, + "output_tokens": 888, + "reasoning_tokens": 351 + }, + "updated_at": 1780367993457 + } + ], + "suggest_init": false, + "total": 988 + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" }, - "description": "abc", - "disabled": 0, - "final_schedule": { - "layer_name": "", - "mode": 0, - "name": "", - "schedules": [ - { - "end": 1776096000, - "group": { - "end": 1776096000, - "group_name": "A", - "members": [ - { - "person_ids": [ - 3122470302131 - ], - "role_id": 0 - } - ], - "name": "A", - "start": 1776009600 - }, - "index": 0, - "start": 1776009600 + { + "properties": { + "data": { + "$ref": "#/components/schemas/SessionListResponse" } - ] - }, - "group_id": 4291079133131, - "id": 5789640530410, + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "security": [ + { + "AppKeyAuth": [] + } + ], + "summary": "List sessions", + "tags": [ + "AI SRE/Sessions" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Pagination uses `p`/`limit` (max 100); `scope` defaults to `all`.\n- `all` returns your personal sessions plus team sessions you can access; account admins see all team sessions, but not other users' personal sessions.\n- `team_ids` narrows the visible set and never expands access.\n- `is_running` reflects the live run-set; `has_unread` is computed per calling user; the `current_turn_*` fields are always zero here — only `session/get` computes them while a session is running.\n- `suggest_init` is an account-wide onboarding flag (true only when the account has zero knowledge packs anywhere) — it doesn't depend on the list filters.\n", + "href": "/en/api-reference/ai-sre/sessions/session-read-list", + "metadata": { + "sidebarTitle": "List sessions" + } + } + } + }, + "/safari/skill/delete": { + "post": { + "description": "Delete a skill by ID.", + "operationId": "skill-write-delete", + "requestBody": { + "content": { + "application/json": { + "example": { + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + }, + "schema": { + "$ref": "#/components/schemas/SkillDeleteRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": null, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "properties": { + "data": { + "description": "Always null on success.", + "type": "null" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "security": [ + { + "AppKeyAuth": [] + } + ], + "summary": "Delete skill", + "tags": [ + "AI SRE/Skills" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Soft delete only: sets `status` to `deleted` and renames the row to free its name for reuse; the skill's zip archive is not removed from object storage.\n- Deleting an already-deleted or nonexistent `skill_id` returns `ResourceNotFound`, since the lookup excludes deleted rows before the delete itself runs.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/skills/skill-write-delete", + "metadata": { + "sidebarTitle": "Delete skill" + } + } + } + }, + "/safari/skill/disable": { + "post": { + "description": "Disable an enabled skill so the agent stops loading it.", + "operationId": "skill-write-disable", + "requestBody": { + "content": { + "application/json": { + "example": { + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + }, + "schema": { + "$ref": "#/components/schemas/SkillStatusRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": null, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "properties": { + "data": { + "description": "Always null on success.", + "type": "null" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "security": [ + { + "AppKeyAuth": [] + } + ], + "summary": "Disable skill", + "tags": [ + "AI SRE/Skills" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Only an `enabled` skill can be disabled; an already-disabled skill returns `InvalidParameter`.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/skills/skill-write-disable", + "metadata": { + "sidebarTitle": "Disable skill" + } + } + } + }, + "/safari/skill/enable": { + "post": { + "description": "Enable a disabled skill so the agent can load it.", + "operationId": "skill-read-enable", + "requestBody": { + "content": { + "application/json": { + "example": { + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + }, + "schema": { + "$ref": "#/components/schemas/SkillStatusRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": null, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "properties": { + "data": { + "description": "Always null on success.", + "type": "null" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "security": [ + { + "AppKeyAuth": [] + } + ], + "summary": "Enable skill", + "tags": [ + "AI SRE/Skills" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Only a `disabled` skill can be enabled; an already-enabled skill returns `InvalidParameter`.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/skills/skill-read-enable", + "metadata": { + "sidebarTitle": "Enable skill" + } + } + } + }, + "/safari/skill/get": { + "post": { + "description": "Get one skill including its full SKILL.md content.", + "operationId": "skill-read-get", + "requestBody": { + "content": { + "application/json": { + "example": { + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + }, + "schema": { + "$ref": "#/components/schemas/SkillGetRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": { + "account_id": 10023, + "author": "sre-team", + "can_edit": true, + "content": "---\nname: k8s-triage\ndescription: ...\n---\n# Triage steps", + "created_at": 1716960000000, + "created_by": 80011, + "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", + "description_en": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", + "is_modified": false, + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", + "skill_name": "k8s-triage", + "status": "enabled", + "tags": [ + "kubernetes", + "triage" + ], + "team_id": 0, + "tools": [ + "bash", + "mcp:prometheus/query" + ], + "update_available": false, + "updated_at": 1717046400000, + "version": "1.2.0" + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/SkillItem" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "security": [ + { + "AppKeyAuth": [] + } + ], + "summary": "Get skill detail", + "tags": [ + "AI SRE/Skills" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `ResourceNotFound` if the skill does not exist or has already been deleted.\n- `can_edit` reflects team membership, but read access itself is open to any caller regardless of team.\n", + "href": "/en/api-reference/ai-sre/skills/skill-read-get", + "metadata": { + "sidebarTitle": "Get skill detail" + } + } + } + }, + "/safari/skill/list": { + "post": { + "description": "List AI SRE skills visible to the caller across account and team scopes, with pagination.", + "operationId": "skill-read-list", + "requestBody": { + "content": { + "application/json": { + "example": { + "include_account": true, + "limit": 20, + "p": 1 + }, + "schema": { + "$ref": "#/components/schemas/SkillListRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": { + "skills": [ + { + "account_id": 10023, + "author": "sre-team", + "can_edit": true, + "created_at": 1716960000000, + "created_by": 80011, + "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", + "is_modified": false, + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", + "skill_name": "k8s-triage", + "status": "enabled", + "tags": [ + "kubernetes", + "triage" + ], + "team_id": 0, + "tools": [ + "bash", + "mcp:prometheus/query" + ], + "update_available": false, + "updated_at": 1717046400000, + "version": "1.2.0" + } + ], + "total": 1 + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/SkillListResponse" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "security": [ + { + "AppKeyAuth": [] + } + ], + "summary": "List skills", + "tags": [ + "AI SRE/Skills" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The `content` field is omitted in list rows; fetch a single skill to read its body.\n- `scope` selects `all` (default), `account`-only, or `team`-only, overriding `include_account`; non-admins requesting specific `team_ids` are silently filtered down to the teams they belong to.\n- `update_available` compares against the marketplace catalog once per call; if the catalog fails to load, the badge is simply suppressed rather than the request failing.\n", + "href": "/en/api-reference/ai-sre/skills/skill-read-list", + "metadata": { + "sidebarTitle": "List skills" + } + } + } + }, + "/safari/skill/update": { + "post": { + "description": "Update a skill's descriptions or reassign its team scope.", + "operationId": "skill-write-update", + "requestBody": { + "content": { + "application/json": { + "example": { + "description": "Updated triage runbook.", + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m" + }, + "schema": { + "$ref": "#/components/schemas/SkillUpdateRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": { + "account_id": 10023, + "author": "sre-team", + "can_edit": true, + "created_at": 1716960000000, + "created_by": 80011, + "description": "Updated triage runbook.", + "is_modified": false, + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", + "skill_name": "k8s-triage", + "status": "enabled", + "tags": [ + "kubernetes", + "triage" + ], + "team_id": 0, + "tools": [ + "bash", + "mcp:prometheus/query" + ], + "update_available": false, + "updated_at": 1717046400000, + "version": "1.2.0" + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/SkillItem" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "security": [ + { + "AppKeyAuth": [] + } + ], + "summary": "Update skill", + "tags": [ + "AI SRE/Skills" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Only `description`, `description_en`, and `team_id` are editable; the skill body is changed by re-uploading.\n- `description` only updates when non-empty — there is no way to clear it via this field; `description_en` is nilable, so send an empty string to explicitly clear it.\n- Reassigning `team_id` to a different team runs a second authorization check beyond edit access, verifying the caller may target the destination team.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/skills/skill-write-update", + "metadata": { + "sidebarTitle": "Update skill" + } + } + } + }, + "/safari/skill/upload": { + "post": { + "description": "Upload a skill archive (.skill/.zip/.tar.gz/.tgz) to create or replace a skill.", + "operationId": "skill-write-upload", + "requestBody": { + "content": { + "multipart/form-data": { + "example": { + "replace": false, + "team_id": 0 + }, + "schema": { + "$ref": "#/components/schemas/SkillUploadRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": { + "account_id": 10023, + "author": "sre-team", + "can_edit": true, + "created_at": 1716960000000, + "created_by": 80011, + "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.", + "is_modified": false, + "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m", + "skill_name": "k8s-triage", + "status": "enabled", + "tags": [ + "kubernetes", + "triage" + ], + "team_id": 0, + "tools": [ + "bash", + "mcp:prometheus/query" + ], + "update_available": false, + "updated_at": 1717046400000, + "version": "1.2.0" + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/SkillItem" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "security": [ + { + "AppKeyAuth": [] + } + ], + "summary": "Upload skill", + "tags": [ + "AI SRE/Skills" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **30 requests/minute**; **3 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Send as `multipart/form-data` with a `file` part; accepted archive types are `.skill`, `.zip`, `.tar.gz`, `.tgz`, capped at 100MB (oversized files are rejected before the body is read).\n- `skill_id` + `replace=true` targets and overwrites that specific skill, skipping the team-authorship check since the caller already owns the row.\n- `replace=true` without `skill_id` upserts by matching skill name; omitting `replace` always creates a new skill — both paths require the caller to be allowed to author into the target `team_id`.\n- The response always stamps `can_edit: true`.\n- Every call is recorded in the account audit log.\n", + "href": "/en/api-reference/ai-sre/skills/skill-write-upload", + "metadata": { + "sidebarTitle": "Upload skill" + } + } + } + }, + "/schedule/by-person": { + "post": { + "description": "Get a member's current and next on-call shifts and every enabled schedule they participate in.", + "operationId": "scheduleByPerson", + "requestBody": { + "content": { + "application/json": { + "example": { + "person_id": 2476444212131 + }, + "schema": { + "$ref": "#/components/schemas/ScheduleByPersonRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": { + "current": { + "end_at": 1773532799, + "schedule_id": 2539108069860, + "schedule_name": "Open Source Q&A", + "start_at": 1773446400 + }, + "next": { + "end_at": 1773619199, + "schedule_id": 2539108069860, + "schedule_name": "Open Source Q&A", + "start_at": 1773532800 + }, + "schedules": [ + { + "schedule_id": 2539108069860, + "schedule_name": "Open Source Q&A" + } + ] + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleByPersonResponse" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "summary": "Get member on-call status", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Schedules Read** (`on-call`) or **Schedules Manage** (`on-call`) |\n\n## Usage\n\n- `current` carries the shift in progress with its true start time; `next` is the upcoming shift, absent when nothing is scheduled within the lookup window.\n- Disabled schedules are not listed.", + "href": "/en/api-reference/on-call/schedules/schedule-by-person", + "metadata": { + "sidebarTitle": "Get member on-call status" + } + } + } + }, + "/schedule/create": { + "post": { + "description": "Create a new on-call schedule (escalation rule schedule).", + "operationId": "scheduleCreate", + "requestBody": { + "content": { + "application/json": { + "example": { + "description": "Primary on-call rotation for the production team", + "layers": [ + { + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "enable_time": 1712000000, + "expire_time": 0, + "fair_rotation": false, + "groups": [ + { + "end": 0, + "group_name": "A", + "members": [ + { + "person_ids": [ + 2451002751131 + ], + "role_id": 0 + } + ], + "name": "A", + "start": 0 + }, + { + "end": 0, + "group_name": "B", + "members": [ + { + "person_ids": [ + 2476123212131 + ], + "role_id": 0 + } + ], + "name": "B", + "start": 0 + } + ], + "handoff_time": 0, + "hidden": 0, + "layer_name": "Layer 1", + "mask_continuous_enabled": false, + "mode": 0, + "name": "Layer 1", + "restrict_end": 0, + "restrict_mode": 0, + "restrict_periods": [], + "restrict_start": 0, + "rotation_duration": 86400, + "rotation_unit": "day", + "rotation_value": 1, + "weight": 0 + } + ], + "notify": { + "advance_in_time": 300, + "by": { + "follow_preference": true, + "personal_channels": null + }, + "fixed_time": null, + "webhooks": null + }, + "schedule_name": "Production On-Call", + "team_id": 4291079133131 + }, + "schema": { + "$ref": "#/components/schemas/ScheduleUpsertRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": { + "schedule_id": 6294534917601 + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleIDResponse" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "summary": "Create schedule", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Schedules Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/schedules/schedule-create", + "metadata": { + "sidebarTitle": "Create schedule" + } + } + } + }, + "/schedule/delete": { + "post": { + "description": "Delete one or more on-call schedules by ID.", + "operationId": "scheduleDelete", + "requestBody": { + "content": { + "application/json": { + "example": { + "schedule_ids": [ + 2001 + ] + }, + "schema": { + "$ref": "#/components/schemas/ScheduleIDsBodyRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": {}, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleEmptyObject" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "summary": "Delete schedules", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Schedules Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/schedules/schedule-delete", + "metadata": { + "sidebarTitle": "Delete schedules" + } + } + } + }, + "/schedule/info": { + "post": { + "description": "Return details of an on-call schedule including the computed schedule layers for the requested time window (max 45 days).", + "operationId": "scheduleInfo", + "requestBody": { + "content": { + "application/json": { + "example": { + "end": 1712086400, + "schedule_id": 2001, + "start": 1712000000 + }, + "schema": { + "$ref": "#/components/schemas/ScheduleInfoRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": { + "account_id": 2451002751131, + "create_at": 1766110836, + "create_by": 2476123212131, + "cur_oncall": { + "end": 1776009600, + "group": { + "end": 1776009600, + "group_name": "A", + "members": [ + { + "person_ids": [ + 2451002751131 + ], + "role_id": 0 + } + ], + "name": "A", + "start": 1775972040 + }, + "index": 0, + "start": 1775972040, + "update_at": 0, + "weight": 0 + }, + "description": "abc", + "disabled": 0, + "final_schedule": { + "layer_name": "", + "mode": 0, + "name": "", + "schedules": [ + { + "end": 1776096000, + "group": { + "end": 1776096000, + "group_name": "A", + "members": [ + { + "person_ids": [ + 3122470302131 + ], + "role_id": 0 + } + ], + "name": "A", + "start": 1776009600 + }, + "index": 0, + "start": 1776009600 + } + ] + }, + "group_id": 4291079133131, + "id": 5789640530410, "layer_schedules": [ { "layer_name": "Layer 1", @@ -55364,7 +55936,724 @@ "members": [ { "person_ids": [ - 3122470302131 + 3122470302131 + ], + "role_id": 0 + } + ], + "name": "A", + "start": 1776009600 + }, + "index": 0, + "start": 1776009600 + } + ] + } + ], + "layers": [ + { + "account_id": 2451002751131, + "create_at": 1775205795, + "create_by": 2476123212131, + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "enable_time": 1767542400, + "expire_time": 0, + "fair_rotation": false, + "groups": [ + { + "end": 0, + "group_name": "A", + "members": [ + { + "person_ids": [ + 3122470302131 + ], + "role_id": 0 + } + ], + "name": "A", + "start": 0 + }, + { + "end": 0, + "group_name": "B", + "members": [ + { + "person_ids": [ + 2659460982131 + ], + "role_id": 0 + } + ], + "name": "B", + "start": 0 + } + ], + "handoff_time": 0, + "hidden": 0, + "layer_end": null, + "layer_name": "Layer 1", + "layer_start": 1767542400, + "mask_continuous_enabled": false, + "mode": 0, + "name": "Layer 1", + "restrict_end": 0, + "restrict_mode": 0, + "restrict_periods": [], + "restrict_start": 0, + "rotation_duration": 86400, + "rotation_unit": "day", + "rotation_value": 1, + "schedule_id": 5789640530410, + "update_at": 1775205795, + "update_by": 2476123212131, + "weight": 0 + } + ], + "name": "test-000001", + "next_oncall": { + "end": 1776096000, + "group": { + "end": 1776096000, + "group_name": "A", + "members": [ + { + "person_ids": [ + 3122470302131 + ], + "role_id": 0 + } + ], + "name": "A", + "start": 1776009600 + }, + "index": 0, + "start": 1776009600, + "update_at": 0, + "weight": 0 + }, + "notify": { + "advance_in_time": 300, + "by": { + "follow_preference": false, + "personal_channels": [ + "email" + ] + }, + "fixed_time": null, + "webhooks": [ + { + "settings": { + "alias": "", + "chat_ids": [ + "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d" + ], + "data_source_id": 5427276014131, + "sign_secret": "", + "token": "", + "verify_token": "" + }, + "type": "feishu_app" + } + ] + }, + "schedule_id": 5789640530410, + "schedule_layers": [ + { + "layer_name": "Layer 1", + "mode": 0, + "name": "Layer 1", + "schedules": [ + { + "end": 1776096000, + "group": { + "end": 1776096000, + "group_name": "A", + "members": [ + { + "person_ids": [ + 3122470302131 + ], + "role_id": 0 + } + ], + "name": "A", + "start": 1776009600 + }, + "index": 0, + "start": 1776009600 + }, + { + "end": 1776182400, + "group": { + "end": 1776182400, + "group_name": "B", + "members": [ + { + "person_ids": [ + 2659460982131 + ], + "role_id": 0 + } + ], + "name": "B", + "start": 1776096000 + }, + "index": 0, + "start": 1776096000 + } + ] + } + ], + "schedule_name": "test-000001", + "status": 0, + "team_id": 4291079133131, + "update_at": 1775205795, + "update_by": 2476123212131 + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleItem" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "summary": "Get schedule info", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Schedules Read** (`on-call`) or **Schedules Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/schedules/schedule-info", + "metadata": { + "sidebarTitle": "Get schedule info" + } + } + } + }, + "/schedule/infos": { + "post": { + "description": "Return details of multiple on-call schedules by their IDs.", + "operationId": "scheduleInfos", + "requestBody": { + "content": { + "application/json": { + "example": { + "schedule_ids": [ + 2001, + 2002, + 2003 + ] + }, + "schema": { + "$ref": "#/components/schemas/ScheduleIDsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": { + "items": [ + { + "account_id": 2451002751131, + "create_at": 1766110836, + "create_by": 2476123212131, + "cur_oncall": null, + "description": "abc", + "disabled": 0, + "final_schedule": { + "layer_name": "", + "mode": 0, + "name": "", + "schedules": null + }, + "group_id": 4291079133131, + "id": 5789640530410, + "layer_schedules": null, + "layers": null, + "name": "test-000001", + "next_oncall": null, + "notify": { + "advance_in_time": 300, + "by": { + "follow_preference": false, + "personal_channels": [ + "email" + ] + }, + "fixed_time": null, + "webhooks": [ + { + "settings": { + "alias": "", + "chat_ids": [ + "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d" + ], + "data_source_id": 5427276014131, + "sign_secret": "", + "token": "", + "verify_token": "" + }, + "type": "feishu_app" + } + ] + }, + "schedule_id": 5789640530410, + "schedule_layers": null, + "schedule_name": "test-000001", + "status": 0, + "team_id": 4291079133131, + "update_at": 1775205795, + "update_by": 2476123212131 + } + ] + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleSelfResponse" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "summary": "Batch get schedules", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Schedules Read** (`on-call`) or **Schedules Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/schedules/schedule-infos", + "metadata": { + "sidebarTitle": "Batch get schedules" + } + } + } + }, + "/schedule/list": { + "post": { + "description": "Return a paginated list of on-call schedules. When both start and end are provided (max 45 days apart), computed layer schedules are included.", + "operationId": "scheduleList", + "requestBody": { + "content": { + "application/json": { + "example": { + "is_my_team": true, + "limit": 20, + "p": 1, + "query": "production" + }, + "schema": { + "$ref": "#/components/schemas/ScheduleListRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": { + "items": [ + { + "account_id": 2451002751131, + "create_at": 1766110836, + "create_by": 2476123212131, + "cur_oncall": null, + "description": "abc", + "disabled": 0, + "final_schedule": { + "layer_name": "", + "mode": 0, + "name": "", + "schedules": null + }, + "group_id": 4291079133131, + "id": 5789640530410, + "layer_schedules": null, + "layers": null, + "name": "test-000001", + "next_oncall": null, + "notify": { + "advance_in_time": 300, + "by": { + "follow_preference": false, + "personal_channels": [ + "email" + ] + }, + "fixed_time": null, + "webhooks": [ + { + "settings": { + "alias": "", + "chat_ids": [ + "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d" + ], + "data_source_id": 5427276014131, + "sign_secret": "", + "token": "", + "verify_token": "" + }, + "type": "feishu_app" + } + ] + }, + "schedule_id": 5789640530410, + "schedule_layers": null, + "schedule_name": "test-000001", + "status": 0, + "team_id": 4291079133131, + "update_at": 1775205795, + "update_by": 2476123212131 + }, + { + "account_id": 2451002751131, + "create_at": 1759132037, + "create_by": 2476123212131, + "cur_oncall": null, + "description": "", + "disabled": 0, + "final_schedule": { + "layer_name": "", + "mode": 0, + "name": "", + "schedules": null + }, + "group_id": 2477033058131, + "id": 5432326025106, + "layer_schedules": null, + "layers": null, + "name": "test-2509300001", + "next_oncall": null, + "notify": { + "advance_in_time": 300, + "by": { + "follow_preference": true, + "personal_channels": null + }, + "fixed_time": null, + "webhooks": null + }, + "schedule_id": 5432326025106, + "schedule_layers": null, + "schedule_name": "test-2509300001", + "status": 0, + "team_id": 2477033058131, + "update_at": 1775207501, + "update_by": 2476123212131 + } + ], + "total": 41 + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleListResponse" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "summary": "List schedules", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/schedules/schedule-list", + "metadata": { + "sidebarTitle": "List schedules" + } + } + } + }, + "/schedule/preview": { + "post": { + "description": "Preview the coverage generated by a schedule configuration without persisting it. The request accepts the same body as create/update plus a required start/end window (max 45 days).", + "operationId": "schedulePreview", + "requestBody": { + "content": { + "application/json": { + "example": { + "end": 1712086400, + "layers": [ + { + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "enable_time": 1712000000, + "expire_time": 0, + "fair_rotation": false, + "groups": [ + { + "end": 0, + "group_name": "A", + "members": [ + { + "person_ids": [ + 2451002751131 + ], + "role_id": 0 + } + ], + "name": "A", + "start": 0 + } + ], + "handoff_time": 0, + "hidden": 0, + "layer_name": "Layer 1", + "mask_continuous_enabled": false, + "mode": 0, + "name": "Layer 1", + "restrict_end": 0, + "restrict_mode": 0, + "restrict_periods": [], + "restrict_start": 0, + "rotation_duration": 86400, + "rotation_unit": "day", + "rotation_value": 1, + "weight": 0 + } + ], + "schedule_name": "Preview Schedule", + "start": 1712000000 + }, + "schema": { + "$ref": "#/components/schemas/ScheduleUpsertRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": { + "account_id": 0, + "create_at": 0, + "create_by": 0, + "cur_oncall": null, + "description": null, + "disabled": null, + "end": 1776240000, + "final_schedule": { + "layer_name": "", + "mode": 0, + "name": "", + "schedules": [ + { + "end": 1776096000, + "group": { + "end": 1776096000, + "group_name": "A", + "members": [ + { + "person_ids": [ + 2451002751131 + ], + "role_id": 0 + } + ], + "name": "A", + "start": 1776009600 + }, + "index": 0, + "start": 1776009600 + } + ] + }, + "group_id": null, + "id": null, + "layer_schedules": null, + "layers": [ + { + "account_id": 0, + "create_at": 0, + "create_by": 0, + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "enable_time": 1775980800, + "expire_time": 0, + "fair_rotation": false, + "groups": [ + { + "end": 0, + "group_name": "A", + "members": [ + { + "person_ids": [ + 2451002751131 + ], + "role_id": 0 + } + ], + "name": "A", + "start": 0 + }, + { + "end": 0, + "group_name": "B", + "members": [ + { + "person_ids": [ + 2476123212131 + ], + "role_id": 0 + } + ], + "name": "B", + "start": 0 + } + ], + "handoff_time": 0, + "hidden": 0, + "layer_end": null, + "layer_name": "Layer 1", + "layer_start": 1775980800, + "mask_continuous_enabled": false, + "mode": 0, + "name": "Layer 1", + "restrict_end": 0, + "restrict_mode": 0, + "restrict_periods": [], + "restrict_start": 0, + "rotation_duration": 86400, + "rotation_unit": "day", + "rotation_value": 1, + "schedule_id": 0, + "update_at": 0, + "update_by": 0, + "weight": 0 + } + ], + "name": null, + "next_oncall": null, + "notify": null, + "schedule_id": 0, + "schedule_layers": [ + { + "layer_name": "Layer 1", + "mode": 0, + "name": "Layer 1", + "schedules": [ + { + "end": 1776096000, + "group": { + "end": 1776096000, + "group_name": "A", + "members": [ + { + "person_ids": [ + 2451002751131 ], "role_id": 0 } @@ -55374,178 +56663,594 @@ }, "index": 0, "start": 1776009600 + }, + { + "end": 1776182400, + "group": { + "end": 1776182400, + "group_name": "B", + "members": [ + { + "person_ids": [ + 2476123212131 + ], + "role_id": 0 + } + ], + "name": "B", + "start": 1776096000 + }, + "index": 0, + "start": 1776096000 + } + ] + } + ], + "schedule_name": null, + "start": 1775980800, + "status": null, + "team_id": null, + "update_at": 0, + "update_by": 0 + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleItem" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "summary": "Preview schedule", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **60 requests/minute**; **10 requests/second** per account |\n| Permissions | **Schedules Read** (`on-call`) or **Schedules Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/schedules/schedule-preview", + "metadata": { + "sidebarTitle": "Preview schedule" + } + } + } + }, + "/schedule/self": { + "post": { + "description": "Return on-call schedules where the current user is assigned.", + "operationId": "scheduleSelf", + "requestBody": { + "content": { + "application/json": { + "example": { + "end": 1712086400, + "start": 1712000000 + }, + "schema": { + "$ref": "#/components/schemas/ScheduleSelfRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": { + "items": [ + { + "account_id": 2451002751131, + "create_at": 1702623874, + "create_by": 2451002751131, + "cur_oncall": null, + "description": "", + "disabled": 0, + "final_schedule": { + "layer_name": "", + "mode": 0, + "name": "", + "schedules": null + }, + "group_id": 2477033058131, + "id": 2539108069860, + "layer_schedules": null, + "layers": [ + { + "account_id": 2451002751131, + "create_at": 1702623874, + "create_by": 2451002751131, + "day_mask": { + "repeat": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "enable_time": 1702623874, + "expire_time": 0, + "fair_rotation": false, + "groups": [ + { + "end": 0, + "group_name": "A", + "members": [ + { + "person_ids": [ + 2476444212131 + ], + "role_id": 0 + } + ], + "name": "A", + "start": 0 + }, + { + "end": 0, + "group_name": "B", + "members": [ + { + "person_ids": [ + 2469167612131 + ], + "role_id": 0 + } + ], + "name": "B", + "start": 0 + } + ], + "handoff_time": 0, + "hidden": 0, + "layer_end": null, + "layer_name": "Rule 1", + "layer_start": 1702623874, + "mask_continuous_enabled": false, + "mode": 0, + "name": "Rule 1", + "restrict_end": 0, + "restrict_mode": 0, + "restrict_periods": [], + "restrict_start": 0, + "rotation_duration": 86400, + "rotation_unit": "day", + "rotation_value": 1, + "schedule_id": 2539108069860, + "update_at": 1710468081, + "update_by": 2476444212131, + "weight": 0 } - ] + ], + "name": "Open Source Q&A", + "next_oncall": null, + "notify": { + "by": null, + "fixed_time": null, + "webhooks": null + }, + "schedule_id": 2539108069860, + "schedule_layers": null, + "schedule_name": "Open Source Q&A", + "status": 0, + "team_id": 2477033058131, + "update_at": 1710468081, + "update_by": 2476444212131 + } + ] + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleSelfResponse" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "summary": "List my schedules", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Schedules Read** (`on-call`) or **Schedules Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/schedules/schedule-self", + "metadata": { + "sidebarTitle": "List my schedules" + } + } + } + }, + "/schedule/update": { + "post": { + "description": "Update an existing on-call schedule. Provide schedule_id to identify the schedule.", + "operationId": "scheduleUpdate", + "requestBody": { + "content": { + "application/json": { + "example": { + "description": "Updated primary on-call rotation", + "schedule_id": 2001, + "schedule_name": "Production On-Call (Updated)", + "team_id": 4291079133131 + }, + "schema": { + "$ref": "#/components/schemas/ScheduleUpsertRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": {}, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/ScheduleEmptyObject" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "summary": "Update schedule", + "tags": [ + "On-call/Schedules" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Schedules Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/schedules/schedule-update", + "metadata": { + "sidebarTitle": "Update schedule" + } + } + } + }, + "/sourcemap/list": { + "post": { + "description": "Return a paginated list of uploaded sourcemap files filtered by platform type, service, and version.", + "operationId": "sourcemap-read-list", + "requestBody": { + "content": { + "application/json": { + "example": { + "end_time": 1712700000000, + "limit": 20, + "p": 1, + "services": [ + "my-web-app" + ], + "start_time": 1712000000000, + "type": "browser" + }, + "schema": { + "$ref": "#/components/schemas/SourcemapListRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": { + "items": [ + { + "created_at": 1712700000, + "git_commit_sha": "abc1234def5678", + "git_repository_url": "https://github.com/example/my-web-app", + "key": "browser/my-web-app/1.0.0/main.js.map", + "metadata": {}, + "service": "my-web-app", + "size": 204800, + "type": "browser", + "updated_at": 1712700000, + "version": "1.0.0" } ], - "layers": [ + "total": 3 + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/SourcemapListResponse" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "summary": "List sourcemaps", + "tags": [ + "RUM/Sourcemaps" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `start_time` and `end_time` are required — both use Unix epoch **milliseconds**. Maximum window is 365 days.\n- The `type` field selects the platform: `browser` (JavaScript), `android`, or `ios`. Defaults to `browser` when omitted.\n- Default page size is 20; maximum is 100. Default sort is `created_at` descending.\n- For Android, `build_id` matches the Gradle plugin build identifier. For iOS, `uuid` matches the dSYM bundle UUID.", + "href": "/en/api-reference/rum/sourcemaps/sourcemap-read-list", + "metadata": { + "sidebarTitle": "List sourcemaps" + } + } + } + }, + "/sourcemap/stack/enrich": { + "post": { + "description": "Symbolicate or deobfuscate a browser, Android, iOS, Mini Program, or HarmonyOS stack trace.", + "operationId": "sourcemap-read-stack-enrich", + "requestBody": { + "content": { + "application/json": { + "example": { + "near": 3, + "service": "my-web-app", + "stack": "TypeError: Cannot read properties of undefined\n at render (https://cdn.example.com/app.min.js:1:2345)", + "type": "browser", + "version": "1.0.0" + }, + "schema": { + "$ref": "#/components/schemas/SourcemapStackEnrichRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": { + "frames": [ { - "account_id": 2451002751131, - "create_at": 1775205795, - "create_by": 2476123212131, - "day_mask": { - "repeat": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - "enable_time": 1767542400, - "expire_time": 0, - "fair_rotation": false, - "groups": [ + "code_snippets": [ { - "end": 0, - "group_name": "A", - "members": [ - { - "person_ids": [ - 3122470302131 - ], - "role_id": 0 - } - ], - "name": "A", - "start": 0 + "code": "const cart = props.cart;", + "line": 41 }, { - "end": 0, - "group_name": "B", - "members": [ - { - "person_ids": [ - 2659460982131 - ], - "role_id": 0 - } - ], - "name": "B", - "start": 0 + "code": "return cart.items.map(renderItem);", + "line": 42 } ], - "handoff_time": 0, - "hidden": 0, - "layer_end": null, - "layer_name": "Layer 1", - "layer_start": 1767542400, - "mask_continuous_enabled": false, - "mode": 0, - "name": "Layer 1", - "restrict_end": 0, - "restrict_mode": 0, - "restrict_periods": [], - "restrict_start": 0, - "rotation_duration": 86400, - "rotation_unit": "day", - "rotation_value": 1, - "schedule_id": 5789640530410, - "update_at": 1775205795, - "update_by": 2476123212131, - "weight": 0 + "column": 17, + "converted": true, + "file": "src/pages/checkout.tsx", + "function": "renderCheckout", + "line": 42, + "original_frame": { + "column": 2345, + "file": "https://cdn.example.com/app.min.js", + "function": "render", + "line": 1 + } } - ], - "name": "test-000001", - "next_oncall": { - "end": 1776096000, - "group": { - "end": 1776096000, - "group_name": "A", - "members": [ - { - "person_ids": [ - 3122470302131 - ], - "role_id": 0 - } - ], - "name": "A", - "start": 1776009600 - }, - "index": 0, - "start": 1776009600, - "update_at": 0, - "weight": 0 + ] + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" }, - "notify": { - "advance_in_time": 300, - "by": { - "follow_preference": false, - "personal_channels": [ - "email" - ] - }, - "fixed_time": null, - "webhooks": [ - { - "settings": { - "alias": "", - "chat_ids": [ - "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d" - ], - "data_source_id": 5427276014131, - "sign_secret": "", - "token": "", - "verify_token": "" - }, - "type": "feishu_app" + { + "properties": { + "data": { + "$ref": "#/components/schemas/SourcemapStackEnrichResponse" } - ] - }, - "schedule_id": 5789640530410, - "schedule_layers": [ + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" + } + }, + "summary": "Enrich a stack trace", + "tags": [ + "RUM/Sourcemaps" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `type` defaults to `browser` when omitted for backward compatibility.\n- Set `near` from 1 to 20 to include source-code snippets around converted frames.\n- For Android NDK native crashes, provide `arch` and `source_type: ndk` so the backend routes to native symbolication.\n- For iOS crash stacks, pass `binary_images` so addresses can be relocated against the uploaded dSYM files.\n- `no_cache` is intended for debugging and bypasses cached enrich results.", + "href": "/en/api-reference/rum/sourcemaps/sourcemap-read-stack-enrich", + "metadata": { + "sidebarTitle": "Enrich a stack trace" + } + } + } + }, + "/status-page/change/active/list": { + "get": { + "description": "List in-progress (non-terminal) events of a given type for a status page.", + "operationId": "statusPageChangeActiveList", + "parameters": [ + { + "description": "Status page ID.", + "in": "query", + "name": "page_id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + }, + { + "description": "Event type filter. Required. Returns only in-progress (non-terminal) events — `investigating`/`identified`/`monitoring` for `incident`, `scheduled`/`ongoing` for `maintenance`.", + "in": "query", + "name": "type", + "required": true, + "schema": { + "enum": [ + "incident", + "maintenance" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": { + "items": [ { - "layer_name": "Layer 1", - "mode": 0, - "name": "Layer 1", - "schedules": [ - { - "end": 1776096000, - "group": { - "end": 1776096000, - "group_name": "A", - "members": [ - { - "person_ids": [ - 3122470302131 - ], - "role_id": 0 - } - ], - "name": "A", - "start": 1776009600 - }, - "index": 0, - "start": 1776009600 - }, + "affected_components": [ { - "end": 1776182400, - "group": { - "end": 1776182400, - "group_name": "B", - "members": [ - { - "person_ids": [ - 2659460982131 - ], - "role_id": 0 - } - ], - "name": "B", - "start": 1776096000 - }, - "index": 0, - "start": 1776096000 + "available_since_seconds": 1765349358, + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "name": "Web Console", + "order_id": 1, + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", + "status": "degraded" + } + ], + "change_id": 5821693893131, + "description": "We are currently investigating an issue affecting some services.", + "notify_subscribers": true, + "page_id": 5750613685214, + "start_at_seconds": 1766736878, + "status": "investigating", + "title": "Web Console Degraded Performance", + "type": "incident", + "updates": [ + { + "at_seconds": 1766736876, + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "component_name": "Web Console", + "status": "degraded" + } + ], + "description": "We are currently investigating an issue affecting some services.", + "status": "investigating", + "update_id": "01KDCVJQ88SZPHWPTDV2Z2AZW8" } ] } - ], - "schedule_name": "test-000001", - "status": 0, - "team_id": 4291079133131, - "update_at": 1775205795, - "update_by": 2476123212131 + ] }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -55557,7 +57262,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ScheduleItem" + "$ref": "#/components/schemas/StatusPageChangeListResponse" } }, "type": "object" @@ -55581,35 +57286,49 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get schedule info", + "summary": "List active status page events", "tags": [ - "On-call/Schedules" + "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Schedules Read** (`on-call`) or **Schedules Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/schedules/schedule-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-active-list", "metadata": { - "sidebarTitle": "Get schedule info" + "sidebarTitle": "List active status page events" } } } }, - "/schedule/infos": { + "/status-page/change/create": { "post": { - "description": "Return details of multiple on-call schedules by their IDs.", - "operationId": "scheduleInfos", + "description": "Create a new incident or maintenance event on a status page.", + "operationId": "statusPageChangeCreate", "requestBody": { "content": { "application/json": { "example": { - "schedule_ids": [ - 2001, - 2002, - 2003 + "description": "We are investigating degraded performance affecting the web console.", + "notify_subscribers": true, + "page_id": 5750613685214, + "start_at_seconds": 1712000000, + "status": "investigating", + "title": "Web Console Degraded Performance", + "type": "incident", + "updates": [ + { + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "status": "degraded" + } + ], + "description": "We are currently investigating an issue affecting some users.", + "status": "investigating" + } ] }, "schema": { - "$ref": "#/components/schemas/ScheduleIDsRequest" + "$ref": "#/components/schemas/CreateStatusPageChangeRequest" } } }, @@ -55621,60 +57340,8 @@ "application/json": { "example": { "data": { - "items": [ - { - "account_id": 2451002751131, - "create_at": 1766110836, - "create_by": 2476123212131, - "cur_oncall": null, - "description": "abc", - "disabled": 0, - "final_schedule": { - "layer_name": "", - "mode": 0, - "name": "", - "schedules": null - }, - "group_id": 4291079133131, - "id": 5789640530410, - "layer_schedules": null, - "layers": null, - "name": "test-000001", - "next_oncall": null, - "notify": { - "advance_in_time": 300, - "by": { - "follow_preference": false, - "personal_channels": [ - "email" - ] - }, - "fixed_time": null, - "webhooks": [ - { - "settings": { - "alias": "", - "chat_ids": [ - "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d" - ], - "data_source_id": 5427276014131, - "sign_secret": "", - "token": "", - "verify_token": "" - }, - "type": "feishu_app" - } - ] - }, - "schedule_id": 5789640530410, - "schedule_layers": null, - "schedule_name": "test-000001", - "status": 0, - "team_id": 4291079133131, - "update_at": 1775205795, - "update_by": 2476123212131 - } - ] + "change_id": 6294539747131, + "change_name": "API Test Incident" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -55686,7 +57353,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ScheduleSelfResponse" + "$ref": "#/components/schemas/StatusPageChangeCreateResponse" } }, "type": "object" @@ -55710,137 +57377,43 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Batch get schedules", + "summary": "Create status page event", "tags": [ - "On-call/Schedules" + "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Schedules Read** (`on-call`) or **Schedules Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/schedules/schedule-infos", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-create", "metadata": { - "sidebarTitle": "Batch get schedules" + "sidebarTitle": "Create status page event" } } } }, - "/schedule/list": { + "/status-page/change/delete": { "post": { - "description": "Return a paginated list of on-call schedules. When both start and end are provided (max 45 days apart), computed layer schedules are included.", - "operationId": "scheduleList", + "description": "Delete a status page event.", + "operationId": "statusPageChangeDelete", "requestBody": { "content": { "application/json": { "example": { - "is_my_team": true, - "limit": 20, - "p": 1, - "query": "production" + "change_id": 5821693893131, + "page_id": 5750613685214 }, "schema": { - "$ref": "#/components/schemas/ScheduleListRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "data": { - "items": [ - { - "account_id": 2451002751131, - "create_at": 1766110836, - "create_by": 2476123212131, - "cur_oncall": null, - "description": "abc", - "disabled": 0, - "final_schedule": { - "layer_name": "", - "mode": 0, - "name": "", - "schedules": null - }, - "group_id": 4291079133131, - "id": 5789640530410, - "layer_schedules": null, - "layers": null, - "name": "test-000001", - "next_oncall": null, - "notify": { - "advance_in_time": 300, - "by": { - "follow_preference": false, - "personal_channels": [ - "email" - ] - }, - "fixed_time": null, - "webhooks": [ - { - "settings": { - "alias": "", - "chat_ids": [ - "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d" - ], - "data_source_id": 5427276014131, - "sign_secret": "", - "token": "", - "verify_token": "" - }, - "type": "feishu_app" - } - ] - }, - "schedule_id": 5789640530410, - "schedule_layers": null, - "schedule_name": "test-000001", - "status": 0, - "team_id": 4291079133131, - "update_at": 1775205795, - "update_by": 2476123212131 - }, - { - "account_id": 2451002751131, - "create_at": 1759132037, - "create_by": 2476123212131, - "cur_oncall": null, - "description": "", - "disabled": 0, - "final_schedule": { - "layer_name": "", - "mode": 0, - "name": "", - "schedules": null - }, - "group_id": 2477033058131, - "id": 5432326025106, - "layer_schedules": null, - "layers": null, - "name": "test-2509300001", - "next_oncall": null, - "notify": { - "advance_in_time": 300, - "by": { - "follow_preference": true, - "personal_channels": null - }, - "fixed_time": null, - "webhooks": null - }, - "schedule_id": 5432326025106, - "schedule_layers": null, - "schedule_name": "test-2509300001", - "status": 0, - "team_id": 2477033058131, - "update_at": 1775207501, - "update_by": 2476123212131 - } - ], - "total": 41 - }, + "$ref": "#/components/schemas/DeleteStatusPageChangeRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -55851,7 +57424,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ScheduleListResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -55875,251 +57448,98 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List schedules", + "summary": "Delete status page event", "tags": [ - "On-call/Schedules" + "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/schedules/schedule-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-delete", "metadata": { - "sidebarTitle": "List schedules" + "sidebarTitle": "Delete status page event" } } } }, - "/schedule/preview": { - "post": { - "description": "Preview the coverage generated by a schedule configuration without persisting it. The request accepts the same body as create/update plus a required start/end window (max 45 days).", - "operationId": "schedulePreview", - "requestBody": { - "content": { - "application/json": { - "example": { - "end": 1712086400, - "layers": [ - { - "day_mask": { - "repeat": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - "enable_time": 1712000000, - "expire_time": 0, - "fair_rotation": false, - "groups": [ - { - "end": 0, - "group_name": "A", - "members": [ - { - "person_ids": [ - 2451002751131 - ], - "role_id": 0 - } - ], - "name": "A", - "start": 0 - } - ], - "handoff_time": 0, - "hidden": 0, - "layer_name": "Layer 1", - "mask_continuous_enabled": false, - "mode": 0, - "name": "Layer 1", - "restrict_end": 0, - "restrict_mode": 0, - "restrict_periods": [], - "restrict_start": 0, - "rotation_duration": 86400, - "rotation_unit": "day", - "rotation_value": 1, - "weight": 0 - } - ], - "schedule_name": "Preview Schedule", - "start": 1712000000 - }, - "schema": { - "$ref": "#/components/schemas/ScheduleUpsertRequest" - } + "/status-page/change/info": { + "get": { + "description": "Retrieve details of a specific status page event (incident or maintenance).", + "operationId": "statusPageChangeInfo", + "parameters": [ + { + "description": "Status page ID.", + "in": "query", + "name": "page_id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" } }, - "required": true - }, + { + "description": "Event (change) ID.", + "in": "query", + "name": "change_id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + } + ], "responses": { "200": { "content": { "application/json": { "example": { "data": { - "account_id": 0, - "create_at": 0, - "create_by": 0, - "cur_oncall": null, - "description": null, - "disabled": null, - "end": 1776240000, - "final_schedule": { - "layer_name": "", - "mode": 0, - "name": "", - "schedules": [ - { - "end": 1776096000, - "group": { - "end": 1776096000, - "group_name": "A", - "members": [ - { - "person_ids": [ - 2451002751131 - ], - "role_id": 0 - } - ], - "name": "A", - "start": 1776009600 - }, - "index": 0, - "start": 1776009600 - } - ] - }, - "group_id": null, - "id": null, - "layer_schedules": null, - "layers": [ + "affected_components": [ { - "account_id": 0, - "create_at": 0, - "create_by": 0, - "day_mask": { - "repeat": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - "enable_time": 1775980800, - "expire_time": 0, - "fair_rotation": false, - "groups": [ - { - "end": 0, - "group_name": "A", - "members": [ - { - "person_ids": [ - 2451002751131 - ], - "role_id": 0 - } - ], - "name": "A", - "start": 0 - }, - { - "end": 0, - "group_name": "B", - "members": [ - { - "person_ids": [ - 2476123212131 - ], - "role_id": 0 - } - ], - "name": "B", - "start": 0 - } - ], - "handoff_time": 0, - "hidden": 0, - "layer_end": null, - "layer_name": "Layer 1", - "layer_start": 1775980800, - "mask_continuous_enabled": false, - "mode": 0, - "name": "Layer 1", - "restrict_end": 0, - "restrict_mode": 0, - "restrict_periods": [], - "restrict_start": 0, - "rotation_duration": 86400, - "rotation_unit": "day", - "rotation_value": 1, - "schedule_id": 0, - "update_at": 0, - "update_by": 0, - "weight": 0 + "available_since_seconds": 1765349358, + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "name": "Web Console", + "order_id": 1, + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", + "status": "operational" } ], - "name": null, - "next_oncall": null, - "notify": null, - "schedule_id": 0, - "schedule_layers": [ - { - "layer_name": "Layer 1", - "mode": 0, - "name": "Layer 1", - "schedules": [ - { - "end": 1776096000, - "group": { - "end": 1776096000, - "group_name": "A", - "members": [ - { - "person_ids": [ - 2451002751131 - ], - "role_id": 0 - } - ], - "name": "A", - "start": 1776009600 - }, - "index": 0, - "start": 1776009600 - }, + "change_id": 5821693893131, + "close_at_seconds": 1775529742, + "description": "The issue has been resolved, and all services are operating normally.\n\nThank you for your patience.", + "notify_subscribers": true, + "page_id": 5750613685214, + "start_at_seconds": 1766736878, + "status": "resolved", + "title": "Web Console Degraded Performance", + "type": "incident", + "updates": [ + { + "at_seconds": 1766736876, + "component_changes": [ { - "end": 1776182400, - "group": { - "end": 1776182400, - "group_name": "B", - "members": [ - { - "person_ids": [ - 2476123212131 - ], - "role_id": 0 - } - ], - "name": "B", - "start": 1776096000 - }, - "index": 0, - "start": 1776096000 + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "component_name": "Web Console", + "status": "degraded" } - ] + ], + "description": "We are currently investigating an issue affecting some services.", + "status": "investigating", + "update_id": "01KDCVJQ88SZPHWPTDV2Z2AZW8" + }, + { + "at_seconds": 1775529742, + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "component_name": "Web Console", + "status": "operational" + } + ], + "description": "The issue has been resolved, and all services are operating normally.", + "status": "resolved", + "update_id": "01KNJX3KW873ZZSRZC14SGFYS3" } - ], - "schedule_name": null, - "start": 1775980800, - "status": null, - "team_id": null, - "update_at": 0, - "update_by": 0 + ] }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -56131,7 +57551,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ScheduleItem" + "$ref": "#/components/schemas/StatusPageChangeItem" } }, "type": "object" @@ -56155,37 +57575,86 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Preview schedule", + "summary": "Get status page event detail", "tags": [ - "On-call/Schedules" + "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **60 requests/minute**; **10 requests/second** per account |\n| Permissions | **Schedules Read** (`on-call`) or **Schedules Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/schedules/schedule-preview", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-info", "metadata": { - "sidebarTitle": "Preview schedule" + "sidebarTitle": "Get status page event detail" } } } }, - "/schedule/self": { - "post": { - "description": "Return on-call schedules where the current user is assigned.", - "operationId": "scheduleSelf", - "requestBody": { - "content": { - "application/json": { - "example": { - "end": 1712086400, - "start": 1712000000 - }, - "schema": { - "$ref": "#/components/schemas/ScheduleSelfRequest" - } + "/status-page/change/list": { + "get": { + "description": "List status page events for console management. Unlike the public display endpoints, the response includes hidden components.", + "operationId": "statusPageChangeList", + "parameters": [ + { + "description": "Status page ID.", + "in": "query", + "name": "page_id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" } }, - "required": true - }, + { + "description": "Lower bound of the event activity window: only events still open at, or closed at or after, this Unix timestamp (seconds) are returned.", + "in": "query", + "name": "start_at_seconds", + "required": false, + "schema": { + "format": "int64", + "type": "integer" + } + }, + { + "description": "Upper bound of the event activity window: only events started at or before this Unix timestamp (seconds) are returned.", + "in": "query", + "name": "end_at_seconds", + "required": false, + "schema": { + "format": "int64", + "type": "integer" + } + }, + { + "description": "Event type filter. Required.", + "in": "query", + "name": "type", + "required": true, + "schema": { + "enum": [ + "incident", + "maintenance" + ], + "type": "string" + } + }, + { + "description": "Event status filter. Required. Must be a status valid for the given `type` (`investigating`/`identified`/`monitoring`/`resolved` for `incident`; `scheduled`/`ongoing`/`completed` for `maintenance`).", + "in": "query", + "name": "status", + "required": true, + "schema": { + "enum": [ + "investigating", + "identified", + "monitoring", + "resolved", + "scheduled", + "ongoing", + "completed" + ], + "type": "string" + } + } + ], "responses": { "200": { "content": { @@ -56194,103 +57663,53 @@ "data": { "items": [ { - "account_id": 2451002751131, - "create_at": 1702623874, - "create_by": 2451002751131, - "cur_oncall": null, - "description": "", - "disabled": 0, - "final_schedule": { - "layer_name": "", - "mode": 0, - "name": "", - "schedules": null - }, - "group_id": 2477033058131, - "id": 2539108069860, - "layer_schedules": null, - "layers": [ + "affected_components": [ { - "account_id": 2451002751131, - "create_at": 1702623874, - "create_by": 2451002751131, - "day_mask": { - "repeat": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - "enable_time": 1702623874, - "expire_time": 0, - "fair_rotation": false, - "groups": [ - { - "end": 0, - "group_name": "A", - "members": [ - { - "person_ids": [ - 2476444212131 - ], - "role_id": 0 - } - ], - "name": "A", - "start": 0 - }, + "available_since_seconds": 1765349358, + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "name": "Web Console", + "order_id": 1, + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", + "status": "operational" + } + ], + "change_id": 5821693893131, + "close_at_seconds": 1775529742, + "description": "The issue has been resolved, and all services are operating normally.", + "notify_subscribers": true, + "page_id": 5750613685214, + "start_at_seconds": 1766736878, + "status": "resolved", + "title": "Web Console Degraded Performance", + "type": "incident", + "updates": [ + { + "at_seconds": 1766736876, + "component_changes": [ { - "end": 0, - "group_name": "B", - "members": [ - { - "person_ids": [ - 2469167612131 - ], - "role_id": 0 - } - ], - "name": "B", - "start": 0 + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "component_name": "Web Console", + "status": "degraded" } ], - "handoff_time": 0, - "hidden": 0, - "layer_end": null, - "layer_name": "Rule 1", - "layer_start": 1702623874, - "mask_continuous_enabled": false, - "mode": 0, - "name": "Rule 1", - "restrict_end": 0, - "restrict_mode": 0, - "restrict_periods": [], - "restrict_start": 0, - "rotation_duration": 86400, - "rotation_unit": "day", - "rotation_value": 1, - "schedule_id": 2539108069860, - "update_at": 1710468081, - "update_by": 2476444212131, - "weight": 0 + "description": "We are currently investigating an issue affecting some services.", + "status": "investigating", + "update_id": "01KDCVJQ88SZPHWPTDV2Z2AZW8" + }, + { + "at_seconds": 1775529742, + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "component_name": "Web Console", + "status": "operational" + } + ], + "description": "The issue has been resolved, and all services are operating normally.", + "status": "resolved", + "update_id": "01KNJX3KW873ZZSRZC14SGFYS3" } - ], - "name": "Open Source Q&A", - "next_oncall": null, - "notify": { - "by": null, - "fixed_time": null, - "webhooks": null - }, - "schedule_id": 2539108069860, - "schedule_layers": null, - "schedule_name": "Open Source Q&A", - "status": 0, - "team_id": 2477033058131, - "update_at": 1710468081, - "update_by": 2476444212131 + ] } ] }, @@ -56304,7 +57723,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ScheduleSelfResponse" + "$ref": "#/components/schemas/StatusPageChangeListResponse" } }, "type": "object" @@ -56328,34 +57747,41 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List my schedules", + "summary": "List status page events", "tags": [ - "On-call/Schedules" + "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Schedules Read** (`on-call`) or **Schedules Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/schedules/schedule-self", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-list", "metadata": { - "sidebarTitle": "List my schedules" + "sidebarTitle": "List status page events" } } } }, - "/schedule/update": { + "/status-page/change/timeline/create": { "post": { - "description": "Update an existing on-call schedule. Provide schedule_id to identify the schedule.", - "operationId": "scheduleUpdate", + "description": "Add a timeline update to a status page event.", + "operationId": "statusPageChangeTimelineCreate", "requestBody": { "content": { "application/json": { "example": { - "description": "Updated primary on-call rotation", - "schedule_id": 2001, - "schedule_name": "Production On-Call (Updated)", - "team_id": 4291079133131 + "at_seconds": 1712003600, + "change_id": 5821693893131, + "component_changes": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "status": "partial_outage" + } + ], + "description": "We have identified the root cause and are working on a fix.", + "page_id": 5750613685214, + "status": "identified" }, "schema": { - "$ref": "#/components/schemas/ScheduleUpsertRequest" + "$ref": "#/components/schemas/CreateStatusPageChangeTimelineRequest" } } }, @@ -56366,7 +57792,9 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "update_id": "01KP0311872NVYFRRQ82FWXAP4" + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -56377,7 +57805,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ScheduleEmptyObject" + "$ref": "#/components/schemas/StatusPageChangeTimelineCreateResponse" } }, "type": "object" @@ -56401,38 +57829,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update schedule", + "summary": "Create event timeline entry", "tags": [ - "On-call/Schedules" + "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Schedules Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/schedules/schedule-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-timeline-create", "metadata": { - "sidebarTitle": "Update schedule" + "sidebarTitle": "Create event timeline entry" } } } }, - "/sourcemap/list": { + "/status-page/change/timeline/delete": { "post": { - "description": "Return a paginated list of uploaded sourcemap files filtered by platform type, service, and version.", - "operationId": "sourcemap-read-list", + "description": "Delete a timeline entry from a status page event.", + "operationId": "statusPageChangeTimelineDelete", "requestBody": { "content": { "application/json": { "example": { - "end_time": 1712700000000, - "limit": 20, - "p": 1, - "services": [ - "my-web-app" - ], - "start_time": 1712000000000, - "type": "browser" + "change_id": 5821693893131, + "page_id": 5750613685214, + "update_id": "01KP0311872NVYFRRQ82FWXAP4" }, "schema": { - "$ref": "#/components/schemas/SourcemapListRequest" + "$ref": "#/components/schemas/DeleteStatusPageChangeTimelineRequest" } } }, @@ -56443,23 +57866,7 @@ "content": { "application/json": { "example": { - "data": { - "items": [ - { - "created_at": 1712700000, - "git_commit_sha": "abc1234def5678", - "git_repository_url": "https://github.com/example/my-web-app", - "key": "browser/my-web-app/1.0.0/main.js.map", - "metadata": {}, - "service": "my-web-app", - "size": 204800, - "type": "browser", - "updated_at": 1712700000, - "version": "1.0.0" - } - ], - "total": 3 - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -56470,7 +57877,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/SourcemapListResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -56494,35 +57901,35 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List sourcemaps", + "summary": "Delete event timeline entry", "tags": [ - "RUM/Sourcemaps" + "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `start_time` and `end_time` are required — both use Unix epoch **milliseconds**. Maximum window is 365 days.\n- The `type` field selects the platform: `browser` (JavaScript), `android`, or `ios`. Defaults to `browser` when omitted.\n- Default page size is 20; maximum is 100. Default sort is `created_at` descending.\n- For Android, `build_id` matches the Gradle plugin build identifier. For iOS, `uuid` matches the dSYM bundle UUID.", - "href": "/en/api-reference/rum/sourcemaps/sourcemap-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-timeline-delete", "metadata": { - "sidebarTitle": "List sourcemaps" + "sidebarTitle": "Delete event timeline entry" } } } }, - "/sourcemap/stack/enrich": { + "/status-page/change/timeline/update": { "post": { - "description": "Symbolicate or deobfuscate a browser, Android, iOS, Mini Program, or HarmonyOS stack trace.", - "operationId": "sourcemap-read-stack-enrich", + "description": "Update a timeline entry for a status page event.", + "operationId": "statusPageChangeTimelineUpdate", "requestBody": { "content": { "application/json": { "example": { - "near": 3, - "service": "my-web-app", - "stack": "TypeError: Cannot read properties of undefined\n at render (https://cdn.example.com/app.min.js:1:2345)", - "type": "browser", - "version": "1.0.0" + "at_seconds": 1712003600, + "change_id": 5821693893131, + "description": "Corrected description: root cause identified in database layer.", + "page_id": 5750613685214, + "update_id": "01KP0311872NVYFRRQ82FWXAP4" }, "schema": { - "$ref": "#/components/schemas/SourcemapStackEnrichRequest" + "$ref": "#/components/schemas/UpdateStatusPageChangeTimelineRequest" } } }, @@ -56533,33 +57940,7 @@ "content": { "application/json": { "example": { - "data": { - "frames": [ - { - "code_snippets": [ - { - "code": "const cart = props.cart;", - "line": 41 - }, - { - "code": "return cart.items.map(renderItem);", - "line": 42 - } - ], - "column": 17, - "converted": true, - "file": "src/pages/checkout.tsx", - "function": "renderCheckout", - "line": 42, - "original_frame": { - "column": 2345, - "file": "https://cdn.example.com/app.min.js", - "function": "render", - "line": 1 - } - } - ] - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -56570,7 +57951,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/SourcemapStackEnrichResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -56594,92 +57975,117 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Enrich a stack trace", + "summary": "Update event timeline entry", "tags": [ - "RUM/Sourcemaps" + "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `type` defaults to `browser` when omitted for backward compatibility.\n- Set `near` from 1 to 20 to include source-code snippets around converted frames.\n- For Android NDK native crashes, provide `arch` and `source_type: ndk` so the backend routes to native symbolication.\n- For iOS crash stacks, pass `binary_images` so addresses can be relocated against the uploaded dSYM files.\n- `no_cache` is intended for debugging and bypasses cached enrich results.", - "href": "/en/api-reference/rum/sourcemaps/sourcemap-read-stack-enrich", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-timeline-update", "metadata": { - "sidebarTitle": "Enrich a stack trace" + "sidebarTitle": "Update event timeline entry" } } } }, - "/status-page/change/active/list": { - "get": { - "description": "List in-progress (non-terminal) events of a given type for a status page.", - "operationId": "statusPageChangeActiveList", - "parameters": [ - { - "description": "Status page ID.", - "in": "query", - "name": "page_id", - "required": true, - "schema": { - "format": "int64", - "type": "integer" + "/status-page/change/update": { + "post": { + "description": "Update an existing status page event.", + "operationId": "statusPageChangeUpdate", + "requestBody": { + "content": { + "application/json": { + "example": { + "change_id": 5821693893131, + "page_id": 5750613685214, + "title": "Web Console Degraded Performance (Updated)" + }, + "schema": { + "$ref": "#/components/schemas/UpdateStatusPageChangeRequest" + } } }, - { - "description": "Event type filter. Required. Returns only in-progress (non-terminal) events — `investigating`/`identified`/`monitoring` for `incident`, `scheduled`/`ongoing` for `maintenance`.", - "in": "query", - "name": "type", - "required": true, - "schema": { - "enum": [ - "incident", - "maintenance" - ], - "type": "string" - } + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": {}, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/EmptyResponse" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Success" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" } + }, + "summary": "Update status page event", + "tags": [ + "On-call/Status pages" ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-change-update", + "metadata": { + "sidebarTitle": "Update status page event" + } + } + } + }, + "/status-page/component/delete": { + "post": { + "description": "Delete a service component from a status page.", + "operationId": "statusPageComponentDelete", + "requestBody": { + "content": { + "application/json": { + "example": { + "component_ids": [ + "01KP032KMN9YFBMPWANJMFZFG1" + ], + "page_id": 5750613685214 + }, + "schema": { + "$ref": "#/components/schemas/DeleteStatusPageComponentRequest" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "example": { - "data": { - "items": [ - { - "affected_components": [ - { - "available_since_seconds": 1765349358, - "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", - "name": "Web Console", - "order_id": 1, - "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", - "status": "degraded" - } - ], - "change_id": 5821693893131, - "description": "We are currently investigating an issue affecting some services.", - "notify_subscribers": true, - "page_id": 5750613685214, - "start_at_seconds": 1766736878, - "status": "investigating", - "title": "Web Console Degraded Performance", - "type": "incident", - "updates": [ - { - "at_seconds": 1766736876, - "component_changes": [ - { - "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", - "component_name": "Web Console", - "status": "degraded" - } - ], - "description": "We are currently investigating an issue affecting some services.", - "status": "investigating", - "update_id": "01KDCVJQ88SZPHWPTDV2Z2AZW8" - } - ] - } - ] - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -56690,7 +58096,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/StatusPageChangeListResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -56714,49 +58120,39 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List active status page events", + "summary": "Delete status page component", "tags": [ "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/status-pages/status-page-change-active-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-component-delete", "metadata": { - "sidebarTitle": "List active status page events" + "sidebarTitle": "Delete status page component" } } } }, - "/status-page/change/create": { + "/status-page/component/upsert": { "post": { - "description": "Create a new incident or maintenance event on a status page.", - "operationId": "statusPageChangeCreate", + "description": "Create or update a service component on a status page.", + "operationId": "statusPageComponentUpsert", "requestBody": { "content": { "application/json": { "example": { - "description": "We are investigating degraded performance affecting the web console.", - "notify_subscribers": true, - "page_id": 5750613685214, - "start_at_seconds": 1712000000, - "status": "investigating", - "title": "Web Console Degraded Performance", - "type": "incident", - "updates": [ + "components": [ { - "component_changes": [ - { - "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", - "status": "degraded" - } - ], - "description": "We are currently investigating an issue affecting some users.", - "status": "investigating" + "description": "Main web interface", + "name": "Web Console", + "order_id": 1, + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2" } - ] + ], + "page_id": 5750613685214 }, "schema": { - "$ref": "#/components/schemas/CreateStatusPageChangeRequest" + "$ref": "#/components/schemas/UpsertStatusPageComponentRequest" } } }, @@ -56768,8 +58164,9 @@ "application/json": { "example": { "data": { - "change_id": 6294539747131, - "change_name": "API Test Incident" + "component_ids": [ + "01KP032KMN9YFBMPWANJMFZFG1" + ] }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -56781,7 +58178,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/StatusPageChangeCreateResponse" + "$ref": "#/components/schemas/UpsertStatusPageComponentResponse" } }, "type": "object" @@ -56805,32 +58202,35 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create status page event", + "summary": "Upsert status page component", "tags": [ "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-change-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-component-upsert", "metadata": { - "sidebarTitle": "Create status page event" + "sidebarTitle": "Upsert status page component" } } } }, - "/status-page/change/delete": { + "/status-page/create": { "post": { - "description": "Delete a status page event.", - "operationId": "statusPageChangeDelete", + "description": "Create a new status page.", + "operationId": "statusPageCreate", "requestBody": { "content": { "application/json": { "example": { - "change_id": 5821693893131, - "page_id": 5750613685214 + "contact_info": "mailto:support@example.com", + "name": "My Status Page", + "page_header": "Welcome to our status page", + "type": "public", + "url_name": "my-status-page" }, "schema": { - "$ref": "#/components/schemas/DeleteStatusPageChangeRequest" + "$ref": "#/components/schemas/CreateStatusPageRequest" } } }, @@ -56841,7 +58241,11 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "page_id": 6294565612043, + "page_name": "My Status Page", + "page_url_name": "my-status-page" + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -56852,7 +58256,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/CreateStatusPageResponse" } }, "type": "object" @@ -56876,99 +58280,42 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete status page event", + "summary": "Create status page", "tags": [ "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-change-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-create", "metadata": { - "sidebarTitle": "Delete status page event" + "sidebarTitle": "Create status page" } } } }, - "/status-page/change/info": { - "get": { - "description": "Retrieve details of a specific status page event (incident or maintenance).", - "operationId": "statusPageChangeInfo", - "parameters": [ - { - "description": "Status page ID.", - "in": "query", - "name": "page_id", - "required": true, - "schema": { - "format": "int64", - "type": "integer" + "/status-page/delete": { + "post": { + "description": "Delete a status page.", + "operationId": "statusPageDelete", + "requestBody": { + "content": { + "application/json": { + "example": { + "page_id": 5750613685214 + }, + "schema": { + "$ref": "#/components/schemas/DeleteStatusPageRequest" + } } }, - { - "description": "Event (change) ID.", - "in": "query", - "name": "change_id", - "required": true, - "schema": { - "format": "int64", - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "data": { - "affected_components": [ - { - "available_since_seconds": 1765349358, - "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", - "name": "Web Console", - "order_id": 1, - "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", - "status": "operational" - } - ], - "change_id": 5821693893131, - "close_at_seconds": 1775529742, - "description": "The issue has been resolved, and all services are operating normally.\n\nThank you for your patience.", - "notify_subscribers": true, - "page_id": 5750613685214, - "start_at_seconds": 1766736878, - "status": "resolved", - "title": "Web Console Degraded Performance", - "type": "incident", - "updates": [ - { - "at_seconds": 1766736876, - "component_changes": [ - { - "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", - "component_name": "Web Console", - "status": "degraded" - } - ], - "description": "We are currently investigating an issue affecting some services.", - "status": "investigating", - "update_id": "01KDCVJQ88SZPHWPTDV2Z2AZW8" - }, - { - "at_seconds": 1775529742, - "component_changes": [ - { - "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", - "component_name": "Web Console", - "status": "operational" - } - ], - "description": "The issue has been resolved, and all services are operating normally.", - "status": "resolved", - "update_id": "01KNJX3KW873ZZSRZC14SGFYS3" - } - ] - }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -56979,7 +58326,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/StatusPageChangeItem" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -57003,143 +58350,57 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get status page event detail", + "summary": "Delete status page", "tags": [ "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/status-pages/status-page-change-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-delete", "metadata": { - "sidebarTitle": "Get status page event detail" + "sidebarTitle": "Delete status page" } } } }, - "/status-page/change/list": { - "get": { - "description": "List status page events for console management. Unlike the public display endpoints, the response includes hidden components.", - "operationId": "statusPageChangeList", - "parameters": [ - { - "description": "Status page ID.", - "in": "query", - "name": "page_id", - "required": true, - "schema": { - "format": "int64", - "type": "integer" - } - }, - { - "description": "Lower bound of the event activity window: only events still open at, or closed at or after, this Unix timestamp (seconds) are returned.", - "in": "query", - "name": "start_at_seconds", - "required": false, - "schema": { - "format": "int64", - "type": "integer" - } - }, - { - "description": "Upper bound of the event activity window: only events started at or before this Unix timestamp (seconds) are returned.", - "in": "query", - "name": "end_at_seconds", - "required": false, - "schema": { - "format": "int64", - "type": "integer" - } - }, - { - "description": "Event type filter. Required.", - "in": "query", - "name": "type", - "required": true, - "schema": { - "enum": [ - "incident", - "maintenance" - ], - "type": "string" + "/status-page/draft/create": { + "post": { + "description": "Store a status page event draft so a human can review and publish it from the console.", + "operationId": "statusPageDraftCreate", + "requestBody": { + "content": { + "application/json": { + "example": { + "draft": { + "affected_components": [ + { + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "status": "degraded" + } + ], + "message": "We are investigating degraded performance affecting the web console.", + "name": "Web Console Degraded Performance", + "page_id": 5750613685214, + "type": "incident", + "v": 1 + }, + "source": "ai_sre:sess_01KC3H2A9ZQ8W7E6R5T4Y3U2I1" + }, + "schema": { + "$ref": "#/components/schemas/CreateStatusPageDraftRequest" + } } }, - { - "description": "Event status filter. Required. Must be a status valid for the given `type` (`investigating`/`identified`/`monitoring`/`resolved` for `incident`; `scheduled`/`ongoing`/`completed` for `maintenance`).", - "in": "query", - "name": "status", - "required": true, - "schema": { - "enum": [ - "investigating", - "identified", - "monitoring", - "resolved", - "scheduled", - "ongoing", - "completed" - ], - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "content": { "application/json": { "example": { "data": { - "items": [ - { - "affected_components": [ - { - "available_since_seconds": 1765349358, - "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", - "name": "Web Console", - "order_id": 1, - "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2", - "status": "operational" - } - ], - "change_id": 5821693893131, - "close_at_seconds": 1775529742, - "description": "The issue has been resolved, and all services are operating normally.", - "notify_subscribers": true, - "page_id": 5750613685214, - "start_at_seconds": 1766736878, - "status": "resolved", - "title": "Web Console Degraded Performance", - "type": "incident", - "updates": [ - { - "at_seconds": 1766736876, - "component_changes": [ - { - "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", - "component_name": "Web Console", - "status": "degraded" - } - ], - "description": "We are currently investigating an issue affecting some services.", - "status": "investigating", - "update_id": "01KDCVJQ88SZPHWPTDV2Z2AZW8" - }, - { - "at_seconds": 1775529742, - "component_changes": [ - { - "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", - "component_name": "Web Console", - "status": "operational" - } - ], - "description": "The issue has been resolved, and all services are operating normally.", - "status": "resolved", - "update_id": "01KNJX3KW873ZZSRZC14SGFYS3" - } - ] - } - ] + "created_at": 1788000000, + "draft_id": "draft_3xK9mQ2vN7pR4wT8yH1sJ5" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -57151,7 +58412,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/StatusPageChangeListResponse" + "$ref": "#/components/schemas/StatusPageDraftCreateResponse" } }, "type": "object" @@ -57175,53 +58436,84 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List status page events", + "summary": "Create status page draft", "tags": [ "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/status-pages/status-page-change-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The `draft` payload is stored verbatim (up to 64 KB); the console publish form reads it back to prefill the event.\n- A draft lives for 30 days and is consumed exactly once when the event is published.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/status-pages/status-page-draft-create", "metadata": { - "sidebarTitle": "List status page events" + "sidebarTitle": "Create status page draft" } } } }, - "/status-page/change/timeline/create": { - "post": { - "description": "Add a timeline update to a status page event.", - "operationId": "statusPageChangeTimelineCreate", - "requestBody": { - "content": { - "application/json": { - "example": { - "at_seconds": 1712003600, - "change_id": 5821693893131, - "component_changes": [ - { - "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", - "status": "partial_outage" - } - ], - "description": "We have identified the root cause and are working on a fix.", - "page_id": 5750613685214, - "status": "identified" - }, - "schema": { - "$ref": "#/components/schemas/CreateStatusPageChangeTimelineRequest" - } + "/status-page/info": { + "get": { + "description": "Retrieve detailed configuration for a specific status page.", + "operationId": "statusPageInfo", + "parameters": [ + { + "description": "Status page ID.", + "in": "query", + "name": "page_id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" } - }, - "required": true - }, + } + ], "responses": { "200": { "content": { "application/json": { "example": { "data": { - "update_id": "01KP0311872NVYFRRQ82FWXAP4" + "components": [ + { + "available_since_seconds": 1765349358, + "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", + "name": "Web Console", + "order_id": 1, + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2" + } + ], + "contact_info": "mailto:support@example.com", + "custom_domain": "status.example.com", + "custom_links": [ + { + "key": "Documentation", + "value": "https://docs.example.com" + } + ], + "date_view": "list", + "display_uptime_mode": "chart_and_percentage", + "favicon": "https://cdn.example.com/favicon.png", + "logo": "https://cdn.example.com/logo.png", + "managed_domain_feature_enabled": true, + "name": "Flashduty Status Page", + "page_footer": "2025 Example Corp", + "page_header": "Welcome to our status page", + "page_id": 5750613685214, + "sections": [ + { + "description": "Our core services", + "hide_all": false, + "hide_uptime": false, + "name": "Core Services", + "order_id": 1, + "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2" + } + ], + "subscription": { + "email": true, + "im": false + }, + "template_preference": "message", + "type": "public", + "url_name": "flashduty-statuspage" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -57233,7 +58525,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/StatusPageChangeTimelineCreateResponse" + "$ref": "#/components/schemas/StatusPageInfoResponse" } }, "type": "object" @@ -57257,44 +58549,75 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create event timeline entry", + "summary": "Get status page detail", "tags": [ "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-change-timeline-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/status-pages/status-page-info", "metadata": { - "sidebarTitle": "Create event timeline entry" + "sidebarTitle": "Get status page detail" } } } }, - "/status-page/change/timeline/delete": { - "post": { - "description": "Delete a timeline entry from a status page event.", - "operationId": "statusPageChangeTimelineDelete", - "requestBody": { - "content": { - "application/json": { - "example": { - "change_id": 5821693893131, - "page_id": 5750613685214, - "update_id": "01KP0311872NVYFRRQ82FWXAP4" - }, - "schema": { - "$ref": "#/components/schemas/DeleteStatusPageChangeTimelineRequest" - } - } - }, - "required": true - }, + "/status-page/list": { + "get": { + "description": "List all status pages owned by the account, including their components and sections.", + "operationId": "status-page-read-page-list", "responses": { "200": { "content": { "application/json": { "example": { - "data": {}, + "data": { + "items": [ + { + "components": [ + { + "available_since_seconds": 1716962400, + "component_id": "cmp_001", + "description": "Core API service", + "hide_all": false, + "hide_uptime": false, + "name": "API", + "order_id": 1, + "section_id": "sec_001" + } + ], + "contact_info": "mailto:support@acme.com", + "custom_domain": "status.acme.com", + "custom_links": [ + { + "name": "Home", + "url": "https://acme.com" + } + ], + "date_view": "calendar", + "display_uptime_mode": "chart_and_percentage", + "logo_url": "https://acme.com", + "name": "Acme Status", + "page_header": "Acme System Status", + "page_id": 7001, + "sections": [ + { + "hide_all": false, + "hide_uptime": false, + "name": "Core Services", + "order_id": 1, + "section_id": "sec_001" + } + ], + "subscription": { + "email": true, + "im": false + }, + "type": "public", + "url_name": "acme" + } + ] + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -57305,7 +58628,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/ListStatusPageResponse" } }, "type": "object" @@ -57329,35 +58652,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete event timeline entry", + "summary": "List status pages", "tags": [ "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-change-timeline-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n", + "href": "/en/api-reference/on-call/status-pages/status-page-read-page-list", "metadata": { - "sidebarTitle": "Delete event timeline entry" + "sidebarTitle": "List status pages" } } } }, - "/status-page/change/timeline/update": { + "/status-page/migrate-email-subscribers": { "post": { - "description": "Update a timeline entry for a status page event.", - "operationId": "statusPageChangeTimelineUpdate", + "description": "Start a migration job that imports email subscribers from an Atlassian Statuspage into an existing Flashduty status page.", + "operationId": "statusPageMigrateEmailSubscribers", "requestBody": { "content": { "application/json": { "example": { - "at_seconds": 1712003600, - "change_id": 5821693893131, - "description": "Corrected description: root cause identified in database layer.", - "page_id": 5750613685214, - "update_id": "01KP0311872NVYFRRQ82FWXAP4" + "api_key": "sk-stsp-xxxxxxxxxxxxxxxxxxxx", + "source_page_id": "abcdefghij", + "target_page_id": 5750613685214 }, "schema": { - "$ref": "#/components/schemas/UpdateStatusPageChangeTimelineRequest" + "$ref": "#/components/schemas/MigrateStatusPageEmailSubscribersRequest" } } }, @@ -57368,7 +58689,9 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "job_id": "01KP0311872NVYFRRQ82FW0002" + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -57379,7 +58702,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/StatusPageMigrationStartResponse" } }, "type": "object" @@ -57403,33 +58726,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update event timeline entry", + "summary": "Migrate email subscribers", "tags": [ "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-change-timeline-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-migrate-email-subscribers", "metadata": { - "sidebarTitle": "Update event timeline entry" + "sidebarTitle": "Migrate email subscribers" } } } }, - "/status-page/change/update": { + "/status-page/migrate-structure": { "post": { - "description": "Update an existing status page event.", - "operationId": "statusPageChangeUpdate", + "description": "Start a migration job that imports the structure and historical events of an Atlassian Statuspage into a new Flashduty status page.", + "operationId": "statusPageMigrateStructure", "requestBody": { "content": { "application/json": { "example": { - "change_id": 5821693893131, - "page_id": 5750613685214, - "title": "Web Console Degraded Performance (Updated)" + "api_key": "sk-stsp-xxxxxxxxxxxxxxxxxxxx", + "source_page_id": "abcdefghij" }, "schema": { - "$ref": "#/components/schemas/UpdateStatusPageChangeRequest" + "$ref": "#/components/schemas/MigrateStatusPageStructureRequest" } } }, @@ -57440,7 +58762,9 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "job_id": "01KP0311872NVYFRRQ82FW0001" + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -57451,7 +58775,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/StatusPageMigrationStartResponse" } }, "type": "object" @@ -57475,34 +58799,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update status page event", + "summary": "Migrate status page structure", "tags": [ "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-change-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-migrate-structure", "metadata": { - "sidebarTitle": "Update status page event" + "sidebarTitle": "Migrate status page structure" } } } }, - "/status-page/component/delete": { + "/status-page/migration/cancel": { "post": { - "description": "Delete a service component from a status page.", - "operationId": "statusPageComponentDelete", + "description": "Cancel an in-progress status page migration job. Only jobs currently in the `running` state can be cancelled.", + "operationId": "statusPageMigrationCancel", "requestBody": { "content": { "application/json": { "example": { - "component_ids": [ - "01KP032KMN9YFBMPWANJMFZFG1" - ], - "page_id": 5750613685214 + "job_id": "01KP0311872NVYFRRQ82FW0001" }, "schema": { - "$ref": "#/components/schemas/DeleteStatusPageComponentRequest" + "$ref": "#/components/schemas/CancelStatusPageMigrationRequest" } } }, @@ -57548,53 +58869,59 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete status page component", + "summary": "Cancel status page migration", "tags": [ "On-call/Status pages" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-component-delete", + "href": "/en/api-reference/on-call/status-pages/status-page-migration-cancel", "metadata": { - "sidebarTitle": "Delete status page component" + "sidebarTitle": "Cancel status page migration" } } } }, - "/status-page/component/upsert": { - "post": { - "description": "Create or update a service component on a status page.", - "operationId": "statusPageComponentUpsert", - "requestBody": { - "content": { - "application/json": { - "example": { - "components": [ - { - "description": "Main web interface", - "name": "Web Console", - "order_id": 1, - "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2" - } - ], - "page_id": 5750613685214 - }, - "schema": { - "$ref": "#/components/schemas/UpsertStatusPageComponentRequest" - } + "/status-page/migration/status": { + "get": { + "description": "Get the current status and progress of a status page migration job.", + "operationId": "statusPageMigrationStatus", + "parameters": [ + { + "description": "Migration job ID returned by `migrate-structure` or `migrate-email-subscribers`.", + "in": "query", + "name": "job_id", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "content": { "application/json": { "example": { "data": { - "component_ids": [ - "01KP032KMN9YFBMPWANJMFZFG1" - ] + "account_id": 2451002751131, + "created_at": 1766736878, + "job_id": "01KP0311872NVYFRRQ82FW0001", + "phase": "history", + "progress": { + "completed_steps": 5, + "components_imported": 8, + "incidents_imported": 12, + "maintenances_imported": 2, + "sections_imported": 3, + "subscribers_imported": 0, + "subscribers_skipped": 0, + "templates_imported": 0, + "total_steps": 5 + }, + "source_page_id": "abcdefghij", + "status": "completed", + "target_page_id": 5750613685214, + "updated_at": 1766740000 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -57606,7 +58933,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UpsertStatusPageComponentResponse" + "$ref": "#/components/schemas/StatusPageMigrationJob" } }, "type": "object" @@ -57630,35 +58957,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Upsert status page component", + "summary": "Get migration status", "tags": [ "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-component-upsert", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/status-pages/status-page-migration-status", "metadata": { - "sidebarTitle": "Upsert status page component" + "sidebarTitle": "Get migration status" } } } }, - "/status-page/create": { + "/status-page/section/delete": { "post": { - "description": "Create a new status page.", - "operationId": "statusPageCreate", + "description": "Delete a section from a status page.", + "operationId": "statusPageSectionDelete", "requestBody": { "content": { "application/json": { "example": { - "contact_info": "mailto:support@example.com", - "name": "My Status Page", - "page_header": "Welcome to our status page", - "type": "public", - "url_name": "my-status-page" + "page_id": 5750613685214, + "section_ids": [ + "01KP032J1FV2H8DDGN0QSJ1CAR" + ] }, "schema": { - "$ref": "#/components/schemas/CreateStatusPageRequest" + "$ref": "#/components/schemas/DeleteStatusPageSectionRequest" } } }, @@ -57669,11 +58995,7 @@ "content": { "application/json": { "example": { - "data": { - "page_id": 6294565612043, - "page_name": "My Status Page", - "page_url_name": "my-status-page" - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -57684,7 +59006,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/CreateStatusPageResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -57708,31 +59030,38 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create status page", + "summary": "Delete status page section", "tags": [ "On-call/Status pages" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-create", + "href": "/en/api-reference/on-call/status-pages/status-page-section-delete", "metadata": { - "sidebarTitle": "Create status page" + "sidebarTitle": "Delete status page section" } } } }, - "/status-page/delete": { + "/status-page/section/upsert": { "post": { - "description": "Delete a status page.", - "operationId": "statusPageDelete", + "description": "Create or update a section on a status page.", + "operationId": "statusPageSectionUpsert", "requestBody": { "content": { "application/json": { "example": { - "page_id": 5750613685214 + "page_id": 5750613685214, + "sections": [ + { + "description": "Our core services", + "name": "Core Services", + "order_id": 1 + } + ] }, "schema": { - "$ref": "#/components/schemas/DeleteStatusPageRequest" + "$ref": "#/components/schemas/UpsertStatusPageSectionRequest" } } }, @@ -57743,7 +59072,11 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "section_ids": [ + "01KP032J1FV2H8DDGN0QSJ1CAR" + ] + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -57754,7 +59087,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/UpsertStatusPageSectionResponse" } }, "type": "object" @@ -57778,44 +59111,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete status page", + "summary": "Upsert status page section", "tags": [ "On-call/Status pages" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-delete", + "href": "/en/api-reference/on-call/status-pages/status-page-section-upsert", "metadata": { - "sidebarTitle": "Delete status page" + "sidebarTitle": "Upsert status page section" } } } }, - "/status-page/draft/create": { + "/status-page/subscriber/export": { "post": { - "description": "Store a status page event draft so a human can review and publish it from the console.", - "operationId": "statusPageDraftCreate", + "description": "Export subscribers list for a status page as a CSV attachment. The response is a `text/csv` file with columns: Method, Recipient, Components, Subscribe All, Locale.", + "operationId": "statusPageSubscriberExport", "requestBody": { "content": { "application/json": { "example": { - "draft": { - "affected_components": [ - { - "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", - "status": "degraded" - } - ], - "message": "We are investigating degraded performance affecting the web console.", - "name": "Web Console Degraded Performance", - "page_id": 5750613685214, - "type": "incident", - "v": 1 - }, - "source": "ai_sre:sess_01KC3H2A9ZQ8W7E6R5T4Y3U2I1" + "page_id": 5750613685214 }, "schema": { - "$ref": "#/components/schemas/CreateStatusPageDraftRequest" + "$ref": "#/components/schemas/ExportStatusPageSubscribersRequest" } } }, @@ -57824,32 +59144,14 @@ "responses": { "200": { "content": { - "application/json": { - "example": { - "data": { - "created_at": 1788000000, - "draft_id": "draft_3xK9mQ2vN7pR4wT8yH1sJ5" - }, - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, + "text/csv": { + "example": "Method,Recipient,Components,Subscribe All,Locale\nemail,alice@example.com,,Yes,zh-CN\nemail,bob@example.com,\"Core Services › API\",No,en-US", "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/StatusPageDraftCreateResponse" - } - }, - "type": "object" - } - ] + "$ref": "#/components/schemas/StatusPageSubscriberExportResponse" } } }, - "description": "Success" + "description": "Success. CSV attachment, not a JSON envelope." }, "400": { "$ref": "#/components/responses/BadRequest" @@ -57864,85 +59166,58 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Create status page draft", + "summary": "Export subscribers", "tags": [ "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The `draft` payload is stored verbatim (up to 64 KB); the console publish form reads it back to prefill the event.\n- A draft lives for 30 days and is consumed exactly once when the event is published.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/on-call/status-pages/status-page-draft-create", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/day**; **20 requests/minute**; **10 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-subscriber-export", "metadata": { - "sidebarTitle": "Create status page draft" + "sidebarTitle": "Export subscribers" } } } }, - "/status-page/info": { - "get": { - "description": "Retrieve detailed configuration for a specific status page.", - "operationId": "statusPageInfo", - "parameters": [ - { - "description": "Status page ID.", - "in": "query", - "name": "page_id", - "required": true, - "schema": { - "format": "int64", - "type": "integer" + "/status-page/subscriber/import": { + "post": { + "description": "Bulk import subscribers for a status page. The account must be allowlisted for subscriber import; otherwise the call is rejected with an access-denied error.", + "operationId": "statusPageSubscriberImport", + "requestBody": { + "content": { + "application/json": { + "example": { + "method": "email", + "page_id": 5750613685214, + "subscribers": [ + { + "all": true, + "locale": "en-US", + "recipient": "alice@example.com" + }, + { + "all": false, + "component_ids": [ + "01KC3GAZ6ZJE40H55GM31RPWZE" + ], + "locale": "zh-CN", + "recipient": "bob@example.com" + } + ] + }, + "schema": { + "$ref": "#/components/schemas/ImportStatusPageSubscribersRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "example": { - "data": { - "components": [ - { - "available_since_seconds": 1765349358, - "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE", - "name": "Web Console", - "order_id": 1, - "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2" - } - ], - "contact_info": "mailto:support@example.com", - "custom_domain": "status.example.com", - "custom_links": [ - { - "key": "Documentation", - "value": "https://docs.example.com" - } - ], - "date_view": "list", - "display_uptime_mode": "chart_and_percentage", - "favicon": "https://cdn.example.com/favicon.png", - "logo": "https://cdn.example.com/logo.png", - "managed_domain_feature_enabled": true, - "name": "Flashduty Status Page", - "page_footer": "2025 Example Corp", - "page_header": "Welcome to our status page", - "page_id": 5750613685214, - "sections": [ - { - "description": "Our core services", - "hide_all": false, - "hide_uptime": false, - "name": "Core Services", - "order_id": 1, - "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2" - } - ], - "subscription": { - "email": true, - "im": false - }, - "template_preference": "message", - "type": "public", - "url_name": "flashduty-statuspage" - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -57953,7 +59228,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/StatusPageInfoResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -57977,74 +59252,93 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get status page detail", + "summary": "Import subscribers", "tags": [ "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/status-pages/status-page-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **20 requests/minute**; **2 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-subscriber-import", "metadata": { - "sidebarTitle": "Get status page detail" + "sidebarTitle": "Import subscribers" } } } }, - "/status-page/list": { + "/status-page/subscriber/list": { "get": { - "description": "List all status pages owned by the account, including their components and sections.", - "operationId": "status-page-read-page-list", + "description": "List subscribers who have signed up for status page notifications.", + "operationId": "statusPageSubscriberList", + "parameters": [ + { + "description": "Status page ID.", + "in": "query", + "name": "page_id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + }, + { + "description": "Comma-separated component IDs to filter subscribers by.", + "in": "query", + "name": "component_ids", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Page number (1-based).", + "in": "query", + "name": "p", + "required": false, + "schema": { + "default": 1, + "format": "int64", + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Page size (1-100).", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "default": 10, + "format": "int64", + "maximum": 100, + "minimum": 1, + "type": "integer" + } + } + ], "responses": { "200": { "content": { "application/json": { "example": { "data": { + "has_next_page": false, "items": [ { - "components": [ - { - "available_since_seconds": 1716962400, - "component_id": "cmp_001", - "description": "Core API service", - "hide_all": false, - "hide_uptime": false, - "name": "API", - "order_id": 1, - "section_id": "sec_001" - } - ], - "contact_info": "mailto:support@acme.com", - "custom_domain": "status.acme.com", - "custom_links": [ - { - "name": "Home", - "url": "https://acme.com" - } - ], - "date_view": "calendar", - "display_uptime_mode": "chart_and_percentage", - "logo_url": "https://acme.com", - "name": "Acme Status", - "page_header": "Acme System Status", - "page_id": 7001, - "sections": [ - { - "hide_all": false, - "hide_uptime": false, - "name": "Core Services", - "order_id": 1, - "section_id": "sec_001" - } - ], - "subscription": { - "email": true, - "im": false - }, - "type": "public", - "url_name": "acme" + "all": true, + "components": [], + "locale": "zh-CN", + "method": "email", + "recipient": "alice@example.com" + }, + { + "all": true, + "components": [], + "locale": "en-US", + "method": "email", + "recipient": "bob@example.com" } - ] + ], + "total": 2 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -58056,7 +59350,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ListStatusPageResponse" + "$ref": "#/components/schemas/StatusPageSubscriberListResponse" } }, "type": "object" @@ -58080,33 +59374,33 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List status pages", + "summary": "List status page subscribers", "tags": [ "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n", - "href": "/en/api-reference/on-call/status-pages/status-page-read-page-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/status-pages/status-page-subscriber-list", "metadata": { - "sidebarTitle": "List status pages" + "sidebarTitle": "List status page subscribers" } } } }, - "/status-page/migrate-email-subscribers": { + "/status-page/template/delete": { "post": { - "description": "Start a migration job that imports email subscribers from an Atlassian Statuspage into an existing Flashduty status page.", - "operationId": "statusPageMigrateEmailSubscribers", + "description": "Delete an event template from a status page.", + "operationId": "statusPageTemplateDelete", "requestBody": { "content": { "application/json": { "example": { - "api_key": "sk-stsp-xxxxxxxxxxxxxxxxxxxx", - "source_page_id": "abcdefghij", - "target_page_id": 5750613685214 + "page_id": 5720156736380, + "template_id": "01KP0339G5XDEPM4R86T2B23EP", + "type": "pre_defined" }, "schema": { - "$ref": "#/components/schemas/MigrateStatusPageEmailSubscribersRequest" + "$ref": "#/components/schemas/DeleteStatusPageTemplateRequest" } } }, @@ -58117,9 +59411,7 @@ "content": { "application/json": { "example": { - "data": { - "job_id": "01KP0311872NVYFRRQ82FW0002" - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -58130,7 +59422,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/StatusPageMigrationStartResponse" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -58154,44 +59446,63 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Migrate email subscribers", + "summary": "Delete status page template", "tags": [ "On-call/Status pages" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-migrate-email-subscribers", + "href": "/en/api-reference/on-call/status-pages/status-page-template-delete", "metadata": { - "sidebarTitle": "Migrate email subscribers" + "sidebarTitle": "Delete status page template" } } } }, - "/status-page/migrate-structure": { - "post": { - "description": "Start a migration job that imports the structure and historical events of an Atlassian Statuspage into a new Flashduty status page.", - "operationId": "statusPageMigrateStructure", - "requestBody": { - "content": { - "application/json": { - "example": { - "api_key": "sk-stsp-xxxxxxxxxxxxxxxxxxxx", - "source_page_id": "abcdefghij" - }, - "schema": { - "$ref": "#/components/schemas/MigrateStatusPageStructureRequest" - } + "/status-page/template/list": { + "get": { + "description": "List all event templates for a status page.", + "operationId": "statusPageTemplateList", + "parameters": [ + { + "description": "Status page ID.", + "in": "query", + "name": "page_id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" } }, - "required": true - }, + { + "description": "Template category. `pre_defined` returns predefined event templates; `message` returns message notification templates.", + "in": "query", + "name": "type", + "required": true, + "schema": { + "enum": [ + "pre_defined", + "message" + ], + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "example": { "data": { - "job_id": "01KP0311872NVYFRRQ82FW0001" + "items": [ + { + "description": "We have identified the root cause.", + "status": "identified", + "template_id": "01KC8KP6PHVPSCAB0BTKZBN2HR", + "title": "Service Disruption", + "type": "incident" + } + ] }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -58203,7 +59514,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/StatusPageMigrationStartResponse" + "$ref": "#/components/schemas/ListStatusPageTemplatesResponse" } }, "type": "object" @@ -58227,31 +59538,38 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Migrate status page structure", + "summary": "List status page templates", "tags": [ "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-migrate-structure", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", + "href": "/en/api-reference/on-call/status-pages/status-page-template-list", "metadata": { - "sidebarTitle": "Migrate status page structure" + "sidebarTitle": "List status page templates" } } } }, - "/status-page/migration/cancel": { + "/status-page/template/upsert": { "post": { - "description": "Cancel an in-progress status page migration job. Only jobs currently in the `running` state can be cancelled.", - "operationId": "statusPageMigrationCancel", + "description": "Create or update an event template for a status page.", + "operationId": "statusPageTemplateUpsert", "requestBody": { "content": { "application/json": { "example": { - "job_id": "01KP0311872NVYFRRQ82FW0001" + "page_id": 5720156736380, + "template": { + "description": "We are investigating a service disruption affecting some users.", + "status": "investigating", + "title": "Service Disruption", + "type": "incident" + }, + "type": "pre_defined" }, "schema": { - "$ref": "#/components/schemas/CancelStatusPageMigrationRequest" + "$ref": "#/components/schemas/UpsertStatusPageTemplateRequest" } } }, @@ -58262,7 +59580,9 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "template_id": "01KP0339G5XDEPM4R86T2B23EP" + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -58273,7 +59593,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/UpsertStatusPageTemplateResponse" } }, "type": "object" @@ -58297,60 +59617,45 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Cancel status page migration", + "summary": "Upsert status page template", "tags": [ "On-call/Status pages" ], "x-mint": { "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-migration-cancel", + "href": "/en/api-reference/on-call/status-pages/status-page-template-upsert", "metadata": { - "sidebarTitle": "Cancel status page migration" + "sidebarTitle": "Upsert status page template" } } } }, - "/status-page/migration/status": { - "get": { - "description": "Get the current status and progress of a status page migration job.", - "operationId": "statusPageMigrationStatus", - "parameters": [ - { - "description": "Migration job ID returned by `migrate-structure` or `migrate-email-subscribers`.", - "in": "query", - "name": "job_id", - "required": true, - "schema": { - "type": "string" + "/status-page/update": { + "post": { + "description": "Update an existing status page configuration.", + "operationId": "statusPageUpdate", + "requestBody": { + "content": { + "application/json": { + "example": { + "contact_info": "mailto:support@example.com", + "name": "Flashduty Status Page (Updated)", + "page_header": "Updated status page header", + "page_id": 5750613685214 + }, + "schema": { + "$ref": "#/components/schemas/UpdateStatusPageRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "example": { - "data": { - "account_id": 2451002751131, - "created_at": 1766736878, - "job_id": "01KP0311872NVYFRRQ82FW0001", - "phase": "history", - "progress": { - "completed_steps": 5, - "components_imported": 8, - "incidents_imported": 12, - "maintenances_imported": 2, - "sections_imported": 3, - "subscribers_imported": 0, - "subscribers_skipped": 0, - "templates_imported": 0, - "total_steps": 5 - }, - "source_page_id": "abcdefghij", - "status": "completed", - "target_page_id": 5750613685214, - "updated_at": 1766740000 - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -58361,7 +59666,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/StatusPageMigrationJob" + "$ref": "#/components/schemas/EmptyResponse" } }, "type": "object" @@ -58385,34 +59690,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get migration status", + "summary": "Update status page", "tags": [ "On-call/Status pages" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/status-pages/status-page-migration-status", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", + "href": "/en/api-reference/on-call/status-pages/status-page-update", "metadata": { - "sidebarTitle": "Get migration status" + "sidebarTitle": "Update status page" } } } }, - "/status-page/section/delete": { + "/team/delete": { "post": { - "description": "Delete a section from a status page.", - "operationId": "statusPageSectionDelete", + "description": "Permanently delete a team by ID, name, or external reference ID.", + "operationId": "team-write-delete", "requestBody": { "content": { "application/json": { "example": { - "page_id": 5750613685214, - "section_ids": [ - "01KP032J1FV2H8DDGN0QSJ1CAR" - ] + "team_id": 1001 }, "schema": { - "$ref": "#/components/schemas/DeleteStatusPageSectionRequest" + "$ref": "#/components/schemas/TeamDeleteRequest" } } }, @@ -58434,7 +59736,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/PlatformEmptyObject" } }, "type": "object" @@ -58451,6 +59753,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -58458,38 +59763,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete status page section", + "summary": "Delete a team", "tags": [ - "On-call/Status pages" + "Platform/Teams" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-section-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Teams Manage** (`organization`) |\n\n## Usage\n\n- At least one of `team_id`, `team_name`, or `ref_id` must be provided.\n- Fails with `400 ReferenceExist` if the team is still referenced by schedules, escalation rules, or other resources.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/teams/team-write-delete", "metadata": { - "sidebarTitle": "Delete status page section" + "sidebarTitle": "Delete a team" } } } }, - "/status-page/section/upsert": { + "/team/info": { "post": { - "description": "Create or update a section on a status page.", - "operationId": "statusPageSectionUpsert", + "description": "Return a single team by ID, name, or external reference ID.", + "operationId": "team-read-info", "requestBody": { "content": { "application/json": { "example": { - "page_id": 5750613685214, - "sections": [ - { - "description": "Our core services", - "name": "Core Services", - "order_id": 1 - } - ] + "team_id": 1001 }, "schema": { - "$ref": "#/components/schemas/UpsertStatusPageSectionRequest" + "$ref": "#/components/schemas/TeamInfoRequest" } } }, @@ -58501,9 +59799,22 @@ "application/json": { "example": { "data": { - "section_ids": [ - "01KP032J1FV2H8DDGN0QSJ1CAR" - ] + "account_id": 10023, + "created_at": 1710000000, + "creator_id": 80011, + "creator_name": "alice", + "description": "Backend reliability engineering team", + "person_ids": [ + 80011, + 80012 + ], + "ref_id": "", + "status": "enabled", + "team_id": 1001, + "team_name": "Backend SRE", + "updated_at": 1712000000, + "updated_by": 80011, + "updated_by_name": "alice" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -58515,7 +59826,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UpsertStatusPageSectionResponse" + "$ref": "#/components/schemas/TeamItem" } }, "type": "object" @@ -58539,31 +59850,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Upsert status page section", + "summary": "Get team detail", "tags": [ - "On-call/Status pages" + "Platform/Teams" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-section-upsert", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- At least one of `team_id`, `team_name`, or `ref_id` must be provided.", + "href": "/en/api-reference/platform/teams/team-read-info", "metadata": { - "sidebarTitle": "Upsert status page section" + "sidebarTitle": "Get team detail" } } } }, - "/status-page/subscriber/export": { + "/team/infos": { "post": { - "description": "Export subscribers list for a status page as a CSV attachment. The response is a `text/csv` file with columns: Method, Recipient, Components, Subscribe All, Locale.", - "operationId": "statusPageSubscriberExport", + "description": "Return basic info for multiple teams by their IDs in a single request.", + "operationId": "team-read-infos", "requestBody": { "content": { "application/json": { "example": { - "page_id": 5750613685214 + "team_ids": [ + 1001, + 1002 + ] }, "schema": { - "$ref": "#/components/schemas/ExportStatusPageSubscribersRequest" + "$ref": "#/components/schemas/TeamInfosRequest" } } }, @@ -58572,14 +59886,47 @@ "responses": { "200": { "content": { - "text/csv": { - "example": "Method,Recipient,Components,Subscribe All,Locale\nemail,alice@example.com,,Yes,zh-CN\nemail,bob@example.com,\"Core Services › API\",No,en-US", + "application/json": { + "example": { + "data": { + "items": [ + { + "person_ids": [ + 80011, + 80012 + ], + "team_id": 1001, + "team_name": "Backend SRE" + }, + { + "person_ids": [ + 80013 + ], + "team_id": 1002, + "team_name": "Frontend" + } + ] + }, + "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" + }, "schema": { - "$ref": "#/components/schemas/StatusPageSubscriberExportResponse" + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEnvelope" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/TeamInfosResponse" + } + }, + "type": "object" + } + ] } } }, - "description": "Success. CSV attachment, not a JSON envelope." + "description": "Success" }, "400": { "$ref": "#/components/responses/BadRequest" @@ -58594,47 +59941,34 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Export subscribers", + "summary": "Batch get teams", "tags": [ - "On-call/Status pages" + "Platform/Teams" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/day**; **20 requests/minute**; **10 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-subscriber-export", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Duplicate IDs are deduplicated; IDs that match no team are ignored.", + "href": "/en/api-reference/platform/teams/team-read-infos", "metadata": { - "sidebarTitle": "Export subscribers" + "sidebarTitle": "Batch get teams" } } } }, - "/status-page/subscriber/import": { + "/team/list": { "post": { - "description": "Bulk import subscribers for a status page. The account must be allowlisted for subscriber import; otherwise the call is rejected with an access-denied error.", - "operationId": "statusPageSubscriberImport", + "description": "Return a paginated list of teams in the current account.", + "operationId": "team-read-list", "requestBody": { "content": { "application/json": { "example": { - "method": "email", - "page_id": 5750613685214, - "subscribers": [ - { - "all": true, - "locale": "en-US", - "recipient": "alice@example.com" - }, - { - "all": false, - "component_ids": [ - "01KC3GAZ6ZJE40H55GM31RPWZE" - ], - "locale": "zh-CN", - "recipient": "bob@example.com" - } - ] + "asc": false, + "limit": 20, + "orderby": "created_at", + "p": 1 }, "schema": { - "$ref": "#/components/schemas/ImportStatusPageSubscribersRequest" + "$ref": "#/components/schemas/TeamListRequest" } } }, @@ -58645,7 +59979,30 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "items": [ + { + "account_id": 10023, + "created_at": 1710000000, + "creator_id": 80011, + "creator_name": "alice", + "description": "", + "person_ids": [ + 80011 + ], + "ref_id": "", + "status": "enabled", + "team_id": 1001, + "team_name": "Backend SRE", + "updated_at": 1712000000, + "updated_by": 0, + "updated_by_name": "" + } + ], + "limit": 20, + "p": 1, + "total": 5 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -58656,7 +60013,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/TeamListResponse" } }, "type": "object" @@ -58664,109 +60021,65 @@ ] } } - }, - "description": "Success" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "summary": "Import subscribers", - "tags": [ - "On-call/Status pages" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **20 requests/minute**; **2 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-subscriber-import", - "metadata": { - "sidebarTitle": "Import subscribers" - } - } - } - }, - "/status-page/subscriber/list": { - "get": { - "description": "List subscribers who have signed up for status page notifications.", - "operationId": "statusPageSubscriberList", - "parameters": [ - { - "description": "Status page ID.", - "in": "query", - "name": "page_id", - "required": true, - "schema": { - "format": "int64", - "type": "integer" - } - }, - { - "description": "Comma-separated component IDs to filter subscribers by.", - "in": "query", - "name": "component_ids", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "Page number (1-based).", - "in": "query", - "name": "p", - "required": false, - "schema": { - "default": 1, - "format": "int64", - "minimum": 1, - "type": "integer" - } + }, + "description": "Success" }, - { - "description": "Page size (1-100).", - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 10, - "format": "int64", - "maximum": 100, - "minimum": 1, - "type": "integer" - } + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/ServerError" } + }, + "summary": "List teams", + "tags": [ + "Platform/Teams" ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Filter by `person_id` to return teams that a specific person belongs to.\n- Defaults: p=1, limit=20.", + "href": "/en/api-reference/platform/teams/team-read-list", + "metadata": { + "sidebarTitle": "List teams" + } + } + } + }, + "/team/upsert": { + "post": { + "description": "Create a new team or update an existing one. Pass `team_id` to update.", + "operationId": "team-write-upsert", + "requestBody": { + "content": { + "application/json": { + "example": { + "description": "Backend reliability engineering team", + "person_ids": [ + 80011, + 80012 + ], + "team_name": "Backend SRE" + }, + "schema": { + "$ref": "#/components/schemas/TeamUpsertRequest" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "example": { "data": { - "has_next_page": false, - "items": [ - { - "all": true, - "components": [], - "locale": "zh-CN", - "method": "email", - "recipient": "alice@example.com" - }, - { - "all": true, - "components": [], - "locale": "en-US", - "method": "email", - "recipient": "bob@example.com" - } - ], - "total": 2 + "team_id": 1001, + "team_name": "Backend SRE" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -58778,7 +60091,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/StatusPageSubscriberListResponse" + "$ref": "#/components/schemas/TeamUpsertResponse" } }, "type": "object" @@ -58795,6 +60108,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -58802,33 +60118,35 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List status page subscribers", + "summary": "Create or update a team", "tags": [ - "On-call/Status pages" + "Platform/Teams" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/status-pages/status-page-subscriber-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Teams Manage** (`organization`) |\n\n## Usage\n\n- Omit `team_id` (or set to 0) to create a new team; pass an existing ID to update.\n- `team_name` must be 1–39 characters and unique within the account.\n- Pass `person_ids` to set team membership; this replaces the entire member list.\n- Pass `emails` or `phones` to add existing members by contact; contacts that match no member are ignored — nobody is invited.\n- `ref_id` is an external identifier for integration with third-party HR systems.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/platform/teams/team-write-upsert", "metadata": { - "sidebarTitle": "List status page subscribers" + "sidebarTitle": "Create or update a team" } } } }, - "/status-page/template/delete": { + "/template/create": { "post": { - "description": "Delete an event template from a status page.", - "operationId": "statusPageTemplateDelete", + "description": "Create a new notification template.", + "operationId": "template-write-create", "requestBody": { "content": { "application/json": { "example": { - "page_id": 5720156736380, - "template_id": "01KP0339G5XDEPM4R86T2B23EP", - "type": "pre_defined" + "description": "Default template for production incidents.", + "email": "Incident {{ .IncidentName }} on {{ .Severity }}", + "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}", + "team_id": 0, + "template_name": "Prod incident default" }, "schema": { - "$ref": "#/components/schemas/DeleteStatusPageTemplateRequest" + "$ref": "#/components/schemas/TemplateCreateRequest" } } }, @@ -58839,7 +60157,10 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "template_id": "6605a1b2c3d4e5f6a7b8c9d0", + "template_name": "Prod incident default" + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -58850,7 +60171,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/TemplateCreateResponse" } }, "type": "object" @@ -58874,64 +60195,42 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete status page template", + "summary": "Create a template", "tags": [ - "On-call/Status pages" + "On-call/Notification templates" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-template-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Templates Manage** (`on-call`) |\n\n## Usage\n\n- `template_name` must be unique within the account; duplicates return `InvalidParameter`.\n- The server validates every non-empty channel template by rendering it against a mock incident — a syntactic error in any channel fails the whole request with `InvalidParameter`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/notification-templates/template-write-create", "metadata": { - "sidebarTitle": "Delete status page template" + "sidebarTitle": "Create a template" } } } }, - "/status-page/template/list": { - "get": { - "description": "List all event templates for a status page.", - "operationId": "statusPageTemplateList", - "parameters": [ - { - "description": "Status page ID.", - "in": "query", - "name": "page_id", - "required": true, - "schema": { - "format": "int64", - "type": "integer" + "/template/delete": { + "post": { + "description": "Soft-delete a template by ID.", + "operationId": "template-write-delete", + "requestBody": { + "content": { + "application/json": { + "example": { + "template_id": "6605a1b2c3d4e5f6a7b8c9d0" + }, + "schema": { + "$ref": "#/components/schemas/TemplateIDRequest" + } } }, - { - "description": "Template category. `pre_defined` returns predefined event templates; `message` returns message notification templates.", - "in": "query", - "name": "type", - "required": true, - "schema": { - "enum": [ - "pre_defined", - "message" - ], - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "content": { "application/json": { "example": { - "data": { - "items": [ - { - "description": "We have identified the root cause.", - "status": "identified", - "template_id": "01KC8KP6PHVPSCAB0BTKZBN2HR", - "title": "Service Disruption", - "type": "incident" - } - ] - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -58942,7 +60241,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/ListStatusPageTemplatesResponse" + "$ref": "#/components/schemas/EmptyObject" } }, "type": "object" @@ -58959,6 +60258,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -58966,38 +60268,31 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List status page templates", + "summary": "Delete a template", "tags": [ - "On-call/Status pages" + "On-call/Notification templates" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |", - "href": "/en/api-reference/on-call/status-pages/status-page-template-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Templates Manage** (`on-call`) |\n\n## Usage\n\n- Fails with `400 ReferenceExist` if the template is still referenced by any channel, escalation rule, or notification subscription.\n- Deletion is soft — `deleted_at` is set. The record remains for audit, but the template stops appearing in listings.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/notification-templates/template-write-delete", "metadata": { - "sidebarTitle": "List status page templates" + "sidebarTitle": "Delete a template" } } } }, - "/status-page/template/upsert": { + "/template/info": { "post": { - "description": "Create or update an event template for a status page.", - "operationId": "statusPageTemplateUpsert", + "description": "Return a single notification template by ID.", + "operationId": "template-read-info", "requestBody": { "content": { "application/json": { "example": { - "page_id": 5720156736380, - "template": { - "description": "We are investigating a service disruption affecting some users.", - "status": "investigating", - "title": "Service Disruption", - "type": "incident" - }, - "type": "pre_defined" + "template_id": "6605a1b2c3d4e5f6a7b8c9d0" }, "schema": { - "$ref": "#/components/schemas/UpsertStatusPageTemplateRequest" + "$ref": "#/components/schemas/TemplateIDRequest" } } }, @@ -59009,7 +60304,30 @@ "application/json": { "example": { "data": { - "template_id": "01KP0339G5XDEPM4R86T2B23EP" + "account_id": 10023, + "created_at": 1712700000, + "creator_id": 80011, + "description": "Default template for production incidents.", + "dingtalk": "", + "dingtalk_app": "", + "email": "Incident {{ .IncidentName }} on {{ .Severity }}", + "feishu": "", + "feishu_app": "", + "slack": "", + "slack_app": "", + "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}", + "status": "enabled", + "team_id": 0, + "teams_app": "", + "telegram": "", + "template_id": "6605a1b2c3d4e5f6a7b8c9d0", + "template_name": "Prod incident default", + "updated_at": 1712702400, + "updated_by": 80011, + "voice": "", + "wecom": "", + "wecom_app": "", + "zoom": "" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -59021,7 +60339,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UpsertStatusPageTemplateResponse" + "$ref": "#/components/schemas/TemplateItem" } }, "type": "object" @@ -59045,34 +60363,35 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Upsert status page template", + "summary": "Get template detail", "tags": [ - "On-call/Status pages" + "On-call/Notification templates" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-template-upsert", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Templates Read** (`on-call`) |\n\n## Usage\n\n- Pass `000000000000000000000001` as `template_id` to retrieve the built-in preset template for the caller's account locale.", + "href": "/en/api-reference/on-call/notification-templates/template-read-info", "metadata": { - "sidebarTitle": "Upsert status page template" + "sidebarTitle": "Get template detail" } } } }, - "/status-page/update": { + "/template/list": { "post": { - "description": "Update an existing status page configuration.", - "operationId": "statusPageUpdate", + "description": "Return a paginated list of notification templates.", + "operationId": "template-read-list", "requestBody": { "content": { "application/json": { "example": { - "contact_info": "mailto:support@example.com", - "name": "Flashduty Status Page (Updated)", - "page_header": "Updated status page header", - "page_id": 5750613685214 + "asc": false, + "is_my_team": false, + "limit": 20, + "orderby": "updated_at", + "p": 1 }, "schema": { - "$ref": "#/components/schemas/UpdateStatusPageRequest" + "$ref": "#/components/schemas/TemplateListRequest" } } }, @@ -59083,7 +60402,38 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "has_next_page": true, + "items": [ + { + "account_id": 10023, + "created_at": 1712700000, + "creator_id": 80011, + "description": "Default template for production incidents.", + "dingtalk": "", + "dingtalk_app": "", + "email": "Incident {{ .IncidentName }} on {{ .Severity }}", + "feishu": "", + "feishu_app": "", + "slack": "", + "slack_app": "", + "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}", + "status": "enabled", + "team_id": 0, + "teams_app": "", + "telegram": "", + "template_id": "6605a1b2c3d4e5f6a7b8c9d0", + "template_name": "Prod incident default", + "updated_at": 1712702400, + "updated_by": 80011, + "voice": "", + "wecom": "", + "wecom_app": "", + "zoom": "" + } + ], + "total": 47 + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -59094,7 +60444,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/EmptyResponse" + "$ref": "#/components/schemas/TemplateListResponse" } }, "type": "object" @@ -59118,31 +60468,38 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Update status page", + "summary": "List templates", "tags": [ - "On-call/Status pages" + "On-call/Notification templates" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |", - "href": "/en/api-reference/on-call/status-pages/status-page-update", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Templates Read** (`on-call`) or **Templates Manage** (`on-call`) |\n\n## Usage\n\n- Pagination defaults to page 1 with 20 rows. The response's `has_next_page` tells you whether another page exists without needing a separate count request.\n- When `is_my_team` is `true`, `team_ids` is ignored.", + "href": "/en/api-reference/on-call/notification-templates/template-read-list", "metadata": { - "sidebarTitle": "Update status page" + "sidebarTitle": "List templates" } } } }, - "/team/delete": { + "/template/preview": { "post": { - "description": "Permanently delete a team by ID, name, or external reference ID.", - "operationId": "team-write-delete", + "description": "Render a notification template against incident data or mock data and return the output.", + "operationId": "template-read-preview", "requestBody": { "content": { "application/json": { "example": { - "team_id": 1001 + "content": "Incident {{.Title}} is {{.Status}}", + "incident_card_hidden_fields": { + "feishu_app": [ + "responders" + ] + }, + "incident_id": "664a1b2c3d4e5f6a7b8c9d0e", + "type": "feishu_app" }, "schema": { - "$ref": "#/components/schemas/TeamDeleteRequest" + "$ref": "#/components/schemas/PreviewTemplateRequest" } } }, @@ -59153,7 +60510,17 @@ "content": { "application/json": { "example": { - "data": {}, + "data": { + "content": "Incident Database latency spike is Critical", + "fixed_fields": [ + { + "field": "channel", + "value": "Payment Alerts" + } + ], + "message": "", + "success": true + }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -59164,7 +60531,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/PlatformEmptyObject" + "$ref": "#/components/schemas/PreviewTemplateResponse" } }, "type": "object" @@ -59181,9 +60548,6 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -59191,31 +60555,35 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Delete a team", + "summary": "Preview template", "tags": [ - "Platform/Teams" + "On-call/Notification templates" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Teams Manage** (`organization`) |\n\n## Usage\n\n- At least one of `team_id`, `team_name`, or `ref_id` must be provided.\n- Fails with `400 ReferenceExist` if the team is still referenced by schedules, escalation rules, or other resources.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/platform/teams/team-write-delete", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **60 requests/minute**; **10 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `incident_card_hidden_fields` applies only to supported IM-card previews; unsupported app types or field names return `InvalidParameter`.\n- `fixed_fields` is returned only when the selected IM preview has a non-empty fixed incident-card value.", + "href": "/en/api-reference/on-call/notification-templates/template-read-preview", "metadata": { - "sidebarTitle": "Delete a team" + "sidebarTitle": "Preview template" } } } }, - "/team/info": { + "/template/update": { "post": { - "description": "Return a single team by ID, name, or external reference ID.", - "operationId": "team-read-info", + "description": "Update an existing template. Only the fields present in the request are written: a channel you omit keeps its current content, and an explicit empty string clears it.", + "operationId": "template-write-update", "requestBody": { "content": { "application/json": { "example": { - "team_id": 1001 + "description": "Updated description.", + "email": "Incident {{ .IncidentName }} on {{ .Severity }}", + "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}", + "template_id": "6605a1b2c3d4e5f6a7b8c9d0", + "template_name": "Prod incident default" }, "schema": { - "$ref": "#/components/schemas/TeamInfoRequest" + "$ref": "#/components/schemas/TemplateUpdateRequest" } } }, @@ -59226,24 +60594,7 @@ "content": { "application/json": { "example": { - "data": { - "account_id": 10023, - "created_at": 1710000000, - "creator_id": 80011, - "creator_name": "alice", - "description": "Backend reliability engineering team", - "person_ids": [ - 80011, - 80012 - ], - "ref_id": "", - "status": "enabled", - "team_id": 1001, - "team_name": "Backend SRE", - "updated_at": 1712000000, - "updated_by": 80011, - "updated_by_name": "alice" - }, + "data": {}, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, "schema": { @@ -59254,7 +60605,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/TeamItem" + "$ref": "#/components/schemas/EmptyObject" } }, "type": "object" @@ -59271,6 +60622,9 @@ "401": { "$ref": "#/components/responses/Unauthorized" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "429": { "$ref": "#/components/responses/TooManyRequests" }, @@ -59278,34 +60632,32 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Get team detail", + "summary": "Update a template", "tags": [ - "Platform/Teams" + "On-call/Notification templates" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- At least one of `team_id`, `team_name`, or `ref_id` must be provided.", - "href": "/en/api-reference/platform/teams/team-read-info", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Templates Manage** (`on-call`) |\n\n## Usage\n\n- Only the fields present in the request are written. A channel you omit keeps its current content; send it as an empty string to clear it.\n- The caller needs data-permission on the template's team; otherwise the response is `AccessDenied`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", + "href": "/en/api-reference/on-call/notification-templates/template-write-update", "metadata": { - "sidebarTitle": "Get team detail" + "sidebarTitle": "Update a template" } } } }, - "/team/infos": { + "/webhook/history/detail": { "post": { - "description": "Return basic info for multiple teams by their IDs in a single request.", - "operationId": "team-read-infos", + "description": "Retrieve the detailed payload and response for a specific webhook delivery attempt.", + "operationId": "webhookHistoryDetail", "requestBody": { "content": { "application/json": { "example": { - "team_ids": [ - 1001, - 1002 - ] + "event_id": "20260412Xatt9hrXsgmFkBR78WF655", + "integration_id": 6113996590131 }, "schema": { - "$ref": "#/components/schemas/TeamInfosRequest" + "$ref": "#/components/schemas/GetWebhookHistoryDetailRequest" } } }, @@ -59317,23 +60669,24 @@ "application/json": { "example": { "data": { - "items": [ - { - "person_ids": [ - 80011, - 80012 - ], - "team_id": 1001, - "team_name": "Backend SRE" - }, - { - "person_ids": [ - 80013 - ], - "team_id": 1002, - "team_name": "Frontend" - } - ] + "attempt": 1, + "channel_id": 2551105804131, + "channel_name": "Production Alerts", + "duration": 132, + "endpoint": "https://example.com/webhook", + "event_id": "20260412Xatt9hrXsgmFkBR78WF655", + "event_time": "2026-04-12 13:31:11.357472", + "event_type": "a_update", + "integration_id": 5321026051131, + "ref_id": "69da3f0ef77b1b51f40e83cc", + "ref_title": "High CPU Usage on host-01", + "request_body": "{\"event_type\":\"a_update\",\"event_id\":\"d789d65951c0532ea9b6a1d99b707054\"}", + "request_headers": "{\"Content-Type\":\"application/json\"}", + "response_body": "{\"ok\":true}", + "response_headers": "{\"Content-Type\":\"application/json\"}", + "status": "success", + "status_code": 200, + "webhook_type": "alert" }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -59345,7 +60698,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/TeamInfosResponse" + "$ref": "#/components/schemas/WebhookHistoryDetail" } }, "type": "object" @@ -59369,34 +60722,35 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "Batch get teams", + "summary": "Get webhook delivery detail", "tags": [ - "Platform/Teams" + "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 | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Duplicate IDs are deduplicated; IDs that match no team are ignored.", - "href": "/en/api-reference/platform/teams/team-read-infos", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |", + "href": "/en/api-reference/on-call/integrations/webhook-history-detail", "metadata": { - "sidebarTitle": "Batch get teams" + "sidebarTitle": "Get webhook delivery detail" } } } }, - "/team/list": { + "/webhook/history/list": { "post": { - "description": "Return a paginated list of teams in the current account.", - "operationId": "team-read-list", + "description": "List the delivery history for outbound webhook notifications.", + "operationId": "webhookHistoryList", "requestBody": { "content": { "application/json": { "example": { - "asc": false, + "end_time": 1775203200000, + "integration_id": 6113996590131, "limit": 20, - "orderby": "created_at", - "p": 1 + "start_time": 1775116800000, + "status": "success" }, "schema": { - "$ref": "#/components/schemas/TeamListRequest" + "$ref": "#/components/schemas/ListWebhookHistoryRequest" } } }, @@ -59410,26 +60764,22 @@ "data": { "items": [ { - "account_id": 10023, - "created_at": 1710000000, - "creator_id": 80011, - "creator_name": "alice", - "description": "", - "person_ids": [ - 80011 - ], - "ref_id": "", - "status": "enabled", - "team_id": 1001, - "team_name": "Backend SRE", - "updated_at": 1712000000, - "updated_by": 0, - "updated_by_name": "" + "attempt": 1, + "channel_id": 2551105804131, + "duration": 132, + "endpoint": "https://example.com/webhook", + "event_id": "20260412Xatt9hrXsgmFkBR78WF655", + "event_time": "2026-04-12 13:31:11.357472", + "event_type": "a_update", + "integration_id": 5321026051131, + "ref_id": "69da3f0ef77b1b51f40e83cc", + "status": "success", + "status_code": 200, + "webhook_type": "alert" } - ], - "limit": 20, - "p": 1, - "total": 5 + ], + "search_after_ctx": "eyJldmVudF90aW1lIjoiMjAyNi0wNC0xMlQxMzoxNToyNi4zODI1NDcrMDg6MDAiLCJldmVudF9pZCI6IjIwMjYwNDEybUdzeFAzZHJwRmZzNFpDUWQycFNEcCJ9", + "total": 346 }, "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" }, @@ -59441,7 +60791,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/TeamListResponse" + "$ref": "#/components/schemas/ListWebhookHistoryResponse" } }, "type": "object" @@ -59465,73 +60815,89 @@ "$ref": "#/components/responses/ServerError" } }, - "summary": "List teams", + "summary": "List webhook delivery history", "tags": [ - "Platform/Teams" + "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 | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Filter by `person_id` to return teams that a specific person belongs to.\n- Defaults: p=1, limit=20.", - "href": "/en/api-reference/platform/teams/team-read-list", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |", + "href": "/en/api-reference/on-call/integrations/webhook-history-list", "metadata": { - "sidebarTitle": "List teams" + "sidebarTitle": "List webhook delivery history" } } } }, - "/team/upsert": { + "/member/notify": { "post": { - "description": "Create a new team or update an existing one. Pass `team_id` to update.", - "operationId": "team-write-upsert", - "requestBody": { - "content": { - "application/json": { - "example": { - "description": "Backend reliability engineering team", - "person_ids": [ - 80011, - 80012 - ], - "team_name": "Backend SRE" - }, - "schema": { - "$ref": "#/components/schemas/TeamUpsertRequest" - } - } - }, - "required": true + "operationId": "memberNotify", + "summary": "Notify members", + "description": "Send an email to account members on behalf of the caller, with content the caller supplies. Only callable with a credential minted for an AI SRE session; any other credential is rejected with `AccessDenied`. Delivery is asynchronous — `accepted` means the email was queued, not that it was delivered.", + "tags": [ + "Platform/Members" + ], + "x-mint": { + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **200 requests/minute**; **10 requests/second** per account |\n| Permissions | None — callable only with an AI SRE session credential; any other credential is rejected with `AccessDenied` |\n\n## Usage\n\n- Recipients that are not active members of the caller's account, or that have no email address on file, are skipped rather than failing the whole request.\n- Whether email is included follows each recipient's own notification preferences for this kind of message; a recipient with no preference set defaults to receiving it.\n- Recipients receive exactly the sanitized `html` as the email body, with nothing added around it. The sender name shows the caller's name followed by \"(via AI SRE)\".\n- Before sending, the server inspects the submitted `html` and rejects the request with `400` / `InvalidParameter` when it contains constructs whose removal would change what recipients see (`