文档、讨论和文件 API

文档、公告和讨论、Drive 里的文件和文件夹,以及正文里的附件。

由群历 REST API 的 OpenAPI 契约(openapi/qunli-api.yaml,qunli-api 提交 f18e40d)生成。路径都相对于 https://qunli.co;认证见认证,响应包装、分页和错误格式见约定。字段说明是契约里的英文原文。

文档

GET/api/v1/accounts/{account_id}/documents

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
content查询full | summary否full (default): rows carry their whole body. summary: rows leave out content_html, content_json, content_markdown and content_version and carry only preview_text / excerpt (documents: also preview_html); read one record for its body. Other values → 400 param_invalid.默认 full

响应

状态说明返回
200Document listdata: Recording[]
401Missing or invalid authentication.ProblemDetails

POST/api/v1/accounts/{account_id}/documents

Create a document (account-scoped; project_id in the body)

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。

请求体application/json,必填

字段类型必填说明
project_idstring (uuid)否createAccountDocument only — the project to create the document in.
recordingobject否
recording.idstring (uuid)否
recording.titlestring否
recording.statusstring否
recording.content_htmlstring | null否已弃用
recording.content_jsonany否已弃用
recording.content_markdownstring | null否Canonical body (GFM). When present the server renders and sanitizes content_html from it, ignoring any client-sent content_html/content_json. Preferred over content_html and content_json for new integrations. Hard cap 131072 bytes (128KB, UTF-8 bytes — not characters); a larger body is rejected with 422 validation_error ("正文超出 128KB 上限"): upload long content as an attachment or split it into multiple documents. Pre-existing over-limit rows stay readable and editable as long as the body is untouched.
recording.content_versioninteger | null否Update only. The content_version the edit started from (recommended for every body edit). When present and the request changes the body, a stale value is refused with 409 content_conflict and nothing is written; the problem body carries the current content_version. Omit it (or send null) for last-write-wins. Title- or metadata-only updates never conflict.
recording.parent_idstring | null否Drive folder ref ("B12") or uuid to create/keep the document in.
documentobject否
document.idstring (uuid)否

响应

状态说明返回
201Created documentdata: Recording
401Missing or invalid authentication.ProblemDetails
403Authenticated but not permitted.ProblemDetails
422Validation failed.ProblemDetails

GET/api/v1/accounts/{account_id}/documents/{id}

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

响应

状态说明返回
200Documentdata: Recording
401Missing or invalid authentication.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails

PATCH/api/v1/accounts/{account_id}/documents/{id}

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

请求体application/json,必填

字段类型必填说明
project_idstring (uuid)否createAccountDocument only — the project to create the document in.
recordingobject否
recording.idstring (uuid)否
recording.titlestring否
recording.statusstring否
recording.content_htmlstring | null否已弃用
recording.content_jsonany否已弃用
recording.content_markdownstring | null否Canonical body (GFM). When present the server renders and sanitizes content_html from it, ignoring any client-sent content_html/content_json. Preferred over content_html and content_json for new integrations. Hard cap 131072 bytes (128KB, UTF-8 bytes — not characters); a larger body is rejected with 422 validation_error ("正文超出 128KB 上限"): upload long content as an attachment or split it into multiple documents. Pre-existing over-limit rows stay readable and editable as long as the body is untouched.
recording.content_versioninteger | null否Update only. The content_version the edit started from (recommended for every body edit). When present and the request changes the body, a stale value is refused with 409 content_conflict and nothing is written; the problem body carries the current content_version. Omit it (or send null) for last-write-wins. Title- or metadata-only updates never conflict.
recording.parent_idstring | null否Drive folder ref ("B12") or uuid to create/keep the document in.
documentobject否
document.idstring (uuid)否

响应

状态说明返回
200Updated documentdata: Recording
401Missing or invalid authentication.ProblemDetails
403Authenticated but not permitted.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails
409content_conflict — the body was saved elsewhere since the request's recording.content_version; nothing was written. Rebase the edit onto the returned content_version (or reload) and save again.ProblemDetails
422Validation failed.ProblemDetails

