Skip to main content
A API REST agora é versionada. Para obter mais informações, confira "Sobre o controle de versão da API".

Pontos de extremidade da API REST para o GitHub Classroom

Utilize a API REST para interagir com o GitHub Classroom.

Closing down - Get an assignment

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.

Tokens de acesso granulares para "Closing down - Get an assignment"

Este endpoint funciona com os seguintes tipos de token granulares:

O token refinado não exige permissões.

Este endpoint pode ser usado sem autenticação caso sejam solicitados apenas recursos públicos.

Parâmetros para "Closing down - Get an assignment"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de caminho
Nome, Tipo, Descrição
assignment_id integer Obrigatório

The unique identifier of the classroom assignment.

Códigos de status de resposta HTTP para "Closing down - Get an assignment"

Código de statusDescrição
200

OK

404

Resource not found

410

Gone

Exemplos de código para "Closing down - Get an assignment"

Exemplo de solicitação

get/assignments/{assignment_id}
curl -L \ -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/assignments/ASSIGNMENT_ID

Response

Status: 200
{ "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" } }

Closing down - List accepted assignments for an assignment

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.

Tokens de acesso granulares para "Closing down - List accepted assignments for an assignment"

Este endpoint funciona com os seguintes tipos de token granulares:

O token refinado não exige permissões.

Este endpoint pode ser usado sem autenticação caso sejam solicitados apenas recursos públicos.

Parâmetros para "Closing down - List accepted assignments for an assignment"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de caminho
Nome, Tipo, Descrição
assignment_id integer Obrigatório

The unique identifier of the classroom assignment.

Parâmetros de consulta
Nome, Tipo, Descrição
page integer

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

Padrão: 1

per_page integer

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

Padrão: 30

Códigos de status de resposta HTTP para "Closing down - List accepted assignments for an assignment"

Código de statusDescrição
200

OK

410

Gone

Exemplos de código para "Closing down - List accepted assignments for an assignment"

Exemplo de solicitação

get/assignments/{assignment_id}/accepted_assignments
curl -L \ -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/assignments/ASSIGNMENT_ID/accepted_assignments

Response

Status: 200
{ "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" } } }

Closing down - Get assignment grades

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 grades for a GitHub Classroom assignment. Grades will only be returned if the current user is an administrator of the GitHub Classroom for the assignment.

Tokens de acesso granulares para "Closing down - Get assignment grades"

Este endpoint funciona com os seguintes tipos de token granulares:

O token refinado não exige permissões.

Este endpoint pode ser usado sem autenticação caso sejam solicitados apenas recursos públicos.

Parâmetros para "Closing down - Get assignment grades"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de caminho
Nome, Tipo, Descrição
assignment_id integer Obrigatório

The unique identifier of the classroom assignment.

Códigos de status de resposta HTTP para "Closing down - Get assignment grades"

Código de statusDescrição
200

OK

404

Resource not found

410

Gone

Exemplos de código para "Closing down - Get assignment grades"

Exemplo de solicitação

get/assignments/{assignment_id}/grades
curl -L \ -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/assignments/ASSIGNMENT_ID/grades

Response

Status: 200
[ { "assignment_name": "Introduction to Strings", "assignment_url": "https://classroom.github.com/classrooms/1337/assignments/1337", "starter_code_url": "", "github_username": "octocat", "roster_identifier": "octocat@github.com", "student_repository_name": "intro-to-strings-1337-octocat", "student_repository_url": "https://github.com/timeforschool/intro-to-strings-1337-octocat", "submission_timestamp": "2018-11-12 01:02", "points_awarded": 10, "points_available": 15, "group_name": "octocat-and-friends" }, { "assignment_name": "Introduction to Strings", "assignment_url": "https://classroom.github.com/classrooms/1337/assignments/1337", "starter_code_url": "", "github_username": "monalisa", "roster_identifier": "monalisa@github.com", "student_repository_name": "intro-to-strings-1337-monalisa", "student_repository_url": "https://github.com/timeforschool/intro-to-strings-1337-monalisa", "submission_timestamp": "2018-11-12 01:11", "points_awarded": 15, "points_available": 15, "group_name": "monalisa-and-friends" } ]

