Skip to content

BusinessUnitsApi

Víctor Cañizares edited this page Dec 14, 2020 · 1 revision

BusinessUnitsApi

All URIs are relative to https://demo.iriusrisk.com/api/v1

Method HTTP request Description
businessunitsBusinessUnitIdentifierDelete DELETE /businessunits/{businessUnitIdentifier} Deletes a users business unit
businessunitsBusinessUnitIdentifierGet GET /businessunits/{businessUnitIdentifier} Gets the business unit details.
businessunitsBusinessUnitIdentifierPut PUT /businessunits/{businessUnitIdentifier} Update a users business unit
businessunitsBusinessUnitNameUsersDelete DELETE /businessunits/{businessUnitName}/users Unassign a list of users from a business unit
businessunitsBusinessUnitNameUsersGet GET /businessunits/{businessUnitName}/users List users from a business unit
businessunitsBusinessUnitNameUsersPut PUT /businessunits/{businessUnitName}/users Assigns users to a business unit
businessunitsBusinessUnitNameUsersUserDelete DELETE /businessunits/{businessUnitName}/users/{user} Removes a user from a business unit
businessunitsGet GET /businessunits Gets a list of all business units
businessunitsPost POST /businessunits Creates a new user business unit
groupsGet GET /groups Gets a list of all Groups
groupsGroupIdentifierDelete DELETE /groups/{groupIdentifier} Deletes a users group
groupsGroupIdentifierGet GET /groups/{groupIdentifier} Gets the group details.
groupsGroupIdentifierPut PUT /groups/{groupIdentifier} Update a users group
groupsGroupUsersDelete DELETE /groups/{group}/users Unassign a list of users from a group
groupsGroupUsersGet GET /groups/{group}/users List users from a group
groupsGroupUsersPut PUT /groups/{group}/users Assigns users to a group
groupsGroupUsersUserDelete DELETE /groups/{group}/users/{user} Removes a user from a group
groupsPost POST /groups Creates a new user group

businessunitsBusinessUnitIdentifierDelete

businessunitsBusinessUnitIdentifierDelete(apiToken, businessUnitIdentifier)

Deletes a users business unit

Deletes a users business unit. Conditions to be able to perform the action: - To have the permission ALL_USERS_UPDATE granted.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.BusinessUnitsApi;