DELETE/api/v1/accounts/{account_id}/documents/{id}

Soft-delete a document (returns the trashed recording)

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

响应

状态说明返回
200Trashed documentdata: Recording
401Missing or invalid authentication.ProblemDetails
403Authenticated but not permitted.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails

GET/api/v1/accounts/{account_id}/documents/{id}/publication_recipients

Preview who will be notified when the document is published

Includes publication notifications and pending mentions as if the caller published it now, excluding the author, the caller, people without access, and (when the caller is an agent) other agents who would only get a publication notice or whose mention the caller's remaining hourly agent → agent allowance does not cover (mentions take the remaining slots in body order). The list is refreshed at publication time. Does not send notifications or spend the allowance.

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

响应

状态说明返回
200Current publication recipientsdata: UserRef[]
401Missing or invalid authentication.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails

GET/api/v1/accounts/{account_id}/projects/{project_id}/documents

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
project_id路径string是
content查询full | summary否full (default): rows carry their whole body. summary: rows leave out content_html, content_json, content_markdown and content_version and carry only preview_text / excerpt (documents: also preview_html); read one record for its body. Other values → 400 param_invalid.默认 full

响应

状态说明返回
200Document listdata: Recording[]
401Missing or invalid authentication.ProblemDetails

POST/api/v1/accounts/{account_id}/projects/{project_id}/documents

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
project_id路径string是

请求体application/json,必填

字段类型必填说明
project_idstring (uuid)否createAccountDocument only — the project to create the document in.
recordingobject否
recording.idstring (uuid)否
recording.titlestring否
recording.statusstring否
recording.content_htmlstring | null否已弃用
recording.content_jsonany否已弃用
recording.content_markdownstring | null否Canonical body (GFM). When present the server renders and sanitizes content_html from it, ignoring any client-sent content_html/content_json. Preferred over content_html and content_json for new integrations. Hard cap 131072 bytes (128KB, UTF-8 bytes — not characters); a larger body is rejected with 422 validation_error ("正文超出 128KB 上限"): upload long content as an attachment or split it into multiple documents. Pre-existing over-limit rows stay readable and editable as long as the body is untouched.
recording.content_versioninteger | null否Update only. The content_version the edit started from (recommended for every body edit). When present and the request changes the body, a stale value is refused with 409 content_conflict and nothing is written; the problem body carries the current content_version. Omit it (or send null) for last-write-wins. Title- or metadata-only updates never conflict.
recording.parent_idstring | null否Drive folder ref ("B12") or uuid to create/keep the document in.
documentobject否
document.idstring (uuid)否

响应

状态说明返回
201Created documentdata: Recording
401Missing or invalid authentication.ProblemDetails
403Authenticated but not permitted.ProblemDetails
422Validation failed.ProblemDetails

讨论

GET/api/v1/accounts/{account_id}/messages

List message recordings across the account

Active messages in accessible projects, newest first (created_at DESC, id DESC). Follow meta.has_next with page + 1 to read all messages.

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
content查询full | summary否full (default): rows carry their whole body. summary: rows leave out content_html, content_json, content_markdown and content_version and carry only preview_text / excerpt (documents: also preview_html); read one record for its body. Other values → 400 param_invalid.默认 full
page查询integer否默认 1
limit查询integer否Clamped to 1–100.默认 30

响应

状态说明返回
200Message listdata: Recording[] · meta: PaginationMeta
400Malformed request or invalid parameter.ProblemDetails
401Missing or invalid authentication.ProblemDetails

GET/api/v1/accounts/{account_id}/messages/{id}

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

响应

状态说明返回
200Messagedata: Recording
401Missing or invalid authentication.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails

PATCH/api/v1/accounts/{account_id}/messages/{id}

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

请求体application/json,必填

