Added query api endpoint
Mask query api output before sending as response
Added TestCase method to allow raw internal http requests
Tests for API Key authentication
Fixed bug in tests causing issues with API requests