# Method: projects.locations.instances.namespaces.list

- [HTTP request](https://docs.cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances.namespaces/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances.namespaces/list#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances.namespaces/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances.namespaces/list#body.request_body)
- [Response body](https://docs.cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances.namespaces/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances.namespaces/list#body.ListNamespacesResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances.namespaces/list#body.aspect)
- [NamespaceView](https://docs.cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances.namespaces/list#NamespaceView)
- [Namespace](https://docs.cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances.namespaces/list#Namespace)
  - [JSON representation](https://docs.cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances.namespaces/list#Namespace.SCHEMA_REPRESENTATION)
- [IAMPolicy](https://docs.cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances.namespaces/list#IAMPolicy)
  - [JSON representation](https://docs.cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances.namespaces/list#IAMPolicy.SCHEMA_REPRESENTATION)
- [Try it!](https://docs.cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances.namespaces/list#try-it)

List namespaces in a given instance

### HTTP request

`GET https://datafusion.googleapis.com/v1beta1/{parent=projects/*/locations/*/instances/*}/namespaces`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The instance to list its namespaces. |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` The maximum number of items to return. |
| `pageToken` | `string` The nextPageToken value to use if there are additional results to retrieve for this list request. |
| `view` | ``enum (`https://docs.cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances.namespaces/list#NamespaceView`)`` By default, only basic information about a namespace is returned (e.g. name). When `NAMESPACE_VIEW_FULL` is specified, additional information associated with a namespace gets returned (e.g. IAM policy set on the namespace) |

### Request body

The request body must be empty.

### Response body

List namespaces response.

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

| JSON representation |
|---|
| ``` { "namespaces": [ { object (`https://docs.cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances.namespaces/list#Namespace`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `namespaces[]` | ``object (`https://docs.cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances.namespaces/list#Namespace`)`` List of namespaces |
| `nextPageToken` | `string` Token to retrieve the next page of results or empty if there are no more results in the list. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

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

## NamespaceView

A view for Namespace

| Enums ||
|---|---|
| `NAMESPACE_VIEW_UNSPECIFIED` | Default/unset value, which will use BASIC view. |
| `NAMESPACE_VIEW_BASIC` | Show the most basic metadata of a namespace |
| `NAMESPACE_VIEW_FULL` | Returns all metadata of a namespace |

## Namespace

Represents the information of a namespace

| JSON representation |
|---|
| ``` { "name": string, "iamPolicy": { object (`https://docs.cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances.namespaces/list#IAMPolicy`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` Name of the given namespace. |
| `iamPolicy` | ``object (`https://docs.cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances.namespaces/list#IAMPolicy`)`` IAM policy associated with this namespace. |

## IAMPolicy

IAMPolicy encapsulates the IAM policy name, definition and status of policy fetching.

| JSON representation |
|---|
| ``` { "policy": { object (`https://docs.cloud.google.com/data-fusion/docs/reference/rest/Shared.Types/Policy`) }, "status": { object (`https://docs.cloud.google.com/data-fusion/docs/reference/rest/Shared.Types/ListOperationsResponse#Status`) } } ``` |

| Fields ||
|---|---|
| `policy` | ``object (`https://docs.cloud.google.com/data-fusion/docs/reference/rest/Shared.Types/Policy`)`` Policy definition if IAM policy fetching is successful, otherwise empty. |
| `status` | ``object (`https://docs.cloud.google.com/data-fusion/docs/reference/rest/Shared.Types/ListOperationsResponse#Status`)`` Status of iam policy fetching. |