API updates!

Introducing DELETE /roles and DELETE /samples

We are happy to announce two new features that allow you to delete roles and samples directly from the Wit API: DELETE /roles and DELETE /samples!

Deleting roles

You no longer need to manually delete roles from the console, or retrain your app with samples without the role you’d like to delete as a hack to remove it. When a role is no longer useful for a given entity, you can now easily delete it by making a simple API call (see below.) The full documentation for deleting roles can be found here
 
 Example Request

curl -XDELETE 'https://api.wit.ai/entities/flight:destination?v=20170307' \
-H 'Authorization: Bearer $TOKEN'

Deleting samples

Similarly, you can now delete samples by making a simple API call instead of having to manually delete each sample through the console (see below.) Additionally, if you make a POST /samples request with incorrect data, you can easily delete the samples with DELETE /samples using the same body as the POST request. The documentation for deleting samples can be found here
 
 Example Request

curl -XDELETE 'https://api.wit.ai/samples?v=20170307' \
-H 'Authorization: Bearer $TOKEN'
-H 'Content-Type: application/json' \
-d '[
{
"text": "I want to fly to sfo"
},
{
"text": "I want a flight"
}
]'

Thank you to those of you who continue to suggest enhancements and features to Wit, please continue doing so on GitHub!