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

4.4 KiB

SfGate.DatabasesApi

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

Method HTTP request Description
getDatabases GET /databases Get a list Databases
postDatabases POST /databases Create new Databases
putDatabases PUT /databases Update Databases

getDatabases

DatabaseResponse getDatabases(opts)

Get a list Databases

Return a list of Database 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.DatabasesApi();
let opts = {
  'databaseId': "databaseId_example", // String | Taxnexus Record Id of a Database
  'limit': 789, // Number | How many objects to return at one time
  'offset': 789 // Number | How many objects to skip?
};
apiInstance.getDatabases(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
databaseId String Taxnexus Record Id of a Database [optional]
limit Number How many objects to return at one time [optional]
offset Number How many objects to skip? [optional]

Return type

DatabaseResponse

Authorization

ApiKeyAuth

HTTP request headers

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

postDatabases

DatabaseResponse postDatabases(databaseRequest)

Create new Databases

Create Databases 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.DatabasesApi();
let databaseRequest = new SfGate.DatabaseRequest(); // DatabaseRequest | An array of Database records
apiInstance.postDatabases(databaseRequest, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
databaseRequest DatabaseRequest An array of Database records

Return type

DatabaseResponse

Authorization

ApiKeyAuth

HTTP request headers

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

putDatabases

DatabaseResponse putDatabases(databaseRequest)

Update Databases

Update Database 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.DatabasesApi();
let databaseRequest = new SfGate.DatabaseRequest(); // DatabaseRequest | An array of Database records
apiInstance.putDatabases(databaseRequest, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
databaseRequest DatabaseRequest An array of Database records

Return type

DatabaseResponse

Authorization

ApiKeyAuth

HTTP request headers

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