Google Classroom ऐड-ऑन अब आम तौर पर डेवलपर के लिए उपलब्ध हैं! ज़्यादा जानकारी के लिए, कृपया
ऐड-ऑन दस्तावेज़ देखें.
Method: userProfiles.guardianInvitations.patch
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
अभिभावक को भेजे गए न्योते में बदलाव करता है.
फ़िलहाल, state
को PENDING
से COMPLETE
में बदलना ही मान्य बदलाव है. इससे न्योता वापस ले लिया जाता है.
इस तरीके से, गड़बड़ी के ये कोड मिलते हैं:
PERMISSION_DENIED
अगर मौजूदा उपयोगकर्ता के पास, अभिभावकों को मैनेज करने की अनुमति नहीं है, तो सवाल में दिए गए डोमेन के लिए अभिभावक की सुविधा चालू नहीं है या ऐक्सेस से जुड़ी अन्य गड़बड़ियों की वजह से ऐसा हो सकता है.
FAILED_PRECONDITION
अगर अभिभावक का लिंक PENDING
स्टेटस में नहीं है.
INVALID_ARGUMENT
अगर छात्र/छात्रा के दिए गए आईडी के फ़ॉर्मैट की पहचान नहीं की जा सकती (यह ईमेल पता नहीं है और न ही इस एपीआई से मिला userId
है), या सबमिट किए गए GuardianInvitation
में COMPLETE
के अलावा कोई दूसरा state
है या state
के अलावा किसी दूसरे फ़ील्ड में बदलाव किया गया है.
NOT_FOUND
अगर दिया गया स्टूडेंट आईडी मान्य है, लेकिन Classroom में उस छात्र/छात्रा का कोई रिकॉर्ड नहीं है या id
फ़ील्ड में, Classroom के पास मौजूद अभिभावक के न्योते का रेफ़रंस नहीं है.
एचटीटीपी अनुरोध
PATCH https://classroom.googleapis.com/v1/userProfiles/{studentId}/guardianInvitations/{invitationId}
यूआरएल में gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल किया गया है.
पाथ पैरामीटर
पैरामीटर |
studentId |
string
उस छात्र/छात्रा का आईडी जिसकी अभिभावक के लिए भेजे गए न्योते में बदलाव करना है.
|
invitationId |
string
GuardianInvitation का id फ़ील्ड, जिसमें बदलाव करना है.
|
क्वेरी पैरामीटर
पैरामीटर |
updateMask |
string (FieldMask format)
मास्क, जो यह बताता है कि कोर्स के किन फ़ील्ड को अपडेट करना है. अपडेट करने के लिए, यह फ़ील्ड भरना ज़रूरी है. अमान्य फ़ील्ड की जानकारी देने पर, अपडेट नहीं हो पाता. ये फ़ील्ड मान्य हैं:
क्वेरी पैरामीटर में सेट करते समय, इस फ़ील्ड को इस तरह सेट किया जाना चाहिए updateMask=<field1>,<field2>,...
यह फ़ील्ड के पूरी तरह से क्वालिफ़ाइड नामों की सूची है. इसमें नामों को कॉमा लगाकर अलग किया गया है. उदाहरण: "user.displayName,photo" .
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य भाग में GuardianInvitation
का उदाहरण है.
जवाब का मुख्य भाग
कामयाब रहने पर, जवाब के मुख्य हिस्से में GuardianInvitation
का एक इंस्टेंस शामिल किया जाता है.
अनुमति के दायरे
नीचे दिए गए OAuth के लिंक की ज़रूरत हाेती है:
https://www.googleapis.com/auth/classroom.guardianlinks.students
ज़्यादा जानकारी के लिए, अनुमति से जुड़ी गाइड देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[],[],null,["# Method: userProfiles.guardianInvitations.patch\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\nModifies a guardian invitation.\n\nCurrently, the only valid modification is to change the `state` from `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation.\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` if the current user does not have permission to manage guardians, if guardians are not enabled for the domain in question or for other [access errors](/workspace/classroom/reference/Access.Errors).\n- `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state.\n- `INVALID_ARGUMENT` if the format of the student ID provided cannot be recognized (it is not an email address, nor a `userId` from this API), or if the passed `GuardianInvitation` has a `state` other than `COMPLETE`, or if it modifies fields other than `state`.\n- `NOT_FOUND` if the student ID provided is a valid student ID, but Classroom has no record of that student, or if the `id` field does not refer to a guardian invitation known to Classroom.\n\n### HTTP request\n\n`PATCH https://classroom.googleapis.com/v1/userProfiles/{studentId}/guardianInvitations/{invitationId}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------------|-----------------------------------------------------------------------------|\n| `studentId` | `string` The ID of the student whose guardian invitation is to be modified. |\n| `invitationId` | `string` The `id` field of the `GuardianInvitation` to be modified. |\n\n### Query parameters\n\n| Parameters ||\n|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` Mask that identifies which fields on the course to update. This field is required to do an update. The update fails if invalid fields are specified. The following fields are valid: - `state` When set in a query parameter, this field should be specified as `updateMask=\u003cfield1\u003e,\u003cfield2\u003e,...` This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |\n\n### Request body\n\nThe request body contains an instance of [GuardianInvitation](/workspace/classroom/reference/rest/v1/userProfiles.guardianInvitations#GuardianInvitation).\n\n### Response body\n\nIf successful, the response body contains an instance of [GuardianInvitation](/workspace/classroom/reference/rest/v1/userProfiles.guardianInvitations#GuardianInvitation).\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)."]]