本 API 參考資料是依照資源類型編排。各個資源類型都具有一或多種資料表示法,以及一或多種方法。
資源類型
- 裝置
- 企業
- 授權
- 群組授權
- Grouplicenseusers
- 安裝
- 適用於裝置的受管理設定
- 使用者適用的受管理設定
- 受管理設定
- 權限
- 產品
- 服務帳戶金鑰
- Storelayoutclusters
- Storelayoutpages
- 使用者
- 網頁應用程式
裝置
如要進一步瞭解 Devices 資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/androidenterprise/v1 的 URI,除非另有說明 | ||
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 管理的使用者。 |
清單 |
GET /enterprises/enterpriseId/users/userId/devices
|
擷取使用者所有裝置的 ID。 |
setState |
PUT /enterprises/enterpriseId/users/userId/devices/deviceId/state
|
設定是否啟用或停用裝置的 Google 服務存取權。 只有在 Google 管理控制台啟用對 Android 裝置強制執行 EMM 政策的情況下,裝置狀態才會生效。否則,系統會忽略裝置狀態,並且允許所有裝置存取 Google 服務。這項功能僅適用於由 Google 管理的使用者。 |
更新 |
PUT /enterprises/enterpriseId/users/userId/devices/deviceId
|
更新裝置政策。
為確保系統能正確強制執行政策,您需要在 Google Play 套件的受管理設定中設定 allowed_accounts ,防止非受管帳戶存取 Google Play。請參閱「在 Google Play 中限制帳戶」。 |
企業
如要進一步瞭解 Enterprises 資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/androidenterprise/v1 的 URI,除非另有說明 | ||
acknowledgeNotificationSet |
POST /enterprises/acknowledgeNotificationSet
|
確認收到 Enterprises.PullNotificationSet 的通知,防止後續呼叫傳回相同的通知。 |
completeSignup |
POST /enterprises/completeSignup
|
透過指定完成權杖和企業權杖,完成註冊流程。特定企業權杖只能多次呼叫這項要求。 |
createWebToken |
POST /enterprises/enterpriseId/createWebToken
|
傳回專屬權杖來存取嵌入式 UI。如要產生網頁版 UI,請將產生的權杖傳遞至 Google Play JavaScript API。每個權杖只能用來啟動一個 UI 工作階段。詳情請參閱 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」做為商店版面配置類型,且沒有首頁。 |
清單 |
GET /enterprises
|
依網域名稱查詢企業。
這個選項僅適用於透過 Google 啟動建立流程建立的企業。如果是透過 EMM 啟動的流程建立的企業,由於 EMM 會得知 Enterprises.generateSignupUrl 呼叫中指定的企業 ID,因此不必查詢該 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。 |
授權
如要進一步瞭解授權資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/androidenterprise/v1 的 URI,除非另有說明 | ||
刪除 |
DELETE /enterprises/enterpriseId/users/userId/entitlements/entitlementId
|
移除使用者的應用程式授權。 |
get |
GET /enterprises/enterpriseId/users/userId/entitlements/entitlementId
|
擷取授權的詳細資料。 |
清單 |
GET /enterprises/enterpriseId/users/userId/entitlements
|
列出指定使用者的所有授權。系統只會設定 ID。 |
更新 |
PUT /enterprises/enterpriseId/users/userId/entitlements/entitlementId
|
為使用者新增或更新應用程式授權。 |
Grouplicenses
如需 Grouplicenses 資源詳細資料,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/androidenterprise/v1 的 URI,除非另有說明 | ||
get |
GET /enterprises/enterpriseId/groupLicenses/groupLicenseId
|
擷取產品企業的群組授權詳細資料。 |
清單 |
GET /enterprises/enterpriseId/groupLicenses
|
擷取企業具備群組授權的所有產品 ID。 |
Grouplicenseusers
如需 Grouplicenseusers 資源詳細資料,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/androidenterprise/v1 的 URI,除非另有說明 | ||
清單 |
GET /enterprises/enterpriseId/groupLicenses/groupLicenseId/users
|
擷取已根據授權取得授權的使用者 ID。 |
安裝次數
如要進一步瞭解 Installs 資源詳細資料,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/androidenterprise/v1 的 URI,除非另有說明 | ||
刪除 |
DELETE /enterprises/enterpriseId/users/userId/devices/deviceId/installs/installId
|
要求從裝置中移除應用程式。對 get 或 list 的呼叫在實際移除前,仍會顯示裝置已安裝的應用程式。 |
get |
GET /enterprises/enterpriseId/users/userId/devices/deviceId/installs/installId
|
擷取裝置上安裝的應用程式詳細資料。 |
清單 |
GET /enterprises/enterpriseId/users/userId/devices/deviceId/installs
|
擷取指定裝置上安裝的所有應用程式詳細資料。 |
更新 |
PUT /enterprises/enterpriseId/users/userId/devices/deviceId/installs/installId
|
要求在裝置上安裝最新版應用程式。如果已安裝應用程式,則會視需要更新至最新版本。 |
適用於裝置的受管理設定
如需受管理的設定裝置資源詳細資料,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/androidenterprise/v1 的 URI,除非另有說明 | ||
刪除 |
DELETE /enterprises/enterpriseId/users/userId/devices/deviceId/managedConfigurationsForDevice/managedConfigurationForDeviceId
|
針對指定裝置移除應用程式的個別裝置管理設定。 |
get |
GET /enterprises/enterpriseId/users/userId/devices/deviceId/managedConfigurationsForDevice/managedConfigurationForDeviceId
|
擷取個別裝置的受管理設定詳細資料。 |
清單 |
GET /enterprises/enterpriseId/users/userId/devices/deviceId/managedConfigurationsForDevice
|
列出指定裝置的所有個別裝置受管理設定。系統只會設定 ID。 |
更新 |
PUT /enterprises/enterpriseId/users/userId/devices/deviceId/managedConfigurationsForDevice/managedConfigurationForDeviceId
|
針對指定裝置,新增或更新每部裝置專用應用程式的設定。 |
使用者受管理的設定
如需 Managed 設定 for 使用者資源詳細資料,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/androidenterprise/v1 的 URI,除非另有說明 | ||
刪除 |
DELETE /enterprises/enterpriseId/users/userId/managedConfigurationsForUser/managedConfigurationForUserId
|
為指定使用者移除應用程式依使用者管理的設定。 |
get |
GET /enterprises/enterpriseId/users/userId/managedConfigurationsForUser/managedConfigurationForUserId
|
擷取特定使用者管理的應用程式設定詳細資料。 |
清單 |
GET /enterprises/enterpriseId/users/userId/managedConfigurationsForUser
|
列出指定使用者的所有每位使用者管理設定。系統只會設定 ID。 |
更新 |
PUT /enterprises/enterpriseId/users/userId/managedConfigurationsForUser/managedConfigurationForUserId
|
為指定使用者新增或更新應用程式的受管理設定。
如果您支援代管設定 iframe,則可在要求中指定 mcmId 及其相關聯的設定變數 (如有),藉此為使用者套用受管理的設定。或者,所有 EMM 都可以透過傳遞代管屬性清單來套用代管設定。 |
受管理的設定
如要進一步瞭解 Managedconfigurationssettings 資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/androidenterprise/v1 的 URI,除非另有說明 | ||
清單 |
GET /enterprises/enterpriseId/products/productId/managedConfigurationsSettings
|
列出指定應用程式的所有受管理設定。 |
權限
如需 Permissions 資源的詳細資料,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/androidenterprise/v1 的 URI,除非另有說明 | ||
get |
GET /permissions/permissionId
|
擷取可供企業管理員顯示的 Android 應用程式權限詳細資料。 |
產品
如要進一步瞭解 Products 資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/androidenterprise/v1 的 URI,除非另有說明 | ||
核准 |
POST /enterprises/enterpriseId/products/productId/approve
|
核准指定產品及相關應用程式權限 (如有)。 每位企業客戶可核准的產品數量上限為 1,000 個。 如要瞭解如何使用 Google Play 管理版設計及建立商店版面配置,以便向使用者顯示已核准的產品,請參閱「商店版面配置設計」。 |
generateApprovalUrl |
POST /enterprises/enterpriseId/products/productId/generateApprovalUrl
|
產生可在 iframe 中轉譯的網址,以顯示產品的權限 (如有)。企業管理員必須查看這些權限,並代表機構接受這些權限,才能核准產品。 管理員應在 EMM 控制台中與個別 UI 元素互動,藉此接受顯示的權限,進而在 Products.approve 呼叫中將這個網址當做 approvalUrlInfo.approvalUrl 屬性來核准產品。這個網址最多只能用來顯示 1 天的權限。
|
get |
GET /enterprises/enterpriseId/products/productId
|
擷取要向企業管理員顯示的產品詳細資料。 |
getAppRestrictionsSchema |
GET /enterprises/enterpriseId/products/productId/appRestrictionsSchema
|
擷取定義這項產品可設定屬性的結構定義。所有產品都有結構定義,但如果未定義受管理的設定,這個結構定義可能會空白。這個結構定義可用於填入 UI,讓管理員能夠設定產品。如要根據使用這個 API 取得的結構定義套用代管設定,請參閱「透過 Play 管理設定」。 |
getPermissions |
GET /enterprises/enterpriseId/products/productId/permissions
|
擷取這個應用程式所需的 Android 應用程式權限。 |
清單 |
GET /enterprises/enterpriseId/products
|
尋找符合查詢且已核准的產品。如果沒有查詢,尋找已核准的所有產品。 |
取消核准 |
POST /enterprises/enterpriseId/products/productId/unapprove
|
取消核准指定產品 (以及相關的應用程式權限 (如果有的話)) |
服務帳戶金鑰
如需 Serviceaccountkeys 資源詳細資料,請參閱資源表示法頁面。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/androidenterprise/v1 的 URI,除非另有說明 | ||
刪除 |
DELETE /enterprises/enterpriseId/serviceAccountKeys/keyId
|
移除並失效與這個企業相關聯的服務帳戶指定憑證。呼叫服務帳戶必須已透過呼叫 Enterprises.GetServiceAccount 來擷取,且必須已透過呼叫 Enterprises.SetAccount 將其設為企業服務帳戶。 |
insert |
POST /enterprises/enterpriseId/serviceAccountKeys
|
為與這個企業相關聯的服務帳戶產生新憑證。呼叫服務帳戶必須可透過呼叫 Enterprises.GetServiceAccount 來擷取,且必須已透過呼叫 Enterprises.SetAccount 將其設為企業服務帳戶。 您只能在要插入的資源中填入金鑰類型。 |
清單 |
GET /enterprises/enterpriseId/serviceAccountKeys
|
列出與這個企業相關聯的服務帳戶所有有效憑證。系統只會傳回 ID 和金鑰類型。呼叫服務帳戶必須可透過呼叫 Enterprises.GetServiceAccount 擷取,且必須已透過呼叫 Enterprises.SetAccount 將其設為企業服務帳戶。 |
Storelayoutclusters
如需 Storelayoutclusters 資源詳細資料,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/androidenterprise/v1 的 URI,除非另有說明 | ||
刪除 |
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
|
在頁面中插入新叢集。 |
清單 |
GET /enterprises/enterpriseId/storeLayout/pages/pageId/clusters
|
擷取指定頁面中所有叢集的詳細資料。 |
更新 |
PUT /enterprises/enterpriseId/storeLayout/pages/pageId/clusters/clusterId
|
更新叢集。 |
Storelayoutpages
如要進一步瞭解 Storelayoutpages 資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/androidenterprise/v1 的 URI,除非另有說明 | ||
刪除 |
DELETE /enterprises/enterpriseId/storeLayout/pages/pageId
|
刪除商店頁面。 |
get |
GET /enterprises/enterpriseId/storeLayout/pages/pageId
|
擷取商店頁面的詳細資料。 |
insert |
POST /enterprises/enterpriseId/storeLayout/pages
|
插入新的商店頁面。 |
清單 |
GET /enterprises/enterpriseId/storeLayout/pages
|
擷取商店中所有網頁的詳細資料。 |
更新 |
PUT /enterprises/enterpriseId/storeLayout/pages/pageId
|
更新商店頁面的內容。 |
使用者
如要進一步瞭解使用者資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/androidenterprise/v1 的 URI,除非另有說明 | ||
刪除 |
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 。如果對應的使用者已存在相同的帳戶 ID,系統就會以資源更新使用者。在此情況下,您只能變更 |
清單 |
GET /enterprises/enterpriseId/users
|
依主要電子郵件地址查詢使用者。
這項功能僅適用於由 Google 管理的使用者。由於由 Users.insert 呼叫的結果中已傳回這個 ID,因此由 EMM 管理的使用者不需要查詢 ID。
必要查詢參數:
|
revokeDeviceAccess |
DELETE /enterprises/enterpriseId/users/userId/deviceAccess
|
撤銷使用者目前佈建所有裝置的存取權。使用者將無法再於任何受管理的裝置上使用 Google Play 管理版商店。 這場通話僅適用於由 EMM 代管的帳戶。 |
setAvailableProductSet |
PUT /enterprises/enterpriseId/users/userId/availableProductSet
|
修改使用者有權存取的產品組合 (稱為「已加入許可清單」whitelisted的產品)。只有已核准的產品或先前已核准 (已撤銷核准的產品) 才能加入許可清單。 |
更新 |
PUT /enterprises/enterpriseId/users/userId
|
更新 EMM 管理使用者的詳細資料。
僅適用於受 EMM 管理的使用者,而非 Google 管理的使用者。 請在要求主體的 Users 資源中傳遞新的詳細資料。只能變更 displayName 欄位。其他欄位則必須不設定或採用目前使用的值。 |
網頁應用程式
如要進一步瞭解 Webapps 資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/androidenterprise/v1 的 URI,除非另有說明 | ||
刪除 |
DELETE /enterprises/enterpriseId/webApps/webAppId
|
刪除現有的網頁應用程式。 |
get |
GET /enterprises/enterpriseId/webApps/webAppId
|
取得現有的網頁應用程式。 |
insert |
POST /enterprises/enterpriseId/webApps
|
為企業建立新的網頁應用程式。 |
清單 |
GET /enterprises/enterpriseId/webApps
|
擷取特定企業所有網頁應用程式的詳細資料。 |
更新 |
PUT /enterprises/enterpriseId/webApps/webAppId
|
更新現有的網頁應用程式。 |