MailTraffic レポート

MailTraffic REST URI は、組織が外部とやり取りするメール トラフィックに関する概要情報を提供します。レポートの開始日付/時刻と終了日付/時刻は要求で指定できます。また、データを集計する期間も指定できます。

最終更新日: 2015年9月17日

適用対象: Office 365

REST URI

https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MailTraffic[?ODATA options]

フィールド

次のフィールドは、$select、$filter、$orderby ODATA2 クエリ オプションに指定できます。$select オプションが指定されない場合、すべてのフィールドが返されます。

名前

WCF 型*

EDM 型*

[入力/出力]** 説明

値の例

提供されたバージョン

Action

string

指定なし

[入力/出力] メッセージに対して行われた動作の説明です (存在する場合)。このフィールドは空白、またはアクションが実行されていない場合は null になる場合があります。有効なアクション値に関しては、「MailFilterList レポート」を参照してください。

SetSpamConfidenceLevel、RejectMessage

2013-V1

AggregateBy

string

指定なし

[入力] 全日をカバーするレポート エントリにデータを組み込むかどうかを示します。$filter 値として許されているのは、Day と Hour だけです。指定されていない場合、レポートは 1 時間分を集計します。$select オプションに含まれている場合、このフィールドは常に null を返します。 詳細については、「解説」セクションを参照してください。

Day または Hour

2013-V1

Date

System.DateTime

Edm.DateTime

[入力/出力] メッセージがスパムとして検出された日時です。

短い形式の日付 (たとえば、03/10/2013) または引用符付きの 日付/時刻 (たとえば、"03/10/2013 4:55 PM")

2013-V1

Direction

string

指定なし

[入力/出力] スパムとして検出された電子メールが、組織に送られてきた (Inbound) か組織から送られた (Outbound) かを指定します。

指定できる値は Inbound と Outbound だけです。

2013-V1

Domain

string

指定されていません

[入力/出力] 電子メールを処理した完全修飾ドメイン名です。

example.onmicrosoft.com

2013-V1

EndDate

System.DateTime

Edm.DateTime

[入力] このフィールドは、レポートの期間を制限するのに使用されます。 このフィールドを $filter クエリ オプションに使用して、レポート期間の終了日時を設定します。EndDate を $filter オプションに指定した場合、StartDate も指定する必要があります。

短い形式の日付 (たとえば、03/10/2013) または引用符付きの 日付/時刻 (たとえば、"03/10/2013 4:55 PM")

2013-V1

EventType

string

指定なし

[入力/出力] 記録されるスキャン イベントの種類。有効な EventType 値については、「MailFilterList レポート」を参照してください。

SpamContentFiltered、SpamIPBlock

2013-V1

MessageCount

int

Edm.Int64

[入力/出力] 集計期間中に、他のフィールドによって示されるカテゴリに一致したメッセージの数。

1254

2013-V1

Organization

string

指定なし

[入力/出力] 電子メールを処理した完全修飾ドメイン名です。

example.onmicrosoft.com

2013-V1

StartDate

System.DateTime

Edm.DateTime

[入力] このフィールドは、レポートの期間を制限するのに使用されます。 このフィールドを $filter クエリ オプションに使用して、レポート期間の開始日時を設定します。StartDate を $filter オプションに指定した場合、EndDate も指定する必要があります。

短い形式の日付 (たとえば、03/10/2013) または引用符付きの 日付/時刻 (たとえば、"03/10/2013 4:55 PM")

2013-V1

SummarizeBy

string

指定なし

[入力] このフィールドを使用する $filter オプションに指定されているレポート フィールドは、要約を作成するためにレポート エントリを組み合わせる方法を決定します。詳細については、「解説」セクションを参照してください。$select オプションに含まれている場合、このフィールドは常に null を返します。

Action、EventType、Domain、Direction だけが、このフィールドで $filter オプションに使用できる値です。

2013-V1

