Get Prediction (Single Apply)

Modified on Mon, 23 Jun at 2:20 AM

Description:

This API provides facility to get predicted value from model for single record of predictor criteria input. API response is in JSON format

API Endpoint: 

/ws/predective


Method: 

POST

 

Header: 

 

Field

Value

SOAPAction

/ws/datasetManagement.wsdl

 

Request:

 

Parameters

Type

Value

Header - username

String

Smarten Username

Header - password

String

Smarten Password

Body - model Id

String

Smarten Insight Model Id

 

Request Example: 

{

    "predictiveId":"<ModelId>",

    "predictiveData":

        [ { "columnName" : "column1",

            "columnsValuesList" : [ "value1", "value2", "value3"]},

          { "columnName" : "column2",

            "columnsValuesList" : [ "value1","value2","value3"]},

           { "columnName" : "column3",

            "columnsValuesList" : [ "value1","value2","value3"]}

    ]

}

 

Response: 

{

    "status": 1/0,

    "message": "A response message",

    "titileForPrediction": <Title for prediction>,

    "result": result,

    "accuracy": <Accuracy>

}


Postman Example: 

 

You can import the example below into Postman. 

 

curl --location 'https://<SmartenURL>/smarten/API/predictive/getPrediction' \

--header 'username: username' \

--header 'password: password\

--header 'Content-Type: application/json' \

--header 'Cookie: JSESSIONID=hI8MlzXWBy8ZZVNJ9lvMP_Zv7ucuj7pnh_XlG8e0.ip-172-31-8-13' \

--data '{

    "predictiveId":"modelId.prd",

    "predictiveData":

        [ { "columnName" : "Name",

            "columnsValuesList" : ["dataPoint"]},         

          { "columnName" : "Name",

            "columnsValuesList" : ["dataPoint"]}

    ]

}'


Tags: SOAP-based web services, SOAP API, get prediction, smarten insight, cURL,

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article