IRPCValueLists.CreateFolderTree
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.
| Service | Value lists MFiles.IRPCValueLists |
|---|---|
| gRPC method | /MFiles.IRPCValueLists/CreateFolderTree |
| HTTP (mf-http-grpc) | POST /grpc/v1/create-folder-tree |
| Request | CreateFolderTreeRequest |
| Response | CreateFolderTreeResponse |
| Book and level | Vault API, core |
| Kind | write |
| Session | Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata). |
| Idempotent | no |
| Returns metadata structure version | yes (in the mfiles-metadata-version-bin trailer) |
| Streaming | none (unary) |
Remarks
- Not available in this version: the server fails the call with "Not implemented.". Use CreateOrFindTraditionalFolder for each folder instead.
- Requires the vault rights
license_allows_modificationsandmanage_traditional_folders.
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.
| Field | Type | Description |
|---|---|---|
anchor_type | FolderTreeAnchorType | Where 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_id | optional int32 | The 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_location | ViewLocation | The anchor view location. Required for the viewLocation anchor, not allowed for the others. |
view_location.parent_folder[] | repeated Folder | Array 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[].type | FolderType | The 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[].data | FolderInfoUnion | Additional folder type -specific information as a union. |
view_location.customizes_property_folder | bool | True if the view is overlapping with a property folder. |
view_location.customized_property_folder | TypedValue | The overlapped property folder. Ignored if bOverlapping is false. |
view_location.customized_property_folder.is_null_value | bool | True if the value is empty. data is then unset. |
view_location.customized_property_folder.type | Datatype | The data type of the value. |
view_location.customized_property_folder.data | TypedValueUnion | The value, in the member that matches type. Unset for an empty value. |
nodes[] | repeated FolderTreeNode | The folders to create under the anchor, parents before children. |
nodes[].name | string | The folder name. |
nodes[].parent_index | int32 | The 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_conflict | bool | What 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.
| Field | Type | Description |
|---|---|---|
nodes[] | repeated FolderTreeNodeResult | One result per submitted folder, in the order of the request. |
nodes[].restored | bool | True when a deleted same-named folder was restored, false when a new folder was created. |
nodes[].folder_id | int32 | The ID of the folder. |
nodes[].name | string | The name actually used. |
nodes[].renamed | bool | True when the rename policy changed the name. |
current_version_on_server | int64 | The current version of the Traditional Folders value list's data on the server. |
Related methods
- CreateOrFindTraditionalFolder -- Creates a traditional folder, or returns an existing folder with the same name.