We are exploring the option of content migration from CQ5 to Headless CMS ie Contentful. I would like to build the tool which can:
1) Inspect the components in AEM / CQ5
2) Identify their schema
3) Create a similar schema in Contentful
4) Then migrate the AEM content into Contentful
Does CQ5 provide any API to export the Component as XML or JSON? I can see Json export for component but I am not sure if this is there for CQ5? Any reference would be of great help.
You can make the page rqeuest with infinity.json and it will give the complete content structure in JSON format in AEM.
There are several ways to export content from AEM. Let me list some of them:
That being said, in my experience migrating from one CMS to another usually comes with some kind of transformation and restructuring of existing content. Sometimes it is even easier - and can support certain business goals - to create new content from scratch instead of migrating the old. Personally, I've never seen a 1:1 migration of content between different content management systems. I don't have a background on Contentful but for many systems you will be facing a completely different approach to content hierarchy and/or storage and it may be a very tough job to do a purely technical migration.
Hope that helps!