Fixing 404 code JSON support in API