Filtering
In this guide, we will look at how to filter the data returned in the responses when querying the Previsto API.
Most entities allows for filtering by most of their properties using query parameters.
Example of filtering by query parameters
In this example, we filter the response. As a result, we get only the contacts that match the filter.
- Name
*
- Type
- string
- Description
The property you want to filter by.
Manual filtering using cURL
curl -G https://api.previsto.io/contacts \
-u sk_12345 \
-d name="Dorris"
Filtered response
[
{
"id": "cont-WAz8eIbvDR60rouK",
"name": "Dorris"
// ...
},
{
"id": "cont-hSIhXBhNe8X1d8Et",
"name": "Dorris"
// ...
},
{
"id": "cont-fbwYwpi9C2ybt6Yb",
"name": "Dorris"
// ...
}
]