Method: groups.list
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يسترجع جميع مجموعات نطاق أو مستخدم معيّن باستخدام مفتاح مستخدم (مقسّمة إلى صفحات).
طلب HTTP
GET https://admin.googleapis.com/admin/directory/v1/groups
يستخدِم عنوان URL بنية تحويل ترميز gRPC.
مَعلمات طلب البحث
المعلمات |
customer |
string
المعرّف الفريد لحساب العميل على Google Workspace. في حال استخدام حساب على نطاقات متعددة، يمكنك استخدام هذا الحقل بدلاً من domain لجلب جميع المجموعات لعميل معيّن. يمكنك أيضًا استخدام العنوان البديل my_customer لتمثيل customerId حسابك. يتم أيضًا عرض customerId كجزء من مورد المستخدِمون. يجب تقديم المَعلمة customer أو domain .
|
domain |
string
اسم النطاق. استخدِم هذا الحقل للحصول على مجموعات من نطاق واحد فقط. لعرض جميع النطاقات لحساب عميل، استخدِم مَعلمة طلب البحث customer بدلاً من ذلك.
|
maxResults |
integer
تعرض هذه المَعلمة أكبر عدد ممكن من النتائج. الحد الأقصى المسموح به هو 200.
|
orderBy |
enum (OrderBy )
العمود الذي سيتم استخدامه لترتيب النتائج
|
pageToken |
string
رمز مميز لتحديد الصفحة التالية في القائمة
|
query |
string
البحث في سلسلة طلب البحث يجب أن يكون بالتنسيق "". يمكن الاطّلاع على المستندات الكاملة على الرابط https: //developers.google.com/workspace/admin/directory/v1/guides/search-groups.
|
sortOrder |
enum (SortOrder )
لاختيار عرض النتائج إما بترتيب تصاعدي أو تنازلي. لا يمكن استخدامها إلا عند استخدام orderBy أيضًا.
|
userKey |
string
عنوان البريد الإلكتروني أو المعرّف الثابت للمستخدم إذا كان سيتم إدراج هذه المجموعات فقط التي ينتمي إليها المستخدم المحدّد. إذا كان معرّفًا، يجب أن يتطابق مع معرّف عنصر المستخدم. لا يمكن استخدامها مع المَعلمة customer .
|
نص الطلب
يجب أن يكون نص الطلب فارغًا.
نص الاستجابة
إذا كانت الاستجابة ناجحة، سيحتوي نص الاستجابة على بيانات بالبنية التالية:
تمثيل JSON |
{
"kind": string,
"etag": string,
"groups": [
{
object (Group )
}
],
"nextPageToken": string
} |
الحقول |
kind |
string
نوع المرجع
|
etag |
string
علامة ETag للمورد
|
groups[] |
object (Group )
قائمة بعناصر المجموعة
|
nextPageToken |
string
الرمز المميّز المستخدَم للوصول إلى الصفحة التالية من هذه النتيجة
|
نطاقات التفويض
يتطلب أحد نطاقات OAuth التالية:
https://apps-apis.google.com/a/feeds/groups/
https://www.googleapis.com/auth/admin.directory.group
https://www.googleapis.com/auth/admin.directory.group.readonly
لمزيد من المعلومات، يمكنك الاطّلاع على دليل التفويض.
OrderBy
عمليات التعداد |
EMAIL |
عنوان البريد الإلكتروني للمجموعة |
SortOrder
عمليات التعداد |
ASCENDING |
ترتيب تصاعدي |
DESCENDING |
ترتيب تنازلي |
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Method: groups.list\n\nRetrieves all groups of a domain or of a user given a userKey (paginated).\n\n### HTTP request\n\n`GET https://admin.googleapis.com/admin/directory/v1/groups`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `customer` | `string` The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of `domain`. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](https://developers.google.com/workspace/admin/directory/v1/reference/users) resource. You must provide either the `customer` or the `domain` parameter. |\n| `domain` | `string` The domain name. Use this field to get groups from only one domain. To return all domains for a customer account, use the `customer` query parameter instead. |\n| `maxResults` | `integer` Maximum number of results to return. Max allowed value is 200. |\n| `orderBy` | `enum (`[OrderBy](/workspace/admin/directory/reference/rest/v1/groups/list#OrderBy)`)` Column to use for sorting results |\n| `pageToken` | `string` Token to specify next page in the list |\n| `query` | `string` Query string search. Should be of the form \"\". Complete documentation is at https: //developers.google.com/workspace/admin/directory/v1/guides/search-groups |\n| `sortOrder` | `enum (`[SortOrder](/workspace/admin/directory/reference/rest/v1/groups/list#SortOrder)`)` Whether to return results in ascending or descending order. Only of use when orderBy is also used |\n| `userKey` | `string` Email or immutable ID of the user if only those groups are to be listed, the given user is a member of. If it's an ID, it should match with the ID of the user object. Cannot be used with the `customer` parameter. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"etag\": string, \"groups\": [ { object (/workspace/admin/directory/reference/rest/v1/groups#Group) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-----------------|----------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Kind of resource this is. |\n| `etag` | `string` ETag of the resource. |\n| `groups[]` | `object (`[Group](/workspace/admin/directory/reference/rest/v1/groups#Group)`)` A list of group objects. |\n| `nextPageToken` | `string` Token used to access next page of this result. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://apps-apis.google.com/a/feeds/groups/`\n- `\n https://www.googleapis.com/auth/admin.directory.group`\n- `\n https://www.googleapis.com/auth/admin.directory.group.readonly`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nOrderBy\n-------\n\n| Enums ||\n|---------|---------------------|\n| `EMAIL` | Email of the group. |\n\nSortOrder\n---------\n\n| Enums ||\n|--------------|-------------------|\n| `ASCENDING` | Ascending order. |\n| `DESCENDING` | Descending order. |"]]