此 API 参考资料按资源类型编排整理。每种资源类型都有一种或多种数据表示形式以及一个或多个方法。
资源类型
- 设备
- 企业
- 使用权
- 群组许可
- Grouplicenseusers
- 安装次数
- Managedconfigurationsfordevice
- Managedconfigurationsforuser
- Managedconfigurationssettings
- 权限
- 商品
- Serviceaccountkeys
- Storelayoutclusters
- Storelayoutpages
- 用户
- Web 应用
设备
如需详细了解 Devices 资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 均为 https://www.googleapis.com/androidenterprise/v1 的相对地址 | ||
forceReportUpload |
POST /enterprises/enterpriseId/users/userId/devices/deviceId/forceReportUpload
|
上传一个报告,其中包含自上次生成报告以来设备上应用状态的任何更改。对于给定设备,您每 24 小时最多可以调用此方法 3 次。 |
get |
GET /enterprises/enterpriseId/users/userId/devices/deviceId
|
检索设备的详细信息。 |
getState |
GET /enterprises/enterpriseId/users/userId/devices/deviceId/state
|
检索设备对 Google 服务的访问权限是启用还是停用。 只有在 Google 管理控制台中启用了“在 Android 设备上强制执行 EMM 政策”后,设备状态才会生效。否则,系统会忽略设备状态,并允许所有设备访问 Google 服务。只有 Google 管理的用户支持此功能。 |
list |
GET /enterprises/enterpriseId/users/userId/devices
|
检索用户所有设备的 ID。 |
setState |
PUT /enterprises/enterpriseId/users/userId/devices/deviceId/state
|
设置设备对 Google 服务的访问权限是启用还是停用。 只有在 Google 管理控制台中启用了“在 Android 设备上强制执行 EMM 政策”后,设备状态才会生效。否则,系统会忽略设备状态,并允许所有设备访问 Google 服务。只有 Google 管理的用户支持此功能。 |
update |
PUT /enterprises/enterpriseId/users/userId/devices/deviceId
|
更新设备政策。
为确保正确强制执行此政策,您需要在 Google Play 软件包的受管理配置中设置 allowed_accounts ,以阻止非受管账号访问 Google Play。请参阅限制 Google Play 中的账号。
|
企业
如需详细了解企业资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 均为 https://www.googleapis.com/androidenterprise/v1 的相对地址 | ||
acknowledgeNotificationSet |
POST /enterprises/acknowledgeNotificationSet
|
确认从 Enterprise.PullNotificationSet 收到的通知,以防止后续调用返回相同的通知。 |
completeSignup |
POST /enterprises/completeSignup
|
通过指定完成令牌和企业令牌,完成注册流程。不得针对给定企业令牌多次调用此请求。 |
createWebToken |
POST /enterprises/enterpriseId/createWebToken
|
返回用于访问可嵌入界面的唯一令牌。如需生成 Web 界面,请将生成的令牌传递到 Google Play 企业版 JavaScript API。每个令牌只能用于启动一个界面会话。如需了解详情,请参阅 JavaScript API 文档。 |
注册 |
POST /enterprises/enroll
|
在发起调用的 EMM 中注册企业。
必需的查询参数: |
generateEnterpriseUpgradeUrl |
POST /enterprises/enterpriseId/generateEnterpriseUpgradeUrl
|
生成企业升级网址,以将现有的 Google Play 企业版账号集升级为 Google 企业版域名。 |
generateSignupUrl |
POST /enterprises/signupUrl
|
生成注册网址。 |
get |
GET /enterprises/enterpriseId
|
检索企业的名称和域名。 |
getServiceAccount |
GET /enterprises/enterpriseId/serviceAccount
|
返回服务账号和凭据。您可以通过调用 setAccount 将服务账号绑定到企业。此服务账号是此企业和 EMM 的专属账号,如果企业解除绑定,该账号将被删除。凭据包含私钥数据,且不会存储在服务器端。 此方法只能在调用 Enterprises.Enroll 或 Enterprises.CompleteSignup 之后、Enterprises.SetAccount 之前调用;在其他时间调用此方法将会返回错误。 首次调用后,后续调用将生成一组新的唯一凭据,并使之前生成的凭据失效。 将服务账号绑定到企业后,您可以使用 serviceAccountKeys 资源进行管理。 . |
getStoreLayout |
GET /enterprises/enterpriseId/storeLayout
|
返回企业的商店布局。如果尚未设置商店布局,则返回“基本”作为商店布局类型,并且没有首页。 |
list |
GET /enterprises
|
按域名查找企业。
只有通过 Google 发起的创建流程创建的企业才支持此操作。对于通过 EMM 发起的流程创建的企业,无需查找 ID,因为 EMM 会在 Enterprises.generateSignupUrl 调用中指定的回调中了解企业 ID。
必需的查询参数: |
pullNotificationSet |
POST /enterprises/pullNotificationSet
|
拉取并返回与为请求进行身份验证的服务账号关联的企业的通知集。如果没有待处理的通知,通知集可能会为空。 返回的通知集需要在 20 秒内通过调用 Enterprises.AcknowledgeNotificationSet 进行确认,除非通知集为空。 如果未在 20 秒内确认通知,系统最终会在对另一个 PullNotificationSet 请求的响应中再次包含该通知;如果从未确认通知,系统最终会根据 Google Cloud Platform Pub/Sub 系统政策将其删除。 系统可能会并发执行多个请求来检索通知,在这种情况下,待处理的通知(如果有)将分布在每个调用方之间(如果有)。 如果没有通知,则返回空通知列表。后续请求可能会在有更多通知可用时返回更多通知。 |
sendTestPushNotification |
POST /enterprises/enterpriseId/sendTestPushNotification
|
发送测试通知,以验证此企业的 EMM 与 Google Cloud Pub/Sub 服务的集成情况。 |
setAccount |
PUT /enterprises/enterpriseId/account
|
设置将用作企业来向 API 进行身份验证的账号。 |
setStoreLayout |
PUT /enterprises/enterpriseId/storeLayout
|
为企业设置商店布局。默认情况下,storeLayoutType 设置为“基本”,并且基本商店布局处于启用状态。基本布局仅包含已获管理员批准且已添加到用户可用产品集的应用(使用 setAvailableProductSet 调用)。页面上的应用会按其产品 ID 值排序。如果您创建自定义商店布局(通过设置 storeLayoutType =“custom”并设置首页),系统会停用基本商店布局。 |
取消注册 |
POST /enterprises/enterpriseId/unenroll
|
从发起调用的 EMM 中取消注册企业。 |
使用权
如需详细了解 Entitlements 资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 均为 https://www.googleapis.com/androidenterprise/v1 的相对地址 | ||
delete |
DELETE /enterprises/enterpriseId/users/userId/entitlements/entitlementId
|
为用户移除应用使用权。 |
get |
GET /enterprises/enterpriseId/users/userId/entitlements/entitlementId
|
检索使用权的详细信息。 |
list |
GET /enterprises/enterpriseId/users/userId/entitlements
|
列出指定用户的所有使用权。仅设置 ID。 |
update |
PUT /enterprises/enterpriseId/users/userId/entitlements/entitlementId
|
为用户添加或更新应用使用权。 |
Grouplicenses
如需详细了解 Grouplicenses 资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 均为 https://www.googleapis.com/androidenterprise/v1 的相对地址 | ||
get |
GET /enterprises/enterpriseId/groupLicenses/groupLicenseId
|
检索企业对某产品的群组许可的详细信息。 |
list |
GET /enterprises/enterpriseId/groupLicenses
|
检索企业拥有群组许可的所有产品的 ID。 |
Grouplicenseusers
如需详细了解 Grouplicenseusers 资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 均为 https://www.googleapis.com/androidenterprise/v1 的相对地址 | ||
list |
GET /enterprises/enterpriseId/groupLicenses/groupLicenseId/users
|
检索已获得许可下的使用权的用户的 ID。 |
安装次数
如需详细了解 Installs 资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 均为 https://www.googleapis.com/androidenterprise/v1 的相对地址 | ||
delete |
DELETE /enterprises/enterpriseId/users/userId/devices/deviceId/installs/installId
|
请求从设备中移除应用。在应用实际被移除之前,调用 get 或 list 仍会将其显示为已安装在设备上。
|
get |
GET /enterprises/enterpriseId/users/userId/devices/deviceId/installs/installId
|
检索设备上应用安装的详细信息。 |
list |
GET /enterprises/enterpriseId/users/userId/devices/deviceId/installs
|
retrieving details of all apps installed on the specified device |
update |
PUT /enterprises/enterpriseId/users/userId/devices/deviceId/installs/installId
|
请求将应用的最新版本安装到设备上。如果应用已安装,则系统会根据需要将其更新到最新版本。 |
Managedconfigurationsfordevice
如需详细了解 Managedconfigurationsfordevice 资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 均为 https://www.googleapis.com/androidenterprise/v1 的相对地址 | ||
delete |
DELETE /enterprises/enterpriseId/users/userId/devices/deviceId/managedConfigurationsForDevice/managedConfigurationForDeviceId
|
为指定设备移除应用的按设备托管配置。 |
get |
GET /enterprises/enterpriseId/users/userId/devices/deviceId/managedConfigurationsForDevice/managedConfigurationForDeviceId
|
检索按设备管理的配置的详细信息。 |
list |
GET /enterprises/enterpriseId/users/userId/devices/deviceId/managedConfigurationsForDevice
|
列出指定设备的所有按设备管理的配置。 仅设置 ID。 |
update |
PUT /enterprises/enterpriseId/users/userId/devices/deviceId/managedConfigurationsForDevice/managedConfigurationForDeviceId
|
为指定设备的应用添加或更新设备级受管配置。 |
Managedconfigurationsforuser
如需详细了解 Managedconfigurationsforuser 资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 均为 https://www.googleapis.com/androidenterprise/v1 的相对地址 | ||
delete |
DELETE /enterprises/enterpriseId/users/userId/managedConfigurationsForUser/managedConfigurationForUserId
|
为指定用户移除应用的按用户分配的托管配置。 |
get |
GET /enterprises/enterpriseId/users/userId/managedConfigurationsForUser/managedConfigurationForUserId
|
检索指定用户的应用的按用户管理的配置的详细信息。 |
list |
GET /enterprises/enterpriseId/users/userId/managedConfigurationsForUser
|
列出指定用户的所有按用户管理的配置。仅设置 ID。 |
update |
PUT /enterprises/enterpriseId/users/userId/managedConfigurationsForUser/managedConfigurationForUserId
|
为指定用户添加或更新应用的托管配置设置。
如果您支持受管理的配置 iframe,则可以通过在请求中指定 mcmId 及其关联的配置变量(如果有)来将受管理的配置应用于用户。或者,所有 EMM 都可以通过传递托管属性列表来应用托管配置。
|
Managedconfigurationssettings
如需详细了解 Managedconfigurationssettings 资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 均为 https://www.googleapis.com/androidenterprise/v1 的相对地址 | ||
list |
GET /enterprises/enterpriseId/products/productId/managedConfigurationsSettings
|
列出指定应用的所有托管配置设置。 |
Permissions
有关 Permissions 资源的详细信息,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 均为 https://www.googleapis.com/androidenterprise/v1 的相对地址 | ||
get |
GET /permissions/permissionId
|
检索 Android 应用权限的详细信息,以便向企业管理员显示。 |
产品
如需详细了解 Products 资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 均为 https://www.googleapis.com/androidenterprise/v1 的相对地址 | ||
批准 |
POST /enterprises/enterpriseId/products/productId/approve
|
批准指定的产品和相关应用权限(如果有)。 您可以为每位企业客户批准的产品数量上限为 1,000 件。 如需了解如何使用受管理的 Google Play 设计和创建商店布局,以向用户展示已获批准的商品,请参阅商店布局设计。 |
generateApprovalUrl |
POST /enterprises/enterpriseId/products/productId/generateApprovalUrl
|
生成一个网址,该网址可在 iframe 中呈现,以显示产品的权限(如果有)。企业管理员必须查看这些权限,并代表其组织接受这些权限,才能批准该产品。 管理员应通过与 EMM 控制台中的单独界面元素互动来接受显示的权限,这反过来应该会触发在 Products.approve 调用中将此网址用作 approvalUrlInfo.approvalUrl 属性,以批准商品。此网址最多只能用于显示 1 天的权限。
|
get |
GET /enterprises/enterpriseId/products/productId
|
检索商品的详细信息,以向企业管理员显示。 |
getAppRestrictionsSchema |
GET /enterprises/enterpriseId/products/productId/appRestrictionsSchema
|
检索用于定义此商品的可配置属性的架构。所有商品都有架构,但如果未定义任何受管理的配置,此架构可能为空。此架构可用于填充界面,以便管理员配置产品。如需根据使用此 API 获取的架构应用受管理的配置,请参阅通过 Play 管理的配置。 |
getPermissions |
GET /enterprises/enterpriseId/products/productId/permissions
|
retrieving the Android app permissions required by this app. |
list |
GET /enterprises/enterpriseId/products
|
查找与查询匹配的已获批准商品,如果没有查询,则查找所有已获批准商品。 |
取消批准 |
POST /enterprises/enterpriseId/products/productId/unapprove
|
拒批指定商品(以及相关应用权限,如果有) |
Serviceaccountkeys
如需详细了解 Serviceaccountkeys 资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 均为 https://www.googleapis.com/androidenterprise/v1 的相对地址 | ||
delete |
DELETE /enterprises/enterpriseId/serviceAccountKeys/keyId
|
移除并使与此企业关联的服务账号的指定凭据失效。必须通过调用 Enterprises.GetServiceAccount 检索调用方服务账号,并且必须通过调用 Enterprises.SetAccount 将其设置为企业服务账号。 |
insert |
POST /enterprises/enterpriseId/serviceAccountKeys
|
为与此企业关联的服务账号生成新的凭据。调用服务账号必须通过调用 Enterprises.GetServiceAccount 检索,并且必须通过调用 Enterprises.SetAccount 设置为企业服务账号。 在要插入的资源中,应仅填充键的类型。 |
list |
GET /enterprises/enterpriseId/serviceAccountKeys
|
列出与此企业关联的服务账号的所有有效凭据。系统只会返回 ID 和密钥类型。调用服务账号必须通过调用 Enterprises.GetServiceAccount 检索,并且必须通过调用 Enterprises.SetAccount 设置为企业服务账号。 |
Storelayoutclusters
如需详细了解 Storelayoutclusters 资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 均为 https://www.googleapis.com/androidenterprise/v1 的相对地址 | ||
delete |
DELETE /enterprises/enterpriseId/storeLayout/pages/pageId/clusters/clusterId
|
删除集群。 |
get |
GET /enterprises/enterpriseId/storeLayout/pages/pageId/clusters/clusterId
|
检索集群的详细信息。 |
insert |
POST /enterprises/enterpriseId/storeLayout/pages/pageId/clusters
|
在页面中插入新的集群。 |
list |
GET /enterprises/enterpriseId/storeLayout/pages/pageId/clusters
|
检索指定网页上的所有集群的详细信息。 |
update |
PUT /enterprises/enterpriseId/storeLayout/pages/pageId/clusters/clusterId
|
更新集群。 |
Storelayoutpages
如需详细了解 Storelayoutpages 资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 均为 https://www.googleapis.com/androidenterprise/v1 的相对地址 | ||
delete |
DELETE /enterprises/enterpriseId/storeLayout/pages/pageId
|
删除商店页面。 |
get |
GET /enterprises/enterpriseId/storeLayout/pages/pageId
|
检索商品页面的详细信息。 |
insert |
POST /enterprises/enterpriseId/storeLayout/pages
|
插入新的商店页面。 |
list |
GET /enterprises/enterpriseId/storeLayout/pages
|
检索商店中所有页面的详细信息。 |
update |
PUT /enterprises/enterpriseId/storeLayout/pages/pageId
|
更新商品页面的内容。 |
用户
如需详细了解 Users 资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 均为 https://www.googleapis.com/androidenterprise/v1 的相对地址 | ||
delete |
DELETE /enterprises/enterpriseId/users/userId
|
删除了 EMM 管理的用户。 |
generateAuthenticationToken |
POST /enterprises/enterpriseId/users/userId/authenticationToken
|
生成一个身份验证令牌,设备政策客户端可以使用该令牌在设备上预配给定的 EMM 管理的用户账号。生成的令牌是一次性的,并会在几分钟后过期。 对于每位用户,您最多可以预配 10 部设备。 此调用仅适用于 EMM 管理的账号。 |
get |
GET /enterprises/enterpriseId/users/userId
|
检索用户的详细信息。 |
getAvailableProductSet |
GET /enterprises/enterpriseId/users/userId/availableProductSet
|
检索用户有权访问的一组产品。 |
insert |
POST /enterprises/enterpriseId/users
|
创建新的 EMM 管理用户。
在请求正文中传递的 Users 资源应包含 accountIdentifier 和 accountType 。如果已存在具有相同账号标识符的相应用户,系统会使用相应资源更新该用户。在这种情况下,只能更改 |
list |
GET /enterprises/enterpriseId/users
|
按主电子邮件地址查找用户。
只有 Google 管理的用户才能使用此功能。对于 EMM 管理的用户,无需查找 ID,因为 ID 已在 Users.insert 调用的结果中返回。
必需的查询参数: |
revokeDeviceAccess |
DELETE /enterprises/enterpriseId/users/userId/deviceAccess
|
撤消对当前为用户配置的所有设备的访问权限。用户将无法再在其任何受管理的设备上使用受管理的 Play 商店。 此调用仅适用于 EMM 管理的账号。 |
setAvailableProductSet |
PUT /enterprises/enterpriseId/users/userId/availableProductSet
|
修改用户有权访问的产品集(称为列入了许可名单的产品)。只有已获批准或之前已获批准(已撤消批准)的商品才能列入许可名单。 |
update |
PUT /enterprises/enterpriseId/users/userId
|
更新 EMM 管理的用户的详细信息。
只能用于 EMM 管理的用户(而非 Google 管理的用户)。 在请求正文中的 Users 资源中传递新详细信息。只有 displayName 字段可以更改。其他字段必须未设置或采用当前有效的值。
|
Webapps
如需详细了解 Webapps 资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 均为 https://www.googleapis.com/androidenterprise/v1 的相对地址 | ||
delete |
DELETE /enterprises/enterpriseId/webApps/webAppId
|
删除现有 Web 应用。 |
get |
GET /enterprises/enterpriseId/webApps/webAppId
|
获取现有 Web 应用。 |
insert |
POST /enterprises/enterpriseId/webApps
|
为企业创建新的 Web 应用。 |
list |
GET /enterprises/enterpriseId/webApps
|
检索给定企业的所有 Web 应用的详细信息。 |
update |
PUT /enterprises/enterpriseId/webApps/webAppId
|
更新现有 Web 应用。 |