Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
HTML Wrap
alignright
classmenu
Page properties
DownloadMultiple submodules
EditionCE, Cloud
License
Include Page
DOCS56:_MLADOCS56:
_MLA
,
Include Page
DOCS56:_GPLDOCS56:
_GPL
IssuesMGNLREST
Maven siteREST
Latest version
Artifact resource link
groupIdinfo.magnolia.rest
artifactIdmagnolia-rest
label$version
renderTypedisplay_only
resourceTypeJAR
HTML Wrap
clearboth
width244px
alignright
classmenu

Related topics:

Include Page
DOCS56:_What is RESTDOCS56:
_What is REST

Table of Contents
maxLevel3
minLevel2

...

Multiexcerpt
MultiExcerptNamerest-integration-module-description

The REST Integration module installs the integration part of REST. The module:

  • Manages the dependencies for the required JAX-RS libraries.
  • Monitors /config/<module-name>/rest-endpoints for any custom endpoints you want to register. The monitoring mechanism is the same as used for observing registered dialogs, templates and apps. 
  • Installs a special servlet RestDispatcherServlet which dispatches requests to the individual endpoints registered in configuration. 
  • Lets you define additional providers or marshallers (called MessageBodyWorkers  in RESTeasy) you might need. The providers are responsible for translating the return object into JSON/XML and vice-versa.
  • Installs the default rest role that initially prevents access to unauthorized requests.

...

The REST Content Delivery module lets you configure a content delivery endpoint with minimal overhead. 

The delivery endpoint allows you to get JCR content through a RESTful API. The nodes can be pages, components, stories or anything else that is stored in a workspace. The response is displayed in a concise JSON format.

...

Maven is the easiest way to install the modules. Add the following dependencies to your bundle:

Artifact maven dependencies snippet
groupIdinfo.magnolia.rest
artifactIdmagnolia-rest-services

...

Artifact maven dependencies snippet
groupIdinfo.magnolia.rest
artifactIdmagnolia-rest-tools

Include Page
DOCS56:_Pre-built jars are also availableDOCS56:
_Pre-built jars are also available

  • Artifact resource link
    groupIdinfo.magnolia.rest
    artifactIdmagnolia-rest-services
    label$artifactId.jar
    renderTypedownload_link
    resourceTypeJAR
  • Artifact resource link
    groupIdinfo.magnolia.rest
    artifactIdmagnolia-rest-integration
    label$artifactId.jar
    renderTypedownload_link
    resourceTypeJAR
  • Artifact resource link
    groupIdinfo.magnolia.rest
    artifactIdmagnolia-rest-content-delivery
    label$artifactId.jar
    renderTypedownload_link
    resourceTypeJAR
  • Rest Tools bundle: 
    Artifact resource link
    groupIdinfo.magnolia.rest
    artifactIdmagnolia-rest-tools
    label$artifactId.zip
    renderTypedownload_link
    resourceTypeZIP
Info
Preconfigured Magnolia bundles contain the magnolia-rest-services, magnolia-rest-integration and magnolia-rest-content-delivery modules but not magnolia-rest-tools. When adding magnolia-rest-tools directly to your bundle, unpack the zip file and add all the files it contains to the WEB-INF/libs folder of your webapps.

...

Multiexcerpt
MultiExcerptNamesetting-swagger-base-path

The Swagger API explorer tool searches for the API at a path set in /modules/rest-tools/config/apiBasepath. The default value is  http://localhost:8080/.rest . The value for this property must match the following pattern:

Code Block
languageerl
<protocol>://<hostname>:<port>/<context>/.rest

When using one of Magnolia's preconfigured bundles running on localhost, set the property to  http://localhost:8080/magnoliaAuthor/.rest .

Set the path to where REST services reside on your system. If you run the standard Magnolia bundle and work on the author instance, set the path to  http://localhost:8080/magnoliaAuthor/.rest .

Advanced Tables - Table Plus
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node nameValue

Mgnl f
modules


Mgnl f
rest-tools


Mgnl f
config


Mgnl p
apiBasepath

http://localhost:8080/magnoliaAuthor/.rest

After setting the base path, restart Magnolia.

Swagger is in Dev > REST Tools.

...

enabledCommands

required

Enabled commands node.

<command>

required

Arbitrary name for the command. Use any name you like.

access

required

Access node.

roles

required

Roles node.

<role>

required

Role name. Grants the role permission to execute the command. Add the rest-admin role. The property name is arbitrary but the value must be a valid role name.

catalogName

required

Catalog where the command resides.

commandName

required

Command definition name.

Content Delivery module - configuring the delivery endpoint

You can define multiple endpoints in the version 2 of the delivery endpoint, definitions can be in YAML or in JCR ( on the configuration workspace).

Every endpoint is accessible via distinct  endpointPath . The endpointPath property is set automatically by the given name and location of the endpoint definition, or it can be set explicitly in the configuration.

...

For a complete reference - please see Delivery endpoint API v2 - Configuration.

Security

See REST security.

...