字段类型必填说明
recordingRecordingFields否The fields every recording type shares, sent under recording. id is create-only (a client-generated UUID).
recording.idstring (uuid)否
recording.titlestring否
recording.statusstring否
recording.content_htmlstring | null否已弃用
recording.content_jsonany否已弃用
recording.content_markdownstring | null否Canonical body (GFM). When present the server renders and sanitizes content_html from it, ignoring any client-sent content_html/content_json. Preferred over content_html and content_json for new integrations. Hard cap 131072 bytes (128KB, UTF-8 bytes — not characters); a larger body is rejected with 422 validation_error ("正文超出 128KB 上限"): upload long content as an attachment or split it into multiple documents. Pre-existing over-limit rows stay readable and editable as long as the body is untouched.
recording.content_versioninteger | null否Update only. The content_version the edit started from (recommended for every body edit). When present and the request changes the body, a stale value is refused with 409 content_conflict and nothing is written; the problem body carries the current content_version. Omit it (or send null) for last-write-wins. Title- or metadata-only updates never conflict.
messageobject否
message.idstring (uuid)否

响应

状态说明返回
200Updated messagedata: Recording
401Missing or invalid authentication.ProblemDetails
403Authenticated but not permitted.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails
409content_conflict — the body was saved elsewhere since the request's recording.content_version; nothing was written. Rebase the edit onto the returned content_version (or reload) and save again.ProblemDetails
422Validation failed.ProblemDetails

DELETE/api/v1/accounts/{account_id}/messages/{id}

Soft-delete a message (returns the trashed recording)

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

响应

状态说明返回
200Trashed messagedata: Recording
401Missing or invalid authentication.ProblemDetails
403Authenticated but not permitted.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails

GET/api/v1/accounts/{account_id}/projects/{project_id}/messages

Active messages, newest first (created_at DESC, id DESC). Returns pagination meta; follow meta.has_next with page + 1 for older messages.

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
project_id路径string是
content查询full | summary否full (default): rows carry their whole body. summary: rows leave out content_html, content_json, content_markdown and content_version and carry only preview_text / excerpt (documents: also preview_html); read one record for its body. Other values → 400 param_invalid.默认 full
page查询integer否默认 1
limit查询integer否Clamped to 1–100.默认 30

响应

状态说明返回
200Message listdata: Recording[] · meta: PaginationMeta
400Malformed request or invalid parameter.ProblemDetails
401Missing or invalid authentication.ProblemDetails

POST/api/v1/accounts/{account_id}/projects/{project_id}/messages

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
project_id路径string是

请求体application/json,必填

字段类型必填说明
recordingRecordingFields否The fields every recording type shares, sent under recording. id is create-only (a client-generated UUID).
recording.idstring (uuid)否
recording.titlestring否
recording.statusstring否
recording.content_htmlstring | null否已弃用
recording.content_jsonany否已弃用
recording.content_markdownstring | null否Canonical body (GFM). When present the server renders and sanitizes content_html from it, ignoring any client-sent content_html/content_json. Preferred over content_html and content_json for new integrations. Hard cap 131072 bytes (128KB, UTF-8 bytes — not characters); a larger body is rejected with 422 validation_error ("正文超出 128KB 上限"): upload long content as an attachment or split it into multiple documents. Pre-existing over-limit rows stay readable and editable as long as the body is untouched.
recording.content_versioninteger | null否Update only. The content_version the edit started from (recommended for every body edit). When present and the request changes the body, a stale value is refused with 409 content_conflict and nothing is written; the problem body carries the current content_version. Omit it (or send null) for last-write-wins. Title- or metadata-only updates never conflict.
messageobject否
message.idstring (uuid)否

响应

状态说明返回
201Created messagedata: Recording
401Missing or invalid authentication.ProblemDetails
403Authenticated but not permitted.ProblemDetails
422Validation failed.ProblemDetails

文件和文件夹

GET/api/v1/accounts/{account_id}/projects/{project_id}/drive_items

