Expose content fragments to Adobe IO runtime project | Community
Skip to main content
Level 7
January 23, 2025
Solved

Expose content fragments to Adobe IO runtime project

  • January 23, 2025
  • 1 reply
  • 768 views

Hello Team,

 

My application is hosted on AEM as cloud service. For some functionality, I have created Adobe IO runtime project. Now, I want to consume content fragments from my Adobe IO runtime project.

Is there any way to consume ? even considering caching feature as well?

 

cc @arunpatidar  @aanchal-sikka @amanath_ullah  @amitvishwakarma  @sarav_prakash 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Shashi_Mulugu

If you already have fixed paths of your content fragments, and they are very less likely to change or add new ones, you don't need to depend on events, you can fire aem api calls(rest or graphql) with those fixed CFs

 

But say if you have a folder with lot of sunflowers and cfs at each level, they subscribe to events is best option where in Adobe IO Runtime you can receive event and then store CFs paths and use it for API

1 reply

Shashi_Mulugu
Community Advisor
Community Advisor
January 23, 2025

@mahesh_gunaje To pull content from AEM into Adobe I/O Runtime, you can leverage the AEM Events feature, which allows you to send content updates or changes as events that can be captured by an Adobe I/O Runtime action, effectively pulling the latest content from AEM into your runtime environment whenever a modification occurs; this is typically achieved by setting up event subscriptions in the Adobe Developer Console and configuring a custom runtime action to process the received AEM events and retrieve the relevant content data. 

 

As adobe io runtime is Javascript based on node.js runtime engine,  you either pull content fragments via REST or GRAPHQL. Caching of this content will be maintained at dispatcher level and flushed upon replication.

Level 7
January 23, 2025

Thanks @shashi_mulugu  for your quick response. Much appreciated.

 

In my case,

1: I have created few content fragments. (Modification might be very very rare). Now, consider, I have created 10 content fragments.

2: After few days, from my Adobe IO runtime project, i wanted to consume the content fragment. 

In this case,  AEM events will help?

 

Regards

Mahesh

 

Shashi_Mulugu
Community Advisor
Shashi_MuluguCommunity AdvisorAccepted solution
Community Advisor
January 23, 2025

If you already have fixed paths of your content fragments, and they are very less likely to change or add new ones, you don't need to depend on events, you can fire aem api calls(rest or graphql) with those fixed CFs

 

But say if you have a folder with lot of sunflowers and cfs at each level, they subscribe to events is best option where in Adobe IO Runtime you can receive event and then store CFs paths and use it for API