members
Creates, updates, deletes, gets or lists a members resource.
Overview
| Name | members |
| Type | Resource |
| Id | vercel.project_members.members |
Fields
The following fields are returned by SELECT queries:
- list
Paginated list of members for the project.
| Name | Datatype | Description |
|---|---|---|
name | string | The name of this user. (example: Jane Doe) |
avatar | string | ID of the file for the Avatar of this member. (example: 123a6c5209bc3778245d011443644c8d27dc2c50) |
computed_project_role | string | Role of this user in the project. (ADMIN, PROJECT_DEVELOPER, PROJECT_GUEST, PROJECT_VIEWER) (example: ADMIN) (wire: computedProjectRole) |
created_at | number | Timestamp in milliseconds when this member was added. (wire: createdAt) |
email | string | The email of this member. (example: jane.doe@example.com) |
role | string | Role of this user in the project. (ADMIN, PROJECT_DEVELOPER, PROJECT_GUEST, PROJECT_VIEWER) (example: ADMIN) |
team_role | string | The role of this user in the team. (BILLING, CONTRIBUTOR, DEVELOPER, MEMBER, OWNER, SECURITY, VIEWER, VIEWER_FOR_PLUS) (example: CONTRIBUTOR) (wire: teamRole) |
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 |
|---|---|---|---|---|
list | select | id_or_name | limit, since, until, search, team_id, slug | Lists all members of a project. |
add | insert | id_or_name, role, uid, username, email | team_id, slug | Adds a new member to the project. |
remove | delete | id_or_name, uid | team_id, slug | Remove a member from a specific project |
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 |
|---|---|---|
id_or_name | string | The ID or name of the Project. |
uid | string | The user ID of the member. |
limit | integer | Limit how many project members should be returned |
search | string | Search project members by their name, username, and email. |
since | integer | Timestamp in milliseconds to only include members added since then. |
slug | string | The Team slug to perform the request on behalf of. |
team_id | string | The Team identifier to perform the request on behalf of. (wire: teamId) |
until | integer | Timestamp in milliseconds to only include members added until then. |
SELECT examples
- list
Lists all members of a project.
SELECT
name,
avatar,
computed_project_role,
created_at,
email,
role,
team_role,
uid,
username
FROM vercel.project_members.members
WHERE id_or_name = '{{ id_or_name }}' -- required
AND limit = '{{ limit }}'
AND since = '{{ since }}'
AND until = '{{ until }}'
AND search = '{{ search }}'
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;
INSERT examples
- add
- Manifest
Adds a new member to the project.
INSERT INTO vercel.project_members.members (
uid,
username,
email,
role,
id_or_name,
team_id,
slug
)
SELECT
'{{ uid }}' /* required */,
'{{ username }}' /* required */,
'{{ email }}' /* required */,
'{{ role }}' /* required */,
'{{ id_or_name }}',
'{{ team_id }}',
'{{ slug }}'
RETURNING
id
;
# Description fields are for documentation purposes
- name: members
props:
- name: id_or_name
value: "{{ id_or_name }}"
description: Required parameter for the members resource.
- name: uid
value: "{{ uid }}"
description: |
The ID of the team member that should be added to this project.
- name: username
value: "{{ username }}"
description: |
The username of the team member that should be added to this project.
- name: email
value: "{{ email }}"
description: |
The email of the team member that should be added to this project.
- name: role
value: "{{ role }}"
description: |
The project role of the member that will be added.
valid_values: ['ADMIN', 'PROJECT_VIEWER', 'PROJECT_DEVELOPER']
- name: team_id
value: "{{ team_id }}"
description: The Team identifier to perform the request on behalf of.
description: The Team identifier to perform the request on behalf of.
- name: slug
value: "{{ slug }}"
description: The Team slug to perform the request on behalf of.
description: The Team slug to perform the request on behalf of.
DELETE examples
- remove
Remove a member from a specific project
DELETE FROM vercel.project_members.members
WHERE id_or_name = '{{ id_or_name }}' --required
AND uid = '{{ uid }}' --required
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;