Lưu ý quan trọng: Chúng tôi không còn chấp nhận các lượt đăng ký mới cho Play EMM API.
Tìm hiểu thêm.
Enterprises
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Để xem danh sách phương thức cho tài nguyên này, hãy xem phần cuối trang này.
Biểu thị tài nguyên
Tài nguyên Doanh nghiệp đại diện cho mối liên kết giữa một EMM và một tổ chức cụ thể. Bạn có thể tạo bản sao liên kết đó theo một trong hai cách sau bằng cách sử dụng API này:
- Đối với khách hàng có miền do Google quản lý, quy trình này bao gồm việc sử dụng
Enterprises.enroll
và Enterprises.setAccount
(kết hợp với các cấu phần phần mềm thu được từ Bảng điều khiển dành cho quản trị viên và Google API Console) và gửi đến EMM thông qua một quy trình thủ công. - Đối với khách hàng sử dụng Tài khoản Google được quản lý, quy trình này bao gồm việc sử dụng
Enterprises.generateSignupUrl
và Enterprises.completeSignup
kết hợp với giao diện người dùng đăng ký Tài khoản Google được quản lý (cơ chế do Google cung cấp) để tạo liên kết mà không cần thực hiện các bước thủ công.
Là một EMM, bạn có thể hỗ trợ một hoặc cả hai phương pháp trong bảng điều khiển EMM. Hãy xem bài viết Tạo tài khoản doanh nghiệp để biết thông tin chi tiết.
{
"kind": "androidenterprise#enterprise",
"id": string,
"primaryDomain": string,
"name": string,
"administrator": [
{
"email": string
}
],
"enterpriseType": string,
"managedGoogleDomainType": string
}
Tên tài sản |
Giá trị |
Mô tả |
Ghi chú |
administrator[] |
list |
Quản trị viên của doanh nghiệp. Tính năng này chỉ hỗ trợ các doanh nghiệp được tạo thông qua quy trình do EMM khởi tạo.
|
|
administrator[].email |
string |
Địa chỉ email của quản trị viên. |
|
enterpriseType |
string |
Loại hình doanh nghiệp.
Các giá trị được chấp nhận là:
- "
enterpriseTypeUnspecified "
- "
managedGoogleDomain "
- "
managedGooglePlayAccountsEnterprise "
|
|
id |
string |
Mã nhận dạng duy nhất của doanh nghiệp.
|
|
kind |
string |
|
|
managedGoogleDomainType |
string |
Loại miền Google được quản lý
Các giá trị được chấp nhận là:
- "
managedGoogleDomainTypeUnspecified "
- "
typeDomain "
- "
typeTeam "
|
|
name |
string |
Tên của doanh nghiệp, ví dụ: "Ví dụ, Inc". |
|
primaryDomain |
string |
Miền chính của doanh nghiệp, chẳng hạn như "example.com". |
|
Phương thức
- acknowledgeNotificationSet
- Xác nhận các thông báo đã nhận được từ
Enterprises.PullNotificationSet để ngăn các lệnh gọi tiếp theo trả về
cùng một thông báo.
- completeSignup
- Hoàn tất quy trình đăng ký bằng cách chỉ định Mã thông báo hoàn tất và
Mã thông báo doanh nghiệp.
Bạn không được gọi yêu cầu này nhiều lần cho một Mã thông báo doanh nghiệp nhất định.
- createWebToken
- Trả về một mã thông báo duy nhất để truy cập vào giao diện người dùng có thể nhúng. Để tạo giao diện người dùng web, hãy truyền mã thông báo đã tạo vào API JavaScript của Google Play được quản lý. Mỗi mã thông báo chỉ có thể được dùng để bắt đầu một phiên giao diện người dùng. Hãy xem
tài liệu về API JavaScript để biết thêm thông tin.
- đăng ký
- Đăng ký một doanh nghiệp với EMM gọi.
- generateEnterpriseUpgradeUrl
- Tạo URL nâng cấp doanh nghiệp để nâng cấp một tập hợp Tài khoản Google Play có quản lý hiện có lên miền mua qua Google được quản lý.
Hãy xem
hướng dẫn nâng cấp phiên bản dành cho doanh nghiệp để biết thêm thông tin chi tiết.
- generateSignupUrl
- Tạo URL đăng ký.
- get
- Truy xuất tên và miền của một doanh nghiệp.
- getServiceAccount
- Trả về một tài khoản dịch vụ và thông tin xác thực. Bạn có thể liên kết tài khoản dịch vụ với doanh nghiệp bằng cách gọi setAccount. Tài khoản dịch vụ là duy nhất cho doanh nghiệp và EMM này, đồng thời sẽ bị xoá nếu doanh nghiệp bị huỷ liên kết. Thông tin xác thực chứa dữ liệu khoá riêng tư và không được lưu trữ ở phía máy chủ.
Bạn chỉ có thể gọi phương thức này sau khi gọi
Enterprises.Enroll hoặc Enterprises.CompleteSignup và trước khi gọi
Enterprises.SetAccount; nếu không, phương thức này sẽ trả về lỗi.
Các lệnh gọi tiếp theo sau lệnh gọi đầu tiên sẽ tạo một bộ thông tin xác thực mới, duy nhất và vô hiệu hoá thông tin xác thực đã tạo trước đó.
Sau khi liên kết tài khoản dịch vụ với doanh nghiệp, bạn có thể quản lý tài khoản dịch vụ đó bằng cách sử dụng tài nguyên serviceAccountKeys.
.
- getStoreLayout
- Trả về bố cục cửa hàng cho doanh nghiệp. Nếu bạn chưa đặt bố cục cửa hàng, thì hệ thống sẽ trả về "cơ bản" làm loại bố cục cửa hàng và không có trang chủ.
- list
- Tìm kiếm một doanh nghiệp theo tên miền.
Tính năng này chỉ được hỗ trợ cho các doanh nghiệp được tạo thông qua quy trình tạo do Google khởi tạo. Bạn không cần tra cứu mã nhận dạng cho các doanh nghiệp được tạo thông qua quy trình do EMM khởi tạo vì EMM sẽ tìm hiểu mã nhận dạng doanh nghiệp trong lệnh gọi lại được chỉ định trong lệnh gọi Enterprises.generateSignupUrl.
- pullNotificationSet
- Kéo và trả về một nhóm thông báo cho các doanh nghiệp được liên kết với tài khoản dịch vụ đã được xác thực cho yêu cầu. Tập hợp thông báo có thể trống nếu không có thông báo nào đang chờ xử lý.
Bạn cần xác nhận một tập hợp thông báo được trả về trong vòng 20 giây bằng cách gọi Enterprises.AcknowledgeNotificationSet, trừ khi tập hợp thông báo đó trống.
Các thông báo không được xác nhận trong vòng 20 giây cuối cùng sẽ được đưa vào lại trong phản hồi cho một yêu cầu PullNotificationSet khác, còn những thông báo không bao giờ được xác nhận cuối cùng sẽ bị xoá theo chính sách hệ thống Pub/Sub của Google Cloud Platform.
Nhiều yêu cầu có thể được thực hiện đồng thời để truy xuất thông báo. Trong trường hợp đó, các thông báo đang chờ xử lý (nếu có) sẽ được phân chia giữa từng phương thức gọi, nếu có thông báo đang chờ xử lý.
Nếu không có thông báo nào, hệ thống sẽ trả về danh sách thông báo trống.
Các yêu cầu tiếp theo có thể trả về thêm thông báo khi có.
- sendTestPushNotification
- Gửi thông báo thử nghiệm để xác thực việc tích hợp EMM với dịch vụ Google Cloud Pub/Sub cho doanh nghiệp này.
- setAccount
- Đặt tài khoản sẽ được dùng để xác thực với API dưới dạng
doanh nghiệp.
- setStoreLayout
- Đặt bố cục cửa hàng cho doanh nghiệp. Theo mặc định, storeLayoutType được đặt thành "cơ bản" và bố cục cửa hàng cơ bản được bật. Bố cục cơ bản chỉ chứa các ứng dụng được quản trị viên phê duyệt và đã được thêm vào nhóm sản phẩm có sẵn cho người dùng (bằng lệnh gọi
setAvailableProductSet). Các ứng dụng trên trang được sắp xếp theo thứ tự giá trị mã sản phẩm. Nếu bạn tạo bố cục cửa hàng tuỳ chỉnh (bằng cách đặt storeLayoutType = "custom" và đặt trang chủ), thì bố cục cửa hàng cơ bản sẽ bị vô hiệu hoá.
- huỷ đăng ký
- Huỷ đăng ký một doanh nghiệp khỏi EMM gọi.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-28 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-28 UTC."],[[["\u003cp\u003eAn Enterprises resource represents the connection between an EMM and an organization, established through either manual enrollment for Google-managed domains or automated signup for managed Google Play Accounts.\u003c/p\u003e\n"],["\u003cp\u003eEMMs can support either or both enrollment methods, offering flexibility in binding with organizations.\u003c/p\u003e\n"],["\u003cp\u003eThe API provides various methods to manage enterprises, including enrollment, sign-up, retrieval of enterprise details, and more.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eEnterprises\u003c/code\u003e resource includes properties like ID, primary domain, name, and administrators, offering comprehensive information about the enterprise.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can leverage the API's methods to interact with and manage enterprise data, enabling seamless integration with their EMM solutions.\u003c/p\u003e\n"]]],[],null,["# Enterprises\n\n\u003cbr /\u003e\n\nFor a list of [methods](#methods) for this resource, see the end of this page.\n\nResource representations\n------------------------\n\nAn Enterprises resource represents the binding between an EMM and a specific organization. That binding can be instantiated in one of two different ways using this API as follows:\n\n- For Google managed domain customers, the process involves using `Enterprises.enroll` and `Enterprises.setAccount` (in conjunction with artifacts obtained from the Admin console and the Google API Console) and submitted to the EMM through a more-or-less manual process.\n- For managed Google Play Accounts customers, the process involves using `Enterprises.generateSignupUrl` and `Enterprises.completeSignup` in conjunction with the managed Google Play sign-up UI (Google-provided mechanism) to create the binding without manual steps.\n\nAs an EMM, you can support either or both approaches in your EMM console. See [Create an Enterprise](/android/work/play/emm-api/create-enterprise) for details. \n\n\u003cbr /\u003e\n\n```text\n{\n \"kind\": \"androidenterprise#enterprise\",\n \"id\": string,\n \"primaryDomain\": string,\n \"name\": string,\n \"administrator\": [\n {\n \"email\": string\n }\n ],\n \"enterpriseType\": string,\n \"managedGoogleDomainType\": string\n}\n```\n\n| Property name | Value | Description | Notes |\n|---------------------------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|-------|\n| `administrator[]` | `list` | Admins of the enterprise. This is only supported for enterprises created via the EMM-initiated flow. | |\n| administrator[].`email` | `string` | The admin's email address. | |\n| `enterpriseType` | `string` | The type of the enterprise. \u003cbr /\u003e Acceptable values are: - \"`enterpriseTypeUnspecified`\" - \"`managedGoogleDomain`\" - \"`managedGooglePlayAccountsEnterprise`\" | |\n| `id` | `string` | The unique ID for the enterprise. | |\n| `kind` | `string` | | |\n| `managedGoogleDomainType` | `string` | The type of managed Google domain \u003cbr /\u003e Acceptable values are: - \"`managedGoogleDomainTypeUnspecified`\" - \"`typeDomain`\" - \"`typeTeam`\" | |\n| `name` | `string` | The name of the enterprise, for example, \"Example, Inc\". | |\n| `primaryDomain` | `string` | The enterprise's primary domain, such as \"example.com\". | |\n\nMethods\n-------\n\n[acknowledgeNotificationSet](/android/work/play/emm-api/v1/enterprises/acknowledgeNotificationSet)\n: Acknowledges notifications that were received from\n Enterprises.PullNotificationSet to prevent subsequent calls from returning\n the same notifications.\n\n[completeSignup](/android/work/play/emm-api/v1/enterprises/completeSignup)\n: Completes the signup flow, by specifying the Completion token and\n Enterprise token.\n This request must not be called multiple times for a given Enterprise\n Token.\n\n[createWebToken](/android/work/play/emm-api/v1/enterprises/createWebToken)\n: Returns a unique token to access an embeddable UI. To generate a\n web UI, pass the generated token into the managed Google Play javascript\n API. Each token may only be used to start one UI session. See the\n [JavaScript API documentation](https://developers.google.com/api-client-library/javascript/apis/androidenterprise/v1) for further information.\n\n[enroll](/android/work/play/emm-api/v1/enterprises/enroll)\n: Enrolls an enterprise with the calling EMM.\n\n[generateEnterpriseUpgradeUrl](/android/work/play/emm-api/v1/enterprises/generateEnterpriseUpgradeUrl)\n: Generates an enterprise upgrade URL to upgrade an existing managed Google\n Play Accounts enterprise to a managed Google domain.\n See [the guide to upgrading an enterprise](/android/work/play/emm-api/upgrade-an-enterprise) for more details.\n\n[generateSignupUrl](/android/work/play/emm-api/v1/enterprises/generateSignupUrl)\n: Generates a sign-up URL.\n\n[get](/android/work/play/emm-api/v1/enterprises/get)\n: Retrieves the name and domain of an enterprise.\n\n[getServiceAccount](/android/work/play/emm-api/v1/enterprises/getServiceAccount)\n: Returns a service account and credentials. The service account\n can be bound to the enterprise by calling setAccount. The service account\n is unique to this enterprise and EMM, and will be deleted if the enterprise\n is unbound. The credentials contain private key data and are not stored\n server-side.\n\n \u003cbr /\u003e\n\n\n This method can only be called after calling\n Enterprises.Enroll or Enterprises.CompleteSignup, and before\n Enterprises.SetAccount; at other times it will return an error.\n\n \u003cbr /\u003e\n\n\n Subsequent calls after the first will generate a new, unique set of\n credentials, and invalidate the previously generated credentials.\n\n \u003cbr /\u003e\n\n\n Once the service account is bound to the enterprise, it can be managed\n using the serviceAccountKeys resource.\n\n \u003cbr /\u003e\n\n\n \u003cbr /\u003e\n\n | **Note:** After you create a key, you might need to wait for 60 seconds or more before you perform another operation with the key. If you try to perform an operation with the key immediately after you create the key, and you receive an error, you can [retry\n | the request with exponential backoff](https://cloud.google.com/iam/docs/retry-strategy)\n\n \u003cbr /\u003e\n\n .\n\n[getStoreLayout](/android/work/play/emm-api/v1/enterprises/getStoreLayout)\n: Returns the store layout for the enterprise. If the store layout\n has not been set, returns \"basic\" as the store layout type and no\n homepage.\n\n[list](/android/work/play/emm-api/v1/enterprises/list)\n: Looks up an enterprise by domain name.\n This is only supported for enterprises created via the Google-initiated\n creation flow. Lookup of the id is not needed for enterprises created via\n the EMM-initiated flow since the EMM learns the enterprise ID in the\n callback specified in the Enterprises.generateSignupUrl call.\n\n[pullNotificationSet](/android/work/play/emm-api/v1/enterprises/pullNotificationSet)\n: Pulls and returns a notification set for the enterprises associated with\n the service account authenticated for the request. The notification set may\n be empty if no notification are pending.\n\n\n A notification set returned needs to be acknowledged within 20 seconds\n by calling Enterprises.AcknowledgeNotificationSet, unless the\n notification set is empty.\n\n\n Notifications that are not acknowledged within the 20 seconds will\n eventually be included again in the response to another PullNotificationSet\n request, and those that are never acknowledged will ultimately be deleted\n according to the Google Cloud Platform Pub/Sub system policy.\n\n\n Multiple requests might be performed concurrently to retrieve\n notifications, in which case the pending notifications (if any) will be\n split among each caller, if any are pending.\n\n\n If no notifications are present, an empty notification list is returned.\n Subsequent requests may return more notifications once they become\n available.\n\n[sendTestPushNotification](/android/work/play/emm-api/v1/enterprises/sendTestPushNotification)\n: Sends a test notification to validate the EMM integration with\n the Google Cloud Pub/Sub service for this enterprise.\n\n[setAccount](/android/work/play/emm-api/v1/enterprises/setAccount)\n: Sets the account that will be used to authenticate to the API as the\n enterprise.\n\n[setStoreLayout](/android/work/play/emm-api/v1/enterprises/setStoreLayout)\n: Sets the store layout for the enterprise. By default, storeLayoutType\n is set to \"basic\" and the basic store layout is enabled. The basic\n layout only contains apps approved by the admin, and that have\n been added to the available product set for a user (using the\n [setAvailableProductSet](/android/work/play/emm-api/v1/users/setAvailableProductSet) call). Apps on the page are sorted in order of\n their product ID value. If you create a custom store layout (by setting\n storeLayoutType = \"custom\" and setting a homepage), the basic store\n layout is disabled.\n\n[unenroll](/android/work/play/emm-api/v1/enterprises/unenroll)\n: Unenrolls an enterprise from the calling EMM."]]