Challenges retrieving a comprehensive list of Atlassian Teams

Svetlin
Contributor
January 8, 2024

My team is trying to delete duplicate teams and we were reading through the community posts. For starters, to figure out the duplicate names, we need to first get a list of all our Jira Teams.

We checked this post:

https://community.atlassian.com/t5/Jira-Content-Archive-questions/How-to-get-all-Teams-in-JIRA-via-the-cloud-rest-api/qaq-p/2347367

It says there's some unofficial and undocumented API endpoint, which however, obviously did not work for us:

https://{COMPANY_NAME}.atlassian.net/gateway/api/v3/teams/search?organizationId=\{ORGANIZATION_ID}

But it throws 401 error.

Another approach we tried is using the following URL:

https://{COMPANY_NAME}.atlassian.net/gateway/api/v3/teams/search?organizationId=\{ORGANIZATION_ID}&state=active&includesYou=false&start=1&limit=100

But it seems to only show limited number of results and definitely not all our teams. E.g., if we put the limit to anything > than 100, it throws the following error:

'{"messages":["limit must be less than or equal to 100"]}'

See screenshots...
unlimited_access_unlimited_Screenshot 2024-01-08 at 13.25.29.png

We checked the developer documentation here, but for the corresponding get request, it states that the endpoint has been deprecated:

https://developer.atlassian.com/platform/teams/graphql/\#queries_team


Querying with a GET like so via curl:

curl -u firstname.secondname@company.com:{API_KEY} -X GET -H "Content-Type: application/json" "https://{INSTANCE_NAME}.atlassian.net/gateway/api/public/teams/v1/org/{ORG_ID}/teams/"

gets me the following:

{"type":"about:blank","title":"Method Not Allowed","status":405,"detail":"Method 'GET' is not supported.","instance":"/api/public/v1/org/{ORG_ID}/teams/"}%

Reference:

https://developer.atlassian.com/platform/teams/components/team-public-rest-api/ 

So considering I checked virtually all existing forum threads on this and they did not help so far, do you think there is a way to get all your teams from your organization in bulk at once?

1 answer

0 votes
Sean Thompson
Contributor
May 3, 2024

I am riding on the exact same struggle bus

Suggest an answer

Log in or Sign up to answer