@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Google Docs API
@base https://docs.googleapis.com/
@version v1
@auth OAuth2 | OAuth2
@endpoints 3
@toc documents(3)

@endpoint POST /v1/documents
@optional {body: map{content: [map]}, documentId: str, documentStyle: map{background: map, defaultFooterId: str, defaultHeaderId: str, evenPageFooterId: str, evenPageHeaderId: str, firstPageFooterId: str, firstPageHeaderId: str, marginBottom: map, marginFooter: map, marginHeader: map, marginLeft: map, marginRight: map, marginTop: map, pageNumberStart: int(int32), pageSize: map, useCustomHeaderFooterMargins: bool, useEvenPageHeaderFooter: bool, useFirstPageHeaderFooter: bool}, footers: map, footnotes: map, headers: map, inlineObjects: map, lists: map, namedRanges: map, namedStyles: map{styles: [map]}, positionedObjects: map, revisionId: str, suggestedDocumentStyleChanges: map, suggestedNamedStylesChanges: map, suggestionsViewMode: str(DEFAULT_FOR_CURRENT_ACCESS/SUGGESTIONS_INLINE/PREVIEW_SUGGESTIONS_ACCEPTED/PREVIEW_WITHOUT_SUGGESTIONS), title: str}
@returns(200) {body: map{content: [map]}, documentId: str, documentStyle: map{background: map{color: map{color: map}}, defaultFooterId: str, defaultHeaderId: str, evenPageFooterId: str, evenPageHeaderId: str, firstPageFooterId: str, firstPageHeaderId: str, marginBottom: map{magnitude: num(double), unit: str}, marginFooter: map{magnitude: num(double), unit: str}, marginHeader: map{magnitude: num(double), unit: str}, marginLeft: map{magnitude: num(double), unit: str}, marginRight: map{magnitude: num(double), unit: str}, marginTop: map{magnitude: num(double), unit: str}, pageNumberStart: int(int32), pageSize: map{height: map{magnitude: num(double), unit: str}, width: map{magnitude: num(double), unit: str}}, useCustomHeaderFooterMargins: bool, useEvenPageHeaderFooter: bool, useFirstPageHeaderFooter: bool}, footers: map, footnotes: map, headers: map, inlineObjects: map, lists: map, namedRanges: map, namedStyles: map{styles: [map]}, positionedObjects: map, revisionId: str, suggestedDocumentStyleChanges: map, suggestedNamedStylesChanges: map, suggestionsViewMode: str, title: str}

@endpoint GET /v1/documents/{documentId}
@required {documentId: str}
@optional {suggestionsViewMode: str(DEFAULT_FOR_CURRENT_ACCESS/SUGGESTIONS_INLINE/PREVIEW_SUGGESTIONS_ACCEPTED/PREVIEW_WITHOUT_SUGGESTIONS)}
@returns(200) {body: map{content: [map]}, documentId: str, documentStyle: map{background: map{color: map{color: map}}, defaultFooterId: str, defaultHeaderId: str, evenPageFooterId: str, evenPageHeaderId: str, firstPageFooterId: str, firstPageHeaderId: str, marginBottom: map{magnitude: num(double), unit: str}, marginFooter: map{magnitude: num(double), unit: str}, marginHeader: map{magnitude: num(double), unit: str}, marginLeft: map{magnitude: num(double), unit: str}, marginRight: map{magnitude: num(double), unit: str}, marginTop: map{magnitude: num(double), unit: str}, pageNumberStart: int(int32), pageSize: map{height: map{magnitude: num(double), unit: str}, width: map{magnitude: num(double), unit: str}}, useCustomHeaderFooterMargins: bool, useEvenPageHeaderFooter: bool, useFirstPageHeaderFooter: bool}, footers: map, footnotes: map, headers: map, inlineObjects: map, lists: map, namedRanges: map, namedStyles: map{styles: [map]}, positionedObjects: map, revisionId: str, suggestedDocumentStyleChanges: map, suggestedNamedStylesChanges: map, suggestionsViewMode: str, title: str}

@endpoint POST /v1/documents/{documentId}:batchUpdate
@required {documentId: str}
@optional {requests: [map{createFooter: map, createFootnote: map, createHeader: map, createNamedRange: map, createParagraphBullets: map, deleteContentRange: map, deleteFooter: map, deleteHeader: map, deleteNamedRange: map, deleteParagraphBullets: map, deletePositionedObject: map, deleteTableColumn: map, deleteTableRow: map, insertInlineImage: map, insertPageBreak: map, insertSectionBreak: map, insertTable: map, insertTableColumn: map, insertTableRow: map, insertText: map, mergeTableCells: map, pinTableHeaderRows: map, replaceAllText: map, replaceImage: map, replaceNamedRangeContent: map, unmergeTableCells: map, updateDocumentStyle: map, updateParagraphStyle: map, updateSectionStyle: map, updateTableCellStyle: map, updateTableColumnProperties: map, updateTableRowStyle: map, updateTextStyle: map}], writeControl: map{requiredRevisionId: str, targetRevisionId: str}}
@returns(200) {documentId: str, replies: [map], writeControl: map{requiredRevisionId: str, targetRevisionId: str}}

@end
