- [HTTP request](https://developers.google.com/display-video/exchange-reporting/reference/rest/v1alpha1/exchanges/generateReport#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/display-video/exchange-reporting/reference/rest/v1alpha1/exchanges/generateReport#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/display-video/exchange-reporting/reference/rest/v1alpha1/exchanges/generateReport#body.request_body)
  - [JSON representation](https://developers.google.com/display-video/exchange-reporting/reference/rest/v1alpha1/exchanges/generateReport#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/display-video/exchange-reporting/reference/rest/v1alpha1/exchanges/generateReport#body.response_body)
- [Authorization scopes](https://developers.google.com/display-video/exchange-reporting/reference/rest/v1alpha1/exchanges/generateReport#body.aspect)
- [ReportType](https://developers.google.com/display-video/exchange-reporting/reference/rest/v1alpha1/exchanges/generateReport#ReportType)
- [DimensionId](https://developers.google.com/display-video/exchange-reporting/reference/rest/v1alpha1/exchanges/generateReport#DimensionId)

Generates and returns the report Id. The report is not persisted. Invocations with the same request will regenerate the report.

### HTTP request

`POST https://dv360exchangereporting.googleapis.com/v1alpha1/{exchange=exchanges/*}:generateReport`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `exchange` | `string` Required. Name of the exchange that reports that belongs to. Example: "exchanges/123" Required. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "startDate": string, "endDate": string, "reportType": enum (`https://developers.google.com/display-video/exchange-reporting/reference/rest/v1alpha1/exchanges/generateReport#ReportType`), "dimensionIds": [ enum (`https://developers.google.com/display-video/exchange-reporting/reference/rest/v1alpha1/exchanges/generateReport#DimensionId`) ] } ``` |

| Fields ||
|---|---|
| `startDate` | `string` Required. Start date of the reports in ISO_8601 format YYYY-MM-DD, inclusive. Required as input. |
| `endDate` | `string` Required. End date of the reports in ISO_8601 format YYYY-MM-DD, inclusive. Required as input. |
| `reportType` | ``enum (`https://developers.google.com/display-video/exchange-reporting/reference/rest/v1alpha1/exchanges/generateReport#ReportType`)`` Required. Report type, if not specified, will return errors. |
| `dimensionIds[]` | ``enum (`https://developers.google.com/display-video/exchange-reporting/reference/rest/v1alpha1/exchanges/generateReport#DimensionId`)`` Optional. List of Dimensions based on which the report will be generated. If null then only include publisher ID. If the dimensions are not supported in a specific type of report, they will be ignored. |

### Response body

If successful, the response body contains an instance of `https://developers.google.com/display-video/exchange-reporting/reference/rest/v1alpha1/exchanges.reports#Report`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/doubleclickbidmanager`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).

## ReportType

Report type.

| Enums ||
|---|---|
| `REPORT_TYPE_UNSPECIFIED` | Report type unspecified, invalid input value. |
| `HOURLY` | An hourly report type. |
| `DAILY` | A daily report type. |
| `WEEKLY` | A weekly report type. |
| `MONTHLY` | A monthly report type. |
| `AWBID_DAILY` | An AwBid Daily report type. |
| `AWBID_WEEKLY` | An AwBid weekly report type. |
| `AWBID_MONTHLY` | An AwBid monthly report type. |
| `AWBID_OUT_OF_MONTH_IVT` | An AwBid out of month IVT report type. |

## DimensionId

Report DimensionId enum.

| Enums ||
|---|---|
| `DIMENSION_ID_UNSPECIFIED` | Report Dimension unspecified, invalid input value. |
| `PARTNER_ID` | Partner ID, only supported in Daily report. |
| `DEVICE_TYPE` | Device type, only supported in Daily report. |
| `CREATIVE_ID` | Creative ID, only supported in Daily report. Please notice that this dimension could significantly contribute to the file size of the reports. And the reports include this dimension could take hours to run. In the future we will limit the rating on these heavy loading fields. |
| `CREATIVE_TYPE` | Creative type, only supported in Daily report. Please notice that this dimension could significantly contribute to the file size of the reports. And the reports include this dimension could take hours to run. In the future we will limit the rating on these heavy loading fields. |
| `REGION_CODE` | Country/Region code, only supported in Daily report. |
| `DEAL_ID` | Deal ID, mapping to inventory source, only supported in Daily report. |
| `PUBLISHER_ID` | Publisher ID, if input dimension Id list is null, this is the default dimension. |
| `SITE_ID` | Represents the site identifier (Web Domain or App Bundle ID), only supported in Daily report. |
| `SITE_DISPLAY_NAME` | Represents the site display name (Web Domain or App Name), only supported in Daily report. |