Crafter Engine
Engine provides content delivery services to power any type of Web or mobile application. It consumes content published from Studio via the Deployer and provides developers with APIs to consume the content (content, search, GraphQL, etc.).
CrafterCMS requires you use one of the following APIs to gain access to your content:
FreeMarker API (great for templated projects) FreeMarker (Templating) API
JavaScript API (great for SPAs and/or AJAX) JavaScript SDK
GraphQL (great for SPAs and/or AJAX) GraphQL
Search API Search
REST API (great for SPAs and/or AJAX) REST Content Retrieval APIs
Groovy (great for full control of the API endpoints and response shape) Groovy/Java API
Java (can be accessed from Groovy and gives full access to Crafter Engine) Java API
Project Type |
API |
Description |
Link |
---|---|---|---|
Headless |
Javascript SDK |
The JavaScript SDK allows access to CrafterCMS services from any SPA framework or direct JavaScript. The SDK also enables Experience Builder (In-Content Editing capabilities) for any project, including SPA projects. |
|
GraphQL |
The GraphQL API allows content retrieval and control over the shape of the response. |
||
REST API |
The REST API allows content retrieval using the default REST API endpoints, and also allows the developer to define custom endpoints with full control over the shape of the response. To create custom endpoints, see the Groovy API indicated below. |
||
Search |
The search API allows full text search, filtering, ranking and boosting across the entire project. |
||
Groovy |
The Groovy API allows for writing server-side code that can perform business logic, content operations, and more. This layer also allows the developer to create custom REST endpoints with full control over the shape of the response. |
||
Static Asset Access |
The Static Asset Access allows the developer to access static assets (images, videos, etc.) from internally managed or externally managed repositories. |
||
Templated |
FreeMarker |
The FreeMarker API allows access to CrafterCMS services from FreeMarker templates for server-side rendered projects. |
|
Search |
The search API allows full text search, filtering, ranking and boosting across the entire project. |
||
Groovy |
The Groovy API allows for writing server-side code that can perform business logic, content operations, and more. This layer also allows the developer to create custom REST endpoints with full control over the shape of the response. |
||
Static Asset Access |
The Static Asset Access allows the developer to access static assets (images, videos, etc.) from internally managed or externally managed repositories. |
Note
You can use the REST API in Templated projects to perform content operations via JavaScript as needed
Important
Scripts and Templates Security
CrafterCMS limits access to services when developing templates or scripts, and sandboxes scripts for security by default. CrafterCMS only allows a small list of services available to use when developing templates or scripts. There are some sites that may require services not included by default. To expose other services, follow the guide Configure Custom Services.
Scripts are executed in a sandbox that has a blacklist of insecure expressions to prevent code that could compromise the system. There are some cases though where a site requires access to one or more of the blacklisted expressions.
To override the default script sandbox configuration, follow the guide Groovy Sandbox Configuration.
Configuration
Learn about configuring Crafter Engine in the Crafter Engine Configuration Guide.
Security
Learn about Crafter Engine’s security features in the Crafter Engine Security Guide.
REST API
To view the Crafter Engine REST APIs:
or in a new tabSource Code
Crafter Engine’s source code is managed in GitHub: https://github.com/craftercms/engine