Hello experts,
I am ingesting issues data using Jira Rest API, that is being requested from a python code.
I am using the search API to bring the data I need:
https://mycompanyjira.atlassian.net/rest/api/2/search
When I assembly my 'get' request without the "expand=changelog", everything works OK. This is the jql I used to connect (with no changelog):
querystring = {"jql": "project=" + project_name, "startAt": startPoint}
However, trying to get the changelog, I get the following error back from the API:
"errorMessages": ["Field 'expand' does not exist or you do not have permission to view it."]
The jql I used to connect using the change log is the following:
querystring = {"jql": "project=" + project_name + "&expand=changelog", "startAt": startPoint}
I am using HTTP GET method to request:
response = requests.get(url=url, headers=headers, params=querystring)
And the final URL, before requesting, looks like this:
Do you think it can be a permission issue? I mean, does Jira require specific authorization to bring changelog? Or am I making any mistake assembling the request?
Thanks in advance,
Nicolau
Hi @Nicolau Rodrigues ,
In your final url, expand is part of jql. Instead it must be a request query parameter as below.
https://mycompanyjira.atlassian.net/rest/api/2/search?jql=project%3PROJECTKEY&startAt=0&expand=changelog
On NodeJs you can just add array with expand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did not tested it but as the error says "expand" not supported in the "jql search" API endpoint.
I do know that "expand" work with "issue" API endpoint.
That means, get list of your issues with
https://mycompanyjira.atlassian.net/rest/api/2/search
Than iterate the list of issues and for each issue run:
/rest/api/2/issue/{issueIdOrKey}?expand=changelog
and that will return you for each issue, all its data with the changelog as you wanted
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.