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?
Hello @Edxavier Roberto Caez (Optum)
Welcome to the Atlassian community.
What are the results when you try to use the first API?
Have you manually verified that more teams exist under the Organization you specified in the API call?
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: GETAPI: 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.
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?
Hi @Trudy P 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.
Thank you for that additional information.
If you expand the parameters information for the API call found here:
...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.
Cursor is a paginated next startof index.In the above response, you will have something as
Hi @Trudy P 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
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?
It looks like you're new here. Sign in or register to get started.