我还没有尝试过,但是您可以通过转到https://graph.microsoft.com/beta/$metadata来查看统一 API 的元数据。从上面看,实体的结构似乎与Outlook API 中Attachment
的实体相同。Attachment
元数据的相关位:
<EntityType Name="Attachment">
<Key>
<PropertyRef Name="Id"/>
</Key>
<Property Name="Id" Unicode="false" Type="Edm.String" Nullable="false"/>
<Property Name="Name" Unicode="false" Type="Edm.String"/>
<Property Name="ContentType" Unicode="false" Type="Edm.String"/>
<Property Name="Size" Type="Edm.Int32" Nullable="false"/>
<Property Name="IsInline" Type="Edm.Boolean" Nullable="false"/>
<Property Name="DateTimeLastModified" Type="Edm.DateTimeOffset"/>
</EntityType>
<EntityType Name="FileAttachment" BaseType="Microsoft.Graph.Attachment">
<Property Name="ContentId" Unicode="false" Type="Edm.String"/>
<Property Name="ContentLocation" Unicode="false" Type="Edm.String"/>
<Property Name="IsContactPhoto" Type="Edm.Boolean" Nullable="false"/>
<Property Name="ContentBytes" Type="Edm.Binary"/>
</EntityType>
<EntityType Name="ItemAttachment" BaseType="Microsoft.Graph.Attachment">
<NavigationProperty Name="Item" Type="Microsoft.Graph.OutlookItem" Nullable="false" ContainsTarget="true"/>
</EntityType>