Method: documents.get
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
दिए गए दस्तावेज़ का नया वर्शन पाता है.
एचटीटीपी अनुरोध
GET https://docs.googleapis.com/v1/documents/{documentId}
यूआरएल में gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल किया गया है.
पाथ पैरामीटर
पैरामीटर |
documentId |
string
जिस दस्तावेज़ को वापस लाना है उसका आईडी.
|
क्वेरी पैरामीटर
पैरामीटर |
suggestionsViewMode |
enum (SuggestionsViewMode )
दस्तावेज़ पर लागू करने के लिए, सुझावों का व्यू मोड. इससे, दस्तावेज़ में इनलाइन सभी सुझावों को देखा जा सकता है. इनमें, स्वीकार किए गए या अस्वीकार किए गए सुझाव भी शामिल हैं. अगर कोई वैल्यू नहीं दी गई है, तो DEFAULT_FOR_CURRENT_ACCESS का इस्तेमाल किया जाता है.
|
includeTabsContent |
boolean
Document पर, body और documentStyle जैसे टेक्स्ट कॉन्टेंट फ़ील्ड के बजाय, Document.tabs फ़ील्ड को पॉप्युलेट करना है या नहीं.
जब True : दस्तावेज़ का कॉन्टेंट, Document में मौजूद टेक्स्ट कॉन्टेंट फ़ील्ड के बजाय Document.tabs फ़ील्ड में दिखता है.
जब False : दस्तावेज़ के पहले टैब का कॉन्टेंट, Document में कॉन्टेंट फ़ील्ड को पॉप्युलेट करता है. इसमें Document.tabs शामिल नहीं होता. अगर किसी दस्तावेज़ में सिर्फ़ एक टैब है, तो उस टैब का इस्तेमाल दस्तावेज़ के कॉन्टेंट को पॉप्युलेट करने के लिए किया जाता है. Document.tabs खाली हो जाएगा.
|
अनुरोध का मुख्य भाग
अनुरोध का मुख्य हिस्सा खाली होना चाहिए.
जवाब का मुख्य हिस्सा
कामयाब रहने पर, जवाब के मुख्य हिस्से में Document
का एक इंस्टेंस शामिल किया जाता है.
अनुमति के दायरे
इसके लिए, OAuth के इनमें से किसी एक स्कोप की ज़रूरत होती है:
https://www.googleapis.com/auth/documents
https://www.googleapis.com/auth/documents.readonly
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.readonly
https://www.googleapis.com/auth/drive.file
ज़्यादा जानकारी के लिए, अनुमति से जुड़ी गाइड देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-03-22 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-03-22 (UTC) को अपडेट किया गया."],[],[],null,["# Method: documents.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\nGets the latest version of the specified document.\n\n### HTTP request\n\n`GET https://docs.googleapis.com/v1/documents/{documentId}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------------|----------------------------------------------|\n| `documentId` | `string` The ID of the document to retrieve. |\n\n### Query parameters\n\n| Parameters ||\n|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `suggestionsViewMode` | `enum (`[SuggestionsViewMode](/workspace/docs/api/reference/rest/v1/documents#SuggestionsViewMode)`)` The suggestions view mode to apply to the document. This allows viewing the document with all suggestions inline, accepted or rejected. If one is not specified, [DEFAULT_FOR_CURRENT_ACCESS](/workspace/docs/api/reference/rest/v1/documents#SuggestionsViewMode) is used. |\n| `includeTabsContent` | `boolean` Whether to populate the [Document.tabs](/workspace/docs/api/reference/rest/v1/documents#Document.FIELDS.tabs) field instead of the text content fields like `body` and `documentStyle` on [Document](/workspace/docs/api/reference/rest/v1/documents#Document). - When `True`: Document content populates in the [Document.tabs](/workspace/docs/api/reference/rest/v1/documents#Document.FIELDS.tabs) field instead of the text content fields in [Document](/workspace/docs/api/reference/rest/v1/documents#Document). - When `False`: The content of the document's first tab populates the content fields in [Document](/workspace/docs/api/reference/rest/v1/documents#Document) excluding [Document.tabs](/workspace/docs/api/reference/rest/v1/documents#Document.FIELDS.tabs). If a document has only one tab, then that tab is used to populate the document content. [Document.tabs](/workspace/docs/api/reference/rest/v1/documents#Document.FIELDS.tabs) will be empty. |\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 [Document](/workspace/docs/api/reference/rest/v1/documents#Document).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/documents`\n- `https://www.googleapis.com/auth/documents.readonly`\n- `https://www.googleapis.com/auth/drive`\n- `https://www.googleapis.com/auth/drive.readonly`\n- `https://www.googleapis.com/auth/drive.file`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]