---
# System prepended metadata

title: iSDV API

---

# iSDV API

> **Note:** If user collection is empty then default admin user will created by API
> 
> Defauly user details: 
> *{
>     "name" : "admin",
>     "userName" : "admin@ieiworld.com",
>     "password" : "test",
>     "token" : "test",
>     "role" : "administrator",
> }*

> Required MongoDB and database :  **iei-isdv-db**
### User Management
##### Get SALT Value
```   |
Get SALT Value
Type: GET 
Token Required: NO
Parameter: None
URL: https://127.0.0.1:1212/isdv/user-management/auth
Response:
{
    "status": "success",
    "data": {
        "saltValue": "6R3YLd17tu91A2NyzXPgTA=="
    },
    "error": ""
}

```
---
#### Login User
```   |
Login User
Type: POST 
Token Required: Yes
Parameter: 
    {
        "userName": "",
        "password": ""
    }
URL: https://127.0.0.1:1212/isdv/user-management/user/userLogin
Response:
{
    "status": "success",
    "data": {
        "_id": "",
        "firstName": "",
        "lastName": "",
        "userName": "",
        "password": "",
        "email": "",
        "phone": "",
        "role": "",
        "description": "",
        "saltValue": "",
        "token": "",
        "locked": false,
        "createdTime": 
    },
    "error": ""
}
```
---
#### Create User
***Note:*** User Role enums: [admin, user]
```   |
Create User
Type: POST 
Token Required: Yes
Parameter: {
        "firstName": "",
        "lastName": "",
        "userName": "",
        "password": "",
        "email": "",
        "phone": "",
        "role": "", 
        "groupPermission": [],
        "description": "",
        "saltValue": ""
    }
URL: https://127.0.0.1:1212/isdv/user-management/user
Response:
{
    {
    "status": "success",
    "data": "user created successfully",
    "error": ""
}
```

---
#### Get User List
```   |
Get User List
Type: GET 
Token Required: Yes
Parameter: None
URL: https://127.0.0.1:1212/isdv/user-management/user
Response:
{
    "status": "success",
    "data": [
        {
            User Object
        },
        {
            User Object
        }
    ],
    "error": ""
}
```
---
#### Get User Login History 
```   |
Get User Login History 
Type: GET 
Token Required: Yes
Parameter: None
URL: https://127.0.0.1:1212/isdv/user-management/login/history
Response:
{
    "status": "success",
    "data": [
        {
            login History Object
        },
        {
            ogin History Object
        }
    ],
    "error": ""
}
```
---