Lists one folder level (parent_id, blank = project root) or the whole tree (recursive=true). Folders always come first, then the requested sort. Every item carries its full fields — the same shape as the single-item endpoints (documents include their body, uploads their file URLs, folders their children_count). Drafts and trashed items are omitted.

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
project_id路径string是
content查询full | summary否full (default): rows carry their whole body. summary: rows leave out content_html, content_json, content_markdown and content_version and carry only preview_text / excerpt (documents: also preview_html); read one record for its body. Other values → 400 param_invalid.默认 full
parent_id查询string否Folder ref ("B12") or recording uuid; omit for the project root.
recursive查询boolean否List every level of the project's drive (parent_id is ignored).
type查询string否Comma-separated recordable types to include (Document, Upload, Folder).
sort查询name | updated_at | created_at | byte_size | kind否默认 updated_at
direction查询asc | desc否Defaults to asc for name/kind, desc otherwise.
page查询integer否
limit查询integer否默认 100

响应

状态说明返回
200Drive itemsdata: DriveItem[] · meta: PaginationMeta
401Missing or invalid authentication.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails

POST/api/v1/accounts/{account_id}/projects/{project_id}/uploads

Uploads a file into the project's drive. API clients send the file itself as multipart/form-data (upload[file], ≤100MB; bodies above that are refused with 413 payload_too_large before processing). The JSON form with a blob signed_id is the webapp's browser flow (session-only Active Storage direct upload, where regular files are capped at 100MB and videos at 500MB). recording[title] defaults to the filename; recording[parent_id] places the file in a folder.

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
project_id路径string是

请求体multipart/form-data、application/json,必填

字段类型必填说明
uploadobject是
upload.filefile是
upload.thumbnailfile否
recordingobject否
recording.titlestring否
recording.parent_idstring | null否

响应

状态说明返回
201Created uploaddata: DriveItem
401Missing or invalid authentication.ProblemDetails
403Authenticated but not permitted.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails
413Request body exceeds the endpoint's size cap (code payload_too_large).ProblemDetails
422Validation failed.ProblemDetails

GET/api/v1/accounts/{account_id}/uploads/{id}

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

响应

状态说明返回
200Uploaddata: DriveItem
401Missing or invalid authentication.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails

PATCH/api/v1/accounts/{account_id}/uploads/{id}

Renames the file (recording.title). The original filename is kept in filename.

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

请求体application/json,必填

字段类型必填说明
recordingobject否
recording.idstring (uuid)否
recording.titlestring否1–255 characters after trimming (422 otherwise).
recording.parent_idstring | null否Folder ref ("B12") or uuid.

响应

状态说明返回
200Updated uploaddata: DriveItem
401Missing or invalid authentication.ProblemDetails
403Authenticated but not permitted.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails
422Validation failed.ProblemDetails

DELETE/api/v1/accounts/{account_id}/uploads/{id}

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

响应

状态说明返回
200Trashed uploaddata: DriveItem
401Missing or invalid authentication.ProblemDetails
403Authenticated but not permitted.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails

GET/api/v1/accounts/{account_id}/uploads/{id}/download

302 to a short-lived storage URL served as an attachment, named after the current title (original extension kept). Follow the redirect without forwarding the Authorization header.

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

响应

状态说明返回
302Redirect to the file bytes (a short-lived storage URL, or a same-origin proxy path).
401Missing or invalid authentication.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails

GET/api/v1/accounts/{account_id}/uploads/{id}/raw

302 to a short-lived inline storage URL (Range-capable; for img/video/audio elements).

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

响应

状态说明返回
302Redirect to the file bytes (a short-lived storage URL, or a same-origin proxy path).
401Missing or invalid authentication.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails

GET/api/v1/accounts/{account_id}/uploads/{id}/content

For pdf / text / spreadsheet uploads: 302 with a relative Location to the same-origin Active Storage proxy (always disposition=attachment, Range-capable) so browser previews can fetch() the bytes without bucket CORS. 404 for other kinds.

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

响应

状态说明返回
302Redirect to the file bytes (a short-lived storage URL, or a same-origin proxy path).
401Missing or invalid authentication.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails

GET/api/v1/accounts/{account_id}/uploads/{id}/thumbnail

302 to a ≤400px thumbnail (image variant, or the client-rendered video/PDF thumbnail); 404 when there is none.

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

响应

状态说明返回
302Redirect to the file bytes (a short-lived storage URL, or a same-origin proxy path).
401Missing or invalid authentication.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails

