If you’re unfamiliar with Metadata at Box and want to acquaint yourself with it, please refer to the Metadata Guide, which reviews basic workflows and definitions.
General Metadata Questions
Can I apply the same instance to multiple files or folders?
You cannot apply the same instance to multiple files and folders, but you can create an instance on each file or folder and set the same values on each instance.
Can I apply metadata to folders?
Yes, you can. Optionally, you can also enable a cascade policy on a folder-based instance.
Can I have metadata that isn’t attached to folders or files?
Box does not currently support this.
Can I apply metadata to content that is already in Box?
Yes, for an individual file or folder you can do this by navigating to the item and applying a template and corresponding values in the sidebar. For multiple files or folders, you can do so by creating a cascade policy on a folder and performing a force-apply operation to back-fill the metadata values on existing content. Alternatively, you can apply metadata programmatically, such as through a command line script, using the Box API.
What happens when I move my files or folders? Is the metadata moved with it?
Yes, metadata is moved along with files and folders.
What happens when I copy my files or folders? Is the metadata copied with it?
This is configurable via the API on a template-by-template basis. By default, the metadata is not copied with your files, but it can be configured to be true. Currently, metadata instances without a parent template cannot be copied.
Can I create and update and delete metadata in bulk?
Creates and Updates - You can use a cascade policy to create or update metadata instances which all share the same template and values. See cascade policies for more detail.
Deletes - If you delete a template all of its corresponding instances are deleted. There is no way to selectively delete specific instances of a template in bulk through the Box web application.
What is a global scope versus enterprise scope template?
A globally scoped template is one that is created by Box but can be used by admins and users. The properties template is an example of a global scoped template. An enterprise-scoped template is one that an administrator creates in your enterprise and can only be used by users in your enterprise. (Note: globally scoped templates do not count against your 500 template limit, but they also are not supported in the metadata query API.)
Is metadata versioned, and can I see past versions of a metadata version?
No. Metadata always reflects the current version and there is no way to view previous versions. If you need to identify metadata related create, update, and delete events you can obtain these events via the API.
Is NTFS metadata retained once uploaded to Box?
No, browser uploads are expected to strip all filesystem metadata except
lastModified timestamp and if so desired, the
createdAt timestamp can be added via the public API. However, Box does not use NTFS for our storage systems
Metadata Templates and Cascade Policies
How many templates should I aim to have? Is there a limit?
There is a limit of 500 templates per enterprise.
What happens if I need more templates? Why can’t I have more?
You cannot exceed the 500-template limit. We may be able to increase this limit in the future, but as of now Box can support only up to 500.
How many instances should I limit to a template? Is there a limit?
You can have as many instances per template as you would like. There is no limit on the number of instances per template.
Can I use multiple templates on the same document? If so, is there a limit to how many?
Yes, you can have multiple instances on the same file or folder as long as they are from different templates. You can have up to 100 instances on any given item.
Are any restrictions of size and number applied on my templates?
Yes, you can only have up to 500 templates per enterprise. Each template has a size restriction of 16,384 characters.
Can I limit who can see my templates and metadata?
Yes, you can. Within the admin console you can designate certain templates as hidden or not, which restricts the ability of a user to see the hidden templates within the web application. Metadata visibility on a file is tied to file permissions such that if users have permission to see a file, they can in turn see the metadata. An admin, however, can designate certain template fields to be hidden and they will not show up on the metadata instance within the web application. Please note that hiding templates and fields only restricts visibility to them within the Box Web Application. Hidden templates and fields are still available to users when using the Box API.
Can I allow only certain groups to see certain templates?
No, this is not currently possible since permissions are tied to a user’s file and folder permissions.
What happens if I delete my template?
If you delete your template (currently only possible via API) then your corresponding instances with that parent template will also be deleted.
If I update my template, are my instances updated too?
Yes, your instances are updated immediately. However, if you are trying to search for your new values via the Metadata Search API (not the Metadata Query API) or via the Webapp they will be subject to another indexing delay.
How can I automatically apply metadata?
You can currently do this through Metadata Cascade Policies. This entails applying a cascade policy to a given folder, and then the instance associated with that cascade policy will affect everything in the sub-tree. (Note that in order to do this to files already in the sub-tree prior to applying the cascade policy requires you to execute a force apply).
Why are cascade policies in Box Beta releases, and are they safe to use?
Cascade policies are in Beta while we are changing some of the underlying internal infrastructure, but they are not going away nor is the functionality going to change. They are safe to use and will no longer be in Beta within the coming year.
What happens if I accidentally apply a cascade policy? Is there an undo button?
There is currently no undo button for creating a cascade policy. You will need to manually delete any unwanted metadata.
Metadata Query and Search
Why can’t I query my Metadata templates?
If your template has more than 10,000 instances associated with it, you will not be able to perform queries without first having an index applied.
Why do my Metadata queries sometimes fail?
If your queries are sometimes succeeding and sometimes failing, it’s likely that your query needs to be optimized to fit the constraints of the index that is being leveraged.
How do I create a good index on a template?
This depends on what it is you’re trying to accomplish, and several other factors. Currently, Box asks for specific information and we creates the indexes for you. The information we use in the short-term is:
- your enterprise ID,
- the template you wish to query,
- the fields you wish to query on (and what operator you are using e.g. “=”, “>=”, “like”),
- any ordering information,
- roughly what your data looks like (such as the number of unique values, and the frequency of those values for the columns that are included in your query).
Can I query multiple templates at the same time?
This is something we intend to support in the future, but is currently not available.
What are the best practices to make my queries work consistently, and efficiently?
Ensure that your query is relatively simple and fully supported by an index. If you are using complex logic, or writing queries that are only partially satisfied by an index, you will likely experience a degradation in your query performance.
What’s the difference between using Search and Query for MD? When would I use one over the other?
Please see this article.
Will a query ever return results to which the user lacks permission?
No, we ensure users get only items to which they have permissions.
Does Box use a relational database to store metadata?
Yes and no. Box does not use a traditional relational database to store metadata, but rather a NoSQL store with a SQL-like engine built on top (Apache Phoenix) that allows for the users to query their data.
Can I query using item properties like name, SHA1, or created date?
Querying based on item properties is currently not supported. However, you can still use the Metadata Search API if you wish to use this info.
Do any limitations apply to my metadata queries?
Yes, if you create a query based on numbers, you cannot exceed the range of -16777215 and +16777215.
For metadata search using number attributes the index value is stored as FLOAT32. As a result, integers between -16777215 and +16777215 can be precisely represented.
Any operation with numbers beyond the range can lose its precision.
If you have a question that has not been answered here, please review the conversations over in the Box Developer Forum, or other Community articles.