Public
Like
LogfireViewer
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
https://curtcox--4a5de5d8890011f0aa870224a6c84d84.web.val.run
A proxy service for querying the LogFire API with a user-friendly web interface and direct API access.
- Web Interface: User-friendly form for building and executing LogFire queries
- Direct API Access: Support for query parameters and form data for programmatic access
- Token Management: Automatically stores read tokens in cookies for convenience
- Multiple Response Formats: Support for JSON, CSV, and Apache Arrow formats
- Parameter Validation: Ensures required parameters are provided before making requests
- Error Handling: Clear error messages and form validation
Visit the proxy URL in your browser to access the web form:
- Fill in your LogFire read token
- Enter your SQL query
- Optionally set timestamps, limits, and response format
- Click "Execute Query" to run the query
You can make direct requests to the proxy using query parameters or form data.
curl "https://your-proxy-url/?read-token=YOUR_TOKEN&sql=SELECT%20*%20FROM%20records%20LIMIT%2010"
curl -X POST https://your-proxy-url/ \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "read_token=YOUR_TOKEN&sql=SELECT * FROM records LIMIT 10&accept=application/json"
curl -X POST https://your-proxy-url/?read-token=YOUR_TOKEN&sql=SELECT%20*%20FROM%20records \ -H "Accept: text/csv"
- read_token / read-token: Your LogFire read token (required)
- sql: The SQL query to execute (required)
- min_timestamp: ISO format timestamp for filtering records
- max_timestamp: ISO format timestamp for filtering records
- limit: Number of rows to return (default: 500, max: 10,000)
- row_oriented: Set to "true" for row-oriented JSON responses
- accept: Response format (
application/json
,text/csv
, orapplication/vnd.apache.arrow.stream
)
- edit=true: Forces the web form to display even if all required parameters are present
The proxy automatically stores your read token in a secure HTTP-only cookie that lasts for 30 days. This means:
- You only need to enter your token once
- The token is stored securely and not accessible to client-side JavaScript
- Subsequent requests will automatically use the stored token
- Column-oriented by default
- Set
row_oriented=true
for row-oriented format
- Set
Accept: text/csv
header oraccept=text/csv
parameter
- Set
Accept: application/vnd.apache.arrow.stream
header oraccept=application/vnd.apache.arrow.stream
parameter
- Missing required parameters will show the web form with error messages
- Invalid tokens or SQL queries will return the LogFire API error response
- Network errors are displayed in the web interface
The proxy includes full CORS support, allowing it to be used from web applications running on different domains.
GET /?read-token=your_token&sql=SELECT COUNT(*) FROM records
GET /?read-token=your_token&sql=SELECT * FROM records&min_timestamp=2024-01-01T00:00:00Z&limit=100
GET /?read-token=your_token&sql=SELECT * FROM records LIMIT 1000&accept=text/csv
GET /?edit=true&read-token=existing_token&sql=SELECT * FROM records