Method: groups.list
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
किसी डोमेन या उपयोगकर्ता के सभी ग्रुप को वापस लाता है. इसके लिए, userKey दिया जाता है. यह पेज के हिसाब से होता है.
एचटीटीपी अनुरोध
GET https://admin.googleapis.com/admin/directory/v1/groups
यूआरएल में gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल किया गया है.
क्वेरी पैरामीटर
पैरामीटर |
customer |
string
ग्राहक के Google Workspace खाते का यूनीक आईडी. एक से ज़्यादा डोमेन वाले खाते के मामले में, किसी ग्राहक के सभी ग्रुप फ़ेच करने के लिए, domain के बजाय इस फ़ील्ड का इस्तेमाल करें. अपने खाते के customerId को दिखाने के लिए, my_customer उपनाम का भी इस्तेमाल किया जा सकता है. 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
Enums |
EMAIL |
ग्रुप का ईमेल पता. |
SortOrder
Enums |
ASCENDING |
बढ़ते क्रम में. |
DESCENDING |
घटते क्रम में. |
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[],[],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. |"]]