# Method: customers.exportJobHistory

- [HTTP request](https://developers.google.com/ads-data-hub/reference/rest/v1/customers/exportJobHistory#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/ads-data-hub/reference/rest/v1/customers/exportJobHistory#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/ads-data-hub/reference/rest/v1/customers/exportJobHistory#body.request_body)
  - [JSON representation](https://developers.google.com/ads-data-hub/reference/rest/v1/customers/exportJobHistory#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/ads-data-hub/reference/rest/v1/customers/exportJobHistory#body.response_body)
- [Authorization scopes](https://developers.google.com/ads-data-hub/reference/rest/v1/customers/exportJobHistory#body.aspect)

Exports job history of a customer account to customer-selected BigQuery dataset.

### HTTP request

`POST https://adsdatahub.googleapis.com/v1/{customer=customers/*}:exportJobHistory`

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

### Path parameters

| Parameters ||
|---|---|
| `customer` | `string` Required. ADH customer ID to fetch jobs for, with the format 'customers/123'. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "projectId": string, "dataset": string, "startDate": { object (`https://developers.google.com/ads-data-hub/reference/rest/v1/Date`) }, "endDate": { object (`https://developers.google.com/ads-data-hub/reference/rest/v1/Date`) }, "timeZone": string } ``` |

| Fields ||
|---|---|
| `projectId` | `string` Required. Customer project ID that the query audit log will be written to. |
| `dataset` | `string` Required. Customer dataset that the query audit log will be written to. |
| `startDate` | ``object (`https://developers.google.com/ads-data-hub/reference/rest/v1/Date`)`` Required. Job history will be exported for jobs started on or after startDate but before endDate. startDate cannot be more than 30 days from the current date. |
| `endDate` | ``object (`https://developers.google.com/ads-data-hub/reference/rest/v1/Date`)`` Required. End date for date range for job history export, exclusive. Currently, only a single day's worth of query job history can be exported. |
| `timeZone` | `string` Optional. The time zone for the start date. If not specified, defaults to 'UTC'. |

### Response body

If successful, the response body contains an instance of `https://developers.google.com/ads-data-hub/reference/rest/v1/operations#Operation`.

### Authorization scopes

Requires the following OAuth scope:

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