*WCF 型 は、Visual Studio に Windows Communication Foundation (WCF) Service Reference を作成する場合にフィールドに割り当てられる .NET Framework データ型を参照します。EDM 型は、Atom 形式のレポートで返される ADO.NET エンティティ データ モデル (EDM) 型を参照します。

**[入力/出力] インジケータについては、「入力パラメーターとレポート出力列」のセクションを参照してください。

解説

レポートの各エントリには、いくつかのメタデータ フィールドが含まれます。詳細については、「Office 365 レポート Web サービスが返す一般的なメタデータ」を参照してください。

Date フィールドは、メッセージが Office 365 システムで処理された日時を示し、それらのサーバーのタイム ゾーンで報告されます。

StartDate と EndDate の使用

StartDate と EndDate フィールドは、レポート結果では有用な情報を提供しませんし、レポート出力では常に 0001-01-01T00:00:00Z に設定されます。これらは、レポート時間ウィンドウで簡単に制限を行えるようにするためのもので、「毎日」のレポートよりも細かく時間指定できるようにします。

これは、たとえば、電子メールベースのサービス拒否攻撃を時間単位で記録するときに特に役立ちます。これらのフィールドを使用する際、両方とも $filter オプションに含める必要があります。どちらもオプションですが、一方を指定した場合、もう一方も指定する必要があります。StartDate/EndDate のペアがクエリに指定されていない場合、既定のレポート期間は、前の 2 週間になります。このトピックの後ろにある「サンプル」セクションで、StartDate フィールドと EndDate フィールドの使用方法について示します。

AggregateBy フィールドの使用

MailTraffic レポートは、Office 365 での電子メールに関連したイベントの要約を返します。各イベントは、その Action、Event、Date、Sender などと一緒に記録されます。Office 365 によって記録されるデータには、各イベントの正確な日付と時刻が含まれます。MailDetailMalware などの "詳細" レポートは、特定のイベントとその正確な時刻の一覧を提供します。MailTraffic などの "トラフィック" レポートは、1 時間および 1 日という 2 つの期間にわたってこれらのイベントのカウントを集計して提供します。どちらの期間を使用するかは、この後の例に示されているとおり、$filter クエリ オプションの中で指定します。$filter オプションに AggregateBy 比較を含めない場合は、既定で Hour が使用されます。

https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MailTraffic?$filter=AggregateBy eq 'Day'

https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MailTraffic?$filter=AggregateBy eq 'Hour'

SummarizeBy フィールドの使用

SummarizeBy フィールドでは、指定したフィールド名でレポート出力を "折りたたむ" ことができます。たとえば、1 日のレポート期間に 200 件の受信メールと 100 件の送信メールがあったとします。クエリに $filter=AggregateBy eq ‘Day’ が含まれている場合、レポートではその日について 2 つの別個のエントリが返されます。1 つは受信メールを示す MessageCount が 200 で Direction が Inbound のエントリ、もう 1 つは送信メールを示す MessageCount が 100 で Direction が Outbound のエントリです。このとき、$filter オプションにも SummarizeBy オプションを指定して SummarizeBy eq ‘Direction’ とした場合、レポートにはその日についてエントリが 1 つだけ含まれ、Direction フィールドは空、MessageCount は 300 となります。Direction フィールドが空になるのは、Direction eq ‘Inbound’ によるメッセージ件数と Direction eq ‘Outbound’ によるメッセージ件数の両方が集計されるからです。

SummarizeBy での使用がサポートされているのは、次のフィールドだけです。

  • Action

  • EventType

  • Direction

  • Domain

要求には、次の $filter オプションのように、集計するための複数の許可フィールドを含められます。

$filter=SummarizeBy eq 'EventType,Action'

要求がフィールドに SummarizeBy を使用しており、かつそのフィールド名が $select オプションにも含まれている場合、そのフィールドは常に空の値で報告されます。

電子メール トラフィックの毎日の要約で、Date、Direction、MessageCount フィールドだけを戻す要求を行う方法を次に示します。 結果は日単位で集計されます。 わかりやすくするために、要求に改行が追加されています。

