Box Developer Documentation

A beta version of the new Box developer documentation site is launching soon! Updated Developer Guides, modern API Reference, and AI-powered search are on the way to help you build with Box faster. Stay tuned for more updates.

List all metadata on an item

List all metadata on an item

Metadata instances can be listed for either a file or a folder.

List metadata on a file

To list all metadata instances on a file, call the GET /files/:file_id/metadata API endpoint.

cURL
curl -i -X GET "https://api.box.com/2.0/files/12345/metadata" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
Node/TypeScript v10
await client.fileMetadata.getFileMetadata(file.id);
Python v10
client.file_metadata.get_file_metadata(file.id)
.NET v10
await client.FileMetadata.GetFileMetadataAsync(fileId: file.Id);
Swift v10
try await client.fileMetadata.getFileMetadata(fileId: file.id)
Java v10
client.getFileMetadata().getFileMetadata(file.getId())
.NET v6
await client.FileMetadata.GetFileMetadataAsync(fileId: file.Id);
Node v4
await client.fileMetadata.getFileMetadata(file.id);

This API does not support paging and it will always return all of the metadata instances for this file.

List metadata on a folder

To list all metadata instances on any folder (except for the root folder), call the GET /folders/:file_id/metadata API endpoint.

cURL
curl -i -X GET "https://api.box.com/2.0/folders/4353455/metadata" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
Node/TypeScript v10
await client.folderMetadata.getFolderMetadata(folder.id);
Python v10
client.folder_metadata.get_folder_metadata(folder.id)
.NET v10
await client.FolderMetadata.GetFolderMetadataAsync(folderId: folder.Id);
Swift v10
try await client.folderMetadata.getFolderMetadata(folderId: folder.id)
Java v10
client.getFolderMetadata().getFolderMetadata(folder.getId())
.NET v6
await client.FolderMetadata.GetFolderMetadataAsync(folderId: folder.Id);
Node v4
await client.folderMetadata.getFolderMetadata(folder.id);

This API does not support paging and it will always return all of the metadata instances for this file. This API can not be used on the root folder with ID 0.