The new Cosmic dashboard is here!
Test drive it now →

Bucket Lifecycle Methods

Community Articles
Community Articles Bucket Lifecycle Methods

Check out the Gist below for a run-down of Bucket lifecycle methods using the Cosmic NPM module.  To get your authentication token, sign up and go to Your Account Settings > Authentication.

The following Gist follows the life of one John Bucket.  It does the following:

1. Creates a Bucket
2. Adds Object Types (People)
3. Adds Objects (in John's life with relationships)
4. Deletes the Bucket (commented out so you can see the result in your Cosmic Dashboard!)


As you can see, the Cosmic NPM module gives you a lot of power to manage your Cosmic Bucket contents.   Let me know if you have any questions about Bucket lifecycle methods.  Join the Cosmic community on Slack and follow us on Twitter.

You may also like


Why should you migrate your CMS? What's the big deal about Cosmic? This article should answer some questions you have about cosmicJS and what the pros and cons are of using an API-driven Content Management System
With so many choices for which technology to use when building a website, it can get overwhelming.
See how easy it is to create a browser based video game when using Cosmic to manage all of your data.
Publish Blog Articles to a clean and simple UI with Apollo Blog, powered by Apollo Graphql client and Cosmic.
Cosmic has powerful content modeling and delivery tools to help you build apps faster, together. Cosmic lets you manage all your content, data and files and is unopionated as to the format of content you're uploading. The Cosmic Editor allows you to upload rich media such as video, images and
Our digital world is being built on top of API services. And Webhooks are the operators that enable these API services to communicate with each other.

Get Started with Cosmic

Build personal projects for free. Add your team at unbeatable prices.
Start Building Talk to Sales