# ApiLogsApi

All URIs are relative to *https://admin-api.connected.dev*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**getAPILog**](#getapilog) | **GET** /logs/api/{logId} | Get an API request log entry|
|[**getAPILogs**](#getapilogs) | **GET** /logs/api | List API request logs|

# **getAPILog**
> GetAPILog200Response getAPILog()

Returns the details of a single API request log entry by its ID, including request/response metadata; requires read permission on logs.

### Example

```typescript
import {
    ApiLogsApi,
    Configuration
} from '@connectedxm/admin-sdk';

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

let logId: string; //The log identifier (default to undefined)

const { status, data } = await apiInstance.getAPILog(
    logId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **logId** | [**string**] | The log identifier | defaults to undefined|


### Return type

**GetAPILog200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[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)

# **getAPILogs**
> GetAPILogs200Response getAPILogs()

Returns a paginated list of API request log entries for the organization within a date range, optionally filtered by HTTP method, status, source, user, or account, with search and ordering support; requires read permission on logs.

### Example

```typescript
import {
    ApiLogsApi,
    Configuration
} from '@connectedxm/admin-sdk';

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

let startDate: string; //Filter by startDate (default to undefined)
let endDate: string; //Filter by endDate (default to undefined)
let method: string; //Filter by method (optional) (default to undefined)
let status: 'success' | 'failed'; //Filter by status (optional) (default to undefined)
let source: string; //Filter by source (optional) (default to undefined)
let userId: string; //Filter by userId (optional) (default to undefined)
let accountId: string; //Filter by accountId (optional) (default to undefined)
let page: number; //Page number (optional) (default to 1)
let pageSize: number; //Number of items per page (optional) (default to 25)
let orderBy: string; //Field to order by (optional) (default to undefined)
let search: string; //Search query (optional) (default to undefined)

const { status, data } = await apiInstance.getAPILogs(
    startDate,
    endDate,
    method,
    status,
    source,
    userId,
    accountId,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **startDate** | [**string**] | Filter by startDate | defaults to undefined|
| **endDate** | [**string**] | Filter by endDate | defaults to undefined|
| **method** | [**string**] | Filter by method | (optional) defaults to undefined|
| **status** | [**&#39;success&#39; | &#39;failed&#39;**]**Array<&#39;success&#39; &#124; &#39;failed&#39;>** | Filter by status | (optional) defaults to undefined|
| **source** | [**string**] | Filter by source | (optional) defaults to undefined|
| **userId** | [**string**] | Filter by userId | (optional) defaults to undefined|
| **accountId** | [**string**] | Filter by accountId | (optional) defaults to undefined|
| **page** | [**number**] | Page number | (optional) defaults to 1|
| **pageSize** | [**number**] | Number of items per page | (optional) defaults to 25|
| **orderBy** | [**string**] | Field to order by | (optional) defaults to undefined|
| **search** | [**string**] | Search query | (optional) defaults to undefined|


### Return type

**GetAPILogs200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[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)

