SandboxesFiles

Delete a file or directory

Delete the entry at path.

  • A non-empty directory needs recursive=true, else 409 directory_not_empty.
  • A recursive delete removes a directory symlink and never follows it.
  • Runs in the sandbox as the image user, or as user when set. Setting user needs write access to the sandbox.
  • Served at the access endpoint of the sandbox (access_endpoint of GET /v1/sandboxes/{sandboxId}), not at the API host.
  • A paused sandbox returns 409, unless resume=true. A sandbox that started before its files server existed returns 409 sandbox_update_required until it restarts.
  • A refused operation returns its code as the problem type.
  • A path that starts with ~ or ~/ names the home directory of the user that the operation runs as. ~name returns 422.
DELETE
/v1/sandboxes/{sandboxId}/files
AuthorizationBearer <token>

API key starting with tektona_. Create one at app-dev.tektona.ai under API Keys.

In: header

Path Parameters

sandboxId*string

Sandbox ID (ULID)

Query Parameters

path*string

Path in the sandbox: absolute, or relative to the sandbox working directory

Length1 <= length
recursive?boolean

Delete a non-empty directory and everything under it; a directory symlink is removed, never followed

user?string

Guest user to run as, by name or uid; defaults to the image user. Needs write access to the sandbox

Match^[a-z_][a-z0-9_-]{0,31}$|^[0-9]{1,10}$
resume?boolean

Wake a paused sandbox to serve this request

Response Body

application/problem+json

curl -X DELETE "https://example.com/v1/sandboxes/string/files?path=string"

No body.

Create a signed file URL POST

Return a URL at the access endpoint of the sandbox that downloads (GET) or uploads (PUT) one file without other credentials, for at most 15 minutes. A GET URL with format downloads the tree at path as an archive instead, like GET files/archive without exclude. GET needs read access, PUT and user need write access. A change to the access of the caller or to the shares of the sandbox ends the URL. A PUT URL uploads once.

Download a tar archive GET

Stream the tree at `path` as a tar or tar.gz archive. Names are relative to `path`, and a directory name ends in `/`. - A file `path` gives one entry. A symlink to a directory as `path` archives the children of the target. - A file that grows during the read sends its first part. A file that shrinks fails the archive. An entry that disappears during the walk is skipped. - Each entry header holds the mode, the uid and gid, the owner and group names, and the mtime. - The download takes one transfer slot and stops after 60 seconds without progress. - Runs in the sandbox as the image user, or as `user` when set. Setting `user` needs write access to the sandbox. - Served at the access endpoint of the sandbox (`access_endpoint` of `GET /v1/sandboxes/{sandboxId}`), not at the API host. - A paused sandbox returns 409, unless `resume=true`. A sandbox that started before its files server existed returns 409 `sandbox_update_required` until it restarts. - A refused operation returns its code as the problem type. - A path that starts with `~` or `~/` names the home directory of the user that the operation runs as. `~name` returns 422. See [Download a folder](https://docs.tektona.ai/files#download-a-folder) in the guide for several paths, `exclude`, symlinks and failures.