Skip to content
  • Auto
  • Light
  • Dark
Get Started
View as Markdown
Copy Markdown

Open in Claude
Open in ChatGPT

Get Content

client.vals.files.getContent(stringvalID, FileGetContentParams { path_, branch_id, version, 5 more } params, RequestOptionsoptions?): Response
get/v2/vals/{val_id}/files/content

Download file content

ParametersExpand Collapse
valID: string
params: FileGetContentParams { path_, branch_id, version, 5 more }
path_: string

Query param: Path to a file or directory (e.g. 'dir/subdir/file.ts'). Pass in an empty string to represent the root directory.

branch_id?: string

Query param: Id to query

formatuuid
version?: number

Query param: Specific branch version to query

minimum0
cacheControl?: string

Header param:

ifMatch?: string

Header param:

ifModifiedSince?: string

Header param:

ifNoneMatch?: string

Header param:

ifUnmodifiedSince?: string

Header param:

ReturnsExpand Collapse
unnamed_schema_1 = Response
import ValTown from "npm:@valtown/sdk";

const client = new ValTown();

const response = await client.vals.files.getContent('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { path: 'path' });

console.log(response);

const content = await response.blob();
console.log(content);
Returns Examples