Forums

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

Confluence : Cant get Archived pages in API calls

Hilton Riddex
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 10, 2022

I have been using the API to successfully capture all the pages in a space using:

/wiki/rest/api/space/ESTTS/content

2022-02-10Atlassian.png

At the bottom of the page, I can click on the Archived Pages link and see the archived pages. I have also requested to be an administrator of this Space.

I cannot get just a list of Archived pages using the API, I have tried all variations of calls, CQL, read through the documentation. It all contains how to Archive BUT not pull the pages that are Archived.

I even thought I could poll the API for all pages and filter out the Archived... However, even with this, I don't see the elements I need to extract.

I have added all kind of recommended flags from other forums to the end of the calling URL and nothing works. 

Any advice would be greatly appreciated. 

Thanks,

Hilton

 

1 answer

1 accepted

1 vote
Answer accepted
Vishwas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 10, 2022

Hey @Hilton Riddex 

Welcome to Atlassian Community !!

Did you try this GET /wiki/rest/api/content?status=archived

This worked for me:

curl -D- \
-u username:<your_api_token> \
-X GET \
-H "Content-Type: application/json" \
https://<your-domain.atlassian.net>/wiki/rest/api/content?status=archived

 

Regards,

Vishwas

Hilton Riddex
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 10, 2022

Hi Vishwas.

I am running some tests now. I have also created a fresh API key for this. I have paginated out the data and looked for the articles. I can see them. Thank you. 

I will need to save all the data down and filter out the tickets relevant to the space I am monitoring. 

 

Legend! 

Thanks,

Hilton

Like Vishwas likes this
billga
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!
September 23, 2022

@Vishwas Thanks for your answer, that works for me, too but ... it returns everything that's in my Confluence instance. I tried to use the form:

/wiki/rest/api/space/XYZ/content?status=archived

but that only returned active page/blogpost in space XYZ. 

How can I scope the call to a single space? 

Suggest an answer

Log in or Sign up to answer