Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Content as a service || CAAS

anupamm96651300
Level 2
Level 2

Is there a way to get a components content exposed to 3rd party app without using Content fragments or Experience Fragments. i.e I want my component contents json exposed.Is it possible.

5 Replies
Arun_Patidar
Community Advisor
Community Advisor

Hi,

You can but you need to create a page or XF or CF for author to enter content for component.

then you can access like /content/<page-location>/jcr:content/<component placed location>.json

e.g. /content/mySite/en/jcr:content/ifooter/footer.infinity.json

Not sure if it is that what you looking for?

Thanks

Arun

anupamm96651300
Level 2
Level 2

Hi Arun!

Thanks for quick update. Actually i want make use of a AEM Content as a service feature of AEM 6.3 to send my content to a non-AEM Platform.

kamrank10387456
Level 2
Level 2

Hi anupamm96651300​,

It doesn't look like that's possible!  You cannot expose a Content Fragment (CF) via Content As A Service (CAAS) directly, you need to use a custom Content Fragment component as a proxy.  This is because CAAS uses the Sling Model Exporter functionality and a Sling Model can only be binded to a component with a "sling:resourceType" property.  Unfortunately Content Fragment Models in the DAM do not have that property and so a Page (normal or Experience Fragment page) is required so that you can add your custom Content Fragment component on it that then in turn links to your Content Fragment Model in the DAM.  Your Sling Model then binds to the custom Content Fragment component rather than the Content Fragment Model itself.

TBH, it's all a bit fake... Adobe are just making a big deal of Sling Model Exporter and marketing it as a CAAS / headless CMS feature.

yochaubs2012
Level 1
Level 1

Hi @anupamm96651300  You should use Sling Model Jackson exporter. You just need to annotate model class to expose in JSON format.

@Exporter(name = ExporterConstants.SLING_MODEL_EXPORTER_NAME, extensions = ExporterConstants.SLING_MODEL_EXTENSION)

AEM can also be used in headless but you would need to create content fragment for each content and use HTTP Asset API to export content in json format.