# Users

## Get users list.

> Return the list of users of the tenant.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Users"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"Roles":{"in":"query","required":false,"name":"roles","schema":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"description":"Filter the returned entities to only those with the required role"},"CreatedByMe":{"in":"query","required":false,"name":"onlyCreatedByMe","schema":{"type":"boolean"},"description":"Filter the returned entities to only those that created by the requesting subject"},"UserType":{"in":"query","required":false,"name":"usersType","schema":{"type":"string","items":{"$ref":"#/components/schemas/UserType"}},"description":"Available only when SSO enabled"}},"schemas":{"Role":{"type":"string","enum":["admin","department_admin","researcher","editor","viewer","research_manager","ml_engineer"]},"UserType":{"enum":["sso-user","regular-user"]},"User1":{"allOf":[{"$ref":"#/components/schemas/AuthEntity"},{"required":["email"]},{"properties":{"email":{"type":"string","description":"Email address of the user."},"lastLogin":{"type":"string","format":"date-time","description":"The last time the user logged into the system."}}}]},"AuthEntity":{"properties":{"entityType":{"$ref":"#/components/schemas/AuthEntityType"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"userId":{"$ref":"#/components/schemas/UserId"},"permitAllClusters":{"type":"boolean"},"permittedClusters":{"type":"array","description":"A list of clusters that the user or application can access.","items":{"$ref":"#/components/schemas/ClusterId"}},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"createdAt":{"type":"string","format":"date-time","description":"The creation date of the application."}}},"AuthEntityType":{"type":"string","description":"The type of authentication entity.","enum":["regular-user","sso-user","app","group","internal-user","super-admin"]},"TenantId":{"description":"The id of the tenant.","type":"integer","format":"int32"},"UserId":{"description":"Unique identifier of the user","type":"string","format":"uuid"},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/k8s/users":{"get":{"operationId":"getUsers","deprecated":true,"tags":["Users"],"summary":"Get users list.","description":"Return the list of users of the tenant.","parameters":[{"$ref":"#/components/parameters/Roles"},{"$ref":"#/components/parameters/CreatedByMe"},{"$ref":"#/components/parameters/UserType"}],"responses":{"200":{"description":"The complete set of permissions.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User1"}}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Create a new user.

> Create a new user and assign it with a password. It is possible to force the user to change the password upon next login by setting needToChangePassword to true. This endpoint requires ADMIN role. Deprecated endpoint. Use the new endpoint api/v1/users instead.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Users"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"UserCreationRequest":{"required":["email","password","roles"],"properties":{"email":{"type":"string","description":"Email address of the user."},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"entityType":{"$ref":"#/components/schemas/AuthEntityType"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"password":{"type":"string","description":"The user's password."},"needToChangePassword":{"type":"boolean","description":"True if the user is requested to change his password upon next login."},"permitAllClusters":{"type":"boolean"},"userId":{"$ref":"#/components/schemas/UserId"},"permittedClusters":{"type":"array","items":{"$ref":"#/components/schemas/ClusterId"}}}},"Role":{"type":"string","enum":["admin","department_admin","researcher","editor","viewer","research_manager","ml_engineer"]},"AuthEntityType":{"type":"string","description":"The type of authentication entity.","enum":["regular-user","sso-user","app","group","internal-user","super-admin"]},"TenantId":{"description":"The id of the tenant.","type":"integer","format":"int32"},"UserId":{"description":"Unique identifier of the user","type":"string","format":"uuid"},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"UserCreationResponse":{"allOf":[{"$ref":"#/components/schemas/UserCreationRequest"}]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/k8s/users":{"post":{"operationId":"createUser","deprecated":true,"tags":["Users"],"summary":"Create a new user.","description":"Create a new user and assign it with a password. It is possible to force the user to change the password upon next login by setting needToChangePassword to true. This endpoint requires ADMIN role. Deprecated endpoint. Use the new endpoint api/v1/users instead.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreationRequest"}}}},"responses":{"200":{"description":"The complete set of permissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreationResponse"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get user details.

