As of now i am able to get the summary, description from my jql as follows:
https://companydomain/rest/api/2/issue/Key?fields=assignee,description,summary.
Now i need QA name and how to get it.I did not find any documentation in the fields also to get the QA name.Please help me.
This REST call is technically not using JQL yet. It's just a call to a specific single issue to return these specific system fields. JQL is used for searching among Jira issues. It's a small distinction to make, but I just wanted to clarify that part first.
In the case of wanting to return specific custom fields when querying an issuekey, you will need to specify that field id when using this REST endpoint.
I can see how this would be difficult to do, since calling that endpoint without specifying fields, will in fact return all the fields on that issue, but in that case it does not tell you the custom field id value. To find that, you can actually make a GET call to the api/2/field first. This returns a list of all the fields, but in that data, it also tells you the custom field value such as:
{
"id": "customfield_10200",
"name": "text1",
"custom": true,
"orderable": true,
"navigable": true,
"searchable": true,
"clauseNames": [
"cf[10200]",
"text1"
],
"schema": {
"type": "string",
"custom": "com.atlassian.jira.plugin.system.customfieldtypes:textfield",
"customId": 10200
}
In my test case, I have a custom field called 'text1', in turn this has an id of 10200. With this information you can then return to your original call and specify the field id, such as:
/rest/api/2/issue/Key?fields=assignee,description,summary,customfield_10200
If you were using JQL, you would instead being using an endpoint such as /rest/api/2/search In that case, the endpoint does not require you to use the field id, instead you can just use the name, 'text1' in my case, or 'QA' in yours presuming that this is a typical custom field in Jira.
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.