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


Cosmic Extensions make it possible to extend the functionality of Cosmic for both the developer and editor. A recent example built by the Cosmic Community is the Google Analytics Extension, which allows team members to easily see analytics insights directly in their Cosmic Bucket.
Tony Spiro, co-founder and CEO of Cosmic, presented "Building for Team Success with Content-Powered Apps" to illustrate the build vs. buy concept of software development in the API-first microservices movement. The full video is embedded below and runs approximately 45 minutes.
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.
Next.js is a React framework for building hybrid applications. It's flexible, extensible, and works great with any data provider. In this tutorial, we'll show how to get started with Cosmic CMS and Next.js.
Salesforce is the world’s leading enterprise CRM application. Zapier gives people internet superpowers by allowing them to connect and automate the apps they use. Using Zapier to connect your Cosmic-powered content with Salesforce is easy and requires zero coding.
Build a fully functioning messenger that can send SMS messages to application users. We will discuss Server side rendering of a React front, and leveraging a simple api in order to make protected requests to Cosmic cloud services.

Get Started with Cosmic

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