Magnolia 5.6 reached end of life on June 25, 2020. This branch is no longer supported, see End-of-life policy.
Use the delivery API to obtain JCR data as JSON. This REST resource is customizable and flexible to use.
Two versions of the delivery endpoint exist. Both versions can resolve references to nodes of other JCR workspaces. But only version 2 can deliver localized content.
Version 2 was introduced with Magnolia REST 2.1 and provides more flexibility. You can use it to define multiple endpoint configurations, deliver localized content and resolve references to nodes of other workspaces including assets and asset renditions.
Version 1 was introduced with Magnolia REST 2.0. You can configure a single endpoint for your project.
Version 1 is deprecated, but you can still use it if required. We recommend you use the newer version 2.
7 Comments
Pierre Sandrin
Hello. Is there a way to include renditions of an image? Jsonfn has this great method binaryLinkRendition(). Is something like that possible with this API?
Christoph Meier
Hi Pierre
Very good question.
Short answer: Not yet. But work is in progress.
Fadi Wissa
Hello, not sure if this is the same question as Pierre Sandrin's.
For the stories app, the lead visual is delivered as a JSON object attribute as follows:
"imagesource": "jcr:2686914d-48e2-49a3-8d5e-846cb186f260" (JCR UUID reference)
Assuming a headless use-case, how can one resolve such UUID into an image src?
Christoph Meier
Hi Fadi
REST-2.1 will contain improvements for node resolving - also resolving DAM nodes and even providing image renditions. See
MGNLREST-130 - Getting issue details... STATUS , MGNLREST-151 - Getting issue details... STATUS
There is a high chance, that we will release REST-2.1 as soon as all its tickets are closed (independently from other modules).
kind regards,
Christoph
Fadi Wissa
Christoph Meier, thanks for the usual Magnolia transparency ... a key differentiator of your platform
This will be a great enhancement.
Christoph Meier
Hi Fadi Wissa and Pierre Sandrin
Note that we have released REST 2.1 today.
Now you can resolve assets and asset renditions.
See Resolving references with the delivery endpoint.
You may also want to check Requesting localized content with the delivery endpoint.
To use the new features, you should use Delivery endpoint API v2.
Have fun!
Cheers,
Christoph
Fadi Wissa
Thank you Christoph Meier