GET/api/v1/accounts/{account_id}/uploads/{id}/preview

Images only — 302 to a ≤2048px variant (the original when the image is too large to process).

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

响应

状态说明返回
302Redirect to the file bytes (a short-lived storage URL, or a same-origin proxy path).
401Missing or invalid authentication.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails

POST/api/v1/accounts/{account_id}/projects/{project_id}/folders

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
project_id路径string是

请求体application/json,必填

字段类型必填说明
recordingobject否
recording.idstring (uuid)否
recording.titlestring否1–255 characters after trimming (422 otherwise).
recording.parent_idstring | null否Folder ref ("B12") or uuid.
folderobject否
folder.idstring (uuid)否

响应

状态说明返回
201Created folderdata: DriveItem
401Missing or invalid authentication.ProblemDetails
403Authenticated but not permitted.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails
422Validation failed.ProblemDetails

GET/api/v1/accounts/{account_id}/folders/{id}

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

响应

状态说明返回
200Folder (with its ancestors)data: DriveItem
401Missing or invalid authentication.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails

PATCH/api/v1/accounts/{account_id}/folders/{id}

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

请求体application/json,必填

字段类型必填说明
recordingobject否
recording.idstring (uuid)否
recording.titlestring否1–255 characters after trimming (422 otherwise).
recording.parent_idstring | null否Folder ref ("B12") or uuid.

响应

状态说明返回
200Updated folderdata: DriveItem
401Missing or invalid authentication.ProblemDetails
403Authenticated but not permitted.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails
422Validation failed.ProblemDetails

DELETE/api/v1/accounts/{account_id}/folders/{id}

Trashes the folder and everything below it.

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

响应

状态说明返回
200Trashed folderdata: DriveItem
401Missing or invalid authentication.ProblemDetails
403Authenticated but not permitted.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails

PATCH/api/v1/accounts/{account_id}/recordings/{recording_id}/parent

Moves a document, upload or folder into a folder of the same project (parent.id = folder ref or uuid) or to the project root (parent.id = null). A folder cannot move into itself or its descendants (422).

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
recording_id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

请求体application/json,必填

字段类型必填说明
parentobject是
parent.idstring | null否

响应

状态说明返回
200The moved itemdata: DriveItem
400Malformed request or invalid parameter.ProblemDetails
401Missing or invalid authentication.ProblemDetails
403Authenticated but not permitted.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails
422Validation failed.ProblemDetails

附件

POST/api/v1/accounts/{account_id}/attachments

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。

请求体multipart/form-data、application/json,必填

字段类型必填说明
attachmentobject是
attachment.filefile是

响应

状态说明返回
201Created attachment (access URLs and the embeddable card HTML)data: Attachment
401Missing or invalid authentication.ProblemDetails
422Validation failed.ProblemDetails

GET/api/v1/attachments/{id}

Anyone holding the capability token can download this editor attachment.

认证:无需认证。

参数

参数位置类型必填说明
id路径string是Attachment capability token

响应

状态说明返回
302Redirect to storage
404Unknown capability token

GET/api/v1/attachments/{id}/raw

认证:无需认证。

参数

参数位置类型必填说明
id路径string是

响应

状态说明返回
302Redirect to raw file storage; requires the attachment capability token
404Unknown capability token

GET/api/v1/attachments/{id}/preview

认证:无需认证。

参数

参数位置类型必填说明
id路径string是

响应

状态说明返回
302Redirect to the preview; requires the attachment capability token
404Unknown capability token

数据结构

上面的响应用到的对象。字段的类型是另一个对象时,它也列在这里。

Recording

