MailTrafficTop レポート
MailTrafficTop REST URI は、組織内で最大数の電子メール メッセージを送受信したユーザーに関する概要情報を提供します。レポートの開始日時と終了日時は、データの集計期間として要求内で指定できます。
最終更新日: 2015年9月17日
適用対象: Office 365
REST URI
https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MailTrafficTop[?ODATA options]
フィールド
次のフィールドは、$select、$filter、$orderby ODATA2 クエリ オプションに指定できます。$select オプションが指定されない場合、すべてのフィールドが返されます。
名前 |
WCF 型* |
EDM 型* |
[入力/出力]** 説明 |
値の例 |
提供されたバージョン |
---|---|---|---|---|---|
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 |
Name |
string |
指定なし |
レポート エントリで集計されたメッセージに関連付けられたユーザーの SMTP 電子メール アドレス。 |
userone@example.com |
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) サービス参照が作成されたときにフィールドに割り当てられる .NET Framework データ型を参照します。EDM 型は、Atom 形式のレポートで返される ADO.NET エンティティ データ モデル (EDM) 型を参照します。
**[入力/出力] インジケータについては、「入力パラメーターとレポート出力列」のセクションを参照してください。
解説
レポート内の各エントリにはメタデータの複数のフィールドが含まれます。 詳しくは、「Office 365 レポート Web サービスが返す一般的なメタデータ」を参照してください。
Date フィールドは、メッセージが Office 365 システムで処理された日時を示し、それらのサーバーのタイム ゾーンで報告されます。
ODATA $orderby オプションはこのレポートでは機能しません。
StartDate と EndDate の使用
StartDate と EndDate フィールドは、レポート結果では有用な情報を提供しませんし、レポート出力では常に 0001-01-01T00:00:00Z に設定されます。これらは、レポート時間枠を簡単に制限できるようにするためのもので、「日次」のレポートよりも細かく時間指定できるようにします。
これは、たとえば、電子メールベースのサービス拒否攻撃を時間単位で記録するときに特に役立ちます。これらのフィールドを使用する際、両方とも $filter オプションに含める必要があります。どちらもオプションですが、一方を指定した場合は、もう一方も指定する必要があります。StartDate/EndDate のペアがクエリに指定されていない場合、既定のレポート期間は、前の 2 週間になります。このトピックの後ろにある「サンプル」セクションで、StartDate フィールドと EndDate フィールドの使用方法について示します。
AggregateBy フィールドの使用
MailTrafficTop レポートは、Office 365 システムの最大メッセージ カウント ユーザーの集計を返します。各イベントは、その Action、Event、Date、Sender などと一緒に記録されます。Office 365 で記録されるデータには、各イベントの正確な日時が含まれます。MailDetailMalware などの「詳細」レポートは、特定のイベントとその正確な時刻のリストを提供します。MailTrafficTop などの「トラフィック」レポートは、時間と日という 2 つの期間におけるこれらのイベントのカウントを集計して提供できます。以下の例で示すように、$filter クエリ オプションで、使用する期間を指定します。AggregateBy 比較が $filter オプションに含まれていない場合は、既定の Hour が使用されます。
https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MailTrafficTop?$filter=AggregateBy eq 'Day'
https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MailTrafficTop?$filter=AggregateBy eq 'Hour'
SummarizeBy フィールドの使用
SummarizeBy フィールドを使用すれば、指定したフィールド名でレポート出力を「折りたたむ」ことができます。たとえば、1 日分のレポート期間に 200 件の受信メールと 100 件の送信メールが発生したとします。クエリに $filter=AggregateBy eq ‘Day’ が含まれている場合は、レポートがその日に関する 2 つの別々のエントリを返します。1 つは受信メール用で MessageCount が 200 で Direction が Inbound を示し 、もう 1 つは送信メール用で MessageCount が 100 で Direction が Outbound を示します。SummarizeBy eq ‘Direction’ のように $filter オプションで SummarizeBy フィールドも指定した場合は、レポートにはその日に関する 1 つのエントリ (Direction フィールドが空で MessageCount が 300) だけが含まれます。Direction フィールドが空の理由は、そのエントリで Direction eq ‘Inbound’ メッセージ カウントと Direction eq ‘Outbound’ メッセージ カウントの両方が集計されたためです。
SummarizeBy での使用がサポートされているのは、次のフィールドだけです。
Action
EventType
Direction
Domain
要求には、次の $filter オプションのように、集計に使用できる複数のフィールドを含められます。
$filter=SummarizeBy eq 'EventType,Action'
要求がフィールドに SummarizeBy を使用しており、かつそのフィールド名が $select オプションにも含まれている場合、そのフィールドは常に空の値で報告されます。
以下の要求は、Name、Date、Direction、および MessageCount フィールドだけが返される、上位電子メール ユーザーの日次集計を要求する方法を示しています。結果は日単位で集計されます。見やすくするために、要求に改行が追加されています。
https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MailTrafficTop?
$select= Date,Name,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/MailTrafficTop</id>
<title type="text">MailTrafficTop</title>
<entry>
<content type="application/xml">
<m:properties>
<d:Date m:type="Edm.DateTime">2013-01-29T00:00:00</d:Date>
<d:Name>userone@example.onmicrosoft.com</d:Name>
<d:Direction>Name</d:Direction>
<d:MessageCount m:type="Edm.Int32">55</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:Name>userone@example.onmicrosoft.com</d:Name>
<d:Direction>Outbound</d:Direction>
<d:MessageCount m:type="Edm.Int32">4</d:MessageCount>
</m:properties>
</content>
</entry>
</feed>
同じ要求に Direction による要約を追加した場合、結果は次のようになります。
https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MailTrafficTop?
$select=Date,Name,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/MailTrafficTop</id>
<title type="text">MailTrafficTop</title>
<entry>
<content type="application/xml">
<m:properties>
<d:Direction>Inbound</d:Direction>
<d:Date m:type="Edm.DateTime">2013-01-29T00:00:00</d:Date>
<d:Name>userone@example.onmicrosoft.com</d:Name>
<d:Direction>
</d:Direction>
<d:MessageCount m:type="Edm.Int32">59</d:MessageCount>
</m:properties>
</content>
</entry>
</feed>
例
以下の例は、2013 年 2 月 6 日に最多の電子メールを受信した上位 3 人のユーザー アカウントに関する情報を Atom 形式で取得する方法を示しています。見やすくするために、要求と応答の両方に改行が追加されています。
https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MailTrafficTop?
$select=Name,Date,Direction,MessageCount&
$filter=AggregateBy%20eq%20'Day'%20and%20
StartDate%20eq%20datetime'2013-02-06T00:00:00Z'%20and%20
EndDate%20eq%20datetime'2013-02-07T00:00:00Z'%20and%20
Direction%20eq%20'Inbound'&
$orderby=MessageCount&
$top=3&
$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/MailTrafficTop</id>
<title type="text">MailTrafficTop</title>
<updated>2013-02-09T16:19:53Z</updated>
<link rel="self" title="MailTrafficTop" href="MailTrafficTop" />
<entry>
<id>https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficTop(0)</id>
<category term="TenantReporting.MailTrafficTopReport"
scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" title="MailTrafficTopReport" href="MailTrafficTop(0)" />
<title />
<updated>2013-02-09T16:19:53Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:Date m:type="Edm.DateTime">2013-02-06T00:00:00</d:Date>
<d:Name>userone@example.onmicrosoft.com</d:Name>
<d:Direction>Inbound</d:Direction>
<d:MessageCount m:type="Edm.Int32">1</d:MessageCount>
</m:properties>
</content>
</entry>
<entry>
<id>https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficTop(1)</id>
<category term="TenantReporting.MailTrafficTopReport"
scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" title="MailTrafficTopReport" href="MailTrafficTop(1)" />
<title />
<updated>2013-02-09T16:19:53Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:Date m:type="Edm.DateTime">2013-02-06T00:00:00</d:Date>
<d:Name>usertwo@example.onmicrosoft.com</d:Name>
<d:Direction>Inbound</d:Direction>
<d:MessageCount m:type="Edm.Int32">71</d:MessageCount>
</m:properties>
</content>
</entry>
<entry>
<id>https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficTop(2)</id>
<category term="TenantReporting.MailTrafficTopReport"
scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" title="MailTrafficTopReport" href="MailTrafficTop(2)" />
<title />
<updated>2013-02-09T16:19:53Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:Date m:type="Edm.DateTime">2013-02-06T00:00:00</d:Date>
<d:Name>userthree@example.onmicrosoft.com</d:Name>
<d:Direction>Inbound</d:Direction>
<d:MessageCount m:type="Edm.Int32">6</d:MessageCount>
</m:properties>
</content>
</entry>
</feed>
次に同じレポート結果を JSON 形式で示します。
{
"d":
[
{
"__metadata":
{
"id":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficTop(0)",
"uri":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficTop(0)",
"type":"TenantReporting.MailTrafficTopReport"
},
"Date":"\/Date(1360108800000)\/",
"Name":"useone@example.onmicrosoft.com",
"Direction":"Inbound",
"MessageCount":1
},
{
"__metadata":
{
"id":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficTop(1)",
"uri":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficTop(1)",
"type":"TenantReporting.MailTrafficTopReport"
},
"Date":"\/Date(1360108800000)\/",
"Name":"usetwo@example.onmicrosoft.com",
"Direction":"Inbound",
"MessageCount":71
},
{
"__metadata":
{
"id":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficTop(2)",
"uri":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficTop(2)",
"type":"TenantReporting.MailTrafficTopReport"
},
"Date":"\/Date(1360108800000)\/",
"Name":"usethree@example.onmicrosoft.com",
"Direction":"Inbound",
"MessageCount":6
}
]
}
入力パラメーターとレポート出力列
フィールド表の [入力/出力] という表記には次の意味があります。
フィールド表で [入力] が付いているフィールドは、主に $filter=、$orderby= およびレポートが返すエントリを制限する他のクエリ オプションで使用するためのものです。フィールド表で [入力] が付いているフィールドは、$select= オプションに含めることができ、レポート エントリに表示されますが、有用なデータは入っていません。
フィールド表で [入力/出力] が付いているフィールドは、列選択 ($select=) およびエントリ制限 ($filter= と $orderby=) オプションの両方で使用できます。これらのフィールドを $select= オプションに含めると、レポート エントリに表示され、利用可能な場合には有用なデータが入っています。
互換性
MailTrafficTop レポートは Office 365 サービス バージョン 2013-V1 で導入されました。バージョン管理の詳細については、「Office 365 レポート Web サービスのバージョン管理」を参照してください。
対応する Windows PowerShell コマンドレット
MailTrafficTop レポートは、Get-MailTrafficTopReport Windows PowerShell コマンドレットを同じ情報を返します。
権限
レポートにアクセスするアカウントには、その Office 365 組織の管理権限が必要です。このレポートを Office 365 コントロール パネルで表示できる場合、そのアカウントには REST Web サービスからデータを取得する権限があります。 このレポートでは、ユーザーを参照のみ可受信者の役割に割り当てる必要があります。 既定の Office 365 権限構造では、次の管理者権限があるユーザーはこのレポートにアクセスできます: 課金管理者、全体管理者、パスワード管理者、サービス管理者、ユーザー管理の管理者。
データの細分性、永続性、可用性
このレポートで使用できる情報は、各イベントの正確な日付と時刻と共に保存されます。 StartDate と EndDate フィールドを $filter オプションに含めて、ふさわしい期間や間隔を指定できます。 時刻は電子メール メッセージをスキャンするサーバーのタイム ゾーンで報告されます。 このレポートは、AggregateBy フィールドの指定に従って、数時間または数日に渡ってメッセージ数を計算します。
このレポートの情報は、14 日間またはサブスクリプションをキャンセルするまで利用可能です。
イベントがレポートに表示されるまで、最大で 24 時間遅れる場合があります。