Closing down - List classrooms

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 GitHub Classroom classrooms for the current user. Classrooms will only be returned if the current user is an administrator of one or more GitHub Classrooms.

Tokens de acesso granulares para "Closing down - List classrooms"

Este endpoint funciona com os seguintes tipos de token granulares:

O token refinado não exige permissões.

Este endpoint pode ser usado sem autenticação caso sejam solicitados apenas recursos públicos.

Parâmetros para "Closing down - List classrooms"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de consulta
Nome, Tipo, Descrição
page integer

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

Padrão: 1

per_page integer

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

Padrão: 30

Códigos de status de resposta HTTP para "Closing down - List classrooms"

Código de statusDescrição
200

OK

410

Gone

Exemplos de código para "Closing down - List classrooms"

Exemplo de solicitação

get/classrooms
curl -L \ -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/classrooms

Response

Status: 200
{ "id": 1296269, "name": "Programming Elixir", "archived": "false,", "url": "https://classroom.github.com/classrooms/1-programming-elixir" }

Closing down - Get a classroom

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 classroom for the current user. Classroom will only be returned if the current user is an administrator of the GitHub Classroom.

Tokens de acesso granulares para "Closing down - Get a classroom"

Este endpoint funciona com os seguintes tipos de token granulares:

O token refinado não exige permissões.

Este endpoint pode ser usado sem autenticação caso sejam solicitados apenas recursos públicos.

Parâmetros para "Closing down - Get a classroom"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de caminho
Nome, Tipo, Descrição
classroom_id integer Obrigatório

The unique identifier of the classroom.

Códigos de status de resposta HTTP para "Closing down - Get a classroom"

Código de statusDescrição
200

OK

404

Resource not found

410

Gone

Exemplos de código para "Closing down - Get a classroom"

Exemplo de solicitação

get/classrooms/{classroom_id}
curl -L \ -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/classrooms/CLASSROOM_ID

Response

Status: 200
{ "id": 1296269, "name": "Programming Elixir", "archived": "false,", "organization": { "id": 1, "login": "programming-elixir", "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", "html_url": "https://github.com/programming-elixir", "name": "Learn how to build fault tolerant applications", "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4" }, "url": "https://classroom.github.com/classrooms/1-programming-elixir" }

Closing down - List assignments for a classroom

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 GitHub Classroom assignments for a classroom. Assignments will only be returned if the current user is an administrator of the GitHub Classroom.

Tokens de acesso granulares para "Closing down - List assignments for a classroom"

Este endpoint funciona com os seguintes tipos de token granulares:

O token refinado não exige permissões.

Este endpoint pode ser usado sem autenticação caso sejam solicitados apenas recursos públicos.

Parâmetros para "Closing down - List assignments for a classroom"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de caminho
Nome, Tipo, Descrição
classroom_id integer Obrigatório

The unique identifier of the classroom.

Parâmetros de consulta
Nome, Tipo, Descrição
page integer

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

Padrão: 1

per_page integer

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

Padrão: 30

Códigos de status de resposta HTTP para "Closing down - List assignments for a classroom"

Código de statusDescrição
200

OK

410

Gone

Exemplos de código para "Closing down - List assignments for a classroom"

Exemplo de solicitação

get/classrooms/{classroom_id}/assignments
curl -L \ -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/classrooms/CLASSROOM_ID/assignments

Response

Status: 200
{ "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": "2020-01-11T11:59:22Z", "classroom": { "id": 1296269, "name": "Programming Elixir", "archived": "false,", "url": "https://classroom.github.com/classrooms/1-programming-elixir" } }