---
title: Get Basin Catalog details
---

[Skip to content](#_top)

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

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

Copy Markdown

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

---

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

# Get Basin Catalog details

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

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

Retrieve detailed information about a specific Basin Catalog by bucket name. Returns catalog status, maintenance configuration, and credential status.

##### 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%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20bucket_name%20%3E%20(schema)>)

<details>

<summary>

query BasinCatalogGetParams

</summary>

AccountID param.Field\[string]

Use this to identify the account.

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

</details>

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

##### ReturnsExpand Collapse

<details>

<summary>

type BasinCatalogGetResponse struct{…}

Contains catalog information.

</summary>

ID string

Use this to uniquely identify the catalog.

formatuuid

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

Bucket string

Specifies the associated R2 bucket name.

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

Name string

Specifies the catalog name (generated from account and bucket name).

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

<details>

<summary>

Status BasinCatalogGetResponseStatus

Indicates the status of the catalog.

</summary>

One of the following:

const BasinCatalogGetResponseStatusActive BasinCatalogGetResponseStatus = "active"

<a href="#(resource)%20basin_catalog%20%3E%20(model)%20BasinCatalogGetResponse%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

const BasinCatalogGetResponseStatusInactive BasinCatalogGetResponseStatus = "inactive"

<a href="#(resource)%20basin_catalog%20%3E%20(model)%20BasinCatalogGetResponse%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

</details>

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

<details>

<summary>

CredentialStatus BasinCatalogGetResponseCredentialStatusOptional

Shows the credential configuration status.

</summary>

One of the following:

const BasinCatalogGetResponseCredentialStatusPresent BasinCatalogGetResponseCredentialStatus = "present"

<a href="#(resource)%20basin_catalog%20%3E%20(model)%20BasinCatalogGetResponse%20%3E%20(schema)%20%3E%20(property)%20credential_status%20%3E%20(member)%200">Link to this property</a>

const BasinCatalogGetResponseCredentialStatusAbsent BasinCatalogGetResponseCredentialStatus = "absent"

<a href="#(resource)%20basin_catalog%20%3E%20(model)%20BasinCatalogGetResponse%20%3E%20(schema)%20%3E%20(property)%20credential_status%20%3E%20(member)%201">Link to this property</a>

</details>

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

<details>

<summary>

MaintenanceConfig BasinCatalogGetResponseMaintenanceConfigOptional

Configures maintenance for the catalog.

</summary>

<details>

<summary>

Compaction BasinCatalogGetResponseMaintenanceConfigCompactionOptional

Configures compaction for catalog maintenance.

</summary>

<details>

<summary>

State BasinCatalogGetResponseMaintenanceConfigCompactionState

Specifies the state of maintenance operations.

</summary>

One of the following:

const BasinCatalogGetResponseMaintenanceConfigCompactionStateEnabled BasinCatalogGetResponseMaintenanceConfigCompactionState = "enabled"

<a href="#(resource)%20basin_catalog%20%3E%20(model)%20BasinCatalogGetResponse%20%3E%20(schema)%20%3E%20(property)%20maintenance_config%20%3E%20(property)%20compaction%20%3E%20(property)%20state%20%3E%20(member)%200">Link to this property</a>

const BasinCatalogGetResponseMaintenanceConfigCompactionStateDisabled BasinCatalogGetResponseMaintenanceConfigCompactionState = "disabled"

<a href="#(resource)%20basin_catalog%20%3E%20(model)%20BasinCatalogGetResponse%20%3E%20(schema)%20%3E%20(property)%20maintenance_config%20%3E%20(property)%20compaction%20%3E%20(property)%20state%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20basin_catalog%20%3E%20(model)%20BasinCatalogGetResponse%20%3E%20(schema)%20%3E%20(property)%20maintenance_config%20%3E%20(property)%20compaction%20%3E%20(property)%20state">Link to this property</a>

<details>

<summary>

TargetSizeMB BasinCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB

Sets the target file size for compaction in megabytes. Defaults to “128”.

</summary>

One of the following:

const BasinCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB64 BasinCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB = "64"

<a href="#(resource)%20basin_catalog%20%3E%20(model)%20BasinCatalogGetResponse%20%3E%20(schema)%20%3E%20(property)%20maintenance_config%20%3E%20(property)%20compaction%20%3E%20(property)%20target_size_mb%20%3E%20(member)%200">Link to this property</a>

const BasinCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB128 BasinCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB = "128"

<a href="#(resource)%20basin_catalog%20%3E%20(model)%20BasinCatalogGetResponse%20%3E%20(schema)%20%3E%20(property)%20maintenance_config%20%3E%20(property)%20compaction%20%3E%20(property)%20target_size_mb%20%3E%20(member)%201">Link to this property</a>

const BasinCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB256 BasinCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB = "256"

<a href="#(resource)%20basin_catalog%20%3E%20(model)%20BasinCatalogGetResponse%20%3E%20(schema)%20%3E%20(property)%20maintenance_config%20%3E%20(property)%20compaction%20%3E%20(property)%20target_size_mb%20%3E%20(member)%202">Link to this property</a>

const BasinCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB512 BasinCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB = "512"

<a href="#(resource)%20basin_catalog%20%3E%20(model)%20BasinCatalogGetResponse%20%3E%20(schema)%20%3E%20(property)%20maintenance_config%20%3E%20(property)%20compaction%20%3E%20(property)%20target_size_mb%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20basin_catalog%20%3E%20(model)%20BasinCatalogGetResponse%20%3E%20(schema)%20%3E%20(property)%20maintenance_config%20%3E%20(property)%20compaction%20%3E%20(property)%20target_size_mb">Link to this property</a>

</details>

<a href="#(resource)%20basin_catalog%20%3E%20(model)%20BasinCatalogGetResponse%20%3E%20(schema)%20%3E%20(property)%20maintenance_config%20%3E%20(property)%20compaction">Link to this property</a>

Interval stringOptional

Scheduling interval between normal table maintenance runs.

<a href="#(resource)%20basin_catalog%20%3E%20(model)%20BasinCatalogGetResponse%20%3E%20(schema)%20%3E%20(property)%20maintenance_config%20%3E%20(property)%20interval">Link to this property</a>

<details>

<summary>

SnapshotExpiration BasinCatalogGetResponseMaintenanceConfigSnapshotExpirationOptional

Configures snapshot expiration settings.

</summary>

MaxSnapshotAge string

Specifies the maximum age for snapshots. The system deletes snapshots older than this age. Format: where unit is d (days), h (hours), m (minutes), or s (seconds). Examples: “7d” (7 days), “48h” (48 hours), “2880m” (2,880 minutes). Defaults to “7d”.

<a href="#(resource)%20basin_catalog%20%3E%20(model)%20BasinCatalogGetResponse%20%3E%20(schema)%20%3E%20(property)%20maintenance_config%20%3E%20(property)%20snapshot_expiration%20%3E%20(property)%20max_snapshot_age">Link to this property</a>

MinSnapshotsToKeep int64

Specifies the minimum number of snapshots to retain. Defaults to 100.

formatint64

minimum1

<a href="#(resource)%20basin_catalog%20%3E%20(model)%20BasinCatalogGetResponse%20%3E%20(schema)%20%3E%20(property)%20maintenance_config%20%3E%20(property)%20snapshot_expiration%20%3E%20(property)%20min_snapshots_to_keep">Link to this property</a>

<details>

<summary>

State BasinCatalogGetResponseMaintenanceConfigSnapshotExpirationState

Specifies the state of maintenance operations.

</summary>

One of the following:

const BasinCatalogGetResponseMaintenanceConfigSnapshotExpirationStateEnabled BasinCatalogGetResponseMaintenanceConfigSnapshotExpirationState = "enabled"

<a href="#(resource)%20basin_catalog%20%3E%20(model)%20BasinCatalogGetResponse%20%3E%20(schema)%20%3E%20(property)%20maintenance_config%20%3E%20(property)%20snapshot_expiration%20%3E%20(property)%20state%20%3E%20(member)%200">Link to this property</a>

const BasinCatalogGetResponseMaintenanceConfigSnapshotExpirationStateDisabled BasinCatalogGetResponseMaintenanceConfigSnapshotExpirationState = "disabled"

<a href="#(resource)%20basin_catalog%20%3E%20(model)%20BasinCatalogGetResponse%20%3E%20(schema)%20%3E%20(property)%20maintenance_config%20%3E%20(property)%20snapshot_expiration%20%3E%20(property)%20state%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20basin_catalog%20%3E%20(model)%20BasinCatalogGetResponse%20%3E%20(schema)%20%3E%20(property)%20maintenance_config%20%3E%20(property)%20snapshot_expiration%20%3E%20(property)%20state">Link to this property</a>

</details>

<a href="#(resource)%20basin_catalog%20%3E%20(model)%20BasinCatalogGetResponse%20%3E%20(schema)%20%3E%20(property)%20maintenance_config%20%3E%20(property)%20snapshot_expiration">Link to this property</a>

</details>

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

</details>

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

### Get Basin Catalog details

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"),
  )
  basinCatalog, err := client.BasinCatalog.Get(
    context.TODO(),
    "my-data-bucket",
    basin_catalog.BasinCatalogGetParams{
      AccountID: cloudflare.F("0123456789abcdef0123456789abcdef"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", basinCatalog.ID)
}
```

200 example

```
{
  "errors": [],
  "messages": [],
  "result": {
    "bucket": "analytics-bucket",
    "credential_status": "present",
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "maintenance_config": {
      "compaction": {
        "state": "enabled",
        "target_size_mb": "128"
      },
      "snapshot_expiration": {
        "max_snapshot_age": "7d",
        "min_snapshots_to_keep": 100,
        "state": "enabled"
      }
    },
    "name": "account123_analytics-bucket",
    "status": "active"
  },
  "success": true
}
```

##### Returns Examples

200 example

```
{
  "errors": [],
  "messages": [],
  "result": {
    "bucket": "analytics-bucket",
    "credential_status": "present",
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "maintenance_config": {
      "compaction": {
        "state": "enabled",
        "target_size_mb": "128"
      },
      "snapshot_expiration": {
        "max_snapshot_age": "7d",
        "min_snapshots_to_keep": 100,
        "state": "enabled"
      }
    },
    "name": "account123_analytics-bucket",
    "status": "active"
  },
  "success": true
}
```