{"openapi":"3.0.0","info":{"description":"Google Docs","version":[{"name":"v1","value":"v1"}]},"servers":[{"description":"Google Docs","url":"https://api.apirails.com/googledocs"}],"paths":{"/v1/documents/{documentId}":{"get":{"tags":["Documents"],"parameters":[{"name":"documentId","in":"path","description":"The ID of the document to retrieve.","required":true,"schema":{"type":"string","example":""}},{"name":"includeTabsContent","in":"query","description":"Whether to populate the Document.tabs field instead of the text content fields like body and documentStyle on the returned document.","schema":{"type":"boolean","example":"","items":{"type":"string","enum":[true,false]}}},{"name":"suggestionsViewMode","in":"query","description":"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 is used","schema":{"type":"string","example":"","items":{"type":"string","enum":["DEFAULT_FOR_CURRENT_ACCESS","SUGGESTIONS_INLINE","PREVIEW_SUGGESTIONS_ACCEPTED","PREVIEW_WITHOUT_SUGGESTIONS"]}}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/docs/api/reference/rest/v1/documents/get","api_endpoint":"https://docs.googleapis.com/v1/documents/{documentId}"},"summary":"Fetch Google doc","description":"Fetch Google doc","security":[{"bearerAuth":[]}]}},"/v1/documents":{"post":{"tags":["Documents"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/docs/api/reference/rest/v1/documents/create","api_endpoint":"https://docs.googleapis.com/v1/documents"},"summary":"Create new Google doc","description":"Create new Google doc.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"title":{"type":"string","description":"The title of the document.","required":true}}},"example":{"title":"My Document Title"}}}}}},"/v1/documents/{documentId}/batchUpdate":{"post":{"tags":["Documents"],"parameters":[{"name":"documentId","in":"path","description":"The ID of the document to update.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/docs/api/reference/rest/v1/documents/batchUpdate","api_endpoint":"https://docs.googleapis.com/v1/documents/{documentId}:batchUpdate"},"summary":"Batch update","description":"Batch update","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"requests":{"type":"array","description":"A list of updates to apply to the document.","items":{"type":"object"}},"writeControl":{"type":"object","description":"Provides control over how write requests are executed.","properties":{"requiredRevisionId":{"type":"string","description":"The optional revision ID of the document the write request is applied to. If this is not the latest revision of the document, the request is not processed and returns a 400 bad request error."},"targetRevisionId":{"type":"string","description":"The optional target revision ID of the document the write request is applied to."}}}}},"example":{"requests":[{"insertText":{"text":"","endOfSegmentLocation":{"segmentId":""}}}],"writeControl":{}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"security":[{"bearerAuth":[]}]}