GetReminders 操作

GetReminders EWS 操作に関する情報を検索します。

GetReminders Exchange Web Services (EWS) 操作では、予定表とタスク項目のアラームが取得されます。

この操作は Exchange Server 2013 で導入されました。

GetReminders 操作の使用

GetReminders 操作は、要求で渡された要素値に応じて、ユーザーのメールボックス内の現在および将来の予定表アイテムとタスク アイテムのアラームを取得します。 この操作では、現在および将来のすべての予定表アイテムと、アラームが設定されているタスクを取得できます。 プライベート予定表アイテムは応答に含まれます。 アラームのないタスクは応答に含まれず、アラーム付きのメールやフォローアップ フラグもありません。

現在のすべてのアラームを取得するには、 ReminderType[すべて] に、 EndTime を現在の時刻に設定することをお勧めします。

BeginTime 要素と EndTime 要素が要求に含まれている場合、応答には、BeginTimeEndTime の間で発生するアラームがある予定表とタスク項目のアラームが含まれます。

次の表では、BeginTime 要素と EndTime 要素が含まれている場合の ReminderType 要素の動作について説明します。

ReminderType 要素の値 説明
すべて
BeginTimeEndTime の間で発生するアラーム。
Current
All によって返されるリマインダーと、イベントがまだ進行中の場合は要求された時間枠より前のアラームに加え、年齢に関係なくすべての予定が追加されます。
古い
All によって返されるリマインダー。まだ完了していないイベントを差し引き、すべての予定を差し引きます。 BeginTime 要素と EndTime 要素は、Old 値を使用するように設定する必要があります。

GetReminders 操作 SOAP ヘッダー

GetReminders 操作では、次の表に示す SOAP ヘッダーを使用できます。

ヘッダー名 要素 説明
偽装
ExchangeImpersonation
クライアント アプリケーションが偽装しているユーザーを識別します。 このヘッダーは要求に適用されます。
MailboxCulture
MailboxCulture
RFC 3066 で定義されている "言語の識別用タグ" で定義されているカルチャを識別し、メールボックスにアクセスするために使用します。 このヘッダーは要求に適用されます。
RequestVersion
RequestServerVersion
操作要求のスキーマ バージョンを識別します。 このヘッダーは要求に適用されます。
ServerVersion
ServerVersionInfo
要求に応答したサーバーのバージョンを識別します。 このヘッダーは、応答に適用できます。

GetReminders 操作要求の例

GetReminders 操作要求の次の例は、BeginTimeEndTime の間で発生する最初の 5 つの予定表アイテムを取得する方法を示しています。

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
               xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" 
               xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" 
               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <t:RequestServerVersion Version="Exchange2013" />
  </soap:Header>
  <soap:Body>
    <m:GetReminders>
      <m:EndTime>2014-04-16T21:00:00Z</m:EndTime>
      <m:ReminderType>All</m:ReminderType>
    </m:GetReminders>
  </soap:Body>
</soap:Envelope>

要求 SOAP 本文の例には、次の要素が含まれています。

SOAP 本文には、次の要素を含めることもできます。

GetReminders 操作の応答に成功しました

次の例は、 GetReminders 操作要求に対する正常な応答を示しています。 応答には、"チーム会議" 予定表アイテムのアラームと、"会議メモを送信するタスク" タスクのアラームが含まれています。

注:

識別子は、読みやすさを維持するために短縮されました。

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header>
    <ServerVersionInfo MajorVersion="15"
                       MinorVersion="0"
                       MajorBuildNumber="918"
                       MinorBuildNumber="7"
                       Version="V2_10"
                       xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types"
                       xmlns="http://schemas.microsoft.com/exchange/services/2006/types"
                       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
  </s:Header>
  <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <GetRemindersResponse ResponseClass="Success"
                          xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
      <ResponseCode>NoError</ResponseCode>
      <Reminders>
        <Reminder xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
          <Subject>Team meeting</Subject>
          <Location />
          <ReminderTime>2014-04-15T21:00:00Z</ReminderTime>
          <StartDate>2014-04-15T21:00:00Z</StartDate>
          <EndDate>2014-04-15T21:30:00Z</EndDate>
          <ItemId Id="vQAAAA=="
                  ChangeKey="DwAAABYAAAB4to43JyybTYwHLBM1k8MxAAACRoV4" />
          <RecurringMasterItemId Id="K7u5AAA=" ChangeKey="DwAAABYAAAB4to43JyybTYwHLBM1k8MxAAACRoV0" />
          <ReminderGroup>Calendar</ReminderGroup>
          <UID>6CF2FA62</UID>
        </Reminder>
        <Reminder xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
          <Subject>Task to send meeting notes</Subject>
          <Location />
          <ReminderTime>2014-04-16T14:00:00Z</ReminderTime>
          <StartDate>0001-01-02T00:00:00Z</StartDate>
          <EndDate>0001-01-02T00:00:00Z</EndDate>
          <ItemId Id="vAAAAA=="
                  ChangeKey="EwAAABQAAACOs0HEMq1WTKpI7sNu5qXNAAAIDg==" />
          <ReminderGroup>Task</ReminderGroup>
          <UID>vAAAAA==</UID>
        </Reminder>
      </Reminders>
    </GetRemindersResponse>
  </s:Body>
</s:Envelope>

応答 SOAP 本文には、次の要素が含まれています。

GetReminders 操作エラー応答の例

次の例は、 GetReminders 操作要求に対するエラー応答を示しています。 これは、終了日が開始日より前の要求に対する応答です。

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header>
    <ServerVersionInfo MajorVersion="15"
                       MinorVersion="0"
                       MajorBuildNumber="918"
                       MinorBuildNumber="7"
                       Version="V2_10"
                       xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types"
                       xmlns="http://schemas.microsoft.com/exchange/services/2006/types"
                       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
  </s:Header>
  <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <GetRemindersResponse ResponseClass="Error"
                          xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
      <MessageText>EndDate is earlier than StartDate</MessageText>
      <ResponseCode>ErrorInvalidOperation</ResponseCode>
      <DescriptiveLinkKey>0</DescriptiveLinkKey>
    </GetRemindersResponse>
  </s:Body>
</s:Envelope>

エラー応答 SOAP 本文には、次の要素が含まれています。

EWS に汎用であり、この操作に固有のその他のエラー コードについては、「 ResponseCode」を参照してください。

関連項目