Support and Documentation

CDA vs CMA: Which one should we use?
Introduction

Brightspot offers two main APIs for generating GraphQL endpoints: ContentDeliveryApiEndpoint (CDA) and ContentManagementApiEndpoint (CMA). There is overlap in functionality between these two solutions, which can make it unclear as to what the right choice is. It is important to consider the names of the two APIs when evaluating them against a use case. CDAs are focused on delivering data to some downstream user, many times, via a frontend like a web browser or native application. CMAs are focused on managing CMS data and support much more internal business use cases like automated testing, data ingestions and exports, and powering custom CMS user interfaces. Although the distinction between "delivery" and "management" seems to imply that the former is for only for reading, they both have the ability to expose CRUD operations for Brightspot data, so data manipulation should not be the only factor taken into consideration.

Content Delivery API

CDAs focus on exposing only what is necessary to power a specific experience. They expose mostly high-level Brightspot features, providing simple GraphQL APIs that are intuitive to implement.

View

CDAs can leverage Brightspot's view system to provide a transformation layer for data before it is presented to the end user. This is very important for situations in which raw data from the database may need to stripped of internal information or transformed into a specific format. Conversely, the transformation layer is also great for cleaning and saving UGC (user-generated content) data input via the mutation GraphQL APIs that the CDA can expose. Additionally, developers have immense freedom in designing and customizing CDA APIs to reflect very specific intended schemas.

Recordable

Sometimes the transformation layer is not necessary, and an API designer may want to pass modeled data straight through. CDAs can be configured with Brightspot types to take that extra step out of the process.

Content Management API

CMAs focus on exposing Brightspot concepts and APIs via GraphQL. This allows a caller to replicate much of the functionality available, through Java code, directly with the generated APIs. The extra functionality makes CMAs have a heavier footprint than a typical CDA and also far less customizable; however, callers have the ability to read and mutate most Brightspot data with only a simple endpoint configuration necessary on the backend.