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

171 lines
4.4 KiB
Markdown

# SfGate.DatabasesApi
All URIs are relative to *http://sf-gate.vernonkeenan.com:8080/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**getDatabases**](DatabasesApi.md#getDatabases) | **GET** /databases | Get a list Databases
[**postDatabases**](DatabasesApi.md#postDatabases) | **POST** /databases | Create new Databases
[**putDatabases**](DatabasesApi.md#putDatabases) | **PUT** /databases | Update Databases
## getDatabases
> DatabaseResponse getDatabases(opts)
Get a list Databases
Return a list of Database 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.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**](DatabaseResponse.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## postDatabases
> DatabaseResponse postDatabases(databaseRequest)
Create new Databases
Create Databases 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.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**](DatabaseRequest.md)| An array of Database records |
### Return type
[**DatabaseResponse**](DatabaseResponse.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## putDatabases
> DatabaseResponse putDatabases(databaseRequest)
Update Databases
Update Database 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.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**](DatabaseRequest.md)| An array of Database records |
### Return type
[**DatabaseResponse**](DatabaseResponse.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json