BusinessUnitsApi apiInstance = new BusinessUnitsApi();
String apiToken = "apiToken_example"; // String | Authentication token
String businessUnitIdentifier = "businessUnitIdentifier_example"; // String | unique name of the business unit
try {
    apiInstance.businessunitsBusinessUnitIdentifierDelete(apiToken, businessUnitIdentifier);
} catch (ApiException e) {
    System.err.println("Exception when calling BusinessUnitsApi#businessunitsBusinessUnitIdentifierDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
apiToken String Authentication token
businessUnitIdentifier String unique name of the business unit

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

businessunitsBusinessUnitIdentifierGet

List<Group> businessunitsBusinessUnitIdentifierGet(apiToken, businessUnitIdentifier)

Gets the business unit details.

Returns the business unit details for the requested business unit. Conditions to be able to perform the action: - If the caller has the PRODUCTS_LIST_ALL permission then all business units can be queried without restriction. - Without the PRODUCTS_LIST_ALL permission, the call will only return the business unit if the caller belongs to that business unit.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.BusinessUnitsApi;


BusinessUnitsApi apiInstance = new BusinessUnitsApi();
String apiToken = "apiToken_example"; // String | Authentication token
String businessUnitIdentifier = "businessUnitIdentifier_example"; // String | unique name of the business unit
try {
    List<Group> result = apiInstance.businessunitsBusinessUnitIdentifierGet(apiToken, businessUnitIdentifier);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BusinessUnitsApi#businessunitsBusinessUnitIdentifierGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
apiToken String Authentication token
businessUnitIdentifier String unique name of the business unit

Return type

List<Group>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

businessunitsBusinessUnitIdentifierPut

Group businessunitsBusinessUnitIdentifierPut(apiToken, businessUnitIdentifier, updateGroupRequestBody)

Update a users business unit

Updates a users business unit. Conditions to be able to perform the action: - To have the permission ALL_USERS_UPDATE granted.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.BusinessUnitsApi;


BusinessUnitsApi apiInstance = new BusinessUnitsApi();
String apiToken = "apiToken_example"; // String | Authentication token
String businessUnitIdentifier = "businessUnitIdentifier_example"; // String | unique ref of the business unit
UpdateGroupRequestBody1 updateGroupRequestBody = new UpdateGroupRequestBody1(); // UpdateGroupRequestBody1 | JSON data that contains information of the fields
try {
    Group result = apiInstance.businessunitsBusinessUnitIdentifierPut(apiToken, businessUnitIdentifier, updateGroupRequestBody);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BusinessUnitsApi#businessunitsBusinessUnitIdentifierPut");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
apiToken String Authentication token
businessUnitIdentifier String unique ref of the business unit
updateGroupRequestBody UpdateGroupRequestBody1 JSON data that contains information of the fields

Return type

Group

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.BusinessUnitsApi;


BusinessUnitsApi apiInstance = new BusinessUnitsApi();
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 BusinessUnitsApi#businessunitsBusinessUnitNameUsersDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
apiToken String Authentication token
businessUnitName String name of the business unit
unassingUsersGroupRequestBody UnassingUsersGroupRequestBody1 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

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.BusinessUnitsApi;


BusinessUnitsApi apiInstance = new BusinessUnitsApi();
String apiToken = "apiToken_example"; // String | Authentication token
String businessUnitName = "businessUnitName_example"; // String | name of the business unit
try {
    List<User> result = apiInstance.businessunitsBusinessUnitNameUsersGet(apiToken, businessUnitName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BusinessUnitsApi#businessunitsBusinessUnitNameUsersGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
apiToken String Authentication token
businessUnitName String name of the business unit

Return type

List<User>

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

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.BusinessUnitsApi;


BusinessUnitsApi apiInstance = new BusinessUnitsApi();
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 BusinessUnitsApi#businessunitsBusinessUnitNameUsersPut");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
apiToken String Authentication token
businessUnitName String name of the business unit
assignUserGroupRequestBody AssignUserGroupRequestBody1 JSON object that contains information to assign users to business unit

Return type

InlineResponse201

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

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.BusinessUnitsApi;


BusinessUnitsApi apiInstance = new BusinessUnitsApi();
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 BusinessUnitsApi#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

businessunitsGet

List<Group> businessunitsGet(apiToken)

Gets a list of all business units

Gets a list of all user's business units. Conditions to be able to perform the action: - To have the permission ALL_USERS_UPDATE granted.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.BusinessUnitsApi;


BusinessUnitsApi apiInstance = new BusinessUnitsApi();
String apiToken = "apiToken_example"; // String | Authentication token
try {
    List<Group> result = apiInstance.businessunitsGet(apiToken);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BusinessUnitsApi#businessunitsGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
apiToken String Authentication token

Return type

List<Group>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

businessunitsPost

Group businessunitsPost(apiToken, createGroupRequestBody)

Creates a new user business unit

Creates a new user business unit. Conditions to be able to perform the action: - To have the permission ALL_USERS_UPDATE granted.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.BusinessUnitsApi;


BusinessUnitsApi apiInstance = new BusinessUnitsApi();
String apiToken = "apiToken_example"; // String | Authentication token
CreateGroupRequestBody1 createGroupRequestBody = new CreateGroupRequestBody1(); // CreateGroupRequestBody1 | JSON data that contains information of the fields
try {
    Group result = apiInstance.businessunitsPost(apiToken, createGroupRequestBody);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BusinessUnitsApi#businessunitsPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
apiToken String Authentication token
createGroupRequestBody CreateGroupRequestBody1 JSON data that contains information of the fields

Return type

Group

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

groupsGet

List<Group> groupsGet(apiToken)

Gets a list of all Groups

Gets a list of all user's groups. Conditions to be able to perform the action: - To have the permission ALL_USERS_UPDATE granted.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.BusinessUnitsApi;


BusinessUnitsApi apiInstance = new BusinessUnitsApi();
String apiToken = "apiToken_example"; // String | Authentication token
try {
    List<Group> result = apiInstance.groupsGet(apiToken);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BusinessUnitsApi#groupsGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
apiToken String Authentication token

Return type

List<Group>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

groupsGroupIdentifierDelete

groupsGroupIdentifierDelete(apiToken, groupIdentifier)

Deletes a users group

Deletes a users group. Conditions to be able to perform the action: - To have the permission ALL_USERS_UPDATE granted.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.BusinessUnitsApi;


BusinessUnitsApi apiInstance = new BusinessUnitsApi();
String apiToken = "apiToken_example"; // String | Authentication token
String groupIdentifier = "groupIdentifier_example"; // String | unique name of the group
try {
    apiInstance.groupsGroupIdentifierDelete(apiToken, groupIdentifier);
} catch (ApiException e) {
    System.err.println("Exception when calling BusinessUnitsApi#groupsGroupIdentifierDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
apiToken String Authentication token
groupIdentifier String unique name of the group

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

groupsGroupIdentifierGet

List<Group> groupsGroupIdentifierGet(apiToken, groupIdentifier)

Gets the group details.

Returns the group details for the requested group. Conditions to be able to perform the action: - If the caller has the PRODUCTS_LIST_ALL permission then all groups can be queried without restriction. - Without the PRODUCTS_LIST_ALL permission, the call will only return the group if the caller belongs to that group.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.BusinessUnitsApi;


BusinessUnitsApi apiInstance = new BusinessUnitsApi();
String apiToken = "apiToken_example"; // String | Authentication token
String groupIdentifier = "groupIdentifier_example"; // String | unique name of the group
try {
    List<Group> result = apiInstance.groupsGroupIdentifierGet(apiToken, groupIdentifier);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BusinessUnitsApi#groupsGroupIdentifierGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
apiToken String Authentication token
groupIdentifier String unique name of the group

Return type

List<Group>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

groupsGroupIdentifierPut

Group groupsGroupIdentifierPut(apiToken, groupIdentifier, updateGroupRequestBody)

Update a users group

Updates a users group. Conditions to be able to perform the action: - To have the permission ALL_USERS_UPDATE granted.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.BusinessUnitsApi;


BusinessUnitsApi apiInstance = new BusinessUnitsApi();
String apiToken = "apiToken_example"; // String | Authentication token
String groupIdentifier = "groupIdentifier_example"; // String | unique ref of the group
UpdateGroupRequestBody updateGroupRequestBody = new UpdateGroupRequestBody(); // UpdateGroupRequestBody | JSON data that contains information of the fields
try {
    Group result = apiInstance.groupsGroupIdentifierPut(apiToken, groupIdentifier, updateGroupRequestBody);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BusinessUnitsApi#groupsGroupIdentifierPut");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
apiToken String Authentication token
groupIdentifier String unique ref of the group
updateGroupRequestBody UpdateGroupRequestBody JSON data that contains information of the fields

Return type

Group

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • 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

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.BusinessUnitsApi;


BusinessUnitsApi apiInstance = new BusinessUnitsApi();
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 BusinessUnitsApi#groupsGroupUsersDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
apiToken String Authentication token
group String name of the group
unassingUsersGroupRequestBody UnassingUsersGroupRequestBody 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

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.BusinessUnitsApi;


BusinessUnitsApi apiInstance = new BusinessUnitsApi();
String apiToken = "apiToken_example"; // String | Authentication token
String group = "group_example"; // String | name of the group
try {
    List<User> result = apiInstance.groupsGroupUsersGet(apiToken, group);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BusinessUnitsApi#groupsGroupUsersGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
apiToken String Authentication token
group String name of the group

Return type

List<User>

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

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.BusinessUnitsApi;


BusinessUnitsApi apiInstance = new BusinessUnitsApi();
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 BusinessUnitsApi#groupsGroupUsersPut");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
apiToken String Authentication token
group String name of the group
assignUserGroupRequestBody AssignUserGroupRequestBody JSON object that contains information to assign users to group

Return type

InlineResponse201

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

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.BusinessUnitsApi;


BusinessUnitsApi apiInstance = new BusinessUnitsApi();
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 BusinessUnitsApi#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

groupsPost

Group groupsPost(apiToken, createGroupRequestBody)

Creates a new user group

Creates a new user group. Conditions to be able to perform the action: - To have the permission ALL_USERS_UPDATE granted.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.BusinessUnitsApi;


BusinessUnitsApi apiInstance = new BusinessUnitsApi();
String apiToken = "apiToken_example"; // String | Authentication token
CreateGroupRequestBody createGroupRequestBody = new CreateGroupRequestBody(); // CreateGroupRequestBody | JSON data that contains information of the fields
try {
    Group result = apiInstance.groupsPost(apiToken, createGroupRequestBody);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BusinessUnitsApi#groupsPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
apiToken String Authentication token
createGroupRequestBody CreateGroupRequestBody JSON data that contains information of the fields

Return type

Group

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json
Clone this wiki locally