SPA template definitions endpoint

For Single-page applications, the magnolia-spa-rendering submodule of the Pages module provides a dedicated template definitions endpoint which is used to deliver page, area and component template definitions.

Its implementation class is info.magnolia.rendering.spa.rest.v1.TemplateDefinitionEndpoint. You don’t need to configure anything in the endpoint.

Example request URL and response for template id mtk:components/textImage:

http://localhost:8080/magnoliaAuthor/.rest/template-definitions/v1/mtk:components/textImage
{
    "mtk:components/textImage": {
        "dialog": "mtk:components/textImage",
        "templateScript": "/mtk/templates/components/textImage.ftl",
        "name": "textImage",
        "id": "mtk:components/textImage",
        "type": "content",
        "renderType": "freemarker"
    }
}
Page content for single-page applications is delivered through the Delivery endpoint API v2.
Feedback