This page documents the available REST endpoints for fetching course data from the Restmancer API.
/api/courses
Returns a list of courses. If the limit is greater than
initial data length (10), more will be generated on the fly.
limit – Number of courses to return.field – Comma-separated list of fields (e.g.,
title,instructor).
idtitlesluginstructor (object with id,
name, email)
descriptioncategoryduration (e.g., "6 weeks")level (Beginner, Intermediate, Advanced)createdAtstudentsEnrolledreviews (array of objects with id,
author, rating, comment,
postedAt)
You can control the number of courses returned and which fields are
included using query parameters like ?limit=3 and
?field=title,instructor.
Example: GET /api/courses?limit=3&field=title,instructor
import requests
url = "https://restmancer.vercel.app/api/courses"
response = requests.get(url)
print(response.json())
fetch("https://restmancer.vercel.app/api/courses")
.then(res => res.json())
.then(data => console.log(data));
const axios = require("axios");
axios.get("https://restmancer.vercel.app/api/courses")
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
curl "https://restmancer.vercel.app/api/courses"