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

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,456,304
Community Members
 
Community Events
176
Community Groups

Jira Cloud api GET /rest/api/latest/project returns empty array (using api token authorization)

Hi :-)

I'm struggling with connecting to jira cloud api's.

I'm using api token authorization in a Authorization header in PostMan

The service returns http 200 but the payload is an empty array, which surprises me since I can paste the url into a browser and get a nice json containing all our jira projects and their attributes.

I concatenate my email address, a colon and the api token and base 64 encode the result. This i use in an Authorization header; 'Basic Y<58>='

 

Any suggestions are welcome :-)

1 answer

Hi @Henrik Martinussen I just tested it and it works fine.

You need to use "basic auth" in postman and use Access token as a password.

https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/

Hi Martin thank you for your prompt response.
Unfortunately I'm still at a loss as to get non empty results from jira cloud api.
The simplest case (which I still can't manage to get non-empty results from) is; 

[http GET] https://<company>.atlassian.net/rest/api/latest/project [I know its deprecated - I have tried https://<company>.atlassian.net/rest/api/latest/project/search?query=<projectName> as well, with similar results]

As I mentioned, i get a nice 200  - but an empty array. As I said; when I paste the url into a browser I get a json containing all our projects and their attributes.

I already tried what you suggest; I have experimented with various id's (AD name, 7 digit integer user id, user guid with and without @<company>.<tld>) and I have done that using the Authorization tab in PostMan as well as in an Authorization Header [Basic Y<xxx>=] - I have also experimented with base64 encoding <emailaddress>:<api token> in an Authorization header.
None of these attempts has brought me closer to a non-empty array of projects.

Would you please elaborate on your technique/settings - I would really like to get connected to the jira api's

 

Thanks in advance

Hi Henrik, I experience this too. Did you get it resolved?

Henrik, in my case, I had correctly setup the auth variables at the top of my collection, but the specific GET item below was not inheriting the auth and was returning a 200 response but with blank response. Enabling the inheritance of the authentication resolved this.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events