IRPCValueLists.CreateFolderTree

View as Markdown

Vault API / core write session or assertion returns metadata structure version

Creates a tree of traditional folders under one anchor in one transaction: either every folder is created or the call fails and nothing is saved.

ServiceValue lists MFiles.IRPCValueLists
gRPC method/MFiles.IRPCValueLists/CreateFolderTree
HTTP (mf-http-grpc)POST /grpc/v1/create-folder-tree
RequestCreateFolderTreeRequest
ResponseCreateFolderTreeResponse
Book and levelVault API, core
Kindwrite
SessionRequired: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata).
Idempotentno
Returns metadata structure versionyes (in the mfiles-metadata-version-bin trailer)
Streamingnone (unary)

Remarks

Request: CreateFolderTreeRequest

Requests to create a tree of Traditional Folders under one anchor.

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

FieldTypeDescription
anchor_typeFolderTreeAnchorTypeWhere the tree is attached.Values: FOLDER_TREE_ANCHOR_TYPE_UNSPECIFIED (0), FOLDER_TREE_ANCHOR_TYPE_TRADITIONAL_ROOT (1), FOLDER_TREE_ANCHOR_TYPE_FOLDER (2), FOLDER_TREE_ANCHOR_TYPE_VIEW_LOCATION (3).
anchor_folder_idoptional int32The ID of the existing folder to create the tree in, as known to the client (the folder the user drops onto). Required for the folder anchor, not allowed for the others. Not the ID of any folder in the request: those are created by the server and returned in the response.
view_locationViewLocationThe anchor view location. Required for the viewLocation anchor, not allowed for the others.
view_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_location.parent_folder[].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).
view_location.parent_folder[].dataFolderInfoUnionAdditional folder type -specific information as a union.
view_location.customizes_property_folderboolTrue if the view is overlapping with a property folder.
view_location.customized_property_folderTypedValueThe overlapped property folder. Ignored if bOverlapping is false.
view_location.customized_property_folder.is_null_valueboolTrue if the value is empty. data is then unset.
view_location.customized_property_folder.typeDatatypeThe data type of the value.
view_location.customized_property_folder.dataTypedValueUnionThe value, in the member that matches type. Unset for an empty value.
nodes[]repeated FolderTreeNodeThe folders to create under the anchor, parents before children.
nodes[].namestringThe folder name.
nodes[].parent_indexint32The index of the parent node in the list, or -1 for a top-level folder. Must be smaller than the node's own index (parents come first).
rename_on_conflictboolWhat to do when a folder name is used by a sibling: false fails the whole request, true gives the folder the name "<name> (n)".

Response: CreateFolderTreeResponse

Response to a create folder tree request. Always describes a fully created tree.

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

FieldTypeDescription
nodes[]repeated FolderTreeNodeResultOne result per submitted folder, in the order of the request.
nodes[].restoredboolTrue when a deleted same-named folder was restored, false when a new folder was created.
nodes[].folder_idint32The ID of the folder.
nodes[].namestringThe name actually used.
nodes[].renamedboolTrue when the rename policy changed the name.
current_version_on_serverint64The current version of the Traditional Folders value list's data on the server.