Skip to content

Latest commit

 

History

History
270 lines (195 loc) · 8.25 KB

UserProfileApi.md

File metadata and controls

270 lines (195 loc) · 8.25 KB

UserProfileApi

All URIs are relative to https://localhost:9080/activiti-app/api

Method HTTP request Description
changePasswordUsingPOST POST /enterprise/profile-password Change user password
getProfilePictureUsingGET GET /enterprise/profile-picture Retrieve user profile picture
getProfileUsingGET GET /enterprise/profile Get user profile
updateProfile POST /enterprise/profile Update user profile
uploadProfilePictureUsingPOST POST /enterprise/profile-picture Change user profile picture

changePasswordUsingPOST

changePasswordUsingPOST(changePasswordRepresentation)

Change user password

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.UserProfileApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

UserProfileApi apiInstance = new UserProfileApi();
ChangePasswordRepresentation changePasswordRepresentation = new ChangePasswordRepresentation(); // ChangePasswordRepresentation | changePasswordRepresentation
try {
    apiInstance.changePasswordUsingPOST(changePasswordRepresentation);
} catch (ApiException e) {
    System.err.println("Exception when calling UserProfileApi#changePasswordUsingPOST");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
changePasswordRepresentation ChangePasswordRepresentation changePasswordRepresentation

Return type

null (empty response body)

Authorization

basicAuth

HTTP request headers

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

getProfilePictureUsingGET

File getProfilePictureUsingGET()

Retrieve user profile picture

Generally returns an image file

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.UserProfileApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

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

Parameters

This endpoint does not need any parameter.

Return type

File

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, /

getProfileUsingGET

UserRepresentation getProfileUsingGET()

Get user profile

This operation returns account information for the current user. This is useful to get the name, email, the groups that the user is part of, the user picture, etc.

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.UserProfileApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

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

Parameters

This endpoint does not need any parameter.

Return type

UserRepresentation

Authorization

basicAuth

HTTP request headers

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

updateProfile

UserRepresentation updateProfile(userRepresentation)

Update user profile

Only a first name, last name, email and company can be updated

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.UserProfileApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

UserProfileApi apiInstance = new UserProfileApi();
UserRepresentation userRepresentation = new UserRepresentation(); // UserRepresentation | userRepresentation
try {
    UserRepresentation result = apiInstance.updateProfile(userRepresentation);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling UserProfileApi#updateProfile");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
userRepresentation UserRepresentation userRepresentation

Return type

UserRepresentation

Authorization

basicAuth

HTTP request headers

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

uploadProfilePictureUsingPOST

ImageUploadRepresentation uploadProfilePictureUsingPOST(file)

Change user profile picture

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.UserProfileApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

UserProfileApi apiInstance = new UserProfileApi();
File file = new File("/path/to/file.txt"); // File | file
try {
    ImageUploadRepresentation result = apiInstance.uploadProfilePictureUsingPOST(file);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling UserProfileApi#uploadProfilePictureUsingPOST");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
file File file

Return type

ImageUploadRepresentation

Authorization

basicAuth

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json