ส่วนเสริมของ Google Classroom พร้อมให้บริการแก่นักพัฒนาซอฟต์แวร์แล้ว โปรดดูข้อมูลเพิ่มเติมใน
เอกสารส่วนเสริม
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 ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
studentId |
string
นักเรียนที่จะลบผู้ปกครอง ประเภทใดประเภทหนึ่งต่อไปนี้
- ตัวระบุตัวเลขของผู้ใช้
- อีเมลของผู้ใช้
- สตริงตามตัวอักษร
"me" ที่ระบุผู้ใช้ที่ส่งคำขอ
|
guardianId |
string
ฟิลด์ id จาก Guardian
|
เนื้อความของคำขอ
เนื้อหาของคำขอต้องว่างเปล่า
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะเป็นออบเจ็กต์ JSON ว่าง
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/classroom.guardianlinks.students
ดูข้อมูลเพิ่มเติมได้ที่คู่มือการให้สิทธิ์
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 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)."]]