> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Admin Console Audit Logs API

<Badge icon="arrow-left" color="gray">[Back to API List](/ai-for-service/apis/automation/api-list)</Badge>

To retrieve audit logs from the Admin Console.

| Field             | Value                                                                                                                            |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| **Method**        | GET                                                                                                                              |
| **Endpoint**      | `https://{{host}}/api/public/auditlogs?size=50&offset=0&fromDate={{timestamp}}&toDate={{timestamp}}&fetchAfter={{AuditLogId}}`   |
| **Content Type**  | `application/json`                                                                                                               |
| **Authorization** | `auth: {{JWT}}` See [How to generate the JWT Token](/ai-for-service/apis/automation/api-introduction/#generating-the-jwt-token). |
| **API Scope**     | App Builder: Not Applicable; Admin Console: Logs > Admin Console Audit Logs                                                      |

## Path Parameters

| Parameter               | Description                                                                             |
| ----------------------- | --------------------------------------------------------------------------------------- |
| `host`                  | Environment URL, for example, `https://platform.kore.ai`.                               |
| `size`                  | Number of records to fetch (maximum 100).                                               |
| `offset`                | Page number to start fetching from. Default is 0.                                       |
| `fromDate`              | Start date in `yyyy-mm-dd` or `yyyy-mm-ddThh:mm:ss.msZ` format.                         |
| `toDate`                | End date in `yyyy-mm-dd` or `yyyy-mm-ddThh:mm:ss.msZ` format.                           |
| `fetchAfter` (optional) | Audit Log ID from which to fetch the logs. Obtained from a previous audit log response. |

## Sample Request

```bash theme={null}
curl --location --request GET \
'https://{{host}}/api/public/auditlogs?size=50&offset=0&fromDate=2021-07-07T11:11:18.464Z&toDate=2021-06-30T11:11:18.469Z' \
--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
--header 'Content-Type: application/json'
```

## Sample Response

```json theme={null}
{
  "total": 3,
  "auditlogs": [
    {
      "timestampValue": 1578157612745,
      "Date/Time": "2020-01-04T17:06:52.745Z",
      "Description": "User logged out at Sat Jan 04 2020 22:36:52 GMT+0530 from 127.0.0.1 via web",
      "Name": "Logout",
      "Category": "Login/Logout",
      "AuditLogId": "5e10c62ce0e2f05f05xxxxx"
    },
    {
      "timestampValue": 1578292105981,
      "Date/Time": "2020-01-06T06:28:25.981Z",
      "Description": "New app admin created",
      "Name": "App creation - Success",
      "Category": "Login/Logout",
      "AuditLogId": "5e10c62ce0e2f05f05xxxxx"
    }
  ],
  "moreAvailable": false
}
```
