MetadataTemplates
View of Box metadata templates and their fields. One row per (template, field), with template-level columns repeated. Use the CreateMetadataTemplate, ModifyMetadataTemplate, and DeleteMetadataTemplate stored procedures to add, modify, or delete templates and fields.
Table Specific Information
Select
You can retrieve information about the metadata templates available in your enterprise.
SELECT * FROM MetadataTemplates;
You can also retrieve a single template by its identifier:
SELECT * FROM MetadataTemplates WHERE Id = 'e93746cc-03f6-4dee-ab45-01834989950c';
Modifying templates
MetadataTemplates is exposed as a read-only view. To add, modify, or delete a template, call one of the dedicated stored procedures:
CreateMetadataTemplate
creates a new template and, optionally, seeds it with one or more fields in a single call.ModifyMetadataTemplate
modifies the schema of an existing template. The change to apply (add a field, rename an option, reorder fields, and so on) is selected through the Op input.DeleteMetadataTemplate
deletes a template and all of its fields.
Columns
| Name | Type | References | Description |
| Id [KEY] | String | Unique identifier assigned to the metadata template. | |
| TemplateKey | String | A unique key that identifies the metadata template within the enterprise. This key is unique inside a single enterprise but might differ across enterprises. | |
| CopyInstanceOnItemCopy | Boolean | Indicates whether metadata applied to a file or folder should be copied when the item itself is copied. | |
| DisplayName | String | The user-friendly name of the metadata template as shown in the Box web and mobile apps. | |
| FieldsId [KEY] | String | Unique identifier assigned to a specific field within the metadata template. | |
| FieldsKey | String | A unique key for the field within its metadata template, required to distinguish it from other fields. | |
| FieldsDisplayName | String | The display name of the field as shown to users in the Box web and mobile apps. | |
| FieldsType | String | The type of the metadata field, such as string, enum, or multiSelect. | |
| FieldsDescription | String | A description of the metadata field's purpose or usage. | |
| FieldsisHidden | Boolean | Indicates whether the field is hidden in the user interface and can only be set programmatically through the API. | |
| FieldsOptions | String | A list of allowed options for the field, used with enum and multiSelect field types. | |
| TemplateisHidden | Boolean | Indicates whether the template is visible in the Box web application or restricted to API usage only. | |
| Scope | String | Defines the scope of the template, such as enterprise-wide or global. | |
| Type | String | The object type for the template. This value is always metadata_template. |