Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,366,452
Community Members
 
Community Events
168
Community Groups

Using API to get page content by label

I want to extract content from a Confluence Cloud space, by label, so it can be re-used in another website elsewhere. Can that be done via the API?

1 answer

1 accepted

2 votes
Answer accepted

Hello Gavin and welcome to the Community!

The simplest way to access Confluence pages by label would be to use the endpoint called “Search Content by CQL”. More on this endpoint may be found at GET /wiki/rest/api/content/search.

This endpoint will allow you to search using CQL with your API call. This allows you to filter based on the anything available within the CQL functions. More on CQL may be found at Advanced searching using CQL.

A sample of how this would look is as follows:

http://confluence.server.com/rest/api/content/search?cql=type=page%20AND%20label=SOMETHING

I hope this proves helpful in your ability to find content by label within Confluence.

Regards,
Stephen Sifers  

The sample url above did not work for me. I had to include wiki in the url for it to work.

This worked for me 

http://confluence.server.com/wiki/rest/api/content/search?cql=type=page%20AND%20label=SOMETHING

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events