# LDAPAuthentication

### LDAPAuthentication - Activate

Activate LDAP Strategy.

**POST**

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

#### Parameters

| Field | Label in UI |   Type | Description                                |
| ----- | ----------: | -----: | ------------------------------------------ |
| id    |           - | String | Existing LDAP Strategy id. Mandatory Field |

#### Request Example

{% code title="" %}

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

{% endcode %}

#### Success Response

{% code title="" %}

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

{% endcode %}

### LDAPAuthentication - Create

Adds new LDAP Strategy.

**POST**

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

#### Parameters

| Field                        |              Label in UI |    Type | Description                                                                                                                                  |
| ---------------------------- | -----------------------: | ------: | -------------------------------------------------------------------------------------------------------------------------------------------- |
| auth\_param                  |       Authenticate Using |  String | Authentication parameter "uid" or "dn" or "sAMAccountName". Mandatory Field                                                                  |
| bind\_dn                     |                  Bind DN |  String | Bind Distinguished Named of LDAP. Mandatory Field                                                                                            |
| bind\_dn\_password           |                 Password |  String | Bind DN password. Mandatory Field                                                                                                            |
| description                  |              Description |  String | Description of the LDAP Strategy. Optional Field                                                                                             |
| enable\_paginated\_search    |  Enable Paginated Search |  String | Enable/Disable search pagination. "on" or "off" (exact). Mandatory Field                                                                     |
| fullname                     |        Fullname Template |  String | Fullname template. Optional Field                                                                                                            |
| group\_base\_dn              |            Group Base DN |  String | Node under which the LDAP groups are present. Mandatory Field                                                                                |
| group\_filter                |                   Filter |  String | Group Filter. Mandatory Field                                                                                                                |
| group\_member\_attribute     |           Group Mem Attr |  String | Group Member Attribute in database. Mandatory Field                                                                                          |
| group\_name\_attr            |          Group Name Attr |  String | Attribute of group name provided in the database. Mandatory Field                                                                            |
| host                         |                     Host |  String | LDAP Host IP. Mandatory Field                                                                                                                |
| ldap\_mapping                |  LDAP User/Group Mapping |  String | Value should be "on" (exact) to enable *mapping\_group\_member\_attr* parameter or *mapping\_member\_group\_attr* parameter. Mandatory Field |
| mapping\_group\_member\_attr | User contains group info |  String | LDAP user contains group info mapping. Mandatory if 'mapping\_member\_group\_attr' not present. Optional Field                               |
| mapping\_member\_group\_attr | Group contains user info |  String | LDAP group contains user info mapping. Mandatory if 'mapping\_group\_member\_attr' not present. Optional Field                               |
| member\_group\_attribute     |           Mem Group Attr |  String | members belonging to a group. Mandatory Field                                                                                                |
| name                         |                     Name |  String | Name of LDAP Strategy. Mandatory Field                                                                                                       |
| no\_ldap\_connection\_check  |                        - | boolean | Do not check connection to ldap server. "true" (exact). Optional Field                                                                       |
| port                         |                     Port |     int | Port of the LDAP Server. Mandatory Field                                                                                                     |
| ssl                          |                      SSL |  String | Value should be "on" (exact) to enable SSL communication with the host. Optional Field                                                       |
| user\_base\_dn               |             User Base DN |  String | User Base DN. Mandatory Field                                                                                                                |
| user\_filter                 |                   Filter |  String | String to filter user results. Mandatory Field                                                                                               |
| user\_name\_attr             |           User Name Attr |  String | User Name Attributes in database. Mandatory Field                                                                                            |
| username                     |        Username Template |  String | Template of the username. Optional Field                                                                                                     |
| users\_unique\_field         |             Unique Field |  String | Unique identifier of LDAP user. Optional Field                                                                                               |

#### Request Example

{% code title="" %}

