Extensions API
Sessions

Sessions

Extensions can list available sessions, retrieve the entry IDs within them and get the proxy server port for a session. Sessions are containers for captured HTTP traffic, each with a unique identifier and name.


sessions/list

Returns all sessions currently loaded in powhttp.

Parameters: None

Result:

Array<{
  id: string;
  name: string;
}>

Example Result:

[
  { "id": "01K88WXWGVPX6PHAJ868JBFF5B", "name": "Session 1" },
  { "id": "01K88WXYMFPX7STP72JG319G0C", "name": "Session 2" }
]

sessions/get_listener_port

Returns the local port the proxy server is listening on for a session. Returns null if the session does not exist or the proxy server is not running.

Parameters:

{
  sessionId: string;
}

Result: Option<number>


sessions/get_entry_ids

Returns the entry IDs within a session. Returns null if the session does not exist.

Parameters:

{
  sessionId: string;
}

Result: Option<Array<string>>