> ## Documentation Index
> Fetch the complete documentation index at: https://docs.terang.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# LMS Progress Metrics

> Returns platform-wide (`overall`) and per-category learner progress, enrollment, and financial metrics. Used by the Teacher and Admin dashboards. Requires teacher/admin authorization via an API key or session cookie.



## OpenAPI

````yaml api-reference/lms-openapi.json GET /api/lms-progress
openapi: 3.1.0
info:
  title: Terang AI LMS API
  description: >-
    LMS application endpoints (served from the per-partner LMS host, e.g.
    https://lms.terang.ai). Maintained manually — NOT overwritten by the Core
    API auto-update.
  version: 1.0.0
servers:
  - description: LMS (Production)
    url: https://lms.terang.ai
security: []
paths:
  /api/lms-progress:
    get:
      tags:
        - LMS Progress
      summary: LMS Progress Metrics
      description: >-
        Returns platform-wide (`overall`) and per-category learner progress,
        enrollment, and financial metrics. Used by the Teacher and Admin
        dashboards. Requires teacher/admin authorization via an API key or
        session cookie.
      operationId: getLmsProgress
      responses:
        '200':
          description: Metrics retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LmsProgressResponse'
        '401':
          description: Unauthorized — missing or invalid API key / session
        '403':
          description: Forbidden — caller is not a teacher/admin
        '500':
          description: Internal server error
      security:
        - apiKey: []
        - cookieAuth: []
components:
  schemas:
    LmsProgressResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            overall:
              $ref: '#/components/schemas/LmsProgressMetrics'
            perCategory:
              type: array
              description: Same metrics, broken down per course category.
              items:
                allOf:
                  - type: object
                    properties:
                      categoryId:
                        type: integer
                      categoryCode:
                        type: string
                        example: A1
                      categoryName:
                        type: string
                  - $ref: '#/components/schemas/LmsProgressMetrics'
    LmsProgressMetrics:
      type: object
      description: Progress, enrollment, and financial metrics.
      properties:
        totalDaftar:
          type: integer
          description: Total registered users (overall only)
        totalBeli:
          type: integer
          description: Total enrolled (purchased) students
        totalSelesai:
          type: integer
          description: Total who completed
        totalSertifikat:
          type: integer
          description: Total certificates issued
        totalClasses:
          type: integer
        totalCourses:
          type: integer
        totalStudents:
          type: integer
          description: Enrolled students
        completionRate:
          type: integer
          description: Average completion percentage (0–100)
        buyers30Days:
          type: integer
          description: Buyers in the last 30 days
        revenue30Days:
          type: number
          description: Revenue in the last 30 days (IDR)
        totalKum30Days:
          type: number
          description: KUM/SKPK accrued in the last 30 days
        certificatesCount:
          type: integer
        peopleWithBadgeCount:
          type: integer
          description: Learners who earned a badge (completed)
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key generated under Teacher Dashboard → Kunci API. Format:
        `lms_key_...`
    cookieAuth:
      type: apiKey
      in: cookie
      name: better-auth.session_token
      description: Browser session cookie (teacher/admin). Used by frontend clients.

````