根据提供的笔记本 ID 列表的顺序,更改工作空间中笔记本的排序。
此接口会调用内核的 model.ChangeBoxSort
方法来实际执行排序操作。
此接口需要管理员权限,并且会在只读模式下受限。
请求体为一个 JSON 对象,包含以下字段:
参数名 | 类型 | 必需 | 描述 |
---|---|---|---|
notebooks | string[] | 是 | 笔记本 ID 的有序列表。系统将按照此列表的顺序对笔记本进行排序。 |
返回标准的 JSON 结构:
参数名 | 类型 | 描述 |
---|---|---|
code | number | 返回码,0 表示成功,其他表示失败。 |
msg | string | 错误信息,成功时为空字符串。 |
data | null | 成功时,此字段为 null。 |
{
"notebooks": [
"20200812220409-rng0qan",
"20210310100000-abcdefg",
"20220520123456-hijklmn"
]
}
{
"code": 0,
"msg": "",
"data": null
}
{
"code": -1,
"msg": "Error message describing the failure, e.g., 'readonly mode does not support this operation'",
"data": null
}