Method: courses.teachers.delete
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
הסרת המורה שצוין מהקורס שצוין.
השיטה הזו מחזירה את קודי השגיאה הבאים:
PERMISSION_DENIED
אם למשתמש המבקש אין הרשאה למחוק מורים מהקורס הזה, או בגלל שגיאות גישה.
NOT_FOUND
אם לאף מורה בקורס הזה אין את המזהה המבוקש או אם הקורס לא קיים.
FAILED_PRECONDITION
אם התעודה המזהה המבוקשת שייכת למורה הראשי של הקורס.
FAILED_PRECONDITION
אם המזהה המבוקש שייך לבעלים של תיקיית הקורס ב-Drive.
FAILED_PRECONDITION
אם אין יותר בעלים פעיל של הקורס.
בקשת HTTP
DELETE https://classroom.googleapis.com/v1/courses/{courseId}/teachers/{userId}
כתובת ה-URL משתמשת בתחביר של Transcoding של gRPC.
פרמטרים של נתיב
פרמטרים |
courseId |
string
המזהה של הקורס. המזהה הזה יכול להיות המזהה שהוקצה ב-Classroom או alias .
|
userId |
string
המזהה של המורה שרוצים למחוק. המזהה יכול להיות אחד מהערכים הבאים:
- המזהה המספרי של המשתמש
- כתובת האימייל של המשתמש
- מחרוזת הליבה
"me" , שמציינת את המשתמש המבקש
|
גוף הבקשה
גוף הבקשה חייב להיות ריק.
גוף התשובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה הוא אובייקט JSON ריק.
היקפי הרשאה
נדרש היקף הרשאות OAuth הבא:
https://www.googleapis.com/auth/classroom.rosters
מידע נוסף זמין במדריך ההרשאות.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[],[],null,["# Method: courses.teachers.delete\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nRemoves the specified teacher from the specified course.\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` if the requesting user is not permitted to delete teachers of this course or for [access errors](/workspace/classroom/reference/Access.Errors).\n- `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist.\n- `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher of this course.\n- `FAILED_PRECONDITION` if the requested ID belongs to the owner of the course Drive folder.\n- `FAILED_PRECONDITION` if the course no longer has an active owner.\n\n### HTTP request\n\n`DELETE https://classroom.googleapis.com/v1/courses/{courseId}/teachers/{userId}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `courseId` | `string` Identifier of the course. This identifier can be either the Classroom-assigned identifier or an [alias](/workspace/classroom/reference/rest/v1/courses.aliases#CourseAlias). |\n| `userId` | `string` Identifier of the teacher to delete. The identifier can be one of the following: - the numeric identifier for the user - the email address of the user - the string literal `\"me\"`, indicating the requesting user |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body is an empty JSON object.\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/classroom.rosters`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]