This documentation is for Machine Learner 1.1.0. View documentation for the latest release.
||
Skip to end of metadata
Go to start of metadata

WSO2 Machine Learner 1.1.0 includes revisions made to the REST API since the Machine Learner 1.0.0 release. These modifications include introducing new query parameters, changing path parameters, introducing new APIs etc. However, you can use the previous REST API version if required by making slight  modifications to the URI.

In ML 1.1.0, a user can invoke an API by providing the URI in the following three ways.

MethodExampleOutcome
Without specifying the version.https://localhost:9443/api/configs/algorithms
The latest API version (i.e. v11) is invoked.
Specifying v10 as the versionhttps://localhost:9443/api/v10/configs/algorithms
The v10 API version is invoked.
Specifying V11 as the versionhttps://localhost:9443/api/configs/algorithms
The v11 API version is invoked.

The following are the REST APIs that are implemented in  WSO2 Machine Learner.

EntityOperationREST API
Configuration Retrieve data from WSO2 Data Analytics Server (DAS) tables  GET /api/configs/das/tables
Retrieve all algorithmsGET /api/configs/algorithms
Retrieve a specific algorithmGET /api/configs/algorithms/{algorithmName}
Retrieve hyper parameters of an algorithmGET /api/ configs/algorithms/{algorithmName}/hyperParams
Retrieve summary statistics settings of a datasetGET /api/ configs/summaryStatSettings
Retrieving Information on Whether an Algorithm Supports a Specific Export FormatGET /api/ configs/algorithms/{algorithmName}/exportable?format={exportFormat}
Dataset Upload a datasetPOST /api/ datasets
Retrieve all datasets GET /api/ datasets
Retrieve all datasets and their versions for a given userGET /api/ datasets/versions
Retrieve the dataset of a given dataset IDGET /api/ datasets/{datasetId}
Retrieve all version sets of a dataset GET /api/ datasets/{dataset_id}/versions
Retrieve version set ID of a given dataset versionGET /api/ datasets/{dataset_id}/versions/{version}
Retrieve the dataset status of a given dataset IDGET /api/ datasets/{datasetId}/status
Retrieve a version setGET /api/ datasets/versions/{versionset_id}
Retrieve sample points of a given dataset versionGET /api/ datasets/versions/{versionsetId}/sample
Retrieve scatter plot points of the latest dataset versionPOST /api/ datasets/{datasetId}/scatter
Retrieve scatter plot points of a dataset versionPOST /api/ datasets/{versionset_id}/scatter
Retrieving chart sample points of the latest dataset versionGET /api/ datasets/{datasetId}/charts?features={feature_list}
Retrieve chart sample points of a given dataset version for a feature listGET /api/ datasets/versions/{versionsetId}/charts?features={feature_list}
Retrieve Cluster points of a dataset for a feature listGET /api/ datasets/{dataset_id}/cluster?features={feature_list}&noOfClusters={number_of_clusters}
Retrieve filtered feature names of a datasetGET /api/ datasets/{datasetId}/filteredFeatures ?featureType={featureType}
Retrieve summarized statistics of a feature in a datasetGET /api/ datasets/{dataset_id}/stats?feature={feature_name}
Delete a datasetDELETE /api/ datasets/{dataset_id}
Delete a dataset version of a given dataset ID

DELETE /api/ datasets/versions/{versionsetId}

