共用方式為


MailTrafficPolicy 報告

MailTrafficPolicy 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

None 指定

[納入/剔除]如果有任何郵件採取的動作的描述。此欄位可能會是空白的如果則為 null 來執行任何動作。如需有效值巨集指令,請參閱MailFilterList 報告

SetSpamConfidenceLevel, RejectMessage

2013-V1

AggregateBy

string

None 指定

[In會指出是否要合併涵蓋整天報告項目中的資料。允許的唯一$filter值是Day和Hour。如果$select選項包含此欄位永遠會傳回null。未提供,當報表彙總段 1 小時。請參閱 「 備註 」 小節的詳細資訊。

Day或Hour

2013-V1

Date

System.DateTime

Edm.DateTime

[納入/剔除]日期及時間為垃圾郵件偵測到郵件。

簡短日期(例如03/10/2013) 或使用引號 (例如"03/10/2013 4:55 PM") 的日期時間

2013-V1

Direction

string

None 指定

[納入/剔除]會指定是否已傳送郵件給 (Inbound) 或從 (Outbound) 組織它已偵測到為垃圾郵件時。

值為受限於Inbound和Outbound。

2013-V1

DlpPolicy

string

None 指定

[納入/剔除]套用至郵件的資料遺失防護 (DLP) 原則名稱。如需有效 DlpPolicy 值的資訊,請參閱MailFilterList 報告

Financial Data Detection, HIPAA Detection, PII Detection

2013-V1

Domain

string

未指定

[納入/剔除]已處理的電子郵件的完整的網域名稱。

example.onmicrosoft.com

2013-V1

EndDate

System.DateTime

Edm.DateTime

[In此欄位用來限制在報告期間。使用此欄位$filter查詢選項可設定的結束日期和時間的報表期間。如果您提供EndDate$filter ] 選項,您也必須提供StartDate。

簡短日期(例如03/10/2013) 或使用引號 (例如"03/10/2013 4:55 PM") 的日期時間

2013-V1

EventType

string

None 指定

[納入/剔除]掃描記錄的事件類型。如需有效EventType值的資訊,請參閱MailFilterList 報告

SpamContentFiltered, SpamIPBlock

2013-V1

MessageCount

int

Edm.Int64

[納入/剔除]郵件符合其他欄位,指定彙總期的類別數目。

1254

2013-V1

Organization

string

None 指定

[納入/剔除]已處理的電子郵件的完整的網域名稱。

example.onmicrosoft.com

2013-V1

StartDate

System.DateTime

Edm.DateTime

[In此欄位用來限制在報告期間。若要設定的開始日期和時間的報表期間使用$filter查詢選項中的此欄位。如果您提供StartDate$filter ] 選項,您還必須指定EndDate。

簡短日期(例如03/10/2013) 或使用引號 (例如"03/10/2013 4:55 PM") 的日期時間

2013-V1

SummarizeBy

string

None 指定

[納入/剔除]使用此欄位$filter選項中指定 [報表] 欄位會決定報告項目合併表單摘要的方式。如果$select選項包含此欄位永遠會傳回null。請參閱 「 備註 」 小節的詳細資訊。

Action、 EventType、 Domain及Direction是唯一允許的值可用於此欄位使用$filter選項。

2013-V1

TransportRule

string

None 指定

處理步驟中執行Microsoft Exchange傳輸規則的名稱。如需有效TransportRule值的資訊,請參閱MailFilterList 報告

PII Detection

2013-V1

* WCF 類型參照Visual Studio中建立Windows Communication Foundation (WCF)服務參考時指定給欄位的.NET Framework資料類型。EDM 類型參照傳回 Atom 格式化報告中的 ADO.NET 實體資料模型 (EDM) 類型。

* * 如需 [納入/剔除] 指標,請參閱 「 輸入參數和報告輸出欄 」 一節。

備註

在報表中的每個項目包含數個欄位的中繼資料。如需詳細資訊請參閱一般 Office 365 報告 web 服務所傳回的中繼資料

Date欄位表示郵件時Office 365系統會處理與報告中的這些伺服器的時區。

使用 StartDate 和 EndDate

StartDate和EndDate欄位無法提供報表結果中的實用資訊以及一律設為0001-01-01T00:00:00Z報表在輸出中。它們都是要啟用的報告的時間間隔,輕鬆限制,並提供比就是可在 「 每日 」 報表 rlo 的精確度。

例如,錄製每小時為基礎的電子郵件型拒絕服務攻擊時這可以是特別有用。時使用這些欄位,則必須包含兩者$filter ] 選項。兩者都視為選擇性的但如果您提供一個,您必須提供其他。如果查詢中沒有提供 StartDate/EndDate 組的名稱、 預設的報表期間為前兩週。本主題稍後的 「 範例 」 一節示範如何使用StartDate和EndDate欄位。

使用 AggregateBy 欄位

