Google Classroom ऐड-ऑन अब आम तौर पर डेवलपर के लिए उपलब्ध हैं! ज़्यादा जानकारी के लिए, कृपया
ऐड-ऑन दस्तावेज़ देखें.
Method: courses.aliases.create
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
किसी कोर्स के लिए दूसरा नाम बनाता है.
इस तरीके से, गड़बड़ी के ये कोड मिलते हैं:
PERMISSION_DENIED
अगर अनुरोध करने वाले उपयोगकर्ता को उपनाम बनाने की अनुमति नहीं है या ऐक्सेस से जुड़ी गड़बड़ियों की वजह से.
NOT_FOUND
, अगर कोर्स मौजूद नहीं है.
ALREADY_EXISTS
, अगर उपनाम पहले से मौजूद है.
FAILED_PRECONDITION
अगर अनुरोध किए गए उपनाम का इस्तेमाल, अनुरोध करने वाले उपयोगकर्ता या कोर्स के लिए सही नहीं है. उदाहरण के लिए, अगर कोई उपयोगकर्ता किसी डोमेन में नहीं है और वह डोमेन के दायरे वाले उपनाम को ऐक्सेस करने की कोशिश करता है.
एचटीटीपी अनुरोध
POST https://classroom.googleapis.com/v1/courses/{courseId}/aliases
यूआरएल में gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल किया गया है.
पाथ पैरामीटर
पैरामीटर |
courseId |
string
उस कोर्स का आइडेंटिफ़ायर जिसका दूसरा नाम रखना है. यह आइडेंटिफ़ायर, Classroom से असाइन किया गया आइडेंटिफ़ायर या alias हो सकता है.
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य भाग में CourseAlias
का उदाहरण है.
जवाब का मुख्य भाग
कामयाब रहने पर, जवाब के मुख्य हिस्से में CourseAlias
का नया इंस्टेंस शामिल किया जाता है.
अनुमति के दायरे
नीचे दिए गए OAuth के लिंक की ज़रूरत हाेती है:
https://www.googleapis.com/auth/classroom.courses
ज़्यादा जानकारी के लिए, अनुमति से जुड़ी गाइड देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को 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.aliases.create\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\nCreates an alias for a course.\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` if the requesting user is not permitted to create the alias or for [access errors](/workspace/classroom/reference/Access.Errors).\n- `NOT_FOUND` if the course does not exist.\n- `ALREADY_EXISTS` if the alias already exists.\n- `FAILED_PRECONDITION` if the alias requested does not make sense for the requesting user or course (for example, if a user not in a domain attempts to access a domain-scoped alias).\n\n### HTTP request\n\n`POST https://classroom.googleapis.com/v1/courses/{courseId}/aliases`\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 to alias. This identifier can be either the Classroom-assigned identifier or an [alias](/workspace/classroom/reference/rest/v1/courses.aliases#CourseAlias). |\n\n### Request body\n\nThe request body contains an instance of [CourseAlias](/workspace/classroom/reference/rest/v1/courses.aliases#CourseAlias).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [CourseAlias](/workspace/classroom/reference/rest/v1/courses.aliases#CourseAlias).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/classroom.courses`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]