List all global metadata templates

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

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

Request

application/json

Query Parameters

integer / int64in queryoptional
10001000

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

cURL
curl -X GET https://api.box.com/2.0/metadata_templates/global \
     -H 'Authorization: Bearer <ACCESS_TOKEN>'
.NET
BoxEnterpriseMetadataTemplateCollection<BoxMetadataTemplate> templates = await client.MetadataManager
    .GetEnterpriseMetadataAsync("global");
Java
Iterable<MetadataTemplate> templates = MetadataTemplate.getEnterpriseMetadataTemplates('global', api);
for (MetadataTemplate templateInfo : templates) {
    // Do something with the metadata template.
}
Python
templates = client.get_metadata_templates(scope='global)
for template in templates:
    print('Metadata template {0} is in global scope'.format(template.templateKey))
Node
client.metadata.getTemplates('global')
	.then(templates => {
		// ...
	});
iOS
client.metadata.listEnterpriseTemplates(scope: "global") { results in
    switch results {
    case let .success(iterator):
        for i in 1 ... 10 {
            iterator.next { result in
                switch result {
                case let .success(template):
                    print("Template name: \(template.displayName)")
                case let .failure(error):
                    print(error)
                }
            }
        }
    case let .failure(error):
        print(error)
    }
}