You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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
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!
These would also all be GET requests^
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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
I used this api
https://solifi.atlassian.net/rest/api/2/issue
Can you please tell what am i doing wrong ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mason W_ Foley Yeah this works for Jira Cloud. What does the error message you're getting look like?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Callum Carlile _Automation Consultants_ This is the full error message in the response:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm getting a 200 status ok as well, but it's not returning the projects on my site
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
nevermind I got it, i was missing the word "basic" in front of the token
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.