benchling_sdk.services.v2.stable.team_service module¶

class TeamService¶

Bases: benchling_sdk.services.v2.base_service.BaseService

Teams.

View team objects.

See https://benchling.com/api/reference#/Teams

create(team: TeamCreate) → Team¶

Create team.

See https://benchling.com/api/reference#/Teams/createTeam

create_membership(team_id: str, membership: MembershipCreate) → Membership¶

Create team membership for the given user, role, and team.

See https://benchling.com/api/reference#/Teams/createTeamMembership

delete_membership(team_id: str, user_id: str) → None¶

Delete a single team membership.

See https://benchling.com/api/reference#/Teams/deleteTeamMembership

get_by_id(team_id: str) → Team¶

Get a team by ID.

See https://benchling.com/api/reference#/Teams/getTeam

get_membership(team_id: str, user_id: str) → Membership¶

Get team membership.

See https://benchling.com/api/reference#/Teams/getTeamMembership

list(*, ids: Optional[Iterable[str]] = None, name: Optional[str] = None, name_includes: Optional[str] = None, names_any_of: Optional[Iterable[str]] = None, names_any_of_case_sensitive: Optional[Iterable[str]] = None, modified_at: Optional[str] = None, mentioned_in: Optional[Iterable[str]] = None, organization_id: Optional[str] = None, has_members: Optional[Iterable[str]] = None, has_admins: Optional[Iterable[str]] = None, sort: Optional[Union[str, ListTeamsSort]] = None, page_size: Optional[int] = 50) → PageIterator[Team]¶

List teams.

Returns all teams that the caller has permission to view. The following roles have view permission: * tenant admins * members of the team’s organization

See https://benchling.com/api/reference#/Teams/listTeams

list_memberships(team_id: str, role: Optional[str] = None, page_size: Optional[int] = None) → PageIterator[MembershipsPaginatedList]¶

Return all team memberships in the given team.

See https://benchling.com/api/reference#/Teams/listTeamMemberships

update(team_id: str, team: TeamUpdate) → Team¶

Update team.

See https://benchling.com/api/reference#/Teams/updateTeam

update_membership(team_id: str, user_id: str, membership: MembershipUpdate) → Membership¶

Update a single team membership.

See https://benchling.com/api/reference#/Teams/updateTeamMembership