Skip to main content

deployment_files

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

Overview​

Namedeployment_files
TypeResource
Idvercel.deployments.deployment_files

Fields​

The following fields are returned by SELECT queries:

A deployment file tree entry

NameDatatypeDescription
namestringThe name of the file tree entry (example: my-file.json)
childrenarrayThe list of children files of the directory (only valid for the directory type)
content_typestringThe content-type of the file (only valid for the file type) (example: application/json) (wire: contentType)
modenumberThe file "mode" indicating file type and permissions.
typestringString indicating the type of file tree entry. (directory, file, invalid, lambda, middleware, symlink) (example: file)
uidstringThe unique identifier of the file (only valid for the file type) (example: 2d4aad419917f15b1146e9e03ddc9bb31747e4d0)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectidteam_id, slugAllows to retrieve the file structure of the source code of a deployment by supplying the deployment unique identifier. If the deployment was created with the Vercel CLI or the API directly with the files key, it will have a file tree that can be retrievable.

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
idstringThe unique deployment identifier
slugstringThe Team slug to perform the request on behalf of.
team_idstringThe Team identifier to perform the request on behalf of. (wire: teamId)

SELECT examples​

Allows to retrieve the file structure of the source code of a deployment by supplying the deployment unique identifier. If the deployment was created with the Vercel CLI or the API directly with the files key, it will have a file tree that can be retrievable.

SELECT
name,
children,
content_type,
mode,
type,
uid
FROM vercel.deployments.deployment_files
WHERE id = '{{ id }}' -- required
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;