-
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). |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You get the "scriptable" status codes if you set the header |
Beta Was this translation helpful? Give feedback.
-
Thanks that worked. |
Beta Was this translation helpful? Give feedback.
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).