# List audit logs

### URL

<mark style="color:blue;">**GET**</mark> `https://api.complycube.com/v1/auditLogs`

This endpoint allows you to list all audit logs.\
\
The audit logs are returned sorted by creation date, with the most recent audit log appearing first.

### Headers

<table><thead><tr><th width="262">Name</th><th width="124">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>Authorization</code><mark style="color:red;">*</mark></td><td>string</td><td>The API <code>live</code> or <code>test</code> key.</td></tr></tbody></table>

### Query parameters

<table><thead><tr><th width="263">Name</th><th width="126">Type</th><th>Description</th></tr></thead><tbody><tr><td>&#x3C;pagination></td><td>string</td><td>The number of items to return and the number of pages to offset.</td></tr><tr><td>&#x3C;filtering></td><td>string</td><td>Filters the results.</td></tr></tbody></table>

{% hint style="info" %}
You can use [pagination](https://docs.complycube.com/documentation/api-reference/pagination) and [audit log filters](https://docs.complycube.com/documentation/api-reference/other-resources/audit-logs/filtering-audit-logs) for this endpoint.
{% endhint %}

### Example request

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X GET https://api.complycube.com/v1/auditLogs \
     -H 'Authorization: <YOUR_API_KEY>'
```

{% endtab %}

{% tab title="Node.js" %}

```typescript
const { ComplyCube } = require("@complycube/api");

const complycube = new ComplyCube({ apiKey: "<YOUR_API_KEY>" });

const auditLogs = await complycube.auditLog.list();
```

{% endtab %}

{% tab title="Python" %}

```python
from complycube import ComplyCubeClient

cc_api = ComplyCubeClient(api_key='<YOUR_API_KEY>')

logs = cc_api.auditlogs.list()
```

{% endtab %}

{% tab title="PHP" %}

```php
use ComplyCube\ComplyCubeClient;

$ccapi = new ComplyCubeClient('<YOUR_API_KEY>');

$auditLogs = $ccapi->auditLogs()->list();
```

{% endtab %}

{% tab title=".NET" %}

```csharp
using ComplyCube.Net;
using ComplyCube.Net.Resources.AuditLogs;

var auditLogApi = new AuditLogApi(new ComplyCubeClient("<YOUR_API_KEY>"));

var auditLogs = await auditLogApi.ListAsync();
```

{% endtab %}
{% endtabs %}

### Example response

{% tabs %}
{% tab title="Success (200)" %}

```bash
{
    "page": 1,
    "pageSize": 100,
    "totalItems": 2,
    "pages": 1,
    "items": [
        {
            "id": "5f2acdcebbddb422f9b60e7b",
            "memberId": "VNARgK33nMASdJKdi",
            "resourceType": "client",
            "resourceId": "5f2aca5fbbddb422f9b60e79",
            "clientId": "5f2aca5fbbddb422f9b60e79",
            "trigger": "updateClient",
            "action": "update",
            "createdAt": "2020-01-01T15:18:38.347Z"
        },
        {
            "id": "5f2aca60bbddb422f9b60e7a",
            "resourceType": "client",
            "resourceId": "5f2aca5fbbddb422f9b60e79",
            "clientId": "5f2aca5fbbddb422f9b60e79",
            "trigger": "createClient",
            "action": "create",
            "createdAt": "2020-01-01T15:04:00.127Z"
        }
    ]
}
```

{% endtab %}
{% endtabs %}
