属性集和响应形状在 EWS 在 ExchangeProperty sets and response shapes in EWS in Exchange

了解如何管理由 EWS 托管 API 和 Exchange 中的 EWS 返回的响应形状和属性集。Learn to manage the response shapes and property sets that are returned by the EWS managed API and EWS in Exchange.

Exchange 数据存储提供灵活的存储解决方案,使您能够将不同的项目(如联系人和日历条目)存储在同一个文件夹中;但是,这样做可能会导致很难管理从调用 EWS 操作或 EWS 托管 API 方法返回的数据。The Exchange data store provides a flexible storage solution that enables you to store different items, such as contacts and calendar entries, in the same folder; however, it can make it difficult to manage the data that is returned from a call to an EWS operation or an EWS managed API method.

为了便于管理 Exchange Online、Exchange Online (作为 Office 365 的一部分)或 Excahange 版本(从 Exchange 2013 开始)中的数据,EWS 托管 API 使用属性集,而 EWS 使用响应形状。To make it easier to manage the data that is returned by Exchange Online, Exchange Online as part of Office 365, or version of Excahange starting with Exchange 2013, the EWS Managed API uses property sets, and EWS uses response shapes. 这些是一些预定义的集合,它们提供了存储项的最常见属性。These are predefined collections that provide the most common properties of a store item. 返回的一组属性由项目类型确定。The set of properties that is returned is determined by the item type. 这意味着,当您使用 Exchange 托管 API项目绑定项目时,您将获得一组不同的属性,具体取决于要绑定到的项目的类型。That means that when you bind an item by using the Exchange Managed API Item.Bind method, you get a different set of properties depending on the type of item to which you bind. 与绑定到联系人项目相比,绑定到日历项将返回一组不同的属性。Binding to a calendar item will return a different set of properties than binding to a contact item. 同样,如果您使用 EWS, GetItem 操作将根据返回的项目类型返回一组不同的属性。Likewise, if you are using EWS, the GetItem operation returns a different set of properties based on the type of item that is returned.

绑定到文件夹或使用GetFolder 操作的文件夹还将根据您请求的文件夹返回不同的属性集。Binding to a folder with the Folder.Bind method or using the GetFolder operation also returns different sets of properties based on the folder that you request.

表1。预定义的响应形状Table 1. Predefined response shapes

响应形状Response shape EWS 托管 API 等效项EWS Managed API equivalent 说明Description
仅限 IDID only
BasePropertySet.IdOnlyBasePropertySet.IdOnly
仅返回项或文件夹的标识符。Returns only the identifier of the item or folder. 大多数应用程序应使用此响应形状并指定所需的任何其他属性。Most applications should use this response shape and specify any additional properties that are required.
默认Default
不适用N/A
返回一组预定义的属性,这些属性是项目或文件夹的默认值(仅限 EWS)。Returns a predefined set of properties that are the default for the item or folder (EWS only).
所有属性All properties
BasePropertySet.FirstClassPropertiesBasePropertySet.FirstClassProperties
返回客户端应用程序最常使用的属性。Returns the properties that client applications use most often. 您可以通过使用属性路径返回其他属性。You can return additional properties by using a property path.

默认响应形状Default response shapes

EWS 包括一组用于文件夹和项目的默认响应形状。EWS includes a set of default response shapes for folders and for items.

下表列出了FindFolderGetFolder EWS 操作为每个文件夹返回的默认属性。The following table lists the default properties that are returned for each folder by the FindFolder and GetFolder EWS operations.

表2。默认文件夹属性Table 2. Default folder properties

PropertyProperty 收件箱Inbox 日历Calendar 联系人Contacts 已删除项目Deleted items Drafts 备注Notes 其他文件夹Other folders Outbox
可分辨名称 (DN)Display name
XX
XX
XX
XX
XX
XX
XX
XX
文件夹 IDFolder ID
XX
XX
XX
XX
XX
XX
XX
XX
子文件夹计数Subfolder count
XX
XX
XX
XX
XX
XX
XX
XX
总计数Total count
XX
XX
XX
XX
XX
XX
XX
未读计数Unread count
XX
XX
XX
XX
XX

下表列出了FindItemGetItem EWS 操作为每个项目类型返回的默认属性。The following table lists the default properties that are returned for each item type by the FindItem and GetItem EWS operations.

表3。默认项目属性Table 3. Default item properties

