Get metadata instance on folder


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.



Path Parameters

stringin pathrequired

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://* the folder_id is 123.

The root folder of a Box account is always represented by the ID 0.

stringin pathrequired

The scope of the metadata template

Value is one of global,enterprise

stringin pathrequired

The name of the metadata template


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 metadata instance on folder
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

curl -i -X GET "" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
TypeScript Gen
await client.folderMetadata.getFolderMetadataById(,
  'global' as GetFolderMetadataByIdScope,
Python Gen
client.folder_metadata.get_folder_metadata_by_id(, GetFolderMetadataByIdScope.GLOBAL.value, "properties"
.NET Gen (Beta)
await client.FolderMetadata.GetFolderMetadataByIdAsync(folderId: folder.Id, scope: GetFolderMetadataByIdScope.Global, templateKey: "properties");
metadata = client.folder(folder_id='22222').metadata(scope='enterprise', template='myMetadata').get()
print(f'Got metadata instance {metadata["$id"]}')
Dictionary<string, object> metadata = await client.MetadataManager.
    .GetFolderMetadataAsync(folderId: "11111", "enterprise", "marketingCollateral");
BoxFolder folder = new BoxFolder(api, "id");
Metadata metadata = folder.getMetadata();

// Unknown type metadata field, you can test for type or try to get as any type
JsonValue unknownValue = metadata.getValue("/someField");

// String or Enum metadata fields
String stringValue = metadata.getString("/author");

// Float metadata fields can be interpreted as any numeric type
float floatValue = metadata.getFloat("/price");

// Date metadata fields
Date dateValue = metadata.getDate("/deadline");
client.folders.getMetadata('11111', client.metadata.scopes.ENTERPRISE, 'marketingCollateral')
	.then(metadata => {
		/* metadata -> {
			audience: 'internal',
			documentType: 'Q1 plans',
			competitiveDocument: 'no',
			status: 'active',
			author: 'Jones',
			currentState: 'proposal',
			'$type': 'marketingCollateral-d086c908-2498-4d3e-8a1f-01e82bfc2abe',
			'$parent': 'folder_11111',
			'$id': '2094c584-68e1-475c-a581-534a4609594e',
			'$version': 0,
			'$typeVersion': 0,
			'$template': 'marketingCollateral',
			'$scope': 'enterprise_12345' }
    forFolderWithId: "22222",
    scope: "enterprise",
    templateKey: "personnelRecord"
) { (result: Result<MetadataObject, BoxSDKError>) in
    guard case let .success(metadata) = result {
        print("Error retrieving metadata")

    print("Found personnel record for \(metadata.keys["name"])")

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