Insomnia API Testing Workspace
This directory contains the Insomnia workspace configuration for testing the FishingLog API.
🚀 Quick Start
1. Install Insomnia
Download and install Insomnia from: https://insomnia.rest/download
2. Import Workspace
- Open Insomnia
- Click Create → Import From → File
- Select
insomnia/FishingLog API-wrk_a06d10d105e24bc68e7dac3e6c97f43b.yaml - The workspace will be imported with all environments (Local, Staging, Production) and requests
Note: The filename includes the workspace ID (wrk_...). This is required for Git Sync to work properly.
3. Configure Git Sync (Recommended)
- In Insomnia, go to Preferences → Data → Git Sync
- Enable Git Sync
- Connect to your repository:
- Repository: Your GitHub/GitLab repository URL
- Branch:
mainorstaging - Directory:
insomnia/
- Insomnia will sync changes automatically
4. Set Up Environments
Local Development Environment
- Select Local Development environment from dropdown
- Update environment variables if needed:
base_url:https://localhost:5100(HTTPS) orhttp://localhost:5101(HTTP)api_url: Same as base_urlcognito_domain: Your Cognito domain (if different)
Staging Environment
- Select Staging environment from dropdown
- Environment variables are pre-configured:
base_url:https://api-staging.reelog.appapi_url:https://api-staging.reelog.app
5. Get Authentication Token
Option 1: Using Cognito User Pool (Recommended)
- Use AWS Cognito Hosted UI or AWS CLI to get tokens
- Copy the
access_tokenfrom the response - In Insomnia, go to Manage Environments
- Add to your environment:
- Key:
access_token - Value: Your JWT token
- Key:
Option 2: Using Insomnia Cognito Request
- Update the Cognito Login request with your credentials
- Send the request
- Copy the
access_tokenfrom response - Add to environment variables (see above)
📁 Workspace Structure
Comprehensive endpoint coverage organized by feature:
FishingLog API/
├── Health & Status/
├── Authentication/
├── Users & Profiles/
├── Fishing Logs/
├── Social/
├── Gear/
├── Tournaments/
├── Spots & Reports/
├── Personal Bests/
├── Circles/
├── Events & Clubs/
├── Reference Data/
├── Charters/
└── Themes/
See SETUP.md for complete structure details.
🔐 Authentication
All authenticated endpoints require a JWT Bearer token:
Authorization: Bearer \{\{ _.access_token \}\}
The token is automatically inserted from environment variables.
Getting a Token
Using AWS CLI:
aws cognito-idp initiate-auth \
--auth-flow USER_PASSWORD_AUTH \
--client-id 6i1opt39o2n5h5ihq471l1ev07 \
--auth-parameters USERNAME=your-username,PASSWORD=your-password \
--region us-east-2
Using Cognito Hosted UI:
- Visit:
https://YOUR_COGNITO_DOMAIN.auth.us-east-2.amazoncognito.com/login - Login with your credentials
- Copy the
access_tokenfrom the URL or response
🌍 Environments
Local Development
- Base URL:
https://localhost:5100(HTTPS) orhttp://localhost:5101(HTTP) - Use for: Local development and testing
- Database: Local PostgreSQL (if configured)
Staging
- Base URL:
https://api-staging.reelog.app - Use for: Testing deployed staging environment
- Database: AWS RDS PostgreSQL (staging)
Production
- Base URL:
https://api.reelog.app - Use for: Production API (when deployed)
- Database: AWS RDS PostgreSQL (production)
📝 Adding New Requests
- Right-click on a folder → New Request
- Set the URL using environment variables:
`\{\{ _.api_url \}\}/api/endpoint` - Add Authorization header:
`Bearer \{\{ _.access_token \}\}` - Save the request
🔄 Git Sync Best Practices
- Commit regularly: Commit your Insomnia workspace changes
- Don't commit tokens: Use environment variables, not hardcoded tokens
- Share environment templates: Keep environment structure in sync
- Document custom requests: Add descriptions to requests
🛠️ Troubleshooting
"Invalid token" errors
- Check that
access_tokenis set in your environment - Verify token hasn't expired (Cognito tokens expire after 1 hour)
- Regenerate token if needed
"Connection refused" (Local)
- Make sure your local API is running:
dotnet run - Check the port matches your environment (
5101for HTTP)
"502 Bad Gateway" (Staging)
- Check ECS service is running
- Verify health checks are passing
- Check CloudWatch logs for errors
📚 Resources
🔒 Security Notes
- Never commit tokens to git
- Use environment variables for sensitive data
- Use
.gitignoreto exclude token files if needed - Rotate tokens regularly
Last Updated: December 10, 2025