SandboxesFiles

Download a tar archive

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 in the guide for several paths, exclude, symlinks and failures.

GET
/v1/sandboxes/{sandboxId}/files/archive
AuthorizationBearer <token>

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

In: header

Path Parameters

sandboxId*string

Query Parameters

path*array<string>

Entry to archive; repeat for more, at most 64

Items1 <= items <= 64
format?string
Default"tar"

Value in

  • "tar"
  • "tar.gz"
exclude?array<string>

Skip entries that match; repeat for more, at most 64

Itemsitems <= 64
user?string
resume?boolean

Response Body

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

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

The body is not JSON: application/gzip, application/x-tar