Returns the compact records for all teams in the organization visible to
the authorized user.

@param  organization Globally unique identifier for the workspace or organization.
@return response
323247
public function findByOrganization($organization, $params = array(), $options = array())
    {
        $path = sprintf("/organizations/%s/teams", $organization);
        return $this->client->getCollection($path, $params, $options);
    }
1369784
@Override
    public List<Team> getBoards() {
        int count = 0;
        int startAt = 0;
        boolean isLast = false;
        List<Team> result = new ArrayList<>();
        while (!isLast) {
            String url = featureSettings.getJiraBaseUrl() + (featureSettings.getJiraBaseUrl().endsWith("/") ? "" : "/")
                    + BOARD_TEAMS_REST_SUFFIX + "?startAt=" + startAt;
            try {
                ResponseEntity<String> responseEntity = makeRestCall(url);
                String responseBody = responseEntity.getBody();
                JSONObject teamsJson = (JSONObject) parser.parse(responseBody);

                if (teamsJson != null) {
                    JSONArray valuesArray = (JSONArray) teamsJson.get("values");
                    if (!CollectionUtils.isEmpty(valuesArray)) {
                        for (Object obj : valuesArray) {
                            JSONObject jo = (JSONObject) obj;
                            String teamId = getString(jo, "id");
                            String teamName = getString(jo, "name");
                            String teamType = getString(jo, "type");
                            Team team = new Team(teamId, teamName);
                            team.setTeamType(teamType);
                            team.setChangeDate("");
                            team.setAssetState("Active");
                            team.setIsDeleted("False");
                            result.add(team);
                            count = count + 1;
                        }
                        isLast = (boolean) teamsJson.get("isLast");
                        LOGGER.info("JIRA Collector collected " + count + " boards");
                        if (!isLast) {
                            startAt += JIRA_BOARDS_PAGING;
                        }
                    } else {
                        isLast = true;
                    }
                } else {
                    isLast = true;
                }
            } catch (ParseException pe) {
                isLast = true;
                LOGGER.error("Parser exception when parsing teams", pe);
            } catch (HygieiaException | HttpClientErrorException | HttpServerErrorException e) {
                isLast = true;
                LOGGER.error("Error in calling JIRA API: " + url , e.getMessage());
            }
        }
        return result;
    }
1182892
public function getTeam()
    {
        $response = $this->rest->get(
            static::TEAM_PATH
        );

        $this->checkResponse($response);

        return new Team($response);
    }
572218
public function findOrganizationTile($organizationId, $tileId)
    {
        list($response) = $this->findOrganizationTileWithHttpInfo($organizationId, $tileId);
        return $response;
    }
617030
def organization_memberships(self, organization):
        
        return self._query_zendesk(self.endpoint.organization_memberships, 'organization_membership', id=organization)
68059
@GET
  @Path("teams")
  public Response authorizedTeams(@HeaderParam("Authorization") @DefaultValue("no token") String auth) throws Exception {
    if(!this.isAuth(auth)) {
      return Response.status(Status.FORBIDDEN).build();
    }
    Integer teams[] = getAuthorizedTeams();
    return Response.ok(new Gson().toJson(teams), MediaType.APPLICATION_JSON).build();
  }
519921
def __getOrganizations(self, web):
        
        orgsElements = web.find_all("a", {"class": "avatar-group-item"})
        self.organizations = len(orgsElements)
1300147
def get_org_details(organization_id):
    '''
    
    '''

    qdata = salt.utils.http.query(
        '{0}/organization/{1}'.format(_base_url(), organization_id),
        method='GET',
        decode=True,
        decode_type='json',
        header_dict={
            'X-DC-DEVKEY': _api_key(),
            'Content-Type': 'application/json',
        },
    )
    return qdata
1105711
public CollectionRequest<Team> users(String team) {
    
        String path = String.format("/teams/%s/users", team);
        return new CollectionRequest<Team>(this, Team.class, path, "GET");
    }
667772
public OrganizationMini getOrganizationByURL(String url) {
		return getResourceFactory().getApiResource("/org/url")
				.queryParam("url", url).get(OrganizationMini.class);
	}
1042323
static OrganizationSettings getOrganizationSettings(OrganizationName organizationName) {
    try (SecurityCenterClient client = SecurityCenterClient.create()) {
      // Start setting up a request to get OrganizationSettings for.
      // OrganizationName organizationName = OrganizationName.of(/*organizationId=*/"123234324");
      GetOrganizationSettingsRequest.Builder request =
          GetOrganizationSettingsRequest.newBuilder()
              .setName(organizationName.toString() + "/organizationSettings");

      // Call the API.
      OrganizationSettings response = client.getOrganizationSettings(request.build());

      System.out.println("Organization Settings:");
      System.out.println(response);
      return response;
    } catch (IOException e) {
      throw new RuntimeException("Couldn't create client.", e);
    }
  }
212901
public OvhIpv4Org ipOrganisation_organisationId_GET(String organisationId) throws IOException {
		String qPath = "/me/ipOrganisation/{organisationId}";
		StringBuilder sb = path(qPath, organisationId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhIpv4Org.class);
	}
1022586
public function createTeam($organizationUuid, $name)
    {
        $options = [
            'form_params' => [
                'name' => $name,
            ],
        ];

        return new OperationResponse(
            $this->connector->request('post', "/organizations/${organizationUuid}/teams", $this->query, $options)
        );
    }
985073
def get_organization(self):
        # type: () -> hdx.data.organization.Organization
        
        return hdx.data.organization.Organization.read_from_hdx(self.data['owner_org'], configuration=self.configuration)
1008403
function getCurrentOrganization() {
    var fields = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        fields[_i - 0] = arguments[_i];
    }
    return getCurrentServer().organization;
}
767539
def get_organization(self, **kwargs):
        
        resp = self._get(self._u(self._ORGANIZATION_ENDPOINT_SUFFIX),
                         **kwargs)
        resp.raise_for_status()
        return resp.json()
1241377
def is_in_team(self, team_id):
        """"""

        if self.is_super_admin():
            return True
        team_id = uuid.UUID(str(team_id))
        return team_id in self.teams or team_id in self.child_teams_ids