What format is the Organization Ari supposed to be (for GraphQL API)

I’m trying to query the team query:

query team{
    team {
        teamSearchV2(
            organizationId:"{{org_id}}"
            siteId: "{{site_id}}"
        )  @optIn(to: "Team-search-v2") {
            nodes {
                team {
                    displayName
                }
            }
        }
    }
}

And getting the error message:

"message": "Exception while fetching data (/team/teamSearchV2) : Invalid Organization Ari"

I know my organization ID is correct because I am able to create teams using the REST API.
I’ve taken a few stabs in the dark on what the ari format might be… e.g., ari:cloud:identity: but have not been successful. Does anyone know what the format is??

2 Likes

use the canonicalId insted adding the prefix ari:cloud:platform::org/{{orgId}}

query Query( $orgCanonicalId: ID!, $siteId: String!, $first: Int) {
  team @optIn(to: "Team-search-v2"){ 
    teamSearchV2  ( organizationId: $orgCanonicalId, siteId: $siteId , first: $first)  {

      nodes {
        memberCount
        team {
            
          id
          members {
            nodes {
                member {
                    canonicalAccountId
                }
            }
          }
          displayName
          description
          state
          
        }

      }

      pageInfo {
        endCursor
        hasNextPage
        hasPreviousPage
        startCursor
      }
    }
  }
}
2 Likes

Are you referring to the ID as found in this article? What it is the Organization ID and where to find it | Jira | Atlassian Documentation
That’s the first thing I tried and it did not work.

Try prefixing it with ari:cloud:platform::org/

query team{
    team {
        teamSearchV2(
            organizationId:"ari:cloud:platform::org/{{org_id}}"
            siteId: "{{site_id}}"
        )  @optIn(to: "Team-search-v2") {
            nodes {
                team {
                    displayName
                }
            }
        }
    }
}
1 Like