Preview. Make a port public, so that anyone with its URL opens it, or private again. A new connection sees the change within seconds, and an open one stays open.
PUT
header
AuthorizationBearer <token>Your Munito API key.
sandbox_id*stringThe id of the sandbox.
port*integerA TCP port in the sandbox.
Range
1 <= value <= 65535application/json- body
public*booleanOpen the port to anyone with its URL, or close it to all but the token and signed URLs.
The port, public or private as asked.
application/json- response
object?stringDefault
"sandbox.port"sandbox_id*stringport*integerpublic*booleanAnyone with the URL opens the port. A private port takes the token or a signed URL.
url*stringThe port's URL. A server that listens on the port, on 0.0.0.0 or 127.0.0.1, answers there.
token*stringThe 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 PUT 'https://api.munito.ai/sandboxes/v1/sandboxes/string/ports/1' \
-H 'Content-Type: application/json' \
-d '{
"public": true
}'Example Response
{
"object": "sandbox.port",
"sandbox_id": "string",
"port": 0,
"public": true,
"url": "string",
"token": "string"
}