API for Product Recommendation
Enhencer allows users to get the API that should enable them to obtain predictions for the desired model that has been created using Custom Project in Enhencer.
While in the Flow section of Enhencer click the Tune tab. This should bring up the predict section. The left panel contains all the models that have been trained. In order to obtain predictions first choose the desired model to use for the predictions.
Then click the Predict button from the right panel.
This should bring up the Predict options in the middle panel.
Click the API button and then Get API Code button that should download a text file with all the information required.
This API can be used and implemented to the preferred platform by HTTPS POST REQUEST; such as, python, postman, nodejs, php, java etc.
The API File contains:
- hostname: The hostname of the https post request.
- port: Port number of the host server.
- path: Path of the https request inside the host server.
- method: Method of the https request which is POST in this case.
- token: An unique API token code.
- key: An unique key for the API token
- inputs: Pay close attention to this as this is a crucial step. Input refers to the data that must be of the same structure as the data used in model training except for the target variable inself. In other words the Input data at this step should have all the variable fields except for the target variable (Dependent Variable) that was used to train the model with. A list of required fields is also mentioned in the text file so that users know exactly which variable fields must be present.
For any further assistance regarding API connections please feel free to contact us.