# DownloadAuditLogReport

Download an audit log report

`GET /api/v2/reports/exportauditlogs/{id}/attachment`

**API:** AvaTax API
**Tag:** Reports
**API Version:** v2
**Base URL:** https://sandbox-rest.avatax.com/
**Accepts:** `application/json`
**Authentication:** API Key (`Authorization` in header) or OAuth 2.0 or Basic (username + license key)

Source: https://developer.avalara.com/products/crossborder/api/methods/Reports/DownloadAuditLogReport/

## Description

This API downloads the file associated with an audit log report.
            
If the report is not yet complete, you will receive a `ReportNotFinished` error.  To check if a report is complete,
use the `GetAuditLogReport` API.
            
Reports are run on the server.  When complete, the report file will be available for download
for up to 30 days after completion.  To run a report, you should follow these steps:
            
* Begin a report by calling the report's ExportAuditLogs API.
* In the result of the ExportAuditLogs API, you receive back a report's `id` value.
* Check the status of a report by calling `GetAuditLogReport` and passing in the report's `id` value.
* When a report's status is `Completed`, call `DownloadAuditLogReport` to retrieve the file.
            
* We throttle this API. You can only call this API up to 5 times in a minute.

### Security Policies

* This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `id` | string | path | Yes | The unique ID number of this report |
| `X-Avalara-Client` | string | header | No | Identifies the software you are using to call this API.  For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | OK |  |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |
| 403 | Forbidden |  |
| 404 | Not Found |  |

## Example Request

```bash
curl -X GET "https://sandbox-rest.avatax.com/api/v2/reports/exportauditlogs/{id}/attachment" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```