Skip to content

Latest commit

 

History

History
254 lines (173 loc) · 5.58 KB

File metadata and controls

254 lines (173 loc) · 5.58 KB

AuthenticationApi

All URIs are relative to https://app.statflo.com

Method HTTP request Description
authMe GET /v4/api/auth/me
login POST /v4/api/auth/login
logout GET /v4/api/auth/logout
switchDealer GET /v4/api/auth/switch
switchDealerPost POST /v4/api/auth/switch

authMe

User authMe()

Get currently logged in user.

Example

// Import classes:
//import com.statflo.client.ApiClient;
//import com.statflo.client.ApiException;
//import com.statflo.client.Configuration;
//import com.statflo.client.auth.*;
//import com.statflo.client.api.AuthenticationApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();


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

Parameters

This endpoint does not need any parameter.

Return type

User

Authorization

Bearer

HTTP request headers

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

login

InlineResponse200 login(body)

Log in.

Example

// Import classes:
//import com.statflo.client.ApiClient;
//import com.statflo.client.ApiException;
//import com.statflo.client.Configuration;
//import com.statflo.client.auth.*;
//import com.statflo.client.api.AuthenticationApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();


AuthenticationApi apiInstance = new AuthenticationApi();
AuthLoginBody body = new AuthLoginBody(); // AuthLoginBody | 
try {
    InlineResponse200 result = apiInstance.login(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AuthenticationApi#login");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body AuthLoginBody [optional]

Return type

InlineResponse200

Authorization

Bearer

HTTP request headers

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

logout

logout()

Log out.

Example

// Import classes:
//import com.statflo.client.ApiClient;
//import com.statflo.client.ApiException;
//import com.statflo.client.Configuration;
//import com.statflo.client.auth.*;
//import com.statflo.client.api.AuthenticationApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();


AuthenticationApi apiInstance = new AuthenticationApi();
try {
    apiInstance.logout();
} catch (ApiException e) {
    System.err.println("Exception when calling AuthenticationApi#logout");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

switchDealer

switchDealer(dealerId, roleId)

Switch active dealer.

Example

// Import classes:
//import com.statflo.client.ApiClient;
//import com.statflo.client.ApiException;
//import com.statflo.client.Configuration;
//import com.statflo.client.auth.*;
//import com.statflo.client.api.AuthenticationApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();


AuthenticationApi apiInstance = new AuthenticationApi();
Integer dealerId = 56; // Integer | 
Integer roleId = 56; // Integer | 
try {
    apiInstance.switchDealer(dealerId, roleId);
} catch (ApiException e) {
    System.err.println("Exception when calling AuthenticationApi#switchDealer");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
dealerId Integer [optional]
roleId Integer [optional]

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

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

switchDealerPost

User switchDealerPost(body)

Switch active dealer.

Example

// Import classes:
//import com.statflo.client.ApiClient;
//import com.statflo.client.ApiException;
//import com.statflo.client.Configuration;
//import com.statflo.client.auth.*;
//import com.statflo.client.api.AuthenticationApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();


AuthenticationApi apiInstance = new AuthenticationApi();
AuthSwitchBody body = new AuthSwitchBody(); // AuthSwitchBody | 
try {
    User result = apiInstance.switchDealerPost(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AuthenticationApi#switchDealerPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body AuthSwitchBody [optional]

Return type

User

Authorization

Bearer

HTTP request headers

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