Skip to content
mweikard edited this page Oct 27, 2017 · 12 revisions

Getting started with CoreMedia Content as a Service (CaaS)

This guide will get you started in using the CoreMedia Content as a Service (CaaS) experience.

Overview

CoreMedia CaaS is the framework which allows you to access your CoreMedia content as JSON through a REST API.

Steps

Step 1: Create processing definitions

Processing Definitions configure the response for specific types of content.

The first step in making a Processing Definition is to define a schema, which is a map from the content properties in the repository scheme to the attributes that you would like to extract. These can be defined statically following the Schema Definition or can be generated automatically using the Schema Generator.

Then you define a set of GraphQL Queries which will be matched against the schema. These queries are executed on the server side and define the transformation from content objects to JSON response.

There are two types of content properties which require special attention: links and richtext.

Generating links is always tied to the client applications and use cases so there is only a simple sample implementation of a link builder. See Link Building for implementing custom link builders and adding them to a Processing Definition.

Richtext in CoreMedia has a complicated structure and the richtext markup must be transformed to plain string form in order to be delivered as usable JSON. A generic Richtext Transformation API has been defined for this which may be used or extended as needed.

Step 2: Start the headless server

Once your processing definitions have been created and added to Maven build or CoreMedia repository, you can build the server and start it, either by Spring Boot or as a Tomcat webapp. See the headless server README for details.

Step 3: Write the client

Use your favorite client side language and framework to connect to the headless server. Fetch the CoreMedia content as JSON and generate the output you require for your application. For an example take a look at the React-Fragments repository.

Clone this wiki locally