view and API route