ごみ箱に移動されたファイルを取得します。
12345
ファイルを表す一意の識別子。
ファイルIDを確認するには、ウェブアプリケーションでファイルにアクセスして、URLからIDをコピーします。たとえば、URLがhttps://*.app.box.com/files/123
の場合、file_id
は123
です。
id,type,name
応答に含める属性のカンマ区切りリスト。このパラメータを使用すると、標準の応答には通常含まれないフィールドをリクエストできます。
このパラメータを指定すると、明示的に指定しない限り標準フィールドは応答に含まれず、リクエストしたフィールドのほかには、簡易版レプリゼンテーションのフィールドしか返されないことに注意してください。
curl -X GET https://api.box.com/2.0/files/12345/trash \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
BoxFile trashedFile = await client.FilesManager.GetTrashedAsync("11111");
String fileID = "9873459";
BoxTrash trash = new BoxTrash(api);
BoxFile.Info fileInfo = trash.getFileInfo(fileID);
file_to_retrieve = client.file(file_id='11111')
file_from_trash = client.trash().get_item(file_to_retrieve)
print('File ID is {0} and name is {1}'.format(file_from_trash.id, file_from_trash.name))
client.files.getTrashedFile('11111')
.then(trashedFile => {
/* trashedFile -> {
type: 'file',
id: '11111',
sequence_id: '2',
etag: '2',
sha1: '4bd9e98652799fc57cf9423e13629c151152ce6c',
name: 'Screenshot_1_30_13_6_37_PM.png',
description: '',
size: 163265,
path_collection:
{ total_count: 1,
entries:
[ { type: 'folder',
id: '1',
sequence_id: null,
etag: null,
name: 'Trash' } ] },
created_at: '2013-01-30T18:43:56-08:00',
modified_at: '2013-01-30T18:44:00-08:00',
trashed_at: '2013-02-07T10:49:34-08:00',
purged_at: '2013-03-09T10:49:34-08:00',
content_created_at: '2013-01-30T18:43:56-08:00',
content_modified_at: '2013-01-30T18:44:00-08:00',
created_by:
{ type: 'user',
id: '33333',
name: 'Example User',
login: 'user@example.com' },
modified_by:
{ type: 'user',
id: '33333',
name: 'Example User',
login: 'user@example.com' },
owned_by:
{ type: 'user',
id: '33333',
name: 'Example User',
login: 'user@example.com' },
shared_link: null,
parent:
{ type: 'folder',
id: '0',
sequence_id: null,
etag: null,
name: 'All Files' },
item_status: 'trashed' }
*/
});