File
任意のファイルAPIエンドポイントからデフォルトで返されるファイルのStandard版の表示。属性と例
属性と例
| プロパティ | 型 | 必須 | 説明 |
|---|---|---|---|
id | string | はい | ファイルを表す一意の識別子。 ファイルIDを確認するには、ウェブアプリケーションでファイルにアクセスして、URLからIDをコピーします。たとえば、URLがhttps://*.app.box.com/files/123の場合、file_idは123です。 |
etag | string | いいえ | このファイルのHTTP etag。これは変更が発生した場合 (またはしなかった場合) にファイルに対して変更を行う目的でのみ、If-MatchおよびIf-None-Matchヘッダー内の一部のAPIエンドポイントで使用できます。 null を指定できます。 |
type | enum<string> | はい | 値は常にfileになります。 使用可能なオプション: file. |
sequence_id | string | いいえ | この項目に適用された最新のUser Eventを表す数値の識別子。 これをGET /eventsエンドポイントと組み合わせて使用すると、この識別子が読み取られる前に発生した可能性があるUser Eventを除外できます。 たとえば、Box DriveなどのアプリケーションがAPIを介して項目を取得し、その項目の変更に関連するUser Eventの発生を監視する場合などがこれに該当します。User Eventのsequence_idが最初に取得されたリソースのsequence_idよりも小さいか同じである場合、アプリケーションはそのようなUser Eventをすべて無視します。 null を指定できます。 |
name | string | いいえ | ファイルの名前。 |
sha1 | string | いいえ | ファイルのSHA1ハッシュ。Box上のファイルとローカルファイルの内容を比較する目的に使用できます。 |
file_version | ファイルバージョン (Mini) | いいえ | ファイルの現在のバージョンに関する情報。 |
description | string | いいえ | このファイルの説明 (省略可)。説明が255文字を超える場合は、最初の255文字がファイルの説明として設定され、残りは無視されます。 |
size | integer | いいえ | ファイルサイズ (バイト単位)。この整数を解析する際には、非常に大きな数値となって整数オーバーフローになる可能性があるため、注意が必要です。 |
path_collection | object | いいえ | 項目の親フォルダのリスト。 |
created_at | string | いいえ | Box上でこのファイルが作成された日時。 |
modified_at | string | いいえ | Boxでこのファイルが最後に更新された日時。 |
trashed_at | string | いいえ | このファイルがごみ箱に移動された日時。 null を指定できます。 |
purged_at | string | いいえ | このファイルがごみ箱から削除される予定日時。 null を指定できます。 |
content_created_at | string | いいえ | このファイルが最初に作成された日時。この日時はファイルがBoxにアップロードされた時点よりも前になる場合があります。 null を指定できます。 |
content_modified_at | string | いいえ | このファイルが最後に更新された日時。この日時はファイルがBoxにアップロードされた時点よりも前になる場合があります。 null を指定できます。 |
created_by | ユーザー (Mini) | いいえ | このファイルを作成したユーザー。 |
modified_by | ユーザー (Mini) | いいえ | このファイルを最後に変更したユーザー。 |
owned_by | ユーザー (Mini) | いいえ | このファイルを所有するユーザー。 |
shared_link | object | いいえ | 共有リンクを作成すると、Box上のファイルやフォルダに対する読み取り専用アクセスを直接実行できます。 アクセスレベルがopenに設定されている共有リンクの場合は、URLを知っているすべてのユーザーが項目にアクセスでき、アクセスレベルがcompanyまたはcollaboratorsに設定されている共有リンクの場合は、適切に認証されたBoxユーザーのみが項目にアクセスできます。 null を指定できます。 |
parent | フォルダ (Mini) | いいえ | このフォルダが配置されているフォルダ。ルートフォルダやごみ箱フォルダなど、一部のフォルダの場合、この値はnullになる可能性があります。 null を指定できます。 |
item_status | enum<string> | いいえ | この項目が削除されたかどうかを定義します。 - active - 項目がごみ箱に移動されていない場合。 - trashed - 項目がごみ箱に移動されているが、まだ削除されていない場合。 - deleted - 項目がすでに完全に削除されている場合。 使用可能なオプション: active, trashed, deleted. |
例
{
"id": "12345",
"etag": "1",
"type": "file",
"sequence_id": "3",
"name": "Contract.pdf",
"sha1": "85136C79CBF9FE36BB9D05D0639C70C265C18D37",
"file_version": {
"id": "12345",
"type": "file_version",
"sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
},
"description": "Contract for Q1 renewal",
"size": 629644,
"path_collection": {
"total_count": 1,
"entries": [
{
"id": "12345",
"etag": "1",
"type": "folder",
"sequence_id": "3",
"name": "Contracts"
}
]
},
"created_at": "2012-12-12T10:53:43-08:00",
"modified_at": "2012-12-12T10:53:43-08:00",
"trashed_at": "2012-12-12T10:53:43-08:00",
"purged_at": "2012-12-12T10:53:43-08:00",
"content_created_at": "2012-12-12T10:53:43-08:00",
"content_modified_at": "2012-12-12T10:53:43-08:00",
"created_by": {
"id": "11446498",
"type": "user",
"name": "Aaron Levie",
"login": "ceo@example.com"
},
"modified_by": {
"id": "11446498",
"type": "user",
"name": "Aaron Levie",
"login": "ceo@example.com"
},
"owned_by": {
"id": "11446498",
"type": "user",
"name": "Aaron Levie",
"login": "ceo@example.com"
},
"shared_link": {
"url": "https://www.box.com/s/vspke7y05sb214wjokpk",
"download_url": "https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg",
"vanity_url": "https://acme.app.box.com/v/my_url/",
"vanity_name": "my_url",
"access": "open",
"effective_access": "company",
"effective_permission": "can_download",
"unshared_at": "2018-04-13T13:53:23-07:00",
"is_password_enabled": true,
"permissions": {
"can_download": true,
"can_preview": true,
"can_edit": false
},
"download_count": 3,
"preview_count": 3
},
"parent": {
"id": "12345",
"etag": "1",
"type": "folder",
"sequence_id": "3",
"name": "Contracts"
},
"item_status": "active"
}
Files
ファイルのリスト。属性と例
属性と例
| プロパティ | 型 | 必須 | 説明 |
|---|---|---|---|
total_count | integer | いいえ | ファイルの数。 |
entries | array of ファイル (Full) | いいえ | ファイルのリスト。 |
例
{
"total_count": 1,
"entries": [
{
"id": "12345",
"etag": "1",
"type": "file",
"sequence_id": "3",
"name": "Contract.pdf",
"sha1": "85136C79CBF9FE36BB9D05D0639C70C265C18D37",
"file_version": {
"id": "12345",
"type": "file_version",
"sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
},
"description": "Contract for Q1 renewal",
"size": 629644,
"path_collection": {
"total_count": 1,
"entries": [
{
"id": "12345",
"etag": "1",
"type": "folder",
"sequence_id": "3",
"name": "Contracts"
}
]
},
"created_at": "2012-12-12T10:53:43-08:00",
"modified_at": "2012-12-12T10:53:43-08:00",
"trashed_at": "2012-12-12T10:53:43-08:00",
"purged_at": "2012-12-12T10:53:43-08:00",
"content_created_at": "2012-12-12T10:53:43-08:00",
"content_modified_at": "2012-12-12T10:53:43-08:00",
"created_by": {
"id": "11446498",
"type": "user",
"name": "Aaron Levie",
"login": "ceo@example.com"
},
"modified_by": {
"id": "11446498",
"type": "user",
"name": "Aaron Levie",
"login": "ceo@example.com"
},
"owned_by": {
"id": "11446498",
"type": "user",
"name": "Aaron Levie",
"login": "ceo@example.com"
},
"shared_link": {
"url": "https://www.box.com/s/vspke7y05sb214wjokpk",
"download_url": "https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg",
"vanity_url": "https://acme.app.box.com/v/my_url/",
"vanity_name": "my_url",
"access": "open",
"effective_access": "company",
"effective_permission": "can_download",
"unshared_at": "2018-04-13T13:53:23-07:00",
"is_password_enabled": true,
"permissions": {
"can_download": true,
"can_preview": true,
"can_edit": false
},
"download_count": 3,
"preview_count": 3
},
"parent": {
"id": "12345",
"etag": "1",
"type": "folder",
"sequence_id": "3",
"name": "Contracts"
},
"item_status": "active",
"version_number": "1",
"comment_count": 10,
"permissions": {
"can_delete": true,
"can_download": true,
"can_invite_collaborator": true,
"can_rename": true,
"can_set_share_access": true,
"can_share": true,
"can_annotate": true,
"can_comment": true,
"can_preview": true,
"can_upload": true,
"can_view_annotations_all": true,
"can_view_annotations_self": true,
"can_apply_watermark": true
},
"tags": [
"approved"
],
"lock": {
"id": "11446498",
"type": "lock",
"created_by": {
"id": "11446498",
"type": "user",
"name": "Aaron Levie",
"login": "ceo@example.com"
},
"created_at": "2012-12-12T10:53:43-08:00",
"expired_at": "2012-12-12T10:53:43-08:00",
"is_download_prevented": true,
"app_type": "office_wopiplus"
},
"extension": "pdf",
"is_package": true,
"expiring_embed_link": {
"access_token": "c3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQ",
"expires_in": 3600,
"token_type": "bearer",
"restricted_to": [
{
"scope": "item_download",
"object": {
"id": "12345",
"etag": "1",
"type": "folder",
"sequence_id": "3",
"name": "Contracts"
}
}
],
"url": "https://cloud.app.box.com/preview/expiring_embed/..."
},
"watermark_info": {
"is_watermarked": true,
"is_watermark_inherited": false,
"is_watermarked_by_access_policy": false
},
"is_accessible_via_shared_link": true,
"allowed_invitee_roles": [
"editor"
],
"is_externally_owned": true,
"has_collaborations": true,
"metadata": {
"enterprise_27335": {
"marketingCollateral": {
"$canEdit": true,
"$id": "01234500-12f1-1234-aa12-b1d234cb567e",
"$parent": "folder_59449484661",
"$scope": "enterprise_27335",
"$template": "marketingCollateral",
"$type": "properties-6bcba49f-ca6d-4d2a-a758-57fe6edf44d0",
"$typeVersion": 2,
"$version": 1
}
}
},
"expires_at": "2012-12-12T10:53:43-08:00",
"representations": {
"entries": [
{
"content": {
"url_template": "https://dl.boxcloud.com/api/2.0/internal_files/123/versions/345/representations/png_paged_2048x2048/content/{+asset_path}?watermark_content=4567"
},
"info": {
"url": "https://api.box.com/2.0/internal_files/123/versions/345/representations/png_paged_2048x2048"
},
"properties": {
"dimensions": "2048x2048",
"paged": "true",
"thumb": "true"
},
"representation": "png",
"status": {
"state": "success"
}
}
]
},
"classification": {
"name": "Top Secret",
"definition": "Content that should not be shared outside the company.",
"color": "#FF0000"
},
"uploader_display_name": "Ellis Wiggins",
"disposition_at": "2012-12-12T10:53:43-08:00",
"shared_link_permission_options": [
"can_preview"
],
"is_associated_with_app_item": true,
"collections": [
{
"id": "11446498",
"type": "collection",
"name": "Favorites",
"collection_type": "favorites"
}
],
"is_download_available": true,
"download_url": "https://dl.boxcloud.com/d/1/example_token/download",
"authenticated_download_url": "https://api.box.com/2.0/files/12345/content",
"allowed_shared_link_access_levels": [
"open"
]
}
]
}
ファイル (Base)
最も基本的なファイルのBase版の表示。fieldsクエリパラメータを使用すると、最小限の数のフィールドが返されます。
属性と例
属性と例
| プロパティ | 型 | 必須 | 説明 |
|---|---|---|---|
id | string | はい | ファイルを表す一意の識別子。 ファイルIDを確認するには、ウェブアプリケーションでファイルにアクセスして、URLからIDをコピーします。たとえば、URLがhttps://*.app.box.com/files/123の場合、file_idは123です。 |
etag | string | いいえ | このファイルのHTTP etag。これは変更が発生した場合 (またはしなかった場合) にファイルに対して変更を行う目的でのみ、If-MatchおよびIf-None-Matchヘッダー内の一部のAPIエンドポイントで使用できます。 null を指定できます。 |
type | enum<string> | はい | 値は常にfileになります。 使用可能なオプション: file. |
例
{
"id": "12345",
"etag": "1",
"type": "file"
}
ファイル (Full)
任意のファイルAPIエンドポイントからデフォルトで返される可能性があるファイルのFull版の表示。属性と例
属性と例
| プロパティ | 型 | 必須 | 説明 |
|---|---|---|---|
id | string | はい | ファイルを表す一意の識別子。 ファイルIDを確認するには、ウェブアプリケーションでファイルにアクセスして、URLからIDをコピーします。たとえば、URLがhttps://*.app.box.com/files/123の場合、file_idは123です。 |
etag | string | いいえ | このファイルのHTTP etag。これは変更が発生した場合 (またはしなかった場合) にファイルに対して変更を行う目的でのみ、If-MatchおよびIf-None-Matchヘッダー内の一部のAPIエンドポイントで使用できます。 null を指定できます。 |
type | enum<string> | はい | 値は常にfileになります。 使用可能なオプション: file. |
sequence_id | string | いいえ | この項目に適用された最新のUser Eventを表す数値の識別子。 これをGET /eventsエンドポイントと組み合わせて使用すると、この識別子が読み取られる前に発生した可能性があるUser Eventを除外できます。 たとえば、Box DriveなどのアプリケーションがAPIを介して項目を取得し、その項目の変更に関連するUser Eventの発生を監視する場合などがこれに該当します。User Eventのsequence_idが最初に取得されたリソースのsequence_idよりも小さいか同じである場合、アプリケーションはそのようなUser Eventをすべて無視します。 null を指定できます。 |
name | string | いいえ | ファイルの名前。 |
sha1 | string | いいえ | ファイルのSHA1ハッシュ。Box上のファイルとローカルファイルの内容を比較する目的に使用できます。 |
file_version | ファイルバージョン (Mini) | いいえ | ファイルの現在のバージョンに関する情報。 |
description | string | いいえ | このファイルの説明 (省略可)。説明が255文字を超える場合は、最初の255文字がファイルの説明として設定され、残りは無視されます。 |
size | integer | いいえ | ファイルサイズ (バイト単位)。この整数を解析する際には、非常に大きな数値となって整数オーバーフローになる可能性があるため、注意が必要です。 |
path_collection | object | いいえ | 項目の親フォルダのリスト。 |
created_at | string | いいえ | Box上でこのファイルが作成された日時。 |
modified_at | string | いいえ | Boxでこのファイルが最後に更新された日時。 |
trashed_at | string | いいえ | このファイルがごみ箱に移動された日時。 null を指定できます。 |
purged_at | string | いいえ | このファイルがごみ箱から削除される予定日時。 null を指定できます。 |
content_created_at | string | いいえ | このファイルが最初に作成された日時。この日時はファイルがBoxにアップロードされた時点よりも前になる場合があります。 null を指定できます。 |
content_modified_at | string | いいえ | このファイルが最後に更新された日時。この日時はファイルがBoxにアップロードされた時点よりも前になる場合があります。 null を指定できます。 |
created_by | ユーザー (Mini) | いいえ | このファイルを作成したユーザー。 |
modified_by | ユーザー (Mini) | いいえ | このファイルを最後に変更したユーザー。 |
owned_by | ユーザー (Mini) | いいえ | このファイルを所有するユーザー。 |
shared_link | object | いいえ | 共有リンクを作成すると、Box上のファイルやフォルダに対する読み取り専用アクセスを直接実行できます。 アクセスレベルがopenに設定されている共有リンクの場合は、URLを知っているすべてのユーザーが項目にアクセスでき、アクセスレベルがcompanyまたはcollaboratorsに設定されている共有リンクの場合は、適切に認証されたBoxユーザーのみが項目にアクセスできます。 null を指定できます。 |
parent | フォルダ (Mini) | いいえ | このフォルダが配置されているフォルダ。ルートフォルダやごみ箱フォルダなど、一部のフォルダの場合、この値はnullになる可能性があります。 null を指定できます。 |
item_status | enum<string> | いいえ | この項目が削除されたかどうかを定義します。 - active - 項目がごみ箱に移動されていない場合。 - trashed - 項目がごみ箱に移動されているが、まだ削除されていない場合。 - deleted - 項目がすでに完全に削除されている場合。 使用可能なオプション: active, trashed, deleted. |
version_number | string | いいえ | このファイルのバージョン番号。 |
comment_count | integer | いいえ | このファイルに関するコメントの数。 |
permissions | object | いいえ | このファイルに対して認証済みユーザーが持っている権限。 |
tags | array of string | いいえ | この項目のタグ。これらのタグはBoxウェブアプリおよびモバイルアプリで項目の横に表示されます。 タグを追加または削除するには、項目の現在のタグを取得して変更してから、このフィールドを更新します。 タグの数は、1項目あたり100個までに制限され、一意のタグは会社あたり10,000個までに制限されます。 |
lock | object | いいえ | ファイルで保持されているロック。ロックにより、ロックを作成したユーザー以外は、ファイルを移動、名前変更、および変更できません。 null を指定できます。 |
extension | string | いいえ | このファイルのファイル拡張子 (省略可) を示します。デフォルトでは、空の文字列に設定されます。 |
is_package | boolean | いいえ | ファイルがパッケージかどうかを示します。パッケージはMacアプリケーションで一般的に使用され、iWorkファイルを含めることができます。 |
expiring_embed_link | object | いいえ | 有効期限付きのBox Embedリンク。 |
watermark_info | object | いいえ | この項目に適用された電子すかしに関する詳細。 |
is_accessible_via_shared_link | boolean | いいえ | 直接共有リンクまたは親フォルダへの共有リンクを使用してファイルにアクセスできるかどうかを指定します。 |
allowed_invitee_roles | array of enum<string> | いいえ | このファイルを共有するときに招待できるユーザーの役割タイプのリスト。 |
is_externally_owned | boolean | いいえ | このファイルが認証済みの会社以外のユーザーによって所有されているかどうかを指定します。 |
has_collaborations | boolean | いいえ | このファイルに他のコラボレータが存在するかどうかを指定します。 |
metadata | object | いいえ | scopeおよびtemplateKeyのキー/値ペア内にネストされている、メタデータインスタンスのリスト。 ファイルまたはフォルダのメタデータにアクセスするには、最初にメタデータエンドポイントを使用して、会社で使用できるメタデータテンプレートを特定します。 その後、fieldsクエリパラメータを指定してGET /files/:idまたはGET /folder/:idエンドポイントを使用すると、IDを指定してメタデータを取得できます。 特定のscopeおよびtemplateKeyのメタデータインスタンスをリクエストするには、fieldsパラメータにmetadata.<scope>.<templateKey>の形式を使用してください。 たとえば、?fields=metadata.enterprise_27335.marketingCollateralのようになります。 |
expires_at | string | いいえ | ファイルが自動的に削除される日時。 null を指定できます。 |
representations | object | いいえ | ファイルレプリゼンテーションのリスト。 |
classification | object | いいえ | 項目に適用される分類。 null を指定できます。 |
uploader_display_name | string | いいえ | ファイルをアップロードしたユーザーの表示名。ほとんどの場合、これはアップロード時点でログインしているユーザーの名前です。 このファイルのアップロードに、ユーザーに対してメールアドレスの入力を要求するファイルリクエストフォームが使用された場合、このフィールドにはそのメールアドレスが設定されます。メールアドレスがファイルリクエストフォームで要求されなかった場合、このフィールドは、File Requestという値を返すように設定されます。 メールアドレスが指定されなかったその他すべての匿名のケースでは、このフィールドの値がデフォルトでSomeoneになります。 |
disposition_at | string | いいえ | 特定のファイルのリテンションの有効期限のタイムスタンプ。 null を指定できます。 |
shared_link_permission_options | array of enum<string> | いいえ | このファイルを共有するときに招待できるユーザーの役割タイプのリスト。 null を指定できます。 |
is_associated_with_app_item | boolean | いいえ | ファイルまたはファイルの先祖が1つ以上のアプリ項目に関連付けられている場合、このフィールドはtrueを返します。コンテキストユーザーがそのファイルに関連付けられたアプリ項目にアクセスできない場合でもtrueが返されることに注意してください。 |
collections | array of Collection | いいえ | The collections that this file belongs to. For more information, see the collections guide. |
is_download_available | boolean | いいえ | Whether the file’s binary content is eligible to be downloaded. This is a content-level flag and does not reflect whether the current user is authorized to download the file. Use permissions.can_download, when available, for that. |
download_url | string | いいえ | A pre-authorized, expiring URL for directly downloading the file’s content. Requires authentication and is valid only for the current session. This field is only returned for files, not folders or web links. |
authenticated_download_url | string | いいえ | A stable API URL for the file content endpoint, /2.0/files/{id}/content. Unlike download_url, authorization is evaluated when the URL is requested with a valid access token. This field is only returned for files, not folders or web links. |
allowed_shared_link_access_levels | array of enum<string> | いいえ | The shared link access levels the authenticated user is allowed to use when creating or updating a shared link for this file. The list depends on item policy and user authorization, so it may be narrower than the levels available to the owner. An empty array means no access level is available to this user. |
例
{
"id": "12345",
"etag": "1",
"type": "file",
"sequence_id": "3",
"name": "Contract.pdf",
"sha1": "85136C79CBF9FE36BB9D05D0639C70C265C18D37",
"file_version": {
"id": "12345",
"type": "file_version",
"sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
},
"description": "Contract for Q1 renewal",
"size": 629644,
"path_collection": {
"total_count": 1,
"entries": [
{
"id": "12345",
"etag": "1",
"type": "folder",
"sequence_id": "3",
"name": "Contracts"
}
]
},
"created_at": "2012-12-12T10:53:43-08:00",
"modified_at": "2012-12-12T10:53:43-08:00",
"trashed_at": "2012-12-12T10:53:43-08:00",
"purged_at": "2012-12-12T10:53:43-08:00",
"content_created_at": "2012-12-12T10:53:43-08:00",
"content_modified_at": "2012-12-12T10:53:43-08:00",
"created_by": {
"id": "11446498",
"type": "user",
"name": "Aaron Levie",
"login": "ceo@example.com"
},
"modified_by": {
"id": "11446498",
"type": "user",
"name": "Aaron Levie",
"login": "ceo@example.com"
},
"owned_by": {
"id": "11446498",
"type": "user",
"name": "Aaron Levie",
"login": "ceo@example.com"
},
"shared_link": {
"url": "https://www.box.com/s/vspke7y05sb214wjokpk",
"download_url": "https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg",
"vanity_url": "https://acme.app.box.com/v/my_url/",
"vanity_name": "my_url",
"access": "open",
"effective_access": "company",
"effective_permission": "can_download",
"unshared_at": "2018-04-13T13:53:23-07:00",
"is_password_enabled": true,
"permissions": {
"can_download": true,
"can_preview": true,
"can_edit": false
},
"download_count": 3,
"preview_count": 3
},
"parent": {
"id": "12345",
"etag": "1",
"type": "folder",
"sequence_id": "3",
"name": "Contracts"
},
"item_status": "active",
"version_number": "1",
"comment_count": 10,
"permissions": {
"can_delete": true,
"can_download": true,
"can_invite_collaborator": true,
"can_rename": true,
"can_set_share_access": true,
"can_share": true,
"can_annotate": true,
"can_comment": true,
"can_preview": true,
"can_upload": true,
"can_view_annotations_all": true,
"can_view_annotations_self": true,
"can_apply_watermark": true
},
"tags": [
"approved"
],
"lock": {
"id": "11446498",
"type": "lock",
"created_by": {
"id": "11446498",
"type": "user",
"name": "Aaron Levie",
"login": "ceo@example.com"
},
"created_at": "2012-12-12T10:53:43-08:00",
"expired_at": "2012-12-12T10:53:43-08:00",
"is_download_prevented": true,
"app_type": "office_wopiplus"
},
"extension": "pdf",
"is_package": true,
"expiring_embed_link": {
"access_token": "c3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQ",
"expires_in": 3600,
"token_type": "bearer",
"restricted_to": [
{
"scope": "item_download",
"object": {
"id": "12345",
"etag": "1",
"type": "folder",
"sequence_id": "3",
"name": "Contracts"
}
}
],
"url": "https://cloud.app.box.com/preview/expiring_embed/..."
},
"watermark_info": {
"is_watermarked": true,
"is_watermark_inherited": false,
"is_watermarked_by_access_policy": false
},
"is_accessible_via_shared_link": true,
"allowed_invitee_roles": [
"editor"
],
"is_externally_owned": true,
"has_collaborations": true,
"metadata": {
"enterprise_27335": {
"marketingCollateral": {
"$canEdit": true,
"$id": "01234500-12f1-1234-aa12-b1d234cb567e",
"$parent": "folder_59449484661",
"$scope": "enterprise_27335",
"$template": "marketingCollateral",
"$type": "properties-6bcba49f-ca6d-4d2a-a758-57fe6edf44d0",
"$typeVersion": 2,
"$version": 1
}
}
},
"expires_at": "2012-12-12T10:53:43-08:00",
"representations": {
"entries": [
{
"content": {
"url_template": "https://dl.boxcloud.com/api/2.0/internal_files/123/versions/345/representations/png_paged_2048x2048/content/{+asset_path}?watermark_content=4567"
},
"info": {
"url": "https://api.box.com/2.0/internal_files/123/versions/345/representations/png_paged_2048x2048"
},
"properties": {
"dimensions": "2048x2048",
"paged": "true",
"thumb": "true"
},
"representation": "png",
"status": {
"state": "success"
}
}
]
},
"classification": {
"name": "Top Secret",
"definition": "Content that should not be shared outside the company.",
"color": "#FF0000"
},
"uploader_display_name": "Ellis Wiggins",
"disposition_at": "2012-12-12T10:53:43-08:00",
"shared_link_permission_options": [
"can_preview"
],
"is_associated_with_app_item": true,
"collections": [
{
"id": "11446498",
"type": "collection",
"name": "Favorites",
"collection_type": "favorites"
}
],
"is_download_available": true,
"download_url": "https://dl.boxcloud.com/d/1/example_token/download",
"authenticated_download_url": "https://api.box.com/2.0/files/12345/content",
"allowed_shared_link_access_levels": [
"open"
]
}
ファイル (Mini)
他のリソースの下にネストされたときに使用されるファイルのMini版の表示。属性と例
属性と例
| プロパティ | 型 | 必須 | 説明 |
|---|---|---|---|
id | string | はい | ファイルを表す一意の識別子。 ファイルIDを確認するには、ウェブアプリケーションでファイルにアクセスして、URLからIDをコピーします。たとえば、URLがhttps://*.app.box.com/files/123の場合、file_idは123です。 |
etag | string | いいえ | このファイルのHTTP etag。これは変更が発生した場合 (またはしなかった場合) にファイルに対して変更を行う目的でのみ、If-MatchおよびIf-None-Matchヘッダー内の一部のAPIエンドポイントで使用できます。 null を指定できます。 |
type | enum<string> | はい | 値は常にfileになります。 使用可能なオプション: file. |
sequence_id | string | いいえ | この項目に適用された最新のUser Eventを表す数値の識別子。 これをGET /eventsエンドポイントと組み合わせて使用すると、この識別子が読み取られる前に発生した可能性があるUser Eventを除外できます。 たとえば、Box DriveなどのアプリケーションがAPIを介して項目を取得し、その項目の変更に関連するUser Eventの発生を監視する場合などがこれに該当します。User Eventのsequence_idが最初に取得されたリソースのsequence_idよりも小さいか同じである場合、アプリケーションはそのようなUser Eventをすべて無視します。 null を指定できます。 |
name | string | いいえ | ファイルの名前。 |
sha1 | string | いいえ | ファイルのSHA1ハッシュ。Box上のファイルとローカルファイルの内容を比較する目的に使用できます。 |
file_version | ファイルバージョン (Mini) | いいえ | ファイルの現在のバージョンに関する情報。 |
例
{
"id": "12345",
"etag": "1",
"type": "file",
"sequence_id": "3",
"name": "Contract.pdf",
"sha1": "85136C79CBF9FE36BB9D05D0639C70C265C18D37",
"file_version": {
"id": "12345",
"type": "file_version",
"sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
}
}
