dom
#1
I have found documentation on how to archive confluence spaces using user interface here:
https://confluence.atlassian.com/confcloud/archive-a-space-724764817.html#ArchiveaSpace-Archiveaspace
Is there a way to do the same, i.e. archive an existing space, using confluence REST api?
I couldn’t find anything to achieve that here:
https://docs.atlassian.com/confluence/REST/latest
Currently only the space name, description and homepage can be updated.
It doesn’t appear possible at this time. The status field (set to ‘current’) is what you’d like to set.
1 Like
Hello. Is anything changed for this item? CC: @dom, @sfbehnke.
dom
#4
Not to my knowledge… but to be fair, I have not tried in 2+ years 
I found this old user community post which answers that it is possible https://community.atlassian.com/t5/Confluence-questions/Archive-space-for-inactive-users-through-REST-API/qaq-p/1091607
curl --request PUT
–url ‘https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}’
–user ‘email@example.com:’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{“status”: “archived”}’
If it’s a personal space you’ll need an extra property "type": "personal"
:
curl -v --request PUT
–url 'https://instancename.atlassian.net/wiki/rest/api/space/~12345
–user 'username@domain.com:APITOKEN
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{“type”: “personal”, “status": “archived”}’