> Get the details of a given user. This endpoint requires ADMIN, EDITOR or VIEWER role. Deprecated endpoint. Use the new endpoint api/v1/users/{userId} instead.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Users"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"UserId":{"description":"Unique identifier of the user","type":"string","format":"uuid"},"User1":{"allOf":[{"$ref":"#/components/schemas/AuthEntity"},{"required":["email"]},{"properties":{"email":{"type":"string","description":"Email address of the user."},"lastLogin":{"type":"string","format":"date-time","description":"The last time the user logged into the system."}}}]},"AuthEntity":{"properties":{"entityType":{"$ref":"#/components/schemas/AuthEntityType"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"userId":{"$ref":"#/components/schemas/UserId"},"permitAllClusters":{"type":"boolean"},"permittedClusters":{"type":"array","description":"A list of clusters that the user or application can access.","items":{"$ref":"#/components/schemas/ClusterId"}},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"createdAt":{"type":"string","format":"date-time","description":"The creation date of the application."}}},"AuthEntityType":{"type":"string","description":"The type of authentication entity.","enum":["regular-user","sso-user","app","group","internal-user","super-admin"]},"TenantId":{"description":"The id of the tenant.","type":"integer","format":"int32"},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"Role":{"type":"string","enum":["admin","department_admin","researcher","editor","viewer","research_manager","ml_engineer"]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/k8s/users/{userId}":{"get":{"operationId":"getUserById","deprecated":true,"tags":["Users"],"summary":"Get user details.","description":"Get the details of a given user. This endpoint requires ADMIN, EDITOR or VIEWER role. Deprecated endpoint. Use the new endpoint api/v1/users/{userId} instead.","parameters":[{"in":"path","required":true,"name":"userId","schema":{"$ref":"#/components/schemas/UserId"}}],"responses":{"200":{"description":"User details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User1"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Update user details.

> Update the details of a given user. This endpoint requires ADMIN role. Deprecated endpoint. Use the new endpoint api/v1/users/{userId} instead.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Users"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"UserId":{"description":"Unique identifier of the user","type":"string","format":"uuid"},"User1":{"allOf":[{"$ref":"#/components/schemas/AuthEntity"},{"required":["email"]},{"properties":{"email":{"type":"string","description":"Email address of the user."},"lastLogin":{"type":"string","format":"date-time","description":"The last time the user logged into the system."}}}]},"AuthEntity":{"properties":{"entityType":{"$ref":"#/components/schemas/AuthEntityType"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"userId":{"$ref":"#/components/schemas/UserId"},"permitAllClusters":{"type":"boolean"},"permittedClusters":{"type":"array","description":"A list of clusters that the user or application can access.","items":{"$ref":"#/components/schemas/ClusterId"}},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"createdAt":{"type":"string","format":"date-time","description":"The creation date of the application."}}},"AuthEntityType":{"type":"string","description":"The type of authentication entity.","enum":["regular-user","sso-user","app","group","internal-user","super-admin"]},"TenantId":{"description":"The id of the tenant.","type":"integer","format":"int32"},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"Role":{"type":"string","enum":["admin","department_admin","researcher","editor","viewer","research_manager","ml_engineer"]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/k8s/users/{userId}":{"put":{"operationId":"updateUserById","deprecated":true,"tags":["Users"],"summary":"Update user details.","description":"Update the details of a given user. This endpoint requires ADMIN role. Deprecated endpoint. Use the new endpoint api/v1/users/{userId} instead.","parameters":[{"in":"path","name":"userId","required":true,"schema":{"$ref":"#/components/schemas/UserId"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User1"}}}},"responses":{"200":{"description":"User updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User1"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Delete a user.

> Delete the given user from the tenant. This endpoint requires ADMIN role. Deprecated endpoint. Use the new endpoint api/v1/users/{userId} instead.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Users"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"UserId":{"description":"Unique identifier of the user","type":"string","format":"uuid"},"UserType":{"enum":["sso-user","regular-user"]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"parameters":{"UserType":{"in":"query","required":false,"name":"usersType","schema":{"type":"string","items":{"$ref":"#/components/schemas/UserType"}},"description":"Available only when SSO enabled"}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/k8s/users/{userId}":{"delete":{"operationId":"deleteUserById","deprecated":true,"tags":["Users"],"summary":"Delete a user.","description":"Delete the given user from the tenant. This endpoint requires ADMIN role. Deprecated endpoint. Use the new endpoint api/v1/users/{userId} instead.","parameters":[{"in":"path","name":"userId","required":true,"schema":{"$ref":"#/components/schemas/UserId"}},{"$ref":"#/components/parameters/UserType"}],"responses":{"200":{"description":"User deleted successfully."},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get all possible permissions.

