Method: changes.watch
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
किसी उपयोगकर्ता के लिए बदलावों की सदस्यता लें.
एचटीटीपी अनुरोध
POST https://www.googleapis.com/drive/v2/changes/watch
यूआरएल में gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल किया गया है.
क्वेरी पैरामीटर
पैरामीटर |
driveId |
string
शेयर की गई वह ड्राइव जिससे बदलाव वापस लाए जाएंगे. अगर बदलाव आईडी तय किए गए हैं, तो वे शेयर की गई ड्राइव में दिखेंगे. आइडेंटिफ़ायर के तौर पर, ड्राइव आईडी और बदलाव आईडी को जोड़कर इस्तेमाल करें.
|
includeCorpusRemovals |
boolean
अगर अनुरोध के समय उपयोगकर्ता के पास फ़ाइल का ऐक्सेस है, तो क्या बदलावों में फ़ाइल रिसॉर्स शामिल किया जाना चाहिए. भले ही, फ़ाइल को बदलावों की सूची से हटा दिया गया हो और इस फ़ाइल के लिए बदलाव की कोई और एंट्री न हो.
|
includeDeleted |
boolean
क्या बदलावों की सूची में ऐसे बदलाव शामिल करने हैं जिनसे पता चलता हो कि आइटम को बदलावों की सूची से हटा दिया गया है. उदाहरण के लिए, मिटाने या ऐक्सेस हटाने की वजह से.
|
includeItemsFromAllDrives |
boolean
'मेरी ड्राइव' और शेयर की गई ड्राइव, दोनों के आइटम नतीजों में शामिल करने हैं या नहीं.
|
includeSubscribed |
boolean
नतीजे में, 'मेरी ड्राइव' के लेआउट के बाहर किए गए बदलावों को शामिल करना है या नहीं. इस विकल्प को 'गलत है' पर सेट करने पर, खोज के नतीजों में उन फ़ाइलों में हुए बदलाव नहीं दिखेंगे जो 'ऐप्लिकेशन डेटा' फ़ोल्डर में मौजूद हैं या जिन्हें शेयर किया गया है, लेकिन 'मेरी ड्राइव' में नहीं जोड़ा गया है.
|
includeTeamDriveItems (deprecated) |
boolean
इस्तेमाल नहीं किया जा सकता: इसके बजाय, includeItemsFromAllDrives का इस्तेमाल करें.
|
maxResults |
integer
बदलावों की ज़्यादा से ज़्यादा संख्या.
|
pageToken |
string
अगले पेज पर, सूची के पिछले अनुरोध को जारी रखने के लिए टोकन. इसे पिछले जवाब में मौजूद nextPageToken की वैल्यू पर सेट किया जाना चाहिए या getStartPageToken तरीके से मिले जवाब पर सेट किया जाना चाहिए.
|
spaces |
string
क्वेरी करने के लिए, कॉमा लगाकर अलग की गई स्पेस की सूची. drive , appDataFolder , और photos को वैल्यू के तौर पर इस्तेमाल किया जा सकता है.
|
startChangeId (deprecated) |
string (int64 format)
इस्तेमाल नहीं किया जा सकता: इसके बजाय, pageToken का इस्तेमाल करें.
|
supportsAllDrives |
boolean
अनुरोध करने वाला ऐप्लिकेशन, 'मेरी ड्राइव' और शेयर की गई ड्राइव, दोनों के साथ काम करता है या नहीं.
|
supportsTeamDrives (deprecated) |
boolean
इस्तेमाल नहीं किया जा सकता: इसके बजाय, supportsAllDrives का इस्तेमाल करें.
|
teamDriveId (deprecated) |
string
इस्तेमाल नहीं किया जा सकता: इसके बजाय, driveId का इस्तेमाल करें.
|
includePermissionsForView |
string
इससे यह तय होता है कि जवाब में कौनसे अतिरिक्त व्यू की अनुमतियां शामिल करनी हैं. वैल्यू के तौर पर, सिर्फ़ published को इस्तेमाल किया जा सकता है.
|
includeLabels |
string
जवाब के labelInfo हिस्से में शामिल करने के लिए, लेबल के आईडी की कॉमा से अलग की गई सूची.
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य भाग में Channel
का उदाहरण है.
जवाब का मुख्य भाग
कामयाब रहने पर, जवाब के मुख्य हिस्से में Channel
का एक इंस्टेंस शामिल किया जाता है.
अनुमति के दायरे
इसके लिए, 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
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\nSubscribe to changes for a user.\n\n### HTTP request\n\n`POST https://www.googleapis.com/drive/v2/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| `includeDeleted` | `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| `includeItemsFromAllDrives` | `boolean` Whether both My Drive and shared drive items should be included in results. |\n| `includeSubscribed` | `boolean` Whether to include changes outside the My Drive hierarchy in the result. When set to false, changes to files such as those in the Application Data folder or shared files which have not been added to My Drive will be omitted from the result. |\n| `includeTeamDriveItems` **(deprecated)** | `boolean` Deprecated: Use `includeItemsFromAllDrives` instead. |\n| `maxResults` | `integer` Maximum number of changes to return. |\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| `spaces` | `string` A comma-separated list of spaces to query. Supported values are `drive`, `appDataFolder` and `photos`. |\n| `startChangeId` **(deprecated)** | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Deprecated: Use `pageToken` instead. |\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/v2/channels#Channel).\n\n### Response body\n\nIf successful, the response body contains an instance of [Channel](/workspace/drive/api/reference/rest/v2/channels#Channel).\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- `\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)."]]