c2402947a9
build / build (push) Successful in 1m26s
上游 task_dead_letters 没有解决标记,purge/DELETE 会销毁"失败过"的唯一证据。
治理侧新增解除记录(迁移 073):绑定实时行逐字节指纹、重放引用、源侧观测摘要与
操作人;行被改过、重放后又出现新死信、源侧未结清都不命中,封存照旧阻断。
指纹先压紧空白再摘要,避免 PG to_jsonb::text 与 json.Marshal 的空白差异。
试过:go test ./internal/{librarydeadletter,libraryagent,httpapi,releaseadapter/v071,
platform/postgres},make verify 15 项全绿。
6068 lines
189 KiB
YAML
6068 lines
189 KiB
YAML
{
|
||
"openapi": "3.1.0",
|
||
"info": {
|
||
"title": "Knowledge Governance API",
|
||
"version": "v1",
|
||
"description": "独立知识治理控制平面API。响应不返回来源凭据、内部目标连接或生产密钥。问答运营仅向已登录且获授权的管理员返回业务问答正文,禁止共享缓存。"
|
||
},
|
||
"servers": [
|
||
{
|
||
"url": "/",
|
||
"description": "当前治理控制平面"
|
||
}
|
||
],
|
||
"tags": [
|
||
{
|
||
"name": "Health"
|
||
},
|
||
{
|
||
"name": "Jobs"
|
||
},
|
||
{
|
||
"name": "Source catalog"
|
||
},
|
||
{
|
||
"name": "Monitoring"
|
||
},
|
||
{
|
||
"name": "Scope"
|
||
},
|
||
{
|
||
"name": "Source connections"
|
||
},
|
||
{
|
||
"name": "Review"
|
||
},
|
||
{
|
||
"name": "Release"
|
||
},
|
||
{
|
||
"name": "Test processing"
|
||
},
|
||
{
|
||
"name": "Settings"
|
||
}
|
||
],
|
||
"paths": {
|
||
"/api/v1/qa-ops/master/field-options": {"get":{"operationId":"getQAMasterFieldOptions","tags":["QA operations"],"summary":"只读主表五字段的正式可选范围,与模型共享同一分类字典;不返回业务问答","parameters":[],"responses":{"200":{"$ref":"#/components/responses/Envelope"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"需要登录"},"403":{"description":"仅管理员且写入须同源操作意图"},"409":{"description":"版本、输入或nonce冲突,未覆盖现有数据"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"description":"独立治理存储不可用,不将失败伪装为已保存"}}}},
|
||
"/api/v1/qa-ops/master/records/{id}/fields": {"post":{"operationId":"patchQAMasterFields","tags":["QA operations"],"summary":"只更新明确选择的字段并留幂等审计;不改原始正文、其他空白、旧复核或冻结证据。未覆盖的是否正确固定为待确认,拒绝是或否;已覆盖点踩固定为否。quality.correctness_rule=coverage-correctness-v1标记覆盖/正确性固定投影,原字段和复核证据保留","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Governance-Action","in":"header","required":true,"schema":{"const":"qa-master-fields"}}],"responses":{"200":{"$ref":"#/components/responses/Envelope"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"需要登录"},"403":{"description":"仅管理员且写入须同源操作意图"},"409":{"description":"版本、输入或nonce冲突,未覆盖现有数据"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"description":"独立治理存储不可用,不将失败伪装为已保存"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["input_hash","input_epoch","base_revision","base_review_revision","nonce","fields"],"properties":{"input_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"input_epoch":{"type":"integer","minimum":1},"base_revision":{"type":"integer","minimum":0},"base_review_revision":{"type":"integer","minimum":0},"nonce":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{15,127}$"},"fields":{"type":"object","additionalProperties":false,"minProperties":1,"maxProperties":5,"properties":{"is_correct":{"type":"string","enum":["是","否","待确认"]},"product_category":{"type":"string","enum":["CR/CRA/H/AP","CRV","CR配件","Nova及系列","Nova配件","MG400","MG400配件","M1 Pro","VX500","新示教器","DobotStudio Pro","仿真软件","维护工具","教育所有产品","人形机器人","四六足机器人","X-Trainer","码垛解决方案","码垛插件","焊接解决方案","焊接插件","移动复合机器人","生态插件","生态合作","安全皮肤","未知"]},"problem_type":{"type":"string","enum":["参数","故障","使用配置","二次开发","资料获取","咨询","认证","案例","售后","培训与学习","其他"]},"root_cause":{"type":"string","enum":["知识缺失","检索不到","结果不清","答案生成错误","问题质量差","非知识范围","知识过期"]},"coverage":{"type":"string","enum":["是","否","否但不计入"]}}}}}}}}}},
|
||
"/api/v1/qa-ops/master/weekly-drafts/{week}": {"get":{"operationId":"getQAWeeklyDraft","tags":["QA operations"],"summary":"读取租户指定北京时间ISO周的持久草稿;不存在时revision=0且不创建记录","parameters":[{"name":"week","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]{4}-W[0-9]{2}$"}}],"responses":{"200":{"$ref":"#/components/responses/Envelope"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"需要登录"},"403":{"description":"仅管理员且写入须同源操作意图"},"409":{"description":"版本、输入或nonce冲突,未覆盖现有数据"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"description":"独立治理存储不可用,不将失败伪装为已保存"}}},"post":{"operationId":"saveQAWeeklyDraft","tags":["QA operations"],"summary":"防抖编辑保存:版本锁、逐版历史及同nonce重放;正文不会触发外发/归档","parameters":[{"name":"week","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]{4}-W[0-9]{2}$"}},{"name":"X-Governance-Action","in":"header","required":true,"schema":{"const":"qa-weekly-draft"}}],"responses":{"200":{"$ref":"#/components/responses/Envelope"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"需要登录"},"403":{"description":"仅管理员且写入须同源操作意图"},"409":{"description":"版本、输入或nonce冲突,未覆盖现有数据"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"description":"独立治理存储不可用,不将失败伪装为已保存"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["base_revision","nonce","markdown"],"properties":{"base_revision":{"type":"integer","minimum":0},"nonce":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{15,127}$"},"markdown":{"type":"string","maxLength":262144,"description":"UTF-8正文最多256KiB;允许空正文,保存草稿不等于发布"}}}}}}}},
|
||
"/api/v1/qa-ops/master/weekly-drafts/{week}/prefill": {"post":{"operationId":"prefillQAWeeklyDraft","tags":["QA operations"],"summary":"从同一正式总表截止和保存区域生成中英各六节草稿;优先匹配已上报/冻结历史指标,其余用当周实时指标;不编造FAQ调整或重点。须带当前草稿版本,防止覆盖旧编辑","parameters":[{"name":"week","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]{4}-W[0-9]{2}$"}},{"name":"X-Governance-Action","in":"header","required":true,"schema":{"const":"qa-weekly-draft"}}],"responses":{"200":{"$ref":"#/components/responses/Envelope"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"需要登录"},"403":{"description":"仅管理员且写入须同源操作意图"},"409":{"description":"版本、输入或nonce冲突,未覆盖现有数据"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"description":"独立治理存储不可用,不将失败伪装为已保存"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["base_revision","nonce"],"properties":{"base_revision":{"type":"integer","minimum":0},"nonce":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{15,127}$"}}}}}}}},
|
||
"/api/v1/qa-ops/master/weekly-mail/settings": {"get":{"operationId":"getQAWeeklyMailSettings","tags":["QA operations"],"summary":"读取周报自动发送设置:SMTP地址/端口/账号/发件人/收件人/发送星期与小时/是否启用;永不返回授权码,仅返回是否已保存","responses":{"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalError"},"200":{"$ref":"#/components/responses/Envelope"},"401":{"description":"需要登录"},"503":{"description":"邮件设置存储不可用"}}},"post":{"operationId":"saveQAWeeklyMailSettings","tags":["QA operations"],"summary":"管理员保存周报自动发送设置;授权码加密存储、留空表示保持不变、清除需显式标记;启用时必须已有服务器、发件人与至少一个合法收件人;基线版本不符返回409","parameters":[{"name":"X-Governance-Action","in":"header","required":true,"schema":{"const":"qa-weekly-mail"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["base_revision"],"properties":{"base_revision":{"type":"integer","minimum":0},"host":{"type":"string","maxLength":200},"port":{"type":"integer","minimum":1,"maximum":65535},"username":{"type":"string","maxLength":200},"password":{"type":"string","maxLength":400},"clear_password":{"type":"boolean"},"from":{"type":"string","maxLength":320},"recipients":{"type":"array","maxItems":50,"items":{"type":"string","maxLength":320}},"cc_recipients":{"type":"array","maxItems":50,"items":{"type":"string","maxLength":320}},"review_address":{"type":"string","maxLength":320},"weekday":{"type":"integer","minimum":1,"maximum":7},"hour":{"type":"integer","minimum":0,"maximum":23},"enabled":{"type":"boolean"}}}}}},"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalError"},"200":{"$ref":"#/components/responses/Envelope"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"需要登录"},"403":{"description":"仅管理员可修改发送设置"},"409":{"description":"发送设置已被其他管理员修改"},"503":{"description":"邮件设置存储不可用,未标记为已发送"}}}},
|
||
"/api/v1/qa-ops/master/weekly-mail/confirmations/{week}": {"get":{"operationId":"getQAWeeklyMailConfirmation","tags":["QA operations"],"summary":"读取该周是否已确认自动发送;current=false表示确认后正文已被修改,需要重新确认","parameters":[{"name":"week","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]{4}-W[0-9]{2}$"}}],"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalError"},"200":{"$ref":"#/components/responses/Envelope"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"需要登录"},"403":{"description":"仅管理员可修改发送设置"},"409":{"description":"发送设置已被其他管理员修改"},"503":{"description":"邮件设置存储不可用,未标记为已发送"}}},"post":{"operationId":"confirmQAWeeklyMail","tags":["QA operations"],"summary":"确认本周周报可自动发送,绑定当前草稿版本与正文哈希;后续改动使确认失效,不发送改动后的正文","parameters":[{"name":"week","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]{4}-W[0-9]{2}$"}},{"name":"X-Governance-Action","in":"header","required":true,"schema":{"const":"qa-weekly-mail"}}],"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalError"},"200":{"$ref":"#/components/responses/Envelope"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"需要登录"},"403":{"description":"仅管理员可修改发送设置"},"409":{"description":"发送设置已被其他管理员修改"},"503":{"description":"邮件设置存储不可用,未标记为已发送"}}},"delete":{"operationId":"unconfirmQAWeeklyMail","tags":["QA operations"],"summary":"取消该周的自动发送确认","parameters":[{"name":"week","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]{4}-W[0-9]{2}$"}},{"name":"X-Governance-Action","in":"header","required":true,"schema":{"const":"qa-weekly-mail"}}],"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalError"},"200":{"$ref":"#/components/responses/Envelope"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"需要登录"},"403":{"description":"仅管理员可修改发送设置"},"409":{"description":"发送设置已被其他管理员修改"},"503":{"description":"邮件设置存储不可用,未标记为已发送"}}}},
|
||
"/api/v1/qa-ops/master/weekly-mail/sends": {"get":{"operationId":"listQAWeeklyMailSends","tags":["QA operations"],"summary":"读取周报邮件发送记录:周次、草稿版本、发送中/已发送/失败及错误摘要,不返回正文或收件人","parameters":[{"name":"week","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9]{4}-W[0-9]{2}$"}}],"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalError"},"200":{"$ref":"#/components/responses/Envelope"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"需要登录"},"403":{"description":"仅管理员可修改发送设置"},"409":{"description":"发送设置已被其他管理员修改"},"503":{"description":"邮件设置存储不可用,未标记为已发送"}}}},
|
||
"/api/v1/qa-ops/master/weekly-mail/test": {"post":{"operationId":"sendQAWeeklyMailTest","tags":["QA operations"],"summary":"管理员用当前已保存的邮件设置立即发送一封测试邮件,正文取该周已保存草稿;不写入发送记录、不改变确认状态、不把该周标记为已发送","parameters":[{"name":"X-Governance-Action","in":"header","required":true,"schema":{"const":"qa-weekly-mail"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["week"],"properties":{"week":{"type":"string","pattern":"^[0-9]{4}-W[0-9]{2}$"}}}}}},"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalError"},"200":{"$ref":"#/components/responses/Envelope"},"401":{"description":"需要登录"},"403":{"description":"仅管理员可测试发送"},"502":{"description":"SMTP 拒绝或不可达,返回脱敏原因"},"503":{"description":"邮件设置存储不可用"}}}},
|
||
"/api/v1/qa-ops/master/weekly-mail/confirmations/{week}/image": {"post":{"operationId":"saveQAWeeklyMailImage","tags":["QA operations"],"summary":"管理员保存该周确认对应的统计看板 PNG;发送时作为内嵌图片(cid)放在正文末尾,正文改动使确认失效后不再使用旧图","parameters":[{"name":"week","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]{4}-W[0-9]{2}$"}},{"name":"X-Governance-Action","in":"header","required":true,"schema":{"const":"qa-weekly-mail"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["png_base64"],"properties":{"png_base64":{"type":"string","maxLength":12000000}}}}}},"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalError"},"200":{"$ref":"#/components/responses/Envelope"},"401":{"description":"需要登录"},"403":{"description":"仅管理员可上传"},"429":{"description":"请求过快"},"503":{"description":"邮件设置存储不可用"}}}},
|
||
"/api/v1/qa-ops/departments/statistics": {
|
||
"post": {
|
||
"operationId": "qaDepartmentStatistics",
|
||
"summary": "部门与直属人员树访问统计,当前通讯录整支人员去重",
|
||
"description": "仅独立治理总表,不读取生产或更改原问答;后台单聚合并发,响应202或60秒缓存结果。当前目录和区域配置版本加入缓存键;父行包含自身及全部后代,人员按当前稳定身份去重,调岗归当前部门;零分母比例为null,最近提问时间来自真实事件。返回people完整去重名册,字段仅key/name/department_ids/visits/last_asked_at,key为与月明细一致的person-加SHA256目录行键,不输出staff/union原始身份;department_ids只含直接关联且去重的部门,兼属N取其不同部门总数,不把祖先继承计为兼属。零使用人员保留,未关联部门人员明确保留;同名不同身份不合并。人员在多个直属部门出现不改变分支去重汇总。访问指已入总表的提问事件,不含未记录的网页浏览。管理员同源只读POST,操作头qa-department-statistics。 统计范围all/month/week;week使用YYYY-Www的合法ISO自然周,按北京时间周一至次周一不含结束,当前周截到当前,禁止未来周或混用month/week。",
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"period"
|
||
],
|
||
"properties": {
|
||
"period": {
|
||
"type": "string",
|
||
"enum": [
|
||
"all",
|
||
"month",
|
||
"week"
|
||
]
|
||
},
|
||
"month": {
|
||
"type": "string",
|
||
"pattern": "^[0-9]{4}-[0-9]{2}$"
|
||
},
|
||
"week": {
|
||
"type": "string",
|
||
"pattern": "^[0-9]{4}-W[0-9]{2}$"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"401": {
|
||
"description": "需要登录"
|
||
},
|
||
"403": {
|
||
"description": "仅管理员同源读取"
|
||
},
|
||
"409": {
|
||
"description": "质量输入指纹变化,拒绝混合数据"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"503": {
|
||
"description": "本地副本或一致性投影不可用,不返回伪零"
|
||
},
|
||
"202": {
|
||
"description": "后台聚合中;同条件合并单次执行,请按Retry-After轮询,不返回虚构零数据"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/qa-ops/ai/settings": {"get": {"operationId": "getQAAISettings", "tags": ["QA operations"], "summary": "读取独立模型配置的安全状态,不返回密钥", "description": "管理员会话限定、固定治理租户、禁止共享缓存;不修改DobotAI源数据库。", "responses": {"200": {"description": "成功;返回实际持久化状态,不将进度100%当成全成功", "content": {"application/json": {"schema": {"type": "object", "additionalProperties": false, "properties": {"data": {"$ref": "#/components/schemas/QAAISafeSettings"}}, "required": ["data"]}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"description": "需要登录"}, "403": {"description": "仅管理员;写操作要求同源与明确意图"}, "409": {"description": "版本、范围或操作收据冲突,未覆盖现有结论"}, "422": {"description": "供应商明确拒绝或结构不合格,不伪造结果"}, "500": {"$ref": "#/components/responses/InternalError"}, "503": {"description": "存储、密钥或执行配置不可用;不返回伪零"}}}, "post": {"operationId": "saveQAAISettings", "tags": ["QA operations"], "summary": "验证并加密保存独立模型配置;不启动历史或自动任务", "description": "管理员会话限定、固定治理租户、禁止共享缓存;不修改DobotAI源数据库。", "responses": {"200": {"description": "成功;返回实际持久化状态,不将进度100%当成全成功", "content": {"application/json": {"schema": {"type": "object", "additionalProperties": false, "properties": {"data": {"$ref": "#/components/schemas/QAAISafeSettings"}}, "required": ["data"]}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"description": "需要登录"}, "403": {"description": "仅管理员;写操作要求同源与明确意图"}, "409": {"description": "版本、范围或操作收据冲突,未覆盖现有结论"}, "422": {"description": "供应商明确拒绝或结构不合格,不伪造结果"}, "500": {"$ref": "#/components/responses/InternalError"}, "503": {"description": "存储、密钥或执行配置不可用;不返回伪零"}}, "parameters": [{"name": "X-Governance-Action", "in": "header", "required": true, "schema": {"const": "qa-ai"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/QAAISaveSettings"}}}}}},
|
||
"/api/v1/qa-ops/ai/settings/test": {"post": {"operationId": "testQAAISettings", "tags": ["QA operations"], "summary": "发送最小非公司数据真实模型探测;不保存配置", "description": "管理员会话限定、固定治理租户、禁止共享缓存;不修改DobotAI源数据库。", "responses": {"200": {"description": "成功;返回实际持久化状态,不将进度100%当成全成功", "content": {"application/json": {"schema": {"type": "object", "additionalProperties": false, "properties": {"data": {"$ref": "#/components/schemas/QAAISafeSettings"}}, "required": ["data"]}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"description": "需要登录"}, "403": {"description": "仅管理员;写操作要求同源与明确意图"}, "409": {"description": "版本、范围或操作收据冲突,未覆盖现有结论"}, "422": {"description": "供应商明确拒绝或结构不合格,不伪造结果"}, "500": {"$ref": "#/components/responses/InternalError"}, "503": {"description": "存储、密钥或执行配置不可用;不返回伪零"}}, "parameters": [{"name": "X-Governance-Action", "in": "header", "required": true, "schema": {"const": "qa-ai"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/QAAISaveSettings"}}}}}},
|
||
"/api/v1/qa-ops/ai/automation": {"post": {"operationId": "setQAAIAutomation", "tags": ["QA operations"], "summary": "按任务启停增量;首次排除历史,关闭停止新增与未开始任务", "description": "管理员会话限定、固定治理租户、禁止共享缓存;不修改DobotAI源数据库。", "responses": {"200": {"description": "成功;返回实际持久化状态,不将进度100%当成全成功", "content": {"application/json": {"schema": {"type": "object", "additionalProperties": false, "properties": {"data": {"$ref": "#/components/schemas/QAAISafeSettings"}}, "required": ["data"]}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"description": "需要登录"}, "403": {"description": "仅管理员;写操作要求同源与明确意图"}, "409": {"description": "版本、范围或操作收据冲突,未覆盖现有结论"}, "422": {"description": "供应商明确拒绝或结构不合格,不伪造结果"}, "500": {"$ref": "#/components/responses/InternalError"}, "503": {"description": "存储、密钥或执行配置不可用;不返回伪零"}}, "parameters": [{"name": "X-Governance-Action", "in": "header", "required": true, "schema": {"const": "qa-ai"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "additionalProperties": false, "properties": {"kind": {"type": "string", "enum": ["evaluation", "translation"]}, "enabled": {"type": "boolean"}}, "required": ["kind", "enabled"]}}}}}},
|
||
"/api/v1/qa-ops/ai/previews": {"post": {"operationId": "previewQAAIBatch", "tags": ["QA operations"], "summary": "锁定单条或已执行筛选的实际缺口范围;不调用模型", "description": "管理员会话限定、固定治理租户、禁止共享缓存;不修改DobotAI源数据库。", "responses": {"200": {"description": "成功;返回实际持久化状态,不将进度100%当成全成功", "content": {"application/json": {"schema": {"type": "object", "additionalProperties": false, "properties": {"data": {"$ref": "#/components/schemas/QAAIPreview"}}, "required": ["data"]}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"description": "需要登录"}, "403": {"description": "仅管理员;写操作要求同源与明确意图"}, "409": {"description": "版本、范围或操作收据冲突,未覆盖现有结论"}, "422": {"description": "供应商明确拒绝或结构不合格,不伪造结果"}, "500": {"$ref": "#/components/responses/InternalError"}, "503": {"description": "存储、密钥或执行配置不可用;不返回伪零"}}, "parameters": [{"name": "X-Governance-Action", "in": "header", "required": true, "schema": {"const": "qa-ai"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "additionalProperties": false, "properties": {"kind": {"type": "string", "enum": ["evaluation", "translation"]}, "ids": {"type": "array", "items": {"type": "string"}, "maxItems": 100000}, "start": {"type": "string", "format": "date-time"}, "end": {"type": "string", "format": "date-time"}, "keyword": {"type": "string", "maxLength": 200}}, "required": ["kind"]}}}}}},
|
||
"/api/v1/qa-ops/ai/batches": {"post": {"operationId": "startQAAIBatch", "tags": ["QA operations"], "summary": "按预览及nonce幂等创建后台批次;只补空白且分母固定", "description": "管理员会话限定、固定治理租户、禁止共享缓存;不修改DobotAI源数据库。", "responses": {"202": {"description": "成功;返回实际持久化状态,不将进度100%当成全成功", "content": {"application/json": {"schema": {"type": "object", "additionalProperties": false, "properties": {"data": {"$ref": "#/components/schemas/QAAIBatch"}}, "required": ["data"]}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"description": "需要登录"}, "403": {"description": "仅管理员;写操作要求同源与明确意图"}, "409": {"description": "版本、范围或操作收据冲突,未覆盖现有结论"}, "422": {"description": "供应商明确拒绝或结构不合格,不伪造结果"}, "500": {"$ref": "#/components/responses/InternalError"}, "503": {"description": "存储、密钥或执行配置不可用;不返回伪零"}}, "parameters": [{"name": "X-Governance-Action", "in": "header", "required": true, "schema": {"const": "qa-ai"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "additionalProperties": false, "properties": {"preview_id": {"type": "string"}, "nonce": {"type": "string", "minLength": 16, "maxLength": 128}}, "required": ["preview_id", "nonce"]}}}}}},
|
||
"/api/v1/qa-ops/ai/batches/{id}/actions": {"post": {"operationId": "manageQAAIBatch", "tags": ["QA operations"], "summary": "持久暂停、恢复或仅重试失败项;nonce须与Idempotency-Key相同", "description": "管理员会话限定、固定治理租户、禁止共享缓存;不修改DobotAI源数据库。", "responses": {"200": {"description": "成功;返回实际持久化状态,不将进度100%当成全成功", "content": {"application/json": {"schema": {"type": "object", "additionalProperties": false, "properties": {"data": {"$ref": "#/components/schemas/QAAIBatch"}}, "required": ["data"]}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"description": "需要登录"}, "403": {"description": "仅管理员;写操作要求同源与明确意图"}, "409": {"description": "版本、范围或操作收据冲突,未覆盖现有结论"}, "422": {"description": "供应商明确拒绝或结构不合格,不伪造结果"}, "500": {"$ref": "#/components/responses/InternalError"}, "503": {"description": "存储、密钥或执行配置不可用;不返回伪零"}}, "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "X-Governance-Action", "in": "header", "required": true, "schema": {"const": "qa-ai"}}, {"$ref": "#/components/parameters/IdempotencyKey"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "additionalProperties": false, "properties": {"action": {"enum": ["pause", "resume", "retry"]}, "nonce": {"type": "string", "minLength": 16, "maxLength": 128}}, "required": ["action", "nonce"]}}}}}},
|
||
"/api/v1/qa-ops/ai/status": {"get": {"operationId": "getQAAIStatus", "tags": ["QA operations"], "summary": "读取真实队列、最近10批、最近1000条任务及是否截断", "description": "管理员会话限定、固定治理租户、禁止共享缓存;不修改DobotAI源数据库。", "responses": {"200": {"description": "成功;返回实际持久化状态,不将进度100%当成全成功", "content": {"application/json": {"schema": {"type": "object", "additionalProperties": false, "properties": {"data": {"$ref": "#/components/schemas/QAAIStatus"}}, "required": ["data"]}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"description": "需要登录"}, "403": {"description": "仅管理员;写操作要求同源与明确意图"}, "409": {"description": "版本、范围或操作收据冲突,未覆盖现有结论"}, "422": {"description": "供应商明确拒绝或结构不合格,不伪造结果"}, "500": {"$ref": "#/components/responses/InternalError"}, "503": {"description": "存储、密钥或执行配置不可用;不返回伪零"}}}},
|
||
"/api/v1/qa-ops/ai/records/{id}": {"get": {"operationId": "getQAAIRecordEvidence", "tags": ["QA operations"], "summary": "读取最多50条逐字段依据、真实模型与版本和回填/跳过原因", "description": "管理员会话限定、固定治理租户、禁止共享缓存;不修改DobotAI源数据库。", "responses": {"200": {"description": "成功;返回实际持久化状态,不将进度100%当成全成功", "content": {"application/json": {"schema": {"type": "object", "additionalProperties": false, "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/QAAIEvidence"}, "maxItems": 50}}, "required": ["data"]}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"description": "需要登录"}, "403": {"description": "仅管理员;写操作要求同源与明确意图"}, "409": {"description": "版本、范围或操作收据冲突,未覆盖现有结论"}, "422": {"description": "供应商明确拒绝或结构不合格,不伪造结果"}, "500": {"$ref": "#/components/responses/InternalError"}, "503": {"description": "存储、密钥或执行配置不可用;不返回伪零"}}, "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}]}},
|
||
"/api/v1/qa-ops/organization/sync": {
|
||
"get": {"tags":["QA operations"],"operationId":"getQAOrganizationSync","summary":"管理员读取通讯录同步执行器状态及最近任务的安全汇总,不返回人员名单或运行配置","responses":{"200":{"$ref":"#/components/responses/Envelope"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"需要登录"},"403":{"description":"仅管理员"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"description":"状态存储不可用,不伪装为空记录"}}},
|
||
"post": {"tags":["QA operations"],"operationId":"startQAOrganizationSync","summary":"管理员同源发起持久化通讯录同步;重复请求重放同一任务,进行中任务合并;失败保留现有快照","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"name":"X-Governance-Action","in":"header","required":true,"schema":{"const":"qa-organization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false}}}},"responses":{"202":{"$ref":"#/components/responses/OperationEnvelope"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"需要登录"},"403":{"description":"仅管理员同源操作"},"409":{"description":"操作标识与原请求冲突"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"description":"同步未接线、执行器离线或入队失败;未创建新任务"}}}
|
||
},
|
||
"/api/v1/qa-ops/dashboard": {"post":{"operationId":"readQAOperationsDashboard","tags":["QA operations"],"summary":"管理员只读正式总表一致性看板:累计数量、自然月质量及区域统计;跨月周展示上月月报","description":"同一只读可重复读事务读取独立正式总表有效字段、质量及组织版本。不访问源端,不冻结或写入指标;区域分母为当前配置通讯录去重人数而非在职/绩效名单。冻结记录按保存的原始标量分子分母及问题文字支持字面关键词筛选,不用当前评估回填历史。reported_weeks 独立返回用户提供的历史百分比(QAReportedHistoricalRate),没有分子分母或冻结时间;只含所选截止前已结束周,关键词非空时为空,原冻结记录与当前指标保持不变。cumulative_weeks 独立返回2026WK40–WK43的master_live_cumulative_v1实时累计曲线,policy_version为weekly-strict-yes-over-yes-no-v1:各周成员为整张总表中提问时间早于北京时间下周一的记录,当前周截止min(查询end,事务当前时点),不被查询start截断;字段取当前有效结论,补值和后续点踩会追溯更新相关累计周。覆盖率与正确率分别按是÷(是+否),待确认/部分覆盖及其他值不入严格分母,零分母percent=null;各点保留成员数、两组分子分母、周边界、实际截止和计算时点。仅查询治理本地总表,不写历史上报/冻结证据。新增 quality_period(统计月、月初、实际截止、计算时点及规则)和 monthly_quality(该月内成员数、独立覆盖及正确率分子分母);以所选周周一所在月为质量归属月,跨月周截止该月下月1日,非跨月周截止查询end,均不超过事务当前时点。calendar_months 返回从首个总表数据月起逐自然月独立计算的月点,policy_version=calendar-month-strict-yes-over-yes-no-v2(无法判定不计为错误:根因为“结果不清”或未归因的判错记录移出正确率分母,并以 unjudged 单独返回,覆盖率口径不变),source=master_live_calendar_month_v1;每月重置,使用当前有效字段,待确认等排除,零分母null,空月保留,最后点与仪表使用相同截止。旧 reported_weeks、frozen_weeks、cumulative_weeks 保留但不混画到月轴;不平均旧周百分比。网页30秒顺序刷新,已闭查询周不推进到后周。 可选filters对象传递与列表相同的五项字段精确筛选;统计只使用匹配当前有效标签的记录,无明细的上报/冻结历史在字段筛选下不挪用。","parameters":[{"name":"X-Governance-Action","in":"header","required":true,"schema":{"const":"qa-dashboard"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["start","end"],"properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"keyword":{"type":"string","maxLength":200},"filters":{"type":"object","additionalProperties":false,"properties":{"coverage":{"type":"string","maxLength":200},"is_correct":{"type":"string","maxLength":200},"product_category":{"type":"string","maxLength":200},"problem_type":{"type":"string","maxLength":200},"root_cause":{"type":"string","maxLength":200}}}}}}}},"responses":{"200":{"$ref":"#/components/responses/Envelope"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"需要登录"},"403":{"description":"仅管理员同源读取"},"409":{"description":"质量输入指纹变化,拒绝混合数据"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"description":"本地副本或一致性投影不可用,不返回伪零"}}}},
|
||
"/api/v1/qa-ops/organization": {
|
||
"get": {
|
||
"tags": ["QA operations"],
|
||
"operationId": "getQAOrganization",
|
||
"summary": "管理员读取服务器固定租户的完整部门路径、已保存区域归属与快照时间,不返回人员名单",
|
||
"responses": {
|
||
"200": {"$ref": "#/components/responses/Envelope"},
|
||
"400": {"$ref": "#/components/responses/BadRequest"},
|
||
"401": {"description": "需要登录"},
|
||
"403": {"description": "仅管理员可访问"},
|
||
"500": {"$ref": "#/components/responses/InternalError"},
|
||
"503": {"description": "治理侧组织存储不可用"}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/qa-ops/organization/preview": {
|
||
"post": {
|
||
"tags": ["QA operations"],
|
||
"operationId": "previewQAOrganizationRegions",
|
||
"summary": "预览当前通讯录版本下的父子部门区域归属和去重人数,不保存修改",
|
||
"parameters": [{"name":"X-Governance-Action","in":"header","required":true,"schema":{"const":"qa-organization"}}],
|
||
"requestBody": {"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["directory_id","base_revision","rules"],"properties":{"directory_id":{"type":"string"},"base_revision":{"type":"string"},"regions":{"type":"array","maxItems":100,"description":"可选业务区域目录;缺省沿用当前目录,空数组表示无区域;ID稳定不随名称改动。与rules同一版本原子预览/保存。","items":{"type":"object","additionalProperties":false,"required":["id","name"],"properties":{"id":{"type":"string","minLength":1,"maxLength":256},"name":{"type":"string","minLength":1,"maxLength":256}}}},"rules":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["department_id","region"],"properties":{"department_id":{"type":"string"},"region":{"type":"string","description":"目录中稳定的区域ID,不是固定四区枚举"}}}}}}}}},
|
||
"responses": {
|
||
"200": {"$ref": "#/components/responses/Envelope"},
|
||
"400": {"$ref": "#/components/responses/BadRequest"},
|
||
"401": {"description": "需要登录"},
|
||
"403": {"description": "仅管理员同源操作可访问"},
|
||
"409": {"description": "通讯录或配置版本已变化,需重新读取"},
|
||
"500": {"$ref": "#/components/responses/InternalError"},
|
||
"503": {"description": "治理侧组织存储不可用"}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/qa-ops/organization/regions": {
|
||
"put": {
|
||
"tags": ["QA operations"],
|
||
"operationId": "saveQAOrganizationRegions",
|
||
"summary": "保存版本化区域配置;操作人取管理员会话,不改变钉钉或DobotAI数据",
|
||
"parameters": [{"name":"X-Governance-Action","in":"header","required":true,"schema":{"const":"qa-organization"}}],
|
||
"requestBody": {"$ref":"#/paths/~1api~1v1~1qa-ops~1organization~1preview/post/requestBody"},
|
||
"responses": {
|
||
"200": {"$ref": "#/components/responses/Envelope"},
|
||
"400": {"$ref": "#/components/responses/BadRequest"},
|
||
"401": {"description": "需要登录"},
|
||
"403": {"description": "仅管理员同源操作可访问"},
|
||
"409": {"description": "版本冲突或尚无完整通讯录"},
|
||
"500": {"$ref": "#/components/responses/InternalError"},
|
||
"503": {"description": "治理侧组织存储不可用"}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/qa-ops/usage/people": {"post": {"tags": ["QA operations"], "operationId": "queryQAOperationsMonthlyPeople", "summary": "按北京时间自然月列出当前名册人员的2.0用量(含零记录),仅管理员,不返回原始员工标识,不作为在职/考核名单", "responses": {"200": {"$ref": "#/components/responses/Envelope"}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"description": "需要登录"}, "403": {"description": "仅管理员访问"}, "503": {"description": "独立只读源或治理组织存储不可用,不返回伪造的零值"}, "500": {"$ref": "#/components/responses/InternalError"}, "409": {"description": "完整名册缺失或目录/区域版本变化,请同步/重新查询,不返回伪零"}}, "description": "只读查询,不写治理库或生产库;姓名筛选置于 JSON 请求体,不进入 URL;整名册指标不随人员筛选变化。第2页起须带首页目录、区域版本及 end 截止。", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "additionalProperties": false, "required": ["month"], "properties": {"month": {"type": "string", "pattern": "^(?!0000)[0-9]{4}-(0[1-9]|1[0-2])$"}, "cutoff": {"type": "string", "format": "date-time"}, "region": {"type": "string", "description": "当前组织版本中的区域显示名称,或unassigned/cross_region;无效名称拒绝查询"}, "department_id": {"type": "string"}, "activity": {"type": "string", "enum": ["all", "used", "zero"]}, "search": {"type": "string", "maxLength": 100}, "page": {"type": "integer", "minimum": 1, "maximum": 100000, "default": 1}, "limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 30}, "directory_id": {"type": "string"}, "revision_id": {"type": "string"}}}}}}, "parameters": [{"name": "X-Governance-Action", "in": "header", "required": true, "schema": {"type": "string", "enum": ["qa-usage-read"]}}]}},
|
||
"/api/v1/qa-ops/usage": {"get": {"tags": ["QA operations"], "operationId": "getQAOperationsUsage", "summary": "完整筛选范围内按当前通讯录和区域版本回看2.0问答使用;固定租户、管理员访问,不输出绩效结论", "parameters": [{"name": "start", "in": "query", "required": true, "schema": {"type": "string", "format": "date-time"}}, {"name": "end", "in": "query", "required": true, "schema": {"type": "string", "format": "date-time"}}, {"name": "keyword", "in": "query", "schema": {"type": "string", "maxLength": 200}}], "responses": {"200": {"$ref": "#/components/responses/Envelope"}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"description": "需要登录"}, "403": {"description": "仅管理员访问"}, "503": {"description": "独立只读源或治理组织存储不可用,不返回伪造的零值"}, "500": {"$ref": "#/components/responses/InternalError"}}}},
|
||
"/api/v1/qa-ops/quality/query": {"post": {"operationId": "queryQAQualityCounts", "summary": "按完整筛选范围读取指纹/规则元数据并留档统计,最多5000条;summary.rates 返回 quality-rates-human-first-v1、原始分子/分母、百分比与分母构成。覆盖率=covered/(covered+uncovered+partial),正确率=covered_correct/(covered_correct+covered_incorrect);失效/不计入/相应待确认与未评估排除,零分母percent=null。原文仅在读取问答/复核时采集", "parameters": [{"name": "X-Governance-Action", "in": "header", "required": true, "schema": {"type": "string", "enum": ["qa-quality"]}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "additionalProperties": false, "properties": {"start": {"type": "string", "format": "date-time"}, "end": {"type": "string", "format": "date-time"}, "keyword": {"type": "string", "maxLength": 200}}, "required": ["start", "end"]}}}}, "tags": ["QA operations"], "responses": {"200": {"$ref": "#/components/responses/Envelope"}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"description": "需要登录"}, "403": {"description": "仅管理员访问"}, "503": {"description": "独立只读源或治理组织存储不可用,不返回伪造的零值"}, "500": {"$ref": "#/components/responses/InternalError"}, "409": {"description": "输入或复核版本变化/重复操作载荷不一致,未覆盖原结论"}, "404": {"description": "当前授权范围内未找到记录/历史输入"}}}},
|
||
"/api/v1/qa-ops/records/{id}/reviews": {"post": {"operationId": "saveQAQualityReview", "summary": "治理库追加人工复核,登录身份审计,源端只读,输入/复核乐观锁和nonce幂等;正确时根因为空,不计入须说明原因", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "X-Governance-Action", "in": "header", "required": true, "schema": {"type": "string", "enum": ["qa-quality"]}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "additionalProperties": false, "properties": {"input_hash": {"type": "string", "pattern": "^[a-f0-9]{64}$"}, "input_epoch": {"type": "integer", "minimum": 1}, "base_revision": {"type": "integer", "minimum": 0}, "nonce": {"type": "string", "pattern": "^[A-Za-z0-9_-]{16,128}$"}, "fields": {"type": "object", "additionalProperties": false, "properties": {"coverage": {"type": "string", "enum": ["covered", "uncovered", "partial", "pending", "excluded"]}, "correctness": {"type": "string", "enum": ["correct", "incorrect", "pending"]}, "product_category": {"type": "string", "maxLength": 128}, "problem_type": {"type": "string", "maxLength": 128}, "root_cause": {"type": "string", "maxLength": 2000}, "exclusion_reason": {"type": "string", "maxLength": 2000}}, "required": ["coverage", "correctness"]}, "reason": {"type": "string", "minLength": 1, "maxLength": 4000}}, "required": ["input_hash", "input_epoch", "base_revision", "nonce", "fields", "reason"]}}}}, "tags": ["QA operations"], "responses": {"200": {"$ref": "#/components/responses/Envelope"}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"description": "需要登录"}, "403": {"description": "仅管理员访问"}, "503": {"description": "独立只读源或治理组织存储不可用,不返回伪造的零值"}, "500": {"$ref": "#/components/responses/InternalError"}, "409": {"description": "输入或复核版本变化/重复操作载荷不一致,未覆盖原结论"}, "404": {"description": "当前授权范围内未找到记录/历史输入"}}}},
|
||
"/api/v1/qa-ops/records/{id}/quality/history": {"get": {"operationId": "listQAQualityHistory", "summary": "按当前固定租户查询不可变复检/人工历史,分别倒序分页,各20条", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "review_before", "in": "query", "schema": {"type": "integer", "minimum": 1}}, {"name": "check_before", "in": "query", "schema": {"type": "integer", "minimum": 1}}], "tags": ["QA operations"], "responses": {"200": {"$ref": "#/components/responses/Envelope"}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"description": "需要登录"}, "403": {"description": "仅管理员访问"}, "503": {"description": "独立只读源或治理组织存储不可用,不返回伪造的零值"}, "500": {"$ref": "#/components/responses/InternalError"}, "409": {"description": "输入或复核版本变化/重复操作载荷不一致,未覆盖原结论"}, "404": {"description": "当前授权范围内未找到记录/历史输入"}}}},
|
||
"/api/v1/qa-ops/records/{id}/quality/inputs/{epoch}": {"get": {"operationId": "getQAQualityInputSnapshot", "summary": "管理员读取已采集的历史质量输入快照,不另存人员关联/反馈字段;元数据留档但未采集原文返回409,不编造空快照", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "epoch", "in": "path", "required": true, "schema": {"type": "integer", "minimum": 1}}], "tags": ["QA operations"], "responses": {"200": {"$ref": "#/components/responses/Envelope"}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"description": "需要登录"}, "403": {"description": "仅管理员访问"}, "503": {"description": "独立只读源或治理组织存储不可用,不返回伪造的零值"}, "500": {"$ref": "#/components/responses/InternalError"}, "409": {"description": "该输入版本仅有指纹/规则元数据、原文未采集"}, "404": {"description": "当前授权范围内未找到记录/历史输入"}}}},
|
||
"/api/v1/qa-ops/sync": {
|
||
"get": {
|
||
"operationId": "getQALocalMirrorSync",
|
||
"summary": "读取本地问答副本与后台同步状态(只读本地,不探测生产)",
|
||
"responses": {
|
||
"200": {
|
||
"description": "本地副本状态、最近成功时间、5分钟计划与安全作业进度;无问答原文/人员标识"
|
||
},
|
||
"400": {
|
||
"description": "不接受查询参数"
|
||
},
|
||
"401": {
|
||
"description": "未登录"
|
||
},
|
||
"403": {
|
||
"description": "仅管理员"
|
||
},
|
||
"500": {
|
||
"description": "治理库不可用"
|
||
},
|
||
"503": {
|
||
"description": "本地同步未接线"
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"operationId": "enqueueQALocalMirrorSync",
|
||
"summary": "同源管理员请求后台问答同步,持久去重,不同步阻塞查询",
|
||
"parameters": [
|
||
{
|
||
"in": "header",
|
||
"name": "X-Governance-Action",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"qa-records-sync"
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"in": "header",
|
||
"name": "Idempotency-Key",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 128
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": false
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"202": {
|
||
"description": "已入队/重放/合并;须轮询状态,不代表同步成功"
|
||
},
|
||
"400": {
|
||
"description": "非法参数、null、未知字段或缺nonce"
|
||
},
|
||
"401": {
|
||
"description": "未登录"
|
||
},
|
||
"403": {
|
||
"description": "非管理员/跨站/缺操作意图"
|
||
},
|
||
"409": {
|
||
"description": "相同nonce的操作人/载荷冲突"
|
||
},
|
||
"500": {
|
||
"description": "治理库不可用"
|
||
},
|
||
"503": {
|
||
"description": "本地模式或执行器未接线;未创建任务"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/qa-ops/status": {
|
||
"get": {
|
||
"tags": ["QA operations"],
|
||
"operationId": "getQAOperationsStatus",
|
||
"summary": "读取独立问答只读数据源状态与安全告警,不返回连接信息;需要管理员会话",
|
||
"responses": {
|
||
"200": {"$ref": "#/components/responses/Envelope"},
|
||
"400": {"$ref": "#/components/responses/BadRequest"},
|
||
"401": {"description": "需要登录"},
|
||
"403": {"description": "未获员工问答查看授权"},
|
||
"500": {"$ref": "#/components/responses/InternalError"}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/qa-ops/master/records": {
|
||
"get": {
|
||
"tags": [
|
||
"QA operations"
|
||
],
|
||
"operationId": "listQAOperationsRecordsMaster",
|
||
"summary": "正式主表:按半开提问时间范围、原问题关键词、稳定游标列出问答;租户固定。通过持久来源关联读取本地镜像最新反馈,未覆盖固定有效是否正确为待确认,quality.correctness_rule=coverage-correctness-v1;非未覆盖点踩仍强制为否,quality.feedback_rule=downvote-is-incorrect-v1;原人工证据保留,点赞不推定正确。答案包含暂无已发布则未覆盖",
|
||
"parameters": [
|
||
{"name": "projection", "in": "query", "description": "summary返回400码点问题/答案预览及content_projection=summary,不带引用/媒体;full或不传保留完整内容供导出。", "schema": {"type": "string", "enum": ["summary", "full"]}},
|
||
{"name": "coverage", "in": "query", "description": "当前有效字段精确匹配;__empty__为未设置;五项AND组合。先在完整总表筛选再计数/分页,游标绑定筛选及数据版本。", "schema": {"type": "string", "maxLength": 200}},
|
||
{"name": "is_correct", "in": "query", "description": "当前有效字段精确匹配;__empty__为未设置;五项AND组合。先在完整总表筛选再计数/分页,游标绑定筛选及数据版本。", "schema": {"type": "string", "maxLength": 200}},
|
||
{"name": "product_category", "in": "query", "description": "当前有效字段精确匹配;__empty__为未设置;五项AND组合。先在完整总表筛选再计数/分页,游标绑定筛选及数据版本。", "schema": {"type": "string", "maxLength": 200}},
|
||
{"name": "problem_type", "in": "query", "description": "当前有效字段精确匹配;__empty__为未设置;五项AND组合。先在完整总表筛选再计数/分页,游标绑定筛选及数据版本。", "schema": {"type": "string", "maxLength": 200}},
|
||
{"name": "root_cause", "in": "query", "description": "当前有效字段精确匹配;__empty__为未设置;五项AND组合。先在完整总表筛选再计数/分页,游标绑定筛选及数据版本。", "schema": {"type": "string", "maxLength": 200}},
|
||
{
|
||
"name": "start",
|
||
"in": "query",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"format": "date-time"
|
||
}
|
||
},
|
||
{
|
||
"name": "end",
|
||
"in": "query",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"format": "date-time"
|
||
}
|
||
},
|
||
{
|
||
"name": "keyword",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "string",
|
||
"maxLength": 200
|
||
}
|
||
},
|
||
{
|
||
"name": "cursor",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "string",
|
||
"maxLength": 2048
|
||
}
|
||
},
|
||
{
|
||
"name": "limit",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "integer",
|
||
"minimum": 1,
|
||
"maximum": 100,
|
||
"default": 20
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"401": {
|
||
"description": "需要登录"
|
||
},
|
||
"403": {
|
||
"description": "未获员工问答查看授权"
|
||
},
|
||
"503": {
|
||
"description": "源库未接入、不可用或权限护栏阻断,不返回空列表伪装成功"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
},
|
||
"description": "仅读治理正式主表,不回退源库;评估/复核采用独立主表命名空间,不被2.0同步覆盖。历史Excel原标注保留,不冒充新AI评估。"
|
||
}
|
||
},
|
||
"/api/v1/qa-ops/master/records/{id}": {
|
||
"get": {
|
||
"tags": [
|
||
"QA operations"
|
||
],
|
||
"operationId": "getQAOperationsRecordMaster",
|
||
"summary": "正式主表:读取授权租户内的完整问答与最新本地反馈;未覆盖固定有效是否正确为待确认,quality.correctness_rule=coverage-correctness-v1;非未覆盖点踩仍强制为否,quality.feedback_rule=downvote-is-incorrect-v1;原人工证据不改写,治理规则不写回源库",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"maxLength": 256
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"401": {
|
||
"description": "需要登录"
|
||
},
|
||
"403": {
|
||
"description": "未获员工问答查看授权"
|
||
},
|
||
"404": {
|
||
"description": "当前授权范围内不存在此问答"
|
||
},
|
||
"503": {
|
||
"description": "独立只读源不可用或权限校验阻断"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
},
|
||
"description": "仅读治理正式主表,不回退源库;评估/复核采用独立主表命名空间,不被2.0同步覆盖。历史Excel原标注保留,不冒充新AI评估。"
|
||
}
|
||
},
|
||
"/api/v1/qa-ops/master/quality/query": {
|
||
"post": {
|
||
"operationId": "queryQAQualityCountsMaster",
|
||
"summary": "正式主表:按完整筛选范围读取指纹/规则元数据并留档统计,最多5000条;summary.rates 返回 quality-rates-human-first-v1、原始分子/分母、百分比与分母构成。覆盖率=covered/(covered+uncovered+partial),正确率=covered_correct/(covered_correct+covered_incorrect);失效/不计入/相应待确认与未评估排除,零分母percent=null。原文仅在读取问答/复核时采集",
|
||
"parameters": [
|
||
{
|
||
"name": "X-Governance-Action",
|
||
"in": "header",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"qa-quality"
|
||
]
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"properties": {
|
||
"start": {
|
||
"type": "string",
|
||
"format": "date-time"
|
||
},
|
||
"end": {
|
||
"type": "string",
|
||
"format": "date-time"
|
||
},
|
||
"keyword": {
|
||
"type": "string",
|
||
"maxLength": 200
|
||
}
|
||
},
|
||
"required": [
|
||
"start",
|
||
"end"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"tags": [
|
||
"QA operations"
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"401": {
|
||
"description": "需要登录"
|
||
},
|
||
"403": {
|
||
"description": "仅管理员访问"
|
||
},
|
||
"503": {
|
||
"description": "独立只读源或治理组织存储不可用,不返回伪造的零值"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"409": {
|
||
"description": "输入或复核版本变化/重复操作载荷不一致,未覆盖原结论"
|
||
},
|
||
"404": {
|
||
"description": "当前授权范围内未找到记录/历史输入"
|
||
}
|
||
},
|
||
"description": "仅读治理正式主表,不回退源库;评估/复核采用独立主表命名空间,不被2.0同步覆盖。历史Excel原标注保留,不冒充新AI评估。"
|
||
}
|
||
},
|
||
"/api/v1/qa-ops/master/records/{id}/reviews": {
|
||
"post": {
|
||
"operationId": "saveQAQualityReviewMaster",
|
||
"summary": "正式主表:治理库追加人工复核,登录身份审计,源端只读,输入/复核乐观锁和nonce幂等;正确时根因为空,不计入须说明原因",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"name": "X-Governance-Action",
|
||
"in": "header",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"qa-quality"
|
||
]
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"properties": {
|
||
"input_hash": {
|
||
"type": "string",
|
||
"pattern": "^[a-f0-9]{64}$"
|
||
},
|
||
"input_epoch": {
|
||
"type": "integer",
|
||
"minimum": 1
|
||
},
|
||
"base_revision": {
|
||
"type": "integer",
|
||
"minimum": 0
|
||
},
|
||
"nonce": {
|
||
"type": "string",
|
||
"pattern": "^[A-Za-z0-9_-]{16,128}$"
|
||
},
|
||
"fields": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"properties": {
|
||
"coverage": {
|
||
"type": "string",
|
||
"enum": [
|
||
"covered",
|
||
"uncovered",
|
||
"partial",
|
||
"pending",
|
||
"excluded"
|
||
]
|
||
},
|
||
"correctness": {
|
||
"type": "string",
|
||
"enum": [
|
||
"correct",
|
||
"incorrect",
|
||
"pending"
|
||
]
|
||
},
|
||
"product_category": {
|
||
"type": "string",
|
||
"maxLength": 128
|
||
},
|
||
"problem_type": {
|
||
"type": "string",
|
||
"maxLength": 128
|
||
},
|
||
"root_cause": {
|
||
"type": "string",
|
||
"maxLength": 2000
|
||
},
|
||
"exclusion_reason": {
|
||
"type": "string",
|
||
"maxLength": 2000
|
||
}
|
||
},
|
||
"required": [
|
||
"coverage",
|
||
"correctness"
|
||
]
|
||
},
|
||
"reason": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 4000
|
||
}
|
||
},
|
||
"required": [
|
||
"input_hash",
|
||
"input_epoch",
|
||
"base_revision",
|
||
"nonce",
|
||
"fields",
|
||
"reason"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"tags": [
|
||
"QA operations"
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"401": {
|
||
"description": "需要登录"
|
||
},
|
||
"403": {
|
||
"description": "仅管理员访问"
|
||
},
|
||
"503": {
|
||
"description": "独立只读源或治理组织存储不可用,不返回伪造的零值"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"409": {
|
||
"description": "输入或复核版本变化/重复操作载荷不一致,未覆盖原结论"
|
||
},
|
||
"404": {
|
||
"description": "当前授权范围内未找到记录/历史输入"
|
||
}
|
||
},
|
||
"description": "仅读治理正式主表,不回退源库;评估/复核采用独立主表命名空间,不被2.0同步覆盖。历史Excel原标注保留,不冒充新AI评估。"
|
||
}
|
||
},
|
||
"/api/v1/qa-ops/master/records/{id}/quality/history": {
|
||
"get": {
|
||
"operationId": "listQAQualityHistoryMaster",
|
||
"summary": "正式主表:按当前固定租户查询不可变复检/人工历史,分别倒序分页,各20条",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"name": "review_before",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "integer",
|
||
"minimum": 1
|
||
}
|
||
},
|
||
{
|
||
"name": "check_before",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "integer",
|
||
"minimum": 1
|
||
}
|
||
}
|
||
],
|
||
"tags": [
|
||
"QA operations"
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"401": {
|
||
"description": "需要登录"
|
||
},
|
||
"403": {
|
||
"description": "仅管理员访问"
|
||
},
|
||
"503": {
|
||
"description": "独立只读源或治理组织存储不可用,不返回伪造的零值"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"409": {
|
||
"description": "输入或复核版本变化/重复操作载荷不一致,未覆盖原结论"
|
||
},
|
||
"404": {
|
||
"description": "当前授权范围内未找到记录/历史输入"
|
||
}
|
||
},
|
||
"description": "仅读治理正式主表,不回退源库;评估/复核采用独立主表命名空间,不被2.0同步覆盖。历史Excel原标注保留,不冒充新AI评估。"
|
||
}
|
||
},
|
||
"/api/v1/qa-ops/master/records/{id}/quality/inputs/{epoch}": {
|
||
"get": {
|
||
"operationId": "getQAQualityInputSnapshotMaster",
|
||
"summary": "正式主表:管理员读取已采集的历史质量输入快照,不另存人员关联/反馈字段;元数据留档但未采集原文返回409,不编造空快照",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"name": "epoch",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer",
|
||
"minimum": 1
|
||
}
|
||
}
|
||
],
|
||
"tags": [
|
||
"QA operations"
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"401": {
|
||
"description": "需要登录"
|
||
},
|
||
"403": {
|
||
"description": "仅管理员访问"
|
||
},
|
||
"503": {
|
||
"description": "独立只读源或治理组织存储不可用,不返回伪造的零值"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"409": {
|
||
"description": "该输入版本仅有指纹/规则元数据、原文未采集"
|
||
},
|
||
"404": {
|
||
"description": "当前授权范围内未找到记录/历史输入"
|
||
}
|
||
},
|
||
"description": "仅读治理正式主表,不回退源库;评估/复核采用独立主表命名空间,不被2.0同步覆盖。历史Excel原标注保留,不冒充新AI评估。"
|
||
}
|
||
},
|
||
"/api/v1/qa-ops/records": {
|
||
"get": {
|
||
"tags": ["QA operations"],
|
||
"operationId": "listQAOperationsRecords",
|
||
"summary": "按半开提问时间范围、原问题关键词、稳定游标列出钉钉问答;租户由后端固定;答案包含暂无已发布则治理侧未覆盖",
|
||
"parameters": [
|
||
{"name": "start", "in": "query", "required": true, "schema": {"type": "string", "format": "date-time"}},
|
||
{"name": "end", "in": "query", "required": true, "schema": {"type": "string", "format": "date-time"}},
|
||
{"name": "keyword", "in": "query", "schema": {"type": "string", "maxLength": 200}},
|
||
{"name": "cursor", "in": "query", "schema": {"type": "string", "maxLength": 2048}},
|
||
{"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 20}}
|
||
],
|
||
"responses": {
|
||
"200": {"$ref": "#/components/responses/Envelope"},
|
||
"400": {"$ref": "#/components/responses/BadRequest"},
|
||
"401": {"description": "需要登录"},
|
||
"403": {"description": "未获员工问答查看授权"},
|
||
"503": {"description": "源库未接入、不可用或权限护栏阻断,不返回空列表伪装成功"},
|
||
"500": {"$ref": "#/components/responses/InternalError"}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/qa-ops/records/{id}": {
|
||
"get": {
|
||
"tags": ["QA operations"],
|
||
"operationId": "getQAOperationsRecord",
|
||
"summary": "读取授权租户内的完整问答与源端覆盖对照;治理覆盖规则独立,不写回源库",
|
||
"parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string", "maxLength": 256}}],
|
||
"responses": {
|
||
"200": {"$ref": "#/components/responses/Envelope"},
|
||
"400": {"$ref": "#/components/responses/BadRequest"},
|
||
"401": {"description": "需要登录"},
|
||
"403": {"description": "未获员工问答查看授权"},
|
||
"404": {"description": "当前授权范围内不存在此问答"},
|
||
"503": {"description": "独立只读源不可用或权限校验阻断"},
|
||
"500": {"$ref": "#/components/responses/InternalError"}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/build-info": {
|
||
"get": {
|
||
"tags": [
|
||
"Runtime"
|
||
],
|
||
"operationId": "getBuildInfo",
|
||
"summary": "读取当前运行产物的构建身份(正式版本/构建类型/完整提交 SHA);拿不到注入就明确返回不可用",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/library/snapshots": {
|
||
"get": {
|
||
"tags": [
|
||
"Runtime"
|
||
],
|
||
"operationId": "listLibrarySnapshots",
|
||
"summary": "列出已封存的整库完整版本(只读;含分项数量/字节/摘要、跨版本去重内容字节与文件系统事实)",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/library/captures": {
|
||
"get": {
|
||
"tags": [
|
||
"Runtime"
|
||
],
|
||
"operationId": "listLibraryCaptures",
|
||
"summary": "列出最近的整库封存作业(读队列,不是归档;页面据此显示真实状态)",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"tags": [
|
||
"Runtime"
|
||
],
|
||
"operationId": "enqueueLibraryCapture",
|
||
"summary": "投递一次整库封存作业(需要工程师及以上;执行在主机侧 agent,容器没有 Docker/来源凭据)",
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"scope": {
|
||
"type": "string",
|
||
"enum": [
|
||
"internal",
|
||
"external"
|
||
]
|
||
},
|
||
"job": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"required": [
|
||
"scope"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"202": {
|
||
"description": "已入队封存作业(同一 scope+job 复用同一作业)"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"503": {
|
||
"description": "主机侧封存 agent 未接线"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/library/dead-letter-releases": {
|
||
"get": {
|
||
"tags": [
|
||
"Runtime"
|
||
],
|
||
"operationId": "listLibraryDeadLetterReleases",
|
||
"summary": "列出本实例的死信解除记录(只读审计视图;上游死信行保持原样)",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"503": {
|
||
"description": "实例身份未配置或解除存储不可用"
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"tags": [
|
||
"Runtime"
|
||
],
|
||
"operationId": "createLibraryDeadLetterRelease",
|
||
"summary": "按精确指纹记录一条死信解除(需要工程师及以上与 X-Governance-Action;不删除上游行,行变化即失效)",
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"dead_letter_id": {
|
||
"type": "integer"
|
||
},
|
||
"observation": {
|
||
"type": "object"
|
||
},
|
||
"observation_digest": {
|
||
"type": "string"
|
||
},
|
||
"replay": {
|
||
"type": "object",
|
||
"properties": {
|
||
"queue": {
|
||
"type": "string"
|
||
},
|
||
"task_id": {
|
||
"type": "string"
|
||
},
|
||
"at": {
|
||
"type": "string",
|
||
"format": "date-time"
|
||
},
|
||
"evidence": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"required": [
|
||
"queue",
|
||
"task_id",
|
||
"at"
|
||
]
|
||
},
|
||
"note": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"required": [
|
||
"dead_letter_id",
|
||
"observation",
|
||
"observation_digest",
|
||
"replay"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "解除记录已落库(或返回同一指纹的已存记录)"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"403": {
|
||
"description": "权限不足或缺少写意图头"
|
||
},
|
||
"409": {
|
||
"description": "解除被拒绝:指纹/结清/重放证据不满足"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"503": {
|
||
"description": "实例身份未配置或解除存储不可用"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/library/storage": {
|
||
"get": {
|
||
"tags": [
|
||
"Runtime"
|
||
],
|
||
"operationId": "getLibraryStorage",
|
||
"summary": "存储管理(只读):容量、保留策略、依赖保护与清理预览;自动清理关闭,不提供删除动作",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"503": {
|
||
"description": "归档未配置或不可读"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/library/overview": {
|
||
"get": {
|
||
"tags": [
|
||
"Runtime"
|
||
],
|
||
"operationId": "getLibraryOverview",
|
||
"summary": "整库状态:测试封存 / 生产生效 / 生产预备份三类版本分开返回,差异未接线时为 unknown,并给出启动同步的缺项",
|
||
"parameters": [
|
||
{
|
||
"name": "scope",
|
||
"in": "query",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"internal",
|
||
"external"
|
||
]
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"503": {
|
||
"description": "整库版本登记存储不可用"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/library/jobs": {
|
||
"get": {
|
||
"tags": [
|
||
"Runtime"
|
||
],
|
||
"operationId": "listLibraryJobs",
|
||
"summary": "列出该目标最近的整库作业(测试封存与生产同步分开,含阶段与结果;重启后仍可读)",
|
||
"parameters": [
|
||
{
|
||
"name": "scope",
|
||
"in": "query",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"internal",
|
||
"external"
|
||
]
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/library/jobs/{id}": {
|
||
"get": {
|
||
"tags": [
|
||
"Runtime"
|
||
],
|
||
"operationId": "getLibraryJob",
|
||
"summary": "读取单个整库作业的阶段、计数、错误与恢复说明",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"404": {
|
||
"description": "作业不存在"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/library/maintenance": {
|
||
"get": {
|
||
"tags": [
|
||
"Runtime"
|
||
],
|
||
"operationId": "getLibraryMaintenance",
|
||
"summary": "目标维护窗口状态:谁持有、处于哪个阶段、是否已释放",
|
||
"parameters": [
|
||
{
|
||
"name": "scope",
|
||
"in": "query",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"internal",
|
||
"external"
|
||
]
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "维护窗口状态(held=true 表示目标仍被占用)"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"503": {
|
||
"description": "维护窗口存储不可用"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/library/maintenance/recover": {
|
||
"post": {
|
||
"tags": [
|
||
"Runtime"
|
||
],
|
||
"operationId": "recoverLibraryMaintenance",
|
||
"summary": "按预备份恢复并逐类校验后收尾维护窗口(仅管理员;只建恢复作业,恢复在校验通过前不开放目标)",
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"required": [
|
||
"scope"
|
||
],
|
||
"properties": {
|
||
"scope": {
|
||
"type": "string",
|
||
"enum": [
|
||
"internal",
|
||
"external"
|
||
]
|
||
},
|
||
"window_job_id": {
|
||
"type": "string",
|
||
"description": "可选:必须与当前维护窗口的作业一致"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"202": {
|
||
"description": "已创建恢复作业并入队"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"409": {
|
||
"description": "没有未释放的维护窗口,或窗口属于别的 scope/作业"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"503": {
|
||
"description": "目标维护未接线或维护记录存储不可用"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/library/restores": {
|
||
"post": {
|
||
"tags": [
|
||
"Runtime"
|
||
],
|
||
"operationId": "startLibraryRestore",
|
||
"summary": "按指定整库版本恢复生产(仅管理员;需要针对该快照的恢复授权,闸口与恢复演练证据同样适用)",
|
||
"responses": {
|
||
"202": {
|
||
"description": "已创建恢复作业并入队"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"403": {
|
||
"description": "仅管理员可发起恢复"
|
||
},
|
||
"409": {
|
||
"description": "该目标已有在飞作业,或同一恢复请求参数冲突"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"503": {
|
||
"description": "闸口关闭、缺恢复演练证据或缺该快照的授权,返回具体原因"
|
||
}
|
||
},
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"scope",
|
||
"snapshot_id"
|
||
],
|
||
"properties": {
|
||
"scope": {
|
||
"type": "string",
|
||
"enum": [
|
||
"internal",
|
||
"external"
|
||
]
|
||
},
|
||
"snapshot_id": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/library/jobs/{id}/resume": {
|
||
"post": {
|
||
"tags": [
|
||
"Runtime"
|
||
],
|
||
"operationId": "resumeLibraryJob",
|
||
"summary": "续作失败或已取消的同步/恢复作业:按原参数重新排队,旧作业保留为审计记录",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"202": {
|
||
"description": "已创建续作作业"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"403": {
|
||
"description": "需要知识工程师及以上权限"
|
||
},
|
||
"404": {
|
||
"description": "作业不存在"
|
||
},
|
||
"409": {
|
||
"description": "作业状态不允许续作,或该目标已有在飞作业"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/library/authorizations": {
|
||
"get": {
|
||
"tags": [
|
||
"Runtime"
|
||
],
|
||
"operationId": "listLibraryAuthorizations",
|
||
"summary": "列出该目标的生产发布授权(含签发人、有效期与撤销状态)",
|
||
"parameters": [
|
||
{
|
||
"name": "scope",
|
||
"in": "query",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"internal",
|
||
"external"
|
||
]
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"tags": [
|
||
"Runtime"
|
||
],
|
||
"operationId": "createLibraryAuthorization",
|
||
"summary": "管理员签发生产发布授权:绑定目标+快照+参数摘要+有效期(5–1440 分钟),换快照或换参数即失效",
|
||
"responses": {
|
||
"201": {
|
||
"description": "已记录授权"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"403": {
|
||
"description": "仅管理员可签发"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"503": {
|
||
"description": "授权存储不可用"
|
||
}
|
||
},
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"scope",
|
||
"snapshot_id",
|
||
"expires_in_minutes"
|
||
],
|
||
"properties": {
|
||
"scope": {
|
||
"type": "string",
|
||
"enum": [
|
||
"internal",
|
||
"external"
|
||
]
|
||
},
|
||
"snapshot_id": {
|
||
"type": "string"
|
||
},
|
||
"expires_in_minutes": {
|
||
"type": "integer",
|
||
"minimum": 5,
|
||
"maximum": 1440
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/library/authorizations/{id}/revoke": {
|
||
"post": {
|
||
"tags": [
|
||
"Runtime"
|
||
],
|
||
"operationId": "revokeLibraryAuthorization",
|
||
"summary": "撤销一份生产发布授权(仅管理员);撤销后同一目标快照不能再启动同步",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"403": {
|
||
"description": "仅管理员可撤销"
|
||
},
|
||
"409": {
|
||
"description": "授权不存在或已撤销"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/library/syncs": {
|
||
"post": {
|
||
"tags": [
|
||
"Runtime"
|
||
],
|
||
"operationId": "startLibrarySync",
|
||
"summary": "启动生产同步:闸口、生产恢复演练证据、生产权威版本或本次预备份缺一即拒绝,且不创建作业",
|
||
"parameters": [
|
||
{
|
||
"name": "X-Governance-Action",
|
||
"in": "header",
|
||
"required": false,
|
||
"schema": {
|
||
"const": "library-sync"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"202": {
|
||
"description": "已创建同步作业(互斥与幂等由数据库唯一索引保证)"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"409": {
|
||
"description": "该目标已有在飞同步作业,或同一幂等键对应不同请求"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"503": {
|
||
"description": "闸口或证据未齐,返回具体缺项且不创建作业"
|
||
}
|
||
},
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"scope",
|
||
"target_snapshot_id"
|
||
],
|
||
"properties": {
|
||
"scope": {
|
||
"type": "string",
|
||
"enum": [
|
||
"internal",
|
||
"external"
|
||
]
|
||
},
|
||
"target_snapshot_id": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/library/snapshots/{id}": {
|
||
"get": {
|
||
"tags": [
|
||
"Runtime"
|
||
],
|
||
"operationId": "getLibrarySnapshot",
|
||
"summary": "读取单个已封存整库版本的分项与兼容契约(只读;不存在或校验失败返回 404)",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"404": {
|
||
"description": "快照不存在或归档校验失败"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/version-history": {
|
||
"get": {
|
||
"tags": [
|
||
"Runtime"
|
||
],
|
||
"operationId": "listVersionHistory",
|
||
"summary": "按快照游标分页列出远端 main 可达的提交、版本号证据与「当前运行」判据",
|
||
"parameters": [
|
||
{
|
||
"name": "kind",
|
||
"in": "query",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"all",
|
||
"release",
|
||
"development",
|
||
"historical"
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"name": "limit",
|
||
"in": "query",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer",
|
||
"minimum": 1,
|
||
"maximum": 100
|
||
}
|
||
},
|
||
{
|
||
"name": "cursor",
|
||
"in": "query",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"409": {
|
||
"description": "游标指向的记录快照已被清理,需要刷新后重新加载"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/version-history/sync": {
|
||
"post": {
|
||
"tags": [
|
||
"Runtime"
|
||
],
|
||
"operationId": "syncVersionHistory",
|
||
"summary": "手动同步一次版本记录(仅管理员;并发同步复用同一个作业)",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"202": {
|
||
"description": "已入队同步任务"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/backup-schedule": {
|
||
"get": {
|
||
"tags": [
|
||
"Settings"
|
||
],
|
||
"operationId": "getBackupSchedule",
|
||
"summary": "读取整库逻辑备份的定时计划(不探测主机)",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"503": {
|
||
"$ref": "#/components/responses/ServiceUnavailable"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"tags": [
|
||
"Settings"
|
||
],
|
||
"operationId": "saveBackupSchedule",
|
||
"summary": "保存整库逻辑备份的定时时间与储存天数,并下发到目标主机(管理员)",
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"503": {
|
||
"$ref": "#/components/responses/ServiceUnavailable"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/backup-schedule/host": {
|
||
"get": {
|
||
"tags": [
|
||
"Settings"
|
||
],
|
||
"operationId": "getBackupScheduleHost",
|
||
"summary": "读取目标主机上生效的 cron 计划与最近一次备份结果",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"503": {
|
||
"$ref": "#/components/responses/ServiceUnavailable"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/backup-schedule/apply": {
|
||
"post": {
|
||
"tags": [
|
||
"Settings"
|
||
],
|
||
"operationId": "applyBackupSchedule",
|
||
"summary": "把当前设置重新下发到目标主机(管理员)",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"503": {
|
||
"$ref": "#/components/responses/ServiceUnavailable"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/backup-schedule/run": {
|
||
"post": {
|
||
"tags": [
|
||
"Settings"
|
||
],
|
||
"operationId": "runBackupNow",
|
||
"summary": "在目标主机上立即执行一次整库备份(管理员,异步)",
|
||
"responses": {
|
||
"202": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"503": {
|
||
"$ref": "#/components/responses/ServiceUnavailable"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/health": {
|
||
"get": {
|
||
"tags": [
|
||
"Health"
|
||
],
|
||
"operationId": "getHealth",
|
||
"summary": "读取服务健康状态",
|
||
"responses": {
|
||
"200": {
|
||
"description": "服务可响应",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/Health"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/jobs": {
|
||
"get": {
|
||
"tags": [
|
||
"Jobs"
|
||
],
|
||
"operationId": "listJobs",
|
||
"summary": "列出最近治理任务",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/Limit"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"tags": [
|
||
"Jobs"
|
||
],
|
||
"operationId": "createJob",
|
||
"summary": "创建幂等后台任务",
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/JobCreateRequest"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/source-items": {
|
||
"get": {
|
||
"tags": [
|
||
"Source catalog"
|
||
],
|
||
"operationId": "listSourceItems",
|
||
"summary": "列出安全来源文件投影",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/State"
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/Limit"
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/Offset"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/source-catalog/available": {
|
||
"get": {
|
||
"tags": ["Source catalog"],
|
||
"operationId": "listAvailableSources",
|
||
"summary": "列出可加入的数据源(wiki 知识库 / drive 钉盘 / doc 在线文档表格 / pp 资料中心);四类同一形状,类型差异只体现在 content_type",
|
||
"parameters": [
|
||
{"name": "type", "in": "query", "required": true, "schema": {"type": "string", "enum": ["wiki", "drive", "doc", "pp"]}},
|
||
{"name": "q", "in": "query", "schema": {"type": "string", "maxLength": 120}},
|
||
{"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 200, "default": 50}}
|
||
],
|
||
"responses": {
|
||
"200": {"$ref": "#/components/responses/Envelope"},
|
||
"400": {"$ref": "#/components/responses/BadRequest"},
|
||
"401": {"description": "需要登录"},
|
||
"500": {"$ref": "#/components/responses/InternalError"},
|
||
"503": {"description": "dws 未登录或缺少读权限"}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/source-catalog/validate": {
|
||
"post": {
|
||
"tags": ["Source catalog"],
|
||
"operationId": "validateSourceSelection",
|
||
"summary": "添加前真读一次:文档/表格校验可读、知识库与钉盘校验账号仍可见;读不到返回 503/409,不让进入下一步",
|
||
"requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "additionalProperties": false, "required": ["type", "refs"], "properties": {"type": {"type": "string", "enum": ["wiki", "drive", "doc", "pp"]}, "refs": {"type": "array", "minItems": 1, "maxItems": 50, "items": {"type": "string", "maxLength": 512}}}}}}},
|
||
"responses": {
|
||
"200": {"$ref": "#/components/responses/Envelope"},
|
||
"400": {"$ref": "#/components/responses/BadRequest"},
|
||
"401": {"description": "需要登录"},
|
||
"409": {"description": "账号已看不到所选来源"},
|
||
"500": {"$ref": "#/components/responses/InternalError"},
|
||
"503": {"description": "dws 不可用或文档不可读"}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/source-catalog/sources": {
|
||
"get": {
|
||
"tags": [
|
||
"Source catalog"
|
||
],
|
||
"operationId": "listCatalogSources",
|
||
"summary": "列出当前可浏览来源快照",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/source-catalog/nodes": {
|
||
"get": {
|
||
"tags": [
|
||
"Source catalog"
|
||
],
|
||
"operationId": "listCatalogNodes",
|
||
"summary": "按父目录分页列出当前快照直接子项",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ConnectionID"
|
||
},
|
||
{
|
||
"name": "parent_id",
|
||
"in": "query",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"maxLength": 36
|
||
}
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/Limit"
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/Offset"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/source-catalog/change-sets/latest": {
|
||
"get": {
|
||
"tags": [
|
||
"Source catalog"
|
||
],
|
||
"operationId": "getLatestCatalogChangeSet",
|
||
"summary": "读取某来源最新持久ChangeSet",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ConnectionID"
|
||
},
|
||
{
|
||
"name": "action",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"add",
|
||
"update",
|
||
"move",
|
||
"move_scope",
|
||
"delete",
|
||
"no_change"
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/Limit"
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/Offset"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"404": {
|
||
"$ref": "#/components/responses/NotFound"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/source-catalog/routing-capabilities": {
|
||
"get": {
|
||
"tags": [
|
||
"Source catalog"
|
||
],
|
||
"operationId": "getCatalogRoutingCapabilities",
|
||
"summary": "读取对内和对外测试路由是否已配置",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/source-catalog/route": {
|
||
"post": {
|
||
"tags": [
|
||
"Source catalog"
|
||
],
|
||
"operationId": "setCatalogPolicy",
|
||
"summary": "写入目录或文件的期望处理策略",
|
||
"description": "当前接口只修改治理策略和审计记录,不代表已经上传、解析或发布。调用方必须为每次用户动作生成新的 Idempotency-Key;网络重试复用原键会返回原结果且 operation=replayed,同键不同请求返回409。",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/CatalogRouteRequest"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"202": {
|
||
"$ref": "#/components/responses/OperationEnvelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/source-catalog/sources/{id}/refresh": {
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
}
|
||
],
|
||
"post": {
|
||
"tags": [
|
||
"Source catalog"
|
||
],
|
||
"operationId": "refreshCatalogSource",
|
||
"summary": "创建来源目录刷新任务",
|
||
"description": "调用方必须为每次用户动作生成新的 Idempotency-Key;网络重试复用原键会返回同一刷新任务且 operation=replayed。",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
],
|
||
"responses": {
|
||
"202": {
|
||
"$ref": "#/components/responses/OperationEnvelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/monitor/overview": {
|
||
"get": {
|
||
"tags": [
|
||
"Monitoring"
|
||
],
|
||
"operationId": "getMonitorOverview",
|
||
"summary": "读取主机、服务和知识库处理概览",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/monitor/knowledge-bases/{id}/files": {
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
}
|
||
],
|
||
"get": {
|
||
"tags": [
|
||
"Monitoring"
|
||
],
|
||
"operationId": "listKnowledgeBaseFiles",
|
||
"summary": "按处理状态分页列出知识库文件",
|
||
"parameters": [
|
||
{
|
||
"name": "status",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"pending",
|
||
"processing",
|
||
"finalizing",
|
||
"completed",
|
||
"failed",
|
||
"cancelled"
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/Limit"
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/Offset"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/filename-filters": {
|
||
"get": {
|
||
"tags": [
|
||
"Source connections"
|
||
],
|
||
"operationId": "listFilenameFilters",
|
||
"summary": "列出来源和目录的文件扩展名筛选规则",
|
||
"parameters": [
|
||
{
|
||
"name": "connection_id",
|
||
"in": "query",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "筛选规则"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"tags": [
|
||
"Source connections"
|
||
],
|
||
"operationId": "setFilenameFilter",
|
||
"summary": "设置来源或目录文件扩展名筛选",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "筛选规则已生效"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"404": {
|
||
"$ref": "#/components/responses/NotFound"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"tags": [
|
||
"Source connections"
|
||
],
|
||
"operationId": "clearFilenameFilter",
|
||
"summary": "移除本级筛选并恢复继承",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "本级筛选已移除"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"404": {
|
||
"$ref": "#/components/responses/NotFound"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/scope-rules": {
|
||
"get": {
|
||
"tags": [
|
||
"Scope"
|
||
],
|
||
"operationId": "listScopeRules",
|
||
"summary": "读取来源范围规则",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ConnectionID"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"tags": [
|
||
"Scope"
|
||
],
|
||
"operationId": "setScopeRule",
|
||
"summary": "创建或更新范围规则",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/ScopeRuleMutation"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/OperationEnvelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"tags": [
|
||
"Scope"
|
||
],
|
||
"operationId": "clearScopeRule",
|
||
"summary": "清除范围规则",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/ScopeRuleMutation"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/OperationEnvelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/dingtalk-session": {
|
||
"post": {
|
||
"tags": [
|
||
"Source connections"
|
||
],
|
||
"operationId": "startDingtalkSession",
|
||
"summary": "发起钉钉扫码登录会话(管理员)",
|
||
"responses": {
|
||
"201": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/dingtalk-session/{id}": {
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
}
|
||
],
|
||
"get": {
|
||
"tags": [
|
||
"Source connections"
|
||
],
|
||
"operationId": "getDingtalkSession",
|
||
"summary": "轮询钉钉扫码会话状态(管理员)",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"tags": [
|
||
"Source connections"
|
||
],
|
||
"operationId": "cancelDingtalkSession",
|
||
"summary": "取消钉钉扫码会话(管理员)",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/dingtalk-spaces": {
|
||
"post": {
|
||
"tags": [
|
||
"Source connections"
|
||
],
|
||
"operationId": "registerDingtalkSpace",
|
||
"summary": "解析并登记钉钉知识库空间(管理员)",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/source-connections/audit": {
|
||
"get": {
|
||
"tags": ["Source connections"], "operationId": "listSourceConfigurationAudit",
|
||
"summary": "全部来源的配置操作审计(含已移除连接)",
|
||
"parameters": [{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":100}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}}],
|
||
"responses": {
|
||
"200":{"$ref":"#/components/responses/Envelope"},
|
||
"400":{"$ref":"#/components/responses/BadRequest"},
|
||
"401":{"$ref":"#/components/responses/Unauthorized"},
|
||
"403":{"$ref":"#/components/responses/Forbidden"},
|
||
"500":{"$ref":"#/components/responses/InternalError"},
|
||
"501":{"description":"审计读取器未配置"}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/source-connections": {
|
||
"get": {
|
||
"tags": [
|
||
"Source connections"
|
||
],
|
||
"operationId": "listSourceConnections",
|
||
"summary": "列出安全来源连接投影",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/source-connections/{id}/archive": {
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
}
|
||
],
|
||
"post": {
|
||
"operationId": "archiveSourceConnection",
|
||
"summary": "归档下架来源(去掉入口;不物理删除)",
|
||
"description": "把来源从数据源配置、来源与目录、计划刷新与手动扫描里摘掉:目录快照、发布记录与审计数据原样保留;恢复只需再次登记同一来源(钉钉空间登记是确定性 ID,原地复活同一行)。幂等:重复归档不改归档时间与归档人。仅管理员可写。",
|
||
"tags": [
|
||
"governance"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
},
|
||
{
|
||
"in": "header",
|
||
"name": "X-Governance-Action",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"source-archive"
|
||
]
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"403": {
|
||
"$ref": "#/components/responses/Forbidden"
|
||
},
|
||
"404": {
|
||
"$ref": "#/components/responses/NotFound"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"503": {
|
||
"$ref": "#/components/responses/ServiceUnavailable"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/source-connections/{id}/restore": {
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
}
|
||
],
|
||
"post": {
|
||
"operationId": "restoreSourceConnection",
|
||
"summary": "撤销来源归档(保持停用,调度不自动恢复)",
|
||
"description": "归档的反向操作:来源重新出现在列表里,但保持停用且不带调度,需要管理员再显式启用。幂等:未归档时视为成功;连接不存在返回 404。仅管理员可写。",
|
||
"tags": [
|
||
"governance"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
},
|
||
{
|
||
"in": "header",
|
||
"name": "X-Governance-Action",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"source-restore"
|
||
]
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"403": {
|
||
"$ref": "#/components/responses/Forbidden"
|
||
},
|
||
"404": {
|
||
"$ref": "#/components/responses/NotFound"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"503": {
|
||
"$ref": "#/components/responses/ServiceUnavailable"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/source-connections/{id}/scan": {
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
}
|
||
],
|
||
"post": {
|
||
"tags": [
|
||
"Source connections"
|
||
],
|
||
"operationId": "triggerSourceScan",
|
||
"summary": "创建旧PP来源扫描任务",
|
||
"responses": {
|
||
"202": {
|
||
"$ref": "#/components/responses/OperationEnvelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
},
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"/api/v1/source-connections/{id}/scans": {
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
}
|
||
],
|
||
"get": {
|
||
"tags": [
|
||
"Source connections"
|
||
],
|
||
"operationId": "listSourceScans",
|
||
"summary": "分页读取来源扫描记录",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/Limit"
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/Offset"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/source-connections/{id}/scans/{scan_id}": {
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
},
|
||
{
|
||
"name": "scan_id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"maxLength": 64
|
||
}
|
||
}
|
||
],
|
||
"get": {
|
||
"tags": [
|
||
"Source connections"
|
||
],
|
||
"operationId": "getSourceScan",
|
||
"summary": "读取单次扫描及其安全变更投影",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"404": {
|
||
"$ref": "#/components/responses/NotFound"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/review-candidates": {
|
||
"get": {
|
||
"tags": [
|
||
"Review"
|
||
],
|
||
"operationId": "listReviewCandidates",
|
||
"summary": "分页列出可审核测试知识",
|
||
"parameters": [
|
||
{
|
||
"name": "review_state",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"pending",
|
||
"approved",
|
||
"rejected",
|
||
"not_required"
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/Limit"
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/Offset"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/review-candidates/{id}/decision": {
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
}
|
||
],
|
||
"post": {
|
||
"tags": [
|
||
"Review"
|
||
],
|
||
"operationId": "reviewCandidate",
|
||
"summary": "提交人工审核决定",
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/ReviewDecisionRequest"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/OperationEnvelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
},
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"/api/v1/release-plan": {
|
||
"get": {
|
||
"tags": [
|
||
"Release"
|
||
],
|
||
"operationId": "getReleasePlan",
|
||
"summary": "预览当前测试到生产的发布计划",
|
||
"description": "当前是实时预览,不是不可变Release ChangeSet;R1会替换为持久发布ChangeSet。",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/release-batches": {
|
||
"get": {
|
||
"tags": [
|
||
"Release"
|
||
],
|
||
"operationId": "listReleaseBatches",
|
||
"summary": "分页列出草稿或已封存发布批次",
|
||
"parameters": [
|
||
{
|
||
"name": "state",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"draft",
|
||
"sealed",
|
||
"cancelled"
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/Limit"
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/Offset"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"tags": [
|
||
"Release"
|
||
],
|
||
"operationId": "createReleaseBatch",
|
||
"summary": "创建草稿发布批次",
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/ReleaseBatchCreateRequest"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"$ref": "#/components/responses/OperationEnvelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
},
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"/api/v1/release-batches/{id}": {
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
}
|
||
],
|
||
"get": {
|
||
"tags": [
|
||
"Release"
|
||
],
|
||
"operationId": "getReleaseBatch",
|
||
"summary": "读取发布批次详情",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"404": {
|
||
"$ref": "#/components/responses/NotFound"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/release-batches/{id}/seal": {
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
}
|
||
],
|
||
"post": {
|
||
"tags": [
|
||
"Release"
|
||
],
|
||
"operationId": "sealReleaseBatch",
|
||
"summary": "封存草稿发布批次,不触发生产发布",
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/ReleaseBatchSealRequest"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/OperationEnvelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
},
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"/api/v1/release-batches/{id}/authorize-production": {
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
}
|
||
],
|
||
"post": {
|
||
"tags": [
|
||
"Release"
|
||
],
|
||
"operationId": "authorizeProductionRelease",
|
||
"summary": "受门禁保护的生产发布授权(页面按钮或运维脚本)",
|
||
"description": "默认关闭。调用方不得提交审核人身份。两条通道:运维脚本用受限配置的 Bearer token(审计记固定授权人);页面按钮用管理员会话 + 固定确认语句(审计记该管理员)。请求门禁、备份恢复门禁与 Release Worker 执行门禁不变。 确认语句:publish-to-production。",
|
||
"responses": {
|
||
"202": {
|
||
"$ref": "#/components/responses/OperationEnvelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"403": {
|
||
"$ref": "#/components/responses/Forbidden"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
},
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"/api/v1/release-executions": {
|
||
"get": {
|
||
"tags": [
|
||
"Release"
|
||
],
|
||
"operationId": "listReleaseExecutions",
|
||
"summary": "分页读取生产发布和回滚审计",
|
||
"parameters": [
|
||
{
|
||
"name": "operation",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"publish",
|
||
"rollback"
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"name": "state",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"pending",
|
||
"running",
|
||
"rolling_back",
|
||
"completed",
|
||
"failed",
|
||
"rolled_back",
|
||
"rollback_failed"
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/Limit"
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/Offset"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/release-executions/{id}": {
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
}
|
||
],
|
||
"get": {
|
||
"tags": [
|
||
"Release"
|
||
],
|
||
"operationId": "getReleaseExecution",
|
||
"summary": "读取单次生产发布或回滚详情",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"404": {
|
||
"$ref": "#/components/responses/NotFound"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/release-executions/{id}/authorize-rollback": {
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
}
|
||
],
|
||
"post": {
|
||
"tags": [
|
||
"Release"
|
||
],
|
||
"operationId": "authorizeProductionRollback",
|
||
"summary": "受门禁保护的生产回滚授权(页面按钮或运维脚本)",
|
||
"description": "两条通道:运维脚本用受限配置的 Bearer token(审计记固定授权人);页面按钮用管理员会话 + 固定确认语句(审计记该管理员)。请求门禁、备份恢复门禁与 Release Worker 执行门禁不变。 确认语句:rollback-production-release。",
|
||
"responses": {
|
||
"202": {
|
||
"$ref": "#/components/responses/OperationEnvelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"403": {
|
||
"$ref": "#/components/responses/Forbidden"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
},
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"/api/v1/release-executions/{id}/retry": {
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
}
|
||
],
|
||
"post": {
|
||
"tags": [
|
||
"Release"
|
||
],
|
||
"operationId": "retryProductionRelease",
|
||
"summary": "受门禁保护地重排失败发布(页面按钮或运维脚本)",
|
||
"description": "两条通道:运维脚本用受限配置的 Bearer token(审计记固定授权人);页面按钮用管理员会话 + 固定确认语句(审计记该管理员)。请求门禁、备份恢复门禁与 Release Worker 执行门禁不变。 确认语句:retry-production-release。重排沿用原执行的授权人记录。",
|
||
"responses": {
|
||
"202": {
|
||
"$ref": "#/components/responses/OperationEnvelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"403": {
|
||
"$ref": "#/components/responses/Forbidden"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
},
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"/api/v1/release-capabilities": {
|
||
"get": {
|
||
"tags": [
|
||
"Release"
|
||
],
|
||
"operationId": "getReleaseCapabilities",
|
||
"summary": "读取不含敏感信息的生产门禁能力",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/routing-bindings": {
|
||
"get": {
|
||
"tags": [
|
||
"Settings"
|
||
],
|
||
"operationId": "getRoutingBindings",
|
||
"summary": "读取对内/对外知识库绑定",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"tags": [
|
||
"Settings"
|
||
],
|
||
"operationId": "saveRoutingBindings",
|
||
"summary": "绑定对内/对外知识库(管理员)",
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/production-kb-bindings": {
|
||
"get": {
|
||
"tags": [
|
||
"Settings"
|
||
],
|
||
"operationId": "getProductionBindings",
|
||
"summary": "读取对内/对外生产知识库绑定(源库 → 目标库)",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"tags": [
|
||
"Settings"
|
||
],
|
||
"operationId": "saveProductionBindings",
|
||
"summary": "绑定发布目标的 对内/对外生产知识库(管理员)",
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/production-kb-bindings/options": {
|
||
"get": {
|
||
"tags": [
|
||
"Settings"
|
||
],
|
||
"operationId": "listProductionBindingOptions",
|
||
"summary": "列出可绑定的生产 WeKnora 知识库",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/routing-bindings/options": {
|
||
"get": {
|
||
"tags": [
|
||
"Settings"
|
||
],
|
||
"operationId": "listRoutingBindingOptions",
|
||
"summary": "列出可绑定的 WeKnora 知识库",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/ui-settings": {
|
||
"get": {
|
||
"tags": [
|
||
"Settings"
|
||
],
|
||
"operationId": "getActiveUISettings",
|
||
"summary": "读取当前活动的安全刷新和告警设置",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/ui-settings/candidates": {
|
||
"post": {
|
||
"tags": [
|
||
"Settings"
|
||
],
|
||
"operationId": "createUISettingsCandidate",
|
||
"summary": "创建待验证的安全设置版本",
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/UISettingsCandidateRequest"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"$ref": "#/components/responses/OperationEnvelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
},
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"/api/v1/ui-settings/{id}/activate": {
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
}
|
||
],
|
||
"post": {
|
||
"tags": [
|
||
"Settings"
|
||
],
|
||
"operationId": "activateUISettings",
|
||
"summary": "验证并原子启用设置版本",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/OperationEnvelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
},
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"/api/v1/test-publications": {
|
||
"get": {
|
||
"tags": [
|
||
"Test processing"
|
||
],
|
||
"operationId": "listTestPublications",
|
||
"summary": "按处理状态分页读取测试发布记录",
|
||
"parameters": [
|
||
{
|
||
"name": "processing_state",
|
||
"in": "query",
|
||
"description": "解析状态过滤。可传单个状态,或用逗号拼接多个状态(例如 failed,stalled)一次取出全部失败项。",
|
||
"schema": {
|
||
"type": "string",
|
||
"pattern": "^(planned|pending|processing|finalizing|completed|failed|stalled|cancelled)(,(planned|pending|processing|finalizing|completed|failed|stalled|cancelled))*$"
|
||
}
|
||
},
|
||
{
|
||
"in": "query",
|
||
"name": "target_scope",
|
||
"description": "Filter the test queue by routing target: internal or external (P4).",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"internal",
|
||
"external"
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/Limit"
|
||
},
|
||
{
|
||
"in": "query",
|
||
"name": "removal",
|
||
"description": "removal=required 只返回「被禁止导入但仍存活在测试库」的条目(解析监控 → 需下架 车道使用)。",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"required"
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/Offset"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/test-publications/start": {
|
||
"post": {
|
||
"tags": [
|
||
"Test processing"
|
||
],
|
||
"operationId": "startTestPublications",
|
||
"summary": "人工确认后启动测试解析任务",
|
||
"description": "当前按TestPublication确认;P3会把该操作改为按Catalog ChangeSet确认。网络重试复用原 Idempotency-Key。",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/StartTestPublicationsRequest"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"202": {
|
||
"$ref": "#/components/responses/OperationEnvelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/test-publications/{id}/acceptance": {
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
}
|
||
],
|
||
"get": {
|
||
"tags": [
|
||
"Test processing"
|
||
],
|
||
"operationId": "listTestPublicationAcceptance",
|
||
"summary": "读取测试发布的安全验收记录",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"404": {
|
||
"$ref": "#/components/responses/NotFound"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/test-publications/{id}/retry": {
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
}
|
||
],
|
||
"post": {
|
||
"tags": [
|
||
"Test processing"
|
||
],
|
||
"operationId": "retryTestPublication",
|
||
"summary": "重新排队一份可重试测试发布",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/OperationEnvelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/source-catalog/snapshots": {
|
||
"get": {
|
||
"tags": [
|
||
"Source catalog"
|
||
],
|
||
"operationId": "listCatalogSnapshots",
|
||
"summary": "按来源分页读取历史快照清单",
|
||
"description": "Head当前生效快照排在最前;只返回安全投影,不返回snapshot hash或locator hash。",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ConnectionID"
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/Limit"
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/Offset"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"404": {
|
||
"$ref": "#/components/responses/NotFound"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/source-catalog/snapshots/{id}/nodes": {
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
}
|
||
],
|
||
"get": {
|
||
"tags": [
|
||
"Source catalog"
|
||
],
|
||
"operationId": "listCatalogSnapshotNodes",
|
||
"summary": "只读分页查看历史快照中的目录节点",
|
||
"description": "该接口只读,绝不切换当前Head。content_sha256仅在来源实际提供时返回;未知即null,不伪造。",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ConnectionID"
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/Limit"
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/Offset"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"404": {
|
||
"$ref": "#/components/responses/NotFound"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/source-catalog/change-sets/{id}/confirm": {
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
}
|
||
],
|
||
"post": {
|
||
"tags": [
|
||
"Source catalog"
|
||
],
|
||
"operationId": "confirmCatalogChangeSet",
|
||
"summary": "确认 ChangeSet 中选中的变更项并创建解析任务",
|
||
"description": "仅执行选中的 item_seqs;NO_CHANGE 永不入队;禁止/删除项形成测试库移除任务。重复确认返回第一次结果 operation=replayed;同键不同请求 409。绝不返回内部 locator hash。",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/ConfirmChangeSetRequest"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/OperationEnvelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"404": {
|
||
"$ref": "#/components/responses/NotFound"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/job-failures/{id}/requeue": {
|
||
"post": {
|
||
"operationId": "requeueJobFailure",
|
||
"summary": "重排一条终端失败的“源头取件”死信",
|
||
"description": "取件任务的幂等键绑在来源版本上,失败那次已占住它,所以重新标注同一文件不会再入队。本接口按新轮次重新入队并复位意图取件状态,同时把死信标记为 requeued。仅限 artifact.fetch 类型且仍为 open 的记录。",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"required": [
|
||
"reason"
|
||
],
|
||
"properties": {
|
||
"reason": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 500
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "已重新入队;replayed=true 表示幂等重放"
|
||
},
|
||
"400": {
|
||
"description": "请求无效或缺少 Idempotency-Key"
|
||
},
|
||
"409": {
|
||
"description": "该失败记录不可重排,或幂等键与不同请求冲突"
|
||
},
|
||
"500": {
|
||
"description": "服务端错误"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/job-failures": {
|
||
"get": {
|
||
"summary": "分页列出解析死信(DLQ)投影",
|
||
"description": "终端失败尝试的只读投影;原 jobs 与发布审计行永不移动或删除。",
|
||
"parameters": [
|
||
{
|
||
"name": "state",
|
||
"in": "query",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"open",
|
||
"requeued",
|
||
"abandoned"
|
||
]
|
||
},
|
||
"description": "默认 open"
|
||
},
|
||
{
|
||
"name": "limit",
|
||
"in": "query",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer",
|
||
"minimum": 1,
|
||
"maximum": 100,
|
||
"default": 50
|
||
}
|
||
},
|
||
{
|
||
"name": "offset",
|
||
"in": "query",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer",
|
||
"minimum": 0,
|
||
"default": 0
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "死信投影分页",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"job_id": {
|
||
"type": "string"
|
||
},
|
||
"job_type": {
|
||
"type": "string"
|
||
},
|
||
"publication_id": {
|
||
"type": "string"
|
||
},
|
||
"source_item_id": {
|
||
"type": "string"
|
||
},
|
||
"error_code": {
|
||
"type": "string"
|
||
},
|
||
"attempt": {
|
||
"type": "integer"
|
||
},
|
||
"max_attempts_at_failure": {
|
||
"type": "integer"
|
||
},
|
||
"change_set_id": {
|
||
"type": "string"
|
||
},
|
||
"action": {
|
||
"type": "string"
|
||
},
|
||
"target_kb_id": {
|
||
"type": "string"
|
||
},
|
||
"state": {
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"type": "string",
|
||
"format": "date-time"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"total": {
|
||
"type": "integer"
|
||
},
|
||
"limit": {
|
||
"type": "integer"
|
||
},
|
||
"offset": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"required": [
|
||
"data"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
}
|
||
},
|
||
"operationId": "listJobFailures"
|
||
}
|
||
},
|
||
"/api/v1/test-publications/retry-batch": {
|
||
"post": {
|
||
"summary": "服务端批量重试失败发布",
|
||
"description": "一次事务内逐项返回 started/already_running/not_retryable;批量操作人、原因与幂等信封原子记录。最多100项,前端不得循环调用单项接口。",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"publication_ids": {
|
||
"type": "array",
|
||
"minItems": 1,
|
||
"maxItems": 100,
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"operator_ref": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 128
|
||
},
|
||
"reason": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 500
|
||
}
|
||
},
|
||
"required": [
|
||
"publication_ids",
|
||
"operator_ref",
|
||
"reason"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "批量重试结果(含逐项outcome)",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {
|
||
"batch_key": {
|
||
"type": "string"
|
||
},
|
||
"total": {
|
||
"type": "integer"
|
||
},
|
||
"started": {
|
||
"type": "integer"
|
||
},
|
||
"already_running": {
|
||
"type": "integer"
|
||
},
|
||
"not_retryable": {
|
||
"type": "integer"
|
||
},
|
||
"outcomes": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"properties": {
|
||
"publication_id": {
|
||
"type": "string"
|
||
},
|
||
"result": {
|
||
"type": "string",
|
||
"enum": [
|
||
"started",
|
||
"already_running",
|
||
"not_retryable"
|
||
]
|
||
},
|
||
"detail": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"required": [
|
||
"batch_key",
|
||
"total",
|
||
"started",
|
||
"already_running",
|
||
"not_retryable",
|
||
"outcomes"
|
||
]
|
||
},
|
||
"operation": {
|
||
"type": "string",
|
||
"enum": [
|
||
"created",
|
||
"replayed"
|
||
]
|
||
}
|
||
},
|
||
"required": [
|
||
"data",
|
||
"operation"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
},
|
||
"operationId": "retryPublicationsBatch"
|
||
}
|
||
},
|
||
"/api/v1/test-publications/cancel-batch": {
|
||
"post": {
|
||
"summary": "服务端批量取消失败发布(不再自动重试)",
|
||
"description": "用于源头即空文档等永久性失败:一次事务内把 failed/stalled 发布置为 cancelled,撤销排队中的上传任务并放弃对应死信;逐项返回 cancelled/already_running/not_retryable。原始记录与暂存文件保留,重新标记入库可再次处理。最多100项,操作人与原因由服务端会话注入并原子审计。",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"publication_ids": {
|
||
"type": "array",
|
||
"minItems": 1,
|
||
"maxItems": 100,
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"reason": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 500
|
||
}
|
||
},
|
||
"required": [
|
||
"publication_ids",
|
||
"reason"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "批量取消结果(含逐项outcome)",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {
|
||
"batch_key": {
|
||
"type": "string"
|
||
},
|
||
"total": {
|
||
"type": "integer"
|
||
},
|
||
"started": {
|
||
"type": "integer",
|
||
"description": "成功取消的项数"
|
||
},
|
||
"already_running": {
|
||
"type": "integer"
|
||
},
|
||
"not_retryable": {
|
||
"type": "integer",
|
||
"description": "不可取消的项数(如已完成或不在失败态)"
|
||
},
|
||
"outcomes": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"properties": {
|
||
"publication_id": {
|
||
"type": "string"
|
||
},
|
||
"result": {
|
||
"type": "string",
|
||
"enum": [
|
||
"cancelled",
|
||
"already_running",
|
||
"not_retryable"
|
||
]
|
||
},
|
||
"detail": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"required": [
|
||
"batch_key",
|
||
"total",
|
||
"started",
|
||
"already_running",
|
||
"not_retryable",
|
||
"outcomes"
|
||
]
|
||
},
|
||
"operation": {
|
||
"type": "string",
|
||
"enum": [
|
||
"created",
|
||
"replayed"
|
||
]
|
||
}
|
||
},
|
||
"required": [
|
||
"data",
|
||
"operation"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
},
|
||
"operationId": "cancelPublicationsBatch"
|
||
}
|
||
},
|
||
"/api/v1/monitor/tasks": {
|
||
"get": {
|
||
"operationId": "listMonitorTasks",
|
||
"summary": "统一文件处理表(来源文件×目标测试库)",
|
||
"description": "按最新未替代版本归并后在数据库内筛选、分页和计数。id筛选附带最近50条版本状态、失败和重试记录。只读,不触发处理。",
|
||
"parameters": [
|
||
{
|
||
"name": "q",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"name": "source",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"name": "scope",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"name": "target",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"name": "action",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"name": "status",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"name": "stage",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"name": "since",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"name": "until",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"name": "id",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"name": "limit",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "integer",
|
||
"minimum": 1,
|
||
"maximum": 100,
|
||
"default": 20
|
||
}
|
||
},
|
||
{
|
||
"name": "offset",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "integer",
|
||
"minimum": 0
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"400": {
|
||
"description": "筛选参数错误"
|
||
},
|
||
"401": {
|
||
"description": "需要登录"
|
||
},
|
||
"403": {
|
||
"description": "权限不足"
|
||
},
|
||
"500": {
|
||
"description": "读取或提交失败"
|
||
},
|
||
"501": {
|
||
"description": "存储未配置"
|
||
},
|
||
"200": {
|
||
"description": "同一快照的筛选结果、总数、可重试数及全局筛选项",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "object",
|
||
"required": [
|
||
"items",
|
||
"total",
|
||
"limit",
|
||
"offset",
|
||
"retryable",
|
||
"sources",
|
||
"targets"
|
||
],
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"required": [
|
||
"id",
|
||
"title",
|
||
"path",
|
||
"source_id",
|
||
"source_name",
|
||
"target_scope",
|
||
"target_kb",
|
||
"action",
|
||
"stage",
|
||
"status",
|
||
"detail",
|
||
"updated_at",
|
||
"retry_kind",
|
||
"failure_id",
|
||
"version_id",
|
||
"retry_count",
|
||
"history"
|
||
],
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"title": {
|
||
"type": "string"
|
||
},
|
||
"path": {
|
||
"type": "string"
|
||
},
|
||
"source_id": {
|
||
"type": "string"
|
||
},
|
||
"source_name": {
|
||
"type": "string"
|
||
},
|
||
"target_scope": {
|
||
"type": "string"
|
||
},
|
||
"target_kb": {
|
||
"type": "string"
|
||
},
|
||
"action": {
|
||
"type": "string"
|
||
},
|
||
"stage": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"detail": {
|
||
"type": "string"
|
||
},
|
||
"updated_at": {
|
||
"type": "string"
|
||
},
|
||
"retry_kind": {
|
||
"type": "string"
|
||
},
|
||
"failure_id": {
|
||
"type": "string"
|
||
},
|
||
"version_id": {
|
||
"type": "string"
|
||
},
|
||
"retry_count": {
|
||
"type": "integer",
|
||
"minimum": 0
|
||
},
|
||
"history": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"properties": {
|
||
"at": {
|
||
"type": "string"
|
||
},
|
||
"kind": {
|
||
"type": "string"
|
||
},
|
||
"detail": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"total": {
|
||
"type": "integer",
|
||
"minimum": 0
|
||
},
|
||
"limit": {
|
||
"type": "integer",
|
||
"minimum": 0
|
||
},
|
||
"offset": {
|
||
"type": "integer",
|
||
"minimum": 0
|
||
},
|
||
"retryable": {
|
||
"type": "integer",
|
||
"minimum": 0
|
||
},
|
||
"sources": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"targets": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/test-publications/{id}/removal-retry": {
|
||
"post": {
|
||
"operationId": "retryMonitorRemoval",
|
||
"summary": "重试失败的测试库移除任务",
|
||
"description": "仅工程师或管理员;事务内核验禁止导入规则、未被替代及无运行任务,恢复原移除任务并登记审计。重复调用冲突不重复入队,不上传知识、不操作来源及生产。",
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"400": {
|
||
"description": "筛选参数错误"
|
||
},
|
||
"401": {
|
||
"description": "需要登录"
|
||
},
|
||
"403": {
|
||
"description": "权限不足"
|
||
},
|
||
"500": {
|
||
"description": "读取或提交失败"
|
||
},
|
||
"501": {
|
||
"description": "存储未配置"
|
||
},
|
||
"202": {
|
||
"description": "已受理,不代表移除已完成"
|
||
},
|
||
"409": {
|
||
"description": "规则或状态已变化,不能重试"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/monitor/metrics": {
|
||
"get": {
|
||
"operationId": "getMonitorMetrics",
|
||
"summary": "真实运行指标(Worker/队列/吞吐/成功率/耗时分布)",
|
||
"description": "冻结1小时与24小时统计窗口;样本不足的比率与分位数返回null而非0;活跃Worker按PostgreSQL新鲜租约去重计数,不按容器数猜测。模拟模式声明worker_source=simulation。",
|
||
"parameters": [],
|
||
"responses": {
|
||
"200": {
|
||
"description": "运行指标快照",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"required": [
|
||
"data"
|
||
],
|
||
"properties": {
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {
|
||
"observed_at": {
|
||
"type": "string",
|
||
"format": "date-time"
|
||
},
|
||
"active_workers": {
|
||
"type": "integer"
|
||
},
|
||
"worker_source": {
|
||
"type": "string",
|
||
"enum": [
|
||
"pg_lease",
|
||
"simulation"
|
||
]
|
||
},
|
||
"queue": {
|
||
"type": "object",
|
||
"properties": {
|
||
"pending": {
|
||
"type": "integer"
|
||
},
|
||
"running": {
|
||
"type": "integer"
|
||
},
|
||
"retry": {
|
||
"type": "integer"
|
||
},
|
||
"failed": {
|
||
"type": "integer"
|
||
},
|
||
"oldest_pending_age_seconds": {
|
||
"type": [
|
||
"number",
|
||
"null"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"short_window": {
|
||
"$ref": "#/components/schemas/JobWindowMetrics"
|
||
},
|
||
"long_window": {
|
||
"$ref": "#/components/schemas/JobWindowMetrics"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"503": {
|
||
"description": "指标暂不可用",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"error": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/livez": {
|
||
"get": {
|
||
"operationId": "getLivez",
|
||
"summary": "存活探针(Liveness)",
|
||
"description": "仅回答“本进程能否服务HTTP”。绝不依赖PostgreSQL、WeKnora、MinerU或Worker:第三方故障时本端点必须保持200。",
|
||
"responses": {
|
||
"200": {
|
||
"description": "进程存活",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"observed_at": {
|
||
"type": "string",
|
||
"format": "date-time"
|
||
}
|
||
},
|
||
"required": [
|
||
"status",
|
||
"observed_at"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
},
|
||
"tags": [
|
||
"Health"
|
||
]
|
||
}
|
||
},
|
||
"/readyz": {
|
||
"get": {
|
||
"operationId": "getReadyz",
|
||
"summary": "就绪探针(Readiness)",
|
||
"description": "逐服务独立评估Liveness与Readiness(P10)。只有“已部署且已配置但当前不可工作”的服务阻塞就绪并返回503;未部署=not_applicable、缺配置=not_configured 仅警告不阻塞;结果绝不泄漏URL、密钥或主机。",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"503": {
|
||
"description": "存在已配置依赖当前不可接单",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"blocked": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"not_configured": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"observed_at": {
|
||
"type": "string",
|
||
"format": "date-time"
|
||
}
|
||
},
|
||
"required": [
|
||
"status",
|
||
"blocked",
|
||
"not_configured",
|
||
"observed_at"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
},
|
||
"tags": [
|
||
"Health"
|
||
]
|
||
}
|
||
},
|
||
"/api/v1/release-change-sets": {
|
||
"get": {
|
||
"tags": [
|
||
"Release"
|
||
],
|
||
"operationId": "listReleaseChangeSets",
|
||
"summary": "分页列出版本化发布计划集",
|
||
"parameters": [
|
||
{
|
||
"in": "query",
|
||
"name": "limit",
|
||
"schema": {
|
||
"type": "integer"
|
||
},
|
||
"description": "每页数量,默认20上限100"
|
||
},
|
||
{
|
||
"in": "query",
|
||
"name": "offset",
|
||
"schema": {
|
||
"type": "integer"
|
||
},
|
||
"description": "偏移"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"tags": [
|
||
"Release"
|
||
],
|
||
"operationId": "generateReleaseChangeSet",
|
||
"summary": "把当前实时发布计划固化为不可变版本化ChangeSet",
|
||
"description": "生成即冻结:绑定当前head快照集与确认过的目录ChangeSet集,按精确字段顺序与分隔符计算清单摘要。相同计划并发去重(唯一索引冲突则复用最新planned或取下一版本)。来源刷新绝不可能改变已固化清单。",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"created_by": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"required": [
|
||
"name",
|
||
"created_by"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"$ref": "#/components/responses/OperationEnvelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/release-change-sets/latest": {
|
||
"get": {
|
||
"tags": [
|
||
"Release"
|
||
],
|
||
"operationId": "getLatestReleaseChangeSet",
|
||
"summary": "最新发布计划集(含冻结逐项清单)",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/release-change-sets/{id}": {
|
||
"get": {
|
||
"tags": [
|
||
"Release"
|
||
],
|
||
"operationId": "getReleaseChangeSet",
|
||
"summary": "按ID读取发布计划集与清单",
|
||
"parameters": [
|
||
{
|
||
"in": "path",
|
||
"name": "id",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"404": {
|
||
"$ref": "#/components/responses/NotFound"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/release-change-sets/{id}/confirm": {
|
||
"post": {
|
||
"tags": [
|
||
"Release"
|
||
],
|
||
"operationId": "confirmReleaseChangeSet",
|
||
"summary": "冻结planned发布计划集供正式批次引用",
|
||
"description": "planned转confirmed幂等重放;非法状态迁移返回409。确认后清单与摘要永不改变。",
|
||
"parameters": [
|
||
{
|
||
"in": "path",
|
||
"name": "id",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"confirmed_by": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"required": [
|
||
"confirmed_by"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/OperationEnvelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"404": {
|
||
"$ref": "#/components/responses/NotFound"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/release-executions/{id}/audit-chain": {
|
||
"get": {
|
||
"tags": [
|
||
"Release"
|
||
],
|
||
"operationId": "getReleaseAuditChain",
|
||
"summary": "发布审计链(R6 只读投影)",
|
||
"description": "一次执行可追溯到批次、已确认发布计划集、绑定的来源快照与目录变更集、逐项审核/验收/来源身份,以及补偿回滚行。所有链路通过真实外键读取(迁移30),只返回安全标识、名称、计数与时间戳,绝不返回Bundle内部路径、凭据、Base URL或对象签名URL。",
|
||
"parameters": [
|
||
{
|
||
"in": "path",
|
||
"name": "id",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "完整证据链",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "object"
|
||
}
|
||
},
|
||
"required": [
|
||
"data"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"404": {
|
||
"$ref": "#/components/responses/NotFound"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/source-connections/{id}/settings/revisions": {
|
||
"parameters": [
|
||
{
|
||
"in": "path",
|
||
"name": "id",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string"
|
||
},
|
||
"description": "来源连接 ID"
|
||
}
|
||
],
|
||
"get": {
|
||
"operationId": "listSourceSettingsRevisions",
|
||
"summary": "来源设置修订历史(V1)",
|
||
"description": "validated→active→retired 完整历史;仅安全投影:credential_ref 是凭据引用名,真实凭据不可回读。",
|
||
"tags": [
|
||
"governance"
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "修订列表",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"required": [
|
||
"data"
|
||
],
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"revision_number": {
|
||
"type": "integer"
|
||
},
|
||
"state": {
|
||
"enum": [
|
||
"validated",
|
||
"active",
|
||
"retired",
|
||
"failed"
|
||
]
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"endpoint": {
|
||
"type": "string"
|
||
},
|
||
"credential_ref": {
|
||
"type": "string",
|
||
"description": "引用名,非密钥本身"
|
||
},
|
||
"enabled": {
|
||
"type": "boolean"
|
||
},
|
||
"refresh_interval_seconds": {
|
||
"type": "string"
|
||
},
|
||
"created_by": {
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"type": "string",
|
||
"format": "date-time"
|
||
},
|
||
"validated_at": {
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
],
|
||
"format": "date-time"
|
||
},
|
||
"activated_at": {
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
],
|
||
"format": "date-time"
|
||
},
|
||
"retired_at": {
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
],
|
||
"format": "date-time"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"operation": {
|
||
"enum": [
|
||
"created",
|
||
"replayed"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"operationId": "createSourceSettingsRevision",
|
||
"summary": "创建来源设置草稿修订(V1)",
|
||
"description": "校验通过落为 validated 修订,不影响运行态;需要 X-Governance-Action: source-settings 与 Idempotency-Key。",
|
||
"tags": [
|
||
"governance"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"in": "header",
|
||
"name": "Idempotency-Key",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"maxLength": 128
|
||
}
|
||
},
|
||
{
|
||
"in": "header",
|
||
"name": "X-Governance-Action",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"source-settings"
|
||
]
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"required": [
|
||
"source_type",
|
||
"name",
|
||
"operator",
|
||
"schedule"
|
||
],
|
||
"additionalProperties": false,
|
||
"properties": {
|
||
"source_type": {
|
||
"enum": [
|
||
"pp",
|
||
"alist",
|
||
"dingtalk",
|
||
"manual"
|
||
]
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 255
|
||
},
|
||
"endpoint": {
|
||
"type": "string",
|
||
"maxLength": 2048
|
||
},
|
||
"credential_ref": {
|
||
"type": "string",
|
||
"maxLength": 255,
|
||
"description": "密钥引用名;真实凭据永不入库、永不回显"
|
||
},
|
||
"enabled": {
|
||
"type": "boolean"
|
||
},
|
||
"schedule": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"properties": {
|
||
"refresh_interval_seconds": {
|
||
"type": "integer",
|
||
"nullable": true,
|
||
"description": "缺省/0=仅手动;非零最低300秒"
|
||
}
|
||
}
|
||
},
|
||
"operator": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 128
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"description": "修订已创建",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"required": [
|
||
"data"
|
||
],
|
||
"properties": {
|
||
"data": {
|
||
"type": "object",
|
||
"required": [
|
||
"id"
|
||
],
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"operation": {
|
||
"enum": [
|
||
"created",
|
||
"replayed"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"403": {
|
||
"$ref": "#/components/responses/Forbidden"
|
||
},
|
||
"404": {
|
||
"$ref": "#/components/responses/NotFound"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/source-connections/{id}/settings/revisions/{revision_id}/activate": {
|
||
"post": {
|
||
"operationId": "activateSourceSettingsRevision",
|
||
"summary": "激活来源设置修订(V1)",
|
||
"description": "原子切换:退休旧 active、同步运行态快照、由服务端按周期推导下次刷新时间;停用立即清空到期时间(停止新扫描与新任务),历史全部保留。",
|
||
"tags": [
|
||
"governance"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"in": "path",
|
||
"name": "id",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"in": "path",
|
||
"name": "revision_id",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"in": "header",
|
||
"name": "Idempotency-Key",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"maxLength": 128
|
||
}
|
||
},
|
||
{
|
||
"in": "header",
|
||
"name": "X-Governance-Action",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"enum": [
|
||
"source-settings"
|
||
]
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"maxProperties": 0
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "已激活",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"required": [
|
||
"data"
|
||
],
|
||
"properties": {
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {
|
||
"connection_id": {
|
||
"type": "string"
|
||
},
|
||
"revision_id": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"operation": {
|
||
"enum": [
|
||
"created",
|
||
"replayed"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"403": {
|
||
"$ref": "#/components/responses/Forbidden"
|
||
},
|
||
"404": {
|
||
"$ref": "#/components/responses/NotFound"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/test-publications/{id}/removal": {
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/ID"
|
||
}
|
||
],
|
||
"post": {
|
||
"tags": [
|
||
"Test processing"
|
||
],
|
||
"operationId": "startTestPublicationRemoval",
|
||
"summary": "把被禁止导入但仍存活在测试库的知识置为下架(入队既有 test.remove 工作流)",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
],
|
||
"responses": {
|
||
"202": {
|
||
"$ref": "#/components/responses/OperationEnvelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"404": {
|
||
"$ref": "#/components/responses/NotFound"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/review-candidates/batch-decision": {
|
||
"post": {
|
||
"tags": [
|
||
"Release"
|
||
],
|
||
"operationId": "batchReviewCandidates",
|
||
"summary": "一次对多条审核候选做同一个决定(批量批准/驳回,逐条复用单条写入路径)",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/release-batches/publish-now": {
|
||
"post": {
|
||
"tags": [
|
||
"Release"
|
||
],
|
||
"operationId": "publishNowPublications",
|
||
"summary": "一个动作完成「建批(冻结+锁定)→ 授权生产发布」(沿用门禁、固定语句与管理员身份)",
|
||
"parameters": [
|
||
{
|
||
"$ref": "#/components/parameters/IdempotencyKey"
|
||
}
|
||
],
|
||
"responses": {
|
||
"202": {
|
||
"$ref": "#/components/responses/OperationEnvelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"401": {
|
||
"$ref": "#/components/responses/Unauthorized"
|
||
},
|
||
"403": {
|
||
"$ref": "#/components/responses/Forbidden"
|
||
},
|
||
"409": {
|
||
"$ref": "#/components/responses/Conflict"
|
||
},
|
||
"412": {
|
||
"$ref": "#/components/responses/PreconditionFailed"
|
||
},
|
||
"422": {
|
||
"$ref": "#/components/responses/Unprocessable"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/dingtalk-spaces/credential-status": {
|
||
"get": {
|
||
"tags": ["Source connections"],
|
||
"operationId": "readDWSCredentialStatus",
|
||
"summary": "只读查询 DWS 本地凭证元数据(管理员)",
|
||
"description": "仅执行 auth status --readonly,不列举目录、不兑换授权、不返回凭据值。状态不代表业务接口可用性。",
|
||
"responses": {
|
||
"200": {"$ref": "#/components/responses/Envelope"},
|
||
"401": {"$ref": "#/components/responses/Unauthorized"},
|
||
"403": {"$ref": "#/components/responses/Forbidden"},
|
||
"501": {"description": "状态读取器未接线"},
|
||
"400": {"$ref": "#/components/responses/BadRequest"},
|
||
"500": {"$ref": "#/components/responses/InternalError"},
|
||
"503": {"$ref": "#/components/responses/ServiceUnavailable"}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/dingtalk-spaces/available": {
|
||
"get": {
|
||
"tags": [
|
||
"Source connections"
|
||
],
|
||
"operationId": "listAvailableDingtalkSources",
|
||
"summary": "列举当前钉钉账号可见的知识库与钉盘空间(管理员,只读)",
|
||
"description": "用平台持有的钉钉凭据(dws)只读列举租户目录:知识库与钉盘空间。钉盘列举在某些租户下会被拒,这时返回 drive_notice;接口整体不可用时返回 503,不会伪装成空列表。",
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/Envelope"
|
||
},
|
||
"400": {
|
||
"$ref": "#/components/responses/BadRequest"
|
||
},
|
||
"401": {
|
||
"$ref": "#/components/responses/Unauthorized"
|
||
},
|
||
"403": {
|
||
"$ref": "#/components/responses/Forbidden"
|
||
},
|
||
"500": {
|
||
"$ref": "#/components/responses/InternalError"
|
||
},
|
||
"503": {
|
||
"$ref": "#/components/responses/ServiceUnavailable"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"components": {
|
||
"parameters": {
|
||
"ID": {
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"maxLength": 64
|
||
}
|
||
},
|
||
"IdempotencyKey": {
|
||
"name": "Idempotency-Key",
|
||
"in": "header",
|
||
"required": true,
|
||
"description": "每次用户动作使用一个新键;仅网络重试复用同一键。不得包含凭据或业务内容。",
|
||
"schema": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 128
|
||
}
|
||
},
|
||
"ConnectionID": {
|
||
"name": "connection_id",
|
||
"in": "query",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"maxLength": 64
|
||
}
|
||
},
|
||
"Limit": {
|
||
"name": "limit",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "integer",
|
||
"minimum": 1,
|
||
"maximum": 100,
|
||
"default": 20
|
||
}
|
||
},
|
||
"Offset": {
|
||
"name": "offset",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "integer",
|
||
"minimum": 0,
|
||
"maximum": 1000000,
|
||
"default": 0
|
||
}
|
||
},
|
||
"State": {
|
||
"name": "state",
|
||
"in": "query",
|
||
"schema": {
|
||
"type": "string",
|
||
"maxLength": 32
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"Envelope": {
|
||
"description": "安全数据响应",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/Envelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"OperationEnvelope": {
|
||
"description": "可安全重试的目录操作响应;operation=created 表示首次执行,replayed 表示返回原操作结果。",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/OperationEnvelope"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"BadRequest": {
|
||
"description": "请求参数或状态非法",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/Error"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"Forbidden": {
|
||
"description": "安全门禁或权限拒绝",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/Error"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"NotFound": {
|
||
"description": "资源不存在",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/Error"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"Conflict": {
|
||
"description": "资源已变更、状态冲突或重复动作",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/Error"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"InternalError": {
|
||
"description": "安全的服务端错误码",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/Error"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"IdempotencyConflict": {
|
||
"description": "资源已变更、状态冲突或重复动作",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/Error"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"Unauthorized": {
|
||
"description": "需要生产发布授权(管理员会话或运维通道)",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"error": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"PreconditionFailed": {
|
||
"description": "生产门禁未满足(例如备份恢复验证未通过)",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"error": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"Unprocessable": {
|
||
"description": "请求内容不满足发布条件",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"error": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"ServiceUnavailable": {
|
||
"description": "依赖的第三方或本地工具当前不可用(例如 dws 未登录/权限不足)。",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/Error"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schemas": {
|
||
"QAReportedHistoricalRate": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"week",
|
||
"week_start",
|
||
"week_end",
|
||
"coverage_percent",
|
||
"correctness_percent",
|
||
"source"
|
||
],
|
||
"properties": {
|
||
"week": {
|
||
"type": "string",
|
||
"pattern": "^[0-9]{4}WK[0-9]{2}$"
|
||
},
|
||
"week_start": {
|
||
"type": "string",
|
||
"format": "date-time"
|
||
},
|
||
"week_end": {
|
||
"type": "string",
|
||
"format": "date-time"
|
||
},
|
||
"coverage_percent": {
|
||
"type": "number",
|
||
"minimum": 0,
|
||
"maximum": 100,
|
||
"multipleOf": 0.01
|
||
},
|
||
"correctness_percent": {
|
||
"type": "number",
|
||
"minimum": 0,
|
||
"maximum": 100,
|
||
"multipleOf": 0.01
|
||
},
|
||
"source": {
|
||
"const": "user_provided_history"
|
||
}
|
||
},
|
||
"description": "用户提供的历史报表百分比,不含也不推导分子、分母、记录数或冻结时点;不按现行规则重算,不用于关键词统计。"
|
||
},
|
||
"QAAISafeSettings": {"type": "object", "additionalProperties": false, "properties": {"revision": {"type": "integer", "minimum": 0}, "base_url": {"type": "string", "maxLength": 500, "description": "管理员配置的模型API地址,禁止地址内凭据、query或fragment"}, "model": {"type": "string", "maxLength": 200}, "key_configured": {"type": "boolean"}, "verification": {"enum": ["not_configured", "verified", "unverified", "rejected"]}, "checked_at": {"type": ["string", "null"], "format": "date-time"}, "automatic_evaluation": {"type": "boolean"}, "automatic_translation": {"type": "boolean"}, "storage_ready": {"type": "boolean"}}, "required": ["revision", "base_url", "model", "key_configured", "verification", "checked_at", "automatic_evaluation", "automatic_translation", "storage_ready"]},
|
||
"QAAISaveSettings": {"type": "object", "additionalProperties": false, "properties": {"base_revision": {"type": "integer", "minimum": 0}, "base_url": {"type": "string", "maxLength": 500, "description": "管理员配置的模型API地址,禁止地址内凭据、query或fragment"}, "model": {"type": "string", "maxLength": 200}, "key_action": {"enum": ["keep", "replace", "clear"]}, "api_key": {"type": "string", "writeOnly": true, "maxLength": 4096, "description": "仅replace携带;keep/clear不可携带;HTTPS或本机回环传输;响应不返回"}}, "required": ["base_revision", "base_url", "model", "key_action"]},
|
||
"QAAIBatch": {"type": "object", "additionalProperties": false, "properties": {"id": {"type": "string"}, "kind": {"type": "string", "enum": ["evaluation", "translation"]}, "state": {"enum": ["active", "paused"]}, "total": {"type": "integer", "minimum": 0}, "succeeded": {"type": "integer", "minimum": 0}, "failed": {"type": "integer", "minimum": 0}, "skipped": {"type": "integer", "minimum": 0}, "running": {"type": "integer", "minimum": 0}, "queued": {"type": "integer", "minimum": 0}, "retry": {"type": "integer", "minimum": 0}, "paused": {"type": "integer", "minimum": 0}, "created_at": {"type": "string", "format": "date-time"}}, "required": ["id", "kind", "state", "total", "succeeded", "failed", "skipped", "running", "queued", "retry", "paused", "created_at"]},
|
||
"QAAIWork": {"type": "object", "additionalProperties": false, "properties": {"id": {"type": "string"}, "record_id": {"type": "string"}, "kind": {"type": "string", "enum": ["evaluation", "translation"]}, "state": {"enum": ["queued", "running", "retry", "succeeded", "failed", "skipped", "paused"]}, "stage": {"type": "string"}, "attempt": {"type": "integer", "minimum": 0}, "error_code": {"type": "string"}, "skip_reason": {"type": "string"}, "started_at": {"type": ["string", "null"], "format": "date-time"}, "updated_at": {"type": "string", "format": "date-time"}}, "required": ["id", "record_id", "kind", "state", "stage", "attempt", "error_code", "skip_reason", "started_at", "updated_at"]},
|
||
"QAAIEvidence": {"type": "object", "additionalProperties": false, "properties": {"id": {"type": "string"}, "record_id": {"type": "string"}, "kind": {"type": "string", "enum": ["evaluation", "translation"]}, "state": {"enum": ["queued", "running", "retry", "succeeded", "failed", "skipped", "paused"]}, "stage": {"type": "string"}, "attempt": {"type": "integer", "minimum": 0}, "error_code": {"type": "string"}, "skip_reason": {"type": "string"}, "started_at": {"type": ["string", "null"], "format": "date-time"}, "updated_at": {"type": "string", "format": "date-time"}, "input_hash": {"type": "string", "pattern": "^[0-9a-f]{64}$"}, "config_revision": {"type": "integer", "minimum": 0}, "prompt_version": {"type": "string"}, "dictionary_version": {"type": "string"}, "actual_model": {"type": "string"}, "result": {"type": "object", "description": "经正式字典/原句与跨字段约束校验的结果,分析fields或翻译question_chinese"}, "applied_fields": {"type": "object", "additionalProperties": {"type": "string"}}, "skipped_fields": {"type": "object", "additionalProperties": {"type": "string"}}}, "required": ["id", "record_id", "kind", "state", "stage", "attempt", "error_code", "skip_reason", "started_at", "updated_at", "input_hash", "config_revision", "prompt_version", "dictionary_version", "actual_model", "result", "applied_fields", "skipped_fields"]},
|
||
"QAAIPreview": {"type": "object", "additionalProperties": false, "properties": {"id": {"type": "string"}, "kind": {"type": "string", "enum": ["evaluation", "translation"]}, "scope_total": {"type": "integer", "minimum": 0}, "eligible": {"type": "integer", "minimum": 0}, "skipped": {"type": "integer", "minimum": 0}, "config_revision": {"type": "integer", "minimum": 0}, "expires_at": {"type": "string", "format": "date-time"}}, "required": ["id", "kind", "scope_total", "eligible", "skipped", "config_revision", "expires_at"]},
|
||
"QAAIStatus": {"type": "object", "additionalProperties": false, "properties": {"settings": {"$ref": "#/components/schemas/QAAISafeSettings"}, "worker_ready": {"type": "boolean"}, "queues": {"type": "array", "items": {"type": "object", "additionalProperties": false, "properties": {"kind": {"type": "string", "enum": ["evaluation", "translation"]}, "queued": {"type": "integer", "minimum": 0}, "running": {"type": "integer", "minimum": 0}, "retry": {"type": "integer", "minimum": 0}, "failed": {"type": "integer", "minimum": 0}, "paused": {"type": "integer", "minimum": 0}, "succeeded": {"type": "integer", "minimum": 0}, "skipped": {"type": "integer", "minimum": 0}}, "required": ["kind", "queued", "running", "retry", "failed", "paused", "succeeded", "skipped"]}}, "batches": {"type": "array", "items": {"$ref": "#/components/schemas/QAAIBatch"}, "maxItems": 10}, "recent_tasks": {"type": "array", "items": {"$ref": "#/components/schemas/QAAIWork"}, "maxItems": 1000}, "recent_tasks_limited": {"type": "boolean"}}, "required": ["settings", "worker_ready", "queues", "batches", "recent_tasks", "recent_tasks_limited"]},
|
||
"Health": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"status"
|
||
],
|
||
"properties": {
|
||
"status": {
|
||
"type": "string",
|
||
"const": "ok"
|
||
}
|
||
}
|
||
},
|
||
"Envelope": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"data"
|
||
],
|
||
"properties": {
|
||
"data": {
|
||
"description": "端点定义的安全投影"
|
||
}
|
||
}
|
||
},
|
||
"OperationEnvelope": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"data",
|
||
"operation"
|
||
],
|
||
"properties": {
|
||
"data": {
|
||
"description": "端点定义的安全投影"
|
||
},
|
||
"operation": {
|
||
"type": "string",
|
||
"enum": [
|
||
"created",
|
||
"replayed"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"Error": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"error"
|
||
],
|
||
"properties": {
|
||
"error": {
|
||
"type": "string",
|
||
"maxLength": 512
|
||
}
|
||
}
|
||
},
|
||
"JobCreateRequest": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"type",
|
||
"idempotency_key"
|
||
],
|
||
"properties": {
|
||
"type": {
|
||
"type": "string",
|
||
"maxLength": 100
|
||
},
|
||
"payload": {
|
||
"type": "object"
|
||
},
|
||
"priority": {
|
||
"type": "integer"
|
||
},
|
||
"max_attempts": {
|
||
"type": "integer",
|
||
"minimum": 1,
|
||
"maximum": 100
|
||
},
|
||
"idempotency_key": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 255
|
||
}
|
||
}
|
||
},
|
||
"CatalogRouteRequest": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"connection_id",
|
||
"node_ids",
|
||
"operator_ref",
|
||
"reason"
|
||
],
|
||
"properties": {
|
||
"connection_id": {
|
||
"type": "string",
|
||
"maxLength": 64
|
||
},
|
||
"node_ids": {
|
||
"type": "array",
|
||
"minItems": 1,
|
||
"maxItems": 100,
|
||
"items": {
|
||
"type": "string",
|
||
"maxLength": 64
|
||
}
|
||
},
|
||
"policy": {
|
||
"type": "string",
|
||
"enum": [
|
||
"internal",
|
||
"external",
|
||
"both",
|
||
"blocked"
|
||
]
|
||
},
|
||
"visibility": {
|
||
"type": "string",
|
||
"enum": [
|
||
"internal",
|
||
"external",
|
||
"both",
|
||
"blocked"
|
||
]
|
||
},
|
||
"operator_ref": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 128
|
||
},
|
||
"reason": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 500
|
||
}
|
||
}
|
||
},
|
||
"ScopeRuleMutation": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"target_type",
|
||
"operator_ref",
|
||
"reason"
|
||
],
|
||
"properties": {
|
||
"target_type": {
|
||
"type": "string",
|
||
"enum": [
|
||
"directory",
|
||
"item"
|
||
]
|
||
},
|
||
"connection_id": {
|
||
"type": "string",
|
||
"maxLength": 64
|
||
},
|
||
"directory_path": {
|
||
"type": "string",
|
||
"maxLength": 4096
|
||
},
|
||
"source_item_id": {
|
||
"type": "string",
|
||
"maxLength": 64
|
||
},
|
||
"visibility": {
|
||
"type": "string",
|
||
"enum": [
|
||
"internal",
|
||
"external",
|
||
"both",
|
||
"blocked"
|
||
]
|
||
},
|
||
"operator_ref": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 128
|
||
},
|
||
"reason": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 500
|
||
}
|
||
}
|
||
},
|
||
"ReviewDecisionRequest": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"decision",
|
||
"decided_visibility",
|
||
"reviewer_ref",
|
||
"decision_code"
|
||
],
|
||
"properties": {
|
||
"decision": {
|
||
"type": "string",
|
||
"enum": [
|
||
"approved",
|
||
"rejected"
|
||
]
|
||
},
|
||
"decided_visibility": {
|
||
"type": "string",
|
||
"enum": [
|
||
"internal",
|
||
"external"
|
||
]
|
||
},
|
||
"reviewer_ref": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 128
|
||
},
|
||
"decision_code": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 64
|
||
}
|
||
}
|
||
},
|
||
"ReleaseBatchCreateRequest": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"name",
|
||
"created_by"
|
||
],
|
||
"properties": {
|
||
"name": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 255
|
||
},
|
||
"created_by": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 128
|
||
},
|
||
"publication_ids": {
|
||
"type": "array",
|
||
"maxItems": 100,
|
||
"items": {
|
||
"type": "string",
|
||
"maxLength": 64
|
||
}
|
||
},
|
||
"delete_publication_ids": {
|
||
"type": "array",
|
||
"maxItems": 100,
|
||
"items": {
|
||
"type": "string",
|
||
"maxLength": 64
|
||
}
|
||
},
|
||
"release_change_set_id": {
|
||
"type": "string",
|
||
"description": "R1正式批次绑定的confirmed发布计划集ID;绑定时所有请求项必须在该集冻结清单内且可发布,否则422"
|
||
}
|
||
}
|
||
},
|
||
"ReleaseBatchSealRequest": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"sealed_by"
|
||
],
|
||
"properties": {
|
||
"sealed_by": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 128
|
||
}
|
||
}
|
||
},
|
||
"UISettingsCandidateRequest": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"document_refresh_seconds",
|
||
"resource_refresh_seconds",
|
||
"stalled_after_seconds",
|
||
"finalizing_after_seconds",
|
||
"updated_by"
|
||
],
|
||
"properties": {
|
||
"document_refresh_seconds": {
|
||
"type": "integer",
|
||
"enum": [
|
||
15,
|
||
30,
|
||
60
|
||
]
|
||
},
|
||
"resource_refresh_seconds": {
|
||
"type": "integer",
|
||
"enum": [
|
||
30,
|
||
60
|
||
]
|
||
},
|
||
"stalled_after_seconds": {
|
||
"type": "integer",
|
||
"enum": [
|
||
1800,
|
||
3600
|
||
]
|
||
},
|
||
"finalizing_after_seconds": {
|
||
"type": "integer",
|
||
"enum": [
|
||
7200,
|
||
14400
|
||
]
|
||
},
|
||
"updated_by": {
|
||
"type": "string",
|
||
"minLength": 2,
|
||
"maxLength": 128
|
||
}
|
||
}
|
||
},
|
||
"StartTestPublicationsRequest": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"publication_ids",
|
||
"operator_ref",
|
||
"reason"
|
||
],
|
||
"properties": {
|
||
"publication_ids": {
|
||
"type": "array",
|
||
"minItems": 1,
|
||
"maxItems": 100,
|
||
"items": {
|
||
"type": "string",
|
||
"maxLength": 64
|
||
}
|
||
},
|
||
"operator_ref": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 128
|
||
},
|
||
"reason": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 500
|
||
}
|
||
}
|
||
},
|
||
"ConfirmChangeSetRequest": {
|
||
"type": "object",
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"item_seqs",
|
||
"operator_ref",
|
||
"reason"
|
||
],
|
||
"properties": {
|
||
"item_seqs": {
|
||
"type": "array",
|
||
"minItems": 1,
|
||
"maxItems": 200,
|
||
"items": {
|
||
"type": "integer",
|
||
"minimum": 1
|
||
}
|
||
},
|
||
"operator_ref": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 128
|
||
},
|
||
"reason": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 500
|
||
}
|
||
}
|
||
},
|
||
"JobWindowMetrics": {
|
||
"type": "object",
|
||
"properties": {
|
||
"window_seconds": {
|
||
"type": "integer"
|
||
},
|
||
"jobs_started": {
|
||
"type": "integer"
|
||
},
|
||
"jobs_completed": {
|
||
"type": "integer"
|
||
},
|
||
"jobs_failed": {
|
||
"type": "integer"
|
||
},
|
||
"success_rate": {
|
||
"type": [
|
||
"number",
|
||
"null"
|
||
]
|
||
},
|
||
"failure_rate": {
|
||
"type": [
|
||
"number",
|
||
"null"
|
||
]
|
||
},
|
||
"duration_avg_seconds": {
|
||
"type": [
|
||
"number",
|
||
"null"
|
||
]
|
||
},
|
||
"duration_p50_seconds": {
|
||
"type": [
|
||
"number",
|
||
"null"
|
||
]
|
||
},
|
||
"duration_p95_seconds": {
|
||
"type": [
|
||
"number",
|
||
"null"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|