lib/client/devops/docs/UserApi.md

281 lines
7.2 KiB
Markdown

# Devops.UserApi
All URIs are relative to *http://devops.vernonkeenan.com:8080/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**getUser**](UserApi.md#getUser) | **GET** /users/{userIdPath} | Get a single User object
[**getUsers**](UserApi.md#getUsers) | **GET** /users | Get a list Users
[**getUsersObservable**](UserApi.md#getUsersObservable) | **GET** /users/observable | Get Users in an observable array
[**postUsers**](UserApi.md#postUsers) | **POST** /users | Create new Users
[**putUsers**](UserApi.md#putUsers) | **PUT** /users | Update existing users
## getUser
> User getUser(userIdPath)
Get a single User object
Return a single User 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.UserApi();
let userIdPath = "userIdPath_example"; // String | Taxnexus Record Id of a User
apiInstance.getUser(userIdPath, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userIdPath** | **String**| Taxnexus Record Id of a User |
### Return type
[**User**](User.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## getUsers
> UserResponse getUsers(opts)
Get a list Users
Return a list of User 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.UserApi();
let opts = {
'limit': 789, // Number | How many objects to return at one time
'offset': 789, // Number | How many objects to skip? (default 0)
'accountId': "accountId_example", // String | Taxnexus Record Id of an Account
'contactId': "contactId_example", // String | Taxnexus Record Id of a Contact
'active': true, // Boolean | Retrieve active records only?
'email': "email_example", // String | Email Address (not unique)
'userId': "userId_example", // String | Taxnexus User ID (unique)
'username': "username_example" // String | Username (unique)
};
apiInstance.getUsers(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**limit** | **Number**| How many objects to return at one time | [optional]
**offset** | **Number**| How many objects to skip? (default 0) | [optional]
**accountId** | **String**| Taxnexus Record Id of an Account | [optional]
**contactId** | **String**| Taxnexus Record Id of a Contact | [optional]
**active** | **Boolean**| Retrieve active records only? | [optional]
**email** | **String**| Email Address (not unique) | [optional]
**userId** | **String**| Taxnexus User ID (unique) | [optional]
**username** | **String**| Username (unique) | [optional]
### Return type
[**UserResponse**](UserResponse.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## getUsersObservable
> [User] getUsersObservable()
Get Users in an observable array
Returns a User 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.UserApi();
apiInstance.getUsersObservable((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
[**[User]**](User.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## postUsers
> UserResponse postUsers(userRequest)
Create new Users
Create new Users
### 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.UserApi();
let userRequest = new Devops.UserRequest(); // UserRequest | An array of User records
apiInstance.postUsers(userRequest, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userRequest** | [**UserRequest**](UserRequest.md)| An array of User records |
### Return type
[**UserResponse**](UserResponse.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## putUsers
> UserResponse putUsers(userRequest)
Update existing users
Update existing users
### 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.UserApi();
let userRequest = new Devops.UserRequest(); // UserRequest | An array of User records
apiInstance.putUsers(userRequest, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userRequest** | [**UserRequest**](UserRequest.md)| An array of User records |
### Return type
[**UserResponse**](UserResponse.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json