Google Classroom ऐड-ऑन अब आम तौर पर डेवलपर के लिए उपलब्ध हैं! ज़्यादा जानकारी के लिए, कृपया
ऐड-ऑन दस्तावेज़ देखें.
Method: courses.courseWork.studentSubmissions.modifyAttachments
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
छात्र/छात्रा के सबमिशन के अटैचमेंट में बदलाव करता है.
अटैचमेंट सिर्फ़ उन कोर्स वर्क ऑब्जेक्ट से जुड़े छात्र-छात्राओं के सबमिशन में जोड़े जा सकते हैं जिनका workType
ASSIGNMENT
है.
यह अनुरोध, उस OAuth क्लाइंट आईडी के Developer Console प्रोजेक्ट से किया जाना चाहिए जिसका इस्तेमाल कोर्स वर्क आइटम बनाने के लिए किया गया था.
इस तरीके से, गड़बड़ी के ये कोड मिलते हैं:
PERMISSION_DENIED
अगर अनुरोध करने वाले उपयोगकर्ता के पास, अनुरोध किए गए कोर्स या कोर्स के काम को ऐक्सेस करने की अनुमति नहीं है, अगर उपयोगकर्ता के पास, अनुरोध किए गए छात्र/छात्रा के सबमिशन में अटैचमेंट में बदलाव करने की अनुमति नहीं है या ऐक्सेस से जुड़ी गड़बड़ियों के लिए.
INVALID_ARGUMENT
अगर अनुरोध गलत है.
NOT_FOUND
अगर अनुरोध किया गया कोर्स, कोर्स का काम या छात्र/छात्रा का सबमिट किया गया काम मौजूद नहीं है.
एचटीटीपी अनुरोध
POST https://classroom.googleapis.com/v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments
यूआरएल में gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल किया गया है.
पाथ पैरामीटर
पैरामीटर |
courseId |
string
कोर्स का आइडेंटिफ़ायर. यह आइडेंटिफ़ायर, Classroom से असाइन किया गया आइडेंटिफ़ायर या alias हो सकता है.
|
courseWorkId |
string
कोर्स वर्क का आइडेंटिफ़ायर.
|
id |
string
छात्र-छात्रा के सबमिशन का आइडेंटिफ़ायर.
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य भाग में, नीचे दिए गए स्ट्रक्चर वाला डेटा होता है:
फ़ील्ड |
addAttachments[] |
object (Attachment )
जोड़ने के लिए अटैचमेंट. छात्र/छात्रा के सबमिशन में 20 से ज़्यादा अटैचमेंट नहीं हो सकते. Form अटैचमेंट काम नहीं करते.
|
previewVersion |
enum (PreviewVersion )
ज़रूरी नहीं. एपीआई का झलक वाला वर्शन. झलक देखने की सुविधा वाले प्रोग्राम में डेवलपर के लिए उपलब्ध एपीआई की नई सुविधाओं को ऐक्सेस करने के लिए, यह सेट करना ज़रूरी है.
|
जवाब का मुख्य भाग
कामयाब रहने पर, जवाब के मुख्य हिस्से में StudentSubmission
का एक इंस्टेंस शामिल किया जाता है.
अनुमति के दायरे
इसके लिए, OAuth के इनमें से किसी एक स्कोप की ज़रूरत होती है:
https://www.googleapis.com/auth/classroom.coursework.students
https://www.googleapis.com/auth/classroom.coursework.me
ज़्यादा जानकारी के लिए, अनुमति से जुड़ी गाइड देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को 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.courseWork.studentSubmissions.modifyAttachments\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nModifies attachments of student submission.\n\nAttachments may only be added to student submissions belonging to course work objects with a `workType` of `ASSIGNMENT`.\n\nThis request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item.\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, if the user is not permitted to modify attachments on the requested student submission, or for [access errors](/workspace/classroom/reference/Access.Errors).\n- `INVALID_ARGUMENT` if the request is malformed.\n- `NOT_FOUND` if the requested course, course work, or student submission does not exist.\n\n### HTTP request\n\n`POST https://classroom.googleapis.com/v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments`\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| `courseWorkId` | `string` Identifier of the course work. |\n| `id` | `string` Identifier of the student submission. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"addAttachments\": [ { object (/workspace/classroom/reference/rest/v1/courses.courseWork.studentSubmissions#Attachment) } ], \"previewVersion\": enum (/workspace/classroom/reference/rest/v1/PreviewVersion) } ``` |\n\n| Fields ||\n|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `addAttachments[]` | `object (`[Attachment](/workspace/classroom/reference/rest/v1/courses.courseWork.studentSubmissions#Attachment)`)` Attachments to add. A student submission may not have more than 20 attachments. [Form](/workspace/classroom/reference/rest/v1/Form) attachments are not supported. |\n| `previewVersion` | `enum (`[PreviewVersion](/workspace/classroom/reference/rest/v1/PreviewVersion)`)` Optional. The preview version of the API. This must be set in order to access new API capabilities made available to developers in the Preview Program. |\n\n### Response body\n\nIf successful, the response body contains an instance of [StudentSubmission](/workspace/classroom/reference/rest/v1/courses.courseWork.studentSubmissions#StudentSubmission).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/classroom.coursework.students`\n- `\n https://www.googleapis.com/auth/classroom.coursework.me`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]