Skip to content

Closing down - Get an assignment

Deprecated
GET
/assignments/{assignment_id}

[!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.

Gets a GitHub Classroom assignment. Assignment 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.

Response

Media type application/json
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 when a student accepts the assignment.

boolean
feedback_pull_requests_enabled
required

Whether feedback pull request will be created when a student accepts the assignment.

boolean
max_teams
required

The maximum allowable teams for the assignment.

integer
nullable
max_members
required

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
starter_code_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
classroom
required
Classroom

A GitHub Classroom classroom

object
id
required

Unique identifier of the classroom.

integer
name
required

The name of the classroom.

string
archived
required

Whether classroom is archived.

boolean
organization
required
Organization Simple for Classroom

A GitHub organization.

object
id
required
integer
login
required
string
node_id
required
string
html_url
required
string format: uri
name
required
string
nullable
avatar_url
required
string
url
required

The URL of the classroom on GitHub Classroom.

string
Examples
Example default
{
"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",
"deadline": "2011-01-26T19:06:43Z",
"stater_code_repository": {
"id": 1296269,
"full_name": "octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"private": false,
"default_branch": "main"
},
"classroom": {
"id": 1296269,
"name": "Programming Elixir",
"archived": "false,",
"url": "https://classroom.github.com/classrooms/1-programming-elixir"
}
}

Resource not found

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"
}

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"
}