# JReportServer.TaskApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**submitScheduledTask**](TaskApi.md#submitScheduledTask) | **POST** /myTasks/scheduled | Submit the scheduled task.
[**viewReportTask**](TaskApi.md#viewReportTask) | **POST** /myTasks/ondemand | View the report task.


<a name="submitScheduledTask"></a>
# **submitScheduledTask**
> &#39;String&#39; submitScheduledTask(scheduledTask)

Submit the scheduled task.



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

var scheduledTask = new JReportServer.ScheduledTask(); // ScheduledTask | Scheduled task.


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **scheduledTask** | [**ScheduledTask**](ScheduledTask.md)| Scheduled task. | 

### 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="viewReportTask"></a>
# **viewReportTask**
> &#39;String&#39; viewReportTask(viewReportTask)

View the report task.



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

var viewReportTask = new JReportServer.ViewReportTask(); // ViewReportTask | View report task.


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **viewReportTask** | [**ViewReportTask**](ViewReportTask.md)| View report task. | 

### Return type

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

### Authorization

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

### HTTP request headers

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

