---
updatedAt: 2026-05-28T16:04:28.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/powershell/llms.txt
---

# Legacy report

New-LegacyReport

## Synopsis

Generate a report. This function uses Reporting v1 API.

## Syntax

```powershell Attributes (Default)
New-LegacyReport -Name <String> -Version <Int32> -Start <String> -End <String> [-DataWrapLabel <String>] [-DataWrapNumberOfItems <Int32>] -ObjectIDs <String[]> -Interval <String> [-Filters <String[]>] [-Metrics <String[]>] [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```
```powershell Body
New-LegacyReport -Name <String> -Version <Int32> -Start <String> -End <String> [-DataWrapLabel <String>] [-DataWrapNumberOfItems <Int32>] -Interval <String> -Body <Object> [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```

## Description

Produce a report in either JSON or CSV format for a specific version of a type of report. In CSV data, values with commas or space characters are quoted. Query parameters specify the range of data and the aggregation interval for each record.

## Parameters

<table>
  <tbody>
    <tr>
      <td class="ps-td"><code>&#8209;AccountSwitchKey</code></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>An account credential key that lets you move between accounts when using an API client enabled for multiple accounts. To find account switch keys, use <a href="https://techdocs.akamai.com/powershell/docs/get-accountswitchkey">Get-AccountSwitchKey</a>.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;Body</code><br/><span style="color: red; padding-left: 11px; font-size: 13px;"><em>Conditionally required</em></span></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">Object</span>
          <span class="ps-param-metadata">Parameter sets: <code>Body</code></span>
          <span class="ps-param-metadata">Pipeline input: ByValue</span>
        </div>
        <div>
          <p>A request body, either as a <code>PSCustomObject</code> or a string. This parameter supports pipelining.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;DataWrapLabel</code></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>Label used as title for grouped record.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;DataWrapNumberOfItems</code></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">Int</span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>For reports that allow non-top values to cluster, this specifies the number of top values to report on separately.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;EdgeRCFile</code></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>Your EdgeGrid resource file to authenticate your command. Defaults to <code>~/.edgerc</code>.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;End</code><br/><span style="color: red; padding-left: 11px; font-size: 13px;"><em>Required</em></span></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>The end of the reported period as an ISO 8601 timestamp with a timezone. Any data that matches the <code>end</code> value's timestamp is excluded from the report.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;Filters</code></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String[]</span>
          <span class="ps-param-metadata">Parameter sets: <code>Attributes</code></span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>The criteria to filter the report's data. The set of available filters depends on the type of report. Separate each filter name and value with an equals (<code>=</code>) character, and separate various name-value pairs with commas (<code>,</code>). To specify more than one filter value, repeat the filter name.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;Interval</code><br/><span style="color: red; padding-left: 11px; font-size: 13px;"><em>Required</em></span></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Accepted values: <code>FIVE_MINUTES</code>, <code>HOUR</code>, <code>DAY</code>, <code>WEEK</code>, <code>MONTH</code></span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>The duration of each data record, either <code>FIVE_MINUTES</code>, <code>HOUR</code>, <code>DAY</code>, <code>WEEK</code>, or <code>MONTH</code>. Support for specific interval values may vary by report type.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;Metrics</code></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String[]</span>
          <span class="ps-param-metadata">Parameter sets: <code>Attributes</code></span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>A comma-separated list of metrics to include in the report, otherwise all metrics are retrieved if omitted. The set of available metrics depends on the type of report.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;Name</code><br/><span style="color: red; padding-left: 11px; font-size: 13px;"><em>Required</em></span></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Pipeline input: ByPropertyName</span>
        </div>
        <div>
          <p>The type of report.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;ObjectIDs</code><br/><span style="color: red; padding-left: 11px; font-size: 13px;"><em>Conditionally required</em></span></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String[]</span>
          <span class="ps-param-metadata">Parameter sets: <code>Attributes</code></span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>An alternative to <code>-AllObjectIDs</code>, specifies the set of unique IDs for the given object type you want to report on, formatted as a comma-delimited list.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;Section</code></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>The section name in your EdgeGrid resource file to retrieve authentication credentials from. Defaults to <code>default</code>.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;Start</code><br/><span style="color: red; padding-left: 11px; font-size: 13px;"><em>Required</em></span></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>The start of the reported period as an ISO 8601 timestamp with timezone.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;Version</code><br/><span style="color: red; padding-left: 11px; font-size: 13px;"><em>Required</em></span></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">Int</span>
          <span class="ps-param-metadata">Pipeline input: ByPropertyName</span>
        </div>
        <div>
          <p>The version of the report type.</p>
        </div>
      </td>
    </tr>
  </tbody>
</table>

## Related Links

* [User Guide: Reporting](https://techdocs.akamai.com/powershell/docs/reports)
* [API Reference](https://techdocs.akamai.com/reporting/v1/reference/post-report-version-data)

# Sibling pages

* [Report](https://techdocs.akamai.com/powershell/docs/new-report.md)