SandboxesNetworking

Issue a preview URL for a sandbox port

Issue a signed preview URL for a port on the sandbox. Returns a canonical URL for public sandboxes or a short-lived token URL otherwise.

POST
/v1/sandboxes/{idOrName}/ports/{port}/preview-url
AuthorizationBearer <token>

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

In: header

Path Parameters

idOrName*string

Sandbox ID (ULID) or name

port*integer

In-VM port.

Formatint64
Range1 <= value <= 65535

Query Parameters

org?string

Required when the path names the sandbox by name.

project?string

Required when the path names the sandbox by name.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

ttl_seconds?integer

Optional TTL in seconds. Bounds 60..86400. When absent and sandbox is public, returns the public URL with no token. When absent and sandbox is private, default 12h applies.

Formatint64
Range0 <= value <= 86400

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/v1/sandboxes/string/ports/1/preview-url" \  -H "Content-Type: application/json" \  -d '{}'
{  "expires_at": "2019-08-24T14:15:22Z",  "kind": "public",  "token": "string",  "url": "string"}