更新文档块
标签:智能文档
适用版本>=v7.0.2603.20260326
请求说明
| 请求地址 | 配置域名+/openapi+/v7/airpage/{file_id}/blocks/update |
|---|---|
| 请求方法 | POST |
| 签名方式 | KSO-1(配置域名+/openapi不参与签名) |
| 权限要求 | 管理智能文档(应用授权) kso.airpage.readwrite 管理智能文档(用户授权) kso.airpage.readwrite |
路径参数 (Path)
| 属性名 | 类型 | 是否必填 | 描述 | 可选值 |
|---|---|---|---|---|
file_id | string | 是 | 文件 id | - |
请求体(Body)
请求体格式: application/json
没有可用的数据
请求体示例
json
{
"arg": "string"
}更新文档块参数结构体
没有可用的数据
示例
注意:该接口单次调用仅接受一个operation对象
json
{
"operation": "update_content",
"blockId": "xxx",
"content": [
{
"type": "text",
"content": "123"
}
]
}
{
"operation": "update_attrs",
"blockId": "xxx",
"attrs": {}
}
{
"operation": "insert_table_rows",
"blockId": "xxx",
"start": 0,
"content": [
{
"type": "tableRow",
"content": [
{
"type": "tableCell",
"content": [
{
"type": "paragraph"
}
]
}
]
}
]
}
{
"operation": "insert_table_columns",
"blockId": "xxx",
"start": 0,
"content": [
{
"type": "tableRow",
"content": [
{
"type": "tableCell",
"content": [
{
"type": "paragraph"
}
]
}
]
}
]
}
{
"operation": "delete_table_rows",
"blockId": "xxx",
"start": 0,
"count": 1
}
{
"operation": "delete_table_columns",
"blockId": "xxx",
"start": 0,
"count": 1
}
{
"operation": "merge_table_cells",
"blockId": "xxx",
"startRow": 0,
"startCol": 0,
"rowSpan": 2,
"colSpan": 3
}
{
"operation": "split_table_cell",
"blockId": "xxx",
"startRow": 0,
"startCol": 0
}
{
"operation": "replace_anchor",
"blockId": "xxx",
"anchorId": "123",
"content": {
"type": "picture",
"attrs": {}
}
}
{
"operation": "replace_feature",
"blockId": "xxx",
"source": {
"type": "WPSUser",
"attrs": {
"userId": "123",
"name": "张三"
}
},
"target": {
"type": "WPSUser",
"attrs": {
"userId": "456",
"name": "李四"
}
}
}响应体(Response)
HTTP状态码: 200
响应体格式: application/json
没有可用的数据
响应体示例
json
{
"code": 0,
"msg": "string",
"data": {
"result": "string"
}
}更新文档块结果
没有可用的数据