Method: changes.watch
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
एचटीटीपी अनुरोध
POST https://www.googleapis.com/drive/v3/changes/watch
यूआरएल में gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल किया गया है.
क्वेरी पैरामीटर
पैरामीटर |
driveId |
string
शेयर की गई वह ड्राइव जिससे बदलाव वापस लौटाए जाएंगे. अगर बदलाव आईडी तय किए गए हैं, तो वे शेयर की गई ड्राइव में दिखेंगे. आइडेंटिफ़ायर के तौर पर, ड्राइव आईडी और बदलाव आईडी को जोड़कर इस्तेमाल करें.
|
includeCorpusRemovals |
boolean
अगर अनुरोध के समय उपयोगकर्ता के पास फ़ाइल का ऐक्सेस है, तो क्या बदलावों में फ़ाइल रिसॉर्स शामिल किया जाना चाहिए. भले ही, फ़ाइल को बदलावों की सूची से हटा दिया गया हो और इस फ़ाइल के लिए बदलाव की कोई और एंट्री न हो.
|
includeItemsFromAllDrives |
boolean
'मेरी ड्राइव' और शेयर की गई ड्राइव, दोनों के आइटम नतीजों में शामिल करने हैं या नहीं.
|
includeRemoved |
boolean
क्या बदलावों की सूची में ऐसे बदलाव शामिल करने हैं जिनसे पता चलता हो कि आइटम को बदलावों की सूची से हटा दिया गया है. उदाहरण के लिए, मिटाने या ऐक्सेस हटाने की वजह से.
|
includeTeamDriveItems (deprecated) |
boolean
इस्तेमाल नहीं किया जा सकता: इसके बजाय, includeItemsFromAllDrives का इस्तेमाल करें.
|
pageSize |
integer
हर पेज पर बदलावों की ज़्यादा से ज़्यादा संख्या.
|
pageToken |
string
अगले पेज पर, सूची के पिछले अनुरोध को जारी रखने के लिए टोकन. इसे पिछले रिस्पॉन्स में मौजूद 'nextPageToken' की वैल्यू पर सेट किया जाना चाहिए या getStartPageToken तरीके से मिले रिस्पॉन्स पर सेट किया जाना चाहिए.
|
restrictToMyDrive |
boolean
नतीजों को 'मेरी ड्राइव' के लेआउट में हुए बदलावों तक सीमित करना है या नहीं. इससे, फ़ाइलों में हुए बदलावों को शामिल नहीं किया जाता. जैसे, ऐप्लिकेशन डेटा फ़ोल्डर में मौजूद फ़ाइलों या शेयर की गई उन फ़ाइलों में हुए बदलाव जिन्हें 'मेरी ड्राइव' में नहीं जोड़ा गया है.
|
spaces |
string
कॉरपोरा में क्वेरी करने के लिए, स्पेस की कॉमा से अलग की गई सूची. 'drive' और 'appDataFolder' वैल्यू का इस्तेमाल किया जा सकता है.
|
supportsAllDrives |
boolean
अनुरोध करने वाला ऐप्लिकेशन, 'मेरी ड्राइव' और शेयर की गई ड्राइव, दोनों के साथ काम करता है या नहीं.
|
supportsTeamDrives (deprecated) |
boolean
इस्तेमाल नहीं किया जा सकता: इसके बजाय, supportsAllDrives का इस्तेमाल करें.
|
teamDriveId (deprecated) |
string
इस्तेमाल नहीं किया जा सकता: इसके बजाय, driveId का इस्तेमाल करें.
|
includePermissionsForView |
string
इससे पता चलता है कि जवाब में कौनसे अतिरिक्त व्यू की अनुमतियां शामिल करनी हैं. सिर्फ़ 'पब्लिश किया गया' का इस्तेमाल किया जा सकता है.
|
includeLabels |
string
जवाब के labelInfo हिस्से में शामिल करने के लिए, लेबल के आईडी की कॉमा से अलग की गई सूची.
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य भाग में Channel
का उदाहरण है.
जवाब का मुख्य भाग
कामयाब रहने पर, जवाब के मुख्य हिस्से में Channel
का एक इंस्टेंस शामिल किया जाता है.
अनुमति के दायरे
इसके लिए, OAuth के इनमें से किसी एक स्कोप की ज़रूरत होती है:
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.appdata
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/drive.meet.readonly
https://www.googleapis.com/auth/drive.metadata
https://www.googleapis.com/auth/drive.metadata.readonly
https://www.googleapis.com/auth/drive.photos.readonly
https://www.googleapis.com/auth/drive.readonly
कुछ स्कोप पर पाबंदी होती है. साथ ही, इनका इस्तेमाल करने के लिए आपके ऐप्लिकेशन को सुरक्षा से जुड़ी समीक्षा कराने की ज़रूरत होती है. ज़्यादा जानकारी के लिए, अनुमति से जुड़ी गाइड देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को 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: changes.watch\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n\nSubscribes to changes for a user. For more information, see [Notifications for resource changes](https://developers.google.com/workspace/drive/api/guides/push).\n\n### HTTP request\n\n`POST https://www.googleapis.com/drive/v3/changes/watch`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `driveId` | `string` The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier. |\n| `includeCorpusRemovals` | `boolean` Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file. |\n| `includeItemsFromAllDrives` | `boolean` Whether both My Drive and shared drive items should be included in results. |\n| `includeRemoved` | `boolean` Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access. |\n| `includeTeamDriveItems` **(deprecated)** | `boolean` Deprecated: Use `includeItemsFromAllDrives` instead. |\n| `pageSize` | `integer` The maximum number of changes to return per page. |\n| `pageToken` | `string` The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method. |\n| `restrictToMyDrive` | `boolean` Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive. |\n| `spaces` | `string` A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'. |\n| `supportsAllDrives` | `boolean` Whether the requesting application supports both My Drives and shared drives. |\n| `supportsTeamDrives` **(deprecated)** | `boolean` Deprecated: Use `supportsAllDrives` instead. |\n| `teamDriveId` **(deprecated)** | `string` Deprecated: Use `driveId` 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 contains an instance of [Channel](/workspace/drive/api/reference/rest/v3/channels#Channel).\n\n### Response body\n\nIf successful, the response body contains an instance of [Channel](/workspace/drive/api/reference/rest/v3/channels#Channel).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\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.file`\n- `\n https://www.googleapis.com/auth/drive.meet.readonly`\n- `\n https://www.googleapis.com/auth/drive.metadata`\n- `\n https://www.googleapis.com/auth/drive.metadata.readonly`\n- `\n https://www.googleapis.com/auth/drive.photos.readonly`\n- `\n https://www.googleapis.com/auth/drive.readonly`\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)."]]