Forums

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

Retrieve trashed spaces via REST API

Michael Wohlgemuth
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.
March 27, 2025

Hello community. 

I have an automation (python) creating spaces for users when they request them via service desk. Works as intended, with only one single issue: 

If a space is in trash and not yet deleted, the key of that space is blocked for new space creations. That is quite expected. Yet, i find no way to validate a given space key before creating the space to report it as unavailable before POSTing the creation request? I'm looking at the documentation and both REST API versions, but i cannot find a solution. 

So, TL;DR: Anyone know a way via REST to retrieve spacekeys of spaces currently in the trash?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

5 votes
Answer accepted
Mikael Sandberg
Community Champion
March 27, 2025

Unfortunately, currently there is no API call that can get you spaces in trash, Get Spaces can only get current and archived spaces.

Michael Wohlgemuth
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.
March 27, 2025

I was afraid that this would be the answer. Thank you for providing another set of eyes to confirm :)

Like Mikael Sandberg likes this
0 votes
John Price
Contributor
November 18, 2025

I found https://jira.atlassian.com/browse/CONFCLOUD-80479 and voted and commented.

John Price
Contributor
November 18, 2025

Also, if it helps anyone, DELETE calls to trashed spaces work even though GET calls don't. So you can download the spaces from Space Reports, grab the trashed ones, and delete via API.

kh_jbau
Moderator
November 18, 2025

@John Price, this topic has been locked because the thread has become a bit dated. If you’d like to keep the conversation going or have additional questions, we encourage you to start a new topic. You can read more about necro posting (“raising threads from the dead”) in our Community Guidelines.

Thanks!