https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MailTraffic?
$select=Date,Direction,MessageCount&
$filter=AggregateBy%20eq%20'Day'&
$format=Atom

要求の結果を次に示します。 簡単にするために、結果からほとんどのメタデータ要素を削除してあります。2 種類のエントリ、Direction が Inbound のものと、同じ日で Direction が Outbound のものがあることに注意してください。

<?xml version="1.0" encoding="utf-8"?>
<feed xml:base="https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/">
  <id>https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MailTraffic</id>
  <title type="text">MailTraffic</title>
  <entry>
    <content type="application/xml">
      <m:properties>
        <d:Date m:type="Edm.DateTime">2013-01-29T00:00:00</d:Date>
        <d:Direction>Inbound</d:Direction>
        <d:MessageCount m:type="Edm.Int32">7</d:MessageCount>
      </m:properties>
    </content>
  </entry>
  <entry>
    <content type="application/xml">
      <m:properties>
        <d:Date m:type="Edm.DateTime">2013-01-29T00:00:00</d:Date>
        <d:Direction>Outbound</d:Direction>
        <d:MessageCount m:type="Edm.Int32">58</d:MessageCount>
      </m:properties>
    </content>
  </entry>
 </feed>

同じ要求に Direction による要約を追加した場合、結果は次のようになります。

https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MailTraffic?
$select=Date,Direction,MessageCount&
$filter=AggregateBy%20eq%20'Day'%20and%20SummarizeBy%20eq%20'Direction'&
$format=Atom

そのようにすると、その同じ日の応答は Direction フィールドを折りたたむ、つまり要約したものになります。 言い換えれば、Directionフィールドの値のみ異なっているすべてのエントリの数を組み合わせます。Direction 要素は空として返されますが、これはレポート エントリが、Direction 値の違いを無視して、イベントの数を組み合わせたものになっていることを示します。

<?xml version="1.0" encoding="utf-8"?>
<feed xml:base="https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/">
  <id>https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MailTraffic</id>
  <title type="text">MailTraffic</title>
  <entry>
    <content type="application/xml">
      <m:properties>
        <d:Date m:type="Edm.DateTime">2013-01-29T00:00:00</d:Date>
        <d:Direction>
        </d:Direction>
        <d:MessageCount m:type="Edm.Int32">65</d:MessageCount>
      </m:properties>
    </content>
  </entry>
 </feed>

次の例は、2013 年 1 月の最初の週に組織が受信した毎日のメッセージを Atom XML ベースの形式で取得する方法を示しています。このレポートでは SummarizeBy EventType が使用されたため、出力はすべてのメッセージ ディスポジションについてレポート エントリ 1 つずつです。わかりやすくするために、要求と応答に改行が追加されています。

https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MailTraffic?
$select=MessageCount,%20Date&
$filter=Direction%20eq%20'Inbound'%20and%20AggregateBy%20eq%20'Day'%20and%20
  StartDate%20eq%20datetime'2013-01-01T00:00:00Z'%20and%20
  EndDate%20eq%20datetime'2013-01-08T00:00:00Z'%20and%20
  SummarizeBy%20eq%20'EventType'&
