Get folder information

get
https://api.box.com/2.0
/folders/:folder_id

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.

Request

application/json

Path Parameters

stringin pathrequired
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.

Query Parameters

string arrayin queryoptional
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.

Request Headers

stringin header
optional
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.

Response

application/jsonFolder

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.

none

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.

application/jsonClient error

Returned when the access token provided in the Authorization header is not recognized or not provided.

application/jsonClient error

Returned if the folder is not found, or the user does not have access to the folder.

application/jsonClient error

Returned if the folder_id is not in a recognized format.

application/jsonClient error

An unexpected client error.

get
Get folder information
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

cURL
curl -X GET https://api.box.com/2.0/folders/4353455 \
     -H 'Authorization: Bearer <ACCESS_TOKEN>'
.NET
BoxFolder folder = await client.FoldersManager.GetInformationAsync("11111");
Java
BoxFolder folder = new BoxFolder(api, "id");
BoxFolder.Info info = folder.getInfo();
Python
folder = client.folder(folder_id='22222').get()
print('Folder "{0}" has {1} items in it'.format(
    folder.name,
    folder.item_collection.['total_count'],
))
Node
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 } }
        */
    });
iOS
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)")
}