Skip to content

Latest commit

 

History

History
675 lines (522 loc) · 23.1 KB

AuthenticationUsersApi.md

File metadata and controls

675 lines (522 loc) · 23.1 KB

AuthenticationUsersApi

All URIs are relative to https://api.reveng.ai

Method HTTP request Description
getUser GET /v2/users/{user_id} Get a user's public information
getUserActivity GET /v2/users/activity Get auth user activity
submitUserFeedback POST /v2/users/feedback Submit feedback about the application
v3GetUser GET /v3/users/{user_id} Get a user's public information
v3GetUserActivity GET /v3/users/activity Get the caller's activity feed
v3ListPrincipals GET /v3/principals Search users and teams
v3ListTeams GET /v3/teams Search teams
v3ListUsers GET /v3/users Search users
v3SubmitUserFeedback POST /v3/users/feedback Submit feedback

getUser

BaseResponseGetPublicUserResponse getUser(userId)

Get a user's public information

Example

// Import classes:
import ai.reveng.invoker.ApiClient;
import ai.reveng.invoker.ApiException;
import ai.reveng.invoker.Configuration;
import ai.reveng.invoker.auth.*;
import ai.reveng.invoker.models.*;
import ai.reveng.api.AuthenticationUsersApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.reveng.ai");
    
    // Configure API key authorization: APIKey
    ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey");
    APIKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKey.setApiKeyPrefix("Token");

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

    AuthenticationUsersApi apiInstance = new AuthenticationUsersApi(defaultClient);
    Integer userId = 56; // Integer | 
    try {
      BaseResponseGetPublicUserResponse result = apiInstance.getUser(userId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AuthenticationUsersApi#getUser");
      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 Integer

Return type

BaseResponseGetPublicUserResponse

Authorization

APIKey, bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Invalid request parameters -

getUserActivity

BaseResponseListUserActivityResponse getUserActivity()

Get auth user activity

Example

// Import classes:
import ai.reveng.invoker.ApiClient;
import ai.reveng.invoker.ApiException;
import ai.reveng.invoker.Configuration;
import ai.reveng.invoker.auth.*;
import ai.reveng.invoker.models.*;
import ai.reveng.api.AuthenticationUsersApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.reveng.ai");
    
    // Configure API key authorization: APIKey
    ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey");
    APIKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKey.setApiKeyPrefix("Token");

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

    AuthenticationUsersApi apiInstance = new AuthenticationUsersApi(defaultClient);
    try {
      BaseResponseListUserActivityResponse result = apiInstance.getUserActivity();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AuthenticationUsersApi#getUserActivity");
      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

BaseResponseListUserActivityResponse

Authorization

APIKey, bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Invalid request parameters -

submitUserFeedback

BaseResponse submitUserFeedback(submitUserFeedbackRequest)

Submit feedback about the application

Submits feedback about the application and forwards it to the RevEng.ai project management tool.

Example

// Import classes:
import ai.reveng.invoker.ApiClient;
import ai.reveng.invoker.ApiException;
import ai.reveng.invoker.Configuration;
import ai.reveng.invoker.auth.*;
import ai.reveng.invoker.models.*;
import ai.reveng.api.AuthenticationUsersApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.reveng.ai");
    
    // Configure API key authorization: APIKey
    ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey");
    APIKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKey.setApiKeyPrefix("Token");

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

    AuthenticationUsersApi apiInstance = new AuthenticationUsersApi(defaultClient);
    SubmitUserFeedbackRequest submitUserFeedbackRequest = new SubmitUserFeedbackRequest(); // SubmitUserFeedbackRequest | 
    try {
      BaseResponse result = apiInstance.submitUserFeedback(submitUserFeedbackRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AuthenticationUsersApi#submitUserFeedback");
      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
submitUserFeedbackRequest SubmitUserFeedbackRequest

Return type

BaseResponse

Authorization

APIKey, bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Invalid request parameters -

v3GetUser

GetPublicUserOutputBody v3GetUser(userId)

Get a user's public information

Returns a user's username. Any authenticated caller may look up any user by ID. Error codes: - `404` `NOT_FOUND` — Not Found

Example

// Import classes:
import ai.reveng.invoker.ApiClient;
import ai.reveng.invoker.ApiException;
import ai.reveng.invoker.Configuration;
import ai.reveng.invoker.auth.*;
import ai.reveng.invoker.models.*;
import ai.reveng.api.AuthenticationUsersApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.reveng.ai");
    
    // Configure API key authorization: APIKey
    ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey");
    APIKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKey.setApiKeyPrefix("Token");

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

    AuthenticationUsersApi apiInstance = new AuthenticationUsersApi(defaultClient);
    Long userId = 56L; // Long | User ID
    try {
      GetPublicUserOutputBody result = apiInstance.v3GetUser(userId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AuthenticationUsersApi#v3GetUser");
      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 Long User ID

Return type

GetPublicUserOutputBody

Authorization

APIKey, bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -

v3GetUserActivity

GetUserActivityOutputBody v3GetUserActivity()

Get the caller's activity feed

Returns the caller's own recent activity, their team's, and everyone's public activity, newest first.

Example

// Import classes:
import ai.reveng.invoker.ApiClient;
import ai.reveng.invoker.ApiException;
import ai.reveng.invoker.Configuration;
import ai.reveng.invoker.auth.*;
import ai.reveng.invoker.models.*;
import ai.reveng.api.AuthenticationUsersApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.reveng.ai");
    
    // Configure API key authorization: APIKey
    ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey");
    APIKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKey.setApiKeyPrefix("Token");

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

    AuthenticationUsersApi apiInstance = new AuthenticationUsersApi(defaultClient);
    try {
      GetUserActivityOutputBody result = apiInstance.v3GetUserActivity();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AuthenticationUsersApi#v3GetUserActivity");
      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

GetUserActivityOutputBody

Authorization

APIKey, bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
0 Error -

v3ListPrincipals

ListPrincipalsOutputBody v3ListPrincipals(searchTerm)

Search users and teams

Returns up to 5 matching users and up to 5 matching teams whose name contains the search term (case-insensitive), scoped to the caller's organisation using the same rules as the individual user and team search endpoints.

Example

// Import classes:
import ai.reveng.invoker.ApiClient;
import ai.reveng.invoker.ApiException;
import ai.reveng.invoker.Configuration;
import ai.reveng.invoker.auth.*;
import ai.reveng.invoker.models.*;
import ai.reveng.api.AuthenticationUsersApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.reveng.ai");
    
    // Configure API key authorization: APIKey
    ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey");
    APIKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKey.setApiKeyPrefix("Token");

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

    AuthenticationUsersApi apiInstance = new AuthenticationUsersApi(defaultClient);
    String searchTerm = "searchTerm_example"; // String | Text the user's username or team's name contains (case-insensitive)
    try {
      ListPrincipalsOutputBody result = apiInstance.v3ListPrincipals(searchTerm);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AuthenticationUsersApi#v3ListPrincipals");
      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
searchTerm String Text the user's username or team's name contains (case-insensitive)

Return type

ListPrincipalsOutputBody

Authorization

APIKey, bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
0 Error -

v3ListTeams

ListTeamsOutputBody v3ListTeams(searchTerm)

Search teams

Returns up to 5 teams whose name contains the search term (case-insensitive). Returns every team in the caller's organisation, or — if the organisation is named "Internal" — only the teams the caller belongs to.

Example

// Import classes:
import ai.reveng.invoker.ApiClient;
import ai.reveng.invoker.ApiException;
import ai.reveng.invoker.Configuration;
import ai.reveng.invoker.auth.*;
import ai.reveng.invoker.models.*;
import ai.reveng.api.AuthenticationUsersApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.reveng.ai");
    
    // Configure API key authorization: APIKey
    ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey");
    APIKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKey.setApiKeyPrefix("Token");

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

    AuthenticationUsersApi apiInstance = new AuthenticationUsersApi(defaultClient);
    String searchTerm = "searchTerm_example"; // String | Text the team name contains (case-insensitive)
    try {
      ListTeamsOutputBody result = apiInstance.v3ListTeams(searchTerm);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AuthenticationUsersApi#v3ListTeams");
      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
searchTerm String Text the team name contains (case-insensitive)

Return type

ListTeamsOutputBody

Authorization

APIKey, bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
0 Error -

v3ListUsers

ListPublicUsersOutputBody v3ListUsers(searchTerm)

Search users

Returns up to 5 active users in the caller's organisation whose username contains the search term (case-insensitive), with their ID and username, ordered by username.

Example

// Import classes:
import ai.reveng.invoker.ApiClient;
import ai.reveng.invoker.ApiException;
import ai.reveng.invoker.Configuration;
import ai.reveng.invoker.auth.*;
import ai.reveng.invoker.models.*;
import ai.reveng.api.AuthenticationUsersApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.reveng.ai");
    
    // Configure API key authorization: APIKey
    ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey");
    APIKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKey.setApiKeyPrefix("Token");

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

    AuthenticationUsersApi apiInstance = new AuthenticationUsersApi(defaultClient);
    String searchTerm = "searchTerm_example"; // String | Text the username contains (case-insensitive)
    try {
      ListPublicUsersOutputBody result = apiInstance.v3ListUsers(searchTerm);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AuthenticationUsersApi#v3ListUsers");
      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
searchTerm String Text the username contains (case-insensitive)

Return type

ListPublicUsersOutputBody

Authorization

APIKey, bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
0 Error -

v3SubmitUserFeedback

SubmitFeedbackOutputBody v3SubmitUserFeedback(submitFeedbackBody)

Submit feedback

Submits feedback about the application to a Slack channel. Error codes: - `404` `NOT_FOUND` — Not Found

Example

// Import classes:
import ai.reveng.invoker.ApiClient;
import ai.reveng.invoker.ApiException;
import ai.reveng.invoker.Configuration;
import ai.reveng.invoker.auth.*;
import ai.reveng.invoker.models.*;
import ai.reveng.api.AuthenticationUsersApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.reveng.ai");
    
    // Configure API key authorization: APIKey
    ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey");
    APIKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKey.setApiKeyPrefix("Token");

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

    AuthenticationUsersApi apiInstance = new AuthenticationUsersApi(defaultClient);
    SubmitFeedbackBody submitFeedbackBody = new SubmitFeedbackBody(); // SubmitFeedbackBody | 
    try {
      SubmitFeedbackOutputBody result = apiInstance.v3SubmitUserFeedback(submitFeedbackBody);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AuthenticationUsersApi#v3SubmitUserFeedback");
      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
submitFeedbackBody SubmitFeedbackBody

Return type

SubmitFeedbackOutputBody

Authorization

APIKey, bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -