# UnboundCaspApi.SystemApi

All URIs are relative to *https://localhost*

Method | HTTP request | Description
------------- | ------------- | -------------
[**changeUserPassword**](SystemApi.md#changeUserPassword) | **PUT** /casp/api/v1.0/mng/auth/users/password | Change user password
[**createUser**](SystemApi.md#createUser) | **POST** /casp/api/v1.0/mng/auth/users | Create a new user
[**deleteUser**](SystemApi.md#deleteUser) | **DELETE** /casp/api/v1.0/mng/auth/users/{user_name} | Remove a user
[**generateAccessToken**](SystemApi.md#generateAccessToken) | **POST** /casp/api/v1.0/mng/auth/tokens | Get access token
[**generateApiKey**](SystemApi.md#generateApiKey) | **POST** /casp/api/v1.0/mng/auth/apikeys | Get API Key
[**getStatus**](SystemApi.md#getStatus) | **GET** /casp/api/v1.0/mng/status | Return the CASP service status
[**listUsers**](SystemApi.md#listUsers) | **GET** /casp/api/v1.0/mng/auth/users | List users
[**revokeAccessToken**](SystemApi.md#revokeAccessToken) | **DELETE** /casp/api/v1.0/mng/auth/tokens | Revoke an OAuth token
[**updateUser**](SystemApi.md#updateUser) | **PUT** /casp/api/v1.0/mng/auth/users/{user_name} | Update user


<a name="changeUserPassword"></a>
# **changeUserPassword**
> changeUserPassword(value)

Change user password

Change user&#39;s password to the CASP service

### Example
```javascript
var UnboundCaspApi = require('unbound_casp_api');
var defaultClient = UnboundCaspApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new UnboundCaspApi.SystemApi();

var value = "value_example"; // String | User's password

apiInstance.changeUserPassword(value).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **value** | **String**| User&#39;s password | 

### Return type

null (empty response body)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

 - **Content-Type**: application/x-www-form-urlencoded
 - **Accept**: application/json

<a name="createUser"></a>
# **createUser**
> createUser(name, role, password)

Create a new user

Create a new user

### Example
```javascript
var UnboundCaspApi = require('unbound_casp_api');
var defaultClient = UnboundCaspApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new UnboundCaspApi.SystemApi();

var name = "name_example"; // String | user's name

var role = "role_example"; // String | user's role

var password = "password_example"; // String | user's password

apiInstance.createUser(name, role, password).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **name** | **String**| user&#39;s name | 
 **role** | **String**| user&#39;s role | 
 **password** | **String**| user&#39;s password | 

### Return type

null (empty response body)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

 - **Content-Type**: application/x-www-form-urlencoded
 - **Accept**: Not defined

<a name="deleteUser"></a>
# **deleteUser**
> deleteUser(userName)

Remove a user

Remove a user

### Example
```javascript
var UnboundCaspApi = require('unbound_casp_api');
var defaultClient = UnboundCaspApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new UnboundCaspApi.SystemApi();

var userName = "userName_example"; // String | User Name

apiInstance.deleteUser(userName).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **userName** | **String**| User Name | 

### Return type

null (empty response body)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="generateAccessToken"></a>
# **generateAccessToken**
> InlineResponse2013 generateAccessToken(username, password, grantType)

Get access token

Get access token for CASP service. See https://tools.ietf.org/html/rfc6749#section-4.3

### Example
```javascript
var UnboundCaspApi = require('unbound_casp_api');
var defaultClient = UnboundCaspApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new UnboundCaspApi.SystemApi();

var username = "username_example"; // String | Admin username

var password = "password_example"; // String | Admin password

var grantType = "grantType_example"; // String | Request's grant type. Value MUST be set to \"password\"

apiInstance.generateAccessToken(username, password, grantType).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **username** | **String**| Admin username | 
 **password** | **String**| Admin password | 
 **grantType** | **String**| Request&#39;s grant type. Value MUST be set to \&quot;password\&quot; | 

### Return type

[**InlineResponse2013**](InlineResponse2013.md)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

 - **Content-Type**: application/x-www-form-urlencoded
 - **Accept**: application/json

<a name="generateApiKey"></a>
# **generateApiKey**
> InlineResponse2013 generateApiKey(clientId, scope, grantType)

Get API Key

Get API Key for CASP service. See https://tools.ietf.org/html/rfc6749#section-4.4

### Example
```javascript
var UnboundCaspApi = require('unbound_casp_api');
var defaultClient = UnboundCaspApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new UnboundCaspApi.SystemApi();

var clientId = "clientId_example"; // String | Owner client ID auth token will be issued for

var scope = "scope_example"; // String | Auth token scope. Value MUST be set to \"/mng\"

var grantType = "grantType_example"; // String | Request's grant type. Value MUST be set to \"client_credentials\"

apiInstance.generateApiKey(clientId, scope, grantType).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **clientId** | **String**| Owner client ID auth token will be issued for | 
 **scope** | **String**| Auth token scope. Value MUST be set to \&quot;/mng\&quot; | 
 **grantType** | **String**| Request&#39;s grant type. Value MUST be set to \&quot;client_credentials\&quot; | 

### Return type

[**InlineResponse2013**](InlineResponse2013.md)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

 - **Content-Type**: application/x-www-form-urlencoded
 - **Accept**: application/json

<a name="getStatus"></a>
# **getStatus**
> InlineResponse2009 getStatus(opts)

Return the CASP service status

Verifies that the service is healthy and operational

### Example
```javascript
var UnboundCaspApi = require('unbound_casp_api');

var apiInstance = new UnboundCaspApi.SystemApi();

var opts = { 
  'withDetails': true // Boolean | Include system details
};
apiInstance.getStatus(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **withDetails** | **Boolean**| Include system details | [optional] 

### Return type

[**InlineResponse2009**](InlineResponse2009.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="listUsers"></a>
# **listUsers**
> [InlineResponse2005] listUsers()

List users

List users

### Example
```javascript
var UnboundCaspApi = require('unbound_casp_api');
var defaultClient = UnboundCaspApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new UnboundCaspApi.SystemApi();
apiInstance.listUsers().then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters
This endpoint does not need any parameter.

### Return type

[**[InlineResponse2005]**](InlineResponse2005.md)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

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

<a name="revokeAccessToken"></a>
# **revokeAccessToken**
> revokeAccessToken(clientId)

Revoke an OAuth token

Revoke an OAuth token

### Example
```javascript
var UnboundCaspApi = require('unbound_casp_api');
var defaultClient = UnboundCaspApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new UnboundCaspApi.SystemApi();

var clientId = "clientId_example"; // String | client_id

apiInstance.revokeAccessToken(clientId).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **clientId** | **String**| client_id | 

### Return type

null (empty response body)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

 - **Content-Type**: application/x-www-form-urlencoded
 - **Accept**: application/json

<a name="updateUser"></a>
# **updateUser**
> updateUser(userName, body)

Update user

Update user

### Example
```javascript
var UnboundCaspApi = require('unbound_casp_api');
var defaultClient = UnboundCaspApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new UnboundCaspApi.SystemApi();

var userName = "userName_example"; // String | User Name

var body = new UnboundCaspApi.Body4(); // Body4 | Update user's state

apiInstance.updateUser(userName, body).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **userName** | **String**| User Name | 
 **body** | [**Body4**](Body4.md)| Update user&#39;s state | 

### Return type

null (empty response body)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

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

