---
title: "Shared buckets list"
method: GET
path: "/v2/storage/shared-buckets"
tags: ["Buckets"]
---

# Shared buckets list

`GET /v2/storage/shared-buckets`

## Request

- Base URL: `https://connection.keboola.com`
- URL: `https://connection.keboola.com/v2/storage/shared-buckets`
- Auth: one of:
  - API key in header `X-StorageApi-Token`
  - API key in header `X-KBC-ManageApiToken`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/keboola/apis/keboola-storage-api/docs/v2/storage/shared-buckets/get.ts> (a function with typed inputs; its response is checked against the schema)

Lists buckets which may be shared to the project (buckets shared within the organization the token can link). Requires the token to be able to manage buckets.

## Query parameters

- `include` string

## Response `200`

List of shared buckets.

- SharedBucketResponse[]
  - `id` string, required: Bucket identifier in the source project.
  - `name` string, required: Bucket name.
  - `displayName` string, required: Bucket display name.
  - `stage` 'in' | 'out' | 'sys', required: Bucket stage.
  - `description` string, required: Bucket description.
  - `sharing` 'organization' | 'organization-project' | 'specific-projects' | 'specific-users' | 'null', nullable, required: Sharing type.
  - `created` string, required: Creation timestamp, ISO 8601 with a `+hhmm` offset; `""` when none was recorded.
  - `lastChangeDate` string, nullable, required: Timestamp of the last data change, ISO 8601 with a `+hhmm` offset.
  - `dataSizeBytes` integer, required
  - `rowsCount` integer, required
  - `backend` string, required: Storage backend of the bucket: `snowflake`, `bigquery` or `postgres` (external buckets); older buckets may carry another backend name.
  - `hasExternalSchema` boolean, required: Whether the bucket is an external (registered) bucket.
  - `databaseName` string, required: Database of a Snowflake external bucket or of a linked bucket's source; `""` otherwise.
  - `path` string, required: Dot-separated path of the bucket on the backend.
  - `project` object, required: Project owning the bucket.
    - `id` integer, required
    - `name` string, required
  - `color` string, nullable, required
  - `tables` object[]: Tables in the shared bucket (filtered aliases are omitted). Absent from a `sourceBucket` inside a table list or search with `include=bucketsWithoutSourceTables`.
    - `id` string, required
    - `name` string, required
    - `displayName` string, required
    - `path` string, required: Internal Storage path of the table (`/{bucket numeric id}-{table name}`); may be `""`.
  - `sharingParameters` union: Who the bucket is shared with. Present only when the bucket is shared; an empty array `[]` when it is shared with the organization or its projects.
    - object
      - `projects` object[]: Present when `sharing` is `specific-projects`.
        - `id` integer, required
        - `name` string, required
      - `users` object[]: Present when `sharing` is `specific-users`.
        - `id` integer, required
        - `name` string, required
        - `email` string, required
    - unknown[]
      - unknown
  - `sharedBy` object: Token that shared the bucket. Present only when the bucket is shared.
    - `id` integer, nullable, required
    - `name` string, nullable, required
    - `date` string, required: ISO 8601 with a `+hhmm` offset; `""` when none was recorded.
  - `sharedByActor` ActorResponse, required: Who performed the action and through which credential.
    - `type` 'token' | 'session' | 'pat' | 'system', required: Credential the action came through: a Storage token, a programmatic session, a personal access token, or system work.
    - `id` string, required: Token id as a string, session or personal access token UUID, or the system subject.
    - `name` string, required: Token description, the admin email for a session or personal access token, or the system label, as it was when the action happened.
    - `adminId` integer, nullable, required: Admin behind the credential; null for a token without an admin, for system work, and when the admin was not recorded (an object whose creator is known only from its token columns, including rows backfilled from them).
  - `owner` object, nullable, required: Bucket owner; `null` when no owner is set.
    - `id` integer, required
    - `name` string, required
    - `email` string, required
  - `metadata` MetadataItemResponse[]: Bucket metadata. Present only on the shared-buckets list with `include` containing `metadata`.
    - `id` string, required: Metadata record identifier
    - `key` string, required: Metadata key
    - `value` string, nullable, required: Metadata value
    - `provider` string, required: Id of the component that created the metadata
    - `timestamp` string, required: When the metadata was created or last updated, ISO 8601 with a `+hhmm` offset

## Other responses

- `403`: The token cannot manage buckets (`accessDenied`).

---

[API](https://skmtc.dev/keboola/apis/keboola-storage-api.md) - [All operations](https://skmtc.dev/keboola/apis/keboola-storage-api/llms.txt) - [OpenAPI document](https://skmtc.dev/keboola/apis/keboola-storage-api/revisions/34b5ceac0317?raw)
