adding filtered JSON API endpoint