Skip to main content
GET
Get Connections

Endpoint

Retrieves comprehensive information about all listening ports and established network connections on the system. This endpoint uses the ss command internally to gather network statistics.

Request

No parameters required. This is a simple GET request.

Response

Returns a JSON object containing two arrays: listeners and connections.
Listener[]
required
Array of all listening ports on the system
Connection[]
required
Array of all established TCP connections

Example Response

Error Responses

string
Error message describing what went wrong

500 Internal Server Error

Returned when the system fails to retrieve connection data (e.g., ss command not available or permission issues).

Implementation Notes

  • The endpoint is configured with dynamic = "force-dynamic" to ensure fresh data on every request
  • Uses the ss (socket statistics) command internally to gather network information
  • Automatically detects Docker containers and enriches listener data with container names
  • Provides intelligent service detection for common ports (Redis on 6379, PostgreSQL on 5432, etc.)
  • Excludes the psys application itself from appearing as a generic listener