Method: enterprises.list
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
列出 EMM 管理的企业。仅返回 BASIC
字段。
HTTP 请求
GET https://androidmanagement.googleapis.com/v1/enterprises
网址采用 gRPC 转码语法。
查询参数
参数 |
projectId |
string
必需。管理企业的 EMM 的 Cloud 项目 ID。
|
pageSize |
integer
请求的页面大小。实际页面大小可以固定为最小值或最大值。
|
pageToken |
string
标识服务器返回的结果页面的令牌。
|
view |
enum (EnterpriseView )
指定要返回的 Enterprise 字段。此方法仅支持 BASIC 。
|
响应正文
对列出企业的请求的响应。
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"enterprises": [
{
object (Enterprise )
}
],
"nextPageToken": string
} |
字段 |
enterprises[] |
object (Enterprise )
企业列表。
|
nextPageToken |
string
如果还有更多结果,则为用于检索下一页结果的令牌。
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/androidmanagement
如需了解详情,请参阅 OAuth 2.0 Overview。
EnterpriseView
枚举 |
ENTERPRISE_VIEW_UNSPECIFIED |
该 API 将默认使用“基本”视图来显示“列表”方法。 |
BASIC |
包括 name 和 enterpriseDisplayName 字段。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eLists EMM-managed enterprises, returning only basic fields like name and display name.\u003c/p\u003e\n"],["\u003cp\u003eRequires the \u003ccode\u003ehttps://www.googleapis.com/auth/androidmanagement\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"],["\u003cp\u003eAllows filtering by Cloud project ID and pagination for large result sets.\u003c/p\u003e\n"],["\u003cp\u003eRequest body should be empty, and the response includes a list of enterprises and a token for pagination.\u003c/p\u003e\n"],["\u003cp\u003eUses a GET request to the \u003ccode\u003ehttps://androidmanagement.googleapis.com/v1/enterprises\u003c/code\u003e endpoint.\u003c/p\u003e\n"]]],["This document details how to list EMM-managed enterprises via a `GET` request to `https://androidmanagement.googleapis.com/v1/enterprises`. The request requires a `projectId`, and supports optional `pageSize`, `pageToken`, and `view` query parameters. The `view` parameter only supports `BASIC`. The request body must be empty. The response includes a list of enterprises, with a `nextPageToken` for pagination. Authentication requires the `https://www.googleapis.com/auth/androidmanagement` OAuth scope.\n"],null,["# Method: enterprises.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListEnterprisesResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [EnterpriseView](#EnterpriseView)\n- [Try it!](#try-it)\n\nLists EMM-managed enterprises. Only [BASIC](/android/management/reference/rest/v1/enterprises/list#EnterpriseView.ENUM_VALUES.BASIC) fields are returned.\n\n### HTTP request\n\n`GET https://androidmanagement.googleapis.com/v1/enterprises`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `projectId` | `string` Required. The Cloud project ID of the EMM managing the enterprises. |\n| `pageSize` | `integer` The requested page size. The actual page size may be fixed to a min or max value. |\n| `pageToken` | `string` A token identifying a page of results returned by the server. |\n| `view` | `enum (`[EnterpriseView](/android/management/reference/rest/v1/enterprises/list#EnterpriseView)`)` Specifies which Enterprise fields to return. This method only supports [BASIC](/android/management/reference/rest/v1/enterprises/list#EnterpriseView.ENUM_VALUES.BASIC). |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nResponse to a request to list enterprises.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"enterprises\": [ { object (/android/management/reference/rest/v1/enterprises#Enterprise) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-----------------|------------------------------------------------------------------------------------------------------------------|\n| `enterprises[]` | `object (`[Enterprise](/android/management/reference/rest/v1/enterprises#Enterprise)`)` The list of enterprises. |\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).\n\nEnterpriseView\n--------------\n\nSpecifies which Enterprise fields to return.\n\n| Enums ||\n|-------------------------------|-------------------------------------------------------------|\n| `ENTERPRISE_VIEW_UNSPECIFIED` | The API will default to the BASIC view for the List method. |\n| `BASIC` | Includes name and enterpriseDisplayName fields. |"]]