Retrieve the predictions for requested instances contained in a known Entity
The following will retrieve those rows (instances) requested of an entity and includes the calculated prediction(s) rather than All
Stipulating the columns (in order) will return the data known about the instance. The field list can be view in the Entity dashboard
curl https://app.graft.com/v1/query -H 'Content-Type: application/json' -X POST -d '{
"secret": "SArh7qq.4q9vhmwgh17JAJ6EuhAlJJUYavhtXVgiRTabcmgS",
"organization": "<your_organization_name>",
"project": "my_project",
"output_format": "csv",
"entity": "MyEntity",
"entity_columns": ["id", "data"],
"entity_ids": ["id1", "id2"],
"entity_predictors": ["my_predictor"]
}'
PREDICTOR COLUMNThe requested predictor would be provided in a new column called predicted_my_predictor |
Simple Example
Please see REST API overview for the example values
"List the requested minions in despicable_plan_1 providing id, name, speciality, number of films and their photo id with their predicted charisma rating"
curl https://app.graft.com/v1/query -H 'Content-Type: application/json' -X POST -d '{
"secret": "somethingiamnotgoingtosaveingithub",
"organization": "supervillain",
"project": "world_domination",
"output_format": "csv",
"entity": "despicable_plan_1",
"entity_columns": ["id", "name", "speciality", "number_of_films", "id_photo"],
"entity_ids": ["kevin101", "bob221", "dave14a"],
"entity_predictors": ["charisma"]
}'