添加行评论接口POST /api/v1/dtables/:dtable_uuid/comments/ 有问题

添加行评论的接口好像有点问题 POST /api/v1/dtables/:dtable_uuid/comments/ 给了正确的表id和行id报table_id or row_id invalid错误,相同的表id和行id获取评论列表正确返回了 麻烦看下
https://dtable-server-02.seatable.cn/api/v1/dtables/2e24c046-c660-4d08-bd7b-cbdff0e7523c/comments/?row_id=aqnpY33eRO-IqXvLj-Xk-g
{ error_msg: ‘table_id or row_id invalid’ }

https://dtable-server-02.seatable.cn/api/v1/dtables/2e24c046-c660-4d08-bd7b-cbdff0e7523c/comments/?page=1&count=10&row_id=aqnpY33eRO-IqXvLj-Xk-g
[
{
id: 36672,
author: ‘70cbfd9b132147979b4b6c0bf1930556@auth.local’,
comment: ‘test’,
dtable_uuid: ‘2e24c046-c660-4d08-bd7b-cbdff0e7523c’,
row_id: ‘aqnpY33eRO-IqXvLj-Xk-g’,
created_at: ‘2022-12-16T02:44:04.000Z’,
updated_at: ‘2022-12-16T02:44:04.000Z’,
resolved: 0
}
]"

添加评价接口调用如下:
var dtable_server_url = body.dtable_server;
var url = dtable_server_url + “api/v1/dtables/2e24c046-c660-4d08-bd7b-cbdff0e7523c/comments/?row_id=aqnpY33eRO-IqXvLj-Xk-g”;
var headers = {
‘Authorization’: 'Token ’ + access_token,
‘Content-Type’: ‘application/json’,
‘Accept’: ‘application/json’,
};
var req_data = {
“comment”: “test-comment-again-after-changing”
}

    request.post({url: url, body: (JSON.stringify(req_data)), headers: headers}, function (err, response, body) {
        body = JSON.parse(body)
        console.log(body);
    })

你这里缺少 table_id 参数吧,所以报错 ”table_id or row_id invalid“

下面是正常的请求,可以参考

可以了 3q :grinning:


接口文档中没描述table_id,建议文档更新下。

我看到官方文档已经更新了

https://docs.seatable.cn/published/seatable-api/dtable-server/comments.md#user-content-Create%20a%20comment