Project Create a project (with a dataset name) POST /api/ projects
Retrieve a project GET /api/ projects/{name}
Retrieve all projectsGET /api/ projects
Retrieve all models in a projectGET /api/ projects/{project_id}/models
Retrieve all analyses of all projectsGET /api/ projects/analyses
Retrieve all analyses in a projectGET /api/ projects/{project_id}/analyses
Retrieve a specific analysis of a projectGET /api/ projects/{projectId}/analyses/{analysisName}
Delete a project DELETE /api/ projects/{name}
Analysis (Workflow) Create a new analysis POST /api/analyses
Set customized features for an analysis  POST /api/analyses/{id}/features
Load default features as customized features  POST /api/analyses/{id}/features/defaults
Retrieve summarized features of an analysisGET /api/analyses/{analysisId}/summarizedFeatures
Retrieve customized features of an analysisGET /api/analyses/{analysisId}/customizedFeatures
Retrieve configurations of an analysisGET /api/analyses/{analysisId}/configs
Retrieve filtered features of an analysisGET /api/analyses/{analysisId}/filteredFeatures?featureType={featureType}
Retrieve features for an analysis GET /api/analyses/{analysisId}/features
Retrieve response variables of an analysisGET /api/analyses/{analysisId}/responseVariables
Retrieve the algorithm name of an analysisGET /api/analyses/{analysisId}/algorithmName
Retrieve the algorithm type of an analysisGET /api/analyses/{analysisId}/algorithmType
Retrieve the train data fraction of an analysisGET /api/analyses/{analysisId}/trainDataFraction
Retrieve the summarized statistics of an analysisGET /api/analyses/{analysisId}/stats?feature={featureName}
Set analysis configurations (e.g. algorithm type)  POST /api/analyses/{id}/configurations
Setting hyper parameters for the selected algorithm of an analysis POST /api/analyses/{id}/hyperParams
Retrieve hyper parameters of an analysisGET /api/analyses/{analysisId}/hyperParameters
Loading default hyper parameters for the selected algorithm of an analysis POST /api/analyses/{id}/hyperParams/defaults
Retrieve all analyses  GET /api/analyses
Retrieve all models of an analysisGET /api/analyses/{analysisId}/models
Delete an analysisDELETE /api/analyses/{id}
Model Create a model POST /api/models
Add model storage informationPOST /api/models/{id}/storages
Publish a modelPOST /api/models/{id}/publish
Make a prediction using a model POST /api/models/predict
Make prediction using a CSV/TSV filePOST /api/models/predictionStreams
Predict with a model POST /api/models/{id}/predict  
Retrieve a model GET /api/models/{name}
Retrieve all models GET /api/models
Delete a model DELETE /api/models/{id}
Retrieve summary of a modelGET /api/models/{modelId}/summary
Export a modelGET /api/models/{name}/export
Build a modelPOST /api/models/{id}
Retrieving User Recommendations via REST APIapi/models/{modelId}/user-recommendations?productId={product-id}&noOfUsers={no-of-users}
Retrieving Product Recommendations via REST APIapi/models/{modelId}/product-recommendations?userId={user-id}&noOfProducts={no-of-products}
EntityOperationREST API
Configuration Retrieve data from WSO2 Data Analytics Server (DAS) tables   GET /api/v10/configs/das/tables
Retrieve all algorithmsGET /api/v10/configs/algorithms
Retrieve a specific algorithmGET /api/v10/configs/algorithms/{algorithmName}
Retrieve hyper parameters of an algorithmGET /api/v10/configs/algorithms/{algorithmName}/hyperParams
Retrieve summary statistics settings of a datasetGET /api/v10/configs/summaryStatSettings
Dataset Upload a datasetPOST /api/v10/datasets
Retrieve all datasets GET /api/v10/datasets
Retrieve all datasets and their versions for a given userGET /api/v10/datasets/versions
Retrieve the dataset of a given dataset IDGET /api/v10/datasets/{datasetId}
Retrieve all version sets of a dataset GET /api/v10/datasets/{dataset_id}/versions
Retrieve version set ID of a given dataset versionGET /api/v10/datasets/{dataset_id}/versions/{version}
Retrieve the dataset status of a given dataset IDGET /api/v10/datasets/{datasetId}/status
Retrieve a version setGET /api/v10/datasets/versions/{versionset_id}
Retrieve sample points of a given dataset versionGET /api/v10/datasets/versions/{versionsetId}/sample
Retrieve scatter plot points of the latest dataset versionPOST /api/v10/datasets/{datasetId}/scatter
Retrieve scatter plot points of a dataset versionPOST /api/v10/datasets/{versionset_id}/scatter
Retrieving chart sample points of the latest dataset versionGET /api/v10/datasets/{datasetId}/charts?features={feature_list}
Retrieve chart sample points of a given dataset version for a feature listGET /api/v10/datasets/versions/{versionsetId}/charts?features={feature_list}
Retrieve Cluster points of a dataset for a feature listGET /api/v10/datasets/{dataset_id}/cluster?features={feature_list}&noOfClusters={number_of_clusters}
Retrieve filtered feature names of a datasetGET /api/v10/datasets/{datasetId}/filteredFeatures ?featureType={featureType}
Retrieve summarized statistics of a feature in a datasetGET /api/v10/datasets/{dataset_id}/stats?feature={feature_name}
Delete a datasetDELETE  /api/v10/datasets/{dataset_id}
Delete a dataset version of a given dataset ID

