Skip to main content

files

Overview

Namefiles
TypeResource
Idvercel.deployments.files

Fields

NameDatatypeDescription
namestringThe name of the file tree entry
childrenarrayThe list of children files of the directory (only valid for the directory type)
contentTypestringThe content-type of the file (only valid for the file type)
modenumberThe file "mode" indicating file type and permissions.
symlinkstringNot currently used. See file-list-to-tree.ts.
typestringString indicating the type of file tree entry.
uidstringThe unique identifier of the file (only valid for the file type)

Methods

NameAccessible byRequired ParamsDescription
list_deployment_filesSELECTid, teamIdAllows to retrieve the file structure of a deployment by supplying the deployment unique identifier.
get_deployment_file_contentsEXECfileId, id, teamIdAllows to retrieve the content of a file by supplying the file identifier and the deployment unique identifier. The response body will contain the raw content of the file.
upload_fileEXECteamIdBefore you create a deployment you need to upload the required files for that deployment. To do it, you need to first upload each file to this endpoint. Once that's completed, you can create a new deployment with the uploaded files. The file content must be placed inside the body of the request. In the case of a successful response you'll receive a status code 200 with an empty body.