1020 lines
28 KiB
Markdown
1020 lines
28 KiB
Markdown
# UserApi
|
|
|
|
All URIs are relative to *http://localhost/api*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**addCurrentUserPrivilege**](UserApi.md#addCurrentUserPrivilege) | **POST** /users/current/privileges | Add a privilege for the specified user.
|
|
[**addUser**](UserApi.md#addUser) | **POST** /users | Adds a user account with the specified roles and emails.
|
|
[**addUserPrivilege**](UserApi.md#addUserPrivilege) | **POST** /users/{id}/privileges | Returns the privileges for a particular user.
|
|
[**getCurrentUser**](UserApi.md#getCurrentUser) | **GET** /users/current | Returns the user currently authorized.
|
|
[**getCurrentUserPlaces**](UserApi.md#getCurrentUserPlaces) | **GET** /users/current/places | Returns the places for the current user.
|
|
[**getCurrentUserPrivileges**](UserApi.md#getCurrentUserPrivileges) | **GET** /users/current/privileges | Returns the privileges for the current user.
|
|
[**getUser**](UserApi.md#getUser) | **GET** /users/{id} | Returns the user account with the specified id.
|
|
[**getUserPlaces**](UserApi.md#getUserPlaces) | **GET** /users/{id}/places | Returns the places for a particular user.
|
|
[**getUserPrivileges**](UserApi.md#getUserPrivileges) | **GET** /users/{id}/privileges | Returns the privileges for a particular user.
|
|
[**getUsers**](UserApi.md#getUsers) | **GET** /users | Returns a list of users.
|
|
[**registerUser**](UserApi.md#registerUser) | **POST** /users/register | Registers a new user and sends an email account verification.
|
|
[**resetUser**](UserApi.md#resetUser) | **POST** /users/reset | Sends a password reset email to the correspondence email account of a user.
|
|
[**resetUserPassword**](UserApi.md#resetUserPassword) | **PUT** /users/password/{token} | Sets the password of a user account using a token received via email.
|
|
[**searchUsers**](UserApi.md#searchUsers) | **GET** /users/search | Returns a list of users whose login name or name contains the term.
|
|
[**setCurrentPassword**](UserApi.md#setCurrentPassword) | **PUT** /users/current/password | Sets the password of the currently authorized user.
|
|
[**setCurrentUser**](UserApi.md#setCurrentUser) | **PUT** /users/current | Updates the currently authorized user.
|
|
[**setUser**](UserApi.md#setUser) | **PUT** /users/{id} | Updates the values of a particular user account.
|
|
[**setUserPassword**](UserApi.md#setUserPassword) | **PUT** /users/{id}/password | Sets the password of a user.
|
|
[**verifyUserEmail**](UserApi.md#verifyUserEmail) | **PUT** /users/verify/{token} | Verifies an email address using a token received via email.
|
|
|
|
|
|
<a name="addCurrentUserPrivilege"></a>
|
|
# **addCurrentUserPrivilege**
|
|
> Privilege addCurrentUserPrivilege(share)
|
|
|
|
Add a privilege for the specified user.
|
|
|
|
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.swagger.client.ApiClient;
|
|
//import io.swagger.client.ApiException;
|
|
//import io.swagger.client.Configuration;
|
|
//import io.swagger.client.auth.*;
|
|
//import io.swagger.client.api.UserApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure HTTP basic authorization: user
|
|
HttpBasicAuth user = (HttpBasicAuth) defaultClient.getAuthentication("user");
|
|
user.setUsername("YOUR USERNAME");
|
|
user.setPassword("YOUR PASSWORD");
|
|
|
|
UserApi apiInstance = new UserApi();
|
|
String share = "share_example"; // String | The token of the share.
|
|
try {
|
|
Privilege result = apiInstance.addCurrentUserPrivilege(share);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling UserApi#addCurrentUserPrivilege");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**share** | **String**| The token of the share. |
|
|
|
|
### Return type
|
|
|
|
[**Privilege**](Privilege.md)
|
|
|
|
### Authorization
|
|
|
|
[user](../README.md#user)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, application/xml
|
|
- **Accept**: application/json, application/xml
|
|
|
|
<a name="addUser"></a>
|
|
# **addUser**
|
|
> User addUser(body)
|
|
|
|
Adds a user account with the specified roles and emails.
|
|
|
|
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.swagger.client.ApiClient;
|
|
//import io.swagger.client.ApiException;
|
|
//import io.swagger.client.Configuration;
|
|
//import io.swagger.client.auth.*;
|
|
//import io.swagger.client.api.UserApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure HTTP basic authorization: admin
|
|
HttpBasicAuth admin = (HttpBasicAuth) defaultClient.getAuthentication("admin");
|
|
admin.setUsername("YOUR USERNAME");
|
|
admin.setPassword("YOUR PASSWORD");
|
|
|
|
UserApi apiInstance = new UserApi();
|
|
User body = new User(); // User | The data for the new user.
|
|
try {
|
|
User result = apiInstance.addUser(body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling UserApi#addUser");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**body** | [**User**](User.md)| The data for the new user. |
|
|
|
|
### Return type
|
|
|
|
[**User**](User.md)
|
|
|
|
### Authorization
|
|
|
|
[admin](../README.md#admin)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, application/xml
|
|
- **Accept**: application/json, application/xml
|
|
|
|
<a name="addUserPrivilege"></a>
|
|
# **addUserPrivilege**
|
|
> Privilege addUserPrivilege(id, share)
|
|
|
|
Returns the privileges for a particular user.
|
|
|
|
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.swagger.client.ApiClient;
|
|
//import io.swagger.client.ApiException;
|
|
//import io.swagger.client.Configuration;
|
|
//import io.swagger.client.auth.*;
|
|
//import io.swagger.client.api.UserApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure HTTP basic authorization: admin
|
|
HttpBasicAuth admin = (HttpBasicAuth) defaultClient.getAuthentication("admin");
|
|
admin.setUsername("YOUR USERNAME");
|
|
admin.setPassword("YOUR PASSWORD");
|
|
|
|
UserApi apiInstance = new UserApi();
|
|
Long id = 789L; // Long | The user id.
|
|
String share = "share_example"; // String | The token of the share.
|
|
try {
|
|
Privilege result = apiInstance.addUserPrivilege(id, share);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling UserApi#addUserPrivilege");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**id** | **Long**| The user id. |
|
|
**share** | **String**| The token of the share. |
|
|
|
|
### Return type
|
|
|
|
[**Privilege**](Privilege.md)
|
|
|
|
### Authorization
|
|
|
|
[admin](../README.md#admin)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, application/xml
|
|
- **Accept**: application/json, application/xml
|
|
|
|
<a name="getCurrentUser"></a>
|
|
# **getCurrentUser**
|
|
> User getCurrentUser()
|
|
|
|
Returns the user currently authorized.
|
|
|
|
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.swagger.client.ApiClient;
|
|
//import io.swagger.client.ApiException;
|
|
//import io.swagger.client.Configuration;
|
|
//import io.swagger.client.auth.*;
|
|
//import io.swagger.client.api.UserApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure HTTP basic authorization: user
|
|
HttpBasicAuth user = (HttpBasicAuth) defaultClient.getAuthentication("user");
|
|
user.setUsername("YOUR USERNAME");
|
|
user.setPassword("YOUR PASSWORD");
|
|
|
|
UserApi apiInstance = new UserApi();
|
|
try {
|
|
User result = apiInstance.getCurrentUser();
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling UserApi#getCurrentUser");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
This endpoint does not need any parameter.
|
|
|
|
### Return type
|
|
|
|
[**User**](User.md)
|
|
|
|
### Authorization
|
|
|
|
[user](../README.md#user)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, application/xml
|
|
- **Accept**: application/json, application/xml
|
|
|
|
<a name="getCurrentUserPlaces"></a>
|
|
# **getCurrentUserPlaces**
|
|
> PlacePage getCurrentUserPlaces(pageOffset, pageSize)
|
|
|
|
Returns the places for the current user.
|
|
|
|
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.swagger.client.ApiException;
|
|
//import io.swagger.client.api.UserApi;
|
|
|
|
|
|
UserApi apiInstance = new UserApi();
|
|
Integer pageOffset = 0; // Integer | The offset in terms of elements.
|
|
Integer pageSize = 20; // Integer | The maximum number of elements on the page.
|
|
try {
|
|
PlacePage result = apiInstance.getCurrentUserPlaces(pageOffset, pageSize);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling UserApi#getCurrentUserPlaces");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**pageOffset** | **Integer**| The offset in terms of elements. | [optional] [default to 0]
|
|
**pageSize** | **Integer**| The maximum number of elements on the page. | [optional] [default to 20]
|
|
|
|
### Return type
|
|
|
|
[**PlacePage**](PlacePage.md)
|
|
|
|
### Authorization
|
|
|
|
No authorization required
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, application/xml
|
|
- **Accept**: application/json, application/xml
|
|
|
|
<a name="getCurrentUserPrivileges"></a>
|
|
# **getCurrentUserPrivileges**
|
|
> PrivilegePage getCurrentUserPrivileges(pageOffset, pageSize)
|
|
|
|
Returns the privileges for the current user.
|
|
|
|
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.swagger.client.ApiClient;
|
|
//import io.swagger.client.ApiException;
|
|
//import io.swagger.client.Configuration;
|
|
//import io.swagger.client.auth.*;
|
|
//import io.swagger.client.api.UserApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure HTTP basic authorization: user
|
|
HttpBasicAuth user = (HttpBasicAuth) defaultClient.getAuthentication("user");
|
|
user.setUsername("YOUR USERNAME");
|
|
user.setPassword("YOUR PASSWORD");
|
|
|
|
UserApi apiInstance = new UserApi();
|
|
Integer pageOffset = 0; // Integer | The offset in terms of elements.
|
|
Integer pageSize = 20; // Integer | The maximum number of elements on the page.
|
|
try {
|
|
PrivilegePage result = apiInstance.getCurrentUserPrivileges(pageOffset, pageSize);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling UserApi#getCurrentUserPrivileges");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**pageOffset** | **Integer**| The offset in terms of elements. | [optional] [default to 0]
|
|
**pageSize** | **Integer**| The maximum number of elements on the page. | [optional] [default to 20]
|
|
|
|
### Return type
|
|
|
|
[**PrivilegePage**](PrivilegePage.md)
|
|
|
|
### Authorization
|
|
|
|
[user](../README.md#user)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, application/xml
|
|
- **Accept**: application/json, application/xml
|
|
|
|
<a name="getUser"></a>
|
|
# **getUser**
|
|
> User getUser(id)
|
|
|
|
Returns the user account with the specified id.
|
|
|
|
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.swagger.client.ApiClient;
|
|
//import io.swagger.client.ApiException;
|
|
//import io.swagger.client.Configuration;
|
|
//import io.swagger.client.auth.*;
|
|
//import io.swagger.client.api.UserApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure HTTP basic authorization: admin
|
|
HttpBasicAuth admin = (HttpBasicAuth) defaultClient.getAuthentication("admin");
|
|
admin.setUsername("YOUR USERNAME");
|
|
admin.setPassword("YOUR PASSWORD");
|
|
|
|
UserApi apiInstance = new UserApi();
|
|
Long id = 789L; // Long | The id of the user to retrieve.
|
|
try {
|
|
User result = apiInstance.getUser(id);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling UserApi#getUser");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**id** | **Long**| The id of the user to retrieve. |
|
|
|
|
### Return type
|
|
|
|
[**User**](User.md)
|
|
|
|
### Authorization
|
|
|
|
[admin](../README.md#admin)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, application/xml
|
|
- **Accept**: application/json, application/xml
|
|
|
|
<a name="getUserPlaces"></a>
|
|
# **getUserPlaces**
|
|
> PlacePage getUserPlaces(id, pageOffset, pageSize)
|
|
|
|
Returns the places for a particular user.
|
|
|
|
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.swagger.client.ApiException;
|
|
//import io.swagger.client.api.UserApi;
|
|
|
|
|
|
UserApi apiInstance = new UserApi();
|
|
Long id = 789L; // Long | The user id.
|
|
Integer pageOffset = 0; // Integer | The offset in terms of elements.
|
|
Integer pageSize = 20; // Integer | The maximum number of elements on the page.
|
|
try {
|
|
PlacePage result = apiInstance.getUserPlaces(id, pageOffset, pageSize);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling UserApi#getUserPlaces");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**id** | **Long**| The user id. |
|
|
**pageOffset** | **Integer**| The offset in terms of elements. | [optional] [default to 0]
|
|
**pageSize** | **Integer**| The maximum number of elements on the page. | [optional] [default to 20]
|
|
|
|
### Return type
|
|
|
|
[**PlacePage**](PlacePage.md)
|
|
|
|
### Authorization
|
|
|
|
No authorization required
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, application/xml
|
|
- **Accept**: application/json, application/xml
|
|
|
|
<a name="getUserPrivileges"></a>
|
|
# **getUserPrivileges**
|
|
> PrivilegePage getUserPrivileges(id, pageOffset, pageSize)
|
|
|
|
Returns the privileges for a particular user.
|
|
|
|
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.swagger.client.ApiClient;
|
|
//import io.swagger.client.ApiException;
|
|
//import io.swagger.client.Configuration;
|
|
//import io.swagger.client.auth.*;
|
|
//import io.swagger.client.api.UserApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure HTTP basic authorization: admin
|
|
HttpBasicAuth admin = (HttpBasicAuth) defaultClient.getAuthentication("admin");
|
|
admin.setUsername("YOUR USERNAME");
|
|
admin.setPassword("YOUR PASSWORD");
|
|
|
|
UserApi apiInstance = new UserApi();
|
|
Long id = 789L; // Long | The user id.
|
|
Integer pageOffset = 0; // Integer | The offset in terms of elements.
|
|
Integer pageSize = 20; // Integer | The maximum number of elements on the page.
|
|
try {
|
|
PrivilegePage result = apiInstance.getUserPrivileges(id, pageOffset, pageSize);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling UserApi#getUserPrivileges");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**id** | **Long**| The user id. |
|
|
**pageOffset** | **Integer**| The offset in terms of elements. | [optional] [default to 0]
|
|
**pageSize** | **Integer**| The maximum number of elements on the page. | [optional] [default to 20]
|
|
|
|
### Return type
|
|
|
|
[**PrivilegePage**](PrivilegePage.md)
|
|
|
|
### Authorization
|
|
|
|
[admin](../README.md#admin)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, application/xml
|
|
- **Accept**: application/json, application/xml
|
|
|
|
<a name="getUsers"></a>
|
|
# **getUsers**
|
|
> UserPage getUsers(pageOffset, pageSize)
|
|
|
|
Returns a list of users.
|
|
|
|
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.swagger.client.ApiClient;
|
|
//import io.swagger.client.ApiException;
|
|
//import io.swagger.client.Configuration;
|
|
//import io.swagger.client.auth.*;
|
|
//import io.swagger.client.api.UserApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure HTTP basic authorization: admin
|
|
HttpBasicAuth admin = (HttpBasicAuth) defaultClient.getAuthentication("admin");
|
|
admin.setUsername("YOUR USERNAME");
|
|
admin.setPassword("YOUR PASSWORD");
|
|
|
|
UserApi apiInstance = new UserApi();
|
|
Integer pageOffset = 0; // Integer | The offset in terms of elements.
|
|
Integer pageSize = 20; // Integer | The maximum number of elements on the page.
|
|
try {
|
|
UserPage result = apiInstance.getUsers(pageOffset, pageSize);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling UserApi#getUsers");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**pageOffset** | **Integer**| The offset in terms of elements. | [optional] [default to 0]
|
|
**pageSize** | **Integer**| The maximum number of elements on the page. | [optional] [default to 20]
|
|
|
|
### Return type
|
|
|
|
[**UserPage**](UserPage.md)
|
|
|
|
### Authorization
|
|
|
|
[admin](../README.md#admin)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, application/xml
|
|
- **Accept**: application/json, application/xml
|
|
|
|
<a name="registerUser"></a>
|
|
# **registerUser**
|
|
> User registerUser(body)
|
|
|
|
Registers a new user and sends an email account verification.
|
|
|
|
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.swagger.client.ApiException;
|
|
//import io.swagger.client.api.UserApi;
|
|
|
|
|
|
UserApi apiInstance = new UserApi();
|
|
UserRegistration body = new UserRegistration(); // UserRegistration | The data of the new user.
|
|
try {
|
|
User result = apiInstance.registerUser(body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling UserApi#registerUser");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**body** | [**UserRegistration**](UserRegistration.md)| The data of the new user. |
|
|
|
|
### Return type
|
|
|
|
[**User**](User.md)
|
|
|
|
### Authorization
|
|
|
|
No authorization required
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, application/xml
|
|
- **Accept**: application/json, application/xml
|
|
|
|
<a name="resetUser"></a>
|
|
# **resetUser**
|
|
> resetUser(login)
|
|
|
|
Sends a password reset email to the correspondence email account of a user.
|
|
|
|
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.swagger.client.ApiException;
|
|
//import io.swagger.client.api.UserApi;
|
|
|
|
|
|
UserApi apiInstance = new UserApi();
|
|
String login = "login_example"; // String | The login of the user to reset.
|
|
try {
|
|
apiInstance.resetUser(login);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling UserApi#resetUser");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**login** | **String**| The login of the user to reset. |
|
|
|
|
### Return type
|
|
|
|
null (empty response body)
|
|
|
|
### Authorization
|
|
|
|
No authorization required
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, application/xml
|
|
- **Accept**: application/json, application/xml
|
|
|
|
<a name="resetUserPassword"></a>
|
|
# **resetUserPassword**
|
|
> User resetUserPassword(token, body)
|
|
|
|
Sets the password of a user account using a token received via email.
|
|
|
|
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.swagger.client.ApiException;
|
|
//import io.swagger.client.api.UserApi;
|
|
|
|
|
|
UserApi apiInstance = new UserApi();
|
|
String token = "token_example"; // String | The secret token received via email.
|
|
UserPassword body = new UserPassword(); // UserPassword | The new user password.
|
|
try {
|
|
User result = apiInstance.resetUserPassword(token, body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling UserApi#resetUserPassword");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**token** | **String**| The secret token received via email. |
|
|
**body** | [**UserPassword**](UserPassword.md)| The new user password. |
|
|
|
|
### Return type
|
|
|
|
[**User**](User.md)
|
|
|
|
### Authorization
|
|
|
|
No authorization required
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, application/xml
|
|
- **Accept**: application/json, application/xml
|
|
|
|
<a name="searchUsers"></a>
|
|
# **searchUsers**
|
|
> UserPage searchUsers(term, pageOffset, pageSize)
|
|
|
|
Returns a list of users whose login name or name contains the term.
|
|
|
|
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.swagger.client.ApiClient;
|
|
//import io.swagger.client.ApiException;
|
|
//import io.swagger.client.Configuration;
|
|
//import io.swagger.client.auth.*;
|
|
//import io.swagger.client.api.UserApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure HTTP basic authorization: admin
|
|
HttpBasicAuth admin = (HttpBasicAuth) defaultClient.getAuthentication("admin");
|
|
admin.setUsername("YOUR USERNAME");
|
|
admin.setPassword("YOUR PASSWORD");
|
|
|
|
UserApi apiInstance = new UserApi();
|
|
String term = "term_example"; // String | The search term.
|
|
Integer pageOffset = 0; // Integer | The offset in terms of elements.
|
|
Integer pageSize = 20; // Integer | The maximum number of elements on the page.
|
|
try {
|
|
UserPage result = apiInstance.searchUsers(term, pageOffset, pageSize);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling UserApi#searchUsers");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**term** | **String**| The search term. |
|
|
**pageOffset** | **Integer**| The offset in terms of elements. | [optional] [default to 0]
|
|
**pageSize** | **Integer**| The maximum number of elements on the page. | [optional] [default to 20]
|
|
|
|
### Return type
|
|
|
|
[**UserPage**](UserPage.md)
|
|
|
|
### Authorization
|
|
|
|
[admin](../README.md#admin)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, application/xml
|
|
- **Accept**: application/json, application/xml
|
|
|
|
<a name="setCurrentPassword"></a>
|
|
# **setCurrentPassword**
|
|
> User setCurrentPassword(body)
|
|
|
|
Sets the password of the currently authorized user.
|
|
|
|
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.swagger.client.ApiClient;
|
|
//import io.swagger.client.ApiException;
|
|
//import io.swagger.client.Configuration;
|
|
//import io.swagger.client.auth.*;
|
|
//import io.swagger.client.api.UserApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure HTTP basic authorization: user
|
|
HttpBasicAuth user = (HttpBasicAuth) defaultClient.getAuthentication("user");
|
|
user.setUsername("YOUR USERNAME");
|
|
user.setPassword("YOUR PASSWORD");
|
|
|
|
UserApi apiInstance = new UserApi();
|
|
UserPassword body = new UserPassword(); // UserPassword | The new password to set.
|
|
try {
|
|
User result = apiInstance.setCurrentPassword(body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling UserApi#setCurrentPassword");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**body** | [**UserPassword**](UserPassword.md)| The new password to set. |
|
|
|
|
### Return type
|
|
|
|
[**User**](User.md)
|
|
|
|
### Authorization
|
|
|
|
[user](../README.md#user)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, application/xml
|
|
- **Accept**: application/json, application/xml
|
|
|
|
<a name="setCurrentUser"></a>
|
|
# **setCurrentUser**
|
|
> User setCurrentUser(body)
|
|
|
|
Updates the currently authorized user.
|
|
|
|
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.swagger.client.ApiClient;
|
|
//import io.swagger.client.ApiException;
|
|
//import io.swagger.client.Configuration;
|
|
//import io.swagger.client.auth.*;
|
|
//import io.swagger.client.api.UserApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure HTTP basic authorization: user
|
|
HttpBasicAuth user = (HttpBasicAuth) defaultClient.getAuthentication("user");
|
|
user.setUsername("YOUR USERNAME");
|
|
user.setPassword("YOUR PASSWORD");
|
|
|
|
UserApi apiInstance = new UserApi();
|
|
User body = new User(); // User | The new user values to set.
|
|
try {
|
|
User result = apiInstance.setCurrentUser(body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling UserApi#setCurrentUser");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**body** | [**User**](User.md)| The new user values to set. |
|
|
|
|
### Return type
|
|
|
|
[**User**](User.md)
|
|
|
|
### Authorization
|
|
|
|
[user](../README.md#user)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, application/xml
|
|
- **Accept**: application/json, application/xml
|
|
|
|
<a name="setUser"></a>
|
|
# **setUser**
|
|
> User setUser(id, body)
|
|
|
|
Updates the values of a particular user account.
|
|
|
|
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.swagger.client.ApiClient;
|
|
//import io.swagger.client.ApiException;
|
|
//import io.swagger.client.Configuration;
|
|
//import io.swagger.client.auth.*;
|
|
//import io.swagger.client.api.UserApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure HTTP basic authorization: admin
|
|
HttpBasicAuth admin = (HttpBasicAuth) defaultClient.getAuthentication("admin");
|
|
admin.setUsername("YOUR USERNAME");
|
|
admin.setPassword("YOUR PASSWORD");
|
|
|
|
UserApi apiInstance = new UserApi();
|
|
Long id = 789L; // Long | The id of the user to set.
|
|
User body = new User(); // User | The new user data to set.
|
|
try {
|
|
User result = apiInstance.setUser(id, body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling UserApi#setUser");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**id** | **Long**| The id of the user to set. |
|
|
**body** | [**User**](User.md)| The new user data to set. |
|
|
|
|
### Return type
|
|
|
|
[**User**](User.md)
|
|
|
|
### Authorization
|
|
|
|
[admin](../README.md#admin)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, application/xml
|
|
- **Accept**: application/json, application/xml
|
|
|
|
<a name="setUserPassword"></a>
|
|
# **setUserPassword**
|
|
> User setUserPassword(id, body)
|
|
|
|
Sets the password of a user.
|
|
|
|
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.swagger.client.ApiClient;
|
|
//import io.swagger.client.ApiException;
|
|
//import io.swagger.client.Configuration;
|
|
//import io.swagger.client.auth.*;
|
|
//import io.swagger.client.api.UserApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure HTTP basic authorization: admin
|
|
HttpBasicAuth admin = (HttpBasicAuth) defaultClient.getAuthentication("admin");
|
|
admin.setUsername("YOUR USERNAME");
|
|
admin.setPassword("YOUR PASSWORD");
|
|
|
|
UserApi apiInstance = new UserApi();
|
|
Long id = 789L; // Long | The id of the user to change.
|
|
UserPassword body = new UserPassword(); // UserPassword | The new password.
|
|
try {
|
|
User result = apiInstance.setUserPassword(id, body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling UserApi#setUserPassword");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**id** | **Long**| The id of the user to change. |
|
|
**body** | [**UserPassword**](UserPassword.md)| The new password. |
|
|
|
|
### Return type
|
|
|
|
[**User**](User.md)
|
|
|
|
### Authorization
|
|
|
|
[admin](../README.md#admin)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, application/xml
|
|
- **Accept**: application/json, application/xml
|
|
|
|
<a name="verifyUserEmail"></a>
|
|
# **verifyUserEmail**
|
|
> verifyUserEmail(token)
|
|
|
|
Verifies an email address using a token received via email.
|
|
|
|
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import io.swagger.client.ApiException;
|
|
//import io.swagger.client.api.UserApi;
|
|
|
|
|
|
UserApi apiInstance = new UserApi();
|
|
String token = "token_example"; // String | The secret token received via email.
|
|
try {
|
|
apiInstance.verifyUserEmail(token);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling UserApi#verifyUserEmail");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**token** | **String**| The secret token received via email. |
|
|
|
|
### Return type
|
|
|
|
null (empty response body)
|
|
|
|
### Authorization
|
|
|
|
No authorization required
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, application/xml
|
|
- **Accept**: application/json, application/xml
|
|
|