# IRPCSearch.SearchViewLevelFolders

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md) > [Search](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSearch/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSearch/SearchViewLevelFolders/

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

The search covers the folders that the listing of the level would show without the folder limit. The
results can be saved as part of the user's folder selection. Fails with E_NOTIMPL when the feature is
not enabled on the server.

- **Service:** [Search](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSearch/index.md) `MFiles.IRPCSearch`
- **gRPC method:** `/MFiles.IRPCSearch/SearchViewLevelFolders`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/search-view-level-folders`
- **Request:** [`SearchViewLevelFoldersRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSearch/SearchViewLevelFolders/index.md#request)
- **Response:** [`SearchViewLevelFoldersResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSearch/SearchViewLevelFolders/index.md#response)
- **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)

<a id="request"></a>

## Request: SearchViewLevelFoldersRequest

Searches the folders of one view level by name. The search covers every folder that the listing of the level would
show without the folder limit, including the folders beyond it.

> 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_location[]` | repeated [`Folder`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Folder/index.md) | The folder location, from the vault root to the parent of the level whose folders are searched. The same path that the listing of the level uses. |
| `folder_location[].type` | [`FolderType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.FolderType/index.md) | 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). |
| `folder_location[].data` | [`FolderInfoUnion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderInfoUnion/index.md) | Additional folder type -specific information as a union. |
| `folder_location[].data.any_folder` | [`FolderInfoUnion.AnyFolderData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderInfoUnion/index.md#t-AnyFolderData) (oneof data) | Any folder type. |
| `folder_location[].data.view_folder` | [`FolderInfoUnion.ViewFolderData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderInfoUnion/index.md#t-ViewFolderData) (oneof data) | View folder type. |
| `folder_location[].data.property_folder` | [`FolderInfoUnion.PropertyFolderData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderInfoUnion/index.md#t-PropertyFolderData) (oneof data) | Property (virtual) folder type. |
| `folder_location[].data.traditional_folder` | [`FolderInfoUnion.TraditionalFolderData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderInfoUnion/index.md#t-TraditionalFolderData) (oneof data) | Traditional folder type. |
| `folder_location[].data.search_folder` | [`FolderInfoUnion.SearchFolderData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderInfoUnion/index.md#t-SearchFolderData) (oneof data) | Search folder (extended view folder) type. |
| `folder_location[].data.external_view_folder` | [`FolderInfoUnion.ExternalViewFolderData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderInfoUnion/index.md#t-ExternalViewFolderData) (oneof data) | External view folder type. |
| `search_text` | `string` | The text that the folder names must contain, ignoring letter case. At most 100 characters. Empty matches every folder. |
| `limit` | `uint32` | The maximum number of results. Zero means 100. The value is clamped to 1-500. |

<a id="response"></a>

## Response: SearchViewLevelFoldersResponse

A structure that specifies the response type for the SearchViewLevelFolders method.

> 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 |
|---|---|---|
| `results[]` | repeated [`ViewLevelFolderSearchResult`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ViewLevelFolderSearchResult/index.md) | The matching folders, at most the requested limit, sorted by name ignoring case and diacritics, with numbers in numeric order. |
| `results[].folder` | [`TypedValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValue/index.md) | The folder, in the same form as the property folders of the level's listing. It can be saved as part of a folder selection as it is. |
| `results[].folder.is_null_value` | `bool` | True if the value is empty. `data` is then unset. |
| `results[].folder.type` | [`Datatype`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.Datatype/index.md) | The data type of the value. |
| `results[].folder.data` | [`TypedValueUnion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValueUnion/index.md) | The value, in the member that matches `type`. Unset for an empty value. |
| `results[].is_selected` | `bool` | True when the folder is in the user's folder selection for the location. |
| `has_more_results` | `bool` | True when more folders match than were returned, or when the level has more folders than the search goes through. Narrowing the search text does not reveal the folders beyond that cap. |
