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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

663 views 21 11
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