Comments

For a list of methods for this resource, see the end of this page.

Resource representations

A comment on a file.

{
  "kind": "drive#comment",
  "id": string,
  "createdTime": datetime,
  "modifiedTime": datetime,
  "author": {
    "kind": "drive#user",
    "displayName": string,
    "photoLink": string,
    "me": boolean,
    "permissionId": string,
    "emailAddress": string
  },
  "htmlContent": string,
  "content": string,
  "deleted": boolean,
  "resolved": boolean,
  "quotedFileContent": {
    "mimeType": string,
    "value": string
  },
  "anchor": string,
  "replies": [
    replies Resource
  ]
}
Property name Value Description Notes
kind string Identifies what kind of resource this is. Value: the fixed string "drive#comment".
id string The ID of the comment.
createdTime datetime The time at which the comment was created (RFC 3339 date-time).
modifiedTime datetime The last time the comment or any of its replies was modified (RFC 3339 date-time).
author nested object The user who created the comment.
author.kind string Identifies what kind of resource this is. Value: the fixed string "drive#user".
author.displayName string A plain text displayable name for this user.
author.me boolean Whether this user is the requesting user.
author.permissionId string The user's ID as visible in Permission resources.
author.emailAddress string 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.
htmlContent string The content of the comment with HTML formatting.
content string The plain text content of the comment. This field is used for setting the content, while htmlContent should be displayed. writable
deleted boolean Whether the comment has been deleted. A deleted comment has no content.
resolved boolean Whether the comment has been resolved by one of its replies.
quotedFileContent object 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.
quotedFileContent.mimeType string The MIME type of the quoted content.
quotedFileContent.value string The quoted content itself. This is interpreted as plain text if set through the API. writable
anchor string A region of the document represented as a JSON string. See anchor documentation for details on how to define and interpret anchor properties. writable
replies[] list The full list of replies to the comment in chronological order.

Methods

create
Creates a new comment on a file.
delete
Deletes a comment.
get
Gets a comment by ID.
list
Lists a file's comments.
update
Updates a comment with patch semantics.

Send feedback about...

Drive REST API
Drive REST API
Need help? Visit our support page.