Onedrive API - 列出文档库的子项时收到的其中一个参数是不可接受的错误

时间:2017-08-23 19:28:50

标签: microsoft-graph onedrive

我尝试使用OneDrive REST API检索SharePoint文档库中的文件夹内容。

我们在此处关注this documentation

我构建的电话是:

GET https://{tenant}.sharepoint.com/sites/Lindson'sTeam/_api/v2.0/drives/{drive-id}/items/{item-id}/children

这会产生错误响应:

{
    "error": {
        "code": "invalidRequest",
        "message": "One of the provided arguments is not acceptable."
    }
}

为什么会发生这种情况?

我已经确认我们检索的项目看起来合法并且有一个孩子:

https://{tenant}.sharepoint.com/sites/Lindson'sTeam/_api/v2.0/drives/{drive-id}/items/{item-id}

{
    "@odata.context": "https://lindsonresources.sharepoint.com/sites/Lindson'sTeam/_api/v2.0/$metadata#items/$entity",
    "@odata.type": "#oneDrive.item",
    "@odata.id": "https://lindsonresources.sharepoint.com/sites/Lindson'sTeam/_api/v2.0/drives/b!OV23drIi2EizXnhHJCU_rOeDApiWGMlDiw3J9cj0Mn3ihNYXTtJDTrfFQJqwaQcd/items/012YJ4V7D6JK42P6B6LNAKDB4QLXMDMVG5",
    "@odata.editLink": "drives/b!OV23drIi2EizXnhHJCU_rOeDApiWGMlDiw3J9cj0Mn3ihNYXTtJDTrfFQJqwaQcd/items/012YJ4V7D6JK42P6B6LNAKDB4QLXMDMVG5",
    "createdBy": {
        "application": {
            "id": "cc15fd57-2c6c-4117-a88c-83b1d56b4bbe",
            "displayName": "Microsoft Teams Services"
        },
        "user": {
            "email": "charles@lindsonresources.onmicrosoft.com",
            "id": "08360f17-3074-44bd-84f1-04bbf19cf49f",
            "displayName": "Charles Lindson"
        }
    },
    "createdDateTime": "2017-08-10T13:52:05Z",
    "eTag": "\"{A7B94A7E-3EF8-405B-A187-905DD83654DD},1\"",
    "id": "012YJ4V7D6JK42P6B6LNAKDB4QLXMDMVG5",
    "lastModifiedBy": {
        "application": {
            "id": "cc15fd57-2c6c-4117-a88c-83b1d56b4bbe",
            "displayName": "Microsoft Teams Services"
        },
        "user": {
            "email": "charles@lindsonresources.onmicrosoft.com",
            "id": "08360f17-3074-44bd-84f1-04bbf19cf49f",
            "displayName": "Charles Lindson"
        }
    },
    "lastModifiedDateTime": "2017-08-10T13:52:05Z",
    "name": "General",
    "parentReference": {
        "driveId": "b!OV23drIi2EizXnhHJCU_rOeDApiWGMlDiw3J9cj0Mn3ihNYXTtJDTrfFQJqwaQcd",
        "driveType": "documentLibrary",
        "id": "012YJ4V7F6Y2GOVW7725BZO354PWSELRRZ",
        "path": "/drives/b!OV23drIi2EizXnhHJCU_rOeDApiWGMlDiw3J9cj0Mn3ihNYXTtJDTrfFQJqwaQcd/root:"
    },
    "webUrl": "https://lindsonresources.sharepoint.com/sites/Lindson%27sTeam/Shared%20Documents/General",
    "cTag": "\"c:{A7B94A7E-3EF8-405B-A187-905DD83654DD},0\"",
    "fileSystemInfo": {
        "createdDateTime": "2017-08-10T13:52:05Z",
        "lastModifiedDateTime": "2017-08-10T13:52:05Z"
    },
    "folder": {
        "childCount": 1
    },
    "size": 18615279
}

1 个答案:

答案 0 :(得分:0)

您似乎正在查看如何生成其中一个子文件的下载URL的错误。您无法从身边做任何事情,我们现在正在编写修复程序并将其部署。我会在解决后更新此答案。