Method: userProfiles.guardianInvitations.patch
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Modifica un invito al tutore.
Al momento, l'unica modifica valida è cambiare state
da PENDING
a COMPLETE
. Ciò ha l'effetto di ritirare l'invito.
Questo metodo restituisce i seguenti codici di errore:
PERMISSION_DENIED
se l'utente corrente non dispone dell'autorizzazione per gestire i tutori, se i tutori non sono attivati per il dominio in questione o per altri errori di accesso.
FAILED_PRECONDITION
se il link del tutore non è nello stato PENDING
.
INVALID_ARGUMENT
se il formato dell'ID studente fornito non è riconosciuto (non è un indirizzo email né un userId
di questa API), se il GuardianInvitation
passato ha un state
diverso da COMPLETE
o se modifica campi diversi da state
.
NOT_FOUND
se l'ID studente fornito è valido, ma Classroom non ha dati su questo studente oppure se il campo id
non fa riferimento a un invito del tutore noto a Classroom.
Richiesta HTTP
PATCH https://classroom.googleapis.com/v1/userProfiles/{studentId}/guardianInvitations/{invitationId}
L'URL utilizza la sintassi di transcodifica gRPC.
Parametri del percorso
Parametri |
studentId |
string
L'ID dello studente di cui deve essere modificato l'invito al tutore.
|
invitationId |
string
Il campo id dell'elemento GuardianInvitation da modificare.
|
Parametri di query
Parametri |
updateMask |
string (FieldMask format)
Maschera che identifica i campi del corso da aggiornare. Questo campo è obbligatorio per eseguire un aggiornamento. L'aggiornamento non riesce se vengono specificati campi non validi. I seguenti campi sono validi:
Se impostato in un parametro di query, questo campo deve essere specificato come updateMask=<field1>,<field2>,...
Si tratta di un elenco separato da virgole di nomi completi dei campi. Esempio: "user.displayName,photo" .
|
Corpo della richiesta
Il corpo della richiesta contiene un'istanza di GuardianInvitation
.
Corpo della risposta
In caso di esito positivo, il corpo della risposta contiene un'istanza di GuardianInvitation
.
Ambiti di autorizzazione
Richiede il seguente ambito OAuth:
https://www.googleapis.com/auth/classroom.guardianlinks.students
Per ulteriori informazioni, consulta la Guida all'autorizzazione.
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,["# Method: userProfiles.guardianInvitations.patch\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nModifies a guardian invitation.\n\nCurrently, the only valid modification is to change the `state` from `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation.\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` if the current user does not have permission to manage guardians, if guardians are not enabled for the domain in question or for other [access errors](/workspace/classroom/reference/Access.Errors).\n- `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state.\n- `INVALID_ARGUMENT` if the format of the student ID provided cannot be recognized (it is not an email address, nor a `userId` from this API), or if the passed `GuardianInvitation` has a `state` other than `COMPLETE`, or if it modifies fields other than `state`.\n- `NOT_FOUND` if the student ID provided is a valid student ID, but Classroom has no record of that student, or if the `id` field does not refer to a guardian invitation known to Classroom.\n\n### HTTP request\n\n`PATCH https://classroom.googleapis.com/v1/userProfiles/{studentId}/guardianInvitations/{invitationId}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------------|-----------------------------------------------------------------------------|\n| `studentId` | `string` The ID of the student whose guardian invitation is to be modified. |\n| `invitationId` | `string` The `id` field of the `GuardianInvitation` to be modified. |\n\n### Query parameters\n\n| Parameters ||\n|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` Mask that identifies which fields on the course to update. This field is required to do an update. The update fails if invalid fields are specified. The following fields are valid: - `state` When set in a query parameter, this field should be specified as `updateMask=\u003cfield1\u003e,\u003cfield2\u003e,...` This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |\n\n### Request body\n\nThe request body contains an instance of [GuardianInvitation](/workspace/classroom/reference/rest/v1/userProfiles.guardianInvitations#GuardianInvitation).\n\n### Response body\n\nIf successful, the response body contains an instance of [GuardianInvitation](/workspace/classroom/reference/rest/v1/userProfiles.guardianInvitations#GuardianInvitation).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/classroom.guardianlinks.students`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]