Sdílet prostřednictvím


Common metadata returned by the Office 365 Reporting web service

This topic describes the metadata that the Office 365 Reporting web service returns with each report and provides as part of each report entry.

Applies to: Office 365

In this article
Service-level metadata
Report-level metadata
Entry-item metadata

Service-level metadata

To obtain an XML (Atom format) document listing the reports and fields for the authenticated user, access this URL.

https://reports.office365.com/ecp/reportingwebservice/reporting.svc/$metadata

In the metadata document returned, there are three main sections:

  • EntityType elements define each type of report, any index keys, and the names and types of all the properties

  • EntityContainer element that lists all the report names and the corresponding EntityType definitions.

  • Annotations elements provide localized strings your application can use for the axis-labels in a graph. Strings are provided for the report title, x- and y-axes.

Note

Remember that the metadata document contains information only for the reports available to the user account passed in the HTTPS request.

Report-level metadata

The following fragment of an Atom XML-formatted report output provides an example of the metadata returned for a StaleMailboxDetail report. The report does not return this metadata when the application requests JSON data.

<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/StaleMailboxDetail</id>
  <title type="text">StaleMailboxDetail</title>
  <updated>2013-02-10T03:40:33Z</updated>
  <link rel="self" title="StaleMailboxDetail" href="StaleMailboxDetail" />
  

The following table lists the metadata components.

Report-level metadata components

Atom XML report-level metadata tag

Description

xml:base

Indicates the base endpoint of the reporting service. The URL is not case-sensitive.

XML namespaces

Several XML namespaces are referred to, including the standard Atom namespace, and two ODATA and Microsoft ADO-related dataservices namespaces.

<id>...</id>

Provides the base, unadorned URL of the report.

<title>…</title>

Provides a text string that can be used as the title of the report.

<updated>...</updated>

Provides the UTC date and time when the report was returned to the calling application.

<link/>

Provides information needed to construct an HTML link to the base report URL as listed in the <id> tag.

Entry-item metadata

The following XML document fragment shows an entry returned from a StaleMailboxDetail report in Atom format.

  <entry>
    <id>https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/StaleMailboxDetail(datetime'2013-01-11T00%3A00%3A00')</id>
    <category term="TenantReporting.StaleMailboxDetailReport"
      scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <link rel="edit" title="StaleMailboxDetailReport" 
      href="StaleMailboxDetail(datetime'2013-01-11T00%3A00%3A00')" />
    <title />
    <updated>2013-02-10T03:40:33Z</updated>
    <author>
      <name />
    </author>
    <content type="application/xml">
      <m:properties>
        <d:Date m:type="Edm.DateTime">2013-01-11T00:00:00</d:Date>
        <d:WindowsLiveID>userone@example.onmicrosoft.com</d:WindowsLiveID>
        <d:UserName>UserOne</d:UserName>
        <d:LastLogin m:type="Edm.DateTime" m:null="true" />
        <d:DaysInactive m:type="Edm.Int32">115</d:DaysInactive>
      </m:properties>
    </content>
  </entry>

This JavaScript fragment represents the same information in JSON format.

  {
    "d":
      [
          {
            "__metadata":
              {
                "id":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/StaleMailboxDetail(datetime'2013-01-11T00%3A00%3A00')",
                "uri":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/StaleMailboxDetail(datetime'2013-01-11T00%3A00%3A00')",
                "type":"TenantReporting.StaleMailboxDetailReport"
              },
            "Date":"\/Date(1357862400000)\/",
            "WindowsLiveID":"userone@example.onmicrosoft.com",
            "UserName":"UserOne",
            "LastLogin":null,
            "DaysInactive":115
          }
      ]
  }

Explanations of the report data fields (Date, WindowsLiveID, UserName, LastLogin, and DaysInactive) are available in StaleMailboxDetail report. The following table lists the report item-level metadata shown previously in this topic. These are all standard ODATA and ADO Data services metadata.

Entry item metadata

Atom XML item-level metadata tag

JSON JavaScript item-level metadata property

Description

<id>...</id>

"id":

Provides an identifier for the item. Although this identifier appears to be a URI, you should not assume that you can pass that value to the Reporting web service and retrieve useful results. It is only a unique identifier. The scope of uniqueness only applies to that single report result.

<category>...</category>

"type":

The value is a hierarchical text representation combining the service (TenantReporting) and report name (StaleMailboxDetailReport).

<link>...</link>

"uri":

Provides the components (Atom) or a fully-formed (JSON) URI to this report item. Not all of the reports support directly retrieving the item based on this URI. If your application uses these URIs, make sure the information returned is what you're expecting. Also, some reports return an "edit" link. Do not use these links, as they do not work.

<title />

Not provided.

This tag is always empty.

<updated>...</updated>

Not provided.

Provides the UTC date and time when the report entry was returned to the calling application.

<author><name /></author>

Not provided.

These tags are always empty.