diff --git a/client/team.go b/client/team.go index f329303f..25c44b4a 100644 --- a/client/team.go +++ b/client/team.go @@ -94,5 +94,18 @@ func (client *ApiClient) Teams() ([]Team, error) { } func (client *ApiClient) TeamsByName(name string) ([]Team, error) { - return client.GetTeams(map[string]string{"name": name}) + organizationId, err := client.OrganizationId() + if err != nil { + return nil, err + } + + var result []Team + + if err := client.http.Get("/teams/organizations/"+organizationId, map[string]string{ + "name": name, + }, &result); err != nil { + return nil, err + } + + return result, nil }