# IbmWorkloadSchedulerApi.ProcessHistoryApi

All URIs are relative to *https://localhost/ibm/TWSWebUI/Simple/rest*

Method | HTTP request | Description
------------- | ------------- | -------------
[**cancelStep**](ProcessHistoryApi.md#cancelStep) | **PUT** /ProcessHistory/{PROCESS_ID}/{INSTANCEID}/Steps/{STEPID}/Cancel | 
[**getStepLog**](ProcessHistoryApi.md#getStepLog) | **GET** /ProcessHistory/{PROCESS_ID}/{INSTANCEID}/Steps/{STEPID}/Log | Get step output
[**killStep**](ProcessHistoryApi.md#killStep) | **PUT** /ProcessHistory/{PROCESS_ID}/{INSTANCEID}/Steps/{STEPID}/Kill | Stop a step.
[**listProcessHistory**](ProcessHistoryApi.md#listProcessHistory) | **GET** /ProcessHistory/{PROCESS_ID} | Get the process run history
[**listSteps**](ProcessHistoryApi.md#listSteps) | **GET** /ProcessHistory/{PROCESS_ID}/{INSTANCEID} | The list of steps of a running instance.
[**rerunStep**](ProcessHistoryApi.md#rerunStep) | **PUT** /ProcessHistory/{PROCESS_ID}/{INSTANCEID}/Steps/{STEPID}/Rerun | Rerun a step.
[**startNowStep**](ProcessHistoryApi.md#startNowStep) | **PUT** /ProcessHistory/{PROCESS_ID}/{INSTANCEID}/Steps/{STEPID}/StartNow | Starts the step


<a name="cancelStep"></a>
# **cancelStep**
> cancelStep(PROCESS_ID, INSTANCEID, STEPID, tenantId, opts)



Cancel a step not yet performed by the process. 

### Example
```javascript
var IbmWorkloadSchedulerApi = require('ibm-workload-scheduler-api');
var defaultClient = IbmWorkloadSchedulerApi.ApiClient.default;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new IbmWorkloadSchedulerApi.ProcessHistoryApi();

var PROCESS_ID = "PROCESS_ID_example"; // String | The ID of the process to retrieve.

var INSTANCEID = "INSTANCEID_example"; // String | The ID of the instanceId to retrieve.

var STEPID = "STEPID_example"; // String | The ID of the step to retrieve.

var tenantId = "tenantId_example"; // String | The id of the Tenant that is making the call

var opts = { 
  'engineName': "engineName_example", // String | The name of the engine to connect to. Leave default in cloud environments
  'engineOwner': "engineOwner_example" // String | The owner of the engine definition. Leave default in cloud environments.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.cancelStep(PROCESS_ID, INSTANCEID, STEPID, tenantId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **PROCESS_ID** | **String**| The ID of the process to retrieve. | 
 **INSTANCEID** | **String**| The ID of the instanceId to retrieve. | 
 **STEPID** | **String**| The ID of the step to retrieve. | 
 **tenantId** | **String**| The id of the Tenant that is making the call | 
 **engineName** | **String**| The name of the engine to connect to. Leave default in cloud environments | [optional] 
 **engineOwner** | **String**| The owner of the engine definition. Leave default in cloud environments. | [optional] 

### Return type

null (empty response body)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="getStepLog"></a>
# **getStepLog**
> &#39;String&#39; getStepLog(PROCESS_ID, INSTANCEID, STEPID, tenantId, opts)

Get step output

Get the output produced by one of the steps of any process that runs (process instance). 

### Example
```javascript
var IbmWorkloadSchedulerApi = require('ibm-workload-scheduler-api');
var defaultClient = IbmWorkloadSchedulerApi.ApiClient.default;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new IbmWorkloadSchedulerApi.ProcessHistoryApi();

var PROCESS_ID = "PROCESS_ID_example"; // String | The ID of the process to retrieve.

var INSTANCEID = "INSTANCEID_example"; // String | The ID of the instanceId to retrieve.

var STEPID = "STEPID_example"; // String | The ID of the step to retrieve.

var tenantId = "tenantId_example"; // String | The id of the Tenant that is making the call

var opts = { 
  'engineName': "engineName_example", // String | The name of the engine to connect to. Leave default in cloud environments
  'engineOwner': "engineOwner_example" // String | The owner of the engine definition. Leave default in cloud environments.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getStepLog(PROCESS_ID, INSTANCEID, STEPID, tenantId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **PROCESS_ID** | **String**| The ID of the process to retrieve. | 
 **INSTANCEID** | **String**| The ID of the instanceId to retrieve. | 
 **STEPID** | **String**| The ID of the step to retrieve. | 
 **tenantId** | **String**| The id of the Tenant that is making the call | 
 **engineName** | **String**| The name of the engine to connect to. Leave default in cloud environments | [optional] 
 **engineOwner** | **String**| The owner of the engine definition. Leave default in cloud environments. | [optional] 

### Return type

**&#39;String&#39;**

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: text/plain

<a name="killStep"></a>
# **killStep**
> killStep(PROCESS_ID, INSTANCEID, STEPID, tenantId, opts)

Stop a step.

Stop a step. that is running 

### Example
```javascript
var IbmWorkloadSchedulerApi = require('ibm-workload-scheduler-api');
var defaultClient = IbmWorkloadSchedulerApi.ApiClient.default;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new IbmWorkloadSchedulerApi.ProcessHistoryApi();

var PROCESS_ID = "PROCESS_ID_example"; // String | The ID of the process to retrieve.

var INSTANCEID = "INSTANCEID_example"; // String | The ID of the instanceId to retrieve.

var STEPID = "STEPID_example"; // String | The ID of the step to retrieve.

var tenantId = "tenantId_example"; // String | The id of the Tenant that is making the call

var opts = { 
  'engineName': "engineName_example", // String | The name of the engine to connect to. Leave default in cloud environments
  'engineOwner': "engineOwner_example" // String | The owner of the engine definition. Leave default in cloud environments.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.killStep(PROCESS_ID, INSTANCEID, STEPID, tenantId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **PROCESS_ID** | **String**| The ID of the process to retrieve. | 
 **INSTANCEID** | **String**| The ID of the instanceId to retrieve. | 
 **STEPID** | **String**| The ID of the step to retrieve. | 
 **tenantId** | **String**| The id of the Tenant that is making the call | 
 **engineName** | **String**| The name of the engine to connect to. Leave default in cloud environments | [optional] 
 **engineOwner** | **String**| The owner of the engine definition. Leave default in cloud environments. | [optional] 

### Return type

null (empty response body)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="listProcessHistory"></a>
# **listProcessHistory**
> [ProcessHistoryInstance] listProcessHistory(PROCESS_ID, tenantId, opts)

Get the process run history

Get the history of the process identified by the ID.  

### Example
```javascript
var IbmWorkloadSchedulerApi = require('ibm-workload-scheduler-api');
var defaultClient = IbmWorkloadSchedulerApi.ApiClient.default;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new IbmWorkloadSchedulerApi.ProcessHistoryApi();

var PROCESS_ID = "PROCESS_ID_example"; // String | The ID of the process to retrieve.

var tenantId = "tenantId_example"; // String | The ID of the tenant that is making the call.

var opts = { 
  'engineName': "engineName_example", // String | The name of the engine to connect to. Leave default in cloud environments
  'engineOwner': "engineOwner_example" // String | The owner of the engine definition. Leave default in cloud environments.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.listProcessHistory(PROCESS_ID, tenantId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **PROCESS_ID** | **String**| The ID of the process to retrieve. | 
 **tenantId** | **String**| The ID of the tenant that is making the call. | 
 **engineName** | **String**| The name of the engine to connect to. Leave default in cloud environments | [optional] 
 **engineOwner** | **String**| The owner of the engine definition. Leave default in cloud environments. | [optional] 

### Return type

[**[ProcessHistoryInstance]**](ProcessHistoryInstance.md)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="listSteps"></a>
# **listSteps**
> [StepHistoryInstance] listSteps(PROCESS_ID, INSTANCEID, tenantId, opts)

The list of steps of a running instance.

Return the list of steps executed by the Process, identified by the ID.  

### Example
```javascript
var IbmWorkloadSchedulerApi = require('ibm-workload-scheduler-api');
var defaultClient = IbmWorkloadSchedulerApi.ApiClient.default;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new IbmWorkloadSchedulerApi.ProcessHistoryApi();

var PROCESS_ID = "PROCESS_ID_example"; // String | The ID of the process to retrieve.

var INSTANCEID = "INSTANCEID_example"; // String | The ID of the instanceId to retrieve.

var tenantId = "tenantId_example"; // String | The ID of the tenant that is making the call.

var opts = { 
  'encodedId': true, // Boolean | Set to true if the ID is encoded (Base64).
  'engineName': "engineName_example", // String | The name of the engine to connect to. Leave default in cloud environments
  'engineOwner': "engineOwner_example" // String | The owner of the engine definition. Leave default in cloud environments
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.listSteps(PROCESS_ID, INSTANCEID, tenantId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **PROCESS_ID** | **String**| The ID of the process to retrieve. | 
 **INSTANCEID** | **String**| The ID of the instanceId to retrieve. | 
 **tenantId** | **String**| The ID of the tenant that is making the call. | 
 **encodedId** | **Boolean**| Set to true if the ID is encoded (Base64). | [optional] 
 **engineName** | **String**| The name of the engine to connect to. Leave default in cloud environments | [optional] 
 **engineOwner** | **String**| The owner of the engine definition. Leave default in cloud environments | [optional] 

### Return type

[**[StepHistoryInstance]**](StepHistoryInstance.md)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="rerunStep"></a>
# **rerunStep**
> rerunStep(PROCESS_ID, INSTANCEID, STEPID, tenantId, opts)

Rerun a step.

Rerun a step. of the process.  

### Example
```javascript
var IbmWorkloadSchedulerApi = require('ibm-workload-scheduler-api');
var defaultClient = IbmWorkloadSchedulerApi.ApiClient.default;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new IbmWorkloadSchedulerApi.ProcessHistoryApi();

var PROCESS_ID = "PROCESS_ID_example"; // String | The ID of the step to retrieve.

var INSTANCEID = "INSTANCEID_example"; // String | The ID of the instanceId to retrieve.

var STEPID = "STEPID_example"; // String | The ID of the step to retrieve.

var tenantId = "tenantId_example"; // String | The id of the Tenant that is making the call

var opts = { 
  'encodedId': true, // Boolean | Set to true if the ID is encoded (Base64).
  'engineName': "engineName_example", // String | The name of the engine to connect to. Leave default in cloud environments
  'engineOwner': "engineOwner_example" // String | The owner of the engine definition. Leave default in cloud environments.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.rerunStep(PROCESS_ID, INSTANCEID, STEPID, tenantId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **PROCESS_ID** | **String**| The ID of the step to retrieve. | 
 **INSTANCEID** | **String**| The ID of the instanceId to retrieve. | 
 **STEPID** | **String**| The ID of the step to retrieve. | 
 **tenantId** | **String**| The id of the Tenant that is making the call | 
 **encodedId** | **Boolean**| Set to true if the ID is encoded (Base64). | [optional] 
 **engineName** | **String**| The name of the engine to connect to. Leave default in cloud environments | [optional] 
 **engineOwner** | **String**| The owner of the engine definition. Leave default in cloud environments. | [optional] 

### Return type

null (empty response body)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="startNowStep"></a>
# **startNowStep**
> startNowStep(PROCESS_ID, INSTANCEID, STEPID, tenantId, opts)

Starts the step

Start a step not yet  performed by the process. 

### Example
```javascript
var IbmWorkloadSchedulerApi = require('ibm-workload-scheduler-api');
var defaultClient = IbmWorkloadSchedulerApi.ApiClient.default;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new IbmWorkloadSchedulerApi.ProcessHistoryApi();

var PROCESS_ID = "PROCESS_ID_example"; // String | The ID of the process to retrieve.

var INSTANCEID = "INSTANCEID_example"; // String | The ID of the instanceId to retrieve.

var STEPID = "STEPID_example"; // String | The ID of the step to retrieve.

var tenantId = "tenantId_example"; // String | The id of the Tenant that is making the call

var opts = { 
  'engineName': "engineName_example", // String | The name of the engine to connect to. Leave default in cloud environments
  'engineOwner': "engineOwner_example" // String | The owner of the engine definition. Leave default in cloud environments.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.startNowStep(PROCESS_ID, INSTANCEID, STEPID, tenantId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **PROCESS_ID** | **String**| The ID of the process to retrieve. | 
 **INSTANCEID** | **String**| The ID of the instanceId to retrieve. | 
 **STEPID** | **String**| The ID of the step to retrieve. | 
 **tenantId** | **String**| The id of the Tenant that is making the call | 
 **engineName** | **String**| The name of the engine to connect to. Leave default in cloud environments | [optional] 
 **engineOwner** | **String**| The owner of the engine definition. Leave default in cloud environments. | [optional] 

### Return type

null (empty response body)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

