Retrieve embeddings, enrichments, predictions contained in a known Entity
The following allows the user to retrieve embeddings, enrichments and predictors in a single call. By defining "entity_ids" the search can be limited to specific rows (instances) within the specified entity.
By adding or removing the "embedding", "enrichments" and "predictors" you can customize the results
Stipulating the columns (in order) will return the data known about the instance. The field list can be view in the Entity dashboard
All rows
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_embedding": true,
"entity_enrichments": ["my_enrichment1", "my_other_emnrichment"],
"entity_predictors": ["my_predictor"]
}'
Specific rows
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_embedding": true,
"entity_enrichments": ["my_enrichment1", "my_other_emnrichment"],
"entity_predictors": ["my_predictor"]
}'
Simple Example
Please see REST API overview for the example values
All Rows
"List the details held in despicable_plan_1 for ALL minions providing id, name, speciality, number of films, photo id, embedding, enrichment and predictor values"
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_embedding": true,
"entity_enrichments": ["flying_skills", "disposition"],
"entity_predictors": ["charisma"]
}'
Specific Rows
"List the details held in despicable_plan_1 for kevin101, bob221 and dave14a providing id, name, speciality, number of films, photo id, embedding, enrichment and predictor values"
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_embedding": true,
"entity_enrichments": ["flying_skills", "disposition"],
"entity_predictors": ["charisma"]
}'