Hiện tại, các nhà phát triển đã có thể sử dụng rộng rãi tiện ích bổ sung của Google Lớp học! Vui lòng xem tài liệu về tiện ích bổ sung để biết thêm thông tin.
Yêu cầu này phải được thực hiện bằng bảng điều khiển Google Cloud của mã ứng dụng khách OAuth dùng để tạo mục bài tập chính trong khoá học.
Phương thức này trả về các mã lỗi sau:
PERMISSION_DENIED nếu người dùng yêu cầu không được phép tạo tiêu chí chấm điểm cho bài tập trong khoá học được yêu cầu.
INTERNAL nếu yêu cầu không có đủ phạm vi OAuth.
INVALID_ARGUMENT nếu yêu cầu có định dạng không chính xác và đối với lỗi yêu cầu sau:
RubricCriteriaInvalidFormat
NOT_FOUND nếu khoá học hoặc bài tập trong khoá học được yêu cầu không tồn tại hoặc người dùng không có quyền truy cập vào khoá học hoặc bài tập trong khoá học.
Không bắt buộc. Phiên bản xem trước của API. Bạn phải đặt giá trị này để truy cập vào các tính năng API mới được cung cấp cho nhà phát triển trong Chương trình xem trước.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[],[],null,["# Method: courses.courseWork.rubrics.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCreates a rubric.\n\nThe requesting user and course owner must have rubrics creation capabilities. For details, see [licensing requirements](https://developers.google.com/workspace/classroom/rubrics/limitations#license-requirements).\n\nFor further details, see [Rubrics structure and known limitations](/classroom/rubrics/limitations).\n\nThis request must be made by the Google Cloud console of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the parent course work item.\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` if the requesting user isn't permitted to create rubrics for course work in the requested course.\n- `INTERNAL` if the request has insufficient OAuth scopes.\n- `INVALID_ARGUMENT` if the request is malformed and for the following [request error](/workspace/classroom/reference/Request.Errors):\n - `RubricCriteriaInvalidFormat`\n- `NOT_FOUND` if the requested course or course work don't exist or the user doesn't have access to the course or course work.\n- `FAILED_PRECONDITION` for the following [request error](/workspace/classroom/reference/Request.Errors):\n - `AttachmentNotVisible`\n\n### HTTP request\n\n`POST https://classroom.googleapis.com/v1/courses/{courseId}/courseWork/{courseWorkId}/rubrics`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------------|---------------------------------------------------|\n| `courseId` | `string` Required. Identifier of the course. |\n| `courseWorkId` | `string` Required. Identifier of the course work. |\n\n### Query parameters\n\n| Parameters ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `previewVersion` | `enum (`[PreviewVersion](/workspace/classroom/reference/rest/v1/PreviewVersion)`)` Optional. The preview version of the API. This must be set in order to access new API capabilities made available to developers in the Preview Program. |\n\n### Request body\n\nThe request body contains an instance of [Rubric](/workspace/classroom/reference/rest/v1/courses.courseWork.rubrics#Rubric).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Rubric](/workspace/classroom/reference/rest/v1/courses.courseWork.rubrics#Rubric).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/classroom.coursework.students`\n| **Important:** Creating a rubric from a Google Sheet by specifying the `sourceSpreadsheetId` requires additional scopes: either `https://www.googleapis.com/auth/spreadsheets.readonly` or `https://www.googleapis.com/auth/spreadsheets`. Be aware that the `spreadsheets` scopes are considered sensitive and may require your application to be [verified](https://support.google.com/cloud/answer/9110914).\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]