Magnolia 5.6 reached end of life on June 25, 2020. This branch is no longer supported, see End-of-life policy.
...
Table of Contents | ||||
---|---|---|---|---|
|
This section is a brief summary of the most important things from the sections below. Here we will not go into details but mention the most important points.
We assume you are using Magnolia bundle with version 5.6 or higher and you know how you can:
...
If you are completely new to Magnolia, follow Setup a Magnolia bundle with all REST modules - step by step.
These three modules listed below are required to use all Magnolia REST features within a productive context.
...
While developing new features, it can be helpful to use the magnolia-rest-tools
which enable the swagger UI tools. Have a look at enabling swagger UI tools.
Anchor | ||||
---|---|---|---|---|
|
Multiexcerpt include | ||||
---|---|---|---|---|
|
If you do not want to usw the swagger tools- skip the next sections and proceed with reading about Getting started with Magnolia RESTsecurity.
To enable swagger you must add magnolia-rest-tools
to your webapp(s).
...
*) The zip file may contain .jar files which are already present in the WEB-INF/lib
folder of your webapps.
Multiexcerpt | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||
The Swagger API explorer tool searches for the API at a path set in
When using one of Magnolia's preconfigured bundles running on localhost, set the property to 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
After setting the base path, restart Magnolia. Swagger is in Dev > REST Tools. |
Anchor | ||||
---|---|---|---|---|
|
In this section follows a step by step series of instructions to setup a Magnolia bundle which contains all REST modules inclusing magnolia-rest-tools
to use the swagger UI tools. The procedure is usng the Magnolia CLI.
Expand | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||
#1 Get the shell and choose a directory to work withOpen a shell and change to directory of your choice. In our example, we use the directory
#2 Downloading a bundle with CLI jumpstart
Jumpstart downloads and extracts the latest version of Jumpstart also sets the property When the execution of jumpstart is done, your directory looks like this:
We will need the #3 Adding the magnolia-rest tools to the bundleDownload the Rest tools bundle
~/dev/mgnl-rest-test-base/apache-tomcat/webapps/magnoliaAuthor/WEB-INF/lib . Some of the files may already be there, that's fine.#4 Start MagnoliaYou are ready to start Magnolia - actually the Tomcat server - for the first time. Go to our "root" directory ans start with the CLI command
Give Magnolia some time. On the first start up Magnolia installs some configurations for a bunch of modules, etc. pp. #5 Login on the author contextOpen your favorite browser, open the URL http://localhost:8080/magnoliaAuthor/ and login as user #6 Set the swagger base api pathIn order to properly use the swagger UI tools - which are used for development only - we must adapt one property in the configuration. On the UAdmin - open the Configuration app and open the node Open the folder This property is one of the rare one which requires a server restart to make the change effective. #7 Restart MagnoliaGo to the shell where you have started Magnolia. To stop the server - press No start it again:
|
Anchor | ||||
---|---|---|---|---|
|
To get started it is fine if you use the rest roles which come with the default setup of your preconfigured Magnolia bundle.
...
Anchor | ||||
---|---|---|---|---|
|
..
...
..