Brightspot CMS Developer Guide

Custom Content Delivery API development


Note
This Integrations section, found in the Developer Guide, covers integrations that require developer intervention to turn on. For quick, out-of-the-box integrations offered by Brightspot, see the Integrations section in the Brightspot CMS User Guide.

Overview of custom CDA development
For stable production functionality, it typically makes more sense to build a custom Content Delivery endpoint via code, rather than entirely through editorial configuration. An endpoint class can ensure that a fixed set of APIs are exposed with configuration that should not change between different environments.

Implementing custom CDAs

  1. Create a new Java class extending ContentDeliveryApiEndpoint.
  2. Implement required methods:

  • getPathSuffix—appended to /graphql/delivery/ to create the path where the API endpoint is available.
  • getQueryEntryFields—objects wrapping view model and interface classes used to generate the schema and expose APIs.


Example:

public class FooContentDeliveryApiEndpoint extends ContentDeliveryApiEndpoint {

    @Override
    protected String getPathSuffix() {
        return "foo"; // API endpoint is available at path '/graphql/delivery/foo'
    }

    @Override
    public List<ContentDeliveryEntryPointField> getQueryEntryFields() {
        return Arrays.asList(
               new ContentDeliveryEntryPointField(FooViewModel.class),
               new ContentDeliveryEntryPointField(BarViewModel.class));
    }
}

Previous Topic
CDA guides
Next Topic
Using Brightspot GraphQL Preview
Was this topic helpful?
Thanks for your feedback.
The elements that get you up and running in a matter of days, from pre-built content types, to modules, to landing pages.

Content types
Modules
Landing pages
Everything you need to manage and administer content within Brightspot CMS, including plug-and-play integrations.

Dashboards
Publishing
Workflows
Admin configurations
A guide for installing, supporting and administering code on the Brightspot platform, including integrations requiring developer support to use.

Field types
Content modeling
Rich-text elements
Images