ส่วนเสริมของ Google Classroom พร้อมให้บริการแก่นักพัฒนาซอฟต์แวร์แล้ว โปรดดูข้อมูลเพิ่มเติมใน
เอกสารส่วนเสริม
REST Resource: courses.aliases
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ทรัพยากร: CourseAlias
ตัวระบุทางเลือกสำหรับหลักสูตร
อีเมลแทนจะระบุหลักสูตรแบบไม่ซ้ำกัน โดยต้องไม่ซ้ำกันภายในขอบเขตใดขอบเขตหนึ่งต่อไปนี้
โดเมน: ชื่อแทนระดับโดเมนจะแสดงให้ผู้ใช้ทุกคนภายในโดเมนของผู้สร้างชื่อแทนเห็น และผู้ดูแลระบบโดเมนเท่านั้นที่สร้างชื่อแทนได้ มักใช้อีเมลแทนที่ระดับโดเมนเมื่อหลักสูตรมีตัวระบุภายนอก Classroom
โปรเจ็กต์: อีเมลแทนระดับโปรเจ็กต์จะแสดงในคำขอจากแอปพลิเคชันที่ใช้รหัสโปรเจ็กต์ของ Developer Console ที่สร้างอีเมลแทน และโปรเจ็กต์ใดก็ได้สร้างอีเมลแทนได้ มักใช้อีเมลแทนระดับโปรเจ็กต์เมื่อแอปพลิเคชันมีตัวระบุอื่น นอกจากนี้ คุณยังใช้ค่าแบบสุ่มเพื่อหลีกเลี่ยงหลักสูตรที่ซ้ำกันในกรณีที่การส่งไม่สำเร็จได้ เนื่องจากการส่งคำขออีกครั้งจะแสดงผลเป็น ALREADY_EXISTS
หากคำขอก่อนหน้าสำเร็จ
การแสดง JSON |
{
"alias": string
} |
ช่อง |
alias |
string
สตริงชื่อแทน รูปแบบของสตริงจะระบุขอบเขตของนามแฝงที่ต้องการ
d:<name> หมายถึงชื่อแทนระดับโดเมน ตัวอย่าง: d:math_101
p:<name> หมายถึงอีเมลแทนระดับโปรเจ็กต์ ตัวอย่าง: p:abc123
ช่องนี้มีความยาวสูงสุด 256 อักขระ
|
เมธอด |
|
สร้างชื่อแทนสำหรับหลักสูตร |
|
ลบอีเมลแทนของหลักสูตร |
|
แสดงรายการอีเมลแทนสำหรับหลักสูตร |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[],[],null,["# REST Resource: courses.aliases\n\n- [Resource: CourseAlias](#CourseAlias)\n - [JSON representation](#CourseAlias.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: CourseAlias\n---------------------\n\nAlternative identifier for a course.\n\nAn alias uniquely identifies a course. It must be unique within one of the following scopes:\n\n- domain: A domain-scoped alias is visible to all users within the alias creator's domain and can be created only by a domain admin. A domain-scoped alias is often used when a course has an identifier external to Classroom.\n\n- project: A project-scoped alias is visible to any request from an application using the Developer Console project ID that created the alias and can be created by any project. A project-scoped alias is often used when an application has alternative identifiers. A random value can also be used to avoid duplicate courses in the event of transmission failures, as retrying a request will return `ALREADY_EXISTS` if a previous one has succeeded.\n\n| JSON representation |\n|-----------------------------|\n| ``` { \"alias\": string } ``` |\n\n| Fields ||\n|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `alias` | `string` Alias string. The format of the string indicates the desired alias scoping. - `d:\u003cname\u003e` indicates a domain-scoped alias. Example: `d:math_101` - `p:\u003cname\u003e` indicates a project-scoped alias. Example: `p:abc123` This field has a maximum length of 256 characters. |\n\n| Methods ------- ||\n|-----------------------------------------------------------------------------|-----------------------------------------|\n| ### [create](/workspace/classroom/reference/rest/v1/courses.aliases/create) | Creates an alias for a course. |\n| ### [delete](/workspace/classroom/reference/rest/v1/courses.aliases/delete) | Deletes an alias of a course. |\n| ### [list](/workspace/classroom/reference/rest/v1/courses.aliases/list) | Returns a list of aliases for a course. |"]]