メインコンテンツまでスキップ

Add a version from an upload.

POST/api/v1/documents/{document_id}/versionsdocuments:write
注記

このページの操作の説明は、API の OpenAPI 文書のとおり英語で記載しています。

upload_id is a completed upload session with purpose document. Its file becomes the document's current file; the file that was current is kept as an earlier version, and the new one is processed as a Portal upload. Needs an edit grant on the unlocked document.

スコープdocuments:write
非同期いいえ
MCP ツールcreate_document_version
Portal の権限upload_document_versions

パラメーター​

名前場所型必須説明
document_idpathstring必須
Docwize-Versionheaderstring (date)任意
Idempotency-Keyheaderstring任意max 255

リクエスト本文​

Content-Type型
application/jsonVersionCreateInput

応答​

ステータス説明本文
201Success.application/json Version または object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409conflict, idempotency_in_progress, lockedapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422idempotency_key_reused, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

エラー​

この操作が返す可能性のある problem のコードです。各コードからそのページに移動できます。

スキーマ​

BlankFileInput​

フィールド型必須説明
extensionstring必須The Office type of the empty file: docx, xlsx or pptx.
file_namestring または null任意The file's name, ending with the extension. Default: the document's description (or Document) and the extension.

UserRef​

フィールド型必須説明
display_namestring必須
kindstring: user, system, integration または string必須
user_idstring または null必須

Version​

フィールド型必須説明
content_typestring または null必須
created_atstring (date-time) または null必須
created_byUserRef または null必須Who stored the file; null when not recorded (archived files).
file_hashstring または null必須The hash the Portal stored for the file's content; null when none was recorded.
file_namestring または null必須
has_pdfboolean必須Whether a PDF rendition of this file is ready (an Office file converts on demand, so false only means not yet).
is_currentboolean必須
is_indexedboolean必須Whether the file's text has been indexed for search.
page_countinteger または null必須The pages the file has, once the Portal has counted them; null before.
reasonstring または null必須The description recorded when the file was replaced; null for the current file.
size_bytesstring または null必須
version_idstring必須

VersionCreateInput​

フィールド型必須説明
blank_fileBlankFileInput または null任意An empty .docx, .xlsx or .pptx as the new current file, to open in Office Online. Not with upload_id.
extract_archiveboolean または null任意true expands the new file, a .zip, .pst or .ost, into documents once it is stored. Default false.
immediate_processingboolean または null任意true runs the text extraction and AI processing at once instead of in the background queue's turn. Default false.
upload_idstring任意A completed upload session with purpose document. Give this or blank_file.