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: 

delete rest api returns "Cannot find space with key"

Bart Jol
December 20, 2018

Hi,

 

First an intro how we got where we are now:
We have imported a space from another confluence instance, which happend tto have the same space key as one already existing. We've exported the space, renamed the spacekey in the entities.xml and exportDescriptor.properties files and imported the space. This results in a space, but misses the content.
We did not do the search and replace through the whole tree, but probably to read that manual better (own mistake).

Now, however, I want to cleanup the imported empty spaces, I can find them in the space directory, but when I select that space, I get a Page not found and cannot edit the space itself.
So I tried to delete the space via the rest API via a DELETE query.

A get query for https://confluence.mydomain.com/rest/api/space/SPACEKEY works and returns space info, but when I do a delete query it returns "Cannot find space with key".

Also, the content query for the space returns space not found. The homepage however, seems to exist.
Any ideas how I can remove the empty space without diving into the database?

 

Kind regards
Bart

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Bart Jol
December 20, 2018

Thanks!

it is an administrator user. Tried to look at the permissions for the space, but that give me the Page not found page.

Made a private testspace with another user and was able to delete that space with the API, so it seems the rights are sufficient.

0 votes
Vasiliy Zverev
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 Champions.
December 20, 2018

Dear Bart, hi!

It could be some permission issue. Make sure, that user, used for REST has delete space permission.

Best regards,

Vasiliy

TAGS
AUG Leaders

Atlassian Community Events