PropertyProperty 日历项目Calendar item 联系人项目Contact item 邮件项目Message item 任务项目Task item
正文Body
X (1)X(1)
CalendarItemTypeCalendarItemType
xx
CompanyNameCompanyName
xx
CompleteNameCompleteName
xx
DateTimeCreatedDateTimeCreated
xx
DateTimeSentDateTimeSent
xx
DueDateDueDate
x (2)x(2)
EmailAddressesEmailAddresses
xx
EndEnd
xx
FileAsFileAs
xx
FromFrom
xx
HasAttachmentsHasAttachments
xx
xx
xx
xx
ImAddressesImAddresses
xx
IsAssociatedIsAssociated
xx
xx
IsDeliveryReceiptRequestedIsDeliveryReceiptRequested
xx
ItemIdItemId
xx
xx
xx
xx
JobTitleJobTitle
xx
LegacyFreeBusyStatusLegacyFreeBusyStatus
xx
位置Location
xx
OrganizerOrganizer
xx
PercentCompletePercentComplete
xx
PhoneNumbersPhoneNumbers
xx
PhysicalAddressesPhysicalAddresses
xx
ResponseObjectsResponseObjects
x (1)x(1)
x (1)x(1)
SensititySensitity
xx
大小Size
xx
StartDateStartDate
x (2)x(2)
状态Status
xx
SubjectSubject
xx
xx
xx

注意:Notes:

  1. 包含在GetItem操作的响应中。Included in the response from the GetItem operation. 不包括在FindItem操作的响应中。Not included in the response from the FindItem operation.

  2. 仅在该字段包含数据的情况中包含在响应中。Only included in the response if the field contains data. 如果字段为空,则不包含在响应中。Not included in the response if the field is blank.

所有属性集和响应形状All properties set and response shape

下表列出了通过调用 EWS 托管 API 项,返回的第一类属性 FINDITEMS ews 托管 Api 方法,以及FindItemGetItem EWS 操作返回的 "all properties" 响应形状。The following table lists the first-class properties that are returned by calling the EWS Managed API Item.Bind and Item.FindItems EWS Managed API methods, and the "all properties" response shape returned by the FindItem and GetItem EWS operations.

您可以将其他属性添加到属性集或包括扩展属性。You can add additional properties to the property set or include extended properties. 有关详细信息,请参阅Exchange 中 EWS 的属性和扩展属性For details, see Properties and extended properties in EWS in Exchange.

表4。第一类属性Table 4. First-class properties

