Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Creating Content Fragments programmatically - AEM Headless (React)

Avatar

Level 2

Is there a current best practice to create content fragments programmatically AEM Headless (using React)?

Would it be through the Assets API? Anything to take into account?

 

i assume it would be similar to here:

mvotos_0-1707154439272.png

https://experienceleague.adobe.com/docs/experience-manager-65/content/assets/extending/assets-api-co...

 

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi, 


Correct, you can use the Assets API, here is the swagger with some clarifications; https://developer.adobe.com/experience-manager/reference-materials/6-5/assets-api-content-fragments/.... The only thing you need to make sure is to map correctly the ":type", you could first try in something like postman and then just mimic the same request in React. It should not be a problem

Hope this helps



Esteban Bustamante

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi, 


Correct, you can use the Assets API, here is the swagger with some clarifications; https://developer.adobe.com/experience-manager/reference-materials/6-5/assets-api-content-fragments/.... The only thing you need to make sure is to map correctly the ":type", you could first try in something like postman and then just mimic the same request in React. It should not be a problem

Hope this helps



Esteban Bustamante