403 (Forbidden) with related data

Hello,

Inside a server side script (V8js) I’m using a platform.api.get("mysql/_table/tablename") to get some data. This is working fine.

But as soon as I add related data like: platform.api.get("mysql/_table/table?related=tablename_by_tablename_id") it says 403 (Forbidden). When using the same under API Docs it’s not giving any issues. The difference under API docs is maybe that it’s using admin right with the script it’s using rights related to a role. The role has full access to mysql. Should I add some other services to this role to make it work?

tablename_by_tablename_id is the virtual related name that I defined.

Thanks

Hello @mrjohny,

Have you tried to add access to that specific table under roles? Also, did you check to allow for all actions: POST, GET…etc.?

Thanks,
@AlexBowen

Hi, i’ve set the database service (called mysql in this case) to component * with all the options checked (POST, GET, PATCH, DELETE, PUT). Also setting it to just that table doesn’t make a difference.