Microsoft graph api 微软图形->;展开$expand时使用OData$select中的singleValueExtendedProperty
通过使用正确的Microsoft graph api 微软图形->;展开$expand时使用OData$select中的singleValueExtendedProperty,microsoft-graph-api,outlook-restapi,Microsoft Graph Api,Outlook Restapi,通过使用正确的$expand参数,我可以从用户日历中获取事件,其中包含一个 https://graph.microsoft.com/v1.0/me/calendar/calendarview?startDateTime=2018-10-09&endDateTime=2019-01-09&$expand=singleValueExtendedProperties($filter=id eq'String{cfe1492e-2c52-462d-8f0d-c113326d46f}Name Proper
$expand
参数,我可以从用户日历中获取事件,其中包含一个
https://graph.microsoft.com/v1.0/me/calendar/calendarview?startDateTime=2018-10-09&endDateTime=2019-01-09&$expand=singleValueExtendedProperties($filter=id eq'String{cfe1492e-2c52-462d-8f0d-c113326d46f}Name PropertyName')
这将输出前10个事件,其中一些已填充此属性(YEAY!!)
但是如何结合使用$select
参数呢
因为上面的查询将返回这些事件的所有属性,而我只对所有事件的id
、subject
和singleValueProperties
属性感兴趣。根据,我应该只能使用$select
参数选择我的应用程序想要的属性,但我不知道如何使用singleValueProperty
(或任何其他扩展属性)
我尝试了以下列表(结合$expand以实际包含该属性):
这看起来是一个与微软图形。根据:
:$expand
- 不支持
nextLink
- 不支持超过1个级别的扩展
- 不支持额外参数(
,$filter
)$select
- 不支持
$expand
和$select
在其他地方肯定会一起工作。这就是说,我已经能够重现相同的行为,而且很明显有这样的情况,$expand
和$select
没有
这也记录在:
注意:并非所有关系和资源都支持$expand
查询参数。例如,您可以展开用户
上的directReports
、manager
和成员
关系,但不能展开其事件
、消息
或照片
关系并非所有资源或关系都支持在展开的项目上使用$select
。
如果只需将
&$select=id,subject
附加到您的通话中,您会得到什么样的结果?该部分工作正常(按照规范),那么我只会得到id和subject。singleValueProperties将不会返回。感谢您的澄清!也许这可以在文档中得到更好的解释。
$select=id,subject,singleValueProperties (single value properties not included)
$select=id,subject,singleValueProperties.value (not included)
$select=id,subject,singleValueProperties/value (bad request)
$select=id,subject,singleValueProperties.* (not included)
$select=id,subject (not included)