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

# WorkspaceUser

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

\ <br>

## 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)                         |

<br>

### 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 >}}

<br>

### 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 >}}

<br>

### 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 >}}

<br>

### 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 >}}

<br>

### stat

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

\ <br>

## 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)

  <br>

### UserSummaryInfo

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

  <br>

### UsersSummaryInfo

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

  <br>

### WorkspaceUserFindRequest

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

  <br>

### 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`

  <br>

### 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.*

  <br>

### WorkspaceUserSearchQuery

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

  <br>

### WorkspaceUserStatQuery

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

  <br>

### WorkspaceUsersInfo

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

  <br>
