deployment_files
Creates, updates, deletes, gets or lists a deployment_files resource.
Overview​
| Name | deployment_files |
| Type | Resource |
| Id | vercel.deployments.deployment_files |
Fields​
The following fields are returned by SELECT queries:
- list
A deployment file tree entry
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the file tree entry (example: my-file.json) |
children | array | The list of children files of the directory (only valid for the directory type) |
content_type | string | The content-type of the file (only valid for the file type) (example: application/json) (wire: contentType) |
mode | number | The file "mode" indicating file type and permissions. |
type | string | String indicating the type of file tree entry. (directory, file, invalid, lambda, middleware, symlink) (example: file) |
uid | string | The unique identifier of the file (only valid for the file type) (example: 2d4aad419917f15b1146e9e03ddc9bb31747e4d0) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | id | team_id, slug | 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. |
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 | string | The unique deployment identifier |
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) |
SELECT examples​
- list
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 }}'
;