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


An easy way to add analytics dashboard in your cosmic bucket.
With revision history, you no longer have to worry about editing mistakes. You now have the power to go back in time and revert to to prior versions.
In this video, Cosmic co-founder Tony Spiro takes you on a tour of the new Cosmic CLI which allows you to do all of the awesome things you can with the Cosmic API, from the comfort of your command line interface.
Use Cosmic as a seamless content management system for displaying large amounts of educational data
Using Cosmic's Webhooks we can sync Algolia with Cosmic to provide search to our projects.
In this blog we'll quickstart a React Native Cross-Platform Blog using the Cosmic CLI. This app is three apps in one: Web, iOS and Android app all with content powered by Cosmic. Go to the GitHub repo to see the iOS and Android app share the same React Native codebase.

Get Started with Cosmic

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