يجب تقديم هذا الطلب من خلال وحدة تحكّم Google Cloud باستخدام معرّف عميل OAuth المستخدَم لإنشاء عنصر عمل الدورة التدريبية الرئيسية.
تُرجع هذه الطريقة رموز الأخطاء التالية:
PERMISSION_DENIED إذا لم يكن مسموحًا للمستخدم المُقدّم للطلب بإنشاء معايير تقييم لأعمال الدورة التدريبية في الدورة التدريبية المطلوبة.
INTERNAL إذا كان الطلب لا يتضمّن نطاقات OAuth كافية
INVALID_ARGUMENT إذا كان الطلب غير صالح وحدث خطأ في الطلب على النحو التالي:
RubricCriteriaInvalidFormat
NOT_FOUND إذا لم تكن الدورة التدريبية أو عمل الدورة التدريبية المطلوبة متوفّرة أو إذا لم يكن لدى المستخدم إذن الوصول إلى الدورة التدريبية أو عمل الدورة التدريبية
اختياريّ. إصدار المعاينة لواجهة برمجة التطبيقات. يجب ضبط هذا الخيار للوصول إلى إمكانات واجهة برمجة التطبيقات الجديدة المتاحة للمطوّرين في "برنامج المعاينة".
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],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)."]]