Teams
Group users, targets, and other elements in teams for specific features and a more efficient management. For example, users in a team can only run scans for targets of their team, not the targets of other teams.
Learn more about how to get started with Teams.
Functionality
The endpoints under Teams provide the following functionality:
- Create and manage teams (groups of targets and scanning agents only).
- Check the number of free target slots of the teams.
- Move targets from one team to another.
Important Notes
Some relevant information when using Teams:
- To group users in teams, create user roles with team scope.
Related Tags
Further functionality related to Teams is provided in the following tags:
- Targets - Manage targets to use in teams.
- Scanning Agents - Manage scanning agents to use in teams.
- User Roles - Manage user roles to group users in teams.
List the user's Snyk groups
Lists the Snyk groups of the account's tenant that the user can see, read live from Snyk, for Snyk-managed accounts only. Returns 409 with code `reauth_required` when the Snyk login token is missing, expired, or rejected by Snyk. Returns 502 when Snyk cannot be read.
List the Teams of a Snyk group
Lists the Teams mapped to the Snyk orgs of a group that the user can see. The first call for a group reads its orgs from Snyk and creates their Teams. Later calls return the known Teams immediately and refresh the list in the background (at most every few minutes); `syncing` is true until that refresh and any group permission sync finish. `resolved` tells whether the user's role on a Team has been read from Snyk. Returns 404 when the group is not one of the user's groups.
Search the Teams of a Snyk group by name
Searches, by name and case-insensitively, the Teams of the group's orgs that are already loaded, paginated and ordered by name. It never waits for Snyk: when the group's orgs have not been loaded yet, or not recently, they are loaded in the background and `syncing` is true; repeat the search to get the orgs loaded since. Returns 404 when the group is not one of the user's groups.
Sync the user's Snyk permissions on a group's Teams
Resolves, in the background, the user's role on every Team of the group whose role has not been read from Snyk yet. Poll the group's Teams and refresh the profile permissions as `resolved` changes. Returns 404 when the group's Teams have not been listed yet.
The user's role on a Snyk group
The name of the user's Snyk role on the group, read from Snyk and cached for 5 minutes; `role` is null when the user holds no role on the group. Returns 404 when the group is not one of the user's groups. Returns 409 with code `reauth_required` when the Snyk login token is missing, expired, or rejected by Snyk. Returns 502 when Snyk cannot be read.
Status of the initial Snyk org sync
Whether the account's initial Snyk org sync has completed, for Snyk-managed accounts only. Until it is `synced`, the Snyk group endpoints answer 409 `tenant_not_synced`. Poll while `syncing`. Returns 403 when the account is not managed by Snyk.
Move Target to Another Team
Move Targets to Another Team
List Teams
Create Team
Retrieve Team
Update Team
Partial Update Team
Delete Team
Remove Targets from the Team
Sync the user's Snyk permissions on a Team
Reads the user's role on the Snyk organization mapped to this Team (direct, inherited from its group, or a custom role resolved from effective permissions) and stores it as the user's role on the Team, for Snyk-managed accounts only. Any Snyk-mapped Team of the account can be synced, including one the user holds no role on yet. Runs synchronously so the resolved role is returned in the response; `role` is null when the user holds no role on the Team. Returns 409 with code `reauth_required` when the Snyk login token is missing, expired, or rejected by Snyk; the user must log in again. Returns 502 when Snyk cannot be read.