Method: users.getCapabilities
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
यह कुकी, उपयोगकर्ता की क्षमताओं के बारे में जानकारी इकट्ठा करती है.
एचटीटीपी अनुरोध
GET https://drivelabels.googleapis.com/v2/{name=users/*/capabilities}
यह यूआरएल, gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.
पाथ पैरामीटर
पैरामीटर |
name |
string
ज़रूरी है. उपयोगकर्ता के संसाधन का नाम. सिर्फ़ "users/me/capabilities" का इस्तेमाल किया जा सकता है.
|
क्वेरी पैरामीटर
पैरामीटर |
customer |
string
वह ग्राहक जिसके लिए यह अनुरोध किया गया है. उदाहरण के लिए: customers/abcd1234 . अगर इसे सेट नहीं किया जाता है, तो यह मौजूदा ग्राहक के लिए सेटिंग दिखाएगा.
|
अनुरोध का मुख्य भाग
अनुरोध का मुख्य हिस्सा खाली होना चाहिए.
जवाब का मुख्य भाग
उपयोगकर्ता की क्षमताएं.
अगर एपीआई सही से जुड़ जाता है, ताे जवाब के मुख्य भाग में नीचे दिए गए स्ट्रक्चर शामिल होता है.
JSON के काेड में दिखाना |
{
"name": string,
"canAccessLabelManager": boolean,
"canAdministrateLabels": boolean,
"canCreateSharedLabels": boolean,
"canCreateAdminLabels": boolean
} |
फ़ील्ड |
name |
string
सिर्फ़ आउटपुट के लिए. उपयोगकर्ता की क्षमताओं के लिए संसाधन का नाम.
|
canAccessLabelManager |
boolean
सिर्फ़ आउटपुट के लिए. उपयोगकर्ता को लेबल मैनेजर ऐक्सेस करने की अनुमति है या नहीं.
|
canAdministrateLabels |
boolean
सिर्फ़ आउटपुट के लिए. इससे पता चलता है कि उपयोगकर्ता, शेयर किए गए लेबल की सुविधा का एडमिन है या नहीं.
|
canCreateSharedLabels |
boolean
सिर्फ़ आउटपुट के लिए. इससे पता चलता है कि उपयोगकर्ता को शेयर किए गए लेबल बनाने की अनुमति है या नहीं.
|
canCreateAdminLabels |
boolean
सिर्फ़ आउटपुट के लिए. उपयोगकर्ता को एडमिन लेबल बनाने की अनुमति है या नहीं.
|
अनुमति के स्कोप
इसके लिए, इनमें से किसी एक OAuth स्कोप की ज़रूरत होती है:
https://www.googleapis.com/auth/drive.labels
https://www.googleapis.com/auth/drive.labels.readonly
https://www.googleapis.com/auth/drive.admin.labels
https://www.googleapis.com/auth/drive.admin.labels.readonly
ज़्यादा जानकारी के लिए, अनुमति पाने से जुड़ी गाइड देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-08-05 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-08-05 (UTC) को अपडेट किया गया."],[],[],null,["# Method: users.getCapabilities\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.UserCapabilities.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nGets the user capabilities.\n\n### HTTP request\n\n`GET https://drivelabels.googleapis.com/v2/{name=users/*/capabilities}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|----------------------------------------------------------------------------------------------|\n| `name` | `string` Required. The resource name of the user. Only \"users/me/capabilities\" is supported. |\n\n### Query parameters\n\n| Parameters ||\n|------------|---------------------------------------------------------------------------------------------------------------------------------------------------|\n| `customer` | `string` The customer to scope this request to. For example: `customers/abcd1234`. If unset, it will return settings within the current customer. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nThe capabilities of a user.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"canAccessLabelManager\": boolean, \"canAdministrateLabels\": boolean, \"canCreateSharedLabels\": boolean, \"canCreateAdminLabels\": boolean } ``` |\n\n| Fields ||\n|-------------------------|--------------------------------------------------------------------------------------------|\n| `name` | `string` Output only. Resource name for the user capabilities. |\n| `canAccessLabelManager` | `boolean` Output only. Whether the user is allowed access to the label manager. |\n| `canAdministrateLabels` | `boolean` Output only. Whether the user is an administrator for the shared labels feature. |\n| `canCreateSharedLabels` | `boolean` Output only. Whether the user is allowed to create shared labels. |\n| `canCreateAdminLabels` | `boolean` Output only. Whether the user is allowed to create admin labels. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/drive.labels`\n- `\n https://www.googleapis.com/auth/drive.labels.readonly`\n- `\n https://www.googleapis.com/auth/drive.admin.labels`\n- `\n https://www.googleapis.com/auth/drive.admin.labels.readonly`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]