【发布时间】:2019-04-10 17:11:31
【问题描述】:
如标题所述,我一直在尝试使用 Microsoft Graph API 从我们公司的 Sharepoint 站点中提取 Excel 工作簿。我能够检索文件的元数据,但是当我将 /workbook/ 段添加到 URL 时,我收到以下错误:
{
"error": {
"code": "BadRequest",
"message": "Resource not found for the segment 'workbook'.",
"innerError": {
"request-id": "bf41e41a-bc01-4c3b-b1d7-3125c4d48124",
"date": "2019-04-10T16:29:07"
}
}
}
这是获取文件元数据的成功调用的样子:
https://graph.microsoft.com/v1.0/sites/{siteid}/lists/{listid}/items/273
这是我正在进行的返回上述错误的调用:
https://graph.microsoft.com/v1.0/sites/{siteid}/lists/{listid}/items/273/workbook/
我能够找到这篇讨论类似错误的 stackoverflow 帖子,但那是几年前的事了,显然使用的是 Graph API 的 beta 版本,我无法使用该帖子中的建议获得任何进一步的信息。 Get workbook from sharepoint site using microsoft graph beta
我正在根据阅读以下两个 Microsoft 文档来构建我的请求 URL: https://docs.microsoft.com/en-us/graph/api/resources/sharepoint?view=graph-rest-1.0 https://docs.microsoft.com/en-us/graph/api/resources/excel?view=graph-rest-1.0
我认为这无关紧要,但我正在使用 C# 并使用 Restsharp 构建请求。
有人对此有任何见解吗?
谢谢!
【问题讨论】:
标签: excel sharepoint microsoft-graph-api