Skip to main content

permissions

Creates, updates, deletes, gets or lists a permissions resource.

Overview

Namepermissions
TypeResource
Idvercel.vcr.permissions

Fields

The following fields are returned by SELECT queries:

A team's access grant to a Vercel Container Registry repository.

NameDatatypeDescription
repository_idstringIdentifier of the repository the permission grants access to. (example: repo_a1b2c3d4e5f6) (wire: repositoryId)
team_idstringIdentifier of the team that is granted access to the repository. (example: team_a1b2c3d4e5f6) (wire: teamId)
created_atstringISO 8601 timestamp of when the permission was created. (example: 2026-06-30T10:00:00.000Z) (wire: createdAt)
team_slugstringSlug of the team that is granted access to the repository. (example: my-team) (wire: teamSlug)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectproject_id, id_or_namelimit, cursor, team_id, slugList the teams a VCR repository is shared with.
createinsertproject_id, id_or_nameslugGrant a team access to a VCR repository. Sharing applies to the whole repository.
deletedeleteproject_id, id_or_nameslugRevoke a team's access to a VCR repository.
clearexecprojectId, id_or_nameteamId, slugRevoke every team's access to a VCR repository. Clearing an unshared repository is a no-op.

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.

NameDatatypeDescription
id_or_namestring
projectIdstringProject ID. Missing or empty values return HTTP 400.
project_idstringProject ID. Missing or empty values return HTTP 400. (wire: projectId)
cursorstringOpaque pagination cursor returned by a previous list response.
limitinteger
slugstringThe Team slug to perform the request on behalf of.
teamIdstringThe Team identifier to perform the request on behalf of.
team_idstringThe Team identifier to perform the request on behalf of. (wire: teamId)

SELECT examples

List the teams a VCR repository is shared with.

SELECT
repository_id,
team_id,
created_at,
team_slug
FROM vercel.vcr.permissions
WHERE project_id = '{{ project_id }}' -- required
AND id_or_name = '{{ id_or_name }}' -- required
AND limit = '{{ limit }}'
AND cursor = '{{ cursor }}'
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;

INSERT examples

Grant a team access to a VCR repository. Sharing applies to the whole repository.

INSERT INTO vercel.vcr.permissions (
team_id,
team_slug,
project_id,
id_or_name,
slug
)
SELECT
'{{ team_id }}',
'{{ team_slug }}',
'{{ project_id }}',
'{{ id_or_name }}',
'{{ slug }}'
RETURNING
permission
;

DELETE examples

Revoke a team's access to a VCR repository.

DELETE FROM vercel.vcr.permissions
WHERE project_id = '{{ project_id }}' --required
AND id_or_name = '{{ id_or_name }}' --required
AND slug = '{{ slug }}'
;

Lifecycle Methods

EXEC variables use wire (API) names.

Revoke every team's access to a VCR repository. Clearing an unshared repository is a no-op.

EXEC vercel.vcr.permissions.clear
@projectId='{{ projectId }}' --required,
@id_or_name='{{ id_or_name }}' --required,
@teamId='{{ teamId }}',
@slug='{{ slug }}'
;