Hello,
We previously used the Jira XML export endpoint successfully:
/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=... This endpoint worked for months without issues and returned the same XML that Jira UI exports.
As of recently, the exact same endpoint and the exact same JQL now return errors, even though:
The JQL still works in the UI
The project and issues still exist
We are authenticated
UI XML export still works
Nothing changed on our side
The URL structure is identical
Question:
Has Atlassian removed or changed support for the XML export endpoint (jira.issueviews:searchrequest-xml) in Jira Cloud?
If so, what is the new supported way to programmatically export issues in XML format using JQL?
Hello @Emma Aghlamazyan
Are you 100% sure your organisation is using Jira CLOUD not Jira DATA CENTER? I've personally never heard of any such endpoint existing in Jira Cloud.
The ability for APIs to directly return Issue data in XML format is ancient technology as far as Jira is concerned and, if that endpoint did / does exist, it was probably just a legacy, undocumented, private, internal endpoint from the old Jira SERVER days that you were not supposed to be accessing directly, or it was used by one of the internal macros or gadgets and Atlassian have just gotten around to either removing it completely, or removing the ability for people to access it publicly. Such non-public API endpoints have always been subject to change without notice.
None of the existing public Jira Cloud REST API endpoints provide any support for searching and then returning Issues in XML format.
It is the endpoint used in the UI for the Export XML from the All Work page.
There are some use cases where people have included those endpoints in custom code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Trudy Claspill
I did have a look at the API path associated with that Issue view:
https://{{domain}}/si/jira.issueviews:issue-xml/{{isueKey}}/{{issueKey}}.xmland it does work, but only for a single issue and only in context of the browser session, using the auth cookie.
The OP said the API endpoint they using supported providing a JQL statement, which inferred it searched for and returned a set of Issues, and then also returned the contents of each of those Issues in XML format... and that's what I was saying I've never heard of.
@Emma Aghlamazyan given that the API for returning a single Issue's view in XML format still works, you could alter your process to do the following:
I remind you that you are 'hijacking' one of Jira's internal APIs that is supposed to be used only to construct the GUI interface. There is a very, very long history of those sort of non-public APIs suddenly changing or disappearing without warning, so you take all risk when building other functionality with them instead of the public REST APIs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I completely agree with your comments about the perils of relying on an internal API.
w.r.t. your point about the OP saying they used a JQL statement with the endpoint, if you go to the Search work items page and provide a JQL query you will see that the endpoint shown in the browser changes to include the jqlQuery parameter and the JQL statement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OH HANG ON. I just noticed @Trudy Claspill that you referenced the All Work page, not the individual Issue view page,
@Emma Aghlamazyan I have just worked out what you meant when you said "get xml of jira issues" and "programmatically export issues" I assumed you meant "programmatically export THE ISSUES THEMSELVES in XML", not a list of those Issues. That API endpoint you were accessing didn't return the content of each Issue in XML from a list of Issues, it returned just a list of those Issues, as displayed on the All Work page, in XML format.
That being the case, the advice I've given about using the Issue view API to get the XML 'inside' each Issue isn't valid.
As for the API that I now know we are all collectively on the same page about :-) , I just tried it directly and am getting errors saying the XSRF Security Token being missing.
So, I would guess that Atlassian have changed either:
So, in either case, if you try to use the API request directly, without that token, the request is refused and you get the error message. If that's the case, sorry, I can't think of any practical way to work around that.
I recommend that you completely alter your current process and do the following:
This process removes your dependency on an internal API and allows you to execute the process outside the context of a user's web browser session.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, thank you for all answers. Could you please suggest what to use?
I have tried this way also but getting another error
https://YOUR_DOMAIN.atlassian.net/rest/api/3/search?jql=...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi I got a solution, just changed password to new api token of jira and this endpoint works, you can use also
https://<domain>.atlassian.net/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project = ""AND status = Done AND resolved >= -5d ORDER BY resolved ASC, created DESC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Emma Aghlamazyan
Welcome to the Atlassian community.
What error(s) are you getting?
It appears that endpoint has also been used in Confluence Cloud, and a bug was noted there earlier this year. See if the information there helps you adjust your api call. The Description mentions that alt_token may need to be added.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.