# UsersApi All URIs are relative to *https://demo.iriusrisk.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**businessunitsBusinessUnitNameUsersDelete**](UsersApi.md#businessunitsBusinessUnitNameUsersDelete) | **DELETE** /businessunits/{businessUnitName}/users | Unassign a list of users from a business unit [**businessunitsBusinessUnitNameUsersGet**](UsersApi.md#businessunitsBusinessUnitNameUsersGet) | **GET** /businessunits/{businessUnitName}/users | List users from a business unit [**businessunitsBusinessUnitNameUsersPut**](UsersApi.md#businessunitsBusinessUnitNameUsersPut) | **PUT** /businessunits/{businessUnitName}/users | Assigns users to a business unit [**businessunitsBusinessUnitNameUsersUserDelete**](UsersApi.md#businessunitsBusinessUnitNameUsersUserDelete) | **DELETE** /businessunits/{businessUnitName}/users/{user} | Removes a user from a business unit [**groupsGroupUsersDelete**](UsersApi.md#groupsGroupUsersDelete) | **DELETE** /groups/{group}/users | Unassign a list of users from a group [**groupsGroupUsersGet**](UsersApi.md#groupsGroupUsersGet) | **GET** /groups/{group}/users | List users from a group [**groupsGroupUsersPut**](UsersApi.md#groupsGroupUsersPut) | **PUT** /groups/{group}/users | Assigns users to a group [**groupsGroupUsersUserDelete**](UsersApi.md#groupsGroupUsersUserDelete) | **DELETE** /groups/{group}/users/{user} | Removes a user from a group [**productsRefUsersDelete**](UsersApi.md#productsRefUsersDelete) | **DELETE** /products/{ref}/users | Unassigns a list of users from a product. [**productsRefUsersGet**](UsersApi.md#productsRefUsersGet) | **GET** /products/{ref}/users | List all users assigned to a product [**productsRefUsersPut**](UsersApi.md#productsRefUsersPut) | **PUT** /products/{ref}/users | Assigns users to a product. [**productsRefUsersUserDelete**](UsersApi.md#productsRefUsersUserDelete) | **DELETE** /products/{ref}/users/{user} | Unassigns a user from a product [**usersGet**](UsersApi.md#usersGet) | **GET** /users | List of all Users. [**usersPost**](UsersApi.md#usersPost) | **POST** /users | Creates a new user [**usersUsernameDelete**](UsersApi.md#usersUsernameDelete) | **DELETE** /users/{username} | Deletes a user [**usersUsernameGet**](UsersApi.md#usersUsernameGet) | **GET** /users/{username} | Get all the information of a user [**usersUsernameTokenPost**](UsersApi.md#usersUsernameTokenPost) | **POST** /users/{username}/token | Generates a user API token # **businessunitsBusinessUnitNameUsersDelete** > businessunitsBusinessUnitNameUsersDelete(apiToken, businessUnitName, unassingUsersGroupRequestBody) Unassign a list of users from a business unit Unassign a list of users from a business unit. Conditions to be able to perform the action: - To have the permission **ALL_USERS_UPDATE** granted, or - To have the permission **MANAGE_USERS_BU** granted. With this permission you will be able to unassign users from a business unit, **if you belong to this business unit**. ### Example ```java // Import classes: //import io.swagger.client.ApiException; //import io.swagger.client.api.UsersApi; UsersApi apiInstance = new UsersApi(); String apiToken = "apiToken_example"; // String | Authentication token String businessUnitName = "businessUnitName_example"; // String | name of the business unit UnassingUsersGroupRequestBody1 unassingUsersGroupRequestBody = new UnassingUsersGroupRequestBody1(); // UnassingUsersGroupRequestBody1 | JSON object that contains information to unassign users from business unit try { apiInstance.businessunitsBusinessUnitNameUsersDelete(apiToken, businessUnitName, unassingUsersGroupRequestBody); } catch (ApiException e) { System.err.println("Exception when calling UsersApi#businessunitsBusinessUnitNameUsersDelete"); e.printStackTrace(); } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiToken** | **String**| Authentication token | **businessUnitName** | **String**| name of the business unit | **unassingUsersGroupRequestBody** | [**UnassingUsersGroupRequestBody1**](UnassingUsersGroupRequestBody1.md)| JSON object that contains information to unassign users from business unit | ### Return type null (empty response body) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **businessunitsBusinessUnitNameUsersGet** > List<User> businessunitsBusinessUnitNameUsersGet(apiToken, businessUnitName) List users from a business unit List users who belongs to a business unit. Conditions to be able to perform the action: - To have the permission **ALL_USERS_UPDATE** granted, or - To have the permission **MANAGE_USERS_BU** granted. With this permission you will be able to list users of a business unit, **if you belong to this business unit**. ### Example ```java // Import classes: //import io.swagger.client.ApiException; //import io.swagger.client.api.UsersApi; UsersApi apiInstance = new UsersApi(); String apiToken = "apiToken_example"; // String | Authentication token String businessUnitName = "businessUnitName_example"; // String | name of the business unit try { List result = apiInstance.businessunitsBusinessUnitNameUsersGet(apiToken, businessUnitName); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsersApi#businessunitsBusinessUnitNameUsersGet"); e.printStackTrace(); } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiToken** | **String**| Authentication token | **businessUnitName** | **String**| name of the business unit | ### Return type [**List<User>**](User.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **businessunitsBusinessUnitNameUsersPut** > InlineResponse201 businessunitsBusinessUnitNameUsersPut(apiToken, businessUnitName, assignUserGroupRequestBody) Assigns users to a business unit Assigns users to a business unit. Conditions to be able to perform the action: - To have the permission **ALL_USERS_UPDATE** granted, or - To have the permission **MANAGE_USERS_BU** granted. With this permission you will be able to assign users to a business unit, **if you belong to this business unit**. ### Example ```java // Import classes: //import io.swagger.client.ApiException; //import io.swagger.client.api.UsersApi; UsersApi apiInstance = new UsersApi(); String apiToken = "apiToken_example"; // String | Authentication token String businessUnitName = "businessUnitName_example"; // String | name of the business unit AssignUserGroupRequestBody1 assignUserGroupRequestBody = new AssignUserGroupRequestBody1(); // AssignUserGroupRequestBody1 | JSON object that contains information to assign users to business unit try { InlineResponse201 result = apiInstance.businessunitsBusinessUnitNameUsersPut(apiToken, businessUnitName, assignUserGroupRequestBody); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsersApi#businessunitsBusinessUnitNameUsersPut"); e.printStackTrace(); } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiToken** | **String**| Authentication token | **businessUnitName** | **String**| name of the business unit | **assignUserGroupRequestBody** | [**AssignUserGroupRequestBody1**](AssignUserGroupRequestBody1.md)| JSON object that contains information to assign users to business unit | ### Return type [**InlineResponse201**](InlineResponse201.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **businessunitsBusinessUnitNameUsersUserDelete** > businessunitsBusinessUnitNameUsersUserDelete(apiToken, businessUnitName, user) Removes a user from a business unit Unassign a user from a business unit. Conditions to be able to perform the action: - To have the permission **ALL_USERS_UPDATE** granted, or - To have the permission **MANAGE_USERS_BU** granted. With this permission you will be able to unassign user from a business unit, **if you belong to this business unit**. ### Example ```java // Import classes: //import io.swagger.client.ApiException; //import io.swagger.client.api.UsersApi; UsersApi apiInstance = new UsersApi(); String apiToken = "apiToken_example"; // String | Authentication token String businessUnitName = "businessUnitName_example"; // String | name of the business unit String user = "user_example"; // String | user to be removed from business unit try { apiInstance.businessunitsBusinessUnitNameUsersUserDelete(apiToken, businessUnitName, user); } catch (ApiException e) { System.err.println("Exception when calling UsersApi#businessunitsBusinessUnitNameUsersUserDelete"); e.printStackTrace(); } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiToken** | **String**| Authentication token | **businessUnitName** | **String**| name of the business unit | **user** | **String**| user to be removed from business unit | ### Return type null (empty response body) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **groupsGroupUsersDelete** > groupsGroupUsersDelete(apiToken, group, unassingUsersGroupRequestBody) Unassign a list of users from a group Unassign a list of users from a group. Conditions to be able to perform the action: - To have the permission **ALL_USERS_UPDATE** granted, or - To have the permission **MANAGE_USERS_BU** granted. With this permission you will be able to unassign users from a group, **if you belong to this group**. ### Example ```java // Import classes: //import io.swagger.client.ApiException; //import io.swagger.client.api.UsersApi; UsersApi apiInstance = new UsersApi(); String apiToken = "apiToken_example"; // String | Authentication token String group = "group_example"; // String | name of the group UnassingUsersGroupRequestBody unassingUsersGroupRequestBody = new UnassingUsersGroupRequestBody(); // UnassingUsersGroupRequestBody | JSON object that contains information to unassign users from group try { apiInstance.groupsGroupUsersDelete(apiToken, group, unassingUsersGroupRequestBody); } catch (ApiException e) { System.err.println("Exception when calling UsersApi#groupsGroupUsersDelete"); e.printStackTrace(); } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiToken** | **String**| Authentication token | **group** | **String**| name of the group | **unassingUsersGroupRequestBody** | [**UnassingUsersGroupRequestBody**](UnassingUsersGroupRequestBody.md)| JSON object that contains information to unassign users from group | ### Return type null (empty response body) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **groupsGroupUsersGet** > List<User> groupsGroupUsersGet(apiToken, group) List users from a group List users who belongs to a group. Conditions to be able to perform the action: - To have the permission **ALL_USERS_UPDATE** granted, or - To have the permission **MANAGE_USERS_BU** granted. With this permission you will be able to list users of a group, **if you belong to this group**. ### Example ```java // Import classes: //import io.swagger.client.ApiException; //import io.swagger.client.api.UsersApi; UsersApi apiInstance = new UsersApi(); String apiToken = "apiToken_example"; // String | Authentication token String group = "group_example"; // String | name of the group try { List result = apiInstance.groupsGroupUsersGet(apiToken, group); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsersApi#groupsGroupUsersGet"); e.printStackTrace(); } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiToken** | **String**| Authentication token | **group** | **String**| name of the group | ### Return type [**List<User>**](User.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **groupsGroupUsersPut** > InlineResponse201 groupsGroupUsersPut(apiToken, group, assignUserGroupRequestBody) Assigns users to a group Assigns users to a group. Conditions to be able to perform the action: - To have the permission **ALL_USERS_UPDATE** granted, or - To have the permission **MANAGE_USERS_BU** granted. With this permission you will be able to assign users to a group, **if you belong to this group**. ### Example ```java // Import classes: //import io.swagger.client.ApiException; //import io.swagger.client.api.UsersApi; UsersApi apiInstance = new UsersApi(); String apiToken = "apiToken_example"; // String | Authentication token String group = "group_example"; // String | name of the group AssignUserGroupRequestBody assignUserGroupRequestBody = new AssignUserGroupRequestBody(); // AssignUserGroupRequestBody | JSON object that contains information to assign users to group try { InlineResponse201 result = apiInstance.groupsGroupUsersPut(apiToken, group, assignUserGroupRequestBody); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsersApi#groupsGroupUsersPut"); e.printStackTrace(); } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiToken** | **String**| Authentication token | **group** | **String**| name of the group | **assignUserGroupRequestBody** | [**AssignUserGroupRequestBody**](AssignUserGroupRequestBody.md)| JSON object that contains information to assign users to group | ### Return type [**InlineResponse201**](InlineResponse201.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **groupsGroupUsersUserDelete** > groupsGroupUsersUserDelete(apiToken, group, user) Removes a user from a group Unassign a user from a group. Conditions to be able to perform the action: - To have the permission **ALL_USERS_UPDATE** granted, or - To have the permission **MANAGE_USERS_BU** granted. With this permission you will be able to unassign user from a group, **if you belong to this group**. ### Example ```java // Import classes: //import io.swagger.client.ApiException; //import io.swagger.client.api.UsersApi; UsersApi apiInstance = new UsersApi(); String apiToken = "apiToken_example"; // String | Authentication token String group = "group_example"; // String | name of the group String user = "user_example"; // String | user to be removed from group try { apiInstance.groupsGroupUsersUserDelete(apiToken, group, user); } catch (ApiException e) { System.err.println("Exception when calling UsersApi#groupsGroupUsersUserDelete"); e.printStackTrace(); } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiToken** | **String**| Authentication token | **group** | **String**| name of the group | **user** | **String**| user to be removed from group | ### Return type null (empty response body) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **productsRefUsersDelete** > productsRefUsersDelete(apiToken, ref, unassignUsersProductRequestBody) Unassigns a list of users from a product. Unassign a list of users from a product. Conditions to be able to perform the action: - To have the permission **PRODUCT_UPDATE** granted. ### Example ```java // Import classes: //import io.swagger.client.ApiException; //import io.swagger.client.api.UsersApi; UsersApi apiInstance = new UsersApi(); String apiToken = "apiToken_example"; // String | Authentication token String ref = "ref_example"; // String | Reference for product UnassignUsersProductRequestBody unassignUsersProductRequestBody = new UnassignUsersProductRequestBody(); // UnassignUsersProductRequestBody | JSON object that contains information to unassign users from product try { apiInstance.productsRefUsersDelete(apiToken, ref, unassignUsersProductRequestBody); } catch (ApiException e) { System.err.println("Exception when calling UsersApi#productsRefUsersDelete"); e.printStackTrace(); } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiToken** | **String**| Authentication token | **ref** | **String**| Reference for product | **unassignUsersProductRequestBody** | [**UnassignUsersProductRequestBody**](UnassignUsersProductRequestBody.md)| JSON object that contains information to unassign users from product | ### Return type null (empty response body) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **productsRefUsersGet** > List<String> productsRefUsersGet(apiToken, ref) List all users assigned to a product List all users assigned to a product. Conditions to be able to perform the action: - No permissions are required to perform this action. ### Example ```java // Import classes: //import io.swagger.client.ApiException; //import io.swagger.client.api.UsersApi; UsersApi apiInstance = new UsersApi(); String apiToken = "apiToken_example"; // String | Authentication token String ref = "ref_example"; // String | Reference to product try { List result = apiInstance.productsRefUsersGet(apiToken, ref); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsersApi#productsRefUsersGet"); e.printStackTrace(); } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiToken** | **String**| Authentication token | **ref** | **String**| Reference to product | ### Return type **List<String>** ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **productsRefUsersPut** > ProductShortUsers productsRefUsersPut(apiToken, ref, assignUsersProductRequestBody) Assigns users to a product. Assigns users to a product. Conditions to be able to perform the action: - To have the permission **PRODUCT_UPDATE** granted. ### Example ```java // Import classes: //import io.swagger.client.ApiException; //import io.swagger.client.api.UsersApi; UsersApi apiInstance = new UsersApi(); String apiToken = "apiToken_example"; // String | Authentication token String ref = "ref_example"; // String | Reference for product AssignUsersProductRequestBody assignUsersProductRequestBody = new AssignUsersProductRequestBody(); // AssignUsersProductRequestBody | JSON data that contains the information to assign users to product try { ProductShortUsers result = apiInstance.productsRefUsersPut(apiToken, ref, assignUsersProductRequestBody); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsersApi#productsRefUsersPut"); e.printStackTrace(); } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiToken** | **String**| Authentication token | **ref** | **String**| Reference for product | **assignUsersProductRequestBody** | [**AssignUsersProductRequestBody**](AssignUsersProductRequestBody.md)| JSON data that contains the information to assign users to product | ### Return type [**ProductShortUsers**](ProductShortUsers.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **productsRefUsersUserDelete** > productsRefUsersUserDelete(apiToken, ref, user) Unassigns a user from a product Unassigns a user from a product. Conditions to be able to perform the action: - To have the permission **PRODUCT_UPDATE** granted. ### Example ```java // Import classes: //import io.swagger.client.ApiException; //import io.swagger.client.api.UsersApi; UsersApi apiInstance = new UsersApi(); String apiToken = "apiToken_example"; // String | Authentication token String ref = "ref_example"; // String | Reference for product String user = "user_example"; // String | Username of the user who will be unassigned from the product try { apiInstance.productsRefUsersUserDelete(apiToken, ref, user); } catch (ApiException e) { System.err.println("Exception when calling UsersApi#productsRefUsersUserDelete"); e.printStackTrace(); } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiToken** | **String**| Authentication token | **ref** | **String**| Reference for product | **user** | **String**| Username of the user who will be unassigned from the product | ### Return type null (empty response body) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **usersGet** > List<User> usersGet(apiToken) List of all Users. Returns a list of all the users of the system. Conditions to be able to perform the action: - To have the permission **ALL_USERS_UPDATE** granted. ### Example ```java // Import classes: //import io.swagger.client.ApiException; //import io.swagger.client.api.UsersApi; UsersApi apiInstance = new UsersApi(); String apiToken = "apiToken_example"; // String | Authentication token try { List result = apiInstance.usersGet(apiToken); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsersApi#usersGet"); e.printStackTrace(); } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiToken** | **String**| Authentication token | ### Return type [**List<User>**](User.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **usersPost** > usersPost(apiToken, createUserRequestBody) Creates a new user Creates a new user. Conditions to be able to perform the action: - To have the permission **ALL_USERS_UPDATE** granted. ### Example ```java // Import classes: //import io.swagger.client.ApiException; //import io.swagger.client.api.UsersApi; UsersApi apiInstance = new UsersApi(); String apiToken = "apiToken_example"; // String | Authentication token CreateUserRequestBody createUserRequestBody = new CreateUserRequestBody(); // CreateUserRequestBody | JSON data that contains information to creates new user try { apiInstance.usersPost(apiToken, createUserRequestBody); } catch (ApiException e) { System.err.println("Exception when calling UsersApi#usersPost"); e.printStackTrace(); } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiToken** | **String**| Authentication token | **createUserRequestBody** | [**CreateUserRequestBody**](CreateUserRequestBody.md)| JSON data that contains information to creates new user | ### Return type null (empty response body) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **usersUsernameDelete** > usersUsernameDelete(apiToken, username) Deletes a user Deletes a user. Conditions to be able to perform the action: - To have the permission **ALL_USERS_UPDATE** granted, or - To have the permission **MANAGE_USERS_BU** granted. Having this permission you can delete users who belongs to some of your user groups. ### Example ```java // Import classes: //import io.swagger.client.ApiException; //import io.swagger.client.api.UsersApi; UsersApi apiInstance = new UsersApi(); String apiToken = "apiToken_example"; // String | Authentication token String username = "username_example"; // String | User's username try { apiInstance.usersUsernameDelete(apiToken, username); } catch (ApiException e) { System.err.println("Exception when calling UsersApi#usersUsernameDelete"); e.printStackTrace(); } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiToken** | **String**| Authentication token | **username** | **String**| User's username | ### Return type null (empty response body) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **usersUsernameGet** > UserDetailed usersUsernameGet(apiToken, username) Get all the information of a user Get all the relevant information of a user ### Example ```java // Import classes: //import io.swagger.client.ApiException; //import io.swagger.client.api.UsersApi; UsersApi apiInstance = new UsersApi(); String apiToken = "apiToken_example"; // String | Authentication token String username = "username_example"; // String | User's username try { UserDetailed result = apiInstance.usersUsernameGet(apiToken, username); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsersApi#usersUsernameGet"); e.printStackTrace(); } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiToken** | **String**| Authentication token | **username** | **String**| User's username | ### Return type [**UserDetailed**](UserDetailed.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **usersUsernameTokenPost** > String usersUsernameTokenPost(apiToken, username) Generates a user API token Generates a new user API token. If the user already has a generated API token, generates a new one. Conditions to be able to perform the action: - To have the permission **ALL_USERS_UPDATE** granted, or - To have the permission **MANAGE_USERS_BU** granted. Having this permission you can generate a user API token to users who belongs to some of your user groups. ### Example ```java // Import classes: //import io.swagger.client.ApiException; //import io.swagger.client.api.UsersApi; UsersApi apiInstance = new UsersApi(); String apiToken = "apiToken_example"; // String | Authentication token String username = "username_example"; // String | User's username try { String result = apiInstance.usersUsernameTokenPost(apiToken, username); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsersApi#usersUsernameTokenPost"); e.printStackTrace(); } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiToken** | **String**| Authentication token | **username** | **String**| User's username | ### Return type **String** ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json