Skip to main content
GET
Retrieve a published port

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

sailbox_id
string
required

Id of the Sailbox, as returned by create. It is sb_ followed by a UUID.

Pattern: ^sb_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
guest_port
integer
required

Port inside the Sailbox that the listener sends traffic to.

Required range: 1 <= x <= 65535

Response

The published port.

guest_port
integer
required

Port inside the Sailbox that traffic is sent to.

protocol
string
required

Protocol the listener serves. Values in use today are http and tcp. New values can appear over time, so treat this as an open set.

route_status
string
required

Whether the Sailbox behind this listener is up. LISTENER_ROUTE_STATUS_ACTIVE means it is running and traffic is being routed to it. LISTENER_ROUTE_STATUS_PENDING means it is still starting. LISTENER_ROUTE_STATUS_UNAVAILABLE means the address is held for the Sailbox but nothing is routed there, which is what you see any time it is not running, such as while it is paused or sleeping. This tracks the Sailbox, not the process inside it, so an active route with nothing listening on the port still fails to answer. New values can appear over time, so treat this as an open set.

public_url
string

HTTPS URL for an http listener.

Example:

"https://sb-9c8f1e2a-3b4d-4f5a-8c7e-1d2f3a4b5c6d-8000.sail.box"

public_host
string

Host to dial for a tcp listener.

public_port
integer

Port to dial for a tcp listener.

allowlist
string[]

Sources allowed to reach the listener: addresses, ranges, and app names.