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 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.

POST
/v1/sandboxes/{sandboxId}/files/signed-url
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)

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

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

Length1 <= length
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",    "path": "string"  }'
{  "expires_at": "2019-08-24T14:15:22Z",  "method": "string",  "single_use": true,  "url": "string"}