Buckets
A bucket is the container for one gateway's data. An AI Gateway keeps all of its custom providers, provider assignments, pools, apps, user apps and API keys in the bucket of the project's production environment, so the bucket determines the project.
Buckets are listed and created in their account
(/v4/accounts/{accountId}/buckets) and read at the root by their ID
(/v4/buckets/{bucketId}). A project's buckets hold
the bucket ID of each of its environment types, so creating or reading the
project gives you the ID. Everything in a bucket, every AI Gateway resource
included, is addressed under /v4/buckets/{bucketId}.
Every project has a bucket for each of its environment types, and the environments of one type share it. Custom buckets, created in the account, are not tied to an environment. Consumers and their API keys can live in one, so several projects can share them.
List buckets
Lists the account's buckets: one per environment type of each project, and
the custom buckets created in the account, oldest first. Filter by projectId and
environmentType to list the buckets of one project or environment type.
path Parameters
accountIdThe account ID, a UUID.
query Parameters
projectIdOnly return buckets of this project.
environmentTypeOnly return buckets of this environment type.
The environment of a project. New values may be added.
limitThe maximum number of items to return.
offsetThe number of items to skip before the first item returned.
List buckets › Responses
A page of buckets.
The buckets on this page.
limitThe page size that was applied.
offsetThe number of items skipped before this page.
totalThe number of items in the whole collection.
hasMoreWhether there are more items after this page.
nextThe relative URL of the next page, or null on the last page.
Create a bucket
Creates a custom bucket in the account. A custom bucket is not tied to a
project, so its projectId and environmentType are null.
Every project already has a bucket for each of its environment types.
Consumers and their API keys can live in a custom bucket, so several projects
can share them. An AI Gateway, including its apps and their API keys, always
uses its project's production bucket. name must be unique in the account.
The new bucket is read at the root: its Location is /v4/buckets/{bucketId}.
path Parameters
accountIdThe account ID, a UUID.
Create a bucket › Request Body
name^[a-z0-9-]+$ · requiredA friendly name, unique across Zuplo, so a name another account uses is a 409. Lowercase letters, digits and hyphens. Names that contain zuplo or start with zup, system or zprj- are reserved for Zuplo and are a 400.
descriptionWhat the bucket is for.
Create a bucket › Responses
The bucket was created.
idThe bucket ID.
accountIdThe account the bucket belongs to.
nameA friendly name, unique across Zuplo. Not an identifier; address buckets by id.
descriptionWhat the bucket is for.
projectIdThe project the bucket belongs to. Null for a custom bucket.
The environment type of the project the bucket belongs to. Its environments of that type share it. Null for a custom bucket.
createdOnWhen the bucket was created.
updatedOnWhen the bucket was last changed.
Get a bucket
Returns a bucket and the account, project and environment it belongs to.
Custom buckets have no project or environment. A bucket is read at the root
by its ID. A bucket the caller cannot see, including one in another account
than an account-scoped API key's, returns 404 as if it did not exist.
path Parameters
bucketIdThe bucket ID (bckt_…). Everything in a bucket is addressed under it.
Get a bucket › Responses
The bucket.
idThe bucket ID.
accountIdThe account the bucket belongs to.
nameA friendly name, unique across Zuplo. Not an identifier; address buckets by id.
descriptionWhat the bucket is for.
projectIdThe project the bucket belongs to. Null for a custom bucket.
The environment type of the project the bucket belongs to. Its environments of that type share it. Null for a custom bucket.
createdOnWhen the bucket was created.
updatedOnWhen the bucket was last changed.