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

4.4 KiB

SfGate.ClustersApi

All URIs are relative to http://sf-gate.vernonkeenan.com:8080/v1

Method HTTP request Description
getClusters GET /clusters Get a list Clusters
postClusters POST /clusters Create new Clusters
putClusters PUT /clusters Update Clusters

getClusters

ClusterResponse getClusters(opts)

Get a list Clusters

Return a list of Cluster records from the datastore

Example

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

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

postClusters

ClusterResponse postClusters(clusterRequest)

Create new Clusters

Create Clusters in Taxnexus

Example

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 An array of Cluster records

Return type

ClusterResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

putClusters

ClusterResponse putClusters(clusterRequest)

Update Clusters

Update Cluster in Taxnexus

Example

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 An array of Cluster records

Return type

ClusterResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json