AlgorithmsApi

All URIs are relative to http://127.0.0.1:8000

MethodHTTP requestDescription
algorithmsCreatePOST /api/v1/algorithms
algorithmsDestroyDELETE /api/v1/algorithms/{id}
algorithmsListGET /api/v1/algorithms
algorithmsPartialUpdatePATCH /api/v1/algorithms/{id}
algorithmsPredictPOST /api/v1/algorithms/predict
algorithmsRetrieveGET /api/v1/algorithms/{id}
algorithmsUpdatePUT /api/v1/algorithms/{id}

algorithmsCreate

Algorithm algorithmsCreate(algorithm)

Example

// Import classes:
import org.apache.fineract.credit.scorecard.ApiClient;
import org.apache.fineract.credit.scorecard.ApiException;
import org.apache.fineract.credit.scorecard.Configuration;
import org.apache.fineract.credit.scorecard.models.*;
import org.apache.fineract.credit.scorecard.services.AlgorithmsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://127.0.0.1:8000");

    AlgorithmsApi apiInstance = new AlgorithmsApi(defaultClient);
    Algorithm algorithm = new Algorithm(); // Algorithm | 
    try {
      Algorithm result = apiInstance.algorithmsCreate(algorithm);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AlgorithmsApi#algorithmsCreate");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

NameTypeDescriptionNotes
algorithmAlgorithm

Return type

Algorithm

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
201-

algorithmsDestroy

algorithmsDestroy(id)

Example

// Import classes:
import org.apache.fineract.credit.scorecard.ApiClient;
import org.apache.fineract.credit.scorecard.ApiException;
import org.apache.fineract.credit.scorecard.Configuration;
import org.apache.fineract.credit.scorecard.models.*;
import org.apache.fineract.credit.scorecard.services.AlgorithmsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://127.0.0.1:8000");

    AlgorithmsApi apiInstance = new AlgorithmsApi(defaultClient);
    Integer id = 56; // Integer | A unique integer value identifying this algorithm.
    try {
      apiInstance.algorithmsDestroy(id);
    } catch (ApiException e) {
      System.err.println("Exception when calling AlgorithmsApi#algorithmsDestroy");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

NameTypeDescriptionNotes
idIntegerA unique integer value identifying this algorithm.

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204No response body-

algorithmsList

java.util.List<Algorithm> algorithmsList()

Example

// Import classes:
import org.apache.fineract.credit.scorecard.ApiClient;
import org.apache.fineract.credit.scorecard.ApiException;
import org.apache.fineract.credit.scorecard.Configuration;
import org.apache.fineract.credit.scorecard.models.*;
import org.apache.fineract.credit.scorecard.services.AlgorithmsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://127.0.0.1:8000");

    AlgorithmsApi apiInstance = new AlgorithmsApi(defaultClient);
    try {
      java.util.List<Algorithm> result = apiInstance.algorithmsList();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AlgorithmsApi#algorithmsList");
      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

java.util.List<Algorithm>

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

algorithmsPartialUpdate

Algorithm algorithmsPartialUpdate(id, algorithm)

Example

// Import classes:
import org.apache.fineract.credit.scorecard.ApiClient;
import org.apache.fineract.credit.scorecard.ApiException;
import org.apache.fineract.credit.scorecard.Configuration;
import org.apache.fineract.credit.scorecard.models.*;
import org.apache.fineract.credit.scorecard.services.AlgorithmsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://127.0.0.1:8000");

    AlgorithmsApi apiInstance = new AlgorithmsApi(defaultClient);
    Integer id = 56; // Integer | A unique integer value identifying this algorithm.
    Algorithm algorithm = new Algorithm(); // Algorithm | 
    try {
      Algorithm result = apiInstance.algorithmsPartialUpdate(id, algorithm);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AlgorithmsApi#algorithmsPartialUpdate");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

NameTypeDescriptionNotes
idIntegerA unique integer value identifying this algorithm.
algorithmAlgorithm

Return type

Algorithm

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200-

algorithmsPredict

PredictionResponse algorithmsPredict(classifier, version, dataset, status, requestBody)

Predict credit risk for a loan

Example

// Import classes:
import org.apache.fineract.credit.scorecard.ApiClient;
import org.apache.fineract.credit.scorecard.ApiException;
import org.apache.fineract.credit.scorecard.Configuration;
import org.apache.fineract.credit.scorecard.models.*;
import org.apache.fineract.credit.scorecard.services.AlgorithmsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://127.0.0.1:8000");

    AlgorithmsApi apiInstance = new AlgorithmsApi(defaultClient);
    String classifier = "RandomForestClassifier"; // String | The algorithm/classifier to use
    String version = "0.0.1"; // String | Algorithm version
    String dataset = "german"; // String | The name of the dataset
    String status = "production"; // String | The status of the algorithm
    java.util.Map<String, Object> requestBody = null; // java.util.Map<String, Object> | 
    try {
      PredictionResponse result = apiInstance.algorithmsPredict(classifier, version, dataset, status, requestBody);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AlgorithmsApi#algorithmsPredict");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

NameTypeDescriptionNotes
classifierStringThe algorithm/classifier to use
versionStringAlgorithm version[default to 0.0.1]
datasetStringThe name of the dataset[optional]
statusStringThe status of the algorithm[optional]
requestBodyjava.util.Map<String, Object>[optional]

Return type

PredictionResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200-

algorithmsRetrieve

Algorithm algorithmsRetrieve(id)

Example

// Import classes:
import org.apache.fineract.credit.scorecard.ApiClient;
import org.apache.fineract.credit.scorecard.ApiException;
import org.apache.fineract.credit.scorecard.Configuration;
import org.apache.fineract.credit.scorecard.models.*;
import org.apache.fineract.credit.scorecard.services.AlgorithmsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://127.0.0.1:8000");

    AlgorithmsApi apiInstance = new AlgorithmsApi(defaultClient);
    Integer id = 56; // Integer | A unique integer value identifying this algorithm.
    try {
      Algorithm result = apiInstance.algorithmsRetrieve(id);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AlgorithmsApi#algorithmsRetrieve");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

NameTypeDescriptionNotes
idIntegerA unique integer value identifying this algorithm.

Return type

Algorithm

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

algorithmsUpdate

Algorithm algorithmsUpdate(id, algorithm)

Example

// Import classes:
import org.apache.fineract.credit.scorecard.ApiClient;
import org.apache.fineract.credit.scorecard.ApiException;
import org.apache.fineract.credit.scorecard.Configuration;
import org.apache.fineract.credit.scorecard.models.*;
import org.apache.fineract.credit.scorecard.services.AlgorithmsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://127.0.0.1:8000");

    AlgorithmsApi apiInstance = new AlgorithmsApi(defaultClient);
    Integer id = 56; // Integer | A unique integer value identifying this algorithm.
    Algorithm algorithm = new Algorithm(); // Algorithm | 
    try {
      Algorithm result = apiInstance.algorithmsUpdate(id, algorithm);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AlgorithmsApi#algorithmsUpdate");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

NameTypeDescriptionNotes
idIntegerA unique integer value identifying this algorithm.
algorithmAlgorithm

Return type

Algorithm

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200-