Get a metadata template
Get a metadata template
Information for a metadata template can be retrieved using the template's name and scope, or the template's identifier.
Get a metadata template by name
To get a metadata template by name, call the GET /metadata_templates/:scope/:templateKey/schema API endpoint with the
template's scope and templateKey.
cURL
curl -i -X GET "https://api.box.com/2.0/metadata_templates/enterprise/blueprintTemplate/schema" \
-H "authorization: Bearer <ACCESS_TOKEN>"Node/TypeScript v10
await client.metadataTemplates.getMetadataTemplate(
'enterprise' as GetMetadataTemplateScope,
template.templateKey!,
);Python v10
client.metadata_templates.get_metadata_template(
GetMetadataTemplateScope.ENTERPRISE, template.template_key
).NET v10
await client.MetadataTemplates.GetMetadataTemplateAsync(scope: GetMetadataTemplateScope.Enterprise, templateKey: NullableUtils.Unwrap(template.TemplateKey));Swift v10
try await client.metadataTemplates.getMetadataTemplate(scope: GetMetadataTemplateScope.enterprise, templateKey: template.templateKey!)Java v10
client.getMetadataTemplates().getMetadataTemplate(GetMetadataTemplateScope.ENTERPRISE, template.getTemplateKey()).NET v6
await client.MetadataTemplates.GetMetadataTemplateAsync(scope: GetMetadataTemplateScope.Enterprise, templateKey: NullableUtils.Unwrap(template.TemplateKey));Node v4
await client.metadataTemplates.getMetadataTemplate(
'enterprise' as GetMetadataTemplateScope,
template.templateKey!,
);Get a metadata template by ID
To get a metadata template by ID, you will need to pass the template's
id to the GET /metadata_templates/:id API endpoint.
cURL
curl -i -X GET "https://api.box.com/2.0/metadata_templates/d9671692-3df6-11ea-b77f-2e728ce88125" \
-H "authorization: Bearer <ACCESS_TOKEN>"Node/TypeScript v10
await client.metadataTemplates.getMetadataTemplateById(template.id);Python v10
client.metadata_templates.get_metadata_template_by_id(template.id).NET v10
await client.MetadataTemplates.GetMetadataTemplateByIdAsync(templateId: template.Id);Swift v10
try await client.metadataTemplates.getMetadataTemplateById(templateId: template.id)Java v10
client.getMetadataTemplates().getMetadataTemplateById(template.getId()).NET v6
await client.MetadataTemplates.GetMetadataTemplateByIdAsync(templateId: template.Id);Node v4
await client.metadataTemplates.getMetadataTemplateById(template.id);