Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Content API

Avatar

Level 4

Hi,

Can anyone tell how can AEM's content be accessible through Content API? Can anyone tell what is content API?

6 Replies

Avatar

Administrator

Hi 

Can you please let me know which documentation are you following? I am not sure if we are on same page. I am not sure what  content API are you talking about here?

If your aim is to retrieve content from AEM repository then please have a look at this link:- https://helpx.adobe.com/experience-manager/using/using-sling-apis.html

~kautuk

Avatar

Level 4

Hi,

I want to get page's information as json response using sightly. How can I achieve that?

Avatar

Administrator

Hi 

It depends, what type of information are you looking for.

Some default ways to get Json Information are:

1. http://localhost:4502/libs/wcm/core/content/pageinfo.json?path=<path> like http://localhost:4502/libs/wcm/core/content/pageinfo.json?path=/content/geometrixx-outdoors/en.html

2. http://localhost:4502/cf#/content/geometrixx-outdoors/en.1.json

3.http://localhost:4502/content/geometrixx/en/jcr:content/mycomponentinstance.json

If you want some custom information to be returned as a Json, then you need to write custom component/service.

Reference link:- http://www.nateyolles.com/blog/2015/12/converting-aem-sling-resources-to-json

// Converting AEM/Sling Resources to JSON

Helpx :- https://helpx.adobe.com/experience-manager/using/using-jsonwriter-objects-display-cq.html

//sing JSONWriter objects to display Adobe Experience Manager data

I hope this would help you.

~kautuk

Avatar

Level 4

How to get page information, like the dialog and component included inside the page in json format, using sightly??

Avatar

Level 4

Is there a service or java class using sightly that converts page information, like the dialog and component included inside the page into json format??

  •  

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now