Data API Overview
The Data API provides a RESTful HTTP interface to programmatically access session data, entries and connection details from powhttp. This enables you to build custom integrations, export data to external tools, or automate workflows based on captured network traffic.
All endpoints return JSON responses and support standard HTTP status codes for success and error conditions. The API is read-only and provides access to the same data visible in the powhttp interface.
Enabling the API
The Data API server is disabled by default and must be manually started. You can configure and start the API server from within powhttp under Settings -> Data API.
The following settings are available:
- Port: The port number the API server will listen on (default: 7777)
- Auto-start: When enabled, the API server will automatically start when powhttp launches
Once started, the API will be available at http://localhost:{port} where port is your configured port number.
Identifiers
All resources in the API are identified using ULIDs (Universally Unique Lexicographically Sortable Identifiers). ULIDs are 26-character case-sensitive strings that combine timestamp and random data, making them both unique and sortable by creation time.
In addition to explicit ULIDs, many endpoints support the special value active as a shortcut to reference the currently active session or entry in the powhttp interface. This makes it easy to work with whatever you're currently viewing without needing to look up specific IDs.
Error Responses
When an error occurs, the API returns an appropriate HTTP status code along with a JSON error object containing details about what went wrong.
Error responses follow this structure:
{
"error": "Not found"
}Common status codes you may encounter:
404 Not Found: The requested resource (session, entry, connection) does not exist500 Internal Server Error: An unexpected error occurred on the server