Ports

Expose a port on a public preview URL

Returns an https URL that reaches the given port inside the sandbox. The server does not need to bind a public interface — listening on localhost is enough, exactly as on a laptop. The URL carries an unguessable token and stops working the moment the sandbox does. Asking twice for the same port returns the same URL.

post/sandboxes/{id}/ports

Request

  • Base URL: https://sandbox-as-a-service.com/v1
  • URL: https://sandbox-as-a-service.com/v1/sandboxes/{id}/ports
  • Auth: HTTP bearer

Path parameters

idstring required

Request body

portinteger required

Example request

{
  "port": 3000
}

Response

The preview URL.

objectstring
sandbox_idstring
portinteger
urlstring uri
created_atstring date-time

Example response

{
  "object": "port",
  "port": 3000
}

Changes

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