Secrets ›
Delete sandbox file
DELETE
/v1/sandboxes/{id}/secrets/filesRemoves one of the sandbox's secret files. It is no longer written into the sandbox. A copy already written to a sandbox's disk stays there until it is deleted from the disk. It is used from the sandbox's next command, without a restart. Where the sandbox's template names the same one, the sandbox's own is used.
RequestTypeScript
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- const sandbox = await agental.sandboxes.get("sbx_2a9a47e50daec64a");
- await sandbox.secrets.deleteFile(".npmrc");
Answer204 No Content
No body: the status says it was done.
File removed.
Path
idrequiredstring | e.g. "sbx_0123456789abcdef" |
Query
pathrequiredstring | e.g. ".npmrc" |
Headers
AuthorizationrequiredBearer key | An API key that may make this call. |
Returns
204 File removed.
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.