Box Developer Documentation

Find metadata template by instance ID

get
https://api.box.com/2.0
/metadata_templates

Finds a metadata template by searching for the ID of an instance of the template.

Request

bearer [ACCESS_TOKEN]
application/json

Query Parameters

string (uuid)in queryrequired
01234500-12f1-1234-aa12-b1d234cb567e

The ID of an instance of the metadata template to find.

Response

application/jsonMetadata templates

Returns a list containing the 1 metadata template that matches the instance ID.

application/jsonClient error

Returned when the request parameters are not valid.

application/jsonClient error

An unexpected client error.

get
Find metadata template by instance ID
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

TypeScript Gen
await client.metadataTemplates.getMetadataTemplatesByInstanceId({
  metadataInstanceId: createdMetadataInstance.id!,
} satisfies GetMetadataTemplatesByInstanceIdQueryParams);
Python Gen
client.metadata_templates.get_metadata_templates_by_instance_id(
    created_metadata_instance.id
)
.NET Gen
await client.MetadataTemplates.GetMetadataTemplatesByInstanceIdAsync(queryParams: new GetMetadataTemplatesByInstanceIdQueryParams(metadataInstanceId: NullableUtils.Unwrap(createdMetadataInstance.Id)));
Swift Gen (Beta)
try await client.metadataTemplates.getMetadataTemplatesByInstanceId(queryParams: GetMetadataTemplatesByInstanceIdQueryParams(metadataInstanceId: createdMetadataInstance.id!))

Response Example

{
  "entries": [
    {
      "id": "58063d82-4128-7b43-bba9-92f706befcdf",
      "type": "metadata_template",
      "scope": "enterprise_123456",
      "templateKey": "productInfo",
      "displayName": "Product Info",
      "hidden": true,
      "fields": [
        {
          "type": "string",
          "key": "category",
          "displayName": "Category",
          "description": "The category",
          "hidden": true,
          "options": [
            {
              "key": "Category 1",
              "id": "45dc2849-a4a7-40a9-a751-4a699a589190"
            }
          ],
          "id": "822227e0-47a5-921b-88a8-494760b2e6d2"
        }
      ],
      "copyInstanceOnItemCopy": true
    }
  ],
  "limit": 1000,
  "next_marker": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii",
  "prev_marker": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVih"
}