```json
{
    "data": {
        "auth_param": "uid",
        "bind_dn": "CN=Administrator,CN=Users,DC=kb,DC=logpoint,DC=local",
        "bind_dn_password": "Dummy_Password",
        "description": "some description",
        "enable_paginated_search": "on",
        "fullname": "{{FirstName}}{{LastName}}",
        "group_base_dn": "DC=kb,DC=logpoint,DC=local",
        "group_filter": "objectCategory=group",
        "group_member_attribute": "dn",
        "group_name_attr": "cn",
        "host": "192.168.2.77",
        "ldap_mapping": "on",
        "mapping_member_group_attr": "member",
        "member_group_attribute": "dn",
        "name": "LDAP1",
        "port": 389,
        "user_base_dn": "DC=kb,DC=logpoint,DC=local",
        "user_filter": "objectCategory=user",
        "user_name_attr": "cn",
        "username": "{{displayName}}"
    }
}
```

{% endcode %}

#### Success Response

{% code title="" %}

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

{% endcode %}

### LDAPAuthentication - Deactivate

Deactivate LDAP Strategy.

**POST**

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

#### Parameters

| Field | Label in UI |   Type | Description                                |
| ----- | ----------: | -----: | ------------------------------------------ |
| id    |           - | String | Existing LDAP Strategy id. Mandatory Field |

#### Request Example

{% code title="" %}

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

{% endcode %}

#### Success Response

{% code title="" %}

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

{% endcode %}

### LDAPAuthentication - Edit

Edits existing LDAP Strategy with given ID.

**PUT**

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

#### Parameters

| Field                        |              Label in UI |    Type | Description                                                                                                    |
| ---------------------------- | -----------------------: | ------: | -------------------------------------------------------------------------------------------------------------- |
| auth\_param                  |       Authenticate Using |  String | Authentication parameter "uid" or "dn" or "sAMAccountName". Mandatory Field                                    |
| bind\_dn                     |                  Bind DN |  String | Bind Distinguished Named of LDAP. Mandatory Field                                                              |
| bind\_dn\_password           |                 Password |  String | Bind DN password. Mandatory Field                                                                              |
| description                  |              Description |  String | Description of the LDAP Strategy. Optional Field                                                               |
| enable\_paginated\_search    |  Enable Paginated Search |  String | Enable paginated search. "on" or "off" (exact). Mandatory Field                                                |
| fullname                     |        Fullname Template |  String | Fullname template. Optional Field                                                                              |
| group\_base\_dn              |            Group Base DN |  String | Node under which the LDAP groups are present. Mandatory Field                                                  |
| group\_filter                |                   Filter |  String | Group Filter. Mandatory Field                                                                                  |
| group\_member\_attribute     |           Group Mem Attr |  String | Group Member Attribute in database. Mandatory Field                                                            |
| group\_name\_attr            |          Group Name Attr |  String | Attribute of group name provided in the database. Mandatory Field                                              |
| host                         |                     Host |  String | IP of the LDAP Host. Mandatory Field                                                                           |
| id                           |                        - |  String | ID of existing LDAP Strategy. Mandatory Field                                                                  |
| ldap\_mapping                |  LDAP User/Group Mapping |  String | Exactly "on". Mandatory Field                                                                                  |
| mapping\_group\_member\_attr | User contains group info |  String | LDAP user contains group info mapping. Mandatory if 'mapping\_member\_group\_attr' not present. Optional Field |
| mapping\_member\_group\_attr | Group contains user info |  String | LDAP group contains user info mapping. Mandatory if 'mapping\_group\_member\_attr' not present. Optional Field |
| member\_group\_attribute     |           Mem Group Attr |  String | Members belonging to a group. Mandatory Field                                                                  |
| name                         |                     Name |  String | Name of LDAP Strategy. Mandatory Field                                                                         |
| no\_ldap\_connection\_check  |                        - | boolean | Do not check connection to ldap server. "true" (exact). Optional Field                                         |
| port                         |                     Port |     int | LDAP Server port. Mandatory Field                                                                              |
| ssl                          |                      SSL |  String | Enable SSL. "on" (exact). Optional Field                                                                       |
| user\_base\_dn               |             User Base DN |  String | User Base DN. Mandatory Field                                                                                  |
| user\_filter                 |                   Filter |  String | String to filter user results. Mandatory Field                                                                 |
| user\_name\_attr             |           User Name Attr |  String | User Name Attributes in database. Mandatory Field                                                              |
| username                     |        Username Template |  String | Username template. Optional Field                                                                              |
| users\_unique\_field         |             Unique Field |  String | Unique identifier of LDAP user. Optional Field                                                                 |

