access_requests
Creates, updates, deletes, gets or lists an access_requests resource.
Overview​
| Name | access_requests |
| Type | Resource |
| Id | vercel.teams.access_requests |
Fields​
The following fields are returned by SELECT queries:
- get
Successfully
| Name | Datatype | Description |
|---|---|---|
team_name | string | The name of the team. (example: My Team) (wire: teamName) |
access_requested_at | number | Timestamp in milliseconds when the user requested access to the team. (wire: accessRequestedAt) |
bitbucket | object | Map of the connected Bitbucket account. |
confirmed | boolean | Current status of the membership. Will be true if confirmed, if pending it'll be false. (false, true) |
github | object | Map of the connected GitHub account. |
gitlab | object | Map of the connected GitLab account. |
joined_from | object | A map that describes the origin from where the user joined. (wire: joinedFrom) |
team_slug | string | The slug of the team. (example: my-team) (wire: teamSlug) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | user_id, team_id | Check the status of a join request. It'll respond with a 404 if the request has been declined. If no userId path segment was provided, this endpoint will instead return the status of the authenticated user. | |
create | insert | team_id, joined_from | Request access to a team as a member. An owner has to approve the request. Only 100 users can request access to a team at the same time. |
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 |
|---|---|---|
team_id | string | |
user_id | string |
SELECT examples​
- get
Check the status of a join request. It'll respond with a 404 if the request has been declined. If no userId path segment was provided, this endpoint will instead return the status of the authenticated user.
SELECT
team_name,
access_requested_at,
bitbucket,
confirmed,
github,
gitlab,
joined_from,
team_slug
FROM vercel.teams.access_requests
WHERE user_id = '{{ user_id }}' -- required
AND team_id = '{{ team_id }}' -- required
;
INSERT examples​
- create
- Manifest
Request access to a team as a member. An owner has to approve the request. Only 100 users can request access to a team at the same time.
INSERT INTO vercel.teams.access_requests (
joined_from,
team_id
)
SELECT
'{{ joined_from }}' /* required */,
'{{ team_id }}'
RETURNING
team_name,
access_requested_at,
bitbucket,
confirmed,
github,
gitlab,
joined_from,
team_slug
;
# Description fields are for documentation purposes
- name: access_requests
props:
- name: team_id
value: "{{ team_id }}"
description: Required parameter for the access_requests resource.
- name: joined_from
value:
origin: "{{ origin }}"
commitId: "{{ commitId }}"
repoId: "{{ repoId }}"
repoPath: "{{ repoPath }}"
gitUserId: "{{ gitUserId }}"
gitUserLogin: "{{ gitUserLogin }}"