Skip to content

Commit 438ae79

Browse files
author
Flashduty AI-SRE
committed
docs(api): daily audit 2026-08-24 — align stale envelope schemas, fix template update semantics
1 parent 75f9cef commit 438ae79

6 files changed

Lines changed: 116 additions & 20 deletions

File tree

api-reference/on-call.openapi.en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4569,7 +4569,7 @@
45694569
"post": {
45704570
"operationId": "template-write-update",
45714571
"summary": "Update a template",
4572-
"description": "Replace the content of every channel on an existing template.",
4572+
"description": "Update an existing template. Channels you omit keep their content; send an empty string to clear one.",
45734573
"tags": [
45744574
"On-call/Notification templates"
45754575
],

api-reference/on-call.openapi.zh.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4569,7 +4569,7 @@
45694569
"post": {
45704570
"operationId": "template-write-update",
45714571
"summary": "更新模板",
4572-
"description": "替换指定模板在所有通道上的内容。",
4572+
"description": "更新已有模板。未发送的通道保持原内容,发送空字符串可清空通道。",
45734573
"tags": [
45744574
"On-call/通知模板"
45754575
],

api-reference/openapi.en.json

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9168,7 +9168,7 @@
91689168
"post": {
91699169
"operationId": "template-write-update",
91709170
"summary": "Update a template",
9171-
"description": "Replace the content of every channel on an existing template.",
9171+
"description": "Update an existing template. Channels you omit keep their content; send an empty string to clear one.",
91729172
"tags": [
91739173
"On-call/Notification templates"
91749174
],
@@ -31116,7 +31116,7 @@
3111631116
},
3111731117
"ErrorCode": {
3111831118
"type": "string",
31119-
"description": "Flashduty error code enum. Every failed API response sets `error.code` to one of these values. The value is a stable wire string — not a localized message and not a numeric status. HTTP status is informational.",
31119+
"description": "Flashduty error code enum. Every failed API response sets `error.code` to one of these stable wire strings. HTTP status is informational — the authoritative signal is the enum value.\n\n| Code | HTTP | Meaning |\n|---|---|---|\n| `OK` | 200 | Reserved — not returned on real errors. |\n| `InvalidParameter` | 400 | A required parameter is missing or failed validation. |\n| `BadRequest` | 400 | Generic 400 used when no more specific code fits. |\n| `InvalidContentType` | 400 | The `Content-Type` header is not `application/json`. |\n| `ResourceNotFound` | 400 | The referenced resource does not exist. Note: returned as HTTP 400, not 404 (historical choice). |\n| `NoLicense` | 400 | The feature is license-gated and no active license was found. |\n| `ReferenceExist` | 400 | Deletion blocked — other entities still reference this resource. |\n| `Unauthorized` | 401 | `app_key` is missing, invalid, or expired. |\n| `BalanceNotEnough` | 402 | Billing-gated operation with insufficient account balance. |\n| `AccessDenied` | 403 | Authenticated but lacking the permission required for this operation. |\n| `RouteNotFound` | 404 | The request URL path is not a known route. |\n| `MethodNotAllowed` | 405 | The HTTP method is not allowed on this otherwise-known path. |\n| `UndonedOrderExist` | 409 | An outstanding billing order blocks this new one. Wait and retry. |\n| `RequestLocked` | 423 | Operation temporarily locked due to repeated failures. |\n| `EntityTooLarge` | 413 | Request body exceeds the configured max size. |\n| `RequestTooFrequently` | 429 | Rate limit hit — API-global, per-account, or per-integration. |\n| `RequestVerifyRequired` | 428 | Second-factor verification required but not supplied. |\n| `DangerousOperation` | 428 | High-risk operation requires MFA verification. |\n| `InternalError` | 500 | Unhandled server-side error. Include `request_id` in the bug report. |\n| `ServiceUnavailable` | 503 | A backend dependency is unavailable. Try again later. |",
3112031120
"enum": [
3112131121
"OK",
3112231122
"InvalidParameter",
@@ -31138,7 +31138,30 @@
3113831138
"DangerousOperation",
3113931139
"InternalError",
3114031140
"ServiceUnavailable"
31141-
]
31141+
],
31142+
"x-enumDescriptions": {
31143+
"OK": "Reserved — not returned on real errors.",
31144+
"InvalidParameter": "A required parameter is missing or failed validation.",
31145+
"BadRequest": "Generic 400 used when no more specific code fits.",
31146+
"InvalidContentType": "The `Content-Type` header is not `application/json`.",
31147+
"ResourceNotFound": "The referenced resource does not exist. Note: returned as HTTP 400, not 404 (historical choice).",
31148+
"NoLicense": "The feature is license-gated and no active license was found.",
31149+
"ReferenceExist": "Deletion blocked — other entities still reference this resource.",
31150+
"Unauthorized": "`app_key` is missing, invalid, or expired.",
31151+
"BalanceNotEnough": "Billing-gated operation with insufficient account balance.",
31152+
"AccessDenied": "Authenticated but lacking the permission required for this operation.",
31153+
"RouteNotFound": "The request URL path is not a known route.",
31154+
"MethodNotAllowed": "The HTTP method is not allowed on this otherwise-known path.",
31155+
"UndonedOrderExist": "An outstanding billing order blocks this new one. Wait and retry.",
31156+
"RequestLocked": "Operation temporarily locked due to repeated failures.",
31157+
"EntityTooLarge": "Request body exceeds the configured max size.",
31158+
"RequestTooFrequently": "Rate limit hit — API-global, per-account, or per-integration.",
31159+
"RequestVerifyRequired": "Second-factor verification required but not supplied.",
31160+
"DangerousOperation": "High-risk operation requires MFA verification.",
31161+
"InternalError": "Unhandled server-side error. Include `request_id` in the bug report.",
31162+
"ServiceUnavailable": "A backend dependency is unavailable. Try again later."
31163+
},
31164+
"example": "InvalidParameter"
3114231165
},
3114331166
"DutyError": {
3114431167
"type": "object",
@@ -31149,7 +31172,8 @@
3114931172
},
3115031173
"message": {
3115131174
"type": "string",
31152-
"description": "Human-readable error message, localized by the caller's Accept-Language. May contain field names, IDs, or other context from the failing request."
31175+
"description": "Human-readable error message, localized by the caller's Accept-Language. May contain field names, IDs, or other context from the failing request.",
31176+
"example": "The specified parameter template_id is not valid."
3115331177
}
3115431178
},
3115531179
"required": [

api-reference/openapi.zh.json

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9168,7 +9168,7 @@
91689168
"post": {
91699169
"operationId": "template-write-update",
91709170
"summary": "更新模板",
9171-
"description": "替换指定模板在所有通道上的内容。",
9171+
"description": "更新已有模板。未发送的通道保持原内容,发送空字符串可清空通道。",
91729172
"tags": [
91739173
"On-call/通知模板"
91749174
],
@@ -31108,7 +31108,7 @@
3110831108
},
3110931109
"ErrorCode": {
3111031110
"type": "string",
31111-
"description": "Flashduty error code enum. Every failed API response sets `error.code` to one of these values. The value is a stable wire string — not a localized message and not a numeric status. HTTP status is informational.",
31111+
"description": "Flashduty 错误码枚举。每个失败响应的 `error.code` 都是下列稳定值之一,HTTP 状态码仅作参考。\n\n| 错误码 | HTTP | 含义 |\n|---|---|---|\n| `OK` | 200 | 保留值,正常错误响应不会返回。 |\n| `InvalidParameter` | 400 | 必填参数缺失或未通过校验。 |\n| `BadRequest` | 400 | 通用的 400 错误,通常是请求本身不合法。 |\n| `InvalidContentType` | 400 | 请求头 `Content-Type` 不是 `application/json`。 |\n| `ResourceNotFound` | 400 | 目标资源不存在。注意 HTTP 状态码是 400 而非 404(历史设计)。 |\n| `NoLicense` | 400 | 功能需要有效授权,但未找到可用的 license。 |\n| `ReferenceExist` | 400 | 该资源仍被其他实体引用,无法删除。 |\n| `Unauthorized` | 401 | `app_key` 缺失、无效或已过期。 |\n| `BalanceNotEnough` | 402 | 账户余额不足,无法执行需要计费的操作。 |\n| `AccessDenied` | 403 | 身份认证通过,但 RBAC 权限不足以执行该操作。 |\n| `RouteNotFound` | 404 | 请求的 URL 路径不是已知路由。 |\n| `MethodNotAllowed` | 405 | 当前路径不接受所使用的 HTTP 方法。 |\n| `UndonedOrderExist` | 409 | 账户存在未完成的订单,请稍后重试。 |\n| `RequestLocked` | 423 | 因连续失败被临时锁定。 |\n| `EntityTooLarge` | 413 | 请求体超过允许的最大长度。 |\n| `RequestTooFrequently` | 429 | 命中限流(全局、账户级或集成级)。 |\n| `RequestVerifyRequired` | 428 | 操作需要二次验证码,但未提供。 |\n| `DangerousOperation` | 428 | 危险操作,需要进行 MFA 验证。 |\n| `InternalError` | 500 | 服务端未预期错误。反馈问题请附上 `request_id`。 |\n| `ServiceUnavailable` | 503 | 后端依赖不可用,请稍后重试。 |",
3111231112
"enum": [
3111331113
"OK",
3111431114
"InvalidParameter",
@@ -31130,18 +31130,42 @@
3113031130
"DangerousOperation",
3113131131
"InternalError",
3113231132
"ServiceUnavailable"
31133-
]
31133+
],
31134+
"x-enumDescriptions": {
31135+
"OK": "保留值,正常错误响应不会返回。",
31136+
"InvalidParameter": "必填参数缺失或未通过校验。",
31137+
"BadRequest": "通用的 400 错误,通常是请求本身不合法。",
31138+
"InvalidContentType": "请求头 `Content-Type` 不是 `application/json`。",
31139+
"ResourceNotFound": "目标资源不存在。注意 HTTP 状态码是 400 而非 404(历史设计)。",
31140+
"NoLicense": "功能需要有效授权,但未找到可用的 license。",
31141+
"ReferenceExist": "该资源仍被其他实体引用,无法删除。",
31142+
"Unauthorized": "`app_key` 缺失、无效或已过期。",
31143+
"BalanceNotEnough": "账户余额不足,无法执行需要计费的操作。",
31144+
"AccessDenied": "身份认证通过,但 RBAC 权限不足以执行该操作。",
31145+
"RouteNotFound": "请求的 URL 路径不是已知路由。",
31146+
"MethodNotAllowed": "当前路径不接受所使用的 HTTP 方法。",
31147+
"UndonedOrderExist": "账户存在未完成的订单,请稍后重试。",
31148+
"RequestLocked": "因连续失败被临时锁定。",
31149+
"EntityTooLarge": "请求体超过允许的最大长度。",
31150+
"RequestTooFrequently": "命中限流(全局、账户级或集成级)。",
31151+
"RequestVerifyRequired": "操作需要二次验证码,但未提供。",
31152+
"DangerousOperation": "危险操作,需要进行 MFA 验证。",
31153+
"InternalError": "服务端未预期错误。反馈问题请附上 `request_id`。",
31154+
"ServiceUnavailable": "后端依赖不可用,请稍后重试。"
31155+
},
31156+
"example": "InvalidParameter"
3113431157
},
3113531158
"DutyError": {
3113631159
"type": "object",
31137-
"description": "Error payload inside the response envelope. Present only on non-2xx responses.",
31160+
"description": "响应结构中的错误 payload,仅在非 2xx 响应时出现。",
3113831161
"properties": {
3113931162
"code": {
3114031163
"$ref": "#/components/schemas/ErrorCode"
3114131164
},
3114231165
"message": {
3114331166
"type": "string",
31144-
"description": "Human-readable error message, localized by the caller's Accept-Language. May contain field names, IDs, or other context from the failing request."
31167+
"description": "用户可读的错误描述,语言会跟随调用方的 Accept-Language。可能包含字段名、ID 等请求上下文。",
31168+
"example": "The specified parameter template_id is not valid."
3114531169
}
3114631170
},
3114731171
"required": [
@@ -31169,7 +31193,7 @@
3116931193
},
3117031194
"ErrorResponse": {
3117131195
"type": "object",
31172-
"description": "Response envelope for errors. `error` is required; `data` is absent.",
31196+
"description": "错误响应结构。`error` 必填,`data` 不存在。",
3117331197
"properties": {
3117431198
"request_id": {
3117531199
"type": "string",

api-reference/safari.openapi.en.json

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5392,7 +5392,8 @@
53925392
},
53935393
"message": {
53945394
"type": "string",
5395-
"description": "Human-readable error message, localized by the caller's Accept-Language. May contain field names, IDs, or other context from the failing request."
5395+
"description": "Human-readable error message, localized by the caller's Accept-Language. May contain field names, IDs, or other context from the failing request.",
5396+
"example": "The specified parameter template_id is not valid."
53965397
}
53975398
},
53985399
"required": [
@@ -5441,7 +5442,7 @@
54415442
},
54425443
"ErrorCode": {
54435444
"type": "string",
5444-
"description": "Flashduty error code enum. Every failed API response sets `error.code` to one of these values. The value is a stable wire string — not a localized message and not a numeric status. HTTP status is informational.",
5445+
"description": "Flashduty error code enum. Every failed API response sets `error.code` to one of these stable wire strings. HTTP status is informational — the authoritative signal is the enum value.\n\n| Code | HTTP | Meaning |\n|---|---|---|\n| `OK` | 200 | Reserved — not returned on real errors. |\n| `InvalidParameter` | 400 | A required parameter is missing or failed validation. |\n| `BadRequest` | 400 | Generic 400 used when no more specific code fits. |\n| `InvalidContentType` | 400 | The `Content-Type` header is not `application/json`. |\n| `ResourceNotFound` | 400 | The referenced resource does not exist. Note: returned as HTTP 400, not 404 (historical choice). |\n| `NoLicense` | 400 | The feature is license-gated and no active license was found. |\n| `ReferenceExist` | 400 | Deletion blocked — other entities still reference this resource. |\n| `Unauthorized` | 401 | `app_key` is missing, invalid, or expired. |\n| `BalanceNotEnough` | 402 | Billing-gated operation with insufficient account balance. |\n| `AccessDenied` | 403 | Authenticated but lacking the permission required for this operation. |\n| `RouteNotFound` | 404 | The request URL path is not a known route. |\n| `MethodNotAllowed` | 405 | The HTTP method is not allowed on this otherwise-known path. |\n| `UndonedOrderExist` | 409 | An outstanding billing order blocks this new one. Wait and retry. |\n| `RequestLocked` | 423 | Operation temporarily locked due to repeated failures. |\n| `EntityTooLarge` | 413 | Request body exceeds the configured max size. |\n| `RequestTooFrequently` | 429 | Rate limit hit — API-global, per-account, or per-integration. |\n| `RequestVerifyRequired` | 428 | Second-factor verification required but not supplied. |\n| `DangerousOperation` | 428 | High-risk operation requires MFA verification. |\n| `InternalError` | 500 | Unhandled server-side error. Include `request_id` in the bug report. |\n| `ServiceUnavailable` | 503 | A backend dependency is unavailable. Try again later. |",
54455446
"enum": [
54465447
"OK",
54475448
"InvalidParameter",
@@ -5463,7 +5464,30 @@
54635464
"DangerousOperation",
54645465
"InternalError",
54655466
"ServiceUnavailable"
5466-
]
5467+
],
5468+
"x-enumDescriptions": {
5469+
"OK": "Reserved — not returned on real errors.",
5470+
"InvalidParameter": "A required parameter is missing or failed validation.",
5471+
"BadRequest": "Generic 400 used when no more specific code fits.",
5472+
"InvalidContentType": "The `Content-Type` header is not `application/json`.",
5473+
"ResourceNotFound": "The referenced resource does not exist. Note: returned as HTTP 400, not 404 (historical choice).",
5474+
"NoLicense": "The feature is license-gated and no active license was found.",
5475+
"ReferenceExist": "Deletion blocked — other entities still reference this resource.",
5476+
"Unauthorized": "`app_key` is missing, invalid, or expired.",
5477+
"BalanceNotEnough": "Billing-gated operation with insufficient account balance.",
5478+
"AccessDenied": "Authenticated but lacking the permission required for this operation.",
5479+
"RouteNotFound": "The request URL path is not a known route.",
5480+
"MethodNotAllowed": "The HTTP method is not allowed on this otherwise-known path.",
5481+
"UndonedOrderExist": "An outstanding billing order blocks this new one. Wait and retry.",
5482+
"RequestLocked": "Operation temporarily locked due to repeated failures.",
5483+
"EntityTooLarge": "Request body exceeds the configured max size.",
5484+
"RequestTooFrequently": "Rate limit hit — API-global, per-account, or per-integration.",
5485+
"RequestVerifyRequired": "Second-factor verification required but not supplied.",
5486+
"DangerousOperation": "High-risk operation requires MFA verification.",
5487+
"InternalError": "Unhandled server-side error. Include `request_id` in the bug report.",
5488+
"ServiceUnavailable": "A backend dependency is unavailable. Try again later."
5489+
},
5490+
"example": "InvalidParameter"
54675491
},
54685492
"ErrorResponse": {
54695493
"type": "object",

0 commit comments

Comments
 (0)