Skip to main content
GET
/
course
/
getAllCourses
Get all courses
curl --request GET \
  --url https://api.example.com/course/getAllCourses \
  --header 'x-access'\''courser-auth-token: <x-access'\''courser-auth-token>'
{
  "courses": [
    {
      "_id": "<string>",
      "name": "<string>",
      "instructions": "<string>",
      "color": "<string>",
      "placeholder": "<string>",
      "backgroundImg": "<string>",
      "openAIAssistantID": "<string>",
      "openAIFiles": [
        "<string>"
      ],
      "transcriptions": [
        "<string>"
      ],
      "sourceFiles": [
        "<string>"
      ],
      "openAIKey": "<string>"
    }
  ]
}
Returns an array of all courses owned by the currently authenticated user. Authentication is required.

Request headers

x-access'courser-auth-token
string
required
Your JWT authentication token.

Response

200 — Success

courses
object[]
required
An array of course objects owned by the authenticated user.

Example

curl --request GET \
  --url http://localhost:8000/course/getAllCourses \
  --header "x-access'courser-auth-token: <your_jwt_token>"
200
{
  "courses": [
    {
      "_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": ["file-abc123"],
      "transcriptions": ["64f1a2b3c4d5e6f7a8b9c0d2"],
      "sourceFiles": [],
      "openAIKey": ""
    }
  ]
}

Build docs developers (and LLMs) love