Skip to main content

List open ports

GET/api/ports

Lists the TCP ports listening on the machine, with the process or Docker container that owns each one. With server, the route returns the array that homebutler ports --json prints on that server, without the ports wrapper. When the ports cannot be listed, the route returns 500 with the reason.

Authorizations

Authorizationstringheader

The token you start the server with: homebutler serve --token <token>, or web.token in the config file. Send it as Authorization: Bearer <token>. When the server has a token, every /api/ route except the CORS preflight requires it, reads included.

Query parameters

serverstring

The name of a remote server from List servers. homebutler runs the command on it over SSH and returns its answer. Leave it out, name the local server, or name a server that is not in the config, to read this machine.

Example: nas

Response

200 · application/json

The listening ports. The example is shortened.

portsobject[]required

The listening ports.

missing_processboolean

true when the process behind some ports could not be read.