Creates a comment.
POST
https://drive.cloud.hicloud.com/drive/v1/files/{fileId}/comments
*Some parameters are mandatory.
| parameter | type | description | |
| fileId | string | path | File ID. (Mandatory) |
| fields | string | query | Fields in the request, which are in the partial response format. |
| form | string | query | Media format. |
| prettyPrint | boolean | query | Indicates whether to return a response in a human-readable format. |
| quotaId | string | query | User identifier, consisting of 40 characters at maximum. It is used to restrict the number of API calls of an individual user. |
| callback | string | query | Callback function used in JSONP requests. |
| x-hw-trace-id | string | header | ID used for service tracing. |
| x-hw-app-id | string | header | App ID. |
| version | string | header | SDK version number. |
| x-hw-terminal | string | header | Device model. |
| x-hw-os | string | header | Device operating system. |
| unionID | string | header | Open user ID. |
| User-Agent | string | header | App version number or ID. |
In the request body, provide data with the following structure:
| id | string | 一个唯一ID,标识这个订阅通道。 |
| description | string | Content of the comment.(Mandatory) |
| quotedContent.mimiType | string | Type of the quoted content. |
| quotedContent.content | string | Quoted content. |
| position | string | Position of the comment content, in JSON format. The JSON string is verified based on the Anchor definition. |
If successful, this method returns a response body with the following structure:
- {
- "category": "drive#comment",
- "id": "string",
- "createdTime": "2020-02-19T14:44:40.660Z",
- "editedTime": "2020-02-19T14:44:40.661Z",
- "creator": {
- "category": "drive#user",
- "displayName": "string",
- "profilePhotoLink": "string",
- "me": true,
- "permissionId": "string",
- "userAccount": "string"
- },
- "description": "string",
- "htmlDescription": "string",
- "deleted": true,
- "resolved": true,
- "quotedContent": {
- "mimeType": "string",
- "content": "string"
- },
- "position": "string",
- "replies": [
- {
- "category": "drive#reply",
- "id": "string",
- "createdTime": "2020-02-19T14:44:40.661Z",
- "editedTime": "2020-02-19T14:44:40.661Z",
- "creator": {
- "category": "drive#user",
- "displayName": "string",
- "profilePhotoLink": "string",
- "me": true,
- "permissionId": "string",
- "userAccount": "string"
- },
- "htmlDescription": "string",
- "description": "string",
- "deleted": true,
- "operate": "string"
- }
- ]
- }
| category | string | 资源类型,固定为api#channel。 |
| category | string | Resource type. The value is always drive#comment. |
| id | string | Comment ID. |
| createdTime | string | Time when the comment was created. |
| editedTime | string | Last time when the comment was modified. |
| creator.category | string | Creator type. The value is alwaysdrive#user. |
| creator.displayName | string | Displayed name for this user. |
| creator.profilepPhotoLink | string | Link to the user's profile picture, which is not returned by default. |
| creator.me | boolean | Indicates whether this user is the requesting user. |
| creator.permissionId | string | Permission ID. |
| creator.userAccount | string | Account of the user, which is not returned by default. |
| description | string | Content of the comment in plain text format. |
| htmlDescription | string | Content of the comment in HTML format. |
| deleted | boolean | Indicates whether the comment has been deleted. |
| resolved | boolean | Indicates whether the comment has been resolved. |
| quotedContent.mimeType | string | Type of the quoted content. |
| quotedContent.content | string | Quoted content. |
| position | string | Position of the comment content. |
| replies[] | list | List of replies to the comment. |
| replies.category | string | Reply type. The value is always drive#reply. |
| replies.id | string | Reply ID. |
| replies.createdTime | string | Time when the reply was created. |
| replies.editedTime | string | Last time when the reply was modified. |
| replies.creator.category | string | Reply creator type. The value is always drive#user. |
| replies.creator.displayName | string | Displayed name for this user. |
| replies.creator.profilePhotoLink | string | Link to the user's profile picture, which is not returned by default. |
| replies.creator.me | boolean | Indicates whether this user is the requesting user. |
| replies.creator.permissionId | string | Permission ID. |
| replies.creator.userAccount | string | Account of the user, which is not returned by default. |
| replies.htmlDescription | string | Reply content in HTML format. |
| replies.description | string | Reply content. |
| replies.deleted | boolean | Indicates whether the reply has been deleted. |
| replies.operate | string | Operation to be performed for the comment. |