Skip to content

Latest commit

 

History

History
221 lines (169 loc) · 7.24 KB

UserProfileApi.md

File metadata and controls

221 lines (169 loc) · 7.24 KB

UserProfileApi

All URIs are relative to http://localhost

Method HTTP request Description
userProfileGetMyProfile GET /api/manage/v1/UserProfile Return current profile of the current user
userProfileGetUserProfile GET /api/manage/v1/UserProfile/{userId} Return user profile by user identifier. If the user did not provide information about himself or blocked, then the endpoint will return an empty model. (only id)
userProfileUpdateMyProfile PUT /api/manage/v1/UserProfile Update profile of the current user

userProfileGetMyProfile

UserProfileVM userProfileGetMyProfile()

Return current profile of the current user

Example

// Import classes:
import cloud.fastreport.ApiClient;
import cloud.fastreport.ApiException;
import cloud.fastreport.Configuration;
import cloud.fastreport.auth.*;
import cloud.fastreport.models.*;
import cloud.fastreport.client.UserProfileApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure HTTP basic authorization: ApiKey
    HttpBasicAuth ApiKey = (HttpBasicAuth) defaultClient.getAuthentication("ApiKey");
    ApiKey.setUsername("YOUR USERNAME");
    ApiKey.setPassword("YOUR PASSWORD");

    // Configure HTTP bearer authorization: JWT
    HttpBearerAuth JWT = (HttpBearerAuth) defaultClient.getAuthentication("JWT");
    JWT.setBearerToken("BEARER TOKEN");

    UserProfileApi apiInstance = new UserProfileApi(defaultClient);
    try {
      UserProfileVM result = apiInstance.userProfileGetMyProfile();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling UserProfileApi#userProfileGetMyProfile");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

This endpoint does not need any parameter.

Return type

UserProfileVM

Authorization

ApiKey, JWT

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Succesfully returned -

userProfileGetUserProfile

UserProfileVM userProfileGetUserProfile(userId)

Return user profile by user identifier. If the user did not provide information about himself or blocked, then the endpoint will return an empty model. (only id)

Example

// Import classes:
import cloud.fastreport.ApiClient;
import cloud.fastreport.ApiException;
import cloud.fastreport.Configuration;
import cloud.fastreport.auth.*;
import cloud.fastreport.models.*;
import cloud.fastreport.client.UserProfileApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure HTTP basic authorization: ApiKey
    HttpBasicAuth ApiKey = (HttpBasicAuth) defaultClient.getAuthentication("ApiKey");
    ApiKey.setUsername("YOUR USERNAME");
    ApiKey.setPassword("YOUR PASSWORD");

    // Configure HTTP bearer authorization: JWT
    HttpBearerAuth JWT = (HttpBearerAuth) defaultClient.getAuthentication("JWT");
    JWT.setBearerToken("BEARER TOKEN");

    UserProfileApi apiInstance = new UserProfileApi(defaultClient);
    String userId = "userId_example"; // String | 
    try {
      UserProfileVM result = apiInstance.userProfileGetUserProfile(userId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling UserProfileApi#userProfileGetUserProfile");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
userId String

Return type

UserProfileVM

Authorization

ApiKey, JWT

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Succesfully returned -
404 User not found -

userProfileUpdateMyProfile

userProfileUpdateMyProfile(updateUserProfileVM)

Update profile of the current user

This method is only allowed for local sign in via intranet

Example

// Import classes:
import cloud.fastreport.ApiClient;
import cloud.fastreport.ApiException;
import cloud.fastreport.Configuration;
import cloud.fastreport.auth.*;
import cloud.fastreport.models.*;
import cloud.fastreport.client.UserProfileApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure HTTP basic authorization: ApiKey
    HttpBasicAuth ApiKey = (HttpBasicAuth) defaultClient.getAuthentication("ApiKey");
    ApiKey.setUsername("YOUR USERNAME");
    ApiKey.setPassword("YOUR PASSWORD");

    // Configure HTTP bearer authorization: JWT
    HttpBearerAuth JWT = (HttpBearerAuth) defaultClient.getAuthentication("JWT");
    JWT.setBearerToken("BEARER TOKEN");

    UserProfileApi apiInstance = new UserProfileApi(defaultClient);
    UpdateUserProfileVM updateUserProfileVM = new UpdateUserProfileVM(); // UpdateUserProfileVM | 
    try {
      apiInstance.userProfileUpdateMyProfile(updateUserProfileVM);
    } catch (ApiException e) {
      System.err.println("Exception when calling UserProfileApi#userProfileUpdateMyProfile");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
updateUserProfileVM UpdateUserProfileVM [optional]

Return type

null (empty response body)

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 No Content -
400 The reqeust is wrong -
200 Succesfully updated -