---
# System prepended metadata

title: Site View API Reference

---

# Site View API Reference

## User Management

### `Get /api/v1/User/GetUserListAsync`

**parameter**

| Parameter               | Description      | Schema  |
| ----------------------  | ---------------- | ------- |
| projectId            |                      | number  |

#### Example Response
```json
[
  {
    "userId": 1,
    "firstName": "firstName",
    "lastName": "lastName",
    "fullName": "fullName",
    "email": "email",
    "avatarUrl": "avatarUrl",
    "mobilePhone": "mobilePhone",
    "title": "title",
    "lineId": "lineId",
    "createTimeStamp": "0001-01-01T00:00:00",
    "updateTimeStamp": "0001-01-01T00:00:00",
    "updateBy": 0,
    "guId": 0,
    "companyId": 0
  }
]

```

### `Get /api/v1/User/GetUserRole`

**parameter**

| Parameter               | Description      | Schema  |
| ----------------------  | ---------------- | ------- |
| userId            |                      | number  |
| companyId            |                      | number  |

#### Example Response
```json
{
  "companyId": 0,
  "projectList": [
    {
      "projectId": 0,
      "roleByProject": {
        "roleId": 0,
        "roleName": "string",
        "resourceList": [
          {
            "resourceId": 0,
            "resourceName": "string",
            "view": true,
            "create": true,
            "edit": true,
            "cancel": true,
            "comment": true
          }
        ]
      }
    }
  ],
  "isRoleByCompany": true,
  "roleByCompany": {
    "roleId": 0,
    "roleName": "string",
    "resourceList": [
      {
        "resourceId": 0,
        "resourceName": "string",
        "view": true,
        "create": true,
        "edit": true,
        "cancel": true,
        "comment": true
      }
    ]
  }
}

```

### `Put /api/v1/User/SetCompanySelected`

**Body parameter**

| Parameter                   | Description                  | Schema  |
| --------------------------  | ---------------------------- | ------- |
| userId                 |                              | number  |
| companyId                |                              | number  |


#### Example Request
```json
{
  "userId": 0,
  "companyId": 0
}
```

#### Example Response
```json
bool
```

### `Post /api/v1/User/GetListUserManagement`

**Body parameter**

| Parameter                   | Description                  | Schema  |
| --------------------------  | ---------------------------- | ------- |
| projectId (option)      |                              | number  |
| role (option)  |                              | number  |
| search  (option)  |  search name and email user  | string  |


#### Example Request
```json
{
  "projectId": 0,
  "role": 0,
  "search": ""
}
```

#### Example Response
```json
[
    {
      "name": "name",
      "email": "email",
      "project": [
          {
              "projectId": 0,
              "projectName": "name",
              "roleName": "role name",
              "role": 0
          }
      ]
    }
]
```