- 文档专区
- 石墨API 接口
- 接入方实现接口(回调接口)
- 文件信息
- 用户信息
- 团队和部门
- 搜索功能
- 消息推送
- 评论
- 讨论(Discussion)
- 提及(MentionAt @ 人)
- 日期提醒 (DateMention)
- 文件内容更新 (FileContent)
- 文档协作者协同状态变化 (Collaborator)
- 版本 (Revision)
- 系统事件 (System)
- (实验性) 回调请求错误
- 评论
更新评论
开发中
POST
{endpoint_url}/events
请求参数
Path 参数
endpoint_url
string
必需
示例值:
{{endpoint_url}}
Header 参数
X-Shimo-Token
string
必需
X-Shimo-Sdk-Event
string
必需
示例值:
Comment
Body 参数application/json
kind
string
必需
type
string
必需
action
string
必需
fileId
string
必需
userId
string
必需
comment
object
必需
guid
string
评论 ID
selectionGuid
string
划词高亮区域 ID
content
string
更新的评论内容
userIds
array[string]
必需
示例
{
"kind": "comment",
"type": "comment",
"action": "create",
"fileId": "691f6abc72f769a4",
"userId": "1",
"comment": {
"guid": "ZwOJjlTDHcPda0V4", // 评论 ID
"selectionGuid": "comment-Y29tbWVudD05Ng==", // 划词高亮区域 ID
"content": "3123123", // 评论内容
"userIds": ["user1"] // 评论中 at 的用户,若无则为空
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request POST '/events' \
--header 'X-Shimo-Token;' \
--header 'X-Shimo-Sdk-Event: Comment' \
--header 'Content-Type: application/json' \
--data-raw '{
"kind": "comment",
"type": "comment",
"action": "create",
"fileId": "691f6abc72f769a4",
"userId": "1",
"comment": {
"guid": "ZwOJjlTDHcPda0V4", // 评论 ID
"selectionGuid": "comment-Y29tbWVudD05Ng==", // 划词高亮区域 ID
"content": "3123123", // 评论内容
"userIds": ["user1"] // 评论中 at 的用户,若无则为空
}
}'
返回响应
🟢200成功
application/json
Body
object {0}
示例
{}
修改于 2024-03-19 08:39:27