curl "https://api.buntime.sh/files/read?sessionId=ses_abc123&path=hello.ts" \
-H "Authorization: Bearer $BUNTIME_API_KEY"
const content = await client.files.read({
sessionId: 'ses_abc123',
path: 'hello.ts'
});
console.log(content);
Files
Read File
Read the contents of a file
GET
/
files
/
read
curl "https://api.buntime.sh/files/read?sessionId=ses_abc123&path=hello.ts" \
-H "Authorization: Bearer $BUNTIME_API_KEY"
const content = await client.files.read({
sessionId: 'ses_abc123',
path: 'hello.ts'
});
console.log(content);
Request
string
required
Session ID containing the file
string
required
File path relative to /workspace
string
required
Bearer token with your API key
Response
Returns the raw file content with appropriate Content-Type header.Example
curl "https://api.buntime.sh/files/read?sessionId=ses_abc123&path=hello.ts" \
-H "Authorization: Bearer $BUNTIME_API_KEY"
const content = await client.files.read({
sessionId: 'ses_abc123',
path: 'hello.ts'
});
console.log(content);