# JReportServer.ResourceTreeApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**deleteNodePermissionsByPath**](ResourceTreeApi.md#deleteNodePermissionsByPath) | **DELETE** /node/permissions | Delete principals&#39; permissions on the node/version.
[**getNodeByPath**](ResourceTreeApi.md#getNodeByPath) | **GET** /node | Get the node properties by the server resource path.
[**getNodeInheritedPermissionsByPath**](ResourceTreeApi.md#getNodeInheritedPermissionsByPath) | **GET** /node/inheritedPermissions | Get inherited permissions on the node for principals.
[**getNodeListInFolder**](ResourceTreeApi.md#getNodeListInFolder) | **GET** /nodes/list | Get the node name list in a folder and filter by specified node types.
[**getNodePermissionForUser**](ResourceTreeApi.md#getNodePermissionForUser) | **GET** /node/permission | Get permission of node/version by the server resource path for the specified user. If the userName is not specified then return permission of the user of the user session.
[**getNodePermissionsByPath**](ResourceTreeApi.md#getNodePermissionsByPath) | **GET** /node/permissions | Get principals&#39; permissions on the node/version by the server resource path.
[**getNodesInFolder**](ResourceTreeApi.md#getNodesInFolder) | **GET** /nodes | Get the nodes in a folder and filter by specified node types.
[**getResultVersionNumberListOfReport**](ResourceTreeApi.md#getResultVersionNumberListOfReport) | **GET** /resultVersions/list | Get the result version number list of a report resource.
[**getResultVersionOfReport**](ResourceTreeApi.md#getResultVersionOfReport) | **GET** /resultVersion | Get the properties of a report result version by the version number.
[**getResultVersionsOfReport**](ResourceTreeApi.md#getResultVersionsOfReport) | **GET** /resultVersions | Get the result versions of a report resource.
[**getVersionByNumber**](ResourceTreeApi.md#getVersionByNumber) | **GET** /version | Get the properties of a version by the version number.
[**getVersionNumberListOfResource**](ResourceTreeApi.md#getVersionNumberListOfResource) | **GET** /versions/list | Get the version number list of a server resource.
[**getVersionsOfResource**](ResourceTreeApi.md#getVersionsOfResource) | **GET** /versions | Get the versions of a server resource.
[**setNodePermissionsByPath**](ResourceTreeApi.md#setNodePermissionsByPath) | **PUT** /node/permissions | Set principals&#39; permissions on the node/version.


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

Delete principals&#39; permissions on the node/version.



### 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.ResourceTreeApi();

var opts = { 
  'path': "path_example", // String | The server resource path.
  'versionNumber': 56, // Number | The version number. -1 means the latest version; 0 means that this parameter is ignored.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **path** | **String**| The server resource path. | [optional] 
 **versionNumber** | **Number**| The version number. -1 means the latest version; 0 means that this parameter is ignored. | [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="getNodeByPath"></a>
# **getNodeByPath**
> Node getNodeByPath(opts)

Get the node properties by the server resource path.



### 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.ResourceTreeApi();

var opts = { 
  'path': "path_example", // String | The server resource path.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **path** | **String**| The server resource path. | [optional] 

### Return type

[**Node**](Node.md)

### Authorization

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

### HTTP request headers

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

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

Get inherited permissions on the node for principals.



### 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.ResourceTreeApi();

var opts = { 
  'path': "path_example", // String | The server resource path.
  'versionNumber': 56, // Number | The version number. -1 means the latest version; 0 means that this parameter is ignored.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **path** | **String**| The server resource path. | [optional] 
 **versionNumber** | **Number**| The version number. -1 means the latest version; 0 means that this parameter is ignored. | [optional] 

### Return type

[**Permissions**](Permissions.md)

### Authorization

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

### HTTP request headers

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

<a name="getNodeListInFolder"></a>
# **getNodeListInFolder**
> [&#39;String&#39;] getNodeListInFolder(opts)

Get the node name list in a folder and filter by specified node types.



### 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.ResourceTreeApi();

var opts = { 
  'path': "path_example", // String | The server resource path.
  'types': ["types_example"] // [String] | The types of nodes to return. Return all if no this parameter.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **path** | **String**| The server resource path. | [optional] 
 **types** | [**[String]**](String.md)| The types of nodes to return. Return all if no this parameter. | [optional] 

### Return type

**[&#39;String&#39;]**

### Authorization

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

### HTTP request headers

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

<a name="getNodePermissionForUser"></a>
# **getNodePermissionForUser**
> &#39;String&#39; getNodePermissionForUser(opts)

Get permission of node/version by the server resource path for the specified user. If the userName is not specified then return permission of the user of the user session.



### 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.ResourceTreeApi();

var opts = { 
  'userName': "userName_example", // String | The user name.
  'path': "path_example", // String | The server resource path.
  'versionNumber': 56, // Number | The version number. -1 means the latest version; 0 means that this parameter is ignored.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **userName** | **String**| The user name. | [optional] 
 **path** | **String**| The server resource path. | [optional] 
 **versionNumber** | **Number**| The version number. -1 means the latest version; 0 means that this parameter is ignored. | [optional] 

### Return type

**&#39;String&#39;**

### Authorization

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

### HTTP request headers

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

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

Get principals&#39; permissions on the node/version by the server resource path.



### 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.ResourceTreeApi();

var opts = { 
  'path': "path_example", // String | The server resource path.
  'versionNumber': 56, // Number | The version number. -1 means the latest version; 0 means that this parameter is ignored.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **path** | **String**| The server resource path. | [optional] 
 **versionNumber** | **Number**| The version number. -1 means the latest version; 0 means that this parameter is ignored. | [optional] 

### Return type

[**Permissions**](Permissions.md)

### Authorization

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

### HTTP request headers

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

<a name="getNodesInFolder"></a>
# **getNodesInFolder**
> [Node] getNodesInFolder(opts)

Get the nodes in a folder and filter by specified node types.



### 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.ResourceTreeApi();

var opts = { 
  'path': "path_example", // String | The server resource path.
  'types': ["types_example"] // [String] | The types of nodes to return. Return all if no this parameter.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **path** | **String**| The server resource path. | [optional] 
 **types** | [**[String]**](String.md)| The types of nodes to return. Return all if no this parameter. | [optional] 

### Return type

[**[Node]**](Node.md)

### Authorization

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

### HTTP request headers

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

<a name="getResultVersionNumberListOfReport"></a>
# **getResultVersionNumberListOfReport**
> [&#39;Number&#39;] getResultVersionNumberListOfReport(opts)

Get the result version number list of a report resource.



### 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.ResourceTreeApi();

var opts = { 
  'path': "path_example", // String | The server resource path.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **path** | **String**| The server resource path. | [optional] 

### Return type

**[&#39;Number&#39;]**

### Authorization

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

### HTTP request headers

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

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

Get the properties of a report result version by the version number.



### 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.ResourceTreeApi();

var opts = { 
  'versionNumber': 56, // Number | The version number. -1 means the latest version; 0 means that this parameter is ignored.
  'path': "path_example", // String | The server resource path.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **versionNumber** | **Number**| The version number. -1 means the latest version; 0 means that this parameter is ignored. | [optional] 
 **path** | **String**| The server resource path. | [optional] 

### Return type

[**ResultVersion**](ResultVersion.md)

### Authorization

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

### HTTP request headers

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

<a name="getResultVersionsOfReport"></a>
# **getResultVersionsOfReport**
> [ResultVersion] getResultVersionsOfReport(opts)

Get the result versions of a report resource.



### 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.ResourceTreeApi();

var opts = { 
  'path': "path_example", // String | The server resource path.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **path** | **String**| The server resource path. | [optional] 

### Return type

[**[ResultVersion]**](ResultVersion.md)

### Authorization

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

### HTTP request headers

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

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

Get the properties of a version by the version number.



### 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.ResourceTreeApi();

var opts = { 
  'versionNumber': 56, // Number | The version number. -1 means the latest version; 0 means that this parameter is ignored.
  'path': "path_example", // String | The server resource path.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **versionNumber** | **Number**| The version number. -1 means the latest version; 0 means that this parameter is ignored. | [optional] 
 **path** | **String**| The server resource path. | [optional] 

### Return type

[**Version**](Version.md)

### Authorization

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

### HTTP request headers

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

<a name="getVersionNumberListOfResource"></a>
# **getVersionNumberListOfResource**
> [&#39;Number&#39;] getVersionNumberListOfResource(opts)

Get the version number list of a server resource.



### 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.ResourceTreeApi();

var opts = { 
  'path': "path_example", // String | The server resource path.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **path** | **String**| The server resource path. | [optional] 

### Return type

**[&#39;Number&#39;]**

### Authorization

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

### HTTP request headers

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

<a name="getVersionsOfResource"></a>
# **getVersionsOfResource**
> [Version] getVersionsOfResource(opts)

Get the versions of a server resource.



### 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.ResourceTreeApi();

var opts = { 
  'path': "path_example", // String | The server resource path.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **path** | **String**| The server resource path. | [optional] 

### Return type

[**[Version]**](Version.md)

### Authorization

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

### HTTP request headers

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

<a name="setNodePermissionsByPath"></a>
# **setNodePermissionsByPath**
> setNodePermissionsByPath(permissions, opts)

Set principals&#39; permissions on the node/version.



### 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.ResourceTreeApi();

var permissions = new JReportServer.Permissions(); // Permissions | Node permissions.

var opts = { 
  'path': "path_example", // String | The server resource path.
  'versionNumber': 56, // Number | The version number. -1 means the latest version; 0 means that this parameter is ignored.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **permissions** | [**Permissions**](Permissions.md)| Node permissions. | 
 **path** | **String**| The server resource path. | [optional] 
 **versionNumber** | **Number**| The version number. -1 means the latest version; 0 means that this parameter is ignored. | [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

