Out Plane
port

port get

Print one port's address.

read onlyrepeatable

One port's address, printed on its own so it can be read straight into a variable or a health check.

A private port has no address, and this says so rather than printing an empty line.

Usage

outplane port get <PORT> [flags]

Arguments

ArgumentTypeDescription
PORTstringThe port number. Required.

Flags

FlagTypeDescription
--appstringApplication 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

FieldTypeDescription
portint
portIdstring
schemestringOne of http, h2c, tcp.
publicbool
urlstringThe address. Text mode prints this alone.
customDomainsarray

This command prints a bare value in every format, so it can be read straight into a variable. It has no JSON form.

Examples

Print one port's address

outplane port get 3000

Call the application at it

curl "$(outplane port get 3000)/health"

Read the whole record instead

outplane port get 3000 --app checkout --json
{
  "port": 3000,
  "public": true,
  "scheme": "http",
  "url": "https://checkout-3000-acme.outplane.app"
}

What to Know

  • Text mode writes the address and a newline, with nothing else on standard output, which is what makes command substitution safe. Notes and errors go to standard error as everywhere else.
  • Piped output stays text rather than becoming JSON, unlike most commands here. --json still gives the object for a caller that wants the record.
  • A private port exits 5 with port.no_address. It is not a missing port, and port list shows it.
  • A port that does not exist exits 5 with port.not_found and the error names the ports that do.

Errors

Beyond 0 for success, this command exits with:

ExitKindMeaning
2usageInvalid arguments, unknown flag, or client-side validation failure.
3authNot authenticated, token revoked or expired, or forbidden for this team.
5not_foundThe named resource does not exist, or is not visible to this credential.
8upstreamThe Out Plane API returned a server error.

The code on the error object is one of port.not_found, port.no_address, usage.bad_port, context.no_app, app.not_found. Branch on that, or on the exit status. The message is prose and changes.

On this page