This document describes the tools available in the box_tools_metadata module for metadata template and instance management in Box.
Create a new metadata template definition in Box with custom fields (string, date, enum, multiSelect types).
- Arguments:
ctx: Request contextdisplay_name: Display name of the templatefields: List of field definitions for the templatetemplate_key: Optional template key
List all metadata templates in Box.
- Arguments:
ctx: Request context
Retrieve a metadata template by its key.
- Arguments:
ctx: Request contexttemplate_key: Key of the template to retrieve
Retrieve a metadata template by its name.
- Arguments:
ctx: Request contexttemplate_name: Name of the template to retrieve
Set a metadata template instance on a specific file.
- Arguments:
ctx: Request contextfile_id: ID of the filetemplate_key: Key of the templatemetadata_values: Dictionary of metadata field values
Get the metadata template instance associated with a specific file.
- Arguments:
ctx: Request contextfile_id: ID of the filetemplate_key: Key of the template
Update the metadata template instance on a file with optional removal of non-included data.
- Arguments:
ctx: Request contextfile_id: ID of the filetemplate_key: Key of the templatemetadata_values: Dictionary of metadata field values to update
Delete the metadata template instance associated with a specific file.
- Arguments:
ctx: Request contextfile_id: ID of the filetemplate_key: Key of the template
Refer to src/tools/box_tools_metadata.py for implementation details.