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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to call jira api in postman to get details of project, Epic, Issues and worklogs?

Hi,

I am very new to JIRA and don't know much about JIRA apis. I want to get the details of all projects, all type of issues ( stories, task, epic, sub task and bugs ) and all worklogs by calling jira apis in postman.  Can anyone suggest some link or way to get that done. 

 

 

Thanks in advance 

2 answers

1 accepted

2 votes
Answer accepted
Callum Carlile _Automation Consultants_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 05, 2022

Hi @aagnihotri , welcome to the Atlassian Community!

First of all, you will need to create an API token, following the instructions here. Once you have this API token, for Basic Auth you can encode it using a tool such as Base64Encode, in the format of:

[email_address]:[API_Token] - you will need to use the same email address that you created the API token under. Once you have done this, you can use this in the Authorization header in postman.

So headers required would be:

Key: Content-Type Value: application/json

Key: Authorization Value: Basic [your encoded API key]

There are several API requests you can use once you have done this:

https://[your_cloud_site_name]/rest/api/2/project

This will return all projects in your site, and will include things like the project name, key, type, etc. Note: this will only return the projects that the authenticated user has Browse Issues permission for.

https://[your_cloud_site_name]/rest/api/2/project/[ProjectIdOrKey]

This would return all info related to a specific project, such as the issue types available, components, versions etc.

Worklogs is a bit trickier, I don't believe you can obtain all worklogs across all issues through the API, but if you want to find this out for a specific issue you would use

https://[your_cloud_site_name]/rest/api/2/issue/[IssueIdOrKey]/worklog

Hope this helps!

Callum Carlile _Automation Consultants_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 05, 2022

These would also all be GET requests^

@Callum Carlile _Automation Consultants_ 

Hi,

Thanks for the reply. Now i am able to get all the projects but when i tried to get all issues it is returning blank 

image.png

I used this api

https://solifi.atlassian.net/rest/api/2/issue

 

Can you please tell what am i doing wrong ?

Callum Carlile _Automation Consultants_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 05, 2022

It doesn't exactly work in the same way for normal issues - you would need to put the issue ID or Key at the end of the request URL, which would give you all information for that particular issue.

If you use a URL of

https://[your_cloud_site_name]/rest/api/2/search?jql=

then this should return more results, though depending on how many issues you have on your instance you may hit the maximum search result (you can also just paste this url into your browser for the same result).

There's more info on this similar answer as well as this one too, but you may not be able to retrieve all data of all issues in your site if you have a large number of custom fields or issue numbers

Like # people like this

@Callum Carlile _Automation Consultants_  - Does this work for JIRA Cloud?  I keep getting the deprecation message when attempting to set a header with Basic and the encoded email::api_key

2022-10-13_17-21-44.jpg

Callum Carlile _Automation Consultants_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 14, 2022

@Mason W_ Foley Yeah this works for Jira Cloud. What does the error message you're getting look like?

@Callum Carlile _Automation Consultants_  This is the full error message in the response:

Basic authentication with passwords is deprecated.  For more information, see: https: //developer.atlassian.com/cloud/confluence/deprecation-notice-basic-auth/ 




2.jpgI'm getting a 200 status ok as well, but it's not returning the projects on my site

nevermind I got it, i was missing the word "basic" in front of the token

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events