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

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Overview

DescriptionCreating a new analysis
Resource Path

/api/analyses

HTTP MethodPOST
Request/Response Formatapplication/json

Example

For information on the property definitions that are used in a JSON file to define an analysis, see Sample Analysis Definition.

POST /api/analyses
{
"name" : "wso2-ml-analysis",
"comments" : "analysis test",
"projectId" : 1
}

Sample cURL command

curl -X POST -d @<JSON_PAYLOAD> -H "Content-Type: application/json" -H "Authorization: Basic YWRtaW46YWRtaW4=" -v https://<ML_HOST>:<ML_HTTPS_PORT>/api/analyses -k
  • The path to the JSON file that defines the analysis needs to be defined as the <JSON_PAYLOAD> value. (e.g. create-analysis.json)
  • By default, <ML_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified.
  • By default, <ML_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n, the default port value needs to be incremented by n.

An example cURL command is as follows.

curl -X POST -d @'create-analysis' -H "Content-Type: application/json" -H "Authorization: Basic YWRtaW46YWRtaW4=" -v https://localhost:9443/api/analyses -k

REST API response

HTTP status code

200

For descriptions of the HTTP status codes, see HTTP Status Codes.

  • No labels