dtable-admin的list users dtable接口问题,求解

开发版,我在使用api/v2.1/admin/dtables/接口时,可以正常返回所有人的dtable,但是我指定某个用户时,列出的dtable数量为0。详见下方代码:

api/v2.1/admin/dtables/ 可以正常列出所有人的dtable

request

curl -H "Authorization:Token 119e8172e5e7ef0ea295ad08602706b46801487a" -H "Accept: application/json; indent=4" "http://29.23.105.18/api/v2.1/admin/dtables/?page=1&per_page=100"

response

{
    "page_info": {
        "has_next_page": false,
        "current_page": 1
    },
    "dtables": [
        {
            "id": 1,
            "workspace_id": 1,
            "uuid": "75697f4b-2abe-43c4-9349-27fc40d0a379",
            "name": "\u6d41\u7a0b\u7ba1\u7406",
            "creator": "admin",
            "modifier": "admin",
            "created_at": "2021-07-08T06:00:54+00:00",
            "updated_at": "2021-07-19T07:58:32+00:00",
            "color": null,
            "text_color": null,
            "icon": "icon-task-management",
            "owner": "admin",
            "org_id": -1,
            "email": "76847a61a13743da8dab571a2e78f5a9@auth.local",
            "rows_count": 3
        },
        {
            "id": 2,
            "workspace_id": 4,
            "uuid": "b7559200-d208-4d81-812c-e4ad7a20f548",
            "name": "\u4e91\u5e73\u53f0\u548c\u5927\u6570\u636e",
            "creator": "wanyan-002",
            "modifier": "wanyan-002",
            "created_at": "2021-08-10T06:54:12+00:00",
            "updated_at": "2021-08-10T06:54:12+00:00",
            "color": null,
            "text_color": null,
            "icon": null,
            "owner": "wanyan-002",
            "org_id": -1,
            "email": "efcb022f64e14877ad8e2b8bbcebbe19@auth.local",
            "rows_count": 3
        },
        {
            "id": 3,
            "workspace_id": 4,
            "uuid": "74ea3d8e-25fc-4707-ae1f-27b154d0c3ce",
            "name": "\u4eba\u529b\u7edf\u8ba1-\u6a21\u677f",
            "creator": "wanyan-002",
            "modifier": "wanyan-002",
            "created_at": "2021-08-10T07:15:53+00:00",
            "updated_at": "2021-08-10T07:15:53+00:00",
            "color": null,
            "text_color": null,
            "icon": null,
            "owner": "wanyan-002",
            "org_id": -1,
            "email": "efcb022f64e14877ad8e2b8bbcebbe19@auth.local",
            "rows_count": 85
        },
        {
            "id": 4,
            "workspace_id": 6,
            "uuid": "53f32410-d918-4ccf-9c28-aac9fbe36604",
            "name": "\u9879\u76ee\u4fe1\u606f",
            "creator": "\u9646\u4e30",
            "modifier": "\u9646\u4e30",
            "created_at": "2021-08-18T02:55:06+00:00",
            "updated_at": "2021-08-18T08:40:05+00:00",
            "color": null,
            "text_color": null,
            "icon": "icon-company-inventory",
            "owner": "\u9646\u4e30",
            "org_id": -1,
            "email": "c8a3860984db484fa02fe0c8d8233031@auth.local",
            "rows_count": 10
        },
        {
            "id": 5,
            "workspace_id": 6,
            "uuid": "ef9cb28c-2aec-48be-830c-179dc2b016c4",
            "name": "\u4eba\u5458\u57fa\u7840\u4fe1\u606f",
            "creator": "\u9646\u4e30",
            "modifier": "\u9646\u4e30",
            "created_at": "2021-08-18T07:19:52+00:00",
            "updated_at": "2021-08-18T07:19:52+00:00",
            "color": "#656463",
            "text_color": null,
            "icon": "icon-customer-list",
            "owner": "\u9646\u4e30",
            "org_id": -1,
            "email": "c8a3860984db484fa02fe0c8d8233031@auth.local",
            "rows_count": 3
        },
        {
            "id": 6,
            "workspace_id": 9,
            "uuid": "f49ecc26-c324-45ce-a63f-9ff4ba20fca7",
            "name": "\u9879\u76ee\u4fe1\u606f",
            "creator": "\u9646\u4e30",
            "modifier": "\u9646\u4e30",
            "created_at": "2021-08-18T19:04:59+00:00",
            "updated_at": "2021-08-18T19:04:59+00:00",
            "color": null,
            "text_color": null,
            "icon": null,
            "owner": "\u9646\u4e30\u6d4b\u8bd5\u7ec4 (group)",
            "org_id": -1,
            "email": "2@seafile_group",
            "rows_count": 17
        },
        {
            "id": 7,
            "workspace_id": 7,
            "uuid": "efcd511c-d7ae-44f2-a537-735faa82f9df",
            "name": "\u65e0\u6807\u9898\u8868\u683c",
            "creator": "\u9646\u4e30\u6d4b\u8bd5",
            "modifier": "\u9646\u4e30\u6d4b\u8bd5",
            "created_at": "2021-08-18T19:08:13+00:00",
            "updated_at": "2021-08-18T19:08:13+00:00",
            "color": null,
            "text_color": null,
            "icon": null,
            "owner": "\u9646\u4e30\u6d4b\u8bd5",
            "org_id": -1,
            "email": "4ae5374d7297488eb813ecfd85035fc7@auth.local",
            "rows_count": 3
        },
        {
            "id": 8,
            "workspace_id": 8,
            "uuid": "1d01e0c1-9c8a-4d4a-a251-74c0de64e171",
            "name": "\u6d4b\u8bd51",
            "creator": "\u9646\u4e30\u6d4b\u8bd52",
            "modifier": "\u9646\u4e30\u6d4b\u8bd52",
            "created_at": "2021-08-18T19:12:39+00:00",
            "updated_at": "2021-08-18T19:12:39+00:00",
            "color": "#1DDD1D",
            "text_color": null,
            "icon": "icon-company-inventory",
            "owner": "\u9646\u4e30\u6d4b\u8bd52",
            "org_id": -1,
            "email": "d26e87ca79ee42fe8aa63243f4761d2d@auth.local",
            "rows_count": 3
        },
        {
            "id": 9,
            "workspace_id": 9,
            "uuid": "9b9c662e-764c-4365-a040-a11365079ccf",
            "name": "\u516c\u5171\u6570\u636e\u96c6\u6d4b\u8bd5\u8868",
            "creator": "\u9646\u4e30",
            "modifier": "\u9646\u4e30",
            "created_at": "2021-08-18T19:21:06+00:00",
            "updated_at": "2021-08-18T19:21:06+00:00",
            "color": null,
            "text_color": null,
            "icon": null,
            "owner": "\u9646\u4e30\u6d4b\u8bd5\u7ec4 (group)",
            "org_id": -1,
            "email": "2@seafile_group",
            "rows_count": 10
        },
        {
            "id": 11,
            "workspace_id": 9,
            "uuid": "b548ea2f-9043-435e-9b8a-dc16534126f4",
            "name": "\u529f\u80fd\u70b9\u91cd\u4f30",
            "creator": "\u9646\u4e30",
            "modifier": "\u4ed8\u5efa\u534e",
            "created_at": "2021-09-17T08:31:52+00:00",
            "updated_at": "2021-09-17T10:13:44+00:00",
            "color": "#656463",
            "text_color": null,
            "icon": "icon-company-inventory",
            "owner": "\u9646\u4e30\u6d4b\u8bd5\u7ec4 (group)",
            "org_id": -1,
            "email": "2@seafile_group",
            "rows_count": 9
        }
    ]
}  

