add tests for /api/* requests