Get Courses
Get all the available courses for creator or subscriber.
- To access courses for a subscriber, pass the user parameter in query.
- Accessed on behalf of a subscriber, courses will be filtered based on active subscription for the mangoes in the course.
- Accessed without user parameter, all the courses will be returned for the creator.
- Accessed on behalf of a creator, courses will be filtered based on the creator.
External access policy
An API key and an authorized white-label host are required. Both tier and plan requirements are enforced.
These requirements apply to the white-label creator for backend-to-backend access. TagMango platform access is not supported.
-
Plans: Unrestricted.
-
Tiers: Unrestricted.
Authorization
bearer In: header
Query Parameters
Number of items per page of the results
1 <= valueOne-based page number. Values below 1 return 400 with "Page number must be greater than or equal to 1".
1 <= valueUnique identifier of the user, if accessed on behalf of a subscriber, courses will be filtered based on active subscription for the mangoes in the course
Comma seperated list of mango unique identifiers for filtering courses
Filter course by whether published or not
Comma-separated course instructor ids. Returns courses assigned to any of the given instructors.
Header Parameters
Host name of the dashboard, ex: mydomain.tagmango.com
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://api-prod-new.tagmango.com/api/v1/external/courses" \ -H "x-whitelabel-host: string"{
"total": 10,
"data": [
{
"_id": "66c4964c11e7fef26751f3a7",
"title": "Learn JavaScript",
"description": "A comprehensive course on JavaScript",
"coverImage": "https://example.com/cover-image.jpg",
"isPublished": false,
"mangoes": [
{
"_id": "66a1390268a76f2f5c9f39a3",
"creator": "77b2390268a76f2f5c9f39a4",
"title": "Introduction to Coding"
}
],
"progress": 50
}
]
}{
"code": 400,
"type": "Bad Request",
"statusMessage": "BAD_REQUEST",
"success": false,
"message": "Invalid request",
"result": "Invalid request"
}{
"code": 401,
"type": "Unauthorized",
"statusMessage": "UNAUTHORIZED",
"message": "Invalid token",
"result": "Invalid token",
"success": false
}{
"code": 403,
"type": "Forbidden",
"statusMessage": "FORBIDDEN",
"errorCode": "WORKSHOP_MANGO_FORBIDDEN",
"message": "You can not access this api with a TagMango account, only available for whitelabel hosts",
"result": "You can not access this api with a TagMango account, only available for whitelabel hosts",
"success": false
}{
"code": 429,
"type": "Too Many Requests",
"statusMessage": "TOO_MANY_REQUESTS",
"message": "Request limit exceeded. try after 10 seconds",
"result": "Request limit exceeded. try after 10 seconds",
"success": false
}