# AuditApi

All URIs are relative to *http://localhost:8080/api/v1*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**auditActivityGet**](#auditactivityget) | **GET** /audit/activity | Get user activity|
|[**auditLogsGet**](#auditlogsget) | **GET** /audit/logs | Search audit logs|
|[**auditStatsGet**](#auditstatsget) | **GET** /audit/stats | Get audit statistics|

# **auditActivityGet**
> AuditActivityGet200Response auditActivityGet()

Get recent activity logs for the current user

### Example

```typescript
import {
    AuditApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new AuditApi(configuration);

let limit: number; //Number of activities to return (optional) (default to 50)

const { status, data } = await apiInstance.auditActivityGet(
    limit
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **limit** | [**number**] | Number of activities to return | (optional) defaults to 50|


### Return type

**AuditActivityGet200Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**401** | Unauthorized |  -  |
|**500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **auditLogsGet**
> AuditLogsGet200Response auditLogsGet()

Search and filter audit logs with pagination support. Supports filtering by action, resource, date range, IP address, and user agent.

### Example

```typescript
import {
    AuditApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new AuditApi(configuration);

let action: string; //Filter by action type (optional) (default to undefined)
let resource: string; //Filter by resource type (optional) (default to undefined)
let resourceId: string; //Filter by resource ID (UUID) (optional) (default to undefined)
let ipAddress: string; //Filter by IP address (optional) (default to undefined)
let userAgent: string; //Filter by user agent (optional) (default to undefined)
let startDate: string; //Start date filter (YYYY-MM-DD) (optional) (default to undefined)
let endDate: string; //End date filter (YYYY-MM-DD) (optional) (default to undefined)
let page: number; //Page number (optional) (default to 1)
let limit: number; //Items per page (optional) (default to 20)
let offset: number; //Offset for pagination (optional) (default to undefined)

const { status, data } = await apiInstance.auditLogsGet(
    action,
    resource,
    resourceId,
    ipAddress,
    userAgent,
    startDate,
    endDate,
    page,
    limit,
    offset
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **action** | [**string**] | Filter by action type | (optional) defaults to undefined|
| **resource** | [**string**] | Filter by resource type | (optional) defaults to undefined|
| **resourceId** | [**string**] | Filter by resource ID (UUID) | (optional) defaults to undefined|
| **ipAddress** | [**string**] | Filter by IP address | (optional) defaults to undefined|
| **userAgent** | [**string**] | Filter by user agent | (optional) defaults to undefined|
| **startDate** | [**string**] | Start date filter (YYYY-MM-DD) | (optional) defaults to undefined|
| **endDate** | [**string**] | End date filter (YYYY-MM-DD) | (optional) defaults to undefined|
| **page** | [**number**] | Page number | (optional) defaults to 1|
| **limit** | [**number**] | Items per page | (optional) defaults to 20|
| **offset** | [**number**] | Offset for pagination | (optional) defaults to undefined|


### Return type

**AuditLogsGet200Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**400** | Validation error |  -  |
|**401** | Unauthorized |  -  |
|**500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **auditStatsGet**
> AuditStatsGet200Response auditStatsGet()

Get audit statistics for the current user, optionally filtered by date range

### Example

```typescript
import {
    AuditApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new AuditApi(configuration);

let startDate: string; //Start date (YYYY-MM-DD) (optional) (default to undefined)
let endDate: string; //End date (YYYY-MM-DD) (optional) (default to undefined)

const { status, data } = await apiInstance.auditStatsGet(
    startDate,
    endDate
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **startDate** | [**string**] | Start date (YYYY-MM-DD) | (optional) defaults to undefined|
| **endDate** | [**string**] | End date (YYYY-MM-DD) | (optional) defaults to undefined|


### Return type

**AuditStatsGet200Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**400** | Validation error |  -  |
|**401** | Unauthorized |  -  |
|**500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

