Method: userProfiles.guardians.delete
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מחיקה של אפוטרופוס.
האפוטרופוס לא יקבל יותר התראות לגבי הילד או הילדה, ולא תהיה יותר גישה אליו דרך ה-API.
השיטה הזו מחזירה את קודי השגיאה הבאים:
PERMISSION_DENIED
אם לא מופיע משתמש שמתאים ל-studentId
שצוין למשתמש המבקש, אם למשתמש המבקש אין הרשאה לנהל את האפוטרופוסים של התלמיד שצוין ב-studentId
, אם האפוטרופוסים לא מופעלים בדומיין הרלוונטי או בגלל שגיאות גישה אחרות.
INVALID_ARGUMENT
אם צוין studentId
, אבל לא ניתן לזהות את הפורמט שלו (הוא לא כתובת אימייל ולא studentId
מה-API).
NOT_FOUND
אם למשתמש המבקש יש הרשאה לשנות את האפוטרופוסים של studentId
המבוקש, אבל לא קיים רשומת Guardian
של התלמיד/ה עם guardianId
שצוין.
בקשת HTTP
DELETE https://classroom.googleapis.com/v1/userProfiles/{studentId}/guardians/{guardianId}
כתובת ה-URL משתמשת בתחביר של Transcoding של gRPC.
פרמטרים של נתיב
פרמטרים |
studentId |
string
התלמיד/ה שאת האפוטרופוס שלו/ה רוצים למחוק. אחד מהבאים:
- המזהה המספרי של המשתמש
- כתובת האימייל של המשתמש
- מחרוזת הליבה
"me" , שמציינת את המשתמש המבקש
|
guardianId |
string
השדה id מ-Guardian .
|
גוף הבקשה
גוף הבקשה חייב להיות ריק.
גוף התשובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה הוא אובייקט JSON ריק.
היקפי הרשאה
נדרש היקף הרשאות OAuth הבא:
https://www.googleapis.com/auth/classroom.guardianlinks.students
מידע נוסף זמין במדריך ההרשאות.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[],[],null,["# Method: userProfiles.guardians.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\nDeletes a guardian.\n\nThe guardian will no longer receive guardian notifications and the guardian will no longer be accessible via the API.\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` if no user that matches the provided `studentId` is visible to the requesting user, if the requesting user is not permitted to manage guardians for the student identified by the `studentId`, if guardians are not enabled for the domain in question, or for other [access errors](/workspace/classroom/reference/Access.Errors).\n- `INVALID_ARGUMENT` if a `studentId` is specified, but its format cannot be recognized (it is not an email address, nor a `studentId` from the API).\n- `NOT_FOUND` if the requesting user is permitted to modify guardians for the requested `studentId`, but no `Guardian` record exists for that student with the provided `guardianId`.\n\n### HTTP request\n\n`DELETE https://classroom.googleapis.com/v1/userProfiles/{studentId}/guardians/{guardianId}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `studentId` | `string` The student whose guardian is to be deleted. 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| `guardianId` | `string` The `id` field from a `Guardian`. |\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.guardianlinks.students`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]