IRPCSearch.GetFolderContents

View as Markdown

Vault API / core read session or assertion idempotent returns metadata structure version

Lists the contents of a view or a view level: subviews, grouping folders and objects.

ServiceSearch MFiles.IRPCSearch
gRPC method/MFiles.IRPCSearch/GetFolderContents
HTTP (mf-http-grpc)POST /grpc/v1/get-folder-contents
RequestGetFolderContentsRequest
ResponseGetFolderContentsResponse
Book and levelVault API, core
Kindread
SessionRequired: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata).
Idempotentyes
Returns metadata structure versionyes (in the mfiles-metadata-version-bin trailer)
Streamingnone (unary)

Remarks

This is how the M-Files clients browse views. path is the folder location from the vault root:

  1. An empty path lists the root: view_folders holds the views the caller can see.
  2. Append a FOLDER_TYPE_VIEW_FOLDER folder with a view ID to list that view. A view can contain subviews (view_folders), grouping levels (property_folders), objects, or a mix. A view nested in another view can also be listed without its parent view in path.
  3. To open a grouping folder, append a FOLDER_TYPE_PROPERTY_FOLDER folder whose typed_value is the TypedValue returned in property_folders, unchanged.

Results are filtered by the caller's permissions. To find objects by conditions, use SearchObjects instead.

Request: GetFolderContentsRequest

A request structure for GetFolderContents RPC call. It contains all request data.

Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

FieldTypeDescription
call_importanceCallImportanceThe importance level of this call. Typically CALL_IMPORTANCE_NORMAL.Values: CALL_IMPORTANCE_DEFAULT (0), CALL_IMPORTANCE_NORMAL (1), CALL_IMPORTANCE_CAN_BE_REJECTED (2).
targetSearchTargetSearch options.
target.indexstringThe name of the search index to use. Empty uses the vault's default index. An unknown name fails with "Target index is not available."
target.modeSearchModeWhether to prefer, require or avoid the full-text search engine. See SearchMode.Values: SEARCH_MODE_DEFAULT (0), SEARCH_MODE_FAVOR_FULL_TEXT_SEARCH (1), SEARCH_MODE_REQUIRE_FULL_TEXT_SEARCH (2), SEARCH_MODE_REQUIRE_DATABASE_SEARCH (3).
target.search_master_storageboolTrue to also search objects kept in Master Storage, where the vault supports it.
target.continuation_tokenstringContinuation token for paging results from Master Storage. SearchObjects does not support it and fails with "Continuation token is not supported." when it is set together with search_master_storage.
path[]repeated FolderThe folder location from the vault root, one Folder per level. Empty lists the vault root.
path[].typeFolderTypeThe type of the folder, for example FOLDER_TYPE_VIEW_FOLDER or FOLDER_TYPE_PROPERTY_FOLDER.Values: FOLDER_TYPE_UNKNOWN (0), FOLDER_TYPE_ANY_FOLDER (1), FOLDER_TYPE_VIEW_FOLDER (2), FOLDER_TYPE_PROPERTY_FOLDER (3), FOLDER_TYPE_TRADITIONAL_FOLDER (4), FOLDER_TYPE_SEARCH_FOLDER (5), FOLDER_TYPE_EXTERNAL_VIEW_FOLDER (6).
path[].dataFolderInfoUnionAdditional folder type -specific information as a union.
path[].data.any_folderFolderInfoUnion.AnyFolderData (oneof data)Any folder type.
path[].data.view_folderFolderInfoUnion.ViewFolderData (oneof data)View folder type.
path[].data.property_folderFolderInfoUnion.PropertyFolderData (oneof data)Property (virtual) folder type.
path[].data.traditional_folderFolderInfoUnion.TraditionalFolderData (oneof data)Traditional folder type.
path[].data.search_folderFolderInfoUnion.SearchFolderData (oneof data)Search folder (extended view folder) type.
path[].data.external_view_folderFolderInfoUnion.ExternalViewFolderData (oneof data)External view folder type.
page_requests[]repeated SearchResultsPageRequestIf not empty, specifies search results page requests.
page_requests[].object_typeint32The identifier of a search results group.
page_requests[].pageint32The zero-based index of a page.
page_requests[].optionsSRPREQUESTFLAGSSearch results page request flags.
page_requests[].options.allboolSpecifies all flags set; Including any future flags.
page_requests[].options.unseen_pageboolIf available, the page request is for an unseen page.
page_requests[].options.ignore_original_conditionsboolIf available, the original conditions are ignored. This can be used when including ObjIDs. Do not use with SRPREQUEST_UNSEENPAGE.
page_requests[].options.seen_pageboolIf available, the page request is for an already seen page.
page_requests[].options.initial_pageboolIf available, the page request is initial and for an unseen page. Do not use with SRPREQUEST_SEENPAGE.
page_requests[].seen_objects[]repeated ObjIDAn array of ObjIDs. If the SRPREQUEST_UNSEENPAGE flag is available, these are ObjIDs to exclude. If the SRPREQUEST_SEENPAGE flag is available, these are ObjIDs to include.
page_requests[].seen_objects[].typeint32The object type ID, for example 0 for documents. In a lookup value, the value list ID (for a lookup to objects, the object type ID).
page_requests[].seen_objects[].item_idItemIDThe ID of the object within its type, in item_id.internal_id.
limituint32The maximum number of objects to return; 0 leaves the limit to the server. has_more_objects tells whether more objects exist.
facet_filterStringValueIf set, specifies the additional facet search filter.
facet_filter.valuestringString.
sortingSearchResultsSortingIf not empty, specifies how search results are being sorted.
sorting.rulesSortRuleValueArrayThe sort rule. Exactly one rule is supported; more than one cannot be sorted.
sorting.rules.values[]repeated SortRuleSort rules. The first rule has the highest presedence meaning that it is the primary sort rule.
sorting.optionsSortFlagsSort flags. Set allow_resorting_to_default_sort to get relevance order instead of an error when the rule cannot be applied.
sorting.options.allboolSpecifies all flags set; Including any future flags.
sorting.options.allow_resorting_to_default_sortboolAllows resorting to default sorting if the specified sorting is not supported. If this flag is not present, an unsupported sort request causes an error.
include_selected_foldersboolTrue to also return the user's selected folders of the level in selectedPropertyFolders. Ignored when the folder selection is not available. If the selected folders cannot be listed, for example because the search times out, the whole call fails; retry without includeSelectedFolders.
selected_folders_onlyboolWith includeSelectedFolders, true to skip the normal property folder listing. Ignored without includeSelectedFolders.

