我有一个SharePoint网站,其中有一个drive
不是默认的drive
(共享文档)。如何访问该驱动器?
通常要访问一个mysite.com/Shared Documents/folder
文件,我将执行以下操作获取站点ID:
GET /v1.0/sites/{sharepoint.mycompany.com}:/sites/{mySite}:/
然后我可以使用以下方法检索默认驱动器:
GET /v1.0/sites/{mySiteId}/drive
在这种情况下,我的失败不在默认驱动器中。如何访问其他驱动器?
答案 0 :(得分:1)
您需要处理/drives
集合,而不是默认的/drive
。您可以通过调用以下内容来检索属于站点的驱动器列表:
GET /v1.0/sites/{siteId}/drives?select=id,name
这将返回drive
资源的集合:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#drives",
"value": [
{
"id": "id1",
"name": "Documents"
},
{
"id": "id2",
"name": "Other Documents"
}
]
}
然后您可以像这样通过id
通过GET /v1.0/sites/{siteId}/drives/{driveId}
来访问drive
:
mat<- matrix(c(1,0,0,0,0,0,1,0,0,0,0,0,0,0,2,0,
2,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,
0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,
0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,0,0,1,0,1,1,0,0,1,0,1,
1,1,0,0,0,0,0,0,1,0,1,2,1,0,0,0), nrow=16, ncol=6)
dimnames(mat)<- list(c("a", "c", "f", "h", "i", "j", "l", "m", "p", "q", "s", "t", "u", "v","x", "z"),
c("1", "2", "3", "4", "5", "6"))