Have you had a look at Query Workbooks for User.
This shows which workbooks a user can view
Generally, permissions for a View are the same as the Workbook that view is part of. (unless you have explicitly changed them)
Hope this helps
Thank you for you response.
If I understand correctly, in order to achieve the required functionality of being able to check if a user has permission to view a visualization I will have to perform the following:
- Get the user ID of the user via the Get Users on Site end point with filter=name:eq:my-username
- Get all workbooks for this user via the Query Workbooks for User end point
- Since in my case the permission may differ at the View level so I need to Get all views for each of the workbook via the Query Views for Workbook end point
- Apply filter in my dot net code based on the contentUrl of the views to check if the input share URL is present.
This would make multiple calls to the Tableau Server REST API. Is there any way I can reduce the number of REST calls in this flow ?
I would agree with the steps 1-3. Not sure about step 4. I assume this is the key thing that you are looking for.
The alternative option, is to open up the repository, and see if you can query the tables in there for the same information...
That might be a simpler (quicker) exercise than the above steps.
All the best
Thank you for your suggestion. This looks to me as a fairly simple and straight forward approach.
Could you please confirm if the option to directly connect to the PostgreSQL repository and read the requierd information is a suggested approach and might not result into any unforeseen issues ?
1 of 1 people found this helpful
Both approaches will give you the information you are after. (using REST API or connecting directly to the Repo)
The difficulty with using REST API is the multiple requests you will have to make to the server to get the information you want.
The difficulty with querying the repo is the way permissions work in Tableau Server.
ie. To find out if a user can access a view, you need to question
Are they an Admin?
Are they a Project owner (or leader) of the project that the view is in?
Do they own the content (workbook)?
What groups can access the view (and are they a member of those groups)?
Have they been explicitly granted access as a user?
If you can answer all of those questions, then you can know (definitively) whether they can access a view (i think)