CH

CodeHub

API Playground

← All collections

Collection Docs

Students Collection

Manage learner records for CRUD practice lessons.

Fields

text

fullName

Required; displayed in admin lists.

email

email

Required + unique to prevent duplicates.

number

age

Required; must be 5 or older.

text

grade

Required; free-form field for class/level.

select

status

One of active, inactive, graduated. Defaults to active.

REST Endpoints

GET/api/students

List students. Supports query params like limit, page, where.

GET/api/students/:id

Fetch one student by document ID.

POST/api/students

Create a student. Send JSON body with required fields.

PATCH/api/students/:id

Update part of a student document.

DELETE/api/students/:id

Delete a student document permanently.

Teaching Tips

  • Use ?where[status][equals]=active to filter by status.
  • Combine limit & page to paginate results for classroom demos.
  • Remember to send Content-Type: application/json for POST/PATCH.