How can I export jira archived issue csv file using Java code

31 Views Asked by At

I need the list of archived issues list, we have implemented a method with the scriptrunner but the issues from the project that are archived are not picked up, so we are looking for a method that would pick up all the archived issueKeys (despite if the project is archived or not ) else get the list of all the project/or just the archived projects.

Tried https://adtjira.accenture.com/rest/api/2/project?includeArchived=true.and it does not return the archived project.

Another solution is that we can programmatically download the archived issue CSV file and process the archived issue keys.

It would be great if anyone could help me with any of the details. Thanks in Advance.

Have tried exporting the CSV file manually from the UI and confirmed that all the issueKeys irrespective of whether the project is archived or not are present in the file.

1

There are 1 best solutions below

2
Shachar297 On

Sure thing, the archive export API endpoint is https://your-domain.atlassian.net/rest/api/2/issues/archive/export the request method supposed to be PUT the request data supposed to be something like

{
  "issueTypes": [
    "10001",
    "10002"
  ],
  "projects": [
    "FOO",
    "BAR"
  ]
}

I'm not a Java developer so i can not help you with that, but you can check out this documentation

In the documentation page you will be able to see how this would be implemented in Java.