Confluence REST API - getting a list of pages with a short excerpt or abstract for any page

Hello,

the tile says almost all. I would like to include a short excerpt of the text when listing pages (children of one page).

If that is not possible without a recursion (to query any page in the list to get a part of the content – say the first period), another possible way could be stocking metadata properties with a specially crafted test. Would this be accessible while reading the list?

1 answer

1 vote
Aleksandr Zuevich Community Champion Nov 08, 2017

Hi, I think short excerpt is not possible. By the way look at metadata properties:

/wiki/rest/api/content?expand=metadata.properties

Metadata.properties cannot provide a proper solution, you are right, but what about content.properties?

Could it be feasible to add a content property with an excerpt of the page (and maybe another with the URL of an image thumbnail) and retrieve it anytime I get a list of pages?

Aleksandr Zuevich Community Champion Nov 11, 2017

If you preliminarily set your own property to each page using POST /rest/api/content/{pageId}/property e.g. {key: "excerpt", value: "a short excerpt of the text"} then you can get it using GET /wiki/rest/api/content?expand=metadata.properties.excerpt

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

1,132 views 22 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you