$format=Atom
<?xml version="1.0" encoding="utf-8"?>
<feed xml:base="https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/" 
  xmlns="http://www.w3.org/2005/Atom" 
  xmlns:d="https://schemas.microsoft.com/ado/2007/08/dataservices"
  xmlns:m="https://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
  <id>https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MailTraffic</id>
  <title type="text">MailTraffic</title>
  <updated>2013-02-09T02:02:16Z</updated>
  <link rel="self" title="MailTraffic" href="MailTraffic" />
  <entry>
    <id>https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTraffic(0)</id>
    <category term="TenantReporting.MailTrafficReport" 
      scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <link rel="edit" title="MailTrafficReport" href="MailTraffic(0)" />
    <title />
    <updated>2013-02-09T02:02:16Z</updated>
    <author>
      <name />
    </author>
    <content type="application/xml">
      <m:properties>
        <d:Date m:type="Edm.DateTime">2013-01-01T00:00:00</d:Date>
        <d:MessageCount m:type="Edm.Int32">100</d:MessageCount>
      </m:properties>
    </content>
  </entry>
  <entry>
    <id>https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTraffic(1)</id>
    <category term="TenantReporting.MailTrafficReport" 
      scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <link rel="edit" title="MailTrafficReport" href="MailTraffic(1)" />
    <title />
    <updated>2013-02-09T02:02:16Z</updated>
    <author>
      <name />
    </author>
    <content type="application/xml">
      <m:properties>
        <d:Date m:type="Edm.DateTime">2013-01-02T00:00:00</d:Date>
        <d:MessageCount m:type="Edm.Int32">150</d:MessageCount>
      </m:properties>
    </content>
  </entry>
  <entry>
    <id>https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTraffic(2)</id>
    <category term="TenantReporting.MailTrafficReport" 
      scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <link rel="edit" title="MailTrafficReport" href="MailTraffic(2)" />
    <title />
    <updated>2013-02-09T02:02:16Z</updated>
    <author>
      <name />
    </author>
    <content type="application/xml">
      <m:properties>
        <d:Date m:type="Edm.DateTime">2013-01-03T00:00:00</d:Date>
        <d:MessageCount m:type="Edm.Int32">158</d:MessageCount>
      </m:properties>
    </content>
  </entry>
  <entry>
    <id>https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTraffic(3)</id>
    <category term="TenantReporting.MailTrafficReport" 
      scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <link rel="edit" title="MailTrafficReport" href="MailTraffic(3)" />
    <title />
    <updated>2013-02-09T02:02:16Z</updated>
    <author>
      <name />
    </author>
    <content type="application/xml">
      <m:properties>
        <d:Date m:type="Edm.DateTime">2013-01-04T00:00:00</d:Date>
        <d:MessageCount m:type="Edm.Int32">178</d:MessageCount>
      </m:properties>
    </content>
  </entry>
  <entry>
    <id>https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTraffic(4)</id>
    <category term="TenantReporting.MailTrafficReport" 
      scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <link rel="edit" title="MailTrafficReport" href="MailTraffic(4)" />
    <title />
    <updated>2013-02-09T02:02:16Z</updated>
    <author>
      <name />
    </author>
    <content type="application/xml">
      <m:properties>
        <d:Date m:type="Edm.DateTime">2013-01-05T00:00:00</d:Date>
        <d:MessageCount m:type="Edm.Int32">116</d:MessageCount>
      </m:properties>
    </content>
  </entry>
  <entry>
    <id>https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTraffic(5)</id>
    <category term="TenantReporting.MailTrafficReport" 
      scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <link rel="edit" title="MailTrafficReport" href="MailTraffic(5)" />
    <title />
    <updated>2013-02-09T02:02:16Z</updated>
    <author>
      <name />
    </author>
    <content type="application/xml">
      <m:properties>
        <d:Date m:type="Edm.DateTime">2013-01-06T00:00:00</d:Date>
        <d:MessageCount m:type="Edm.Int32">108</d:MessageCount>
      </m:properties>
    </content>
  </entry>
  <entry>
    <id>https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTraffic(5)</id>
    <category term="TenantReporting.MailTrafficReport" 
      scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <link rel="edit" title="MailTrafficReport" href="MailTraffic(5)" />
    <title />
    <updated>2013-02-09T02:02:16Z</updated>
    <author>
      <name />
    </author>
    <content type="application/xml">
      <m:properties>
        <d:Date m:type="Edm.DateTime">2013-01-07T00:00:00</d:Date>
        <d:MessageCount m:type="Edm.Int32">45</d:MessageCount>
      </m:properties>
    </content>
  </entry>
</feed>