#### Request Example

{% code title="" %}

```json
{
    "data": {
        "auth_param": "uid",
        "bind_dn": "CN=Administrator,CN=Users,DC=kb,DC=logpoint,DC=local",
        "bind_dn_password": "Dummy_Password",
        "description": "some description",
        "enable_paginated_search": "on",
        "fullname": "{{FirstName}}{{LastName}}",
        "group_base_dn": "DC=kb,DC=logpoint,DC=local",
        "group_filter": "objectCategory=group",
        "group_member_attribute": "dn",
        "group_name_attr": "cn",
        "host": "192.168.2.77",
        "ldap_mapping": "on",
        "mapping_member_group_attr": "member",
        "member_group_attribute": "dn",
        "name": "LDAP1",
        "port": 389,
        "user_base_dn": "DC=kb,DC=logpoint,DC=local",
        "user_filter": "objectCategory=user",
        "user_name_attr": "cn",
        "username": "{{displayName}}"
    }
}
```

{% endcode %}

#### Success Response

{% code title="" %}

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

{% endcode %}

### LDAPAuthentication - Get

Get LDAP Strategy with given id.

**GET**

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

#### Parameters

| Field | Label in UI |   Type | Description                |
| ----- | ----------: | -----: | -------------------------- |
| id    |           - | String | Existing LDAP strategy id. |

#### Success Response

{% code title="" %}

```json
{
    "active": true,
    "auth_param": "uid",
    "bind_dn": "CN=logpoint,CN=Users,DC=test,DC=com",
    "description": "",
    "group_base_dn": "DC=test,DC=com",
    "group_filter": "objectCategory=group",
    "group_member_attribute": "dn",
    "group_name_attribute": "cn",
    "host": "10.45.1.146",
    "id": "5aa8f49a3dad6c2afb42cb28",
    "mapping_group_member_attr": "memberOf",
    "mapping_member_group_attr": null,
    "member_group_attribute": "dn",
    "member_represent_attr": null,
    "name": "ldap",
    "pagination": true,
    "port": 389,
    "ssl": false,
    "template_settings": {
        "fullname": "",
        "username": ""
    },
    "tid": "",
    "use_dn_auth": false,
    "use_dn_group": false,
    "user": "admin",
    "user_base_dn": "DC=test,DC=com",
    "user_filter": "objectCategory=user",
    "user_group_mapping": [],
    "user_name_attribute": "cn"
}
```

{% endcode %}

### LDAPAuthentication - GetLDAPGroup

Fetches LDAP Users Group with given id.

**GET**

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

#### Parameters

| Field | Label in UI |   Type | Description                |
| ----- | ----------: | -----: | -------------------------- |
| id    |           - | String | Existing LDAP Strategy id. |

#### Success Response

{% code title="response.json" %}

```json
{
    "groups": [
        {
            "dn": "CN=SQLServerMSSQLServerADHelperUser$WIN-4H62SDE5M6B,CN=Users,DC=test,DC=com",
            "name": "SQLServerMSSQLServerADHelperUser$WIN-4H62SDE5M6B",
            "timezone": null,
            "usergroup": null
        },
        {
            "dn": "CN=SQLServer2005SQLBrowserUser$WIN-4H62SDE5M6B,CN=Users,DC=test,DC=com",
            "name": "SQLServer2005SQLBrowserUser$WIN-4H62SDE5M6B",
            "timezone": null,
            "usergroup": null
        },
        {
            "dn": "CN=SQLServerMSSQLUser$WIN-4H62SDE5M6B$SQLEXPRESS,CN=Users,DC=test,DC=com",
            "name": "SQLServerMSSQLUser$WIN-4H62SDE5M6B$SQLEXPRESS",
            "timezone": null,
            "usergroup": null
        },
        {
            "dn": "CN=SQLServerSQLAgentUser$WIN-4H62SDE5M6B$SQLEXPRESS,CN=Users,DC=test,DC=com",
            "name": "SQLServerSQLAgentUser$WIN-4H62SDE5M6B$SQLEXPRESS",
            "timezone": null,
            "usergroup": null
        },
        {
            "dn": "CN=HelpLibraryUpdaters,CN=Users,DC=test,DC=com",
            "name": "HelpLibraryUpdaters",
            "timezone": null,
            "usergroup": null
        }
    ],
    "id": "5ae03710d8aaa428908f2b33"
}
```

