# Method: folders.list

- [HTTP request](https://docs.cloud.google.com/resource-manager/reference/rest/v2beta1/folders/list#body.HTTP_TEMPLATE)
- [Query parameters](https://docs.cloud.google.com/resource-manager/reference/rest/v2beta1/folders/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/resource-manager/reference/rest/v2beta1/folders/list#body.request_body)
- [Response body](https://docs.cloud.google.com/resource-manager/reference/rest/v2beta1/folders/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/resource-manager/reference/rest/v2beta1/folders/list#body.ListFoldersResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/resource-manager/reference/rest/v2beta1/folders/list#body.aspect)
- [Try it!](https://docs.cloud.google.com/resource-manager/reference/rest/v2beta1/folders/list#try-it)

Lists the Folders that are direct descendants of supplied parent resource. List provides a strongly consistent view of the Folders underneath the specified parent resource. List returns Folders sorted based upon the (ascending) lexical ordering of their displayName. The caller must have `resourcemanager.folders.list` permission on the identified parent.

### HTTP request

`GET https://cloudresourcemanager.googleapis.com/v2beta1/folders`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Query parameters

| Parameters ||
|---|---|
| `parent` | `string` The resource name of the Organization or Folder whose Folders are being listed. Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. Access to this method is controlled by checking the `resourcemanager.folders.list` permission on the `parent`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `resourcemanager.folders.list` |
| `pageSize` | `integer` The maximum number of Folders to return in the response. The server can return fewer folders than requested. If unspecified, server picks an appropriate default. |
| `pageToken` | `string` A pagination token returned from a previous call to `folders.list` that indicates where this listing should continue from. This field is optional. |
| `showDeleted` | `boolean` Controls whether Folders in the `https://docs.cloud.google.com/resource-manager/reference/rest/v2beta1/folders#LifecycleState.ENUM_VALUES.DELETE_REQUESTED` state should be returned. Defaults to false. This field is optional. |

### Request body

The request body must be empty.

### Response body

The folders.list response message.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "folders": [ { object (`https://docs.cloud.google.com/resource-manager/reference/rest/v2beta1/folders#Folder`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `folders[]` | ``object (`https://docs.cloud.google.com/resource-manager/reference/rest/v2beta1/folders#Folder`)`` A possibly paginated list of Folders that are direct descendants of the specified parent resource. |
| `nextPageToken` | `string` A pagination token returned from a previous call to `folders.list` that indicates from where listing should continue. This field is optional. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `https://www.googleapis.com/auth/cloud-platform.read-only`
- `https://www.googleapis.com/auth/cloudplatformfolders`
- `https://www.googleapis.com/auth/cloudplatformfolders.readonly`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).