Momentum API - Postman Collections
This directory contains Postman collections for testing the Momentum Learning Platform API.
Files
Momentum-API.postman_collection.json- Complete API collection with all endpointsMomentum-Environment.postman_environment.json- Environment variables for local/dev testing
Setup
- Import Collection: In Postman, go to File > Import and select
Momentum-API.postman_collection.json - Import Environment: Import
Momentum-Environment.postman_environment.json - Configure Environment: Set the following variables in the Momentum DEV environment:
JWT_TOKEN: Your Cognito JWT token (get this after signing in)API_KEY: API key for admin endpoints (if applicable)
Getting a JWT Token
To obtain a JWT token for testing:
- Sign in to the application at https://momentum.cloudnnj.com
- Open browser DevTools (F12) > Application > Local Storage
- Look for
CognitoIdentityServiceProvider.*idTokenkey - Copy the token value and set it as
JWT_TOKENin Postman environment
API Structure
The collection is organized by service:
| Service | Description | Auth Required |
|---|---|---|
| Categories | Course categories | No |
| Courses | Course CRUD operations | Admin for write |
| Lessons | Lesson management | No |
| Enrollments | User course enrollments | Yes (Cognito) |
| Progress | Lesson progress tracking | Yes (Cognito) |
| Analytics | Learning statistics | Yes (Cognito) |
| Users | User management | Yes (API Key) |
| AI Generation | AI content generation | Yes (Cognito + Admin) |
| Badges | Badge progress | Yes (Cognito) |
| Recommendations | Course recommendations | Yes (Cognito) |
| Statistics | User statistics | Yes (Cognito) |
Testing Workflow
The recommended order for testing:
- Categories - Start here to get category IDs
- Courses - List courses and get course IDs
- Lessons - Get lessons for a course
- Enrollments - Enroll in a course (requires auth)
- Progress - Track progress through lessons
- Analytics - View your learning analytics
Auto-Saved Variables
The collection includes test scripts that automatically save IDs to environment variables:
CATEGORY_ID- From List CategoriesCOURSE_ID- From List CoursesLESSON_ID- From List LessonsENROLLMENT_ID- From Create EnrollmentJOB_ID- From Start Course Generation
Base URL
The default base URL is the dev environment:
https://iu7ewpcwvc.execute-api.us-east-1.amazonaws.com/dev
Authentication Types
- No Auth: Public endpoints (Categories, public Courses)
- Bearer Token: Cognito JWT in Authorization header
- API Key: x-api-key header for admin/service endpoints
Response Format
All responses follow this structure:
{
"success": true,
"data": { ... }
}
Error responses:
{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Human-readable message"
}
}
HTTP Status Codes
200- Success201- Created202- Accepted (async operations)400- Bad Request401- Unauthorized403- Forbidden404- Not Found500- Server Error