Box Developer Documentation
Latest version

List all global metadata templates

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

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

Used to retrieve all generic, global metadata templates available to all enterprises using Box.

Request

bearer [ACCESS_TOKEN]
application/json

Query Parameters

integer (int64)in queryoptional
1000
1000

The maximum number of items to return per page.

stringin queryoptional
JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii

Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination.

This requires usemarker to be set to true.

Response

application/jsonMetadata templates

Returns all of the metadata templates available to all enterprises and their corresponding schema.

application/jsonClient error

Returned when the request parameters are not valid.

application/jsonClient error

An unexpected client error.

get
List all global metadata templates
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

Learn more about Box SDK versionig strategy.


cURL
curl -i -X GET "https://api.box.com/2.0/metadata_templates/global" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
Node/TypeScript v10
await client.metadataTemplates.getGlobalMetadataTemplates();
Python v10
client.metadata_templates.get_global_metadata_templates()
.NET v10
await client.MetadataTemplates.GetGlobalMetadataTemplatesAsync();
Swift v10
try await client.metadataTemplates.getGlobalMetadataTemplates()
Java v10
client.getMetadataTemplates().getGlobalMetadataTemplates()
Java v4
Iterable<MetadataTemplate> templates = MetadataTemplate.getEnterpriseMetadataTemplates('global', api);
for (MetadataTemplate templateInfo : templates) {
    // Do something with the metadata template.
}
Python v3
templates = client.get_metadata_templates(scope='global)
for template in templates:
    print(f'Metadata template {template.templateKey} is in global scope')
.NET v5
BoxEnterpriseMetadataTemplateCollection<BoxMetadataTemplate> templates = await client.MetadataManager
    .GetEnterpriseMetadataAsync("global");
Node v3
client.metadata.getTemplates('global')
	.then(templates => {
		// ...
	});

Response Example

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