IRPCViews.CreateSubFolder
Vault API / standard write session or assertion returns metadata structure version
Creates a traditional folder at a location inside a view, or returns an existing folder with the same name there.
| Service | Views MFiles.IRPCViews |
|---|---|
| gRPC method | /MFiles.IRPCViews/CreateSubFolder |
| HTTP (mf-http-grpc) | POST /grpc/v1/create-sub-folder |
| Request | CreateSubFolderRequest |
| Response | CreateSubFolderResponse |
| Book and level | Vault API, standard |
| 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
view_location.parent_foldermust not be empty, andsubfoldermust not have a parent folder; otherwise the call fails with "The parameter is incorrect.".- Only works at locations that allow traditional folders; elsewhere it fails with "Sorry, but it's not possible to create traditional folders here.".
- If a folder with the same name exists at the location, it is returned instead of a new one.
- Related: CreateOrFindTraditionalFolder creates folders outside view locations.
Request: CreateSubFolderRequest
Requests to create a sub-folder.
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 |
|---|---|---|
view_location | ViewLocation | The location in the view: parent_folder starts with the view folder. |
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. |
subfolder | ValueListItem | The folder to create: item_info.obj_id.type 4 (Traditional folders) and item_info.name. The item ID is ignored. |
subfolder.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. |
subfolder.item_info.obj_id | ObjID | The object id or value list item id. Includes the object type or value list id. |
subfolder.item_info.name | string | The name of the item. |
subfolder.item_info.external_id_status | ExtIDStatus | The 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). |
subfolder.item_info.external_id | string | The external ID (display ID) of this item. unset means that the external ID is the same as the internal ID. |
subfolder.item_info.guid | string | GUID for the item. |
subfolder.item_info.options | ITEMFLAGS | Bit flags that provide additional information on the item (e.g. is the object deleted). |
subfolder.item_info.external_repository_icon_id | string | The ID of the item's icon. |
subfolder.has_parent | bool | True if the item has a parent item in the same (hierarchical) list. |
subfolder.has_owner | bool | True if the item belongs to an item of the owner list (ValueList.owner_object_type). |
subfolder.parent_id | int32 | With has_parent, the item ID of the parent item; otherwise ignored. |
subfolder.owner_id | int32 | With has_owner, the item ID of the owner item in the owner list. |
subfolder.owner_name | string | The name of the owner item. |
subfolder.automatic_permissions | AutomaticPermissions | If set, specifies the automatic permissions for an object for which the user selects this item. |
subfolder.automatic_permissions.permissions | NamedACL | The automatic permissions for an object for which the user selects this item. |
subfolder.automatic_permissions.is_default | bool | True if these automatic permissions are not private i.e. they are not directly specified for (owned by) this item but they come from somewhere else, e.g. from the default/common automatic permissions of the object type. |
subfolder.automatic_permissions.use_object_permissions | bool | If true the object/item's own permissions are used as its automatic permissions. |
subfolder.icon | Bytes | If set, contains the icon of this item in .ICO format. |
subfolder.icon.value | bytes | Array of bytes. |
Response: CreateSubFolderResponse
Response to create sub-folder request.
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 |
|---|---|---|
folder | ValueListItem | The created or found folder. |
folder.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. |
folder.item_info.obj_id | ObjID | The object id or value list item id. Includes the object type or value list id. |
folder.item_info.name | string | The name of the item. |
folder.item_info.external_id_status | ExtIDStatus | The 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). |
folder.item_info.external_id | string | The external ID (display ID) of this item. unset means that the external ID is the same as the internal ID. |
folder.item_info.guid | string | GUID for the item. |
folder.item_info.options | ITEMFLAGS | Bit flags that provide additional information on the item (e.g. is the object deleted). |
folder.item_info.external_repository_icon_id | string | The ID of the item's icon. |
folder.has_parent | bool | True if the item has a parent item in the same (hierarchical) list. |
folder.has_owner | bool | True if the item belongs to an item of the owner list (ValueList.owner_object_type). |
folder.parent_id | int32 | With has_parent, the item ID of the parent item; otherwise ignored. |
folder.owner_id | int32 | With has_owner, the item ID of the owner item in the owner list. |
folder.owner_name | string | The name of the owner item. |
folder.automatic_permissions | AutomaticPermissions | If set, specifies the automatic permissions for an object for which the user selects this item. |
folder.automatic_permissions.permissions | NamedACL | The automatic permissions for an object for which the user selects this item. |
folder.automatic_permissions.is_default | bool | True if these automatic permissions are not private i.e. they are not directly specified for (owned by) this item but they come from somewhere else, e.g. from the default/common automatic permissions of the object type. |
folder.automatic_permissions.use_object_permissions | bool | If true the object/item's own permissions are used as its automatic permissions. |
folder.icon | Bytes | If set, contains the icon of this item in .ICO format. |
folder.icon.value | bytes | Array of bytes. |
value_list_version | int64 | The current version of the Traditional folders list's items. |
Related methods
- IRPCValueLists.CreateOrFindTraditionalFolder -- Creates a traditional folder, or returns an existing folder with the same name.