2 Replies Latest reply on Aug 16, 2018 8:28 AM by Jusran Mawardi

    Using 10.5's REST "Query View Data" method against a Dashboard

    Russell Christopher

      Goal : Use the REST API to return a sample of data from each view in a dashboard.

       

      It appears that if one uses this new-ish endpoint against a Dashboard (vs a worksheet), it only returns data from the FIRST worksheet added to the dashboard...

       

      curl .../views/2474164d-8d37-4a4c-abc7-c2070fd25fd5/data

       

      ...so if viewid 2474164d-8d37-4a4c-abc7-c2070fd25fd5 = "My Sheet" and "My Sheet" contains a single data source, I'm going to be a happy camper

       

      However, if viewid 2474164d-8d37-4a4c-abc7-c2070fd25fd5 = "My Dashboard" and it contains 3 different worksheets, and each worksheet has a distinct data source associated with it, then I'm out of luck if I want to use this method to get data for the second or third worksheet.

       

      I pretty much need to query the individual worksheets OUTSIDE of the dashboard if I want to sample data from each sheet. OK. Willing to do that.

       

      But I don't see anything in the current API that lets me understand what views are included in a specific dashboard. so I'm sort of SOL here, too.

       

      I guess I could download each workbook from Server and then parse the XML to figure out what views are in each dashboard, but that seems like cruel and unusual punishment. Any ideas?