REST Resource: invitations
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
משאב: הזמנה
ייצוג ב-JSON |
{
"id": string,
"userId": string,
"courseId": string,
"role": enum (CourseRole )
} |
שדות |
id |
string
מזהה שהוקצה על ידי Classroom. קריאה בלבד.
|
userId |
string
המזהה של המשתמש שהוזמן. כשמציינים את המזהה הזה כפרמטר של בקשה, אפשר להגדיר אותו לאחת מהאפשרויות הבאות:
- המזהה המספרי של המשתמש
- כתובת האימייל של המשתמש
- מחרוזת הליבה
"me" , שמציינת את המשתמש המבקש
|
courseId |
string
המזהה של הקורס שאליו רוצים להזמין את המשתמש.
|
role |
enum (CourseRole )
התפקיד שרוצים להקצות למשתמש. הערך לא יכול להיות COURSE_ROLE_UNSPECIFIED .
|
CourseRole
התפקידים האפשריים שאפשר להזמין משתמשים להשתמש בהם.
טיפוסים בני מנייה (enum) |
COURSE_ROLE_UNSPECIFIED |
אין תפקיד בקורס. |
STUDENT |
סטודנט/ית בקורס. |
TEACHER |
המורה של הקורס. |
OWNER |
הבעלים של הקורס. |
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: invitations\n\n- [Resource: Invitation](#Invitation)\n - [JSON representation](#Invitation.SCHEMA_REPRESENTATION)\n- [CourseRole](#CourseRole)\n- [Methods](#METHODS_SUMMARY)\n\nResource: Invitation\n--------------------\n\nAn invitation to join a course.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"id\": string, \"userId\": string, \"courseId\": string, \"role\": enum (/workspace/classroom/reference/rest/v1/invitations#CourseRole) } ``` |\n\n| Fields ||\n|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `id` | `string` Identifier assigned by Classroom. Read-only. |\n| `userId` | `string` Identifier of the invited user. When specified as a parameter of a request, this identifier can be set to one of the following: - the numeric identifier for the user - the email address of the user - the string literal `\"me\"`, indicating the requesting user |\n| `courseId` | `string` Identifier of the course to invite the user to. |\n| `role` | `enum (`[CourseRole](/workspace/classroom/reference/rest/v1/invitations#CourseRole)`)` Role to invite the user to have. Must not be `COURSE_ROLE_UNSPECIFIED`. |\n\nCourseRole\n----------\n\nPossible roles a user may be invite to have.\n\n| Enums ||\n|---------------------------|------------------------|\n| `COURSE_ROLE_UNSPECIFIED` | No course role. |\n| `STUDENT` | Student in the course. |\n| `TEACHER` | Teacher of the course. |\n| `OWNER` | Owner of the course. |\n\n| Methods ------- ||\n|-------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|\n| ### [accept](/workspace/classroom/reference/rest/v1/invitations/accept) | Accepts an invitation, removing it and adding the invited user to the teachers or students (as appropriate) of the specified course. |\n| ### [create](/workspace/classroom/reference/rest/v1/invitations/create) | Creates an invitation. |\n| ### [delete](/workspace/classroom/reference/rest/v1/invitations/delete) | Deletes an invitation. |\n| ### [get](/workspace/classroom/reference/rest/v1/invitations/get) | Returns an invitation. |\n| ### [list](/workspace/classroom/reference/rest/v1/invitations/list) | Returns a list of invitations that the requesting user is permitted to view, restricted to those that match the list request. |"]]