> Get the complete set of permissions that a tenant can grant to users and applications. Deprecated endpoint. please refer to Roles & Access rules API.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Users"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"Role":{"type":"string","enum":["admin","department_admin","researcher","editor","viewer","research_manager","ml_engineer"]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/k8s/users/roles":{"get":{"operationId":"getRoles","deprecated":true,"tags":["Users"],"summary":"Get all possible permissions.","description":"Get the complete set of permissions that a tenant can grant to users and applications. Deprecated endpoint. please refer to Roles & Access rules API.","responses":{"200":{"description":"The complete set of permissions.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Role"}}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get user permissions.

> Return the set of permissions granted to a given user. Deprecated endpoint. please reffer to Roles & Access rules API.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Users"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"UserId":{"description":"Unique identifier of the user","type":"string","format":"uuid"},"Role":{"type":"string","enum":["admin","department_admin","researcher","editor","viewer","research_manager","ml_engineer"]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/k8s/users/{userId}/roles":{"get":{"operationId":"getUserRoles","deprecated":true,"tags":["Users"],"summary":"Get user permissions.","description":"Return the set of permissions granted to a given user. Deprecated endpoint. please reffer to Roles & Access rules API.","parameters":[{"in":"path","required":true,"name":"userId","schema":{"$ref":"#/components/schemas/UserId"}}],"responses":{"200":{"description":"A set of permissions that the user is granted.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Role"}}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get groups list.

> Return the list of groups of the tenant. Deprecated endpoint. please reffer to Roles & Access rules API.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Users"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"Roles":{"in":"query","required":false,"name":"roles","schema":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"description":"Filter the returned entities to only those with the required role"},"CreatedByMe":{"in":"query","required":false,"name":"onlyCreatedByMe","schema":{"type":"boolean"},"description":"Filter the returned entities to only those that created by the requesting subject"}},"schemas":{"Role":{"type":"string","enum":["admin","department_admin","researcher","editor","viewer","research_manager","ml_engineer"]},"Group":{"properties":{"entityType":{"type":"string"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"userId":{"type":"string","description":"Group's name"},"permitAllClusters":{"type":"boolean"},"permittedClusters":{"type":"array","description":"A list of clusters that the user or application can access.","items":{"$ref":"#/components/schemas/ClusterId"}},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"createdBy":{"type":"string","description":"uid of the user"}}},"TenantId":{"description":"The id of the tenant.","type":"integer","format":"int32"},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/k8s/groups":{"get":{"operationId":"getGroups","deprecated":true,"tags":["Users"],"summary":"Get groups list.","description":"Return the list of groups of the tenant. Deprecated endpoint. please reffer to Roles & Access rules API.","parameters":[{"$ref":"#/components/parameters/Roles"},{"$ref":"#/components/parameters/CreatedByMe"}],"responses":{"200":{"description":"The complete set of permissions.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Create a new group.

> Create a new group and assign it with roles. Deprecated endpoint. please reffer to Roles & Access rules API.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Users"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"GroupCreationRequest":{"required":["email","password","roles","username"],"properties":{"username":{"type":"string","description":"Group's name"},"email":{"type":"string","description":"Empty email address"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"entityType":{"type":"string"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"permitAllClusters":{"type":"boolean"},"userId":{"type":"string","description":"Group's name"},"permittedClusters":{"type":"array","items":{"$ref":"#/components/schemas/ClusterId"}},"createdBy":{"type":"string","description":"uid of the user"}}},"Role":{"type":"string","enum":["admin","department_admin","researcher","editor","viewer","research_manager","ml_engineer"]},"TenantId":{"description":"The id of the tenant.","type":"integer","format":"int32"},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"GroupCreationResponse":{"allOf":[{"$ref":"#/components/schemas/GroupCreationRequest"}]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/k8s/groups":{"post":{"operationId":"createGroup","deprecated":true,"tags":["Users"],"summary":"Create a new group.","description":"Create a new group and assign it with roles. Deprecated endpoint. please reffer to Roles & Access rules API.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupCreationRequest"}}}},"responses":{"200":{"description":"The complete set of permissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupCreationResponse"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get group details.

> Get the details of a given group. This endpoint requires ADMIN, EDITOR or VIEWER role. Deprecated endpoint. please reffer to Roles & Access rules API.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Users"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"GroupName":{"in":"path","name":"groupName","required":true,"schema":{"description":"Unique identifier of the group","type":"string","format":"string"}}},"schemas":{"Group":{"properties":{"entityType":{"type":"string"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"userId":{"type":"string","description":"Group's name"},"permitAllClusters":{"type":"boolean"},"permittedClusters":{"type":"array","description":"A list of clusters that the user or application can access.","items":{"$ref":"#/components/schemas/ClusterId"}},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"createdBy":{"type":"string","description":"uid of the user"}}},"TenantId":{"description":"The id of the tenant.","type":"integer","format":"int32"},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"Role":{"type":"string","enum":["admin","department_admin","researcher","editor","viewer","research_manager","ml_engineer"]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/k8s/groups/{groupName}":{"get":{"operationId":"geGroupByName","deprecated":true,"tags":["Users"],"summary":"Get group details.","description":"Get the details of a given group. This endpoint requires ADMIN, EDITOR or VIEWER role. Deprecated endpoint. please reffer to Roles & Access rules API.","parameters":[{"$ref":"#/components/parameters/GroupName"}],"responses":{"200":{"description":"Group details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Update group details.

> Update the details of a given group. This endpoint requires ADMIN role. Deprecated endpoint. please reffer to Roles & Access rules API.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Users"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"GroupName":{"in":"path","name":"groupName","required":true,"schema":{"description":"Unique identifier of the group","type":"string","format":"string"}}},"schemas":{"GroupWithName":{"allOf":[{"$ref":"#/components/schemas/Group"},{"properties":{"username":{"type":"string","description":"group name"}}}]},"Group":{"properties":{"entityType":{"type":"string"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"userId":{"type":"string","description":"Group's name"},"permitAllClusters":{"type":"boolean"},"permittedClusters":{"type":"array","description":"A list of clusters that the user or application can access.","items":{"$ref":"#/components/schemas/ClusterId"}},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"createdBy":{"type":"string","description":"uid of the user"}}},"TenantId":{"description":"The id of the tenant.","type":"integer","format":"int32"},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"Role":{"type":"string","enum":["admin","department_admin","researcher","editor","viewer","research_manager","ml_engineer"]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/k8s/groups/{groupName}":{"put":{"operationId":"updateGroupByName","deprecated":true,"tags":["Users"],"summary":"Update group details.","description":"Update the details of a given group. This endpoint requires ADMIN role. Deprecated endpoint. please reffer to Roles & Access rules API.","parameters":[{"$ref":"#/components/parameters/GroupName"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupWithName"}}}},"responses":{"200":{"description":"Group updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Delete a group.

> Delete the given group from the tenant. This endpoint requires ADMIN role. Deprecated endpoint. please reffer to Roles & Access rules API.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Users"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"GroupName":{"in":"path","name":"groupName","required":true,"schema":{"description":"Unique identifier of the group","type":"string","format":"string"}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}}},"paths":{"/v1/k8s/groups/{groupName}":{"delete":{"operationId":"deleteGroupByName","deprecated":true,"tags":["Users"],"summary":"Delete a group.","description":"Delete the given group from the tenant. This endpoint requires ADMIN role. Deprecated endpoint. please reffer to Roles & Access rules API.","parameters":[{"$ref":"#/components/parameters/GroupName"}],"responses":{"200":{"description":"Group deleted successfully."},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get users.

> Retrieve a list of platform users.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Users"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"usersFilterBy":{"name":"filterBy","in":"query","required":false,"description":"Filter results by a parameter. Use the format field-name operator value. Operators are <= Less than or equal, >= Greater than or equal, =@ contains. Dates are in ISO 8601 timestamp format and available for operators <= and >=.","schema":{"type":"array","items":{"type":"string","pattern":"^(username|createdBy|lastLogin|creationTime|lastUpdated|isLocal)(==|<=|>=|=@).+$"}},"explode":false},"usersSortBy":{"name":"sortBy","in":"query","required":false,"description":"Sort results by a parameters.","schema":{"$ref":"#/components/schemas/UsersFilterSortFields"}},"SortOrder":{"name":"sortOrder","in":"query","required":false,"description":"Sort results in descending or ascending order.","schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},"Offset":{"name":"offset","in":"query","required":false,"description":"The offset of the first item returned in the collection.","schema":{"type":"integer","format":"int32"}},"limit":{"name":"limit","in":"query","required":false,"description":"The maximum number of entries to return.","schema":{"type":"integer","format":"int32","default":500,"minimum":1,"maximum":500}}},"schemas":{"UsersFilterSortFields":{"type":"string","enum":["username","createdBy","lastLogin","creationTime","lastUpdated","type"]},"Users1":{"type":"array","items":{"$ref":"#/components/schemas/User2"}},"User2":{"type":"object","required":["id","username","createdBy","createdAt","updatedAt","lastLogin","isLocal"],"properties":{"id":{"type":"string"},"username":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"lastLogin":{"type":"string","format":"date-time","nullable":true},"isLocal":{"type":"boolean","nullable":true},"groups":{"type":"array","items":{"type":"string"},"nullable":true}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/users":{"get":{"summary":"Get users.","description":"Retrieve a list of platform users.","operationId":"get_users","tags":["Users"],"parameters":[{"description":"Filter results by user attribute.","in":"query","name":"filter","required":false,"deprecated":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/usersFilterBy"},{"$ref":"#/components/parameters/usersSortBy"},{"$ref":"#/components/parameters/SortOrder"},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/limit"}],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users1"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Create a local user.

> Use to create a local platform user.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Users"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"UserCreationRequest1":{"type":"object","required":["email"],"properties":{"email":{"type":"string"},"resetPassword":{"type":"boolean","nullable":true}}},"UserPostResponse":{"type":"object","required":["id","username","tempPassword"],"properties":{"id":{"type":"string"},"username":{"type":"string"},"tempPassword":{"type":"string"}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409Conflict":{"description":"The specified resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/users":{"post":{"summary":"Create a local user.","description":"Use to create a local platform user.","operationId":"create_user","tags":["Users"],"requestBody":{"description":"User object to create","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreationRequest1"}}}},"responses":{"201":{"description":"Created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPostResponse"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"409":{"$ref":"#/components/responses/409Conflict"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Count users

> count users

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Users"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"usersFilterBy":{"name":"filterBy","in":"query","required":false,"description":"Filter results by a parameter. Use the format field-name operator value. Operators are <= Less than or equal, >= Greater than or equal, =@ contains. Dates are in ISO 8601 timestamp format and available for operators <= and >=.","schema":{"type":"array","items":{"type":"string","pattern":"^(username|createdBy|lastLogin|creationTime|lastUpdated|isLocal)(==|<=|>=|=@).+$"}},"explode":false}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}}},"paths":{"/api/v1/users/count":{"get":{"summary":"Count users","operationId":"count_users","description":"count users","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/usersFilterBy"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","required":["count"],"properties":{"count":{"type":"integer","format":"int64"}}}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Logout a user.

> Use to force a user to logout.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Users"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"userId":{"name":"userId","in":"path","required":true,"description":"The id of the user","schema":{"type":"string"}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}}},"paths":{"/api/v1/users/{userId}/logout":{"post":{"summary":"Logout a user.","description":"Use to force a user to logout.","operationId":"logout_user","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"}],"responses":{"200":{"description":"Executed successfully."},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Reset a user's password.

> Use to to reset a user's password.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Users"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"userId":{"name":"userId","in":"path","required":true,"description":"The id of the user","schema":{"type":"string"}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}}},"paths":{"/api/v1/users/{userId}/password":{"post":{"summary":"Reset a user's password.","description":"Use to to reset a user's password.","operationId":"reset_user_password","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"}],"responses":{"200":{"description":"Regenerated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"tempPassword":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get a user by id.

> Retrieve a user's details by id.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Users"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"userId":{"name":"userId","in":"path","required":true,"description":"The id of the user","schema":{"type":"string"}}},"schemas":{"User2":{"type":"object","required":["id","username","createdBy","createdAt","updatedAt","lastLogin","isLocal"],"properties":{"id":{"type":"string"},"username":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"lastLogin":{"type":"string","format":"date-time","nullable":true},"isLocal":{"type":"boolean","nullable":true},"groups":{"type":"array","items":{"type":"string"},"nullable":true}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/users/{userId}":{"get":{"summary":"Get a user by id.","description":"Retrieve a user's details by id.","operationId":"get_user_by_id","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"}],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User2"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Delete a user by id.

> Use to delete a user by id.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Users"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"userId":{"name":"userId","in":"path","required":true,"description":"The id of the user","schema":{"type":"string"}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}}},"paths":{"/api/v1/users/{userId}":{"delete":{"summary":"Delete a user by id.","description":"Use to delete a user by id.","operationId":"delete_user_by_id","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"}],"responses":{"204":{"description":"Executed successfully."},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## POST /api/v1/me/password

> change user password

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Users"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"UserChangePasswordRequest":{"type":"object","required":["currentPassword","newPassword"],"properties":{"currentPassword":{"type":"string"},"newPassword":{"type":"string"}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/me/password":{"post":{"summary":"change user password","operationId":"change_user_password","tags":["Users"],"requestBody":{"description":"Password to change","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserChangePasswordRequest"}}}},"responses":{"200":{"description":"Password changed successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"currentPassword":{"type":"string"},"newPassword":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://run-ai-docs.nvidia.com/api/2.19/authentication-and-authorization/users.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
