- 文档专区
- 石墨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
selectionTitle
string
必需
selectionGuid
string
评论所在位置 ID
content
string
评论内容
userIds
array[string]
必需
示例
{
"kind": "comment",
"type": "comment",
"action": "create",
"fileId": "6ee9f8da39498a33",
"userId": "1",
"comment": {
"guid": "Ddg3iIcz1nfqJSo9", // 评论 ID
"selectionTitle": "s2f6cb94", // 评论所在幻灯片页面 ID
"selectionGuid": "comment-rrsIAvomFD3girqU", // 评论所在位置 ID
"content": "测试评论", // 评论内容
"userIds": [] // 幻灯片暂不支持 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": "6ee9f8da39498a33",
"userId": "1",
"comment": {
"guid": "Ddg3iIcz1nfqJSo9", // 评论 ID
"selectionTitle": "s2f6cb94", // 评论所在幻灯片页面 ID
"selectionGuid": "comment-rrsIAvomFD3girqU", // 评论所在位置 ID
"content": "测试评论", // 评论内容
"userIds": [] // 幻灯片暂不支持 at 用户,为空
}
}'
返回响应
🟢200成功
application/json
Body
object {0}
示例
{}
修改于 2024-03-19 08:39:27