Previews
AuthorizationBearer <token>Bearer project API key.
Scope: read:sandboxes
sandbox_id*stringThe sandbox ID
limit?integerMaximum number of items to return, 1–200 (default 100)
int641 <= value <= 200100cursor?stringOpaque continuation token returned as next_cursor by a previous request
The page of sandbox ports
application/json- response
A keyset page of exposed sandbox ports.
next_cursor?|Opaque continuation token, or null on the last page.
ports*array<>Exposed sandbox ports in this page.
curl -X GET 'https://example.com/sandboxes/string/ports'{ "next_cursor": "string", "ports": [ { "created_at": "2019-08-24T14:15:22Z", "port": 0, "public": true, "url": "string" } ]}AuthorizationBearer <token>Bearer project API key.
Scope: read:sandboxes
sandbox_id*stringThe sandbox ID
port*integerThe port number
int32The sandbox port
application/json- response
One exposed sandbox port on the wire (with the computed URL).
created_at*stringWhen the port was first exposed.
date-timeport*integerTCP port exposed from the sandbox.
int32public*booleanWhether the port is publicly accessible.
url*stringHost-based preview URL, <scheme>://<port>-<sandbox_id>.<domain>/.
curl -X GET 'https://example.com/sandboxes/string/ports/0'{ "created_at": "2019-08-24T14:15:22Z", "port": 0, "public": true, "url": "string"}AuthorizationBearer <token>Bearer project API key.
Scope: write:sandboxes
sandbox_id*stringThe sandbox ID
port*integerThe port number
int32Sandbox port deleted
curl -X DELETE 'https://example.com/sandboxes/string/ports/0'Replaces the port configuration.
AuthorizationBearer <token>Bearer project API key.
Scope: write:sandboxes
sandbox_id*stringThe sandbox ID
port*integerThe port number
int32application/json- body
public*booleanWhether the port is accessible without a credential.
The sandbox port, updated
application/json- response
One exposed sandbox port on the wire (with the computed URL).
created_at*stringWhen the port was first exposed.
date-timeport*integerTCP port exposed from the sandbox.
int32public*booleanWhether the port is publicly accessible.
url*stringHost-based preview URL, <scheme>://<port>-<sandbox_id>.<domain>/.
curl -X PUT 'https://example.com/sandboxes/string/ports/0' \ -H 'Content-Type: application/json' \ -d '{ "public": true}'{ "created_at": "2019-08-24T14:15:22Z", "port": 0, "public": true, "url": "string"}Returns the port's preview URL, exposing the port as private first when it is not already exposed.
AuthorizationBearer <token>Bearer project API key.
Scope: write:sandboxes
sandbox_id*stringThe sandbox ID
port*integerThe port number
int32The created preview URL
application/json- response
A preview URL and its access token.
token*stringSecret value sent in the x-daytona-preview-token header.
url*stringHost-based preview URL, <scheme>://<port>-<sandbox_id>.<domain>/.
curl -X POST 'https://example.com/sandboxes/string/ports/0/preview-url'{ "token": "string", "url": "string"}Creates a short-lived preview link for one port. Each link can be revoked independently.
AuthorizationBearer <token>Bearer project API key.
Scope: write:sandboxes
sandbox_id*stringThe sandbox ID
port*integerThe port number
int32application/json- body
The created signed preview URL
application/json- response
A signed preview link.
expires_at*stringWhen the link stops resolving (natural expiry).
date-timetoken*stringThe plaintext signed token (s + 32 hex). Returned exactly once, here;
only its hash is stored. Needed separately from url for the revoke
route.
url*stringHost-based preview URL, <scheme>://<port>-<token>.<domain>/ — the
token replaces the sandbox id in the hostname, so the link reveals no
sandbox identity.
curl -X POST 'https://example.com/sandboxes/string/ports/0/signed-preview-urls'{ "expires_at": "2019-08-24T14:15:22Z", "token": "string", "url": "string"}Revokes one signed preview link. An unknown or expired token is accepted without revealing whether it existed.
AuthorizationBearer <token>Bearer project API key.
Scope: write:sandboxes
sandbox_id*stringThe sandbox ID
port*integerThe port number
int32application/json- body
token*stringThe plaintext signed token returned by the mint operation.
Signed preview URL revoked
curl -X POST 'https://example.com/sandboxes/string/ports/0/signed-preview-urls/revoke' \ -H 'Content-Type: application/json' \ -d '{ "token": "string"}'