Response: GetFolderContentsResponse

A response structure for GetFolderContents RPC call. It contains all response data.

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.

FieldTypeDescription
view_folders[]repeated ViewResulting views array.
view_folders[].idint32The ID of the view.
view_folders[].typeViewTypeThe type of the view.Values: VIEW_TYPE_SHOW_OBJECTS (0), VIEW_TYPE_FILTER_ONLY (1).
view_folders[].namestringThe name of the view.
view_folders[].is_commonboolTells if the view is admin-defined (common) or user-defined.
view_folders[].is_visibleboolTells if the view is visible.
view_folders[].locationViewLocationThe location of the view. Valid only if bHasParent is true.
view_folders[].location.parent_folder[]repeated FolderArray of folders describing the parent folder of the view. The first element of the array must be a view folder. Other elements, if any, are property folders.
view_folders[].location.customizes_property_folderboolTrue if the view is overlapping with a property folder.
view_folders[].location.customized_property_folderTypedValueThe overlapped property folder. Ignored if bOverlapping is false.
view_folders[].content_definitionSearchDefThe search definition that contains the view levels and search conditions of the view.
view_folders[].content_definition.filter_conditions[]repeated SearchConditionThe conditions that limit the object set of this search.
view_folders[].content_definition.grouping_levels[]repeated GroupingLevelView levels (the display hierarchy of this search).
view_folders[].content_definition.optionsSearchFlagsSearch flags. This affects the resulting object version set and also distinct view level values displayed inside this search.
view_folders[].aclAccessControlListPermissions.
view_folders[].acl.checked_out_to_userint32Specifies the ID of the user who has extended rights because of the checkout operation performed by her. 0 if such user does not exist.
view_folders[].acl.is_fully_authoritativeboolSpecifies whether this access control list is set to ignore the secondary permissions that come from the latest checked in version.
view_folders[].acl.custom_componentAccessControlListComponentAccesses the custom component of this ACL.
view_folders[].acl.restrictive_components[]repeated AccessControlListComponentMapEntryAccesses the restrictive automatic components of this ACL.
view_folders[].acl.secondary_access_control_listAccessControlList (recursive)Secondary ACL used for latest version ACL. Not used for access check if null.
view_folders[].acl.additive_components[]repeated AccessControlListComponentMapEntryAccesses the additive automatic components of this ACL.
view_folders[].flags_obsoleteuint32Bit flags that provide additional information on the view.
view_folders[].optionsVIEWFLAGSBit flags that provide additional information on the view.
view_folders[].options.allboolSpecifies all flags set; Including any future flags.
view_folders[].options.indexedboolMaterialized/indexed view.
view_folders[].options.incompatible_with_full_text_searchboolThe search conditions of the view definition (excluding the grouping levels) are not compatible with full-text search.
view_folders[].options.sort_across_all_pages_disabledboolSorting search results is disabled.
view_folders[].guidstringGUID for the view.
view_folders[].view_visualizationViewVisualizationView visualization information.
view_folders[].view_visualization.subview_groups[]repeated SubviewGroupThe subviews of the view as groups.
property_folders[]repeated TypedValueResulting property folders array.
property_folders[].is_null_valueboolTrue if the value is empty. data is then unset.
property_folders[].typeDatatypeThe data type of the value.
property_folders[].dataTypedValueUnionThe value, in the member that matches type. Unset for an empty value.
property_folders[].data.textstring (oneof data)The value of DATATYPE_TEXT.
property_folders[].data.integerint32 (oneof data)The value of DATATYPE_INTEGER.
property_folders[].data.real_numberdouble (oneof data)The value of DATATYPE_REAL_NUMBER.
property_folders[].data.decimal_numberstring (oneof data)Fixed precision number.
property_folders[].data.dategoogle.protobuf.Timestamp (oneof data)The value of DATATYPE_DATE: midnight UTC of the date.
property_folders[].data.timegoogle.protobuf.Timestamp (oneof data)Time.
property_folders[].data.timestampgoogle.protobuf.Timestamp (oneof data)The value of DATATYPE_TIMESTAMP, in UTC.
property_folders[].data.booleanbool (oneof data)The value of DATATYPE_BOOLEAN.
property_folders[].data.lookupLookup (oneof data)The value of DATATYPE_LOOKUP: one value list item or object.
property_folders[].data.multi_select_lookupMultiSelectLookup (oneof data)The value of DATATYPE_MULTI_SELECT_LOOKUP: any number of value list items or objects.
property_folders[].data.integer64int64 (oneof data)Integer (8 bytes).
property_folders[].data.filetimegoogle.protobuf.Timestamp (oneof data)FILETIME (64-bit integer).
property_folders[].data.multi_line_textstring (oneof data)The value of DATATYPE_MULTI_LINE_TEXT.
property_folders[].data.aclAccessControlList (oneof data)Access Control List.
traditional_folders[]repeated LookupResulting traditional folders array.
traditional_folders[].value_list_item_infoItemInfoThe selected item. Only obj_id is needed when setting a value.
traditional_folders[].value_list_item_info.obj_idObjIDThe object id or value list item id. Includes the object type or value list id.
traditional_folders[].value_list_item_info.namestringThe name of the item.
traditional_folders[].value_list_item_info.external_id_statusExtIDStatusThe status of this item's external ID.Values: EXT_IDSTATUS_UNKNOWN (0), EXT_IDSTATUS_EXTERNAL (1), EXT_IDSTATUS_INTERNAL (2), EXT_IDSTATUS_DISCARDED (3), EXT_IDSTATUS_NOT_AVAILABLE (4), EXT_IDSTATUS_EXTERNAL_REDUCED (5).
traditional_folders[].value_list_item_info.external_idstringThe external ID (display ID) of this item. unset means that the external ID is the same as the internal ID.
traditional_folders[].value_list_item_info.guidstringGUID for the item.
traditional_folders[].value_list_item_info.optionsITEMFLAGSBit flags that provide additional information on the item (e.g. is the object deleted).
traditional_folders[].value_list_item_info.external_repository_icon_idstringThe ID of the item's icon.
traditional_folders[].versionObjVerVersionThe version of the selected object. The server returns OBJ_VER_VERSION_TYPE_LATEST (-1), meaning the latest version.
traditional_folders[].version.typeObjVerVersionTypeWhat internal_version means. OBJ_VER_VERSION_TYPE_SPECIFIC for a version number.Values: OBJ_VER_VERSION_TYPE_UNINITIALIZED (0), OBJ_VER_VERSION_TYPE_LATEST (1), OBJ_VER_VERSION_TYPE_ANY (2), OBJ_VER_VERSION_TYPE_ALL (3), OBJ_VER_VERSION_TYPE_SPECIFIC (4), OBJ_VER_VERSION_TYPE_VALUE_LIST_ITEM (6), OBJ_VER_VERSION_TYPE_OBJECT_LEVEL_REFERENCE (7).
traditional_folders[].version.internal_versionint32The version number, starting from 1, when type is OBJ_VER_VERSION_TYPE_SPECIFIC. The server returns -1 with OBJ_VER_VERSION_TYPE_LATEST.
traditional_folders[].version.external_repository_versionstringUsed only for objects in external repositories. Leave empty.
traditional_folders[].version.external_repository_sort_keyint64Used only for objects in external repositories. Leave 0.
objects[]repeated SearchResultsItemResulting objects array.
objects[].objectObjectVersionExThe object and the found version: object ID, version, title, class, files and status. Property values are not included.
objects[].object.version_infoObjectVersionObject Version information.
objects[].object.object_infoObjectLevelInfoObject-level information.
objects[].scoreint32The relevance score of the result. Higher is more relevant.
objects[].chunkstringFor an Aino search, the passage of text that matched. Empty for other searches.
external_repository_folders[]repeated ExternalViewReulsting external views array.
external_repository_folders[].idExternalRepositoryIDThe view ID in external repository.
external_repository_folders[].id.connectionstringThe external repository connection identifier.
external_repository_folders[].id.itemstringExternal ID within the scope of the connection to external system.
external_repository_folders[].display_namestringThe name of the view.
external_repository_folders[].external_repository_icon_idstringThe icon ID.
external_repository_folders[].parent_idExternalRepositoryIDThe view's parent ID in external repository. May be uninitialized if the external view does not have a parent.
external_repository_folders[].parent_id.connectionstringThe external repository connection identifier.
external_repository_folders[].parent_id.itemstringExternal ID within the scope of the connection to external system.
external_repository_folders[].object_dataObjectVersionExWPIf not null, the object representation of the folder.
external_repository_folders[].object_data.object_versionObjectVersionExObject info.
external_repository_folders[].object_data.properties[]repeated PropertyValueProperty values, or an empty array.
external_repository_folders[].object_data.aclAccessControlListIf set, ACL.
external_repository_folders[].object_data.current_user_permissionsObjectPermissionsForClientIf set, permissions of the object version.
external_repository_folders[].folder_capabilitiesFOLDERCAPABILITYFLAGSBit flags that provide information on the folder capabilities.
external_repository_folders[].folder_capabilities.allboolSpecifies all flags set; Including any future flags.
external_repository_folders[].folder_capabilities.can_search_within_this_folderbool
external_repository_folders[].aclAccessControlListIf set, ACL.
external_repository_folders[].acl.checked_out_to_userint32Specifies the ID of the user who has extended rights because of the checkout operation performed by her. 0 if such user does not exist.
external_repository_folders[].acl.is_fully_authoritativeboolSpecifies whether this access control list is set to ignore the secondary permissions that come from the latest checked in version.
external_repository_folders[].acl.custom_componentAccessControlListComponentAccesses the custom component of this ACL.
external_repository_folders[].acl.restrictive_components[]repeated AccessControlListComponentMapEntryAccesses the restrictive automatic components of this ACL.
external_repository_folders[].acl.secondary_access_control_listAccessControlList (recursive)Secondary ACL used for latest version ACL. Not used for access check if null.
external_repository_folders[].acl.additive_components[]repeated AccessControlListComponentMapEntryAccesses the additive automatic components of this ACL.
has_more_property_foldersboolAre there more property folders?
has_more_objectsboolAre there more objects?
has_more_external_repository_foldersboolAre there more external view folders?
pages_with_more_results[]repeated int32The list of item group identifications IDs the results of which were limited. The group identification ID depends on how the search results were grouped. E.g. object type ID.
search_execution_infoSearchOutputInfoAdditional information about the completed search operation.
search_execution_info.processing_time_at_engine_in_millisecondsint32The processing time at the search engine, in milliseconds. -1 if not known.
search_execution_info.processing_time_at_engine_from_mfserver_in_millisecondsint32The processing time at the search engine, including network roundtrip from MFServer, in milliseconds. -1 if not known.
search_execution_info.processing_time_at_mfserver_in_millisecondsint32The total processing time at MFServer, in milliseconds. -1 if not known.
search_execution_info.processing_time_at_mfserver_from_client_in_millisecondsint32The total processing time at MFServer, including network roundtrip from the client, in milliseconds. -1 if not known.
optionsSEARCHSTATUSFLAGSSearch status flags.
options.allboolSpecifies all flags set; Including any future flags.
options.multiphase_object_type_search_neededboolMulti-phase OT search is needed.
options.wildcard_expansion_limit_exceededboolWildcard expansion limit has been exceeded (but some results has been returned anyway).
options.may_contain_stale_databoolData returned by search may be out of date.
options.resorted_to_default_sortboolRequested sorting is not supported and result set was established using the default sorting (relevance).
options.resorted_to_default_sort_too_many_resultsboolRequested sorting is not supported and result set was established using the default sorting (relevance) because there are too many matching results for sorting.
options.sorted_by_engineboolData returned by search was sorted by the engine (Global Sorting).
objects_continuation_tokenstringContinuation token for paginating search results for objects from Master Storage.
has_additional_resultsboolTrue if there are additional results that can't be counted in advance.
selected_property_folders[]repeated TypedValueThe user's still valid selected property folders of the level, in no particular order. Filled only when includeSelectedFolders was requested.
selected_property_folders[].is_null_valueboolTrue if the value is empty. data is then unset.
selected_property_folders[].typeDatatypeThe data type of the value.
selected_property_folders[].dataTypedValueUnionThe value, in the member that matches type. Unset for an empty value.
selected_property_folders[].data.textstring (oneof data)The value of DATATYPE_TEXT.
selected_property_folders[].data.integerint32 (oneof data)The value of DATATYPE_INTEGER.
selected_property_folders[].data.real_numberdouble (oneof data)The value of DATATYPE_REAL_NUMBER.
selected_property_folders[].data.decimal_numberstring (oneof data)Fixed precision number.
selected_property_folders[].data.dategoogle.protobuf.Timestamp (oneof data)The value of DATATYPE_DATE: midnight UTC of the date.
selected_property_folders[].data.timegoogle.protobuf.Timestamp (oneof data)Time.
selected_property_folders[].data.timestampgoogle.protobuf.Timestamp (oneof data)The value of DATATYPE_TIMESTAMP, in UTC.
selected_property_folders[].data.booleanbool (oneof data)The value of DATATYPE_BOOLEAN.
selected_property_folders[].data.lookupLookup (oneof data)The value of DATATYPE_LOOKUP: one value list item or object.
selected_property_folders[].data.multi_select_lookupMultiSelectLookup (oneof data)The value of DATATYPE_MULTI_SELECT_LOOKUP: any number of value list items or objects.
selected_property_folders[].data.integer64int64 (oneof data)Integer (8 bytes).
selected_property_folders[].data.filetimegoogle.protobuf.Timestamp (oneof data)FILETIME (64-bit integer).
selected_property_folders[].data.multi_line_textstring (oneof data)The value of DATATYPE_MULTI_LINE_TEXT.
selected_property_folders[].data.aclAccessControlList (oneof data)Access Control List.
max_property_folders_limituint32The effective limit of the property folders of the level, which is also the folder selection limit. Zero means no limit, or that the folder selection is not available or the folder does not list a view level. Use canHaveSelectedFolders to tell if the level can hold a selection.
can_have_selected_foldersboolTrue when the folders of the level can be selected.