# Buckets
Buckets are where you store content for your projects.
# Add Bucket
title
is the only required property. If no slug is present, the title will be converted to a slug (opens new window). See the table below for the other optional properties. The Bucket request matches the bucket.json
file located in Your Bucket Dashboard > Import / Export.
Parameter | Required | Type | Description |
---|---|---|---|
title | required | String | Your Bucket title |
slug | String | URL-friendly (opens new window) unique identifier | |
read_key | String | Restrict read access | |
write_key | String | Restrict write access | |
cluster | String | Add this Bucket to a Cluster. ID of existing Cluster | |
object_types | Array | Populate your Bucket with Object Types. See Object Types for model. | |
objects | Array | Populate your Bucket with Objects. See Objects for model. | |
media | Array | Populate your Bucket with Media. See Media for model. | |
media_folders | Array | Populate your Bucket with Media Folders. See Media for model. | |
webhooks | Array | Populate your Bucket with Webhooks. See Webhooks for model. | |
extensions | Array | Populate your Bucket with [Extensions]/docs(/extensions). See Extensions for model. |
# Get Buckets
Gets all Buckets connected to your account. Your authorization token in the header request is the only required property.
# Connect to Bucket
For the NPM module:
Parameter | Required | Type | Description |
---|---|---|---|
slug | required | String | The Bucket slug |
read_key | String | Restrict read access | |
write_key | String | Restrict write access |
# Get Bucket
Returns the entire Bucket including Object Types, Objects, Media and more. If you would like to restrict read access to your Bucket, you can do so in Your Bucket > Basic Settings.
Parameter | Required | Type | Description |
---|---|---|---|
hide_metafields | Enum | true, Hides metafields | |
read_key | String | Restrict read access to your Bucket |
# Delete Bucket
DANGER
Deletes the whole Bucket. This cannot be undone.
Parameter | Required | Type | Description |
---|---|---|---|
id | required | String | The Bucket id found as "_id" |
token | required | String | You can only delete Buckets that you have created / own. |
# Import Bucket
DANGER
The Bucket import method removes all current data: Object Types, Objects and Media and replaces it with new data. This cannot be undone.
The Bucket data schema matches the bucket.json
file located in Your Bucket Dashboard > Import / Export.
Parameter | Required | Type | Description |
---|---|---|---|
object_types | Array | Populate your Bucket with Object Types. See Object Types for model. | |
objects | Array | Populate your Bucket with Objects. See Objects for model. | |
media | Array | Populate your Bucket with Media. See Media for model. | |
media_folders | Array | Populate your Bucket with Media Folders. See Media for model. | |
webhooks | Array | Populate your Bucket with Webhooks. See Webhooks for model. | |
extensions | Array | Populate your Bucket with Extensions. See Extensions for model. |
← Authentication Users →