Get Summary Sheet Via API in to Power BI

Options

I know the Power BI connector cant get data from a summary sheet report but can the API get this data?

If yes does anyone have an example I can use?

Many thanks

Martin

Answers

  • Lucas Rayala
    Lucas Rayala ✭✭✭✭✭✭
    Options

    Hi Martin,

    You can grab the report data using Python or your code of choice. Here's the script to get it as an Excel (the report ID is a dummy example ID:

    smartsheet_client.Reports.get_report_as_excel(
      3882962191181700,       # report_id
      download_folder_path
    )
    

    You can read more at https://smartsheet.redoc.ly/tag/reports#operation/getReport

    Let me know if this helps, and please flag this post if I answered your question! Good luck!

  • Martin Perry
    Options

    Hi thanks for that it put me on the right path, but i now have another problem when running curl to the summary sheet in that its asking for level=2 or higher.

    I assume that this is the "accessApiLevel" value but i cant find info on it in the API help. This was my attempt at guessing (which doesn't work). Any ideas are welcome.

    curl https://api.smartsheet.com/2.0/reports/389************ \ -H "Authorization: Bearer 9Cg9fYP*********************" \ -H "accessApiLevel=2" \

  • Martin Perry
    Options

    this is the full error message if that helps

    "errorCode" : 5623,

     "message" : "The report you are attempting to open is a sheet summary report, which requires a query parameter of 'level=2' (or higher if available) to be specified in the API request.",

     "refId" : "d3xadt"

  • Mattisphere
    Mattisphere ✭✭✭✭✭
    edited 12/22/23
    Options

    @Martin Perry The accessApiLevel should be part of the URL and not a header parameter:

    curl https://api.smartsheet.com/2.0/reports/{reportId}?accessApiLevel=2&level=3&include=objectValue