Publishing your content as an API
If you are producing content as part of your everyday business - it’s likely that your teams would like to repurpose the content for many different occasions and in different channels. Content written for a blog post can be often reused for social media, photos shot for an online ad can serve well for website images and so on. What’s the most convenient way to share that content across your teams? Providing content as APIs.
What is an API
An API, or Application Programming Interface, is how developers interact with a specific system. They speak to systems through APIs; these APIs allow them to (primarily) read data from and write data to systems.
In the case of Content Management Systems - an API usually provides developers with the ability to create new content, and read, update or delete existing objects. In developer lingo - these operations are called CRUD - for Create, Read, Update and Delete.
How does an API help to reuse content
Storing your content in a Content Management System and accessing it through an API helps put structure and organize your assets. Regardless of the kind of data you’re storing in the system - text, images, files - organizing it upfront is key to reusing it later. You could argue that storing it in folders on your hard drive is good enough, but not if you intend to utilize it in different channels - for example, web apps, mobile apps, websites and so on. Publishing data in a form that is easily accessible by developers allows you to reap the benefits of modern technologies and the multitude of channels that they offer.
To properly organize your digital content, you should look at Content Management Systems. However, using a traditional CMS can often lead to mixing your real content (for example news announcements) with the description of how they should appear in the user's web browsers. That’s a big problem because it makes it impossible to reuse that content in other channels - for example, as social media posts or messages sent to users’ phones or watches. We are recently observing attempts to combat this problem. The most interesting ones seem to be the so-called headless and decoupled content management systems.
What is a headless CMS
A headless CMS is a system that allows developers to store content inside it - it acts as a content repository and has virtually no user interface. The main focus of a headless CMS is raw data and separating content from its presentation in a particular medium. In a headless system, content is usually made accessible to developers via APIs.
A headless system provides means to define different content models. For example, you will be able to define different models for storing:
- Product data,
- Images
- Blog posts,