属性Property
日历项目Calendar item
联系人项目Contact item
邮件项目Message item
发布项目Post item
任务项目Task item
ActualWorkActualWork
xx
AdjacentMeetingCountAdjacentMeetingCount
xx
AdjacentMeetingsAdjacentMeetings
xx
别名Alias
xx
AllowNewTimeProposalAllowNewTimeProposal
xx
AppointmentReplyTimeAppointmentReplyTime
xx
AppointmentSequenceNumberAppointmentSequenceNumber
xx
AppointmentStateAppointmentState
xx
AssignedTimeAssignedTime
xx
AssistantNameAssistantName
xx
BccRecipientsBccRecipients
xx
BillingInformationBillingInformation
xx
正文Body
x (1)x(1)
x (1)x(1)
x (1)x(1)
x (1)x(1)
BusinessHomePageBusinessHomePage
xx
xx
CalendarItemTypeCalendarItemType
xx
类别Categories
xx
xx
xx
xx
CcRecipientsCcRecipients
xx
ChangeCountChangeCount
xx
子代Children
xx
公司Companies
xx
CompleteDateCompleteDate
xx
CompleteNameCompleteName
xx
ConferenceTypeConferenceType
xx
ConflictingMeetingCountConflictingMeetingCount
xx
ConflictingMeetingsConflictingMeetings
xx
联系人Contacts
xx
ContactSourceContactSource
xx
ConversationIdConversationId
xx
xx
xx
xx
xx
ConversationIndexConversationIndex
xx
xx
ConversationTopicConversationTopic
xx
xx
CultureCulture
xx
xx
xx
xx
xx
DateTimeCreatedDateTimeCreated
xx
xx
xx
xx
xx
DateTimeReceivedDateTimeReceived
xx
xx
xx
xx
xx
DateTimeSentDateTimeSent
xx
xx
xx
xx
xx
DateTimeStampDateTimeStamp
xx
DelegationStateDelegationState
xx
DelegatorDelegator
xx
DeletedOccurrencesDeletedOccurrences
xx
DepartmentDepartment
xx
DirectoryIdDirectoryId
xx
DirectReportsDirectReports
xx
DisplayCcDisplayCc
xx
xx
xx
xx
xx
DisplayNameDisplayName
xx
DisplayToDisplayTo
xx
xx
xx
xx
xx
DueDateDueDate
xx
持续时间Duration
xx
EffectiveRightsEffectiveRights
xx
xx
xx
xx
xx
EmailAddressesEmailAddresses
xx
EndEnd
xx
EndTimeZoneEndTimeZone
xx
FileAsFileAs
xx
FileAsMappingFileAsMapping
xx
FirstOccurrenceFirstOccurrence
xx
FromFrom
xx
xx
生成Generation
xx
GivenNameGivenName
xx
HasAttachmentsHasAttachments
xx
xx
xx
xx
xx
HasPictureHasPicture
xx
ImAddressesImAddresses
xx
ImportanceImportance
xx
xx
xx
xx
xx
缩写Initials
xx
InReplyToInReplyTo
xx
xx
xx
xx
xx
InternetMessageIdInternetMessageId
xx
xx
MessageInternetMessageHeaders
xx
xx
xx
xx
xx
IsAllDayEventIsAllDayEvent
xx
IsAssociatedIsAssociated
xx
xx
xx
xx
xx
IsCancelledIsCancelled
xx
IsCompleteIsComplete
xx
IsDeliveryReceiptRequestedIsDeliveryReceiptRequested
xx
IsDraftIsDraft
xx
xx
xx
xx
xx
IsFromMeIsFromMe
xx
xx
xx
xx
xx
IsMeetingIsMeeting
xx
IsOnlineMeetingIsOnlineMeeting
xx
IsReadIsRead
xx
IsReadReceiptRequestedIsReadReceiptRequested
xx
IsRecurringIsRecurring
xx
xx
IsResendIsResend
xx
xx
xx
xx
xx
IsResponseRequestedIsResponseRequested
xx
xx
IsSubmittedIsSubmitted
xx
xx
xx
xx
xx
IsUnmodifiedIsUnmodified
xx
xx
xx
xx
xx
ItemClassItemClass
xx
xx
xx
xx
xx
ItemIdItemId
xx
xx
xx
xx
xx
JobTitleJobTitle
xx
LastModifiedNameLastModifiedName
xx
xx
xx
xx
xx
LastModifiedTimeLastModifiedTime
xx
xx
xx
xx
xx
LastOccurranceLastOccurrance
xx
LegacyFreeBusyStatusLegacyFreeBusyStatus
xx
位置Location
xx
ManagerManager
xx
MeetingRequestWasSentMeetingRequestWasSent
xx
MeetingTimeZoneMeetingTimeZone
xx
MeetingWorkspaceUrlMeetingWorkspaceUrl
xx
MiddleNameMiddleName
xx
MileageMileage
xx
xx
ModifiedOccurrancesModifiedOccurrances
xx
MyResponseTypeMyResponseType
xx
NetShowUrlNetShowUrl
xx
NickNameNickName
xx
注释Notes
xx
OfficeLocationOfficeLocation
xx
OptionalAttendeesOptionalAttendees
xx
OrganizerOrganizer
xx
OriginalStartOriginalStart
xx
所有者Owner
xx
ParentFolderIdParentFolderId
xx
xx
xx
xx
xx
PercentCompletePercentComplete
xx
PhoneNumbersPhoneNumbers
xx
PhoneticFirstNamePhoneticFirstName
xx
PhoneticFullNamePhoneticFullName
xx
PhoneticLastNamePhoneticLastName
xx
PhotoPhoto
xx
PhysicalAddressesPhysicalAddresses
xx
PostalAddressIndexPostalAddressIndex
xx
PostedTimePostedTime
xx
职业Profession
xx
ReceivedByReceivedBy
xx
ReceivedRepresentingReceivedRepresenting
xx
ReccurrenceReccurrence
xx
xx
引用References
xx
xx
ReminderDueByReminderDueBy
xx
xx
xx
xx
xx
ReminderIsSetReminderIsSet
xx
xx
xx
xx
xx
ReminderMinutesBeforeStartReminderMinutesBeforeStart
xx
xx
xx
xx
xx
ReplyToReplyTo
xx
RequiredAttendeesRequiredAttendees
xx
资源Resources
xx
ResponseObjectsResponseObjects
x (1)x(1)
x (1)x(1)
x (1)x(1)
x (1)x(1)
x (1)x(1)
发件人Sender
xx
xx
SensitivitySensitivity
xx
xx
xx
xx
xx
大小Size
xx
xx
xx
xx
xx
SpouseNameSpouseName
xx
开始Start
xx
StartDateStartDate
xx
StartTimeZoneStartTimeZone
xx
状态Status
xx
StatusDescriptionStatusDescription
xx
SubjectSubject
xx
xx
xx
xx
姓氏Surname
xx
TimeZoneTimeZone
xx
ToRecipientsToRecipients
xx
TotalWorkTotalWork
xx
WebClientEditFormQueryStringWebClientEditFormQueryString
xx
xx
xx
xx
xx
WebClientReadFormQueryStringWebClientReadFormQueryString
xx
xx
xx
xx
xx

注意:Notes:

  1. 绑定到某个项目时以及从GetItem 操作的响应中包含。Included when binding to an item and in the response from the GetItem operation. 不包括在FindItems方法的结果或来自FindItem 操作的响应。Not included in the result of the Item.FindItems method or the response from the FindItem operation.

另请参阅See also