# JReportServer.SecurityApi

All URIs are relative to *http://localhost:8888/jrserver/api/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**addGroupMembers**](SecurityApi.md#addGroupMembers) | **POST** /group/members | Add group members.
[**addRoleMembers**](SecurityApi.md#addRoleMembers) | **POST** /role/members | Add the role members.
[**changeUserPassword**](SecurityApi.md#changeUserPassword) | **PUT** /user/password | Change a user&#39;s password.
[**createGroup**](SecurityApi.md#createGroup) | **POST** /groups | Create a new group.
[**createRole**](SecurityApi.md#createRole) | **POST** /roles | Create a new role.
[**createUser**](SecurityApi.md#createUser) | **POST** /users | Create a new user.
[**deleteGroup**](SecurityApi.md#deleteGroup) | **DELETE** /group | Delete a group.
[**deleteGroupMembers**](SecurityApi.md#deleteGroupMembers) | **DELETE** /group/members | Delete the group members.
[**deleteRole**](SecurityApi.md#deleteRole) | **DELETE** /role | Delete a role.
[**deleteRoleMembers**](SecurityApi.md#deleteRoleMembers) | **DELETE** /role/members | Delete the role members.
[**deleteUser**](SecurityApi.md#deleteUser) | **DELETE** /user | Delete a user account.
[**getGroupList**](SecurityApi.md#getGroupList) | **GET** /groups | Get the group list.
[**getGroupMembers**](SecurityApi.md#getGroupMembers) | **GET** /group/members | Get the group members.
[**getGroupPrivileges**](SecurityApi.md#getGroupPrivileges) | **GET** /group/privileges | Get the group privileges.
[**getGroupsOfUser**](SecurityApi.md#getGroupsOfUser) | **GET** /user/groups | Get the groups of the user.
[**getRoleList**](SecurityApi.md#getRoleList) | **GET** /roles | Get the role list.
[**getRoleMembers**](SecurityApi.md#getRoleMembers) | **GET** /role/members | Get the members.
[**getRolePrivileges**](SecurityApi.md#getRolePrivileges) | **GET** /role/privileges | Get the role privileges.
[**getRolesOfUser**](SecurityApi.md#getRolesOfUser) | **GET** /user/roles | Get the roles of the user.
[**getUserList**](SecurityApi.md#getUserList) | **GET** /users | Get the user list.
[**getUserPrivileges**](SecurityApi.md#getUserPrivileges) | **GET** /user/privileges | Get the user privileges.
[**getUserProperties**](SecurityApi.md#getUserProperties) | **GET** /user | Get the user properties.
[**updateGroupPrivileges**](SecurityApi.md#updateGroupPrivileges) | **PUT** /group/privileges | Update the group privileges.
[**updateRolePrivileges**](SecurityApi.md#updateRolePrivileges) | **PUT** /role/privileges | Update the role privileges.
[**updateUserPrivileges**](SecurityApi.md#updateUserPrivileges) | **PUT** /user/privileges | Update the user privileges.
[**updateUserProperties**](SecurityApi.md#updateUserProperties) | **PUT** /user | Update the user properties.


<a name="addGroupMembers"></a>
# **addGroupMembers**
> addGroupMembers(members, opts)

Add group members.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var members = [new JReportServer.Principal()]; // [Principal] | Members.

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
  'groupName': "groupName_example" // String | The group name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.addGroupMembers(members, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **members** | [**[Principal]**](Principal.md)| Members. | 
 **realmName** | **String**| The realm name. | [optional] 
 **groupName** | **String**| The group name. | [optional] 

### Return type

null (empty response body)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="addRoleMembers"></a>
# **addRoleMembers**
> addRoleMembers(members, opts)

Add the role members.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var members = [new JReportServer.Principal()]; // [Principal] | Members.

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
  'roleName': "roleName_example" // String | The role name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.addRoleMembers(members, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **members** | [**[Principal]**](Principal.md)| Members. | 
 **realmName** | **String**| The realm name. | [optional] 
 **roleName** | **String**| The role name. | [optional] 

### Return type

null (empty response body)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="changeUserPassword"></a>
# **changeUserPassword**
> changeUserPassword(myPassword, newPassword, newPasswordConfirm, opts)

Change a user&#39;s password.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var myPassword = "myPassword_example"; // String | 

var newPassword = "newPassword_example"; // String | 

var newPasswordConfirm = "newPasswordConfirm_example"; // String | 

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
  'userName': "userName_example", // String | The user name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.changeUserPassword(myPassword, newPassword, newPasswordConfirm, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **myPassword** | **String**|  | 
 **newPassword** | **String**|  | 
 **newPasswordConfirm** | **String**|  | 
 **realmName** | **String**| The realm name. | [optional] 
 **userName** | **String**| The user name. | [optional] 

### Return type

null (empty response body)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/x-www-form-urlencoded
 - **Accept**: text/plain, application/json

<a name="createGroup"></a>
# **createGroup**
> createGroup(group, opts)

Create a new group.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var group = new JReportServer.Group(); // Group | Group properties.

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.createGroup(group, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **group** | [**Group**](Group.md)| Group properties. | 
 **realmName** | **String**| The realm name. | [optional] 

### Return type

null (empty response body)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="createRole"></a>
# **createRole**
> createRole(role, opts)

Create a new role.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var role = new JReportServer.Role(); // Role | Role properties.

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.createRole(role, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **role** | [**Role**](Role.md)| Role properties. | 
 **realmName** | **String**| The realm name. | [optional] 

### Return type

null (empty response body)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="createUser"></a>
# **createUser**
> createUser(user, opts)

Create a new user.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var user = new JReportServer.User(); // User | User properties.

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.createUser(user, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **user** | [**User**](User.md)| User properties. | 
 **realmName** | **String**| The realm name. | [optional] 

### Return type

null (empty response body)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="deleteGroup"></a>
# **deleteGroup**
> deleteGroup(opts)

Delete a group.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
  'groupName': "groupName_example" // String | The group name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteGroup(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **realmName** | **String**| The realm name. | [optional] 
 **groupName** | **String**| The group name. | [optional] 

### Return type

null (empty response body)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="deleteGroupMembers"></a>
# **deleteGroupMembers**
> deleteGroupMembers(members, opts)

Delete the group members.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var members = [new JReportServer.Principal()]; // [Principal] | Members.

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
  'groupName': "groupName_example" // String | The group name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteGroupMembers(members, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **members** | [**[Principal]**](Principal.md)| Members. | 
 **realmName** | **String**| The realm name. | [optional] 
 **groupName** | **String**| The group name. | [optional] 

### Return type

null (empty response body)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="deleteRole"></a>
# **deleteRole**
> deleteRole(opts)

Delete a role.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
  'roleName': "roleName_example" // String | The role name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteRole(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **realmName** | **String**| The realm name. | [optional] 
 **roleName** | **String**| The role name. | [optional] 

### Return type

null (empty response body)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="deleteRoleMembers"></a>
# **deleteRoleMembers**
> deleteRoleMembers(members, opts)

Delete the role members.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var members = [new JReportServer.Principal()]; // [Principal] | Members.

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
  'roleName': "roleName_example" // String | The role name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteRoleMembers(members, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **members** | [**[Principal]**](Principal.md)| Members. | 
 **realmName** | **String**| The realm name. | [optional] 
 **roleName** | **String**| The role name. | [optional] 

### Return type

null (empty response body)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="deleteUser"></a>
# **deleteUser**
> deleteUser(opts)

Delete a user account.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
  'userName': "userName_example", // String | The user name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteUser(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **realmName** | **String**| The realm name. | [optional] 
 **userName** | **String**| The user name. | [optional] 

### Return type

null (empty response body)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="getGroupList"></a>
# **getGroupList**
> [Group] getGroupList(opts)

Get the group list.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getGroupList(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **realmName** | **String**| The realm name. | [optional] 

### Return type

[**[Group]**](Group.md)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="getGroupMembers"></a>
# **getGroupMembers**
> [Principal] getGroupMembers(opts)

Get the group members.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
  'groupName': "groupName_example" // String | The group name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getGroupMembers(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **realmName** | **String**| The realm name. | [optional] 
 **groupName** | **String**| The group name. | [optional] 

### Return type

[**[Principal]**](Principal.md)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="getGroupPrivileges"></a>
# **getGroupPrivileges**
> [Privilege] getGroupPrivileges(opts)

Get the group privileges.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
  'groupName': "groupName_example" // String | The group name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getGroupPrivileges(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **realmName** | **String**| The realm name. | [optional] 
 **groupName** | **String**| The group name. | [optional] 

### Return type

[**[Privilege]**](Privilege.md)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="getGroupsOfUser"></a>
# **getGroupsOfUser**
> [Group] getGroupsOfUser(opts)

Get the groups of the user.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
  'userName': "userName_example", // String | The user name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getGroupsOfUser(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **realmName** | **String**| The realm name. | [optional] 
 **userName** | **String**| The user name. | [optional] 

### Return type

[**[Group]**](Group.md)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="getRoleList"></a>
# **getRoleList**
> [Role] getRoleList(opts)

Get the role list.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getRoleList(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **realmName** | **String**| The realm name. | [optional] 

### Return type

[**[Role]**](Role.md)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="getRoleMembers"></a>
# **getRoleMembers**
> [Principal] getRoleMembers(opts)

Get the members.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
  'roleName': "roleName_example" // String | The role name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getRoleMembers(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **realmName** | **String**| The realm name. | [optional] 
 **roleName** | **String**| The role name. | [optional] 

### Return type

[**[Principal]**](Principal.md)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="getRolePrivileges"></a>
# **getRolePrivileges**
> [Privilege] getRolePrivileges(opts)

Get the role privileges.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
  'roleName': "roleName_example" // String | The role name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getRolePrivileges(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **realmName** | **String**| The realm name. | [optional] 
 **roleName** | **String**| The role name. | [optional] 

### Return type

[**[Privilege]**](Privilege.md)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="getRolesOfUser"></a>
# **getRolesOfUser**
> [Role] getRolesOfUser(opts)

Get the roles of the user.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
  'userName': "userName_example", // String | The user name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getRolesOfUser(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **realmName** | **String**| The realm name. | [optional] 
 **userName** | **String**| The user name. | [optional] 

### Return type

[**[Role]**](Role.md)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="getUserList"></a>
# **getUserList**
> [User] getUserList(opts)

Get the user list.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getUserList(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **realmName** | **String**| The realm name. | [optional] 

### Return type

[**[User]**](User.md)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="getUserPrivileges"></a>
# **getUserPrivileges**
> [Privilege] getUserPrivileges(opts)

Get the user privileges.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
  'userName': "userName_example", // String | The user name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getUserPrivileges(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **realmName** | **String**| The realm name. | [optional] 
 **userName** | **String**| The user name. | [optional] 

### Return type

[**[Privilege]**](Privilege.md)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="getUserProperties"></a>
# **getUserProperties**
> User getUserProperties(opts)

Get the user properties.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
  'userName': "userName_example", // String | The user name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getUserProperties(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **realmName** | **String**| The realm name. | [optional] 
 **userName** | **String**| The user name. | [optional] 

### Return type

[**User**](User.md)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="updateGroupPrivileges"></a>
# **updateGroupPrivileges**
> updateGroupPrivileges(privileges, opts)

Update the group privileges.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var privileges = [new JReportServer.Privilege()]; // [Privilege] | Privileges.

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
  'groupName': "groupName_example" // String | The group name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.updateGroupPrivileges(privileges, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **privileges** | [**[Privilege]**](Privilege.md)| Privileges. | 
 **realmName** | **String**| The realm name. | [optional] 
 **groupName** | **String**| The group name. | [optional] 

### Return type

null (empty response body)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="updateRolePrivileges"></a>
# **updateRolePrivileges**
> updateRolePrivileges(privileges, opts)

Update the role privileges.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var privileges = [new JReportServer.Privilege()]; // [Privilege] | Privileges.

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
  'roleName': "roleName_example" // String | The role name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.updateRolePrivileges(privileges, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **privileges** | [**[Privilege]**](Privilege.md)| Privileges. | 
 **realmName** | **String**| The realm name. | [optional] 
 **roleName** | **String**| The role name. | [optional] 

### Return type

null (empty response body)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="updateUserPrivileges"></a>
# **updateUserPrivileges**
> updateUserPrivileges(privileges, opts)

Update the user privileges.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var privileges = [new JReportServer.Privilege()]; // [Privilege] | Privileges.

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
  'userName': "userName_example", // String | The user name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.updateUserPrivileges(privileges, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **privileges** | [**[Privilege]**](Privilege.md)| Privileges. | 
 **realmName** | **String**| The realm name. | [optional] 
 **userName** | **String**| The user name. | [optional] 

### Return type

null (empty response body)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

<a name="updateUserProperties"></a>
# **updateUserProperties**
> updateUserProperties(putUser, opts)

Update the user properties.



### Example
```javascript
var JReportServer = require('j_report_server');
var defaultClient = JReportServer.ApiClient.instance;

// Configure HTTP basic authorization: user_auth
var user_auth = defaultClient.authentications['user_auth'];
user_auth.username = 'YOUR USERNAME';
user_auth.password = 'YOUR PASSWORD';

var apiInstance = new JReportServer.SecurityApi();

var putUser = new JReportServer.PutUser(); // PutUser | Put user properties.

var opts = { 
  'realmName': "realmName_example", // String | The realm name.
  'userName': "userName_example", // String | The user name.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.updateUserProperties(putUser, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **putUser** | [**PutUser**](PutUser.md)| Put user properties. | 
 **realmName** | **String**| The realm name. | [optional] 
 **userName** | **String**| The user name. | [optional] 

### Return type

null (empty response body)

### Authorization

[user_auth](../README.md#user_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: text/plain, application/json

