Read File
Reads a File, 256 KiB at a time: text as UTF-8, a file SMB has read as its Markdown, others as base64. The first page's about has SMB's summary and metadata. Pass offset, then next_offset while has_more. Long text: outline, then section or query (far fewer tokens; gives revision). Big unread files: download_file or download_room_file.
AuthorizationBearer <token>A signed-in SMB user's access token. Workspace-scoped operations also require SMB-Workspace-Id.
file_id*stringStable File ID.
^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$SMB-Workspace-Id*stringWorkspace where this operation runs. Required for user tokens and Workspace API keys.
uuidapplication/json- body
file_version_id?stringImmutable File version ID.
^fvr_[0-7][0-9A-HJKMNP-TV-Z]{25}$offset?OffsetText files: where to start, in bytes (next_offset from the last page).
0 <= value <= 104857600max_bytes?MaxBytesText files: page size in bytes. Pages never split a character.
4 <= value <= 262144262144outline?booleanText: true returns the headings (section id, lines, tokens), not the text.
section?stringText: one section, by outline id (s3) or heading.
1 <= length <= 200query?QueryText: lines containing this, with line and section (20 at most).
1 <= length <= 200Successful authorized response.
application/json- response
file_content*request_id*stringcurl -X POST 'https://example.com/v1/files/string/content' \ -H 'SMB-Workspace-Id: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{}'{ "file_content": { "file_id": "string", "file_version_id": "string", "file_name": "string", "content_type": "string", "encoding": "utf8", "content": "string", "size_bytes": 0, "total_bytes": 0, "offset": 0, "next_offset": 0, "has_more": true, "revision": 1, "outline": { "sections": [ { "id": "string", "level": 1, "heading": "string", "lines": [ 1, 1 ], "tokens": 0 } ], "lines": 0, "tokens": 0 }, "section": { "id": "string", "level": 1, "heading": "string", "lines": [ 1, 1 ], "tokens": 0 }, "matches": [ { "line": 1, "section": "string", "text": "string" } ], "match_total": 0, "about": { "summary": "string", "document_type": "string", "suggested_name": "string", "metadata": [ { "label": "string", "value": "string", "page": 0, "source": "table" } ], "metadata_complete": true, "page_count": 0, "read_at": "2019-08-24T14:15:22Z" } }, "request_id": "string"}