REST Resource: comments
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# REST Resource: comments\n\n- [Resource: Comment](#Comment)\n - [JSON representation](#Comment.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: Comment\n-----------------\n\nA comment on a file.\n\nSome resource methods (such as `comments.update`) require a `commentId`. Use the `comments.list` method to retrieve the ID for a comment in a file.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"replies\": [ { object (/workspace/drive/api/reference/rest/v3/replies#Reply) } ], \"id\": string, \"kind\": string, \"createdTime\": string, \"modifiedTime\": string, \"resolved\": boolean, \"anchor\": string, \"author\": { object (/workspace/drive/api/reference/rest/v3/User) }, \"deleted\": boolean, \"htmlContent\": string, \"content\": string, \"quotedFileContent\": { \"mimeType\": string, \"value\": string } } ``` |\n\n| Fields ||\n|------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `replies[]` | `object (`[Reply](/workspace/drive/api/reference/rest/v3/replies#Reply)`)` Output only. The full list of replies to the comment in chronological order. |\n| `id` | `string` Output only. The ID of the comment. |\n| `kind` | `string` Output only. Identifies what kind of resource this is. Value: the fixed string `\"drive#comment\"`. |\n| `createdTime` | `string` Output only. The time at which the comment was created (RFC 3339 date-time). |\n| `modifiedTime` | `string` Output only. The last time the comment or any of its replies was modified (RFC 3339 date-time). |\n| `resolved` | `boolean` Output only. Whether the comment has been resolved by one of its replies. |\n| `anchor` | `string` 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/workspace/drive/api/v3/manage-comments). |\n| `author` | `object (`[User](/workspace/drive/api/reference/rest/v3/User)`)` Output only. The author of the comment. The author's email address and permission ID will not be populated. |\n| `deleted` | `boolean` Output only. Whether the comment has been deleted. A deleted comment has no content. |\n| `htmlContent` | `string` Output only. The content of the comment with HTML formatting. |\n| `content` | `string` The plain text content of the comment. This field is used for setting the content, while `htmlContent` should be displayed. |\n| `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. |\n| `quotedFileContent.mimeType` | `string` The MIME type of the quoted content. |\n| `quotedFileContent.value` | `string` The quoted content itself. This is interpreted as plain text if set through the API. |\n\n| Methods ------- ||\n|----------------------------------------------------------------------|-----------------------------------------|\n| ### [create](/workspace/drive/api/reference/rest/v3/comments/create) | Creates a comment on a file. |\n| ### [delete](/workspace/drive/api/reference/rest/v3/comments/delete) | Deletes a comment. |\n| ### [get](/workspace/drive/api/reference/rest/v3/comments/get) | Gets a comment by ID. |\n| ### [list](/workspace/drive/api/reference/rest/v3/comments/list) | Lists a file's comments. |\n| ### [update](/workspace/drive/api/reference/rest/v3/comments/update) | Updates a comment with patch semantics. |"]]