Skip to main content
One sandbox calls a port of another sandbox of the same account by name: no exposed port and no API key inside either sandbox.

Name a sandbox

Create a sandbox with metadata["styne.name"] (1 to 63 lowercase letters, digits or inner dashes). The name points at that sandbox until it ends; a create that asks for a name a live sandbox of your account holds answers 409 name_taken, and once the holder is gone the next create takes the name. GET /names lists your names. Names belong to your account: another account can use the same name and never reaches yours.

Call a port by name

The request (method, path, query, headers and body) goes to http://localhost:{port}/{path} inside the named sandbox, and its answer comes back as the sandbox sent it. From inside a sandbox, authenticate with the sandbox’s own token:
An API key works the same from outside. {name} may also be the id of a sandbox of your account. What the called sandbox sees: Both are set by the API, never taken from the request, so the called service can trust them. The caller’s Authorization header is removed before the request reaches the sandbox. A paused sandbox that wakes on traffic is resumed by the call. Answers of the API itself: For WebSocket upgrades use an exposed port.

Operations