Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get all JIRA Teams using API

Edxavier Roberto Caez _Optum_
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 29, 2025

Hi, currently working with an integration between JIRA and ServiceNow, I want to get all the teams directly from JIRA. 

I'm trying to get all teams using API, I have read your documentation but seems that I can get the TEAM but not all. Is there a limitation in your API? 

https://developer.atlassian.com/platform/teams/rest/v1/api-group-teams-public-api/#api-public-teams-v1-org-orgid-teams-get

https://developer.atlassian.com/platform/teams/rest/v1/api-group-teams-public-api/#api-group-teams-public-api

Anyone can point me to the right documentation or some directions? 

2 answers

1 accepted

2 votes
Answer accepted
Trudy Claspill
Community Champion
April 29, 2025

Hello @Edxavier Roberto Caez _Optum_ 

Welcome to the Atlassian community.

What are the results when you try to use the first API?

https://developer.atlassian.com/platform/teams/rest/v1/api-group-teams-public-api/#api-public-teams-v1-org-orgid-teams-get

Have you manually verified that more teams exist under the Organization you specified in the API call?

Edxavier Roberto Caez _Optum_
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 30, 2025

Hi @Trudy Claspill , yes I have manually verified that I have 117 Teams. 

The results is from this API 

 

https://{{orgUrl}}/gateway/api/public/teams/v1/org/{{orgId}}/teams

 

Are only 50 records. 

Trudy Claspill
Community Champion
April 30, 2025

Thank you for that additional information.

If you expand the parameters information for the API call found here:

https://developer.atlassian.com/platform/teams/rest/v1/api-group-teams-public-api/#api-public-teams-v1-org-orgid-teams-get

...you will see a size parameter. This specifies how many results will be returned. The minimum is 1 and the maximum is 300. The default value is 50.

To get more than 50 results you need to set this parameter as part of your API call.

Screenshot 2025-04-30 at 8.58.18 AM.png

Edxavier Roberto Caez _Optum_
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 30, 2025

Hi @Trudy Claspill

Thanks for your reply. You said that I need to include the size parameters in the URL? Like this? 

https://{{orgUrl}}/gateway/api/public/teams/v1/org/{{orgId}}/teams?size=300

Trudy Claspill
Community Champion
April 30, 2025

I haven't tried it, but yes, I think that is the correct syntax.

Edxavier Roberto Caez _Optum_
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 30, 2025

@Trudy Claspill Thanks that worked. 

This will be the final endpoint. 

https://{{orgUrl}}/gateway/api/public/teams/v1/org/{{orgId}}/teams?size=300

Like Trudy Claspill likes this
0 votes
Piyush Annadate _ACE Pune_
Community Champion
April 29, 2025

Hello @Edxavier Roberto Caez _Optum_ 
Welcome to the Community !

Even I'm unable to use the Teams API based on Organization API token. 
Though I was able to fetch the teams list via site based api.

Method: GET
API: https://<site>.atlassian.net/gateway/api/public/teams/v1/org/<Org ID>teams

Authentication: Basic Auth: Email and API TOKEN (not the organisation api token)

Result: Cursor based.

{

"entities": [

{

"teamId": "xxxxxxxxxxxxxx",

"organizationId": "org id",

"displayName": "name ",

"description": "\"Migrated from the aaaaa Advanced Roadmaps site.\"",

"teamType": "OPEN"

},

{

"teamId": "xxxxxxxxxxxxxx",

"organizationId": "org id",

"displayName": "name ",

"description": "\"Migrated from the aaaaa Advanced Roadmaps site.\"",

"teamType": "OPEN"

},

and so on.

 

Edxavier Roberto Caez _Optum_
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 30, 2025

Hi @Piyush Annadate _ACE Pune_  thanks for you reply, I was actually using this API link, but it only return 50 records of 117 Teams that I have. 

When you said Result: Cursor based, what do you mean by that? 

Piyush Annadate _ACE Pune_
Community Champion
April 30, 2025

Cursor is a paginated next startof index.

In the above response, you will have something as 

"cursor": "c87a5sdf6-266c-2246-5644-8b35439a2ac97"

https://<site>.atlassian.net/gateway/api/public/teams/v1/org/<Org ID>teams?cursor=<last cursor value>
Edxavier Roberto Caez _Optum_
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 30, 2025

Hi @Piyush Annadate _ACE Pune_ 

I see the cursor value, is this needs to be part of the URL? 

https://<site>.atlassian.net/gateway/api/public/teams/v1/org/<Org ID>teams?cursor=<last cursor value>

and in my script have some way to get the next cursor?

 

Piyush Annadate _ACE Pune_
Community Champion
May 1, 2025

Yes, first REQUEST would give you  cursor at end, post that, you need to use the cursor  as above. 

Suggest an answer

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

Atlassian Community Events