修订说明维护
这是预览能力:字段与行为可能在后续 minor 版本中调整,调整会写进更新日志。近 30 天内新增的能力,或在生产环境 90 天内没有调用记录的能力,标为「预览」;其余为「稳定」。预览能力的字段与行为可能在后续 minor 版本中调整,调整会写进更新日志。
接入前必读:完整状态、效力、鉴权、异步及错误边界见动态知识库接入指南:/swagger-ui/open-v1/docs/dynamic-knowledge。
分支调用边界:以下列出本页样例基础形态的权限与条件头;历史revision、confirmed标注、分组及参考稿保存的附加要求见各分支正文和接入指南,组合权限须同时具备。字段、类型、默认值、上限及互斥条件以本页请求Schema为准。业务响应no-store,写入后读取最新ETag,异步结果沿原任务入口取得。
GenerateDirectRevisionNotes · action=generate:必填action、payload、input_mode;权限dkWrite;Idempotency-Key必填;If-Match不需要;成功HTTP 200。input_mode=direct,传baseline_id、final_id及before_document/after_document;块id应跨版本稳定。可附events、references、unresolved_items和human_opinions。同步200返回修订对照、摘要、完整快照与核对状态。只传正文为comparison_only;事件逐项重放一致为events_verified;不符为inconsistent并列明问题,记录退回正文差异,不沿用未经核实的事件理由。依据引用逐字核对;理由、意见均属调用方提供。无需建库,不调用模型,不自动保存、确认或发布;dkWrite和Idempotency-Key必需,计算不保存幂等键。由现有Key、dkWrite与Space状态授权,无额外环境准入。apply已返回记录,无须重复调用。
ConfirmKnowledgeNoteContent · action=confirm_content:必填action、kb_id、note_id、payload;权限dkConfirm+dkRead+dkWrite;Idempotency-Key必填;If-Match必填;成功HTTP 202。确认当前修订说明内容用于问答,不确认因果判断或制度关系。要求dkRead、dkWrite、dkConfirm及If-Match;说明正文、来源或关联信息变化后需重新确认,旧快照不能借用新确认。
CreateKnowledgeRevisionNote · action=save:必填action、kb_id、payload;权限dkWrite;Idempotency-Key必填;If-Match不需要;成功HTTP 202。text/source_ref恰好一种;version_pairs必须显式提供,[]表示不指定版本关联的独立说明,关系保持待核对;非空前后版须同一主体且不同。新增的是修订说明,不是已确认变化原因;手工声明版本对也不自动确认因果,内容仍须单独确认用于问答。
EditKnowledgeRevisionNote · action=save:必填action、kb_id、note_id、payload;权限dkWrite;Idempotency-Key必填;If-Match必填;成功HTTP 202。修改说明后重新处理,保留修订记录;依赖旧说明的关系和原因可能待复核。provided_record省略保留、null清空;不得用当前说明来源替代旧任务原来源授权。
GetKnowledgeRevisionNote · action=get:必填action、kb_id、note_id;权限dkRead;Idempotency-Key不需要;If-Match不需要;成功HTTP 200。读取独立说明及关联/处理状态;当前读取还返回content_confirmed及confirmation_index,历史revision不附当前状态。正文、来源或关联改变后旧确认失效,活动快照有该对象也不代表已确认。说明可以没有普通文档目录项,不能据目录未命中判定跨库。来源可读仍不代表原件已完整、原因已确认。
ListKnowledgeRevisionNotes · action=list:必填action、kb_id;权限dkRead;Idempotency-Key不需要;If-Match不需要;成功HTTP 200。列出本库说明及状态,独立说明在此读取,不在list_documents重复显示;逐项来源核验和分页规则同样适用。
共同限制:ready不等于released,确认/快照发布不等于制度正式发布;旧来源撤权不能靠历史快照绕过。
请求
参数
| 名称 | 位置 | 类型 | 约束 | 说明 |
|---|---|---|---|---|
| Idempotency-Key | 请求头 | string | 长度≥1;长度≤128 | 仅写操作必填;同一次业务动作重试保持原值。 |
| If-Match | 请求头 | string | 修改、确认、撤销、纠错、索引设置和结构化新版保存必填;分组按对象ETag,指定批次另需本头部。 |
请求体
| 字段 | 类型 | 约束 | 说明 |
|---|---|---|---|
| 方案 1 | object | 不接受额外字段 | |
| action必填 | 常量 "generate" | ||
| payload必填 | object | 不接受额外字段 | |
| baseline_id必填 | string | 长度≥1;长度≤256 | |
| final_id必填 | string | 长度≥1;长度≤256 | |
| before_document必填 | object | 不接受额外字段 | |
| title | 任一 | 默认 null | |
| blocks必填 | array<object> | 项数≥1;项数≤1000 | |
| [ ] | object | 不接受额外字段 | |
| id必填 | string | 长度≥1;长度≤128 | |
| type | string | 枚举 "paragraph" / "heading" / "table" / "formula";默认 "paragraph" | |
| text必填 | string | 长度≤100000 | |
| section_path | array<string> | 项数≤32 | |
| table_cells | array<object> | 项数≤10000 | |
| source_anchor | object | 不接受额外字段 | |
| page | 任一 | 默认 null | |
| bbox | 任一 | 默认 null | |
| coordinate_system | 任一 | 默认 null | |
| char_start | 任一 | 默认 null | |
| char_end | 任一 | 默认 null | |
| table_row | 任一 | 默认 null | |
| table_column | 任一 | 默认 null | |
| parent_id | 任一 | 默认 null | |
| number | 任一 | 默认 null | |
| after_document必填 | object | 不接受额外字段 | |
| title | 任一 | 默认 null | |
| blocks必填 | array<object> | 项数≥1;项数≤1000 | |
| [ ] | object | 不接受额外字段 | |
| id必填 | string | 长度≥1;长度≤128 | |
| type | string | 枚举 "paragraph" / "heading" / "table" / "formula";默认 "paragraph" | |
| text必填 | string | 长度≤100000 | |
| section_path | array<string> | 项数≤32 | |
| table_cells | array<object> | 项数≤10000 | |
| source_anchor | object | 不接受额外字段 | |
| page | 任一 | 默认 null | |
| bbox | 任一 | 默认 null | |
| coordinate_system | 任一 | 默认 null | |
| char_start | 任一 | 默认 null | |
| char_end | 任一 | 默认 null | |
| table_row | 任一 | 默认 null | |
| table_column | 任一 | 默认 null | |
| parent_id | 任一 | 默认 null | |
| number | 任一 | 默认 null | |
| events | 任一 | 默认 null | |
| [ ] | object | 不接受额外字段 | |
| event_id必填 | string | ||
| operation_id必填 | string | ||
| operation必填 | string | 枚举 "replace" / "delete" / "insert_after" / "renumber" / "update_reference" | |
| block_id必填 | string | ||
| anchor_block_id必填 | 任一 | ||
| before必填 | 任一 | ||
| id必填 | string | 长度≥1;长度≤128 | |
| type | string | 枚举 "paragraph" / "heading" / "table" / "formula";默认 "paragraph" | |
| text必填 | string | 长度≤100000 | |
| section_path | array<string> | 项数≤32 | |
| table_cells | array<object> | 项数≤10000 | |
| source_anchor | object | 不接受额外字段 | |
| page | 任一 | 默认 null | |
| bbox | 任一 | 默认 null | |
| coordinate_system | 任一 | 默认 null | |
| char_start | 任一 | 默认 null | |
| char_end | 任一 | 默认 null | |
| table_row | 任一 | 默认 null | |
| table_column | 任一 | 默认 null | |
| parent_id | 任一 | 默认 null | |
| number | 任一 | 默认 null | |
| after必填 | 任一 | ||
| id必填 | string | 长度≥1;长度≤128 | |
| type | string | 枚举 "paragraph" / "heading" / "table" / "formula";默认 "paragraph" | |
| text必填 | string | 长度≤100000 | |
| section_path | array<string> | 项数≤32 | |
| table_cells | array<object> | 项数≤10000 | |
| source_anchor | object | 不接受额外字段 | |
| page | 任一 | 默认 null | |
| bbox | 任一 | 默认 null | |
| coordinate_system | 任一 | 默认 null | |
| char_start | 任一 | 默认 null | |
| char_end | 任一 | 默认 null | |
| table_row | 任一 | 默认 null | |
| table_column | 任一 | 默认 null | |
| parent_id | 任一 | 默认 null | |
| number | 任一 | 默认 null | |
| rationale必填 | 任一 | ||
| citations必填 | array<object> | ||
| [ ] | object | 不接受额外字段 | |
| reference_id必填 | string | 长度≥1;长度≤128 | |
| block_id必填 | string | 长度≥1;长度≤128 | |
| quote必填 | string | 长度≥1;长度≤100000 | |
| reference_updates | array<object> | 项数≤3000 | |
| [ ] | object | 不接受额外字段 | |
| block_id必填 | string | ||
| field必填 | string | 枚举 "text" / "table_cells.text" | |
| cell_index必填 | 任一 | ||
| offset_unit | 常量 "utf-16-code-unit" | 默认 "utf-16-code-unit" | |
| source_start必填 | integer | ||
| source_end必填 | integer | ||
| result_start必填 | integer | ||
| result_end必填 | integer | ||
| quote必填 | string | ||
| target_block_id必填 | string | ||
| replacement必填 | string | ||
| reference_review_items | array<object> | 项数≤3000 | |
| [ ] | object | 不接受额外字段 | |
| block_id必填 | string | ||
| field必填 | string | 枚举 "text" / "table_cells.text" | |
| cell_index必填 | 任一 | ||
| offset_unit | 常量 "utf-16-code-unit" | 默认 "utf-16-code-unit" | |
| source_start必填 | integer | ||
| source_end必填 | integer | ||
| result_start必填 | integer | ||
| result_end必填 | integer | ||
| quote必填 | string | ||
| reason必填 | string | 枚举 "ambiguous_target" / "target_deleted" / "unresolved_target" / "unqualified_reference" / "external_reference" / "compound_reference" / "quoted_reference" / "changed_source" | |
| candidate_block_ids必填 | array<string> | ||
| message必填 | string | ||
| references | array<object> | 项数≤100 | |
| [ ] | object | 不接受额外字段 | |
| id必填 | string | 长度≥1;长度≤128 | |
| text必填 | string | 长度≥1;长度≤100000 | |
| title必填 | string | 长度≥1;长度≤255 | |
| source_description必填 | string | 长度≥1;长度≤4000 | |
| unresolved_items | array<object> | 项数≤100 | |
| [ ] | object | 不接受额外字段 | |
| id必填 | string | 长度≥1;长度≤128 | |
| text必填 | string | 长度≥1;长度≤4000 | |
| event_ids | array<string> | 项数≤1000 | |
| human_opinions | array<object> | 项数≤100 | |
| [ ] | object | 不接受额外字段 | |
| id必填 | string | 长度≥1;长度≤128 | |
| text必填 | string | 长度≥1;长度≤4000 | |
| event_ids | array<string> | 项数≤1000 | |
| reference_updates | array<object> | 项数≤3000 | |
| [ ] | object | 不接受额外字段 | |
| block_id必填 | string | ||
| field必填 | string | 枚举 "text" / "table_cells.text" | |
| cell_index必填 | 任一 | ||
| offset_unit | 常量 "utf-16-code-unit" | 默认 "utf-16-code-unit" | |
| source_start必填 | integer | ||
| source_end必填 | integer | ||
| result_start必填 | integer | ||
| result_end必填 | integer | ||
| quote必填 | string | ||
| target_block_id必填 | string | ||
| replacement必填 | string | ||
| reference_review_items | array<object> | 项数≤3000 | |
| [ ] | object | 不接受额外字段 | |
| block_id必填 | string | ||
| field必填 | string | 枚举 "text" / "table_cells.text" | |
| cell_index必填 | 任一 | ||
| offset_unit | 常量 "utf-16-code-unit" | 默认 "utf-16-code-unit" | |
| source_start必填 | integer | ||
| source_end必填 | integer | ||
| result_start必填 | integer | ||
| result_end必填 | integer | ||
| quote必填 | string | ||
| reason必填 | string | 枚举 "ambiguous_target" / "target_deleted" / "unresolved_target" / "unqualified_reference" / "external_reference" / "compound_reference" / "quoted_reference" / "changed_source" | |
| candidate_block_ids必填 | array<string> | ||
| message必填 | string | ||
| input_mode必填 | 常量 "direct" | ||
| 方案 2 | object | 不接受额外字段 | |
| action必填 | 常量 "confirm_content" | ||
| kb_id必填 | string | 长度≥1;长度≤32 | |
| note_id必填 | string | 长度≥1;长度≤32 | |
| payload必填 | object | 不接受额外字段 | |
| edit_reason必填 | string | 长度≥1;长度≤1000 | |
| 方案 3 | object | 不接受额外字段 | |
| action必填 | 常量 "save" | ||
| kb_id必填 | string | 长度≥1;长度≤32 | |
| note_id | null | 默认 null | |
| payload必填 | object | 不接受额外字段 | |
| text | 任一 | 默认 null | |
| source_ref | 任一 | 默认 null | |
| source_id必填 | string | 长度≥1;长度≤128;正则 ^[A-Za-z0-9_.-]+$ | |
| file_id必填 | string | 长度≥1;长度≤256 | |
| source_revision | 任一 | 默认 null | |
| provided_record | 任一 | 默认 null | |
| title必填 | string | 长度≥1;长度≤255 | |
| record_id | 任一 | 默认 null | |
| provider | 任一 | 默认 null | |
| recorded_at | 任一 | 默认 null | |
| version_pairs必填 | array<object> | 项数≤100 | |
| [ ] | object | 不接受额外字段 | |
| from_version_id必填 | string | ||
| to_version_id必填 | string | ||
| edit_reason | string | 默认 "添加修订说明";长度≥1;长度≤1000 | |
| 方案 4 | object | 不接受额外字段 | |
| action必填 | 常量 "save" | ||
| kb_id必填 | string | 长度≥1;长度≤32 | |
| note_id必填 | string | 长度≥1;长度≤32 | |
| payload必填 | object | 不接受额外字段 | |
| text | 任一 | 默认 null | |
| source_ref | 任一 | 默认 null | |
| source_id必填 | string | 长度≥1;长度≤128;正则 ^[A-Za-z0-9_.-]+$ | |
| file_id必填 | string | 长度≥1;长度≤256 | |
| source_revision | 任一 | 默认 null | |
| provided_record | 任一 | 默认 null | |
| title必填 | string | 长度≥1;长度≤255 | |
| record_id | 任一 | 默认 null | |
| provider | 任一 | 默认 null | |
| recorded_at | 任一 | 默认 null | |
| version_pairs必填 | array<object> | 项数≤100 | |
| [ ] | object | 不接受额外字段 | |
| from_version_id必填 | string | ||
| to_version_id必填 | string | ||
| edit_reason | string | 默认 "添加修订说明";长度≥1;长度≤1000 | |
| 方案 5 | object | 不接受额外字段 | |
| action必填 | 常量 "get" | ||
| kb_id必填 | string | 长度≥1;长度≤32 | |
| note_id必填 | string | 长度≥1;长度≤32 | |
| revision | 任一 | 默认 null | |
| 方案 6 | object | 不接受额外字段 | |
| action必填 | 常量 "list" | ||
| kb_id必填 | string | 长度≥1;长度≤32 | |
| cursor | string | 默认 "";长度≤32 | |
| limit | integer | 默认 50;≥1;≤100 |
响应
展开 data 结构(263 个字段)
| 字段 | 类型 | 约束 | 说明 |
|---|---|---|---|
| data | 任一 | ||
| 方案 1 | object | ||
| id必填 | string | ||
| kb_id必填 | string | ||
| kind必填 | string | ||
| state必填 | string | ||
| parent_id必填 | string | null | ||
| revision必填 | integer | ≥1 | |
| etag必填 | string | ||
| body必填 | object | 对应 kind 的固定修订内容;读取历史修订需要审计权限。 | |
| content_confirmed | boolean | ||
| confirmation_index | object | ||
| state必填 | 任意 | 枚举 "not_eligible" / "pending" / "ready" / "failed" | |
| job_id必填 | string | null | ||
| action必填 | 常量 "get" | ||
| 方案 2 | object | ||
| items必填 | array<object> | ||
| [ ] | object | ||
| id必填 | string | ||
| kb_id必填 | string | ||
| kind必填 | string | ||
| state必填 | string | ||
| parent_id必填 | string | null | ||
| revision必填 | integer | ≥1 | |
| etag必填 | string | ||
| body必填 | object | 对应 kind 的固定修订内容;读取历史修订需要审计权限。 | |
| content_confirmed | boolean | ||
| confirmation_index | object | ||
| state必填 | 任意 | 枚举 "not_eligible" / "pending" / "ready" / "failed" | |
| job_id必填 | string | null | ||
| next_cursor必填 | string | null | ||
| action必填 | 常量 "list" | ||
| 方案 3 | object | 不接受额外字段 | |
| action必填 | 常量 "generate" | ||
| input_mode | 常量 "direct" | 默认 "direct" | |
| record_id必填 | string | ||
| baseline_id必填 | string | ||
| final_id必填 | string | ||
| baseline_fingerprint必填 | string | ||
| final_fingerprint必填 | string | ||
| verification_status必填 | string | 枚举 "comparison_only" / "events_verified" / "inconsistent" | |
| event_source必填 | string | 枚举 "supplied_verified" / "snapshot_comparison" | |
| summary_text必填 | string | ||
| revision_notes必填 | object | 不接受额外字段 | |
| baseline_id必填 | string | ||
| result_id必填 | string | ||
| summary必填 | object | 不接受额外字段 | |
| total必填 | integer | ||
| replace必填 | integer | ||
| delete必填 | integer | ||
| insert_after必填 | integer | ||
| renumber | integer | 默认 0 | |
| update_reference | integer | 默认 0 | |
| rows必填 | array<object> | ||
| [ ] | object | 不接受额外字段 | |
| event_id必填 | string | ||
| operation_id必填 | string | ||
| operation必填 | string | 枚举 "replace" / "delete" / "insert_after" / "renumber" / "update_reference" | |
| block_id必填 | string | ||
| before_text必填 | 任一 | ||
| after_text必填 | 任一 | ||
| before_number必填 | 任一 | ||
| after_number必填 | 任一 | ||
| rationale必填 | 任一 | ||
| citations必填 | array<object> | ||
| [ ] | object | 不接受额外字段 | |
| reference_id必填 | string | 长度≥1;长度≤128 | |
| block_id必填 | string | 长度≥1;长度≤128 | |
| quote必填 | string | 长度≥1;长度≤100000 | |
| reference_updates | array<object> | ||
| [ ] | object | 不接受额外字段 | |
| block_id必填 | string | ||
| field必填 | string | 枚举 "text" / "table_cells.text" | |
| cell_index必填 | 任一 | ||
| offset_unit | 常量 "utf-16-code-unit" | 默认 "utf-16-code-unit" | |
| source_start必填 | integer | ||
| source_end必填 | integer | ||
| result_start必填 | integer | ||
| result_end必填 | integer | ||
| quote必填 | string | ||
| target_block_id必填 | string | ||
| replacement必填 | string | ||
| references必填 | array<object> | ||
| [ ] | object | 不接受额外字段 | |
| id必填 | string | 长度≥1;长度≤128 | |
| text必填 | string | 长度≥1;长度≤100000 | |
| title必填 | string | 长度≥1;长度≤255 | |
| source_description必填 | string | 长度≥1;长度≤4000 | |
| unresolved_items | array<object> | ||
| [ ] | object | 不接受额外字段 | |
| block_id必填 | string | ||
| field必填 | string | 枚举 "text" / "table_cells.text" | |
| cell_index必填 | 任一 | ||
| offset_unit | 常量 "utf-16-code-unit" | 默认 "utf-16-code-unit" | |
| source_start必填 | integer | ||
| source_end必填 | integer | ||
| result_start必填 | integer | ||
| result_end必填 | integer | ||
| quote必填 | string | ||
| reason必填 | string | 枚举 "ambiguous_target" / "target_deleted" / "unresolved_target" / "unqualified_reference" / "external_reference" / "compound_reference" / "quoted_reference" / "changed_source" | |
| candidate_block_ids必填 | array<string> | ||
| message必填 | string | ||
| events必填 | array<object> | ||
| [ ] | object | 不接受额外字段 | |
| event_id必填 | string | ||
| operation_id必填 | string | ||
| operation必填 | string | 枚举 "replace" / "delete" / "insert_after" / "renumber" / "update_reference" | |
| block_id必填 | string | ||
| anchor_block_id必填 | 任一 | ||
| before必填 | 任一 | ||
| id必填 | string | 长度≥1;长度≤128 | |
| type | string | 枚举 "paragraph" / "heading" / "table" / "formula";默认 "paragraph" | |
| text必填 | string | 长度≤100000 | |
| section_path | array<string> | 项数≤32 | |
| table_cells | array<object> | 项数≤10000 | |
| source_anchor | object | 不接受额外字段 | |
| page | 任一 | 默认 null | |
| bbox | 任一 | 默认 null | |
| coordinate_system | 任一 | 默认 null | |
| char_start | 任一 | 默认 null | |
| char_end | 任一 | 默认 null | |
| table_row | 任一 | 默认 null | |
| table_column | 任一 | 默认 null | |
| parent_id | 任一 | 默认 null | |
| number | 任一 | 默认 null | |
| after必填 | 任一 | ||
| id必填 | string | 长度≥1;长度≤128 | |
| type | string | 枚举 "paragraph" / "heading" / "table" / "formula";默认 "paragraph" | |
| text必填 | string | 长度≤100000 | |
| section_path | array<string> | 项数≤32 | |
| table_cells | array<object> | 项数≤10000 | |
| source_anchor | object | 不接受额外字段 | |
| page | 任一 | 默认 null | |
| bbox | 任一 | 默认 null | |
| coordinate_system | 任一 | 默认 null | |
| char_start | 任一 | 默认 null | |
| char_end | 任一 | 默认 null | |
| table_row | 任一 | 默认 null | |
| table_column | 任一 | 默认 null | |
| parent_id | 任一 | 默认 null | |
| number | 任一 | 默认 null | |
| rationale必填 | 任一 | ||
| citations必填 | array<object> | ||
| [ ] | object | 不接受额外字段 | |
| reference_id必填 | string | 长度≥1;长度≤128 | |
| block_id必填 | string | 长度≥1;长度≤128 | |
| quote必填 | string | 长度≥1;长度≤100000 | |
| reference_updates | array<object> | 项数≤3000 | |
| [ ] | object | 不接受额外字段 | |
| block_id必填 | string | ||
| field必填 | string | 枚举 "text" / "table_cells.text" | |
| cell_index必填 | 任一 | ||
| offset_unit | 常量 "utf-16-code-unit" | 默认 "utf-16-code-unit" | |
| source_start必填 | integer | ||
| source_end必填 | integer | ||
| result_start必填 | integer | ||
| result_end必填 | integer | ||
| quote必填 | string | ||
| target_block_id必填 | string | ||
| replacement必填 | string | ||
| reference_review_items | array<object> | 项数≤3000 | |
| [ ] | object | 不接受额外字段 | |
| block_id必填 | string | ||
| field必填 | string | 枚举 "text" / "table_cells.text" | |
| cell_index必填 | 任一 | ||
| offset_unit | 常量 "utf-16-code-unit" | 默认 "utf-16-code-unit" | |
| source_start必填 | integer | ||
| source_end必填 | integer | ||
| result_start必填 | integer | ||
| result_end必填 | integer | ||
| quote必填 | string | ||
| reason必填 | string | 枚举 "ambiguous_target" / "target_deleted" / "unresolved_target" / "unqualified_reference" / "external_reference" / "compound_reference" / "quoted_reference" / "changed_source" | |
| candidate_block_ids必填 | array<string> | ||
| message必填 | string | ||
| submitted_events必填 | 任一 | ||
| [ ] | object | 不接受额外字段 | |
| event_id必填 | string | ||
| operation_id必填 | string | ||
| operation必填 | string | 枚举 "replace" / "delete" / "insert_after" / "renumber" / "update_reference" | |
| block_id必填 | string | ||
| anchor_block_id必填 | 任一 | ||
| before必填 | 任一 | ||
| id必填 | string | 长度≥1;长度≤128 | |
| type | string | 枚举 "paragraph" / "heading" / "table" / "formula";默认 "paragraph" | |
| text必填 | string | 长度≤100000 | |
| section_path | array<string> | 项数≤32 | |
| table_cells | array<object> | 项数≤10000 | |
| source_anchor | object | 不接受额外字段 | |
| page | 任一 | 默认 null | |
| bbox | 任一 | 默认 null | |
| coordinate_system | 任一 | 默认 null | |
| char_start | 任一 | 默认 null | |
| char_end | 任一 | 默认 null | |
| table_row | 任一 | 默认 null | |
| table_column | 任一 | 默认 null | |
| parent_id | 任一 | 默认 null | |
| number | 任一 | 默认 null | |
| after必填 | 任一 | ||
| id必填 | string | 长度≥1;长度≤128 | |
| type | string | 枚举 "paragraph" / "heading" / "table" / "formula";默认 "paragraph" | |
| text必填 | string | 长度≤100000 | |
| section_path | array<string> | 项数≤32 | |
| table_cells | array<object> | 项数≤10000 | |
| source_anchor | object | 不接受额外字段 | |
| page | 任一 | 默认 null | |
| bbox | 任一 | 默认 null | |
| coordinate_system | 任一 | 默认 null | |
| char_start | 任一 | 默认 null | |
| char_end | 任一 | 默认 null | |
| table_row | 任一 | 默认 null | |
| table_column | 任一 | 默认 null | |
| parent_id | 任一 | 默认 null | |
| number | 任一 | 默认 null | |
| rationale必填 | 任一 | ||
| citations必填 | array<object> | ||
| [ ] | object | 不接受额外字段 | |
| reference_id必填 | string | 长度≥1;长度≤128 | |
| block_id必填 | string | 长度≥1;长度≤128 | |
| quote必填 | string | 长度≥1;长度≤100000 | |
| reference_updates | array<object> | 项数≤3000 | |
| [ ] | object | 不接受额外字段 | |
| block_id必填 | string | ||
| field必填 | string | 枚举 "text" / "table_cells.text" | |
| cell_index必填 | 任一 | ||
| offset_unit | 常量 "utf-16-code-unit" | 默认 "utf-16-code-unit" | |
| source_start必填 | integer | ||
| source_end必填 | integer | ||
| result_start必填 | integer | ||
| result_end必填 | integer | ||
| quote必填 | string | ||
| target_block_id必填 | string | ||
| replacement必填 | string | ||
| reference_review_items | array<object> | 项数≤3000 | |
| [ ] | object | 不接受额外字段 | |
| block_id必填 | string | ||
| field必填 | string | 枚举 "text" / "table_cells.text" | |
| cell_index必填 | 任一 | ||
| offset_unit | 常量 "utf-16-code-unit" | 默认 "utf-16-code-unit" | |
| source_start必填 | integer | ||
| source_end必填 | integer | ||
| result_start必填 | integer | ||
| result_end必填 | integer | ||
| quote必填 | string | ||
| reason必填 | string | 枚举 "ambiguous_target" / "target_deleted" / "unresolved_target" / "unqualified_reference" / "external_reference" / "compound_reference" / "quoted_reference" / "changed_source" | |
| candidate_block_ids必填 | array<string> | ||
| message必填 | string | ||
| title_change必填 | 任一 | ||
| inconsistencies必填 | array<object> | ||
| [ ] | object | 不接受额外字段 | |
| code必填 | string | 枚举 "invalid_event" / "before_mismatch" / "invalid_citation" / "final_mismatch" / "unknown_event" | |
| event_id | 任一 | 默认 null | |
| block_id | 任一 | 默认 null | |
| message必填 | string | ||
| unresolved_items必填 | array<object> | ||
| [ ] | object | 不接受额外字段 | |
| id必填 | string | 长度≥1;长度≤128 | |
| text必填 | string | 长度≥1;长度≤4000 | |
| event_ids | array<string> | 项数≤1000 | |
| human_opinions必填 | array<object> | ||
| [ ] | object | 不接受额外字段 | |
| id必填 | string | 长度≥1;长度≤128 | |
| text必填 | string | 长度≥1;长度≤4000 | |
| event_ids | array<string> | 项数≤1000 |
| 字段 | 类型 | 约束 | 说明 |
|---|---|---|---|
| data | 任一 | ||
| 方案 1 | object | ||
| job_id必填 | string | ||
| status必填 | 常量 "queued" | ||
| status_url必填 | string | 正则 ^/open/v1/job/[0-9a-f]{32}$ | 查询任务状态,成功后在该地址追加 /result 读取结果。 |
| etag | string | ||
| note_id必填 | string | ||
| action必填 | 常量 "save" | ||
| 方案 2 | object | ||
| job_id必填 | string | ||
| status必填 | 常量 "queued" | ||
| status_url必填 | string | 正则 ^/open/v1/job/[0-9a-f]{32}$ | 查询任务状态,成功后在该地址追加 /result 读取结果。 |
| etag | string | ||
| note_id必填 | string | ||
| action必填 | 常量 "confirm_content" |
异步接口:返回 202 后,用 data.job_id 调用 getJob 轮询;状态 succeeded 后调用 getJobResult 读取结果。详见异步任务。
错误状态
| HTTP | 含义 |
|---|---|
| 400 | 请求参数无效 |
| 401 | API Key 无效 |
| 403 | API Key 无权限 |
| 404 | 文档、任务或其他资源不存在 |
| 409 | 幂等键、任务状态或资源状态冲突 |
| 412 | 资源修订已变化,请重新读取后提交 |
| 413 | 请求体过大 |
| 422 | 文件内容无法转换(已确认文件被截断、不完整,重传无效) |
| 428 | 缺少资源修订前置条件 If-Match |
| 429 | 队列或模型并发额度已满,请稍后重试 |
| 503 | 能力暂不可用 |