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?
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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I haven't tried it, but yes, I think that is the correct syntax.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill Thanks that worked.
This will be the final endpoint.
https://{{orgUrl}}/gateway/api/public/teams/v1/org/{{orgId}}/teams?size=300
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Cursor is a paginated next startof index.
In the above response, you will have something as
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, first REQUEST would give you cursor at end, post that, you need to use the cursor as above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.