REST API 插入便签文档
更新时间 2025/02/22 07:19:43
英飞画布服务端支持基于 Restful API 往画布中插入便签。
前提条件
Http 请求
- 请求路径
https://api.infi.cn/u3wbs/wbs/websdk/note/add
- 请求参数 Query
字段
类型
描述
appId
string
应用 appId,可以在开发者门户中获取
expire
integer
签名过期时间戳(毫秒)
recordId
string
画布 recordId,即创建画布时返回的 recordId
userId
string
创建者 Id
signature
string
签名,生成方式见链接
- 请求参数示例
appId=test&expire=12345678901234&recordId=12345678901234&userId=AAAAAAAAAA&signature=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
请求的参数连同请求签名需要以 Url Search Params 形式拼接至接口路径之后。
- 请求参数 Body
字段
类型
描述
是否必填
position
object
预置元素的坐标
是
position.x
integer
元素左上角 x 坐标
是
position.y
integer
元素左上角 y 坐标
是
scale
integer
放缩,最小放缩值 0.1
是
frameId
string
帧框 ID
否
color
string
16 进制颜色 0xf5f6f8, 0xfff9b1, 0xd5f692, 0xf5d128, 0xc9df56, 0xff9d48, 0x93d275, 0xf16c7f, 0x67c6c0, 0xea94bb, 0x6cd8fa, 0xffcedf, 0xa6ccf5, 0xbe88c7, 0x7b92ff, 0x7da6ed
是
isPrivate
boolean
是否私有
否
shape
integer
0 正方形 1 长方形
否
showAuthor
boolean
是否显示作者
否
-
请求参数 Body 示例
{
"position": {
"x": 1234,
"y": 1234
},
"scale": 0.5,
"frameId":"",
"color" :"0xea94bb",
"isPrivate": false,
"shape": 0,
"showAuthor": false,
} -
请求返回体
字段
类型
描述
code
integer
0 表示成功,其他表示失败
reqId
string
请求 id
reqTime
integer
请求时间戳
obj
object
解析结果
obj.elementId
string
元素 ID
返回体示例:
{
"code": 0,
"reqId": "12345678901234",
"reqTime": 12345678901234,
"obj": {
"elementId": "aaaabbbbccccdddd"
}
}
- 请求失败情况 响应包体中 code 字段不为 0 时表请求失败,失败信息请查询错误码列表。