# Method: customers.adsDataCustomers.getDataAccessBudget

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

Retrieves the data access budget for the requested ads data source for the last 366 days.

### HTTP request

`GET https://adsdatahub.googleapis.com/v1/{name=customers/*/adsDataCustomers/*/dataAccessBudget}`

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

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. Name of the data access budget. Format: customers/{customerId}/adsDataCustomers/{adsDataCustomerId}/dataAccessBudget e.g. 'customers/123/adsDataCustomers/456/dataAccessBudget'. |

### Request body

The request body must be empty.

### Response body

Data access budget state per date.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "dataDayState": [ { object (`https://developers.google.com/ads-data-hub/reference/rest/v1/customers.adsDataCustomers/getDataAccessBudget#DataDayState`) } ] } ``` |

| Fields ||
|---|---|
| `dataDayState[]` | ``object (`https://developers.google.com/ads-data-hub/reference/rest/v1/customers.adsDataCustomers/getDataAccessBudget#DataDayState`)`` Status of the budget by date. |

### Authorization scopes

Requires the following OAuth scope:

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

## DataDayState

A record containing date and state of the budget for this date.

| JSON representation |
|---|
| ``` { "date": { object (`https://developers.google.com/ads-data-hub/reference/rest/v1/Date`) }, "budgetState": enum (`https://developers.google.com/ads-data-hub/reference/rest/v1/customers.adsDataCustomers/getDataAccessBudget#BudgetState`) } ``` |

| Fields ||
|---|---|
| `date` | ``object (`https://developers.google.com/ads-data-hub/reference/rest/v1/Date`)`` Date of the data day corresponding to this record. |
| `budgetState` | ``enum (`https://developers.google.com/ads-data-hub/reference/rest/v1/customers.adsDataCustomers/getDataAccessBudget#BudgetState`)`` State of the budget for this data date. |

## BudgetState

State of the budget corresponding to a data day.

| Enums ||
|---|---|
| `BUDGET_STATE_UNSPECIFIED` | Default unspecified state, this state is not supposed to appear as the output. |
| `BUDGET_STATE_ENOUGH_BUDGET` | Budget corresponding to this data day is within the normal level. |
| `BUDGET_STATE_BUDGET_IS_NEARLY_EXHAUSTED` | Budget corresponding to this data day is close to be exhausted and some query optimization needs to be performed to avoid exhaustion. |
| `BUDGET_STATE_OUT_OF_BUDGET` | Budget corresponding to this data day is exhausted and queries involving this data day may fail. |