Content as a Service
9. November 2017 / Katherine Thompson / Labs, TechTalk
CoreMedia is a Content Management System (CMS) which can manage your content from creation straight through to rendering. Our Content Application Engine (CAE) provides tools and a framework with which you can easily design a beautiful, consistent and fully-functional user experience.
The components of the CoreMedia system work gracefully together as an isolated system, but it is also flexible enough to be a small but crucial component in a larger ecosystem. Perhaps you have data from many different sources to include into your website. These sources could include commerce systems, brick-and-mortar backend systems, marketing data, user management systems. Perhaps you have already committed to a certain technology in your website that you need to include. Or perhaps you would like to inject content into native mobile apps.
You need the flexibility to incorporate all that data from many different sources into your website, or reuse that content on multiple channels, while still taking advantage of the powerful content management features that CoreMedia provides: versatile Studio for creating, editing and managing your content; extensive collaboration features; configurable publication and translation workflows and a wide spectrum of other features.
Our answer to achieve this flexibility is to deliver content from CoreMedia in a standardized, structured way (JSON), making it available for another system, leaving you full freedom to design and render your content using the framework of your choice. We affectionately call this service the “Headless API”. And this service is available for you now in CoreMedia Labs (see Resources below).
How does it work?
The Headless API defines a simple REST API to access content from the CoreMedia repository. On the server side the content is transformed via GraphQL queries before being returned to the client as JSON reponse. On the client side, simply parse the JSON response and process it as you please.
You can customize the GraphQL queries to tailor the returned JSON to your application’s needs.
The first step is to define a schema, which maps the content properties in the repository scheme to the attributes that you would like to extract. This can be done manually or with the help of a schema generator.
Then you define a set of GraphQL queries which will be matched against the schema.
The schema and query set are either deployed alongside the headless server or installed in the CoreMedia repository. The headless server can be started either by Spring Boot or as a Tomcat webapp. This is a separate component that can be deployed and maintained decoupled from the central CoreMedia system.
On the client side, just request the service’s URLs. The URLs determine which GraphQL query will be used, which content should be extracted and optional parameters for more fine-grained responses. Then you may process the JSON response with whatever technology you prefer.
Interested in a deeper understanding of CaaS in CoreMedia? See what we’ve cooked up for you in our CoreMedia Labs.