Filtering & Sorting
Most API queries support filtering and ordering to help you retrieve exactly the data you need.
Filters, sorting, and pagination all work together via the input object.
Program Progress Filters
The programProgress query supports filtering by enrollment status, program type, on-track status, program key, and learning plan.
Filter by enrollment status
Pass an array of status values to the enrollmentStatus filter to limit results to learners with matching status.
query EnrolledLearners($input: ProgramProgressInput!) {
programProgress(input: $input) {
totalCount
edges {
node {
userId
userEmail
enrollmentStatus
programKey
lastActiveAt
}
}
}
}{
"input": {
"filter": {
"enrollmentStatus": ["ENROLLED"]
},
"orderBy": "LAST_ACTIVE",
"order": "DESC",
"first": 50
}
}Available Program Progress Filters
Filter by program keys
Filter by program type (NANODEGREE, COURSE, PART)
Filter by enrollment status (ENROLLED, UNENROLLED, GRADUATED, STATIC_ACCESS)
Filter by on-track status (ON_TRACK, OFF_TRACK, MONITOR, COMPLETED, READY_TO_GRADUATE, GRADUATED)
Filter by associated learning plan IDs
Tip: All filter fields accept arrays, so you can filter by multiple values at once — e.g. "enrollmentStatus": ["ENROLLED", "GRADUATED"].
Free-text Search
The query field on ProgramProgressInput supports free-text search across user email and name.
query SearchLearners($input: ProgramProgressInput!) {
programProgress(input: $input) {
totalCount
edges {
node {
userId
userEmail
userFirstName
userLastName
programKey
}
}
}
}{
"input": {
"query": "jamie",
"first": 20
}
}Assessment Progress Filters
The assessmentProgress query supports filtering by assessment ID, status, result, user, and learning plan.
Filter by assessment IDs
Assessment status values (e.g., "completed", "in_progress")
Assessment result values (e.g., "passed", "failed")
Filter by user IDs
Filter by learning plan IDs
query CompletedAssessments($input: AssessmentProgressInput!) {
assessmentProgress(input: $input) {
totalCount
edges {
node {
userId
assessmentId
assessmentStatus
assessmentResult
updatedAt
}
}
}
}{
"input": {
"filter": {
"assessmentStatus": ["completed"],
"assessmentResult": ["passed"]
},
"orderBy": "UPDATED_AT",
"order": "DESC",
"first": 50
}
}Sorting
Control the order of results with orderBy and order.
Available sort fields
Program Progress: EMAIL, PROGRAM_TITLE, ENROLLMENT_STATUS, LAST_ACTIVE, COMPLETED_PROJECTS, LEARNING_TIME
Assessment Progress: ASSESSMENT_STATUS, ASSESSMENT_RESULT, CREATED_AT, UPDATED_AT
Ascending (oldest first, A→Z)
Descending (newest first, Z→A)
query SortedProgress($input: ProgramProgressInput!) {
programProgress(input: $input) {
edges {
node {
userId
userEmail
lastActiveAt
}
}
}
}{
"input": {
"orderBy": "LAST_ACTIVE",
"order": "DESC",
"first": 50
}
}Combining Filters + Sorting + Pagination
Filters, sorting, and pagination all work together via the input object. Filter first to reduce the dataset, sort to control order, then paginate.
Tip: The totalCount in the response reflects the filtered count, not the total number of records in the system.
query FilteredAndPaginated($input: ProgramProgressInput!) {
programProgress(input: $input) {
totalCount
pageInfo { hasNextPage endCursor }
edges {
node {
userId
userEmail
enrollmentStatus
lastActiveAt
}
}
}
}{
"input": {
"filter": {
"enrollmentStatus": ["ENROLLED"],
"programType": ["NANODEGREE"]
},
"orderBy": "LAST_ACTIVE",
"order": "DESC",
"first": 50,
"after": "eyJpZCI6IjUwIn0="
}
}