Google Comments API

Operations related to Comments

OpenAPI Specification

google-comments-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Google Books About Comments API
  description: API for retrieving Bookshelf and Volume resources from Google Books
  version: 1.0.0
  contact:
    name: Google Books API
    url: https://developers.google.com/books
servers:
- url: https://www.googleapis.com/books/v1
  description: Google Books API v1
tags:
- name: Comments
  description: Operations related to Comments
paths:
  /files/{fileId}/comments:
    get:
      tags:
      - Comments
      summary: Google Get Files Fileid Comments
      description: Lists a file's comments.
      operationId: googleDriveCommentsList
      security:
      - Oauth2:
        - https://www.googleapis.com/auth/drive
        Oauth2c:
        - https://www.googleapis.com/auth/drive
      - Oauth2:
        - https://www.googleapis.com/auth/drive.file
        Oauth2c:
        - https://www.googleapis.com/auth/drive.file
      - Oauth2:
        - https://www.googleapis.com/auth/drive.readonly
        Oauth2c:
        - https://www.googleapis.com/auth/drive.readonly
      parameters:
      - description: The ID of the file.
        in: path
        name: fileId
        required: true
        schema:
          type: string
      - description: Whether to include deleted comments. Deleted comments will not include their original content.
        in: query
        name: includeDeleted
        schema:
          type: boolean
      - description: The maximum number of comments to return per page.
        in: query
        name: pageSize
        schema:
          maximum: 100
          minimum: 1
          type: integer
      - description: 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.
        in: query
        name: pageToken
        schema:
          type: string
      - description: The minimum value of 'modifiedTime' for the result comments (RFC 3339 date-time).
        in: query
        name: startModifiedTime
        schema:
          type: string
      - in: header
        name: Authorization
        schema:
          type: string
      - description: V1 error format.
        in: query
        name: $.xgafv
        schema:
          enum:
          - '1'
          - '2'
          type: string
      - description: OAuth access token.
        in: query
        name: access_token
        schema:
          type: string
      - description: Data format for response.
        in: query
        name: alt
        schema:
          enum:
          - json
          - media
          - proto
          type: string
      - description: JSONP
        in: query
        name: callback
        schema:
          type: string
      - description: Selector specifying which fields to include in a partial response.
        in: query
        name: fields
        schema:
          type: string
      - description: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
        in: query
        name: key
        schema:
          type: string
      - description: OAuth 2.0 token for the current user.
        in: query
        name: oauth_token
        schema:
          type: string
      - description: Returns response with indentations and line breaks.
        in: query
        name: prettyPrint
        schema:
          type: boolean
      - description: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
        in: query
        name: quotaUser
        schema:
          type: string
      - description: Upload protocol for media (e.g. "raw", "multipart").
        in: query
        name: upload_protocol
        schema:
          type: string
      - description: Legacy upload protocol for media (e.g. "media", "multipart").
        in: query
        name: uploadType
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommentList'
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: SuccessExample
    post:
      tags:
      - Comments
      summary: Google Post Files Fileid Comments
      description: Creates a comment on a file.
      operationId: googleDriveCommentsCreate
      security:
      - Oauth2:
        - https://www.googleapis.com/auth/drive
        Oauth2c:
        - https://www.googleapis.com/auth/drive
      - Oauth2:
        - https://www.googleapis.com/auth/drive.file
        Oauth2c:
        - https://www.googleapis.com/auth/drive.file
      parameters:
      - description: The ID of the file.
        in: path
        name: fileId
        required: true
        schema:
          type: string
      - in: header
        name: Authorization
        schema:
          type: string
      - description: V1 error format.
        in: query
        name: $.xgafv
        schema:
          enum:
          - '1'
          - '2'
          type: string
      - description: OAuth access token.
        in: query
        name: access_token
        schema:
          type: string
      - description: Data format for response.
        in: query
        name: alt
        schema:
          enum:
          - json
          - media
          - proto
          type: string
      - description: JSONP
        in: query
        name: callback
        schema:
          type: string
      - description: Selector specifying which fields to include in a partial response.
        in: query
        name: fields
        schema:
          type: string
      - description: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
        in: query
        name: key
        schema:
          type: string
      - description: OAuth 2.0 token for the current user.
        in: query
        name: oauth_token
        schema:
          type: string
      - description: Returns response with indentations and line breaks.
        in: query
        name: prettyPrint
        schema:
          type: boolean
      - description: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
        in: query
        name: quotaUser
        schema:
          type: string
      - description: Upload protocol for media (e.g. "raw", "multipart").
        in: query
        name: upload_protocol
        schema:
          type: string
      - description: Legacy upload protocol for media (e.g. "media", "multipart").
        in: query
        name: uploadType
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Comment'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: SuccessExample
  /files/{fileId}/comments/{commentId}:
    get:
      tags:
      - Comments
      summary: Google Get Files Fileid Comments Commentid
      description: Gets a comment by ID.
      operationId: googleDriveCommentsGet
      security:
      - Oauth2:
        - https://www.googleapis.com/auth/drive
        Oauth2c:
        - https://www.googleapis.com/auth/drive
      - Oauth2:
        - https://www.googleapis.com/auth/drive.file
        Oauth2c:
        - https://www.googleapis.com/auth/drive.file
      - Oauth2:
        - https://www.googleapis.com/auth/drive.readonly
        Oauth2c:
        - https://www.googleapis.com/auth/drive.readonly
      parameters:
      - description: The ID of the file.
        in: path
        name: fileId
        required: true
        schema:
          type: string
      - description: The ID of the comment.
        in: path
        name: commentId
        required: true
        schema:
          type: string
      - description: Whether to return deleted comments. Deleted comments will not include their original content.
        in: query
        name: includeDeleted
        schema:
          type: boolean
      - in: header
        name: Authorization
        schema:
          type: string
      - description: V1 error format.
        in: query
        name: $.xgafv
        schema:
          enum:
          - '1'
          - '2'
          type: string
      - description: OAuth access token.
        in: query
        name: access_token
        schema:
          type: string
      - description: Data format for response.
        in: query
        name: alt
        schema:
          enum:
          - json
          - media
          - proto
          type: string
      - description: JSONP
        in: query
        name: callback
        schema:
          type: string
      - description: Selector specifying which fields to include in a partial response.
        in: query
        name: fields
        schema:
          type: string
      - description: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
        in: query
        name: key
        schema:
          type: string
      - description: OAuth 2.0 token for the current user.
        in: query
        name: oauth_token
        schema:
          type: string
      - description: Returns response with indentations and line breaks.
        in: query
        name: prettyPrint
        schema:
          type: boolean
      - description: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
        in: query
        name: quotaUser
        schema:
          type: string
      - description: Upload protocol for media (e.g. "raw", "multipart").
        in: query
        name: upload_protocol
        schema:
          type: string
      - description: Legacy upload protocol for media (e.g. "media", "multipart").
        in: query
        name: uploadType
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: SuccessExample
    patch:
      tags:
      - Comments
      summary: Google Patch Files Fileid Comments Commentid
      description: Updates a comment with patch semantics.
      operationId: googleDriveCommentsUpdate
      security:
      - Oauth2:
        - https://www.googleapis.com/auth/drive
        Oauth2c:
        - https://www.googleapis.com/auth/drive
      - Oauth2:
        - https://www.googleapis.com/auth/drive.file
        Oauth2c:
        - https://www.googleapis.com/auth/drive.file
      parameters:
      - description: The ID of the file.
        in: path
        name: fileId
        required: true
        schema:
          type: string
      - description: The ID of the comment.
        in: path
        name: commentId
        required: true
        schema:
          type: string
      - in: header
        name: Authorization
        schema:
          type: string
      - description: V1 error format.
        in: query
        name: $.xgafv
        schema:
          enum:
          - '1'
          - '2'
          type: string
      - description: OAuth access token.
        in: query
        name: access_token
        schema:
          type: string
      - description: Data format for response.
        in: query
        name: alt
        schema:
          enum:
          - json
          - media
          - proto
          type: string
      - description: JSONP
        in: query
        name: callback
        schema:
          type: string
      - description: Selector specifying which fields to include in a partial response.
        in: query
        name: fields
        schema:
          type: string
      - description: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
        in: query
        name: key
        schema:
          type: string
      - description: OAuth 2.0 token for the current user.
        in: query
        name: oauth_token
        schema:
          type: string
      - description: Returns response with indentations and line breaks.
        in: query
        name: prettyPrint
        schema:
          type: boolean
      - description: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
        in: query
        name: quotaUser
        schema:
          type: string
      - description: Upload protocol for media (e.g. "raw", "multipart").
        in: query
        name: upload_protocol
        schema:
          type: string
      - description: Legacy upload protocol for media (e.g. "media", "multipart").
        in: query
        name: uploadType
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Comment'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: SuccessExample
    delete:
      tags:
      - Comments
      summary: Google Delete Files Fileid Comments Commentid
      description: Deletes a comment.
      operationId: googleDriveCommentsDelete
      security:
      - Oauth2:
        - https://www.googleapis.com/auth/drive
        Oauth2c:
        - https://www.googleapis.com/auth/drive
      - Oauth2:
        - https://www.googleapis.com/auth/drive.file
        Oauth2c:
        - https://www.googleapis.com/auth/drive.file
      parameters:
      - description: The ID of the file.
        in: path
        name: fileId
        required: true
        schema:
          type: string
      - description: The ID of the comment.
        in: path
        name: commentId
        required: true
        schema:
          type: string
      - in: header
        name: Authorization
        schema:
          type: string
      - description: V1 error format.
        in: query
        name: $.xgafv
        schema:
          enum:
          - '1'
          - '2'
          type: string
      - description: OAuth access token.
        in: query
        name: access_token
        schema:
          type: string
      - description: Data format for response.
        in: query
        name: alt
        schema:
          enum:
          - json
          - media
          - proto
          type: string
      - description: JSONP
        in: query
        name: callback
        schema:
          type: string
      - description: Selector specifying which fields to include in a partial response.
        in: query
        name: fields
        schema:
          type: string
      - description: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
        in: query
        name: key
        schema:
          type: string
      - description: OAuth 2.0 token for the current user.
        in: query
        name: oauth_token
        schema:
          type: string
      - description: Returns response with indentations and line breaks.
        in: query
        name: prettyPrint
        schema:
          type: boolean
      - description: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
        in: query
        name: quotaUser
        schema:
          type: string
      - description: Upload protocol for media (e.g. "raw", "multipart").
        in: query
        name: upload_protocol
        schema:
          type: string
      - description: Legacy upload protocol for media (e.g. "media", "multipart").
        in: query
        name: uploadType
        schema:
          type: string
      responses:
        '200':
          description: Successful response
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: SuccessExample
components:
  schemas:
    User:
      description: Information about a Drive user.
      properties:
        displayName:
          description: Output only. A plain text displayable name for this user.
          type: string
        emailAddress:
          description: Output only. The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
          type: string
        kind:
          default: drive#user
          description: 'Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#user"`.'
          type: string
        me:
          description: Output only. Whether this user is the requesting user.
          type: boolean
        permissionId:
          description: Output only. The user's ID as visible in Permission resources.
          type: string
        photoLink:
          description: Output only. A link to the user's profile photo, if available.
          type: string
      type: object
    Reply:
      description: A reply to a comment on a file. Some resource methods (such as `replies.update`) require a `replyId`. Use the `replies.list` method to retrieve the ID for a reply.
      properties:
        action:
          description: 'The action the reply performed to the parent comment. Valid values are: * `resolve` * `reopen`'
          type: string
        author:
          $ref: '#/components/schemas/User'
          description: Output only. The author of the reply. The author's email address and permission ID will not be populated.
        content:
          description: The plain text content of the reply. This field is used for setting the content, while `htmlContent` should be displayed. This is required on creates if no `action` is specified.
          type: string
        createdTime:
          description: The time at which the reply was created (RFC 3339 date-time).
          format: date-time
          type: string
        deleted:
          description: Output only. Whether the reply has been deleted. A deleted reply has no content.
          type: boolean
        htmlContent:
          description: Output only. The content of the reply with HTML formatting.
          type: string
        id:
          description: Output only. The ID of the reply.
          type: string
        kind:
          default: drive#reply
          description: 'Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#reply"`.'
          type: string
        modifiedTime:
          description: The last time the reply was modified (RFC 3339 date-time).
          format: date-time
          type: string
      type: object
    CommentList:
      description: A list of comments on a file.
      properties:
        comments:
          description: The list of comments. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
          items:
            $ref: '#/components/schemas/Comment'
          type: array
        kind:
          default: drive#commentList
          description: 'Identifies what kind of resource this is. Value: the fixed string `"drive#commentList"`.'
          type: string
        nextPageToken:
          description: The page token for the next page of comments. This will be absent if the end of the comments list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. The page token is typically valid for several hours. However, if new items are added or removed, your expected results might differ.
          type: string
      type: object
    Comment:
      description: A comment on a file. Some resource methods (such as `comments.update`) require a `commentId`. Use the `comments.list` method to retrieve the ID for a comment in a file.
      properties:
        anchor:
          description: A region of the document represented as a JSON string. For details on defining anchor properties, refer to [Manage comments and replies](https://developers.google.com/drive/api/v3/manage-comments).
          type: string
        author:
          $ref: '#/components/schemas/User'
          description: Output only. The author of the comment. The author's email address and permission ID will not be populated.
        content:
          description: The plain text content of the comment. This field is used for setting the content, while `htmlContent` should be displayed.
          type: string
        createdTime:
          description: The time at which the comment was created (RFC 3339 date-time).
          format: date-time
          type: string
        deleted:
          description: Output only. Whether the comment has been deleted. A deleted comment has no content.
          type: boolean
        htmlContent:
          description: Output only. The content of the comment with HTML formatting.
          type: string
        id:
          description: Output only. The ID of the comment.
          type: string
        kind:
          default: drive#comment
          description: 'Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#comment"`.'
          type: string
        modifiedTime:
          description: The last time the comment or any of its replies was modified (RFC 3339 date-time).
          format: date-time
          type: string
        quotedFileContent:
          description: The file content to which the comment refers, typically within the anchor region. For a text file, for example, this would be the text at the location of the comment.
          properties:
            mimeType:
              description: The MIME type of the quoted content.
              type: string
            value:
              description: The quoted content itself. This is interpreted as plain text if set through the API.
              type: string
          type: object
        replies:
          description: Output only. The full list of replies to the comment in chronological order.
          items:
            $ref: '#/components/schemas/Reply'
          type: array
        resolved:
          description: Output only. Whether the comment has been resolved by one of its replies.
          type: boolean
      type: object
  securitySchemes:
    OAuth2:
      type: oauth2
      description: OAuth 2.0 authentication for Google Books API
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/v2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/books: Manage your Google Books library