Filtering & sorting
List endpoints take the same two query parameters. filter[...] narrows the result, sort orders it — and both work the same way on records, counts, and exports.
Filtering
Filters are sent as bracketed query parameters — filter[host]=go.acme.com. Combine as many as you need; they narrow the result together.
The list endpoints publish these filters: filter[id], filter[host], filter[tld], filter[handler], filter[destination], filter[search], filter[tags], filter[traffic], filter[dns_correct], filter[created_after], filter[created_before].
# Links on one hostname, newest first
curl -G "https://api.redirhub.com/v1/link" \
-H "Authorization: Bearer $REDIRHUB_TOKEN" \
--data-urlencode "filter[host]=go.acme.com" \
--data-urlencode "sort=-created_at"Sorting
Sort results by field. Prefix with - for descending order. Available sorts: id, created_at, updated_at
Accepted values: id, -id, created_at, -created_at, updated_at, -updated_at.
The same filters elsewhere
Exports accept the identical parameters, so a filtered view in your product can become a filtered export without rebuilding the query. See POST /bulk/export.
