previews

One preview, with a fresh token if it is private.

get/v1/sandboxes/{id}/previews/{port}

Request

  • Base URL: https://api.withruntime.com
  • URL: https://api.withruntime.com/v1/sandboxes/{id}/previews/{port}
  • Auth: HTTP bearer

Path parameters

idstring required

Resource identifier (UUID).

portstring required

The previewed port.

Query parameters

ttlSecondsinteger

The token's lifetime in seconds.

expiresAtstring date-time

An absolute private-token deadline, at least a minute and at most a week ahead. The token never outlives it.

Response

Success

idstring
sandboxIdstring
portinteger
visibilitystring
urlstring

The address. A private preview also needs the token.

tokenstring nullable

Private previews: a token signed for this answer. Every create and read signs its own, each with its own tokenExpiresAt (a day unless ttlSeconds or expiresAt asks otherwise); tokens signed before keep working until their own expiry or a rotate. Null for a key that cannot run commands in the sandbox, such as a read-only key.

tokenExpiresAtstring date-time nullable

When this answer's token stops working. It is not stored on the preview: another read signs another token with its own expiry, and does not shorten or extend this one.

urlWithTokenstring nullable

Private previews: a link that carries the token once, for a browser.

disabledboolean

Turned off by Runtime after a report. Contact support.

embedOriginsstring[] nullable

The sites that may show it in an iframe; null for any site.

createdAtstring date-time

Changes

No recorded changes to this operation across all 1 revision of this API.