Property definitions and classes (IRPCPropertyDefs)
An interface for retrieving property definitions.
Provides methods for read-only access to PropertyDefs.
| gRPC service | MFiles.IRPCPropertyDefs |
|---|---|
| Book and level | Vault API, core |
| Methods | 4 |
| Proto file | mfiles/IRPCPropertyDefs.proto |
Overview
Reads property definitions and classes: what metadata objects can have and how it is grouped.
| Job | Call |
|---|---|
| All property definitions (names, data types, lookup targets) | GetPropertyDefs |
| One property definition | GetPropertyDef |
| All classes and class groups | GetObjectClassesAndGroups |
| One class, for example to build a metadata card | GetObjectClass |
ID spaces. Property definition IDs, class IDs, class group IDs and object type IDs are separate number spaces; the same number means different things in each.
- A property definition ID identifies a property such as 0 (Name or title), 100 (Class) or 1079 (Customer). Built-in property definitions have the same ID in every vault.
- A class is an item of value list 1 (Classes); its ID is
base_info.item_info.obj_id.item_id.internal_idof ObjectClass. Class 0 is Document; the default classes of some built-in object types have negative IDs (for example -100 Assignment). A class belongs to exactly one object type (ObjectClass.object_type). - A class group is an item of value list 2 (Class groups).
- A lookup property points to an object type or value list with
PropertyDef.value_list.
IDs of custom property definitions and classes differ between vaults: resolve them by alias or GUID with GetMetadataStructureItemIdByAlias.
How property values are written and read is described in Properties and values.
All four calls are cacheable by the metadata structure version (mfiles-metadata-version-bin trailer).
GetPropertyDefs and
GetObjectClassesAndGroups also take
a known_version, so a client that keeps a cache can ask for the data only when it has changed.
Highlighted methods
| Method | Summary | Facts |
|---|---|---|
| GetPropertyDefs | Gets all property definitions that the user is allowed to see. | read session or assertion idempotent returns metadata structure version |
| GetPropertyDef | Gets one property definition by ID. | write session or assertion returns metadata structure version |
| GetObjectClassesAndGroups | Gets all classes and class groups that the user is allowed to see. | read session or assertion idempotent returns metadata structure version |
| GetObjectClass | Gets one class by ID, with the property definitions associated with it. | read session or assertion idempotent returns metadata structure version |