# AuthSessionsApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**getAuthSession**](#getauthsession) | **GET** /logs/auth-sessions/{authSessionId} | Get an authentication session log entry|
|[**getAuthSessions**](#getauthsessions) | **GET** /logs/auth-sessions | List authentication sessions|

# **getAuthSession**
> GetAuthSession200Response getAuthSession()

Returns the details of a single authentication session log entry by its ID; requires read permission on logs.

### Example

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

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

let authSessionId: string; //The authSession identifier (default to undefined)

const { status, data } = await apiInstance.getAuthSession(
    authSessionId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **authSessionId** | [**string**] | The authSession identifier | defaults to undefined|


### Return type

**GetAuthSession200Response**

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

# **getAuthSessions**
> GetLoginAuthSessions200Response getAuthSessions()

Returns a paginated list of user authentication (login) sessions logged for the organization, supporting search and ordering; requires \"read\" permission on \"logs\".

### Example

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

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

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.getAuthSessions(
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **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

**GetLoginAuthSessions200Response**

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

