1

We have a Sitecore SXA website. Sitecore version is 9.0.1, SXA version is 1.7

We have to share the website content to third party in JSON format using custom API. So third party will consume this API and display website content using their own stylings. Can you please let me know the ways to achieve this requirement?

3

There are few options:

  1. Use Sitecore RESTful API. It doesn't matter SXA or not, but you will be able to get items in JSON format.

  2. Use JSON device to get page data. SXA allows you to model your data in JSON. You are able to use special JSON renderings to model data in a way that you need. But even if your website uses default renderings, you can use the SXA Layout Service to return placeholders and data source items in JSON out of the box.

2
  • this has helped me to start. While exploring the data in JSON model noticed that for list types(eg: FileList, Tabs, Gallery etc) the child items were not showing in JSON. Explanation: For example lets take File List component. In JSON it's showing as- '{"name":"File List","path":"/main/container-13","contents":{}}' JSON is not showing the child items of File List component datasource. Similarly for Gallery component. JSON is showing only Gallery theme but not the 'Image' details, which we will select to show in Gallery component. Can you please give some insights on this?
    – Thanoj
    Jul 9 at 5:58
  • @Thanoj I think if you need children then you need to model your data manually and not just only use JSON layout, for example like here: sitecore.stackexchange.com/questions/13348/…
    – Anton
    Jul 9 at 10:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.