Currently we have a dashboard with Role based security implemented. Role information is available in DB itself, so no problem till now.
But in near future we should decommission the security table as part of a new policy in our company and use rest API calls to fetch security information (like... we have to call API with user ID and in response we'll get role detail) on the fly.
I believe the REST API can be used to set and call permissions on the Tableau Server end but I don't think it can be used from within a dashboard for row-level security. I've moved this post to the REST API portion of the site where another user may have more advice.