lib/client/sf-gate/docs/ClustersApi.md

171 lines
4.4 KiB
Markdown
Raw Normal View History

2022-09-03 21:10:56 +00:00
# SfGate.ClustersApi
All URIs are relative to *http://sf-gate.vernonkeenan.com:8080/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**getClusters**](ClustersApi.md#getClusters) | **GET** /clusters | Get a list Clusters
[**postClusters**](ClustersApi.md#postClusters) | **POST** /clusters | Create new Clusters
[**putClusters**](ClustersApi.md#putClusters) | **PUT** /clusters | Update Clusters
## getClusters
> ClusterResponse getClusters(opts)
Get a list Clusters
Return a list of Cluster records from the datastore
### Example
```javascript
import SfGate from 'sf_gate';
let defaultClient = SfGate.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 SfGate.ClustersApi();
let opts = {
'clusterId': "clusterId_example", // String | Taxnexus Record Id of a Cluster
'limit': 789, // Number | How many objects to return at one time
'offset': 789 // Number | How many objects to skip?
};
apiInstance.getClusters(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**clusterId** | **String**| Taxnexus Record Id of a Cluster | [optional]
**limit** | **Number**| How many objects to return at one time | [optional]
**offset** | **Number**| How many objects to skip? | [optional]
### Return type
[**ClusterResponse**](ClusterResponse.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## postClusters
> ClusterResponse postClusters(clusterRequest)
Create new Clusters
Create Clusters in Taxnexus
### Example
```javascript
import SfGate from 'sf_gate';
let defaultClient = SfGate.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 SfGate.ClustersApi();
let clusterRequest = new SfGate.ClusterRequest(); // ClusterRequest | An array of Cluster records
apiInstance.postClusters(clusterRequest, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**clusterRequest** | [**ClusterRequest**](ClusterRequest.md)| An array of Cluster records |
### Return type
[**ClusterResponse**](ClusterResponse.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## putClusters
> ClusterResponse putClusters(clusterRequest)
Update Clusters
Update Cluster in Taxnexus
### Example
```javascript
import SfGate from 'sf_gate';
let defaultClient = SfGate.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 SfGate.ClustersApi();
let clusterRequest = new SfGate.ClusterRequest(); // ClusterRequest | An array of Cluster records
apiInstance.putClusters(clusterRequest, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**clusterRequest** | [**ClusterRequest**](ClusterRequest.md)| An array of Cluster records |
### Return type
[**ClusterResponse**](ClusterResponse.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json