# LoginsApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**confirmLogin**](#confirmlogin) | **PUT** /logins/{username}/confirm | Confirm a login|
|[**deleteLogin**](#deletelogin) | **DELETE** /logins/{username} | Delete a login|
|[**getLogin**](#getlogin) | **GET** /logins/{username} | Get a single login|
|[**getLoginAuthSessions**](#getloginauthsessions) | **GET** /logins/{username}/auth-sessions | List a login\&#39;s auth sessions|
|[**getLoginDevices**](#getlogindevices) | **GET** /logins/{username}/devices | List a login\&#39;s push devices|
|[**getLogins**](#getlogins) | **GET** /logins | List logins|
|[**updateLoginEmail**](#updateloginemail) | **PUT** /logins/{username}/email | Update a login\&#39;s email|
|[**updateLoginPassword**](#updateloginpassword) | **PUT** /logins/{username}/password | Set a login\&#39;s password|

# **confirmLogin**
> GetLogin200Response confirmLogin()

Manually confirms the Cognito user for the given login username and marks its email as verified, bypassing the normal self-service confirmation flow, and requires the \"update\" permission on accounts.

### Example

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

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

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

const { status, data } = await apiInstance.confirmLogin(
    username
);
```

### Parameters

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


### Return type

**GetLogin200Response**

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

# **deleteLogin**
> GetLogin200Response deleteLogin()

Permanently deletes the login with the given username, removing both its Cognito user and its database record, and requires the \"delete\" permission on accounts.

### Example

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

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

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

const { status, data } = await apiInstance.deleteLogin(
    username
);
```

### Parameters

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


### Return type

**GetLogin200Response**

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

# **getLogin**
> GetLogin200Response getLogin()

Returns the login record identified by username, including its profile and status details; requires the read permission on accounts.

### Example

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

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

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

const { status, data } = await apiInstance.getLogin(
    username
);
```

### Parameters

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


### Return type

**GetLogin200Response**

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

# **getLoginAuthSessions**
> GetLoginAuthSessions200Response getLoginAuthSessions()

Returns a paginated list of authentication sessions for the given login username, with optional search and ordering; requires the read permission on accounts.

### Example

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

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

let username: string; //The username identifier (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.getLoginAuthSessions(
    username,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **username** | [**string**] | The username identifier | 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

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

# **getLoginDevices**
> GetLoginDevices200Response getLoginDevices()

Returns a paginated list of registered push notification devices for the given login username, with optional search and ordering; requires the read permission on accounts.

### Example

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

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

let username: string; //The username identifier (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.getLoginDevices(
    username,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **username** | [**string**] | The username identifier | 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

**GetLoginDevices200Response**

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

# **getLogins**
> GetLogins200Response getLogins()

Returns a paginated list of logins for the organization, optionally filtered by linked account and with search and ordering support; requires the read permission on accounts.

### Example

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

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

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

### Parameters

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

**GetLogins200Response**

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

# **updateLoginEmail**
> GetLogin200Response updateLoginEmail(addEventAccessUserRequest)

Changes the email address for the given login username in both the database and Cognito, marking the new email as verified, and requires the \"update\" permission on accounts.

### Example

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

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

let username: string; //The username identifier (default to undefined)
let addEventAccessUserRequest: AddEventAccessUserRequest; //

const { status, data } = await apiInstance.updateLoginEmail(
    username,
    addEventAccessUserRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **addEventAccessUserRequest** | **AddEventAccessUserRequest**|  | |
| **username** | [**string**] | The username identifier | defaults to undefined|


### Return type

**GetLogin200Response**

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json
 - **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)

# **updateLoginPassword**
> GetLogin200Response updateLoginPassword(updateLoginPasswordRequest)

Sets a permanent new password for the Cognito login identified by username, requiring both read and update permissions on accounts; existing logins and login/logins list caches are invalidated on success.

### Example

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

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

let username: string; //The username identifier (default to undefined)
let updateLoginPasswordRequest: UpdateLoginPasswordRequest; //

const { status, data } = await apiInstance.updateLoginPassword(
    username,
    updateLoginPasswordRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **updateLoginPasswordRequest** | **UpdateLoginPasswordRequest**|  | |
| **username** | [**string**] | The username identifier | defaults to undefined|


### Return type

**GetLogin200Response**

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json
 - **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)

