Hiện tại, các nhà phát triển đã có thể sử dụng rộng rãi tiện ích bổ sung của Google Lớp học! Vui lòng xem tài liệu về tiện ích bổ sung để biết thêm thông tin.
Bí danh giúp xác định duy nhất một khoá học. Mã này phải là duy nhất trong một trong các phạm vi sau:
miền: Tất cả người dùng trong miền của người tạo bí danh đều có thể xem bí danh ở phạm vi miền và chỉ quản trị viên miền mới có thể tạo bí danh. Bí danh ở phạm vi miền thường được dùng khi một khoá học có giá trị nhận dạng bên ngoài Lớp học.
project: Bất kỳ yêu cầu nào từ một ứng dụng sử dụng mã dự án trong Developer Console đã tạo bí danh và bất kỳ dự án nào cũng có thể tạo bí danh trong phạm vi dự án đều có thể thấy bí danh đó. Bí danh trong phạm vi dự án thường được dùng khi một ứng dụng có giá trị nhận dạng thay thế. Bạn cũng có thể sử dụng giá trị ngẫu nhiên để tránh các khoá học trùng lặp trong trường hợp không truyền được, vì việc thử lại một yêu cầu sẽ trả về ALREADY_EXISTS nếu yêu cầu trước đó đã thành công.
Biểu diễn dưới dạng JSON
{"alias": string}
Trường
alias
string
Chuỗi bí danh. Định dạng của chuỗi cho biết phạm vi bí danh mong muốn.
d:<name> cho biết bí danh ở phạm vi miền. Ví dụ: d:math_101
p:<name> cho biết một bí danh trong phạm vi dự án. Ví dụ: p:abc123
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 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. |"]]