Method: labels.get
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
लेबल को उसके संसाधन के नाम से पाएं. ज़्यादा जानकारी के लिए, लेबल खोजना लेख पढ़ें.
संसाधन का नाम इनमें से कोई भी हो सकता है:
labels/{id}
- labels/{id}@latest
देखें
labels/{id}@latest
- इससे लेबल का सबसे नया वर्शन मिलता है.
labels/{id}@published
- इस फ़ंक्शन की मदद से, लेबल के पब्लिश किए गए मौजूदा वर्शन की जानकारी मिलती है.
labels/{id}@{revisionId}
- इससे, तय किए गए रीविज़न आईडी पर मौजूद लेबल मिलता है.
एचटीटीपी अनुरोध
GET https://drivelabels.googleapis.com/v2/{name=labels/*}
यह यूआरएल, gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.
पाथ पैरामीटर
पैरामीटर |
name |
string
ज़रूरी है. लेबल के संसाधन का नाम. इनमें से कोई भी हो सकता है:
labels/{id} (labels/{id}@latest के बराबर)
labels/{id}@latest
labels/{id}@published
labels/{id}@{revisionId}
|
क्वेरी पैरामीटर
पैरामीटर |
useAdminAccess |
boolean
उपयोगकर्ता के एडमिन क्रेडेंशियल का इस्तेमाल करने के लिए, इसे true पर सेट करें. सर्वर यह पुष्टि करता है कि उपयोगकर्ता, लेबल का एडमिन है. इसके बाद ही, उसे ऐक्सेस करने की अनुमति दी जाती है.
|
languageCode |
string
स्थानीय भाषा में फ़ील्ड के लेबल का आकलन करने के लिए, BCP-47 भाषा कोड का इस्तेमाल करें. अगर इस एट्रिब्यूट की वैल्यू नहीं दी जाती है, तो कॉन्फ़िगर की गई डिफ़ॉल्ट भाषा में मौजूद वैल्यू का इस्तेमाल किया जाता है.
|
view |
enum (LabelView )
अगर ऐसा किया जाता है, तो सिर्फ़ बताए गए व्यू से जुड़े कुछ फ़ील्ड दिखाए जाते हैं.
|
अनुरोध का मुख्य भाग
अनुरोध का मुख्य हिस्सा खाली होना चाहिए.
जवाब का मुख्य हिस्सा
कामयाब रहने पर, जवाब के मुख्य हिस्से में Label
का एक इंस्टेंस शामिल किया जाता है.
अनुमति के स्कोप
इसके लिए, इनमें से किसी एक 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: labels.get\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- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nGet a label by its resource name. For more information, see [Search for labels](https://developers.google.com/workspace/drive/labels/guides/search-label).\n\nResource name may be any of:\n\n- `labels/{id}` - See `labels/{id}@latest`\n- `labels/{id}@latest` - Gets the latest revision of the label.\n- `labels/{id}@published` - Gets the current published revision of the label.\n- `labels/{id}@{revisionId}` - Gets the label at the specified revision ID.\n\n### HTTP request\n\n`GET https://drivelabels.googleapis.com/v2/{name=labels/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. Label resource name. May be any of: - `labels/{id}` (equivalent to labels/{id}@latest) - `labels/{id}@latest` - `labels/{id}@published` - `labels/{id}@{revisionId}` |\n\n### Query parameters\n\n| Parameters ||\n|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `useAdminAccess` | `boolean` Set to `true` in order to use the user's admin credentials. The server verifies that the user is an admin for the label before allowing access. |\n| `languageCode` | `string` The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language are used. |\n| `view` | `enum (`[LabelView](/workspace/drive/labels/reference/rest/v2/LabelView)`)` When specified, only certain fields belonging to the indicated view are returned. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [Label](/workspace/drive/labels/reference/rest/v2/labels#Label).\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)."]]