Tổng quan về API Chính sách Chrome
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.
API Chính sách Chrome là một bộ dịch vụ giúp quản trị viên Chrome xem và quản lý các chính sách Chrome theo phương thức lập trình được chỉ định cho Đơn vị tổ chức trong tổ chức của họ. Với API này, quản trị viên Chrome có thể nắm được thông tin chi tiết về cách sử dụng
thiết bị ChromeOS và trình duyệt Chrome trong tổ chức của họ.
Ưu điểm chính
Khả năng tương thích với Bảng điều khiển dành cho quản trị viên của Google: Những thay đổi bạn thực hiện với API sẽ được phản ánh trong giao diện người dùng của Bảng điều khiển dành cho quản trị viên của Google và ngược lại.
Ghi nhật ký kiểm tra: Những thay đổi thực hiện bằng API này được ghi vào Nhật ký kiểm tra của quản trị viên chuẩn.
Phương pháp dựa trên dữ liệu: Các chính sách của Chrome được biểu thị dưới dạng dữ liệu và không được giao diện API tham chiếu trực tiếp. Điều này cho phép bạn tự động hoá các ứng dụng API để sử dụng các chính sách của Chrome trong tương lai mà không cần phát triển thêm. Theo thời gian, số lượng chính sách được hỗ trợ thông qua API sẽ tăng lên.
Bổ sung cho API SDK quản trị: API này bổ sung cho API SDK quản trị, nơi quản trị viên Chrome có thể thực hiện những việc sau:
Các trường hợp sử dụng phổ biến
Bảng dưới đây liệt kê các tác vụ hàng đầu bạn có thể hoàn thành bằng API này. Để xem lại
các yêu cầu và phản hồi mẫu, hãy chuyển đến phần Mã mẫu.
URL tương đối so với https://chromepolicy.googleapis.com/v1/customers/$CUSTOMER
.
Nội dung mô tả việc cần làm |
URL tương đối |
Phương thức HTTP |
Thông số yêu cầu |
Giản đồ chính sách trên trang thông tin |
./policySchemas |
GET |
Không bắt buộc: filter , pageSize , pageToken |
Nhận giản đồ chính sách |
./policySchemas/$SCHEMA_NAME |
GET |
|
Xem hoặc liệt kê các chính sách cho một nhóm hoặc đơn vị tổ chức |
./policies:resolve |
POST |
Bắt buộc: policySchemaFilter , policyTargetKey
Không bắt buộc: pageSize , pageToken
|
Sửa đổi chính sách trong đơn vị tổ chức |
./policies/orgunits:batchModify |
POST |
Bắt buộc: requests: {policyTargetKey, policyValue, updateMask} |
Kế thừa chính sách trong một đơn vị tổ chức |
./policies/orgunits:batchInherit |
POST |
Bắt buộc: requests: {policyTargetKey, policySchema} |
Sửa đổi chính sách trong một Nhóm |
./policies/groups:batchModify |
POST |
Bắt buộc: requests: {policyTargetKey, policyValue, updateMask} |
Xoá chính sách trong một Nhóm |
./policies/groups:batchDelete |
POST |
Bắt buộc: requests: {policyTargetKey, policySchema} |
Liệt kê thứ tự ưu tiên trong một Nhóm |
./policies/groups:listGroupPriorityOrdering |
POST |
Bắt buộc: requests: {policyTargetKey, policyNamespace} |
Cập nhật thứ tự ưu tiên trong một Nhóm |
./policies/groups:updateGroupPriorityOrdering |
POST |
Bắt buộc: requests: {policyTargetKey, policyNamespace, groupIds} |
Tải tệp lên cho một chính sách |
./policies/files:uploadPolicyFile |
POST |
Bắt buộc: requests: {policyField} |
Hạn mức sử dụng
API này chỉ dùng trong nội bộ tổ chức của khách hàng Chrome. Để biết thêm thông tin chi tiết, hãy xem Điều khoản dịch vụ của API Chính sách Chrome. Để xây dựng ứng dụng API thương mại với Google, hãy gửi đơn đăng ký đối tác.
Các bước tiếp theo
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-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\u003cp\u003eThe Chrome Policy API enables Chrome administrators to programmatically view and manage Chrome policies for their organization's ChromeOS devices and Chrome browsers.\u003c/p\u003e\n"],["\u003cp\u003eIt offers key benefits like Google Admin console compatibility, audit logging, and a data-driven approach for easier automation.\u003c/p\u003e\n"],["\u003cp\u003eAdmins can utilize this API to perform tasks such as listing policy schemas, retrieving specific schemas, and managing policies for organizational units and groups.\u003c/p\u003e\n"],["\u003cp\u003eUsage of this API is restricted to internal use within a Chrome customer's organization, with commercial partnerships requiring a separate application process.\u003c/p\u003e\n"],["\u003cp\u003eFurther exploration is encouraged through provided resources on policy schemas, request setup, and code samples.\u003c/p\u003e\n"]]],[],null,["# Chrome Policy API Overview\n\nThe Chrome Policy API is a suite of services that empower Chrome administrators\nto programmatically view and manage Chrome policies assigned to the\n[Organizational Units](https://support.google.com/a/answer/4352075)\nin their organization. With this API, Chrome admins can gain insights about how\nChromeOS devices and Chrome browsers are being used in their organization.\n\nKey advantages\n--------------\n\n- **Google Admin console compatibility:** Changes you make with the API are\n reflected in Google Admin console UI, and vice versa.\n\n- **Audit logging:** Changes made with this API are logged in the standard\n [Admin Audit logs](https://support.google.com/a/answer/4579579).\n\n- **Data-driven approach:** Chrome policies are represented as data and aren't\n directly referenced by the API interface. This lets you automate API clients\n for consumption of future Chrome policies without additional development. Over\n time, the number of policies supported via API will increase.\n\n- **Complements the Admin SDK API:** This API complements the Admin SDK API,\n where Chrome admins can perform the following tasks:\n\n - [Manage Chrome devices](/admin-sdk/directory/v1/guides/manage-chrome-devices) with the Admin SDK's Directory API.\n - [Manage Chrome browsers](https://support.google.com/chrome/a/answer/9681204) with the Admin SDK's Chrome Browser Management API.\n - [Manage Chrome CUPS printers](/admin-sdk/chrome-printer) with the Admin SDK's Chrome Printer Management API.\n\nPopular use cases\n-----------------\n\nThe table below lists the top tasks you can complete with this API. To review\nexample requests and responses, go to [Code samples](/chrome/policy/guides/samples_policyapi).\n\nURLs are relative to `https://chromepolicy.googleapis.com/v1/customers/`\u003cvar translate=\"no\"\u003e$CUSTOMER\u003c/var\u003e.\n\n| Task description | Relative URL | HTTP method | Request parameters |\n|--------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|-------------|-----------------------------------------------------------------------------------------|\n| [List policy schemas](/chrome/policy/reference/rest/v1/customers.policySchemas/list) | `./policySchemas` | `GET` | *Optional:* `filter`, `pageSize`, `pageToken` |\n| [Get a policy schema](/chrome/policy/reference/rest/v1/customers.policySchemas/get) | `./policySchemas/`\u003cvar translate=\"no\"\u003e$SCHEMA_NAME\u003c/var\u003e | `GET` | |\n| [Get or list policies for an Organizational Unit or Group](/chrome/policy/reference/rest/v1/customers.policies/resolve) | `./policies:resolve` | `POST` | *Required:* `policySchemaFilter`, `policyTargetKey` *Optional:* `pageSize`, `pageToken` |\n| [Modify policies in an Organizational Unit](/chrome/policy/reference/rest/v1/customers.policies.orgunits/batchModify) | `./policies/orgunits:batchModify` | `POST` | *Required:* `requests: {policyTargetKey, policyValue, updateMask}` |\n| [Inherit policies in an Organizational Unit](/chrome/policy/reference/rest/v1/customers.policies.orgunits/batchInherit) | `./policies/orgunits:batchInherit` | `POST` | *Required:* `requests: {policyTargetKey, policySchema}` |\n| [Modify policies in a Group](/chrome/policy/reference/rest/v1/customers.policies.groups/batchModify) | `./policies/groups:batchModify` | `POST` | *Required:* `requests: {policyTargetKey, policyValue, updateMask}` |\n| [Delete policies in a Group](/chrome/policy/reference/rest/v1/customers.policies.groups/batchDelete) | `./policies/groups:batchDelete` | `POST` | *Required:* `requests: {policyTargetKey, policySchema}` |\n| [List priority orderings in a Group](/chrome/policy/reference/rest/v1/customers.policies.groups/listGroupPriorityOrdering) | `./policies/groups:listGroupPriorityOrdering` | `POST` | *Required:* `requests: {policyTargetKey, policyNamespace}` |\n| [Update priority orderings in a Group](/chrome/policy/reference/rest/v1/customers.policies.groups/updateGroupPriorityOrdering) | `./policies/groups:updateGroupPriorityOrdering` | `POST` | *Required:* `requests: {policyTargetKey, policyNamespace, groupIds}` |\n| [Upload files for a policy](/chrome/policy/reference/rest/v1/media/upload) | `./policies/files:uploadPolicyFile` | `POST` | *Required:* `requests: {policyField}` |\n\nUsage limits\n------------\n\nThis API is only for use internally within a Chrome customer's organization. For more details, review the [Chrome Policy API Terms of Service](http://console.cloud.google.com/tos?id=chrome-policy). To build a commercial API client in partnership with Google, submit a [partner application](https://docs.google.com/forms/d/e/1FAIpQLSdJA-2_BZ3FJLSBtuWkPCMPXqUpxGbCta1wXRrrVdUCX7apog/viewform).\n\nNext steps\n----------\n\n- [Learn about policy schemas](./policy-schemas)\n- [Set up and authorize requests](./setup)\n- [Review code samples](./samples)"]]