Restmancer API - Courses
This page documents the available REST endpoints for fetching course data from the Restmancer API.
GET /api/courses
Returns a list of courses. If the limit is greater than initial data length (10), more will be generated on the fly.
Optional Query Parameters:
limit– Number of courses to return.fields– Comma-separated list of fields (e.g.,title,instructor).
Examples:
Fields Available
idtitlesluginstructor(object withid,name,email)descriptioncategoryduration(e.g., "6 weeks")level(Beginner, Intermediate, Advanced)createdAtstudentsEnrolledreviews(array of objects withid,author,rating,comment,postedAt)
You can control the number of courses returned and which fields are included using query parameters like ?limit=3 and ?fields=title,instructor.
Example: GET /api/courses?limit=3&fields=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"