Machine Learning Scenario: Phase 3 - Business Process
Machine Learning Scenario: Phase 3 - Business Process
The model is ready to be used in a business process. The REST-API can be called from virtually any programming language or from other applications that are designed to interface with REST-API. A common tool to test such APIs is Postman. during this exercise you will use Postman to test your REST-API.
-
Open Postman.
-
Select the + symbol on the panel.
-
Enter the Deployment URL from the previous chapter as request URL.
-
Extend the URL with v1/uploadjson/
-
Change the request type to POST.
- Enter the logon credentials.
- Go to the Authorization tab.
- Select Basic Auth.
- Enter your user name and password for SAP Data Intelligence Cloud. Here you must enter the fully qualified user name. This user name starts with your tenant’s name, followed by a backslash and your actual user name. For example, f your tenant name is xa-01 and your user is , then you would enter: xa-01
- Configure the request further:
- Go to the Headers tab.
- Enter the new key X-Requested-With with value XMLHttpRequest.
- Finally, pass the input data to the REST-API, on which the prediction will be based:
- Select the Body tab.
- Choose raw
- Enter this JSON syntax:
- Press Send to obtain the prediction. You should see the prediction that comes from SAP Data Intelligence Cloud!
- If you can run a half-marathon in 2 hours, the model estimates a marathon time of under 4 hours 24 minutes.
- Try the REST-API with different values to see how the predictions change.
- Just don’t extrapolate, stay within the half-marathon times of the training data.
Well done! You have exposed your model as a REST-API to Postman.