Version Iteration - Portable JSON Buckets
One of the principal benefits of using a CMS API over an installed content management system is the portability and scalability of the buckets of content you create. I hear this question at least several times a week: "How can I back up my bucket of content or duplicate that bucket's content to another web application?"
Using a CMS API like the Cosmic API allows developers to build web applications in any programming language they want. Version iterations, backups and duplicating buckets for the next stage in development is intuitive and easy. In this blog I will show you how simple the process is.
I'm using Cosmic as the example Content Management API for this blog. Sign Up with Cosmic to get started.
Export bucket.json file
I've navigated to the Import / Export tab of my Cosmic Dashboard and can see the option to Export my data and files into a bucket.json file. By clicking Export, the bucket is immediately downloaded onto my computer for use.
Downloaded bucket.json File
Add New Bucket
Create New Bucket - Version II
Because I'd like to keep Version I as a comparison of my web application, I'll Create a New Bucket to import my downloaded bucket.json file to deploy and make changes to.
App Installation Prompt
Once I've created my new bucket, the standard App Installation Prompt will pop up to see if I'd like to see any content-ready applications. Since I've already got an application in my bucket.json file, I'll click "No Thanks".
Import Bucket.json file
Now that I'm in my bucket's dashboard, I'll simply click Import / Export again to import my bucket.json file from Version I.
Importing bucket.json file
Click "Yes, Import" - don't worry about deleting current data and files as this is a brand new bucket in which we hadn't yet added any Objects or Object Types.
I can easily manage all Versions of my bucket from the Cosmic Dashboard. I've just duplicated buckets of content, as well as provided myself a bucket.json backup of my web application. Developers and content editors can easily create new buckets of content while using best practices surrounding Version Control and Version Iteration.
Cosmic is an API-first cloud-based content management platform that makes it easy to manage applications and content. If you have questions about the Cosmic API, please reach out to us on Twitter or Slack.
- Developer Spotlight: Jon Bloomer
- Sharing Resources With a Content Management API
- Team Member Role Management in Cosmic
- How to Build a Cross-Platform Blog Using React Native and Node.js
- Cosmic Product Tour
- How to Create an Intuitive Website Navigation Menu
- Repeater Metafields Now Available
- Adding Webhooks in 4 Easy Steps
Add a headless CMS to Astro in 3 easy steps
September 20, 2022
Introducing Build Time: a new podcast by Cosmic
August 02, 2022