Introducing GET /samples!

Talha Baig
Wit.ai
Published in
1 min readJul 2, 2018

We are happy to announce a new API endpoint that allows you to programmatically retrieve your validated data (aka samples) directly from the Wit API. Instead of having to dig through your Wit console or having to store the validated samples yourself, you can now access them by making a simple API call. You can find the full documentation here.

Here are some ways you can retrieve your validated samples:

Filtering on entity

You can get samples with only certain entities by simply providing multiple entity_ids to filter your samples.

Example Request:

$ curl -XGET 'https://api.wit.ai/samples?entity_ids=intent,wit$location&limit=10' \
-H "Authorization: Bearer $TOKEN"

Filtering on entity and entity value

If you want increased granularity, you can specify an entity_id and the entity_values you would like, and all the samples containing that entity_id and at least one of the specified entity_values will be returned.

Here is an example request:

$ curl -XGET 'https://api.wit.ai/samples?entity_ids=intent&entity_values=buy_car,drive&limit=10' \
-H "Authorization: Bearer $TOKEN"

The creation of this endpoint came directly from a request made by the community. Thank you for your continued feedback and helping us improve!

--

--