Retrieves details for a folder, including the first 100 entries in the folder.
To fetch more items within the folder, please use the Get items in a folder endpoint.
0
The unique identifier that represent a folder.
The ID for any folder can be determined
by visiting this folder in the web application
and copying the ID from the URL. For example,
for the URL https://*.app.box.com/folder/123
the folder_id
is 123
.
The root folder of a Box account is
always represented by the ID 0
.
id,type,name
A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.
Be aware that specifying this parameter will have the effect that none of the standard fields are returned in the response unless explicitly specified, instead only fields for the mini representation are returned, additional to the fields requested.
1
Ensures an item is only returned if it has changed.
Pass in the item's last observed etag
value
into this header and the endpoint will fail
with a 304 Not Modified
if the item has not
changed since.
Returns a folder, including the first 100 entries in the folder.
To fetch more items within the folder, please use the Get items in a folder endpoint.
Not all available fields are returned by default. Use the fields query parameter to explicitly request any specific fields.
Returns an empty response when the If-None-Match
header matches
the current etag
value of the folder. This indicates that the folder
has not changed since it was last requested.
Returned when the access token provided in the Authorization
header
is not recognized or not provided.
Returned if the folder is not found, or the user does not have access to the folder.
Returned if the folder_id
is not in a recognized format.
An unexpected client error.
curl -X GET https://api.box.com/2.0/folders/4353455 \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
BoxFolder folder = await client.FoldersManager.GetInformationAsync("11111");
BoxFolder folder = new BoxFolder(api, "id");
BoxFolder.Info info = folder.getInfo();
folder = client.folder(folder_id='22222').get()
print('Folder "{0}" has {1} items in it'.format(
folder.name,
folder.item_collection.['total_count'],
))
client.folders.get('11111')
.then(folder => {
/* folder -> {
type: 'folder',
id: '11111',
sequence_id: '1',
etag: '1',
name: 'Pictures',
created_at: '2012-12-12T10:53:43-08:00',
modified_at: '2012-12-12T11:15:04-08:00',
description: 'Some pictures I took',
size: 629644,
path_collection:
{ total_count: 1,
entries:
[ { type: 'folder',
id: '0',
sequence_id: null,
etag: null,
name: 'All Files' } ] },
created_by:
{ type: 'user',
id: '22222',
name: 'Example User'
login: 'user@example.com' },
modified_by:
{ type: 'user',
id: '22222',
name: 'Example User',
login: 'user@example.com' },
owned_by:
{ type: 'user',
id: '22222',
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: 'active',
item_collection:
{ total_count: 1,
entries:
[ { type: 'file',
id: '33333',
sequence_id: '3',
etag: '3',
sha1: '134b65991ed521fcfe4724b7d814ab8ded5185dc',
name: 'tigers.jpeg' } ],
offset: 0,
limit: 100 } }
*/
});
client.folders.get(
folderId: "22222",
fields: ["name", "created_at"]
) { (result: Result<Folder, BoxSDKError>) in
guard case let .success(folder) = result else {
print("Error getting folder information")
return
}
print("Folder \(folder.name) was created at \(folder.createdAt)")
}