Last tested: Dec 28, 2017
First, you will want to pull down the
id fields from every dashboard using the
all_dashboards endpoint. We don't need the other fields, so limiting to just those two helps save some time.
Be sure to grab the dashboard folder's
content_metadata_id, rather than the dashboard's
content_metadata_id. (Both are included in the response from the
all_dashboards endpoint.) The content access information for dashboards (and Looks) is associated with the folder's
content_metadata_id, since you manage content access at the folder-level. Using the dashboard's
content_metadata_id will give you an empty result from the
all_content_metadata_access endpoint you'll use next.
Next, use the
all_content_metadata_access endpoint to pull down all of the content access information. Each
content_metadata object has a list of group IDs that have access to the content represented by it. From there, you will want to map
content_metadata_id to the dashboard
id from the first step.
For a given user, you will want to find all of the
all_content_metdata_access which give access to any group they are a part of, and then you will easily be able to list the dashboard IDs that correspond to them.
- As an admin, call
login_as_user(user_id), passing in the id of the user in question. This will return an access_token that will run as the specified user.
all_dashboards()using the access_token obtained above.
- Done! :) As with all API functions, the responses are filtered to only return the data that the caller has permission to see.