Hi,
I am using REST API calls from Salesforce to pull information from JIRA. Is there a way I can get the same set of fields that the user sees while accessing JIRA issue as part of the REST response. Currently, the response sends me all fields related to the issue and showing that is not a good user experience.
JIRA end point => http://<<servername>>/rest/api/2/issue/<<issue#>>
Thanks.
Dear @CRM Support <-- nice name,
have you checked parameter "navigable":
By default, all (*all) fields are returned in this get-issue resource. Note: the default is different when doing a jql search -- the default there is just navigable fields (*navigable).
So long
Thomas
Hi Thomas,
Thanks for the response. Tried the following -
http://<<servername>>/rest/api/2/issue/A1234?fields=navigable .
This brings me back the following response -
{"expand": "renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations","id": "12345","self": "http://<<servername>>/rest/api/2/issue/12345","key": "A1234"}.
Also, tried the expand option with "renderedFields" and it doesn't change the response either.
Dear @CRM Support,
additionally to the 'fields' param you have to use the 'expand' param. API tries always to send as less as possible.
Which fields would you expect in the JSON response?
The get issue REST end point brings me back all the fields that is related to the issue. Instead I would like to get back a response that has the exact fields that the user sees when viewing the issue in JIRA.
I tried the following with no luck-
http://<<servername>>/rest/api/2/issue/A1234?fields=navigable&expand=renderedFields .
This brings me back the same response as before-
Is there a way I can get the same set of fields that the user sees while accessing JIRA issue as part of the REST response.
this is the default behaviour. All fields present on the view screen are sent. You need to parse the JSON and select only the fields you need.
You can also specify a comma separated list of fields, if oyu only wish to get a few fields.
Dear @Danyal Iqbal,
you can read in the upper reply of CRM Support, that it isn't the case, otherwise the whole question would be obsolete.
Please post only information that will lead to solve the questioners issue.
Hmmm. I was under the impression that REST obeys the same rules that the UI obeys, which also explains why a field won't appear if you remove it from the screen - it's not there in the UI, so it's not there in REST.
Looks like I am expecting too much from Jira. I will recheck the behaviour and report:)
It looks like you're new here. Sign in or register to get started.