Forums

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

How to recover a project that was deleted via the API?

Kyle Wright November 3, 2022

Via the Jira Cloud API v2, I deleted an important project. I need to recover this project. When the project was deleted, the `enableUndo` property wasn't passed so it defaulted to false.

 

What are my options? And how can I recover this project?

3 answers

1 vote
Kyle Wright November 3, 2022

For the record, `enableUndo` should default to true since it's the less harmful option.

0 votes
Joseph Chung Yin
Community Champion
November 3, 2022

@Kyle Wright -

In general Jira/JSM, when an object is deleted, it is gone and cannot be restored.  This is also true if the deletion action was performed via the UI or via REST APIs.  It is always recommended to review the delete action carefully before the actual execution.

For project, (for premium plan or above subscription), if the project was "moved to trash" by the system admins via the UI (see below)

2022-11-03_18-05-41.png

then the admin can restore those projects from trash areas.  All deleted (trashed) projects are kept for 60 days.  Please refer to the following page on project deletion and restore: - https://support.atlassian.com/jira-cloud-administration/docs/trash-for-jira-cloud-projects/

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Infrastructure Applications Team

Viasat Inc.

Kyle Wright November 4, 2022

Thanks for the response Joseph.

What I find difficult to understand is that in the UI, I'm not given an option to immediately delete a project. First, I'd have to move it to the trash bin. Then, I could permanently delete it from the trash bin. If a project was mistakingly moved to the trash, it can easily be recovered. Steps like this hopefully prevent people from regrettably deleting projects permanently.

Via the API, however, these preventative measures don't exist. The `enableUndo` field is optional. Not only is it optional, it defaults to the most catastrophic option in the case that it's not provided. I know, I should have been more careful with the API and that's on me, but I'd also hope that there'd be some type of safeguard in place to prevent the terrible outcome that I'm currently facing. Why not default `enableUndo` to true or require the parameter?

Any help from Atlassian to recover this project, as it is absolutely crucial to our organization, would be extremely appreciated.

Also, adding a safeguard to the API endpoint should be implemented.

Joseph Chung Yin
Community Champion
November 4, 2022

@Kyle Wright -

You will need to contact Atlassian Support for further assistance (https://support.atlassian.com).  I agreed with you that Atlassian should enable the 'enableUndo' idea with REST APIs usages by default.

Best, Joseph

0 votes
Hamza Chundrigar
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.
November 3, 2022

Hi @Kyle Wright 

Have you tried looking in the trash? Projects along with their issues, components, attachments, and versions will be available in trash for 60 days, after which they will be permanently deleted. 

You should be able to recover your project from there.

https://support.atlassian.com/jira-cloud-administration/docs/restore-a-project-from-trash/

Kyle Wright November 3, 2022

Since the `enableUndo` field wasn't provided, it defaulted to false which means it's not in the trash.

Hamza Chundrigar
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.
November 3, 2022

Gotcha! Sorry Kyle, I misunderstood so that’s my bad.

You could try contacting Atlassian support but I’m afraid this project cannot be recovered since it has been permanently deleted.

Suggest an answer

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

Atlassian Community Events