---
title: "Search folders"
method: GET
path: "/api/v1/folder/search"
tags: ["Folders"]
---

# Search folders

`GET /api/v1/folder/search`

## Request

- Base URL: `https://docs.anzworldline-solutions.com.au`
- URL: `https://docs.anzworldline-solutions.com.au/api/v1/folder/search`
- Auth: none declared
- TypeScript: <https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/docs/api/v1/folder/search/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns folders within a site matching an optional name filter and/or path scope. Supports recursive depth control, standard pagination, and sorting. With no 'name' and default path '/' + recursive=true, all site folders are returned. Each folder carries the detail fields a folder-edit form needs (title, sortOrder, filesMasks, defaultFileType, showOnMenu, defaultBaseType). Set 'includePermissions=true' to also receive the permission types the requesting user holds on each folder; that flag caps 'perPage' (see the parameter description).

## Query parameters

- `name` string
- `path` string
- `recursive` boolean
- `siteId` string
- `orderby` 'name' | 'mod_date'
- `direction` 'ASC' | 'DESC'
- `page` integer
- `per_page` integer
- `includePermissions` boolean

## Response `200`

Paginated list of matching folders

- ResponseEntityFolderSearchView
  - `errors` ErrorEntity[]
    - `errorCode` string
    - `message` string
    - `fieldName` string
  - `entity` FolderSearchView[]
    - `id` string: Folder identifier
    - `inode` string: Folder inode
    - `name` string: Folder name (last path segment)
    - `path` string: Parent path of the folder, e.g. '/application/' for '/application/blog/'
    - `addChildrenAllowed` boolean: True when the requesting user has CAN_ADD_CHILDREN on this folder
    - `hasChildren` boolean: True when the folder has at least one child folder readable by the requesting user
    - `defaultBaseType` string: Content Drive upload-mode preference as a BaseContentType name (e.g. DOTASSET, FILEASSET); null when the folder has no preference
    - `title` string: Folder title
    - `sortOrder` integer: Folder sort order used when ordering menu items
    - `filesMasks` string: Comma-separated file-name masks allowed in this folder, e.g. '*.jpg,*.png'
    - `defaultFileType` string: Velocity variable name of the Content Type used by default for new files in this folder
    - `showOnMenu` boolean: True when the folder is shown on navigation menus
    - `permissions` string[]: Permission types the requesting user holds on this folder. Only populated when 'includePermissions=true'; null means the permissions were not requested, while an empty array means they were requested and the user holds none.
  - `messages` MessageEntity[]
    - `message` string
  - `i18nMessagesMap` object
  - `permissions` string[]
  - `pagination` Pagination
    - `currentPage` integer
    - `perPage` integer
    - `totalEntries` integer

## Other responses

- `400`: 'siteId' is required; 'name' must be at least 2 characters if provided; 'perPage' exceeds the maximum allowed when 'includePermissions' is true
- `401`: User is not authenticated
- `500`: Internal server error

## Changes

- **2026-10-30** `4fd8e917d458`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/changes/api/v1/folder/search/get.md)

---

[API](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api.md) - [All operations](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/revisions/4fd8e917d458?raw)
