Google Classroom ऐड-ऑन अब आम तौर पर डेवलपर के लिए उपलब्ध हैं! ज़्यादा जानकारी के लिए, कृपया
ऐड-ऑन दस्तावेज़ देखें.
Method: courses.courseWorkMaterials.addOnAttachments.patch
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
ऐड-ऑन अटैचमेंट को अपडेट करता है.
इसके लिए ज़रूरी है कि ऐड-ऑन, अटैचमेंट का ओरिजनल क्रिएटर हो.
इस तरीके से, गड़बड़ी के ये कोड मिलते हैं:
- ऐक्सेस से जुड़ी गड़बड़ियों के लिए
PERMISSION_DENIED
.
INVALID_ARGUMENT
अगर अनुरोध गलत है.
NOT_FOUND
अगर पहचाने गए किसी संसाधन का अस्तित्व नहीं है.
एचटीटीपी अनुरोध
PATCH https://classroom.googleapis.com/v1/courses/{courseId}/courseWorkMaterials/{itemId}/addOnAttachments/{attachmentId}
यूआरएल में gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल किया गया है.
पाथ पैरामीटर
पैरामीटर |
courseId |
string
ज़रूरी है. कोर्स का आइडेंटिफ़ायर.
|
itemId |
string
उस पोस्ट का आइडेंटिफ़ायर जिसमें अटैचमेंट अटैच किया गया है.
|
attachmentId |
string
ज़रूरी है. अटैचमेंट का आइडेंटिफ़ायर.
|
क्वेरी पैरामीटर
पैरामीटर |
postId |
string
ज़रूरी है. उस पोस्ट का आइडेंटिफ़ायर जिसमें अटैचमेंट अटैच किया गया है.
|
updateMask |
string (FieldMask format)
ज़रूरी है. मास्क, जो अटैचमेंट के किन फ़ील्ड को अपडेट करने की पहचान करता है. अमान्य फ़ील्ड की जानकारी देने पर, अपडेट नहीं हो पाता. अगर कोई फ़ील्ड खाली वैल्यू के साथ काम करता है, तो उसे AddOnAttachment ऑब्जेक्ट में नहीं, बल्कि अपडेट मास्क में बताकर खाली किया जा सकता है. अगर अपडेट मास्क में कोई ऐसा फ़ील्ड शामिल किया गया है जिसमें खाली वैल्यू काम नहीं करती हैं और उसे AddOnAttachment ऑब्जेक्ट में सेट नहीं किया गया है, तो INVALID_ARGUMENT गड़बड़ी का मैसेज दिखता है. शिक्षक इन फ़ील्ड की जानकारी दे सकते हैं:
title
teacherViewUri
studentViewUri
studentWorkReviewUri
dueDate
dueTime
maxPoints
यह फ़ील्ड के पूरी तरह से क्वालिफ़ाइड नामों की सूची है. इसमें नामों को कॉमा लगाकर अलग किया गया है. उदाहरण: "user.displayName,photo" .
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य भाग में AddOnAttachment
का उदाहरण है.
जवाब का मुख्य भाग
कामयाब रहने पर, जवाब के मुख्य हिस्से में AddOnAttachment
का एक इंस्टेंस शामिल किया जाता है.
अनुमति के दायरे
नीचे दिए गए OAuth के लिंक की ज़रूरत हाेती है:
https://www.googleapis.com/auth/classroom.addons.teacher
ज़्यादा जानकारी के लिए, अनुमति से जुड़ी गाइड देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को 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: courses.courseWorkMaterials.addOnAttachments.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\nUpdates an add-on attachment.\n\nRequires the add-on to have been the original creator of the attachment.\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` for [access errors](/workspace/classroom/reference/Access.Errors).\n- `INVALID_ARGUMENT` if the request is malformed.\n- `NOT_FOUND` if one of the identified resources does not exist.\n\n### HTTP request\n\n`PATCH https://classroom.googleapis.com/v1/courses/{courseId}/courseWorkMaterials/{itemId}/addOnAttachments/{attachmentId}`\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| `itemId` | `string` Identifier of the post under which the attachment is attached. |\n| `attachmentId` | `string` Required. Identifier of the attachment. |\n\n### Query parameters\n\n| Parameters ||\n|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `postId` | `string` Required. Identifier of the post under which the attachment is attached. |\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` Required. Mask that identifies which fields on the attachment to update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `AddOnAttachment` object. If a field that does not support empty values is included in the update mask and not set in the `AddOnAttachment` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: - `title` - `teacherViewUri` - `studentViewUri` - `studentWorkReviewUri` - `dueDate` - `dueTime` - `maxPoints` 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 [AddOnAttachment](/workspace/classroom/reference/rest/v1/courses.announcements.addOnAttachments#AddOnAttachment).\n\n### Response body\n\nIf successful, the response body contains an instance of [AddOnAttachment](/workspace/classroom/reference/rest/v1/courses.announcements.addOnAttachments#AddOnAttachment).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/classroom.addons.teacher`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]