SandboxesFiles

Create a signed file URL

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 an archive instead, like GET files/archive: of path, or of paths, without the entries that exclude matches. 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.

POST
/v1/sandboxes/{sandboxId}/files/signed-url
AuthorizationBearer <token>

API key starting with tektona_. Create one at app-dev.tektona.sebastian-holstein.de under API Keys.

In: header

Path Parameters

sandboxId*string

Sandbox ID (ULID)

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

exclude?array<string>|

With format only: skip the entries that match, as exclude of GET files/archive

Itemsitems <= 64
expires_in?integer

Seconds until the URL expires

Formatint64
Range1 <= value <= 900
Default300
format?string

GET only: download the tree at path as an archive in this format, like GET files/archive, instead of one file

Value in

  • "tar"
  • "tar.gz"
method*string

GET downloads (HEAD works too), PUT uploads once

Value in

  • "GET"
  • "PUT"
path?string

Path in the sandbox: absolute, or relative to the sandbox working directory. Set path or paths, not both

Length1 <= length
paths?array<string>|

With format only: the entries to archive, as the path parameters of GET files/archive. Set path or paths, not both

Items1 <= items <= 64
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}$

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/v1/sandboxes/string/files/signed-url" \  -H "Content-Type: application/json" \  -d '{    "method": "GET"  }'
{  "expires_at": "2019-08-24T14:15:22Z",  "method": "string",  "single_use": true,  "url": "string"}