Retrieve the enrichments (labels) for all instances contained in a known Entity
The following will retrieve all rows (instances) of an entity and return the labels defined in "entity_enrichments". 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_enrichments": ["my_enrichment1", "my_other_enrichment"]
}'
Simple Example
Please see REST API overview for the example values
"List the details held in despicable_plan_1 providing id, name, speciality, number of films and their photo id and their current flying skills and emotional disposition"
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_enrichments": ["flying_skills", "disposition"]
}'