GET
/
v6
/
deployments
/
{id}
/
files
import { Vercel } from "@vercel/sdk";

const vercel = new Vercel({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await vercel.deployments.listDeploymentFiles({
    id: "<id>",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    slug: "my-team-url-slug",
  });

  // Handle the result
  console.log(result);
}

run();
[
  {
    "name": "my-file.json",
    "type": "file",
    "uid": "2d4aad419917f15b1146e9e03ddc9bb31747e4d0",
    "children": [
      {}
    ],
    "contentType": "application/json",
    "mode": 123,
    "symlink": "<string>"
  }
]

Authorizations

Authorization
string
header
required

Default authentication mechanism

Path Parameters

id
string
required

The unique deployment identifier

Query Parameters

teamId
string

The Team identifier to perform the request on behalf of.

Example:

"team_1a2b3c4d5e6f7g8h9i0j1k2l"

slug
string

The Team slug to perform the request on behalf of.

Example:

"my-team-url-slug"

Response

200
application/json
Retrieved the file tree successfully
name
string
required

The name of the file tree entry

Example:

"my-file.json"

type
enum<string>
required

String indicating the type of file tree entry.

Available options:
directory,
file,
symlink,
lambda,
middleware,
invalid
Example:

"file"

mode
number
required

The file "mode" indicating file type and permissions.

uid
string

The unique identifier of the file (only valid for the file type)

Example:

"2d4aad419917f15b1146e9e03ddc9bb31747e4d0"

children
object[]

The list of children files of the directory (only valid for the directory type)

A deployment file tree entry

contentType
string

The content-type of the file (only valid for the file type)

Example:

"application/json"

Not currently used. See file-list-to-tree.ts.