port
port list
List the ports an application serves.
read onlyrepeatable
Every port the application serves: the scheme, whether it is public, and where it answers.
An empty list means nothing can reach the application, however healthy its last deployment was.
Usage
outplane port list [flags]Flags
| Flag | Type | Description |
|---|---|---|
--app | string | Application name or id. Defaults to the linked app. A flag rather than an argument, so that port numbers cannot be mistaken for it. |
The global flags apply as well.
Output
| Field | Type | Description |
|---|---|---|
port | int | The port the application listens on. |
portId | string | The port's own id, which attaching a custom domain needs. |
scheme | string | How it is served. An unknown value arrives as unknown:N rather than being guessed. One of http, h2c, tcp. |
public | bool | Whether it is reachable from outside the platform. |
url | string | null | The address, or null for a private port. TCP is host:port rather than a URL. |
domains | int | How many custom domains point at this port. |
customDomains | array | Their full addresses. |
Examples
List the linked application's ports
outplane port listList another application's
outplane port list --app checkoutFind the public ones in a script
outplane port list --json --fields port,public,url{
"items": [
{
"port": 3000,
"public": true,
"url": "https://checkout-3000-acme.outplane.app"
},
{
"port": 5432,
"public": false,
"url": null
}
],
"total": 2,
"truncated": false
}What to Know
- url is null for a private port, which is not an error: a private port is reachable from inside the platform and has no address at all.
- A public TCP port's url is a host and a port number, not a URL with a scheme. The platform allocates the outside port number and it is not the one the application listens on.
- portId is what
outplane domain pointneeds. The port number is not enough, because a domain is attached to the port record. - An empty list means nothing can reach the application, including a deployment that is otherwise healthy.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
5 | not_found | The named resource does not exist, or is not visible to this credential. |
8 | upstream | The Out Plane API returned a server error. |
The code on the error object is one of context.no_app, app.not_found. Branch on that, or on the exit status. The message is prose and changes.