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:
What I'm getting looks like this:
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:
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?
What language are you using to make your API call? It seems you're using cURL and getting strings rather than JSON.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.