import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
const response = await client.devboxes.downloadFile('id', { path: 'path' });
console.log(response);
const content = await response.blob();
console.log(content);"<string>"Download file contents of any type (binary, text, etc) from a specified path on the Devbox.
import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
const response = await client.devboxes.downloadFile('id', { path: 'path' });
console.log(response);
const content = await response.blob();
console.log(content);"<string>"Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The Devbox ID.
The path on the Devbox filesystem to read the file from. Path is relative to user home directory.
OK
The response is of type file.
Was this page helpful?