Skip to content

Latest commit

 

History

History
516 lines (380 loc) · 15.7 KB

UsersApi.md

File metadata and controls

516 lines (380 loc) · 15.7 KB

UsersApi

All URIs are relative to https://hornet-trunk.dev.xtrf.eu/home-api

Method HTTP request Description
changePassword PUT /users/{userId}/password Sets user's password to a new value.
getAllNamesWithIds1 GET /users Returns list of simple users representations
getById6 GET /users/{userId} Returns user details.
getCustomField1 GET /users/{userId}/customFields/{customFieldKey} Returns custom field of a given user.
getCustomFields4 GET /users/{userId}/customFields Returns custom fields of a given user.
getMe GET /users/me Returns currently signed in user details.
update PUT /users/{userId} Updates an existing user.
updateCustomField PUT /users/{userId}/customFields/{customFieldKey} Updates given custom field of a given user.
updateCustomFields PUT /users/{userId}/customFields Updates custom fields of a given user.

changePassword

changePassword(userId, oldPassword, newPassword)

Sets user's password to a new value.

Sets user's password to a new value.

Example

// 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.UsersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

UsersApi apiInstance = new UsersApi();
Long userId = 789L; // Long | user's internal identifier
String oldPassword = "oldPassword_example"; // String | 
String newPassword = "newPassword_example"; // String | 
try {
    apiInstance.changePassword(userId, oldPassword, newPassword);
} catch (ApiException e) {
    System.err.println("Exception when calling UsersApi#changePassword");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
userId Long user's internal identifier
oldPassword String [optional]
newPassword String [optional]

Return type

null (empty response body)

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

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

getAllNamesWithIds1

List<EntityWithNameDTO> getAllNamesWithIds1()

Returns list of simple users representations

Returns list of simple users representations

Example

// 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.UsersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

UsersApi apiInstance = new UsersApi();
try {
    List<EntityWithNameDTO> result = apiInstance.getAllNamesWithIds1();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling UsersApi#getAllNamesWithIds1");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

List<EntityWithNameDTO>

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

getById6

UserDTO getById6(userId)

Returns user details.

Returns user details.

Example

// 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.UsersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

UsersApi apiInstance = new UsersApi();
Long userId = 789L; // Long | user's internal identifier
try {
    UserDTO result = apiInstance.getById6(userId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling UsersApi#getById6");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
userId Long user's internal identifier

Return type

UserDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

getCustomField1

CustomFieldDTO getCustomField1(userId, customFieldKey)

Returns custom field of a given user.

Returns custom field of a given user.

Example

// 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.UsersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

UsersApi apiInstance = new UsersApi();
Long userId = 789L; // Long | user's internal identifier
String customFieldKey = "customFieldKey_example"; // String | custom field's key
try {
    CustomFieldDTO result = apiInstance.getCustomField1(userId, customFieldKey);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling UsersApi#getCustomField1");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
userId Long user's internal identifier
customFieldKey String custom field's key

Return type

CustomFieldDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

getCustomFields4

CustomFieldsDTO getCustomFields4(userId)

Returns custom fields of a given user.

Returns custom fields of a given user.

Example

// 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.UsersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

UsersApi apiInstance = new UsersApi();
Long userId = 789L; // Long | user's internal identifier
try {
    CustomFieldsDTO result = apiInstance.getCustomFields4(userId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling UsersApi#getCustomFields4");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
userId Long user's internal identifier

Return type

CustomFieldsDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

getMe

UserDTO getMe()

Returns currently signed in user details.

Returns currently signed in user details.

Example

// 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.UsersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

UsersApi apiInstance = new UsersApi();
try {
    UserDTO result = apiInstance.getMe();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling UsersApi#getMe");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

UserDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

update

UserDTO update(body, userId)

Updates an existing user.

Updates an existing user.

Example

// 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.UsersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

UsersApi apiInstance = new UsersApi();
UserDTO body = new UserDTO(); // UserDTO | Updated existing user.
Long userId = 789L; // Long | user's internal identifier
try {
    UserDTO result = apiInstance.update(body, userId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling UsersApi#update");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body UserDTO Updated existing user.
userId Long user's internal identifier

Return type

UserDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

updateCustomField

CustomFieldDTO updateCustomField(body, userId, customFieldKey)

Updates given custom field of a given user.

Updates given custom field of a given user.

Example

// 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.UsersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

UsersApi apiInstance = new UsersApi();
CustomFieldDTO body = new CustomFieldDTO(); // CustomFieldDTO | Updated custom fields of a given user.
Long userId = 789L; // Long | user's internal identifier
String customFieldKey = "customFieldKey_example"; // String | custom field's key
try {
    CustomFieldDTO result = apiInstance.updateCustomField(body, userId, customFieldKey);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling UsersApi#updateCustomField");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body CustomFieldDTO Updated custom fields of a given user.
userId Long user's internal identifier
customFieldKey String custom field's key

Return type

CustomFieldDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

updateCustomFields

CustomFieldsDTO updateCustomFields(body, userId)

Updates custom fields of a given user.

Updates custom fields of a given user.

Example

// 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.UsersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

UsersApi apiInstance = new UsersApi();
List<CustomFieldDTO> body = Arrays.asList(new CustomFieldDTO()); // List<CustomFieldDTO> | Updated custom fields of a given user.
Long userId = 789L; // Long | user's internal identifier
try {
    CustomFieldsDTO result = apiInstance.updateCustomFields(body, userId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling UsersApi#updateCustomFields");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body List<CustomFieldDTO> Updated custom fields of a given user.
userId Long user's internal identifier

Return type

CustomFieldsDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8