Search code examples
aemrestful-urljcr

Exposing CQ content as a restful webservice


We are facing a scenario where we need to to expose our CQ content (as XML or JSON) to serve as an integration point. Any pointers to achieve this a would be helpful.

San


Solution

  • everything is content! you can get json-output of every node simply but you probably want to implement a custom servlet to server specific requirements i guess. try this:

    http://192.168.56.56:4503/content/geometrixx-outdoors/en/men/coats.infinity.json http://192.168.56.56:4503/content/geometrixx-outdoors/en/men/coats.3.json

    Take a look at the sling docs and learn how sling is resolving resources (sling cheat sheet)