# Users

## Users - Activate

Activates the user with given id.

**POST**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/Users/{id}/activate
```

#### Parameter

| Field | Label in UI | Type   | Description              |
| ----- | ----------- | ------ | ------------------------ |
| id    | -           | String | User id. Mandatory Field |

#### Request Example

```json
{
    "data": {}
}
```

Success Response

```json
{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}"
}
```

## Users - ChangePassword

Changes the password of user with given id.

**POST**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/Users/{id}/changePassword
```

#### Parameter

| Field         | Label in UI  | Type   | Description                                                       |
| ------------- | ------------ | ------ | ----------------------------------------------------------------- |
| id            | -            | String | ID of the user whose password you want to change. Mandatory Field |
| new\_password | New Password | String | New password. Mandatory Field                                     |

#### Request Example

```json
{
    "data": {
        "new_password": "password1"
    }
}
```

#### Success Response

```json
{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}"
}
```

## Users - Create

Creates a new user in a Fabric-enabled LogPoint.

**POST**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/Users
```

#### Parameter

| Field     | Label in UI | Type      | Description                                                                                                                                                                                                               |
| --------- | ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| email     | Email       | String    | Valid email address of the user. Mandatory Field                                                                                                                                                                          |
| firstname | Firstname   | String    | First name of the user. Mandatory Field                                                                                                                                                                                   |
| lastname  | Lastname    | String    | Last name of the user. Mandatory Field                                                                                                                                                                                    |
| password  | Password    | String    | Username password. The password value should be at least 5 characters in length. Mandatory Field                                                                                                                          |
| timezone  | Time Zone   | String    | An optional string value that specifies the given timezones by logpoint. Obtain the value of the available timezones using Timezone - List API. If no timezone is given, default timezone is set to "UTC". Optional Field |
| usergroup | Usergroup   | \[String] | List of usergroup ids. Mandatory Field                                                                                                                                                                                    |
| username  | Username    | String    | Name of the user. Username should be unique and length value can be from 2 to 50 characters. Mandatory Field                                                                                                              |

#### Request Example

```json
{
    "data": {
        "email": "william@lp.com",
        "firstname": "William",
        "lastname": "Smith",
        "password": "password",
        "timezone": "Asia/Kathmandu",
        "usergroup": [
            "5bebd9fdd8aaa42840edc850"
        ],
        "username": "UserA"
    }
}
```

#### Success Response

```json
{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}"
}
```

## Users - Deactivate

Deactivates the user with given id.

**POST**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/Users/{id}/deactivate
```

#### Parameter

| Field | Label in UI | Type   | Description              |
| ----- | ----------- | ------ | ------------------------ |
| id    | -           | String | User id. Mandatory Field |

#### Request Example

```json
{
    "data": {}
}
```

#### Success Response

```json
{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}"
}
```

## Users - Edit

Edits the user settings with given ID.

**PUT**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/Users/{id}
```

#### Parameter

| Field     | Label in UI | Type      | Description                                                                                                                                                                                                               |
| --------- | ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| email     | Email       | String    | Valid email address of the user. Mandatory Field                                                                                                                                                                          |
| firstname | Firstname   | String    | First name of the user. Mandatory Field                                                                                                                                                                                   |
| id        | -           | String    | Existing Device id. Obtain the value of the required Device id using Devices - List API. Mandatory Field                                                                                                                  |
| lastname  | Lastname    | String    | Last name of the user. Mandatory Field                                                                                                                                                                                    |
| timezone  | Time Zone   | String    | An optional string value that specifies the given timezones by logpoint. Obtain the value of the available timezones using Timezone - List API. If no timezone is given, default timezone is set to "UTC". Optional Field |
| usergroup | Usergroup   | \[String] | List of usergroup ids. Mandatory Field                                                                                                                                                                                    |

#### Request Example

```json
{
    "data": {
        "email": "william@lp.com",
        "firstname": "William",
        "lastname": "Smith",
        "timezone": "Asia/Kathmandu",
        "usergroup": [
            "5bebd9fdd8aaa42840edc850"
        ]
    }
}
```

#### Success Response

```json
{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}"
}
```

## Users - FetchUsers

Lists all existing users.

{% hint style="warning" %}
DEPRECATED ! Will be removed in future version.&#x20;

Use [Users - List API](#users-list) instead.
{% endhint %}

**POST**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/Users/fetch
```

#### Request Example

```json
{
    "data": {}
}
```

#### Success Response

```json
{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}/{data_node}"
}
```

## Users - Get

Fetches a User with given ID.

