Forums

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

Export Archived Issues REST API call

Mykenna Cepek
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.
April 9, 2025

As mentioned in this article from Aug 2023, there are some new Jira Cloud REST API calls related to archiving/archived issues.

As of this post, there are four experimental Jira v3 REST API endpoints related specifically to archived issues (the article above links to v2 documentation).

My question is about the Export Archived Issues endpoint. It seems to return poorly implemented results, and I'm looking for validation that this should be considered a bug and reported.

According to the REST API documentation link above, the response should look like:

1.png

What I'm getting looks like this:

2.png

where I have inserted newlines and indentation to make it readable. The quoted "payload" value is actually returned in a single line.

I feel strongly that the payload content should be actual JSON, not quoted (and nested!) JSON text with exhaustively escaped quotes. Here's what I believe the response should be:

3.png  

Amazing things can be accomplished using Jira REST APIs, due to the wonders of JSON-formatted data (hierarchical) data.

This API endpoint could be super useful for an organization policy to manage archived issues -- but not in it's current form. Your thoughts?

1 answer

0 votes
ELFAPP Technologies
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.
April 9, 2025

What language are you using to make your API call? It seems you're using cURL and getting strings rather than JSON.

Mykenna Cepek
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.
April 9, 2025

I'm using curl from the command line. This one REST endpoint is the ONLY time I've seen bizarre "JSON" like this. I've called many other Jira endpoints that provide well formatted JSON.

Try it yourself! You'll see it too:

curl --request PUT -k --user you@some.org:personalAccessToken \
-H 'Content-Type: application/json' -H 'Accept: application/json' \
--data '{ "projects": [ "SAMP" ] }' --no-progress-meter --url \
https://yours.atlassian.net/rest/api/latest/issues/archive/export

Of course change the project list from SAMP to a project key where you have at least one archived issue, and fix the authentication and URL.

Suggest an answer

Log in or Sign up to answer