Get Deployment File Contents
GET
https://api.vercel.com/v8/deployments/{id}/files/{fileId}Allows to retrieve the content of a file by supplying the file identifier and the deployment unique identifier. The response body will contain a JSON response containing the contents of the file encoded as base64.
https://api.vercel.com/v8/deployments/{id}/files/{fileId}
const response = await fetch('https://api.vercel.com/v8/deployments/id/files/fileId?path=string&teamId=string&slug=string', { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', },});
const data = await response.json();console.log(data);Response
{}AuthorizationbearerToken
Default authentication mechanism
400One of the provided values in the request query is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
404File not found
Deployment not found
410Invalid API version.