How to add a Stored Procedure to a user Role

I have implemented a new Stored Procedure. How do I enable a user role to access the _proc endpoint. Is it possible or are stored procedures only accessible by admin users? Currently this is the error that I get:

{“error”:[{“context”:null,“message”:“POST access to component ‘_proc/update_game_stats’ of service ‘db’ is not allowed by this user’s role.”,“code”:403}]}


On the Roles tab, you may add rights to a role for a single stored procedure or for _proc as a whole. E.g.,

1 Like

Thanks!! The _proc option was not initially available but after restarting the services, it is now available.

Solution: When in doubt, restart the apache and mysql services.

Thanks again!

If the DB didn’t initially have any extant stored procedures, the _proc path won’t be available because when DreamFactory queried and cached the DB no procedures were listed. If you added your first procedure after DreamFactory connected to and cached your DB, then you’d need to refresh the DB (query with refresh=true) or flush the DreamFactory system cache before the DB would return its procedures and DreamFactory would know to list the _proc path.

Your restart probably just had the effect of refreshing DreamFactory’s cached copy of your DB.

1 Like