Used to retrieve all metadata templates created to be used specifically within the user's enterprise
1000
1000
The maximum number of items to return per page.
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
.
Returns all of the metadata templates within an enterprise and their corresponding schema.
Returned when the request parameters are not valid.
An unexpected client error.
curl -i -X GET "https://api.box.com/2.0/metadata_templates/enterprise" \
-H "authorization: Bearer <ACCESS_TOKEN>"
await client.metadataTemplates.getEnterpriseMetadataTemplates();
client.metadata_templates.get_enterprise_metadata_templates()
await client.MetadataTemplates.GetEnterpriseMetadataTemplatesAsync();
Iterable<MetadataTemplate> templates = MetadataTemplate.getEnterpriseMetadataTemplates(api);
for (MetadataTemplate templateInfo : templates) {
// Do something with the metadata template.
}
templates = client.get_metadata_templates()
for template in templates:
print(f'Metadata template {template.templateKey} is in enterprise scope')
BoxEnterpriseMetadataTemplateCollection<BoxMetadataTemplate> templates = await client.MetadataManager
.GetEnterpriseMetadataAsync();
client.metadata.getTemplates('enterprise')
.then(templates => {
/* templates -> {
limit: 100,
entries:
[ { templateKey: 'documentFlow',
scope: 'enterprise_12345',
displayName: 'Document Flow',
hidden: false,
fields:
[ { type: 'string',
key: 'currentDocumentStage',
displayName: 'Current Document Stage',
hidden: false }
{ type: 'string',
key: 'needsApprovalFrom',
displayName: 'Needs Approval From',
hidden: false },
{ type: 'string',
key: 'nextDocumentStage',
displayName: 'Next Document Stage',
hidden: false }
{ type: 'float',
key: 'maximumDaysAllowedInCurrentStage',
displayName: 'Maximum Days Allowed In Current Stage',
hidden: false }
{ templateKey: 'marketingCollateral',
scope: 'enterprise_12345',
displayName: 'Marketing Collateral',
hidden: false,
fields:
[ { type: 'string',
key: 'audience1',
displayName: 'Audience',
hidden: false },
{ type: 'string',
key: 'previousState',
displayName: 'Previous State',
hidden: false } ] },
{ templateKey: 'productInfo',
scope: 'enterprise_12345',
displayName: 'Product Info',
hidden: false,
fields:
[ { type: 'float',
key: 'skuNumber',
displayName: 'SKU Number',
hidden: false },
{ type: 'enum',
key: 'department',
displayName: 'Department',
hidden: false,
options:
[ { key: 'Beauty' },
{ key: 'Shoes' },
{ key: 'Accessories' },
{ key: 'Clothing' },
{ key: 'Handbags' },
{ key: 'Bedding' },
{ key: 'Watches' } ] },
{ type: 'date',
key: 'displayDate',
displayName: 'Display Date',
hidden: false } ] } ],
next_marker: null,
prev_marker: null }
*/
});
let iterator = client.metadata.listEnterpriseTemplates(scope: "enterprise")
iterator.next { results in
switch results {
case let .success(page):
for template in page.entries {
print("Template name: \(template.displayName)")
}
case let .failure(error):
print(error)
}
}
{
"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"
}