MailTrafficPolicy報表會傳回Office 365系統中的電子郵件相關事件的摘要。每個事件會記錄其Action、 Event、 Date、 Sender,依此類推。該記錄的資料包含的確切的日期和時間的每個事件。「 詳細資料 」 報告,例如MailDetailMalware,提供特定事件和其確實時間的清單。「 流量 」 報告,例如MailTrafficPolicy、 摘要和可提供這些事件數量超過兩個持續時間: 時間及日期。使用$filter查詢選項、 哪些持續時間指定在下列範例所示。如果沒有AggregateBy比較隨附$filter選項中,會使用預設Hour 。

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

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

使用 SummarizeBy 欄位

SummarizeBy欄位可讓您 「 摺疊 」 在指定的欄位名稱的報表輸出。例如,假設期間單一天 long 報表期間未發生 200 內送及 100 外寄電子郵件。如果查詢包含$filter=AggregateBy eq ‘Day’,報告就會傳回兩個不同的項目天: 一個用於顯示為 200 個MessageCount及DirectionInbound,與另一個項目顯示 100 MessageCount及OutboundDirection的外寄電子郵件的內送電子郵件。如果您也提供$filter ] 選項,如SummarizeBy eq 'Direction'、 所示的SummarizeBy欄位報表會包含一個項目當天的、 空白Direction ] 欄位中,與 300 MessageCount 。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/MailTrafficPolicy?
$select=Date,Direction,MessageCount&
$filter=AggregateBy%20eq%20'Day'&
$format=Atom

下列說明要求的結果。簡化的結果,大部分的中繼資料元素已移除。請注意有兩個項目、 一個具有Direction的Inbound、 及其他OutboundDirection具有相同的工作日。

<?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/MailTrafficPolicy</id>
  <title type="text">MailTrafficPolicy</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/MailTrafficPolicy?
$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/MailTrafficPolicy</id>
  <title type="text">MailTrafficPolicy</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 月 1 日到 Atom xml 格式的組織。針對此報表,已使用SummarizeBy EventType ,因此的輸出是一個報表的項目所有訊息配置所示。分行符號已新增至的要求和回應,而且為了回應已移除的項目。

https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MailTrafficPolicy?
$select=Date,DlpPolicy,MessageCount,TransportRule&
$filter=Direction%20eq%20'Inbound'%20and%20
  AggregateBy%20eq%20'Day'%20and%20
  StartDate%20eq%20datetime'2013-01-01T00:00:00Z'%20and%20
  EndDate%20eq%20datetime'2013-01-02T00:00:00Z'&$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/MailTrafficPolicy</id>
  <title type="text">MailTrafficPolicy</title>
  <updated>2013-02-09T15:25:28Z</updated>
  <link rel="self" title="MailTrafficPolicy" href="MailTrafficPolicy" />
  <entry>
    <id>https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficPolicy(0)</id>
    <category term="TenantReporting.MailTrafficPolicyReport"
      scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <link rel="edit" title="MailTrafficPolicyReport" href="MailTrafficPolicy(0)" />
    <title />
    <updated>2013-02-09T15:25:28Z</updated>
    <author>
      <name />
    </author>
    <content type="application/xml">
      <m:properties>
        <d:Date m:type="Edm.DateTime">2013-01-01T00:00:00</d:Date>
        <d:DlpPolicy>
        </d:DlpPolicy>
        <d:TransportRule>PII Detection</d:TransportRule>
        <d:MessageCount m:type="Edm.Int32">17</d:MessageCount>
      </m:properties>
    </content>
  </entry>
  <entry>
    <id>https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficPolicy(1)</id>
    <category term="TenantReporting.MailTrafficPolicyReport" 
      scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <link rel="edit" title="MailTrafficPolicyReport" href="MailTrafficPolicy(1)" />
    <title />
    <updated>2013-02-09T15:25:28Z</updated>
    <author>
      <name />
    </author>
    <content type="application/xml">
      <m:properties>
        <d:Date m:type="Edm.DateTime">2013-01-01T00:00:00</d:Date>
        <d:DlpPolicy>
        </d:DlpPolicy>
        <d:TransportRule>PII Detection</d:TransportRule>
        <d:MessageCount m:type="Edm.Int32">17</d:MessageCount>
      </m:properties>
    </content>
  </entry>
  <entry>
    <id>https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficPolicy(2)</id>
    <category term="TenantReporting.MailTrafficPolicyReport" 
      scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <link rel="edit" title="MailTrafficPolicyReport" href="MailTrafficPolicy(2)" />
    <title />
    <updated>2013-02-09T15:25:28Z</updated>
    <author>
      <name />
    </author>
    <content type="application/xml">
      <m:properties>
        <d:Date m:type="Edm.DateTime">2013-01-01T00:00:00</d:Date>
        <d:DlpPolicy>PII Detection</d:DlpPolicy>
        <d:TransportRule>PII Detection</d:TransportRule>
        <d:MessageCount m:type="Edm.Int32">17</d:MessageCount>
      </m:properties>
    </content>
  </entry>
  <entry>
    <id>https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficPolicy(3)</id>
    <category term="TenantReporting.MailTrafficPolicyReport" 
      scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <link rel="edit" title="MailTrafficPolicyReport" href="MailTrafficPolicy(3)" />
    <title />
    <updated>2013-02-09T15:25:28Z</updated>
    <author>
      <name />
    </author>
    <content type="application/xml">
      <m:properties>
        <d:Date m:type="Edm.DateTime">2013-01-01T00:00:00</d:Date>
        <d:DlpPolicy>PII Detection</d:DlpPolicy>
        <d:TransportRule>PII Detection</d:TransportRule>
        <d:MessageCount m:type="Edm.Int32">17</d:MessageCount>
      </m:properties>
    </content>
  </entry>
  <entry>
    <id>https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficPolicy(4)</id>
    <category term="TenantReporting.MailTrafficPolicyReport" 
      scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <link rel="edit" title="MailTrafficPolicyReport" href="MailTrafficPolicy(4)" />
    <title />
    <updated>2013-02-09T15:25:28Z</updated>
    <author>
      <name />
    </author>
    <content type="application/xml">
      <m:properties>
        <d:Date m:type="Edm.DateTime">2013-01-01T00:00:00</d:Date>
        <d:DlpPolicy>PII Detection</d:DlpPolicy>
        <d:TransportRule>PII Detection</d:TransportRule>
        <d:MessageCount m:type="Edm.Int32">17</d:MessageCount>
      </m:properties>
    </content>
  </entry>
