Skip to content

Course Students Query

Note: The Teachify Admin API is currently under development and not yet available for public use. This documentation is provided for preview purposes only.

The Course Students API returns the students enrolled in one or more courses as a paginated list of student records. You pass a set of course IDs and receive back the distinct users enrolled in any of them, deduplicated so that a student enrolled in several of the requested courses appears only once.

This query is intentionally lightweight: each row is a student (id, name, email), not an enrollment. If you need per-course learning metrics — completion rate, delivery state, access expiration — use the Student Course Progress query instead (see Comparison with studentCourseProgress below).

Returns a paginated list of the distinct students enrolled in the given courses.

Parameters:

ParameterTypeRequiredDescription
courseIds[String]!YesIDs of the courses whose enrolled students to return
filterStudentFilterNoFilter criteria on the student record (see Filtering)
pageIntNoPage number for pagination
perPageIntNoNumber of items per page (default: 20, max: 50)
limitIntNoAlternative to perPage

Returns:

  • StudentPage object with:
    • nodes: Array of Student objects
    • currentPage: Current page number
    • hasNextPage: Whether there are more pages
    • hasPreviousPage: Whether there are previous pages
    • nodesCount: Total number of distinct students matching the query
    • totalPages: Total number of pages

Example:

query {
courseStudents(
courseIds: ["course-123-uuid", "course-456-uuid"]
page: 1
perPage: 20
) {
nodes {
id
name
email
}
currentPage
hasNextPage
hasPreviousPage
nodesCount
totalPages
}
}

The Student object contains the following fields:

FieldTypeDescription
idString!The student’s unique identifier
nameStringThe student’s full name
emailStringThe student’s email address

courseStudents and studentCourseProgress both start from course enrollments, but they answer different questions and return different types:

courseStudentsstudentCourseProgress
Question answeredWho is enrolled?How far along is each enrollment?
Course scopeMultiple courses (courseIds: [String]!)A single course (courseId: String!)
Returned typeStudentPage — one node per studentStudentCourseShipPage — one node per enrollment (StudentCourseShip)
DeduplicationA student enrolled in several of the requested courses appears onceOne row per student-course enrollment
Progress fieldsNone (id, name, email only)completionRate, completionPercentage, deliveryState, endedAt, plus nested user and course
SortingBy the underlying student scopeCompletion rate desc, then updated_at desc

Use courseStudents for a roster or audience list across courses; use studentCourseProgress when you need engagement and completion metrics for a specific course.

The courseStudents query accepts a filter parameter of type StudentFilter, applied to the student records.

Filter FieldTypeDescription
emailStringOperatorFilter by student email address
nameStringOperatorFilter by student name

The StringOperator used in filters has these operations:

OperationDescription
eqEqual to
neqNot equal to
inIn a list of values
ninNot in a list of values
likeMatch text values against a pattern using wildcards (case-sensitive)
containsContains substring (case-insensitive)

Find an enrolled student by email:

query {
courseStudents(
courseIds: ["course-123-uuid"]
filter: {
email: { eq: "alice@example.com" }
}
) {
nodes {
id
name
email
}
nodesCount
}
}

Search enrolled students by name across several courses:

query {
courseStudents(
courseIds: ["course-123-uuid", "course-456-uuid"]
filter: {
name: { contains: "wang" }
}
) {
nodes {
id
name
email
}
nodesCount
}
}

courseStudents requires an API key carrying either the students:read or the members:read scope. An API key with either scope is sufficient.