The Predict App API allows you to retrieve an ad hoc prediction generated on one or more values provided in entity_predict_adhoc
Sample Code
In this example the predict app was built against 2 fields: product_description and product_category
curl https://app.graft.com/v1/query -H 'Content-Type: application/json' -X POST -d '{
"secret": " ... ENTER YOUR FULL API KEY HERE",
"output_format": "csv",
"organization": "<org_name>",
"project": "<project_id",
"app_name": "my_app",
"instance_name": "<instance_id>",
"entity": "<entity_name>",
"config_name": "my_config",
"entity_predict_adhoc": [
{
"product_description": "query text",
"product_subcategory": "query text"
}
],
"entity_predictors": [
"<prediction_name>"
]
}'
The entity_predictor is the name you gave the application during configuration
Where multiple fields are used it is essential that values are passed in for each field used or the query will fail