Directory API 總覽
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Directory API 是 RESTful Admin SDK API 的一部分,可讓您以程式輔助方式,建立及管理 Google Workspace 帳戶擁有的管理員控制資源。部分應用實例包括:
- 建立及管理使用者,並新增管理員。
- 建立及管理群組和群組成員資格。
- 監控連上網域的裝置,並對遺失的裝置採取行動。
- 管理機構圖和機構架構。
- 稽核使用者已授予存取權的應用程式,並撤銷未經授權的應用程式。
以下列出 Directory API 常用的字詞:
- 客戶
- 擁有 Google Workspace 帳戶的實體,以「客戶」資源表示。
- 網域
- 與 Google Workspace 帳戶相關聯的 DNS 網域 (如適用),以「網域」資源表示。並非所有帳戶都有相關聯的網域。
- 機構單位 (OU)
- Google Workspace 帳戶機構樹狀結構的子單位,用於分組和排序使用者,以便套用政策及授予授權。機構單位是以 OrgUnit 資源表示。
- 權限
- 使用者對 Google Workspace 資源執行動作的能力。主要適用於管理員。權限以 Privilege 資源表示。
- 角色
- 可指派給使用者或使用者群組的一組權限,以「Role」資源表示。
- 指派角色
- 記錄:指出授予哪些使用者哪些角色,以及適用的範圍。
角色指派是由 RoleAssignment 資源表示。
- 結構定義
- 定義機構自訂使用者屬性的 JSON 物件,以 Schema 資源表示。
- 使用者
- 可存取 Google Workspace 應用程式和資源的個人使用者帳戶,以「User」資源表示。
後續步驟
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-29 (世界標準時間)。
[null,null,["上次更新時間:2025-08-29 (世界標準時間)。"],[],[],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)."]]