Debug notifications, API's and callbacks with ease
- Request Logging: Capture and inspect HTTP requests in real-time
- API Key Management: Secure access with both public and private endpoints
- High Performance: Optimized for speed with minimal overhead
- Detailed Logging: Capture headers, query parameters, and request bodies
- Secure: JWT authentication for management and API keys for logging
# Clone the repository
git clone https://github.com/ItsTino/reqi-api.git
# Install dependencies
cd reqi-api
go mod download
# Set up environment variables
cp .env.example .env
# Edit .env with your configuration
# Run the server
go run cmd/server/main.go
- Register an Account
curl -X POST http://localhost:8080/auth/register \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com", "password": "password123"}'
- Create an API Key
curl -X POST http://localhost:8080/keys/create \
-H "Authorization: Bearer your-jwt-token" \
-H "Content-Type: application/json" \
-d '{"name": "My API Key", "is_public": false}'
- Create a Logger
curl -X POST http://localhost:8080/api/logger \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"is_public": false}'
- Start Capturing Requests
# Your logger URL will be provided in the previous response
# Use it to send requests:
curl -X POST "http://localhost:8080/log/your-logger-uuid/any/path" \
-H "Content-Type: application/json" \
-d '{"key": "value"}'
- View Logs
curl -X GET http://localhost:8080/api/logs/your-logger-uuid \
-H "X-API-Key: your-api-key"
API documentation is available via Swagger UI at /swagger/index.html
when running the server.
-
Authentication
POST /auth/register
- Register new userPOST /auth/login
- Login and receive JWT token
-
API Keys
POST /keys/create
- Create new API keyGET /keys/list
- List all API keysDELETE /keys/:key
- Revoke API key
-
Loggers
POST /api/logger
- Create new loggerGET /api/loggers
- List all loggersGET /api/logs/:uuid
- Show all logs for a loggerGET /api/log/:logger_uuid/:request_uuid
- Get specific log details
-
Logging Endpoint
ANY /log/:uuid/*path
- Capture any HTTP request
Configuration is managed through environment variables:
DB_HOST=localhost
DB_PORT=3306
DB_USER=your_user
DB_PASSWORD=your_password
DB_NAME=reqi
SERVER_PORT=8080
JWT_SECRET=your-secret-key
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ for developers