In the previous parts of this series, we focused on content modeling, custom content types, and localizing content in Sitecore CMP (Content Hub). Once content is authored and localized, the next natural question is:
How do downstream applications actually consume this content?
Sitecore CMP provides two primary integration mechanisms for content delivery:
- REST APIs
- GraphQL APIs
Both are powerful, but they serve different use cases. In this part, we’ll walk through how content is exposed via REST, how relationships help aggregate content, and how the same data can be consumed efficiently using GraphQL.
Content Exposure in Sitecore CMP: The Foundation
Every content item created in Sitecore CMP is:
- An Entity
- Based on an Entity Definition
- Exposed consistently via APIs
For content items, the underlying definition is always M.Content, regardless of whether you’re using a default or a custom content type.
This consistency is what makes downstream consumption predictable.
Option 1: Consuming Content via REST APIs
Understanding the Entity REST Endpoint
Each entity in CMP is exposed via the standard endpoint:
For example, if a content item has an entity ID 62731, calling:
returns a complete JSON representation of that content entity.
Sample REST Response Structure
A typical content entity response looks like this:
This response includes:
- System metadata (created/modified, lifecycle, permissions)
- Schema-level fields
- Custom content fields
- Relationships
Accessing Custom Content Type Fields
In this example, the content item was created using a custom content type called Generic Site Block.
Inside the properties node, you’ll see only the fields that belong to this content type:
All other content-type-specific fields (from default or other custom types) will appear as null.
This makes REST ideal when:
- You need full entity visibility
- You want system metadata + content data
- You’re building integration services or middleware
Using Relations to Fetch Content by Content Type
One of the most important relations for downstream consumption is:
relations.ContentTypeToContent
Example: Content Type → Content Items
Calling the content type entity:
(where 61827 represents M.ContentType.GenericSiteBlock) returns:
This tells us:
- Two content items were created using GenericSiteBlock
- Downstream systems can iterate over these child entity URLs
- All content of the same type can be fetched dynamically
Why This Matters
This pattern allows downstream apps to:
- Fetch all content items of a given content type
- Avoid hardcoding entity IDs
- Build content-type-driven APIs
Option 2: Consuming Content via GraphQL
While REST exposes everything, GraphQL allows downstream apps to request only what they need.
Sitecore CMP exposes GraphQL at:
GraphQL Schema Awareness
CMP automatically generates a GraphQL schema based on:
- Entity definitions
- Custom content types
- Field names (normalized)
For GenericSiteBlock, CMP generates a type like:
M_Content_GenericSiteBlock
GraphQL Query Example
Sample GraphQL Response
Notice:
- Both English and localized (French) content are returned
- Only requested fields are included
- No system metadata is exposed unless requested
REST vs GraphQL: The Key Difference
| Aspect | REST API | GraphQL |
|---|---|---|
| Data Volume | Returns full entity | Returns only requested fields |
| Metadata | Always included | Optional |
| Performance | Heavier payload | Optimized |
| Schema Awareness | Not required | Required |
| Best For | Integrations, middleware | Frontend & headless apps |
In short:
- REST exposes everything
- GraphQL exposes exactly what you ask for
Key Takeaways
Sitecore CMP is designed with flexibility at its core, giving teams multiple ways to expose and consume content across the enterprise:
- REST APIs provide complete entity access, making them ideal for backend systems, middleware, and deep integrations.
- GraphQL APIs enable precise and performant content delivery, perfectly suited for headless websites and modern frontend applications.
For architects and integration engineers, the real value lies in selecting the right API for the right consumer, ensuring scalability, performance, and long-term maintainability.
What’s Next?
In Part 6, we’ll shift the focus from delivery to intelligence as we explore:
Elevating Content with AI & Smart DAM Linking
We’ll look at how AI-powered capabilities and intelligent DAM associations can enhance content discoverability, reuse, and downstream experiences—unlocking the next level of value from Sitecore CMP.