Docs
Templates ›

Delete template file

DELETE/v1/templates/{id}/secrets/files

Removes one of the template'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. A sandbox on the template takes the change when it next starts, or when POST /v1/templates/{id}/apply names it.

RequestTypeScript
  1. import { Agental } from "agental-sdk";
  2. const agental = new Agental();
  3. const template = await agental.templates.get("tpl_0123456789abcdef");
  4. await template.secrets.deleteFile(".npmrc");
Answer204 No Content

No body: the status says it was done.

File removed.

Path

idrequired
string
e.g. "tpl_0123456789abcdef"

Query

pathrequired
string
e.g. ".npmrc"

Headers

Authorizationrequired
Bearer key
An API key that may make this call.

Returns

204 File removed.

Errors and other answers

400invalid_request the name, path or value is not one that can be kept.
400invalid_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.