org.wso2.carbon.ml.rest.api

## Class ProjectApiV10

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

-     public class ProjectApiV10
      extends MLRestAPI

  This class is to handle REST verbs GET , POST and DELETE.

- - ### Field Summary

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

      `auditLog`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProjectApiV10()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.ws.rs.core.Response` | `createProject(org.wso2.carbon.ml.commons.domain.MLProject project)` Create a new Project.
    `javax.ws.rs.core.Response` | `deleteProject(long projectId)` Delete a project
    `javax.ws.rs.core.Response` | `getAllAnalysesOfProject(long projectId)` Get all analyses of a project
    `javax.ws.rs.core.Response` | `getAllProjects()` Get all projects
    `javax.ws.rs.core.Response` | `getAllProjectsWithAnalyses(String datasetName)` Get all projects created with the given dataset
    `javax.ws.rs.core.Response` | `getAnalysisOfProject(long projectId, String analysisName)` Get analysis of a project given the analysis name
    `javax.ws.rs.core.Response` | `getProject(String projectName)` Get project by project name
    `javax.ws.rs.core.Response` | `getProjectModels(long projectId)` Get all models of a project
    `javax.ws.rs.core.Response` | `options()`

    - ### 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

    - #### ProjectApiV10

          public ProjectApiV10()

  - ### Method Detail

    - #### options

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

    - #### createProject

          public javax.ws.rs.core.Response createProject(org.wso2.carbon.ml.commons.domain.MLProject project)

      Create a new Project. No validation happens here. Please call `getProject(String)` before this.
      Parameters:
        `project` - `MLProject` object

    - #### getProject

          public javax.ws.rs.core.Response getProject(String projectName)

      Get project by project name
      Parameters:
        `projectName` - Name of the project
      Returns:
        JSON of `MLProject` object

    - #### getAllProjects

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

      Get all projects
      Returns:
        JSON array of `MLProject` objects

    - #### getProjectModels

          public javax.ws.rs.core.Response getProjectModels(long projectId)

      Get all models of a project
      Parameters:
        `projectId` - Unique id of the project
      Returns:
        JSON array of `MLModelData` objects

    - #### getAllProjectsWithAnalyses

          public javax.ws.rs.core.Response getAllProjectsWithAnalyses(String datasetName)

      Get all projects created with the given dataset
      Parameters:
        `datasetName` - Name of the dataset
      Returns:
        JSON array of `MLProjectBean` objects

    - #### getAllAnalysesOfProject

          public javax.ws.rs.core.Response getAllAnalysesOfProject(long projectId)

      Get all analyses of a project
      Parameters:
        `projectId` - Unique id of the project
      Returns:
        A JSON array of `MLAnalysis` objects

    - #### getAnalysisOfProject

          public javax.ws.rs.core.Response getAnalysisOfProject(long projectId,
                                                                String analysisName)

      Get analysis of a project given the analysis name
      Parameters:
        `projectId` - Unique id of the project
        `analysisName` - Name of the analysis
      Returns:
        JSON of `MLAnalysis` object

    - #### deleteProject

          public javax.ws.rs.core.Response deleteProject(long projectId)

      Delete a project
      Parameters:
        `projectId` - Unique id of the project

Copyright © 2018 WSO2, Inc.. All rights reserved.