Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Hi ,I am pulling issue data from Jira using REST-APi. But not able to see assignee field.

Hi ,I am pulling issue data from Jira using REST-APi. But not able to see assignee field.I get below fields from API call

SUMMARY

IssueType

Created

Duredate

CustomField_Time created

Reporter

Status

this list is  missing Assignee detail.Is it related to level of access i have?

 

 

2 answers

1 vote

Hello Payal,

Are you able to see the assignee directly on Jira? Additionally, which endpoint are you using to retrieve the information? 

By querying for a particular issue you should receive the assignee, for example:

http://hostname/rest/api/latest/ISSUEKEY

You would receive a JSON response like this:

    "assignee": {
          "self": "http://hostname/rest/api/latest/user?username=abcd",
          "name": "abcd",
          "emailAddress": "mail@abc.com",
          "avatarUrls": {....}
}

 Looking forward to hearing from you.

Cheers,

Carlos

I am using this api call to get issue information.

https://Hostname/rest/servicedeskapi/servicedesk/1/queue/1/issue

out put of this call is field I mentioned earlier.I was looking for assignee key in it.

I need to get all queue for my reporting purpose

1 vote
DPK J Community Leader Feb 02, 2020

@Payal Patel  Welcome to the community!

Looking at conversation with @carlosughini , it seems you are using Service Desk Rest API, and not Jira Cloud Rest API.

As per documentation of API you are using,

This method returns the customer requests in a queue. Only fields that the queue is configured to show are returned. For example, if a queue is configured to show description and due date, then only those two fields are returned for each customer request in the queue.

So, if you have configured 'assignee' field to be visible, it will be returned as API response otherwise not.

Now, you couple of options here,

  1. Configure 'assignee' field as visible field, or
  2. Use Jira Cloud's rest API
    • As suggested by @carlosughini this will look like this,
    • BASE_URL/rest/api/3/<ISSUE_KEY>

 

Hopefully this resolves your issue.

Thanks..I get access forbidden error with Cloud API.. Where as Servicedesk api works fine but missing field. Which call is good Cloud API or service desk? I am creating connection in power bi ..

DPK J Community Leader Feb 02, 2020

@Payal PatelJira Cloud API is for sure more powerful and easy to use (you will find lots of resources build around that).

If you are getting 'access forbidden' error do check with your Administrator that if you have access to Jira Cloud, otherwise only way to 'assignee' for you is by making that field visible.

@DPK J  can you please tell me how to check if I have access or not .Can I check from web browser?  I can login to Jira  using https://host/jira/servicedesk/projects/Projectkey/queues/

and see all queue.Sorry to ask simple questions but I am new to Jira Api's .

DPK J Community Leader Feb 02, 2020

You can simply login to "Jira" and visit page like, BASE_URL/browse/ISSUE_KEY

If you can access this page, try BASE_URL/rest/api/3/issue/ISSUE_KEY (in same browser to validate rest)

If both of these work fine, you have access, and you might be making some mistake in API call.

@DPK J One good news.. I am able to pull issues by passing issue key but I have to pull all issue information .Cant pass individual issue key.Any suggestion or documentation link will be great help.

I read some where to provide maxResult count with startat index..but this is manual step. every time i have to refresh report i have to update this parameters to get new issues.Is there any way to get all issues in one go?

DPK J Community Leader Feb 02, 2020

@Payal Patel

To fetch multiple issue as a time you need to use issue search API.

Documented here - https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-search-get

here if you don't provide anything in search it will return all issues, and if you want to limit issues to specific project you can provide jql param like this "project='PROJECT_KEY'"

And as this is paginated API, you will need to provide page data, defined by params, startAt and maxResults. (there is no API to get all data without pagination).

I am doing below API Call and it is not returning me only Open Issues..And returns me all issues short by date.

Can you tell me whts wrong in this URL

https://HostAddress/rest/api/3/search?jql=project=ICT&Currentstatus=Open&maxresults=100%20ORDER%20BY%20created%20DESC

DPK J Community Leader Feb 04, 2020

Something like this will work for you,

BASE_URL/rest/api/3/search?maxResults=10&startAt=0&jql=project%3DICT%20AND%20status%3DOpen%20order%20by%20created%20DESC

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you