Method: courses.teachers.delete
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Rimuove l'insegnante specificato dal corso specificato.
Questo metodo restituisce i seguenti codici di errore:
PERMISSION_DENIED
se l'utente che effettua la richiesta non è autorizzato a eliminare gli insegnanti di questo corso o per errori di accesso.
NOT_FOUND
se nessun insegnante di questo corso ha l'ID richiesto o se il corso non esiste.
FAILED_PRECONDITION
se l'ID richiesto appartiene all'insegnante principale di questo corso.
FAILED_PRECONDITION
se l'ID richiesto appartiene al proprietario della cartella di Drive del corso.
FAILED_PRECONDITION
se il corso non ha più un proprietario attivo.
Richiesta HTTP
DELETE https://classroom.googleapis.com/v1/courses/{courseId}/teachers/{userId}
L'URL utilizza la sintassi di transcodifica gRPC.
Parametri del percorso
Parametri |
courseId |
string
Identificatore del corso. Questo identificatore può essere l'identificatore assegnato da Classroom o un alias .
|
userId |
string
Identificatore dell'insegnante da eliminare. L'identificatore può essere uno dei seguenti:
- l'identificatore numerico dell'utente
- l'indirizzo email dell'utente
- la stringa letterale
"me" , che indica l'utente che effettua la richiesta
|
Corpo della richiesta
Il corpo della richiesta deve essere vuoto.
Corpo della risposta
In caso di esito positivo, il corpo della risposta è un oggetto JSON vuoto.
Ambiti di autorizzazione
Richiede il seguente ambito OAuth:
https://www.googleapis.com/auth/classroom.rosters
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: courses.teachers.delete\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nRemoves the specified teacher from the specified course.\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` if the requesting user is not permitted to delete teachers of this course or for [access errors](/workspace/classroom/reference/Access.Errors).\n- `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist.\n- `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher of this course.\n- `FAILED_PRECONDITION` if the requested ID belongs to the owner of the course Drive folder.\n- `FAILED_PRECONDITION` if the course no longer has an active owner.\n\n### HTTP request\n\n`DELETE https://classroom.googleapis.com/v1/courses/{courseId}/teachers/{userId}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `courseId` | `string` Identifier of the course. This identifier can be either the Classroom-assigned identifier or an [alias](/workspace/classroom/reference/rest/v1/courses.aliases#CourseAlias). |\n| `userId` | `string` Identifier of the teacher to delete. The identifier can be 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\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body is an empty JSON object.\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/classroom.rosters`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]