GitHub Classroom에 대한 REST API 엔드포인트
REST API를 사용하여 GitHub Classroom과(와) 상호 작용합니다.
Get an assignment
Gets a GitHub Classroom assignment. Assignment will only be returned if the current user is an administrator of the GitHub Classroom for the assignment.
"Get an assignment"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 어떤 권한도 필요하지 않습니다.
공용 리소스만 요청되는 경우 인증 없이 이 엔드포인트를 사용할 수 있습니다.
"Get an assignment"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
assignment_id integer RequiredThe unique identifier of the classroom assignment. |
"Get an assignment"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
404 | Resource not found |
"Get an assignment"에 대한 코드 샘플
요청 예제
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
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"
}
}
List accepted assignments for an assignment
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.
"List accepted assignments for an assignment"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 어떤 권한도 필요하지 않습니다.
공용 리소스만 요청되는 경우 인증 없이 이 엔드포인트를 사용할 수 있습니다.
"List accepted assignments for an assignment"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
assignment_id integer RequiredThe unique identifier of the classroom assignment. |
속성, 형식, 설명 |
---|
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." 기본값: |
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." 기본값: |
"List accepted assignments for an assignment"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
"List accepted assignments for an assignment"에 대한 코드 샘플
요청 예제
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
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"
}
}
}
Get assignment grades
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.
"Get assignment grades"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 어떤 권한도 필요하지 않습니다.
공용 리소스만 요청되는 경우 인증 없이 이 엔드포인트를 사용할 수 있습니다.
"Get assignment grades"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
assignment_id integer RequiredThe unique identifier of the classroom assignment. |
"Get assignment grades"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
404 | Resource not found |
"Get assignment grades"에 대한 코드 샘플
요청 예제
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
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"
}
]
List classrooms
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.
"List classrooms"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 어떤 권한도 필요하지 않습니다.
공용 리소스만 요청되는 경우 인증 없이 이 엔드포인트를 사용할 수 있습니다.
"List classrooms"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." 기본값: |
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." 기본값: |
"List classrooms"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
"List classrooms"에 대한 코드 샘플
요청 예제
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/classrooms
Response
Get a classroom
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.
"Get a classroom"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 어떤 권한도 필요하지 않습니다.
공용 리소스만 요청되는 경우 인증 없이 이 엔드포인트를 사용할 수 있습니다.
"Get a classroom"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
classroom_id integer RequiredThe unique identifier of the classroom. |
"Get a classroom"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
404 | Resource not found |
"Get a classroom"에 대한 코드 샘플
요청 예제
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
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"
}
List assignments for a classroom
Lists GitHub Classroom assignments for a classroom. Assignments will only be returned if the current user is an administrator of the GitHub Classroom.
"List assignments for a classroom"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 어떤 권한도 필요하지 않습니다.
공용 리소스만 요청되는 경우 인증 없이 이 엔드포인트를 사용할 수 있습니다.
"List assignments for a classroom"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
classroom_id integer RequiredThe unique identifier of the classroom. |
속성, 형식, 설명 |
---|
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." 기본값: |
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." 기본값: |
"List assignments for a classroom"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
"List assignments for a classroom"에 대한 코드 샘플
요청 예제
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
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"
}
}