Skip to content

Ports API

WSS/v1/sprites/{name}/ports/watch

Watch for port open/close events across all processes in the sprite namespace. On connect, sends a snapshot of all currently listening ports as a port_list message, then streams incremental port_opened/port_closed events.

StatusDescription
101Switching Protocols - WebSocket connection established
400Bad Request - Invalid WebSocket upgrade or missing parameters
404Not Found - Resource not found
FieldTypeDescription
typestring(const: "port_list")
portsPortNotificationMessage[]
FieldTypeDescription
typePortNotificationTypeNotification type
portnumberPort number
addressstringProxy URL for accessing the port
pidnumberProcess ID that opened/closed the port
{
"address": "https://my-sprite.sprites.dev:3000",
"pid": 1847,
"port": 3000,
"type": "port_opened"
}
Request