Hi community, recently I came across an issue on Jira. I am actually writing automation codes which create Jira Projects, issues, custom fields and associate them correctly through a project setup configuration file that I have created.
After all the configuration is done, I run multiple tests on them and finally I want to delete all of them.
I went through the API documentation and found REST APIs that delete all of them, but the projects move to Trash. So, the next time when I run the tests, it looks for the projects through a GET call and gets a success message since the API calls consider the projects in the Trash as existing only. But then when I try to associate the issues, custom fields, etc to the project, I receive an error.
So, how can I delete the Projects from Jira and then from the Trash through REST API?