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.

Latest version

Get metadata instance on folder

get
https://api.box.com/2.0
/folders/:folder_id/metadata/:scope/:template_key

This endpoint is in the version 2024.0. No changes are required to continue using it. For more details, see Box API versioning.

Retrieves the instance of a metadata template that has been applied to a folder. This can not be used on the root folder with ID 0.

Request

bearer [ACCESS_TOKEN]
application/json

Path Parameters

stringin pathrequired
12345

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.

stringin pathrequired
global

The scope of the metadata template.

Value is one of global,enterprise

stringin pathrequired
properties

The name of the metadata template.

Response

An instance of the metadata template that includes additional "key:value" pairs defined by the user or an application.

application/jsonClient error

Returned when the request parameters are not valid.

application/jsonClient error

Returned if the metadata template specified was not applied to this folder or the user does not have access to the folder.

  • instance_not_found - The metadata template was not applied to the folder.
application/jsonClient error

Returned when the method was not allowed. This often happens when the folder ID is not valid or the root folder with ID 0.

application/jsonClient error

An unexpected client error.

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

Request Example

Learn more about Box SDK versioning strategy.


cURL
curl -i -X GET "https://api.box.com/2.0/folders/4353455/metadata/enterprise_27335/blueprintTemplate" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
Node/TypeScript v10
await client.folderMetadata.getFolderMetadataById(
  folder.id,
  'global' as GetFolderMetadataByIdScope,
  'properties',
);
Python v10
client.folder_metadata.get_folder_metadata_by_id(
    folder.id, GetFolderMetadataByIdScope.GLOBAL, "properties"
)
.NET v10
await client.FolderMetadata.GetFolderMetadataByIdAsync(folderId: folder.Id, scope: GetFolderMetadataByIdScope.Global, templateKey: "properties");
Swift v10
try await client.folderMetadata.getFolderMetadataById(folderId: folder.id, scope: GetFolderMetadataByIdScope.global, templateKey: "properties")
Java v10
client.getFolderMetadata().getFolderMetadataById(folder.getId(), GetFolderMetadataByIdScope.GLOBAL, "properties")
.NET v6
await client.FolderMetadata.GetFolderMetadataByIdAsync(folderId: folder.Id, scope: GetFolderMetadataByIdScope.Global, templateKey: "properties");
Node v4
await client.folderMetadata.getFolderMetadataById(
  folder.id,
  'global' as GetFolderMetadataByIdScope,
  'properties',
);

Response Example

{
  "$canEdit": true,
  "$id": "01234500-12f1-1234-aa12-b1d234cb567e",
  "$parent": "folder_59449484661,",
  "$scope": "enterprise_27335",
  "$template": "marketingCollateral",
  "$type": "properties-6bcba49f-ca6d-4d2a-a758-57fe6edf44d0",
  "$typeVersion": 2,
  "$version": 1
}