Student APIs

Create engaging learning experiences with performance tracking and analytics. The Student API suite helps you build tools that drive better learning outcomes.

Quick Start

Start tracking student performance and engagement in minutes.

javascript
const plum = require('@plum/sdk');

const client = new plum.Client({
  apiKey: process.env.PLUM_API_KEY
});

// Get student performance overview
const performance = await client.performance.get({
  student_id: 'stu_abc123',
  period: 'term'
});

Performance API

Track grades, scores, and learning outcomes across subjects and time periods.

GET /v1/performance

Retrieve performance data for one or more students. Supports aggregation by subject, class, or time period.

Query Parameters

  • student_id string - Filter by student
  • class_id string - Filter by class
  • subject string - Filter by subject
  • period string - Time period (week, month, term, year)
  • aggregate boolean - Return aggregated scores (default: false)
response
{
  "data": {
    "student_id": "stu_abc123",
    "name": "Jane Doe",
    "period": "term",
    "overall_score": 87.5,
    "subjects": [
      {
        "subject": "mathematics",
        "score": 92,
        "grade": "A",
        "assessments_completed": 8,
        "trend": "improving"
      },
      {
        "subject": "english",
        "score": 83,
        "grade": "B+",
        "assessments_completed": 6,
        "trend": "stable"
      }
    ]
  }
}
POST /v1/performance

Record a new performance entry (grade, score, or evaluation) for a student.

javascript
await client.performance.record({
  student_id: 'stu_abc123',
  subject: 'mathematics',
  assessment_id: 'asmt_xyz789',
  score: 92,
  max_score: 100,
  feedback: 'Excellent work on quadratic equations'
});

Attendance API

Track and manage student attendance records with real-time updates.

GET /v1/attendance

Retrieve attendance records with filtering and aggregation support.

Query Parameters

  • student_id string - Filter by student
  • class_id string - Filter by class
  • date_from string - Start date (ISO 8601)
  • date_to string - End date (ISO 8601)
  • status string - Filter by status (present, absent, late, excused)
POST /v1/attendance

Record attendance for a student or batch of students.

javascript
await client.attendance.record({
  class_id: 'cls_abc123',
  date: '2025-02-28',
  records: [
    { student_id: 'stu_001', status: 'present' },
    { student_id: 'stu_002', status: 'present' },
    { student_id: 'stu_003', status: 'absent', reason: 'Medical' }
  ]
});

Engagement API

Measure and analyze student engagement with learning materials and activities.

GET /v1/engagement

Retrieve engagement metrics including time spent, completion rates, and interaction patterns.

Query Parameters

  • student_id string - Filter by student
  • lesson_id string - Filter by lesson
  • metric string - Metric type (time_spent, completion, interactions)
response
{
  "data": {
    "student_id": "stu_abc123",
    "engagement_score": 8.5,
    "metrics": {
      "avg_time_per_lesson": "38min",
      "completion_rate": 0.92,
      "interactions_per_session": 24,
      "streak_days": 12
    },
    "recent_activity": [
      {
        "lesson_id": "les_abc123",
        "title": "Introduction to Algebra",
        "time_spent": "42min",
        "completed": true,
        "date": "2025-02-27T14:30:00Z"
      }
    ]
  }
}
POST /v1/engagement/track

Log an engagement event (lesson started, completed, quiz attempted, etc.).