Metadata Categories
A MetadataCategory defines a reusable set of Custom Metadata rules that can be assigned to folders via a folder behavior. Each category specifies named metadata keys with optional allowed-value constraints, and a set of default columns to display in the UI.
If a key's allowed_values array is empty, it is treated as a free-form text field.
If the array is non-empty, the key is constrained to those values in the Web UI.
List Metadata Categories
Endpoint
GET/metadata_categories
Return Object
MetadataCategory[]
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
Additional Arguments
Show Metadata Category
Endpoint
GET/metadata_categories/{id}
Return Object
MetadataCategory
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
Request Parameters
| Parameter | Description |
|---|---|
| id int64 Required | Metadata Category ID. |
List Metadata Categories by Path
Endpoint
GET/metadata_categories/list_by_path/{path}
Return Object
MetadataCategory[]
Authorization Requirement
Available to all authenticated keys or sessions.
Request Parameters
| Parameter | Description |
|---|---|
| path string Required | Path to operate on. |
Additional Arguments
Create Metadata Category
Endpoint
POST/metadata_categories
Return Object
MetadataCategory
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
Request Parameters
| Parameter | Description |
|---|---|
| name string Required | Name of the metadata category. |
| default_columns array(string) | Metadata keys that should appear as columns in the UI by default. |
Update Metadata Category
Endpoint
PATCH/metadata_categories/{id}
Return Object
MetadataCategory
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
Request Parameters
| Parameter | Description |
|---|---|
| id int64 Required | Metadata Category ID. |
| name string | Name of the metadata category. |
| default_columns array(string) | Metadata keys that should appear as columns in the UI by default. |
Delete Metadata Category
Endpoint
DELETE/metadata_categories/{id}
Return Object
No return value.
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
Request Parameters
| Parameter | Description |
|---|---|
| id int64 Required | Metadata Category ID. |
The MetadataCategory Object
Some of the endpoints above return a MetadataCategory object. The attributes of this object are listed below.
| Attribute | Description |
|---|---|
| id int64 | Metadata Category ID |
| name string | Name of the metadata category. |
| definitions hash(string,array(string)) | Map of key names to arrays of allowed values. An empty array means free-form text. |
| default_columns array(string) | Metadata keys that should appear as columns in the UI by default. |