The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December. Read our blog post for more info about this change.
Found this content helpful? Log in or sign up to leave a like!
Hi - is there a way to get all Courses of an EnrollmentTerm through the api, either through REST or GraphQL?
In the GraphQL ui, for `allCourses` - there doesn't seem to be a way to apply a filter, something like:
```
query CoursesByTermQuery {
allCourses(filter: {term: [enrollmentTermId]})
...
```
The REST Search API, returns course listings, seems to only be applying the `search=[search term]` to the Name of the Course - is there a way to pass in an argument to search by EnrollmentTerm id?
The EnrollmentTerm API can `include[]` a `course_count` but not the actual courses?
There seems like there are some different options to access the Courses, but I'm not seeing anything that allows filters on the Course `term_id` property specifically.
Maybe I'm missing something in the docs..?
Thanks for any thoughts
Solved! Go to Solution.
Hi @nbpenn,
The list active courses in an account API should be the one you need for this task. You can supply the enrollment_term_id as a parameter to get results for a specified term (I use this call quite frequently with the term specified).
I hope this helps!
-Chris
Hi @nbpenn,
The list active courses in an account API should be the one you need for this task. You can supply the enrollment_term_id as a parameter to get results for a specified term (I use this call quite frequently with the term specified).
I hope this helps!
-Chris
Thanks @chriscas - that's exactly what I was looking for - works like a charm
I do find it odd that that functionality is found through the Accounts API and not the Course API, but I'm still learning my way around the API Resources - thanks again
Depending on what information desired, you can use the term record for graphql and the coursesConnection under that to get a list of courses for a specific term. This is what I’ve been using recently.
The allCourses is scoped to the user, so it’s just your courses, not all of them.
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in