You must perform the following steps to use Inference API:
-
Place pem encoded digital certificate (.pem) in the Smart Reference Data application server web API directory or in any other path in the Smart Reference Data application server.
-
Access the web API virtual directory folder, and then open Web.Config file.
-
Search for <appSettings> section and set the value for SSLKeyFilePath to the path of the pem encoded certificate (.pem) in the application server.
<add key ="SSLKeyFilePath" value="C:\certificate\mycert.pem"/>
Headers
Header Name |
Description |
Required |
Values |
---|---|---|---|
Authorization |
Access token |
Required |
Bearer <access_token> |
Content-Type |
Request type format |
Required |
application/json |
POST body
Element |
Description |
Type |
Required |
Notes |
---|---|---|---|---|
ModelPath |
Path of model files |
String |
Required |
|
ModelFilenamePrefix |
Prefix for model file |
String |
Required |
Example: If model file name is parent_clustering_kmeans, then prefix is ‘parent’ |
AdditionalFiltering |
Enable/disable Additional Filtering while fetching recommendations |
Boolean |
Optional |
Default is True |
PathToTargetDatabase |
Use Target Database for post filtering |
Boolean |
Optional |
Default is True |
Sample request
https://<appserver with domain>/<virtual_directory>/Srd/V2/Projects('SDB')/Disciplines(5020)//Nls(1)/Inference
{
"ModelPath": "\\codelist\\Training\\Model",
"ModelFilenamePrefix": "parent",
"AdditionalFiltering": true,
"PathToTargetDatabase": true
}
Response
Element |
Description |
Type |
Notes |
---|---|---|---|
ModelPath |
Path of model files |
String |
|
ModelFilenamePrefix |
Prefix for model file |
String |
|
Port |
Port on which Inference Service is running |
Integer |
|
ProcessId |
Id of Inference Service process |
Integer |
|
InferenceServer |
IP address of the Inference Server |
String |
|
AdditionalFiltering |
Additional Filtering while fetching recommendations |
Boolean |
|
PathToTargetDatabase |
Target Database for post filtering |
Boolean |
Sample Response
{
"@odata.context":
"https://<appserver with domain>/<virtual_directory>/Srd/V2/$metadata#Projects('SDB')/Disciplines(5020)/Nls(1)/Inferences/$entity",
"ModelPath": "D:\\models",
"ModelFilenamePrefix": "parent",
"Port": 443,
"ProcessId": 10604
"InferenceServer": "131.111.123.100",
"AdditionalFiltering": true,
"PathToTargetDatabase": true