Secrets ›
Get sandbox files
GET
/v1/sandboxes/{id}/secrets/filesWith path, one of the sandbox's secret files and what it holds. Without, the paths of them all.
RequestTypeScript
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- const sandbox = await agental.sandboxes.get("sbx_2a9a47e50daec64a");
- const npmrc = await sandbox.secrets.readFile(".npmrc");
Answer200 OK
No JSON body.
The file, or the paths of all of them.
Path
idrequiredstring | e.g. "sbx_0123456789abcdef" |
Query
pathstring | A file's path, relative to the sandbox's working folder. Given, the answer is that file. Left out, it is the paths of them all. e.g. ".npmrc" |
Headers
AuthorizationrequiredBearer key | An API key that may make this call. |
Returns
200 The file, or the paths of all of them.
Errors and other answers
| 400 | invalid_request the name, path or value is not one that can be kept. |
| 400 | invalid_path the path leads out of the working folder. |
| 404 | Not found. |
Every error answers { "error": { "code", "message" } }; a key without the action a call needs answers 403 key_action_forbidden, naming it.