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

Replace a model's preview image with a viewport capture.

POST/api/v1/documents/{document_id}/model-viewer/set-preview-imagedocuments:write
注記

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

Sets the representative image every viewer of the model sees (the Explorer's thumbnail of a model, export_document_thumbnails page 0) from image_base64, a capture of the viewport of up to 2 MiB; the Portal decodes and re-encodes it as JPEG, at most 1600 px. expected_source_file_hash is the revision the capture was taken of (source_file_hash of the model viewer): a model that changed meanwhile is 409. Needs Edit Model Preview Images and an edit grant on the model document. Answers the model viewer with View Model Viewer, otherwise the write receipt.

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

パラメーター​

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

リクエスト本文​

Content-Type型
application/jsonModelPreviewSetInput

応答​

ステータス説明本文
200Success.application/json ModelViewer または 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_progressapplication/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 のコードです。各コードからそのページに移動できます。

スキーマ​

ModelPreviewSetInput​

フィールド型必須説明
expected_source_file_hashstring必須source_file_hash of the model the capture was taken of.
image_base64string必須The viewport capture (PNG or JPEG), base64 encoded, up to 2 MiB.

ModelViewer​

フィールド型必須説明
configuration_requiredboolean必須Whether the viewer must be configured before it can open this model.
document_idstring必須
extensionstring または null必須The model file's extension.
max_bytesstring または null必須The largest model the viewer opens.
messagestring または null必須What the viewer tells the person while a model is prepared or when it cannot open it.
progressinteger または null必須0 to 100 while a model is being prepared.
rendererstring または null必須native_ifc, native_three or autodesk for a model; null otherwise.
source_file_hashstring または null必須The revision of the model file a preview and the model notes are tied to.
tierstring または null必須
viewerstring必須pdf, model3d, model3d_pending or download.