**GET**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/Users/{id}
```

#### Parameter

| Field | Label in UI | Type   | Description                                     |
| ----- | ----------- | ------ | ----------------------------------------------- |
| id    | -           | String | ID of the existing user that you want to fetch. |

#### Success Response

```json
{
    "active": true,
    "dashboard": "4bebd9fdd8aaa42840ebc852",
    "email": "admin@logpoint.local",
    "failed_login_count": 0,
    "fields": {
        "automate_query_bar": [],
        "hidden_fields": [],
        "interesting_hidden_fields": [],
        "show_all": true
    },
    "firstname": "Admin",
    "fullname": "Admin Admin",
    "id": "4bebd9fdd8aaa42840edc553",
    "last_login": {
        "login_date": "2020-11-30 04:36:41.983000"
    },
    "lastname": "Admin",
    "ldap_strategy": "",
    "locked": false,
    "locked_time": "2020-07-06 12:47:39.789000",
    "password_change_date": "2018-11-14 08:17:01.251000",
    "plugin_settings": {},
    "preferences": "5cebd9fdd8cac42840ddc82c",
    "query": "",
    "tid": "",
    "timezone": "UTC",
    "usergroup": [
        "4bebd8edd8aba42840edc85f",
        "4fb782bd40a18e4eb9e33a87"
    ],
    "username": "admin"
}
```

## Users - List

Lists all existing Users.

**GET**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/Users
```

#### Success Response

```json
[
    {
        "active": true,
        "dashboard": "4cebd9fcd8aaa42840e2c852",
        "email": "admin@logpoint.local",
        "failed_login_count": 0,
        "fields": {
            "automate_query_bar": [],
            "hidden_fields": [],
            "interesting_hidden_fields": [],
            "show_all": true
        },
        "firstname": "Admin",
        "fullname": "Admin Admin",
        "id": "4cdcc8fdd8aaa42840edc851",
        "last_login": {
            "login_date": "2020-11-30 04:36:41.983000"
        },
        "lastname": "Admin",
        "ldap_strategy": "",
        "locked": false,
        "locked_time": "2020-07-06 12:47:39.789000",
        "password_change_date": "2018-11-14 08:17:01.251000",
        "plugin_settings": {},
        "preferences": "5bebd9faa8acc42840ede74a",
        "query": "",
        "tid": "",
        "timezone": "UTC",
        "usergroup": [
            "4cebd9fdd8aee42840edc83f",
            "4eb781cd40a19e5eb9e33a21"
        ],
        "username": "admin"
    }
]
```

## Users - RefreshList

Syncs the current Users List with LogPoint's Users List.

**POST**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/Users/refreshlist
```

#### Request Example

```json
{
    "data": {}
}
```

#### Success Response

```json
{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}"
}
```

## Users - Trash

Removes the user with given ID.

**DELETE**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/Users/{id}
```

#### Parameter

| Field              | Label in UI    | Type    | Description                                                                                                                                                                                                          |
| ------------------ | -------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| assigned\_to\_user | ASSIGN TO USER | String  | ID of the user to whom the ownership of RBAC resources shall be transferred. Optional Field                                                                                                                          |
| force\_delete      | Delete         | boolean | Value must be "true" to delete the users and their shared resources. Either force\_delete or assigned\_to\_user must be present in the request while deleting the users who own any shared resources. Optional Field |
| id                 | -              | String  | ID of the existing user that you want to delete. You need to deactivate the user before deleting it. Mandatory Field                                                                                                 |

#### Request Example

```json
{
    "data": {
        "force_delete": "false",
        "assigned_to_user": "5bfbd9faa8acc42840ede74b"
    }
}
```

#### Success Response

```json
{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}"
}
```

## Users - Unlock

Unlock the user with given id.

**POST**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/Users/{id}/unlock
```

#### Parameter

| Field | Label in UI | Type   | Description              |
| ----- | ----------- | ------ | ------------------------ |
| id    | -           | String | User id. Mandatory Field |

#### Request Example

```json
{
    "data": {}
}
```

#### Success Response

```json
{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}"
}
```

{% hint style="info" %}
The Users API does not allow you to create and manage the plugin users for the authentication plugins. Currently, Logpoint supports the following authentication plugins:

* LDAP Authentication
* Radius Authentication
* ADFS Authentication
* SAML Authentication
* OAuth Authentication
  {% endhint %}

{% hint style="info" %}
If a Fabric-enabled user is locked due to failed login attempts, you must execute the[ Users - RefreshList API ](#users-refreshlist)to sync data with the Fabric-enabled Logpoint data.
{% endhint %}
