The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

Get News Objects from Confluence via REST Api

Fabian Zeller
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 7, 2019

Is it possible to get the News Content visible on the Front Page in Confluence?
Alternatively is it possible to get blogposts filtered by a label on the Content?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 8, 2019

Hello Fabian and welcome to the Community!

When accessing Confluence, you will land on the dashboard page. The landing page can be changed to another landing page which you may fully customize to display whatever content you see fit. To change the landing page within confluence, please follow these steps:

To use a page as your site home page:

  1. Go to cog > General Configuration > Further Configuration.
  2. Choose Edit.
  3. Select a space from the Site Homepage dropdown menu.
    When users log in or click the site logo, Confluence will go to the home page of the space you choose here.
  4. Choose Save.

Source documentation: Configuring the Site Home Page.

As far as getting content from Confluence such as blog posts and only displaying content with a set label, your ideal endpoint to use would be GET /rest/api/content/search. This endpoint allows you to use CQL to search and apply label filters to get the exact contact you desire. To find out more about Confluence and CQL, please see Advanced Searching using CQL. An example API call for this would be as follows:

http://localhost:8080/confluence/rest/api/content/search?cql=type=blogpost%20AND%20label=SOMETHING&expand=storage

I hope this proves helpful and provides some guidance on moving forward.

Regards,
Stephen Sifers

Fabian Zeller
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 11, 2019

Thanks for the quick answer! The label parameter in the query was what I searched for thank you.

Like • Stephen Sifers likes this
TAGS
AUG Leaders

Atlassian Community Events