# User

User API which allows member management within project, company, and domain note: Administrator must register User first.

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

\
\


## User

**User Methods:**

| Method                                                                                                                                        | Request                                                                                                                                                   | Response                                                                                                          |
| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| [**create**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#create)                               | [CreateUserRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#createuserrequest)                         | [UserInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#userinfo)   |
| [**update**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#update)                               | [UpdateUserRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#updateuserrequest)                         | [UserInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#userinfo)   |
| [**verify\_email**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#verify_email)                  | [VerifyEmailUserRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#verifyemailuserrequest)               | [Empty](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#empty)         |
| [**disable\_mfa**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#disable_mfa)                    | [DisableMFAUserRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#disablemfauserrequest)                 | [UserInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#userinfo)   |
| [**set\_required\_actions**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#set_required_actions) | [SetRequiredActionsUserRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#setrequiredactionsuserrequest) | [UserInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#userinfo)   |
| [**set\_refresh\_timeout**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#set_refresh_timeout)   | [SetRefreshTimeout](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#setrefreshtimeout)                         | [UserInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#userinfo)   |
| [**enable**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#enable)                               | [UserRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#userrequest)                                     | [UserInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#userinfo)   |
| [**disable**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#disable)                             | [UserRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#userrequest)                                     | [UserInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#userinfo)   |
| [**delete**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#delete)                               | [UserRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#userrequest)                                     | [Empty](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#empty)         |
| [**get**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#get)                                     | [UserRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#userrequest)                                     | [UserInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#userinfo)   |
| [**list**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#list)                                   | [UserSearchQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#usersearchquery)                             | [UsersInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#usersinfo) |
| [**stat**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#stat)                                   | [UserStatQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#userstatquery)                                 | [Struct](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#struct)       |

\


### create

You can create user. after create user you have to binding role to user. See role-binding create api. External type user do not need password.

> **POST** /identity/v2/user/create

\{{< tabs " create " >\}}

\{{< tab "Request Example" >\}}

[CreateUserRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#createuserrequest)

* **user\_id** (string) `Required`
* **auth\_type** (AuthType) `Required`
*   **reset\_password** (bool) `Required`

    _If reset\_password is true, send email_
*   **password** (string)

    _When auth\_type is LOCAL, password is required._
* **name** (string)
* **email** (string)
*   **language** (string)

    _en,ko_
*   **timezone** (string)

    _UTC, Asia/Seoul_
* **tags** (Struct)

\{{< highlight json >\}} { "user\_id": "wonny@cloudforet.io", "password": "Password1234!", "reset\_password": false, "name": "Wonny", "email": "wonny@cloudforet.io", "auth\_type": "LOCAL", "language": "en", "timezone": "UTC" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< tab "Response Example" >\}}

[UserInfo](#USERINFO)

* **user\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **email** (string) `Required`
* **email\_verified** (bool) `Required`
* **auth\_type** (AuthType) `Required`
* **role\_id** (string) `Required`
* **role\_type** (RoleType) `Required`
* **mfa** (MFA) `Required`
* **language** (string) `Required`
* **timezone** (string) `Required`
* **required\_actions** (UserRequiredAction) `Repeated` `Required`
* **refresh\_timeout** (int32) `Required`
* **tags** (Struct) `Required`
* **domain\_id** (string) `Required`
* **created\_at** (string) `Required`
* **last\_accessed\_at** (string) `Required`

\{{< highlight json >\}} { "user\_id": "wonny@cloudforet.io", "password": "Password1234!", "name": "Wonny", "email": "wonny@cloudforet.io", "auth\_type": "LOCAL", "language": "en", "timezone": "UTC" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### update

Update user info by given user\_id

> **POST** /identity/v2/user/update

\{{< tabs " update " >\}}

\{{< tab "Request Example" >\}}

[UpdateUserRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#updateuserrequest)

* **user\_id** (string) `Required`
* **password** (string)
* **name** (string)
* **email** (string)
* **language** (string)
* **timezone** (string)
* **tags** (Struct)
* **reset\_password** (bool)

\{{< highlight json >\}} { "user\_id": "wonny@cloudforet.io", "password": "Password1234!!", "reset\_password": false, "name": "Cloudforet", "email": "cloudforet@cloudforet.io", "auth\_type": "LOCAL", "language": "en", "timezone": "UTC" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< tab "Response Example" >\}}

[UserInfo](#USERINFO)

* **user\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **email** (string) `Required`
* **email\_verified** (bool) `Required`
* **auth\_type** (AuthType) `Required`
* **role\_id** (string) `Required`
* **role\_type** (RoleType) `Required`
* **mfa** (MFA) `Required`
* **language** (string) `Required`
* **timezone** (string) `Required`
* **required\_actions** (UserRequiredAction) `Repeated` `Required`
* **refresh\_timeout** (int32) `Required`
* **tags** (Struct) `Required`
* **domain\_id** (string) `Required`
* **created\_at** (string) `Required`
* **last\_accessed\_at** (string) `Required`

\{{< highlight json >\}} { "user\_id": "wonny@cloudforet.io", "password": "Password1234!", "name": "Wonny", "email": "wonny@cloudforet.io", "auth\_type": "LOCAL", "language": "en", "timezone": "UTC" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### verify\_email

> **POST** /identity/v2/user/verify-email

\{{< tabs " verify\_email " >\}}

\{{< tab "Request Example" >\}}

[VerifyEmailUserRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#verifyemailuserrequest)

* **user\_id** (string) `Required`
* **email** (string)

\{{< highlight json >\}} { "user\_id": "example@cloudforet.com", "email": "example@cloudforet.com" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### disable\_mfa

Disable MFA for user. If this api is called, send email to user.

> **POST** /identity/v2/user/disable-mfa

\{{< tabs " disable\_mfa " >\}}

\{{< tab "Request Example" >\}}

[DisableMFAUserRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#disablemfauserrequest)

* **user\_id** (string) `Required`

\{{< highlight json >\}} { "user\_id": "example@cloudforet.com" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< tab "Response Example" >\}}

[UserInfo](#USERINFO)

* **user\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **email** (string) `Required`
* **email\_verified** (bool) `Required`
* **auth\_type** (AuthType) `Required`
* **role\_id** (string) `Required`
* **role\_type** (RoleType) `Required`
* **mfa** (MFA) `Required`
* **language** (string) `Required`
* **timezone** (string) `Required`
* **required\_actions** (UserRequiredAction) `Repeated` `Required`
* **refresh\_timeout** (int32) `Required`
* **tags** (Struct) `Required`
* **domain\_id** (string) `Required`
* **created\_at** (string) `Required`
* **last\_accessed\_at** (string) `Required`

\{{< highlight json >\}} { "user\_id": "wonny@cloudforet.io", "password": "Password1234!", "name": "Wonny", "email": "wonny@cloudforet.io", "auth\_type": "LOCAL", "language": "en", "timezone": "UTC" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### set\_required\_actions

> **POST** /identity/v2/user/set-required-actions

\{{< tabs " set\_required\_actions " >\}}

\{{< tab "Request Example" >\}}

[SetRequiredActionsUserRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#setrequiredactionsuserrequest)

* **user\_id** (string) `Required`
* **required\_actions** (UserRequiredAction) `Repeated` `Required`

\{{< highlight json >\}} { "user\_id": "example@cloudforet.com", "required\_actions": \["UPDATE\_PASSWORD"] } \{{< /highlight >\}} \{{< /tab >\}}

\{{< tab "Response Example" >\}}

[UserInfo](#USERINFO)

* **user\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **email** (string) `Required`
* **email\_verified** (bool) `Required`
* **auth\_type** (AuthType) `Required`
* **role\_id** (string) `Required`
* **role\_type** (RoleType) `Required`
* **mfa** (MFA) `Required`
* **language** (string) `Required`
* **timezone** (string) `Required`
* **required\_actions** (UserRequiredAction) `Repeated` `Required`
* **refresh\_timeout** (int32) `Required`
* **tags** (Struct) `Required`
* **domain\_id** (string) `Required`
* **created\_at** (string) `Required`
* **last\_accessed\_at** (string) `Required`

\{{< highlight json >\}} { "user\_id": "wonny@cloudforet.io", "password": "Password1234!", "name": "Wonny", "email": "wonny@cloudforet.io", "auth\_type": "LOCAL", "language": "en", "timezone": "UTC" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### set\_refresh\_timeout

Sets the user's refresh token timeout. This API can only be used by users with the `DOMAIN_ADMIN` role. Min value is `1800` seconds and max value is `2592000` seconds

> **POST** /identity/v2/user/set-refresh-timeout

\{{< tabs " set\_refresh\_timeout " >\}}

\{{< tab "Request Example" >\}}

[SetRefreshTimeout](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#setrefreshtimeout)

* **user\_id** (string) `Required`
* **refresh\_timeout** (int32) `Required`

\{{< highlight json >\}} { "user\_id": "wonny@cloudforet.io", "refresh\_token\_timout": 10800 } \{{< /highlight >\}} \{{< /tab >\}}

\{{< tab "Response Example" >\}}

[UserInfo](#USERINFO)

* **user\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **email** (string) `Required`
* **email\_verified** (bool) `Required`
* **auth\_type** (AuthType) `Required`
* **role\_id** (string) `Required`
* **role\_type** (RoleType) `Required`
* **mfa** (MFA) `Required`
* **language** (string) `Required`
* **timezone** (string) `Required`
* **required\_actions** (UserRequiredAction) `Repeated` `Required`
* **refresh\_timeout** (int32) `Required`
* **tags** (Struct) `Required`
* **domain\_id** (string) `Required`
* **created\_at** (string) `Required`
* **last\_accessed\_at** (string) `Required`

\{{< highlight json >\}} { "user\_id": "wonny@cloudforet.io", "password": "Password1234!", "name": "Wonny", "email": "wonny@cloudforet.io", "auth\_type": "LOCAL", "language": "en", "timezone": "UTC" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### enable

> **POST** /identity/v2/user/enable

\{{< tabs " enable " >\}}

\{{< tab "Request Example" >\}}

[UserRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#userrequest)

* **user\_id** (string) `Required`

\{{< highlight json >\}} { "user\_id": "example@cloudforet.com" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< tab "Response Example" >\}}

[UserInfo](#USERINFO)

* **user\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **email** (string) `Required`
* **email\_verified** (bool) `Required`
* **auth\_type** (AuthType) `Required`
* **role\_id** (string) `Required`
* **role\_type** (RoleType) `Required`
* **mfa** (MFA) `Required`
* **language** (string) `Required`
* **timezone** (string) `Required`
* **required\_actions** (UserRequiredAction) `Repeated` `Required`
* **refresh\_timeout** (int32) `Required`
* **tags** (Struct) `Required`
* **domain\_id** (string) `Required`
* **created\_at** (string) `Required`
* **last\_accessed\_at** (string) `Required`

\{{< highlight json >\}} { "user\_id": "wonny@cloudforet.io", "password": "Password1234!", "name": "Wonny", "email": "wonny@cloudforet.io", "auth\_type": "LOCAL", "language": "en", "timezone": "UTC" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### disable

> **POST** /identity/v2/user/disable

\{{< tabs " disable " >\}}

\{{< tab "Request Example" >\}}

[UserRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#userrequest)

* **user\_id** (string) `Required`

\{{< highlight json >\}} { "user\_id": "example@cloudforet.com" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< tab "Response Example" >\}}

[UserInfo](#USERINFO)

* **user\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **email** (string) `Required`
* **email\_verified** (bool) `Required`
* **auth\_type** (AuthType) `Required`
* **role\_id** (string) `Required`
* **role\_type** (RoleType) `Required`
* **mfa** (MFA) `Required`
* **language** (string) `Required`
* **timezone** (string) `Required`
* **required\_actions** (UserRequiredAction) `Repeated` `Required`
* **refresh\_timeout** (int32) `Required`
* **tags** (Struct) `Required`
* **domain\_id** (string) `Required`
* **created\_at** (string) `Required`
* **last\_accessed\_at** (string) `Required`

\{{< highlight json >\}} { "user\_id": "wonny@cloudforet.io", "password": "Password1234!", "name": "Wonny", "email": "wonny@cloudforet.io", "auth\_type": "LOCAL", "language": "en", "timezone": "UTC" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### delete

> **POST** /identity/v2/user/delete

\{{< tabs " delete " >\}}

\{{< tab "Request Example" >\}}

[UserRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#userrequest)

* **user\_id** (string) `Required`

\{{< highlight json >\}} { "user\_id": "example@cloudforet.com" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### get

> **POST** /identity/v2/user/get

\{{< tabs " get " >\}}

\{{< tab "Request Example" >\}}

[UserRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#userrequest)

* **user\_id** (string) `Required`

\{{< highlight json >\}} { "user\_id": "example@cloudforet.com" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< tab "Response Example" >\}}

[UserInfo](#USERINFO)

* **user\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **email** (string) `Required`
* **email\_verified** (bool) `Required`
* **auth\_type** (AuthType) `Required`
* **role\_id** (string) `Required`
* **role\_type** (RoleType) `Required`
* **mfa** (MFA) `Required`
* **language** (string) `Required`
* **timezone** (string) `Required`
* **required\_actions** (UserRequiredAction) `Repeated` `Required`
* **refresh\_timeout** (int32) `Required`
* **tags** (Struct) `Required`
* **domain\_id** (string) `Required`
* **created\_at** (string) `Required`
* **last\_accessed\_at** (string) `Required`

\{{< highlight json >\}} { "user\_id": "wonny@cloudforet.io", "password": "Password1234!", "name": "Wonny", "email": "wonny@cloudforet.io", "auth\_type": "LOCAL", "language": "en", "timezone": "UTC" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### list

> **POST** /identity/v2/user/list

\{{< tabs " list " >\}}

\{{< tab "Request Example" >\}}

[UserSearchQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/User/README.md#usersearchquery)

* **query** (Query)
* **user\_id** (string)
* **name** (string)
* **state** (State)
* **email** (string)
* **auth\_type** (AuthType)

\{{< highlight json >\}} { "auth\_type": "LOCAL", "query": { "page": { "start": 1, "limit": 10 }, "sort": \[{ "key": "created\_at", "desc": true }] } } \{{< /highlight >\}} \{{< /tab >\}}

\{{< tab "Response Example" >\}}

[UsersInfo](#USERSINFO)

* **results** (UserInfo) `Repeated` `Required`
* **total\_count** (int32) `Required`

\{{< highlight json >\}} { "results": \[ { "auth\_type": "LOCAL", "created\_at": "2024-11-14T01:53:19.224Z", "domain\_id": "domain-a1b2c3d4e5f6", "email": "wonny@cloudforet.io", "language": "en", "name": "Wonny", "role\_type": "USER", "state": "PENDING", "timezone": "UTC", "user\_id": "wonny@cloudforet.io" }, { "auth\_type": "LOCAL", "created\_at": "2024-11-12T04:46:41.209Z", "domain\_id": "domain-a1b2c3d4e5f6", "email": "cloudforet@cloudforet.io", "language": "ko", "last\_accessed\_at": "2024-11-13T07:42:46.511Z", "name": "Cloudforet Admin", "role\_id": "managed-domain-admin", "role\_type": "DOMAIN\_ADMIN", "state": "ENABLED", "timezone": "UTC", "user\_id": "cloudforet@cloudforet.io" } ], "total\_count": 2 } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### stat

> **POST** /identity/v1/user/stat

\
\


## Message

### CreateUserRequest

* **user\_id** (string) `Required`
* **auth\_type** (AuthType) `Required`
*   **reset\_password** (bool) `Required`

    _If reset\_password is true, send email_
*   **password** (string)

    _When auth\_type is LOCAL, password is required._
* **name** (string)
* **email** (string)
*   **language** (string)

    _en,ko_
*   **timezone** (string)

    _UTC, Asia/Seoul_
*   **tags** (Struct)

    \


### DisableMFAUserRequest

*   **user\_id** (string) `Required`

    \


### MFA

* **state** (State) `Required`
* **mfa\_type** (string) `Required`
*   **options** (Struct) `Required`

    \


### SetRefreshTimeout

* **user\_id** (string) `Required`
*   **refresh\_timeout** (int32) `Required`

    \


### SetRequiredActionsUserRequest

* **user\_id** (string) `Required`
*   **required\_actions** (UserRequiredAction) `Repeated` `Required`

    \


### UpdateUserRequest

* **user\_id** (string) `Required`
* **password** (string)
* **name** (string)
* **email** (string)
* **language** (string)
* **timezone** (string)
* **tags** (Struct)
*   **reset\_password** (bool)

    \


### UserInfo

* **user\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **email** (string) `Required`
* **email\_verified** (bool) `Required`
* **auth\_type** (AuthType) `Required`
* **role\_id** (string) `Required`
* **role\_type** (RoleType) `Required`
* **mfa** (MFA) `Required`
* **language** (string) `Required`
* **timezone** (string) `Required`
* **required\_actions** (UserRequiredAction) `Repeated` `Required`
* **refresh\_timeout** (int32) `Required`
* **tags** (Struct) `Required`
* **domain\_id** (string) `Required`
* **created\_at** (string) `Required`
*   **last\_accessed\_at** (string) `Required`

    \


### UserRequest

*   **user\_id** (string) `Required`

    \


### UserSearchQuery

* **query** (Query)
* **user\_id** (string)
* **name** (string)
* **state** (State)
* **email** (string)
*   **auth\_type** (AuthType)

    \


### UserStatQuery

*   **query** (StatisticsQuery) `Required`

    \


### UsersInfo

* **results** (UserInfo) `Repeated` `Required`
*   **total\_count** (int32) `Required`

    \


### VerifyEmailUserRequest

* **user\_id** (string) `Required`
*   **email** (string)

    \
