# Devops.TenantApi All URIs are relative to *http://devops.vernonkeenan.com:8080/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**getTenant**](TenantApi.md#getTenant) | **GET** /tenants/{tenantIdPath} | Get a single Tenant object [**getTenants**](TenantApi.md#getTenants) | **GET** /tenants | Get a list Tenants [**getTenantsObservable**](TenantApi.md#getTenantsObservable) | **GET** /tenants/observable | Get Tenants in an observable array [**postTenants**](TenantApi.md#postTenants) | **POST** /tenants | Create new Tenants [**putTenants**](TenantApi.md#putTenants) | **PUT** /tenants | Update Tenants ## getTenant > Tenant getTenant(tenantIdPath) Get a single Tenant object Return a single Tenant 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.TenantApi(); let tenantIdPath = "tenantIdPath_example"; // String | Taxnexus Record Id of a Tenant apiInstance.getTenant(tenantIdPath, (error, data, response) => { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **tenantIdPath** | **String**| Taxnexus Record Id of a Tenant | ### Return type [**Tenant**](Tenant.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## getTenants > TenantResponse getTenants(opts) Get a list Tenants Return a list of Tenant records 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.TenantApi(); let opts = { 'taxnexusAccount': "taxnexusAccount_example", // String | Taxnexus Account of a Tenant 'tenantId': "tenantId_example", // String | Taxnexus Record Id of a Tenant 'companyId': "companyId_example", // String | Taxnexus Record Id of a Company 'limit': 789, // Number | How many objects to return at one time 'offset': 789 // Number | How many objects to skip? (default 0) }; apiInstance.getTenants(opts, (error, data, response) => { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **taxnexusAccount** | **String**| Taxnexus Account of a Tenant | [optional] **tenantId** | **String**| Taxnexus Record Id of a Tenant | [optional] **companyId** | **String**| Taxnexus Record Id of a Company | [optional] **limit** | **Number**| How many objects to return at one time | [optional] **offset** | **Number**| How many objects to skip? (default 0) | [optional] ### Return type [**TenantResponse**](TenantResponse.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## getTenantsObservable > [Tenant] getTenantsObservable() Get Tenants in an observable array Returns a Tenant 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.TenantApi(); apiInstance.getTenantsObservable((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 [**[Tenant]**](Tenant.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## postTenants > TenantResponse postTenants(tenantRequest) Create new Tenants Create Tenants in Taxnexus ### 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.TenantApi(); let tenantRequest = new Devops.TenantRequest(); // TenantRequest | An array of Tenant records apiInstance.postTenants(tenantRequest, (error, data, response) => { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **tenantRequest** | [**TenantRequest**](TenantRequest.md)| An array of Tenant records | ### Return type [**TenantResponse**](TenantResponse.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## putTenants > TenantResponse putTenants(tenantRequest) Update Tenants Update Tenant in Taxnexus ### 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.TenantApi(); let tenantRequest = new Devops.TenantRequest(); // TenantRequest | An array of Tenant records apiInstance.putTenants(tenantRequest, (error, data, response) => { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **tenantRequest** | [**TenantRequest**](TenantRequest.md)| An array of Tenant records | ### Return type [**TenantResponse**](TenantResponse.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json