Store the user created content in AEM cloud service in author or publish service for an API response? | Community
Skip to main content
pm31415
Level 2
March 12, 2025
Question

Store the user created content in AEM cloud service in author or publish service for an API response?

  • March 12, 2025
  • 3 replies
  • 862 views

I'm designing an application (few pages) for users to create some structured content which will be exposed to a third party application as an API providing the data as json response. I'm using AEM cloud service and I have to store the data in AEM itself (jcr or dam), I'm hesitant on storing the content in publish service as creating the content in the jcr isn't supported and also doesn't seem like a good CMS design considering the content not managed through author service. 

 

I'm inclining towards creating the pages in author service and disabling the the authoring mode and storing the data as json property in the jcr and publishing for the API. Not the ideal solution but if anyone has some ideas or suggestions please share. 

 

3 replies

Adobe Employee
March 12, 2025

@pm31415 I would recommend manage the page content through appropriate component authoring and write an exporter which can return the required JSON for the page. Now this JSON can be cached in the dispatcher and CDN based on the Cache-Control and /cache configurations in dispatcher. This way you do not need to store the JSON in JCR and is not a best practice.

pm31415
pm31415Author
Level 2
March 12, 2025

That's one of the options we are thiking, the authors will be adding the list of attendees and other fields and save/edit those entries on regular basis, there are few pages with similar related fields that needs to be stored in jcr as well. Authoring will have to be done in a preview mode (wcmmode=disabled) which isn't the ideal way, I believe there are some other options available to improve the authoring experience for pages like this in author instance.

Adobe Employee
March 12, 2025

@pm31415 What do you mean -

Authoring will have to be done in a preview mode (wcmmode=disabled) which isn't the ideal way

 

Content authoring is done in Author in Edit mode and is the only way to author the content on a page. 

Your solution should be optimal enough for ease of content changes, performant enough for the scalability and easy governance. So the approach I mentioned above.

daniel-strmecki
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
March 12, 2025

Hi @pm31415,

I would very much advise against the approach of storing user-generated data in AEM/JCR. A proper solution for your use-case would be to set up an external database and serverless APIs in AWS/Azure. If you don't have a lot of data and you can clean it up periodically, then it won't be expensive at all. Since your client is already paying for the AEM license, this cost should be negligible for them, and it would enable you to create a proper, future-proof solution.

 

Good luck,

Daniel

kautuk_sahni
Community Manager
Community Manager
July 14, 2025

@pm31415 Just checking in — were you able to resolve your issue?
We’d love to hear how things worked out. If the suggestions above helped, marking a response as correct can guide others with similar questions. And if you found another solution, feel free to share it — your insights could really benefit the community. Thanks again for being part of the conversation!

Kautuk Sahni