Magnolia 5.6 reached end of life on June 25, 2020. This branch is no longer supported, see End-of-life policy.
...
If the user, which sends the REST request, has not appropriate permissions for the requested resource, it gets redirected to login page - which is not always what you want. While developing REST features, you rather want to see the HTTP response codes (for instance 200 for OK, and many diferent numbers >=400 if a problem has occured) instead to get redirected to the login page.
.
.