v1

latestOpenAPI 3.0.2Apache-2.02026-07-142963051.0 MB
Metadata instances (Files)

Get metadata instance on file

Retrieves the instance of a metadata template that has been applied to a file.

get/files/{file_id}/metadata/{scope}/{template_key}

Path parameters

file_idstring required

The unique identifier that represents a file.

The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL https://*.app.box.com/files/123 the file_id is 123.

scope'global' | 'enterprise' required

The scope of the metadata template.

template_keystring required

The name of the metadata template.

Query parameters

viewstring

Taxonomy field values are returned in API view by default, meaning the value is represented with a taxonomy node identifier. To retrieve the Hydrated view, where taxonomy values are represented with the full taxonomy node information, set this parameter to hydrated. This is the only supported value for this parameter.

Response

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

$parentstring

The identifier of the item that this metadata instance has been attached to. This combines the type and the id of the parent in the form {type}_{id}.

$templatestring

The name of the template.

$scopestring

An ID for the scope in which this template has been applied. This will be enterprise_{enterprise_id} for templates defined for use in this enterprise, and global for general templates that are available to all enterprises using Box.

$versioninteger

The version of the metadata instance. This version starts at 0 and increases every time a user-defined property is modified.

$canEditboolean

Whether the user can edit this metadata instance.

$idstring uuid

A UUID to identify the metadata instance.

$typestring

A unique identifier for the "type" of this instance. This is an internal system property and should not be used by a client application.

$typeVersioninteger

The last-known version of the template of the object. This is an internal system property and should not be used by a client application.

Example response

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