Skip to content

Closing down - List accepted assignments for an assignment

Deprecated
GET
/assignments/{assignment_id}/accepted_assignments

[!WARNING] Closing down notice: This operation is closing down and will be removed on August 28, 2026. For more information, see the GitHub Classroom sunset notice.

Lists any assignment repositories that have been created by students accepting a GitHub Classroom assignment. Accepted assignments will only be returned if the current user is an administrator of the GitHub Classroom for the assignment.

API method documentation

assignment_id
required
integer

The unique identifier of the classroom assignment.

page
integer
default: 1

The page number of the results to fetch. For more information, see “Using pagination in the REST API.”

per_page
integer
default: 30

The number of results per page (max 100). For more information, see “Using pagination in the REST API.”

Response

Media type application/json
Array<object>
Classroom Accepted Assignment

A GitHub Classroom accepted assignment

object
id
required

Unique identifier of the repository.

integer
submitted
required

Whether an accepted assignment has been submitted.

boolean
passing
required

Whether a submission passed.

boolean
commit_count
required

Count of student commits.

integer
grade
required

Most recent grade.

string
students
required
Array<object>
Simple Classroom User

A GitHub user simplified for Classroom.

object
id
required
integer
login
required
string
avatar_url
required
string format: uri
html_url
required
string format: uri
repository
required
Simple Classroom Repository

A GitHub repository view for Classroom

object
id
required

A unique identifier of the repository.

integer
full_name
required

The full, globally unique name of the repository.

string
html_url
required

The URL to view the repository on GitHub.com.

string format: uri
node_id
required

The GraphQL identifier of the repository.

string
private
required

Whether the repository is private.

boolean
default_branch
required

The default branch for the repository.

string
assignment
required
Simple Classroom Assignment

A GitHub Classroom assignment

object
id
required

Unique identifier of the repository.

integer
public_repo
required

Whether an accepted assignment creates a public repository.

boolean
title
required

Assignment title.

string
type
required

Whether it’s a Group Assignment or Individual Assignment.

string
Allowed values: individual group
invite_link
required

The link that a student can use to accept the assignment.

string
invitations_enabled
required

Whether the invitation link is enabled. Visiting an enabled invitation link will accept the assignment.

boolean
slug
required

Sluggified name of the assignment.

string
students_are_repo_admins
required

Whether students are admins on created repository on accepted assignment.

boolean
feedback_pull_requests_enabled
required

Whether feedback pull request will be created on assignment acceptance.

boolean
max_teams

The maximum allowable teams for the assignment.

integer
nullable
max_members

The maximum allowable members per team.

integer
nullable
editor
required

The selected editor for the assignment.

string
accepted
required

The number of students that have accepted the assignment.

integer
submitted
required

The number of students that have submitted the assignment.

integer
passing
required

The number of students that have passed the assignment.

integer
language
required

The programming language used in the assignment.

string
deadline
required

The time at which the assignment is due.

string format: date-time
nullable
classroom
required
Simple Classroom

A GitHub Classroom classroom

object
id
required

Unique identifier of the classroom.

integer
name
required

The name of the classroom.

string
archived
required

Returns whether classroom is archived or not.

boolean
url
required

The url of the classroom on GitHub Classroom.

string
Examples
Example default
{
"id": "12,",
"submitted": "false,",
"passing": "false,",
"commit_count": 5,
"grade": "5/10",
"students": [
{
"id": 1,
"login": "octocat",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"html_url": "https://github.com/octocat"
}
],
"repository": {
"id": 1296269,
"full_name": "octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"private": false,
"default_branch": "main"
},
"assignment": {
"id": "12,",
"public_repo": "false,",
"title": "Intro to Binaries",
"type": "individual",
"invite_link": "https://classroom.github.com/a/Lx7jiUgx",
"invitations_enabled": "true,",
"slug": "intro-to-binaries",
"students_are_repo_admins": false,
"feedback_pull_requests_enabled": true,
"max_teams": 0,
"max_members": 0,
"editor": "codespaces",
"accepted": 100,
"submitted": 40,
"passing": 10,
"language": "ruby",
"classroom": {
"id": 1296269,
"name": "Programming Elixir",
"archived": "false,",
"url": "https://classroom.github.com/classrooms/1-programming-elixir"
}
}
}

Gone

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}