Method: enterprises.enrollmentTokens.list
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Elenca i token di registrazione attivi e non scaduti per una determinata azienda. Gli elementi dell'elenco contengono solo una visualizzazione parziale dell'oggetto EnrollmentToken. Vengono compilati solo i seguenti campi: name
, expirationTimestamp
, allowPersonalUsage
, value
, qrCode
. Questo metodo è pensato per aiutarti a gestire il ciclo di vita dei token di registrazione attivi. Per motivi di sicurezza, ti consigliamo di delete
i token di registrazione attivi non appena non sono più previsti per l'utilizzo.
Richiesta HTTP
GET https://androidmanagement.googleapis.com/v1/{parent=enterprises/*}/enrollmentTokens
L'URL utilizza la sintassi di transcodifica gRPC.
Parametri del percorso
Parametri |
parent |
string
Obbligatorio. Il nome dell'azienda nel formato enterprises/{enterpriseId} .
|
Parametri di query
Parametri |
pageSize |
integer
Le dimensioni della pagina richieste. Il servizio potrebbe restituire meno di questo valore. Se non specificato, verranno restituiti al massimo 10 elementi. Il valore massimo è 100; i valori superiori a 100 verranno forzati a 100.
|
pageToken |
string
Un token che identifica una pagina di risultati restituita dal server.
|
Corpo della richiesta
Il corpo della richiesta deve essere vuoto.
Corpo della risposta
Risposta a una richiesta di elenco dei token di registrazione per una determinata azienda.
In caso di esito positivo, il corpo della risposta contiene dati con la seguente struttura:
Rappresentazione JSON |
{
"enrollmentTokens": [
{
object (EnrollmentToken )
}
],
"nextPageToken": string
} |
Campi |
enrollmentTokens[] |
object (EnrollmentToken )
L'elenco dei token di registrazione.
|
nextPageToken |
string
Se sono presenti altri risultati, un token per recuperare la pagina successiva dei risultati.
|
Ambiti di autorizzazione
Richiede il seguente ambito OAuth:
https://www.googleapis.com/auth/androidmanagement
Per ulteriori informazioni, consulta la sezione OAuth 2.0 Overview.
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-26 UTC.
[null,null,["Ultimo aggiornamento 2025-07-26 UTC."],[[["\u003cp\u003eThis operation lists active, unexpired enrollment tokens for a given enterprise, providing a partial view of the EnrollmentToken object with specific fields populated.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires the enterprise ID as a path parameter and allows for pagination using query parameters \u003ccode\u003epageSize\u003c/code\u003e and \u003ccode\u003epageToken\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe response includes a list of enrollment tokens and a token for retrieving the next page of results if available.\u003c/p\u003e\n"],["\u003cp\u003eFor security, it is recommended to delete active enrollment tokens when they are no longer needed.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/androidmanagement\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],["This document outlines the process of listing active enrollment tokens for an enterprise using a `GET` request. The request targets `enterprises/{enterpriseId}/enrollmentTokens` and requires a `parent` path parameter specifying the enterprise ID. Optional query parameters, `pageSize` and `pageToken`, manage result pagination. The request body must be empty. A successful response includes a list of `enrollmentTokens`, containing fields like name, expiration, usage allowance, value and qr code, and an optional `nextPageToken` for subsequent pages. This action requires the `androidmanagement` OAuth scope.\n"],null,["# Method: enterprises.enrollmentTokens.list\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 - [JSON representation](#body.ListEnrollmentTokensResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nLists active, unexpired enrollment tokens for a given enterprise. The list items contain only a partial view of EnrollmentToken object. Only the following fields are populated: [`name`](/android/management/reference/rest/v1/enterprises.enrollmentTokens#EnrollmentToken.FIELDS.name), [`expirationTimestamp`](/android/management/reference/rest/v1/enterprises.enrollmentTokens#EnrollmentToken.FIELDS.expiration_timestamp), [`allowPersonalUsage`](/android/management/reference/rest/v1/enterprises.enrollmentTokens#EnrollmentToken.FIELDS.allow_personal_usage), [`value`](/android/management/reference/rest/v1/enterprises.enrollmentTokens#EnrollmentToken.FIELDS.value), [`qrCode`](/android/management/reference/rest/v1/enterprises.enrollmentTokens#EnrollmentToken.FIELDS.qr_code). This method is meant to help manage active enrollment tokens lifecycle. For security reasons, it's recommended to [delete](/android/management/reference/rest/v1/enterprises.enrollmentTokens/delete#google.android.devicemanagement.v1.DeviceManagementService.DeleteEnrollmentToken) active enrollment tokens as soon as they're not intended to be used anymore.\n\n### HTTP request\n\n`GET https://androidmanagement.googleapis.com/v1/{parent=enterprises/*}/enrollmentTokens`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The name of the enterprise in the form `enterprises/{enterpriseId}`. |\n\n### Query parameters\n\n| Parameters ||\n|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` The requested page size. The service may return fewer than this value. If unspecified, at most 10 items will be returned. The maximum value is 100; values above 100 will be coerced to 100. |\n| `pageToken` | `string` A token identifying a page of results returned by the server. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nResponse to a request to list enrollment tokens for a given enterprise.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"enrollmentTokens\": [ { object (/android/management/reference/rest/v1/enterprises.enrollmentTokens#EnrollmentToken) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|\n| `enrollmentTokens[]` | `object (`[EnrollmentToken](/android/management/reference/rest/v1/enterprises.enrollmentTokens#EnrollmentToken)`)` The list of enrollment tokens. |\n| `nextPageToken` | `string` If there are more results, a token to retrieve next page of results. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidmanagement`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]