Closed dlangenk closed 1 year ago
You get the "scriptable" status codes if you set the header Accept: application/json
. You get this with the API wrapper script. Otherwise, the API returns responses meant for the browser (as it uses the same API).
If you use wrong credentials you get a 302 status code and get redirected to biigle login. This makes sense for the website, but shouldn't the rest api return a 401 unauthorized? This makes handling of errors more complicated as endpoints might also return a 302 as a correct response (for example the get file endpoint).