lib/client/devops/docs/TemplateApi.md

225 lines
5.9 KiB
Markdown
Raw Normal View History

2022-09-03 21:10:56 +00:00
# Devops.TemplateApi
All URIs are relative to *http://devops.vernonkeenan.com:8080/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**getTemplate**](TemplateApi.md#getTemplate) | **GET** /templates/{templateIdPath} | Get a single Template object
[**getTemplates**](TemplateApi.md#getTemplates) | **GET** /templates | Get a list Templates
[**getTemplatesObservable**](TemplateApi.md#getTemplatesObservable) | **GET** /templates/observable | Get Templates in an observable array
[**postTemplates**](TemplateApi.md#postTemplates) | **POST** /templates | Create new Templates
## getTemplate
> Template getTemplate(templateIdPath)
Get a single Template object
Return a single Template object from datastore as a Singleton
### Example
```javascript
import Devops from 'devops';
let defaultClient = Devops.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new Devops.TemplateApi();
let templateIdPath = "templateIdPath_example"; // String | Taxnexus Record Id of a Template
apiInstance.getTemplate(templateIdPath, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**templateIdPath** | **String**| Taxnexus Record Id of a Template |
### Return type
[**Template**](Template.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## getTemplates
> TemplateResponse getTemplates(opts)
Get a list Templates
Return a list of Templates from the datastore
### Example
```javascript
import Devops from 'devops';
let defaultClient = Devops.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new Devops.TemplateApi();
let opts = {
'limit': 789, // Number | How many objects to return at one time
'offset': 789, // Number | How many objects to skip? (default 0)
'active': true, // Boolean | Retrieve active records only?
'templateId': "templateId_example", // String | Template ID
'isMaster': true, // Boolean | Is Master Template?
'objectType': "objectType_example" // String | Object Type Name
};
apiInstance.getTemplates(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**limit** | **Number**| How many objects to return at one time | [optional]
**offset** | **Number**| How many objects to skip? (default 0) | [optional]
**active** | **Boolean**| Retrieve active records only? | [optional]
**templateId** | **String**| Template ID | [optional]
**isMaster** | **Boolean**| Is Master Template? | [optional]
**objectType** | **String**| Object Type Name | [optional]
### Return type
[**TemplateResponse**](TemplateResponse.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## getTemplatesObservable
> [Template] getTemplatesObservable()
Get Templates in an observable array
Returns a Template retrieval in a observable array
### Example
```javascript
import Devops from 'devops';
let defaultClient = Devops.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new Devops.TemplateApi();
apiInstance.getTemplatesObservable((error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**[Template]**](Template.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## postTemplates
> TemplateResponse postTemplates(templateRequest)
Create new Templates
Create new Templates
### Example
```javascript
import Devops from 'devops';
let defaultClient = Devops.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new Devops.TemplateApi();
let templateRequest = new Devops.TemplateRequest(); // TemplateRequest | An array of Template records
apiInstance.postTemplates(templateRequest, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**templateRequest** | [**TemplateRequest**](TemplateRequest.md)| An array of Template records |
### Return type
[**TemplateResponse**](TemplateResponse.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json