IRPCPropertyDefs.GetObjectClassesAndGroups
Vault API / core read session or assertion idempotent returns metadata structure version
Gets all classes and class groups that the user is allowed to see.
| Service | Property definitions and classes MFiles.IRPCPropertyDefs |
|---|---|
| gRPC method | /MFiles.IRPCPropertyDefs/GetObjectClassesAndGroups |
| HTTP (mf-http-grpc) | POST /grpc/v1/get-object-classes-and-groups |
| Request | GetObjectClassesAndGroupsRequest |
| Response | GetObjectClassesAndGroupsResponse |
| Book and level | Vault API, core |
| Kind | read |
| Session | Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata). |
| Idempotent | yes |
| Returns metadata structure version | yes (in the mfiles-metadata-version-bin trailer) |
| Streaming | none (unary) |
Remarks
- Requires a vault session. No special vault rights are needed.
- Returns the classes of all object types; group or filter them by
object_type. - Deleted classes are left out, and so are classes and class groups the user is not allowed to
see. In each class,
associated_property_defslists only the property definitions the user can see. current_user_permissions.can_user_attach_objectstells whether the user may attach objects to the class; offer only such classes when the user creates an object.- Change check: send the
current_versionof the previous response asknown_version. If nothing has changed, the response has the samecurrent_versionand emptyclassesandclass_groups. Send 0 to always get everything. - Names are in the session language when the vault has translations for it.
- Cacheable by metadata structure version.
Request: GetObjectClassesAndGroupsRequest
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.
| Field | Type | Description |
|---|---|---|
call_importance | CallImportance | The importance level of this call. Leave unset or use CALL_IMPORTANCE_NORMAL.Values: CALL_IMPORTANCE_DEFAULT (0), CALL_IMPORTANCE_NORMAL (1), CALL_IMPORTANCE_CAN_BE_REJECTED (2). |
known_version | int64 | The current_version from the caller's previous response, or 0 to get all classes and class groups. If it is still current, both result lists are empty. |
Response: GetObjectClassesAndGroupsResponse
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page. Fields marked (recursive) refer to a type already on their path.
| Field | Type | Description |
|---|---|---|
current_version | int64 | The current version of the classes on the server. Store it and send it as known_version next time. |
classes[] | repeated ObjectClass | The classes the user can see, or empty if known_version was current. See ObjectClass. |
classes[].base_info | ValueListItem | The class as an item of value list 1 (Classes). The class ID is base_info.item_info.obj_id.item_id.internal_id and its name base_info.item_info.name. |
classes[].base_info.item_info | ItemInfo | The item's identity and name: obj_id.type is the value list ID, obj_id.item_id.internal_id the item ID (unique within the list only), plus name, guid, external_id and flags. options.is_deleted marks a deleted item. |
classes[].base_info.has_parent | bool | True if the item has a parent item in the same (hierarchical) list. |
classes[].base_info.has_owner | bool | True if the item belongs to an item of the owner list (ValueList.owner_object_type). |
classes[].base_info.parent_id | int32 | With has_parent, the item ID of the parent item; otherwise ignored. |
classes[].base_info.owner_id | int32 | With has_owner, the item ID of the owner item in the owner list. |
classes[].base_info.owner_name | string | The name of the owner item. |
classes[].base_info.automatic_permissions | AutomaticPermissions | If set, specifies the automatic permissions for an object for which the user selects this item. |
classes[].base_info.icon | Bytes | If set, contains the icon of this item in .ICO format. |
classes[].associated_property_defs[] | repeated AssociatedPropertyDef | The properties of objects of this class, each with is_required. Lists only property definitions the caller can see, and includes the built-in properties that every object has (such as 20 Created and 25 Created by). |
classes[].associated_property_defs[].property_def | int32 | The ID of the property definition. |
classes[].associated_property_defs[].is_required | bool | True if objects of the class must have a value for this property. |
classes[].default_workflow | int32 | The default workflow of the document class, or zero if there is no default workflow. |
classes[].object_type | int32 | The ID of the object type the class belongs to. |
classes[].name_property_def | int32 | The property definition whose value is the object's name: 0 (Name or title) unless the class names its objects by another property. |
classes[].force_workflow | bool | True if objects of this class must use default_workflow. |
classes[].acl | AccessControlList | Specifies the ACL that defines the visibility and other permission settings of this class. Also specifies who can attach objects to this class. |
classes[].acl.checked_out_to_user | int32 | Specifies the ID of the user who has extended rights because of the checkout operation performed by her. 0 if such user does not exist. |
classes[].acl.is_fully_authoritative | bool | Specifies whether this access control list is set to ignore the secondary permissions that come from the latest checked in version. |
classes[].acl.custom_component | AccessControlListComponent | Accesses the custom component of this ACL. |
classes[].acl.restrictive_components[] | repeated AccessControlListComponentMapEntry | Accesses the restrictive automatic components of this ACL. |
classes[].acl.secondary_access_control_list | AccessControlList (recursive) | Secondary ACL used for latest version ACL. Not used for access check if null. |
classes[].acl.additive_components[] | repeated AccessControlListComponentMapEntry | Accesses the additive automatic components of this ACL. |
classes[].current_user_permissions | ClassPermissionsForClient | If set, specifies the permissions for current user that defines the visibility and other permission settings of this class. |
classes[].current_user_permissions.can_user_see | bool | The class is visible for the current user. |
classes[].current_user_permissions.can_user_attach_objects | bool | The current user can attach new objects to this class. |
classes[].object_type_class_content | ObjectTypeSpecificClassContentUnion | Settings that only some object types have; set for the assignment classes of object type 10 (Assignment). |
classes[].object_type_class_content.assignment | AssignmentClassInfo (oneof data) | Assignment-specific class settings. |
classes[].is_object_type_default_class | bool | True if this is the default class of its object type. |
class_groups[] | repeated ClassGroup | The class groups the user can see, or empty if known_version was current. See ClassGroup. |
class_groups[].id | int32 | The ID of the class group (an item ID in value list 2, Class groups). |
class_groups[].name | string | The name of the group. |
class_groups[].member_classes[] | repeated int32 | The IDs of the classes in the group. |
class_groups[].object_type | int32 | The object type with which this class group is used. |