# WorkspaceUser

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

\
\


## WorkspaceUser

WorkspaceUser service api are used to manage workspace users by the workspace owner.

**WorkspaceUser Methods:**

| Method                                                                                                                   | Request                                                                                                                                                      | Response                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| [**create**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/WorkspaceUser/README.md#create) | [CreateWorkspaceUserRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/WorkspaceUser/README.md#createworkspaceuserrequest) | [WorkspaceUserInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/WorkspaceUser/README.md#workspaceuserinfo)   |
| [**get**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/WorkspaceUser/README.md#get)       | [WorkspaceUserRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/WorkspaceUser/README.md#workspaceuserrequest)             | [WorkspaceUserInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/WorkspaceUser/README.md#workspaceuserinfo)   |
| [**find**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/WorkspaceUser/README.md#find)     | [WorkspaceUserFindRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/WorkspaceUser/README.md#workspaceuserfindrequest)     | [UsersSummaryInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/WorkspaceUser/README.md#userssummaryinfo)     |
| [**list**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/WorkspaceUser/README.md#list)     | [WorkspaceUserSearchQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/WorkspaceUser/README.md#workspaceusersearchquery)     | [WorkspaceUsersInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/WorkspaceUser/README.md#workspaceusersinfo) |
| [**stat**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/WorkspaceUser/README.md#stat)     | [WorkspaceUserStatQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/WorkspaceUser/README.md#workspaceuserstatquery)         | [Struct](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/WorkspaceUser/README.md#struct)                         |

\


### create

Create a workspace user. If the user does not exist in your domain, the user will be created in your domain and create a workspace user with the role. If you want to create a workspace user with the existing user, you can use role-binding create api.

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

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

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

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

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

    _LOCAL, EXTERNAL_
*   **reset\_password** (bool) `Required`

    _If reset\_password is true, send email_
*   **role\_id** (string) `Required`

    _You can use custom role or managed role something like `managed-workspace-member`, `managed-workspace-owner` ,..._
*   **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": "Password0\*", "name": "Wonny", "email": "wonny@cloudforet.io", "auth\_type": "LOCAL", "language": "en", "timezone": "UTC", "tags": { "team": "cloudforet" }, "reset\_password": false, "role\_id": "managed-workspace-member" } \{{< /highlight >\}} \{{< /tab >\}}

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

[WorkspaceUserInfo](#WORKSPACEUSERINFO)

* **user\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **email** (string) `Required`
* **auth\_type** (AuthType) `Required`
* **role\_type** (RoleType) `Required`
* **language** (string) `Required`
* **timezone** (string) `Required`
* **api\_key\_count** (int32) `Required`
* **tags** (Struct) `Required`
* **role\_binding\_info** (RoleBindingInfo) `Required`
* **email\_verified** (bool) `Required`
* **domain\_id** (string) `Required`
* **created\_at** (string) `Required`
* **last\_accessed\_at** (string) `Required`

\{{< highlight json >\}} { "user\_id": "wonny@cloudforet.io", "name": "Wonny", "state": "PENDING", "email": "wonny@cloudforet.io", "auth\_type": "LOCAL", "role\_type": "USER", "language": "en", "timezone": "UTC", "api\_key\_count": 0, "role\_binding\_info": { "user\_id": "wonny@cloudforet.io", "workspace\_id": "workspace-99d4nn0c14ae", "domain\_id": "domain-1234ee0c14ae", "role\_binding\_id": "rb-11d4eeaa1411", "role\_id": "managed-workspace-member", "role\_type": "MANAGED", "resource\_group": "WORKSPACE", "created\_at": "2024-11-12T06:06:04.999Z" }, "created\_at": "2024-11-12T06:06:04.999Z" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### get

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

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

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

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

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

    _For DOMAIN ADMIN this field is optional, but for WORKSPACE OWNER and WORKSPACE MEMBER this field is required._

\{{< highlight json >\}} { "user\_id": "wonny@cloudforet.io", "workspace\_id": "workspace-ab12345" } \{{< /highlight >\}} \{{< /tab >\}}

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

[WorkspaceUserInfo](#WORKSPACEUSERINFO)

* **user\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **email** (string) `Required`
* **auth\_type** (AuthType) `Required`
* **role\_type** (RoleType) `Required`
* **language** (string) `Required`
* **timezone** (string) `Required`
* **api\_key\_count** (int32) `Required`
* **tags** (Struct) `Required`
* **role\_binding\_info** (RoleBindingInfo) `Required`
* **email\_verified** (bool) `Required`
* **domain\_id** (string) `Required`
* **created\_at** (string) `Required`
* **last\_accessed\_at** (string) `Required`

\{{< highlight json >\}} { "user\_id": "wonny@cloudforet.io", "name": "Wonny", "state": "PENDING", "email": "wonny@cloudforet.io", "auth\_type": "LOCAL", "role\_type": "USER", "language": "en", "timezone": "UTC", "api\_key\_count": 0, "role\_binding\_info": { "user\_id": "wonny@cloudforet.io", "workspace\_id": "workspace-99d4nn0c14ae", "domain\_id": "domain-1234ee0c14ae", "role\_binding\_id": "rb-11d4eeaa1411", "role\_id": "managed-workspace-member", "role\_type": "MANAGED", "resource\_group": "WORKSPACE", "created\_at": "2024-11-12T06:06:04.999Z" }, "created\_at": "2024-11-12T06:06:04.999Z" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### find

> **POST** /identity/v2/workspace-user/find

\{{< tabs " find " >\}}

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

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

* **keyword** (string) `Required`
* **workspace\_id** (string) `Required`
* **state** (State)
* **page** (Page)

\{{< highlight json >\}} { "keyword": "cloudforet", "state": "ENABLED", "page": { "start": 1, "limit": 5 } } \{{< /highlight >\}} \{{< /tab >\}}

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

[UsersSummaryInfo](#USERSSUMMARYINFO)

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

\{{< highlight json >\}} { "results": \[ { "user\_id": "wonny@cloudforet.io", "name": "Wonny", "state": "ENABLED" }, { "user\_id": "belty@cloudforet.io", "name": "Belty", "state": "ENABLED" }, { "user\_id": "bolby@cloudforet.io", "state": "PENDING" }, { "user\_id": "cuby@cloudforet.io", "state": "PENDING" }, { "user\_id": "musly@cloudforet.io", "state": "PENDING" } ], "total\_count": 21 } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### list

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

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

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

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

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

\{{< highlight json >\}} { "query": { "filter": \[ { "k": "language", "v": "en", "o": "eq" } ] } } \{{< /highlight >\}} \{{< /tab >\}}

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

[WorkspaceUsersInfo](#WORKSPACEUSERSINFO)

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

\{{< highlight json >\}} { "results": \[ { "user\_id": "wonny@cloudforet.io", "name": "Wonny", "state": "ENABLED", "email": "wonny@cloudforet.io", "auth\_type": "LOCAL", "role\_type": "USER", "language": "en", "timezone": "UTC", "api\_key\_count": 2, "role\_binding\_info": { "user\_id": "wonny@cloudforet.io", "workspace\_id": "workspace-99d4nn0c14ae", "domain\_id": "domain-1234ee0c14ae", "role\_binding\_id": "rb-11d4eeaa1411", "role\_id": "managed-workspace-member", "role\_type": "MANAGED", "resource\_group": "WORKSPACE", "created\_at": "2024-11-12T06:06:04.999Z" }, "domain\_id": "domain-1234ee0c14ae", "created\_at": "2024-11-12T06:06:04.999Z", "last\_accessed\_at": "2024-11-12T06:06:04.999Z" } ] } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### stat

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

\
\


## Message

### CreateWorkspaceUserRequest

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

    _LOCAL, EXTERNAL_
*   **reset\_password** (bool) `Required`

    _If reset\_password is true, send email_
*   **role\_id** (string) `Required`

    _You can use custom role or managed role something like `managed-workspace-member`, `managed-workspace-owner` ,..._
*   **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)

    \


### UserSummaryInfo

* **user\_id** (string) `Required`
* **name** (string) `Required`
*   **state** (State) `Required`

    \


### UsersSummaryInfo

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

    \


### WorkspaceUserFindRequest

* **keyword** (string) `Required`
* **workspace\_id** (string) `Required`
* **state** (State)
*   **page** (Page)

    \


### WorkspaceUserInfo

* **user\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **email** (string) `Required`
* **auth\_type** (AuthType) `Required`
* **role\_type** (RoleType) `Required`
* **language** (string) `Required`
* **timezone** (string) `Required`
* **api\_key\_count** (int32) `Required`
* **tags** (Struct) `Required`
* **role\_binding\_info** (RoleBindingInfo) `Required`
* **email\_verified** (bool) `Required`
* **domain\_id** (string) `Required`
* **created\_at** (string) `Required`
*   **last\_accessed\_at** (string) `Required`

    \


### WorkspaceUserRequest

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

    _For DOMAIN ADMIN this field is optional, but for WORKSPACE OWNER and WORKSPACE MEMBER this field is required._

    \


### WorkspaceUserSearchQuery

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

    \


### WorkspaceUserStatQuery

* **query** (StatisticsQuery) `Required`
*   **workspace\_id** (string) `Required`

    \


### WorkspaceUsersInfo

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

    \
