Retrieving or searching dashboards of a particular user

Comments

3 comments

  • Avatar
    Hamza Jap-Tjong

    Hi Arun,

    Within the admin-api there is a call named change owner ( /dashboards/{id}/admin/change_owner ). Could you use that perhaps? All you need is the dashboard id and the new owner id. Via Postman or a script you could easily bulk change all the dashboards

    0
    Comment actions Permalink
  • Avatar
    Moti Granovsky

    Hi Arun,

    You're in the right direction with that /admin endpoint.

    You can use it to get the primary instances of all dashboards owned by a specific user by their username/email: For example:

    /api/v1/dashboards/admin?dashboardType=owner&ownerInfo=true&ownershipType=allRoot&search=owner%3A%20test%40sisense.com&asObject=false
    A breakdown of the query parameters used:
    • "ownershipType=allRoot" means search all dashboards in the system, even those I (the current logged in user/owner of the token) have no access to
    • "dashboardType=owner" means only get the "owner instance" of each dashboard (we don't need the viewer clones)
    • "ownerInfo=true" isn't really required but it makes the response objects contain full owner info including an email so i can easily validate the results and filter out any incorrect ones, without having to do another call to /users
    • "search=owner%3A%20test%40sisense.com" which unencoded is "owner: test@sisense.com". this is a free-text search that supports this specific search by username

    Hope this helps you get it done!

    1
    Comment actions Permalink
  • Avatar
    Arun Shetty

    Yes, thanks Moti Granovsky . That is exactly what I am looking for. 

    0
    Comment actions Permalink

Please sign in to leave a comment.