Hooks up endpoint to api endpoint
Adds filtering by type