Free Trial
Features

API v2: announcing filtering and sorting

Luca Guidi's profile picture Luca Guidi on

We recently launched our API v2 with official clients for Ruby and Go. For a few months it will be in beta in order to collect feedback from you, a member of our beloved community of developers.

There are two features that developers requested and we're happy to release today: filtering & sorting.

Filtering

Filtering makes it possible to ask only for the exact subset of data that you you're looking for.

Imagine having hundreds of domains - if you don't, you should ;) - but only being interested in looking into the .com ones. Until today you had to download the entire set of data and then to select only the .com and reject the rest. Filtering establishes a simpler way to do that — It makes the selection process to happen on our servers. With a filter, you'll receive only the .com domains.

curl -H 'Authorization: Bearer <token>' \
     -H 'Accept: application/json' \
     https://api.dnsimple.com/v2/1010/domains?name_like=.com

Filters can be used with resources like zones or DNS records and for each resource you can apply one or more filters.

Sorting

Sorting allows data to be ordered according to a policy decided by you. Again, with hundreds of domains you want to see first the ones that are going to expire soon.

curl -H 'Authorization: Bearer <token>' \
     -H 'Accept: application/json' \
     https://api.dnsimple.com/v2/1010/domains?sort=expires_on:asc,id:desc

This parameter (sort) accepts a set of comma separated key-value pairs: the name of a field and the order criteria (asc for ascending and desc for descending).

The order of fields is relevant, as it will determine the priority of the sorting policies.

Client Updates

As of today, our Ruby and Go clients support these new amazing features!

Share on Twitter and Facebook

Luca Guidi's profile picture

Luca Guidi

Former astronaut, soccer player, superhero. All at the age of 10. For some reason now I write code.

We think domain management should be easy.
That's why we continue building DNSimple.

Try us free for 30 days
4.5 stars

4.3 out of 5 stars.

Based on Trustpilot.com and G2.com reviews.