curl --request GET \
--url https://api.example.com/course/getCourseProtected/{courseID} \
--header 'x-access'\''courser-auth-token: <x-access'\''courser-auth-token>'{
"_id": "<string>",
"name": "<string>",
"instructions": "<string>",
"color": "<string>",
"placeholder": "<string>",
"backgroundImg": "<string>",
"openAIAssistantID": "<string>",
"openAIFiles": [
"<string>"
],
"transcriptions": [
"<string>"
],
"sourceFiles": [
"<string>"
],
"openAIKey": "<string>"
}Retrieve a course by its ID with authentication required.
curl --request GET \
--url https://api.example.com/course/getCourseProtected/{courseID} \
--header 'x-access'\''courser-auth-token: <x-access'\''courser-auth-token>'{
"_id": "<string>",
"name": "<string>",
"instructions": "<string>",
"color": "<string>",
"placeholder": "<string>",
"backgroundImg": "<string>",
"openAIAssistantID": "<string>",
"openAIFiles": [
"<string>"
],
"transcriptions": [
"<string>"
],
"sourceFiles": [
"<string>"
],
"openAIKey": "<string>"
}GET /course/getCourse/:courseID, this endpoint requires authentication. Use it when you need to fetch full course details in a context where a valid session is already available.
GET /course/getCourse/:courseID return the same course object. The difference is that this endpoint verifies the caller’s JWT token first."You are a helpful AI assistant for a University classroom that answers questions for students about this course"."#fecc4e"."What is significant about horseshoe crabs".curl --request GET \
--url http://localhost:8000/course/getCourseProtected/64f1a2b3c4d5e6f7a8b9c0d1 \
--header "x-access'courser-auth-token: <your_jwt_token>"
{
"_id": "64f1a2b3c4d5e6f7a8b9c0d1",
"name": "Introduction to Marine Biology",
"instructions": "You are a helpful AI assistant for a University classroom that answers questions for students about this course",
"color": "#fecc4e",
"placeholder": "What is significant about horseshoe crabs",
"backgroundImg": "https://res.cloudinary.com/dlk3ezbal/image/upload/v1699589098/jqmlca7vhr0cnzgdbaah.png",
"openAIAssistantID": "asst_abc123xyz",
"openAIFiles": [],
"transcriptions": [],
"sourceFiles": ["64f1a2b3c4d5e6f7a8b9c0d2"],
"openAIKey": ""
}