Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

PositiveFor instance Firefox displays JSON and XML in a very well readable format. 
Negative

A browser provides only limited control to tailor a request without further add-ons. Requests are sent as 

Mgnl get
 and you cannot add more request headers out of the box.

Tips

If you want to test on REST resources via 

Mgnl get
, which requires authetication (to get assigned roles not provided to anonymous user - login at Magnolia first, open a new tab on the same window (using the same session) and then requesting the REST resource.

Upgrade the browser with add-ons to extend its possibilities to controll the request.


 

cURL

cURL is a command line tool. It can be used on most of the well known operating systems. In this tutorial we will often test REST request via cURL.

...

If you have not installed magnolia-rest-tools with the swagger UI tools, skip this section, or see above about ho to enable the swagger tools.

Positive

Seamless integrated into the Magnolia UAdmin. Comfortable to use form based interface.

Negative

The endpoints require specific annotations to make them appear on the swagger UI tools. Delivery endpoint is not annotated and will not appear on the swagger tools. REST request is sent by the user which logged into Magnolia; cumbersome to test with different users.

Starting the swagger tools

Go to Dev > REST Tools.

Multiexcerpt
MultiExcerptNameswagger-start

When you open the the Magnolia REST Tools app, you should see something similar to this screen: 

Image Added

The Swagger UI lists the bundled endpoints which already have Swagger annotations. These are the endpoints from magnolia-rest-services module (propertiesv1, commandsv2, nodesv1) and one from the cache-browser-app (cachev1).