Welcome to Neural Solution OaaS API documentation. This API documentation provides a detailed description of all the endpoints available in Neural Solution OaaS API.
The base URL for Neural Solution OaaS API is {host_ip}:port
This is the welcome interface for Neural Solution OaaS.
curl -X GET {host_ip}:port/description
Status Code | Description |
---|---|
200 | Welcome to Neural Solution OaaS! |
Submit a new task to Neural Solution OaaS.
Refer to task_request_description.md.
curl -X POST -H "Content-Type: application/json" -d @task_request.json {host_ip}:port/task/submit
Status Code | Description | Content |
---|---|---|
200 | Submitted successfully. | status : "Successfully.", task_id : Hashed key, msg : "Task submitted successfully" |
500 | Submitted failed. | status : "Failed." |
Get the status of a submitted task.
task_id
- The hashed key of the submitted task.
curl -X GET {host_ip}:port/task/status/{task_id}
Status Code | Description | Content |
---|---|---|
200 | The status of task . | status : "running"/"done"/"pending"/"failed"tuning_info : tuning informationoptimization_result : optimization time, Accuracy, Duration, result_path |
Get the log of a submitted task.
curl -X GET {host_ip}:port/task/log/{task_id}
task_id
- The hashed key of the submitted task.
Status Code | Description | Content |
---|---|---|
200 | Task log. | Task log. |
Get real-time log of a submitted task.
task_id
- The hashed key of the submitted task.
Status Code | Description | Content |
---|---|---|
101 | Get real-time task log. | Real-time task log. |
1000 | Normal Closure. | Connection was closed successfully. |
404 | Task not found. | status : "Failed." |
Check the health status of Neural Solution.
curl -X GET {host_ip}:port/task/log/{task_id}
Status Code | Description | Content |
---|---|---|
200 | The health status. | status : "Healthy", msg : "Neural Solution is running." |
500 | Ping fail! & error message. | status : "Failed.", msg : Error message. |
Get the running status of Neural Solution cluster.
curl -X GET {host_ip}:port/cluster
Status Code | Description | Content |
---|---|---|
200 | Cluster information. | msg : "Cluster information." |
Download optimized result locally.
curl -X GET {host_ip}:port/download/{task_id} --output quantized_model.zip
Status Code | Description | Content |
---|---|---|
200 | Download optimized model. | zip file |
400 | No quantized model when task failed. | msg : "Please check URL." |
404 | Download optimized model. | msg : "Task failed, file not found" |
Get user-facing API.
curl -X GET {host_ip}:port/description
Status Code | Description | Content |
---|---|---|
200 | User-facing API. | msg : The user-facing API. |