我们正在使用Microsoft Graph API(最近重新命名为Office365统一API的新API).我们有一个OAUTH登录,graph.microsoft.com资源用于生成令牌.它可以很好地获得其他子资源,比如/ me.但是当在Microsoft Graph的文档中使用URL来讨论搜索驱动器(和SharePoint?)时,我们找不到一种方法来使任何示例URL工作.当驱动器可供用户使用或SharePoint时,它不起作用.
所以第一个问题,为什么会产生错误?
获取https://graph.microsoft.com/v1.0/drive/root/Microsoft.Graph.search?q=img
Rreturns一个不好的要求:
Error: 400 - Bad Request See Response Headers for details. { "error": { "code": "BadRequest","message": "Unsupported segment type.","innerError": { "request-id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","date": "2015-11-23T16:58:26" } } }
这是响应标题:
Transfer-Encoding: chunked request-id: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX client-request-id: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"West US","Slice":"SliceB","ScaleUnit":"002","Host":"AGSFE_IN_4","ADSiteName":"WST"}} OutBoundDuration: 0 Duration: 2.2283 Cache-Control: private Date: Mon,23 Nov 2015 16:58:25 GMT Server: Microsoft-IIS/8.5 X-Powered-By: ASP.NET