Skip to main content

Team

A team is a sub-group of a work group. Teams are small and self managing with a team leader. An example hierarychy may be.

  • Workgroup: Engineering Department
  • Teams: Systems Team, Structural Team, Mechanical Team, Electrical Team

Team Object

FieldTypeDescription
idsnowflakethe team's id
organisation_idsnowflakethe team's organisation id
workgroup_idsnowflakethe workgroup's id
namestringthe team's name (2-20 characters)
descriptionstringa description of the team
colorstringan rgb colour in hex format (e.g. #RRGGBB)

Team Member Object

FieldTypeDescription
useruser objectthe user who is a member of the team
is_leaderbooleanwhether the user is a team leader
joined_atstringwhen the user joined the team (ISO8601 timestamp)

List Teams

GET /workgroups/{workgroup.id}/teams

Returns a list of teams that belong to the workgroup. Requires membership in the organisation that owns the workgroup.

Error Responses
Status CodeDescription
404The workgroup does not exist
403The caller is not a member of the organisation

Create Team

POST /workgroups/{workgroup.id}/teams

Create a new team inside the workgroup. Requires the MANAGE_TEAMS permission on the workgroup.

Request Body
FieldTypeDescription
name?stringthe team's name (2-20 characters)
colourstringan RGB colour in hex format (e.g. #RRGGBB)
Error Responses
Status CodeDescription
400The workgroup is invalid
403The caller lacks the MANAGE_TEAMS permission

Add User To Team

PUT /workgroups/{workgroup.id}/teams/{team.id}/members/{user.id}

Adds a user to the specified team. Requires the MANAGE_TEAMS permission on the team or the caller to be a team leader.

Error Responses
Status CodeDescription
400The team, workgroup, or user is invalid
400The user is already a member of the team
400The user is not a member of the organisation
403The caller lacks the MANAGE_TEAMS permission

Update Team Membership

PATCH /workgroups/{workgroup.id}/teams/{team.id}/members/{user.id}

Update a team membership (e.g. make/remove team leader). Requires the MANAGE_TEAMS permission or the caller to be a team leader.

Request Body
FieldTypeDescription
IsLeaderbooleanwhether the user should be a team leader
Error Responses
Status CodeDescription
400The inputs are invalid
400Attempting to change own leadership without permission
403The caller lacks the MANAGE_TEAMS permission

Remove User From Team

DELETE /workgroups/{workgroup.id}/teams/{team.id}/members/{user.id}

Removes a user from the team. Requires the MANAGE_TEAMS permission or the caller to be a team leader.

Team leaders are prevented from removing other team leaders unless they have MANAGE_TEAMS permission.

Error Responses
Status CodeDescription
400The inputs are invalid
403The caller lacks the MANAGE_TEAMS permission

Get Team

GET /team/{team.id}

Returns the team object for the specified id. Requires membership in the organisation that owns the team.

Error Responses
Status CodeDescription
404The team does not exist
403The caller is not a member of the organisation

Update Team

PATCH /team/{team.id}

Partially update a team. Only name and colour are accepted and will be updated if provided. Requires the MANAGE_TEAMS permission on the owning organisation.

Request Body
FieldTypeDescription
name?stringthe team's name (2-20 characters)
colour?stringan RGB colour in hex format (e.g. #RRGGBB)
Error Responses
Status CodeDescription
400The input is invalid or the organisation is missing
403The caller lacks the MANAGE_TEAMS permission

Delete Team

DELETE /team/{team.id}

Deletes the team and removes all team members and permission grants. Requires the MANAGE_TEAMS permission on the owning organisation.

Error Responses
Status CodeDescription
400The team or organisation is invalid
403The caller lacks the MANAGE_TEAMS permission

List Team Members

GET /team/{team.id}/members

Returns a list of users who are members of the team. Requires membership in the organisation that owns the team.

Error Responses
Status CodeDescription
404The team does not exist
403The caller is not a member of the organisation