我正在尝试找到一种解决方案来搜索/列出 BOX (BOX.com) 中的所有锁定文件。由于这似乎无法通过用户界面实现,因此我调查了 Rest API。
我找不到使用 API 搜索所有锁定文件的方法。我无法遍历 API。我不能使用“fields=lock”作为参数进行通配符搜索。
目前我可以查询单个文件是否被锁定:
https://api.box.com/2.0/files/26802142333?fields=lock
返回
{
    "type": "file",
    "id": "26802142333",
    "etag": "462",
    "lock": {
        "type": "lock",
        "id": "22148533",
        "created_by": {
            "type": "user",
            "id": "201274112",
            "name": "Robert Wunsch",
            "login": "rwunsch@sapient.com"
        },
        "created_at": "2015-05-11T11:36:08-07:00",
        "expires_at": null,
        "is_download_prevented": false
    }
}
我可以使用“fields=lock”参数创建搜索,并使用查询来搜索包含“xls”的所有内容:
https://api.box.com/2.0/search?query=xls&fields=lock
返回
...,
{
            "type": "file",
            "id": "29299819893",
            "etag": "0",
            "lock": null
        },
        {
            "type": "file",
            "id": "26004664251",
            "etag": "0",
            "lock": null
        },
        {
            "type": "file",
            "id": "26004640461",
            "etag": "0",
            "lock": null
        },
        {
            "type": "file",
            "id": "29618844701",
            "etag": "3",
            "lock": {
                "type": "lock",
                "id": "22002195",
                "created_by": {
                    "type": "user",
                    "id": "202820453",
                    "name": "Robert Wunsch",
                    "login": "gincalua@googlemail.com"
                },
                "created_at": "2015-05-06T05:33:28-07:00",
                "expires_at": null,
                "is_download_prevented": false
            }
        },
        {
            "type": "file",
            "id": "26004659155",
            "etag": "0",
            "lock": null
        },
        {
            "type": "file",
            "id": "29063166840",
            "etag": "0",
            "lock": null
        },
...
如何搜索锁定的文件?
谢谢您的帮助!