Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions api-reference/on-call.openapi.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,76 @@
}
],
"paths": {
"/channel/escalate/rule/reorder": {
"post": {
"operationId": "channelEscalateRuleReorder",
"summary": "Reorder escalation rules",
"description": "Change the evaluation order of a channel's escalation rules by moving one rule into another rule's slot.",
"tags": [
"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 | **Channels Manage** (`on-call`) |\n\n## Usage\n\n- Rules are evaluated in ascending `priority`: the first enabled rule whose `time_filters` and `filters` match a new incident takes it, and later rules are skipped. This endpoint moves `drag_rule_id` into `target_rule_id`'s slot and renumbers the channel's rules from priority 0, changing that evaluation order.\n- Both `drag_rule_id` and `target_rule_id` must be rules of `channel_id`; otherwise `InvalidParameter`.\n- An unknown `channel_id` returns `InvalidParameter`.\n- Concurrent reorders of the same channel are rejected with `TooManyRequests`.\n- The caller must also be able to edit the channel: the account owner or an admin, the channel creator, or a member of its managing teams (of its owning team when `managing_team_ids` is empty). Otherwise the call returns `AccessDenied`.\n- Every call is recorded in the account audit log.",
"href": "/en/api-reference/on-call/channels/channel-escalate-rule-reorder",
"metadata": {
"sidebarTitle": "Reorder escalation rules"
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/SuccessEnvelope"
},
{
"type": "object",
"properties": {
"data": {
"type": "object"
}
}
}
]
},
"example": {
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"data": {}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReorderEscalationRulesRequest"
}
}
}
}
}
},
"/channel/inhibit/rule/delete": {
"post": {
"operationId": "channelInhibitRuleDelete",
Expand Down Expand Up @@ -28354,6 +28424,31 @@
}
}
},
"ReorderEscalationRulesRequest": {
"type": "object",
"required": [
"channel_id",
"drag_rule_id",
"target_rule_id"
],
"properties": {
"channel_id": {
"type": "integer",
"format": "int64",
"description": "Owning channel ID; obtain it from `POST /channel/list`."
},
"drag_rule_id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{24}$",
"description": "ID of the rule being dragged (24-character hex), as returned in `rule_id` by the create or list endpoint."
},
"target_rule_id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{24}$",
"description": "ID of the rule whose slot the dragged rule moves into (24-character hex)."
}
}
},
"ResetIncidentFieldRequest": {
"type": "object",
"description": "Parameters for updating a custom field value on an incident.",
Expand Down
95 changes: 95 additions & 0 deletions api-reference/on-call.openapi.zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,76 @@
}
],
"paths": {
"/channel/escalate/rule/reorder": {
"post": {
"operationId": "channelEscalateRuleReorder",
"summary": "调整分派策略顺序",
"description": "通过将一条策略移动到另一条策略的位置,改变协作空间内分派策略的评估顺序。",
"tags": [
"On-call/Channels"
],
"x-mint": {
"content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**;**20 次/秒** |\n| 权限要求 | **协作空间管理**(`on-call`) |\n\n## 使用说明\n\n- 策略按 `priority` 升序评估:新故障由第一条满足 `time_filters` 和 `filters` 的启用中策略承接,后面的策略跳过。本接口将 `drag_rule_id` 移动到 `target_rule_id` 所在位置,并将协作空间内的策略从 0 开始重新编号,从而改变评估顺序。\n- `drag_rule_id` 和 `target_rule_id` 必须都属于 `channel_id`,否则返回 `InvalidParameter`。\n- `channel_id` 不存在时返回 `InvalidParameter`。\n- 同一协作空间的并发排序请求会被拒绝,返回 `TooManyRequests`。\n- 调用者还必须拥有该协作空间的编辑权:账户所有者或管理员、协作空间创建者,或其管理团队成员(`managing_team_ids` 为空时为所属团队成员),否则返回 `AccessDenied`。\n- 每次调用都会记录到账户审计日志。",
"href": "/zh/api-reference/on-call/channels/channel-escalate-rule-reorder",
"metadata": {
"sidebarTitle": "调整分派策略顺序"
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/SuccessEnvelope"
},
{
"type": "object",
"properties": {
"data": {
"type": "object"
}
}
}
]
},
"example": {
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"data": {}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReorderEscalationRulesRequest"
}
}
}
}
}
},
"/channel/inhibit/rule/delete": {
"post": {
"operationId": "channelInhibitRuleDelete",
Expand Down Expand Up @@ -28354,6 +28424,31 @@
}
}
},
"ReorderEscalationRulesRequest": {
"type": "object",
"required": [
"channel_id",
"drag_rule_id",
"target_rule_id"
],
"properties": {
"channel_id": {
"type": "integer",
"format": "int64",
"description": "所属协作空间 ID,可通过 `POST /channel/list` 获取。"
},
"drag_rule_id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{24}$",
"description": "被拖拽移动的策略 ID(24 位十六进制),即策略创建或列表接口返回的 `rule_id`。"
},
"target_rule_id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{24}$",
"description": "目标位置的策略 ID(24 位十六进制),被拖拽的策略移动到该策略所在的位置。"
}
}
},
"ResetIncidentFieldRequest": {
"type": "object",
"description": "更新故障自定义字段值的参数。",
Expand Down
95 changes: 95 additions & 0 deletions api-reference/openapi.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -7897,6 +7897,31 @@
},
"description": "loki.query parameters. `expr` is LogQL. `execution.kind` must be `instant` or `range`; `instant` keeps the full time context so `$__auto` ranges resolve. `limit` and `direction` only apply to raw-log results."
},
"ReorderEscalationRulesRequest": {
"type": "object",
"required": [
"channel_id",
"drag_rule_id",
"target_rule_id"
],
"properties": {
"channel_id": {
"type": "integer",
"format": "int64",
"description": "Owning channel ID; obtain it from `POST /channel/list`."
},
"drag_rule_id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{24}$",
"description": "ID of the rule being dragged (24-character hex), as returned in `rule_id` by the create or list endpoint."
},
"target_rule_id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{24}$",
"description": "ID of the rule whose slot the dragged rule moves into (24-character hex)."
}
}
},
"VictoriaLogsQueryParams": {
"type": "object",
"additionalProperties": true,
Expand Down Expand Up @@ -39855,6 +39880,76 @@
}
}
},
"/channel/escalate/rule/reorder": {
"post": {
"operationId": "channelEscalateRuleReorder",
"summary": "Reorder escalation rules",
"description": "Change the evaluation order of a channel's escalation rules by moving one rule into another rule's slot.",
"tags": [
"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 | **Channels Manage** (`on-call`) |\n\n## Usage\n\n- Rules are evaluated in ascending `priority`: the first enabled rule whose `time_filters` and `filters` match a new incident takes it, and later rules are skipped. This endpoint moves `drag_rule_id` into `target_rule_id`'s slot and renumbers the channel's rules from priority 0, changing that evaluation order.\n- Both `drag_rule_id` and `target_rule_id` must be rules of `channel_id`; otherwise `InvalidParameter`.\n- An unknown `channel_id` returns `InvalidParameter`.\n- Concurrent reorders of the same channel are rejected with `TooManyRequests`.\n- The caller must also be able to edit the channel: the account owner or an admin, the channel creator, or a member of its managing teams (of its owning team when `managing_team_ids` is empty). Otherwise the call returns `AccessDenied`.\n- Every call is recorded in the account audit log.",
"href": "/en/api-reference/on-call/channels/channel-escalate-rule-reorder",
"metadata": {
"sidebarTitle": "Reorder escalation rules"
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/SuccessEnvelope"
},
{
"type": "object",
"properties": {
"data": {
"type": "object"
}
}
}
]
},
"example": {
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"data": {}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReorderEscalationRulesRequest"
}
}
}
}
}
},
"/channel/escalate/rule/update": {
"post": {
"operationId": "channelEscalateRuleUpdate",
Expand Down
Loading
Loading