{% endcode %}

### LDAPAuthentication - List

Lists all LDAP Strategies.

**GET**

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

#### Success Response

{% code title="" %}

```json
[
    {
        "active": true,
        "auth_param": "uid",
        "bind_dn": "CN=logpoint,CN=Users,DC=test,DC=com",
        "description": "",
        "group_base_dn": "DC=test,DC=com",
        "group_filter": "objectCategory=group",
        "group_member_attribute": "dn",
        "group_name_attribute": "cn",
        "host": "10.45.1.146",
        "id": "5aa8f49a3dad6c2afb42cb28",
        "mapping_group_member_attr": "memberOf",
        "mapping_member_group_attr": null,
        "member_group_attribute": "dn",
        "member_represent_attr": null,
        "name": "ldap",
        "pagination": true,
        "port": 389,
        "ssl": false,
        "template_settings": {
            "fullname": "",
            "username": ""
        },
        "tid": "",
        "use_dn_auth": false,
        "use_dn_group": false,
        "user": "admin",
        "user_base_dn": "DC=test,DC=com",
        "user_filter": "objectCategory=user",
        "user_group_mapping": [],
        "user_name_attribute": "cn"
    }
]
```

{% endcode %}

### LDAPAuthentication - ListLDAPGroup

Fetches list of LDAP Users Group.

**GET**

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

#### Success Response

{% code title="" %}

```json
[
    {
        "groups": [
            {
                "dn": "CN=SQLServerMSSQLServerADHelperUser$WIN-4H62SDE5M6B,CN=Users,DC=test,DC=com",
                "name": "SQLServerMSSQLServerADHelperUser$WIN-4H62SDE5M6B",
                "timezone": null,
                "usergroup": null
            },
            {
                "dn": "CN=SQLServer2005SQLBrowserUser$WIN-4H62SDE5M6B,CN=Users,DC=test,DC=com",
                "name": "SQLServer2005SQLBrowserUser$WIN-4H62SDE5M6B",
                "timezone": null,
                "usergroup": null
            },
            {
                "dn": "CN=SQLServerMSSQLUser$WIN-4H62SDE5M6B$SQLEXPRESS,CN=Users,DC=test,DC=com",
                "name": "SQLServerMSSQLUser$WIN-4H62SDE5M6B$SQLEXPRESS",
                "timezone": null,
                "usergroup": null
            }
        ],
        "id": "5acae545d8aaa4398c1fadc1"
    }
]
```

{% endcode %}

### LDAPAuthentication - MapLDAPGroup

Maps LDAP Group to LogPoint Users Group.

**POST**

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

#### Parameters

| Field     |         Label in UI |   Type | Description                                    |
| --------- | ------------------: | -----: | ---------------------------------------------- |
| id        |                   - | String | Existing LDAP Strategy id. Mandatory Field     |
| ldapgroup |     LDAP Group Name | String | LDAP Group name. Mandatory Field               |
| timezone  |            Timezone | String | Timezone. Mandatory Field                      |
| usergroup | LogPoint User Group | String | LogPoint User Group or "None". Mandatory Field |

#### Request Example

{% code title="request.json" %}

```json
{
    "data": {
        "ldapgroup": "Administrators",
        "timezone": "UTC",
        "usergroup": "LogPoint Administrator"
    }
}
```

{% endcode %}

#### Success Response

{% code title="" %}

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

{% endcode %}

### LDAPAuthentication - RefreshLDAPGroupList

Updates LDAP User Groups list.

**POST**

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

#### Request Example

{% code title="" %}

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

{% endcode %}

#### Success Response

{% code title="" %}

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

{% endcode %}

### LDAPAuthentication - Trash

Deletes LDAP Strategy.

**DELETE**

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

#### Parameters

| Field | Label in UI |   Type | Description                                |
| ----- | ----------: | -----: | ------------------------------------------ |
| id    |           - | String | Existing LDAP Strategy id. Mandatory Field |

#### Success Response

{% code title="" %}

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

{% endcode %}
