Request to Entity returns Reading forbidden

When I tries to send a GET request to
http://localhost:8080/app/rest/v2/entities/sec$User?view=_minimal
I get {"error":"Reading forbidden","details":"Reading of the sec$User is forbidden"}
in return.

Below is the permissions in role added to admin.
Skjermbilde 2021-02-08 001626

I use the components listed below:
com.haulmont.cuba:7.2.11, com.haulmont.reports:7.2.11, com.haulmont.addon.cubaaws:1.0.1, com.haulmont.fts:7.2.11, com.haulmont.addon.restapi:7.2.2

Did I miss something?

Problem with GET request in REST API is solved. Most likely it was misconfiguration when addon was installed. I removed it and installed it again and now it works.

For anyone wondering what the issue is for future reference, I had a similar issue setting up the REST API add-on in my project. I was using the Generic UI for my UI and for my security access role permissions, but I was missing a config line in my web-app.properties file:

cuba.rest.securityScope=GENERIC_UI

This can be found detailed in the documentation at Legacy Roles and Permissions - CUBA Platform. Developer’s Manual. It is necessary to have this line to avoid the error (that is, for your security roles to apply), but for some reason it was not automatically generated and added when the add-on was installed.

1 Like

Thanks Benjamin ,it worked 4 me