> For the complete documentation index, see [llms.txt](https://spaceone-dev.gitbook.io/spaceone-apis/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://spaceone-dev.gitbook.io/spaceone-apis/identity/v1/user.md).

# User

> **Package : spaceone.api.identity.v1**

## User

{% hint style="info" %}
**User Methods:**
{% endhint %}

| Method                                              | Request                                                 | Response                                                                                                           |
| --------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| [**create**](#create)                               | [CreateUserRequest](#createuserrequest)                 | [UserInfo](#userinfo)                                                                                              |
| [**update**](#update)                               | [UpdateUserRequest](#updateuserrequest)                 | [UserInfo](#userinfo)                                                                                              |
| [**set\_required\_actions**](#set_required_actions) | [SetRequiredActionsRequest](#setrequiredactionsrequest) | [UserInfo](#userinfo)                                                                                              |
| [**enable**](#enable)                               | [UserRequest](#userrequest)                             | [UserInfo](#userinfo)                                                                                              |
| [**disable**](#disable)                             | [UserRequest](#userrequest)                             | [UserInfo](#userinfo)                                                                                              |
| [**delete**](#delete)                               | [UserRequest](#userrequest)                             | [google.protobuf.Empty](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto)   |
| [**get**](#get)                                     | [GetUserRequest](#getuserrequest)                       | [UserInfo](#userinfo)                                                                                              |
| [**list**](#list)                                   | [UserQuery](#userquery)                                 | [UsersInfo](#usersinfo)                                                                                            |
| [**stat**](#stat)                                   | [UserStatQuery](#userstatquery)                         | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |
| [**find**](#find)                                   | [FindUserQuery](#finduserquery)                         | [FindUsersInfo](#findusersinfo)                                                                                    |
| [**sync**](#sync)                                   | [UserRequest](#userrequest)                             | [UserInfo](#userinfo)                                                                                              |

### create

> **POST** /identity/v1/users

| Type     | Message                                 |
| -------- | --------------------------------------- |
| Request  | [CreateUserRequest](#createuserrequest) |
| Response | [UserInfo](#userinfo)                   |

### update

> **PUT** /identity/v1/users

> Update user info by given user\_id

| Type     | Message                                 |
| -------- | --------------------------------------- |
| Request  | [UpdateUserRequest](#updateuserrequest) |
| Response | [UserInfo](#userinfo)                   |

{% tabs %}
{% tab title="Request Example" %}

```
{
    "user_id": "dkang@mz.co.kr",
    "tags": [
        {
            "key": "user1",
            "value": "Reuters"
        },
        {
            "key": "user2",
            "value": "Bloomberg"
        }
    ],
    "domain_id": "{{DOMAIN_ID}}"
}
```

{% endtab %}

{% tab title="Response Example" %}

```
{
    "user_id": "dkang@mz.co.kr",
    "name": "Dong Yoo kang",
    "state": "ENABLED",
    "email": "dkang@mz.co.kr",
    "language": "en",
    "timezone": "UTC",
    "tags": [
        {
            "key": "user1",
            "value": "Reuters"
        },
        {
            "key": "user2",
            "value": "Bloomberg"
        }
    ],
    "last_accessed_at": {
        "seconds": "1593161630",
        "nanos": 79000000
    },
    "created_at": {
        "seconds": "1593161630",
        "nanos": 79000000
    },
    "domain_id": "domain-fd6e23a5ae36"
}
```

{% endtab %}
{% endtabs %}

### set\_required\_actions

> **POST** /identity/v1/users/set-required-actions

| Type     | Message                                                 |
| -------- | ------------------------------------------------------- |
| Request  | [SetRequiredActionsRequest](#setrequiredactionsrequest) |
| Response | [UserInfo](#userinfo)                                   |

### enable

> **PUT** /identity/v1/user/{user\_id}/enable

| Type     | Message                     |
| -------- | --------------------------- |
| Request  | [UserRequest](#userrequest) |
| Response | [UserInfo](#userinfo)       |

### disable

> **PUT** /identity/v1/user/{user\_id}/disable

| Type     | Message                     |
| -------- | --------------------------- |
| Request  | [UserRequest](#userrequest) |
| Response | [UserInfo](#userinfo)       |

### delete

> **DELETE** /identity/v1/users

| Type     | Message                                                                                                          |
| -------- | ---------------------------------------------------------------------------------------------------------------- |
| Request  | [UserRequest](#userrequest)                                                                                      |
| Response | [google.protobuf.Empty](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto) |

### get

> **GET** /identity/v1/user/{user\_id}

| Type     | Message                           |
| -------- | --------------------------------- |
| Request  | [GetUserRequest](#getuserrequest) |
| Response | [UserInfo](#userinfo)             |

### list

> **GET** /identity/v1/users
>
> **POST** /identity/v1/users/search

| Type     | Message                 |
| -------- | ----------------------- |
| Request  | [UserQuery](#userquery) |
| Response | [UsersInfo](#usersinfo) |

### stat

> **POST** /identity/v1/users/stat

| Type     | Message                                                                                                            |
| -------- | ------------------------------------------------------------------------------------------------------------------ |
| Request  | [UserStatQuery](#userstatquery)                                                                                    |
| Response | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |

### find

> **POST** /identity/v1/users/find

| Type     | Message                         |
| -------- | ------------------------------- |
| Request  | [FindUserQuery](#finduserquery) |
| Response | [FindUsersInfo](#findusersinfo) |

### sync

> **POST** /identity/v1/users/sync

| Type     | Message                     |
| -------- | --------------------------- |
| Request  | [UserRequest](#userrequest) |
| Response | [UserInfo](#userinfo)       |

##

## Message

### CreateUserRequest

| Field      | Type                                                                                                               | Required | Description |
| ---------- | ------------------------------------------------------------------------------------------------------------------ | -------- | ----------- |
| user\_id   | string                                                                                                             | ✔        |             |
| password   | string                                                                                                             | ✘        |             |
| name       | string                                                                                                             | ✘        |             |
| email      | string                                                                                                             | ✘        |             |
| user\_type | <ul><li>NONE\_USER\_TYPE</li><li>USER</li><li>API\_USER</li></ul>                                                  | ✘        |             |
| backend    | <ul><li>NONE\_BACKEND</li><li>LOCAL</li><li>EXTERNAL</li></ul>                                                     | ✔        |             |
| language   | string                                                                                                             | ✘        |             |
| timezone   | string                                                                                                             | ✘        |             |
| tags       | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ✘        |             |
| domain\_id | string                                                                                                             | ✔        |             |

### FindUserInfo

| Field    | Type                                                                                                               | Description |
| -------- | ------------------------------------------------------------------------------------------------------------------ | ----------- |
| user\_id | string                                                                                                             |             |
| name     | string                                                                                                             |             |
| email    | string                                                                                                             |             |
| tags     | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |

### FindUserQuery

| Field      | Type                              | Required | Description |
| ---------- | --------------------------------- | :------: | ----------- |
| search     | [FindUserSearch](#findusersearch) |     ✔    |             |
| domain\_id | string                            |     ✔    |             |

### FindUserSearch

| Field    | Type   | Description |
| -------- | ------ | ----------- |
| user\_id | string |             |
| keyword  | string |             |

### FindUsersInfo

| Field        | Type                                                                                            | Description |
| ------------ | ----------------------------------------------------------------------------------------------- | ----------- |
| results      | [list of FindUserInfo](#finduserinfo)                                                           |             |
| total\_count | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto) |             |

### GetUserRequest

| Field      | Type           | Required | Description |
| ---------- | -------------- | :------: | ----------- |
| user\_id   | string         |     ✔    |             |
| domain\_id | string         |     ✔    |             |
| only       | list of string |     ✘    |             |

### SetRequiredActionsRequest

| Field      | Type                               | Required | Description |
| ---------- | ---------------------------------- | -------- | ----------- |
| user\_id   | string                             | ✔        |             |
| actions    | <ul><li>UPDATE\_PASSWORD</li></ul> | ✔        |             |
| domain\_id | string                             | ✔        |             |

### UpdateUserRequest

| Field      | Type                                                                                                               | Required | Description |
| ---------- | ------------------------------------------------------------------------------------------------------------------ | :------: | ----------- |
| user\_id   | string                                                                                                             |     ✔    |             |
| password   | string                                                                                                             |     ✘    |             |
| name       | string                                                                                                             |     ✘    |             |
| email      | string                                                                                                             |     ✘    |             |
| language   | string                                                                                                             |     ✘    |             |
| timezone   | string                                                                                                             |     ✘    |             |
| tags       | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |     ✘    |             |
| domain\_id | string                                                                                                             |     ✔    |             |

### UserInfo

| Field              | Type                                                                                                               | Description |
| ------------------ | ------------------------------------------------------------------------------------------------------------------ | ----------- |
| user\_id           | string                                                                                                             |             |
| name               | string                                                                                                             |             |
| state              | <ul><li>NONE</li><li>ENABLED</li><li>DISABLED</li><li>PENDING</li></ul>                                            |             |
| email              | string                                                                                                             |             |
| user\_type         | <ul><li>NONE\_USER\_TYPE</li><li>USER</li><li>API\_USER</li></ul>                                                  |             |
| backend            | <ul><li>NONE\_BACKEND</li><li>LOCAL</li><li>EXTERNAL</li></ul>                                                     |             |
| language           | string                                                                                                             |             |
| timezone           | string                                                                                                             |             |
| required\_actions  | <ul><li>UPDATE\_PASSWORD</li></ul>                                                                                 |             |
| tags               | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |
| last\_accessed\_at | string                                                                                                             |             |
| created\_at        | string                                                                                                             |             |
| domain\_id         | string                                                                                                             |             |

### UserQuery

| Field      | Type                                                                                               | Required | Description |
| ---------- | -------------------------------------------------------------------------------------------------- | -------- | ----------- |
| query      | [spaceone.api.core.v1.Query](https://spaceone-dev.gitbook.io/api-reference/common-v1/search-query) | ✘        |             |
| user\_id   | string                                                                                             | ✘        |             |
| name       | string                                                                                             | ✘        |             |
| state      | string                                                                                             | ✘        |             |
| email      | string                                                                                             | ✘        |             |
| user\_type | <ul><li>NONE\_USER\_TYPE</li><li>USER</li><li>API\_USER</li></ul>                                  | ✘        |             |
| backend    | <ul><li>NONE\_BACKEND</li><li>LOCAL</li><li>EXTERNAL</li></ul>                                     | ✘        |             |
| domain\_id | string                                                                                             | ✘        |             |

### UserRequest

| Field      | Type   | Required | Description |
| ---------- | ------ | :------: | ----------- |
| user\_id   | string |     ✔    |             |
| domain\_id | string |     ✔    |             |

### UserStatQuery

| Field      | Type                                                                                                             | Required | Description |
| ---------- | ---------------------------------------------------------------------------------------------------------------- | :------: | ----------- |
| query      | [spaceone.api.core.v1.StatisticsQuery](https://spaceone-dev.gitbook.io/api-reference/common-v1/statistics-query) |     ✔    |             |
| domain\_id | string                                                                                                           |     ✔    |             |

### UsersInfo

| Field        | Type                                                                                            | Description |
| ------------ | ----------------------------------------------------------------------------------------------- | ----------- |
| results      | [list of UserInfo](#userinfo)                                                                   |             |
| total\_count | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto) |             |