字段类型必填说明
idstring (uuid)是
public_idstring | null否
legacy_idstring | null是
titlestring是
content_htmlstring | null否
content_jsonobject | null否
content_markdownstring | null否Canonical body (GFM). content_html is rendered server-side from it; null on rows not yet migrated from Tiptap JSON.
content_versioninteger否Body version for compare-and-set saves. Starts at 0 and increases by one each time content_markdown / content_html / content_json actually changes (any write path). Send it back as recording.content_version when saving a body edit.
preview_textstring否Lists only. The body as plain text (HTML tags removed, entities left encoded, e.g. "&"), cut to 80 UTF-16 units; "" without a body.
excerptstring | null否Lists only. Up to 100 characters of the body's text, images and videos shown as [图片] / [视频]; null without a body.
preview_htmlstring否Document lists only. The first 3000 characters of content_html (may end inside a tag), for thumbnails.
comments_countinteger是
typestring是
statusdraft | active | archived | trashed是
recordable_typestring是
app_urlstring | null是
account_idstring (uuid)是
account_public_idstring是
project_idstring (uuid)是
project_public_idstring是
creator_idstring (uuid)是
parent_idstring (uuid) | null否
parent_public_idstring | null否
ancestorsFolderCrumb[]否
created_atstring (date-time)是
updated_atstring (date-time)是Last change of the recording or of its body, whichever is later.
reactionsReaction[]是
edited_byUserRef否Comments and discussions only: the last member other than the author who edited the title or body (the author's own later edits keep it); null when only the author edited it.
trashed_byUserRef否Comments and discussions only: the member other than the author who trashed it; null otherwise (cleared by the author's own trash and on restore). A comment with status "trashed" and a trashed_by is a placeholder in GET .../recordings/:id/comments — its title and content are empty.

UserRef

字段类型必填说明
idstring (uuid)是User UUID.
public_idstring | null是Member ref ("U12") in this account.
namestring | null是
avatar_urlstring | null是
kindhuman | agent | null是null only for an unknown (deleted) user.

PaginationMeta

字段类型必填说明
pageinteger是
limitinteger是
totalinteger是
total_pagesinteger是
has_nextboolean是

DriveItem

字段类型必填说明
idstring (uuid)是
public_idstring | null是
legacy_idstring | null是
titlestring是
typeDocument | Upload | Folder是
recordable_typeDocument | Upload | Folder是
recordable_idstring (uuid)是
statusdraft | active | archived | trashed是
app_urlstring | null是
account_idstring (uuid)是
account_public_idstring是
project_idstring (uuid)是
project_public_idstring是
creator_idstring (uuid)是
parent_idstring (uuid) | null是Recording id of the containing folder; null at the project root.
parent_public_idstring | null是
ancestorsFolderCrumb[]是Folder chain from the project root down to the parent.
comments_countinteger是
created_atstring (date-time)是
updated_atstring (date-time)是
reactionsReaction[]是
content_htmlstring | null否
content_jsonobject | null否
content_markdownstring | null否
content_versioninteger否Body version for compare-and-set saves. Starts at 0 and increases by one each time content_markdown / content_html / content_json actually changes (any write path). Send it back as recording.content_version when saving a body edit.
preview_textstring否Plain-text start of the body (80 UTF-16 units, entities encoded).
excerptstring | null否Up to 100 characters of the body's text.
preview_htmlstring否First 3000 characters of content_html (thumbnails).
children_countinteger否Active items directly inside the folder.
filenamestring否Original filename at upload time.
content_typestring | null否
byte_sizeinteger否
kindimage | video | audio | pdf | text | spreadsheet | word | presentation | archive | other否
extensionstring | null否
previewableboolean否
widthinteger | null否
heightinteger | null否
download_urlstring否
raw_urlstring否
content_urlstring否
thumbnail_urlstring | null否
preview_urlstring | null否

Attachment

字段类型必填说明
idstring是Attachment token; also the :id of the GET endpoints
urlstring是
preview_urlstring是
raw_urlstring是
embed_htmlstring是Paste verbatim into content_markdown (as its own paragraph) to render the app's attachment card in a document. Writing plain links to the attachment URLs renders as links, not the card.

FolderCrumb

字段类型必填说明
idstring (uuid)是
public_idstring | null是
titlestring是

Reaction

字段类型必填说明
idstring (uuid)是
actor_idstring (uuid)是
reactable_idstring (uuid)是
reactable_typestring是
reaction_type_idstring (uuid)是
reaction_emojistring是
reaction_namestring是
created_atstring (date-time)是
updated_atstring (date-time)是