How can we archive and restore archived Confluence content via REST API?

Crystal Pang July 23, 2024


How we can archive Confluence content like archive content in Space using the REST API? In Space, I noticed we can leave a note when archiving the Space content.
Screenshot 2024-07-24 at 3.05.03 PM.png



Related to the question in Is there a way to restore archived page via REST API?


Screenshot 2024-07-24 at 2.14.11 PM.png

 

Saw in the PUT Update Page REST API, it can change 'deleted' Confluence Page's status to 'current'. Is there any REST API or Graphql mutation method that able to change archived content (page, database, smartlink, whiteboard) status to 'current'?

2 answers

1 vote
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 24, 2024

You can archive pages although it is experimental: https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content/#api-wiki-rest-api-content-archive-post

I don't know about "restore", but maybe manipulating the page's status (or state) field can work (less likely).

 

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 24, 2024

It seems indeed you can and looks that I missed that info. I was searching on API v2 instead of 1. Nice catch Aron!

Like Aron Gombas _Midori_ likes this
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 25, 2024

@Alex Koxaras _Relational_ Note that API v2 is somewhat limited compared to v1, even if v1 is already considered "legacy".

0 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 24, 2024

Hi @Crystal Pang and welcome to the community,

Not to my knowledge. If you could archive or restore archived pages, that API would be in there somewhere.

Crystal Pang July 24, 2024

@Alex Koxaras _Relational_ based on the documentation, no API can restore an Archived page.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 24, 2024

Exactly

Crystal Pang July 24, 2024

Is there any other method to restore archive pages like using GraphQL?

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 24, 2024
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 24, 2024
Crystal Pang July 25, 2024

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events