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

バージョン履歴の取得 (Get Version History)

GET/apiv3/pub/documents/{docID}/versionsdocuments_read

現在有効なファイルと、アーカイブ履歴全体を新しい順に返します。

リクエスト​

パスパラメータ​

パラメータ型説明
docIDintegerドキュメント ID です。

レスポンス​

200 OK

現在のファイル(current)​

フィールド型説明
own_idintegerファイルバージョン ID です。
image_namestringストレージ上のファイル名です。
orig_namestringアップロード時の元のファイル名です。
image_sizeintegerファイルサイズ(バイト)です。
last_modifieddatetime最終更新日時です。
file_hashstringSHA-256 ハッシュです。

アーカイブ履歴(history)​

フィールド型説明
own_idintegerアーカイブレコード ID です。
image_namestringアーカイブされたファイル名です。
orig_namestring元のファイル名です。
image_sizeintegerファイルサイズ(バイト)です。
entry_datedatetimeアーカイブされた日時です。
typestringアーカイブされた理由です(例:"replaced in portal")。
file_hashstringSHA-256 ハッシュです。

エラー​

ステータス理由
400docID が無効です
401トークンが無効または期限切れです
404ドキュメントが見つからないか、アクセスが拒否されました

cURL​

curl -i -X GET "https://portal.docwize.com/apiv3/pub/documents/1542/versions" \
-H "Authorization: Bearer <ACCESS_TOKEN>"

{
"current": {
"own_id": 3802,
"image_name": "1542_b8e3d.pdf",
"orig_name": "invoice_v2.pdf",
"image_size": 250000,
"last_modified": "2025-01-16T14:30:00Z",
"file_hash": "e3b0c44298fc1c14..."
},
"history": [
{
"own_id": 101,
"image_name": "1542_a7f2c.pdf",
"orig_name": "invoice.pdf",
"image_size": 245000,
"entry_date": "2025-01-15T10:30:00Z",
"type": "replaced in portal",
"description": "",
"file_hash": "a1b2c3d4e5f6..."
}
]
}
{"detail": "Document not found or access denied"}