-
Notifications
You must be signed in to change notification settings - Fork 1
RolesApi
Víctor Cañizares edited this page Dec 14, 2020
·
1 revision
All URIs are relative to https://demo.iriusrisk.com/api/v1
Method | HTTP request | Description |
---|---|---|
rolesPost | POST /roles | Creates a new Role |
rolesRoleNameDelete | DELETE /roles/{role_name} | Deletes an existing role |
rolesPost(apiToken, createRoleRequestBody)
Creates a new Role
Creates a new role. Conditions to be able to perform the action: - To have the permission ROLES_UPDATE granted.
// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.RolesApi;
RolesApi apiInstance = new RolesApi();
String apiToken = "apiToken_example"; // String | Authentication token
CreateRoleRequestBody createRoleRequestBody = new CreateRoleRequestBody(); // CreateRoleRequestBody | JSON data that contains information of the fields
try {
apiInstance.rolesPost(apiToken, createRoleRequestBody);
} catch (ApiException e) {
System.err.println("Exception when calling RolesApi#rolesPost");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | Authentication token | |
createRoleRequestBody | CreateRoleRequestBody | JSON data that contains information of the fields |
null (empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json
rolesRoleNameDelete(apiToken, roleName)
Deletes an existing role
Deletes an existing role. Conditions to be able to perform the action: - To have the permission ROLES_UPDATE granted.
// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.RolesApi;
RolesApi apiInstance = new RolesApi();
String apiToken = "apiToken_example"; // String | Authentication token
String roleName = "roleName_example"; // String | Role name to delete
try {
apiInstance.rolesRoleNameDelete(apiToken, roleName);
} catch (ApiException e) {
System.err.println("Exception when calling RolesApi#rolesRoleNameDelete");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | Authentication token | |
roleName | String | Role name to delete |
null (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json