/api/v2.1/admin/users/:email/dtables/ 无法列出具体用户的dtable

request

curl -X GET "http://29.23.105.18/api/v2.1/admin/users/root%40qq.com/dtables/?page=2" -H "Authorization: Token 119e8172e5e7ef0ea295ad08602706b46801487a"

response

{"dtable_list":[],"count":0} 

其中root@qq.com是我本身的管理员账号,我换成其他成员的邮箱地址也无法列出,返回均一样

发现每个dtable都有一个email的值,把user中的email替换为dtable返回的email值,可以正确输出count值,但是dtable的list依然是空的。

  1. 这个邮箱和成员的邮箱什么关系,如何转换?

  2. 为何不能返回dtable list?

request

curl -X GET "http://29.23.105.18/api/v2.1/admin/users/c8a3860984db484fa02fe0c8d8233031%40auth.local/dtables/?page=2" -H "Authorization: Token 119e8172e5e7ef0ea295ad08602706b46801487a"

response

{"dtable_list":[],"count":2}

建议你用 Chrome 的 debug 模式,看下管理员界面上发出来的 API 调用和你的有什么区别。是同一个 API,如果界面上能成功返回结果,用 curl 也是能成功的。

这个邮箱和成员的邮箱什么关系,如何转换

每一个用户有唯一的一个 ID, 这个邮箱是指唯一 ID。成员的邮箱是外部显示用的,不作为唯一标识。

多谢,API正常,ID也找到了对应的解决方法。
为了节约版面资源,不再另开新帖。借帖子再咨询一个问题,看看贵团队是何想法。

多人协作表格时,经常会碰到的问题是某个协作人不按照正确格式去填写内容。如果可以对每个单元格或者每列写脚本去校验(不仅是正则),应该可以解决这个问题。
并且支持脚本后,还可以利用脚本触发API,达成很多有意思的功能。

这个功能出于什么考虑不做开发呢?或者在规划中了?

脚本功能现在就有的。