此 API 参考资料按资源类型编排整理。每种资源类型都有一种或多种数据表示形式以及一个或多个方法。
资源类型
- 设备
- 注册令牌
- 企业
- Entitlements
- Grouplicenses
- 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 中的账号。
|
Enrollmenttokens
如需详细了解 Enrollmenttokens 资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 均为 https://www.googleapis.com/androidenterprise/v1 的相对地址 | ||
create |
POST /enterprises/enterpriseId/enrollmentTokens
|
为企业创建注册令牌。 此方法是 EnrollmentTokensService 的一部分。 |
企业
如需详细了解 Enterprises 资源,请参阅资源表示形式页面。
方法 | HTTP 请求 | 说明 |
---|---|---|
除非另有说明,否则 URI 均为 https://www.googleapis.com/androidenterprise/v1 的相对地址 | ||
acknowledgeNotificationSet |
POST /enterprises/acknowledgeNotificationSet
|
确认从企业收到的通知。PullNotificationSet 可防止后续调用返回相同的通知。 |
completeSignup |
POST /enterprises/completeSignup
|
通过指定完成令牌和企业令牌来完成注册流程。 对于给定的企业令牌,不得多次调用此请求。 |
createWebToken |
POST /enterprises/enterpriseId/createWebToken
|
返回用于访问可嵌入界面的唯一令牌。如需生成 Web 界面,请将生成的令牌传递到 Google Play 企业版 JavaScript API 中。每个令牌只能用于启动一个界面会话。如需了解详情,请参阅 JavaScript API 文档。 |
enroll |
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
|
返回企业的商店布局。如果商店布局尚未设置,则返回“basic”作为商店布局类型,并且不返回首页。 |
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 设置为“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
如需详细了解 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
|
检索指定设备上安装的所有应用的详细信息。 |
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 的相对地址 | ||
approve |
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
|
检索相应应用所需的 Android 应用权限。 |
list |
GET /enterprises/enterpriseId/products
|
查找与查询匹配的已获批商品,如果没有查询,则查找所有已获批商品。 |
unapprove |
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 应用。 |