members
Creates, updates, deletes, gets or lists a members
resource.
Overview
Name | members |
Type | Resource |
Id | vercel.teams.members |
Fields
The following fields are returned by SELECT
queries:
- get_team_members
Name | Datatype | Description |
---|---|---|
name | string | The name of this user. (example: Jane Doe) |
accessRequestedAt | number | Timestamp in milliseconds for when this team member was accepted by an owner. |
avatar | string | ID of the file for the Avatar of this member. (example: 123a6c5209bc3778245d011443644c8d27dc2c50) |
bitbucket | object | Information about the Bitbucket account of this user. |
confirmed | boolean | Boolean that indicates if this member was confirmed by an owner. |
createdAt | number | Timestamp in milliseconds when this member was added. |
email | string | The email of this member. (example: jane.doe@example.com) |
github | object | Information about the GitHub account for this user. |
gitlab | object | Information about the GitLab account of this user. |
joinedFrom | object | Map with information about the members origin if they joined by requesting access. |
projects | array | Array of project memberships |
role | string | Role of this user in the team. (example: OWNER) |
uid | string | The ID of this user. (example: zTuNVUXEAvvnNN3IaqinkyMw) |
username | string | The unique username of this user. (example: jane-doe) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_team_members | select | teamId | limit , since , until , search , role , excludeProject , eligibleMembersForProjectId | Get a paginated list of team members for the provided team. |
remove_team_member | delete | teamId , uid | newDefaultTeamId | Remove a Team Member from the Team, or dismiss a user that requested access, or leave a team. |
_get_team_members | exec | teamId | limit , since , until , search , role , excludeProject , eligibleMembersForProjectId | Get a paginated list of team members for the provided team. |
invite_user_to_team | exec | teamId | Invite a user to join the team specified in the URL. The authenticated user needs to be an OWNER in order to successfully invoke this endpoint. The user can be specified with an email or an ID. If both email and ID are provided, ID will take priority. | |
update_team_member | exec | teamId , uid | Update the membership of a Team Member on the Team specified by teamId , such as changing the role of the member, or confirming a request to join the Team for an unconfirmed member. The authenticated user must be an OWNER of the Team. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
teamId | string | ID of the Team. |
uid | string | The ID of the member. |
eligibleMembersForProjectId | string | Include team members who are eligible to be members of the specified project. |
excludeProject | string | Exclude members who belong to the specified project. |
limit | number | Limit how many teams should be returned |
newDefaultTeamId | string | The ID of the team to set as the new default team for the Northstar user. |
role | string | Only return members with the specified team role. |
search | string | Search team members by their name, username, and email. |
since | number | Timestamp in milliseconds to only include members added since then. |
until | number | Timestamp in milliseconds to only include members added until then. |
SELECT
examples
- get_team_members
Get a paginated list of team members for the provided team.
SELECT
name,
accessRequestedAt,
avatar,
bitbucket,
confirmed,
createdAt,
email,
github,
gitlab,
joinedFrom,
projects,
role,
uid,
username
FROM vercel.teams.members
WHERE teamId = '{{ teamId }}' -- required
AND limit = '{{ limit }}'
AND since = '{{ since }}'
AND until = '{{ until }}'
AND search = '{{ search }}'
AND role = '{{ role }}'
AND excludeProject = '{{ excludeProject }}'
AND eligibleMembersForProjectId = '{{ eligibleMembersForProjectId }}'
;
DELETE
examples
- remove_team_member
Remove a Team Member from the Team, or dismiss a user that requested access, or leave a team.
DELETE FROM vercel.teams.members
WHERE teamId = '{{ teamId }}' --required
AND uid = '{{ uid }}' --required
AND newDefaultTeamId = '{{ newDefaultTeamId }}'
;
Lifecycle Methods
- _get_team_members
- invite_user_to_team
- update_team_member
Get a paginated list of team members for the provided team.
EXEC vercel.teams.members._get_team_members
@teamId='{{ teamId }}' --required,
@limit='{{ limit }}',
@since='{{ since }}',
@until='{{ until }}',
@search='{{ search }}',
@role='{{ role }}',
@excludeProject='{{ excludeProject }}',
@eligibleMembersForProjectId='{{ eligibleMembersForProjectId }}'
;
Invite a user to join the team specified in the URL. The authenticated user needs to be an OWNER
in order to successfully invoke this endpoint. The user can be specified with an email or an ID. If both email and ID are provided, ID will take priority.
EXEC vercel.teams.members.invite_user_to_team
@teamId='{{ teamId }}' --required
@@json=
'{
"uid": "{{ uid }}",
"email": "{{ email }}",
"role": "{{ role }}",
"projects": "{{ projects }}"
}'
;
Update the membership of a Team Member on the Team specified by teamId
, such as changing the role of the member, or confirming a request to join the Team for an unconfirmed member. The authenticated user must be an OWNER
of the Team.
EXEC vercel.teams.members.update_team_member
@teamId='{{ teamId }}' --required,
@uid='{{ uid }}' --required
@@json=
'{
"confirmed": {{ confirmed }},
"role": "{{ role }}",
"projects": "{{ projects }}",
"joinedFrom": "{{ joinedFrom }}"
}'
;