/storage/buckets/{bucketName}Get Bucket
Returns one bucket, including its mode (private, public or custom).
| bucketName * | path | The bucket's name. It is unique within the project. |
| projectSlug * | path | The project's slug: the path segment after It is unique within the org. |
| HTTP | K9O Code | Description |
|---|---|---|
| 200 | Success | |
| 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. |
| data * | object | A storage bucket and its settings. |
| name * | string | The bucket name, unique in the project. |
| mode * | "private" | "public" | "custom" | Who can reach the bucket's objects. |
| public * | boolean | True when Derived from |
| fileSizeLimit * | any | The largest object an upload may write, in bytes; null when the bucket sets no limit. |
| One of: integer | ||
| or: null | ||
| allowedMimeTypes * | string[] | MIME types an upload may have. Empty means any type. |
| versioning * | boolean | Whether earlier versions of an overwritten object are kept. |
| deleteAfterDays * | any | 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: integer | ||
| or: null | ||
| createdAt * | string <date-time> | When the bucket was created. |
| updatedAt * | string <date-time> | When the bucket's settings last changed. |
| system * | boolean | True for a bucket the platform creates and writes ( 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. |
| byosBindingId * | any | The storage location ( |
| One of: string | ||
| or: null | ||
| meta * | any | Request metadata: cost, timing and correlation ids. |
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.storage.getBucket('product-images')Showing example in TypeScript
{
"data": {
"name": "string",
"mode": "private",
"public": false,
"fileSizeLimit": 0,
"allowedMimeTypes": [
"string"
],
"versioning": false,
"deleteAfterDays": 0,
"createdAt": "string",
"updatedAt": "string",
"system": false,
"byosBindingId": "string"
}
}