api
Fake Students

Documentation

1. Get All Students or Apply Filters

  • Method: GET
  • Endpoint: https://api.i-as.dev/api/fake/student
Query Parameters:
  • id: Filter by student ID (optional).
  • limit: Limit the number of results (optional).
  • search: Search by student name (optional).
  • sort: Sort by field (e.g., name, id) (optional).
  • order: Sort order (asc or desc) (optional).
Example URLs:
  • GET https://api.i-as.dev/api/fake/student
  • GET https://api.i-as.dev/api/fake/student?limit=5&search=john&sort=name&order=desc
  • GET https://api.i-as.dev/api/fake/student?id=1
  • GET https://api.i-as.dev/api/fake/student?search=jane

2. Create New Student

  • Method: POST
  • Endpoint: https://api.i-as.dev/api/fake/student/create
Request Body:
{
  "name": "string", 
  "age": "value", 
  "gender": "string", 
  "address": {
    "street": "string", 
    "city": "string", 
    "zip": "value", 
    "country": "string"
  },
  "email": "string@mail.com", 
  "phone": "value", 
  "courses": ["string", "string"], 
  "gpa": "string", 
  "image": "url-img"
}
Example URL:
  • POST https://api.i-as.dev/api/fake/student/create

3. Update Student by ID

  • Method: PUT
  • Endpoint: https://api.i-as.dev/api/fake/student/update/:id
Request Body:
{
  "name": "string", 
  "age": "value", 
  "grade": "string", 
  "gender": "string", 
  "address": {
    "street": "string", 
    "city": "string", 
    "zip": "value", 
    "country": "string"
  },
  "email": "string@mail.com", 
  "phone": "value", 
  "courses": ["string", "string"], 
  "gpa": "string", 
  "image": "url-img"
}
Example URL:
  • PUT https://api.i-as.dev/api/fake/student/update/1

4. Delete Student by ID

  • Method: DELETE
  • Endpoint: https://api.i-as.dev/api/fake/student/delete/:id
Example URL:
  • DELETE https://api.i-as.dev/api/fake/student/delete/1

Summary

Description URL Endpoint Method
Get All Students or Apply Filters https://api.i-as.dev/api/fake/student?limit=5&search=John&sort=name&order=desc GET
Create New Student https://api.i-as.dev/api/fake/student/create POST
Update Student by ID https://api.i-as.dev/api/fake/student/update/:id PUT
Delete Student by ID https://api.i-as.dev/api/fake/student/delete/:id DELETE

Explanation:

  • GET: Retrieve student data with optional filters, search, and sorting.
  • POST: Create a new student entry.
  • PUT: Update student information by ID.
  • DELETE: Remove a student by ID.