次に同じレポート結果を JSON 形式で示します。

  {
    "d":
      {
        "results":
          [
              {
                "__metadata":
                  {
                    "id":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTraffic(0)",
                    "uri":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTraffic(0)",
                    "type":"TenantReporting.MailTrafficReport"
                  },
                "Date":"\/Date(1356998400000)\/",
                "MessageCount":100
              },
              {
                "__metadata":
                  {
                    "id":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTraffic(1)",
                    "uri":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTraffic(1)",
                    "type":"TenantReporting.MailTrafficReport"
                  },
                "Date":"\/Date(1357084800000)\/",
                "MessageCount":150
              },
              {
                "__metadata":
                  {
                    "id":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTraffic(2)",
                    "uri":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTraffic(2)",
                    "type":"TenantReporting.MailTrafficReport"
                  },
                "Date":"\/Date(1357171200000)\/",
                "MessageCount":158
              },
              {
                "__metadata":
                  {
                    "id":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTraffic(3)",
                    "uri":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTraffic(3)",
                    "type":"TenantReporting.MailTrafficReport"
                  },
                "Date":"\/Date(1357257600000)\/",
                "MessageCount":178
              },
              {
                "__metadata":
                  {
                    "id":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTraffic(4)",
                    "uri":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTraffic(4)",
                    "type":"TenantReporting.MailTrafficReport"
                  },
                "Date":"\/Date(1357344000000)\/",
                "MessageCount":116
              },
              {
                "__metadata":
                  {
                    "id":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTraffic(5)",
                    "uri":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTraffic(5)",
                    "type":"TenantReporting.MailTrafficReport"
                  },
                "Date":"\/Date(1357430400000)\/",
                "MessageCount":108
              },
              {
                "__metadata":
                  {
                    "id":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTraffic(6)",
                    "uri":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTraffic(6)",
                    "type":"TenantReporting.MailTrafficReport"
                  },
                "Date":"\/Date(135751680000)\/",
                "MessageCount":45
              }
          ]
      }
  }

入力パラメーターとレポート出力列

フィールド表の [入力/出力] という表記には次の意味があります。

  • フィールド表で [入力] が付いているフィールドは、主に $filter=、$orderby= およびレポートが返すエントリを制限する他のクエリ オプションで使用するためのものです。フィールド表で [入力] が付いているフィールドは、$select= オプションに含めることができ、レポート エントリに表示されますが、有用なデータは入っていません。

  • フィールド表で [入力/出力] が付いているフィールドは、列選択 ($select=) およびエントリ制限 ($filter= と $orderby=) オプションの両方で使用できます。これらのフィールドを $select= オプションに含めると、レポート エントリに表示され、利用可能な場合には有用なデータが入っています。

互換性

MailTraffic レポートが Office 365 サービス バージョン 2013-V1 で導入されました。バージョン管理の詳細については「Office 365 レポート Web サービスのバージョン管理」を参照してください。

対応する Windows PowerShell コマンドレット

MailTraffic レポートは、Get-MailTrafficReportWindows PowerShell コマンドレットと同じ情報を返します。

権限

レポートにアクセスするアカウントには、その Office 365 組織の管理権限が必要です。このレポートを Office 365 コントロール パネルで表示できる場合、そのアカウントには REST Web サービスからデータを取得する権限があります。 このレポートでは、ユーザーを参照のみ可受信者の役割に割り当てる必要があります。 既定の Office 365 権限構造では、次の管理者権限があるユーザーはこのレポートにアクセスできます: 課金管理者、全体管理者、パスワード管理者、サービス管理者、ユーザー管理の管理者。詳しくは、「MailboxUsage レポート」を参照してください。

データの粒度、永続性、可用性

このレポートで使用できる情報は、各イベントの正確な日付と時刻と共に保存されます。 StartDate と EndDate フィールドを $filter オプションに含めて、ふさわしい期間や間隔を指定できます。 時刻は電子メール メッセージをスキャンするサーバーのタイム ゾーンで報告されます。 このレポートは、AggregateBy フィールドの指定に従って、数時間または数日に渡ってメッセージ数を計算します。

このレポートの情報は、14 日間またはサブスクリプションをキャンセルするまで利用可能です。

イベントがレポートに表示されるまで、最大で 24 時間遅れる場合があります。