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.
Bạn có 5 phút rảnh không?
Hãy giúp chúng tôi cải thiện tài liệu về Google Workspace bằng cách trả lời một bản khảo sát trực tuyến ngắn.
Directory API là một phần của Admin SDK API dựa trên REST. Bạn có thể dùng API này để tạo và quản lý theo phương thức lập trình các tài nguyên do quản trị viên kiểm soát thuộc một tài khoản Google Workspace. Một số trường hợp sử dụng bao gồm:
Tạo và quản lý người dùng cũng như thêm quản trị viên.
Tạo và quản lý nhóm cũng như tư cách thành viên trong nhóm.
Giám sát các thiết bị kết nối với miền của bạn và xử lý các thiết bị bị mất.
Quản lý sơ đồ tổ chức và cấu trúc tổ chức.
Kiểm tra những ứng dụng mà người dùng đã cấp quyền truy cập và thu hồi quyền truy cập của các ứng dụng trái phép.
Sau đây là danh sách các thuật ngữ thường dùng trong Directory API:
Khách hàng
Pháp nhân sở hữu tài khoản Google Workspace, do tài nguyên Khách hàng đại diện.
Miền
Nếu có, miền DNS được liên kết với một tài khoản Google Workspace, được biểu thị bằng tài nguyên Miền. Không phải tài khoản nào cũng có miền liên kết.
Đơn vị tổ chức (OU)
Một đơn vị phụ trong cây tổ chức của tài khoản Google Workspace, được dùng để nhóm và sắp xếp người dùng nhằm mục đích áp dụng chính sách và cấp quyền uỷ quyền. OU được biểu thị bằng tài nguyên OrgUnit.
Đặc quyền
Khả năng thực hiện một thao tác trên tài nguyên Google Workspace của người dùng.
Chủ yếu áp dụng cho quản trị viên. Đặc quyền được biểu thị bằng tài nguyên Privilege.
Vai trò
Một tập hợp các đặc quyền được xác định mà bạn có thể chỉ định cho một người dùng hoặc một nhóm người dùng, được biểu thị bằng tài nguyên Vai trò.
Chỉ định vai trò
Một bản ghi cho biết người dùng nào được cấp vai trò nào và trong phạm vi nào.
Việc chỉ định vai trò được biểu thị bằng tài nguyên RoleAssignment.
Giản đồ
Một đối tượng JSON xác định các thuộc tính người dùng tuỳ chỉnh cho tổ chức của bạn, được biểu thị bằng tài nguyên Schema.
Người dùng
Một tài khoản người dùng cuối riêng lẻ có quyền truy cập vào các ứng dụng và tài nguyên của Google Workspace, được biểu thị bằng tài nguyên User.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-08-29 UTC."],[],[],null,["# Directory API Overview\n\n|-------------------------------------------------------------------------------------------------------------------------------------------|\n| Got 5 minutes? Help us improve our Google Workspace documentation by taking a quick [online survey](https://forms.gle/XcqRP3PJiQv9ADuj9). |\n\nThe Directory API is part of the RESTful Admin SDK API that can be used to\nprogrammatically create and manage admin-controlled resources owned by a\nGoogle Workspace account. Some use cases include:\n\n- Creating and managing users and adding administrators.\n- Creating and managing groups and group memberships.\n- Monitoring devices connected to your domain and taking action on lost devices.\n- Managing your org chart and organization structures.\n- Auditing applications your users have granted access to and revoking unauthorized apps.\n\nFollowing is a list of common terms used in the Directory API:\n\n*Customer*\n: The entity that owns the Google Workspace account, represented by the\n [Customer](/workspace/admin/directory/reference/rest/v1/customers) resource.\n\n*Domain*\n: If applicable, the DNS domain associated with a Google Workspace account,\n represented by the\n [Domain](/workspace/admin/directory/reference/rest/v1/domains) resource. Not all\n accounts have an associated domain.\n\n*Organizational unit (OU)*\n: A sub-unit of a Google Workspace account's organizational tree, used to\n group and sort users for the purpose of applying policies and granting\n authorizations. An OU is represented by the\n [OrgUnit](/workspace/admin/directory/reference/rest/v1/orgunits) resource.\n\n*Privilege*\n: The ability of a user to perform an action on a Google Workspace resource.\n Applies primarily to admins. A privilege is represented by the\n [Privilege](/workspace/admin/directory/reference/rest/v1/privileges/list#Privilege)\n resource.\n\n*Role*\n: A defined collection of privileges that can be assigned to a user or set of\n users, represented by the\n [Role](/workspace/admin/directory/reference/rest/v1/roles) resource.\n\n*Role assignment*\n: A record indicating which user is granted what roles, and over what scope.\n A role assignment is represented by the\n [RoleAssignment](/workspace/admin/directory/reference/rest/v1/roleAssignments)\n resource.\n\n*Schema*\n: A JSON object that defines custom user attributes for your organization,\n represented by the\n [Schema](/workspace/admin/directory/reference/rest/v1/schemas) resource.\n\n*User*\n: An individual end user account with access to Google Workspace apps and\n resources, represented by the\n [User](/workspace/admin/directory/reference/rest/v1/users) resource.\n\nNext steps\n----------\n\n- To learn about developing with Google Workspace APIs, including handling\n authentication and authorization, refer to\n [Get started as a Workspace developer](/workspace/guides/getstarted-overview).\n\n- To learn how to configure and run a simple Directory API app, try the\n [JavaScript quickstart](/workspace/admin/directory/v1/quickstart/js)."]]