- 文档专区
- 石墨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
必需
示例值:
Discussion
Body 参数application/json
kind
string
必需
type
string
必需
action
string
必需
fileId
string
接入方文件 ID
userId
string
接入方用户 ID
discussion
object
必需
id
string
讨论消息 ID
unixus
integer
时间,微秒
content
string
必需
positionId
string
预留字段,目前无用
示例
{
"kind": "discussion",
"type": "discussion", // 预留讨论下的小分类,目前就 discussion
"action": "create",
"fileId": "5b4f80b2aeb9d47d", // 接入方文件 ID
"userId": "user1", // 接入方用户 ID
"discussion": {
"id": "61f0bc916014eb0006c85c6f", // 讨论消息 ID
"unixus": 1643166865906215, // 时间,微秒
"content": "123",
"positionId": "" // 预留字段,目前无用
}
}
示例代码
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: Discussion ' \
--header 'Content-Type: application/json' \
--data-raw '{
"kind": "discussion",
"type": "discussion", // 预留讨论下的小分类,目前就 discussion
"action": "create",
"fileId": "5b4f80b2aeb9d47d", // 接入方文件 ID
"userId": "user1", // 接入方用户 ID
"discussion": {
"id": "61f0bc916014eb0006c85c6f", // 讨论消息 ID
"unixus": 1643166865906215, // 时间,微秒
"content": "123",
"positionId": "" // 预留字段,目前无用
}
}'
返回响应
🟢200成功
application/json
Body
object {0}
示例
{}
修改于 2024-03-19 08:53:46