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,556,244
Community Members
 
Community Events
184
Community Groups

How to get all Teams in JIRA via the cloud rest api?

How can I retrieve all teams in JIRA via the JIRA rest api, something of the form of  /rest/api/3/team 

1 answer

2 votes
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 01, 2023

Looking at https://MYSITE.atlassian.net/jira/people/search

I see a call to this endpoint:

https://boomaster.atlassian.net/gateway/api/v3/teams/search?organizationId=MYORGANIZATIONID

Which returns JSON that seems to include a bunch of teams.

Oliver Siebenmarck _Polymetis Apps_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 02, 2023 • edited

Just two quick notes on that particular endpoint:

That's not part of the product's APIs which means that individual admins can use their personal API tokens to access this, but it is out of reach for Connect and Forge apps.

And if I am not totally mistaken, it's also not part of the official APIs, ie you should not rely on using for any production workload, as you are basically hacking ;-) 

Like Darryl Lee likes this
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 02, 2023

@Oliver Siebenmarck _Polymetis Apps_ is quite right. This is totally a hack, gathered from sniffing the Search People/Teams page. 

Totally correct that this is probably only usable for unofficial admin work, like one-time scripts, etc. certainly not for apps or production automation things. 

Or if you do use it for such tasks you'll want to make sure you have robust error/sanity checks to confirm the endpoint is still "working".

Thanks a lot for looking into this, Does this mean there is no official endpoint teams in JIRA ?

Is there a way to get team data via JQL?

Oliver Siebenmarck _Polymetis Apps_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 04, 2023

Hi @Christof Bornhoevd ,

as far as I am aware, there isn't an official REST API to get the teams. @Darryl Lee 's suggestion should work great, but isn't something I would feel comfortable putting into a product that a lot of people rely on. If it were just for me and some one-off scripts, then it would absolutely be the way to go.

The other option you could explore is the GraphQL API which, if I remember correctly, also has some information on teams. Personally, I find GraphQL very weird to work with, but the data should be there. Another thing to keep in mind, is that the GraphQL API does not seem to be meant for marketplace apps, so if that is where you are going with this, then you should check if that would work. Again, for some low-risk internal scripting, it should be more than fine.

Hope that helps,
 Oliver

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events