# IbmWorkloadSchedulerApi.ProcessLibraryApi

All URIs are relative to *https://localhost/ibm/TWSWebUI/Simple/rest*

Method | HTTP request | Description
------------- | ------------- | -------------
[**createProcessLibrary**](ProcessLibraryApi.md#createProcessLibrary) | **POST** /ProcessLibrary | Create a ProcessLibrary
[**deleteProcessLibrary**](ProcessLibraryApi.md#deleteProcessLibrary) | **DELETE** /ProcessLibrary/{PROCESS_LIBRARY_ID} | Delete a ProcessLibrary
[**exportProcessLibrary**](ProcessLibraryApi.md#exportProcessLibrary) | **GET** /ProcessLibrary/{PROCESS_LIBRARY_ID}/Export | 
[**getProcessLibrary**](ProcessLibraryApi.md#getProcessLibrary) | **GET** /ProcessLibrary/{PROCESS_LIBRARY_ID} | Get ProcessLibrary info
[**getProcessLibraryChildren**](ProcessLibraryApi.md#getProcessLibraryChildren) | **GET** /ProcessLibrary/{PROCESS_LIBRARY_ID}/Children | Get the children libraries
[**listProcessLibrary**](ProcessLibraryApi.md#listProcessLibrary) | **GET** /ProcessLibrary | List process libraries
[**listProcessesInLibrary**](ProcessLibraryApi.md#listProcessesInLibrary) | **GET** /ProcessLibrary/{PROCESS_LIBRARY_ID}/Processes | Lists processes in the lib
[**updateProcessLibrary**](ProcessLibraryApi.md#updateProcessLibrary) | **PUT** /ProcessLibrary/{PROCESS_LIBRARY_ID} | Update a Process Library


<a name="createProcessLibrary"></a>
# **createProcessLibrary**
> [ProcessLibrary] createProcessLibrary(body, tenantId, opts)

Create a ProcessLibrary

Create a ProcessLibrary and return it 

### 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.ProcessLibraryApi();

var body = new IbmWorkloadSchedulerApi.ProcessLibrary(); // ProcessLibrary | the ProcessLibrary to create

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.createProcessLibrary(body, tenantId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**ProcessLibrary**](ProcessLibrary.md)| the ProcessLibrary to create | 
 **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

[**[ProcessLibrary]**](ProcessLibrary.md)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="deleteProcessLibrary"></a>
# **deleteProcessLibrary**
> deleteProcessLibrary(PROCESS_LIBRARY_ID, tenantId, opts)

Delete a ProcessLibrary

Delete a Process Libray. 

### 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.ProcessLibraryApi();

var PROCESS_LIBRARY_ID = "PROCESS_LIBRARY_ID_example"; // String | The ID of the processLibrary 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.deleteProcessLibrary(PROCESS_LIBRARY_ID, tenantId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **PROCESS_LIBRARY_ID** | **String**| The ID of the processLibrary 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, mediatype/HTML

<a name="exportProcessLibrary"></a>
# **exportProcessLibrary**
> File exportProcessLibrary(PROCESS_LIBRARY_ID, tenantId, opts)



Export the list of processes of the ProcessLibrary in a json file.

### 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.ProcessLibraryApi();

var PROCESS_LIBRARY_ID = "PROCESS_LIBRARY_ID_example"; // String | The ID of the processLibrary 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.exportProcessLibrary(PROCESS_LIBRARY_ID, tenantId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **PROCESS_LIBRARY_ID** | **String**| The ID of the processLibrary 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

**File**

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/octet-stream

<a name="getProcessLibrary"></a>
# **getProcessLibrary**
> [ProcessLibrary] getProcessLibrary(PROCESS_LIBRARY_ID, tenantId, opts)

Get ProcessLibrary info

Get the ProcessLibrary 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.ProcessLibraryApi();

var PROCESS_LIBRARY_ID = "PROCESS_LIBRARY_ID_example"; // String | The ID of the processLibrary 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.getProcessLibrary(PROCESS_LIBRARY_ID, tenantId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **PROCESS_LIBRARY_ID** | **String**| The ID of the processLibrary 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

[**[ProcessLibrary]**](ProcessLibrary.md)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="getProcessLibraryChildren"></a>
# **getProcessLibraryChildren**
> [ProcessLibrary] getProcessLibraryChildren(PROCESS_LIBRARY_ID, tenantId, opts)

Get the children libraries

Return the list of the subprocess library of the Process Library specified 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.ProcessLibraryApi();

var PROCESS_LIBRARY_ID = "PROCESS_LIBRARY_ID_example"; // String | The ID of the Process Library parent 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.getProcessLibraryChildren(PROCESS_LIBRARY_ID, tenantId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **PROCESS_LIBRARY_ID** | **String**| The ID of the Process Library parent 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

[**[ProcessLibrary]**](ProcessLibrary.md)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="listProcessLibrary"></a>
# **listProcessLibrary**
> [ProcessLibrary] listProcessLibrary(tenantId, opts)

List process libraries

Get the ProcessLibrary list. 

### 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.ProcessLibraryApi();

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.listProcessLibrary(tenantId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **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

[**[ProcessLibrary]**](ProcessLibrary.md)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="listProcessesInLibrary"></a>
# **listProcessesInLibrary**
> [Process] listProcessesInLibrary(PROCESS_LIBRARY_ID, tenantId, opts)

Lists processes in the lib

Return the list of processes releated to the ProcessLibrary 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.ProcessLibraryApi();

var PROCESS_LIBRARY_ID = "PROCESS_LIBRARY_ID_example"; // String | The ID of the processLibrary 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.listProcessesInLibrary(PROCESS_LIBRARY_ID, tenantId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **PROCESS_LIBRARY_ID** | **String**| The ID of the processLibrary 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

[**[Process]**](Process.md)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="updateProcessLibrary"></a>
# **updateProcessLibrary**
> updateProcessLibrary(PROCESS_LIBRARY_ID, body, tenantId, opts)

Update a Process Library

Update a Process Library. 

### 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.ProcessLibraryApi();

var PROCESS_LIBRARY_ID = "PROCESS_LIBRARY_ID_example"; // String | The ID of the processLibrary to retrieve.

var body = new IbmWorkloadSchedulerApi.ProcessLibrary(); // ProcessLibrary | The ProcessLibrary to update.

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.updateProcessLibrary(PROCESS_LIBRARY_ID, body, tenantId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **PROCESS_LIBRARY_ID** | **String**| The ID of the processLibrary to retrieve. | 
 **body** | [**ProcessLibrary**](ProcessLibrary.md)| The ProcessLibrary to update. | 
 **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**: application/json
 - **Accept**: application/json, mediatype/HTML

