Get a port

Preview. The URL of a port of the sandbox, and whether it is public. A server that listens on the port in the sandbox, on 0.0.0.0 or 127.0.0.1, answers at the URL over HTTPS and WebSockets. A private port takes the sandbox's token in the header munito-sandbox-token, or a signed URL.

GET
/sandboxes/{sandbox_id}/ports/{port}

Authorization

headerAuthorizationBearer <token>

Your Munito API key.

Path Parameters

sandbox_id*string

The id of the sandbox.

port*integer

A TCP port in the sandbox.

Range1 <= value <= 65535

Response Body

The port: its URL, whether it is public, and the sandbox's token.

application/json
  1. response
object?string
Default"sandbox.port"
sandbox_id*string
port*integer
public*boolean

Anyone with the URL opens the port. A private port takes the token or a signed URL.

url*string

The port's URL. A server that listens on the port, on 0.0.0.0 or 127.0.0.1, answers there.

token*string

The sandbox's token. Send it in the header munito-sandbox-token to open any of its ports. It lasts as long as the sandbox.

curl -X GET 'https://api.munito.ai/sandboxes/v1/sandboxes/string/ports/1'
Example Response
{
  "object": "sandbox.port",
  "sandbox_id": "string",
  "port": 0,
  "public": true,
  "url": "string",
  "token": "string"
}