# PowerIAM.UserApi

All URIs are relative to *http://localhost:9000*

Method | HTTP request | Description
------------- | ------------- | -------------
[**getUser**](UserApi.md#getUser) | **GET** /v2/get-user | 
[**getUsers**](UserApi.md#getUsers) | **GET** /v2/get-users | 

<a name="getUser"></a>
# **getUser**
> UserV2 getUser(opts)



Get a user by ID.

### Example
```javascript
import {PowerIAM} from '@poweriam/sdk';
let defaultClient = PowerIAM.ApiClient.instance;

// Configure API key authorization: JWT Token
let JWT Token = defaultClient.authentications['JWT Token'];
JWT Token.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//JWT Token.apiKeyPrefix = 'Token';

let apiInstance = new PowerIAM.UserApi();
let opts = { 
  'userId': "userId_example" // String | 
};
apiInstance.getUser(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **userId** | **String**|  | [optional] 

### Return type

[**UserV2**](UserV2.md)

### Authorization

[JWT Token](../README.md#JWT Token)

### HTTP request headers

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

<a name="getUsers"></a>
# **getUsers**
> [UserV2] getUsers(opts)



Get all users in the world, or in a realm.

### Example
```javascript
import {PowerIAM} from '@poweriam/sdk';
let defaultClient = PowerIAM.ApiClient.instance;

// Configure API key authorization: JWT Token
let JWT Token = defaultClient.authentications['JWT Token'];
JWT Token.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//JWT Token.apiKeyPrefix = 'Token';

let apiInstance = new PowerIAM.UserApi();
let opts = { 
  'inRealmId': "inRealmId_example" // String | 
};
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
------------- | ------------- | ------------- | -------------
 **inRealmId** | **String**|  | [optional] 

### Return type

[**[UserV2]**](UserV2.md)

### Authorization

[JWT Token](../README.md#JWT Token)

### HTTP request headers

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

