目录

List comments.

Request

HTTP Request

GET
https://drive.cloud.hicloud.com/drive/v1/files/{fileId}/comments

Parameters

*Some parameters are mandatory.

parametertype
description
fileIdstringpathFile ID. (Mandatory)
pageSizestringqueryThe maximum number of comments to return per page. The default value is 100, which is also the acceptable maximum value. Note: It is possible that partial or empty result pages are returned before the end of the comment list has been reached.
cursor
stringqueryCursor for the current page. It should be set to the value of nextCursor from the previous response.
startEditedTimestringqueryTime starting from which comments will be listed.
fieldsstringqueryFields in the request, which are in the partial response format.
includeDeletedstringqueryIndicates whether to return deleted comments.
formstringqueryMedia format.
prettyPrintbooleanqueryIndicates whether to return a response in a human-readable format.
quotaIdstringqueryUser identifier, consisting of 40 characters at maximum. It is used to restrict the number of API calls of an individual user.
callbackstringqueryCallback function used in JSONP requests.
x-hw-trace-idstringheaderID used for service tracing. 
x-hw-app-idstringheaderApp ID. 
versionstringheaderSDK version number.
x-hw-terminalstringheaderDevice model. 
x-hw-osstringheaderDevice operating system.
unionIDstringheaderOpen user ID.
User-AgentstringheaderApp version number or ID. 

Request Body

Leave the request body empty.

Response

If successful, this method returns a response body with the following structure:

  1. {
  2.            "category": "drive#commentList",
  3.            "nextCursor": "string",
  4.            "comments": [
  5.            {
  6.                "category": "drive#comment",
  7.                "id": "string",
  8.                "createdTime": "2020-02-19T14:44:40.660Z",
  9.                "editedTime": "2020-02-19T14:44:40.661Z",
  10.                "creator": {
  11.                    "category": "drive#user",
  12.                    "displayName": "string",
  13.                    "profilePhotoLink": "string",
  14.                    "me": true,
  15.                    "permissionId": "string",
  16.                    "userAccount": "string"
  17.                },
  18.                "description": "string",
  19.                "htmlDescription": "string",
  20.                "deleted": true,
  21.                "resolved": true,
  22.                "quotedContent": {
  23.                    "mimeType": "string",
  24.                    "content": "string"
  25.                },
  26.                "position": "string",
  27.                "replies": [
  28.                {
  29.                    "category": "drive#reply",
  30.                    "id": "string",
  31.                    "createdTime": "2020-02-19T14:44:40.661Z",
  32.                    "editedTime": "2020-02-19T14:44:40.661Z",
  33.                    "creator": {
  34.                        "category": "drive#user",
  35.                        "displayName": "string",
  36.                        "profilePhotoLink": "string",
  37.                        "me": true,
  38.                        "permissionId": "string",
  39.                        "userAccount": "string"
  40.                    },
  41.                    "htmlDescription": "string",
  42.                    "description": "string",
  43.                    "deleted": true,
  44.                    "operate": "string"
  45.                }
  46.                ]
  47.            }
  48.            ]
  49. }
Parameter NamestringDescription
categorystringResource type. The value is always drive#commentList.
nextCursorstringCursor for the next page. It will be absent if the end of the comment list has been reached.
comments[]listThe list of comments.
comments.categorystringResource type. The value is always drive#comment.
comments.idstringComment ID.
comments.createdTimestringTime when the comment was created.
comments.editedTimestringLast time when the comment was modified.
comments.creator.categorystringCreator type. The value is alwaysdrive#user.
comments.creator.displayName
stringDisplayed name for this user.
comments.creator.profilepPhotoLinkstringLink to the user's profile picture, which is not returned by default.
comments.creator.mebooleanIndicates whether this user is the requesting user.
comments.creator.permissionIdstringPermission ID.
comments.creator.userAccountstringAccount of the user, which is not returned by default.
comments.descriptionstringContent of the comment in plain text format.
comments.htmlDescriptionstringContent of the comment in HTML format.
comments.deletedbooleanIndicates whether the comment has been deleted.
comments.resolvedbooleanIndicates whether the comment has been resolved.
comments.quotedContent.mimeTypestringType of the quoted content.
comments.quotedContent.contentstringQuoted content.
comments.positionstringPosition of the comment content.
comments.replies[]listList of replies to the comment.
comments.replies.categorystringReply type. The value is always drive#reply.
comments.replies.id
stringReply ID.
comments.replies.createdTimestringTime when the reply was created.
comments.replies.editedTimestringLast time when the reply was modified.
comments.replies.creator.categorystringReply creator type. The value is always drive#user.
comments.replies.creator.displayNamestringDisplayed name for this user.
comments.replies.creator.profilePhotoLinkstringLink to the user's profile picture, which is not returned by default.
comments.replies.creator.mebooleanIndicates whether this user is the requesting user.
comments.replies.creator.permissionIdstringPermission ID.
comments.replies.creator.userAccountstringAccount of the user, which is not returned by default.
comments.replies.htmlDescriptionstringReply content in HTML format.
comments.replies.description
stringReply content.
comments.replies.deletedbooleanIndicates whether the reply has been deleted.
comments.replies.operatestringOperation to be performed for the comment.