# Get Bucket

`GET /storage/buckets/{bucketName}` · Core · Storage & Schema

Returns one bucket, including its `mode` (`private`, `public` or `custom`).

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `bucketName` | path | yes | The bucket's name. It is unique within the project. Example: `"product-images"`. |
| `projectSlug` | path | yes | The project's slug: the path segment after `@`. It is unique within the org. Example: `"storefront"`. |

## Responses

- **200**: Success

| Field | Type | Required | Description |
|---|---|---|---|
| `data` | object | yes | A storage bucket and its settings. |
| `data.name` | string | yes | The bucket name, unique in the project. |
| `data.mode` | enum ("private", "public", "custom") | yes | Who can reach the bucket's objects. `private`: project roles and IAM policies only. `public`: as private, plus anyone may read (not list, write or delete) objects without signing in. `custom`: the bucket's storage policy decides; the bucket must already have one. |
| `data.public` | boolean | yes | True when `mode` is `public`. Derived from `mode`. |
| `data.fileSizeLimit` | object | yes | The largest object an upload may write, in bytes; null when the bucket sets no limit. |
| _one of_ | | |  |
| _or_ | | |  |
| `data.allowedMimeTypes` | array of string | yes | MIME types an upload may have. Empty means any type. |
| `data.versioning` | boolean | yes | Whether earlier versions of an overwritten object are kept. |
| `data.deleteAfterDays` | object | yes | Objects are deleted this many days after they were last uploaded: from that point they read as not found, and they are removed from the bucket within a few hours. Null keeps them until deleted. Only objects uploaded through the platform are deleted: one written straight into a customer storage location, or uploaded before per-object records began, is kept. |
| _one of_ | | |  |
| _or_ | | |  |
| `data.createdAt` | string (date-time) | yes | When the bucket was created. |
| `data.updatedAt` | string (date-time) | yes | When the bucket's settings last changed. |
| `data.system` | boolean | yes | True for a bucket the platform creates and writes (`k9o-audit-anchors`, `k9o-extension-assets`). A system bucket can't be deleted, its objects can't be written or deleted through the API, and only its storage location can change. |
| `data.byosBindingId` | object | yes | The storage location (`byos_...`) the bucket's objects are kept in; null for platform-managed storage. |
| _one of_ | | |  |
| _or_ | | |  |
| `meta` | object | yes | Request metadata: cost, timing and correlation ids. |


## Errors

| HTTP | Code | When |
|---|---|---|
| 403 | `K9O_ACCESS_DENIED` | The caller does not have permission to read this storage bucket. |
| 404 | `K9O_BUCKET_NOT_FOUND` | No bucket with the specified name exists in this project. |

## Code samples

### cURL

```bash
curl -X GET 'https://<org>.api-<region>.k9o.io/@storefront/storage/buckets/product-images' \
  -H 'Authorization: Bearer $K9O_TOKEN'
```

### fetch

```javascript
const res = await fetch('https://<org>.api-<region>.k9o.io/@storefront/storage/buckets/product-images', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.K9O_TOKEN}`
  },
});
const { data, meta } = await res.json();
```

### k9o CLI

```bash
k9o storage buckets get <name>
```

### @k9o/core

```typescript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.storage.getBucket('product-images')
```

### k9o

```python
# k9o = create_client(org_slug="playground", project_slug="storefront", api_key="k9o_…")
response = k9o.storage.get_bucket("product-images")
```

### sdk-go

```go
// ctx := context.Background()
// client, _ := k9o.NewClient(k9o.ClientOpts{OrgSlug: "playground", ProjectSlug: "storefront", APIKey: "k9o_…"})
data, _, kerr := client.Storage.GetBucket(ctx, "product-images")
```

### k9o

```rust
// let k9o = Client::new(ClientOpts { org_slug: "playground".into(), project_slug: "storefront".into(), api_key: "k9o_…".into() })?;
let resp = k9o.storage.get_bucket("product-images").await?
```

### dev.k9o:core

```java
// K9o k9o = K9o.createClient(K9o.Opts.builder().orgSlug("playground").projectSlug("storefront").apiKey("k9o_…").build());
var response = k9o.storage().getBucket("product-images")
```

### K9o.Core

```c#
// var k9o = K9oClient.Create(new K9oOptions { OrgSlug = "playground", ProjectSlug = "storefront", ApiKey = "k9o_…" });
var response = await k9o.Storage.GetBucketAsync("product-images")
```

### k9o

```ruby
# k9o = K9o.create_client(org_slug: "playground", project_slug: "storefront", api_key: "k9o_…")
response = k9o.storage.get_bucket("product-images")
```

### k9o/sdk

```php
// $k9o = K9oClient::create(['org_slug' => 'playground', 'project_slug' => 'storefront', 'api_key' => 'k9o_…']);
$response = $k9o->storage->get_bucket('product-images')
```

### K9o

```swift
// let k9o = try K9o.createClient(orgSlug: "playground", projectSlug: "storefront", apiKey: "k9o_…")
let result = try await k9o.storage.getBucket("product-images")
```

### core-kotlin

```kotlin
// val k9o = createClient { orgSlug = "playground"; projectSlug = "storefront"; apiKey = "k9o_…" }
val result = k9o.storage.getBucket("product-images")
```

### k9o (Flutter)

```dart
// final k9o = K9o.createClient(orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…');
final result = await k9o.storage.getBucket('product-images')
```

### @k9o/react-native

```javascript
// const k9o = createClient({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })  // RN, secure storage
const { data } = await k9o.storage.getBucket('product-images')
```


Canonical page: https://docs.kilimanjaro.dev/api-playground/core/get-bucket
