此 API 参考资料按资源类型编排整理。每种资源类型都有一种或多种数据表示形式以及一个或多个方法。
资源类型
- 设备
- 企业
- 使用权
- 群组许可
- Grouplicenseusers
- 安装次数
- 受管理设备配置
- Managedconfigurationsforuser
- Managedconfigurationssettings
- 权限
- 产品
- 服务账号密钥
- Storelayoutclusters
- 商店布局页面
- 用户
- Web 应用
设备
如需详细了解“设备”资源,请参阅资源表示形式页面。
方法 | 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 中的帐号。
|
企业
如需详细了解 Enterprises 资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 相对于 https://www.googleapis.com/androidenterprise/v1 | ||
acknowledgeNotificationSet |
POST /enterprises/acknowledgeNotificationSet
|
确认从 Enterprises.PullNotificationSet 收到的通知,以防止后续调用返回相同的通知。 |
completeSignup |
POST /enterprises/completeSignup
|
通过指定完成令牌和企业令牌来完成注册流程。对于给定的企业令牌,不得多次调用此请求。 |
createWebToken |
POST /enterprises/enterpriseId/createWebToken
|
返回用于访问嵌入式界面的唯一令牌。如需生成网页界面,请将生成的令牌传递到 Google Play 企业版 JavaScript API。每个令牌只能用于启动一个界面会话。如需了解详情,请参阅 JavaScript API 文档。 |
注册 |
POST /enterprises/enroll
|
向发出调用的 EMM 的企业注册。
必需的查询参数: |
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
|
返回企业的商店布局。如果未设置商店布局,则返回“basic”作为商店布局类型,而不返回首页。 |
list |
GET /enterprises
|
按域名查找企业。
只有通过 Google 发起的创建流程创建的企业才支持此功能。对于通过 EMM 发起的流程创建的企业,不需要查找该 ID,因为 EMM 会在 Enterprises.generateSignupUrl 调用中指定的回调中获知企业 ID。
必需的查询参数: |
pullNotificationSet |
POST /enterprises/pullNotificationSet
|
为与针对请求进行身份验证的服务帐号相关联的企业拉取并返回通知集。如果没有待处理的通知,通知集可能为空。 除非通知集为空,否则需要通过调用 Enterprises.AcawareNotificationSet 在 20 秒内确认返回的通知集。 在 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 会设置为“basic”,且基本商店布局处于启用状态。基本布局仅包含管理员批准且已添加到用户可用商品集中的应用(使用 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 资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 相对于 https://www.googleapis.com/androidenterprise/v1 | ||
get |
GET /enterprises/enterpriseId/groupLicenses/groupLicenseId
|
检索产品的企业群组许可详细信息。注意:此项已弃用。新的集成无法使用此方法,可以参考我们的 新建议。 |
list |
GET /enterprises/enterpriseId/groupLicenses
|
检索企业拥有群组许可的所有产品的 ID。 注意:此项已弃用。新的集成无法使用此方法,可以参考我们的 新建议。 |
群组许可用户
如需详细了解 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
|
检索指定设备上安装的所有应用的详细信息。 |
update |
PUT /enterprises/enterpriseId/users/userId/devices/deviceId/installs/installId
|
请求将最新版本的应用安装到设备。如果该应用已安装,则会在必要时更新到最新版本。 |
设备的受管理配置
如需详细了解 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 资源,请参阅资源表示形式页面。
方法 | 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 资源的详细信息,请参阅资源表示形式页面。
方法 | 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
|
批准指定的产品以及相关的应用权限(如果有)。 每个企业客户最多可以批准 1000 个产品。 如需了解如何使用 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
|
检索此应用所需的 Android 应用权限。 |
list |
GET /enterprises/enterpriseId/products
|
查找与查询匹配的已批准产品;如果没有查询,则查找所有已获批准的产品。 注意:此项已弃用。新的集成无法使用此方法,可以参考我们的 新建议。 |
取消批准 |
POST /enterprises/enterpriseId/products/productId/unapprove
|
取消批准指定的商品(以及相关的应用权限,如果有) 注意:此项已废弃。新的集成无法使用此方法,可以参考我们的 新建议。 |
服务帐号密钥
如需详细了解 Serviceaccountkeys 资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 相对于 https://www.googleapis.com/androidenterprise/v1 | ||
delete |
DELETE /enterprises/enterpriseId/serviceAccountKeys/keyId
|
移除与此企业关联的服务帐号的指定凭据,并使其失效。调用方服务帐号必须已通过调用 Enterprises.GetServiceAccount 检索,且必须已通过调用 Enterprises.SetAccount 设置为企业服务帐号。 |
插入 |
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
|
检索集群的详细信息。 |
插入 |
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 资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 相对于 https://www.googleapis.com/androidenterprise/v1 | ||
delete |
DELETE /enterprises/enterpriseId/storeLayout/pages/pageId
|
删除商店页面。 |
get |
GET /enterprises/enterpriseId/storeLayout/pages/pageId
|
检索存储页面的详细信息。 |
插入 |
POST /enterprises/enterpriseId/storeLayout/pages
|
插入新的商店页面。 |
list |
GET /enterprises/enterpriseId/storeLayout/pages
|
检索商店中所有页面的详细信息。 |
update |
PUT /enterprises/enterpriseId/storeLayout/pages/pageId
|
更新商店页面的内容。 |
用户
如需详细了解用户资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 相对于 https://www.googleapis.com/androidenterprise/v1 | ||
delete |
DELETE /enterprises/enterpriseId/users/userId
|
删除了由 EMM 管理的用户。 |
generateAuthenticationToken |
POST /enterprises/enterpriseId/users/userId/authenticationToken
|
生成一个身份验证令牌,Device Policy 客户端可以使用该令牌在设备上预配指定的 EMM 管理的用户帐号。生成的令牌是一次性令牌,将在几分钟后过期。 您最多可以为每位用户配置 10 台设备。 此通话仅适用于 EMM 管理的帐号。 |
get |
GET /enterprises/enterpriseId/users/userId
|
检索用户的详细信息。 |
getAvailableProductSet |
GET /enterprises/enterpriseId/users/userId/availableProductSet
|
检索用户有权访问的一组产品。注意:此项已弃用。新的集成无法使用此方法,可以参考我们的 新建议。 |
插入 |
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
|
撤消对当前已配置给用户的所有设备的访问权限。用户将无法再在其任何受管理的设备上使用 Google Play 企业版商店。 此通话仅适用于 EMM 管理的帐号。 |
setAvailableProductSet |
PUT /enterprises/enterpriseId/users/userId/availableProductSet
|
修改用户有权访问的一组产品(称为列入白名单的产品)。whitelisted只有已批准的产品或之前已获批准的产品(获得批准的产品)可以列入白名单。注意:此项已弃用。新的集成无法使用此方法,可以参考我们的 新建议。 |
update |
PUT /enterprises/enterpriseId/users/userId
|
更新受 EMM 管理的用户的详细信息。 仅适用于受 EMM 管理的用户(而非由 Google 管理的用户)。 在请求正文的用户资源中传递新详细信息。只能更改 displayName 字段。其他字段必须未设置或具有当前活跃值。 |
Web 应用
如需详细了解 Webapps 资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 相对于 https://www.googleapis.com/androidenterprise/v1 | ||
delete |
DELETE /enterprises/enterpriseId/webApps/webAppId
|
删除现有 Web 应用。 |
get |
GET /enterprises/enterpriseId/webApps/webAppId
|
获取现有 Web 应用。 |
插入 |
POST /enterprises/enterpriseId/webApps
|
为企业创建新的 Web 应用。 |
list |
GET /enterprises/enterpriseId/webApps
|
检索给定企业的所有 Web 应用的详细信息。 |
update |
PUT /enterprises/enterpriseId/webApps/webAppId
|
更新现有 Web 应用。 |