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 endpoints
  • Momentum-Environment.postman_environment.json - Environment variables for local/dev testing

Setup

  1. Import Collection: In Postman, go to File > Import and select Momentum-API.postman_collection.json
  2. Import Environment: Import Momentum-Environment.postman_environment.json
  3. 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:

  1. Sign in to the application at https://momentum.cloudnnj.com
  2. Open browser DevTools (F12) > Application > Local Storage
  3. Look for CognitoIdentityServiceProvider.*idToken key
  4. Copy the token value and set it as JWT_TOKEN in 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:

  1. Categories - Start here to get category IDs
  2. Courses - List courses and get course IDs
  3. Lessons - Get lessons for a course
  4. Enrollments - Enroll in a course (requires auth)
  5. Progress - Track progress through lessons
  6. Analytics - View your learning analytics

Auto-Saved Variables

The collection includes test scripts that automatically save IDs to environment variables:

  • CATEGORY_ID - From List Categories
  • COURSE_ID - From List Courses
  • LESSON_ID - From List Lessons
  • ENROLLMENT_ID - From Create Enrollment
  • JOB_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

  1. No Auth: Public endpoints (Categories, public Courses)
  2. Bearer Token: Cognito JWT in Authorization header
  3. 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 - Success
  • 201 - Created
  • 202 - Accepted (async operations)
  • 400 - Bad Request
  • 401 - Unauthorized
  • 403 - Forbidden
  • 404 - Not Found
  • 500 - Server Error

Back to top

Momentum LMS © 2025. Distributed under the MIT license.