Method: enterprises.migrationTokens.list
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
GET https://androidmanagement.googleapis.com/v1/{parent=enterprises/*}/migrationTokens
网址采用 gRPC 转码语法。
路径参数
参数 |
parent |
string
必需。迁移令牌所属的企业。格式:enterprises/{enterprise}
|
查询参数
参数 |
pageSize |
integer
要返回的迁移令牌的数量上限。返回的迁移令牌可能会更少。如果未指定,则最多返回 100 个迁移令牌。最大值为 100;高于 100 的值将强制转换为 100。
|
pageToken |
string
从之前的 migrationTokens.list 调用接收的页面令牌。利用其进行后续页面检索。 进行分页时,提供给 migrationTokens.list 的所有其他参数必须与提供页面令牌的调用匹配。
|
响应正文
针对列出给定企业的迁移令牌的请求的响应。
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"migrationTokens": [
{
object (MigrationToken )
}
],
"nextPageToken": string
} |
字段 |
migrationTokens[] |
object (MigrationToken )
指定企业的迁移令牌。
|
nextPageToken |
string
可作为 pageToken 发送并用于检索下一页的令牌。如果省略此字段,则不存在后续页面。
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/androidmanagement
如需了解详情,请参阅 OAuth 2.0 Overview。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eLists all migration tokens for a given enterprise, allowing for pagination to retrieve large sets of tokens.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/androidmanagement\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eThe API request uses a \u003ccode\u003eGET\u003c/code\u003e method and specifies the enterprise with a path parameter.\u003c/p\u003e\n"],["\u003cp\u003eResponse includes a list of migration tokens and a token for retrieving subsequent pages if available.\u003c/p\u003e\n"],["\u003cp\u003eRequest body should be empty, and query parameters can control pagination.\u003c/p\u003e\n"]]],["This document details how to list migration tokens for an enterprise using a `GET` request to a specific URL (`https://androidmanagement.googleapis.com/v1/{parent=enterprises/*}/migrationTokens`). The request requires specifying the `parent` enterprise in the URL path. Optional query parameters `pageSize` (max 100) and `pageToken` enable pagination. The request body should be empty. The response contains a list of `migrationTokens` and optionally a `nextPageToken` for subsequent pages. Authorization requires the `https://www.googleapis.com/auth/androidmanagement` OAuth scope.\n"],null,["# Method: enterprises.migrationTokens.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.ListMigrationTokensResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nLists migration tokens.\n\n### HTTP request\n\n`GET https://androidmanagement.googleapis.com/v1/{parent=enterprises/*}/migrationTokens`\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 enterprise which the migration tokens belong to. Format: `enterprises/{enterprise}` |\n\n### Query parameters\n\n| Parameters ||\n|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` The maximum number of migration tokens to return. Fewer migration tokens may be returned. If unspecified, at most 100 migration tokens will be returned. The maximum value is 100; values above 100 will be coerced to 100. |\n| `pageToken` | `string` A page token, received from a previous [`migrationTokens.list`](/android/management/reference/rest/v1/enterprises.migrationTokens/list#google.android.devicemanagement.v1.DeviceManagementService.ListMigrationTokens) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `migrationTokens.list` must match the call that provided the page token. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nResponse to a request to list migration tokens for a given enterprise.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"migrationTokens\": [ { object (/android/management/reference/rest/v1/enterprises.migrationTokens#MigrationToken) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `migrationTokens[]` | `object (`[MigrationToken](/android/management/reference/rest/v1/enterprises.migrationTokens#MigrationToken)`)` The migration tokens from the specified enterprise. |\n| `nextPageToken` | `string` A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |\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)."]]