# Download

Launch stage: GA

`GET /api/2.0/accounts/{account_id}/usage/download`

Returns billable usage logs in CSV format for the specified account and date range.
 For the data schema, see:

 - AWS: [CSV file schema](https://docs.databricks.com/administration-guide/account-settings/usage-analysis.html#schema).
 - GCP: [CSV file schema](https://docs.gcp.databricks.com/administration-guide/account-settings/usage-analysis.html#csv-file-schema).

 Note that this method might take multiple minutes to complete.

 **Warning**: Depending on the queried date range, the number of workspaces
 in the account, the size of the response and the internet speed of the caller,
 this API may hit a timeout after a few minutes. If you experience this, try to mitigate
 by calling the API with narrower date ranges.

API scopes: billing

## Path parameters

- `account_id` (string, optional)
  <Databricks> account ID of any type. For non-E2 account types, get
   your account ID from the [Accounts Console](https://docs.databricks.com/administration-guide/account-settings/usage.html).

## Query parameters

- `start_month` (string, optional)
  Format specification for month in the format `YYYY-MM`. This is
   used to specify billable usage `start_month` and `end_month` 
   properties. **Note**: Billable usage logs are unavailable before 
   March 2019 (`2019-03`).
  Constraints: `2[0-9][0-9][0-9]-(0[1-9]|1[012])`
- `end_month` (string, optional)
  Format: `YYYY-MM`. Last month to return billable usage logs for. 
   This field is required.
  Constraints: `2[0-9][0-9][0-9]-(0[1-9]|1[012])`
- `personal_data` (boolean, optional)
  Specify whether to include personally identifiable information in 
   the billable usage logs, for example the email addresses of cluster 
   creators. Handle this information with care. Defaults to false.
  Default: `false`

## Returns

- `contents` (string, optional)

## Response

```json
{
  "contents": "string"
}
```

