Data attributes
Note: This preview feature is currently only available in the licensed Business and Enterprise editions.
Data attributes (aka data properties) allow you to store structured information against documents, and will soon allow filtering and cascading of this data.
Usage
Data attributes you wish to use within the workspace must first be setup under Settings → Data Attributes, here you can define which properties are available and which options they contain.
Once an attribute is defined you will see a new option in the header of each document below the title to “+ Property” where the value can be set on a per-document basis.
API
Data attributes are available through the API, the following endpoints exist and follow existing patterns to create and manage data attributes at the workspace level:
dataAttributes.infodataAttributes.listdataAttributes.createdataAttributes.updatedataAttributes.delete
To modify for individual documents you must pass a dataAttributes array to documents.update, for example:
await fetch(apiUrl, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${apiToken}`,
},
body: JSON.stringify({
id: documentId,
dataAttributes: [
{
dataAttributeId: "cd9d8224-2f88-4bdb-9fbf-9c256a9eb496",
value: "My text value"
}
]
})
});