This repository contains comprehensive Postman collections and environments for testing all SmartDrive services through the API Gateway.
File: collections/SmartDrive-Gateway-Complete-Collection.json
Complete collection testing all services through the API Gateway including:
- 🔐 Authentication & User Registration - Register users, verify emails, get OAuth2 tokens
- 👤 User Profile Management - CRUD operations for user profiles
- 📁 File Storage Service - Upload, download, list, and delete files
- 🤖 AI Service - Chat with AI and analyze files
- 🔍 Search Service - Search files and content
- ⚙️ Admin Operations - User management for admins
- 🔧 System Health & Monitoring - Check gateway health and routes
- 🧪 CORS Testing - Validate CORS configuration
File: collections/SmartDrive-User-Service-Collection.json
Legacy collection focusing on user service endpoints.
- Import Collections: Import both JSON files into Postman
- Import Environment: Import
environments/SmartDrive-Dev-Environment.json - Select Environment: Choose "SmartDrive Dev Environment" in Postman
- Start Testing: Begin with "Register New User" to create a test account
- Run "Register New User" - Creates a new user account
⚠️ Note: May return 405 error due to gateway response issue, but user is still created
- Run "Get OAuth2 Token" - Authenticates and retrieves access tokens
- Automatically stores
access_tokenandrefresh_tokenfor subsequent requests
- Automatically stores
- Run "Get User Profile" - Retrieves user information
- Run "Update User Profile" - Modifies user details
- Run "Change Password" - Updates user password
- Run "Upload File" - Upload a test file
- Run "List User Files" - View uploaded files
- Run "Download File" - Download a file by ID
- Run "Chat with AI" - Test AI service integration
- Run "Search Files" - Test search functionality
- Issue: POST
/api/v1/users/registerreturns 405 Method Not Allowed - Status: Gateway response handling bug (user is still created successfully)
- Workaround: Check if user was created by attempting to get OAuth2 token
Passwords must meet these criteria:
- Minimum 8 characters
- At least one uppercase letter
- At least one lowercase letter
- At least one number
- At least one special character (
@$!%*?&)
- 3-50 characters
- Alphanumeric characters and underscores only
- Must be unique
The collection includes CORS preflight testing to validate browser compatibility:
- Origin:
http://localhost:5174(UI development server) - Methods: POST, GET, PUT, DELETE, OPTIONS
- Headers: Content-Type, Authorization
Key variables in SmartDrive-Dev-Environment.json:
gateway_base_url: http://localhost:8080oauth2_client_id: smartdrive-weboauth2_client_secret: secrettest_username: Auto-generated unique usernametest_email: Auto-generated unique emailaccess_token: OAuth2 access token (auto-populated)refresh_token: OAuth2 refresh token (auto-populated)
Structure:
- collections/
- environments/
- docs/