com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.
Making a Prediction Using a Model via REST API
Overview
Description | Make a prediction using a model. |
Resource Path |
|
HTTP Method | POST |
Request/Response Format | application/json |
Parameter description
Parameter | Description |
---|---|
{skipDecoding} | If this property is set to true, the predicted value is not decoded. This is an optional parameter. |
{percentileValue} | The percentile value for the prediction. This should be a double value between 0-100. It is required to specify a percentile value when the ML model uses an algorithm of the Anomaly Detection type. This property is optional for other algorithm types. For more information about algorithms of the Anomaly Detection type, see Machine Learner Algorithms. |
If you are using a deep learning model to make predictions without H2O runtime, see Using Deep Learning Models without H2O Runtime.
Sample cURL command
curl -X POST -b cookies https://localhost:9443/api/models/predict -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: multipart/form-data" -F modelId='1' -F dataFormat='csv' -F file=@'test-file.csv' -k curl -X POST -b cookies https://localhost:9443/api/models/predict?skipDecoding=true -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: multipart/form-data" -F modelId='1' -F dataFormat='csv' -F file=@'test-file.csv' -k test-file.csv 2,197,70,45,543,30.5,0.158,53 10,125,70,26,115,31.1,0.205,41 7,159,64,0,0,27.4,0.294,40 5,99,74,27,0,29.0,0.203,32 2,92,62,28,0,31.6,0.130,24 1,126,60,0,0,30.1,0.349,47 1,93,70,31,0,30.4,0.315,23
Example - 1
POST https://localhost:9443/api/models/predict
Sample output
["0","0","0","0","0","0","0"]
Example - 2
POST https://localhost:9443/api/models/predict?skipDecoding=true
Sample output
["0.21","0.11","0.12","0.04","0.09","0.01","0.32"]
REST API response
HTTP status code | 200, 404 or 500 For descriptions of the HTTP status codes, see HTTP Status Codes. |
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.