Method: files.untrash
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
ट्रैश से किसी फ़ाइल को वापस लाता है. फ़िलहाल पुष्टि किए गए उपयोगकर्ता के पास फ़ाइल का मालिकाना हक होना चाहिए या शेयर की गई ड्राइव की फ़ाइलों के लिए, पेरंट खाते में कम से कम fileOrganizer
की भूमिका होनी चाहिए.
एचटीटीपी अनुरोध
POST https://www.googleapis.com/drive/v2/files/{fileId}/untrash
यूआरएल में gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल किया गया है.
पाथ पैरामीटर
पैरामीटर |
fileId |
string
उस फ़ाइल का आईडी जिसे ट्रैश से वापस लाना है.
|
क्वेरी पैरामीटर
पैरामीटर |
supportsAllDrives |
boolean
अनुरोध करने वाला ऐप्लिकेशन, 'मेरी ड्राइव' और शेयर की गई ड्राइव, दोनों के साथ काम करता है या नहीं.
|
supportsTeamDrives (deprecated) |
boolean
इस्तेमाल नहीं किया जा सकता: इसके बजाय, supportsAllDrives का इस्तेमाल करें.
|
includePermissionsForView |
string
इससे यह तय होता है कि जवाब में कौनसे अतिरिक्त व्यू की अनुमतियां शामिल करनी हैं. वैल्यू के तौर पर, सिर्फ़ published को इस्तेमाल किया जा सकता है.
|
includeLabels |
string
जवाब के labelInfo हिस्से में शामिल करने के लिए, लेबल के आईडी की कॉमा से अलग की गई सूची.
|
अनुरोध का मुख्य भाग
अनुरोध का मुख्य हिस्सा खाली होना चाहिए.
जवाब का मुख्य हिस्सा
कामयाब रहने पर, जवाब के मुख्य हिस्से में File
का एक इंस्टेंस शामिल किया जाता है.
अनुमति के दायरे
इसके लिए, OAuth के इनमें से किसी एक स्कोप की ज़रूरत होती है:
https://www.googleapis.com/auth/docs
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.appdata
https://www.googleapis.com/auth/drive.apps.readonly
https://www.googleapis.com/auth/drive.file
कुछ स्कोप पर पाबंदी होती है. साथ ही, इनका इस्तेमाल करने के लिए आपके ऐप्लिकेशन को सुरक्षा से जुड़ी समीक्षा कराने की ज़रूरत होती है. ज़्यादा जानकारी के लिए, अनुमति से जुड़ी गाइड देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को 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: files.untrash\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\nRestores a file from the trash. The currently authenticated user must own the file or be at least a `fileOrganizer` on the parent for shared drive files.\n\n### HTTP request\n\n`POST https://www.googleapis.com/drive/v2/files/{fileId}/untrash`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-----------------------------------------|\n| `fileId` | `string` The ID of the file to untrash. |\n\n### Query parameters\n\n| Parameters ||\n|---------------------------------------|-------------------------------------------------------------------------------------------------------------------|\n| `supportsAllDrives` | `boolean` Whether the requesting application supports both My Drives and shared drives. |\n| `supportsTeamDrives` **(deprecated)** | `boolean` Deprecated: Use `supportsAllDrives` instead. |\n| `includePermissionsForView` | `string` Specifies which additional view's permissions to include in the response. Only `published` is supported. |\n| `includeLabels` | `string` A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. |\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 [File](/workspace/drive/api/reference/rest/v2/files#File).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/docs`\n- `\n https://www.googleapis.com/auth/drive`\n- `\n https://www.googleapis.com/auth/drive.appdata`\n- `\n https://www.googleapis.com/auth/drive.apps.readonly`\n- `\n https://www.googleapis.com/auth/drive.file`\n\nSome scopes are restricted and require a security assessment for your app to use them. For more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]