REST Resource: invitations
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Risorsa: invito
Un invito a partecipare a un corso.
Rappresentazione JSON |
{
"id": string,
"userId": string,
"courseId": string,
"role": enum (CourseRole )
} |
Campi |
id |
string
Identificatore assegnato da Classroom. Sola lettura.
|
userId |
string
Identificatore dell'utente invitato. Se specificato come parametro di una richiesta, questo identificatore può essere impostato su uno dei seguenti valori:
- l'identificatore numerico dell'utente
- l'indirizzo email dell'utente
- la stringa letterale
"me" , che indica l'utente che effettua la richiesta
|
courseId |
string
Identificatore del corso a cui invitare l'utente.
|
role |
enum (CourseRole )
Ruolo da assegnare all'utente. Non deve essere COURSE_ROLE_UNSPECIFIED .
|
CourseRole
Possibili ruoli che un utente può ricevere.
Enum |
COURSE_ROLE_UNSPECIFIED |
Nessun ruolo nel corso. |
STUDENT |
Studente del corso. |
TEACHER |
Insegnante del corso. |
OWNER |
Proprietario del corso. |
Metodi |
|
Accetta un invito, rimuovendolo e aggiungendo l'utente invitato agli insegnanti o agli studenti (a seconda dei casi) del corso specificato. |
|
Crea un invito. |
|
Consente di eliminare un invito. |
|
Restituisce un invito. |
|
Restituisce un elenco di inviti che l'utente che effettua la richiesta può visualizzare, limitato a quelli corrispondenti alla richiesta dell'elenco. |
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-25 UTC.
[null,null,["Ultimo aggiornamento 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. |"]]