Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: formatting change for key points, skip ahead sentence moved to beginning of swagger section

...

Table of Contents
maxLevel3
minLevel2

...

iconfalse

Key points

This section is a very brief summary of the most important things from the sections below.

To use Magnolia REST features:

  • Set up Magnolia with version 5.6 or higher; you may want to use a preconfigured Magnolia bundle.
  • Make sure your bundle contains at least the Magnolia REST modules magnolia-rest-integrationmagnolia-rest-servicesmagnolia-rest-content-delivery (version 2.0 or higher). See REST module - Installing if needed.
  • Design a security strategy with custom users to access the REST endpoint. To start immediately or for testing purposes, you can use superuser on the author instance and anonymous user on the public instance at your own risk.
  • Provide YAML configuration to enable the usage of the delivery endpoint in a light module.

    Expand
    titleClick here to get a starting point for configuration
    Code Pro
    languageyaml
    titledelivery-base-definition.yaml
    linenumberstrue
    class: info.magnolia.rest.delivery.jcr.v1.JcrDeliveryEndpointDefinition
    params:
      website:
        depth: 2
        nodeTypes:
          - mgnl:page
          - mgnl:area
          - mgnl:component
        childNodeTypes:
          - mgnl:area
          - mgnl:component
        rootPath: /
        includeSystemProperties: false

    Read Delivery endpoint API - YAML configuration for further details.

  • cURL:

    Code Pro
    curl -X GET 'http://localhost:8080/magnoliaPublic/.rest/delivery/website/v1/travel/about'

    and GET a REST.

Setup

In this section, we assume you are using a Magnolia bundle version 5.6 or higher and you know how to:

...

Anchor
enabling-swagger-tools
enabling-swagger-tools
Enabling Swagger UI tools - magnolia-rest-tools

...

If you do not want to use the Swagger UI tools, skip ahead to security settings.

Multiexcerpt include
MultiExcerptNamegeneral_info
PageWithExcerpt_enabling and using swagger

Installing the magnolia-rest-tools module

To enable swagger you must add magnolia-rest-tools to your webapp(s). 

...