---
title: "Export instance audit log REST API | HitKeep"
description: "Reference for the HitKeep REST API operation Export instance audit log, including request parameters, responses, and authentication notes."
canonical: "https://hitkeep.com/api/operations/apiadminsystemauditexport/"
---

# Export instance audit log REST API

GET

/api/admin/system/audit/export

FetchcURL

```
const url = 'http://127.0.0.1:25737/api/admin/system/audit/export?format=json';
const options = {method: 'GET', headers: {cookie: 'hk_token=<hk_token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```
curl --request GET \
  --url 'http://127.0.0.1:25737/api/admin/system/audit/export?format=json' \
  --cookie hk_token=<hk_token>
```

-

Exports matching instance-level audit entries as JSON or CSV. The export limit defaults to 10000 rows and is capped at 50000 rows.

## Authorizations

- **[cookieAuth](https://hitkeep.com/api/#cookieauth)**

## Parameters

### Query Parameters

**action**

string

Optional exact action filter.

**target_type**

string

Optional target type filter.

**outcome**

string

Optional outcome filter, for example success or failure.

**actor_id**

string format: uuid

Optional actor user ID filter.

**from**

string format: date-time

Optional RFC3339 lower time bound.

**to**

string format: date-time

Optional RFC3339 upper time bound.

**query**

string

Optional free-text search over action, actor, target, outcome, IP, request ID, and details.

**format**

string

Allowed values: json csv

Export format. Defaults to json.

**limit**

integer

>= 1 <= 50000

Maximum number of exported rows. Defaults to 10000.

## Responses

### 200

Audit export

### 400

Invalid audit filter

application/json

object

**message**

string

##### Examplegenerated

```
{
  "message": "example"
}
```

### 403

Forbidden

application/json

object

**message**

string

##### Examplegenerated

```
{
  "message": "example"
}
```

[Previous List instance audit log](https://hitkeep.com/api/operations/apiadminsystemaudit/)[Next Get backup status](https://hitkeep.com/api/operations/apiadminsystembackups/)
