...
Description | Creating a project (with a dataset name) |
Resource Path |
|
HTTP Method | POST |
Request/Response Format | application/json |
Example
Info |
---|
For information on the property definitions that are used in a JSON file to define a project, see Sample Project Definition. |
Code Block | ||
---|---|---|
| ||
POST /api/projects
{
"name" : "wso2-ml-project",
"description" : "test",
"datasetName" : "diabetes"
} |
...
Prerequisites
It is required to create a dataset before creating a project.
Example cURL command
Code Block | ||
---|---|---|
| ||
curl -X POST -d @<JSON_PAYLOAD>@'create-project.json' -H "Content-Type: application/json" -H "Authorization: Basic YWRtaW46YWRtaW4=" -v https://<ML_HOST>:<ML_HTTPS_PORT>localhost:9443/api/projects -k |
- The path to the JSON file that defines the project needs to be defined as the
<JSON_PAYLOAD>
value. (e.g.create-project.json
) - By default,
<ML_HOST>
islocalhost.
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 byn
, the default port value needs to be incremented byn
.
An example cURL command is as follows.
...
language | powershell |
---|
...
Example
Info |
---|
For information on the property definitions that are used in a JSON file to define a project, see Sample Project Definition. |
Code Block | ||
---|---|---|
| ||
POST https://localhost:9443/api/projects
{
"name" : "wso2-ml-project",
"description" : "test",
"datasetName" : "diabetes"
} |
REST API response
HTTP status code | 200 For descriptions of the HTTP status codes, see HTTP Status Codes. |