---
title: List namespaces in catalog
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

[Basin Catalog](https://developers.cloudflare.com/api/go/resources/basin_catalog)

[Namespaces](https://developers.cloudflare.com/api/go/resources/basin_catalog/subresources/namespaces)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# List namespaces in catalog

client.BasinCatalog.Namespaces.List(ctx, bucketName, params) (\*[NamespaceListResponse](<https://developers.cloudflare.com/api/go/resources/basin_catalog#(resource)%20basin_catalog.namespaces%20%3E%20(model)%20NamespaceListResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/basin-catalog/{bucket\_name}/namespaces

Returns a list of namespaces in the specified Basin Catalog. Supports hierarchical filtering and pagination for efficient traversal of large namespace hierarchies.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`Workers R2 Data Catalog Write``Workers R2 Data Catalog Read`

##### ParametersExpand Collapse

bucketName string

Specifies the R2 bucket name.

maxLength63

minLength3

[Link to this property](<#(resource)%20basin_catalog.namespaces%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20bucket_name%20%3E%20(schema)>)

<details>

<summary>

params NamespaceListParams

</summary>

AccountID param.Field\[string]

Path param: Use this to identify the account.

<a href="#(resource)%20basin_catalog.namespaces%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

PageSize param.Field\[int64]Optional

Query param: Maximum number of namespaces to return per page. Defaults to 100, maximum 1000.

maximum1000

minimum1

<a href="#(resource)%20basin_catalog.namespaces%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20page_size">Link to this property</a>

PageToken param.Field\[string]Optional

Query param: Opaque pagination token from a previous response. Use this to fetch the next page of results.

<a href="#(resource)%20basin_catalog.namespaces%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20page_token">Link to this property</a>

Parent param.Field\[string]Optional

Query param: Parent namespace to filter by. Only returns direct children of this namespace. For nested namespaces, use %1F as separator (e.g., “bronze%1Fanalytics”). Omit this parameter to list top-level namespaces.

<a href="#(resource)%20basin_catalog.namespaces%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20parent">Link to this property</a>

ReturnDetails param.Field\[bool]Optional

Query param: Whether to include additional metadata (timestamps). When true, response includes created\_at and updated\_at arrays.

<a href="#(resource)%20basin_catalog.namespaces%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20return_details">Link to this property</a>

ReturnUUIDs param.Field\[bool]Optional

Query param: Whether to include namespace UUIDs in the response. Set to true to receive the namespace\_uuids array.

<a href="#(resource)%20basin_catalog.namespaces%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20return_uuids">Link to this property</a>

</details>

[Link to this property](<#(resource)%20basin_catalog.namespaces%20%3E%20(method)%20list%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

type NamespaceListResponse struct{…}

Contains the list of namespaces with optional pagination.

</summary>

Namespaces \[]\[]string

Lists namespaces in the catalog.

<a href="#(resource)%20basin_catalog.namespaces%20%3E%20(model)%20NamespaceListResponse%20%3E%20(schema)%20%3E%20(property)%20namespaces">Link to this property</a>

<details>

<summary>

Details \[]NamespaceListResponseDetailOptional

Contains detailed metadata for each namespace when return\_details is true. Each object includes the namespace, UUID, and timestamps.

</summary>

Namespace \[]string

Specifies the hierarchical namespace parts as an array of strings. For example, \[“bronze”, “analytics”] represents the namespace “bronze.analytics”.

<a href="#(resource)%20basin_catalog.namespaces%20%3E%20(model)%20NamespaceListResponse%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(items)%20%3E%20(property)%20namespace">Link to this property</a>

NamespaceUUID string

Contains the UUID that persists across renames.

formatuuid

<a href="#(resource)%20basin_catalog.namespaces%20%3E%20(model)%20NamespaceListResponse%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(items)%20%3E%20(property)%20namespace_uuid">Link to this property</a>

CreatedAt TimeOptional

Indicates the creation timestamp in ISO 8601 format.

formatdate-time

<a href="#(resource)%20basin_catalog.namespaces%20%3E%20(model)%20NamespaceListResponse%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(items)%20%3E%20(property)%20created_at">Link to this property</a>

UpdatedAt TimeOptional

Shows the last update timestamp in ISO 8601 format. Null if never updated.

formatdate-time

<a href="#(resource)%20basin_catalog.namespaces%20%3E%20(model)%20NamespaceListResponse%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(items)%20%3E%20(property)%20updated_at">Link to this property</a>

</details>

<a href="#(resource)%20basin_catalog.namespaces%20%3E%20(model)%20NamespaceListResponse%20%3E%20(schema)%20%3E%20(property)%20details">Link to this property</a>

NamespaceUUIDs \[]stringOptional

Contains UUIDs for each namespace when return\_uuids is true. The order corresponds to the namespaces array.

<a href="#(resource)%20basin_catalog.namespaces%20%3E%20(model)%20NamespaceListResponse%20%3E%20(schema)%20%3E%20(property)%20namespace_uuids">Link to this property</a>

NextPageToken stringOptional

Use this opaque token to fetch the next page of results. A null or absent value indicates the last page.

<a href="#(resource)%20basin_catalog.namespaces%20%3E%20(model)%20NamespaceListResponse%20%3E%20(schema)%20%3E%20(property)%20next_page_token">Link to this property</a>

</details>

[Link to this property](<#(resource)%20basin_catalog.namespaces%20%3E%20(model)%20NamespaceListResponse%20%3E%20(schema)>)

### List namespaces in catalog

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/basin_catalog"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  namespaces, err := client.BasinCatalog.Namespaces.List(
    context.TODO(),
    "my-data-bucket",
    basin_catalog.NamespaceListParams{
      AccountID: cloudflare.F("0123456789abcdef0123456789abcdef"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", namespaces.NamespaceUUIDs)
}
```

200 example

```
{
  "errors": [],
  "messages": [],
  "result": {
    "details": [
      {
        "created_at": "2025-10-07T10:00:00Z",
        "namespace": [
          "bronze"
        ],
        "namespace_uuid": "0199b999-6869-7383-bb1f-d30e059d5326",
        "updated_at": "2025-10-07T12:00:00Z"
      },
      {
        "created_at": "2025-10-07T10:15:00Z",
        "namespace": [
          "silver"
        ],
        "namespace_uuid": "0199b99b-2c88-73b3-8dbb-421e0e8f2757",
        "updated_at": null
      },
      {
        "created_at": "2025-10-07T10:30:00Z",
        "namespace": [
          "gold"
        ],
        "namespace_uuid": "0199b99c-3d99-73c4-9dcc-532f1f9f3868",
        "updated_at": "2025-10-07T11:00:00Z"
      }
    ],
    "namespace_uuids": [
      "0199b999-6869-7383-bb1f-d30e059d5326",
      "0199b99b-2c88-73b3-8dbb-421e0e8f2757",
      "0199b99c-3d99-73c4-9dcc-532f1f9f3868"
    ],
    "namespaces": [
      [
        "bronze"
      ],
      [
        "silver"
      ],
      [
        "gold"
      ]
    ],
    "next_page_token": null
  },
  "success": true
}
```

##### Returns Examples

200 example

```
{
  "errors": [],
  "messages": [],
  "result": {
    "details": [
      {
        "created_at": "2025-10-07T10:00:00Z",
        "namespace": [
          "bronze"
        ],
        "namespace_uuid": "0199b999-6869-7383-bb1f-d30e059d5326",
        "updated_at": "2025-10-07T12:00:00Z"
      },
      {
        "created_at": "2025-10-07T10:15:00Z",
        "namespace": [
          "silver"
        ],
        "namespace_uuid": "0199b99b-2c88-73b3-8dbb-421e0e8f2757",
        "updated_at": null
      },
      {
        "created_at": "2025-10-07T10:30:00Z",
        "namespace": [
          "gold"
        ],
        "namespace_uuid": "0199b99c-3d99-73c4-9dcc-532f1f9f3868",
        "updated_at": "2025-10-07T11:00:00Z"
      }
    ],
    "namespace_uuids": [
      "0199b999-6869-7383-bb1f-d30e059d5326",
      "0199b99b-2c88-73b3-8dbb-421e0e8f2757",
      "0199b99c-3d99-73c4-9dcc-532f1f9f3868"
    ],
    "namespaces": [
      [
        "bronze"
      ],
      [
        "silver"
      ],
      [
        "gold"
      ]
    ],
    "next_page_token": null
  },
  "success": true
}
```