REST Resource: courses.aliases
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
משאב: CourseAlias
מזהה חלופי של קורס.
כינוי מזהה קורס באופן ייחודי. הוא חייב להיות ייחודי באחד מההיקפים הבאים:
דומיין: כתובת אימייל חלופית ברמת הדומיין גלויה לכל המשתמשים בדומיין של היוצר של כתובת האימייל החלופית, ורק אדמין דומיין יכול ליצור אותה. לעיתים קרובות משתמשים בכתובת אימייל חלופית ברמת הדומיין כשלקורס יש מזהה מחוץ ל-Classroom.
project: כינוי ברמת הפרויקט גלוי לכל בקשה מאפליקציה שמשתמשת במזהה הפרויקט ב-Developer Console שבו נוצר הכינוי, וניתן ליצור אותו בכל פרויקט. לרוב משתמשים בכינוי ברמת הפרויקט כשלאפליקציה יש מזהים חלופיים. אפשר להשתמש בערך אקראי גם כדי למנוע כפילויות של קורסים במקרה של כשלים בהעברה, כי ניסיון חוזר בבקשה יחזיר את הערך ALREADY_EXISTS
אם בקשה קודמת הצליחה.
ייצוג ב-JSON |
{
"alias": string
} |
שדות |
alias |
string
מחרוזת חלופית. הפורמט של המחרוזת מציין את היקף החלה הרצוי של הכינוי.
d:<name> מציין כינוי ברמת הדומיין. לדוגמה: d:math_101
p:<name> מציין כינוי ברמת הפרויקט. לדוגמה: p:abc123
האורך המקסימלי של השדה הוא 256 תווים.
|
Methods |
|
יצירת כינוי לקובץ קורס. |
|
מחיקה של כתובת אימייל חלופית של קורס. |
|
הפונקציה מחזירה רשימה של כינויים של קורס. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 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. |"]]