org.wso2.carbon.ml.rest.api

## Class DatasetApiV10

- java.lang.Object
- - org.wso2.carbon.ml.rest.api.MLRestAPI
  - - org.wso2.carbon.ml.rest.api.DatasetApiV10

-     public class DatasetApiV10
      extends MLRestAPI

  This class defines the ML dataset API.

- - ### Field Summary

    - ### Fields inherited from class org.wso2.carbon.ml.rest.api.MLRestAPI

      `auditLog`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DatasetApiV10()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.ws.rs.core.Response` | `deleteDataset(long datasetId)` Delete the dataset for a given dataset ID.
    `javax.ws.rs.core.Response` | `deleteDatasetVersion(long versionsetId)` Delete the dataset version for a given dataset version ID.
    `javax.ws.rs.core.Response` | `getAllDatasets(String status)` Get all datasets of this tenant and user.
    `javax.ws.rs.core.Response` | `getAllDatasetVersions()` Get all datasets with their versions.
    `javax.ws.rs.core.Response` | `getAllVersionsets(long datasetId)` Get all versions of a dataset.
    `javax.ws.rs.core.Response` | `getChartSamplePoints(long versionsetId, String featureListString)` Get chart sample points of a dataset version.
    `javax.ws.rs.core.Response` | `getChartSamplePointsOfLatestVersion(long datasetId, String featureListString)` Get chart sample points of the latest version of a dataset.
    `javax.ws.rs.core.Response` | `getClusterPoints(long datasetId, String featureListString, int noOfClusters)` Get cluster points of a dataset version.
    `javax.ws.rs.core.Response` | `getDataset(long datasetId)` Get the dataset of a given dataset ID.
    `javax.ws.rs.core.Response` | `getDatasetStatus(long datasetId)` Get the status of a dataset.
    `javax.ws.rs.core.Response` | `getFilteredFeatures(long datasetId, String featureType)` Get filtered feature names of a dataset.
    `javax.ws.rs.core.Response` | `getSamplePoints(long versionsetId)` Get sample points of a dataset version.
    `javax.ws.rs.core.Response` | `getScatterPlotPoints(long versionsetId, org.wso2.carbon.ml.commons.domain.ScatterPlotPoints scatterPlotPoints)` Get scatter plot points of a dataset version.
    `javax.ws.rs.core.Response` | `getScatterPlotPointsOfLatestVersion(long datasetId, org.wso2.carbon.ml.commons.domain.ScatterPlotPoints scatterPlotPoints)` Get scatter plot points of the latest version of a dataset.
    `javax.ws.rs.core.Response` | `getSummaryStatistics(long datasetId, String featureName)` Get summary statistics of a dataset feature.
    `javax.ws.rs.core.Response` | `getVersionset(long versionsetId)` Get dataset version for a given dataset version ID.
    `javax.ws.rs.core.Response` | `getVersionset(long datasetId, String version)` Get dataset version for a given dataset ID and version.
    `javax.ws.rs.core.Response` | `options()`
    `javax.ws.rs.core.Response` | `uploadDataset(String datasetName, String version, String description, String sourceType, String destination, String sourcePath, String dataFormat, boolean containsHeader, InputStream inputStream)` Upload a new dataset.

    - ### Methods inherited from class org.wso2.carbon.ml.rest.api.MLRestAPI

      `getTenantID`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DatasetApiV10

          public DatasetApiV10()

  - ### Method Detail

    - #### options

          public javax.ws.rs.core.Response options()

    - #### uploadDataset

          public javax.ws.rs.core.Response uploadDataset(String datasetName,
                                                String version,
                                                String description,
                                                String sourceType,
                                                String destination,
                                                String sourcePath,
                                                String dataFormat,
                                                boolean containsHeader,
                                                InputStream inputStream)

      Upload a new dataset.
      Parameters:
        `datasetName` - Name of the dataset
        `version` - Version of the dataset
        `description` - Description of the dataset
        `sourceType` - Storage type of the source of the dataset (file/HDFS/WSO2 DAS)
        `destination` - Storage type of the server side copy of the dataset (file/HDFS)
        `sourcePath` - Absolute URI of the dataset if source type is DAS
        `dataFormat` - Format of the dataset
        `containsHeader` - Header availability of the dataset
        `inputStream` - Input stream of the dataset
      Returns:
        JSON of `MLDataset` object

    - #### getAllDatasets

          public javax.ws.rs.core.Response getAllDatasets(String status)

      Get all datasets of this tenant and user.
      Parameters:
        `status` - Status of the dataset
      Returns:
        JSON array of `MLDatasetBean` objects

    - #### getAllDatasetVersions

          public javax.ws.rs.core.Response getAllDatasetVersions()

      Get all datasets with their versions.
      Returns:
        JSON array of `MLDatasetBean` objects

    - #### getDataset

          public javax.ws.rs.core.Response getDataset(long datasetId)

      Get the dataset of a given dataset ID.
      Parameters:
        `datasetId` - ID of the dataset
      Returns:
        JSON of `MLDataset` object

    - #### getDatasetStatus

          public javax.ws.rs.core.Response getDatasetStatus(long datasetId)

      Get the status of a dataset.
      Parameters:
        `datasetId` - ID of the dataset
      Returns:
        JSON string of the dataset status

    - #### getAllVersionsets

          public javax.ws.rs.core.Response getAllVersionsets(long datasetId)

      Get all versions of a dataset.
      Parameters:
        `datasetId` - ID of the dataset
      Returns:
        JSON array of `MLDatasetVersion` objects

    - #### getVersionset

          public javax.ws.rs.core.Response getVersionset(long datasetId,
                                                String version)

      Get dataset version for a given dataset ID and version.
      Parameters:
        `datasetId` - ID of the dataset
        `version` - Version of the dataset
      Returns:
        JSON of `MLDatasetVersion` object

    - #### getVersionset

          public javax.ws.rs.core.Response getVersionset(long versionsetId)

      Get dataset version for a given dataset version ID.
      Parameters:
        `versionsetId` - ID of the dataset version
      Returns:
        JSON of `MLDatasetVersion` object

    - #### getSamplePoints

          public javax.ws.rs.core.Response getSamplePoints(long versionsetId)

      Get sample points of a dataset version.
      Parameters:
        `versionsetId` - ID of the dataset version
      Returns:
        JSON of `SamplePoints` object

    - #### getScatterPlotPointsOfLatestVersion

          public javax.ws.rs.core.Response getScatterPlotPointsOfLatestVersion(long datasetId,
                                                                      org.wso2.carbon.ml.commons.domain.ScatterPlotPoints scatterPlotPoints)

      Get scatter plot points of the latest version of a dataset.
      Parameters:
        `datasetId` - ID of the dataset
        `scatterPlotPoints` - Scatter plot features
      Returns:
        JSON array of scatter plot points

    - #### getScatterPlotPoints

          public javax.ws.rs.core.Response getScatterPlotPoints(long versionsetId,
                                                       org.wso2.carbon.ml.commons.domain.ScatterPlotPoints scatterPlotPoints)

      Get scatter plot points of a dataset version.
      Parameters:
        `versionsetId` - ID of the dataset version
        `scatterPlotPoints` - Scatter plot features
      Returns:
        JSON array of scatter plot points

    - #### getChartSamplePointsOfLatestVersion

          public javax.ws.rs.core.Response getChartSamplePointsOfLatestVersion(long datasetId,
                                                                      String featureListString)

      Get chart sample points of the latest version of a dataset.
      Parameters:
        `datasetId` - ID of the dataset
        `featureListString` - List of features (single string containing comma separated features)
      Returns:
        JSON array of chart sample points

    - #### getChartSamplePoints

          public javax.ws.rs.core.Response getChartSamplePoints(long versionsetId,
                                                       String featureListString)

      Get chart sample points of a dataset version.
      Parameters:
        `versionsetId` - ID of the dataset version
        `featureListString` - List of features (single string containing comma separated features)
      Returns:
        JSON array of chart sample points

    - #### getClusterPoints

          public javax.ws.rs.core.Response getClusterPoints(long datasetId,
                                                   String featureListString,
                                                   int noOfClusters)

      Get cluster points of a dataset version.
      Parameters:
        `datasetId` - ID of the dataset
        `featureListString` - List of features (single string containing comma separated features)
        `noOfClusters` - No of clusters
      Returns:
        JSON array of `ClusterPoint` objects

    - #### getFilteredFeatures

          public javax.ws.rs.core.Response getFilteredFeatures(long datasetId,
                                                      String featureType)

      Get filtered feature names of a dataset.
      Parameters:
        `datasetId` - ID of the dataset
        `featureType` - Feature type
      Returns:
        JSON array of features

    - #### getSummaryStatistics

          public javax.ws.rs.core.Response getSummaryStatistics(long datasetId,
                                                       String featureName)

      Get summary statistics of a dataset feature.
      Parameters:
        `datasetId` - ID of the dataset
        `featureName` - Name of the feature
      Returns:
        JSON of summary string

    - #### deleteDataset

          public javax.ws.rs.core.Response deleteDataset(long datasetId)

      Delete the dataset for a given dataset ID.
      Parameters:
        `datasetId` - ID of the dataset

    - #### deleteDatasetVersion

          public javax.ws.rs.core.Response deleteDatasetVersion(long versionsetId)

      Delete the dataset version for a given dataset version ID.
      Parameters:
        `versionsetId` - ID of the dataset version

Copyright © 2017 WSO2, Inc.. All Rights Reserved.