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

[Skip to content](#_top)

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

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

[Namespaces](https://developers.cloudflare.com/api/python/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

basin\_catalog.namespaces.list(strbucket\_name, NamespaceListParams\*\*kwargs) -> [NamespaceListResponse](<https://developers.cloudflare.com/api/python/resources/basin_catalog#(resource)%20basin_catalog.namespaces%20%3E%20(model)%20namespace_list_response%20%3E%20(schema)>)

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

account\_id: str

Use this to identify the account.

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

bucket\_name: str

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)>)

page\_size: Optional\[int]

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

maximum1000

minimum1

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

page\_token: Optional\[str]

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

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

parent: Optional\[str]

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.

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

return\_details: Optional\[[bool](<https://developers.cloudflare.com/api/python/resources/basin_catalog/subresources/namespaces/methods/list#(resource)%20basin_catalog.namespaces%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20return_details%20%3E%20(schema)>)]

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

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

return\_uuids: Optional\[[bool](<https://developers.cloudflare.com/api/python/resources/basin_catalog/subresources/namespaces/methods/list#(resource)%20basin_catalog.namespaces%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20return_uuids%20%3E%20(schema)>)]

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

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

##### ReturnsExpand Collapse

<details>

<summary>

class NamespaceListResponse: …

Contains the list of namespaces with optional pagination.

</summary>

namespaces: List\[List\[str]]

Lists namespaces in the catalog.

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

<details>

<summary>

details: Optional\[List\[Detail]]

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

</summary>

namespace: List\[str]

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)%20namespace_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(items)%20%3E%20(property)%20namespace">Link to this property</a>

namespace\_uuid: str

Contains the UUID that persists across renames.

formatuuid

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

created\_at: Optional\[datetime]

Indicates the creation timestamp in ISO 8601 format.

formatdate-time

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

updated\_at: Optional\[datetime]

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)%20namespace_list_response%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)%20namespace_list_response%20%3E%20(schema)%20%3E%20(property)%20details">Link to this property</a>

namespace\_uuids: Optional\[List\[str]]

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)%20namespace_list_response%20%3E%20(schema)%20%3E%20(property)%20namespace_uuids">Link to this property</a>

next\_page\_token: Optional\[str]

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)%20namespace_list_response%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)%20namespace_list_response%20%3E%20(schema)>)

### List namespaces in catalog

Python

HTTPTypeScriptPythonGoTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
namespaces = client.basin_catalog.namespaces.list(
    bucket_name="my-data-bucket",
    account_id="0123456789abcdef0123456789abcdef",
)
print(namespaces.namespace_uuids)
```

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
}
```