public.servers.ports
const url = 'https://rest.watchtower15.com/v1/servers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ports?include_retired=true&include_total=true';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://rest.watchtower15.com/v1/servers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ports?include_retired=true&include_total=true' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”ServersPortsResource
object
object
One of tcp, udp.
any, loopback or specific; the addresses only for specific.
The bound addresses of a specific bind; empty for any other (never null: a nullable array is not a type the spec validator reads).
The owner’s kernel comm, never a command line.
Whether the port is listening now.
open or closed.
Whether a user asked for this ephemeral port to be tracked.
Whether the port is marked as expected to be open.
Whether the port has a series, alarms and a history: not ephemeral, or ephemeral and tracked.
One of unknown, healthy, warning, critical.
The whole list’s size; present only with include_total=true.
object
Whether the cap on charted ports is full: new ports are then not added until one retires.
Example generated
{ "data": [ { "uuid": "example", "port": 1, "protocol": "example", "bind_scope": "example", "addresses": [ "example" ], "process_name": "example", "is_open": true, "state": "example", "opened_at": 1, "closed_at": 1, "first_seen_at": 1, "tracked": true, "expected": true, "charted": true, "health_status": "example", "retired_at": 1 } ], "next_cursor": "example", "total": 1, "meta": { "reported_at": 1, "capped": true }}The API key is missing, malformed, expired or revoked.
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}The key or its owner does not hold what the operation needs.
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}No such record in this organisation (an absent id and another organisation’s answer alike).
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}The request is invalid; errors names the parameters.
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}A rate limit or the organisation’s daily limit is reached; Retry-After says when to retry.
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}An unexpected error.
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}