Make a public download link for a document.
POST/api/v1/documents/{document_id}/permalinksdocuments:download
注記
このページの操作の説明は、API の OpenAPI 文書のとおり英語で記載しています。
Makes a link anyone can open without signing in, for the document's current file, until it expires (expires_in_seconds, 3600 by default as the Portal's). Needs Create Document Permalinks, Share Documents Externally, Download Document Files and Download Original Documents, and read access to the document. The link is shown with View Document Permalinks, otherwise the answer is the write receipt. Every open is counted: list_document_permalinks shows how often. Close a link early with delete_document_permalink. Share the url only with people who may have the file.
| スコープ | documents:download |
| 非同期 | いいえ |
| MCP ツール | create_document_permalink |
| Portal の権限 | create_document_permalinks, share_documents_externally, download_document_files, download_original_documents |
パラメーター
| 名前 | 場所 | 型 | 必須 | 説明 |
|---|---|---|---|---|
document_id | path | string | 必須 | |
Docwize-Version | header | string (date) | 任意 | |
Idempotency-Key | header | string | 任意 | max 255 |
リクエスト本文
| Content-Type | 型 |
|---|---|
application/json | PermalinkCreateInput |
応答
| ステータス | 説明 | 本文 |
|---|---|---|
201 | Success. | application/json Permalink または object |
400 | invalid_version, malformed_json | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
404 | not_found | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
409 | conflict, idempotency_in_progress | application/problem+json Problem |
413 | payload_too_large | application/problem+json Problem |
415 | unsupported_media_type | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | idempotency_key_reused, validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
エラー
この操作が返す可能性のある problem のコードです。各コードからそのページに移動できます。
スキーマ
Permalink
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
access_count | integer | 必須 | How often the link was opened. ≥ -2147483648; ≤ 2147483647 |
created_at | string (date-time) または null | 必須 | |
document_id | string | 必須 | |
expires_at | string (date-time) または null | 必須 | |
file_name | string または null | 必須 | The name the file downloads under. |
is_active | boolean | 必須 | False once the link was closed. An expired link is still active but opens as 404. |
last_accessed_at | string (date-time) または null | 必須 | When it was last opened; null if never. |
permalink_id | string | 必須 | |
url | string | 必須 | The link to share: opening it needs no sign-in, until it expires or is closed. |
PermalinkCreateInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
expires_in_seconds | integer または null | 任意 | How long the link works from now, in seconds. The Portal offers 7, 30 or 730 days (604800, 2592000, 63072000). Default 3600. |