</feed>

下列 JSON 格式顯示相同的報告結果。

  {
    "d":
      {
        "results":
          [
              {
                "__metadata":
                  {
                    "id":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficPolicy(0)",
                    "uri":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficPolicy(0)",
                    "type":"TenantReporting.MailTrafficPolicyReport"
                  },
                "Date":"\/Date(1356998400000)\/",
                "DlpPolicy":"",
                "TransportRule":"PII Detection",
                "MessageCount":17
              },
              {
                "__metadata":
                  {
                    "id":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficPolicy(1)",
                    "uri":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficPolicy(1)",
                    "type":"TenantReporting.MailTrafficPolicyReport"
                  },
                "Date":"\/Date(1356998400000)\/",
                "DlpPolicy":"",
                "TransportRule":"PII Detection",
                "MessageCount":17
              },
              {
                "__metadata":
                  {
                    "id":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficPolicy(2)",
                    "uri":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficPolicy(2)",
                    "type":"TenantReporting.MailTrafficPolicyReport"
                  },
                "Date":"\/Date(1356998400000)\/",
                "DlpPolicy":"PII Detection",
                "TransportRule":"PII Detection",
                "MessageCount":17
              },
              {
                "__metadata":
                  {
                    "id":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficPolicy(3)",
                    "uri":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficPolicy(3)",
                    "type":"TenantReporting.MailTrafficPolicyReport"
                  },
                "Date":"\/Date(1356998400000)\/",
                "DlpPolicy":"PII Detection",
                "TransportRule":"PII Detection",
                "MessageCount":17
              },
              {
                "__metadata":
                  {
                    "id":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficPolicy(4)",
                    "uri":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/MailTrafficPolicy(4)",
                    "type":"TenantReporting.MailTrafficPolicyReport"
                  },
                "Date":"\/Date(1356998400000)\/",
                "DlpPolicy":"PII Detection",
                "TransportRule":"PII Detection",
                "MessageCount":17
              }
          ]
      }
  }

輸入參數並報告輸出欄

在 [欄位] 表格中的 [納入/剔除] 指標具有下列含義:

  • 表主要用於$filter=、 $orderby=、 欄位中的欄位標示為 [In 和其他查詢選項會限制報告傳回的項目。$select= ] 選項,可以包含 [欄位] 表格中標示為 [中] 的欄位和他們會出現在報表項目,但他們會包含任何的有用資料。

  • 欄位標記 [納入/剔除] 欄選取範圍 ($select=) 及項目限制 ($filter=和$orderby=) 選項中可用資料表的欄位中。加入時這些欄位之一$select= ] 選項,它將會出現在報表項目並可用時將會包含有用的資料。

相容性

Office 365 service version 2013-V1中已採用 MailTrafficPolicy 報表。如需有關版本設定的詳細資訊,請參閱在 「 Office 365 報告 」 web 服務的版本控制

相對應的 Windows PowerShell cmdlet

MailDetailSpam 報表會傳回資訊與Get MailTrafficPolicyReport Windows PowerShell指令程式相同。

權限

您用來存取報告的帳戶必須在Office 365組織中有系統管理權限。如果帳戶可以Office 365 [控制台] 中檢視這份報告的帳戶已從 REST web 服務擷取資料的權限。這份報告要求使用者指派給 「 僅檢視收件者 」 角色。在預設Office 365權限結構上使用下列的系統管理員權限的使用者可以存取此報告: 帳務管理員、 全域管理員、 密碼管理員、 服務管理員及使用者管理管理員。

資料精確度、 保存及可用性

這份報告中提供的資訊會儲存具有完全的日期和時間為每個事件。您可以使用任何合適的時間和工期由$filter選項包括StartDate和EndDate欄位。時間報告以掃描電子郵件伺服器的時區。這份報告來計算郵件計數透過小時或數天,根據 [ AggregateBy ] 欄位。

這份報告的資訊是可用的 14 天,或取消訂閱直到一段。

事件可能最多它們顯示在報表中前 24 小時的延遲。