All URIs are relative to http://localhost/r/insights/platform/rbac/v1
Method | HTTP request | Description |
---|---|---|
addPrincipalToGroup | POST /groups/{uuid}/principals/ | Add a principal to a group in the tenant |
createGroup | POST /groups/ | Create a group in a tenant |
deleteGroup | DELETE /groups/{uuid}/ | Delete a group in the tenant |
deletePrincipalFromGroup | DELETE /groups/{uuid}/principals/ | Remove a principal from a group in the tenant |
getGroup | GET /groups/{uuid}/ | Get a group in the tenant |
listGroups | GET /groups/ | List the groups for a tenant |
updateGroup | PUT /groups/{uuid}/ | Udate a group in the tenant |
GroupWithPrincipals addPrincipalToGroup(uuid, groupPrincipalIn)
Add a principal to a group in the tenant
import RoleBasedAccessControl from 'role_based_access_control';
let defaultClient = RoleBasedAccessControl.ApiClient.instance;
// Configure HTTP basic authorization: basic_auth
let basic_auth = defaultClient.authentications['basic_auth'];
basic_auth.username = 'YOUR USERNAME';
basic_auth.password = 'YOUR PASSWORD';
let apiInstance = new RoleBasedAccessControl.GroupApi();
let uuid = null; // String | ID of group to update
let groupPrincipalIn = new RoleBasedAccessControl.GroupPrincipalIn(); // GroupPrincipalIn | Principal to add to a group
apiInstance.addPrincipalToGroup(uuid, groupPrincipalIn).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
uuid | String | ID of group to update | |
groupPrincipalIn | GroupPrincipalIn | Principal to add to a group |
- Content-Type: application/json
- Accept: application/json
GroupOut createGroup(group)
Create a group in a tenant
import RoleBasedAccessControl from 'role_based_access_control';
let defaultClient = RoleBasedAccessControl.ApiClient.instance;
// Configure HTTP basic authorization: basic_auth
let basic_auth = defaultClient.authentications['basic_auth'];
basic_auth.username = 'YOUR USERNAME';
basic_auth.password = 'YOUR PASSWORD';
let apiInstance = new RoleBasedAccessControl.GroupApi();
let group = new RoleBasedAccessControl.Group(); // Group | Group to create in tenant
apiInstance.createGroup(group).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
group | Group | Group to create in tenant |
- Content-Type: application/json
- Accept: application/json
deleteGroup(uuid)
Delete a group in the tenant
import RoleBasedAccessControl from 'role_based_access_control';
let defaultClient = RoleBasedAccessControl.ApiClient.instance;
// Configure HTTP basic authorization: basic_auth
let basic_auth = defaultClient.authentications['basic_auth'];
basic_auth.username = 'YOUR USERNAME';
basic_auth.password = 'YOUR PASSWORD';
let apiInstance = new RoleBasedAccessControl.GroupApi();
let uuid = null; // String | ID of group to delete
apiInstance.deleteGroup(uuid).then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
uuid | String | ID of group to delete |
null (empty response body)
- Content-Type: Not defined
- Accept: /
deletePrincipalFromGroup(uuid, usernames)
Remove a principal from a group in the tenant
import RoleBasedAccessControl from 'role_based_access_control';
let defaultClient = RoleBasedAccessControl.ApiClient.instance;
// Configure HTTP basic authorization: basic_auth
let basic_auth = defaultClient.authentications['basic_auth'];
basic_auth.username = 'YOUR USERNAME';
basic_auth.password = 'YOUR PASSWORD';
let apiInstance = new RoleBasedAccessControl.GroupApi();
let uuid = null; // String | ID of group to update
let usernames = "usernames_example"; // String | A comma separated list of usernames for principals to remove from the group
apiInstance.deletePrincipalFromGroup(uuid, usernames).then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
uuid | String | ID of group to update | |
usernames | String | A comma separated list of usernames for principals to remove from the group |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
GroupWithPrincipals getGroup(uuid)
Get a group in the tenant
import RoleBasedAccessControl from 'role_based_access_control';
let defaultClient = RoleBasedAccessControl.ApiClient.instance;
// Configure HTTP basic authorization: basic_auth
let basic_auth = defaultClient.authentications['basic_auth'];
basic_auth.username = 'YOUR USERNAME';
basic_auth.password = 'YOUR PASSWORD';
let apiInstance = new RoleBasedAccessControl.GroupApi();
let uuid = null; // String | ID of group to get
apiInstance.getGroup(uuid).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
uuid | String | ID of group to get |
- Content-Type: Not defined
- Accept: application/json
GroupPagination listGroups(opts)
List the groups for a tenant
import RoleBasedAccessControl from 'role_based_access_control';
let defaultClient = RoleBasedAccessControl.ApiClient.instance;
// Configure HTTP basic authorization: basic_auth
let basic_auth = defaultClient.authentications['basic_auth'];
basic_auth.username = 'YOUR USERNAME';
basic_auth.password = 'YOUR PASSWORD';
let apiInstance = new RoleBasedAccessControl.GroupApi();
let opts = {
'pageSize': 10, // Number | Parameter for selecting the amount of data in a page.
'page': 1 // Number | Parameter for selecting the page of data.
};
apiInstance.listGroups(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
pageSize | Number | Parameter for selecting the amount of data in a page. | [optional] [default to 10] |
page | Number | Parameter for selecting the page of data. | [optional] [default to 1] |
- Content-Type: Not defined
- Accept: application/json
GroupOut updateGroup(uuid, group)
Udate a group in the tenant
import RoleBasedAccessControl from 'role_based_access_control';
let defaultClient = RoleBasedAccessControl.ApiClient.instance;
// Configure HTTP basic authorization: basic_auth
let basic_auth = defaultClient.authentications['basic_auth'];
basic_auth.username = 'YOUR USERNAME';
basic_auth.password = 'YOUR PASSWORD';
let apiInstance = new RoleBasedAccessControl.GroupApi();
let uuid = null; // String | ID of group to update
let group = new RoleBasedAccessControl.Group(); // Group | Group to update in tenant
apiInstance.updateGroup(uuid, group).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
uuid | String | ID of group to update | |
group | Group | Group to update in tenant |
- Content-Type: application/json
- Accept: application/json, /