Skip to main content
Expose sandbox ports to the internet.

oc preview create <sandbox-id>

HTTP API →
--port
int
required
Container port to expose
--domain
string
Custom domain
oc preview create sb-abc --port 3000

oc preview list <sandbox-id>

HTTP API → Output columns: PORT, HOSTNAME, SSL, CREATED

oc preview delete <sandbox-id> <port>

HTTP API →

oc preview rotate-auth <sandbox-id>

HTTP API → Mint a new bearer token for the sandbox’s preview URLs. The old token stops working immediately. The new plaintext is printed once — capture it before moving on; the server will not return it again.
oc preview rotate-auth sb-abc
# New preview auth token (shown once): qx2sSi5IYX...
Calling this on a sandbox that was created without --preview-auth installs a token and starts enforcing the gate from that point on. See oc sandbox create --preview-auth to enable at create time, or --preview-auth-token to bring your own.