List collection items

get
https://api.box.com/2.0
/collections/:collection_id/items

Retrieves the files and/or folders contained within this collection.

Request

application/json

Path Parameters

stringin pathrequired
926489

The ID of the collection.

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.

integer / int64in queryoptional
10001000

The maximum number of items to return per page.

integer / int64in queryoptional
10000

The offset of the item at which to begin the response.

Response

application/jsonItems

Returns an array of items in the collection.

application/jsonClient error

An unexpected client error.

get
List collection items
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/collections/926489/items \
     -H 'Authorization: Bearer <ACCESS_TOKEN>'
.NET
BoxCollection<BoxItem> items = await client.CollectionsManager.GetCollectionItemsAsync(id: "11111");
Java
BoxFolder folder = new BoxFolder(api, "id");
for (BoxItem.Info itemInfo : folder) {
    if (itemInfo instanceof BoxFile.Info) {
        BoxFile.Info fileInfo = (BoxFile.Info) itemInfo;
        // Do something with the file.
    } else if (itemInfo instanceof BoxFolder.Info) {
        BoxFolder.Info folderInfo = (BoxFolder.Info) itemInfo;
        // Do something with the folder.
    }
}
Python
items = client.collection(collection_id='12345').get_items()
for item in items:
    print('{0} "{1}" is in the collection'.format(item.type.capitalize(), item.name))
Node
client.collections.getItems('81934', {fields: 'name', limit: 2})
	.then(items => {
		/* items -> { total_count: 24,
			entries: 
			[ { type: 'folder',
				id: '192429928',
				sequence_id: '1',
				etag: '1',
				name: 'Stephen Curry Three Pointers' },
				{ type: 'file',
				id: '818853862',
				sequence_id: '0',
				etag: '0',
				name: 'Warriors.jpg' } ],
			offset: 0,
			limit: 2 }
		*/
	});