Get Connections
Endpoints
Get Connections
Retrieve all active network listeners and connections on the system
GET
Get Connections
Endpoint
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.
Array of all listening ports on the system
Array of all established TCP connections
Example Response
Error Responses
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