DELETE /api/v10/datasets/versions/{versionsetId}

Project Create a project (with a dataset name) POST /api/v10/projects
Retrieve a project GET /api/v10/projects/{name}
Retrieve all projectsGET /api/v10/projects
Retrieve all models in a projectGET /api/v10/projects/{project_id}/models
Retrieve all analyses of all projectsGET /api/v10/projects/analyses
Retrieve all analyses in a projectGET /api/v10/{project_id}/analyses
Retrieve a specific analysis of a projectGET /api/v10/projects/{projectId}/analyses/{analysisName}
Delete a project DELETE /api/v10/projects/{name}
Analysis (Workflow) Create a new analysis POST /api/v10/analyses
Set customized features for an analysis   POST /api/v10/analyses/{id}/features
Load default features as customized featuresPOST /api/v10/ analyses/{id}/features/defaults
Retrieve summarized features of an analysisGET /api/v10/analyses/{analysisId}/summarizedFeatures
Retrieve customized features of an analysisGET /api/v10/analyses/{analysisId}/customizedFeatures
Retrieve configurations of an analysisGET /api/v10/analyses/{analysisId}/configs
Retrieve filtered features of an analysisGET /api/v10/analyses/{analysisId}/filteredFeatures?featureType={featureType}
Retrieve features for an analysis GET /api/v10/analyses/{analysisId}/features
Retrieve response variables of an analysisGET /api/v10/analyses/{analysisId}/responseVariables
Retrieve the algorithm name of an analysisGET /api/v10/analyses/{analysisId}/algorithmName
Retrieve the algorithm type of an analysisGET /api/v10/analyses/{analysisId}/algorithmType
Retrieve the train data fraction of an analysisGET /api/v10/analyses/{analysisId}/trainDataFraction
Retrieve the summarized statistics of an analysisGET /api/v10/analyses/{analysisId}/stats?feature={featureName}
Set analysis configurations (e.g. algorithm type)   POST /api/v10/analyses/{id}/configurations
Setting hyper parameters for the selected algorithm of an analysis POST /api/v10/analyses/{id}/hyperParams
Retrieve hyper parameters of an analysisGET /api/v10/analyses/{analysisId}/hyperParameters
Loading default hyper parameters for the selected algorithm of an analysis POST /api/v10/ analyses/{id}/hyperParams/defaults
Retrieve all analyses   GET /api/v10/analyses
Retrieve all models of an analysisGET /api/v10/analyses/{analysisId}/models
Delete an analysisDELETE /api/v10/ analyses/{id}
Model Create a model POST /api/v10/models
Add model storage informationPOST /api/v10/models/{id}/storages
Publish a modelPOST /api/v10/models/{id}/publish
Make a prediction using a model POST /api/v10/models/predict
Make prediction using a CSV/TSV filePOST /api/v10/models/predictionStreams
Predict with a modelPOST /api/v10/models/{id}/predict  
Retrieve a model GET /api/v10/models/{name}
Retrieve all models GET /api/v10/models
Delete a model DELETE /api/v10/ models/{id}
Retrieve summary of a modelGET /api/v10/models/{modelId}/summary
Export a modelGET /api/v10/models/{name}/export
Build a modelPOST /api/v10/models/{id}

The REST APIs are secured with basic authentication. Therefore, follow the steps below to add a basic auth header when calling these methods.

  1. Build a string of the form username:password.
  2. Encode the sting you created above using Base64. For encoding the above string using Base64, see Encode to Base64 format.
  3. Define an authorization header with the term "Basic_", followed by the encoded string. For example, the basic auth authorization header using "admin" as both username and password is as follows: 
    Authorization: Basic YWRtaW46YWRtaW4=
  • No labels